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 com.chanakaSample; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
/** | |
* Root resource (exposed at "myresource" path) | |
*/ |
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 com.chanakaSample.model; | |
import javax.xml.bind.annotation.XmlRootElement; | |
@XmlRootElement | |
public class User { | |
private String id; | |
private String name; | |
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 com.chanakaSample.model; | |
import javax.xml.bind.annotation.XmlRootElement; | |
@XmlRootElement | |
public class User { | |
private String id; | |
private String name; | |
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 com.chanakaSample.repository; | |
import java.util.ArrayList; | |
import java.util.List; | |
import com.chanakaSample.model.Activity; | |
import com.chanakaSample.model.User; | |
public class ActivityRepositoryStub implements ActivityRepository { |
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 com.chanakaSample.repository; | |
import java.util.List; | |
import com.chanakaSample.model.Activity; | |
public interface ActivityRepository { | |
public abstract List<Activity> findAllActivities(); |
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 com.chanakaSample; | |
import java.util.List; | |
import javax.ws.rs.Consumes; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.POST; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; | |
import javax.ws.rs.Produces; |
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 = require('express')(); | |
var server = require('http').Server(app); | |
var io = require('socket.io')(server); | |
server.listen(8080, function (err) { | |
if (err) { | |
console.error(err); | |
} else { | |
console.log("Server listening on port 8080"); | |
} | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<h1>Socket Demo</h1> | |
<script src="https://cdn.socket.io/socket.io-1.3.7.js"></script> | |
<script> |
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.module('data_visualize') | |
.controller('ViewPersonController', function ($scope, personService, $interval, $q) { | |
var fakeI18n = function (title) { | |
var deferred = $q.defer(); | |
$interval(function () { | |
deferred.resolve('col: ' + title); | |
}, 1000, 1); | |
return deferred.promise; | |
}; |
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.directive('img', -> | |
# restrict: 'A' | |
link: (scope, iterStartElement, attr, element) -> | |
`function getImages(name) { | |
var images = document.getElementsByTagName('img'); | |
console.log("Demo name", name); | |
console.log("IMAGE LENGTH : ", images.length); | |
console.log(images); | |
var i; | |
for (i = 0; i < images.length; i++) { |