「swift」オプショナルチェーン(Optional Chaining)を利用するサンプル
サンプルコード
var myString:String?
myString = “Hello, Swift!”
if let cftString = myString {
「Swift」定数宣言(ConstantA、ConstantB、ConstantCなど )の書き方
1.説明
定数名 接頭辞
ConstantA let
ConstantB private let
ConstantC static let
ConstantD private st ...
「Swift」定数の値を出力する方法
サンプルコード
let name = “最新IT情報”
let hp = “
print(“\(name)のホームページ:\(hp)”) ...
「Swift入門」定数宣言を利用するサンプル
書式
var constantName:<data type> = <optional initial value>
サンプルコード
let constA = 80
prin ...
「Swift入門」定数を初期化するサンプル
1.型を明示
let str: String
let num: Int
2.型を明示して初期化
let strA: String = “test data”
let ...
「Swift」クラスを継承するサンプル
サンプルコード
class StudDetails{ var mark1: Int; var mark2: Int; init(stm1:Int, results stm2:Int) { mark1 = stm1; mark2 ...「Swift」dynamicTypeで変数の型を調べるサンプル
サンプルコード
var strCity = “tokyo”
var flag = false
print(strCity.dynamicType)
結果: String ...
「Swift」countで配列の要素数を取得する
サンプルコード
var strStation =
print(strStation.count)
結果:4
strStation.append(“渋谷”)
print ...
「Swift」isEmptyで文字列が空かどうかを判断する
サンプルコード
if strCft.characters.count == 0 {
print(“文字列が空です”)
}
if strCft == “” ...
Voyager 1.3.2ダウンロード
更新内容
Remove Route in InstallCommand (#4692)Assign Controller to DataTypes roles (#4670)
Enhance Widget Layo ...
Atom 1.45.0 ダウンロード
更新内容
#20194 – Improve Java syntax highlightingatom/github#2399 – Git repository context may be ...
Spring Integration 5.3ダウンロード
更新内容
Reactive transactions support. The ReactiveTransactionManager can now be configured for endpoints which produ ...PyCharm 2020.1 EAP 7がリリース
更新内容
Command-line docker run options
Better UX for configuring project interpreter
不具合修正
PyCharm res ...Spring Boot 2.3.0.M3ダウンロード
更新内容
Support for gracefully shutting down the embedded web serverSupport for customizing the layers when build ...
IntelliJ IDEA 2020.1 EAP8がリリース
概要内容
Reading Javadocs in the editor might be annoying because of all the tags you have to cut through, especial ...
「Spring MVC」 isAnnotationPresentメソッドを利用する方法
1.アノテーションの定義ファイル
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@R ...
「Java」Jacksonのエスケープ対象文字をするサンプル
サンプルコード
public CharEscapes()
{
charEscapes = standardAsciiEscapesForJSON();
charEscapes = CharacterEs ...
「Java」ObjectMapperのsetSerializationInclusion()を利用するサンプル
サンプルコード
public static class Sample { public int age = 20;public String user=null; } public static void test() thro ...