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; |
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
### Test 1 Output | |
ubuntu@ip-172-31-3-94:~/IO-LAB/FIO-CFG$ fio rread-latency.cfg | |
rread-latency-test: (g=0): rw=randread, bs=16K-16K/16K-16K, ioengine=libaio, iodepth=1 | |
fio 1.59 | |
Starting 1 process | |
rread-latency-test: Laying out IO file(s) (1 file(s) / 10240MB) | |
Jobs: 1 (f=1): [r] [100.0% done] [28397K/0K /s] [1733 /0 iops] [eta 00m:00s] | |
rread-latency-test: (groupid=0, jobs=1): err= 0: pid=1813 | |
read : io=2044.1MB, bw=34900KB/s, iops=2181 , runt= 60001msec | |
slat (usec): min=14 , max=2010 , avg=18.95, stdev= 7.17 |
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
// Original Spark Community Thread: http://community.spark.io/t/how-to-access-the-core-via-we-browser/9711 | |
// Code adapted from: http://arduino.cc/en/Tutorial/WebServer | |
/* Includes ------------------------------------------------------------------*/ | |
#include "application.h" | |
SYSTEM_MODE(AUTOMATIC); | |
TCPServer server = TCPServer(80); |
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 |
OlderNewer