Skip to content

Instantly share code, notes, and snippets.

{
"odd": {
"monday": [
{
"start": "08:00:00",
"end": "08:35:00"
},
{
"start": "08:05:00",
"end": "08:40:00"
[
{
"id":3,
"code":"live-quiz-video-1",
"type":"live-quiz-video",
"name":{
"en":"Live Quiz Video 1"
},
"subtitle":{
"en":"Stay tuned!"
// 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()
{
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
};
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') );
#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
}
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++;
<?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;
/**
/**
* 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);
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