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 Char{ | |
final String? id; | |
final String? name; | |
Char(this.name):this.id= DateTime.now().toString(); | |
} | |
class Area{ | |
String? id; | |
String? name; | |
List<Char>? chars; |
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<int> listWithoutDuplicate = [1,2,3,4]; | |
List<String> listWithDuplicate = ['a','b','a']; | |
Map<dynamic,int> frequencyCount(List<dynamic> itemList){ | |
Map<dynamic,int> uniqueList = {}; | |
for(var item in itemList){ | |
if(uniqueList.containsKey(item)){ | |
uniqueList[item] = uniqueList[item]! + 1; | |
} | |
else{ | |
uniqueList[item] = 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
//fibonaci series using recursion | |
void main() { | |
seq(5); | |
} | |
seq(int n){ | |
if(n < 0){ | |
return n; | |
}else{ | |
if(n < 2) | |
print(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
var key = aesjs.utils.utf8.toBytes("j3u8ue8xmrhsth59"); | |
// Convert text to bytes | |
var text = 'GLGqOsjCQejV8wvNflrKvXkNfvYYR+eqogEn8payz3MHk8VLK5Wet0Y6F6c6L5yoXvsMZ5SEwHD5boeNuc5hcdKXOMDhu31T3kLNGPxOcfL0oiv78pP4MmLeekQWvfZbbKNdsAEaXwU5VHFN4SMKNwAhAKoCOrqCKrv4V9W4odwQDOFQpmogxPD2iLMCUAVkzQZB+aqAg4r6yranT/uGvvImPe+jlOH8I28qWGCPEtCM5N+n/QiQrJ+lZHK8SJgnnBsLJdj778/0Maiqx7huyAmnHJx0vxbH+gv+zsrtrIr8x++io+genj8pabVmN1e1'; | |
var textEnc = '{"dataId":"00058F9C9BE9A2D4BBCE67122FB80002","devId":"175540103c71bf20df5a","productKey":"66mNaBqLdsYhX5lA","status":[{"1":"true","code":"switch","t":1565277677005,"value":true},{"2":"0","code":"countdown_1","t":1565277677005,"value":0}]}'; | |
function _base64ToBytesr(base64) { | |
var binary_string = window.atob(base64); | |
var len = binary_string.length; | |
var bytes = new Uint8Array( len ); |
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
loginUser(){ | |
const _this = this | |
let formData = new FormData(); | |
const { country_code, email, phone_number } = this.state | |
const url = "https://api.authy.com/protected/json/users/new?user[email]="+email+"&user[cellphone]="+phone_number+"&user[country_code]="+country_code+"&send_install_link_via_sms=false" | |
fetch(url,{ | |
method: 'POST', | |
headers: { | |
'X-Authy-API-Key': '4936D0XWwTtjJaMGmboOaytduK43FMTu' | |
} |
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 React from 'react'; | |
import { View, Text } from 'react-native'; | |
import { createStackNavigator } from 'react-navigation'; | |
import Home from './src/Home'; | |
export default createStackNavigator({ | |
Home: { | |
screen: HomeScreen | |
}, |
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 React from 'react'; | |
import { View, Text } from 'react-native'; | |
export default class HomeScreen extends React.Component { | |
render() { | |
return ( | |
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<Text>Home Screen</Text> | |
</View> | |
); |
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 React, { Component } from 'react'; | |
import { StyleSheet, Text, View, Button, DatePickerAndroid, TimePickerAndroid, Picker, AppRegistry, TouchableOpacity } from 'react-native'; | |
//import AvailableDates from '../Calendar/Calendar'; | |
//import { Calendar, CalendarList } from 'react-native-calendars'; | |
let arrBooked = [] | |
const availableHours = { | |
"timeSlots": { | |
"slot1": "2:00pm to 2:30pm", |
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 React from 'react' | |
import { AsyncStorage } from 'react-native'; | |
import { ApolloProvider, createNetworkInterface, ApolloClient } from 'react-apollo' | |
import Mainuser from './components/mainuser' | |
import Login from './components/Login' | |
import Register from './components/Register' | |
const networkInterface = createNetworkInterface({ uri: 'http://192.168.1.3:4000/graphql' | |
}) |
NewerOlder