|
I'm in the process of learning QT and I have a question about installing and building qt from source. I just installed the QT SDK and it came with some precompiled versions of QT (4.8.1). My plan is to build a static and a dynamic version of QT 4.8.2 (either using MVSC or MinGW or both) directly from the source code. When I download the source from here I have to install the library before I can compile it. My question is can I build multiple versions from one install? I didn't see a way to do this because whenever I compile it builds the files in the default directory specified by the install path. If I compile it with different options it overwrites the previous build. The way I'm getting around this now now is to install it multiple times but that doesn't quite seem like the best way to go about it. Is there a way just to obtain the files I need to compile without having to do an install? How do I go about building different versions with one copy of the source? Also, after each build the directory is huge (2-5 GB). Is there any way to remove the unneeded files after compilation? My QT directory is already 20GB and I haven't even written any programs yet. I'm a little confused about all this so I would appreciate any clarification!
|
# ? Jun 19, 2012 15:05 |
|
|
# ? Jun 8, 2024 22:25 |
|
SirPablo posted:I'm interested in doing some research on determining a person's worldscope. By worldscope I mean the rough physical area of the earth that their life covers (work, play, living, etc.). For example, Joe's worldscope is confined to 30 miles within the center of Oklahoma City, OK - he lives and works there, seldom leaves, and most of his friends/family are there. Now I'd like to write some code to do figure this out for me, my question isn't really with the code but with what kind of data could I use and how do I get it. A couple of ideas would include analyzing a person's Facebook friends list, their check-ins via Facebook/Foursquare, and locations that they tweet from. However, I have very little idea how to obtain those data, if it is even possible. Alternatively, you could show them weather forecasts at given distances/directions from their current location and learn what they care about that way.
|
# ? Jun 19, 2012 18:05 |
|
code:
code:
|
# ? Jun 19, 2012 18:05 |
Thermopyle posted:
Latter. The two functions could then share some common helper functions, but my own experience with that kind of boolean switches for a function's function is that it quickly gets out of hand.
|
|
# ? Jun 19, 2012 18:13 |
|
There's no hard and fast rule, but the second option will often result in methods that are themselves shorter and simpler.
|
# ? Jun 19, 2012 18:17 |
|
You're going along, reading some code in a method. You come across doFrobAndGrobOrYob(myVar, 3, true, false). Quick, are we Grobbing or Yobbing?
|
# ? Jun 19, 2012 18:27 |
|
That depends on if I'm supposed to read that as "Frob and (Grob or Yob)" or "(Frob and Grob) or Yob"
|
# ? Jun 19, 2012 18:29 |
|
het: obviously we should solve this by permitting parentheses in identifiers.
|
# ? Jun 19, 2012 18:32 |
|
Congratulations, you guys picked the right answer (aka, the one I prefer).
|
# ? Jun 19, 2012 18:36 |
|
Thermopyle posted:
This isn't as bad if you have named parameters. code:
|
# ? Jun 19, 2012 18:38 |
|
Zhentar posted:You're going along, reading some code in a method. You come across doFrobAndGrobOrYob(myVar, 3, true, false). Quick, are we Grobbing or Yobbing? doFrobAndGrobOrYob(myVar, 3, DO_FROB | DO_GROB);
|
# ? Jun 19, 2012 19:19 |
|
The correct answer is obviously dependency injection.
|
# ? Jun 19, 2012 19:36 |
|
Internet Janitor posted:het: obviously we should solve this by permitting parentheses in identifiers.
|
# ? Jun 19, 2012 19:39 |
|
pokeyman posted:This isn't as bad if you have named parameters. Does a language like Obj-C change the answer? Where the message is: code:
|
# ? Jun 19, 2012 20:48 |
|
I call those named parameters for the purposes of this discussion :-)
|
# ? Jun 19, 2012 21:38 |
|
I need to make an installer for a Windows program, some DLLs, and a device driver. Last time I made an installer was something like 8 years ago. I used the tools included with Visual Studio that time, and I remember it being somewhat of a bitch. I imagine things have changed somewhat since then. What is the best toolkit/installer creator to use these days?
|
# ? Jun 20, 2012 17:53 |
|
I'm using CPack (CMake) and NSIS, luck has it there has been work on a 64-bit fork recently too. WiX looks like way too much work, although Google seem have got it integrated with Gyp. MrMoo fucked around with this message at 17:59 on Jun 20, 2012 |
# ? Jun 20, 2012 17:56 |
|
I'm getting an http 405 error (method not allowed) using an application's REST inferface. I'm trying to POST, which the API guide says is allowed, and POST is included in the Allow header of the error page I get. As a developer, is the onus upon you to implement all the methods you want a resource to handle, or does that header get built automatically from the implemented methods? Basically I guess I'm asking if I'm doing something wrong (very possible) or if the devs didn't actually implement POST for this resource, despite all other indications (also very possible).
|
# ? Jun 20, 2012 17:56 |
|
MrMoo posted:I'm using CPack (CMake) and NSIS, luck has it there has been work on a 64-bit fork recently too. I do need to support 64-bit windows as an install target, but do I actually need a 64-bit installer for that? Is the Windows Installer (.msi) stuff a bad way to go? Or do the 3rd party install systems use Windows Installer under the hood? (I am totally dumb about installers)
|
# ? Jun 20, 2012 18:07 |
|
NSIS is a totally separate system from the Windows installer framework. It's free, it has very little overhead, and it comes with a more robust programming language than most other installers (as of a few years ago, anyway). It's definitely worth taking a look at.
|
# ? Jun 20, 2012 18:30 |
|
I'd highly recommend using the Windows Installer framework. NSIS does not handle upgrades that well; Windows Installer has a versioning system for various resources (files, registry keys) that just works. It will delete stale resources (by default) if they're no longer in the bundle, NSIS won't.
|
# ? Jun 20, 2012 18:44 |
|
I was also looking at Innosetup, but it does not use the Windows Installer framework either. Anyone used Advanced Installer? It gets some positive mentions on SO and uses Windows Installer framework.
|
# ? Jun 20, 2012 18:54 |
|
taqueso posted:I do need to support 64-bit windows as an install target, but do I actually need a 64-bit installer for that? You need a 64-bit installer for registry keys not to be re-routed to WoW6432Node. http://en.wikipedia.org/wiki/WoW64
|
# ? Jun 20, 2012 19:07 |
MrMoo posted:You need a 64-bit installer for registry keys not to be re-routed to WoW6432Node. I'm quite sure you can do something to explicitly get a process marked as "WoW32-aware", which means that all the redirection stuff is disabled.
|
|
# ? Jun 20, 2012 19:13 |
|
I have a (large) set of objects that is spread out in one dimension. Each has a stop and start coordinate. I've just got them in an array (or sometimes an ordered python dictionary) right now, but to select every objects with coordinates that overlap a certain region on the axis is an O(n) operation, just checking every object until I find one on the far side of the region, which is starting to seriously slow things down. I am having trouble thinking of a data structure I'm familiar with that will let me easily do this, or else a search method that would be faster. Is there something I just haven't heard of that would be right for this?
|
# ? Jun 20, 2012 22:59 |
|
OnceIWasAnOstrich posted:I have a (large) set of objects that is spread out in one dimension. Each has a stop and start coordinate. I've just got them in an array (or sometimes an ordered python dictionary) right now, but to select every objects with coordinates that overlap a certain region on the axis is an O(n) operation, just checking every object until I find one on the far side of the region, which is starting to seriously slow things down. I am having trouble thinking of a data structure I'm familiar with that will let me easily do this, or else a search method that would be faster. Is there something I just haven't heard of that would be right for this? Interval tree or segment tree.
|
# ? Jun 20, 2012 23:08 |
|
Moos3d posted:Interval tree or segment tree. This is perfect, I'm really looking forward to taking an actual programming course above my high school classes in grad school so I can [hopefully] be exposed to more stuff like this.
|
# ? Jun 20, 2012 23:12 |
|
ultrafilter posted:NSIS is a totally separate system from the Windows installer framework. It's free, it has very little overhead, and it comes with a more robust programming language than most other installers (as of a few years ago, anyway). It's definitely worth taking a look at. It is really loving sad that NSIS, with its scripting language that "combines the best elements of PHP and assembler" (in the words of the developers), is one of the better options out there. Unless they've overhauled the scripting environment to be less of a total clusterfuck since last time I looked at it?
|
# ? Jun 20, 2012 23:15 |
ToxicFrog posted:It is really loving sad that NSIS, with its scripting language that "combines the best elements of PHP and assembler" (in the words of the developers), is one of the better options out there. I haven't actually used NSIS, but from the installers I have seen made with it, it's horrible. InnoSetup has sane defaults and you only need to use its scripting (Pascal dialect) if you need to do unusual checks or things like conditional upgrades.
|
|
# ? Jun 20, 2012 23:48 |
|
Is there any way when I run a git diff (or any other git command for that matter) to have it print out everything? Right now if your diff goes on for too long it makes you hit a key to continue. I would like to not have to do that.
|
# ? Jun 21, 2012 01:25 |
|
Strong Sauce posted:Is there any way when I run a git diff (or any other git command for that matter) to have it print out everything? Right now if your diff goes on for too long it makes you hit a key to continue. I would like to not have to do that. http://stackoverflow.com/questions/2183900/how-do-i-prevent-git-diff-from-using-a-pager
|
# ? Jun 21, 2012 01:44 |
|
Doctor w-rw-rw- posted:Dude. Top google result for "git diff don't less". Couldn't figure out what to Google for. Thanks.
|
# ? Jun 21, 2012 01:48 |
|
Large complicated diffs are one of the very few things for which I use a GUI program. You can use git diftool with something like kdiff3, or a full-featured program like SmartGit. I really liked SmartSVN in the distant past, and I occasionally fire up SmartGit for its interactive conflict solver.
|
# ? Jun 21, 2012 03:03 |
|
I have a directed graph (don't confuse me for a smart person, I picked the terminology up from Wikipedia) and I need to jump to a node and go on every outward-facing edge and run a function on that node and do the same thing to that one. I get the idea of running a recursive function on each node, but I don't know how to deal with cycles. It would be a simple special case, but I don't know how to detect cycles.
|
# ? Jun 21, 2012 04:17 |
|
Sinestro posted:I have a directed graph (don't confuse me for a smart person, I picked the terminology up from Wikipedia) and I need to jump to a node and go on every outward-facing edge and run a function on that node and do the same thing to that one. I get the idea of running a recursive function on each node, but I don't know how to deal with cycles. It would be a simple special case, but I don't know how to detect cycles. Store a boolean for each node. Initialize it to false, and when you first visit the node, set it to true. Don't recurse if it's true when you get there.
|
# ? Jun 21, 2012 04:29 |
|
Sinestro posted:I have a directed graph (don't confuse me for a smart person, I picked the terminology up from Wikipedia) and I need to jump to a node and go on every outward-facing edge and run a function on that node and do the same thing to that one. I get the idea of running a recursive function on each node, but I don't know how to deal with cycles. It would be a simple special case, but I don't know how to detect cycles. If the objects can be keys, keep a set of them around (let's call it "seen") and check them. Note that this is stateful. EDIT: the above solution makes just as much if not more sense.
|
# ? Jun 21, 2012 04:30 |
|
Lysidas posted:Large complicated diffs are one of the very few things for which I use a GUI program. You can use git diftool with something like kdiff3, or a full-featured program like SmartGit. It's not even necessary very large diffs, git makes you press a button even if the diff is less than a page. Just annoying cause I often forget and it messes with my typing.
|
# ? Jun 21, 2012 06:31 |
|
Strong Sauce posted:It's not even necessary very large diffs, git makes you press a button even if the diff is less than a page. Just annoying cause I often forget and it messes with my typing. Either you're not using less, or you've set the LESS env var to something that doesn't contain F.
|
# ? Jun 21, 2012 08:16 |
|
I have this little program that currently outputs files in an ASCII format. However, the customer that this was designed for is now asking that the results are outputted to either .XPS or .PDF, so the files could be sent out and be at less risk of tampering. My question is thus: is there an easy way to print to .xps from within the dos prompt? I've tried the most basic print commands, but it looks like it just sends the text file to the printer's 'spool' (my C: drive) Thanks for the help!
|
# ? Jun 22, 2012 03:29 |
|
|
# ? Jun 8, 2024 22:25 |
|
stubblyhead posted:I'm getting an http 405 error (method not allowed) using an application's REST inferface. I'm trying to POST, which the API guide says is allowed, and POST is included in the Allow header of the error page I get. As a developer, is the onus upon you to implement all the methods you want a resource to handle, or does that header get built automatically from the implemented methods? Basically I guess I'm asking if I'm doing something wrong (very possible) or if the devs didn't actually implement POST for this resource, despite all other indications (also very possible). At a raw http level, you can shove whatever you want in the Allow header. I could claim my endpoint implements the 'PARTY' method. At a framework level you'd hope these would have some sort of constraint placed on them that verifies the Allow header in a 405 return isn't a filthy liar, but most frameworks are crap. In short, it's probably the API devs, not you.
|
# ? Jun 22, 2012 07:39 |