Skip to content

Instantly share code, notes, and snippets.

View jabdul's full-sized avatar
🎯
Focus

James Abdul jabdul

🎯
Focus
View GitHub Profile
Q1. Does Node.js support multi-processor platforms and how can we utilize all processor resources?
Q2. Write an event listener for the emitted customEvent and print to console the 'arg'
const EventEmitter = require('events');
class MyEmitter extends EventEmitter {
myFunc() {
this.emit('customEvent');
Q1. What is the InteractionManager and how is it used? Why is it important?
Q2. Which node_modules will run in React Native? How can we test for this?
Q3. What is wrong with this code for querying a native API?
class GyroJs {
setGyroPosition(pos) {
@jabdul
jabdul / CALL get_address Stored Procedure
Last active August 29, 2015 14:22
Stored procedure call in Laravel 5.0
if (isset($uri)) {
$result = DB::statement('CALL get_address_id(?, @address_id)',
array($uri)
);
$address_id = DB::select('SELECT @address_id');
$address_data = DB::select('CALL get_address(?)',
array($address_id[0]->{'@address_id'})
);
return $this->createJSONResponse(array(get_object_vars($address_data[0])), $uri, null);
}