├── fp
├── meta.txt
├── data.txt
├── package.json
├── zip.py
├── .gitignore
├── WhyMayBeFunctor.html
├── Once.html
├── HeadTail.html
├── Zip.html
├── ImperativeErrorHandlingProb.html
├── Curry.html
├── MathFunction.html
├── Otherwise.html
├── Unary.html
├── Monad.html
├── RamdaNode.js
├── Ramda_1.html
├── WhyApplicative.html
├── RamdaMethod2.html
├── MonadProblem.html
├── TopKFrequentRamda2.html
├── RealWorldHOF.html
├── ValidationWithFP.html
├── FunctionalErrorHandling.html
├── RamdaMethod.html
└── Identity.html
├── chapter13
├── filename.txt
├── PromiseReadFile.js
├── PromiseErrorHandling.js
├── ReadFile.js
├── ReadFilePromise.js
├── ReadFileCallBack.js
├── WhyCallBack.js
├── AsyncRead.js
├── PromiseSettle.html
├── ReadSync.js
├── ReadTwoFilePromise
├── Promise2.html
├── ForAwait.html
├── AsyncAwait.html
├── HowAsync.html
└── Promise.html
├── backend
├── public
│ ├── images
│ │ └── download.txt
│ └── stylesheets
│ │ └── style.css
├── .DS_Store
├── config
│ ├── database.js
│ └── Config.js
├── views
│ ├── index.pug
│ ├── error.pug
│ └── layout.pug
├── .idea
│ ├── .gitignore
│ ├── vcs.xml
│ ├── modules.xml
│ └── backend.iml
├── routes
│ ├── index.js
│ ├── users.js
│ ├── movies.js
│ ├── reviews.js
│ └── todos.js
├── model
│ ├── ToDo.js
│ ├── user.js
│ ├── Review.js
│ └── Movie.js
└── package.json
├── helloWorld.js
├── demo.js
├── chapter15
├── script3.js
├── script1.js
├── worker.js
├── XSS.html
├── Clock.html
├── fworker.js
├── Preselected.html
├── Worker.html
├── DOMAPI.html
├── CSS.html
├── apicall.js
├── PseudoSelector.html
├── Storage.html
├── Location.html
├── PreventDefault.html
├── LiveDOM.html
└── Traversal.html
├── demo.ts
├── chapter8
├── swap.py
├── FunctionCon.html
├── WhyNameSpace.html
├── Spread.html
├── multiple_return.go
├── ObjectDestr.html
├── Nested.html
├── Property.html
├── FunctionAsClass.html
├── Closure.html
├── ArrayDestructuring.html
├── WhyFunction.html
├── TypeCheck.html
├── Arguments.html
├── Keys.html
├── MultipleReturn.html
├── ClosureAsObject.html
├── Method.html
├── CallApplyBind.html
├── Optional.html
├── ArrowFunction.html
└── FunctionValue.html
├── .DS_Store
├── StaticType
├── chapter10
├── use_module.js
├── node_m.js
├── es6_m.js
├── UseEs6.html
├── UseModule.html
└── Module.js
├── frontend
├── src
│ ├── components
│ │ ├── HelloWorld.css
│ │ ├── PageComponent.css
│ │ ├── GrayBorder.css
│ │ ├── hook
│ │ │ ├── Transition.css
│ │ │ ├── fakeName.js
│ │ │ ├── IdDemo.js
│ │ │ ├── ExternalStore.js
│ │ │ ├── CustomInput.js
│ │ │ ├── todoStore.js
│ │ │ ├── LayoutEffectDemo.js
│ │ │ ├── RefCounterProblem.js
│ │ │ ├── FocusDemo.js
│ │ │ └── RefCounter.js
│ │ ├── pattern
│ │ │ ├── hoc
│ │ │ │ ├── Border.css
│ │ │ │ ├── Border.js
│ │ │ │ ├── withHover.js
│ │ │ │ ├── withLoader.js
│ │ │ │ ├── ToDoWithFetchUrl.js
│ │ │ │ ├── useFetchUrl.js
│ │ │ │ └── useHover.js
│ │ │ └── render-property
│ │ │ │ └── MouseTracker.css
│ │ ├── context
│ │ │ ├── ContextData.js
│ │ │ └── reducerWithContext
│ │ │ │ └── ToDoContext.js
│ │ ├── class-component.css
│ │ ├── JsxChildren.js
│ │ ├── RenderWithCondition.js
│ │ ├── GrayBorder.js
│ │ ├── FuncGreeting.js
│ │ ├── classedbased
│ │ │ ├── BugComponent.js
│ │ │ ├── Greeting.js
│ │ │ └── LifeCycleWrapper.js
│ │ ├── ClassComponent.js
│ │ ├── RepeatDemo.js
│ │ ├── portal
│ │ │ └── MyModal.css
│ │ ├── stateful
│ │ │ ├── ReRenderIssue.js
│ │ │ ├── CounterAlert.js
│ │ │ └── CounterTwo.js
│ │ ├── interaction
│ │ │ └── EventDemo.js
│ │ ├── Tab.css
│ │ ├── FlushSync.js
│ │ ├── effect
│ │ │ └── ChatRoom.js
│ │ ├── ConditionalRendering.js
│ │ ├── Table.js
│ │ ├── JsxProperty.js
│ │ ├── HelloWorld.js
│ │ └── thirdparty
│ │ │ └── DatePicker.js
│ ├── setupTests.js
│ ├── routes
│ │ ├── Destroy.js
│ │ └── Index.js
│ ├── App.test.js
│ ├── index.css
│ ├── reportWebVitals.js
│ └── pages
│ │ └── ErrorPage.js
├── public
│ ├── robots.txt
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ └── manifest.json
└── .gitignore
├── frontend-redux-typescript
├── src
│ ├── react-app-env.d.ts
│ ├── setting
│ │ └── API.ts
│ ├── features
│ │ ├── reviews
│ │ │ ├── Review.css
│ │ │ └── reviewApi.ts
│ │ ├── todo
│ │ │ ├── Todo.css
│ │ │ └── todoAPI.ts
│ │ ├── counter
│ │ │ └── counterAPI.ts
│ │ ├── movies
│ │ │ ├── movieApi.ts
│ │ │ ├── Movie.css
│ │ │ └── MovieListUI.tsx
│ │ └── auth
│ │ │ └── authApi.ts
│ ├── page
│ │ ├── HomePage.tsx
│ │ ├── ToDoPage.tsx
│ │ ├── MoviePage.tsx
│ │ └── LogoutPage.tsx
│ ├── components
│ │ ├── HelloWorld.tsx
│ │ └── PrivateRoute.tsx
│ ├── setupTests.ts
│ ├── app
│ │ └── hooks.ts
│ ├── index.css
│ ├── services
│ │ └── authService.ts
│ ├── App.test.tsx
│ ├── reportWebVitals.ts
│ └── App.css
├── public
│ ├── robots.txt
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ └── manifest.json
├── .idea
│ ├── .gitignore
│ ├── vcs.xml
│ ├── inspectionProfiles
│ │ └── Project_Default.xml
│ ├── modules.xml
│ └── frontend-redux-typescript.iml
├── .gitignore
└── tsconfig.json
├── py_byte_code.py
├── HelloWorld.class
├── chapter2
├── .DS_Store
├── literal.js
├── type.js
├── identifier.js
├── case_sen.js
├── arithmetic.js
└── float_problem.js
├── typescript
├── hello.js
├── OptionalInheritance.ts
├── enum.ts
├── optional_par.ts
├── PrivateField.ts
├── tuple.js
├── intersection.ts
├── any_function.ts
├── object_type.js
├── ClassIndexSignature.ts
├── FirstClassClass.ts
├── function_type_2.ts
├── objects.ts
├── assign.ts
├── RuntimeThis.ts
├── Sonar.ts
├── rest_parameter.ts
├── this_in_function.ts
├── types.ts
├── index_signature.ts
├── typegurad.ts
├── readonly_Arr.ts
├── hello.ts
├── function_type.ts
├── Abstract.ts
├── ParamProperty.ts
├── JSProblem.js
├── object_type.ts
├── push_down_type.ts
├── tuple.ts
├── CallOrConstruct.ts
├── GetterSetter.ts
├── interfaces.ts
├── construct_singature.ts
├── functions.ts
├── ArrowFunction.ts
├── Initialization.ts
├── WhyGeneric.ts
├── union.ts
├── intersect_type.ts
├── call_signature.ts
├── literal_type.ts
├── constraint.js
├── type_alias.ts
├── Visibility.ts
├── constraint.ts
├── why_gen.ts
├── Static.ts
└── ThisTypeGuard.ts
├── chapter3
├── parallel.py
├── StaticType.java
├── ToNumber.html
├── DateTime.html
├── Gloabal.html
├── Equality.html
├── Symbol.html
├── number_liter.js
├── multi_return.go
├── TypeConversion.html
├── DynamicType.html
├── ObjectDestruct.html
├── Swap.html
├── Variable.html
├── math.js
├── ArrayToPrimitive.html
├── NaN.js
├── ObjectToType.html
├── boolean.html
├── Resolution.html
├── Template.html
├── NullUndefined.html
├── GlobalScope.html
├── Object_StringPritmitive.html
├── NumberToBoolean.html
├── str_demo.html
├── Destructuring.html
├── ObjectToPrimitive.html
├── StringToNumber.html
├── string_method.html
├── VarLetConst.html
└── AddTwoObject.html
├── HelloWorld.html
├── chapter4
├── Comma.html
├── Function.html
├── Expression.html
├── Equality.html
├── Operator.html
├── PlusPlusOp.html
├── Comparison.html
├── Conditional.html
├── unary-arthmetic.html
├── Delete.html
├── in.html
├── Assignment.html
├── CompoundAssignment.html
├── Arithmetic.html
├── Bitwise.html
└── Logical.html
├── dynamic.js
├── HelloWorld.java
├── dyanmic.html
├── chapter11
├── URL.html
├── ConsoleTime.html
├── MapKey.html
├── TypedArray.html
├── Allocation.html
├── Reg_5.html
├── EventLoop.html
├── Error.html
├── Reg_Email.html
├── DateManipulation.html
├── DateTime.html
├── Internationalization.html
├── SetTImeout.html
├── CompareString.html
├── Reg_4.html
├── JSON_Parse.html
├── Reg_3.html
├── FormatParseDate.html
├── DeepClone.html
└── Timer.html
├── chapter5
├── UseStrict.html
├── go_to_demo.go
├── Continue.html
├── While.html
├── Compound.html
├── ElseIf.html
├── Yield.html
├── SetMap.html
├── Return.html
├── ExpressionStatement.html
├── NestedLoop.html
├── ForLoop.html
├── ForEachKeyValue.html
├── Break.html
├── WhyLoop.html
├── Throw2.html
├── Switch.html
├── ForEach.html
└── Exam.html
├── chapter6
├── Spread.html
├── CreateTwo.html
├── Object2.html
├── ShortHand.html
├── ObjectDemo.html
├── Create.html
├── Query.html
├── Prototype.html
├── Serialization.html
├── Assign.html
├── GetterSetter.html
└── Clone.html
├── StaticType.cpp
├── chapter7
├── Method3.html
├── ArrayCon.html
├── Sparse.html
├── ArrayFrom.html
├── Method4.html
├── ArrayMethod6.html
├── ForEach.html
├── WhyArray.html
└── MultiDimensional.html
├── MaxElement.html
├── chapter9
├── Abstract.html
├── ClassExpression.html
├── AddMethod.html
├── Private.html
└── BeforeClass.html
├── chapter12
├── Iterator.html
├── Tree.html
├── Generator3.html
├── Generator2.html
└── Generator.html
└── chapter14
├── Seal.html
├── Validation.html
└── PropertyAttribute.html
/fp/meta.txt:
--------------------------------------------------------------------------------
1 | data.txt
--------------------------------------------------------------------------------
/chapter13/filename.txt:
--------------------------------------------------------------------------------
1 | hello.txt
--------------------------------------------------------------------------------
/backend/public/images/download.txt:
--------------------------------------------------------------------------------
1 | Data
--------------------------------------------------------------------------------
/fp/data.txt:
--------------------------------------------------------------------------------
1 | Some data from data.txt
--------------------------------------------------------------------------------
/helloWorld.js:
--------------------------------------------------------------------------------
1 | console.log("Hello World");
--------------------------------------------------------------------------------
/demo.js:
--------------------------------------------------------------------------------
1 | var a = 10;
2 | console.log("A is ", a);
3 |
--------------------------------------------------------------------------------
/chapter15/script3.js:
--------------------------------------------------------------------------------
1 | console.log('Script 3 run by async');
--------------------------------------------------------------------------------
/demo.ts:
--------------------------------------------------------------------------------
1 | let a :number = 10;
2 | console.log("A is ",a);
--------------------------------------------------------------------------------
/chapter8/swap.py:
--------------------------------------------------------------------------------
1 | i = 10
2 | j = 20
3 | j,i = i,j
4 | print("I ",i, " J ",j)
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/.DS_Store
--------------------------------------------------------------------------------
/StaticType:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/StaticType
--------------------------------------------------------------------------------
/chapter10/use_module.js:
--------------------------------------------------------------------------------
1 | const our_module = require('./node_m.js');
2 | our_module.api();
--------------------------------------------------------------------------------
/fp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "ramda": "^0.28.0"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/frontend/src/components/HelloWorld.css:
--------------------------------------------------------------------------------
1 | .avatar
2 | {
3 | border-radius: 50%;
4 | }
--------------------------------------------------------------------------------
/frontend/src/components/PageComponent.css:
--------------------------------------------------------------------------------
1 | .avatar
2 | {
3 | border-radius: 50%;
4 | }
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frontend/src/components/GrayBorder.css:
--------------------------------------------------------------------------------
1 | .gray-border
2 | {
3 | border:1px solid gray;
4 | }
--------------------------------------------------------------------------------
/chapter10/node_m.js:
--------------------------------------------------------------------------------
1 | function api()
2 | {
3 | console.log('Api');
4 | }
5 | exports.api = api;
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/setting/API.ts:
--------------------------------------------------------------------------------
1 | export const API_URL = "http://localhost:3000/api";
--------------------------------------------------------------------------------
/py_byte_code.py:
--------------------------------------------------------------------------------
1 | import dis
2 |
3 | def hello(msg):
4 | print("Hello ",msg)
5 | dis.dis(hello)
--------------------------------------------------------------------------------
/HelloWorld.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/HelloWorld.class
--------------------------------------------------------------------------------
/backend/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/backend/.DS_Store
--------------------------------------------------------------------------------
/chapter2/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/chapter2/.DS_Store
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/features/reviews/Review.css:
--------------------------------------------------------------------------------
1 | .review
2 | {
3 | padding-top: 10px;
4 | }
--------------------------------------------------------------------------------
/typescript/hello.js:
--------------------------------------------------------------------------------
1 | var str = 10;
2 | var result = str * 3;
3 | console.log('Result ', result);
4 |
--------------------------------------------------------------------------------
/backend/config/database.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | db: 'mongodb://0.0.0.0:27017/react_5th_batch'
3 | }
--------------------------------------------------------------------------------
/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frontend/src/components/hook/Transition.css:
--------------------------------------------------------------------------------
1 | .highlight
2 | {
3 | color:green;
4 | font-weight: bold;
5 | }
--------------------------------------------------------------------------------
/chapter10/es6_m.js:
--------------------------------------------------------------------------------
1 | console.log('ES6 module loaded');
2 | export function api()
3 | {
4 | console.log('API');
5 | }
--------------------------------------------------------------------------------
/frontend/src/components/pattern/hoc/Border.css:
--------------------------------------------------------------------------------
1 | .border
2 | {
3 | padding:10px;
4 | border:1px solid gray;
5 | }
--------------------------------------------------------------------------------
/frontend/src/components/pattern/render-property/MouseTracker.css:
--------------------------------------------------------------------------------
1 | .mouse-tracker
2 | {
3 | background: gray;
4 | }
--------------------------------------------------------------------------------
/backend/views/index.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h1= title
5 | p Welcome to home page #{title}
6 |
--------------------------------------------------------------------------------
/frontend-redux-typescript/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/frontend/public/logo192.png
--------------------------------------------------------------------------------
/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/frontend/public/logo512.png
--------------------------------------------------------------------------------
/chapter3/parallel.py:
--------------------------------------------------------------------------------
1 | a = 10
2 | b = 20
3 |
4 | #temp = a
5 | #a = b
6 | #b = temp
7 | b,a = a,b
8 | print("A ",a , " B ",b)
--------------------------------------------------------------------------------
/backend/views/error.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h1= message
5 | h2= error.status
6 | pre #{error.stack}
7 |
--------------------------------------------------------------------------------
/chapter15/script1.js:
--------------------------------------------------------------------------------
1 | window.something= 'Update by script 1';
2 | console.log('Script 1');
3 | throw new Error('Error on script1');
--------------------------------------------------------------------------------
/chapter2/literal.js:
--------------------------------------------------------------------------------
1 | let a = 2;//number literal
2 | a = "2"; //string literal
3 | a = '2';
4 | a = `2`;
5 | a = false; //boolean literal
--------------------------------------------------------------------------------
/frontend/src/components/context/ContextData.js:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 |
3 | export const ContextData = createContext(1);
--------------------------------------------------------------------------------
/backend/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 |
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/features/todo/Todo.css:
--------------------------------------------------------------------------------
1 | .todo-item
2 | {
3 |
4 | border-radius: 10px;
5 | margin-bottom: 10px;
6 |
7 | }
--------------------------------------------------------------------------------
/fp/zip.py:
--------------------------------------------------------------------------------
1 | a = [1,2,3]
2 | b = ["one","two"]
3 | result = zip(a,b)
4 | print("Result ",result)
5 | for item in result:
6 | print("Item ",item)
--------------------------------------------------------------------------------
/backend/config/Config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | config:{
3 | TOKEN_SECRET : "!^&!^#!722!@@(!" //should be store in env file,
4 | }
5 | }
--------------------------------------------------------------------------------
/frontend/src/components/class-component.css:
--------------------------------------------------------------------------------
1 | .class-component
2 | {
3 | background: gray;
4 | min-height: 100px;
5 | min-width: 100px;
6 | }
--------------------------------------------------------------------------------
/HelloWorld.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/chapter13/PromiseReadFile.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | fs.promises.readFile('hello.txt')
3 | .then(data=>console.log(data.toString().length));
--------------------------------------------------------------------------------
/frontend-redux-typescript/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/frontend-redux-typescript/public/favicon.ico
--------------------------------------------------------------------------------
/frontend-redux-typescript/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/frontend-redux-typescript/public/logo192.png
--------------------------------------------------------------------------------
/frontend-redux-typescript/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrthetkhine/TuringReact5thBatch/HEAD/frontend-redux-typescript/public/logo512.png
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/page/HomePage.tsx:
--------------------------------------------------------------------------------
1 | export default function HomePage()
2 | {
3 | return (
4 | Home page
5 |
);
6 | }
--------------------------------------------------------------------------------
/frontend-redux-typescript/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 |
--------------------------------------------------------------------------------
/chapter3/StaticType.java:
--------------------------------------------------------------------------------
1 | class StaticType
2 | {
3 | public static void main(String[]args)
4 | {
5 | int a = 10;
6 | a = "Hello";
7 | }
8 | }
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/features/todo/todoAPI.ts:
--------------------------------------------------------------------------------
1 | export function apiLoadAllTodo()
2 | {
3 | return fetch('https://jsonplaceholder.typicode.com/todos');
4 | }
--------------------------------------------------------------------------------
/chapter2/type.js:
--------------------------------------------------------------------------------
1 | let a = 2;
2 | let obj = {
3 | name : "TK",
4 | age : 38
5 | };
6 | console.log("Type of a ",typeof(a));
7 | console.log("Type of Obj ",typeof(obj));
--------------------------------------------------------------------------------
/typescript/OptionalInheritance.ts:
--------------------------------------------------------------------------------
1 | interface A {
2 | x: number;
3 | y?: number;
4 | }
5 | class C implements A {
6 | x = 0;
7 | }
8 | const c = new C();
9 | //c.y = 10;
--------------------------------------------------------------------------------
/backend/views/layout.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= title
5 | link(rel='stylesheet', href='/stylesheets/style.css')
6 | body
7 | block content
8 |
--------------------------------------------------------------------------------
/backend/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 50px;
3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4 | }
5 |
6 | a {
7 | color: #00B7FF;
8 | }
9 |
--------------------------------------------------------------------------------
/chapter8/FunctionCon.html:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/frontend/src/components/pattern/hoc/Border.js:
--------------------------------------------------------------------------------
1 | export default function Border({children})
2 | {
3 | return (
4 | {children}
5 |
);
6 | }
--------------------------------------------------------------------------------
/typescript/enum.ts:
--------------------------------------------------------------------------------
1 | enum Direction {
2 | Up = 1,
3 | Down,
4 | Left,
5 | Right,
6 | }
7 | let dir : Direction = Direction.Right;
8 |
9 | console.log('Dir ',dir);
10 |
--------------------------------------------------------------------------------
/chapter3/ToNumber.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/frontend/src/components/JsxChildren.js:
--------------------------------------------------------------------------------
1 | export default function JsxChildren({children})
2 | {
3 | return (
4 | Jsx Children
5 | {children}
6 |
);
7 | }
--------------------------------------------------------------------------------
/typescript/optional_par.ts:
--------------------------------------------------------------------------------
1 | function process2(a:number=1000,b?:number)
2 | {
3 | console.log('A ',a, ' B ',b);
4 | return a;
5 | }
6 | process2(1,2);
7 | process2(100);
8 | process2();
--------------------------------------------------------------------------------
/chapter4/Comma.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/dynamic.js:
--------------------------------------------------------------------------------
1 | let a = 10;
2 |
3 | console.log("A ",a ,' Type ',typeof(a));
4 | a = "Hello";
5 | console.log("A ",a ,' Type ',typeof(a));
6 |
7 | a = 5/2;
8 | console.log("A ",a ,' Type ',typeof(a));
--------------------------------------------------------------------------------
/frontend/src/components/hook/fakeName.js:
--------------------------------------------------------------------------------
1 | import { faker } from '@faker-js/faker';
2 |
3 | export const fakeNames = Array.from(Array(30), () => {
4 | return faker.name.findName();
5 | });
6 |
--------------------------------------------------------------------------------
/typescript/PrivateField.ts:
--------------------------------------------------------------------------------
1 | class Dog {
2 | #barkAmount = 0;
3 | personality = "happy";
4 |
5 | constructor() {}
6 | }
7 | let d = new Dog();
8 | //console.log('Truly private ',d.barkAmount);
--------------------------------------------------------------------------------
/typescript/tuple.js:
--------------------------------------------------------------------------------
1 | var tuple = ["Hello", 13];
2 | console.log('Tuple ', tuple[0], ' element 1 ', tuple[1]);
3 | tuple[0] = "Something";
4 | //tuple[1] = "No";
5 | console.log('Tuple ', tuple);
6 |
--------------------------------------------------------------------------------
/chapter3/DateTime.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/typescript/intersection.ts:
--------------------------------------------------------------------------------
1 | type P = {
2 | x : number,
3 | y : number
4 | };
5 | type P3D = P & { z : number};
6 | let k: P3D = {
7 | x : 10,
8 | y : 200,
9 | z : 300
10 | }
--------------------------------------------------------------------------------
/chapter2/identifier.js:
--------------------------------------------------------------------------------
1 | let _$a = 1;
2 | let a2 = 2;
3 | //let a^2 = 2;
4 | //let let;
5 | let ကားခ = 10;
6 | console.log('ကားခ ',ကားခ);
7 | console.log("\u{1F600}")
8 | console.log('\u006a\u006e\u0064\u0069')
--------------------------------------------------------------------------------
/HelloWorld.java:
--------------------------------------------------------------------------------
1 | public class HelloWorld
2 | {
3 | public static void main(String[]args)
4 | {
5 | int a = 10;
6 | a = 5/2;
7 |
8 | System.out.println(a);
9 | }
10 | }
--------------------------------------------------------------------------------
/dyanmic.html:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/page/ToDoPage.tsx:
--------------------------------------------------------------------------------
1 | import TodoUi from "../features/todo/TodoUi";
2 |
3 | export default function ToDoPage()
4 | {
5 | return (
6 |
7 |
);
8 | }
--------------------------------------------------------------------------------
/chapter11/URL.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
--------------------------------------------------------------------------------
/chapter2/case_sen.js:
--------------------------------------------------------------------------------
1 | let a=10;
2 |
3 | //below line declare a variable
4 | let A = "Helo";
5 |
6 | /*
7 | This is line 1
8 | another line
9 |
10 | */
11 | console.log("A ",A);
12 | console.log("a ",a);
--------------------------------------------------------------------------------
/chapter3/Gloabal.html:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/frontend-redux-typescript/src/components/HelloWorld.tsx:
--------------------------------------------------------------------------------
1 | export default function HelloWorld()
2 | {
3 | let num = 2;
4 | //num = "Hello";
5 | return (
6 | Hello World {num}
7 |
);
8 | }
--------------------------------------------------------------------------------
/chapter15/worker.js:
--------------------------------------------------------------------------------
1 |
2 | onmessage = (event)=>{
3 | console.log('Event in worker ',event.data);
4 | postMessage("Send back to server "+ (event.data+"").toUpperCase());
5 | };
6 | console.log('Worker.js loaded...');
--------------------------------------------------------------------------------
/chapter5/UseStrict.html:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |