Skip to content

Instantly share code, notes, and snippets.

View chanakaDe's full-sized avatar
Amor vincit omnia.

Chanu De Silva chanakaDe

Amor vincit omnia.
View GitHub Profile
import React, { Component } from 'react';
import './App.css';
import News from './News/News';
import Sidenews from "./News/Sidenews";
import Planet from "./Elements/Planet";
class App extends Component {
constructor() {
super();
import React, { Component } from 'react';
class Planet extends Component {
constructor(props) {
super(props);
}
render() {
let planets = this.props.planets;
console.log("check data : ", planets);
[ [ '201801', '(Other)', '129' ],
[ '201801', 'Direct', '2236' ],
[ '201801', 'Email', '2' ],
[ '201801', 'Organic Search', '6263' ],
[ '201801', 'Referral', '185' ],
[ '201801', 'Social', '669' ],
[ '201802', '(Other)', '371' ],
[ '201802', 'Direct', '2037' ],
[ '201802', 'Email', '3' ],
[ '201802', 'Organic Search', '5790' ],
//Some import statements are missing here. Not added.
var app = require('express')();
var server = require('http').createServer(app);
var io = require('socket.io')(server);
// Creating the socket connection.
io.sockets.on('connection', function (socket) {
socket.on('join', function (data) {
socket.join(data.id);
});
// this is how i call service from controller
sessionService.getAllSessions(100, 0).then(function (data) {
console.log(data);
$scope.allSessions = data.data;
});
// This is the service layer
getAllSessions: function (limit, offset) {
return $http({
method: "GET",
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
/**
* Weekdays calculator
* @author Andrei Kondratev [[email protected]]
*/
;if ( typeof require !== 'undefined' )
{
moment = require('moment');
}
(function(moment) {
{
"list_object" : [
{"app_name": "app 1", "package_name": "package.name" },
{"app_name": "app 2", "package_name": "package.name22" },
{"app_name": "app 3", "package_name": "package.name33" },
{"app_name": "app 4", "package_name": "package.name44" },
{"app_name": "app 5", "package_name": "package.name55" }
] ,
"child_id" : 13
}
{
"name": "CommonHoliday",
"id": 1,
"title": "Common Holiday",
"hidden": false,
"sealed": false,
"abstract": false,
"version": "1.0",
"fields": [
{
// **************** page 12 ****************
var remoteTimeOb = {
mode: "MODE_BLOCK_TIME",
status: "add",
day: day,
start: start_time,
end: end_time,
device: $scope.selectedChild.one_signal_id
};