This file contains 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
{ | |
"odd": { | |
"monday": [ | |
{ | |
"start": "08:00:00", | |
"end": "08:35:00" | |
}, | |
{ | |
"start": "08:05:00", | |
"end": "08:40:00" |
This file contains 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
[ | |
{ | |
"id":3, | |
"code":"live-quiz-video-1", | |
"type":"live-quiz-video", | |
"name":{ | |
"en":"Live Quiz Video 1" | |
}, | |
"subtitle":{ | |
"en":"Stay tuned!" |
This file contains 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
// CAN-BUS Shield - Version: Latest | |
#include <SPI.h> | |
#include <mcp_can.h> | |
#include <mcp_can_dfs.h> | |
MCP_CAN CAN(10); // Set CS to pin 10 | |
void setup() | |
{ |
This file contains 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
jQuery(function($){ | |
$('#blog-load-more').click(function(e){ | |
e.preventDefault(); | |
var button = $(this), | |
data = { | |
'action': 'loadmore', | |
'query': pcc_loadmore_params.posts, // that's how we get params from wp_localize_script() function | |
'page' : pcc_loadmore_params.current_page | |
}; |
This file contains 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
function pcc_my_load_more_scripts() { | |
global $wp_query; | |
// In most cases it is already included on the page and this line can be removed | |
wp_enqueue_script('jquery'); | |
// register our main script but do not enqueue it yet | |
wp_register_script( 'pcc_loadmore', get_stylesheet_directory_uri() . '/js/loadmore.js', array('jquery') ); |
This file contains 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
#include <SoftwareSerial.h> | |
SoftwareSerial uartSerial(D5, D6); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); // serial / USB port | |
uartSerial.begin(9600); // software serial port | |
} |
This file contains 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
void segregateEvenOdd(int arr[], int size) | |
{ | |
/* Initialize left and right indexes */ | |
int left = 0, right = size-1; | |
while (left < right) | |
{ | |
/* Increment left index while we see 0 at left */ | |
while (arr[left]%2 == 0 && left < right) | |
left++; | |
This file contains 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 namespace App\Http\Controllers\Api; | |
use App\Entities\Agency; | |
use App\Entities\Role; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
use App\User; | |
use Illuminate\Support\Collection; | |
/** |
This file contains 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
/** | |
* index | |
* | |
* @description List product groups | |
* @return mixed | |
*/ | |
public function index(Request $request, User $user) | |
{ | |
if (false === is_null($request->id)) { | |
$userEntry = $user::with('role', 'agencies')->find($request->id); |
This file contains 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
Route::group(['prefix' => 'api/v1', 'middleware' => 'api'], function () { | |
// Api public routes | |
Route::post('/authenticate', 'Api\AuthController@authenticate'); | |
Route::get('/logout', 'Api\AuthController@logout'); | |
Route::get('/session_error', 'Api\AuthController@session_error'); | |
// Api protected routes |
NewerOlder