|
I like that the first item on the list is recursion. I mean I'm all for courses being challenging but in an introductory course? Seems like that could scare a lot of people.
|
# ? Mar 29, 2011 17:09 |
|
|
# ? May 15, 2024 08:27 |
Jam2 posted:Does this summer course seem worthwhile? have to agree, it'll either be so basic it's worthless, or will practically kill you. But if it's the latter, you'll be well prepared for later classes, so I'd say what the hell, unless it's money you really need for something else.
|
|
# ? Mar 29, 2011 17:13 |
|
rolleyes posted:Yep. I was already vaguely aware that it had caused some arguments, which ShoulderDaemon has pointed out the info about. I guess OSS licenses can become a bit of a minefield when you've got open and closed source programs provided by multiple parties interacting together on a consumer product which is then sold through yet more parties. So on top of that minecraft made a lot of money and it was built on an opensource library with the MIT license. So is he getting sued?
|
# ? Mar 29, 2011 19:32 |
|
Physical posted:So on top of that minecraft made a lot of money and it was built on an opensource library with the MIT license. So is he getting sued? Why would he be sued? Works licensed under MIT can be used in commercial applications as long as the original author's name is kept in the code along with the body of the license. It's one of the most permissive licenses around.
|
# ? Mar 29, 2011 19:51 |
|
Bob Morales posted:It'll either kill you or be so basic that you won't gain much from it. What school is that at?
|
# ? Mar 29, 2011 20:03 |
|
I'm trying to help a friend with the tedious task of adding a bunch of contacts to outlook. He needs to add some occupational therapists from here: https://secure.alinity.com/acot/webclient/registrantdirectory.aspx I thought if I could just get the raw data, I could write a parser to translate it into a format compatible with outlook's import function. The problem I'm having is that the actual information is brought up with a javascript.ModalPopupOpen function, and I have no idea how to page scrape that data. To see what I'm describing, just go to the link above, click on the search icon while leaving the textboxes empty, to receive all 1000 records. Then go about 8 pages in and click "view details" on a record (the records on the first 7 or so pages don't have enough information to be valuable). All I need to know is how to get at the raw data; it doesn't need to be pretty / cleaned up. Is this feasible?
|
# ? Mar 31, 2011 20:01 |
|
Nahrix posted:The problem I'm having is that the actual information is brought up with a javascript.ModalPopupOpen function, and I have no idea how to page scrape that data.
|
# ? Apr 1, 2011 05:20 |
|
Yeah, I assumed there wouldn't be any privacy issue if the information was publicly available on the site like that. I'll admit that I'm no lawyer, so I can't say for sure. If anyone here thinks that there's a problem with it, just let me know. Edit: N.Z's Champion - Thank you for showing me about that embedded iframe. Learning something new about how a page design works is a lot more important to me than doing this favor, so thanks for that Nahrix fucked around with this message at 06:06 on Apr 1, 2011 |
# ? Apr 1, 2011 05:50 |
|
If I am getting a variable from the URL, can I POST that variable through a form? i.e. just have the form send that variable along with whatever the user enters
|
# ? Apr 2, 2011 01:28 |
|
Could you rephrase that?
|
# ? Apr 2, 2011 01:35 |
|
rt4 posted:Could you rephrase that? I can try but I don't particularly know what I'm doing so it's sort of difficult. I have a page where you can click a link and it will append a variable to the URL, and then I just use GET to use that variable in the page. But I also want to pass that variable to a PHP script in a separate file, along with whatever the user enters in a form.
|
# ? Apr 2, 2011 01:40 |
Make a type="hidden" field in your form, that contains the GET variable's contents as well.
|
|
# ? Apr 2, 2011 02:12 |
|
nielsm posted:Make a type="hidden" field in your form, that contains the GET variable's contents as well. This is it, thanks!
|
# ? Apr 4, 2011 03:44 |
|
wicka posted:This is it, thanks! Make sure you watch out for people manually entering this: code:
|
# ? Apr 4, 2011 15:35 |
|
Does anyone know of any places I could find articles about the time/effort/whats involved in changing program languages? I need something decently source-able.
|
# ? Apr 4, 2011 23:44 |
|
Oxyclean posted:Does anyone know of any places I could find articles about the time/effort/whats involved in changing program languages? What do you mean changing program languages? Porting existing software to a new language?
|
# ? Apr 4, 2011 23:45 |
|
Yeah is this: A)Training someone (e.g. you) to use a new language? or B)Transporting a project from one language to another? Regardless it'll be useless without knowing the language(s) involved, and the industry/application involved.
|
# ? Apr 4, 2011 23:53 |
|
Thermopyle posted:What do you mean changing program languages? Sorry, I meant like learning new languages. I have to write a proposal for a "solution to an existing problem" for one of my classes, I went with something to the degree of some sort of intelligent development tools that help you go between programming languages. It's a bit of a fluff course, but I need something to source to show that there's a problem, and the solution is realistic and I'm certain there's some sort of statistic of that poo poo out there. e: I'm just sort of looking for general studies/articles that would support the fact it's an issue of some degree.
|
# ? Apr 4, 2011 23:54 |
|
Do you have access to Ebsco or does your university library have a computer science section? Those ought to yield better results than a forum for such an academic topic.
|
# ? Apr 5, 2011 00:04 |
|
Is there an assembly thread anywhere here? I might have some questions on stuff.
|
# ? Apr 5, 2011 01:45 |
|
baku posted:Is there an assembly thread anywhere here? I might have some questions on stuff. There's a thread where someone's doing a let's play ARM assembler on the Nintendo DS, maybe there's enough assembler folk there paying attention to help you out. Otherwise I don't recall seeing one anywhere.
|
# ? Apr 5, 2011 07:41 |
|
I've been working on the rather daunting task of organizing a ~120GB music library. I've used various utilities and have already pruned it down to about 80, removing duplicates and stuff completely lacking metadata or folder structure (and stuff I've literally never listened to), and where I am now is that I have quite a few instances of songs within a given folder that are available in .wma, .mp3 and .m4a format or some subset. I don't want to wholesale delete any given format, though, since there are some albums I only have in X or Y or Z. Is there a decent way to write a bash script to recursively go through each folder and delete two of the three, if the third is there? Else it'll be python time. I like turtles fucked around with this message at 08:09 on Apr 5, 2011 |
# ? Apr 5, 2011 08:07 |
|
I like turtles posted:I've been working on the rather daunting task of organizing a ~120GB music library. In the time it takes you to do it in bash, you can probably do it in python / perl if you know the languages.
|
# ? Apr 5, 2011 09:14 |
|
Okay, I am rubbish at C, and even worse at googling for C help. Can anyone point me to some nice tutorials about arrays and pointers and C in general? Other than that, I do have a specific question. Why does this not seem to work? I think I need to clear the array somehow, but every technique I've found so far has failed me. It prints out the correct value for some of the retrieved arrays, and a different value for others. Here's a simplification of my code: code:
slotbadger fucked around with this message at 16:15 on Apr 5, 2011 |
# ? Apr 5, 2011 15:51 |
slotbadger posted:Can anyone point me to some nice tutorials about arrays and pointers and C in general? Arrays in C don't carry their allocated size, except as far as the compiler can see at compile-time. In this case, your wordArr is a parameter to the function, and doesn't carry any size. It's just a pointer to one or more unsigned shorts. So sizeof(wordArr) doesn't give what you expect it to. If you want to know the size or length of an array passed into a function, you also need to pass the size as a separate parameter, or pack the array + metadata into a struct, which you can then pass. In this case, you'd also be overrunning the tempArray arrays' lengths in the memcpy(), because if the sizeof(wordArr) operator gave what you expected you'd be copying 32 bytes from the source array, regardless of how long it is. What happens when you copy 32 bytes from a 10 byte source? You get 22 bytes of garbage from the end, or an access violation if you're lucky. It's worth remembering that the sizeof operator is resolved at compile time, it translates into a constant in the machine code. You can only measure sizes that are known at compile time. Edit: Why is your function called getContents() when it doesn't return anything? I'd use the word "fill" rather than "get", in this case. nielsm fucked around with this message at 16:29 on Apr 5, 2011 |
|
# ? Apr 5, 2011 16:27 |
|
nielsm posted:Arrays in C don't carry their allocated size, except as far as the compiler can see at compile-time. You're right about the function name. It was initially intended to return an array of bytes, but that didn't seem possible in C. So I decided to update by reference and switched it to use unsigned shorts as I'm working in 2-byte words anyway. This is only intended as a way to access some test data, and help me build up a bit of C knowledge. I suppose the most straight-forward thing to do is maintain a set array size of 16, and copy that over every time, padding with 0s at the end? Or will that still prove problematic? I might be going about this in completely the wrong way too, which is why I wouldn't mind pointing towards any good tutorials. Thankyou for your help.
|
# ? Apr 5, 2011 16:42 |
slotbadger posted:You're right about the function name. It was initially intended to return an array of bytes, but that didn't seem possible in C. So I decided to update by reference and switched it to use unsigned shorts as I'm working in 2-byte words anyway. If you want to pass back an array of bytes, your return value is actually a pointer to the first value in the array. If your size isn't predefined, you'll also need to pass a size argument by reference in order to get back the size of the array, or pass back a struct which includes both. The #1 difficult thing to wrap your head around when going from a modern language back to C is that unless you are working with a struct, you are working with a primitive. You don't pass around an array, you pass around a pointer to the first object in an array. You can then play with that pointer to get the other objects in the array, but all you are passing around is literally an integer that you are treating as a pointer.
|
|
# ? Apr 5, 2011 17:19 |
|
What are some good algorithms to use for finding nearby places on a globe? Let's say you are given some random latitude and longitude coordinates, and you want to find every place of interest in a 5 or 10 mile radius. This is a SQL database and there are 690,000 sets of coordinates (locations), and the idea would be to present to the user the ones within the 5 or 10 mile radius, without having to step through the whole database (which is being done now...) select * from waypoints where function_regarding_my_location <= function_regarding_the_waypoints_location My first thought is to subdivide the map into squares, but since it's a globe and not 2D, you have to compensate that the squares aren't square and change shape quite a bit depending on how far from the equator your are. I think the current suggestion is something like: select * from waypoints where lat between 53.4716971079 and 53.7594668920 and lng between -74.4356778876 and -74.0587461123
|
# ? Apr 5, 2011 22:26 |
|
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 |
|
I have a plugin for an existing program, and I need to automate the install of the plugin for distribution. The process is: Download Plugin.dll Open elevated command prompt if UAC is enabled Run %programfiles%\Common Files\Vendor\Register.exe /s fullpathto\Plugin.dll (or %programfiles(x86)%, depending on the OS) Relying solely on instructions is a bit of a pain due to most people having no clue about whether they are running 32 or 64 bit, not to mention elevated command prompts. I'm not supposed to spend too much time on this, and it should be very easy for the programmer to update without me. What would you recommend? A batch script run elevated, distributed in a zip file with the dll? NSIS? Suck it up and have long instructions?
|
# ? Apr 5, 2011 23:52 |
|
Bob Morales posted:What are some good algorithms to use for finding nearby places on a globe? This is actually a relatively big question that a lot of people have spent time trying to answer. There's a few goodish solutions out there but no silver bullets. A lot depends on your set up, the data, the criteria, etc. This stackoverflow link has some good links, but I didn't read them in detail: http://stackoverflow.com/questions/3740657/whats-a-good-algorithm-for-nearest-neighbour-problem-in-two-dimensions There is a GIS goon who pops up in these threads but I can't remember his name.
|
# ? Apr 6, 2011 00:44 |
quackquackquack posted:I have a plugin for an existing program, and I need to automate the install of the plugin for distribution. A proper installer, I'd say. Personally I prefer Inno Setup, I like its declarative style over the more procedural style of NSIS. A working installer shouldn't take a long time to write and requires very little maintenance. When making a new release, if there aren't any new files to distribute, and the installation procedure hasn't changed otherwise, you'll just need to increment the version number in the installer source and click Build Installer again. (After dumping the updated Plugin.dll and other files where the setup compiler looks for them.)
|
|
# ? Apr 6, 2011 01:21 |
|
Bob Morales posted:What are some good algorithms to use for finding nearby places on a globe? Seconding the database GIS extensions suggestion, if it's an option, as it would make a radius based query pretty simple and it would provide some nice indexing options as well. Also, the last query you supplied will break when you hit the 180/-180 longitude line (some info here); and, you'd still need to cull the results anyways since you'd be pulling a bounding decimal degree rectangle for the circle you really wanted (w/ a radius in statute miles). I'm not a GIS expert but there are probably some other non-obvious edge cases that the GIS extensions would handle for you as well. RitualConfuser fucked around with this message at 08:23 on Apr 6, 2011 |
# ? Apr 6, 2011 08:18 |
|
Anyone have any experience with automated tests via selenium? I have a bunch of test cases I'd like to automate but those require changing the date. I can change the server time but that breaks many things so I'd rather not do that. Any ideas? It's Java EE project + tomcat for deployment.
|
# ? Apr 6, 2011 12:43 |
|
nielsm posted:A proper installer, I'd say. Personally I prefer Inno Setup, I like its declarative style over the more procedural style of NSIS. Holy poo poo, thank you. I'm not sure how I missed this in all of the times I have gone out looking for an installer creator.
|
# ? Apr 7, 2011 22:30 |
|
nielsm posted:A working installer shouldn't take a long time to write and requires very little maintenance. It's really easy with CPack and NSIS, it's just that NSIS doesn't have a native 64-bit version to target installs in Program Files instead of Program Files (x86). It was pretty much the following at the end of CMakeLists.txt code:
code:
|
# ? Apr 8, 2011 03:43 |
|
In years of programming this has never come up until now, but do #define statements work in main.c/main.m (using ObjC)? I started getting suspicious when GLEW_STATIC wouldn't be recognized unless it was declared inside an included or imported header, but this latest problem has me sure that they don't. Windows.h (or at least its included headers) change their types and declarations if you're using ObjC (they look for __OBJC__), but the ObjC library headers don't declare this as they actually look for it themselves (depending on the compiler, some functionality may already be implemented). This isn't a big deal as it just means you need to define __OBJC__ some point after <objc/objc.h> but before <windows.h>, but declaring this in main makes no difference and the compilation fails. Add it into objc.h or into any other header imported in between those two though, and it is immediately recognized.
|
# ? Apr 9, 2011 19:00 |
|
Bob Morales posted:What are some good algorithms to use for finding nearby places on a globe?
|
# ? Apr 9, 2011 19:19 |
|
If you're already using latitude and longitude to store the locations, why can't you just calculate the range of lats and longs that will be within your search radius? 1* of lat/long = 60 minutes 1 minute lat/long = 60 seconds Length of latitude changes by about 1% from the poles to the equator, and averages out to about 69 miles/degree, or ~1.917 * 10^-2 miles/second. You can calculate the length of longitude using: (PI / 180) * alpha * cos (beta), where alpha is Earth's equatorial radius (6,378,137 m - ~3963.19 miles). beta is equal to b/a * tan(theta), where b/a = 0.99664719, and theta is your longitude in degree decimal format. Put it all together, you get: (PI / 180) * 3963.19 mi * cos(0.99664719 * tan(theta)). I'm assuming you're already storing your coordinates in decimal format, but its very easy to convert if you aren't already. Putting these calculations together, you can find the range of latitude and longitude from your position that will fall within your specified range, and just filter the database for coordinates that fall within that range.
|
# ? Apr 9, 2011 20:15 |
|
|
# ? May 15, 2024 08:27 |
|
Let me start off by saying I am completely unfamiliar with programming, and anything outside of Windows, so I might be using some terms incorrectly, but... I am doing research for my university and need to use a program that was designed for use on UNIX systems, however I am using a windows machine. The IT department has been no help so I am going to try and compile it into an .exe myself. The source code comes in a .tar.tgz file. The website where the download can be found is here. It says that it requires "Requires Fortran 77, C compilers, windowing support." but I am still a little unsure of what exactly I should download. I basically want to have a .exe file that will open a command window where I can use the program. The same guy who wrote the program has a different program very similar to it, that was compiled into a .exe by somebody else, so it should be possible. If someone could at least tell me what specifically I need to download, I could probably figure it out. I am just completely lost as of right now and I feel like this is the most basic poo poo for somebody who knows anything about programming. Thanks guys.
|
# ? Apr 9, 2011 23:37 |