Random line of code thread
category: code [glöplog]
Code:
void storeChar( SDL_KeyboardEvent *key )
{
i = SDL_GetKeyName( key->keysym.sym );
}
10 PRINT "HELLO"
Code:
cmp.w #$c001,$0.w
Code:
let time = time.as_secs() as f64 + time.subsec_nanos() as f64 / 1e9;
10 PRINT "Sahra is the best"
Code:
let image = image::load(Cursor::new(&include_bytes!("logo.png")[..]), image::PNG).unwrap().to_rgba();
1?"POUET ";
2GOTO1
2GOTO1
Code:
$responder->respond($response);
public static FragmentXYZ newInstance(Object param) {
FragmentXYZ fragment = new FragmentXYZ();
fragment.myObject = param;
return fragment;
}
Not using Parcelable mechanism ? Well....
FragmentXYZ fragment = new FragmentXYZ();
fragment.myObject = param;
return fragment;
}
Not using Parcelable mechanism ? Well....
Code:
move.l a7,-(a7)
Code:
if (getLogger().isDebugEnabled()) getLogger().debug(String.format("%s: get source document...", this));
👍
Quote:
Code:$responder->respond($response);
Code:
fields = [field for field in all_fields if field in fields]
https://github.com/wagtail/wagtail/pull/2484#discussion-diff-72603663
=> fields-equals-field.mp3
Precalculating bootblock code FTW \:D/
Code:
move.w #$8e9,(a0)+ ; bset #x,xx(a1)
If demo coding is getting boring, do something different. \o/
Code:
; GEMDOS and XBIOS emulation code for Atari ST -> Amiga conversions
Code:
egrep -i '^[a-f]+$' words.txt
True hackers will understand. :)
Code:
ENABLE_REALITY = 1
0xF:
psenough:
stfsux:
Thank you psenough and stfsux, your comments are just as entertaining as the code I posted. :)
Quote:
Code:str[strlen(str)] = 0;
In a commercial project with millions of users.
psenough:
Quote:
0xF: seems like a smart hack to ensure the string always ends with a 0, which is actually useful to avoid buffer memory leaks and such C foley. not sure if there are any misuse consequences though?!
stfsux:
Quote:
If the string hasnt a 0 it will write a 0 somewhere else in memory.
If the string already has 0 it an expensive shitload of nop.
Thats clearly retarted.
Thank you psenough and stfsux, your comments are just as entertaining as the code I posted. :)
Code:
hr = fw->context->Map( cbufferMaterial, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
cbMaterial* material = (cbMaterial*) res.pData;
material->Ambient = XMVectorSet(0.0f, 0.20f, 0.0f, 1.0f);
material->Diffuse = XMVectorSet(0.0f, 0.0f, 0.750f, 1.0f);
material->Specular = XMVectorSet(0.0f, 0.0f, 0.0f, 1.0f);
material->SpecularPower = 1.0f;
fw->context->Unmap(cbufferMaterial, 0);
Code:
drawrect -nr @gifJockey $hget(gj.colour, white) 1 $hget(gj.window, controlViewX) $hget(gj.window, controlViewY) $hget(gj.window, controlViewW) $hget(gj.window, controlViewH)
Code:
public $stetson;
%blow
Code:
result.m[y + x * 4] += this->m[ay + ax * 4] * right.m[by + bx * 4];
Code:
w = (1 / max(e, d - c.w)) * pow(max(ee, dot(c.xyz, m[3].xyz)), 32);