Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
84% Quality Score
Upvotes Received
12
Posts with Upvotes
12
Upvoting Members
7
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
3 Commented Posts
~38.9K People Reached
PC Specs
AMD @2.9GHz, 40Gig Intel SSD, 21 inch LED LCD Ubuntu Linux 10
Favorite Tags

77 Posted Topics

Member Avatar for .It.
Member Avatar for overwraith
0
5K
Member Avatar for vjcagay

[QUOTE=vincentjohn;1426383]the one that can almost do anything a programmer wants to do with[/QUOTE] Python, because it's high-level, has a fantastic memory manager/recycler, a library that supports most anything anybody can ask of it, and has almost as little restrictions as C++. With Python formatting a programmer can practice coding style …

Member Avatar for vegaseat
-1
4K
Member Avatar for seanbp

The server only does the basics. TODOs: The header method needs expanding. The file send method can't handle too large files. Maybe write custom buffer class since some buffering is done. Keep cache of recent files.

Member Avatar for JamesCherrill
0
1K
Member Avatar for AutoPython

[QUOTE][CODE]startTime = time.time() ## I'm not sure how this works, just learned the trick.[/CODE][/QUOTE] This line gets the current system time (a form which doesn't reset to zero). The script calculates the difference between the program start time and the current time.

Member Avatar for nytman
3
1K
Member Avatar for neuro

I've read several C++ books in my life, and "C++ in a Nutshell", written by Ray Lischner, is in my opinion by far the most coherent and complete C++ book I've ever read or browsed. On the other hand I've read a lot of good things about Accelerated C++, and …

Member Avatar for verona.jenn
0
238
Member Avatar for Banjoplucker

Some thoughts: What are you accomplishing with: [CODE]for i in range(n): open('wpdocs\\file' + str(i) + '.wp', 'wb').close()[/CODE] "f" is your bitstream. This reads up to the end of the stream: [CODE]out_block = f.read(int(carved))[/CODE] Is "path" supposed to be quotated? [CODE] doc_wp = open('path', 'wb')[/CODE] [B]doc_wp[/B] writes to itelf.

Member Avatar for djidjadji
0
110
Member Avatar for Ascaris
Member Avatar for Ancient Dragon
0
294
Member Avatar for darknoobie
Member Avatar for AhmedGhazey

Since you'll be doing a lot of string manipulation, and strings are immutable, I would consider using a list capable of insert.

Member Avatar for AhmedGhazey
0
88
Member Avatar for salmanrauf

[QUOTE=llianne;1435492]how does the try catch and finally work in a run time program???[/QUOTE] A try/catch/finally block resembles a if/if else/else block in structure, however in functionality it it quite different. The code scoped within the try block attempts to execute, and if an error (exception) is thrown, the stack will …

Member Avatar for JamesCherrill
0
136
Member Avatar for Katana24

What about Python inspired iteration? [CODE]byte range[] = new byte[5]; for (byte nul : range) { System.out.println("do stuff"); }[/CODE]

Member Avatar for masijade
0
167
Member Avatar for iamuser_2007
Member Avatar for Jelte12345

[QUOTE=Jelte12345;1427454]has to write and erase a couple of gigs to the memory every time the program runs[/QUOTE] My solution: Read the file one burst at a time, like 1024 characters. Add 1 to a counter each time you reach a newline character, and also keep track of your position in …

Member Avatar for arkoenig
0
560
Member Avatar for hughesadam_87
Member Avatar for djidjadji
0
377
Member Avatar for jaycastr
Member Avatar for seanbp

I'm assuming there's no easier way to do this. Is thread locking really automatic? Am I misreading the documentation? [CODE]from threading import Thread make_thread = lambda fn, *args: Thread(None, fn, None, args).start() def my_fn(*args): for arg in args: print (arg) make_thread(my_fn, "toaster", "ovens") [/CODE]

Member Avatar for griswolf
0
95
Member Avatar for seanbp

What are some hints or tips on writing efficient functions? I read about converting the code to assembly, and I've also read about the stack and functions. However, I fail to understand how data stored higher can be accessed before the end on a FIFO stack, as any local variable …

Member Avatar for vijayan121
0
107
Member Avatar for aligajani

> Currently the information is stored directly without the [use] of objects. > ArrayList<String> myArr = new ArrayList<String>(); Not true. String is a class. > I also want to know the special use of this ArrayList, in this particular scenario. > Integer vacationIndex = nameLength % myArr.size(); ArrayList is a …

Member Avatar for Eric Cute
0
170
Member Avatar for seanbp
Member Avatar for pankaj37marwal

[QUOTE=pankaj37marwal;1426463]#include<iostream.h> or #include<conio.h>[/QUOTE] Have you tried removing the ".h"?

Member Avatar for seanbp
0
102
Member Avatar for Tecomapu
Member Avatar for aligajani
0
168
Member Avatar for astala27

I did a project like this in Java. The goal was to write the entire calculator using the functional programming style. I ran into quite a few problems involving parsing the negative numbers versus minus operators, and ended up adding a bunch of if statements checking for "-" after "e" …

Member Avatar for arkoenig
0
2K
Member Avatar for freakyboard

Could you cut the code down to 20 or 30 lines? The least amount of code which replicates the problem. Also could you use white space indentation? People tend to respond to posts which are easy on the eyes and short.

Member Avatar for freakyboard
0
103
Member Avatar for mattloto

[QUOTE=mattloto;1426263]Hi, so I finally got around to looking into OOP in c++ and I have a question about classes. So I made this simple class: [CODE]#include <iostream> using namespace std; class Shape { int xPos, yPos; public: Shape(int x, int y) { xPos=x; yPos=y; } } ; int main() { …

Member Avatar for mrnutty
0
125
Member Avatar for libathos
Member Avatar for seanbp

I read about a coding style where not one variable is changed. Everything must stay constant. I don't remember what it's called, but it's the bomb. I never realized this little project would be [I]so easy[/I]. Here is a 98 line calculator that supports [B]()^*/+-[/B]. If you find a bug, …

Member Avatar for seanbp
1
1K
Member Avatar for jackmaverick1

[QUOTE][CODE]~Card(hearts[1]);//I am not sure if this is even right[/CODE][/QUOTE] It's not. Destructors take no arguments and are called automatically. They should also be virtual whenever the object might be polymorphic.

Member Avatar for jackmaverick1
0
1K
Member Avatar for crimes

[URL="http://www.cplusplus.com/doc/tutorial/"]http://www.cplusplus.com/doc/tutorial/[/URL] [URL="http://cplus.about.com/od/learning1/ss/cppobjects.htm"]http://cplus.about.com/od/learning1/ss/cppobjects.htm[/URL] [URL="http://www.codersource.net/c/c-tutorials/c-tutorial-class.aspx"]http://www.codersource.net/c/c-tutorials/c-tutorial-class.aspx[/URL] Fetched from: [URL="http://www.google.com/search?q=c%2B%2B+classes"]http://www.google.com/search?q=c%2B%2B+classes[/URL] I also recommend C++ for Dummies [I]then[/I] C++ in a Nutshell (O'Reilly Book) Since you have a lot written I wouldn't start out writing classes. I would break up the functions so that each one does an individual task. Repeating code can be sorted …

Member Avatar for Fbody
0
149
Member Avatar for tammy12w

[URL="http://java.sun.com/javaee/sdk/javaee6sdk_relnotes.jsp"]http://java.sun.com/javaee/sdk/javaee6sdk_relnotes.jsp[/URL]

Member Avatar for seanbp
0
105
Member Avatar for vedro-compota

Reading from right to left, cast each char to int then subtract the ASCII value of zero, multiplying by 10 more than the last. Can also be used with float. [CODE]#include <stdio.h> #include <stdlib.h> int main(){ int result = 0; int multiplier = 1; int end = 0; char buffer[512];; …

Member Avatar for vedro-compota
0
247
Member Avatar for phobos666
Member Avatar for phobos666
0
302
Member Avatar for warlord902
Member Avatar for hsetaknev

Gooooooogle got me this [URL="http://bytes.com/topic/c/answers/213647-null-c"]URL[/URL]. [B]\0[/B] is the null terminator to a string. It's sometimes handy with all arrays to have a unique terminator, but usually not possible.

Member Avatar for hsetaknev
0
152
Member Avatar for alexchen

Maybe what you're looking for is: [CODE]int* list = new int[Width][Height];[/CODE]

Member Avatar for jonsca
0
125
Member Avatar for fabricetoussain

Your Public class is public, and therefore in it's own file. [I]Maybe[/I] [URL="http://download.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javac.html"]this[/URL] will help. See especially, [B]Compiling Multiple Source Files[/B]. [QUOTE=Slimmy;1421086]Your constructor is supposed to take two arguments. On line 5 you are not supplying any arguments. Besides that most of your code is also wrong.[/QUOTE] [B]Correct.[/B]

Member Avatar for Eric Cute
0
641
Member Avatar for bomko

Here's a basic example of my input loops: [CODE]for line in iter(lambda: input("Enter something (nothing to quit): "), ""): print (len(line))[/CODE]

Member Avatar for seanbp
0
126
Member Avatar for pi_lord12
Member Avatar for pi_lord12
0
2K
Member Avatar for LanierWexford

The issue happens when you append your Python directory to your default directories. As long as the executable has a different name, per version, there shouldn't be an issue. I know Linux does that but I'm not sure about Windows.

Member Avatar for richieking
0
171
Member Avatar for rj2910
Member Avatar for FAITH2011
Member Avatar for CrazyPixel

Like jonsca said, never use gets. It easily overflows. I don't know what your system calls are doing. I also noticed your errors are passing silently. What specific functions aren't being called or aren't running properly?

Member Avatar for jonsca
0
170
Member Avatar for amit_tare1

[URL="http://www.codeproject.com/KB/IP/client_server_socket.aspx"]http://www.codeproject.com/KB/IP/client_server_socket.aspx[/URL]

Member Avatar for seanbp
-1
148
Member Avatar for lochnessmonster

I would count it's length, allocate that much memory, reset the pointer, then copy it into that memory.

Member Avatar for jonsca
0
83
Member Avatar for kuksa1994

Could you be more specific? How exactly are they going to be combined? Do you mean some form of demodularization?

Member Avatar for seanbp
0
50
Member Avatar for sciprog1

This is from Gooooooooogle. Maybe it will help you get started. [URL="http://download.oracle.com/javase/tutorial/uiswing/components/layeredpane.html"]http://download.oracle.com/javase/tutorial/uiswing/components/layeredpane.html[/URL]

Member Avatar for sciprog1
0
182
Member Avatar for bookmark
Member Avatar for Nice Dreams
Member Avatar for seanbp

These days, it's usually unnecessary to consider how much memory to allocate for a string input. This was mostly for fun. This code allocates memory as the user inputs each key stroke, then allocates and returns a string pointer when the user presses enter. Tell me what you think! [B]USAGE:[/B] …

0
331
Member Avatar for Slyvr
Member Avatar for sanjuanair
Re: How

gcc and g++ are my favorites. I've heard good things about Visual Studio.

Member Avatar for seanbp
0
115

The End.