|
Thermopyle posted:While I don't disagree that it's a great thing to learn, I would just say that for many people (especially non-programmers who want to do stuff on their Windows PC) something like AutoIT is going to be more useful. With AutoIT, you get just as rapid iteration (just press F5 in the standard Scite editor), and you can do a shitton of automation on your PC. That's fair, I've never used AutoIT and didn't mean to put it down.
|
# ? Mar 7, 2011 03:05 |
|
|
# ? Jun 7, 2024 17:21 |
|
Hughmoris posted:Thanks for the quick replies.
|
# ? Mar 7, 2011 04:36 |
|
This isn't a programming question per se, but I was hoping to get some opinions on Scheme. More specifically, I'm taking a programming course and the professor is really big on Scheme, data-directed design, etc. The issue is that I don't quite "get" functional programming yet, and a lot of what he says doesn't make sense to me, although he also seems to be bad at articulating stuff which could be part of the problem. Is this something that sees a lot of real-world application, meaning I should suck it up, or is my prof just eccentric? I'm doing the coursework either way, I'm just trying to justify my frustration here.
|
# ? Mar 7, 2011 17:06 |
|
ninepints posted:This isn't a programming question per se, but I was hoping to get some opinions on Scheme. More specifically, I'm taking a programming course and the professor is really big on Scheme, data-directed design, etc. The issue is that I don't quite "get" functional programming yet, and a lot of what he says doesn't make sense to me, although he also seems to be bad at articulating stuff which could be part of the problem. Is this something that sees a lot of real-world application, meaning I should suck it up, or is my prof just eccentric? Pick up the The Little Schemer, I found it a great introduction to recursion, and it is written in Scheme. It's cheap and assumes you have never programmed in a functional language before. It may help fill the gap in your professor's explanations. The concept's in functional programming languages can be applied to non-functional languages, so it is worth-while even if you never program in a formally functional language. Fundamentally functional languages are not like imperative languages, so part of it is a mind expansion thing (look at the same problem from a different perspective). Also Why Functional Programming Matters. litghost fucked around with this message at 18:00 on Mar 7, 2011 |
# ? Mar 7, 2011 17:53 |
|
pr0metheus posted:I am having a weird issue with Visual Studio compiling my project for debugging but then .exe it generates somehow magically becoming "locked" and me being unable to remove it for a few minutes. Then it magically gets unlocked and I am able to remove it. Meanwhile I am unable to recompile or delete the .exe file, so this is highly annoying. I tried program like Lockhunter to get the program which is locking it but even in there it says something like "accessed is denied, ask your admin". I have tried this both in Visual Studio 2008 Express and in Visual Studio 2010, as well as from just using command line cl.exe to compile. In all cases this poo poo seems to happen. What the gently caress is going on? My program is rather simple, all it does is just read in a data file and then do some calculation on it then print out results and exit. This is usually because something in your dev environment is holding onto it. Usually this is because a web project has its own IIS instance running, but the impression I get is that you're doing Windows Forms. Are you just building and running, or debugging? This might sound weird, but you know you have to stop the debug before you can mess around right? If it's not something basic like that, might want to check the timing of your data file access/read in. If it's taking way too long that might have an effect, but you'd probably notice it in the program execution. Lastly, are you closing/destroying the various objects properly when you're done with them? Or possibly accessing the file in too promiscuous a mode (e.g. read/write instead of readonly)? Sorry for all the questions but there's tonnes of reasons this could happen.
|
# ? Mar 8, 2011 00:25 |
|
I'm trying my hand at a web application, but I'm getting caught up in the analysis/design phase. The application will be 3-tier, consisting of a Tomcat server running Java servlets, a MySQL database, and a web UI. The app will let users browse through a directory of books (with each book having its own page) and add books to a list called a "bookshelf". I made a dinky, incomplete workflow diagram, and took my best guess at what a sequence diagram might look like (and wrote some use cases and UML class diagrams)--but I'm not sure what I'm doing. I'm also really not sure of how to depict the book directory. http://i54.tinypic.com/a2w0a1.jpg http://i55.tinypic.com/2dtt8c7.jpg Does anyone have any recommendations for books/online resources I could look into to get a better handle on application design documentation--especially regarding this kind of 3-tier design?
|
# ? Mar 9, 2011 06:44 |
|
Not sure if this belongs here, but I'm sure that some programmer goon out there knows HDL Designer. I'm in the middle of building a serial transmitter in HDL Designer and was just about to get to running my testbench with QuestaSim when suddenly my ieee library decided it was no longer going to exist. The problem is that the library does exist, the files can be read, the mapping is correct, and everything looks the way it should. I've tried deleting my work folders, remaking components from scratch, changing projects, etc. Nothing works. Any ideas? For reference: Every time I try to open anything with QuestaSim, not just the testbench, it gives me the following errors. ** Error: (vcom-11) Could not find ieee.numeric_unsigned. ** Error: I:/lambda/UART/uart_lib/hdl/tcontroller_fsm.vhd(12): (vcom-1195) Cannot find expanded name "ieee.numeric_unsigned". ** Error: I:/lambda/UART/uart_lib/hdl/tcontroller_fsm.vhd(12): Unknown expanded name. ** Error: I:/lambda/UART/uart_lib/hdl/tcontroller_fsm.vhd(14): VHDL Compiler exiting EDIT: Cross-posted to the electronics megathread. Please excuse my incompetence. Jewbert Jewstein fucked around with this message at 02:11 on Mar 11, 2011 |
# ? Mar 11, 2011 00:19 |
|
I don't know anything about HDL Designer myself but you might try also posting your question in the electronics megathread. There are several programmable logic type people who post there that might be able to help you.
|
# ? Mar 11, 2011 01:50 |
|
Is there a Firefox/Chrome addon that automatically translates SA smiley BB code on non-SA pages into actual SA smilies? That would be pretty awesome.
|
# ? Mar 11, 2011 18:25 |
|
Mux posted:Is there a Firefox/Chrome addon that automatically translates SA smiley BB code on non-SA pages into actual SA smilies? That would be pretty awesome.
|
# ? Mar 11, 2011 19:13 |
|
Solr funtime here... we have a schema with a url field, which stores the url. We want to be able to search for a url (Or to ignore entries with a url, if one prefers). The logical thing to do seems to be code:
code:
"www.google.com" "www.somebscompany.com%2Fjust-how-high-do-you-have-to-be-www-google-com-2%2F" "www.somebscompany.com%2Fjust-how-high-do-you-have-to-be-www-google-com-2%2F" The first one's fine... The second two confused me. And the fact that there's only three when there's 3000 known results in the DB that should match leave me absolutely stumped. Is there some sort of weird specifics for searching for urls I don't know about? We've only been working with Solr for a couple weeks.
|
# ? Mar 12, 2011 03:17 |
|
google uses site:https://www.google.com and inurl:https://www.google.com to distinguish between the two cases you could add a site field to your data set
|
# ? Mar 12, 2011 04:16 |
|
Can you clarify what the "two cases" are? And for clarification, the problem we're having is that looking for (essentially) "url = https://www.google.com" is only coming up with one entry that matches and two entries that don't, instead of ten entries that match - And we know that there are at least ten entries in the database that should match.
Beeps fucked around with this message at 04:42 on Mar 12, 2011 |
# ? Mar 12, 2011 04:27 |
|
Has anyone here implemented a silent updater before? I need to make one, so if anyone has any tips, they would be much appreciated. My general approach is going to be to check for updates in the main .exe, and have a separate .exe for the updater that actually downloads and applys the update. Anyone see any problems with that approach?
|
# ? Mar 12, 2011 22:18 |
Dooey posted:Has anyone here implemented a silent updater before? I need to make one, so if anyone has any tips, they would be much appreciated. My general approach is going to be to check for updates in the main .exe, and have a separate .exe for the updater that actually downloads and applys the update. Anyone see any problems with that approach? That'd be pretty much the standard approach yes. Maybe rather have the main EXE do the downloading (in the background), then launch the downloaded updater which just installs itself. Alternatively you could put most of your code (any that could need replacement) into DLLs that get loaded at runtime. Then, when updating, shut down everything except the core that loads the libraries, replace them, and reload. It may or may not be easier to keep user state that way too, if that's something you want to do.
|
|
# ? Mar 12, 2011 22:58 |
|
OK thanks putting everything that needs replacing in .dll seems like unnecessary complexity, so I'll just stick with having the auto-updater replace everything. And if I need to update the updater, I'll do that from the main program.
|
# ? Mar 12, 2011 23:34 |
|
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 |
|
If I'm doing that, why not just have the main program download update.exe, run it, and exit? That seems like a better idea to begin with actually.
|
# ? Mar 12, 2011 23:51 |
|
Dooey posted:If I'm doing that, why not just have the main program download update.exe, run it, and exit? That seems like a better idea to begin with actually. They'll have to download an updater .exe every time they update instead of just whenever the updater needs it. Not that you couldn't solve this by having a launcher for the launcher for the game, I guess, but still.
|
# ? Mar 13, 2011 00:10 |
|
You should not assume that the user running your program has permissions to write to the program.exe. You could stick a UAC prompt on your updater.exe, but not everyone is going to be using this on a home computer where they know the admin password. The most foolproof (and most difficult) way to do it is to write an updater service.
|
# ? Mar 13, 2011 08:35 |
|
Also, Google's updater is open source after various complaints asking what it was doing. On Vista+ it now has a feature to use Windows' Restart Manager to handle updates when the application is still running. http://google-opensource.blogspot.com/2009/04/google-update-goes-open-source.html
|
# ? Mar 13, 2011 15:13 |
|
It's nice that the pastime of crawling up Google's rear end isn't always a waste of time. Also the comments are hilarious.Beeps posted:Can you clarify what the "two cases" are? And for clarification, the problem we're having is that looking for (essentially) "url = https://www.google.com" is only coming up with one entry that matches and two entries that don't, instead of ten entries that match - And we know that there are at least ten entries in the database that should match. He means that in one case, you want all entries with 'google.com' anywhere in the URL and in the other, you just want all entries on the domain google.com and he's suggesting making a column with just the '...server.domain.tld' to make that easier to search for. I can't say why you're having trouble with your query's results without knowing more about what database you're using, but there is a database questions thread around here somewhere. Munkeymon fucked around with this message at 15:38 on Mar 14, 2011 |
# ? Mar 14, 2011 15:27 |
|
Quick question for you guys, I'm trying to install phpmyadmin on a virtual host and I'm having a bit of problems with the whole alias thing. This is what I have in my httpd.conf:code:
Thanks in advance.
|
# ? Mar 15, 2011 03:05 |
|
Okay, so I'm trying to do this N-body gravitational simulation. I have a python script which generates initial conditions, consisting of N masses, positions, and velocities. Right now these just write to an ASCII file. I am trying to pass these initial conditions to Gadget-2, an N-body code. The problem is that Gadget-2 uses a binary file with a particular structure that I don't fully understand. It's described on pages 29-35 of this pdf. So my question is: how can I take my ASCII/python data and convert it into a binary file with this format? I don't know anything about printing binary files with python (and googling doesn't seem to be too helpful either), and I don't know anything about binary file structure so I am not sure what Gadget-2 wants from me. Thanks in advance, and sorry for making you read a bunch to understand my problem.
|
# ? Mar 16, 2011 01:23 |
DontMockMySmock posted:how can I take my ASCII/python data and convert it into a binary file with this format? The struct module is what you want, for reading and producing data in binary formats. Also, Python megathread here pacheco: I'm pretty sure your DocumentRoot should point to a filesystem directory, not a virtual directory. Aliases don't work the way you're trying to use them.
|
|
# ? Mar 16, 2011 01:36 |
|
nielsm posted:The struct module is what you want, for reading and producing data in binary formats. Thanks; also, forgot about the python thread.
|
# ? Mar 16, 2011 04:57 |
|
pacheco posted:Quick question for you guys, I'm trying to install phpmyadmin on a virtual host and I'm having a bit of problems with the whole alias thing. This is what I have in my httpd.conf: This is a Linux question, not programming.
|
# ? Mar 16, 2011 18:00 |
|
I have multiple LEDES 1998B billing files each month that get filled with various companies that handle clients billing for them. http://www.ledes.org/ http://www.ledes.org/documents/1998B/Ledes98B%20Sample%20File-Web.txt It's a simple "|" delimited text file with about 24 fields. Each month I have to manually edit these for various reasons. I use Excel currently to do this. I would like to create a basic gui editor for these files that will open the files, display the fields in a simpler view, and allow me to add a line or edit fields. I want to be able to give the program to the accountant to edit the files so I don't have to mess with it anymore. She's older, and pretty confused outside of her little accounting app. I think this should be a pretty basic programming task so I am going to take this as a reason to learn my first language. I think this all would be possible with Java, and that seems like as good a place as any to begin. Is using Java to accomplish this task a bad idea? Is learning Java as my first language a bad idea? Any recommendation for a good beginners book?
|
# ? Mar 16, 2011 21:00 |
|
Head First Java is a good book and it doesn't take too long to get into GUI stuff.
|
# ? Mar 16, 2011 21:03 |
|
rt4 posted:Head First Java is a good book and it doesn't take too long to get into GUI stuff. I used this a couple months ago to get started with Java. I liked it just fine. The only problem I had was that Java isn't Python.
|
# ? Mar 16, 2011 21:17 |
|
I'm under the impression that building a non-blocking GUI is much easier in Java, in spite of its verbosity.
|
# ? Mar 16, 2011 21:20 |
|
rt4 posted:I'm under the impression that building a non-blocking GUI is much easier in Java, in spite of its verbosity. You're probably/possibly right. I never write GUI stuff, so I'm biased.
|
# ? Mar 16, 2011 21:58 |
|
I'm trying to write a curve fitting algorithm for an exponential function with a constant offset, like f(x) = A*exp(x*B) + C where A, B, and C are the parameters the fitting algorithm is supposed to find given some reasonable starting guesses. The incoming dataset is ~20k (x,y) points. Normally for curve fitting I use a least squared error approach, but the exponential function in f(x) leads to a bunch of transcendental equations with no algebraic solution in this case. My next thought was to use the Levenberg-Marquardt algorithm, but that method requires inverting a matrix, and with 20k points I'd have to do some fancy numerical methods to get it to happen quickly which would be a whole project in itself. Are there any other good, simple fitting algorithms for this kind of function?
|
# ? Mar 17, 2011 03:39 |
|
What are you writing in? There's a lot of high-quality numeric code out there that you might be able to just use.
|
# ? Mar 17, 2011 04:26 |
|
I'm writing it in C#, if there is a library out there that could help I'd be willing to check it out on the condition that it can be used for commercial applications.
|
# ? Mar 17, 2011 04:59 |
|
PDP-1 posted:I'm trying to write a curve fitting algorithm for an exponential function with a constant offset, like For a simple fit, if you can determine C (ie set it to zero or mean(y)), then you can just take the log of both sides and get log(y-C) = log(A) + B*x, which is a nice simple linear regression. Because the linear regression is so simple, you could also just brute force C. There are probably better ways, but this could be a start. Oh, and for solving big inversions, there is LINPACK (free), LAPACK (also free), or IMSL (cost money). Hey look, IMSL has a .Net version. IMSL also has fitting methods, see regression section. Also R should probably be able handle doing the regression directly. litghost fucked around with this message at 06:10 on Mar 17, 2011 |
# ? Mar 17, 2011 05:52 |
|
In general I don't know the value of the constant C, it is a function of how the experiment producing this data is set up and will vary from measurement to measurement. The value of C is also 'big' in the sense that it accounts for about half the amplitude of the total signal so I can't just approximate it as zero. Whatever fitting algorithm I end up with will need to be able to solve for all three parameters independently. I'll check out the libraries you mentioned later today - it looks like LINPACK/LAPACK can be used as long as you give credit to the folks who wrote it and that'd be fine with me. If I can plow through the documentation and get the libraries to hook into .NET this might be a solution. I'm sure R could do the fitting, or for that matter I could just brute-force it with the Solver function in Excel, but I'd really like to integrate the curve fit into my program so the scientists working on this project can twiddle the knobs and settings on the system and watch the values change in near real time. Thanks for the suggestions so far, and keep 'em coming. semi-edit: I really only care about the value of B, the constants A and C are essentially throw-away fitting parameters. I could take the numerical derivative of f(x) which would get rid of the constant term and then do a semi log fit to df(x)/dx=A*B*exp(B*x) and get B from the slope of that line. Good idea or bad idea?
|
# ? Mar 17, 2011 14:49 |
|
PDP-1 posted:In general I don't know the value of the constant C, it is a function of how the experiment producing this data is set up and will vary from measurement to measurement. The value of C is also 'big' in the sense that it accounts for about half the amplitude of the total signal so I can't just approximate it as zero. Whatever fitting algorithm I end up with will need to be able to solve for all three parameters independently. Taking numerical derivatives are a tricky thing. Is your data evenly spaced with respect to x? Is it actually differentiable? What about handling drop outs and outliers? For an automatic system you probably don't want to do any derivatives unless you are sure your data is well behaved. I guess at this point you might want to implement the iterative method you had talked about, maybe getting your initial guess by setting C=0 and doing the linear fit. litghost fucked around with this message at 16:18 on Mar 17, 2011 |
# ? Mar 17, 2011 15:53 |
|
Anyone have a link to the updated Rock Scroll Visual Studio plug-in that adds a bunch of new features? I can only find the old one: http://www.hanselman.com/blog/IntroducingRockScroll.aspx edit: I think I found it, MetalScroll: http://code.google.com/p/metalscroll/ Chainclaw fucked around with this message at 18:14 on Mar 17, 2011 |
# ? Mar 17, 2011 17:24 |
|
|
# ? Jun 7, 2024 17:21 |
|
What's the best Linux distro for someone just getting into programming in the *nix environment? Learning curve is not an issue. An important factor is the authenticity of the experience. Aside from those two factors, I don't have any other criteria for differentiation among distros. Please suggest. Fedora has been recommended. I will be tri-booting on a Macbook Pro. Or maybe running as a VM in Windows.
|
# ? Mar 18, 2011 07:06 |