The Big Programming Thread - Page 647
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
Nesserev
Belgium2760 Posts
| ||
catplanetcatplanet
3829 Posts
On July 05 2015 17:29 Nesserev wrote: Both make and cmake are tools that allow a developer to write a 'script' (makefile) that can be used to build/manage projects (and other functionality) in an easy portable way. For example, when a project starts to grow larger, compiling and linking all those files manually from the commandline would become unmanageable. Instead, you could write a simple makefile that acts as a recipe, in which you state which files are involved, what settings you want to use, etc. And, then you simply use 'make build' to build your project, instead of doing everything manually. It also allows you to implement your own 'commands', for example: - make build -> builds the project - make clean -> removes all object files and executables - make test -> builds the tests of the project ... Here's an old example of a makefile that I used:
Now, if someone wants to build your project or do other stuff, he/she just has to use 'make', 'make clean', ... cmake is a more modern version and portable version of make, and has some built-in features: - automatically detects which files have to be recompiled, and which don't - detection for whether or not a certain library is installed or available - cleaner syntax, with recursive cmake files that allow for easy plug-and-use - etc. So, I would recommend taking a look at cmake, and doing the tutorial on their website. thank you very much—this helped me better understand what i was doing when i was building the libraries. thanks to you guys I have managed to build, compile and link libraries for the first time! it took me forever to figure out the process for xcode but now the example opengl code runs and I can finally code. ![]() | ||
phar
United States1080 Posts
On July 03 2015 11:25 Blisse wrote: the nested for loops costs about as much as the contains operations turns out it was probably the algorithm efficiency, nested for loops are bad. we figured out a more effective solution, i'll share after the deadline passes if y'all are interested because it's actually pretty neat n^2 is a bitch, especially if you were doing O(edge) algo not O(node). Glad to hear you sorted it out. | ||
nunez
Norway4003 Posts
![]() i am working on a little program for capturing and editing image sequences via xlib (GetImage), and outputting to memeable format. this is taken at 40ms / frame from vlc, saved as gif. movie is conspirators of pleasure, that guy is actually having the time of his life. hopefully will finish it within the week (only a sideproject), and will post source. | ||
Nesserev
Belgium2760 Posts
| ||
nunez
Norway4003 Posts
OOP was more fitting than bad interface. the most fitting might be: 'bad OOP interface, unexpected use case'. + Show Spoiler [#ifdef _MANAGED] + ![]() bahaha, same movie. | ||
sabas123
Netherlands3122 Posts
On July 05 2015 22:55 catplanetcatplanet wrote: thank you very much—this helped me better understand what i was doing when i was building the libraries. thanks to you guys I have managed to build, compile and link libraries for the first time! it took me forever to figure out the process for xcode but now the example opengl code runs and I can finally code. ![]() here is a good make tutorial I found. | ||
Blisse
Canada3710 Posts
biggerNeighbours is an adjacency list where all the values in the adjacency list have larger values than the vertex i.e. 1 -> 2 3 4 5 2 -> 3 4 5 not 2 -> 1 3 4 5 the sorted ordering means we can use two "pointers" to find all the common elements, which would be more space-efficient than nested for loops or hashing. hashing is what we had before and is theoretically faster, but not in reality.
| ||
WoolySheep
Canada82 Posts
I have a bunch of questions for you, but I think I will just ramble so you can get some context. I'll bold my questions in my ramble. About me: I am a Java/C++ developer and have dabbled in HTML and CCS, JavaScript off and on. I really enjoy writing code, but I know a lot of companies use frameworks, drag and drop, etc. Goals: I'd like to get into web development and mobile development, but am having trouble finding a natural progression in this field. I'd also like to maintain my own website. Currently made one on wordpress but the free version only lets you pick one type of font? Can anyone recommend the natural progression I should be taking? I found a C# course (this may have no relevance) on Edx that I will probably take up and I just went through the first 3 projects on Dash. I really enjoyed Dash. When I look at job postings for front end developers or android developers, there are so many languages, libraries and frameworks thrown around it makes my head spin and I just decide to go play a video game instead. here is an example requirements I found for a front-end developer: + Show Spoiler + Familiarity with open source CMS (Drupal, WordPress, Joomla) Understanding of Object Oriented Programming (PHP, Java, GO) HTML 5 CSS3 CSS Frameworks (Bootstrap, Foundation, Pure, Gumby) JavaScript MVC Frameworks (Backbone, Angular, Ember) JavaScript Libraries (Underscore, Lo-Dash, jQuery, Q) NodeJS (Express, CommonJS) Project build tools (Gulp, Grunt, Maven) I've only used JavaScript and JQuery (minutely) before. Here is an example of the requirements for an Android developer: + Show Spoiler + Experience programming in Java Experience developing Android native applications and/or libraries are a requirement. A portfolio including source code and screenshots from publicly available projects is ideal Knowledge of the Android API, in particular UI implementation to comply with a strict design, is a requirement Experience programming in other languages aside from Java. Particularly interesting: C++, Scala/Groovy, Haskell, Go, Python Assets Knowing how to design and architect scalable software is a major asset, ie: inheritance, type safety, design patterns, threading and synchronization, modularity, and automated unit tests Experience with cross-platform mobile frameworks such as Appcelerator Titanium and PhoneGap Some experience programming in Java on non-Android platforms Some formal education in the IT sector Again, I have experience in Java, as well as a formal education, but I have not heard of half the stuff they list! If anyone could provide links or a natural progression into these things I would greatly appreciate it. | ||
Acrofales
Spain17844 Posts
Web: forget about specific languages, because nobody cares and they change every few months anyway. Learn that on the job. Pick one framework and learn how to separate model-view-controller properly. Oh, and if you want front end, learn Javascript well, and CSS 3. | ||
WoolySheep
Canada82 Posts
On July 07 2015 08:48 Acrofales wrote: From Java to Android is about as natural a progression as it gets. Just download the Android Studio and start programming. It's about as easy a transition as I can think of (I did it without any training). I don't program for iOS, but I believe objective c is pretty easy to pick up if you know c++ or c#. Web: forget about specific languages, because nobody cares and they change every few months anyway. Learn that on the job. Pick one framework and learn how to separate model-view-controller properly. Oh, and if you want front end, learn Javascript well, and CSS 3. Thanks. I figured Android programming would be easiest based on java background. | ||
METATERREN
71 Posts
I need to automate the following: Contents of an email generated from survey information are placed into a certain table of my access database. What's it take to make a thing like that? | ||
Chocolate
United States2350 Posts
What is your name? Bob What's your favorite color? Red You are interested in the answers, Bob and red, so tell your script to save the words after name and color. Then, when you have all the results from an individual survey saved, have the script execute something in SQL to put the information in the database. Hopefully that makes sense. Without knowing specific details about the survey information, format, and database, that's the best I could think of. | ||
fmod
Cayman Islands330 Posts
| ||
METATERREN
71 Posts
On July 07 2015 09:22 Chocolate wrote: I would write a quick script (since they are emails, I would look into python and its requests library) that scans a file for the sequence of words before a keyword, For example, in What is your name? Bob What's your favorite color? Red You are interested in the answers, Bob and red, so tell your script to save the words after name and color. Then, when you have all the results from an individual survey saved, have the script execute something in SQL to put the information in the database. Hopefully that makes sense. Without knowing specific details about the survey information, format, and database, that's the best I could think of. Thanks for your reply. I have a question. How would the python script navigate the email? Would it be able to look at this information through an email account on a webmail service (say, gmail) that is dedicated to the receipt of these survey questions? I am probably going to have to pay someone to develop this script, and I am trying to figure out my bearings and what kind of cost it will be to me to have the job done. | ||
RoyGBiv_13
United States1275 Posts
On July 07 2015 09:54 fmod wrote: I recommend premake as a build tool over cmake, if only for it being completely lua instead of cmake's horrible scripting language. Cmake is more widely in use with large FOSS and Unix tools (LLVM, for example), so it's well understood by a wider variety of people. It's pretty good for a crufty wrapper on opaque tooling. | ||
Manit0u
Poland17187 Posts
On July 07 2015 10:24 METATERREN wrote: Thanks for your reply. I have a question. How would the python script navigate the email? Would it be able to look at this information through an email account on a webmail service (say, gmail) that is dedicated to the receipt of these survey questions? I am probably going to have to pay someone to develop this script, and I am trying to figure out my bearings and what kind of cost it will be to me to have the job done. How would the survey work? People fill out the form on the web and the email is being sent to the server? If so, it's really easy since you can simply send the data as an attachment (or just drop it into the mail) formatted in yaml, xml, json or whatever. Then make the script to parse e-mails, save data in the db and move them to the 'parsed' directory in the mailbox or something. All you need after that is a simple cron that'll launch the script every now and then to parse the inbox. | ||
Isualin
Turkey1903 Posts
1-)There are multiple subscribers and a controller. Subscribers might join or leave the network at any time. 2-)Each node works on a different machine. 3-)They will communicate via rest requests. 4-)Controller will send a post request to all active subscribers to start a remote job on those machines. This request has no parameter or body, it is just a signal. I thought of two ways to accomplish this. First one is to send alive signals to controller from subscribers on launch. Wait and retry until a signal is sent succesfully. Then before sending update request from controller, check subscribers to see if they are alive and update the active subscribers list. The second method i thought of is to send heartbeat signals from subscribers every few seconds. Store 'subscriber_ip:port' : 'last heartbeat date' as a map on the controller. And while updating subscribers, check that map to find active subscribers in last X seconds. There is also a problem of sending subscribers ip:port/contextRoot to controller to get the update signal from controller later. I am open to all suggestions. | ||
Gowerly
United Kingdom916 Posts
| ||
Isualin
Turkey1903 Posts
On July 08 2015 22:14 Gowerly wrote: Is there any reason you need to do this yourself? Something like RabbitMQ might be able to handle this kind of thing for you. I am already consuming an activemq queue on subscribers so it is a good idea. I might broadcast to another topic on activemq by controller for this. Thanks by the way. This was the exactly reply i was hoping to get. | ||
| ||