This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | http://risebird.tumblr.com/post/140322249595/node-vs-apache-vs-lighttpd-vs-nginx | |
| So you’re trying to build apps huh? You’re going to need to serve them from somewhere, so do you go with Apache? Perhaps something lighter like Lighttpd or Nginx? What about picking a server-side language? Java? PHP? Or perhaps we just go with a JavaScript solution and pick Node? Let’s examine the differences in these choices… | |
| When it comes to process-based servers, Apache is undoubtedly the most popular. In a process-based server, each simultaneous connection requires a thread, which in turn, requires some overhead. On the other hand, an asynchronous server is event-driven, and mostly handles all requests in a single thread. Asynchronous web servers include the more lightweight Lighttpd and Nginx, as well as Node’s HTTP server. They use a non-blocking I/O event loop running in a single process to serve requests. | |
| As far as languages go, you would typically use something like Java or PHP on a synchronous server like Apache. Th | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | http://risebird.tumblr.com/post/142205462000/node-microservices | |
| A couple of months ago, I saw a great presentation by Laurie Voss (@seldo), cofounder of NPM, on Node Microservices. Here’s a nice summary of what I got out of it: | |
| Microservices (AKA Service Oriented Architecture) work well in the Node environment. The microservices paradigm essentially splits your ginormous monolithic app into smaller applications that run on separate machines, and interface with each other. Such a distributed system usually comes with technical and organizational advantages, as well some some improvements in resource efficiency. It does, at the same time, introduce some new problems, most of them stemming from the need for concurrency/synchronization between services. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | http://risebird.tumblr.com/post/147473986500/d3-react-awesome | |
| I recently saw a presentation by Swizec Teller, a geek with a hat (@Swizec), about brining React into D3 and it was awesome! I mean, D3 and React fit together really really well. React improves a lot of things for D3: a component-like syntax, more understandable structuring, ease of modification and maintenance, and others… | |
| For instance, you don’t need to use the complicated D3 data-setup functions, such as enter() anymore. This is because React takes over the DOM manipulation, and all you need to add are basic D3 shapes to render your data visually in a familiar React component structure. This makes things easier since React is declarative and resembles HTML. You can also take advantage of Dev Tool’s React panel on Chrome to easily see where all of your visual data components are being rendered. But let’s look at how D3 actually integrates with React. Is it really worth adding another technology to D3? We still need to use D3 for anything number | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | "Teamviewer depends on libpng12-0, which is replace in yakkety (16.10) with libpng16-16. You can try using the libpng12-0 package from the xenial repository:" | |
| http://askubuntu.com/questions/838949/ubuntu-16-10-teamvieweri386-depends-on-libpng12-0 | |
| Download version 12 at https://www.teamviewer.com/en/download/linux/ | |
| ila@ig:~$ cd Downloads/ | |
| ila@ig:~/Downloads$ ll | |
| total 45476 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| header('Content-Type:application/json'); | |
| $verb=$_SERVER['REQUEST_METHOD']; | |
| include_once '../../../class/db.php'; | |
| if ($verb=="GET") { | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //API | |
| public static function get_list($table,$displayType,$fields=NULL,$complement=NULL) {//Default = JSON | |
| try { | |
| $db=new db(); | |
| if(isset($fields) && isset($complement)){ | |
| $db->sql = "SELECT $fields FROM $table $complement;"; | |
| } | |
| else{ | |
| $db->sql = "SELECT * FROM $table;"; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //This API was ispired by White House Web API Standards => https://github.com/WhiteHouse/api-standards | |
| //This method should provide more flexibility to the front-end team. | |
| //We can create queries directly in the URL and grab the result in JSON to be used to render DOM objects or arr to debug prupose. | |
| <?php | |
| header('Content-Type:application/json'); | |
| include_once '../../../class/db.php'; | |
| $verb=$_SERVER['REQUEST_METHOD']; | |
| if($verb=="GET"){ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <!-- Latest compiled and minified CSS --> | |
| <link rel="stylesheet" href="../assets/css/bootstrap.min.css"> | |
| <!-- jQuery library --> | |
| <script src="../assets/js/jquery-3.1.1.min.js"></script> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //This is a constructor that will return a handle to deal with a connection to the database MySQL | |
| public function __construct() { | |
| $this->dsn = "xxxxxxxx"; | |
| $this->username = "xxxxxxx"; | |
| $this->password = "xxxxx"; | |
| $this->db = "xxxxx"; | |
| try { | |
| $this->conn = new PDO("mysql:host=$this->dsn; dbname=$this->db", $this->username, $this->password); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //This is an method of an API that will create new resources in the database. | |
| //Insert new users (STAFF). | |
| public static function update_manageResources($jsonInfo) { | |
| try { | |
| $arrData=json_decode($jsonInfo, true); | |
| $arrMapProfession=[ | |
| "1"=>"assistant", |