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
| $("#my-button").on("click", function(){ | |
| // Data to post | |
| data = { | |
| ids: [1, 2, 3, 4, 5] | |
| }; | |
| // Use XMLHttpRequest instead of Jquery $ajax | |
| xhttp = new XMLHttpRequest(); | |
| xhttp.onreadystatechange = function() { |
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
| <html><head> | |
| <link rel="stylesheet" href="css/materialize.min.css"> | |
| <link rel="stylesheet" href="css/style.css"> | |
| </head> | |
| <body> | |
| <div class="white-container"> | |
| <div class="inner-content"> | |
| <div class="card-image"> | |
| <img src="img/Navbar.jpg" class="nav-image"> |
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
| // Angular JS code | |
| var app = angular.module('website', []) | |
| app.service('dataService', function() { | |
| this.UIData = { | |
| BorderedTable: [[ | |
| "index.html", | |
| 1266, | |
| 32.3 % , | |
| 321.33 | |
| ], [ |
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
| // Angular JS code | |
| angular.module('website', []). | |
| controller('MainController', function($scope) { | |
| // It is an array of object{Page, Visits, PerNewVisits,Revenue} | |
| $scope.BorderedTable = [["index.html", 1266, 32.3%, 321.33], | |
| ["about.html", 261, 33.3%, 234.12]]; | |
| $scope.BorderedWithStrippedTable = [["index.html", 1266, 32.3%, 321.33], | |
| ["about.html", 261, 33.3%, 234.12]]; |
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
| app.controller('MainController', function($scope, $http, dataService) { | |
| $scope.data = dataService.UIData; | |
| $scope.addBorderedTableRow = function(data) { | |
| $scope.data.BorderedTable.push(data); | |
| var req = { | |
| method: 'POST', | |
| url: 'http://posturl', | |
| headers: { | |
| 'Content-Type': "application/json" |
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
| var app = angular.module('sampleApp'); | |
| // add this directive to your app | |
| app.directive( 'bootstrapSelect', [function() { | |
| return { | |
| restrict: 'A', | |
| link: function( scope, elem, attrs ) { | |
| elem.ready(function(){ |
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
| var gulp = require("gulp"); | |
| var minifyHtml = require("gulp-minify-html"); | |
| var minifyCss = require("gulp-minify-css"); | |
| var uglify = require("gulp-uglify"); | |
| var concat = require("gulp-concat"); | |
| var paths = { | |
| scripts: "src/js/*.js", | |
| styles: "src/css/*.css", | |
| html: "src/*.html" |
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
| package main | |
| import ( | |
| "github.com/gorilla/mux" | |
| "log" | |
| "net/http" | |
| "time" | |
| "fmt" | |
| ) |
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
| package main | |
| import ( | |
| "fmt" | |
| "html" | |
| "log" | |
| "net/http" | |
| "os" | |
| "time" | |
| ) |
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
| var gulp = require("gulp"); | |
| var shell = require('gulp-shell'); | |
| // This compiles new binary with source change | |
| gulp.task("install-binary", shell.task([ | |
| 'go install github.com/narenaryan/myserver' | |
| ])); | |
| // Second argument tells install-binary is a deapendency for restart-supervisor | |
| gulp.task("restart-supervisor", ["install-binary"], shell.task([ |