``````// IsFooBar being a boolean, we check if it's different from true and from false
if (x.IsFooBar != true && x.IsFooBar != false)
{
return "error";
}``````

x.IsFooBar is juste a regular bool

``````Console.WriteLine("|"+ Espace(x-1) + (h==3?" o":""));
Console.WriteLine("|"+ Espace(x-1) + (h==2?" o":(h==3?"/|\\":"")));
Console.WriteLine("|"+ Espace(x-1) + (h==1?" o":(h==2?"/|\\":(h==3?" |":""))));
Console.WriteLine("|"+ Espace(x-1) + (h==0?" o":(h==1?"/|\\":(h==2?" |":(h==3?"/ \\":"")))));
Console.WriteLine("|"+ Espace(x-1) + (h==0?"/|\\":(h==1?" |":(h==2?"/ \\":""))));
Console.WriteLine("|"+ Espace(x-1) + (h==0?" |":(h==1?"/ \\":"")));
Console.WriteLine("|"+ Espace(x-1) + (h==0?"/ \\" : ""));``````
``````def possibilities():
alphabets=(n,o,r,t,h,e,a,s,u,w,m,y)
combinations=list()
for n in range(9,-1,-1):
for o in range(9,-1,-1):
for r in range(9,-1,-1):
for t in range(9,-1,-1):
for h in range(9,-1,-1):
for e in range(9,-1,-1):
for a in range(9,-1,-1):
for s in range(9,-1,-1):
for u in range(9,-1,-1):
for w in range(9,-1,-1):
for m in range(9,-1,-1):
for y in range(9,-1,-1):
if len(set([n,o,r,t,h,e,a,s,u,w,m,y]))==12:
north=10000*n + 1000*o +100*r +10*t +h
east=1000*e +100*a +10*s +t
south=10000*s + 1000*o +100*u +10*t +h
west=1000*w + 100*e +10*s +t
earth= 10000*e + 1000*a + 100*r +10*t +h
if north +east +south +west == earth:
combinations.append((north,east,south,west,earth))

return combinations``````
``````let length str =
let len = String.length str in

let rec length_helper str curr =
if str = "" then 0 else 1 + length_helper (String.sub str 1 (len - curr - 1)) (curr + 1)

in length_helper str 0;;``````

We use this code internally at Google. JFC.

``````function uploadimg(file) {
var ext = file.value.split('.').pop().toLowerCase();

if (size > 3145728) {
title: "Error",
msg: " image to large",
icon: "error"
});
return true;
}

return false;
}

var pdfcheck = this;
var ext = pdfcheck.value.split('.').pop().toLowerCase();
if (!(\$.inArray(ext, ['pdf']) == -1)) {
\$("#preview_img").attr("src", "");
\$("#preview_img2").attr("src", "");
}
} else {
if (uploadimg(pdfcheck)) {//dude, I think the image you upload to check is your dick, only small enough you would rather keep going producing shitcode.
return false;
}
var chimgarr = ["image/png", "image/PNG", "image/jpg", "image/JPG", "image/jpeg", "image/JPEG", "image/gif", "image/GIF", "image/bmp", "image/BMP"];
\$("#preview_img").attr("src", e.target.result);
\$("#preview_img2").attr("src", e.target.result);
\$("#pdf-contents").hide();
\$("#pdf_name").val("");
\$("#btn_pdf_view").hide();
\$("#pic_name").val("");
}
} else {
\$("#preview_img").attr("src", "");
\$("#preview_img2").attr("src", "");
}
} else {
\$("#preview_img").attr("src", "");
\$("#preview_img2").attr("src", "");
}
}
});``````

The moment an important image ready to be uploaded It's really important that should be checked again and again.

``````function edit_vehality: locality,
};
let opts = { 'method': 'put', 'route': '/border/' + border_id, 'status': status, 'account_access_token': saved_values.superadmin.account_access_token, 'params': params };
request(opts)
.then(function(res) {
resolve(res.result);
}).catch(reject);
})
}
``````
``````request.get_something = (something_id) => {
return new Promise((resolve, reject) => {
database.find_all('something', { where: {something_id: something_id, is_deleted:0} }).then(function(res){
let result = {};
res = JSON.stringify(res);
res = JSON.parse(res);
res.forEach(function(element){
if(typeof element.is_deleted != "undefined"){
delete element.is_deleted;
}
let key = 'something_' + element.id;
result[key] = element;
});
resolve(result);
}, reject);
});
}
``````

I LOVE MY JOB!

#274 PHP +10
``````foreach (\$k as \$kk) {
foreach (\$kk as \$kkk) {
}
}``````
``````public bool IsTrue(bool value) {
return value.ToString().length() == 4;
}``````
``````set_locations(locations){
return new Promise((resolve, reject) => {
this.locations = locations;
resolve();
});
}``````
`````` private void EnableGPSAutoMatically() {
/* about 50 lines of code were here ...
* all depends on this if statement ... !
* Actually the whole method depends on this if statement ! */
}
}
});
}
}``````

what if that mysterious power change it to be not null !! It gonna be a holly object and You should not "new" it anymore ?! damn ... :)))

``````string AllPDF = "";
int CountPDF = 0;
AllPDF = txtInput.Text;
string[] AllPDF2 = AllPDF.Split(';');
List<string> PDF = new List<string>();
while (PDF.Count != CountPDF)
{
File.Delete(AllPDF2[0 + CountPDF] + ".pdf");
CountPDF++;
}``````

I believe, there are so many easier ways to do that

``return isDisabled == false ? false : true;``
``````if student_id:
assignments = Assignment.objects.filter(week__in=weeks)

unenrolled_students = Wave.objects.filter(week__in=weeks).values_list('unenrolled_students', flat=True)

# Construct responses based on assignment type
Assignment.build_assignments_for_weeks(responses, assignments, students, unenrolled_students)
max_num_assessments = Assessment.build_assessments_for_weeks(responses)

elif wave_id:
assignments = Assignment.objects.filter(week__in=weeks)

unenrolled_students = Wave.objects.filter(week__in=weeks).values_list('unenrolled_students', flat=True)

# Construct responses based on assignment type
Assignment.build_assignments_for_weeks(responses, assignments, students, unenrolled_students)
max_num_assessments = Assessment.build_assessments_for_weeks(responses)
``````        //JSONObject input;