|
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. |
On April 19 2015 11:52 betaflame wrote:Show nested quote +On April 19 2015 11:23 Rotodyne wrote:On April 19 2015 08:10 betaflame wrote: Hi guys, I have a good amount of experience with LAMP stack, php, mvc frameworks, jquery, javascript and such and I am looking into learning "MEAN" and I have a couple questions:
From my own research, there seems to be 2 main "frameworks" for MEAN but by itself, you could technically work with just mongodb, expressjs, angular and node on its own together. So is there any point in really going with those advertised "MEAN" stacks? Like what do they offer versus just using the 4 together by myself?
Also, coming from a LAMP background, I originally started with procedural php programming before learning about mvc frameworks and all that jazz that made my life easier, would you recommend diving straight into working with frameworks (express) or just work with just node and angular instead (without express)?
I'm curious, what are the two frameworks that you are referring to? I set up a MEAN environment a while back and I believe you definitely want to use Express, but I don't know enough to provide sound reasoning. But avoid reinventing the wheel whenever possible. Since you already have experience with the LAMP stack, why don't you get some Angular experience using PHP as a backend instead of Node? I would recommend Laravel or their new micro framework Lumen. At least for me, it is easier to learn one thing at a time. (unless you already know angular, ignore this). I think I am pretty decent at Angular, so if you have any questions PM me! I am referring to MEAN.js and MEAN.io (http://meanjs.org/ http://mean.io/#!/)Apparently they are both made by the same guy but one of them was bought out by a company and he continued development by creating a new one instead..? Yep, I've had some experience with Laravel but I've never heard of Lumen, I'll definitely check it out! In terms of using angular, whats the core difference between just using typical javascript with jquery and templating on the front-end? Is it the maintainability and structure?
Yea I actually haven't used Lumen, I think it just came out and it is just a lightweight version of Laravel, I'm going to try it out soon.
Using jQuery for single page applications with lots of DOM manipulation can get very ugly quickly. So I would say yes, maintainability and structure are the reasons.
For example, if you look at the HTML of a jQuery application you have NO idea what is going on, and everything has classes just for the sole purpose of selecting it via jQuery. It is disgusting 
I'm not an expert, but I've used a bunch of javascript frameworks and read a bunch of stuff, and this is how it feels to me.
On April 19 2015 11:28 Manit0u wrote: You can learn all that in even smaller steps since you can use angular with php backend 
I realized that as I was writing it, but I am a Laravel fanboy so I had to mention it. 
|
thanks for the link manitou, you're a lifesaver.
except i closed it by accident and now whenever i try to reopen it in different countries it keeps starting the initial environment generator process lol. ill just wait it out and bookmark
this all started coz it got stuck saying environment was in use but i had no apps to delete -_- why always trouble
ah i think it might happen because it lets you click "upload" and then "deploy" as fast as you like but infact thats fucking forever to do anything behind the scenes, thats a bit weird
|
|
Bisutopia19229 Posts
Welcome to boggle - do you want instructions? D G G O O Y A N A D B T K I S P Enter words: > Someone explain the joke here please. I thought maybe it was a VIM thing.
|
|
Bisutopia19229 Posts
On April 21 2015 02:46 Nesserev wrote:Show nested quote +On April 21 2015 02:24 BisuDagger wrote:Welcome to boggle - do you want instructions? D G G O O Y A N A D B T K I S P Enter words: > Someone explain the joke here please. I thought maybe it was a VIM thing. Isn't boggle a game where you use those letters to find words or something? I don't think it's a joke... It was on slashdot. I'm assuming there's a nerd joke behind this somewhere. It pops up on google a few places too under tech joke forums.
|
On April 20 2015 09:01 catplanetcatplanet wrote: ahh okay i see why it segfaulted then. thanks!
why would it work fine the first time, though?
I'm not that experienced with C++ to tell, but I guess something goes out of scope or something. There is this 'cool' thing about C++ called undefined behaviour as well. 
If you want to optimise your program a bit more, iterate with ++variable instead of variable++. The second one creates a needless copy. It's kind of like your mistake with passing parameters which aren't references. You won't notice it with simple objects, but you may notice it if a copy is expensive.
|
On April 21 2015 03:01 darkness wrote: If you want to optimise your program a bit more, iterate with ++variable instead of variable++. The second one creates a needless copy. It's kind of like your mistake with passing parameters which aren't references.
Any optimizing compiler won't make a copy. In fact, x86 has an INC instruction which runs a fair bit faster than ADD dest 1, which will be used in either case.
Java, by the way, is the exception to this case. Bytecode generated by the two instructions will be different, even though the virtual machine will likely interpret the bytecode into a INC instruction anyway. (reference required)
Though it's still useful to conform to every increment being ++variable, so you never have the case where you use an old value. Typos affect all levels of programmers
|
On April 21 2015 03:08 RoyGBiv_13 wrote:Show nested quote +On April 21 2015 03:01 darkness wrote: If you want to optimise your program a bit more, iterate with ++variable instead of variable++. The second one creates a needless copy. It's kind of like your mistake with passing parameters which aren't references. Any optimizing compiler won't make a copy. In fact, x86 has an INC instruction which runs a fair bit faster than ADD dest 1, which will be used in either case. Java, by the way, is the exception to this case. Bytecode generated by the two instructions will be different, even though the virtual machine will likely interpret the bytecode into a INC instruction anyway. (reference required) Though it's still useful to conform to every increment being ++variable, so you never have the case where you use an old value. Typos affect all levels of programmers
Well, I don't know. I think More Effective C++ mentions that compiler should now be allowed to optimise temporary variables, but if not, then this post applies:
http://stackoverflow.com/a/24904
|
well, i cant do it guys, and ive ran out of time
i was trying to "simply" host an image file on a web server alongside my application and allow my application to read/write that image. but i couldn't figure it out
going to clean up the code a bit, revert it back to "desktop" version, then write the Report
ps i'll pay someone £50 if they want to sort that out for me, just because i dont know if i can be fucked to continue it any time soon but its such a cool idea. i cud probs just outscource it actually to some indians
HOW BITTERSWEET IT IS how shit i feel now
i have to write the report say that takes 10 hours then sleep until tuesday afternoon then wed i have to do my mobile web application + report assignment, which means i need all of wednesday in the mobile lab to use the shitty fucking 1-mouse-button mac things. so basically i have 1 day for that whole assignment , its due the day after before 3pm which is thursday, and on thursday i need to do my math/programming assignment, which is due friday 11pm i believe
the real shitty news is i just got back a grade i was sure was gonna be 40/100 and she actually gave me 20/100 , so now i need to get 60/100 on that math assignment and its gonna be a disaster .
actually its the mobile one i need 60/100 for so its not quite as bad (still 1 day and i cant even use a mac). the other one gave me like 37/100 so i need just 45/100 for math assignment to pass. i REALLY needed that 40/100 tho, wtf 20/100 is like whats the point of even bothering, i thought i done a solid assignment (still have to get feedback for it, i SUSPECT it might be because i didnt hand in the artifact on a usb drive coz i was like, are you kidding me? she wants 100 usb drives?). but also its possible shes a MEGA RETARD , a distinct possibility
|
*edit: needless comment/reply
I'm too triggerhappy when posting D:
|
|
On April 21 2015 09:12 FFGenerations wrote:i stop here will revert it to offline mode and fix up the last parser, tidy the code and write the report im still a genius http://animelist.elasticbeanstalk.com/ The search only seems to compare the search term with the beginning of the names.
|
is that was it is? i havent thought about it, im just yusing his syntax at http://www.animenewsnetwork.com/encyclopedia/api.php
api.xml?title=~jinki
i just realised i literally spent 25 hrs straight trying to host a web aplpication
BTW , i wrote a tenative process model , i was just wondering at step 5..... i make a request to the website with http://cdn.animenewsnetwork.com/encyclopedia/api.xml?title=~"string" and then unmarshal it into an object class and then call the object methods in a loop to print the attributes
ArrayList<Map> arrayOfMap = new ArrayList<Map>();
try { for (Anime anime : annj.Unmarshalling(searchQuery).getAnn()) {
Map<String, String> map = new HashMap<String, String>();
map.put("name", anime.getName()); map.put("id", anime.getId());
for (Info temp : anime.getAnime()) { if (temp.getSrc() != null) {
map.put("url", temp.getSrc()); } } arrayOfMap.add(map);
}
response.getWriter().write(new Gson().toJson(arrayOfMap));
could i have parsed the massive xml file and printed the attributes without having to put it into an object class inbetween? im too tired to think about it now but it struck me ........ what do u think?
+ Show Spoiler + 1) populate webpage with html 2) user clicks search 3) servlet maps ajax search query to servlet method 4) create an instance of a master anime object that contains a list of anime that contain a list of anime info 5) put search query into a request to the animenewsnetwork returning a massive xml file of anime data 5) unmarshal this into the master anime object 6) for each anime in the master object, return their attributes (title, id and list of info) and map these into an arraylist 7) send this back to the ajax method as a gson json and then json parse it so each set of anime data is appended as a set of html elements into a jquery list 8) display these to user in html 9) user drags to add search entries to right box and clicks on Save List 10) imagegenerator servlet calls the ajax which uses jquery to parse the content of each img src value of the returned list into an array 11) servlet fetches this data and parses it line by line into an arraylist 12) instantiate an imagecontroller and call its controlimage method by passing in our arraylist of image urls 13) count the number of instances in the arraylist and then use MATH to work out what size grid that n instances require to be displayed upon 14) draw the grid then for each instance of image url draw an image ontop of it , increasing draw starting-point x axis by appropriate (preset) width of image each time then when we hit the maximum (preset) width of our grid reduce x axis to 0 and increase y axis by appropriate (preset) height of an image 15) return the new generatedimage filepath and back in our imagegenerator servlet call an instance of our image uploadcontroller and pass in the filepath 16) uploadcontroller authenticates with Imgur upload service, encodes the image and sends it 17) Imgur returns a json string that contains the url of the image now uploaded on it service 18) imagegenerator serlvet sends this back to the ajax where it gets parsed , formatted and displayed to the user as an image file/hyperlink
|
does anybody know how you can let a program detect if your ingame in starcraft 2?
|
On April 21 2015 22:43 sabas123 wrote: does anybody know how you can let a program detect if your ingame in starcraft 2?
You have to clarify what exactly you want.
Yes, you can see if the SC2 window has focus (which means that you are ingame), but I somehow doubt that is exactly what you want.
|
On April 21 2015 23:19 Zocat wrote:Show nested quote +On April 21 2015 22:43 sabas123 wrote: does anybody know how you can let a program detect if your ingame in starcraft 2? You have to clarify what exactly you want. Yes, you can see if the SC2 window has focus (which means that you are ingame), but I somehow doubt that is exactly what you want. no I meant to see if the game had started or not, I thought there was something similair in that obs overlay that automaticly switched.
|
In that case I would try to get a hold on the obs overlay's source if it's possible.
Other options (probably) exist, but might trigger anti-cheat:
You can read SC2's memory.
You can read the actual video output and compare it against some heuristics (i.e. if displayed image is matching the loading screen it should be a game starting).
You probably can monitor the traffic and look for certain messages being send.
|
On April 21 2015 23:51 Zocat wrote: In that case I would try to get a hold on the obs overlay's source if it's possible.
Other options (probably) exist, but might trigger anti-cheat:
You can read SC2's memory.
You can read the actual video output and compare it against some heuristics (i.e. if displayed image is matching the loading screen it should be a game starting).
You probably can monitor the traffic and look for certain messages being send. I can't find the source code from the scene switcher, I will ask R1CH if he is so kind to give it to me^^
If not I think I wil ltry to compare the video input as you suggested.
|
On April 21 2015 06:01 FFGenerations wrote: actually its the mobile one i need 60/100 for so its not quite as bad (still 1 day and i cant even use a mac). the other one gave me like 37/100 so i need just 45/100 for math assignment to pass. i REALLY needed that 40/100 tho, wtf 20/100 is like whats the point of even bothering, i thought i done a solid assignment (still have to get feedback for it, i SUSPECT it might be because i didnt hand in the artifact on a usb drive coz i was like, are you kidding me? she wants 100 usb drives?). but also its possible shes a MEGA RETARD , a distinct possibility
So you didn't follow instructions and now the teacher is a mega retard? ;o)
On April 21 2015 09:43 FFGenerations wrote:is that was it is? i havent thought about it, im just yusing his syntax at http://www.animenewsnetwork.com/encyclopedia/api.phpapi.xml?title=~jinki i just realised i literally spent 25 hrs straight trying to host a web aplpication
Looking at your posts, you really should have invested some time in trying to understand what's going on rather than keep jumping between different IDEs, hosts and god knows what else you've changed.
How are you ever going to be able to understand what's wrong when you keep changing everything? Stick to one thing, and learn it properly.
This whole experience out to serve as a lesson for you to stick to one thing and try to understand it.
On April 21 2015 09:43 FFGenerations wrote:BTW , i wrote a tenative process model , i was just wondering at step 5..... i make a request to the website with http://cdn.animenewsnetwork.com/encyclopedia/api.xml?title=~"string" and then unmarshal it into an object class and then call the object methods in a loop to print the attributes ArrayList<Map> arrayOfMap = new ArrayList<Map>();
try { for (Anime anime : annj.Unmarshalling(searchQuery).getAnn()) {
Map<String, String> map = new HashMap<String, String>();
map.put("name", anime.getName()); map.put("id", anime.getId());
for (Info temp : anime.getAnime()) { if (temp.getSrc() != null) {
map.put("url", temp.getSrc()); } } arrayOfMap.add(map);
}
response.getWriter().write(new Gson().toJson(arrayOfMap)); could i have parsed the massive xml file and printed the attributes without having to put it into an object class inbetween? im too tired to think about it now but it struck me ........ what do u think?
Looking at the piece of code you've dropped is interesting.
You have a List of Maps, in each map you put at least two keys, possibly three, name and id should always be there, but might be null and sometimes there will be the last Info URL source as url.
Is there any reason why you didn't make an object that has three properties: a name (probably a string), an ID (an integer, I would guess / or a string) and a list of Info URLs?
Which in turn would make your life a lot easier once you have to try and render anything. Oh well, lessons for the next time around
|
|
|
|