Bug Fix Crayon Syntax Highlighter WordPress Plugin in latest PHP 7.3

Bug Fix Crayon Syntax Highlighter WordPress Plugin in latest PHP 7.3

Today, while updating the PHP version to 7.3 we faced “preg_replace(): Compilation failed: invalid range in character class” warning in Crayon Syntax Highlighter a famous WordPress plugin. After looking into the bug we got a quick fix. We want to share that quick life–saving fix with our valuable readers. Before moving ahead we want to share the issue that we faced. So that our readers can also verify whether are they facing the same one or not? Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /var/www/website-folder/html/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Bug Fix Crayon Syntax Highlighter WordPress Plugin preg_replace() Compilation failed latest PHP 7.3 As the above warning clearly shows that warning occurs on line 340 of …

Read More
google recaptcha v3 site key & secret key

Google reCAPTCHA V3 integration in PHP with Demo Example

Google has launched reCAPTCHA v3 to prevent spam bots from Form Submission without any user interaction. Google reCAPTCHA v3 returns score for each request based on interactions with your site. We can say this score a spam score. With this score we can take various action in your web apps. Today in this tutorial, we are going to show you how you can integrate Google reCAPTCHA v3 in PHP for your website. Register your website and get reCAPTCHA v3 Secret Key First of all you need to register your website on Google reCAPTCHA v3. To do that click here. Now, Login to your Google account & click on the + (Plus icon) on the right side near settings icon. Fill …

Read More

How to Lock PC or Laptop Folder without any Software, with using Bash Script – Windows

We always want to keep our file more confidential and safe from others and the hackers in our computer. We always waste our valuable time for a long in searching for the best password protect locker application/software over internet. And most of the time these software are not available for the free, we need to buy that. These software occupies more storage spaces too. If we spend money in buying these apps, we have to consider about the expiry time too, because it will get expire after a period of time. Then what is the way to protect our private & confidential files to keep away stealing from hackers? If you want such kind of things at free of cost …

Read More
WordPress

How to Insert Google Ads inside Post Content in WordPress

Google Ads are the best way to monetize your blogging. In some blog websites you might seen that, they has Ads inside their post content. These ads are either after the first or second paragraph in most cases. But you can also add ads after every second or third paragraph. Most beginners are wonder perhaps these websites inserts ads manually while writing the content. In this article, we will show you how to insert google ads inside post content after specific paragraphs. You can achieve this with the help of WordPress filters. Insert Google Ads after specific paragraph Insert Google Ads after every specific (second, third or fourth) paragraph By tweaking the above code you can change the magic for …

Read More
Android Tips & Tricks

How To Enable Wireless Debugging With The ADB In Android Studio In Ubuntu Linux

Sometimes debugging the android app via USB connection gets headache and you want to get rid of the USB connection. If you want to get rid of USB debugging then you are on right article. To enable wireless debugging in Android Studio Development you need to first enable developer options in your mobile. You can check How To enable Developer Options in Android mobile. You can enable wireless debugging in Android Studio in two ways. In this article, we will see the both way to enable wireless debugging in Android Studio. Enable Wireless Debugging of Android Studio in Ubuntu Linux Command Line To enable this you have to install android-tools-adb on your system. To install this please run below command …

Read More
PHP-logo

Install PHP Version (7.3, 7.2 or 7.0) on Ubuntu 19.04, 18.04 & 16.04 via PPA

Thanks to Ondřej Surý for maintaining PPA of most the popular PHP versions on launchpad. PHP 7.3 is the current & stable version of PHP. You can check the PHP Release History. PHP 7.3 has support till 6 December 2020. If you want to install the specific version of PHP, then this article can be helpful for you. In this article we will help you in installing PHP 7.3, 7.2 or 7.0 using PPA on Ubuntu 19.04 18.10 LTS, 18.04 LTS, 16.04 LTS, 14.04 LTS or 12.04 LTS systems. Install PHP 7.3 on Ubuntu 19.04, 18.04 & 16.04 PHP 7.3 is the current & stable version of PHP. Use the following set of commands that is installing software-properties-common and then …

Read More
PHP Registered Hashing Algorithms

PHP Registered Hashing Algorithms and their Hashed Value Length

PHP has a many hashing functions like sha1(), hash(), md5(), etc that can be used to hash a string/number based on certain algorithms i.e. “sha1”, “sha256”, “md5”, etc. You can use hash_algos() function to check a list of registered hashing algorithms. All these function takes a string/number as an argument and output an Alpha-Numeric hashed string of certain length. hash_algos() — Return a list of registered hashing algorithms. Currently PHP supports 46 hashing algorithms. hash_algos() function returns a numerically indexed array containing the list of supported hashing algorithms. Each hashing algorithm has a specific hashed value length. PHP Hash Algorithms Name & Length S.No. Algorithm Name Length 1 md2 32 2 md4 32 3 md5 32 4 sha1 40 5 …

Read More
Generate Random String Number in PHP JavaScript Ruby Python

Generating Random String Using PHP, JavaScript, Ruby, Python

Sometime in the programming world, you may need to generate a random string for any purpose, just like to random password suggestions, random passwords for your users. Today, In this Article we will study how can we achieve that in the easiest and fastest way. Random password / Random String can be generated with fully-custom functions but when we compare that with custom function those uses pre-defined functions of that language then that will be the best and fastest. As pre-defined function’s definitions are already compiled where the fully-custom functions are not compiled. Compiler/Interpreter will compile the code (fully-custom function) before executing that. And that will take a couple of microseconds to make it executable. But when it comes with …

Read More
Control Structures - case Statements in Ruby

Control Structures – case Statements in Ruby

As we have seen in the previous lessons, we can check for multiple conditions using the if/elsif/else expression. A more simplified and flexible option is the case expression, which tests a value in when statements. You can have as many when statements as you need for a single case. Note that the case expression must be closed with the end keyword. case statements are used when you need to make different decisions based on a value.For example: Multiple values can be tested within a single when by separating the values with commas.For example: If you forget to put a comma between two values, Ruby will return a syntax error. syntax error, unexpected tINTEGER, expecting keyword_then or ‘,’ or ‘;’ or …

Read More
Logical Operators – and (&&), or (||), and not (!) in Ruby

Logical Operators – and (&&), or (||), and not (!) in Ruby

Logical operators are used to form more complex criteria that test more than one condition for an if expression. Today in this article we will discuss the logical operators used in Ruby language. Ruby has three logical operators: and (&&), or (||), and not (!). Ruby can use words instead of the logical operator symbols (and, or, not), but those have lower precedence and are generally avoided. and (&&) A conditional using and evaluates as true if, and only if, all of its operands are true. Otherwise, the entire conditional evaluates to false.For example:

or (||) The or (||) operator evaluates to true if either (or all) of its operands are true, and false if all operands are false.For …

Read More