AnonAccount: What is it, and what does it do? - Q&A Thread
Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Colorscheme by Jerker - Tue, 29 Jul 2014 00:14:38 EST ID:jaqLWMrW No.32135 Ignore Report Reply Quick Reply
1406607278508.png -(258370 B, 1366x768) Thumbnail displayed, click image for full size. 258370
Which looks better?

Also, Colorscheme Thread.
2 posts omitted. Click Reply to view.
>>
Hedda Secklenotch - Tue, 29 Jul 2014 20:29:08 EST ID:292Xzs1e No.32148 Ignore Report Quick Reply
Left fo sho. The font size is a bit small for my liking though. I also find increasing line height by a few px (some editors can, some can't) makes a huge difference in readability and eye strain, and you only lose one, maybe two lines depending on your screen real estate.
>>
Martha Sindleson - Wed, 30 Jul 2014 03:45:12 EST ID:xMDei66K No.32152 Ignore Report Quick Reply
The left. Also Zenburn is amazing. I have tried for years to like Solarized, but it just sucks so bad.
Also, here's a theme demo page
http://ace.c9.io/build/kitchen-sink.html
>>
Frederick Pittbury - Wed, 30 Jul 2014 05:06:18 EST ID:jaqLWMrW No.32154 Ignore Report Quick Reply
1406711178623.png -(87241 B, 1366x768) Thumbnail displayed, click image for full size. 87241
How about now, I background color be the same.
>>
William Turveyham - Wed, 30 Jul 2014 13:57:03 EST ID:qKBdQhVD No.32159 Ignore Report Quick Reply
>>32154
Left still appears to have a darker background, which I like, but I prefer the text coloring on the right. Not the colors I would've picked, though.
>>
Rebecca Fuckinghall - Sun, 03 Aug 2014 03:45:43 EST ID:9UeGRJru No.32181 Ignore Report Quick Reply
>>32154
Right.

Also if Sublime Text were a hooker I'd pay the $70 to have sex with it. Damn, it's a beautiful-looking program.


Best places to live with a degree in CS? by Basil Devingsed - Sun, 03 Aug 2014 02:12:13 EST ID:8CO5us37 No.32180 Ignore Report Reply Quick Reply
1407046333918.jpg -(95047 B, 800x594) Thumbnail displayed, click image for full size. 95047
I'm Canadian but Ottawa seems like a neat city to move to. Currently in bumfuck nowhere and will be done my degree in 2.5 years.


Code noob by Ernest Hemmlefuck - Tue, 15 Jul 2014 18:50:43 EST ID:N1gJl5zK No.32072 Ignore Report Reply Quick Reply
1405464643530.jpg -(212008 B, 521x737) Thumbnail displayed, click image for full size. 212008
So I'm a total beginner to coding. I just started learning java on code academy. So far its pretty simple.
After java I was planning on moving to C#.

My eventual goal is to make a unity game ive had in my head for years.

Any tips or advice for a new coder?
>>
Cornelius Craddlewatch - Wed, 16 Jul 2014 16:55:47 EST ID:iAWx5Owe No.32074 Ignore Report Quick Reply
Use variable names that mean something.

Learn a good formatting style for your language.

Utilizing Pseudo-code on a pad of paper can help create cleaner concepts and designs before ever typing something.
>>
Charles Bozzleheck - Wed, 16 Jul 2014 19:26:06 EST ID:d/kdxZu0 No.32075 Ignore Report Quick Reply
[h1 class="groovy]>>32072[/h1]
>>
Charles Bozzleheck - Wed, 16 Jul 2014 19:26:54 EST ID:d/kdxZu0 No.32076 Ignore Report Quick Reply
[h1 class="groovy"]>>32075[/h1]
>>
Sophie Nezzlefuck - Wed, 30 Jul 2014 11:39:57 EST ID:J1KthLSY No.32157 Ignore Report Quick Reply
>>32072
Try hard not to succumb to laziness and a "I'll fix this later" attitude. This struggle is eternal, embrace it. Try to approach all problems as challenges where good style awards more points than "it's working but I'm not sure how": try to get a clear understanding of what you're doing instead of blindly jumping in to write code (but don't forget that reading can't teach you how to program, only programming can). In fact, a clear understanding of what you're doing on the conceptual level is essential, because you have to turn that abstract algorithm into unambiguous orders for the computer to perform. There can be no magic or miracles between any of the steps.

Try to remember that you're trying to learn the idea of programming. Languages (with their specific pros, cons and kinks) are just a material you use to communicate to the computer what you want to do. If you've advanced on this path far enough, you'll know that a specific language can be learned in a short time.

As you progress, read your old code every once in a while: you'll notice stuff that is awkward or just plain bad. Refactor often with your newfound understanding, and don't worry about sunk costs: if you wrote 2000 lines to do something and realize that it's not a very good approach, don't be afraid to scrap all of it and rewrite the thing in a better way. It might seem like writing that code was wasted time from the point of view of the project, but it wasn't actually wasted: you couldn't have figured out a better way and grown as a programmer without doing it the wrong way first!

Please don't be a tool and forget to:
-COMMENT YOUR CODE (seriously, if your project is more than a disposable helper script, you'll spend a lot of time going "what the fuck is happening here", even if you're the sole author. this is true even if you do comment your code, and is vastly amplified if you don't.)
-ADHERE TO PROJECT/LANGUAGE STYLE (might eliminate some typo induced teeth grinding. your favourite style is not the best, consistency of the code base is the best.)
-USE DESCRIPTIVE FUNCTION AND VARIABLE NAMES EVEN IF TH…
Comment too long. Click here to view the full text.
>>
Albert Sammlekid - Sat, 02 Aug 2014 20:11:21 EST ID:CmcHTLaD No.32178 Ignore Report Quick Reply
>>32157
I think you forgot to advise OP to comment his code.


Books about... by Isabella Pirryspear - Sat, 02 Aug 2014 17:38:21 EST ID:cppQ0lhn No.32175 Ignore Report Reply Quick Reply
1407015501211.png -(201844 B, 600x375) Thumbnail displayed, click image for full size. 201844
re-post from computers and tech... pic unrelated...
I want to understand my computer in and out. Hardware, firmware, boot managers, CLIs, UNIX and UNIX-like OSs, display/window/desktop managers, filesystems, programming languages, servers, networks... Which books will get me started? Should I be studying math?


I fail at programming by Molly Modgefod - Thu, 31 Jul 2014 13:00:52 EST ID:5kGtwHc6 No.32166 Ignore Report Reply Quick Reply
1406826052309.gif -(1044312 B, 250x300) Thumbnail displayed, click image for full size. 1044312
I have a project I need to finish in two months.
It's a Flappy Bird clone.
In java.
And I just don't get it. I have some idea about what I want in my prep-code, but it's not concise enough. I am not concise enough.
Furthermore I just can't use the fucking API, I try to read and understand it, I import it, try to make a reference after creating a new object from a class and BOoOoOM!
It explodes right in front of my face.
Why, what do I not understand?
>>
Wesley Fimbletot - Thu, 31 Jul 2014 21:27:09 EST ID:xtelIQ1k No.32167 Ignore Report Quick Reply
>Why, what do I not understand?

Debugging, among other things.
>>
Hamilton Billingham - Thu, 31 Jul 2014 22:51:36 EST ID:ZMQnkpih No.32168 Ignore Report Quick Reply
It's really difficult to answer non-specific questions. I think that you'd have more luck if you were to post your code and the specific error you are experiencing (rather than "Boooom").
>>
Eugene Smallwater - Fri, 01 Aug 2014 12:49:19 EST ID:+gSlvDXv No.32171 Ignore Report Quick Reply
>>32168

exactly this. share your code and errors, with us and we can try to help you. (and please use pastebin or something not just copy paste onto the board)
>>
Ebenezer Cammleforth - Sat, 02 Aug 2014 18:34:14 EST ID:FZosnFQ9 No.32176 Ignore Report Quick Reply
>>32166

Hamilton is right. Stop talking like a dipshit. We're not mind readers.

Also I lol'd at

>it's not concise enough. I am not concise enough.

If you want concise, you're using the wrong language.


C++ Header by Ian Hucklehet - Thu, 31 Jul 2014 04:38:16 EST ID:+7WhLoNb No.32164 Ignore Report Reply Quick Reply
1406795896091.png -(17319 B, 844x373) Thumbnail displayed, click image for full size. 17319
Hi!
Can someone help me here please, or explain how I have to include header files in c++?
So I have a project in where I use sqlite
lets say I have a class 'aaa' in aaa.cpp and the header aaa.h
I want to use sqlite in there, so I included sqlite.h in aaa.h
So when I want to use my database in a method in aaa.cpp it can't link it
I've never done anything with c/c++ so I'm confused by this whole header-thing, I've read it up but I don't know what I'm doing wrong.

thanks in advance!
>>
Hamilton Billingham - Thu, 31 Jul 2014 23:07:11 EST ID:ZMQnkpih No.32169 Ignore Report Quick Reply
If you were compiling with gcc you'd pass "-lsqlite3" to link to the sqlite3 library. It looks like you are using an IDE though?

You should also use angle brackets instead of double-quotes in your sqlite3 include line as it will search for the header in more places.
>>
Edwin Blaggleway - Fri, 01 Aug 2014 05:41:30 EST ID:5ZOtXjaq No.32170 Ignore Report Quick Reply
>>32169
yeah thanks!
I'm using dev-c++
I didn't know that I have to add the .c and .h file of sqilte to my project, but it works now.


Help with pointers in c by Martin Pittbanks - Mon, 28 Jul 2014 22:25:49 EST ID:KH9l0Yka No.32133 Ignore Report Reply Quick Reply
1406600749463.png -(21455 B, 806x110) Thumbnail displayed, click image for full size. 21455
I'm trying to write a program in which a user inputs his credentials, and then prints them out.
I think I have everything right except for the pointers.
I can't seem to figure out how to work with them.
Can someone point me in the right direction on what to do?
http://pastebin.com/YbuTtaTk
11 posts and 1 images omitted. Click Reply to view.
>>
Augustus Hashmidging - Tue, 29 Jul 2014 23:10:34 EST ID:KH9l0Yka No.32150 Ignore Report Quick Reply
>>32149
isn't getchar()==ans supposed to give the value of whatever the user has inputed to "ans".
i've used those exact lines in other programs and they haven't given me trouble
>>
Nell Honeydale - Wed, 30 Jul 2014 01:18:04 EST ID:ZMQnkpih No.32151 Ignore Report Quick Reply
>>32150
== is equality, it evaluates to true or false,
#include <stdio.h>

int main( void ) {
int a=1;
int b=2;
printf( "%d\n", a==a );
printf( "%d\n", a==b );
return 0;
}


I think you are looking to assign (single =), "ans = getchar();"
>>
Simon Worthingridge - Wed, 30 Jul 2014 17:51:44 EST ID:OU/QRZdo No.32160 Ignore Report Quick Reply
>>32151
thank you!

Does anyone know why when I enter the dob numbers, for example 09091993, the program only prints 9091993?
>>
Betsy Greenfoot - Wed, 30 Jul 2014 18:11:09 EST ID:vhgZIlcV No.32161 Ignore Report Quick Reply
>>32160
Because you save it as a whole number. It makes sense to print any number with no preceding zeroes. You can use printf formatting to tell it to pad the output with a character of your choosing. I think printf("%.8d", <dop>) should work.
>>
Beatrice Drezzlenet - Thu, 31 Jul 2014 03:03:01 EST ID:ZMQnkpih No.32163 Ignore Report Quick Reply
>>32160
You might want to use a string for that.


Python and encodings by Shit Brobberworth - Thu, 31 Jul 2014 02:56:59 EST ID:Hj+KGQ74 No.32162 Ignore Report Reply Quick Reply
1406789819931.png -(30245 B, 644x388) Thumbnail displayed, click image for full size. 30245
I am setting out to write a python program to parse a dictionary. I know the format of the dictionary file, and it will do nicely to take each line from the file and .split() it into tokens.

But something does not seem to like the UTF-8 characters I copy-paste into the terminal. I thought that python handles everything in Unicode internally?
What can I do to troubleshoot this problem?
>>
William Nushlit - Thu, 31 Jul 2014 12:09:45 EST ID:xh0Eouzb No.32165 Ignore Report Quick Reply
1406822985337.jpg -(14680 B, 320x290) Thumbnail displayed, click image for full size. 14680
are you using Python 2.7 or a 3.x version? (I've a sneaking suspicion that it's 2.7)

3.x - went entirely unicode, nothing to really worry about.
2.7 - you need to use the unicode() constructor for makin that shit compatible. This should help: https://docs.python.org/2/howto/unicode.html


Implement ProgressBar by love_enabler - Wed, 16 Jul 2014 21:12:28 EST ID:jaqLWMrW No.32077 Ignore Report Reply Quick Reply
1405559548934.jpg -(638245 B, 2556x1767) Thumbnail displayed, click image for full size. 638245
Hello, I come here in desperation to ask if anyone can help implementing a progressbar into my code. Before you post a link to a google search link, please keep in mind that I already tried that. I can easily put the bar, but the real challenge is making it so that it updates perfectly, and since the percentages are not ints, its hard to add an x amount of progressbar fill, eg: '#' if the percentages are not ints. Please Help, Im using python3 btw.

my code:
http://a.pomf.se/hivnuu.py

info about code:
its a program that downloads all the images from a set of given the future thread links, and its my goal to fill the progressbar based on the images downloaded / total images percentage, while making it so that it the fill never goes over the bar itself.
>>
Jack Cinderway - Thu, 17 Jul 2014 17:45:03 EST ID:ZMQnkpih No.32078 Ignore Report Quick Reply
I threw these together,

http://pastebin.com/CsY4yNkF

The first one does it your way by figuring out how many bar increments that it needs to draw for a given percentage, subtracts the number of increments already drawn and then draws the remaining.

The second, which is what I do when I do that sort of thing, prints a line feed character without a carriage return to place the cursor at the start of the line and then prints the entire progress bar over top of the old progress bar.
>>
Doris Claylock - Tue, 22 Jul 2014 00:39:37 EST ID:jaqLWMrW No.32104 Ignore Report Quick Reply
>>32078
Thanks alot man, I had lost hope, I'll now try to test it, Thanks again.
>>
Phoebe Cheggleduck - Wed, 30 Jul 2014 11:38:56 EST ID:3+Lc5t2a No.32156 Ignore Report Quick Reply
Not directly relevant but added a minor modification to the script.

def directify(link):
dir0 = os.environ['HOME']
return dir0'/.the future/'+link.split('/')[-1]+'/'

not a good idea to leave userid and homedirectory location in any chan. But apart from that i am totally impressed and rooting for you.
>>
Phoebe Cheggleduck - Wed, 30 Jul 2014 11:45:35 EST ID:3+Lc5t2a No.32158 Ignore Report Quick Reply
>>32156
return dir0+/.the future/+link.split('/')[-1]+'/'


sorry was trigger happy


Switching from philosophy to comp sci by Phineas Drussletad - Fri, 18 Jul 2014 02:31:41 EST ID:8CO5us37 No.32080 Ignore Report Reply Quick Reply
1405665101892.jpg -(2251362 B, 1823x1286) Thumbnail displayed, click image for full size. 2251362
I'm heading into my last year of my philosophy b.a and I've switched into computer science because I want a job and it's only an extra 3 years (in comparison to an 8 year phd or three year $100,000 law school debt i'm cool with that). How much fun am I about to have? I was okay at logic but haven't done formal maths since high school.
2 posts omitted. Click Reply to view.
>>
Lillian Gullytick - Mon, 21 Jul 2014 23:41:38 EST ID:xUAnupXV No.32103 Ignore Report Quick Reply
This is a good CompSci math course
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/

Get's about as formal as you can get with proofs/induction
>>
Molly Grimfoot - Tue, 22 Jul 2014 00:45:26 EST ID:cEQ9BUYB No.32105 Ignore Report Quick Reply
1406004326986.jpg -(16034 B, 287x331) Thumbnail displayed, click image for full size. 16034
You're going to have lots of fun. Comp sci itself is basically philosophy yes, though software engineering is more, well, engineering (read: applied math with a strong undercurrent of psychology).

Read Godel, Escher, Bach now if you haven't already. Not because it'll improve your computering (it might in the long run), but because it's an epic work of art and modern philosophy that's actually about computer science. Thank me later.
>>
Molly Grimfoot - Tue, 22 Jul 2014 00:51:57 EST ID:cEQ9BUYB No.32106 Ignore Report Quick Reply
>>32105
Goddamn I want to reread GEB now. Thanks for reminding me of the good parts of life OP.
>>
Graham Brasslepatch - Tue, 22 Jul 2014 22:45:17 EST ID:8CO5us37 No.32110 Ignore Report Quick Reply
1406083517862.jpg -(372287 B, 1680x1050) Thumbnail displayed, click image for full size. 372287
Thanks for the kind words everyone. I'll be doing discrete maths primarily in the upcoming academic year.

>>32105

I'm going to pick this up, it seems fascinating. You have influenced someone over the internet.
>>
Sophie Nezzlefuck - Wed, 30 Jul 2014 10:42:05 EST ID:J1KthLSY No.32155 Ignore Report Quick Reply
>>32105
Goddamn this is a good book. One of my all time favourites.


How to capture screenshot of screen?? by Da real G - Sat, 26 Jul 2014 22:07:31 EST ID:hr+LFIrJ No.32129 Ignore Report Reply Quick Reply
1406426851517.png -(171232 B, 1440x900) Thumbnail displayed, click image for full size. 171232
I am trying to enhance my programming skills by making bots for online flash games, however no matter how hard I look on the webs I can't find a decent tutorial teaching how to take a screenshot for the active window. Any language is fine. (although C# is recommened)
>>
DJ BrU - Mon, 28 Jul 2014 01:16:07 EST ID:5Mbyzmad No.32131 Ignore Report Quick Reply
>>32129

Here is one for C# I found, not tested:

http://stackoverflow.com/questions/3072349/capture-screenshot-including-semitransparent-windows-in-net/3072580#3072580


Here is one for VB.NET I wrote:

Public Sub SaveScreenShot()
Try
Pro = Process.GetProcessesByName("notepad")
If Pro.Count > 0 Then
ImageCount = ImageCount + 1
Dim maxHeight As Integer = 0
Comment too long. Click here to view the full text.
>>
Da real G - Mon, 28 Jul 2014 20:20:57 EST ID:hr+LFIrJ No.32132 Ignore Report Quick Reply
>>32131


Thanks man ill give it a try!
>>
Augustus Pittfuck - Tue, 29 Jul 2014 09:33:34 EST ID:A5i3/zJC No.32141 Ignore Report Quick Reply
http://code.tutsplus.com/tutorials/how-to-build-a-python-bot-that-can-play-web-games--active-11117

personally tried this, good tutorial for python, very easy screenshot function.


SDL and pointers. by Fuck Clizzlefutch - Thu, 24 Jul 2014 16:49:37 EST ID:43+Cp8qc No.32118 Ignore Report Reply Quick Reply
1406234977335.jpg -(56925 B, 480x562) Thumbnail displayed, click image for full size. 56925
I am trying to make a SDL_Textures or Sufaces as pointers to other Textures and surfaces.

If I write:

SDL_Texture *DING = &DONG;

I get and error of "connot convert **Texture to *Texture.

Wat Do?
1 posts omitted. Click Reply to view.
>>
Doris Chillerhall - Fri, 25 Jul 2014 22:44:40 EST ID:43+Cp8qc No.32120 Ignore Report Quick Reply
>>32119

Thank you for your response. It got rid of the error. So when I write DING = DONG it is a pointer? I wont rape my program with tons of wasted memory?
>>
James Haffingmatch - Sat, 26 Jul 2014 00:54:05 EST ID:isjh7MwE No.32121 Ignore Report Quick Reply
>>32120
In C and in C++, it's often important to know how large things are. It's also important to know where things are allocated. When you do this:
SDL_Texture DING;
What you're doing is you're asking the language to allocate (and in C++, initialize) a variable of type SDL_Texture on the stack. Stack memory is very very fast (basically free to allocate and release stack memory) and it is also automatically freed when the allocating function returns.

However, in this case:
SDL_Texture* DING = (SDL_Texture*)malloc(sizeof(SDL_Texture) );
What you're doing here is you're creating a pointer to a SDL_Texture named DING (the pointer lives on the stack in this specific instance) and pointing it to the newly-allocated heap memory that is large enough to store a SDL_Texture.

When you're starting out with C/C++ programming, I would recommend to not worry too much about wasting memory. Remember that under modern operating systems, any memory that your program does not release when your program ends is automatically reclaimed by the operating system. Initially, just focus on getting your program to work. It's also a good idea to try to teach yourself "good practices" such as always freeing any memory that you allocate in your program after you're done using that memory.
>>
Doris Chillerhall - Sat, 26 Jul 2014 02:42:07 EST ID:43+Cp8qc No.32122 Ignore Report Quick Reply
1406356927853.jpg -(80035 B, 753x550) Thumbnail displayed, click image for full size. 80035
>>32121

Well, I made a fairly tidy array of textures that actually hold the information. I made a big grid of pointers to tile classes that all have pointers to their own textures, so I should be able to make an entire dungeon and have it use the least amount of space.

I want to make clean easy to change code as well as a dinky game.

Oh, you cannot declare an SDL_Texture or Surface unless they have the * pointer syntax, btw.
>>
Doris Chillerhall - Sat, 26 Jul 2014 02:44:18 EST ID:43+Cp8qc No.32123 Ignore Report Quick Reply
1406357058853.jpg -(49305 B, 600x600) Thumbnail displayed, click image for full size. 49305
>>32122

Like, there is only 1 wall object, 1 floor object, and one texture, and everything else is just pointers to those. But pointers r hard.
>>
James Haffingmatch - Sat, 26 Jul 2014 14:00:00 EST ID:isjh7MwE No.32127 Ignore Report Quick Reply
>>32123
Pointers are one of the trickiest concepts of C/C++ to master. Stick with it and you'll get them eventually.


<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.