Author: admin
Angular Speech to Text
How to run linux commands on windows
-
- Cygwin is a Unix-like environment and command-line interface for Microsoft Windows.
Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment.
Thus it is possible to launch Windows applications from the Cygwin environment, as well as to use Cygwin tools and applications within the Windows operating context.Official Site: https://www.cygwin.com/
- git bash is a shell where: the running process is sh.exe (packaged with msysgit, as share/WinGit/Git Bash.vbs)
git is a known command$HOME is definedOfficial Site: https://git-scm.com/
- Cygwin is a Unix-like environment and command-line interface for Microsoft Windows.
- How to install cygwin on Windows
How to enable ssh login to windows using cygwin
rsync on windows os
rsync: Failed to exec ssh: No such file or directory(2) on windows
nstalling cwrsync, you are likely to get this error when you try to run this sample command from the command line.
rsync -avz -e ssh ycsoftware@google.com:/home/ycsoftware /cygdrive/z/ycsoftware/
“rsync: Failed to exec ssh: No such file or directory(2)” cwrsync
The reason you are getting this is because for some reason rsync is not able to find the path to the ssh.exe file. You should change it to something like this:
C:/cygwin64/bin/rsync.exe -ar . /cygdrive/c/xampp/htdocs/test2/ Ref: http://ycsoftware.net/rsync-failed-to-exec-ssh-no-such-file-or-directory2-on-windows/
Big Data Tools
- Tableau
- http://archive.ics.uci.edu/ml/index.php
Angular 4 http post with php
Component or Service:
let data = {'title': 'foo', 'body': 'bar', 'userId': 1}; this.http.post('http://localhost/angular4/angcrud/add_student_action.php', data) .subscribe( (res:Response) => { console.log(res.json()); }, err => { console.log("Error occured"); } );
Php Script:
<?php $postdata = file_get_contents("php://input"); $request = json_decode($postdata); header('Content-type: application/json'); header("Access-Control-Allow-Origin: *"); header('Access-Control-Allow-Headers: X-Requested-With, content-type, access-control-allow-origin, access-control-allow-methods, access-control-allow-headers'); //$res_ar = array("foo"=> $_REQUEST['body']); echo json_encode($request); ?>
<form #studentForm = "ngForm" (ngSubmit)="addStudentRecord(studentForm.value)"> First name:<br> <input type="text" name="firstname" value="Mickey" ngModel> <br> Last name:<br> <input type="text" name="lastname" value="Mouse" ngModel> <br><br> <input type="submit" value="Submit"> </form>
Angular 4 JSON CRUD
- install json server on windows
npm install -g json-server - run json server
json-server -p 5555 products.json - https://www.youtube.com/watch?v=HCHvrbAd1QA
- https://www.youtube.com/watch?v=WVlNj_6_-uA
- https://www.youtube.com/watch?v=6T1TF7lgVSA
- Angular 4 POST
- Angular 4 Receive data in Php
Angular 4 Deployment
Use any of the commands:
- ng build
- ng build –prod
- ng build –prod –base-href /directory-name/sub-directory-name/
Create testing branch on github
- add normal git repository
- git branch gh-pages
- git push -u origin gh-pages
To push on the git repository
- git init
- git add origin
- git add .
- git commit -m “Initial Commit”
- git push -u origin master
- ng build –prod –base-href https://whateveruser.github.io/whateverprojectrepo/
- ngh
ng build –prod –base-href https://github.com/whateveruser/whateverprojectrepo/
Ref:
- https://www.youtube.com/watch?v=nxV3weqMzYo
.htaccess for production site
RewriteEngine on # Don't rewrite files or directories RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Rewrite everything else to index.html to allow html5 state links RewriteRule ^ index.html [L]
OOPS
- Design a class Rectangle
data members[box title=”” bg_color=”#dbdbdb” align=”left”]length
breadth[/box]member functions/methods[box title=”” bg_color=”#dbdbdb” align=”left”]setDimension()
area()
perimeter()[/box] - Design a class Worker
data members[box title=”” bg_color=”#dbdbdb” align=”left”]wages
wdays[/box]member function / method[box title=”” bg_color=”#dbdbdb” align=”left”]setData()
payment()[/box] - Design a class Box
data members[box title=”” bg_color=”#dbdbdb” align=”left”]length
breadth
height[/box]member functions / methods[box title=”” bg_color=”#dbdbdb” align=”left”]setDimension()
volume()[/box] - Design a class Rectangle (only for Java / C++)
data members[box title=”” bg_color=”#dbdbdb” align=”left”]length
breadth[/box] member functions / methods[box title=”” bg_color=”#dbdbdb” align=”left”]setDimension()
area()
perimeter()[/box]It must overload setDimension() method twice:- by passing 1 argument
- by passing 2 arguments
- Design a class Box (only for Java / C++)
data members[box title=”” bg_color=”#dbdbdb” align=”left”]length
breadth
height[/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”]volume()[/box] It must contain 3 constructors- 1 parameter
- 2 parameter
- 3 paramter
- Design a class Account
data members [box title=”” bg_color=”#dbdbdb” align=”left”]balance[/box]member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] deposit(amt)
withdraw(amt)
showBalance()[/box] - Design a class Set
data members [box title=”” bg_color=”#dbdbdb” align=”left”]3 numbers[/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] SUM()
MEAN()
MAX()
MIN() [/box] - Design a class Student
data members [box title=”” bg_color=”#dbdbdb” align=”left”]roll_number
name [/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] setData()
getData() [/box] - Design a class Account
data members [box title=”” bg_color=”#dbdbdb” align=”left”] balance
interest_rate [/box] interest_rate must be shared by all objects (static modifier) and its default value 10.25 [box title=”” bg_color=”#dbdbdb” align=”left”] interest(no_of_years) [/box] - Design a class Student
data members [box title=”” bg_color=”#dbdbdb” align=”left”] roll_number
name [/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] setData()
getData() [/box] - Design a class Account
[box title=”” bg_color=”#dbdbdb” align=”left”] account_number
balance
interest_rate [/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] interest(no_of_years) [/box] - Design a class Student
data members [box title=”” bg_color=”#dbdbdb” align=”left”] roll_number
name [/box] member function / methods [box title=”” bg_color=”#dbdbdb” align=”left”] getData() [/box] roll_number must be automatically generated.It also keep track of total number of Students. - Design a package MyCircle and MyRectangle (Only for Java)
[box title=”” bg_color=”#dbdbdb” align=”left”] radius
length
breadth [/box] member functions / methods: [box title=”” bg_color=”#dbdbdb” align=”left”] area()
circumference()
perimeter() [/box] - Design a class Student
data members [box title=”” bg_color=”#dbdbdb” align=”left”] roll_number
name [/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] getData()
showData() [/box] Create 5 objects of Student using Array - Design a class Student and List ClassRoom
add list of Students in ClassRoom
display List - Design a class Account and List Bank
add list of Account in Bank
display List - Create array of Student Objects
data members [box title=”” bg_color=”#dbdbdb” align=”left”] roll_no
name
college [/box] member functions / methods [box title=”” bg_color=”#dbdbdb” align=”left”] readData()
showData() [/box] - Create a class RBI (Only for Java)
data members [box title=”” bg_color=”#dbdbdb” align=”left”] balance [/box] member functions [box title=”” bg_color=”#dbdbdb” align=”left”] RBI()
deposit(int amt)
withdraw(int amt)
showBalance() [/box]