Posts

Fix error "Invalid data set: 0" in Perl module GD::Graph

Image
Error Message: Invalid data set: 0 at D:\New\TOOL\graph.pl line 24. Problem Code: my @a1 ; my @a2 = [-9,8,0,1,-2,-5,6,-4,3,7]; foreach my $i (1..10) {     push @a1 , $i; } my @data = (     @a1 ,     @a2 ); Solution: my @a1 ; my @a2 = [-9,8,0,1,-2,-5,6,-4,3,7]; foreach my $i (1..10) {     push @a1 , $i; } my @data = (     [@a1],     @a2 );

Fix error "Not a valid source data structure" in Perl module GD::Graph

Image
Error Message: Not a valid source data structure at D:\New\TOOL\graph.pl line 24. Problem Code: my $gd = $graph->plot( @data ) or die $graph->error; Solution: my $gd = $graph->plot( \@data ) or die $graph->error; Complete working code: #!/usr/bin/env perl use strict; use warnings; use GD::Graph; use GD::Graph::bars;

Windows 10 Fall Creators Update and Microsoft Launcher (Preview)

Image
Fall Creators Update is the latest version of the Windows 10 Operating System by Microsoft. It is now available as beta release. To get this update you need to register your Windows 10 account as an Windows Insider. To join the program go to: https://insider.windows.com/en-us/ Windows 10 PC Version History: Version Code Name Marketing Name 1507 Threshold 1 1511 Threshold 2 November Update 1607 Redstone 1 Anniversary Update 1703 Redstone 2 Creators Update 1709 Redstone 3 Fall Creators Update Windows 10 version 1507, codenamed "Threshold 1", is the first release of Windows 10. It carries the build number 10.0.10240; while Microsoft has stated that there was no designated release to manufacturing (RTM) build of Windows 10, 10240 has been described as an RTM build by various media outlets. Windows 10 Fall Creators Update, or Windows 10 version 1709, codenamed "Redstone 3"...

Monoalphabetic Substitution Cipher in Python

Image
import random plain_text = "devharsh_T @ $01.2" cipher_text = '' decipher_text = '' alphabets = [chr(a) for a in range(0,127)] mappings = [chr(a) for a in range(0,127)] random.shuffle(mappings) print(alphabets) print(mappings) for i in range(len(plain_text)):   for j in range(127):     if(plain_text[i] == alphabets[j]):       cipher_text += mappings[j]   print(plain_text) print(cipher_text) for i in range(len(cipher_text)):   for j in range(127):     if(cipher_text[i] == mappings[j]):       decipher_text += alphabets[j]       print(decipher_text) This Python version of a monoalphabetic substitution cipher shuffles the character set to build a random mapping, then substitutes each character of the message over a wide character range. It is useful for learning, but like all simple substitution ciphers it preserves character frequencies and is broken easily by anal...

Monoalphabetic Substitution Cipher in C++

Image
#include <iostream> #include <string> #include <ctime> #include <chrono> #include <thread> int main() {   char plain[100] = "devharsh";   char cipher[100];     char alphabets[26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};   char mappings[26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};     alphabets[26] = '\0';   mappings[26] = '\0';     std::cout << alphabets << "\n"; ...

Mozilla Firefox Quantum 57+ Legacy Extensions And Alternatives

Image
If you are a Firefox fan than you must have experienced periodical out-dating and temporary unavailability of your favorite extension every time you update your browser. Same thing is going on with the upcoming release of Firefox which is Firefox 57. It will release from November 2017 but if you are on beta channel you can upgrade to it now, from October 2017. If you have upgraded you will notice many extensions are not compatible and since disabled by-default and there is no option available to enable them. These extensions are listed as "Legacy Extensions" which used to be listed as incompatible extensions in previous versions. From Firefox Official Blog: In the past, extensions often stopped working each time a new version of Firefox was released, because developers had to update them every six weeks to keep them compatible. Since extensions could also modify Firefox internal code directly, it was possible for bad actors to include malicious code in an innoce...

Java Standard Edition 9 Features And Download Links

Image
Java Development Kit (JDK) 9 Download Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html Java SE 9 At JavaOne 2011, Oracle discussed features they hoped to release for Java 9 in 2016. Java 9 should include better support for multi-gigabyte heaps, better native code integration, a different default garbage collector (G1, for "shorter response times") and a self-tuning JVM. In early 2016, the release of Java 9 was rescheduled for March 2017, later again postponed four more months to July 2017, and changed again to be finally available on September 21, 2017, due to controversial acceptance of the current implementation of Project Jigsaw by Java Executive Committee, which led Oracle to fix some open issues and concerns, and to refine some critical technical questions. Source: https://en.wikipedia.org/wiki/Java_version_history End of Public Updates for Oracle JDK 8 Oracle will not post further updates of Java S...