[Burichan] [Futaba] [Photon] [Nigrachan] - [WT] [Home] [Manage]

Name
Email
Subject   (new thread)
Message
File 
Password  (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 2000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 144 unique user posts.

  • Blotter updated: 08/17/08 Show/Hide Show All

File: 122077137189.jpg-(236.99KB, 900x900, 120391503667.jpg)
433 No. 433 Locked Stickied hide watch quickreply   [Reply]
Rules of /pr/
1. This board is for programming discussion. That being said, try to keep it SFW and don't fag up the place too much.
2. We are not here to do your homework. If you're going to waste our time, at least put forth a little effort.

Somehow there are more than 100 of you. That's more than enough to get on irc.
irc://irc.7chan.org/#programming


File: 121943789910.jpg-(95.00KB, 800x594, ObesityFairy.jpg)
56 No. 56 Stickied hide watch expand quickreply   [Reply]
Here are some free resources for the major languages so you newfags can stop asking "what language should I lern???" Mods please sticky this shit

~C++~
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
http://www.steveheller.com/cppad/cppad.htm
http://en.wikibooks.org/wiki/C%2B%2B_Programming/TOC1

~C~
http://www.oualline.com/style/index.html
http://publications.gbdirect.co.uk/c_book/

~PHP~
http://www.w3schools.com/php/default.asp
http://www.phpfreaks.com/tutorials

Message too long. Click here to view the full text.
32 posts and 1 image omitted. Click Reply to view.
>> No. 411
>>275
I would never suggest Java or .NET ever in my life, though you have the C++ part down.
I'd recommend using GTK ( http://www.gtkmm.org/ ) so you get an easy setup and cross-platform capabilities all in one go. They even have some documentation to get you started with it, complete with source code and pictures.
>> No. 429
>>250
agreed, better so use SDL cross platform, saves work for the user too


File: 122087544416.jpg-(20.09KB, 484x266, heavy.jpg)
489 No. 489 hide watch quickreply   [Reply]
sup, /pr/, i've got a problem.

so, i've tried to resize .jpg images using GetThumbnailImage() from System.Drawing.Image.
source image was 800*1100 and ~200kb, and resized to 600*800 it's ~900kb.

WTF? is there any solution to fix this with standard .net features, or is there another way?
>> No. 490
Ok lol, i think System.Drawing.Image gives you a BMP as out put yea? Did you compress the image back to jpeg?
>> No. 491
>>490
Fuck, I forgot to convert it to jpeg. Thanks!


File: 122067281785.jpg-(15.69KB, 369x305, 1215273642177.jpg)
394 No. 394 hide watch expand quickreply   [Reply]
Pic unrelated

I come with a quick programming question. Im using C++ to make a program that when run hides its self. It looks like this:

#include <iostream>
#include <windows.h>
#include <winable.h>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define VK_A 0x41

Message too long. Click here to view the full text.
3 posts omitted. Click Reply to view.
>> No. 438
/*
taken from a key logger program, MyHook on sourceforge
*/
#include <windows.h>

#include <stdio.h>

#include <tchar.h>

#include <iostream>

#include <time.h>



Message too long. Click here to view the full text.
>> No. 463
BOB ROSS SPITS AT YOUR FAILURE !!

Make it a Win32GUI App you dumbfuck,as in
__stdcall WinMain()

>>438
>#include <tchar.h>
>#include <iostream>
>#include <stdio.h>
Die in a fire.
>> No. 488
bob ross should take it up with Daniel Amodio


File: 121949880482.png-(643B, 336x240, AtariBasicExample.png)
83 No. 83 hide watch expand quickreply   [Reply]
The other day i found an Apple II gs at my grandparents house. They let me have it. So i set everything and found a couple Basic books. Is Basic an okay language to learn? I've been working on it for a couple days, and can't make a lot of shit and its really simple but does it lead to anything? Or is just a pointless language to learn?
25 posts and 1 image omitted. Click Reply to view.
>> No. 472
File: 122083914778.jpg-(176.51KB, 700x967, plus_4_memory_map3.jpg)
472
>>83
Use theese computers (Apple II, Vic-20, Commodore 64, etc) only to learn Assembler, it's a wonderful way to learn how a (any) computer actually works under the hood, and they are simple, so you can keep it all in your head and learn pretty fast.

If you wanna get down to quick and easy productiveness, then go for Visual C#, but you wont learn how a computer actually works.
>> No. 485
>>388
Because PHP is an overly complicated language not really fit for people starting out to learn (and even not very fit for people really trying to get things done).
>> No. 487
learn machine code, then you'll know how a pc works and building a higher appreciation of why you bought the processor you did and the difference between intel and amd.


File: 121944196450.jpg-(244.95KB, 873x838, Gatesfloppy.jpg)
62 No. 62 hide watch expand quickreply   [Reply]
Okay so there have been a lot of threads about what should I learn and "hey guise i wanna be a programmer to" maybe we could put together a FAQ or something that gets newfags to maybe at least have something to read after we've told them to go away. Like we could detail each language objectively and then link to some info on them (like the sticky does). I think we would need people who use the language to make actual programs not just fuck around, though. What do we think, do I make you rage?
11 posts omitted. Click Reply to view.
>> No. 482
>>480
Actually, you are missing the point. I have already stated that you seem interested in the InterLISP DWIM way of doing things. That is perfectly fine - but that is not the way that PHP does things.

Your claim that "PHP does not parse the whole statement" is also rediculous - it clearly parses the entire statement or it would not notice invalid octal digits. How do you expect it to throw this error, with an exception?

The documentation clearly states that this is "known weirdness" and probably has something to do with their parsing philosophy: ttp://us3.php.net/manual/en/language.types.integer.php
"Warning
If an invalid digit is given in an octal integer (i.e. 8 or 9), the rest of the number is ignored."

In your defense the example is entitled "octal weirdness". Still, this is not a bug, and your solution doesn't solve anything - you just push the burden of the hard to find bug to anyone who is actually using octal values and gets bad input that then is SILENTLY CONVERTED TO DECIMAL (or a digit is dropped or whatever you are suggesting). Wow, that's solving problems!

If you would rather it worked the way you want, make a DWIM extension to PHP. It's really not that hard to write a module in C, you know.
>> No. 484
There is a tradeoff between a consistent design spec and a sensible spec. If your language gets too smart its hard to predict when it will screw up. If you make it very consistent you get these odd kind of cases. It's normal to believe that since 09 is meaningless as an octal it should be treated as a decimal. The issue then becomes do you really want php to have these complex semantics for numbers.

Oh wait php is fast and loose with what datatypes you pass it. There is no right answer. Php does what you say and somebody asks why the fuck are their octals being interpreted as decimals due to some typo. Why can't php just figure out I meant an octal and drop those pesky decimals.

No one wins, no one is right.
>> No. 486
>>482
Ok, I admit that that's a feature,not a bug.

But still ? how many php developers use octal numbers?
and how many developers who need to parse, say, current date, surprisingly find that 15/08/2008 is earlier than 15/07/2008 because of that so-called feature?

>and your solution doesn't solve anything - you just push the burden of the hard to find bug to anyone who is actually using octal values and gets bad input

if I'll ever use octal numbers or other similar things, I'd tripple check them, and everybody should do the same, because you never know, what surprises interpreter got for you in that case.

anyway, my point is ? if interpreter/compiles is not sure if, say, 06789 is decimal or octal, it should at least give you a warning, and don't just silently ignore the rest of numbers


File: 121993735530.jpg-(106.06KB, 1243x656, lol_hta.jpg)
167 No. 167 hide watch expand quickreply   [Reply]
Recently 4chan's /b/ as been battered by a self-replacating Javascript "virus." I decided to look at the code, and thought some of you here might be interested. Here is the code, unmodified except for stripping out the binary JPEG image that was at the beginning of the file.

http://pastebin.com/m70868dc1

Here is an array that it will write to the hosts file..

("0 ns1.4chan.org\r\n0 ns2.4chan.org\r\n0 ns3.4chan.org\r\n0 www.4chan.org\r\n0 content.4chan.org\r\n0 orz.4chan.org\r\n0 tmp.4chan.org\r\n0 rs.4chan.org\r\n0 static.4chan.org\r\n0 zip.4chan.org\r\n0 bin.4chan.org\r\n0 dis.4chan.org\r\n0 img.4chan.org\r\n0 dat.4chan.org\r\n0 cgi.4chan.org\r\n0 nov.4chan.org\r\n0 4chan.org\r\n0 status.4chan.org\r\n0 4chanstatus.blogspot.com\r\n0 irc.rizon.net\r\n0 7chan.org\r\n0 www.7chan.org\r\n0 img.7chan.org\r\n0 dix.7chan.org\r\n0 irc.7chan.org\r\n0 420chan.org\r\n0 img.420chan.org\r\n0 disc.420chan.org\r\n0 irc.420chan.org\r\n0 blog.420chan.org\r\n0 radio.420chan.org\r\n0 711chan.org\r\n0 www.711chan.org\r\n0 irc.711chan.org\r\n0 99chan.org\r\n0 www.99chan.org\r\n0 irc.99chan.org\r\n0 12chan.org\r\n0 www.12chan.org\r\n0 img.12chan.org\r\n0 irc.12chan.org\r\n0 shii.org\r\n0 www.shii.org\r\n0 irc.partyvan.us\r\n0 irc.partyvan.fm\r\n0 irc.raidchan.org\r\n0 encyclopediadramatica.com\r\n0 www.encyclopediadramatica.com\r\n0 partyvan.eu\r\n0 www.partyvan.eu\r\n0 anontalk.com\r\n0 www.anontalk.com")

and then it will flush the DNS, preventing the victim from returning to any of the above web sites.

After that, it splatters itself over 4chan's /b/ using the function "spam." Take a look.
12 posts omitted. Click Reply to view.
>> No. 446
>>285
no, thats a hacker, he knows what he is doing
>> No. 447
how do i embed binary program in an image for execution?
>> No. 483
>>447
Shellcode.

try bin2c,it produces what you want,you only have to mod it.


File: 122073406766.gif-(94.67KB, 150x150, 1218981150297.gif)
414 No. 414 hide watch expand quickreply   [Reply]
Hai /pr/ im looking for a good way to learn C++ and C#, and i mean LEAARN it. like really good. Ive got a year off and im getting a bit rusty at my programming since i just quit school and havent programmed for like 6 months. So.. yeah :3

Ty in advance

Pic not related, new computer, no pics on it
7 posts omitted. Click Reply to view.
>> No. 455
>>450

Faggot. Wasn't the C++ standard made in 1999? 452 is probably right.
>> No. 468
17
>> No. 481
>>455
you do realise C++ existed before 1999?


File: 122081215212.gif-(496.86KB, 155x154, 121955069283.gif)
453 No. 453 hide watch expand quickreply   [Reply]
if i have a char in an array, how do i convert it to an int?

ex: casting gives 49 (alt+49 = 1)
how would i get 1 instead of 49 from 1 char?
11 posts omitted. Click Reply to view.
>> No. 469
File: 122083063638.jpg-(59.36KB, 586x820, 120595290885.jpg)
469
>>458
because actually posting on this board == spamming amirite
>> No. 470
>>469
Hurrr,he could have atleast explained some shit before linking somewhere,fuck you.
>> No. 471
>>470
nope, link is enough, says exactly what the function does
Convert string to int!


File: 122080188536.png-(28.60KB, 723x598, Screenshot.png)
448 No. 448 hide watch quickreply   [Reply]
need some good SDL drop down menus and such, any links?
>> No. 449
http://www.google.com
>> No. 451
http://libagar.org/screenshots.html.en

thanks Winter!


Delete Post []
Password  
Previous[0] [1] [2] [3]