Jump to content

MrFish

Members
  • Content Count

    492
  • Joined

  • Last visited

Community Reputation

9 Neutral

About MrFish

  • Rank
    Member
  • Birthday 02/01/1993

Previous Fields

  • Languages
    PHP, MySQL, JavaScript, Java, NodeJS, Unix Shell

Profile Information

  • Location
    Kansas
  • Interests
    Software Architecture
  1. 390 Downloads as of June 2nd. Site up with documentation: http://snoozejs.org/documentation
  2. oh shreyaskudav. You remind me of my younger self. I asked the very same question when I was 12 about booleans on the xgenstudios forums. You can always pass variables. The way programming languages work is that it always interprets the most nested elements first. So when you say- var myVar = "test";getElementById(myVar); It will interpret to getElementById("test"); first. Same with functions. function foo() { return "test";}getElementById(foo()); Interpets to- getElementById("test"); Happy programming!
  3. Javascript is a glue. It's becoming more popular as more than just a browser scripting language but it's always been a glue. You can't JUST lean javascript and do everything you want to do. Learn it along-side your server language (###### if it's nodejs more power to you) and your client language (probably html). But in technology there isn't just one language. You'l end up learning many languages to accomplish your goals.
  4. You should learn javascript, html, and css before you ask this question.
  5. I can't understand your question.
  6. shreyaskudav, You have to understand the difference between "client-side" and "server-side". A client is your computer. You see a web page and you click a button. Only your computer knows you clicked the button until you send it to the server (where your PHP lives). The server handles the request and sends a response. When a response is sent the client updates to reflect that response. Shorts of writing a working client side and serve side example there is probably a lot you need to learn if you don't understand this. Keep writing your game (that's how I learned) but you haven't go
  7. This. I assume you're new to js so to do that I'd recommend going inserting new DOM nodes (cleaner imo). var myText = document.createElement("span");myText.innerHTML = "This is a note";document.getElementById("my_container").appendChild(myText); But I'd really recommend AngularJS if you're updating html. It has 2-way binding which means whenever you update a variable the view (your html) will update automatically. And whenever you update an input the controller will update. Save a lot of time and frustration.
  8. For clientHeight it really depends on your bowser. What browser are you using?
  9. I've recently been doing AngularJS work and love how it's organized. I tried to find something similar for NodeJS but after searching I've only found the basics to setup your own framework (like expressjs) but nothing that actually provides a simple modular framework. So I've started to write my own. snooze is a restful framework that is simple and modular. It's focused around building a restful api but not necessarily the nodejs version of something like apache. Every request is handled by a controller, is validated through validators, and is processed by a service. A framework suitable f
  10. Got it down to an average of 6/s per 100 business processed. Here is a list of times taken to process individual businesses. Not very consistent. Oh boy getting 146.963 queries/s average. 0.009335041046140.01928496360780.07202100753780.02311992645260.05278611183170.02507495880130.01462388038640.03662300109860.03207707405090.01911401748660.04484701156620.05123400688170.0286669731140.01086711883540.05897092819210.01087403297420.0009930133819580.00136899948120.09078907966610.0108981132507
  11. Well I've done some indexing and it's helped a lot but it's still behind. I'll post the code that runs the queries and post the queries that are called on each. # Each tag is a string value for Tag in tags: # It first checks if the tag exists in the database. # SELECT * FROM tags WHERE tag_name=%s # tag_name is indexed if self.tagExists(Tag) == False: # If not it will add the tag # INSERT INTO tags (tag_name) VALUES(%s) self.addTag(Tag) # Then it will check if the business has the tag associated to it # SELECT * FROM business_tags WHERE bt_b_id=%s AND bt_tag_id=%s #
  12. Yes. Names are strings usually. I wish they'd all name themselves numbers but they didn't.
×
×
  • Create New...