Wait
You're casting the memory address 0x100000 to a function and then calling it with... more addresses?
Edited:
What exactly resides at 0x100000 anyway?
Wait
You're casting the memory address 0x100000 to a function and then calling it with... more addresses?
Edited:
What exactly resides at 0x100000 anyway?
Its a peice of the third stage of my bootloader, which is responsible for the disks and PCI , and loading the kernel, I'm probably gonna make it responsible for filesystems too
The kernel is loaded at 0x100000, and the other things are pointers provided by the first and second stage loaders
Needless to say the boot process is messy as fuck
Why are you passing a magic number as the first argument instead of using the address of the MAT instance, which you "created" few lines above?
... I may or may not have access to your source code through Dropbox...
Shit, I forgot Olivia gave you access to that folder
And uh, I should probably do that
Trying to give the illusion of 3D by scaling and positioning sprites relative to an imaginary fixed point at the far edge of the player's field-of-view.
I need to find the distances marked with green 'X's to properly position them on the viewport relative to the player's position. My brain hurts.
Winter is almost around the corner, so have this old wallpaper I made back in May:
(see http://www.facepunch.com/threads/108...1#post29955071)
Problem:
32 cards total, 4 different colors.
You are dealt 8 cards.
What are the chances of you getting all 8 red.
Approach 1:
Total number of combinations is around 165 (based on an online combinations calculator) since the position of the color in the hand isn't important.
I don't see why any hand would be more likely to be dealt than any other hand so the chances should be 1/165.
There's obviously a MAJOR mistake somewhere in there since that's way to likely to happen than it actually is.
Approach 2:
Chances that the first card dealt is a red one are 8/32. Chances that the next one will also be red are 7/32... continue multiplication until 1/25.
This is what wolfram calculated
http://www.wolframalpha.com/input/?i...C+x+%3D+1+to+8
This is far more likely to be the correct solution but honestly, the first approach seems as logical to me as the second one.
To add programming to all this, I made a program that takes a deck and deals 8 cards, then dealt 10 million hands and recorded the results.
All cards were red only once! while the most popular shuffle was 2 of each color (around 50k times).
This is confusing the hell out of me.
Solution:
The chance is really slim
I've always wondered how come "slim chances" and "fat chance!" mean the same thing...
Well, in that calculator example you have an unlimited supply (repetition) of four different cards, which is why the probability is so high. Your second approach is the correct one.
Indeed, that's what I thought but I don't think that explains it fully because there are exactly 165 possible card combinations. No matter how much of them were used, with 8 cards, there are 165 combinations. The question is, why is 2,2,2,2 more likely than 8,0,0,0.
It's probably something to do with 2,2,2,2 having more possible permutations than 8,0,0,0.
Because the latter is used sarcastically?
"Fat chance!" is sarcastic..
Well that was weird. I left the omegle-cleverbot thing on for a while, and made it log chats.
EDIT: I just realised I messed up the logging time :/
Close enough
Not gonna bother with making it flash
Really?
So, do you ever say it non-sarcastically?
Like, "There's a fat chance it's going to rain tomorrow"
Nah, it's a purely sarcastic thing.
After re-reading your question and attempting to edit my post for 10 minutes, approach 2 should be the correct one
Holly should be handling this... I think.
You just need to pass in how many seconds it's been since you last posted a frame. It works for variable frame rates for me in GMod.. What does your Video->AddFrame call look like right now?
The FPS on this video varies between 20 and 30.
Wolfram|Alpha gave the right answer.
Approach 1 works if you use the correct formula for combinations and punch in the right values.
Think of approach 1 this way: you have a total amount of combinations and some amount of red combinations. In this case there's only one red combination (there are 8 red cards and you draw 8 cards). Just divide the amount of red combinations with the amount of total combinations to get the probability that one random combination is a red combination.
The total amount of combinations is n! / (k! * (n - k)!) where n is the amount of cards (32) and k is the amount of cards drawn (8).
Where elapsed is a delta since the last frame.Code:encoder->Video()->AddFrame( elapsed/1000.0, Holly::ColorMode::RGB, ndata, NULL );
Edited:
In miliseconds.
Edited:
Also, I'm rewriting my recorder for higher performance, it takes 7ms to get the image data from the X server, and convert it to a raw RGB stream.
I takes Holly ~30-40ms to convert to webm. So what I'm going to do is save the raw to a file, and then convert when it's all finished.
If elapsed is in milliseconds, then wouldn'tbe in microseconds?Code:elapsed/1000.0
I did a quick test.. variable frame rate does work.. check this out..
The frame rate should get lower as it goes on (watch the static box)
I put up some tweaks that might improve the accuracy slightly, but it's working for me... :/
garry, just a small correction to Holly: WIN32_LEAN_MEAN doesn't do anything, you want WIN32_LEAN_AND_MEAN (Platform_Win32.hpp)
Thanks, fixed
Why is this getting dumbs and disagrees? That sounds like a very plausible bug...
EDIT : Ahh shit, I guess I deserve those dumbs
Also, I re-declare myself as the master of unreadable code with this mess
Total of 5 commentsCode:[BITS 16] [ORG 0x7E00] jmp main db 'BEER 1.0' dw 0x0200 db 8 dw 0x0020 dw 0x0200 dw 29 db 0xF8 dw 0xC900 dw 63 dw 1 dd 0x00000200 dd 0x00000000 db 0x80 db 0x00 db 0x28 dw 0x00000000 db 'Main Drive', 0 db 'FAT16 ' main: mov si, message call printstr mov si, a20 call printstr mov al, 2 out 0x92, al mov si, pic call printstr in al, 0x21 mov bl, al in al, 0xA1 mov cl, al mov al, 0x11 out 0x20, al ; Initialize command call io_wait ; Give it some time mov al, 0x11 out 0xA0, al call io_wait mov al, 0x20 out 0x21, al ; Offets call io_wait mov al, 0x28 out 0xA1, al call io_wait mov al, 0x04 out 0x21, al ; Wiring call io_wait mov al, 0x02 out 0xA1, al call io_wait mov al, 0x01 out 0x21, al ; Mode call io_wait out 0xA1, al call io_wait mov al, bl out 0x21, al mov al, cl out 0xA1, al mov si, protected_land call printstr mov word [gdtr], 23 mov dword [gdtr+2], gdt lgdt [gdtr] mov eax, cr0 or eax, 1 mov cr0, eax mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax jmp 0x08:reload_cs jmp $ printchar: mov ah, 0x0E mov bh, 0x00 mov bl, 0x07 int 0x10 ret printstr: .loop: mov al, [si] or al, al jz .done call printchar inc si jmp .loop .done: ret io_wait: nop nop ret gdtr: dw 0 dd 0 idtr: dw 0 dd 0 gdt: db 0 db 0 db 0 db 0 db 0 db 0 db 0 db 0 db 0xFF db 0xFF db 0x00 db 0x00 db 0x00 db 0x9A db 0xFF db 0x00 db 0xFF db 0xFF db 0x00 db 0x00 db 0x00 db 0x92 db 0xFF db 0x00 idt: times 2048 db 0 a20: db 'Enabling A20...', 10, 13, 0 message: db 'Loading Neon', 10, 13, 0 pic: db 'Remapping PIC...', 10, 13, 0 protected_land: db 'Entering protected mode...', 10, 13, 0 loadingkernel: db 'Loading kernel...', 0 reload_cs: [BITS 32] mov ebx, isr_30 mov ecx, 0x30 call reg_int mov word [idtr], 2048 mov dword [idtr + 2], idt lidt [idtr] mov ecx, 1999 clr: mov eax, ecx shl eax, 1 mov byte [0xB8000 + eax], 0 mov byte [0xB8001 + eax], 0x0A loop clr %comment mov ax, 0x04 mov dx, 0x1CE out dx, ax mov ax, 0x00 mov dx, 0x1CF out dx, ax mov ax, 0x01 mov dx, 0x1CE out dx, ax mov ax, 1024 mov dx, 0x1CF out dx, ax mov ax, 0x02 mov dx, 0x1CE out dx, ax mov ax, 768 mov dx, 0x1CF out dx, ax mov ax, 0x03 mov dx, 0x1CE out dx, ax mov ax, 0x20 mov dx, 0x1CF out dx, ax mov ax, 0x04 mov dx, 0x1CE out dx, ax mov ax, 0x01 mov dx, 0x1CF out dx, ax xor ebx, ebx lop2: xor eax, eax lop: mov dword [0xA0000 + eax], 0x003CFF8A mov dword [0xA0004 + eax], 0x00F8CF43 mov dword [0xA0008 + eax], 0x00FF80FF add eax, 12 cmp eax, 0xFFFF jl lop inc ebx mov ax, 0x05 mov dx, 0x1CE out dx, ax mov ax, bx mov dx, 0x1CF out dx, ax jmp lop2 %endcomment mov bl, 0x0A mov eax, loadingkernel call prints jmp 0x08:0x8E00; hang: jmp $ isr_30: iret reg_int: push edx mov edx, idt shl ecx, 3 add edx, ecx mov word [edx], bx mov word [edx+2], 0x8 mov byte [edx+4], 0 mov byte [edx+5], 0x8E shr ebx, 16 mov word [edx+6], bx pop edx ret printc: push ecx movzx ecx, word [cpos] shl ecx, 1 mov byte [0xB8000 + ecx], al mov byte [0xB8001 + ecx], bl inc word [cpos] pop ecx ret prints: push ecx .loop: mov cl, byte [eax] cmp ecx, 0 je .end push eax mov al, cl call printc pop eax inc eax jmp .loop .end: pop ecx ret cpos: dw 0 times 4096-($-$$) db 0
Edited:
Uh, what a pagestretcher, I though code tags had scrollbars
geel9 alt detected
I was gonna move my pagestretcher code to pastebin but FP doesnt let me edit it
Fuck
Why are people agreeing with this?
1000ms = 1s
as in, 1000ms / 1000
-snip- google lied to me don't listen to me
Surely if it is delta time and expressed in milliseconds it would be. I don't play games at half a frame a second
(Also *)
Wanted to program at school today. I know they have Python on the school computers so I tried to run it on command prompt, but command prompt told me I wasn't an admin. I had to make a new text file and rename it .py (Something you should know, at my school right click is disabled) so the program would run then disappear, batch file magic I get it to not disappear. Still couldn't figure out a way to get to Idle since I couldn't right click.
Why school, why?
It also manages to royally fuck up a lot of resizing algorithms judging from the thumbnail
Edited:
Dammit you ninja
500ms / 1000ms = 0.5 MICROSECONDS
YEP
Sorry :C
Are you a wizard
google lied to me
be constructive for like 5 days okay