View exchangerate_sgd_jpy.rb
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
require 'open-uri' | |
require 'json' | |
BASE_URI = "https://openexchangerates.org/api/" | |
API = "latest.json" | |
## APP_ID は API key のようなものです。openexchangerates.org 登録すると発行されます。 | |
APP_ID = "YOUR_APP_ID" | |
uri = BASE_URI + API + "?app_id=" + APP_ID |
View gist:b38f00e465fd00a7ef26
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
SELECT * FROM table; |
View gist:ae0d3d95d4c1d4a0cb87
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
INSERT INTO table (column_1, column_2, column_3) VALUES (value_1, value_2, value_3) |
View gist:1f7aec368a0eb3dabf7e
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
CREATE TABLE table ( | |
column_1 data_type, | |
column_2 data_type, | |
column_3 data_type | |
); | |
View gist:0043aad35d8edcac74ff
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
ALTER TABLE table ADD COLUMN column data_type; |
View gist:00442abc7ffe285b5247
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
UPDATE table | |
SET update_column = update_value | |
WHERE condition_column = condition_value; |
View gist:fce80ea7a9e3cb2cfe96
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
DELETE FROM table | |
WHERE condition_column IS condition_value; |
View gist:858de4b8b40345389c24
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
// Required to include #include <sys/sysctl.h> | |
- (BOOL)isTSMC { | |
size_t size; | |
sysctlbyname("hw.model", NULL, &size, NULL, 0); | |
char *model = (char*)malloc(size); | |
sysctlbyname("hw.model", model, &size, NULL, 0); | |
NSString *modelName = [NSString stringWithCString:model encoding:NSUTF8StringEncoding]; | |
free(model); | |
NSLog(@"modelName: %@", modelName); |
View Arduino_LED_Blink.ino
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
#define LED_PIN 13 | |
void setup() { | |
// LED_PIN (PIN 13) を OUTPUT として設定します | |
pinMode(LED_PIN, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(LED_PIN, HIGH); // LED_PIN を HIGH にします(点灯) | |
delay(1000); // 1秒待ちます |
OlderNewer