How to prevent opening url ending with / using htaccess

Right below the RewriteEngine On line, add:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R] # <- for test, for prod use [L,R=301]

to enforce a no-trailing-slash policy.

To enforce a trailing-slash policy:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R] # <- for test, for prod use [L,R=301]

EDIT: commented the R=301 parts because, as explained in a comment:

Be careful with that R=301! Having it there makes many browsers cache the .htaccess-file indefinitely: It somehow becomes irreversible if you can’t clear the browser-cache on all machines that opened it. When testing, better go with simple R or R=302

ITR form and Description

ITR 1
For Individuals being a Resident (other than Not Ordinarily Resident) having Total Income upto Rs.50 lakhs, having Income from Salaries, One House Property, Other Sources (Interest etc.), and Agricultural Income upto Rs.5 thousand(Not for an Individual who is either Director in a company or has invested in Unlisted Equity Shares)
ITR 2
For Individuals and HUFs not having income from profits and gains of business or profession
ITR 3
For individuals and HUFs having income from profits and gains of business or profession
ITR 4
For Individuals, HUFs and Firms (other than LLP) being a Resident having Total Income upto Rs.50 lakhs and having income from Business and Profession which is computed under sections 44AD, 44ADA or 44AE
(Not for an Individual who is either Director in a company or has invested in Unlisted Equity Shares)
ITR 5
For persons other than:-
(i) Individual,
(ii) HUF,
(iii) Company and
(iv) Person filing Form ITR-7
ITR 6
For Companies other than companies claiming exemption under section 11
ITR 7
For persons including companies required to furnish return under sections 139(4A) or 139(4B) or 139(4C) or 139(4D)

Soa Technology

AAROGYA SETU IS NOW OPEN-SOURCE FOR DEVELOPERS

Aarogya Setu app has finally become open source for developers as the government looks to quell the privacy and surveillance concerns. The Ministry of Electronics and Information Technology on Monday issued a notice, stating the code for the Arogya Setu Android app has been uploaded on GitHub and will be available for tinkering by developers starting Tuesday, May 26. Meanwhile, the iOS counterpart of the government’s covid-19 tracking app will be open-sourced within two weeks. The National Informatics Centre (a part of MeitY) has also announced the bug bounty programme for developers who can find vulnerabilities in the app.

The open-source code of the Aarogya Setu app comes after nearly two months since the release of the app, during which over 114 million users have registered themselves for the government’s programme. Although the app has been deemed resourceful by its users, privacy advocates have so far decried the lack of transparency in the app’s code, especially after the French hacker discovered one too many security loopholes in the app. The government then responded to the hacker’s concerns but the apprehension on using Aarogya Setu app among the users grew by the day, forcing the government to come forward and release the code-set of the app on GitHub.

Post the announcement, French security researcher who goes by Elliot Alderson alias on Twitter said, “This is a very positive news and I’m very happy that the Indian government took this direction. Now, we would like to see what is happening on the server side.”

Source

how to check dns settings for domain

DNS Lookup

DNS Lookup tool finds all DNS records of a given domain name. The records include but not limited to A, AAAA, CNAME, MX, NS, PTR, SRV, SOA, TXT, CAA.

https://dnschecker.org/all-dns-records-of-domain.php

A
TypeDomain NameAddressTTL
Asoatechnology.net35.173.197.10910799
AAAA
Sorry no record found!
CNAME
Sorry no record found!
MX
TypePrefDomain NameHostnameTTL
MX10soatechnology.netaspmx.l.google.com299
MX50soatechnology.netaspmx3.googlemail.com299
MX40soatechnology.netaspmx2.googlemail.com299
MX30soatechnology.netalt2.aspmx.l.google.com299
MX20soatechnology.netalt1.aspmx.l.google.com299
NS
TypeDomain NameNSTTL
NSsoatechnology.netns57.domaincontrol.com3599
NSsoatechnology.netns58.domaincontrol.com3599
PTR
Sorry no record found!
SRV
Sorry no record found!
SOA
TypeDomain NamePrimary NSResponsible EmailTTL
SOAsoatechnology.netns57.domaincontrol.comdns.jomax.net599
TXT
TypeDomain NameRecordTTL
TXTmissindia-world.comv=spf1 +a +mx +ip4:67.227.252.228 ~all299
CAA
Sorry no record found!

how to create react native app in windows

set up your development environment on Windows using React Native framework and Android Studio to build Android Apps

the following tools to set up my development environment:

  • Windows
  • Visual Studio Code
  • Android Studio
  • Built-in emulator in Android Studio
  • Node Package Manager (NPM)
  • Node.js (Version 8 or newer)
  • React Native command line interface (React Native CLI)
  • Java Development Kit (JDK 8 or newer)

Step 1: Install Visual Studio Code

Download and install the latest version of Visual Studio Code for Windows from https://code.visualstudio.com/

Step 2: Install Android Studio

  • Download and install the latest version of Android Studio for Windows from https://developer.android.com/studio/
  • Android Studio installs the latest Android SDK by default. React Native requires Android 6.0 (Marshmallow) SDK or higher. I decided to use Android 7.1.1 (Nougat). Feel free to use the latest SDK.
  • Make sure you have the following SDK tools installed:
Soa Technology

Important: You will need the Intel x86 Emulator Accelerator (HAXM installer) to run the emulator on Windows. For more information, please refer to the following link: https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows

Note: You need to enable Intel Virtualization Technology by changing a BIOS setting. Please look at the following link to see how that is done:

  • Configure the ANDROID_HOME environment variable. Open the System pane under System and Security in the Windows Control Panel, then click on Change settings. Open the Advanced tab and click on Environment Variables. Click on New to create a new ANDROID_HOME user variable that points to the path to your Android SDK:
Figure 3: PATH variable for Android
  • Finally, add Android Debug Bridge (ADB) to the PATH environment variable. This will help you know which devices are connected or which emulators are currently running. Install location of ADB: C:\Users\apatil\AppData\Local\Android\Sdk\platform-tools\adb.exe

Step 3: Install Node

  • Download and install the latest version of Node.js from https://nodejs.org/en/Note: Npm is installed with Node.js.

Note: Make sure you add NPM to the PATH environment variable.

  • Once npm is installed, install React Native CLI by running the following command from the Windows prompt command line or Integrated Terminal in Visual Studio Code. Note: Integrated Terminal can be found under View →Integrated Terminal
npm install -g react-native-cli

Step 4: Using embedded JDK

Android Studio comes with an embedded JDK which is recommended. Make sure you check the following option under File → Other Settings → Default Project Structure in Android Studio:

Soa Technology

Step 5: Creating a new React Native application

Finally, lets create our first React Native application by running the following command in your workspace location

react-native init SampleReactNativeProject

This creates the following project directory structure when you open the project in Visual Studio Code.

Soa Technology

Step 6: Building for Android

  • Before we go ahead and run the app, open up the “android” directory in our project in Android Studio and create an “assets” directory under app/src/main.
Soa Technology

To simplify the build and install process, in package.json, add the following script under “scripts”:

"android-windows": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android"

Now run the following command to install the app and see it running on the emulator. This runs the script above which we set up in package.json.

npm run android-windows

This starts up a Metro Bundler instance in a new command prompt instance and installs the app on the emulator as shown below:

Storing and displaying unicode string (हिन्दी) using PHP and MySQL

Sample Script

<html>
  <head>
    <title>Hindi</title></head>
  <body>
    <?php
      include("connection.php"); //simple connection setting
      $result = mysql_query("SET NAMES utf8"); //the main trick
      $cmd = "select * from hindi";
      $result = mysql_query($cmd);
      while ($myrow = mysql_fetch_row($result))
      {
          echo ($myrow[0]);
      }
    ?>
  </body>
</html>

The dump for my database storing hindi utf strings is

CREATE TABLE `hindi` (
  `data` varchar(1000) character set utf8 collate utf8_bin default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `hindi` VALUES ('सूर्योदय');

charset in the HTML Head section

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

set content type in your php script using 

   header( 'Content-Type: text/html; charset=utf-8' ); 

Mysql Example

CREATE DATABASE hindi_test
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
USE hindi_test;
CREATE TABLE `hindi` (`data` varchar(200) COLLATE utf8_unicode_ci NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `hindi` (`data`) VALUES('कंप्यूटर');

Insert data into mysql table in php using mysqli method

Create File first.php using form

<style>
    input{
        display: block;
    }
    </style>
    <form method="post" action="second.php" enctype="multipart/form-data">
<input type="text" name="user_name">
<input type="password" name="user_password">

Male <input type="radio" name="gender" value="male" checked>
Female <input type="radio" name="gender" value="female">

<input type="checkbox" name="car" value="Maruti"> Car 
<input type="checkbox" name="house" value="Narela"> House 
<input type="checkbox" name="bike" value="Bajaj"> Bike 

<input type="file" name="image[]" multiple>

<input type="submit" value="Click" name="click">
</form>

Create file second.php to insert data into table

this example show only two fields, you can add more field in php code to insert.

<?php
$host="localhost";
$user="root";
$password="";
$database="pankaj";


$link= mysqli_connect($host, $user, $password, $database);
if(!$link)
{
    echo "Not Connected".mysqli_error($link);
    die();
}

$user_name=$_POST['user_name'];
$user_Password=$_POST['user_password'];

$cmd="insert into user  set user_name='$user_name', user_password='$user_Password'";
if(mysqli_query($link, $cmd))
{
 echo "Success";   
}
else
{
    echo "User Already Exists";//mysqli_error($link);
}




?>


Multiple File Upload Example In PHP

1. Create file first.php

<style>
    input{
        display: block;
    }
    </style>
    <form method="post" action="second.php" enctype="multipart/form-data">
<input type="text" name="user_name">
<input type="password" name="user_password">

Male <input type="radio" name="gender" value="male" checked>
Female <input type="radio" name="gender" value="female">

<input type="checkbox" name="car" value="Maruti"> Car 
<input type="checkbox" name="house" value="Narela"> House 
<input type="checkbox" name="bike" value="Bajaj"> Bike 

<input type="file" name="image[]" multiple>

<input type="submit" value="Click" name="click">
</form>

2. Create file second.php

<?php

$i=0;
foreach($_FILES['image']['name'] as $file => $name)
{
  echo $_FILES['image']["tmp_name"][$file]."<br>";
  echo $_FILES['image']["name"][$file]."<br>";
  echo $_FILES['image']["type"][$file]."<br>";
  echo $_FILES['image']["size"][$file]."<br>";
   
   $ext=pathinfo(basename($_FILES["image"]["name"][$file]), PATHINFO_EXTENSION);

$target_file="./profile".$i.".".$ext;
$i++;
   
   move_uploaded_file($_FILES["image"]["tmp_name"][$file], $target_file);
}

echo "total file ".count($_FILES['image']['name']);
?>

Below code show example for check file size, file extension, file type for uploading valid file

<?php
print_r($_POST);
echo "<br>";
print_r($_FILES);

echo "<br>File Name : ".$_FILES['image']['name']."<br>";
echo "File Type : ".$_FILES['image']['type']."<br>";
echo "File Temp Name  : ".$_FILES['image']['tmp_name']."<br>";
echo "File Size : in bytes ".$_FILES['image']['size']."<br>";
$file=$_FILES['image']['size'] / 1024;
echo "File Size : in KB ".number_format($file, 2)."<br>";
$file=$file / 1024;

echo "File Size : in MB ".number_format($file, 2)."<br>";
echo "File Error : ".$_FILES['image']['error']."<br>";


$ext=pathinfo(basename($_FILES["image"]["name"]), PATHINFO_EXTENSION);
$filename=time();
$target_file="./".$filename.".".$ext;

move_uploaded_file($_FILES["image"]["tmp_name"], $target_file);

?>

Numbers of Zeros in a Million, Billion, Trillion

Numbers Bigger Than a Trillion

The digit zero plays an important role as you count very large numbers. It helps track these multiples of 10 because the larger the number is, the more zeroes are needed. In the table below, the first column lists the name of the number, the second provides the number of zeros that follow the initial digit, and the third tells you how many groups of three zeros you would need to write out each number.

NameNumber of ZerosGroups of (3) Zeros
Ten1(10)
Hundred2(100)
Thousand31 (1,000)
Ten thousand4(10,000)
Hundred thousand5(100,000)
Million62 (1,000,000)
Billion93 (1,000,000,000)
Trillion124 (1,000,000,000,000)
Quadrillion155
Quintillion186
Sextillion217
Septillion248
Octillion279
Nonillion3010
Decillion3311
Undecillion3612
Duodecillion3913
Tredecillion4214
Quatttuor-decillion4515
Quindecillion4816
Sexdecillion5117
Septen-decillion5418
Octodecillion5719
Novemdecillion6020
Vigintillion6321
Centillion303101

All of Those Zeroes

A table like the one above can certainly be helpful in listing the names of all of the numbers depending on how many zeros they have. But it can be really mind-boggling to see just what some of those numbers look like. Below is a listing—including all the zeros—for the numbers up to decillion—a little more than just half the numbers listed in the above table.

Ten: 10 (1 zero)
Hundred: 100 (2 zeros)
Thousand: 1000 (3 zeros)
Ten thousand 10,000 (4 zeros)
Hundred thousand 100,000 (5 zeros)
Million 1,000,000 (6 zeros)
Billion 1,000,000,000 (9 zeros)
Trillion 1,000,000,000,000 (12 zeros)
Quadrillion 1,000,000,000,000,000 (15 zeros)
Quintillion 1,000,000,000,000,000,000 (18 zeros)
Sextillion 1,000,000,000,000,000,000,000 (21 zeros)
Septillion 1,000,000,000,000,000,000,000,000 (24 zeros)
Octillion 1,000,000,000,000,000,000,000,000,000 (27 zeros)
Nonillion 1,000,000,000,000,000,000,000,000,000,000 (30 zeros)
Decillion 1,000,000,000,000,000,000,000,000,000,000,000 (33 zeros)

Zeros Grouped in Sets of 3

Reference to sets of zeros is reserved for groupings of three zeros, meaning they are not relevant for smaller numbers. We write numbers with commas separating sets of three zeros so that it’s easier to read and understand the value. For example, you write one million as 1,000,000 rather than 1000000.

As another example, it’s much easier to remember that a trillion is written with four sets of three zeros than it is to count out 12 separate zeroes. While you might think that that one is pretty simple, just wait until you have to count 27 zeros for an octillion or 303 zeros for a centillion.

It is then that you will be thankful that you only have to remember nine and 101 sets of zeros, respectively.

Numbers With Very Large Numbers of Zeros

The number googol (termed by Milton Sirotta) has 100 zeros after it. Here’s what a googol looks like, including all of its required zeros:

10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Do you think that number is big? How about the googolplex, which is a one followed by a googol of zeros. The googolplex is so large it doesn’t have any meaningful use yet—it is larger than the number of atoms in the universe.

Million and Billion: Some Differences

In the United States—as well as around the world in science and finance—a billion is 1,000 million, which is written as a one followed by nine zeros. This is also called the “short scale.”

There is also a “long scale,” which is used in France and was previously used in the United Kingdom, in which a billion means one million million. According to this definition of a billion, the number is written with a one followed by 12 zeros. The short scale and long scale were described by French mathematician Genevieve Guitel in 1975.

How create playlist in YouTube applications

You can either start a playlist with a video, or from the Library tab  .

With a video:

  1. Find a video you want in your playlist.
  2. Tap Save  below the video to automatically save it to the last playlist you’ve saved to, or to your Watch Later playlist. A message will pop up at the bottom of your screen confirming which playlist the video was added to.
  3. To change where your video is saved, tap Change on the pop up. Select from the list of your playlists where your video should be saved. 

From the Library tab:

  1. Go to the Library tab  .
  2. Tap NEW PLAYLIST in the “Playlists” section.
  3. Select one or more videos from your recent watch history to add to the playlist.
  4. Tap NEXT.
  5. Give your playlist a title and set its privacy.
  6. Tap CREATE.