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 |
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; |
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) |
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 | |
); | |
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; |
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; |
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; |
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); |
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