Skip to content

Instantly share code, notes, and snippets.

View riversun's full-sized avatar
🎯
Focusing

riversun

🎯
Focusing
  • Tokyo,Japan
View GitHub Profile
@riversun
riversun / DesedeCrypter.java
Created March 23, 2018 11:24
Java Triple-Des(3DES,Desede) Enctype/Decrypt Example トリプルDES
package com.example;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* Encrypt/Decrypt text2text by using Triple-DES
*
* @author Tom Misawa (riversun.org@gmail.com)
@riversun
riversun / ToDataURI.java
Created November 22, 2017 05:37
Java Example: Convert A binary file to data URI in Java
package org.example;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import javax.xml.bind.DatatypeConverter;
public class ToDataURI {
@riversun
riversun / LowpassFilter.js
Created November 6, 2017 10:55
LowpassFilter for Java Script
var LowpassFilter = (function () {
function LowpassFilter(params) {
this.mSamplingRange = 0;
this.mSamplingBuffer = [];
this.mCurrentFilterVal = 0;
this.mCurrentDataNumber = 0;
this.setSamplingRange(20);
}
@riversun
riversun / js_singleton_class.js
Created April 18, 2017 09:02
Singleton class for JS(ES5 style)
//namespace[begin]****************************
var mypackage;
if (mypackage === undefined) {
mypackage = {};
}
//namespace[end]****************************
mypackage.MyClass =
(function () {
@riversun
riversun / thennable_method.js
Created April 13, 2017 02:16
Snipet of Tehnnable(Promise) Method prototype
/**
* Thennable Method(prototype)
* @param myObject
* @returns {Promise}
*/
MyClazz.prototype.method = function (myObject) {
var me = this;
return new Promise(function (resolve, reject) {
Apply "refs/heads/master" in the Source
@riversun
riversun / mvnDeploy.txt
Created January 19, 2017 11:44
MVN Deploy
mvn clean deploy
=>
https://oss.sonatype.org/
@riversun
riversun / EclipseGitFetchTips.txt
Created January 19, 2017 11:41
Configure Fetch at the GIT perspective
Configure Fetch at the GIT perspective
Apply "refs/heads/master" in the Source
Apply "refs/remotes/origin/master" in the Destination(Maybe set automatically)
@riversun
riversun / EasyCanvas.java
Created October 4, 2016 06:36
[Java]Easy to draw graphics on Java Window App
/**
* Copyright 2006-2016 Tom Misawa(riversun.org@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@riversun
riversun / HelloImpl With WSDL LocationSpecified.java
Last active September 30, 2016 07:34
[SOF]How create JAX-WS webservices server and client
package test;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebParam.Mode;
import javax.jws.WebService;
/**
* Service Logic Class
*