|
-
03-07-2016, 07:24 PM #451
-
03-07-2016, 10:04 PM #452
No. I've found that most serious contract work (not 'build this app for $500 pls') is pretty intensive, eg fulltime for x months, not like 10-15 hours/week or something. In reality even if you can find a less intensive contract job, it brings your total hours around 55-60/week. At that point it's more than likely to affect your fulltime job. Better to have consistent good results with one company fulltime and build your salary that way imo.
Have to agree with this. It's not necessary, but it's definitely nice to have, things running smoothly = more fun, less frustration
-
-
03-08-2016, 10:54 AM #453
-
03-08-2016, 07:08 PM #454
My company tends not to hire any programmers recently (less than 2 years) out of coding bootcamps because they tend to lack deep problem solving skills found in individuals that went through a CS or Mathematics program. CS undergrad with a strong personal project portfolio is an ideal setup to have going into the recruiting process. If you only have a coding bootcamp background you need to be able to demonstrate that you really understand data structures, algorithms, and OOP principles. I know some bootcamps do a better job than others, but it probably wouldn't hurt to supplement a coding bootcamp with taking a DS&A course at your local university. Just my two cents.
-
03-08-2016, 07:37 PM #455
-
03-08-2016, 08:30 PM #456
-
-
03-08-2016, 08:32 PM #457
-
03-09-2016, 07:07 PM #458
-
03-10-2016, 05:30 AM #459
Hey guys quick question about jquery/javascript.
I have an xml file which im reading locally which has image urls in and i need to get an image to display in a table i've created. how do i go about this?
Currently it looks like this
Code:<id>0001</id><title>waefewfa</title><picture>gaga.jpg</picture>
[code]
var Col0 = $row.find('id').text();
var Col1 = $row.find('title').text();
var Col2 = $Last edited by Didlid; 03-10-2016 at 06:09 AM.
/
-
03-10-2016, 06:05 AM #460
-
-
03-10-2016, 06:11 AM #461
-
03-10-2016, 12:49 PM #462
-
03-10-2016, 01:04 PM #463
I don't know what "iterated, deepened DFS" is, but I call tell you that Depth First Search goes all the way down a branch before traversing to a neighboring node, whereas Breadth First Search goes to all neighboring nodes first.
Seems like you are asking weird machine learning questions without understanding the underlying base algorithms.Java Crew
Always Pick 4 Crew
30+ Miscer Crew
Free Balcony Brah Crew
-
03-10-2016, 01:17 PM #464
Well Node.js is server-side JavaScript. So if you don't know JS then you could conceivably learn both at once.
I would recommend skipping PHP regardless. It's a **** quasi-HTML server side language that doesn't fit well into any paradigm anymore (and it's horrible to use).
Learn Node.js if you really want to do server side ****. But it really all depends on what you are trying to accomplish.Java Crew
Always Pick 4 Crew
30+ Miscer Crew
Free Balcony Brah Crew
-
-
03-10-2016, 01:30 PM #465
-
03-10-2016, 02:35 PM #466
-
03-10-2016, 03:12 PM #467
Gotta use it for an assignment for some reason they wont allow us to use other things. I hate it and jquery, i fix one problem then the next thing is a ballache and im stuck again.
Anybody know why my button only shows the last item in my list?
Code:for(var childNum in itemResults){ //get the products specific child $row = $products.find('product').filter(":nth-child(" + itemResults[childNum] + ")"); var Col0 = $row.find('id').text(); var Col1 = $row.find('picture').text(); var Col2 = $row.find('title').text(); var Col3 = $row.find('brand').text(); var Col4 = $row.find('description').text(); var Col5 = $row.find('price').text(); $('#product_table > tbody').append("<tr><td>" + Col0 + "</td><td><img id='tableImgs' src='ProductImages/" + Col1 + "' height='200' width='250'></td><td>" + Col2 + "</td><td>" + Col3 + "</td><td>"+ Col4 +"</td><td>£" + Col5 + "</td><td id='productLink'><button/></td></tr>"); $("#product_table button") .text(Col2) .addClass("productButton") .hover(function(){ $(this).addClass("productButtonHover"); }, function() { $(this).removeClass("productButtonHover") }) .click(function(){ window.location.href="product.html?id=" + Col0; }); }
/
-
03-10-2016, 03:16 PM #468
-
-
03-10-2016, 03:38 PM #469
-
03-10-2016, 03:40 PM #470
Lol no that's normal. New projects are fun because you can start over clean. The longer a project gets dragged out, requirements changed, etc, the more ugly it becomes. You start to avoid working on it if you can because it's no longer clean and simple and super maintainable.
God damn that's some ugly code son. Have some consistency. Use dashed classnames and ID's. Space between ) and {. Single quotes for JS, double quotes for HTML. Declarations on new lines. Contain HTML tab formatting even in JS strings. Looks like you could also improve jQuery performance with .each() instead of for-looping and calling .find() for every node. Also it looks like you're adding hover and click handlers for every node? Inefficient.
And those hover functions can be replaced with CSS :hover. Edit, ^wizard
You're calling $("#product_table button"), eg ALL buttons in your table.
-
03-10-2016, 04:46 PM #471
Idk i see semicolons? I'm just using notepad++ thats what we were recommend to use in uni, what IDE would you suggest? Sublime?
Never heard of jsfiddle cheers for the headsup, And as for the hover i have no idea im just following what my ****ty uni shows me to do. What do you mean create a href in click event for each button? Isn't that what i've done with the .click(function() ? thats the part im stuck on. Every button links to the same reference rather than all of them.
So how would i change the buttons to each individual one? i create them all at once how do i link each page to each individual button i thought what i was doing was right. Originally i had #product_table as my last columns id which is id='productLink
tell me what i can improve on guys and i will take it on board thats part of the learning process haha./
-
03-10-2016, 05:07 PM #472
-
-
03-10-2016, 06:50 PM #473
I think I'm going to play another prank on someone at work.
I'm going to write a script that loops every ten seconds and checks if any vowels on the keyboard are being pressed at that time... if there are, turn Caps Lock on for 3 seconds then turn it off. Hopefully it will not happen super often, but often enough to make people go "wtf" lolI rep anyone who posts gifs of Ray Liotta laughing.
-
03-10-2016, 07:13 PM #474
-
03-10-2016, 09:23 PM #475
I know the difference between DFS and BFS, those are easy, but apparently theres another one called IDDFS. If you draw it out, the order of expansion of nodes, you get something similar to that of BFS and I don't know why its more efficient
https://en.wikipedia.org/wiki/Iterat...h-first_search
-
03-10-2016, 10:37 PM #476
Is this for AI class? Basically in potato terms, IDDFS is a DFS that is "smart" and "knows" the optimal depth for the solution. It is DFS, but will only go as deep as necessary. It's more efficient wrt to memory since IDDFS only stores the current path in memory (height), whereas BFS is storing every node in the level (width).
For example look at a this tree below. At the bottom level (level 4 or 3 if you zero index), the space required for IDDFS is 4. For BFS it is 8. Go another level down it is 5 for IDDFS and 16 for BFS, so you can see that for trees with greater depth IDDFS will really start to be more efficient then BFS. Assume for example, that the tree below is an infinite depth and the solution is at depth 100. Regular DFS would outright fail, BFS would require 2^100 of memory, and IDDFS would only require 100 memory. Hope that all makes sense lol.
-
-
03-11-2016, 02:01 AM #477
- Join Date: Apr 2010
- Location: New York, New York, United States
- Age: 33
- Posts: 10,421
- Rep Power: 27434
All you do in your click event is redirect to specified link. Like Appsbrah already mentioned, you are assigning the click event to all buttons as well. just add href attribute on your button with "product.html?idCol0", not sure what you mean by ?idCol0 either. Post your working example on jsfiddle so we can see the whole thing. If you really want to continue with your code, although the flow seems unusual, just change the selector to "#product_table button:last-of-type" so it will only select the last appended button or add unique attribute for that row to each button so you can use it in selector. Anyways, you should be creating and assigning attributes/events to your elements differently imo, unless it's one of those impractical forced examples to do for assignment.
-
03-11-2016, 04:47 AM #478
Thanks a bunch, ill try it out when I get home and ill post my code on jsfiddle.
Its not surprising im **** at jquery considering we only started it this semester and the tutor spends 90% of the lecure talking about cognitive walk throughs...
Oh while im here does anybody know of an app/plugin for eclipse which can reverse engineer my working code into uml diagrams? Or if thats even possible/
-
03-11-2016, 07:43 AM #479Java Crew
Always Pick 4 Crew
30+ Miscer Crew
Free Balcony Brah Crew
-
03-12-2016, 04:01 AM #480
Tried using jsfiddle and its all kinds of ****ed up lol. Because the tutor has created .js files and then put js inside the html too it just gives me a **** ton of things saying "this is not needed" "this isn't needed either" "this shouldn't be here" lol. **** this ****ty ass uni
Still can't get this stupid button to change with whatever is in the xml file either even using :first-of-type and last-of-type./
Bookmarks