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
version: "3.8" | |
services: | |
web: | |
command: | |
["sh", "-c", "python manage.py migrate && python manage.py runserver"] | |
volumes: | |
- .:/app | |
working_dir: /app | |
ports: |
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
setState(() { | |
// change the size of the container | |
height = 300; | |
width = 300; | |
}); |
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
AnimatedContainer( | |
color: Colors.blue, | |
// give the animation duration | |
duration: const Duration(milliseconds: 300), | |
// assign the height and width to the container | |
height: height, | |
width: width, | |
child: Center( | |
child: Text( | |
'Animate Me', |
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
// set the initial size of the container | |
double height = 200; | |
double width = 200; |
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 _scrollToWidget() async { | |
// find the index of fruit to scroll to in fruits | |
// let's scroll to Mandarina | |
final index = fruits.indexOf('Mandarina'); | |
// get global key of Mandarina | |
final key = _fruitKeys[index]; | |
// find the render box of Mandarina | |
var box = key.currentContext?.findRenderObject(); | |
_scrollController.position.ensureVisible( |
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 _scrollToWidget() async { | |
// find the index of fruit to scroll to in fruits | |
// let's scroll to Mandarina | |
final index = fruits.indexOf('Mandarina'); | |
// get global key of Mandarina | |
final key = _fruitKeys[index]; | |
// find the render box of Mandarina | |
var box = key.currentContext?.findRenderObject(); | |
// if box is not in the view port, scroll to it |
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
final _scrollController = ScrollController(); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Center( | |
child: ListView.builder( | |
// assign scroll controller to list view | |
controller: _scrollController, | |
itemBuilder: (context, index) { |
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
// list of fruits | |
var fruits = [ | |
'Apple', | |
'Banana', | |
'Cherry', | |
'Grape', | |
'Kiwi', | |
'Mango', | |
'Orange', | |
'Pear', |
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
# Add this script to Task Scheduler | |
# and schedule it to run at logon | |
# in the action start a powershell program and give the arguments | |
# -Command "Get-Content -Path '<Path To Script>' -Raw | Invoke-Expression" | |
$watcher = New-Object System.IO.FileSystemWatcher; | |
$watcher.Path = "$HOME\AppData\Local\Packages\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\TempState\ScreenClip"; |
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
$time = Get-Date | |
$hourToSwitch = 18 | |
$tillHour = 6 | |
$shouldSwitchSystemTheme = 1 | |
# function to get list of hours between hourtoswitch and tillhour | |
function GetDarkHours() | |
{ | |
$hours = New-Object System.Collections.Generic.List[int] |
NewerOlder