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
public class Csv2array { | |
public static void main(String[] args) { | |
if (args.length < 1) { | |
System.out.println("Usage: java -jar Csv2array.jar [username(comma separated username)]"); | |
System.exit(-1); | |
} | |
String[] split = args[0].split(","); | |
String[] usernameArray = new String[split.length]; | |
for (int i = 0; i < usernameArray.length; i++) { |
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
private static final String verifyToken = "this_is_test"; | |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
String hubMode = request.getParameter("hub.mode"); | |
String hubChallenge = request.getParameter("hub.challenge"); | |
String hubVerifyToken = request.getParameter("hub.verify_token"); | |
if (hubMode != null && !hubMode.isEmpty() && hubChallenge != null | |
&& !hubChallenge.isEmpty() && hubVerifyToken != null && !hubVerifyToken.isEmpty()) { | |
if (hubVerifyToken.equals(verifyToken)) { |
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
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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 sent_yo; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.ClientProtocolException; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; |
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
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import javax.xml.bind.DatatypeConverter; | |
import org.xml.sax.Attributes; | |
import org.xml.sax.helpers.DefaultHandler; | |
public class SaxHandler extends DefaultHandler { | |
boolean entryFlag; // <entry></entry>内であることを記憶するフラグ |
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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.0.0/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 500px; | |
width: 100%; | |
} | |
</style> |
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
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.MultipartConfig; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.Part; |
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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.0.0/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 500px; | |
width: 100%; | |
} |
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
import sys | |
import wiringpi2 | |
from time import sleep | |
wiringpi2.wiringPiSetup() | |
i2c = wiringpi2.I2C() | |
lps25h = i2c.setup(0x5C) | |
whoami = i2c.readReg8(lps25h,0x0F) | |
if whoami != 0xBD: | |
print "error" |
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
// add under "int RCS620S::initDevice(void){...}" | |
void RCS620S::tgInitTarget(const uint8_t* idm, const uint8_t* pmm, const uint8_t* rfu) | |
{ | |
uint8_t response[RCS620S_MAX_RW_RESPONSE_LEN]; | |
uint16_t responseLen; | |
uint8_t command[RCS620S_MAX_RW_RESPONSE_LEN] = {0x00}; | |
uint8_t start[2] = {0xd4, 0x8c}; // command code & sub command code | |
uint8_t activated[1] = {0x02}; // Activated limit | |
uint8_t params106[6] = {0x00, 0x04, 0x00, 0x00, 0x00, 0x40}; // 106kbpsParams(6byte) |
OlderNewer