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
// Add required imports here... | |
export class NoInternetConnection extends React.Component<any, any, any> { | |
ribbonHeight: Animated.Value; | |
constructor(props: any) { | |
super(props); | |
this.ribbonHeight = new Animated.Value(0); | |
} | |
componentDidUpdate(prevProps: { isConnected: any; }) { |
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
{ | |
"scripts:{ | |
"cleanBuild": "adb uninstall com.learnmagica.oteapp && cd android && gradlew clean && cd .. && react-native run-android", | |
"cleanReleaseBuild": "adb uninstall com.learnmagica.oteapp && cd android && gradlew clean && cd .. && react-native run-android --variant=release", | |
"updateAndroidIndex": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res" | |
} | |
} |
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
#cloud-config | |
bootcmd: | |
- cloud-init-per always fix_broken_ufw_1 sh -xc "sudo chown root:root /home >> /var/tmp/svc_$INSTANCE_ID 2>&1 || true" | |
- cloud-init-per always fix_broken_ufw_1 sh -xc "sudo chmod 755 /home >> /var/tmp/svc_$INSTANCE_ID 2>&1 || true" | |
- cloud-init-per always fix_broken_ufw_1 sh -xc "sudo chown ubuntu:ubuntu /home/ubuntu -R >> /var/tmp/svc_$INSTANCE_ID 2>&1 || true" | |
- cloud-init-per always fix_broken_ufw_1 sh -xc "sudo chmod 700 /home/ubuntu /home/ubuntu/.ssh >> /var/tmp/svc_$INSTANCE_ID 2>&1 || true" | |
- cloud-init-per always fix_broken_ufw_1 sh -xc "sudo chmod 600 /home/ubuntu/.ssh/authorized_keys >> /var/tmp/svc_$INSTANCE_ID 2>&1 || 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
webViewQuestionData.post(new Runnable() { | |
@Override | |
public void run() { | |
webViewQuestionData.loadUrl("javascript:(function clearRadioBtn() { let radioList = document.getElementsByTagName(\"input\");\n" + | |
"for(let i = 0; i < radioList.length; i++){\n" + | |
" if(radioList[i].type = \"radio\"){\n" + | |
" if(radioList[i].checked)\n" + | |
" radioList[i].checked = false \n" + | |
" }\n" + | |
"} } )()" |
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
fetchData(mobile_number) { | |
try { | |
NetInfo.fetch().then(async (isConnected) => { | |
//this.changeLoadingStatus(true) | |
if (isConnected) { | |
let url = Webservice_URL + "todaysLeads?mobileNo=" + mobile_number; | |
let data = await performApiCall(url, "GET", {}) | |
this.onFetchComplete(data) | |
} | |
}); |
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
let _headers = { | |
'Content-Type': 'application/json', | |
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9,application/json", | |
} | |
export function performApiCall(url, method, requestBody) { | |
let body, responseStatus | |
let request = { | |
method: method, | |
headers: _headers |
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 threading | |
import pyautogui | |
def startsending(): | |
threading.Timer(0.6, startsending).start() | |
pyautogui.keyDown("ctrl") | |
pyautogui.keyDown("v") | |
pyautogui.keyUp("v") | |
pyautogui.keyUp("ctrl") | |
pyautogui.keyDown("enter") |
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 java.security.KeyManagementException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.SecureRandom; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.TrustManager; |
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 from 'react'; | |
import {Dimensions} from 'react-native'; | |
const {width, height} = Dimensions.get('window'); | |
const percentHeight = height / 100; | |
const percentWidth = width / 100; | |
export const sizeWidth = (percent) => { | |
return percent * (percentWidth < percentHeight ? percentWidth : percentHeight); |
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
function TextLine(props) { | |
const { title, subTitle, style } = props; | |
return ( | |
<View style={style}> | |
<Text h6 third h6Style={{ marginBottom: 5 }}> | |
{subTitle} | |
</Text> | |
<Text h4 medium> | |
{title} | |
</Text> |
NewerOlder