Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- default val



  Understanding the "this" keyword in JavaScript

Many people get tripped up by the this keyword in JavaScript. I think the confusion comes from people reasonably expecting this to work like “this” does in Java or the way people use “self” in Python. Although this is sometimes used to similar effect, it’s nothing like “this” in Java or other languages. And while it’s a little harder to understand, its behavior isn’t magic. In fact, this follows a relatively small set of simple rules. This...

   JavaScript,this,understanding     2012-03-29 13:48:59

  Is Scala Only for Computer Scientists?

I have experience struggling through these kinds of things andI know enough about the subject that I can understand why they did it that way. But my concern is that this should be an example that a beginner could understand, and they can't. There's too much depth exposed. Here's the example, which is written as a script: import scala.io.Source._ case class Registrant(line: String) { val data = line.split(",") val first = data(0) val last = data(1) val email = data(2) val payment = da...

   Scala,Application field,Computer science     2012-02-17 07:46:40

  How to send asynchronous requests in PHP

It’s easy to make asynchronous calls in PHP with just a little bit of HTTP header knowledge and some library code around PHP sockets. This technique is useful when posting requests to your own server for bits of logic you’d like to run in the background.  If you don’t control the endpoint, you might not be comfortable with some of the limitations, such as the inability to read anything from the response.  So, you couldn’t post data to a we...

   PHP,Asynchronous request,socket     2012-04-28 06:45:51

  Google Drive will support offline editing soon

Normal 0 7.8 pt 0 2 false false false EN-US ZH-CN X-NONE    Google Drive,Offline editing,Cloud computing     2012-06-04 06:42:47

  Coming full circle

Experts often end up where they started as beginners.If you’ve never seen the word valet, you might pronounce it like VAL-it. If you realize the word has a French origin, you would pronounce it val-A. But the preferred pronunciation is actually VAL-it.Beginning musicians play by ear, to the extent that they can play at all. Then they learn to read music. Eventually, maybe years later, they realize that music really is about what you hear and not what you see.Beginning computer science stu...

   Expert,Life cycle,Work,Begin,End,Cycle     2011-10-30 12:18:33

  First steps with Scala, say goodbye to bash scripts…

Those who know me are aware that I’ve been following play framework, and actively taking part of it’s community, for a couple of years. Playframework 2.0 is right around the corner, and it’s core is programmed in Scala, so it’s a wonderful opportunity to give this object-oriented / functional hybrid beast a try… Like many others, I will pick a very simple script to give my first steps… Finding an excuse to give Scala a try With a couple of friends we are ...

   Scala,Functional programming,Bash script,Replacement     2012-01-12 06:45:16

  9 useful jQuery code snippets

jQuery is one of the most popular JS library among front end developers because of its functionality and usability. Here we share with you some useful jQuery code snippets which can be used in our daily front end development. 1. Smoothly return to page top $(document).ready(function() { $("a.topLink").click(function() { $("html, body").animate({ scrollTop: $($(this).attr("href")).offset().top + "px" }, { duration: 500, easing: "swing" ...

   jQuery,Code snippet     2013-07-13 00:11:10

  Be Aware of these 10 mistakes while designing Your Mobile App!

So you have finally decided to enter the world of technology and you are going to design an application for your business. The time has become when you have to give all the nitty-gitty grins a look and design your own mobile app for promoting your business online. Well when you have finally decided to design your mobile application, here are some mistakes that you are not allowed to make. Have a look:   Do Not Start Designing Your App Without Wireframes Normal 0 false ...

       2014-12-11 02:12:02

  Service discovery with etcd

In previous post, we have talked about etcd and its usage. This post we will cover how to implement server discovery with etcd. Service discovery is to solve one of the most commonly seen scenarios in distributed system where how to find the corresponding target service to talk to. In short, it is to find some server which one can talk to based on some service name. A complete service discovery system include below three key functions: Service registration: A service must register itself to so...

   ETCD,SERVICE DISCOVERY,DEMO,TUTORIAL     2021-03-08 05:36:29

  Tips and tricks about JavaScript from Google

JavaScript is now a very popular client side language. It's flexible, powerful but easy to make mistakes. So good programming style is better for you to write efficient and readable JavaScript codes. Here are some tips and tricks about JavaScript from Google. True and False Boolean Expressions The following are all false in boolean expressions: null undefined '' the empty string 0 the number But be careful, because these are all true: '0' the string [] the empty array {}&n...

   JavaScript, Google, Coding standard     2013-02-26 23:11:03