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
#!/bin/bash | |
user_id=`id -u` | |
if [ $user_id -ne 0 ]; then | |
echo "Need to run with sudo privilege" | |
exit 1 | |
fi | |
# Determine OS 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
void main() { | |
var service = Service(); | |
service.data.get(or: 99); | |
} | |
class Service<T> { | |
final Loading<T> data; | |
Service({this.data = Loading.loading}); | |
} |
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
void main() { | |
List<String> test = ["hello"]; | |
print("expected: true, actual : ${test is List<String>}"); | |
print("expected: false, actual : ${test is List<int>}"); | |
print("expected: false, actual : ${test is List<void>}"); | |
print("expected: true, actual : ${test is List<dynamic>}"); | |
print("Welcome to the void..."); | |
} |
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
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val button = findViewById(R.id.button) | |
val editText = findViewById(R.id.editText) as EditText | |
button.setOnClickListener { |