|
digital-entropy posted:With Javascript, is there anyway to set document.location.hash without appending an item to the browser's recent history? We have a Flex app at work and I want to let users bookmark/deep-link pages by setting the fragment each time they change the view. No.
|
# ¿ Nov 15, 2009 06:04 |
|
|
# ¿ May 17, 2024 18:58 |
|
tef posted:Couldn't you do something horrible with scrollTo or similar? He's not using hashes to scroll to specific locations, he's using them so deep linking works with his Flash app, but he doesn't want to bother making the back/forward buttons work and people like him are the reason the rest of us hate Flash.
|
# ¿ Nov 16, 2009 03:22 |
|
digital-entropy posted:The reason I'm attempting to do it this way is that a coworker put app-specific back/forward buttons in and at some point they do need to be stripped out but that's going to be a bigger endeavor than simply working around it for now. Sorry man; but every time I use a Flash app with a UI that almost but not quite behaves like a real UI it drives me nuts.
|
# ¿ Nov 16, 2009 15:01 |
|
Sweeper posted:Say I have two computers next to each other. I have a client running on one and a server running on another. I want the client to display data from the server, is it possible to do this over usb? Am I pretty much stuck using the network for this type of thing? No serial cable is possible since the other computer is a laptop. Buy a USB-to-serial adapter.
|
# ¿ Jan 29, 2010 03:13 |
|
Dijkstracula posted:Since there are no jmps in this program, there should only be one basic block, and that should only ever get executed once, so where the hell are these things coming from? You probably know more about valgrind than me at this point because you're the one writing the plugin, but perhaps valgrind's decompiler/recompiler generates a bunch of extra basic blocks?
|
# ¿ Mar 10, 2010 05:58 |
|
Vinterstum posted:Famous? Quake I/II/III source code: http://www.idsoftware.com/business/techdownloads/ Doom 3 was the first C++ game engine from id Software.
|
# ¿ Mar 29, 2010 21:09 |
|
Without any IPC, basically the only thing you can do is have the child process return an error code (main()'s return value, or exit()'s parameter).
|
# ¿ Apr 24, 2010 20:18 |
|
Dijkstracula posted:A stupid Linux internals question that I've not been able to find an answer to: None of those values are fixed and if your tool is hard-coding them, it is technically broken.
|
# ¿ Jun 4, 2010 02:50 |
|
Dijkstracula posted:Well, sure, but IIRC they're at least values that can only be changed during a kernel recompile, right? (now, this still doesn't address the original problem of how one can even query for these values) TEXT_SEG_BEGIN is actually determined by the base address of the LOAD segment in the ELF program header, HEAP_SEG_END doesn't have any relation to reality at all (AFAIK), and, yes, KERN_SEG_BEGIN would require a kernel recompile. edit: ok, so KERN_SEG_BASE is obviously PAGE_OFFSET (the offset into the virtual address space where the physical direct mapping starts), and HEAP_SEG_END is apparently supposed to be TASK_UNMAPPED_BASE, but TASK_UNMAPPED_BASE is only loosely related to the heap. It actually controls where the kernel starts looking for empty VM slots to map files via mmap(), so it is sort of an upper bound for where the sbrk() heap could be, except a) malloc will also mmap() anonymous memory for the heap outside of that region and b) if the kernel can't find an empty space in the VM above TASK_UNMAPPED_BASE, it'll search anywhere, including the supposed heap. pseudorandom name fucked around with this message at 09:15 on Jun 4, 2010 |
# ¿ Jun 4, 2010 08:54 |
|
Avenging Dentist posted:What version of GCC? As I recall, before they started working on C++0x support, they didn't do this. Since you have to do this for C++0x, it's obviously going to be the standard going forward. Both clang 2.7 and gcc 4.4 do it now. A random gcc dev I just asked says that gcc has been folding floats since real.c was added in 1993 or so.
|
# ¿ Jun 10, 2010 22:37 |
|
tractor fanatic posted:This is a problem I'm kind of curious about : This would get easier if your star database had size and spectra information for all the stars and your 'picture' was good enough quality to include the spectra.
|
# ¿ Jul 12, 2010 05:25 |
|
Yes. The GPL states that derivatives of a work licensed under the GPL must also be licensed under the GPL, and it is commonly believed that simply using a GPLed library is sufficient to be a derivative work*. But ask your lawyer. * The exception to this would be a GPLed work that implements an unoriginal library interface, in which case your work could just as easily use a different implementation of the same interface and thus isn't tied enough to the GPLed work to be a derivative. But ask your lawyer. As to your second question, if the thief is smart enough, you generally can't, but people dumb enough to use code without obeying the license generally aren't smart enough to remove easily recognizable strings like the SCM keywords and assertion failure messages and whatnot. pseudorandom name fucked around with this message at 20:02 on Sep 9, 2010 |
# ¿ Sep 9, 2010 20:00 |
|
Otto Skorzeny posted:write(2) has the signature (int fd, char *buf, size_t count) and writes up to count bytes from buf to fd, so I thought this would work fine. What am I doing wrong For starters, you're using the 32-bit system call interface from a 64-bit process and I'm surprised that works at all.
|
# ¿ Sep 11, 2010 00:45 |
|
Yes, you should be using the 64-bit system call interface.
|
# ¿ Sep 11, 2010 01:10 |
|
Even if he did mean "side" instead of "size", master and slave USB connectors are differently shaped specifically to prevent you from connecting host-to-host or device-to-device..
|
# ¿ Sep 18, 2010 10:10 |
|
Congratulations, you've just badly reimplemented Lisp exceptions.
|
# ¿ Dec 1, 2010 04:46 |
|
nielsm posted:Sort them by start time. (O(n log n)) start: 1 end: 5 start: 2 end: 3 start: 4 end: 6
|
# ¿ Jan 13, 2011 04:21 |
|
The question was "Does this specific job conflict with any other job in this set?" not "Does at least one job in this set conflict with another job?"
|
# ¿ Jan 13, 2011 06:36 |
|
If the auto-updater downloads an update.exe, runs it, and then exits, update.exe can replace the auto-updater in addition to the main executable.
|
# ¿ Mar 12, 2011 23:44 |
|
Ask your lawyer.
|
# ¿ Mar 28, 2011 22:22 |
|
You'd be better off using your database's native GIS functionality, if it has it. PostgreSQL has PostGIS, MySQL has Spatial Extensions, Oracle has Oracle Spatial, DB2 has DB2 Spatial Extender, SQL Server has ... something, etc.
|
# ¿ Apr 5, 2011 22:37 |
|
The King of Swag posted:Objective-C I would argue is the closest "C-like" language, in fact you can't call it "C-like" as it's actually just a superset of C. All the magic that goes on is contained within the Obj-C runtime library. When compiled, ObjC code is turned into strict C before being fully compiled into object files. Objective C has exceptions now, so it isn't a strict superset of C.
|
# ¿ Apr 16, 2011 23:10 |
|
pokeyman posted:Alright, I'll bite: show me an example of C code that can't be compiled by an Objective-C compiler due to Objective-C exceptions. foo.cpp: code:
code:
pseudorandom name fucked around with this message at 05:54 on Apr 17, 2011 |
# ¿ Apr 17, 2011 05:29 |
|
The King of Swag posted:The Apple docs flat out say that exception handling is faked using setjmp() and longjmp() and thus is subject to any limitations associated with those functions. Part of the problem is that you're confusing the NextStep library (exceptions require the use of NSException) with the ObjC runtime. Now, the latest versions of the runtime do natively support exceptions, but if I understand the gcc documentation correctly, they're still broken down into setjmp.h trickery during compile-time. The King of Swag posted:No, he meant what he typed. ObjC being a superset of C means it encompasses C in its entirety and thus there is no functional C code that won't compile properly in ObjC. This is in contrast to C++ which builds from C, but is not a superset of C, as C will not necessarily compile correctly under C++. I was responding to your comment that The King of Swag posted:All the magic that goes on is contained within the Obj-C runtime library. When compiled, ObjC code is turned into strict C before being fully compiled into object files. (gcc actually goes to the extent of having entirely separate binaries for each of the source languages, called cc1, cc1plus, cc1obj, and cc1objplus, respectively. clang has a single binary that can operate in the different modes as necessary. But there's no cfront nonsense anywhere.)
|
# ¿ Apr 17, 2011 09:33 |
|
pokeyman posted:Public domain bitches. Public domain doesn't let you disclaim any liability.
|
# ¿ Apr 19, 2011 01:27 |
|
pokeyman posted:No, it just doesn't do so automatically. It doesn't stop you from doing so if you feel you must. My understanding is that the disclaimers in copyrighted software works because either a) you agree to the disclaimer of warranty or b) you aren't allowed to use the software. Public domain doesn't have a copyright, so you can't control its use.
|
# ¿ Apr 19, 2011 03:47 |
|
pokeyman posted:Well, IANAL, but my understanding is that implied warranties and copyright are orthogonal. Placing a work into the public domain literally means abandoning the copyright you hold on that work. I actually asked an IP lawyer, and his response was "yes. wait. public domain. maybe? let me think." The More You Know.
|
# ¿ Apr 20, 2011 01:30 |
|
Figure out what is insisting on using "gcc-4.0" instead of "gcc", and change it.
|
# ¿ Apr 21, 2011 14:26 |
|
Jam2 posted:Thanks, very helpful. (not) In case you haven't realized, I have no idea what I'm doing. But you do know how to search through files, right?
|
# ¿ Apr 21, 2011 23:54 |
|
The kernel implementation is in linux/fs/open.c, the userspace stub is generated from glibc/sysdeps/unix/syscalls.list
|
# ¿ Apr 23, 2011 16:45 |
|
A good start, but perhaps it could be made into a more generalized solution with templates?
|
# ¿ Jun 29, 2011 18:17 |
|
I come here expecting people's minds being blown by Duff's Device, and instead it is some kind of retarded formatting style argument.
|
# ¿ Jul 2, 2011 03:01 |
|
Otto Skorzeny posted:It isn't quite duff's device that's being presented here, although it is a very close cousin Oh, I know that, but Duff's Device is the only thing related to loop unrolling that I could think of that would result in an explosion of posting.
|
# ¿ Jul 2, 2011 05:14 |
|
Yeah, just keep pretending urgent data doesn't exist. Unless you're implementing Telnet. e:fb
|
# ¿ Sep 5, 2011 06:42 |
|
Wine ripped off the entire Win32 API, so you should probably be fine. But ask your lawyer.
|
# ¿ Sep 23, 2011 20:03 |
|
OneEightHundred posted:- You didn't use ENTER, which means LEAVE will attempt to restore a stack state that was never stored and ruin everything ENTER and LEAVE don't have to be paired. (And in fact never are in modern code, ENTER is microcoded, while LEAVE is a real instruction.)
|
# ¿ Sep 30, 2011 23:42 |
|
Well, yeah, LEAVE obviously expects a specific stack layout. But you don't have to produce that using ENTER. And nobody does, because ENTER is terrible. OTOH, LEAVE isn't, and the general rule of x86 assembly programming is to use the fewest instructions possible (i.e. take advantage of the complex addressing modes, use the instructions that do multiple things, etc.).
|
# ¿ Oct 1, 2011 00:33 |
|
Sorry, I'm out of date, everybody microcodes LEAVE now. Never use it.
|
# ¿ Oct 1, 2011 00:57 |
|
The ones that aren't listed as "microcoded" in AMD's optimization manual.
|
# ¿ Oct 1, 2011 20:11 |
|
|
# ¿ May 17, 2024 18:58 |
|
There's the clear disadvantage that you've broken accessibility.
|
# ¿ Oct 21, 2011 21:54 |