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
| #出力 | |
| print 'hello (print)' # 改行なしで出力 | |
| puts 'hello(put)' # 改行ありで出力 | |
| p 'hello(p)' # デバッグ用出力(データ形式がわかる) | |
| #繰り返し | |
| for num in 1..3 do | |
| puts(num) | |
| end |
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
| //改行を消す | |
| str = str.replace(/\r?\n/g,""); | |
| //改行で区切り配列として得る | |
| strAry = str.split("\n"); | |
| //値の出力 | |
| console.log("NG"); | |
| //スペースでスペースで区切り配列として得る |
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
| <!-- ステータスバーの色を変更する--> | |
| <item name="android:statusBarColor">@android:color/white</item> |
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
| <!--アクションバーの影を消す--> | |
| <android.support.design.widget.AppBarLayout | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| app:elevation="0dp"> |
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> | |
| int main(void){ | |
| int i; | |
| for(i=0;i<20;i++){ | |
| if (i % 3 == 0 && i % 5 == 0) { | |
| printf("FizzBuzz\n"); | |
| } else if (i % 3 == 0) { | |
| printf("Fizz\n"); | |
| } else if (i % 5 == 0) { |
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
| for num in 1..20 do | |
| if num%3 == 0 && num%5 == 0 then | |
| puts('Fizz Buzz') | |
| elsif num%3 == 0 then | |
| puts('Fizz') | |
| elsif num%5 == 0 | |
| puts('Buzz') | |
| else | |
| puts(num) |
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
| override var preferredStatusBarStyle: UIStatusBarStyle { | |
| return .lightContent | |
| } |
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 UIKit | |
| import AVFoundation | |
| class ViewController: UIViewController { | |
| var audioPlayer : AVAudioPlayer! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
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 UIKit | |
| class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigationControllerDelegate { | |
| var imagePickUpButton:UIButton = UIButton() | |
| var picker: UIImagePickerController! = UIImagePickerController() | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
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 calendar = Calendar.getInstance() | |
| val year = calendar.get(Calendar.YEAR) | |
| val month = calendar.get(Calendar.MONTH) | |
| val day = calendar.get(Calendar.DAY_OF_MONTH) | |
| val hour = calendar.get(Calendar.HOUR_OF_DAY) | |
| val minute = calendar.get(Calendar.MINUTE) | |
| val second = calendar.get(Calendar.SECOND) | |
| Log.v("time:year",year.toString()) | |
| Log.v("time:month",month.toString()) |