Showing posts with label Web Development. Show all posts
Showing posts with label Web Development. Show all posts

Tuesday, January 18, 2022

Visualize Multiplication


Go to Index of Math Lessons
Or enter two numbers:

Browsers that do not support canvas show this message!

Browsers that do not support canvas show this message!
Tags: Technology,Mathematical Foundations for Data Science,JavaScript,Web Development,

Ex 1: Visualizing Permutation-Combination Problem Using JavaScript


1 - Permutation and Combination Go to Index of Math Lessons

Ques: Find the number of ways of distributing 8 identical balls in 3 distinct boxes so that none of the boxes is empty.

Ans: Let the number of balls in three boxes be X, Y and Z.

Browsers that do not support canvas show this message!

We see that X + Y + Z = 8 with X, Y, Z >= 1 and <=6 .

And from the above diagram, there are only 7C 2 ways of doing it, that is the number of ways you can put two sticks in any of the seven gaps between the eight balls.

Tags: Technology,Mathematical Foundations for Data Science,JavaScript,Web Development,

Saturday, January 15, 2022

Prime Factors of a Number (Test)

Following number has prime factors. Please list all of them.

Tags: Technology,Mathematical Foundations for Data Science,Web Development,JavaScript,

Add, Subtract, Multiply, Divide

  • Add
  • Subtract
  • Multiply
  • Divide

 

 

Tags: Technology,JavaScript,Web Development,Mathematical Foundations for Data Science,

Friday, August 27, 2021

English Questionnaire Application (Level Earth, Hour 4)



{{$index + 1}}) {{ x.questext }}

 A. {{x.optiontext_a}}
 B. {{x.optiontext_b}}
 C. {{x.optiontext_c}}
 D. {{x.optiontext_d}}
 
Tags: Technology,JavaScript,Web Development,Communication Skills,

Sunday, August 8, 2021

Censorship in India, Torrenting and Tribler (Aug 2021)



1: Censorship in India (Part 1)

Your requested URL has been blocked as per the directions received from Department of Telecommunications, Government of India. Please contact administrator for more information. Note: You can still open the link the Tor Browser.

2: Censorship in India (Part 2)

Censorship of trackers (discovered using qBit)

3: Now comes in the Tribler. What's that?

4: Getting the Magnet link for a Torrent download via qBitTorrent

5: Paste the Magnet link from qBit to Tribler

Then wait for Metadata to load.

6: Trackers information in Tribler

7: Peer info in Tribler

8: Caveat: Performance Issue in Tribler

Labels: Cyber Security, Indian Politics, Politics, Technology, Web Development, Web Scraping

Thursday, July 29, 2021

JavaScript Intro (Dev Console, Data Types and Operators)



Where to run the JavaScript code?

PRINTING SOMETHING

The Hello World Program: console.log("Hello World!");

Variable Declaration in JavaScript

Values can be assigned to variables with an = sign x = 0; // Now the variable x has the value 0 x // => 0: A variable evaluates to its value. JavaScript supports several types of values x = 1; // Numbers. x = 0.01; // Numbers can be integers or reals. x = "hello world"; // Strings of text in quotation marks. x = 'JavaScript'; // Single quote marks also delimit strings. x = true; // A Boolean value. x = false; // The other Boolean value. x = null; // Null is a special value that means "no value." x = undefined; // Undefined is another special value like null.

Object Declaration in JavaScript

JavaScript's most important datatype is the object. An object is a collection of name/value pairs, or a string to value map. let book = { // Objects are enclosed in curly braces. topic: "JavaScript", // The property "topic" has value "JavaScript." edition: 7 // The property "edition" has value 7 }; // The curly brace marks the end of the object. Access the properties of an object with . or []: book.topic // => "JavaScript" book["edition"] // => 7: another way to access property values. book.author = "Flanagan"; // Create new properties by assignment. {} is an empty object with no properties. book.contents = {}; Conditionally access properties with ?. (ES2020): book.contents?.ch01?.sect1 // => undefined: book.contents has no ch01 property.

Arrays in JavaScript (An Overview)

JavaScript also supports arrays (numerically indexed lists) of values: let primes = [2, 3, 5, 7]; // An array of 4 values, delimited with [ and ]. primes[0] // => 2: the first element (index 0) of the array. primes.length // => 4: how many elements in the array. primes[primes.length-1] // => 7: the last element of the array. primes[4] = 9; // Add a new element by assignment. primes[4] = 11; // Or alter an existing element by assignment. let empty = []; // [] is an empty array with no elements. empty.length // => 0 Arrays and objects can hold other arrays and objects: Following is an array with 2 elements: let points = [ {x: 0, y: 0}, // Each element is an object. {x: 1, y: 1} ]; An object with 2 properties: let data = { trial1: [[1,2], [3,4]], // The value of each property is an array. trial2: [[2,3], [4,5]] // The elements of the arrays are arrays. };

Operators

Operators act on values (the operands) to produce a new value. Arithmetic operators are some of the simplest: 3 + 2 // => 5: addition 3 - 2 // => 1: subtraction 3 * 2 // => 6: multiplication 3 / 2 // => 1.5: division points[1].x - points[0].x // => 1: more complicated operands also work + adds numbers, concatenates strings: "3" + "2" // => "32" JavaScript defines some shorthand arithmetic operators let count = 0; // Define a variable count++; // Increment the variable count--; // Decrement the variable count += 2; // Add 2: same as count = count + 2; count *= 3; // Multiply by 3: same as count = count * 3; count // => 6: variable names are expressions, too. Equality and relational operators test whether two values are equal, unequal, less than, greater than, and so on. They evaluate to true or false. let x = 2, y = 3; // These = signs are assignment, not equality tests x === y // => false: equality x !== y // => true: inequality x < y // => true: less-than x <= y // => true: less-than or equal x > y // => false: greater-than x >= y // => false: greater-than or equal "two" === "three" // => false: the two strings are different "two" > "three" // => true: "tw" is alphabetically greater than "th" false === (x > y) // => true: false is equal to false Logical operators combine or invert boolean values (x === 2) && (y === 3) // => true: both comparisons are true. && is AND (x > 3) || (y < 3) // => false: neither comparison is true. || is OR !(x === y) // => true: ! inverts a boolean value Labels: Technology,Web Development,

Saturday, July 3, 2021

Before you continue to YouTube, Google uses cookies and data to...



The above screeshot was taken from Tor Browser on 20210704. Before you continue to YouTube Google uses cookies and data to: 1. Deliver and maintain services, like tracking outages and protecting against spam, fraud, and abuse 2. Measure audience engagement and site statistics to understand how our services are used If you agree, we’ll also use cookies and data to: 1. Improve the quality of our services and develop new ones 2. Deliver and measure the effectiveness of ads 3. Show personalized content, depending on your settings 4. Show personalized or generic ads, depending on your settings, on Google and across the web For non-personalized content and ads, what you see may be influenced by things like the content you’re currently viewing and your location (ad serving is based on general location). Personalized content and ads can be based on those things and your activity like Google searches and videos you watch on YouTube. Personalized content and ads include things like more relevant results and recommendations, a customized YouTube homepage, and ads that are tailored to your interests. Click “Customize” to review options, including controls to reject the use of cookies for personalization and information about browser-level controls to reject some or all cookies for other uses. You can also visit g.co/privacytools anytime. Labels: Technology,Cyber Security,Web Development,Web Scraping,

Wednesday, June 23, 2021

Tor Browser, Anonymity and Your IP Address



1 - What is my IP Address When I Use Tor Browser
URL: WhatIsMyIPAddress.com
2 - GitHub Security Logs for IP Address on Tor Browser
3 - What is my IP address as reported by Google Search
4 - IP Address Lookup for 'whatIsMyIPAddress.com'
5 - IP Address Lookup for IP Address showed by Google search
Tags: Technology,Cyber Security,Web Development,Web Scraping,GitHub,

This is a Tor Exit Router: 156.146.58.134

Most likely you are accessing this website because you had some issue with the traffic coming from this IP. This router is part of the Tor Anonymity Network, which is dedicated to providing privacy to people who need it most: average computer users. This router IP should be generating no other traffic, unless it has been compromised.

How Tor works

Tor sees use by many important segments of the population, including whistle blowers, journalists, Chinese dissidents skirting the Great Firewall and oppressive censorship, abuse victims, stalker targets, the US military, and law enforcement, just to name a few. While Tor is not designed for malicious computer users, it is true that they can use the network for malicious ends. In reality however, the actual amount of abuse is quite low. This is largely because criminals and hackers have significantly better access to privacy and anonymity than do the regular users whom they prey upon. Criminals can and do build, sell, and trade far larger and more powerful networks than Tor on a daily basis. Thus, in the mind of this operator, the social need for easily accessible censorship-resistant private, anonymous communication trumps the risk of unskilled bad actors, who are almost always more easily uncovered by traditional police work than by extensive monitoring and surveillance anyway.

In terms of applicable law, the best way to understand Tor is to consider it a network of routers operating as common carriers, much like the Internet backbone. However, unlike the Internet backbone routers, Tor routers explicitly do not contain identifiable routing information about the source of a packet, and no single Tor node can determine both the origin and destination of a given transmission.

As such, there is little the operator of this router can do to help you track the connection further. This router maintains no logs of any of the Tor traffic, so there is little that can be done to trace either legitimate or illegitimate traffic (or to filter one from the other). Attempts to seize this router will accomplish nothing.

Furthermore, this machine also serves as a carrier of email, which means that its contents are further protected under the ECPA. 18 USC 2707 explicitly allows for civil remedies ($1000/account plus legal fees) in the event of a seizure executed without good faith or probable cause (it should be clear at this point that traffic with an originating IP address of nyc-exit.privateinternetaccess.com should not constitute probable cause to seize the machine). Similar considerations exist for 1st amendment content on this machine.

If you are a representative of a company who feels that this router is being used to violate the DMCA, please be aware that this machine does not host or contain any illegal content. Also be aware that network infrastructure maintainers are not liable for the type of content that passes over their equipment, in accordance with DMCA "safe harbor" provisions. In other words, you will have just as much luck sending a takedown notice to the Internet backbone providers. Please consult EFF's prepared response for more information on this matter.

For more information, please consult the following documentation:

  1. Tor Overview
  2. Tor Abuse FAQ
  3. Tor Legal FAQ

That being said, if you still have a complaint about the router, you may email the maintainer. If complaints are related to a particular service that is being abused, I will consider removing that service from my exit policy, which would prevent my router from allowing that traffic to exit through it. I can only do this on an IP+destination port basis, however. Common P2P ports are already blocked.

You also have the option of blocking this IP address and others on the Tor network if you so desire. The Tor project provides a web service to fetch a list of all IP addresses of Tor exit nodes that allow exiting to a specified IP:port combination, and an official DNSRBL is also available to determine if a given IP address is actually a Tor exit server. Please be considerate when using these options. It would be unfortunate to deny all Tor users access to your site indefinitely simply because of a few bad apples.

Sunday, May 23, 2021

'Visual Studio Code' Shortcuts



A Tip About Visual Studio Code:
Tip 1:
If press this sequence:
1: "i"
2: "Enter"
This will put <i> in your HTML file.

#-#-#-#-#-#-#-#-#-#

Tip 2:
If you press this sequence:

1: "i."
2: "Enter"
This will put <i class=""> in your HTML file.

#-#-#-#-#-#-#-#-#-#

Tip 3:

If you press this sequence:

1: "i/"
2: "Enter"
This will put only the opening tag in your HTML template, for "i/" it will be: <i>.

#-#-#-#-#-#-#-#-#-#

Tip 4:

If you press this sequence:

1: "i.customClass"
2: "Enter"

This will put <i class="customClass"></i> in HTML template.

#-#-#-#-#-#-#-#-#-#

Tip 5:

If you press this sequence:

1: "i#customID"
2: "Enter"

This will put <i id="customID"></i> in HTML template.

Tags: Technology,Web Development,

Thursday, May 20, 2021

Censorship in India, Torrenting and Tor Browser



We were looking for a 1997 movie "Good Will Hunting" in ".mp4" format because my Sony Bravia Smart TV does not accept some other video file formats such ".webm" (See more about "webm" in End Note) and see how we solved this problem:

Note: Third link in top 10 results in Google search solved our requirement.

I1 - Good Will Hunting - Google Search
I2 - Magnet Link Site (The Second Link in Google Search Results) but it did not work. Downloaded some garbage video file that did not run in VLC media player.
I3 - The garbage files being downloaded with 'second search result' in qBitTorrent
I4 - The video file fails to open in VLC media player Important Note: Along with video file, a Windows Batch program (.bat file) was also downloaded. This is a very good indication that something is fishy about this magnet link and these files.
I5 - first search result and censorship in India - ytstvmovies.xyz - failed to open in Firefox with Airtel connection
I6 - first search result and censorship in India - ytstvmovies.xyz - failed to open in Chrome with Airtel connection
I7 - first search result and censorship in India - ytstvmovies.xyz - failed to open in Tor with Airtel connection
I8 - third search result and censorship in India - yifytorrentme - failed to open in Firefox with Airtel connection
I9 - third search result and censorship in India - yifytorrentme.com - failed to open in Chrome with Airtel connection
I10 - third search result and censorship overridden with Tor Browser - yifytorrentme.com - opened in Tor with Airtel connection
I11 - yifytorrentme.com - Found the movie using Tor and do check the ads on the site (Do not click any)
I12 - yifytorrentme.com - Download begins by copy-pasting the Magnet link in qBit

End Note

WebM is an audiovisual media file format. It is primarily intended to offer a royalty-free alternative to use in the HTML5 video and the HTML5 audio elements. It has a sister project WebP for images. The development of the format is sponsored by Google, and the corresponding software is distributed under a BSD license. The WebM container is based on a profile of Matroska. WebM initially supported VP8 video and Vorbis audio streams. In 2013, it was updated to accommodate VP9 video and Opus audio. [ Ref 1 ] About WebM WebM is an open, royalty-free, media file format designed for the web. WebM defines the file container structure, video and audio formats. WebM files consist of video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs. The WebM file structure is based on the Matroska container. [ Ref 2 ] [ Ref 3 - YouTube ] Tags: Technology,Cyber Security,Indian Politics,Politics,Web Development,Web Scraping,