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
{ | |
"python.formatting.provider": "autopep8", | |
"python.formatting.autopep8Args": [ | |
"--max-line-length", | |
"120", | |
], | |
"python.testing.nosetestArgs": [ | |
"ms2" | |
], |
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
WITH tdf_truncate AS ( | |
-- truncate datetime yang sampai miliseconds | |
SELECT | |
date_trunc('second', critical_time) AS crt, | |
date_trunc('second', datetime_stock) AS dts, | |
id_spbu, | |
id_product, | |
shift | |
FROM | |
opt.t_demand_forecast137 |
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
select t.table_schema, | |
t.table_name, | |
c.column_name | |
from information_schema.tables t | |
inner join information_schema.columns c on c.table_name = t.table_name | |
and c.table_schema = t.table_schema | |
where c.column_name ilike '%shift%' | |
and t.table_schema not in ('information_schema', 'pg_catalog') | |
and t.table_type = 'BASE TABLE' | |
order by t.table_schema; |
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
git ls-files | xargs wc -l | |
git ls-files | grep '\.py' | xargs wc -l |
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 Station: | |
""" | |
This class is a struct for Station | |
""" | |
def __init__(self, | |
schedules: 'list of Schedules', | |
colour: str): | |
self.schedules = schedules | |
self.colour = colour |
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 LessonCategory { | |
final String name; | |
LessonCategory(this.name); | |
@override | |
String toString() { | |
return 'LessonCategory{name: $name}'; | |
} | |
} |
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 Item { | |
int personId; | |
Item({this.personId}); | |
String toString() { | |
return "$personId"; | |
} | |
} | |
List<Item> list = [ |
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
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Buttom Sheet avoid Keyboard', |
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
{ | |
"liveServer.settings.port": 5600, | |
"workbench.settings.useSplitJSON": false, | |
"workbench.tree.indent": 24, | |
"files.exclude": { | |
"**/.idea": true, | |
"**/__pycache__": true, | |
"**/*.pyc": true, | |
"**/.git": true, | |
"**/*.lock": true, |
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
// Ref : https://theburningmonk.com/2013/09/dart-implementing-the-singleton-pattern-with-factory-constructors/ | |
class CommonClass { | |
CommonClass() { | |
print("Init : CommonClass"); | |
} | |
String namaDev; | |
String get getNamaDev { |