|
coldfire07 posted:Regarding a memory leak, the only thing I can spot is the fact that although the SPNode is freed from memory, the actual Point object isn't -- which is intentional since we're wanting to save it in ret, right? Of course, I could be missing something else altogether. Heh, it's a subtle thing that you might have missed, but no, you're making a copy of what head->data points to, not just overwriting the pointers. So, p1 back in the main function just gets assigned new values in its fields (because it's a Point structure living on the stack, not a pointer to a Point structure that you've malloc()ed), so sp->head.data is a pointer to data that is only referenced in one place - the node that you've just freed the memory of!
|
# ? Jan 31, 2010 02:42 |
|
|
# ? Jun 8, 2024 22:03 |
|
Oh wow, I never would have caught that, I didn't realize the distinction you described about p1, great to know. Thanks for your help
|
# ? Jan 31, 2010 02:56 |
|
PDP-1 posted:The problem here is that when you try to reconstruct your input function from the inverse transform the result you get is going to be a new function that is periodic in T. For example if you sample x(t) for one second (T=1) and do the transform/inverse-transform to try to calculate what the system will be doing at t=1.1 seconds, what is really going to happen is that your function will 'loop around' and give you x(0.1) and not some extrapolation to x(1.1).
|
# ? Jan 31, 2010 07:23 |
|
Rocko Bonaparte posted:I chewed on that awhile and am sure you are right. Can you imagine an alternatives that might work? Wavelets? If you want to extrapolate you really need some kind of model that actually tells you something about the meaning of your data to guide you. Just picking some random curve fitting algorithm may give you a value, but it won't have anything to do with anything.
|
# ? Jan 31, 2010 18:03 |
|
Is Direct3D's d3dxsprite interface incompatible with pixel shaders ? I use clean pixel shader code samples from tutorials and get garbage. The rudimentary/useless examples such as "fill the screen with RED" work, but anything involving modification of existing screen data creates horrific results. monsterland fucked around with this message at 01:39 on Feb 2, 2010 |
# ? Feb 2, 2010 01:30 |
|
Ok, I'm an experienced coder, but I know gently caress all about making programs for windows. I want to write a tiny app that has a system tray icon and more or less works like a screensaver. What's the quickest/dirtiest/cheapest platform for making lil' windows apps? thanks!
|
# ? Feb 2, 2010 19:23 |
|
Microsoft gives away a pretty nice development environment for several languages that makes producing Windows .NET programs nearly trivial. You can download them here for whatever language you like best. The Express Editions are the free versions. After that, just Google for '.NET screensaver' and '.NET system tray' and you should find plenty of examples/tutorials.
|
# ? Feb 2, 2010 21:17 |
|
Excellent, thanks!
|
# ? Feb 3, 2010 01:55 |
|
I have a bunch of pdf files that I want to put online for someone to be able to access, but I do not want to have to manually type in the names of all the files as: <a href="filename.pdf">Filename</a> since the names of the files are pretty long and involved and there are 45 or so of them. The way I was thinking of doing this is to write some sort of script(?) that will look in a particular folder and generate a text file that has an entry like the one above for each pdf file in the folder. Then all I have to do is copy that information and paste it in my .html file. Is this even feasible? And if so, where can I look to get some basic info on how to accomplish this?
|
# ? Feb 3, 2010 20:14 |
|
code:
|
# ? Feb 3, 2010 20:36 |
|
Why not just upload them all to a directory and allow the directory itself to be viewed?
|
# ? Feb 3, 2010 20:36 |
|
Avenging Dentist posted:Why not just upload them all to a directory and allow the directory itself to be viewed? http://www.coenbrothers.net/scripts/
|
# ? Feb 3, 2010 21:11 |
|
Avenging Dentist posted:Why not just upload them all to a directory and allow the directory itself to be viewed? That would be the easiest way, but I do not know how to do this. I am using the personal webpage given to me by my university. If you could point me in the right direction I would appreciate it.
|
# ? Feb 3, 2010 23:31 |
|
http://www.javascriptkit.com/howto/htaccess11.shtml
|
# ? Feb 4, 2010 00:10 |
|
Avenging Dentist posted:http://www.javascriptkit.com/howto/htaccess11.shtml Thanks for the link. Although I was not able to get it to work I did manage to write a script to accomplish what I need.
|
# ? Feb 4, 2010 22:51 |
|
I'm trying to pass in a long long int into printf in 32-bit x86 assembly. Well, I can do it, but I'm not sure I'm pushing the argument values in the right order, specifically for the long long int (push lower or upper 4 bytes first?). Assume count is the location of the 64 bit long and count_string is "%llu\n": code:
code:
EDIT: here is GCC's "correct" assembly for reference: code:
ShinAli fucked around with this message at 04:07 on Feb 5, 2010 |
# ? Feb 5, 2010 03:56 |
|
I want to set up my Subversion repository to automatically copy its files out to another directory on commit. I understand the commit hook mechanism, but what I don't understand is the location of the files in my repository. What I want out of this is to auto-deploy a web app to /var/www whenever it gets a commit. How do I get at my files?
|
# ? Feb 7, 2010 20:23 |
|
I did this for a project last year, and I seem to remember having to check out the code into /var/www/whatever. So I had Subversion installed on the server, and it was checked out on my laptop and on /var/www/whatever. Then with auto-commit hooks, I would force it to be re-checked out on /var/www/whatever whenever I checked it in from my laptop. I think I followed this guide when I was setting it up: http://alextreppass.co.uk/getting-django-working-on-bluehost
|
# ? Feb 7, 2010 20:39 |
|
Thanks! I was looking at svn export, which looked like a terrible way to do it. This seems much better.
|
# ? Feb 7, 2010 20:58 |
|
Augh, does anyone know/use R? I have a couple of quick questions: 1) I have some data that's already organized into 3 sets. My homework wants me to lay another "factor" over it that has 2 sides. (Sort of like if you organized cars by size and color). I did y = c(data) then x = c(rep(1,7) . . . ) or whatever. How do I overlay the second factor? 2) How do I create side-by-side box plots that are organized via the new factor? Also if anyone knows of an R help file or guide that is particularly good that'd be nice to have. Edit: Never mind, got the answer in class today. If anyone's curious I can post the answer. HondaCivet fucked around with this message at 21:19 on Feb 8, 2010 |
# ? Feb 8, 2010 04:55 |
|
Kind of meta, but is there a forum/website that has data on which tech recruiters in a given area are recommended or suck?
|
# ? Feb 9, 2010 03:56 |
|
Okay, I've got a small question. I have a filename that seems to be a hash value, in hex. Is there any way I can "decrypt", if you will, the hash and recover the original filename?
|
# ? Feb 9, 2010 05:54 |
|
So I'm teaching myself Haskell and running through Project Euler. I'm getting hung up on compiling my code, even though I've tested it (formatted differently) in GHCi:code:
code:
|
# ? Feb 9, 2010 06:09 |
|
^^^ You might want to look at this. Short form, you're using let improperly; it's meant to be used as 'let <definitions> in <expression>', for creating local bindings. If you're just defining globals, drop 'let' entirely:code:
I'm guessing that you did it this way because you have to use let when declaring functions in ghci; ghci, however, works somewhat differently from ghc, in ways that can be surprising. Unrelated to your question, but as a matter of style, your use of a do block for what should be pure-functional code (and if-else for a short expression) drove me kind of bonkers until I rewrote it as: code:
code:
Coasterphreak posted:Okay, I've got a small question. I have a filename that seems to be a hash value, in hex. Is there any way I can "decrypt", if you will, the hash and recover the original filename? No. Hashes are not encryption; they can't be reversed to get the original cleartext. If it's a bad hashing algorithm you may be able to get a collision in less-than-fuckyou time, ie, some string that generates the same hash, but you have no guarantees it's the same one used originally (hint: it probably isn't).
|
# ? Feb 9, 2010 06:32 |
|
ToxicFrog posted:No. Hashes are not encryption; they can't be reversed to get the original cleartext. If it's a hash of a filename you could probably reverse it, unless it's a weirdly long and peculiar filename. quote:If it's a bad hashing algorithm you may be able to get a collision in less-than-fuckyou time, ie, some string that generates the same hash, but you have no guarantees it's the same one used originally (hint: it probably isn't). You're blabbing irrelevantly because you like the sight of your own sentence structure. Not even md5 has a workable preimage attack.
|
# ? Feb 9, 2010 06:42 |
|
ToxicFrog posted:^^^ You might want to look at this. Short form, you're using let improperly; it's meant to be used as 'let <definitions> in <expression>', for creating local bindings. If you're just defining globals, drop 'let' entirely: Ahhh excellent. Thanks for this!
|
# ? Feb 9, 2010 08:07 |
|
Coasterphreak posted:Okay, I've got a small question. I have a filename that seems to be a hash value, in hex. Is there any way I can "decrypt", if you will, the hash and recover the original filename? Firstly, are you sure it's a hash of the filename, and if so, why? Do you know how it's hashed? Why do you need to know what the filename is? With no further knowledge of your situation, I'd suggest that it's actually a hash of the file contents. That's what places like Waffleimages and do for storing images, and it's what I do at gbs.fm. You might want to check that possibility. Otherwise, try md5.rednoize.com for both md5 and sha1.
|
# ? Feb 9, 2010 12:30 |
|
shrughes posted:If it's a hash of a filename you could probably reverse it, unless it's a weirdly long and peculiar filename. Can you elaborate on what you mean here? Do you just mean by guessing hash algorithms and cycling through filenames to see if you can generate a match?
|
# ? Feb 9, 2010 13:38 |
|
covener posted:Can you elaborate on what you mean here? Do you just mean by guessing hash algorithms and cycling through filenames to see if you can generate a match? There are sites, like the one I mentioned earlier, that have (presumably) big tables of hashes and strings they correspond to. While a hash can theoretically correspond to any number of strings, in reality they tend to only correspond to one short/meaningful one.
|
# ? Feb 9, 2010 15:05 |
|
Jonnty posted:There are sites, like the one I mentioned earlier, that have (presumably) big tables of hashes and strings they correspond to. While a hash can theoretically correspond to any number of strings, in reality they tend to only correspond to one short/meaningful one. Rainbow tables!
|
# ? Feb 9, 2010 15:17 |
|
shrughes posted:You're blabbing irrelevantly because you like the sight of your own sentence structure. Not even md5 has a workable preimage attack. This may come as a surprise, but md5 is not the only cryptographic hash in existence, although it or sha1 is probably the most common. md4 has had a feasable preimage attack for years, and back in 2004 Kelsey & Schneier were doing some interesting work on conducting preimage attacks on a certain class of n-bit hashes (to which sha1 belongs) in much less than 2^n time. (It's still not fast enough to be useful in general, though). Yeah, if the hash is md5 or sha1 - and it's probably one of those two - you aren't going to be able to do a first-preimage attack yet. But blathering on about how preimage attacks are impossible is patent nonsense.
|
# ? Feb 9, 2010 16:07 |
|
yatagan posted:Rainbow tables! I knew there was a proper name for them! Thanks.
|
# ? Feb 9, 2010 20:35 |
|
Does anyone have suggestions on what's the easiest way to make a small Windows application that can enumerate a list of running programs, then you select that program from a list and take a screenshot of that app's window? Right now I'm trying to do this using Qt and some Windows API functions (EnumWindows but I'm having a lot of trouble. The main problem is that it's not enumerating all windows...
|
# ? Feb 10, 2010 02:14 |
|
Are there any good programming blogs/sites/forums that everyone pretty commonly agrees are worth visiting regularly? I've been thinking about replacing the time I burn on videogame websites with an attempt to learn to program, (I have a teenytiny bit of experience with c++ and visualbasic, thinking of getting into 'processing') and am interested in some sites to get ideas/get me thinking about it in general.
|
# ? Feb 10, 2010 03:13 |
|
Drizzle 34 posted:Are there any good programming blogs/sites/forums that everyone pretty commonly agrees are worth visiting regularly? Aggregators are your best bet. http://news.ycombinator.com/ http://www.reddit.com/r/programming/ Avoid anything written by Atwood or Spolsky.
|
# ? Feb 10, 2010 03:42 |
|
Rocko Bonaparte posted:I chewed on that awhile and am sure you are right. Can you imagine an alternatives that might work? Wavelets? The reason the Fourier Transform approach does this is just because an assumption is that the signal is periodic. If, for example, you had a tonal sound, you could estimate the fundamental frequency, and extrapolate by repeating pitch periods. If you had exponentially decaying noise, it would be a different story.
|
# ? Feb 10, 2010 08:14 |
|
Anyone familiar with SAS? I'm currently working on a homework assignment and can't seem to figure out the last step. It requires renaming a character variable column a into a numeric value. Currently, the labels for the second and third columns are CDF1 and CDF2. I need to change them to 0.00 and 0.05. Since SAS variable names cannot start with a number or contain a special characters like ., I've reached a dead end. I've tried various ways to format them to be read as character values, but haven't had any luck. An explanation of what to do or a hint to put me on the right track would be greatly appreciated.
|
# ? Feb 10, 2010 22:43 |
|
As far as I know there isn't a Fortran thread so I'm posting here. I have a piece of code in a numerical computing program that looks like: code:
code:
e: 1.119 is the correct value, I reconstructed what I was doing in Matlab, and that gives 1.119 no matter which way it's written. UZR IS BULLSHIT fucked around with this message at 03:51 on Feb 11, 2010 |
# ? Feb 11, 2010 03:49 |
|
b(1) = -(5/2)*f(1) + 2*f(2) + (1/2)*f(3) simplifies to b(1) = -(2)*f(1) + 2*f(2) + (0)*f(3)
|
# ? Feb 11, 2010 03:52 |
|
|
# ? Jun 8, 2024 22:03 |
|
Avenging Dentist posted:b(1) = -(5/2)*f(1) + 2*f(2) + (1/2)*f(3) I definitely don't see why that would be the case. edit: although after I check in MATLAB I see that you are correct. Can you explain why it behaves like that? It makes no sense to me. UZR IS BULLSHIT fucked around with this message at 04:00 on Feb 11, 2010 |
# ? Feb 11, 2010 03:57 |