I want to create a site that is groupon.com clone.
Does anyone know interesting clones of the Groupon.com web site model?
ex)
StackOverflow clone = http://meta.stackoverflow.com/questions/2267/stack-overflow-clones
If I have a large amount of data in memory, what is the best way to copy it into a SQL CE table? The current technology stack is C#, ADO.net, and SQL CE.
My initial idea was to do one INSERT statement for each row of data, but this is time-consuming. Is there an easier way?
Hello,
I am getting a NullPointerException at android.app.ActivityThread$PackageInfo$ServiceDispatcher.doConnected(ActivityThread.java:1012). My application is not even in the stack trace, so I have no idea what is going on. I am trying to connect to a service when it happens. How can I fix this problem?
Thanks,
Isaac Waller
Stack overflow has become the first place i come to whenever i have dev problem. I also like to browse when i'm killing time.
Just curious to know what other general sites or resource people use regularly.
There is a lot of information on how to find the next power of 2 of a given value (see refs) but I cannot find any to get the previous power of two.
The only way I find so far is to keep a table with all power of two up to 2^64 and make a simple lookup.
Acius' Snippets
gamedev
Bit Twiddling Hacks
Stack Overflow
I am looking for a wordpress plugin which simplifies the registration process by allowing users to sign up on the spot without having to be sent an email?
It would be good if you could also pass a redirect_to parameter in the url like you can for the login.
Note:Some thoughtless person migrated this question over to super user where it was closed. I believe this question fits the criteria allowable for stack overflow.
What's the easiest way to compute a 3x3 matrix inverse?
I'm just looking for a short code snippet that'll do the trick for non-singular matrices, possibly using Cramer's rule. It doesn't need to be highly optimized. I'd prefer simplicity over speed. I'd rather not link in additional libraries. Primarily I was hoping to have this on Stack Overflow so that I wouldn't have to hunt around for it or rewrite from scratch again next time.
I was reading over this question and wondered if the accepted answer might also be a way to determine the architecture. For instance, in asm could I push a WORD onto the stack and then check SP. Compare the new SP to the old SP:
Diff of 4 means 32 bit
Diff of 8 means 64 bit
Am I correct in this thinking?
I know htat fork() returns differently for the son and father processes, but I'm unable to find information on how this happens. How does the son process receives the return value 0 from fork? And what is the difference in regards to the call stack? As I understand it, for the father it goes something like this:
father process--invokes fork--system_call--calls fork--fork executes--returns to--system_call--returns to--father process. What happens in the son side?
About a month ago I saw a portfolio website in Flash that featured a stack of cards, and each time you clicked on it, they sort of blew all over the place, thus exposing the backs as videos and pictures.
Although I could easily take a bunch of 3D planes and tween them to turn and flip, these cards actually seemed to 'bend'.
How is this effect achieved?
Sorry I don't have the link to the example.
Thanks!
Hi all,
When loading an executable then segments like the code, data, bss and so on need to be placed in memory. I am just wondering, if someone could tell me where on a standard x86 for example the libc library is placed. Is that at the top or bottom of memory. My guess is at the bottom, close to the application code, ie., that would look something like this here:
--------- 0x1000
Stack
|
V
^
|
Heap
----------
Data + BSS
----------
App Code
----------
libc
---------- 0x0000
Thanks a lot,
Ross
I'm using Visual Studio and while fiddling around with a custom control, I started to get an out of memory error.
The stack trace is not helpful - it's just a bunch of frames doing Reflection and so on.
How can I fix this?
Hi folks,
I'm just wondering, I often have really long python files and imports tend to stack quite quickly.
PEP8 says that the imports should always be written at the beginning of the file.
Do all the imported libraries get imported when calling a function coded in the file? Or do only the necessary libraries get called?
Does it make sense to worry about this? Is there no reason to import libraries within the functions or classes that need them?
Hello,
I am using Classic asp and SQL Server 2005.
This is code that works (Provided by another member of Stack Overflow):
sqlStr = "USE "&databaseNameRecordSet.Fields.Item("name")&";SELECT permission_name FROM fn_my_permissions(null, 'database')"
This code checks what permissions I have on a given database - the problem being - if I dont have permission it throws an error and doesn't continue to draw the rest of my page.
Anyone got any ideas on remedying this?
Many Thanks,
Joel
.model small
.stack 100
.data
.code
mov ah,00h
mov al,0e3h
mov dx,00h
int 14h
back: nop
l1: mov ah,03h
mov dx,00h
int 14h
and ah,01h
cmp ah,01h
jne l1
mov ah,02h
mov dx,00h
int 21h
mov dl,al
mov ah,02h
int 21h
jmb back
mov ah,4ch
int 21h
end
this a pc to pc commnication receiver program.i would like to know
why have we used the mov dx,00h function and what is the meaning of mov al,0e3h this ?
I need to access the MSP and PSP registers (the main and process stack registers) of the Cortex-M3 processor.
I'm writing in C/C++.
The µVision and associated compiler doesn't let you do inline assembly for this Thumb-2 only core (and I'm not sure that'd be such a good idea anyway).
I need to do this so that I can extract the immediate value of an svc instruction regardless of whether it was executed while in thread or handler mode.
Thanks,
In C++:
On stack, a simple variable is assigned a memory address so that we can use pointer to contain this memory to point to it;
then is a pointer also assigned a memory address?
if yes, we can have pointer of pointers now?
Thanks!
Is there any Linux command which remembers directories I changed, and shows its stack with interacting operation to choose a directory such as pushing an arrow key on keyboard? This must be different from the way pushd/popd/dirs do.
I have a garbage collected Cocoa application built on 10.5 frameworks. In an NSOperation In a loop I am quickly creating hundreds of NSManagedObjects. Frequently the creation of those NSManagedObejcts will crash with a exc_bad_access error.
for (offsetCount; offsetCount < [parsedData count]; offsetCount++) {
NSManagedObject *child = [NSEntityDescription insertNewObjectForEntityForName:@"Thread" inManagedObjectContext:[self moc]];
Thumbnail *thumb = [Thumbnail insertInManagedObjectContext:[self moc]];
Image *image = [Image insertInManagedObjectContext:[self moc]];
...
}
Thumbnail and Image are both subclasses of NSManagedObject generated with mogenerator. insertInManagedObjectContext: looks like
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Thumbnail" inManagedObjectContext:moc_];
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Image" inManagedObjectContext:moc_];
The NSManagedObjectContext returned by [self moc] is created for the NSOperation with
NSPersistentStoreCoordinator *coord = [(MyApp_AppDelegate *)[[NSApplication sharedApplication] delegate] persistentStoreCoordinator];
self.moc = [[NSManagedObjectContext alloc] init];
[self.moc setPersistentStoreCoordinator:coord];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(contextDidSave:)
name:NSManagedObjectContextDidSaveNotification
object:self.moc];
[self.moc setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy];
[self.moc setUndoManager:nil];
[self.moc setRetainsRegisteredObjects:YES];
moc is defined as (nonatomic, retain) and synthesized. As far as I can tell it, the persistent store and my appDelegate have no reason to be and are not being garbage collected.
The stack trace looks like
Thread 2 Crashed: Dispatch queue: com.apple.root.default-priority
0 libauto.dylib 0x00007fff82d63600 auto_zone_root_write_barrier + 688
1 libobjc.A.dylib 0x00007fff826f963b objc_assign_strongCast_gc + 59
2 com.apple.CoreFoundation 0x00007fff88677068 __CFBasicHashAddValue + 504
3 com.apple.CoreFoundation 0x00007fff88676d2f CFBasicHashAddValue + 191
4 com.apple.CoreData 0x00007fff82bdee5e -[NSManagedObjectContext(_NSInternalAdditions) _insertObjectWithGlobalID:globalID:] + 190
5 com.apple.CoreData 0x00007fff82bded24 -[NSManagedObjectContext insertObject:] + 148
6 com.apple.CoreData 0x00007fff82bbd75c -[NSManagedObject initWithEntity:insertIntoManagedObjectContext:] + 716
7 com.apple.CoreData 0x00007fff82bdf075 +[NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:] + 101
8 com.yourcompany.MyApp 0x000000010002c7a7 +[_Thumbnail insertInManagedObjectContext:] + 256 (_Thumbnail.m:14)
9 com.yourcompany.MyApp 0x000000010002672d -[ThreadParse main] + 10345 (B4ChanThreadParse.m:174)
10 com.apple.Foundation 0x00007fff85ee807e -[__NSOperationInternal start] + 698
11 com.apple.Foundation 0x00007fff85ee7d23 ____startOperations_block_invoke_2 + 99
12 libSystem.B.dylib 0x00007fff812bece8 _dispatch_call_block_and_release + 15
13 libSystem.B.dylib 0x00007fff8129d279 _dispatch_worker_thread2 + 231
14 libSystem.B.dylib 0x00007fff8129cbb8 _pthread_wqthread + 353
15 libSystem.B.dylib 0x00007fff8129ca55 start_wqthread + 13
My app is crashing in other places with exc_bad_access but this is code that it happens most with. All of the stack traces look similar and have something to do with CFHash.
Any help would be appreciated.
I'm interested in knowing if there are any advantages to creating a child container for each request in a web based application?
The tech stack I'm using includes StructureMap & ASP.NET MVC, which is not particularly relevant but included as background info.
I'm interested in programming, but it seems to me that I can't get into it. Every time I've tried to learn a language and stuff by looking through tutorials or books I'd never get past the part where I use the syntax to make something. And by interest, I mean that I read stack overflow a lot, coding horror, and stuff but the actual coding part is hard for me to get into. Did anybody start this way? How did you get past this block?
Is there a simple way to place a detail disclosure icon on a UIButton? I'm using a navigation controller and I want a button press to push a new view on the stack, so I thought a detail disclosure icon would be appropriate, but I haven't found a straightforward way to do that yet.
Hello,
I'm researching which linux distro would be the best for a software development environment. The technology stack we are using includes Grails/Groovy, Java, JBoss, Git, Eclipse, Oracle. Any thoughts from the stackoverflow mind share?
Thanks!
Steve
Hello
I've been trying to parse a UTF-16 encoded xml file in Ruby (1.8.7), and I can't seem to find how to do it by searching (google and stack overflow)
Here's the xml file url:
http://www.abc.net.au/triplej/feeds/playout/triplejsydneyplayout.xml?_5366
Getting the xml string from Net::HTTP and passing it to REXML, then calling logger.info xmlDoc.inspect produces: <UNDEFINED> ... </>
Any ideas?
Cheers
1) Refcounted pointers need stack variables to have constructors / destructors called at predictable places.
2) Objective-C, afaik, does not support the above.
3) The cocoa libraries are bound in Objective-C, not C++.
Thus, my question: is there a easy way to use the Cocoa libraries, yet still have most of my app in C++ (and thus use my refcounted pointers)?
Thanks!
(iPhone in the title since this is mainly targeted at the iPhone)