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
const generateRandomFloatInRange = (min, max) => { | |
return (Math.random() * (max - min + 1)) + min; | |
}; | |
let obj = { | |
compras:[ | |
{ | |
produtos:[ | |
{ | |
valor_unitario:generateRandomFloatInRange(0,2) |
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
const MAX_LENGHT_FILE = 7; | |
const MAX_UPLOAD_SIZE = 5000000; | |
const temporaryFileList = []; | |
const dangerToast = (text) => { | |
console.error(text); | |
}; | |
const maxLenghtFilesIsValid = (files = []) => { | |
if (!Array.isArray(files)) { |
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
export class Inflector { | |
static pluralize(word: string): string { | |
if (!word) { | |
return; | |
} | |
const isPluralAlready = word.endsWith('ies') || word.endsWith('es') || (!word.endsWith('us') && word.endsWith('s')); | |
if (isPluralAlready) { | |
return word; | |
} | |
if (word.endsWith('y') && !word.endsWith('ay')) { |
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
Container( | |
child: Table( | |
border: TableBorder( | |
left: BorderSide( | |
width: 1, | |
color: Color(0xFFB1B1B1), | |
style: BorderStyle.solid, | |
), | |
right: BorderSide( | |
width: 1, |
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
Container( | |
child: Table( | |
border: TableBorder( | |
left: BorderSide( | |
width: 1, | |
color: Color(0xFFB1B1B1), | |
style: BorderStyle.solid, | |
), | |
right: BorderSide( | |
width: 1, |
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
Material( | |
elevation: 15, | |
shadowColor: Colors.black54, | |
child: Column( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration(color: Colors.white), | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
mainAxisSize: MainAxisSize.max, |
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
const general = this.scheduleService.getQueryCollection(ref => ref | |
.where('patientId', '==', uid) | |
.orderBy('date', 'asc')); | |
const appointments = this.scheduleService.getQueryCollection(ref => ref | |
.where('patients', 'array-contains', uid) | |
.orderBy('date', 'asc')); | |
combineLatest([general, appointments]).pipe( | |
map(arr => arr.reduce((acc, cur) => acc.concat(cur))), |
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
if (status == DONE) | |
{ | |
doSomething(); | |
} | |
else | |
{ | |
... | |
} |
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
class Board | |
{ | |
... | |
String board() | |
{ | |
StringBuffer buf = new StringBuffer(); | |
collectRows(buf); | |
return buf.toString(); | |
} |
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
class Board | |
{ | |
... | |
String board() | |
{ | |
StringBuffer buf = new StringBuffer(); | |
for (int i = 0; i < 10; i++) | |
{ | |
for (int j = 0; j < 10; j++) |
NewerOlder