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
void main() { | |
var num1 = 40; | |
var num2 = 5; | |
print("AND\n"); | |
print(num1 & num2); | |
print("OR\n"); | |
print(num1 | num2); | |
print("XOR\n"); |
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
'use strict'; | |
const crypto = require('crypto'); | |
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key | |
const IV = "5183666c72eec9e4"; // set random initialisation vector | |
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex'); | |
const phrase = "who let the dogs out"; | |
var encrypt = ((val) => { |
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 'package:flutter/material.dart'; | |
import 'package:theme_tutorial/theme_controller.dart'; | |
class ThemeConfiguration { | |
///github @nggepe | Theme configuration | |
///```themeController``` merupakan Object ```ThemeController```. tekan | |
///```ctrl+click``` dan mengedit tema aplikasi anda pada kode dibawah bedasarkan kebutuhan anda | |
static ThemeData switcher(ThemeController themeController) { | |
switch (themeController.currentTheme) { | |
case "dark": |
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 'package:flutter/material.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
class ThemeController extends ChangeNotifier { | |
static const themePrefKey = 'theme'; | |
/// menampilkan tema default anda | |
ThemeController(this._prefs) { | |
// mengambil tema untuk inisialisasi shared preferences | |
_currentTheme = _prefs.getString(themePrefKey) ?? 'light'; |
NewerOlder