pouët.net

Go to bottom

Random line of code thread

category: code [glöplog]
Code: if(m_pLoop && m_pLoop->cSampleLoops > 0) { ck.ckid = mmioFOURCC('s', 'm', 'p', 'l'); ck.cksize = 0L; if(m_pLoop->Loops[0].dwStart < m_pLoop->Loops[0].dwEnd) { mmioCreateChunk(hmmio, &ck, 0); mmioWrite(hmmio, (const char*)m_pLoop, m_iLoopLen); mmioAscend(hmmio, &ck, 0); //TRACE(_T("%s: %d-%d\n"), sFile, m_pLoop->Loops[0].dwStart, m_pLoop->Loops[0].dwEnd); } }
added on the 2008-05-30 17:07:02 by bartman bartman
if($data[$tableau_import['COL_NumInventaire']]=='Numéro d\'inventaire'|| $data[$tableau_import['BIBLIO_titre']]=='Titre') {$row++;continue;}
Code:if(isset($_REQUEST['ajax'])) {
glend
added on the 2008-05-30 18:52:51 by Shockwave Shockwave
#include <windows.h>


#define SS int
SS mem[26][3];
#define AS ==

#define Open {
#define Close }
#define Q =
#define LL GetSystemMetrics
#define FULL 0
#define Run int WINAPI WinMain(HINSTANCE , HINSTANCE , LPTSTR , int )
#define DESK GetWindowDC(FULL)
#define MX LL (FULL)
#define MY LL (1)
#define Z if
#define nice Open for(SS i=FULL;i<25;i++) { mem[i][FULL]=rand()%MX; mem[i][1]=rand()%MY; mem[i][2]=rand()%4; Close Close
#define S 22
#define PIN(i) Open Hazz(mem[i][FULL], mem[i][1], mem[i][2]); Rectangle(DESK, mem[i][FULL], mem[i][1], mem[i][FULL]+S, mem[i][1]+S); Close
#define OK Open for(SS i=FULL;i<25;i++) PIN(i); Close
#define Paint RedrawWindow((HWND)FULL,FULL,FULL,0x0085| 0x0100);
#define Quit Open ReleaseDC(FULL, DESK); return 0; Close
#define Mess Open MSG msg; PeekMessage(&msg, FULL, FULL, FULL,0x0001 ); if (msg.message==0x0100) {bk=666;PostQuitMessage( FULL );} TranslateMessage(&msg); DispatchMessage(&msg); Close
#define Loop Open for(; ;) Open h++; if(h>=666) Open Paint; h=FULL; OK; bk++;Close Mess; if(bk>666) break; Close Close
#define EI else Z



void Hazz(SS &ix,SS &iy,SS &d)
Open
Z(d AS 0) ix++,iy--; EI(d AS 1) ix++,iy++; EI(d AS 2) ix--,iy++;
EI(d AS 3) ix--,iy--; EI(d AS 3) d Q rand()%3;
Z(ix>MX-S) ix Q S; EI(ix<S) ix Q MX-S; EI(iy>MY-S) iy Q S; EI(iy<S) iy Q MY-S;
Close




Run Open SS h Q 0; SS bk Q 0; nice; Loop; Paint; Quit; Close

lol new language >.>;
added on the 2008-05-31 06:49:46 by panic panic
fcmovnbe st1
added on the 2008-05-31 11:27:49 by Pirx Pirx
somebody check out the The International Obfuscated C Code Contest ! :)))
added on the 2008-05-31 12:31:39 by bartman bartman
probably was posted here before, but i feel like it anyway:
Code:IS LOLCODE HAI BTW HUGSTIME? is system functions for determining hugs time CAN HAS HUGSTIME? CAN HAS STDIO? I HAS A LOVINGU BTW NAO is automagically set to time right now I HAS A NAO IZ NAO HUGSTIME? YARLY VISIBLE "<3" LOVINGU IZ K NOWAI VISIBLE "</3" LOVINGU IZ NOES KTHX KTHXBYE
added on the 2008-05-31 20:40:30 by bizun_ bizun_
Your lines are bigger than mine.
added on the 2008-05-31 20:48:30 by xernobyl xernobyl
begin
end
added on the 2008-05-31 20:56:32 by zefyros zefyros
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "HTTP://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
added on the 2008-05-31 23:31:37 by Shockwave Shockwave
MOV AH, 00h
MOV AL, 13h
INT 10h

or something like that...
added on the 2008-06-01 00:22:50 by xernobyl xernobyl
mov ax, 13h
int 10h

would be the logical thing.
added on the 2008-06-01 00:26:44 by Preacher Preacher
That...
added on the 2008-06-01 00:38:07 by xernobyl xernobyl
fucking crazy obfuscated c code =D
added on the 2008-06-01 01:39:30 by pera pera
Another gem for the collection:

float angle = Atan2(x, y);
float dist = Sqrt(POW2(x) + POW2(y)) + 40.0f * (1.0f + Cos(angle * 6))) / 1.6f;
added on the 2008-06-01 01:41:31 by ravity ravity
mov al, 13h
int 10h
added on the 2008-06-01 03:41:40 by bdk bdk
SELECT * FROM prods
added on the 2008-06-01 03:58:33 by stage7 stage7
begin
end.
added on the 2008-06-01 04:32:20 by zefyros zefyros
BB Image
added on the 2008-06-01 09:11:32 by すすれ すすれ
First four cycles of the TMS320C64x+ DSP division function...

Code: LMBD .L2X 1, A4, B1 ; mag_num = lmbd(1, num) || LMBD .L1X 1, B4, A1 ; mag_den = lmbd(1, den) || MVK .S1 32, A0 ; const 32 || ZERO .D1 A8 ; first_div = 0 CMPGTU .L1X B4, A4, A1 ; zero = (den > num) || SUB .L2X A1, B1, B0 ; i = mag_den - mag_num || MV .D1 A4, A5 ; save num ||[!B1] MVK .S1 1, A8 ; if (num32) first_div = 1 SHL .S2 B4, B0, B4 ; den <<= i ||[B1] ADD .D2 B0, 1, B0 ; if (!num32) i++ || MV B0, A6 CMPGTU .L2X B4, A4, B2 ; gt = den > num || SUB .L1X A0, B0, A0 ; qs = 32 - i || SHL .S1 A8, A6, A8 ; first_div <<= i ||[B1] MPY .M2 B2, 0, B2 ; num32 && gt || B .S2 LOOP


If any assembler coder is up to a challenge: Get a C64x+ DSP board from TI!
added on the 2008-06-01 12:52:50 by torus torus
Code:static BYTE remap[256*2]; for(i=-255; i<256; i++) { remap[i+255] = i > g_treshold ? 255 : 0; } BYTE *_remap = remap + 255; for(j=0; j < g_capHeight; j++) for(i=0; i < g_capWidth; i++) { //short val = (int)s[0] - (int)bkg[0]; //*d = val < g_treshold ? 0 : 255; *d = _remap[ (short)(*s) - (short)(*bkg)] & (*m); *s &= *m; // UI feedback d++; s += SRC_ELEMENT_SIZE; bkg++; m++; }


Hmm, if-else or little table ?? :)
added on the 2008-06-01 13:00:33 by bdk bdk
it's just a threshold, better an if-else. at least for code clearance :)
added on the 2008-06-01 13:53:29 by rmeht rmeht
vector<vector<int>> vfinal;

login

Go to top