This file contains 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
# Artie - Artie Server | |
# | |
# Real-time messaging service | |
description "artie" | |
start on filesystem | |
stop on runlevel S | |
respawn |
This file contains 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 example.pubsub; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class BackgroundThread { | |
public static void main(String[] args) { | |
int numThreads = 1; | |
ExecutorService executor = Executors.newFixedThreadPool(numThreads); |
This file contains 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
MTVL1141e38aa:app saung$ pwd | |
/tmp/app | |
MTVL1141e38aa:app saung$ ls | |
MTVL1141e38aa:app saung$ git clone https://github.com/sithu/cmpe273-assignment2 | |
Cloning into 'cmpe273-assignment2'... | |
remote: Counting objects: 225, done. | |
remote: Compressing objects: 100% (114/114), done. | |
remote: Total 225 (delta 53), reused 208 (delta 36) | |
Receiving objects: 100% (225/225), 31.01 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (53/53), done. |
This file contains 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
// to test... | |
// curl -T path/to/file.tar.gz http://localhost:8000 | |
var http = require('http') | |
var fs = require('fs') | |
http.createServer(function(req, rsp){ | |
var file = fs.createWriteStream("mynewfile") | |
This file contains 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
// to test... | |
// curl -T path/to/file.tar.gz http://localhost:8000 | |
var http = require('http') | |
var fs = require('fs') | |
http.createServer(function(req, rsp){ | |
var file = fs.createWriteStream("mynewfile") | |
This file contains 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
Class Main { | |
public void bfs() | |
{ | |
// BFS uses Queue data structure | |
Queue queue = new LinkedList(); | |
queue.add(this.rootNode); | |
printNode(this.rootNode); | |
rootNode.visited = true; | |
while(!queue.isEmpty()) { | |
Node node = (Node)queue.remove(); |
This file contains 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
// Check student implement these logics! | |
// index.js | |
// (1 pt) | |
function post(request, response) { | |
// read 'name and email from the request.body' | |
// get new session id | |
// set new session id as the 'session_id' cookie in the response | |
// replace "Logged In" response with response.end(login.hello(newSessionId)); | |
}; |
This file contains 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
# sudo add-apt-repository ppa:cwchien/gradle | |
# sudo apt-get update | |
# sudo apt-get install gradle | |
# Runnable class | |
apply plugin: 'java' | |
jar { | |
manifest { | |
attributes 'Main-Class': 'com.foo.bar.MainClass' |
This file contains 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 sandbox.spring; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
public class App { | |
public static void main(String[] args) { | |
ApplicationContext context = | |
new ClassPathXmlApplicationContext("applicationContext.xml"); | |
SampleBean sample = context.getBean(SampleBean.class); |
This file contains 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 edu.sjsu.cmpe273.lab2; | |
import io.grpc.ChannelImpl; | |
import io.grpc.transport.netty.NegotiationType; | |
import io.grpc.transport.netty.NettyChannelBuilder; | |
import java.util.concurrent.TimeUnit; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; |
OlderNewer