├── ReactJS
├── components
│ ├── src
│ │ ├── components
│ │ │ ├── footer.js
│ │ │ ├── heading.js
│ │ │ └── App.js
│ │ └── index.js
│ ├── public
│ │ ├── favicon.ico
│ │ └── manifest.json
│ ├── .gitignore
│ └── package.json
├── attach firebase
│ ├── src
│ │ ├── index.css
│ │ ├── App.test.js
│ │ ├── App.css
│ │ ├── index.js
│ │ └── App.js
│ ├── public
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
├── todo with firebase
│ ├── src
│ │ ├── index.css
│ │ ├── App.test.js
│ │ ├── App.css
│ │ └── index.js
│ ├── public
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
├── export import classes
│ ├── src
│ │ ├── index.css
│ │ ├── App.test.js
│ │ ├── App.css
│ │ ├── index.js
│ │ └── App.js
│ ├── public
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
├── lifecycle event (7)
│ ├── src
│ │ ├── index.css
│ │ ├── App.test.js
│ │ ├── index.js
│ │ └── App.css
│ ├── public
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
├── structure + state (6)
│ ├── public
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ └── index.html
│ ├── src
│ │ ├── index.js
│ │ ├── container
│ │ │ └── appContainer.js
│ │ └── components
│ │ │ └── AppCom.js
│ ├── .gitignore
│ └── package.json
├── routing firebase auth (9)
│ ├── public
│ │ ├── favicon.ico
│ │ └── manifest.json
│ ├── src
│ │ ├── App.test.js
│ │ ├── index.js
│ │ ├── App.js
│ │ └── components
│ │ │ ├── home.js
│ │ │ └── contact.js
│ ├── .gitignore
│ └── package.json
└── 000Basic
│ ├── index.html
│ └── js
│ └── app.js
├── react native
├── cameraRoll
│ ├── .watchmanconfig
│ ├── .gitattributes
│ ├── .babelrc
│ ├── app.json
│ ├── android
│ │ ├── app
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── res
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ └── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── assets
│ │ │ │ │ └── fonts
│ │ │ │ │ │ ├── Entypo.ttf
│ │ │ │ │ │ ├── Roboto.ttf
│ │ │ │ │ │ ├── Zocial.ttf
│ │ │ │ │ │ ├── EvilIcons.ttf
│ │ │ │ │ │ ├── Ionicons.ttf
│ │ │ │ │ │ ├── Octicons.ttf
│ │ │ │ │ │ ├── FontAwesome.ttf
│ │ │ │ │ │ ├── Foundation.ttf
│ │ │ │ │ │ ├── MaterialIcons.ttf
│ │ │ │ │ │ ├── Roboto_medium.ttf
│ │ │ │ │ │ ├── SimpleLineIcons.ttf
│ │ │ │ │ │ └── rubicon-icon-font.ttf
│ │ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── navigation
│ │ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ │ └── MainApplication.java
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ └── BUCK
│ │ ├── keystores
│ │ │ ├── debug.keystore.properties
│ │ │ └── BUCK
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── settings.gradle
│ │ ├── build.gradle
│ │ └── gradle.properties
│ ├── ios
│ │ ├── navigation
│ │ │ ├── Images.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── AppDelegate.h
│ │ │ ├── main.m
│ │ │ └── AppDelegate.m
│ │ ├── navigationTests
│ │ │ └── Info.plist
│ │ ├── navigation-tvOSTests
│ │ │ └── Info.plist
│ │ └── navigation-tvOS
│ │ │ └── Info.plist
│ ├── .buckconfig
│ ├── index.js
│ ├── __tests__
│ │ └── App.js
│ ├── application
│ │ └── components
│ │ │ ├── about.js
│ │ │ ├── index.js
│ │ │ └── gallary.js
│ ├── package.json
│ ├── .gitignore
│ ├── App.js
│ └── .flowconfig
├── awesomeproject
│ ├── .watchmanconfig
│ ├── .gitattributes
│ ├── .babelrc
│ ├── app.json
│ ├── android
│ │ ├── settings.gradle
│ │ ├── app
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── res
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ └── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── awesomeproject
│ │ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ │ └── MainApplication.java
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ └── BUCK
│ │ ├── keystores
│ │ │ ├── debug.keystore.properties
│ │ │ └── BUCK
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── build.gradle
│ │ └── gradle.properties
│ ├── ios
│ │ ├── AwesomeProject
│ │ │ ├── Images.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── AppDelegate.h
│ │ │ ├── main.m
│ │ │ ├── AppDelegate.m
│ │ │ └── Info.plist
│ │ ├── AwesomeProjectTests
│ │ │ └── Info.plist
│ │ ├── AwesomeProject-tvOSTests
│ │ │ └── Info.plist
│ │ └── AwesomeProject-tvOS
│ │ │ └── Info.plist
│ ├── .buckconfig
│ ├── index.js
│ ├── __tests__
│ │ └── App.js
│ ├── package.json
│ ├── App.js
│ ├── application
│ │ ├── form.js
│ │ └── about.js
│ ├── .gitignore
│ └── .flowconfig
└── navigation with firebase
│ ├── .watchmanconfig
│ ├── .gitattributes
│ ├── .babelrc
│ ├── app.json
│ ├── android
│ ├── settings.gradle
│ ├── app
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ └── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── navigation
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ │ └── AndroidManifest.xml
│ │ └── BUCK
│ ├── keystores
│ │ ├── debug.keystore.properties
│ │ └── BUCK
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── build.gradle
│ └── gradle.properties
│ ├── ios
│ ├── navigation
│ │ ├── Images.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── AppDelegate.m
│ │ └── Info.plist
│ ├── navigationTests
│ │ └── Info.plist
│ ├── navigation-tvOSTests
│ │ └── Info.plist
│ └── navigation-tvOS
│ │ └── Info.plist
│ ├── .buckconfig
│ ├── index.js
│ ├── __tests__
│ └── App.js
│ ├── application
│ └── components
│ │ ├── about.js
│ │ ├── contact.js
│ │ ├── home.js
│ │ ├── index.js
│ │ └── login.js
│ ├── package.json
│ ├── .gitignore
│ ├── App.js
│ └── .flowconfig
├── ES6
├── getting start
│ ├── .gitignore
│ ├── .babelrc
│ ├── app.js
│ ├── index.html
│ └── package.json
├── es6.pdf
├── Class 3
│ ├── index.html
│ └── app.js
└── class 2
│ ├── index.html
│ └── app.js
├── redux
├── redux js 1
│ ├── .gitignore
│ ├── index.html
│ ├── webpack.config.js
│ ├── app.js
│ └── package.json
├── redux js 2
│ ├── .gitignore
│ ├── index.html
│ ├── webpack.config.js
│ ├── app.js
│ ├── reducers.js
│ └── package.json
├── redux js 3
│ ├── .gitignore
│ ├── index.html
│ ├── abc.js
│ ├── src
│ │ ├── app.js
│ │ └── reducers.js
│ ├── webpack.config.js
│ └── package.json
├── redux js 4
│ ├── .gitignore
│ ├── index.html
│ ├── webpack.config.js
│ ├── package.json
│ └── src
│ │ ├── reducers.js
│ │ └── app.js
├── Redux React 1
│ ├── src
│ │ ├── index.css
│ │ ├── App.css
│ │ ├── reducers.js
│ │ ├── index.js
│ │ └── components
│ │ │ └── app.js
│ ├── public
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
├── redux sample (9)
│ ├── src
│ │ ├── index.css
│ │ ├── components
│ │ │ ├── contact.js
│ │ │ ├── home.js
│ │ │ └── login.js
│ │ ├── store.js
│ │ ├── actions
│ │ │ └── userAction.js
│ │ ├── index.js
│ │ ├── container
│ │ │ ├── App.css
│ │ │ ├── contact.js
│ │ │ ├── home.js
│ │ │ └── login.js
│ │ ├── reducers
│ │ │ └── userReducer.js
│ │ └── config
│ │ │ └── routing.js
│ ├── public
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
├── Redux React 1 (improve structure)
│ ├── src
│ │ ├── index.css
│ │ ├── actions
│ │ │ └── userAction.js
│ │ ├── store.js
│ │ ├── components
│ │ │ └── appComponent.js
│ │ ├── index.js
│ │ ├── container
│ │ │ ├── App.css
│ │ │ └── app.js
│ │ └── reducers
│ │ │ └── userReducer.js
│ ├── public
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── .gitignore
│ └── package.json
└── Redux React Auth (10)
│ ├── public
│ ├── favicon.ico
│ └── index.html
│ ├── .gitignore
│ ├── src
│ ├── components
│ │ ├── contact.js
│ │ ├── home.js
│ │ └── login.js
│ ├── store.js
│ ├── container
│ │ ├── contact.js
│ │ ├── home.js
│ │ └── login.js
│ ├── index.js
│ ├── actions
│ │ └── authAction.js
│ ├── config
│ │ └── routing.js
│ └── reducers
│ │ └── authReducer.js
│ └── package.json
├── Dua app
├── demo
│ ├── feed.png
│ ├── home.png
│ └── Thumbs.db
├── feed
│ └── feed.html
├── home
│ └── app.js
├── login
│ ├── style.css
│ ├── login.js
│ └── login.html
└── signup.js
├── Authantication done with firebase
├── home
│ └── app.js
├── login
│ ├── style.css
│ ├── login.js
│ └── login.html
└── signup.js
├── firebase with js
├── index.html
└── app.js
└── Authantication with firebase
├── app.js
└── index.html
/ReactJS/components/src/components/footer.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/react native/cameraRoll/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/react native/awesomeproject/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/ES6/getting start/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /dist
--------------------------------------------------------------------------------
/react native/cameraRoll/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/react native/awesomeproject/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/redux/redux js 1/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /js/
3 | /npm-debug.log/
--------------------------------------------------------------------------------
/redux/redux js 2/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /js/
3 | /npm-debug.log/
--------------------------------------------------------------------------------
/redux/redux js 3/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /js/
3 | /npm-debug.log/
--------------------------------------------------------------------------------
/redux/redux js 4/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /js/
3 | /npm-debug.log/
--------------------------------------------------------------------------------
/react native/cameraRoll/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
4 |
--------------------------------------------------------------------------------
/react native/awesomeproject/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
4 |
--------------------------------------------------------------------------------
/ES6/getting start/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "es2015"
4 | ]
5 | }
--------------------------------------------------------------------------------
/react native/navigation with firebase/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
4 |
--------------------------------------------------------------------------------
/ES6/es6.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ES6/es6.pdf
--------------------------------------------------------------------------------
/react native/cameraRoll/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "navigation",
3 | "displayName": "navigation"
4 | }
--------------------------------------------------------------------------------
/react native/awesomeproject/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "AwesomeProject",
3 | "displayName": "AwesomeProject"
4 | }
--------------------------------------------------------------------------------
/react native/awesomeproject/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'AwesomeProject'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "navigation",
3 | "displayName": "navigation"
4 | }
--------------------------------------------------------------------------------
/redux/Redux React 1/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/Dua app/demo/feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/Dua app/demo/feed.png
--------------------------------------------------------------------------------
/Dua app/demo/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/Dua app/demo/home.png
--------------------------------------------------------------------------------
/ReactJS/attach firebase/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'navigation'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/Dua app/demo/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/Dua app/demo/Thumbs.db
--------------------------------------------------------------------------------
/ReactJS/export import classes/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | navigation
3 |
4 |
--------------------------------------------------------------------------------
/ReactJS/components/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/components/public/favicon.ico
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/redux/Redux React 1/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/redux/Redux React 1/public/favicon.ico
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AwesomeProject
3 |
4 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/redux/redux sample (9)/public/favicon.ico
--------------------------------------------------------------------------------
/ReactJS/attach firebase/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/attach firebase/public/favicon.ico
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | navigation
3 |
4 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/lifecycle event (7)/public/favicon.ico
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/todo with firebase/public/favicon.ico
--------------------------------------------------------------------------------
/react native/cameraRoll/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/redux/Redux React Auth (10)/public/favicon.ico
--------------------------------------------------------------------------------
/ReactJS/export import classes/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/export import classes/public/favicon.ico
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/structure + state (6)/public/favicon.ico
--------------------------------------------------------------------------------
/react native/awesomeproject/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/react native/cameraRoll/index.js:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import App from './App';
3 |
4 | AppRegistry.registerComponent('navigation', () => App);
5 |
--------------------------------------------------------------------------------
/ES6/getting start/app.js:
--------------------------------------------------------------------------------
1 | if (true) {
2 | var a = 2
3 | }
4 | console.log(a)
5 |
6 |
7 | // if (true) {
8 | // let b = 2
9 | // }
10 | // console.log(b)
11 |
12 |
--------------------------------------------------------------------------------
/react native/awesomeproject/index.js:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import App from './App';
3 |
4 | AppRegistry.registerComponent('AwesomeProject', () => App);
5 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/ReactJS/routing firebase auth (9)/public/favicon.ico
--------------------------------------------------------------------------------
/react native/cameraRoll/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/index.js:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import App from './App';
3 |
4 | AppRegistry.registerComponent('navigation', () => App);
5 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/redux/Redux React 1 (improve structure)/public/favicon.ico
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Entypo.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Entypo.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Roboto.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Roboto.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Zocial.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Zocial.ttf
--------------------------------------------------------------------------------
/react native/awesomeproject/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/awesomeproject/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/EvilIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/EvilIcons.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Ionicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Ionicons.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Octicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Octicons.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/FontAwesome.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/FontAwesome.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Foundation.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Foundation.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/MaterialIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/MaterialIcons.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/Roboto_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/Roboto_medium.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/cameraRoll/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/SimpleLineIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/SimpleLineIcons.ttf
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/awesomeproject/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/awesomeproject/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/awesomeproject/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/assets/fonts/rubicon-icon-font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/cameraRoll/android/app/src/main/assets/fonts/rubicon-icon-font.ttf
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/navigation with firebase/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/redux/redux js 1/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/redux/redux js 2/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/redux/redux js 4/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/awesomeproject/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/navigation with firebase/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/navigation with firebase/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/navigation with firebase/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdul-majid-ashrafi/batch4.1_marge_batch4.2/master/react native/navigation with firebase/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ReactJS/attach firebase/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | });
9 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | });
9 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | });
9 |
--------------------------------------------------------------------------------
/ReactJS/export import classes/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | });
9 |
--------------------------------------------------------------------------------
/redux/Redux React 1/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # testing
7 | coverage
8 |
9 | # production
10 | build
11 |
12 | # misc
13 | .DS_Store
14 | .env
15 | npm-debug.log
16 |
--------------------------------------------------------------------------------
/redux/redux js 3/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # testing
7 | coverage
8 |
9 | # production
10 | build
11 |
12 | # misc
13 | .DS_Store
14 | .env
15 | npm-debug.log
16 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # testing
7 | coverage
8 |
9 | # production
10 | build
11 |
12 | # misc
13 | .DS_Store
14 | .env
15 | npm-debug.log
16 |
--------------------------------------------------------------------------------
/ReactJS/components/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './components/App';
4 | import registerServiceWorker from './registerServiceWorker';
5 |
6 | ReactDOM.render(, document.getElementById('root'));
7 | registerServiceWorker();
8 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6 |
--------------------------------------------------------------------------------
/ReactJS/000Basic/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # testing
7 | coverage
8 |
9 | # production
10 | build
11 |
12 | # misc
13 | .DS_Store
14 | .env
15 | npm-debug.log
16 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/actions/userAction.js:
--------------------------------------------------------------------------------
1 | export function setName(name) {
2 | return {
3 | type: "SET_NAME",
4 | value: name
5 | }
6 | }
7 |
8 | export function setAge(age) {
9 | return {
10 | type: "SET_AGE",
11 | value: age
12 | }
13 | }
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import registerServiceWorker from './registerServiceWorker';
6 |
7 | ReactDOM.render(, document.getElementById('root'));
8 | registerServiceWorker();
9 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/components/contact.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class ContactComponent extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Coontact 34343244 pAGE
8 |
9 | )
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/components/contact.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class ContactComponent extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Coontact 34343244 pAGE
8 |
9 | )
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { AppContainer } from './container/appContainer';
4 | import registerServiceWorker from './registerServiceWorker';
5 |
6 | ReactDOM.render(, document.getElementById('root'));
7 | registerServiceWorker();
8 |
--------------------------------------------------------------------------------
/redux/redux js 3/abc.js:
--------------------------------------------------------------------------------
1 | var arr = []
2 |
3 | console.log(arr)
4 |
5 | arr.push(100)
6 | console.log(arr)
7 |
8 | arr.push(102)
9 | console.log(arr)
10 |
11 | arr.push(103)
12 | console.log(arr)
13 |
14 | arr.push(104)
15 | console.log(arr)
16 |
17 | arr.push(105)
18 | console.log(arr)
19 |
20 | arr.push(106)
21 | console.log(arr)
22 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/store.js:
--------------------------------------------------------------------------------
1 | import { createStore, combineReducers, applyMiddleware } from 'redux'
2 | import logger from 'redux-logger'
3 |
4 | import UserReducer from './reducers/userReducer'
5 |
6 | export default createStore(
7 | combineReducers({
8 | UserReducer
9 | }),
10 | applyMiddleware(logger())
11 | )
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/store.js:
--------------------------------------------------------------------------------
1 | import { createStore, combineReducers, applyMiddleware } from 'redux'
2 | import logger from 'redux-logger'
3 |
4 | import authReducer from './reducers/authReducer'
5 |
6 | export default createStore(
7 | combineReducers({
8 | authReducer
9 | }),
10 | applyMiddleware(logger())
11 | )
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/actions/userAction.js:
--------------------------------------------------------------------------------
1 | export function login(name) {
2 | return {
3 | type: "LOGIN",
4 | value: {
5 | name: "majid",
6 | age: 35,
7 | url: "dvjhfsdkjsdhgksd",
8 | email: "majid@gmail.com",
9 | password: 123456
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/react native/cameraRoll/__tests__/App.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import App from '../App';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/store.js:
--------------------------------------------------------------------------------
1 | import { createStore, combineReducers, applyMiddleware } from 'redux'
2 | import logger from 'redux-logger'
3 |
4 | import UserReducer from './reducers/userReducer'
5 |
6 | export default createStore(
7 | combineReducers({
8 | UserReducer
9 | }),
10 | applyMiddleware(logger())
11 | )
--------------------------------------------------------------------------------
/react native/awesomeproject/__tests__/App.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import App from '../App';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/__tests__/App.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import App from '../App';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/ES6/Class 3/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ES6/getting start/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux'
4 | import Routing from './config/routing';
5 |
6 | import store from './store'
7 |
8 | ReactDOM.render(
9 |
10 |
11 | ,
12 | document.getElementById('root')
13 | );
14 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/components/home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class HomeComponent extends React.Component {
4 | // constructor(props) {
5 | // super(props);
6 | // }
7 | render() {
8 | return (
9 |
10 |
this is home pge
11 |
12 | )
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/redux/Redux React 1/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | React App
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/components/home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class HomeComponent extends React.Component {
4 | // constructor(props) {
5 | // super(props);
6 | // }
7 | render() {
8 | return (
9 |
10 |
this is home pge
11 |
12 | )
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/ReactJS/components/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | React App
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/components/appComponent.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class AppComponent extends React.Component {
4 | // constructor(props) {
5 | // super(props);
6 | // }
7 | render() {
8 | return (
9 |
10 |
{this.props.userName}
11 |
12 | )
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/ReactJS/attach firebase/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux'
4 | import App from './container/app';
5 | import './index.css';
6 |
7 | import store from './store'
8 |
9 | ReactDOM.render(
10 |
11 |
12 | ,
13 | document.getElementById('root')
14 | );
15 |
--------------------------------------------------------------------------------
/ReactJS/components/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/export import classes/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/ES6/class 2/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ReactJS/attach firebase/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/export import classes/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'navigation'
2 | include ':react-native-share'
3 | project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
4 | include ':react-native-fetch-blob'
5 | project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
6 |
7 | include ':app'
8 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myapp",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "react": "^16.0.0",
7 | "react-dom": "^16.0.0",
8 | "react-scripts": "1.0.16"
9 | },
10 | "scripts": {
11 | "start": "react-scripts start",
12 | "build": "react-scripts build",
13 | "test": "react-scripts test --env=jsdom",
14 | "eject": "react-scripts eject"
15 | }
16 | }
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myapp",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "react": "^16.0.0",
7 | "react-dom": "^16.0.0",
8 | "react-scripts": "1.0.16"
9 | },
10 | "scripts": {
11 | "start": "react-scripts start",
12 | "build": "react-scripts build",
13 | "test": "react-scripts test --env=jsdom",
14 | "eject": "react-scripts eject"
15 | }
16 | }
--------------------------------------------------------------------------------
/ReactJS/export import classes/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myapp",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "react": "^16.0.0",
7 | "react-dom": "^16.0.0",
8 | "react-scripts": "1.0.16"
9 | },
10 | "scripts": {
11 | "start": "react-scripts start",
12 | "build": "react-scripts build",
13 | "test": "react-scripts test --env=jsdom",
14 | "eject": "react-scripts eject"
15 | }
16 | }
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myapp",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "react": "^16.0.0",
7 | "react-dom": "^16.0.0",
8 | "react-scripts": "1.0.16"
9 | },
10 | "scripts": {
11 | "start": "react-scripts start",
12 | "build": "react-scripts build",
13 | "test": "react-scripts test --env=jsdom",
14 | "eject": "react-scripts eject"
15 | }
16 | }
--------------------------------------------------------------------------------
/react native/cameraRoll/application/components/about.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View } from 'react-native';
3 |
4 | export default class AboutPage extends Component {
5 | render() {
6 | return (
7 |
8 |
9 | About Screen
10 |
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | package-lock.json
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/application/components/about.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View } from 'react-native';
3 |
4 | export default class AboutPage extends Component {
5 | render() {
6 | return (
7 |
8 |
9 | About Screen
10 |
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/application/components/contact.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View } from 'react-native';
3 |
4 | export default class ContactPage extends Component {
5 | render() {
6 | return (
7 |
8 | Contact Screen
9 |
10 | );
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/application/components/home.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View } from 'react-native';
3 |
4 | export default class HomePage extends Component {
5 | render() {
6 | return (
7 |
8 |
9 | Home Screen
10 |
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/redux/redux js 3/src/app.js:
--------------------------------------------------------------------------------
1 | import { createStore } from 'redux'
2 | import { reducer } from './reducers.js'
3 |
4 | const store = createStore(reducer)
5 |
6 | store.subscribe(() => {
7 | console.log("............", store.getState())
8 | })
9 | store.dispatch({
10 | type: "ADD",
11 | payload: 101
12 | })
13 | store.dispatch({
14 | type: "ADD",
15 | payload: 105
16 | })
17 | store.dispatch({
18 | type: "REM",
19 | payload: 100
20 | })
--------------------------------------------------------------------------------
/redux/Redux React 1/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-intro {
18 | font-size: large;
19 | }
20 |
21 | @keyframes App-logo-spin {
22 | from { transform: rotate(0deg); }
23 | to { transform: rotate(360deg); }
24 | }
25 |
--------------------------------------------------------------------------------
/redux/Redux React 1/src/reducers.js:
--------------------------------------------------------------------------------
1 | var user = {
2 | name: "Majid ",
3 | age: 24
4 | }
5 | export const userReducer = (state = user, action) => {
6 | switch (action.type) {
7 | case "SET_NAME":
8 | state = {
9 | name: action.value
10 | }
11 | break;
12 | case "SET_AGE":
13 | state = {
14 | age: action.value
15 | }
16 | break;
17 |
18 | default:
19 | return state
20 | }
21 | return state
22 | }
23 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import BasicRouting from './App';
4 | import registerServiceWorker from './registerServiceWorker';
5 | import * as firebase from 'firebase';
6 |
7 |
8 | // Initialize Firebase
9 | var config = {
10 |
11 | };
12 | firebase.initializeApp(config);
13 |
14 |
15 |
16 | ReactDOM.render(, document.getElementById('root'));
17 | registerServiceWorker();
18 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/container/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-intro {
18 | font-size: large;
19 | }
20 |
21 | @keyframes App-logo-spin {
22 | from { transform: rotate(0deg); }
23 | to { transform: rotate(360deg); }
24 | }
25 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/container/contact.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { ContactComponent } from '../components/contact'
3 |
4 | export class ContactContainer extends React.Component {
5 | // constructor(props) {
6 | // super(props);
7 | // }
8 | render() {
9 | console.log("Contart", this.props)
10 | return (
11 |
12 |
13 |
14 | )
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/ReactJS/components/src/components/heading.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export const Heading1 = (props) => {
4 | return (
5 |
6 |
7 | Hello {(props.myName)? props.myName : "loading..."}
8 |
9 |
10 | )
11 | }
12 |
13 | export const HeadingTwo = (props) => {
14 | return (
15 |
16 |
17 | Second heading
18 |
19 |
20 | )
21 | }
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/container/contact.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { ContactComponent } from '../components/contact'
3 |
4 | export class ContactContainer extends React.Component {
5 | // constructor(props) {
6 | // super(props);
7 | // }
8 | render() {
9 | console.log("Contart", this.props)
10 | return (
11 |
12 |
13 |
14 | )
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/components/login.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class LoginComponent extends React.Component {
4 | // constructor(props) {
5 | // super(props);
6 | // }
7 | render() {
8 | console.log(this.props.auth)
9 | return (
10 |
11 |
12 |
Login pAGE....
13 |
14 | )
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/java/com/navigation/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.navigation;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "navigation";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/container/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-intro {
18 | font-size: large;
19 | }
20 |
21 | @keyframes App-logo-spin {
22 | from { transform: rotate(0deg); }
23 | to { transform: rotate(360deg); }
24 | }
25 |
--------------------------------------------------------------------------------
/ReactJS/components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-scripts": "1.0.16"
7 | },
8 | "dependencies": {
9 | "firebase": "^4.6.0",
10 | "react": "^16.0.0",
11 | "react-dom": "^16.0.0"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test --env=jsdom",
17 | "eject": "react-scripts eject"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/redux/redux js 1/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 |
3 | entry: "./app.js",
4 | output: {
5 | path: __dirname + '/js',
6 | filename: "bundle.js"
7 | },
8 | devtool: '#sourcemap',
9 | stats: {
10 | colors: true,
11 | reasons: true
12 | },
13 | module: {
14 | loaders: [
15 | {
16 | test: /\.js?$/,
17 | exclude: /(node_modules)/,
18 | loader: 'babel' // 'babel-loader' is also a legal name to reference
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/redux/redux js 2/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 |
3 | entry: "./app.js",
4 | output: {
5 | path: __dirname + '/js',
6 | filename: "bundle.js"
7 | },
8 | devtool: '#sourcemap',
9 | stats: {
10 | colors: true,
11 | reasons: true
12 | },
13 | module: {
14 | loaders: [
15 | {
16 | test: /\.js?$/,
17 | exclude: /(node_modules)/,
18 | loader: 'babel' // 'babel-loader' is also a legal name to reference
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/ReactJS/attach firebase/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-scripts": "1.0.16"
7 | },
8 | "dependencies": {
9 | "firebase": "^4.6.0",
10 | "react": "^16.0.0",
11 | "react-dom": "^16.0.0"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test --env=jsdom",
17 | "eject": "react-scripts eject"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/react native/cameraRoll/application/components/index.js:
--------------------------------------------------------------------------------
1 | // export { HomePage } from './home'
2 | // export { AboutPage } from './about'
3 | // export { SocialShering } from './contact'
4 |
5 |
6 | import GallaryPage from './gallary'
7 | import AboutPage from './about'
8 | import SocialShering from './social'
9 | import LoginPage from './login'
10 | import Registration from './signup'
11 |
12 | export {
13 | GallaryPage,
14 | AboutPage,
15 | SocialShering,
16 | LoginPage,
17 | Registration
18 | }
--------------------------------------------------------------------------------
/react native/navigation with firebase/application/components/index.js:
--------------------------------------------------------------------------------
1 | // export { HomePage } from './home'
2 | // export { AboutPage } from './about'
3 | // export { ContactPage } from './contact'
4 |
5 |
6 | import HomePage from './home'
7 | import AboutPage from './about'
8 | import ContactPage from './contact'
9 | import LoginPage from './login'
10 | import Registration from './signup'
11 |
12 | export {
13 | HomePage,
14 | AboutPage,
15 | ContactPage,
16 | LoginPage,
17 | Registration
18 | }
--------------------------------------------------------------------------------
/redux/redux js 3/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 |
3 | entry: "./src/app.js",
4 | output: {
5 | path: __dirname + '/js',
6 | filename: "bundle.js"
7 | },
8 | devtool: '#sourcemap',
9 | stats: {
10 | colors: true,
11 | reasons: true
12 | },
13 | module: {
14 | loaders: [
15 | {
16 | test: /\.js?$/,
17 | exclude: /(node_modules)/,
18 | loader: 'babel' // 'babel-loader' is also a legal name to reference
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/redux/redux js 4/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 |
3 | entry: "./src/app.js",
4 | output: {
5 | path: __dirname + '/js',
6 | filename: "bundle.js"
7 | },
8 | devtool: '#sourcemap',
9 | stats: {
10 | colors: true,
11 | reasons: true
12 | },
13 | module: {
14 | loaders: [
15 | {
16 | test: /\.js?$/,
17 | exclude: /(node_modules)/,
18 | loader: 'babel' // 'babel-loader' is also a legal name to reference
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/java/com/navigation/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.navigation;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "navigation";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/java/com/awesomeproject/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.awesomeproject;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "AwesomeProject";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reactrouting",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "firebase": "^4.9.0",
7 | "react": "^16.2.0",
8 | "react-dom": "^16.2.0",
9 | "react-router-dom": "^4.2.2",
10 | "react-scripts": "1.1.0"
11 | },
12 | "scripts": {
13 | "start": "react-scripts start",
14 | "build": "react-scripts build",
15 | "test": "react-scripts test --env=jsdom",
16 | "eject": "react-scripts eject"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ReactJS/attach firebase/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-title {
18 | font-size: 1.5em;
19 | }
20 |
21 | .App-intro {
22 | font-size: large;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from { transform: rotate(0deg); }
27 | to { transform: rotate(360deg); }
28 | }
29 |
--------------------------------------------------------------------------------
/Authantication done with firebase/home/app.js:
--------------------------------------------------------------------------------
1 | var user = localStorage.getItem('loggedInUser')
2 | var convertToParse = JSON.parse(user)
3 | var heading = document.getElementById('heading')
4 | .innerHTML = convertToParse.firstName + " "
5 | + convertToParse.lastName
6 | var fName = document.getElementById('firstName').innerHTML
7 | = convertToParse.firstName
8 | var lName = document.getElementById('lastName').innerHTML = convertToParse.lastName
9 | var email = document.getElementById('email').innerHTML = convertToParse.email
10 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-title {
18 | font-size: 1.5em;
19 | }
20 |
21 | .App-intro {
22 | font-size: large;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from { transform: rotate(0deg); }
27 | to { transform: rotate(360deg); }
28 | }
29 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-title {
18 | font-size: 1.5em;
19 | }
20 |
21 | .App-intro {
22 | font-size: large;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from { transform: rotate(0deg); }
27 | to { transform: rotate(360deg); }
28 | }
29 |
--------------------------------------------------------------------------------
/ReactJS/export import classes/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-title {
18 | font-size: 1.5em;
19 | }
20 |
21 | .App-intro {
22 | font-size: large;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from { transform: rotate(0deg); }
27 | to { transform: rotate(360deg); }
28 | }
29 |
--------------------------------------------------------------------------------
/redux/redux js 2/app.js:
--------------------------------------------------------------------------------
1 | import { createStore, combineReducers } from 'redux';
2 | import { countReducer, userReducer } from './reducers';
3 |
4 | const rootReducers = combineReducers({ countReducer, userReducer })
5 |
6 | const store = createStore(rootReducers);
7 |
8 | store.subscribe(() => {
9 | console.log("STORE...: ", store.getState())
10 | })
11 | store.dispatch({ type: "INC", payload: 10 }) //13
12 | store.dispatch({ type: "INC", payload: 20 }) //13
13 |
14 | store.dispatch({ type: "MALE", payload: "MAJID" }) //13
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ES6/getting start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "version": "1.0.0",
4 | "description": "learn ES6",
5 | "main": "app.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "rimraf dist/ && babel ./ --out-dir dist/ --ignore ./index.html,./node_modules,./.babelrc,./package.json,./npm-debug.log --copy-files"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "babel-cli": "^6.24.1",
14 | "babel-preset-es2015": "^6.24.1",
15 | "rimraf": "^2.6.1"
16 | }
17 | }
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/redux/Redux React 1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-world",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-scripts": "0.8.5"
7 | },
8 | "dependencies": {
9 | "react": "^15.4.2",
10 | "react-dom": "^15.4.2",
11 | "react-redux": "^5.0.2",
12 | "redux": "^3.6.0",
13 | "redux-logger": "^2.8.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test --env=jsdom",
19 | "eject": "react-scripts eject"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/redux/redux js 2/reducers.js:
--------------------------------------------------------------------------------
1 | export const countReducer = (state = 3, action) => {
2 | if (action.type === "INC") {
3 | return state + action.payload
4 | }
5 | else if (action.type === "DEC") {
6 | return state - action.payload
7 | }
8 | return state = 0
9 | }
10 |
11 |
12 | export const userReducer = (state = "I am ", action) => {
13 | if (action.type === "MALE") {
14 | return state + action.payload
15 | }
16 | else if (action.type === "FEMALE") {
17 | return state + action.payload
18 | }
19 | return state
20 | }
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-world",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-scripts": "0.8.5"
7 | },
8 | "dependencies": {
9 | "react": "^15.4.2",
10 | "react-dom": "^15.4.2",
11 | "react-redux": "^5.0.2",
12 | "redux": "^3.6.0",
13 | "redux-logger": "^2.8.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test --env=jsdom",
19 | "eject": "react-scripts eject"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/react native/awesomeproject/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "AwesomeProject",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react": "16.3.0-alpha.1",
11 | "react-native": "0.54.1"
12 | },
13 | "devDependencies": {
14 | "babel-jest": "22.4.1",
15 | "babel-preset-react-native": "4.0.0",
16 | "jest": "22.4.2",
17 | "react-test-renderer": "16.3.0-alpha.1"
18 | },
19 | "jest": {
20 | "preset": "react-native"
21 | }
22 | }
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/reducers/userReducer.js:
--------------------------------------------------------------------------------
1 | var INITIAL_STATE = {
2 | isAuth: false,
3 | user: {}
4 | }
5 | const UserReducer = (state = INITIAL_STATE, action) => {
6 | switch (action.type) {
7 | case "LOGIN":
8 | return { isAuth: true, user: action.value }
9 | break;
10 | case "SET_AGE":
11 | state = {
12 | name: state.name,
13 | age: action.value
14 | }
15 | break;
16 | default:
17 | return state
18 | }
19 | return state
20 | }
21 | export default UserReducer
--------------------------------------------------------------------------------
/redux/redux js 1/app.js:
--------------------------------------------------------------------------------
1 | import { createStore } from 'redux';
2 |
3 | const reducer = (state = 0, action) => {
4 | if (action.type === "INC") {
5 | return state + action.payload
6 | }
7 | else if (action.type === "DEC") {
8 | return state - action.payload
9 | }
10 | return state
11 | }
12 |
13 | const store = createStore(reducer);
14 |
15 | store.subscribe(() => {
16 | console.log("STORE...: ", store.getState())
17 | })
18 |
19 | store.dispatch({ type: "INC", payload: 10 })
20 | store.dispatch({ type: "INC", payload: 15 })
21 | store.dispatch({ type: "DEC", payload: 19 })
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/redux/Redux React 1/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux'
4 | import App from './components/app';
5 | import './index.css';
6 |
7 | import { createStore, combineReducers, applyMiddleware } from 'redux'
8 | import logger from 'redux-logger'
9 | import { userReducer } from './reducers.js'
10 |
11 | const store = createStore(combineReducers({
12 | user: userReducer }),
13 | applyMiddleware(logger())
14 | )
15 |
16 | ReactDOM.render(
17 |
18 |
19 | ,
20 | document.getElementById('root')
21 | );
22 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-world",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-scripts": "0.8.5"
7 | },
8 | "dependencies": {
9 | "firebase": "^4.9.0",
10 | "react": "^15.4.2",
11 | "react-dom": "^15.4.2",
12 | "react-redux": "^5.0.2",
13 | "react-router-dom": "^4.2.2",
14 | "redux": "^3.6.0",
15 | "redux-logger": "^2.8.1"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test --env=jsdom",
21 | "eject": "react-scripts eject"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-world",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-scripts": "0.8.5"
7 | },
8 | "dependencies": {
9 | "firebase": "^4.9.0",
10 | "react": "^15.4.2",
11 | "react-dom": "^15.4.2",
12 | "react-redux": "^5.0.2",
13 | "react-router-dom": "^4.2.2",
14 | "redux": "^3.6.0",
15 | "redux-logger": "^2.8.1"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test --env=jsdom",
21 | "eject": "react-scripts eject"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux'
4 | import * as firebase from 'firebase';
5 | import Routing from './config/routing';
6 |
7 | import store from './store'
8 |
9 | // Initialize Firebase
10 | var config = {
11 | apiKey: "",
12 | authDomain: "batch4-8034f.firebaseapp.com",
13 | databaseURL: "https://batch4-8034f.firebaseio.com",
14 | projectId: ""
15 | };
16 | firebase.initializeApp(config);
17 |
18 | ReactDOM.render(
19 |
20 |
21 | ,
22 | document.getElementById('root')
23 | );
24 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/container/home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'react-redux'
3 |
4 | import { HomeComponent } from '../components/home';
5 |
6 | class HomeContainer extends React.Component {
7 | // constructor(props) {
8 | // super(props);
9 | // }
10 | render() {
11 | console.log("Home", this.props.authReducer)
12 | return (
13 |
14 |
15 |
16 | )
17 | }
18 | }
19 |
20 | const mapStateToProps = (state) => {
21 | return {
22 | authReducer: state.UserReducer
23 | }
24 | }
25 |
26 | export default connect(mapStateToProps, null)(HomeContainer)
27 |
28 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "navigation",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "firebase": "^4.11.0",
11 | "native-base": "^2.3.10",
12 | "react": "16.3.0-alpha.1",
13 | "react-native": "0.54.2",
14 | "react-navigation": "^1.5.8"
15 | },
16 | "devDependencies": {
17 | "babel-jest": "23.0.0-alpha.0",
18 | "babel-preset-react-native": "4.0.0",
19 | "jest": "22.4.2",
20 | "react-test-renderer": "16.3.0-alpha.1"
21 | },
22 | "jest": {
23 | "preset": "react-native"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/reducers/userReducer.js:
--------------------------------------------------------------------------------
1 | var obj = {
2 | name: "Majid ",
3 | age: 24
4 | }
5 | const UserReducer = (state = obj, action) => {
6 | switch (action.type) {
7 | case "SET_NAME":
8 | state = {
9 | // name: state.name + action.value,
10 | name: action.value,
11 | age: state.age
12 | }
13 | break;
14 | case "SET_AGE":
15 | state = {
16 | name: state.name,
17 | age: action.value
18 | }
19 | break;
20 | default:
21 | return state
22 | }
23 | return state
24 | }
25 | export default UserReducer
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/container/home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'react-redux'
3 |
4 | import { HomeComponent } from '../components/home';
5 |
6 | class HomeContainer extends React.Component {
7 | // constructor(props) {
8 | // super(props);
9 | // }
10 | render() {
11 | console.log("Home", this.props.authReducer)
12 | return (
13 |
14 |
15 |
16 | )
17 | }
18 | }
19 |
20 | const mapStateToProps = (state) => {
21 | return {
22 | authReducer: state.UserReducer
23 | }
24 | }
25 |
26 | export default connect(mapStateToProps, null)(HomeContainer)
27 |
28 |
--------------------------------------------------------------------------------
/firebase with js/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/redux/redux js 3/src/reducers.js:
--------------------------------------------------------------------------------
1 | var obj = {
2 | result: 3,
3 | lastValues: []
4 | }
5 | export const reducer = (state = obj, action) => {
6 | switch (action.type) {
7 | case "ADD":
8 | state = {
9 | result: state.result + action.payload, // this is muteable
10 | lastValues : [...state.lastValues , action.payload]
11 | }
12 | break;
13 | case "REM":
14 | state = {
15 | result: state.result - action.payload, // this is muteable
16 | lastValues: [...state.lastValues, action.payload]
17 | }
18 | break;
19 | }
20 | return state
21 | }
22 |
--------------------------------------------------------------------------------
/Dua app/feed/feed.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | feeds
6 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import registerServiceWorker from './registerServiceWorker';
6 | import firebase from 'firebase';
7 |
8 | // Initialize Firebase
9 | var config = {
10 | apiKey: "AIzaSyCuhF5q-M1gKl-YLkmfapXOOqVBHPvfuV0",
11 | authDomain: "fir-adf99.firebaseapp.com",
12 | databaseURL: "https://fir-adf99.firebaseio.com",
13 | projectId: "fir-adf99",
14 | storageBucket: "fir-adf99.appspot.com",
15 | messagingSenderId: "862999688485"
16 | };
17 | firebase.initializeApp(config);
18 |
19 | ReactDOM.render(, document.getElementById('root'));
20 | registerServiceWorker();
21 |
--------------------------------------------------------------------------------
/firebase with js/app.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/');
2 | var input = document.getElementById('input')
3 | var unOrderList = document.getElementById('unOrderList')
4 |
5 | function todo() {
6 | var todo = {
7 | item: input.value,
8 | todo: 'DONE'
9 | }
10 | database.child('todo').push(todo)
11 | }
12 |
13 | database.child('todo').on("child_added", function (snapshot) {
14 | var demo = snapshot.val()
15 | demo.id = snapshot.key
16 |
17 | var list = document.createElement('LI')
18 | var tagText = document.createTextNode(demo.item)
19 | list.appendChild(tagText)//getInput
20 | unOrderList.appendChild(list)
21 | })
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ReactJS/export import classes/src/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | // import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | // import './index.css';
5 | import Apps, { AboutComponent, HomeComponent } from './App';
6 | // import registerServiceWorker from './registerServiceWorker';
7 |
8 |
9 |
10 | class MainComponet extends Component {
11 | render() {
12 | return (
13 |
14 |
16 | {/*
Hi reactsst
*/}
17 |
18 | );
19 | }
20 | }
21 |
22 | ReactDOM.render(, document.getElementById('root'));
23 | // registerServiceWorker();
24 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/react native/awesomeproject/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View, Image } from 'react-native';
3 | import { About } from './application/about';
4 | import {Contact} from './application/form'
5 |
6 | export default class App extends Component {
7 | render() {
8 | let img = {
9 | uri: "https://nativeyewear.com/public/images/np1-tmp/More_From_Native_1x.jpg"
10 | }
11 | return (
12 |
13 |
14 | {/*
15 |
16 | Welcome to React Native!
17 | */}
18 |
19 |
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/react native/cameraRoll/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "navigation",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "firebase": "^4.12.1",
11 | "native-base": "^2.3.10",
12 | "react": "16.3.0-alpha.1",
13 | "react-native": "0.54.2",
14 | "react-native-fetch-blob": "^0.10.8",
15 | "react-native-share": "^1.0.27",
16 | "react-navigation": "^1.5.8"
17 | },
18 | "devDependencies": {
19 | "babel-jest": "23.0.0-alpha.0",
20 | "babel-preset-react-native": "4.0.0",
21 | "jest": "22.4.2",
22 | "react-test-renderer": "16.3.0-alpha.1"
23 | },
24 | "jest": {
25 | "preset": "react-native"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/actions/authAction.js:
--------------------------------------------------------------------------------
1 | export function register() {
2 | return {
3 | type: "REGISTER"
4 | }
5 | }
6 | export function registerOnFirebase() {
7 | return {
8 | type: "REGISTER_SUCCESS"
9 | }
10 | }
11 | export function registerFail(error) {
12 | return {
13 | type: "REGISTER_FAIL",
14 | payload: error.message
15 | }
16 | }
17 |
18 |
19 |
20 |
21 |
22 | export function login() {
23 | return {
24 | type: "LOGIN"
25 | }
26 | }
27 | export function loginWithFirebase(user) {
28 | return {
29 | type: "LOGIN_SUCCESS",
30 | payload: user
31 | }
32 | }
33 | export function loginFail(error) {
34 | return {
35 | type: "LOGIN_FAIL",
36 | payload: error.message
37 | }
38 | }
--------------------------------------------------------------------------------
/ReactJS/attach firebase/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import registerServiceWorker from './registerServiceWorker';
6 |
7 | import firebase from 'firebase'
8 |
9 | // Initialize Firebase
10 | var config = {
11 | apiKey: "AIzaSyDbgY2r7bKa3p5ohND9b0SI3j306MLhK7k",
12 | authDomain: "learn-react-3448f.firebaseapp.com",
13 | databaseURL: "https://learn-react-3448f.firebaseio.com",
14 | projectId: "learn-react-3448f",
15 | storageBucket: "learn-react-3448f.appspot.com",
16 | messagingSenderId: "443603260088"
17 | };
18 | firebase.initializeApp(config);
19 |
20 |
21 |
22 | ReactDOM.render(, document.getElementById('root'));
23 | registerServiceWorker();
24 |
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Dua app/home/app.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/')
2 | var user = localStorage.getItem('loggedInUser')
3 | var convertToParse = JSON.parse(user)
4 | var heading = document.getElementById('heading').innerHTML = convertToParse.firstName + " " + convertToParse.lastName
5 | var fName = document.getElementById('firstName').innerHTML
6 | = convertToParse.firstName
7 | var lName = document.getElementById('lastName').innerHTML = convertToParse.lastName
8 | var email = document.getElementById('email').innerHTML = convertToParse.email
9 |
10 | var dua = document.getElementById('dua')
11 |
12 |
13 | function praySubmit() {
14 | var obj = {
15 | pray: dua.value,
16 | userName: convertToParse.firstName + " " + convertToParse.lastName
17 | }
18 | database.child('post').push(obj)
19 | dua.value = ""
20 | }
21 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/src/container/appContainer.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { App } from '../components/AppCom'
3 |
4 | export class AppContainer extends Component {
5 | constructor() {
6 | super()
7 | this.state = {
8 | userName: "",
9 | email: "",
10 | pass: ""
11 | }
12 | }
13 |
14 | eventHandler(e) {
15 | this.setState({ [e.target.name]: e.target.value })
16 | }
17 |
18 | submit(e) {
19 | e.preventDefault()
20 | console.log(this.state)
21 | }
22 |
23 | render() {
24 | return (
25 |
28 | );
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/redux/redux js 1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux_sample",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "author": "Majid Ashraf",
7 | "license": "ISC",
8 | "scripts": {
9 | "start": "node ./node_modules/webpack/bin/webpack.js -w"
10 | },
11 | "babel": {
12 | "plugins": [
13 | "transform-react-jsx"
14 | ],
15 | "presets": [
16 | "es2015"
17 | ],
18 | "ignore": [
19 | "js/bundle.js",
20 | "node_modules/**/*.js"
21 | ]
22 | },
23 | "dependencies": {
24 | "babel-core": "6.3.21",
25 | "babel-loader": "6.2.0",
26 | "babel-plugin-transform-react-jsx": "6.3.13",
27 | "babel-preset-es2015": "6.3.13",
28 | "react": "15.3.1",
29 | "react-dom": "15.3.1",
30 | "react-router": "^2.8.0",
31 | "redux": "^3.6.0",
32 | "webpack": "1.13.1",
33 | "webpack-dev-server": "1.14.0"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/redux/redux js 2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux_sample",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "author": "Majid Ashraf",
7 | "license": "ISC",
8 | "scripts": {
9 | "start": "node ./node_modules/webpack/bin/webpack.js -w"
10 | },
11 | "babel": {
12 | "plugins": [
13 | "transform-react-jsx"
14 | ],
15 | "presets": [
16 | "es2015"
17 | ],
18 | "ignore": [
19 | "js/bundle.js",
20 | "node_modules/**/*.js"
21 | ]
22 | },
23 | "dependencies": {
24 | "babel-core": "6.3.21",
25 | "babel-loader": "6.2.0",
26 | "babel-plugin-transform-react-jsx": "6.3.13",
27 | "babel-preset-es2015": "6.3.13",
28 | "react": "15.3.1",
29 | "react-dom": "15.3.1",
30 | "react-router": "^2.8.0",
31 | "redux": "^3.6.0",
32 | "webpack": "1.13.1",
33 | "webpack-dev-server": "1.14.0"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProjectTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/config/routing.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
3 | import App from '../container/login'
4 | import HomeContainer from '../container/home'
5 | import {ContactContainer} from '../container/contact'
6 |
7 | export default class Routing extends Component {
8 | render() {
9 | return (
10 |
11 |
12 | Home
13 | Login
14 | Contact
15 |
16 |
17 |
18 |
19 |
20 |
21 | )
22 | }
23 | }
--------------------------------------------------------------------------------
/Dua app/login/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 40px;
3 | padding-bottom: 40px;
4 | background-color: #eee;
5 | }
6 |
7 | .form-signin {
8 | max-width: 330px;
9 | padding: 15px;
10 | margin: 0 auto;
11 | }
12 | .form-signin .form-signin-heading,
13 | .form-signin .checkbox {
14 | margin-bottom: 10px;
15 | }
16 | .form-signin .checkbox {
17 | font-weight: normal;
18 | }
19 | .form-signin .form-control {
20 | position: relative;
21 | height: auto;
22 | -webkit-box-sizing: border-box;
23 | box-sizing: border-box;
24 | padding: 10px;
25 | font-size: 16px;
26 | }
27 | .form-signin .form-control:focus {
28 | z-index: 2;
29 | }
30 | .form-signin input[type="email"] {
31 | margin-bottom: -1px;
32 | border-bottom-right-radius: 0;
33 | border-bottom-left-radius: 0;
34 | }
35 | .form-signin input[type="password"] {
36 | margin-bottom: 10px;
37 | border-top-left-radius: 0;
38 | border-top-right-radius: 0;
39 | }
--------------------------------------------------------------------------------
/Authantication done with firebase/login/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 40px;
3 | padding-bottom: 40px;
4 | background-color: #eee;
5 | }
6 |
7 | .form-signin {
8 | max-width: 330px;
9 | padding: 15px;
10 | margin: 0 auto;
11 | }
12 | .form-signin .form-signin-heading,
13 | .form-signin .checkbox {
14 | margin-bottom: 10px;
15 | }
16 | .form-signin .checkbox {
17 | font-weight: normal;
18 | }
19 | .form-signin .form-control {
20 | position: relative;
21 | height: auto;
22 | -webkit-box-sizing: border-box;
23 | box-sizing: border-box;
24 | padding: 10px;
25 | font-size: 16px;
26 | }
27 | .form-signin .form-control:focus {
28 | z-index: 2;
29 | }
30 | .form-signin input[type="email"] {
31 | margin-bottom: -1px;
32 | border-bottom-right-radius: 0;
33 | border-bottom-left-radius: 0;
34 | }
35 | .form-signin input[type="password"] {
36 | margin-bottom: 10px;
37 | border-top-left-radius: 0;
38 | border-top-right-radius: 0;
39 | }
--------------------------------------------------------------------------------
/react native/awesomeproject/application/form.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { View, TextInput, Text, Button } from 'react-native';
3 |
4 | export class Contact extends Component {
5 | constructor(props) {
6 | super(props);
7 | this.state = { text: '' };
8 | }
9 | submit() {
10 | alert("Hello :" + this.state.text)
11 | }
12 | render() {
13 | return (
14 |
15 | this.setState({ text })}
19 | />
20 |
23 | {this.state.text}
24 |
25 | );
26 | }
27 | }
--------------------------------------------------------------------------------
/ReactJS/attach firebase/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from './logo.svg';
3 | import './App.css';
4 | import firebase from 'firebase'
5 | class App extends Component {
6 | constructor() {
7 | super()
8 | this.state = {
9 | }
10 | }
11 |
12 | submit() {
13 | let val = { todo: this.refs.todo.value }
14 | firebase.database().ref('/').child("todo").push(val)
15 | }
16 |
17 | render() {
18 | return (
19 |
20 |
21 |
22 | Welcome to React
23 |
24 |
25 |
26 |
27 |
28 | Hello world
29 |
30 |
31 | );
32 | }
33 | }
34 |
35 | export default App;
36 |
--------------------------------------------------------------------------------
/redux/redux js 3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux_sample",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "author": "Majid Ashraf",
7 | "license": "ISC",
8 | "scripts": {
9 | "start": "node ./node_modules/webpack/bin/webpack.js -w"
10 | },
11 | "babel": {
12 | "plugins": [
13 | "transform-react-jsx"
14 | ],
15 | "presets": [
16 | "es2015"
17 | ],
18 | "ignore": [
19 | "js/bundle.js",
20 | "node_modules/**/*.js"
21 | ]
22 | },
23 | "dependencies": {
24 | "babel-core": "6.3.21",
25 | "babel-loader": "6.2.0",
26 | "babel-plugin-transform-react-jsx": "6.3.13",
27 | "babel-preset-es2015": "6.3.13",
28 | "react": "15.3.1",
29 | "react-dom": "15.3.1",
30 | "react-router": "^2.8.0",
31 | "redux": "^3.6.0",
32 | "redux-logger": "^2.8.1",
33 | "redux-thunk": "^2.2.0",
34 | "webpack": "1.13.1",
35 | "webpack-dev-server": "1.14.0"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/redux/redux js 4/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux_sample",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "author": "Majid Ashraf",
7 | "license": "ISC",
8 | "scripts": {
9 | "start": "node ./node_modules/webpack/bin/webpack.js -w"
10 | },
11 | "babel": {
12 | "plugins": [
13 | "transform-react-jsx"
14 | ],
15 | "presets": [
16 | "es2015"
17 | ],
18 | "ignore": [
19 | "js/bundle.js",
20 | "node_modules/**/*.js"
21 | ]
22 | },
23 | "dependencies": {
24 | "babel-core": "6.3.21",
25 | "babel-loader": "6.2.0",
26 | "babel-plugin-transform-react-jsx": "6.3.13",
27 | "babel-preset-es2015": "6.3.13",
28 | "react": "15.3.1",
29 | "react-dom": "15.3.1",
30 | "react-router": "^2.8.0",
31 | "redux": "^3.6.0",
32 | "redux-logger": "^2.8.1",
33 | "redux-thunk": "^2.2.0",
34 | "webpack": "1.13.1",
35 | "webpack-dev-server": "1.14.0"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | BrowserRouter as Router,
4 | Route
5 | } from 'react-router-dom';
6 |
7 | import { HomeComponent } from './components/home'
8 | import { ContactComponent } from './components/contact'
9 | import { GallaryComponent } from './components/gallary'
10 | import { SignupComponent } from './components/signup'
11 | import { LoginComponent } from './components/login'
12 |
13 |
14 | const BasicRouting = () => {
15 | return (
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | )
27 | }
28 |
29 | export default BasicRouting;
30 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/react native/cameraRoll/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/react native/awesomeproject/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/Authantication with firebase/app.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/')
2 |
3 | var username = document.getElementById('userName')
4 | var email = document.getElementById('email')
5 | var pass = document.getElementById('pass')
6 |
7 | function submit() {
8 | var user = {
9 | name: username.value,
10 | email: email.value,
11 | pass: pass.value
12 | }
13 | firebase.auth().
14 | createUserWithEmailAndPassword(user.email, user.pass)
15 | .then(function (res) {
16 | console.log(res)
17 | database.child('users/' + res.uid).set(user)
18 | })
19 | .catch(function (error) {
20 | // Handle Errors here.
21 | var errorCode = error.code;
22 | var errorMessage = error.message;
23 | if (errorCode == 'auth/weak-password') {
24 | alert('The password is too weak.');
25 | } else {
26 | alert(errorMessage);
27 | }
28 | console.log(error);
29 | });
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/src/container/login.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from './logo.svg';
3 | import './App.css';
4 | import { connect } from 'react-redux'
5 | import { LoginComponent } from '../components/login'
6 | import { login } from "../actions/userAction"
7 |
8 | class App extends Component {
9 | login() {
10 | this.props.myLogin("Majid Ashraf")
11 | }
12 | render() {
13 | return (
14 |
15 |
16 |
17 | );
18 | }
19 | }
20 |
21 |
22 | const mapStateToProps = (state) => {
23 | return {
24 | authReducer: state.UserReducer
25 | }
26 | }
27 |
28 | const mapDispatchToProps = (dispatch) => {
29 | return {
30 | myLogin: (name) => { // send name as a param
31 | dispatch(login(name)) // send name as a param
32 | }
33 | }
34 | }
35 |
36 | export default connect(mapStateToProps, mapDispatchToProps)(App);
--------------------------------------------------------------------------------
/ReactJS/export import classes/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from './logo.svg';
3 | import './App.css';
4 |
5 |
6 | export class HomeComponent extends Component {
7 | constructor(prop){
8 | super(prop)
9 | // console.log(prop)
10 | console.log(this.props)
11 |
12 | }
13 | render() {
14 | return {this.props.data} Compoent
15 | }
16 | }
17 | export class AboutComponent extends Component {
18 | render() {
19 | return About Compoent Render Here
20 | }
21 | }
22 |
23 |
24 | class Apps extends Component {
25 | render() {
26 | return (
27 |
28 |
29 | {/*
*/}
30 | Welcome to React
31 |
32 |
33 | To get started, edit src/App.js and save to reload.
34 |
35 |
36 | );
37 | }
38 | }
39 |
40 | export default Apps;
41 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/config/routing.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
3 | import App from '../container/login'
4 | import SignupContainer from '../container/signup'
5 | import HomeContainer from '../container/home'
6 | import { ContactContainer } from '../container/contact'
7 |
8 | export default class Routing extends Component {
9 | render() {
10 | return (
11 |
12 |
13 | Home
14 | Login
15 | Aignup
16 | Contact
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | )
25 | }
26 | }
--------------------------------------------------------------------------------
/redux/Redux React 1/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from '../logo.svg';
3 | import '../App.css';
4 | import { connect } from 'react-redux'
5 |
6 | class App extends Component {
7 | changeUserName() {
8 | this.props.setName('Majid Ashraf')
9 | }
10 | render() {
11 | console.log(this.props)
12 | return (
13 |
14 |
15 |

16 |
Welcome to React
17 |
18 |
{this.props.userData.name}
19 |
20 |
21 | );
22 | }
23 | }
24 |
25 |
26 | const mapStateToProps = (state) => {
27 | return {
28 | userData : state.user
29 | }
30 | }
31 |
32 | const mapDispatchToProps = (dispatch) => {
33 | return {
34 | setName: (name) => {
35 | dispatch({
36 | type: "SET_NAME",
37 | value: name
38 | })
39 | }
40 | }
41 | }
42 |
43 | export default connect(mapStateToProps, mapDispatchToProps)(App);
--------------------------------------------------------------------------------
/ReactJS/000Basic/js/app.js:
--------------------------------------------------------------------------------
1 | // ReactDOM.render(
2 | // React.DOM.h1({ id: "my-heading" }, React.DOM.span(null, React.DOM.em(
3 | // { style: { color: 'red' } },
4 | // "Hello"))),
5 | // // React.createElement('h1', {title: 'hello world'}, 'Hello World'),
6 | // document.getElementById('root')
7 | // );
8 |
9 | class ABCComponent extends React.Component {
10 | constructor(props) {
11 | super(props)
12 | this.state = {
13 | name: props.name
14 | }
15 | }
16 | updated(ev){
17 | this.setState({name : ev.target.value})
18 | // console.log(ev.target.value)s
19 | }
20 | render() {
21 | return React.DOM.div(null,
22 | React.DOM.input({
23 | defaultValue: this.state.name,
24 | onChange : this.updated.bind(this)
25 | }),
26 | React.DOM.h3({style : {color : '#232323'}}, this.state.name)
27 | );
28 | }
29 | }
30 |
31 | ReactDOM.render(
32 | // React.DOM.div(ABCComponent),
33 | React.createElement(ABCComponent, { name: "John" }),
34 | document.getElementById('root')
35 | );
36 |
37 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/react native/awesomeproject/application/about.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { View, Text, ScrollView } from 'react-native';
3 |
4 | export class About extends Component {
5 | render() {
6 | return (
7 | // Try removing the `flex: 1` on the parent View.
8 | // The parent will not have dimensions, so the children can't expand.
9 | // What if you add `height: 300` instead of `flex: 1`?
10 |
11 |
12 |
13 |
14 | Hello World Hello World
15 | parent will not have dimensions, so the children can't expand.
16 |
17 |
18 |
19 |
20 |
21 |
22 | );
23 | }
24 | }
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ReactJS/components/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Heading1, HeadingTwo } from './heading'
3 |
4 | class App extends Component {
5 | constructor() {
6 | super()
7 | this.state = {
8 | data: ""
9 | }
10 | }
11 | changeStsate() {
12 | this.setState({ data: this.refs.inputValue.value })
13 | }
14 | render() {
15 | return (
16 |
17 |
18 |
Welcome to React
19 |
20 | To get started, edit src/App.js and save to reload.
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | );
37 | }
38 | }
39 |
40 | export default App;
41 |
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/src/components/home.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Link } from 'react-router-dom';
3 |
4 | export class HomeComponent extends Component {
5 | render() {
6 | return (
7 |
8 |
24 |
25 |
26 | {/*
Welcome to DASHboard
27 |
28 |
Contact
29 |
gallary */}
30 |
31 |
32 | );
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/redux/redux sample (9)/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 | React App
11 |
12 |
13 |
14 |
15 |
16 |
18 |
20 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 | React App
11 |
12 |
13 |
14 |
15 |
16 |
18 |
20 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Dua app/signup.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/')
2 |
3 | var firstName = document.getElementById('firstName')
4 | var lastName = document.getElementById('lastName')
5 | var email = document.getElementById('email')
6 | var pass = document.getElementById('pass')
7 |
8 | function submit() {
9 |
10 | var user = {
11 | firstName: firstName.value,
12 | lastName: lastName.value,
13 | email: email.value,
14 | pass: pass.value
15 | }
16 | firebase.auth().
17 | createUserWithEmailAndPassword(user.email, user.pass)
18 | .then(function (res) {
19 | database.child('users/' + res.uid).set(user)
20 | .then(function () {
21 | location = 'login/login.html'
22 | })
23 | })
24 | .catch(function (error) {
25 | // Handle Errors here.
26 | var errorCode = error.code;
27 | var errorMessage = error.message;
28 | if (errorCode == 'auth/weak-password') {
29 | alert('The password is too weak.');
30 | } else {
31 | alert(errorMessage);
32 | }
33 | console.log(error);
34 | });
35 |
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/Authantication done with firebase/signup.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/')
2 |
3 | var firstName = document.getElementById('firstName')
4 | var lastName = document.getElementById('lastName')
5 | var email = document.getElementById('email')
6 | var pass = document.getElementById('pass')
7 |
8 | function submit() {
9 |
10 | var user = {
11 | firstName: firstName.value,
12 | lastName: lastName.value,
13 | email: email.value,
14 | pass: pass.value
15 | }
16 | firebase.auth().
17 | createUserWithEmailAndPassword(user.email, user.pass)
18 | .then(function (res) {
19 | database.child('users/' + res.uid).set(user)
20 | .then(function () {
21 | location = 'login/login.html'
22 | })
23 | })
24 | .catch(function (error) {
25 | // Handle Errors here.
26 | var errorCode = error.code;
27 | var errorMessage = error.message;
28 | if (errorCode == 'auth/weak-password') {
29 | alert('The password is too weak.');
30 | } else {
31 | alert(errorMessage);
32 | }
33 | console.log(error);
34 | });
35 |
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/reducers/authReducer.js:
--------------------------------------------------------------------------------
1 |
2 | const INITIAL_STATE = {
3 | authUser: {},
4 | isAuthenticated: false,
5 | isProcessing: false,
6 | isRegistered: false,
7 | isError: false,
8 | errorMessage: {}
9 | }
10 | const authReducer = (state = INITIAL_STATE, action) => {
11 | switch (action.type) {
12 | case "REGISTER":
13 | return { ...state, isProcessing: true, isRegistered: false, isError: false };
14 |
15 | case "REGISTER_SUCCESS":
16 | return { ...state, isRegistered: true, isProcessing: false };
17 |
18 | case "REGISTER_FAIL":
19 | return { ...state, errorMessage: action.payload, isProcessing: false, isError: true };
20 |
21 | case "LOGIN":
22 | return { ...state, isProcessing: true, isAuthenticated: false, isError: false };
23 |
24 | case "LOGIN_SUCCESS":
25 | return { ...state, isAuthenticated: true, authUser: action.payload, isProcessing: false, isRegistered: false, errorMessage: {} };
26 |
27 | case "LOGIN_FAIL":
28 | return { ...state, errorMessage: action.payload, isProcessing: false, isError: true };
29 | default:
30 | return state
31 | }
32 | }
33 | export default authReducer
--------------------------------------------------------------------------------
/Dua app/login/login.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/')
2 |
3 | var email = document.getElementById('inputEmail')
4 | var pass = document.getElementById('inputPassword')
5 |
6 | document.getElementById('stop').addEventListener("submit", function (event) {
7 | event.preventDefault()
8 | var user = {
9 | email: email.value,
10 | password: pass.value
11 | }
12 |
13 | firebase.auth().signInWithEmailAndPassword(user.email, user.password)
14 | .then(function (res) {
15 | // console.log(res.uid)
16 | database.child('users/' + res.uid).once('value', function (snapshot) {
17 | var convert = JSON.stringify(snapshot.val())
18 | localStorage.setItem('loggedInUser', convert)
19 | location = '../home/home.html'
20 | // console.log(convert)
21 | })
22 | })
23 | .catch(function (error) {
24 | // Handle Errors here.
25 | var errorCode = error.code;
26 | var errorMessage = error.message;
27 | if (errorCode === 'auth/wrong-password') {
28 | alert('Wrong password.');
29 | } else {
30 | alert(errorMessage);
31 | }
32 | console.log(error);
33 | });
34 |
35 | })
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/src/main/java/com/awesomeproject/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.awesomeproject;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.shell.MainReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | return Arrays.asList(
25 | new MainReactPackage()
26 | );
27 | }
28 |
29 | @Override
30 | protected String getJSMainModuleName() {
31 | return "index";
32 | }
33 | };
34 |
35 | @Override
36 | public ReactNativeHost getReactNativeHost() {
37 | return mReactNativeHost;
38 | }
39 |
40 | @Override
41 | public void onCreate() {
42 | super.onCreate();
43 | SoLoader.init(this, /* native exopackage */ false);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/src/main/java/com/navigation/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.navigation;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.shell.MainReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | return Arrays.asList(
25 | new MainReactPackage()
26 | );
27 | }
28 |
29 | @Override
30 | protected String getJSMainModuleName() {
31 | return "index";
32 | }
33 | };
34 |
35 | @Override
36 | public ReactNativeHost getReactNativeHost() {
37 | return mReactNativeHost;
38 | }
39 |
40 | @Override
41 | public void onCreate() {
42 | super.onCreate();
43 | SoLoader.init(this, /* native exopackage */ false);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/container/login.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { connect } from 'react-redux'
3 | import { LoginComponent } from '../components/login'
4 | import { login } from "../actions/authAction"
5 |
6 | class App extends Component {
7 | constructor() {
8 | super()
9 | this.state = {
10 | email: '',
11 | password: ''
12 | }
13 | }
14 | inputHandler(e) {
15 | this.setState({
16 | [e.target.name]: e.target.value
17 | })
18 | }
19 |
20 | submit(e) {
21 | e.preventDefault();
22 | }
23 |
24 | render() {
25 | return (
26 |
27 | )
28 | }
29 | }
30 |
31 |
32 | const mapStateToProps = (state) => {
33 | return {
34 | authReducer: state.UserReducer
35 | }
36 | }
37 | const mapDispatchToProps = (dispatch) => {
38 | return {
39 | myLogin: (credentials) => { // send email and password as a param
40 | dispatch(login(credentials)) // send email and password as a param
41 | }
42 | }
43 | }
44 |
45 | export default connect(mapStateToProps, mapDispatchToProps)(App);
--------------------------------------------------------------------------------
/redux/redux js 4/src/reducers.js:
--------------------------------------------------------------------------------
1 | var obj = {
2 | result: 3,
3 | lastValues: []
4 | }
5 |
6 | export const reducer = (state = obj, action) => {
7 | switch (action.type) {
8 | case "ADD":
9 | state = {
10 | result: state.result + action.payload, // this is muteable
11 | lastValues: [...state.lastValues, action.payload]
12 | }
13 | break;
14 | case "REM":
15 | state = {
16 | result: state.result - action.payload, // this is muteable
17 | lastValues: [...state.lastValues, action.payload]
18 | }
19 | break;
20 | }
21 | return state
22 | }
23 |
24 |
25 | // var user = {
26 | // name: "Majid ",
27 | // age: 24
28 | // }
29 |
30 | // export const userReducer = (state = user, action) => {
31 | // switch (action.type) {
32 | // case "Name":
33 | // state = {
34 | // name: state.name + action.value,
35 | // age: state.age
36 | // }
37 | // break;
38 | // case "Age":
39 | // state = {
40 | // name: state.name,
41 | // age: action.value
42 | // }
43 | // break;
44 | // }
45 | // return state
46 | // }
--------------------------------------------------------------------------------
/redux/Redux React 1 (improve structure)/src/container/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from './logo.svg';
3 | import './App.css';
4 | import { connect } from 'react-redux'
5 | import { AppComponent } from '../components/appComponent'
6 | import { setName } from "../actions/userAction"
7 |
8 | class App extends Component {
9 |
10 | changeUserName() {
11 | this.props.setNewName('Majid Ashraf') // send name
12 | }
13 |
14 | render() {
15 | return (
16 |
17 |
18 |

19 |
Welcome to React
20 |
21 |
22 |
23 |
24 |
25 | );
26 | }
27 | }
28 |
29 |
30 | const mapStateToProps = (state) => {
31 | return {
32 | UserReducer: state.UserReducer
33 | }
34 | }
35 |
36 | const mapDispatchToProps = (dispatch) => {
37 | return {
38 | setNewName: (name) => { // send name as a param
39 | dispatch(setName(name)) // send name as a param
40 | }
41 | }
42 | }
43 |
44 | export default connect(mapStateToProps, mapDispatchToProps)(App);
--------------------------------------------------------------------------------
/ReactJS/routing firebase auth (9)/src/components/contact.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | export class ContactComponent extends Component {
4 | render() {
5 | return (
6 |
7 |
8 | This is a primary alert—check it out!
9 |
10 |
11 | This is a secondary alert—check it out!
12 |
13 |
14 | This is a success alert—check it out!
15 |
16 |
17 | This is a danger alert—check it out!
18 |
19 |
20 | This is a warning alert—check it out!
21 |
22 |
23 | This is a info alert—check it out!
24 |
25 |
26 | This is a light alert—check it out!
27 |
28 |
29 | This is a dark alert—check it out!
30 |
31 |
32 | );
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/src/main/java/com/navigation/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.navigation;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import cl.json.RNSharePackage;
7 | import com.RNFetchBlob.RNFetchBlobPackage;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.react.shell.MainReactPackage;
11 | import com.facebook.soloader.SoLoader;
12 |
13 | import java.util.Arrays;
14 | import java.util.List;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19 | @Override
20 | public boolean getUseDeveloperSupport() {
21 | return BuildConfig.DEBUG;
22 | }
23 |
24 | @Override
25 | protected List getPackages() {
26 | return Arrays.asList(
27 | new MainReactPackage(),
28 | new RNSharePackage(),
29 | new RNFetchBlobPackage()
30 | );
31 | }
32 |
33 | @Override
34 | protected String getJSMainModuleName() {
35 | return "index";
36 | }
37 | };
38 |
39 | @Override
40 | public ReactNativeHost getReactNativeHost() {
41 | return mReactNativeHost;
42 | }
43 |
44 | @Override
45 | public void onCreate() {
46 | super.onCreate();
47 | SoLoader.init(this, /* native exopackage */ false);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/src/components/AppCom.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | // export class App extends Component {
4 | // render() {
5 | // return (
6 | //
7 | //
8 | //
14 | //
15 | //
16 | // );
17 | // }
18 | // }
19 |
20 | export const App = (prop) => {
21 | return (
22 |
23 |
33 | )
34 | }
35 |
36 | // export default App
--------------------------------------------------------------------------------
/Authantication done with firebase/login/login.js:
--------------------------------------------------------------------------------
1 | var database = firebase.database().ref('/')
2 |
3 | var email = document.getElementById('inputEmail')
4 | var pass = document.getElementById('inputPassword')
5 |
6 | document.getElementById('stop')
7 | .addEventListener("submit", function (event) {
8 | event.preventDefault()
9 | var user = {
10 | email: email.value,
11 | password: pass.value
12 | }
13 |
14 | firebase.auth().signInWithEmailAndPassword(user.email, user.password)
15 | .then(function (res) {
16 | // console.log(res.uid)
17 | database.child('users/' + res.uid)
18 | .once('value', function (snapshot) {
19 | var convert = JSON.stringify(snapshot.val())
20 | localStorage.setItem('loggedInUser', convert)
21 | location = '../home/home.html'
22 | // console.log(convert)
23 | })
24 | })
25 | .catch(function (error) {
26 | // Handle Errors here.
27 | var errorCode = error.code;
28 | var errorMessage = error.message;
29 | if (errorCode === 'auth/wrong-password') {
30 | alert('Wrong password.');
31 | } else {
32 | alert(errorMessage);
33 | }
34 | console.log(error);
35 | });
36 |
37 | })
--------------------------------------------------------------------------------
/react native/navigation with firebase/App.js:
--------------------------------------------------------------------------------
1 | import { StackNavigator, TabNavigator } from 'react-navigation';
2 | import { LoginPage, Registration, HomePage, AboutPage, ContactPage } from './application/components';
3 | import * as firebase from 'firebase'
4 |
5 |
6 | // Initialize Firebase
7 | var config = {
8 | };
9 | firebase.initializeApp(config);
10 |
11 |
12 |
13 |
14 | const Routing = StackNavigator({
15 | login: {
16 | screen: LoginPage,
17 | },
18 | signup: {
19 | screen: Registration,
20 | navigationOptions: () => ({
21 | title: 'Register',
22 | headerStyle: {
23 | backgroundColor: '#232323',
24 | },
25 | headerTintColor: '#fff',
26 | headerTitleStyle: {
27 | fontWeight: 'bold',
28 | },
29 | })
30 | },
31 | Dashboard: {
32 | screen: TabNavigator({
33 | Home: {
34 | screen: HomePage,
35 | navigationOptions: () => ({
36 | title: "Main page"
37 | })
38 | },
39 | About: {
40 | screen: AboutPage
41 | },
42 | Contact: {
43 | screen: ContactPage
44 | },
45 | }),
46 | navigationOptions: () => ({
47 | header: null
48 | })
49 | }
50 | })
51 |
52 | export default Routing
53 |
54 |
55 |
56 |
57 |
58 |
59 | // export default TabNavigator({
60 | // Home: {
61 | // screen: HomePage
62 | // },
63 | // About: {
64 | // screen: AboutPage
65 | // },
66 | // contact: {
67 | // screen: ContactPage
68 | // },
69 | // })
70 |
71 |
--------------------------------------------------------------------------------
/react native/cameraRoll/App.js:
--------------------------------------------------------------------------------
1 | import { StackNavigator, TabNavigator } from 'react-navigation';
2 | import { LoginPage, Registration, GallaryPage, AboutPage, SocialShering } from './application/components';
3 | import * as firebase from 'firebase'
4 |
5 |
6 | // Initialize Firebase
7 | var config = {
8 | };
9 | firebase.initializeApp(config);
10 |
11 |
12 |
13 |
14 | const Routing = StackNavigator({
15 | login: {
16 | screen: LoginPage,
17 | },
18 | signup: {
19 | screen: Registration,
20 | navigationOptions: () => ({
21 | title: 'Register',
22 | headerStyle: {
23 | backgroundColor: '#232323',
24 | },
25 | headerTintColor: '#fff',
26 | headerTitleStyle: {
27 | fontWeight: 'bold',
28 | },
29 | })
30 | },
31 | Dashboard: {
32 | screen: TabNavigator({
33 | Gallary: {
34 | screen: GallaryPage,
35 | navigationOptions: () => ({
36 | title: "Camera Roll"
37 | })
38 | },
39 | About: {
40 | screen: AboutPage
41 | },
42 | SocialShering: {
43 | screen: SocialShering
44 | },
45 | }),
46 | navigationOptions: () => ({
47 | header: null
48 | })
49 | }
50 | })
51 |
52 | export default Routing
53 |
54 |
55 |
56 |
57 |
58 |
59 | // export default TabNavigator({
60 | // Home: {
61 | // screen: GallaryPage
62 | // },
63 | // About: {
64 | // screen: AboutPage
65 | // },
66 | // contact: {
67 | // screen: SocialShering
68 | // },
69 | // })
70 |
71 |
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import
13 | #import
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"navigation"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import
13 | #import
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"AwesomeProject"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import
13 | #import
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"navigation"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/ES6/Class 3/app.js:
--------------------------------------------------------------------------------
1 | // var a = "8"
2 | // var c = "8"
3 | // var b = `4 + 4 = ${c + a} `
4 | // let fname = 5;
5 | // let obj = {fname : fname}
6 | // console.log(obj)
7 | // console.log(obj.fname)
8 |
9 |
10 | // function foo() {
11 | // }
12 |
13 | // let foo = () => { }
14 |
15 |
16 | // let ind = 100;
17 | // var obj = {
18 | // // foo(a){
19 | // // return a + 3
20 | // // }
21 |
22 | // ["myName" + ind + 0]: "Majid",
23 | // [`myName ${ind} ${0}`]: "Majid",
24 | // }
25 | // // console.log(obj.foo(3)) // 6
26 | // console.log(obj)
27 | // console.log(obj.myName100)
28 |
29 |
30 |
31 |
32 |
33 |
34 | // function inc (){ return 23}
35 | // console.log(inc())
36 |
37 | // let inc = x => x + 5;
38 |
39 | // let foo = (x) => {
40 | // //code here
41 | // return x + 5
42 | // };
43 | // console.log(inc(5))
44 |
45 | // user,likes,comments,post
46 |
47 | let users = () => {
48 | // get id from storage
49 | var id = "fsdf5df56sdf6sf4s"
50 | var data = fatchData(`${id}`, "/user")
51 | }
52 | let likes = () => {
53 | // get id from storage
54 | var id = "fsdf5df56sdf6sf4s"
55 | var data = fatchData(`${id}`, "/likes")
56 | }
57 | let comments = () => {
58 | // get id from storage
59 | var id = "fsdf5df56sdf6sf4s"
60 | var data = fatchData(`${id}`, "/comments")
61 | }
62 |
63 | // rest function
64 | let fatchData = (id, node) => {
65 | firebase.database
66 | .ref('/').child(`${node}/${id}`).on("child_added", (snapshot) => {
67 | let data = snapshot.val()
68 | return data
69 | })
70 | }
--------------------------------------------------------------------------------
/react native/awesomeproject/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 |
16 | ; Ignore polyfills
17 | .*/Libraries/polyfills/.*
18 |
19 | ; Ignore metro
20 | .*/node_modules/metro/.*
21 |
22 | [include]
23 |
24 | [libs]
25 | node_modules/react-native/Libraries/react-native/react-native-interface.js
26 | node_modules/react-native/flow/
27 | node_modules/react-native/flow-github/
28 |
29 | [options]
30 | emoji=true
31 |
32 | module.system=haste
33 |
34 | munge_underscores=true
35 |
36 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
37 |
38 | module.file_ext=.js
39 | module.file_ext=.jsx
40 | module.file_ext=.json
41 | module.file_ext=.native.js
42 |
43 | suppress_type=$FlowIssue
44 | suppress_type=$FlowFixMe
45 | suppress_type=$FlowFixMeProps
46 | suppress_type=$FlowFixMeState
47 |
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
52 |
53 | [version]
54 | ^0.65.0
55 |
--------------------------------------------------------------------------------
/react native/cameraRoll/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 |
16 | ; Ignore polyfills
17 | .*/Libraries/polyfills/.*
18 |
19 | ; Ignore metro
20 | .*/node_modules/metro/.*
21 |
22 | [include]
23 |
24 | [libs]
25 | node_modules/react-native/Libraries/react-native/react-native-interface.js
26 | node_modules/react-native/flow/
27 | node_modules/react-native/flow-github/
28 |
29 | [options]
30 | emoji=true
31 |
32 | module.system=haste
33 |
34 | munge_underscores=true
35 |
36 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
37 |
38 | module.file_ext=.js
39 | module.file_ext=.jsx
40 | module.file_ext=.json
41 | module.file_ext=.native.js
42 |
43 | suppress_type=$FlowIssue
44 | suppress_type=$FlowFixMe
45 | suppress_type=$FlowFixMeProps
46 | suppress_type=$FlowFixMeState
47 |
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
52 |
53 | [version]
54 | ^0.65.0
55 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 |
16 | ; Ignore polyfills
17 | .*/Libraries/polyfills/.*
18 |
19 | ; Ignore metro
20 | .*/node_modules/metro/.*
21 |
22 | [include]
23 |
24 | [libs]
25 | node_modules/react-native/Libraries/react-native/react-native-interface.js
26 | node_modules/react-native/flow/
27 | node_modules/react-native/flow-github/
28 |
29 | [options]
30 | emoji=true
31 |
32 | module.system=haste
33 |
34 | munge_underscores=true
35 |
36 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
37 |
38 | module.file_ext=.js
39 | module.file_ext=.jsx
40 | module.file_ext=.json
41 | module.file_ext=.native.js
42 |
43 | suppress_type=$FlowIssue
44 | suppress_type=$FlowFixMe
45 | suppress_type=$FlowFixMeProps
46 | suppress_type=$FlowFixMeState
47 |
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
52 |
53 | [version]
54 | ^0.65.0
55 |
--------------------------------------------------------------------------------
/react native/cameraRoll/application/components/gallary.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View, ScrollView, CameraRoll, Button, Image } from 'react-native';
3 |
4 | export default class GallaryPage extends Component {
5 | constructor() {
6 | super()
7 | this.state = {
8 | photos: []
9 | }
10 | }
11 | _handleButtonPress = () => {
12 | CameraRoll.getPhotos({
13 | first: 20,
14 | assetType: 'Photos',
15 | })
16 | .then(r => {
17 | this.setState({ photos: r.edges });
18 | })
19 | .catch((err) => {
20 | //Error Loading Images
21 | });
22 | };
23 | render() {
24 | return (
25 |
26 |
27 |
28 | {this.state.photos.map((p, i) => {
29 | return (
30 |
31 |
38 |
39 | );
40 | })}
41 |
42 |
43 | //
44 | // Home Screen
45 | //
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/ReactJS/attach firebase/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ReactJS/export import classes/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ReactJS/lifecycle event (7)/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ReactJS/structure + state (6)/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ReactJS/todo with firebase/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/react native/cameraRoll/ios/navigation-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/react native/cameraRoll/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | lib_deps = []
12 |
13 | for jarfile in glob(['libs/*.jar']):
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15 | lib_deps.append(':' + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
21 | for aarfile in glob(['libs/*.aar']):
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23 | lib_deps.append(':' + name)
24 | android_prebuilt_aar(
25 | name = name,
26 | aar = aarfile,
27 | )
28 |
29 | android_library(
30 | name = "all-libs",
31 | exported_deps = lib_deps,
32 | )
33 |
34 | android_library(
35 | name = "app-code",
36 | srcs = glob([
37 | "src/main/java/**/*.java",
38 | ]),
39 | deps = [
40 | ":all-libs",
41 | ":build_config",
42 | ":res",
43 | ],
44 | )
45 |
46 | android_build_config(
47 | name = "build_config",
48 | package = "com.navigation",
49 | )
50 |
51 | android_resource(
52 | name = "res",
53 | package = "com.navigation",
54 | res = "src/main/res",
55 | )
56 |
57 | android_binary(
58 | name = "app",
59 | keystore = "//android/keystores:debug",
60 | manifest = "src/main/AndroidManifest.xml",
61 | package_type = "debug",
62 | deps = [
63 | ":app-code",
64 | ],
65 | )
66 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/react native/awesomeproject/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | lib_deps = []
12 |
13 | for jarfile in glob(['libs/*.jar']):
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15 | lib_deps.append(':' + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
21 | for aarfile in glob(['libs/*.aar']):
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23 | lib_deps.append(':' + name)
24 | android_prebuilt_aar(
25 | name = name,
26 | aar = aarfile,
27 | )
28 |
29 | android_library(
30 | name = "all-libs",
31 | exported_deps = lib_deps,
32 | )
33 |
34 | android_library(
35 | name = "app-code",
36 | srcs = glob([
37 | "src/main/java/**/*.java",
38 | ]),
39 | deps = [
40 | ":all-libs",
41 | ":build_config",
42 | ":res",
43 | ],
44 | )
45 |
46 | android_build_config(
47 | name = "build_config",
48 | package = "com.awesomeproject",
49 | )
50 |
51 | android_resource(
52 | name = "res",
53 | package = "com.awesomeproject",
54 | res = "src/main/res",
55 | )
56 |
57 | android_binary(
58 | name = "app",
59 | keystore = "//android/keystores:debug",
60 | manifest = "src/main/AndroidManifest.xml",
61 | package_type = "debug",
62 | deps = [
63 | ":app-code",
64 | ],
65 | )
66 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | lib_deps = []
12 |
13 | for jarfile in glob(['libs/*.jar']):
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15 | lib_deps.append(':' + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
21 | for aarfile in glob(['libs/*.aar']):
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23 | lib_deps.append(':' + name)
24 | android_prebuilt_aar(
25 | name = name,
26 | aar = aarfile,
27 | )
28 |
29 | android_library(
30 | name = "all-libs",
31 | exported_deps = lib_deps,
32 | )
33 |
34 | android_library(
35 | name = "app-code",
36 | srcs = glob([
37 | "src/main/java/**/*.java",
38 | ]),
39 | deps = [
40 | ":all-libs",
41 | ":build_config",
42 | ":res",
43 | ],
44 | )
45 |
46 | android_build_config(
47 | name = "build_config",
48 | package = "com.navigation",
49 | )
50 |
51 | android_resource(
52 | name = "res",
53 | package = "com.navigation",
54 | res = "src/main/res",
55 | )
56 |
57 | android_binary(
58 | name = "app",
59 | keystore = "//android/keystores:debug",
60 | manifest = "src/main/AndroidManifest.xml",
61 | package_type = "debug",
62 | deps = [
63 | ":app-code",
64 | ],
65 | )
66 |
--------------------------------------------------------------------------------
/redux/Redux React Auth (10)/src/components/login.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'react-router-dom';
3 |
4 | export class LoginComponent extends React.Component {
5 | render() {
6 | const prop = this.props;
7 | return (
8 |
9 |
LOGIN WITH YOUR CREDENTIALS
10 |
11 |
30 |
31 |
32 |
33 |
34 |
35 | )
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/application/components/login.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { StyleSheet } from 'react-native';
3 |
4 | import { Container, Button, Text, Content, Form, Item, Input, Label } from 'native-base';
5 |
6 |
7 | export default class LoginPage extends Component {
8 | static navigationOptions = {
9 | title: 'Login',
10 | headerStyle: {
11 | backgroundColor: '#232323',
12 | },
13 | headerTintColor: '#aaa',
14 | headerTitleStyle: {
15 | fontWeight: 'bold',
16 | },
17 | };
18 | render() {
19 | return (
20 |
21 |
22 |
32 |
35 |
38 |
39 | {/*
40 |
44 |
45 | );
46 | }
47 | }
48 |
49 | const styles = StyleSheet.create({
50 | loginButtonSection: {
51 | width: '100%',
52 | justifyContent: "center"
53 | }
54 | })
--------------------------------------------------------------------------------
/react native/awesomeproject/ios/AwesomeProject/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | AwesomeProject
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UIViewControllerBasedStatusBarAppearance
40 |
41 | NSLocationWhenInUseUsageDescription
42 |
43 | NSAppTransportSecurity
44 |
45 |
46 | NSExceptionDomains
47 |
48 | localhost
49 |
50 | NSExceptionAllowsInsecureHTTPLoads
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/react native/navigation with firebase/ios/navigation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | navigation
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UIViewControllerBasedStatusBarAppearance
40 |
41 | NSLocationWhenInUseUsageDescription
42 |
43 | NSAppTransportSecurity
44 |
45 |
46 | NSExceptionDomains
47 |
48 | localhost
49 |
50 | NSExceptionAllowsInsecureHTTPLoads
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/Dua app/login/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Login
9 |
10 |
11 |
12 |
13 |
14 |
15 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Authantication done with firebase/login/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Login
9 |
10 |
11 |
12 |
13 |
14 |
15 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Authantication with firebase/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Document
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/ES6/class 2/app.js:
--------------------------------------------------------------------------------
1 | // // var funcs = [];
2 | // // for (var i = 0; i < 10; i++) {
3 | // // funcs.push(function () {
4 | // // console.log(i);
5 | // // });
6 | // // }
7 | // // funcs.forEach(function (func) {
8 | // // func();
9 | // // });
10 |
11 |
12 | // // var funcs = [];
13 | // // for (var i = 0; i < 10; i++) {
14 | // // funcs.push((function (value) {
15 | // // return function () {
16 | // // console.log(value);
17 | // // }
18 | // // }(i)));
19 | // // }
20 | // // // console.log('value', value)
21 | // // // console.log(i)
22 | // // funcs.forEach(function (func) {
23 | // // func(); // outputs 0, then 1, then 2, up to 9
24 | // // });
25 |
26 |
27 |
28 | // // setTimeout(function() {
29 | // // console.log("Out side timer",i);
30 | // // }, 1000);
31 |
32 | // // for (var i = 0; i < 10; i++) {
33 | // // // process(items[i]);
34 | // // console.log(i);
35 | // // }
36 | // // // i is still accessible here
37 | // // console.log("Out side",i);
38 |
39 |
40 |
41 | // // var funcs = [];
42 | // // for (let i = 0; i < 10; i++) {
43 | // // funcs.push(function () {
44 | // // console.log(i);
45 | // // });
46 | // // }
47 | // // funcs.forEach(function (func) {
48 | // // func();
49 | // // });
50 |
51 |
52 |
53 | // // var funcs = [],
54 | // // object = {
55 | // // a: true,
56 | // // b: true,
57 | // // c: true
58 | // // };
59 | // // for (let key in object) {
60 | // // funcs.push(function () {
61 | // // console.log(key);
62 | // // });
63 | // // }
64 | // // funcs.forEach(function (func) {
65 | // // func(); // outputs "a", then "b", then "c"
66 | // // });
67 |
68 |
69 | // // const obj = {
70 | // // name : "demo",
71 | // // color : "red"
72 | // // }
73 | // // Object.freeze(obj)
74 | // // obj.name = "MAjid"
75 |
76 | // var name = "majid";
77 | // var add = "khi";
78 | // alert(`hello ${name} ${add} `)
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/redux/redux js 4/src/app.js:
--------------------------------------------------------------------------------
1 | // import { createStore, applyMiddleware } from 'redux'
2 | // import { reducer } from './reducers.js'
3 |
4 | // const logger = (store) => (next) => (action) => {
5 | // // console.log("AcTION", action)
6 | // next(action)
7 | // }
8 |
9 | // const middleware = applyMiddleware(logger)
10 |
11 | // const store = createStore(reducer, middleware)
12 |
13 | // store.subscribe(() => {
14 | // console.log("............", store.getState())
15 | // })
16 | // store.dispatch({
17 | // type: "ADD",
18 | // payload: 101
19 | // })
20 | // store.dispatch({
21 | // type: "ADD",
22 | // payload: 105
23 | // })
24 | // store.dispatch({
25 | // type: "REM",
26 | // value: 100
27 | // })
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | // STEP 1
38 |
39 | // import { createStore, applyMiddleware } from 'redux'
40 | // import logger from 'redux-logger'
41 | // import { reducer } from './reducers.js'
42 |
43 | // const middleware = applyMiddleware(logger())
44 |
45 | // const store = createStore(reducer, middleware)
46 |
47 | // // store.subscribe(() => { //now you dont need to subscribe
48 | // // console.log("............", store.getState())
49 | // // })
50 |
51 | // store.dispatch({
52 | // type: "ADD",
53 | // payload: 101
54 | // })
55 | // store.dispatch({
56 | // type: "ADD",
57 | // payload: 105
58 | // })
59 | // store.dispatch({
60 | // type: "ADD",
61 | // payload: 109
62 | // })
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | // STEP 2
72 |
73 | import { createStore, combineReducers, applyMiddleware } from 'redux'
74 | import logger from 'redux-logger'
75 | import { reducer } from './reducers.js'
76 | import thunk from 'redux-thunk'
77 |
78 | const middleware = applyMiddleware(thunk, logger())
79 |
80 | const store = createStore(reducer, middleware)
81 |
82 |
83 | // store.dispatch({
84 | // type: "ADD",
85 | // value: 101
86 | // })
87 |
88 | store.dispatch((dispatcher) => {
89 | dispatcher({ type: "ADD", payload: 101 })
90 | // do something asyn
91 | dispatcher({ type: "ADD", payload: 201 })
92 | // dispatcher({})
93 | })
94 |
--------------------------------------------------------------------------------