|
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 November 27 2015 18:27 Manit0u wrote: This way you really link only a single file somewhere in your layout and don't have to worry about it since all the assets will be compiled into them. You just have to run npm install after deployment. During development you might need to run gulp manually each time your js/css changes unless you have an IDE in which you can set up file watchers to do it for you automatically in the background upon file save (jetbrains products have such a feature).
Gulp also has a watch task that you can setup to run your tasks for you after each change.
On November 27 2015 02:48 mantequilla wrote: N00B to javascript world here. Are these analogous?
npm install ~ mvn install package.json ~ pom.xml grunt ~ mvn compile gulp ~ ??? bower ~ ???
Yes, the first two are pretty equivalent. Unlike maven though package.json (maybe luckily) has less functionality so if you want to do some other tasks during your build step (like Manit0u is pointing out) you also need more tools -- that's where Grunt and Gulp come in. If you ever did ant for java back in the day they are quite similar. So, I think grunt is a bit more complex than just a mvn compile.
Bower is another dependency manager like npm. It still feels a bit weird to me as to why you would want to play with even more dependency manager and build tools just complicating your build set but I think this stack overflow does a decent job explaining the difference..
|
Thanks guys Until now I maintained old JSF projects, but from now on company wants to use js+html5 frontends.
|
Glad we could help. Just to clarify, here's how the npm + bower + gulp process looks like:
npm install -> checks if bower and gulp are installed, if not, it downloads and installs them along with additional plugins (gulp-sass, gulp-uglify etc.). Then it proceeds to execute following commands... bower install -> resolves and downloads all of your external asset dependencies (jquery, bootstrap etc.). When that's done npm fires off gulp -> performs magic on your own assets, combines them with external assets provided by bower and the dumps them in desired location
In short: npm ( bower ( external assets ), gulp ( local assets, external assets ) );
Just a note of warning, make sure you add all folders where compiled assets go to .gitignore immediately or else you'll have to deal with nightmare commits all the time.
|
Thanks for the help ropid, manitou and nesserev!
It worked! I overrode my ubuntu install with a new install and after that it automatically booted into ubuntu boat loader where i could select windows and ubuntu. Everything going great.
Then I downloaded the 20 something different HP drivers for w7, installed all that crap great great.
Suddenly in many different applications (firefox, steam) text stopped showing up and apps started behaving weird in general probably some system file corrupted how the fuck did that happen.
Did a system restore to a little before, windows says some update was incorrectly installed, and it fixed the mistakes. All done all done and now when I boot it up the keyboard and mouse don't respond 

|
Are your mouse and keyboard in USB3 ports? Your drivers for them probably got erased so the ports don't work anymore. Didn't realize it was a laptop.
|
Do mouse and keyboard on a laptop use usb ports internally?
I dont know but ive given up anyways. Im just gonna buy a separate hard drive to install ubuntu on. Ive had enough of this clusterfuck
|
Are you sure that those 20 something HP drivers you installed were up-to-date and not conflicting with each other? Seems like a point where things started going bad for you.
|
Java issue here; I have to check each adjacent cell in a board, the issue is (I guess, I haven't tried yet) the outofindexbound error I'll get if I do that. ex :
(0,0),(0,1),(0,2),(0,3),(0,4) (1,0),(1,1),(1,2),(1,3),(1,4) (2,2),(2,1),(2,2),(2,3),(2,4) (3,0),(3,1),(3,2),(3,3),(3,4) (4,0),(4,1),(4,2),(4,3),(4,4)
If i'm in cell (2,2), and check all the adjacent ones (1,1),(1,2),(1,3),(2,1),(2,3),(3,1),(3,2),(3,3) there is no issue; but if i'm in cell (0,0), I'll have a shitload of error with (-1,-1),(-1,0), etc...
So, do I need to testcase each situation (annoying considering 8x8 array), Or can I just do :
try { checkAdjacentsCells(); } catch (ArrayIndexOutOfBoundsException e) { //do nothing }
Edit: answered it to myself, I think the best way is doing a inGridCheck method and applying it in an if statement alongside each check, so it can discard it without ignoring error and it's not that gruesome to do I think.
|
You certainly shouldn't use exceptions for these things. Using an if check is much cleaner and also a lot faster. Also don't call your method "inGridCheck". Use a name like "isInGrid", which makes it clear what the result means. Generally methods that end on "check" seem to be named really badly. At least that was the case for every single one I saw so far.
What you could do if you want to be clever: Add an extra ring of cells around the board with neutral values. Only iterate over the inner part, but don't make any special cases for the outer ring. Might not work for you, if there's no good neutral values for your problem.
|
On November 28 2015 07:02 spinesheath wrote: You certainly shouldn't use exceptions for these things. Using an if check is much cleaner and also a lot faster. Also don't call your method "inGridCheck". Use a name like "isInGrid", which makes it clear what the result means. Generally methods that end on "check" seem to be named really badly. At least that was the case for every single one I saw so far.
What you could do if you want to be clever: Add an extra ring of cells around the board with neutral values. Only iterate over the inner part, but don't make any special cases for the outer ring. Might not work for you, if there's no good neutral values for your problem.
Yup, don't know why I was thinking this name, when I always start my method name with "is" when it's a boolean one.
The extra ring of cells might be more of an hassle than anything though. I'm doing a Othello game and the view will be a pain in the ass if I have to remove ignore 2 rows and 2 columns, and for the other check I'll have to do too. I also plan on adding a "value" on each cell for a potential IA so yeah, neutral value would be annoying to play with I think.
But thank you for your response !
|
Any opinions on qt vs WPF performance? I really wanted to do pure C++ application just for practice but I really dislike how qt uses heap for no good reason. Note that I don't have a 'real' need for C++ UI other than extra performance and personal experience but I know C#/WPF better.
Edit: i guess C#/C++ is always an option.
|
If you want performance I guess you could check out the Corona SDK:
https://coronalabs.com/
It's cross-platform app build tool that uses C and Lua. They have some tools to do advanced graphics (including physics and even mixing it up with html so you can have web pages with physics). I wanted to have a look at it myself when I have some free time.
Their API looks pretty good:
https://docs.coronalabs.com/api/index.html
|
On November 28 2015 05:13 Manit0u wrote: Are you sure that those 20 something HP drivers you installed were up-to-date and not conflicting with each other? Seems like a point where things started going bad for you. Its hard to say for sure since HP offers no information on these things beyond a vague name. Then again when I booted my machine it first went into uefi then into ubuntu then into windows so it probably wasnt all that stable to begin with.
|
On November 28 2015 08:54 Manit0u wrote:If you want performance I guess you could check out the Corona SDK: https://coronalabs.com/It's cross-platform app build tool that uses C and Lua. They have some tools to do advanced graphics (including physics and even mixing it up with html so you can have web pages with physics). I wanted to have a look at it myself when I have some free time. Their API looks pretty good: https://docs.coronalabs.com/api/index.html
When you say C, do you actually mean C++? If it's C, then I'd rather not use it unless Windows API forces me. Also Wikipedia suggests it's used for mobile development but I should have said desktop instead.
|
On November 28 2015 09:51 darkness wrote:Show nested quote +On November 28 2015 08:54 Manit0u wrote:If you want performance I guess you could check out the Corona SDK: https://coronalabs.com/It's cross-platform app build tool that uses C and Lua. They have some tools to do advanced graphics (including physics and even mixing it up with html so you can have web pages with physics). I wanted to have a look at it myself when I have some free time. Their API looks pretty good: https://docs.coronalabs.com/api/index.html When you say C, do you actually mean C++? If it's C, then I'd rather not use it unless Windows API forces me. Also Wikipedia suggests it's used for mobile development but I should have said desktop instead.
No, I mean ANSI C 
But you're not really writing anything in C there I believe. It's what the framework runs on and you only do Lua scripting for it, which is pretty nice.
|
Hi i have a question, i'm by far NO expert, but i'm self taught in html, css, php, javascript and mysql. I have never finished a website but started alot and i don't do this for a living just in my free time. So i would say im a beginner still and i only understand procedural code not OOP(this little project doesn't require oop any ways its a very small site i'm just trying to experiment with). I'm working on a little project and i'm trying to allow people to encrypt msgs with pgp encryption(hopefully you know what that is) if your familiar with it. For now i'm just working on my computer running windows 7 and i'm using xampp to test my stuff.
So as far as i understand i need to download something and i think update something in the php.ini file but i'm confused because i haven't played around with php.ini nor have i added a php extension yet and i can't figure out how to do this. So i wanna be able to use these functions http://php.net/manual/en/book.gnupg.php . I downloaded something from here version 1.3.6 http://pecl.php.net/package/gnupg but i have no clue how to install this if i am even on the right track.
Basicly i wanna be able to use the functions for now though i'm just trying to allow users to upload their public key to a database and then have an area to send messages and give the user an option to encrypt it, so if they are msging someone and if they have a valid public key in the database then there will be a checkbox or something that will automaticly encrypt the regular text. if the check box is checked then when the text is sent it is auto encrypted. (It appears to be fairly simple if you understand pgp encryption) which again i'm no expert but i know how to encrypt and decrypt text.
Fairly simple but again i have never worked with this before so was wondering if someone could provide some help thanks
|
|
thanks so much for the reply manit0u, i have been reading some of the stuff you posted for a little while now and it appears the big problem is the whole windows 7 and wamp server. If i do finish this little project its not going to stay on a wamp server.
Sorry to sound like such a newb but i am one, but what if i had a spare computer(which i do) and i installed linux (which i have never worked with keep in mind) and set it up as a server to test on. I'm sure i could find a guide on how to do the stuff i stated above. Then this would be alot easier maybe? i see on here http://php.net/manual/en/gnupg.installation.php if your scroll down a hair it has instuctions for ubuntu 12.04 that seem pretty simple although steps 3 and 4 dont' make much sense but perhaps they will if i had a shitty little linux based test server.
And again if i ever finish the little project i would imagine it would be running on some kind of linux based servers, as far as i understand most servers are linux based, so i would have to change everything anyway to get the extension to work on there, rather then trying to use it on my windows, wamp test server stuff.
Would my above logic solve this problem assuming i'm able to figure out how to do it??
|
On November 28 2015 14:05 hooktits wrote:thanks so much for the reply manit0u, i have been reading some of the stuff you posted for a little while now and it appears the big problem is the whole windows 7 and wamp server. If i do finish this little project its not going to stay on a wamp server. Sorry to sound like such a newb but i am one, but what if i had a spare computer(which i do) and i installed linux (which i have never worked with keep in mind) and set it up as a server to test on. I'm sure i could find a guide on how to do the stuff i stated above. Then this would be alot easier maybe? i see on here http://php.net/manual/en/gnupg.installation.php if your scroll down a hair it has instuctions for ubuntu 12.04 that seem pretty simple although steps 3 and 4 dont' make much sense but perhaps they will if i had a shitty little linux based test server. And again if i ever finish the little project i would imagine it would be running on some kind of linux based servers, as far as i understand most servers are linux based, so i would have to change everything anyway to get the extension to work on there, rather then trying to use it on my windows, wamp test server stuff. Would my above logic solve this problem assuming i'm able to figure out how to do it??
Not that setting up linux on a spare computer is a bad idea but you could also just install VirtualBox and ubuntu for a quick and dirty trial. It's a lot less of a commitment and if you like it you can progress.
|
|
|
|
|