int true = 0;
while (true)
{
//do something
}
true = false
http://localhost:52108/Trade/Details/1953452?class=pull-left
bool calculateLeapYear(uint8_t year) {
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
return true;
} else {
return false;
}
}
uint8_t and a useless if.
apps_to_be_deployed = apps_to_be_deployed.strip()
if apps_to_be_deployed.endswith(":"):
apps_to_be_deployed_length = len(apps_to_be_deployed)
apps_to_be_deployed_list = list(apps_to_be_deployed)
apps_to_be_deployed_list[apps_to_be_deployed_length - 1] = ''
apps_to_be_deployed = "".join(apps_to_be_deployed_list)
def divide(a, b):
try:
return a / b
except:
x = 17
My smart exception handling before meeting "pass" :))
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
public List<Location> searchLocations(final String phrase) {
final String like = phrase.replaceAll("(\\s)", "%$1") + "%";
final List<Location> result = getLocations(
"replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(\n" +
"replace(lower(name),'.',' '),\n" +
"'á','a'),\n" +
"'é','e'),\n" +
"'í','i'),\n" +
"'ĺ','l'),\n" +
"'ó','o'),\n" +
"'ŕ','r'),\n" +
"'ú','u'),\n" +
"'ý','y'),\n" +
"'č','c'),\n" +
"'ď','s'),\n" +
"'ľ','l'),\n" +
"'ň','n'),\n" +
"'š','s'),\n" +
"'ť','t'),\n" +
"'ž','z'),\n" +
"'ä','a'),\n" +
"'ô','o') LIKE lower(?)\n" +
"ORDER BY CASE country_code WHEN 'SK' THEN 0 ELSE 1 END, length(name), name", like);
return result;
}
Author: I am satisfied with the project and I don't think I have anything to be ashamed of
void destroy_phone(T9obj* ptr_T9Obj){
free(ptr_T9Obj);
}
Such thoughtful name!
if(date.getFullYear() <= 2017) {
if(date.getMonth() <= 11) {
if(date.getDate() <= 26) {
if(date.getHours() <= 23) {
if(date.getMinutes() <= 59) {
if(date.getSeconds() <= 59) {
//Display popup before 2017-11-27
}
}
}
}
}
}
public IsTrueWithNewTokenResponse isVoice(String token){
IsTrueWithNewTokenResponse isTrue = isWhatever(token, 0)
resultStatus.success = isTrue.generalResultResponse.success;
resultStatus.statusCode = isTrue.generalResultResponse.statusCode;
resultStatus.statusDescription = isTrue.generalResultResponse.statusDescription;
if(isTrue != null && isTrue.generalResultResponse != null && isTrue.generalResultResponse.success){
isTrue.isTrue = !isTrue.isTrue
return isTrue
} else {
return isTrue
}
}
class PythonClass {
protected boolean True = true;
protected boolean False = false;
protected Object None = null;
}
class MyClass extends PythonClass {
String do_something(Object foo) {
if (foo == False)
return "" ;
else if (foo == None)
return "!" ;
else if (foo == True)
return "Yay!" ;
}
}
Yikes
private static function derivePrice(...)
{
$price = self::derivePriceUnchecked($vars);
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
if (isset($price)) {
// CODE HERE
}
return $price;
}
$("#search-submit").click(function() {
$("#search form").submit()
});
type="submit"
is too mainstream, jquery is the proper way to do it
if yearOfBirth > 2002 {
fmt.Errorf("year of birth not allowed %d", yob)
return
}
local part = script.Parent
local OriginColor = Color3.new(0,170,255)
local KillColor = Color3.new(1, 0, 0)
part.Touched:Connect(function(H)
local humanoid = H.Parent:FindFirstChild("Humanoid")
if humanoid and part.Color == KillColor then
humanoid.Health = 0
end
end)
local shit = 1
repeat
part.Color = OriginColor
wait(1.5)
part.Color = KillColor
wait(1.5)
until shit == 2