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> myList = [ | |
'Angela', | |
'James', | |
'Katie', | |
'Jack', | |
]; | |
} |
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
// Relational Operators | |
// == equal | |
// != not equal | |
// > greater than | |
// >= greater than or equal to | |
// < less than | |
// <= less than or equal to | |
// Logical Operators | |
// && AND |
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
{ | |
"workbench.colorTheme": "Ayu Mirage", | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.fontSize": 19, | |
"files.autoSave": "onFocusChange", | |
"editor.formatOnSave": true, | |
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", | |
"debug.console.fontSize": 18, | |
"markdown.preview.fontSize": 18, | |
"terminal.integrated.fontSize": 18, |
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 * as Location from 'expo-location'; | |
const tenMetersWithDegrees = 0.0001; | |
const getLocation = (increment) => { | |
return { | |
timestamp: 1000000, | |
coords: { | |
speed: 0, | |
heading: 0, |
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 'dart:io'; | |
void main() { | |
performTasks(); | |
} | |
void performTasks() { | |
task1(); | |
task2(); | |
task3(); |
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() { | |
for(int i = 1; i <= 5; i++) { | |
print('hello $i'); | |
} | |
print('finish loop'); | |
// i i < 5 i++ | |
// 0 0 < 5 Hello 0 |
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 React, { Dispatch, useReducer, createContext, ReactNode } from 'react'; | |
type Props = { | |
children: ReactNode; | |
}; | |
function createDataContext<S, A>( | |
reducer: (state: S, action: A) => S, | |
initialState: S | |
) { |
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
getCustomer(1, (customer) => { | |
console.log('Customer: ', customer); | |
if (customer.isGold) { | |
getTopMovies((movies) => { | |
console.log('Top movies: ', movies); | |
sendEmail(customer.email, movies, () => { | |
console.log('Email sent...') | |
}); | |
}); |
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 _changeRoute(BuildContext context, String newRouteName) { | |
print('newRouteName: $newRouteName'); | |
// Close drawer | |
Navigator.pop(context); | |
// Check current screen status | |
bool currentRouteIsHome = false; | |
bool currentRouteIsNewRoute = false; | |
Navigator.popUntil(context, (currentRoute) { |
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 React, { useState } from 'react'; | |
import { Upload, Button, message } from 'antd'; | |
import { UploadOutlined } from '@ant-design/icons'; | |
import axios from 'axios'; | |
import { generateDateForFileName } from '../utils/helpers'; | |
const nodeServerEndpoint = 'http://localhost:4000/api/v1/aws/sign-s3'; | |
const phpServerEndpoint = 'http://localhost:9000/api/v1/signed-url-put-object'; | |
const UploadAnt = () => { |
OlderNewer