New review confirms homeschoolers outperform public schoolers

Psychometric review assessments are used by a large number of employers within their recruiting process. Therefore, if you like to achieve an advantage within the prospects that are other, a report that is excellent will be needed by you inside your career aptitude exam. For this, you’ll have to have an idea as to what sort of inquiries are asked in work aptitude tests. Training aptitude assessments may help you prepare for an employment selection method. Exercise aptitude assessments not merely provide you with a fie thought concerning the different types of questions inquired in employment assessment check, but additionally offer for coping with specific varieties of concerns, effective strategies to you. Continue reading “New review confirms homeschoolers outperform public schoolers”

Problemsolving Paper-Writing Methods

Phisoderm is just a distinct skin care items developed by a physician. It has been around considering that the 1950s. The Mentholatum Company boasts the merchandise’ capabilities to revive one’s skin’s normal stability. They are specially created for those who have typical, dry complexions. Along with experience treatment, its line to include acne remedies body washes and baby wash has been extended by Phisoderm. Its products all are physician-encouraged. Continue reading “Problemsolving Paper-Writing Methods”

E-Lance Interview Questions

1) Model an Elevator in Object Oriented Design

2) Sort Files

Late Static Binding in PHP

http://php.net/manual/it/language.oop5.late-static-bindings.php

Basically, it boils down to the fact that the self keyword does not follow the rules of inheritance. self always resolves to the class in which it is used. This means that if you make a method in a parent class and call it from a child class, self will not reference the child as you might expect.

Late static binding introduces a new use for the static keyword, which addresses this particular shortcoming. When you use static, it represents the class where you first use it, ie. it ‘binds’ to the runtime class.

Reflection Concept in PHP

http://php.net/manual/en/book.reflection.php

http://www.sitepoint.com/introspection-and-reflection-in-php/

Javascript Prototype Pattern

http://javascriptissexy.com/javascript-prototype-in-plain-detailed-language/

http://sporto.github.io/blog/2013/02/22/a-plain-english-guide-to-javascript-prototypes/

1. First, there is a prototype property that every JavaScript function has (it is empty by default), and you attach properties and methods on this prototype property when you want to implement inheritance.Note that this prototype property is not enumerable: it is not accessible in a for/in loop. The prototype property is used primarily for inheritance: you add methods and properties on a function’s prototype property to make those methods and properties available to instances of that function.

2. The second concept with prototype in JavaScript is the prototype attribute. Think of the prototype attribute as a characteristic of the object; this characteristic tells us the object’s “parent”. In simple terms: An object’s prototype attribute points to the object’s “parent”—the object it inherited its properties from. The prototype attribute is normally referred to as the prototype object

Prototype is important in JavaScript because JavaScript does not have classical inheritance based on Classes (as most object oriented languages do), and therefore all inheritance in JavaScript is made possible through the prototype property. JavaScript has a prototype-based inheritance mechanism.

function Plant () {
this.country = "Mexico";
this.isOrganic = true;
}

// Add the showNameAndColor method to the Plant prototype property
Plant.prototype.showNameAndColor =  function () {
console.log("I am a " + this.name + " and my color is " + this.color);
}

// Add the amIOrganic method to the Plant prototype property
Plant.prototype.amIOrganic = function () {
if (this.isOrganic)
console.log("I am organic, Baby!");
}

function Fruit (fruitName, fruitColor) {
this.name = fruitName;
this.color = fruitColor;
}

// Set the Fruit's prototype to Plant's constructor, thus inheriting all of Plant.prototype methods and properties.
Fruit.prototype = new Plant ();

// Creates a new object, aBanana, with the Fruit constructor
var aBanana = new Fruit ("Banana", "Yellow");

// Here, aBanana uses the name property from the aBanana object prototype, which is Fruit.prototype:
console.log(aBanana.name); // Banana

// Uses the showNameAndColor method from the Fruit object prototype, which is Plant.prototype. The aBanana object inherits all the properties and methods from both the Plant and Fruit functions.
console.log(aBanana.showNameAndColor()); // I am a Banana and my color is yellow.

Prototype is also important for accessing properties and methods of objects. The prototype attribute (or prototype object) of any object is the “parent” object where the inherited properties were originally defined. if you want to access a property of an object, the search for the property begins directly on the object. If the JS runtime can’t find the property there, it then looks for the property on the object’s prototype—the object it inherited its properties from.This in essence is the prototype chain

var myFriends = {name: "Pete"};

// To find the name property below, the search will begin directly on the myFriends object and will immediately find the name property because we defined the property name on the myFriend object. This could be thought of as a prototype chain with one link.
console.log(myFriends.name);

// In this example, the search for the toString () method will also begin on the myFriends’ object, but because we never created a toString method on the myFriends object, the compiler will then search for it on the myFriends prototype (the object which it inherited its properties from).

// And since all objects created with the object literal inherits from Object.prototype, the toString method will be found on Object.prototype—see important note below for all properties inherited from Object.prototype. 

myFriends.toString ();

Javascript Set2 of Interview questions

1) Does Javascript support read only attributes of Object?

With any javascript interpreter that implements ECMAScript 5 you can use Object.defineProperty to define readonly properties. In loose mode the interpreter will ignore a write on the property, in strict mode it will throw an exception.

var obj = {};
Object.defineProperty( obj, "", {
  value: "",
  writable: false,
  enumerable: true,
  configurable: true
});

Also you can try to attempt this via private attributes simulation.

Scope of variables in Javascript

Javascript has two types of scopes global and local(function) level scope. Variables declared globally that are visible throughout the javascript program come under global scope. Variables declared inside functions, may have same name as global varibles, are accessible only within that function are local variables.

1) No block level scope(except a special case – Block-scoped variables)
2) Variables are hoisted (variables declaration are moved to top and then run)
3) Chaining of scopes. Any function defined within another function has a local scope which is linked to the outer function.

Also any property assigned to window object is also treated as global variable.

If variables are defined without var(no var) outside functions, they are treated as global variable. “no var” variable definition inside function will look up the scope chain until it finds the variable or hits the global scope (at which point it will create it).

JSON

JSON : Javascript Object Notation

JSON syntax is a subset of the JavaScript object notation syntax:

– Data is in name/value pairs
– Data is separated by commas
– Curly braces hold objects
– Square brackets hold arrays

JSON values can be:

A number (integer or floating point)
A string (in double quotes)
A Boolean (true or false)
An array (in square brackets)
An object (in curly braces)
null

{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 25,
  "height_cm": 167.6,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}

Advantages of JSON:
– JSON is more compact
– can be easily loaded in JavaScript. (but using eval() in JS is security risk. So use a language json parser like JSON.parse).
– JSON parsing is generally faster than XML parsing
– Formatted JSON is generally easier to read than formatted XML.
– JSON specifies how to represent complex datatypes, there is no single best way to represent a data structure in XML.
– More structural information in the document
— Can easily distinguish between the number 1 and the string “1” as numbers, strings (and Booleans) are represented differently in JSON.
— Can easily distinguish between single items and collections of size one (using JSON arrays).
Easier to represent a null value

Advantages of XML:
– XML is stricter
– has support for schemas – I.e. the ability for party A to specify the format of a document, and the ability for party B to check that they are supplying something that matches this format.
– has support for namespaces – I.e. the ability to mix data intended to be read by multiple sources (or written by multiple sources) in the same document.
– XML is best used when transporting something like a patient chart or text document with markup included
– XML has XSLT and XPath. So you have your data in one format but you want it in another. If the data is in XML, you can write an XSLT template and run it over the XML to output the data into another format. Using XPath, it’s possible to get direct access to a part of multiple parts of an XML data structure
– JSON is not expressive enough to separate attributes from values. XML can do that.

Complexity of Algorithms

Sorting :
O(n^2) : Bubble Sort, Selection Sort, Insertion Sort

http://bigocheatsheet.com/