Skip to content

Instantly share code, notes, and snippets.

View barais's full-sized avatar

Barais barais

View GitHub Profile
@barais
barais / .java
Last active June 14, 2017 22:05
File[] files = Maven.resolver().resolve("G1:A1:V1", "G2:A1:V1").withTransitivity().asFile();
Archive[] archives = new Archives[files.length];
int i = 0;
for (File f:files){
JavaArchive archive = ShrinkWrap.create(ZipImporter.class)
.importFrom(file).as(JavaArchive.class);
archives[i]= archive;
i = i+1;
}
//Sample 1
create structure foreach e:#["whole − jvm"] using
constructor
initialObjects = #Object[]
existValue = false
membership true
updates
@barais
barais / xml
Last active May 10, 2016 14:03
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>org.kevoree.library.cloud.root</artifactId>
<groupId>org.kevoree.library.cloud</groupId>
<version>5.3.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $log, $http) {
$scope.send = function() {
$http({
method: 'GET',
url: 'https://swapi.co/api/people/' + $scope.numeropersonage + '/?format=json'
}).then(function successCallback(response) {
$log.log(response.data);
$scope.res = response.data;
}, function errorCallback(response) {
add nodeDocker : JavaNode
add nodeDocker.master, nodeDocker.redis : DockerContainer
add sync_dashboard : RemoteWSGroup
add node0 : JavascriptNode
add node0.comp989 : KevScript
add node0.comp464 : Ticker
add node0.comp722 : InstanceMonitor
add chan191, chan931 : LocalChannel
@barais
barais / kevs
Last active January 11, 2016 15:51
add web3, web2, web1, edison2, edison3, edison1, edison4, edison5 : JavascriptNode
add edisonGroup : RemoteWSGroup
attach edison1, edison2, edison3, edison4, edison5, web1, web2, web3 edisonGroup
set edisonGroup.answerPull/edison2="false"
set edisonGroup.answerPull/edison3="false"
set edisonGroup.answerPull/edison4="false"
set edisonGroup.answerPull/edison5="false"
set edisonGroup.answerPull/web1="false"
package fr.ensai.jaxrs;
import fr.ensai.jaxrs.domain.Message;
public class LoggerObserver implements Observer{
static Observer instance = new LoggerObserver();
public static Observer getInstance() {
return instance;
}
package fr.ensai.jaxrs;
public interface Subject {
void addObserver(Observer o);
void removeObserver(Observer o );
}
package fr.ensai.jaxrs;
public interface Observer {
public void notify(Object o);
}
package fr.ensai.jaxrs;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;