From fc6fc4120da70c59a81fe52b408d84d667de6c1f Mon Sep 17 00:00:00 2001 From: Siddhu Date: Mon, 21 Mar 2022 17:05:30 +0530 Subject: [PATCH] new files added --- .../check_work_day_type.php | 58 +++ .../codesponsors_snippets/fetch_api.html | 99 ++++++ .../file_upload_imgur.php | 40 +++ .../codesponsors_snippets/google_map.php | 169 +++++++++ .../codesponsors_snippets/hours_to_cost.php | 17 + php_scripts/codesponsors_snippets/map.html | 174 +++++++++ php_scripts/codesponsors_snippets/map2.html | 330 ++++++++++++++++++ .../codesponsors_snippets/map_darggble.htm | 70 ++++ .../practice_make_men_perfect.html | 173 +++++++++ php_scripts/prism_automate/index.php | 234 +++++++------ siddhu_notes/Visual_shortcuts.txt | 1 + siddhu_notes/command_line.txt | 23 +- siddhu_notes/php ini.txt | 7 + .../stripe2/create-checkout-session.php | 1 + 14 files changed, 1283 insertions(+), 113 deletions(-) create mode 100644 php_scripts/codesponsors_snippets/check_work_day_type.php create mode 100644 php_scripts/codesponsors_snippets/fetch_api.html create mode 100644 php_scripts/codesponsors_snippets/file_upload_imgur.php create mode 100644 php_scripts/codesponsors_snippets/google_map.php create mode 100644 php_scripts/codesponsors_snippets/hours_to_cost.php create mode 100644 php_scripts/codesponsors_snippets/map.html create mode 100644 php_scripts/codesponsors_snippets/map2.html create mode 100644 php_scripts/codesponsors_snippets/map_darggble.htm create mode 100644 php_scripts/codesponsors_snippets/practice_make_men_perfect.html create mode 100644 siddhu_notes/php ini.txt diff --git a/php_scripts/codesponsors_snippets/check_work_day_type.php b/php_scripts/codesponsors_snippets/check_work_day_type.php new file mode 100644 index 0000000..75b1b4c --- /dev/null +++ b/php_scripts/codesponsors_snippets/check_work_day_type.php @@ -0,0 +1,58 @@ +format('d-m-Y'); +if(in_array($date,$holidays)) +{ + $type = "Holiday"; +} + + +#2nd Check week end or not +$wk_no = date("w", strtotime($input_date)); //["0"=>"sun","1"=>"mon"....."6"=>"sat"] +if(($wk_no == 0 || $wk_no == 6) && $type != "Holiday" && !in_array($wk_no,$weekdays)) +{ + $type = "Weekend"; +} + +#3rd Check work day even weekend also working day or not +if(in_array($wk_no,$weekdays) && $type != "Weekend" && $type != "Holiday") +{ + $type = "Working day"; +} + +#4th Condition check Business hour or non-business hour +$begin = date("H:i", strtotime($business_start_time)); // gives 24 format +$end = date("H:i", strtotime($business_end_time)); +$now = date("H:i", strtotime($input_date)); +if (($now >= $begin && $now <= $end) && $type == "Working day") +{ + $type = "business hour"; +} +else if($type == "Weekend") +{ + $type = "Weekend"; +} +else if($type == "Holiday") +{ + $type = "Holiday"; +} +else +{ + $type = "Non-business hour"; +} + +echo $type."
"; \ No newline at end of file diff --git a/php_scripts/codesponsors_snippets/fetch_api.html b/php_scripts/codesponsors_snippets/fetch_api.html new file mode 100644 index 0000000..d96f598 --- /dev/null +++ b/php_scripts/codesponsors_snippets/fetch_api.html @@ -0,0 +1,99 @@ + + + + + + + + + \ No newline at end of file diff --git a/php_scripts/codesponsors_snippets/file_upload_imgur.php b/php_scripts/codesponsors_snippets/file_upload_imgur.php new file mode 100644 index 0000000..8857d1e --- /dev/null +++ b/php_scripts/codesponsors_snippets/file_upload_imgur.php @@ -0,0 +1,40 @@ + + + + +
+ + +
+

+  
+  
+
+
+
\ No newline at end of file
diff --git a/php_scripts/codesponsors_snippets/google_map.php b/php_scripts/codesponsors_snippets/google_map.php
new file mode 100644
index 0000000..ae668bf
--- /dev/null
+++ b/php_scripts/codesponsors_snippets/google_map.php
@@ -0,0 +1,169 @@
+
+
+
+    
+    
+	  
+  
+  
+
+
+
+
+    
+	   
+	
+
+    
+	
+   
+
+
+
+

Google Location autocomplete made by Siddhu

+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
+ + + \ No newline at end of file diff --git a/php_scripts/codesponsors_snippets/hours_to_cost.php b/php_scripts/codesponsors_snippets/hours_to_cost.php new file mode 100644 index 0000000..5d3a27a --- /dev/null +++ b/php_scripts/codesponsors_snippets/hours_to_cost.php @@ -0,0 +1,17 @@ + + + + + + Places Searchbox + + + + +
+ + + + \ No newline at end of file diff --git a/php_scripts/codesponsors_snippets/map2.html b/php_scripts/codesponsors_snippets/map2.html new file mode 100644 index 0000000..cc1d92e --- /dev/null +++ b/php_scripts/codesponsors_snippets/map2.html @@ -0,0 +1,330 @@ + + + + Place Autocomplete + + + + + + + + + + +
+
+ +
+ +
+ + + + + +
+

Google Location autocomplete made by Siddhu

+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
+ + \ No newline at end of file diff --git a/php_scripts/codesponsors_snippets/map_darggble.htm b/php_scripts/codesponsors_snippets/map_darggble.htm new file mode 100644 index 0000000..0d74bb1 --- /dev/null +++ b/php_scripts/codesponsors_snippets/map_darggble.htm @@ -0,0 +1,70 @@ + + + + Siidhu + + + + + +
+
+Latitude:
+Longitude:
+
+ + diff --git a/php_scripts/codesponsors_snippets/practice_make_men_perfect.html b/php_scripts/codesponsors_snippets/practice_make_men_perfect.html new file mode 100644 index 0000000..1777b52 --- /dev/null +++ b/php_scripts/codesponsors_snippets/practice_make_men_perfect.html @@ -0,0 +1,173 @@ + + + + Bootstrap Example + + + + + + + +
+
+
+

Git Commands

+ +
+

Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people

+ +

The Command Line

+

+There are a lot of different ways to use Git. There are the original command-line tools, and there are many graphical user interfaces of varying capabilities. For this book, we will be using Git on the command line. For one, the command line is the only place you can run all Git commands – most of the GUIs implement only a partial subset of Git functionality for simplicity. If you know how to run the command-line version, you can probably also figure out how to run the GUI version, while the opposite is not necessarily true. Also, while your choice of graphical client is a matter of personal taste, all users will have the command-line tools installed and available.

+ +

Coming to action

+

After installing git in your PC. +The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating: +

+ $ git config --global user.name "John Doe"
+$ git config --global user.email johndoe@example.com + +

Again, you need to do this only once if you pass the --global option, because then Git will always use that information for anything you do on that system. If you want to override this with a different name or email address for specific projects, you can run the command without the --global option when you’re in that project. + +Many of the GUI tools will help you do this when you first run them.

+ +

Checking Your Settings

+

If you want to check your configuration settings, you can use the git config --list command to list all the settings Git can find at that point

+ $ git config --list
+ +

Getting Help

+

If you ever need help while using Git, there are two equivalent ways to get the comprehensive manual page (manpage) help for any of the Git commands:

+ $ git help
+ +

Getting a Git Repository

+

You typically obtain a Git repository in one of two ways:

+ +

1) You can take a local directory that is currently not under version control, and turn it into a Git repository, or

+ +

2) You can clone an existing Git repository from elsewhere.

+ + + git init
+ git config --global user.name "Siddhu"
+ git config --global user.email "siddhartha.e@inspiredge.in"
+ git config --list (to check configuration)
+ git add --all
+ git status (to check status)
+ git remote add origin YOUR_LINK_TO_REPO
+ git commit -m "my first commit"
+ git push -u origin master
+ + git push -f origin master (force fully push. it will replaced existed files)
+ + +

For clone the project to our local server

+ git clone YOUR_LINK_TO_CLONE
+ +or +

If you want to clone a branch

+ git clone -b YOUR_LINK_TO_CLONE + +

Before starting the work, we need to pull the data for latest changes for all developers

+ git pull origin master
+ +If we modified any files on the local server, we need to update those changes into the repo. so that after modifying local server files, check the command git status. it will return you, modified files in red font, then you move to those files to staging area using git add -A (which tell move all changes into stage). The staging area is a communicator and holds changes from the local server. until we push the files into the repo.

+ +: git status (to check the files that modified)
+

Add files into staging area

+ +: git add -A
+ +

now check again: git status (now it shows green font that it is modified). In order to commit this changes into the repo.

+ + : git commit -m "this is change for ur message"
+ +

now check again git status and(it says working directory is clean) if want to check last modified

+ +: git log
+ +

Before pushing the files into the repo. run the command "git pull origin master". +it will bring the all latest modified code to your local server from all developers. Push the code to the repo.

+ +: git push origin master
+

if there is a branch then the command is:

+ git push origin + + +

if you want to remove files from the staging area + git reset
+

and check the status git status

+ +

if you want the changes you made before "git add -A" check the command "git diff"

+ +

if you are sure only don't need call pull before the push. Then use this command

+ git push -f origin master
+ + +

Deleted a folder in git local repo, How to delete in repo +Suppose I deleted in modules one module folder called "Events" +for this use git rm

+ +

if it is folder then the command is:

+ git rm -r
+ +

if it is file then the command is:

+ git rm
+ +

How to stop few files for doesn't require to change or ignore in git? +To ignore the files just create a file called .gitignore in the root directory. Before creating once check the file exist or not. It should be a hidden file.

+ +

Open the .gitignore file and type name of the file ex: +home.php

+ +

if you want to ignore a folder specify the folder path ex: +application/config/* +'*' as the global parameter. it ignores all files inside the config folder.

+ +

if you want to use one file inside the folder Ex:

+ !application/config/database.php
+ +

so here we can access the database.php file inside the folder

+ +

if you want to stop specfic extention(.img,.jpg and .zip) Ex:

+ *.zip
+ *.jpg
+ +

if you want to write a comment there Ex: +# this file is not should be modified.

+ +

To remove cashed in file Ex:

+ git rm --cached
+ +

To remove cashed in folder Ex:

+ git rm -r --cached
+ + +

To know the ignored files

+ $ git ls-files --others --ignored --exclude-standard
+ +

To check branch list

+ $ git branch
+ +

Here "*" tell us. currently we are working on this branch.

+ +

To change one branch to another branch

+$ git checkout -b + +

how can we save our git credentials?

+

Create a text file called _netrc in the home Directory

+

Example:

+

machine github.com

+

login myloginid

+

password mypassword

+ +
+ + + +
+
+
+ + + \ No newline at end of file diff --git a/php_scripts/prism_automate/index.php b/php_scripts/prism_automate/index.php index 0025370..9b1dbd5 100644 --- a/php_scripts/prism_automate/index.php +++ b/php_scripts/prism_automate/index.php @@ -1,146 +1,156 @@ + - Siddhu's Code - - - - - - - - - + Siddhu's Code + + + + + + + + + - + + -​ -
-

Prism Automated

-
-
-
-
-
- - -
-
- - -
- -
-
-
-
- -