Adam Rosenfield

United States

adamrosenfield.com

Age: 28

Software engineer from Cambridge, MA

1d
answered Formatting Sandbox
1d
awarded Enlightened
2d
awarded Nice Answer
Jan
23
awarded Great Answer
Jan
11
comment How to connect to a server using only its IP?
Are you being a router which performs NAT? If so, you'll need to enable port forwarding from your router to your server in order to allow external clients not located on your LAN to connect.
Jan
10
comment Java runtime check
The keyword you're looking for is a **profiler**.
Jan
9
awarded Supporter
Jan
9
awarded Teacher
Jan
9
awarded Autobiographer
Jan
5
answered binascii.unhexlify working differently in Python 3.2 and Python3.4?
Jan
4
awarded Yearling
Jan
4
awarded Yearling
Jan
3
awarded Good Answer
Dec
31
comment pthread Function from a Class
@Rohit: Your thread procedure threadOne() never tries to do anything with its argument args. If it did, it would get NULL, and it would be unable to access the Thread object instance. What's surprising there?
Dec
29
comment Stack around the variable was corrupted
gets() is impossible to use safely. Never use it.
Dec
25
comment Are ints always initialized to 0?
@n00bProgrammer: Yes. In the situations described above, all variables are "zero-initialized" in whatever manner that means for their respective data types. Arithmetic types (int, NSUInteger, CGFloat, float, bool, BOOL, char, etc.) are all initialized to 0 represented in those types.
Dec
15
awarded Necromancer
Dec
14
comment How to store a socket within a list C++
Sockets are just plain ints in C/C++.
Dec
8
answered C++ mktime returning random dates
Dec
1
comment use macro to define two local variable but have the same address
True, statement expressions are not standard C and the program is not technically legal C in that respect. But even in the extended (ISO C + GCC extensions) model, it's still UB because GCC documents these objects as being temporary and destroyed when the statement expression ends. So doing char *x = ({char y[16] = {0}; y;}); is just as much UB as char *foo() { char y[16] = {0}; return y; } ... char *x = foo();.
1 2 3 4 5