This file contains hidden or 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
%a(href="http://example.com" title="title") | |
Haml HTML-style Attributes -- 簡単! | |
/ その他 | |
%a{"href"=>"http://example.com", "title"=>"title"} | |
Ruby Hash (key: String) | |
%a{:href=>"http://example.com", :title=>"title"} |
This file contains hidden or 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
#include <stdio.h> | |
void main() { | |
int input; | |
int bit; | |
int show; | |
int i; | |
while (1) { | |
printf(">> "); |
This file contains hidden or 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 Time { | |
public String whatTime(int seconds) { | |
return seconds / 3600 + ":" + seconds % 3600 / 60 + ":" + seconds % 60; | |
} | |
} |
This file contains hidden or 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 BinaryCode { | |
public String[] decode(String message) { | |
return new String[] { assume('0', message), assume('1', message) }; | |
} | |
protected String assume(char p0, String message) { | |
char[] q = message.toCharArray(); | |
int len = q.length; | |
char[] p = new char[len]; |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data; | |
using System.Data.OleDb; | |
namespace ConsoleApplication1 | |
{ | |
class Program |
This file contains hidden or 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
var lines = dataGridView1.Rows.Cast<DataGridViewRow>().Select(row => { | |
return string.Join(",", | |
row.Cells.Cast<DataGridViewCell>().Select(cell => { | |
return string.Format("\"{0}\"", (cell.Value ?? "").ToString().Replace("\"", "\"\"")); | |
}) | |
); | |
}); | |
File.WriteAllLines("out.csv", lines, Encoding.GetEncoding(932)); |
This file contains hidden or 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.File; | |
import java.io.IOException; | |
import org.apache.sanselan.Sanselan; | |
import org.apache.sanselan.ImageReadException; | |
import org.apache.sanselan.common.IImageMetadata; | |
import org.apache.sanselan.formats.jpeg.JpegImageMetadata; | |
import org.apache.sanselan.formats.tiff.TiffImageMetadata; | |
import org.apache.sanselan.formats.tiff.TiffImageMetadata.GPSInfo; |
This file contains hidden or 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 static java.lang.Math.*; | |
public class Main { | |
public static void main(String[] args) { | |
double r = 6378.137; // 赤道半径[km] | |
// 大垣駅(lat = 緯度, lng = 経度) | |
double lat1 = 35.366944 * PI / 180; | |
double lng1 = 136.617833 * PI / 180; |
This file contains hidden or 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
<?php | |
/* pChartのexamplesディレクトリと同じ所に配置して下さい */ | |
require_once "../class/pData.class.php"; | |
require_once "../class/pDraw.class.php"; | |
require_once "../class/pImage.class.php"; | |
require_once "../class/pScatter.class.php"; | |
This file contains hidden or 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
#include <stdio.h> | |
void main() { | |
int a[] = {10, 20}, *p; | |
p = a; | |
printf("%d", ++*p++); // == (++(*(p++)) == 11 | |
} |