View _sampleQueryCall.js
var spreadSheet = SpreadsheetApp.getActiveSpreadsheet();
var documentSheet = spreadSheet.getSheetByName("Words");
var range =documentSheet.getRange("F8");
var query = '=ToCSV(query(E12:F27,"select F where E > ' +"'cc'"+'"))';
range.setFormula(query);
Browser.msgBox(range.getValue());
range.setFormula("");
View ArrayToCSV.js
function ArrayToCSV(array){
var csv="";
for(var i=0;i<array.length;i++){
csv+=array[i]+",";
}
csv=csv.slice(0,-1);
return csv;
}
View gist-github-gadget.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Derquinse Gist.GitHub Gadget">
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="gistId" display_name="Gist #" required="true" />
<Content type="html">
<![CDATA[
<div id="content_div">
View _sampleGWTRPCClient.java
XXXXServiceAsync service = GWT.create(XXXXService.class);
//RPC処理
service.xxxx("", new AsyncCallback<String>() { //XXXXのところは変更
public void onSuccess(String result) {
// RPC呼び出しが成功したときの処理
}
public void onFailure(Throwable caught) {
View _sampleOutputJson.js
var json; //jsonのデータを格納しておく
var output = ContentService.createTextOutput();
output.setMimeType(ContentService.MimeType.JSON);
output.setContent(jsonp);
return output;
View better-gist-styles.css
/* Better styles for embedding GitHub Gists */
.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%}
.gist pre{font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important}
.gist-meta{font-family:Helvetica,Arial,sans-serif;font-size:13px !important}
.gist-meta a{color:#26a !important;text-decoration:none}
.gist-meta a:hover{color:#0e4071 !important}
View _sampleGWTGoogleGadget.xml
<module>
<moduleprefs title="SampleGWT">
<content href="SampleGWT.html" type="url">
</content>
</moduleprefs>
</module>
View _sampleFirstOpenCVSharp.cs
//This code is quoted from the following URL
//http://schima.hatenablog.com/entry/2013/12/15/110513
using (var img = new IplImage(@"C:\OpenCv\Lena.png")) {
//Matが使えないケースがたまにあるので、最初に確認しておきましょう
Mat mat = new Mat(img);
Cv2.ImShow("mat",mat);
Cv.SetImageROI(img, new CvRect(200, 200, 180, 200));
Cv.Not(img, img);
View showMultiTiff.cs
private void showMultiTiff(string tiffFileName){
FileStream tifFS = new FileStream( tiffFileName , FileMode.Open , FileAccess.Read ) ;
Image gim = Image.FromStream( tifFS ) ;
FrameDimension gfd = new FrameDimension(gim.FrameDimensionsList[0]);
int pageCount = gim.GetFrameCount( gfd ) ;//全体のページ数を得る
System.Diagnostics.Debug.WriteLine(pageCount);
Graphics g = pictureBox1.CreateGraphics();
for(int i=0;i<pageCount;i++){
gim.SelectActiveFrame(gfd, i);
g.DrawImage(gim, 0,0, pictureBox1.Width, pictureBox1.Height);//PictureBoxに表示してます
View bitmap2IplImage.cs
// Bitmap to IplImage
IplImage iplOriginal = (OpenCvSharp.IplImage)BitmapConverter.ToIplImage(beforeBitmap);
// IplImage to Bitmap
Bitmap afterBitmap = BitmapConverter.ToBitmap(iplOriginal);