Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Magento 2.X fixing Allowed memory size of 792723456 bytes exhausted

Magento 2.X fixing Allowed memory size of 792723456 bytes exhausted

If you are using Magento 2.X and running some command using SSH and getting this “Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes) ” then one is a memory related problem. If you want to run Magento 2.X smoothly then please allot at least 2GB RAM otherwise you may get problem.

Now coming to topic how to fix this Problem
“Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes) ”

You can use the command below as per your need :

php -d memory_limit=2G bin/magento setup:upgrade
php -d memory_limit=2G bin/magento setup:static-content:deploy -f
php -d memory_limit=2G bin/magento indexer:reindex
php -d memory_limit=2G bin/magento cache:flush
php -d memory_limit=2G bin/magento cache:clean && php bin/magento cache:flush
php -d memory_limit=2G bin/magento catalog:image:resize

 

Basic Algebra Formula Algebraic Equation and Formulas

Basic Algebra Formula Algebraic Equation and Formulas

This post deals with popular algebra formula or equation, idle for students who want to learn basic of Algebra. Algebraic Formulas useful for CBSE, ICSE, Bihar Board, UP Board, West Bengal Board or any other State board.

  • (x – y)2 = x2 – 2xy + y2
  • (x+y)2 = x2 + 2xy + y2
  • x2 + y2 = (x+ y)2 – 2xy
  • x2 – y2 = (x – y)(x + y)
  • (x + y + z)2 = x2 + y2 + z2 + 2xy + 2yz + 2zx
  • (x – y – z)2 = x2 + y2 + z2 – 2xy + 2yz – 2zx
  • (x + y)3 = x3 + 3x2y + 3xy2 + y3
  • (x + y)3 = x3 + y3 + 3xy(x+ y)
  • (x – y)3 = x3 – 3x2y + 3xy2 – y3
  • x3 – y3 = (x – y)(x2 + xy + y2)
  • x3 + y3 = (x + y)(x2 – xy + y2)
  • xn−yn=(x−y)(xn−1+xn−2y+xn−3y2+…+yn−1) where n is natural number

 

Most Popular Chinese Apps and their Security Risk

Most Popular Chinese Apps and their Security Risk

In this post I will talk about the most popular Chinese apps among India People, their security, google action on some apps for their notorious behavior and should Indian use their apps . In this post I will also discuss popular apps banned by Chinese Government.

Google Play Store

First Chinese are very conservative, they don’t allow Google Play Store in China if you want to use then you have to use VPN to bypass GFM.

Regarding Google Search

Source Wikipedia “Google China is a subsidiary of Google. Once a popular search engine, most services offered by Google China were blocked by the Great Firewall in the People’s Republic of China. In 2010, searching via all Google search sites, including Google Mobile, was moved from mainland China to Hong Kong.”

List Of Popular Apps banned in China

Chinese Government banned most popular website (Wikipedia) like Facebook, Gmail, Youtube, Netflix, twitter … as of now October 2019 around 10,000 and want other countries use their app.

Now comes to main topic, the most popular Chinese apps in India are given below

App Name Developer Banning History Security Risk
Tik Tok ByteDance (China)  India Today Report Yes
Shareit SHAREit Technologies(China) NA Yes
Xender
Xender File Sharing Team
China
NA Yes
WeChat China NA NA

Indian intelligence agencies have reportedly listed  42 mobile apps that have the potential to carry out a cyber-attack against the country, read Business standard Report

List of 42 Apps Given Below

Weibo, WeChat, SHAREit, Truecaller, UC News, UC Browser, BeautyPlus, NewsDog, VivaVideo- QU Video Inc, Parallel Space, APUS Browser, Perfect Corp, Virus Cleaner (Hi Security Lab), CM Browser, Mi Community, DU recorder, Vault-Hide, YouCam Makeup, Mi Store, CacheClear DU apps studio, DU Battery Saver, DU Cleaner, DU Privacy, 360 Security, DU Browser, Clean Master – Cheetah Mobile, Baidu Translate, Baidu Map, Wonder Camera, ES File Explorer, Photo Wonder, QQ International, QQ Music, QQ Mail, QQ Player, QQ NewsFeed, WeSync, QQ Security Centre, SelfieCity, Mail Master, Mi Video call-Xiaomi, and QQ Launcher.

Note : Truecaller is not an app made by a Chinese company

Conclusion :

Its up to you to use Chines app or not, If you want to know my view, just delete these Chinese app.

 

 

Linux Mint 19.3 Tricia the Perfect Windows 7 Replacement

Linux Mint 19.3 Tricia the Perfect Windows 7 Replacement

Linux Mint 19.3 code name Tricia is stable, Secure, Light weight and comes with fast and fluid interface, as Windows 7 is close to dead this can be perfect replacement.

In this video tutorial I will show you Linux Mint Tricia is very easy to use distro with tons of feature and can be a Windows 7 alternative, I will also show you some exciting data using my electron based app “Automate Joy” like Boot Time, ISP Name, Network details so much just watch the video till end .

Watch Video Linux Mint 19.3 Tricia the Perfect Windows 7 Replacement

Linux Mint released Debian based LMDE 4 Codename Debbie

Linux Mint released Debian based LMDE 4 Codename Debbie

The Linux Mint team have releases a new stable version of the distribution called LMDE 4 codename Debbie. Linux Mint LMDE 4 is based on Debian 10 and ships with the Cinnamon desktop.

Whats new in LMDE 4 Debbie:

  • Automated partitioning with support for LVM and full-disk encryption
  • Home directory encryption
  • Support for automated installation of NVIDIA drivers
  • NVMe support
  • SecureBoot support
  • Btrfs subvolumes support
  • Revamped installer
  • Automatic installation of microcode packages
  • Automatic resolution bump for the live session to a minimum of 1024×768 in Virtualbox.
  • Linux Mint 19.3 improvements (HDT, Boot-repair, System reports, language settings, HiDPI and artwork improvements, new boot menus, Celluloid, Gnote, Drawing, Cinnamon 4.4, XApp status icons…etc)
  • APT recommends enabled by default
  • Removed deb-multimedia repository and packages
  • Debian 10 Buster package base with backports repository

Bugs and Cons in LMDE 4 Debbie :

  • LMDE 4 update manager doesn’t have Kernel update utility
  • The 32-bit ISO can only boot with BIOS not UEFI.
  • Some user reported : boot process always stops with the following lines on the screen=> “modprobe: module dm-raid45 not found in modules.dep”

System requirements for Linux Mint LMDE 4 :

As per Linux Mint website the minimum system requirement to run LMDE 4 Debbie is given below

  • 1GB RAM (2GB recommended for a comfortable usage).
  • 15GB of disk space (20GB recommended).
  • 1024×768 resolution (on lower resolutions, press ALT to drag windows with the mouse if they don’t fit in the screen).

Download Linux Mint LMDE 4

Download 64 bit Version : Click Here
Download 32 bit Version : Click Here

Fixing undefined function curl_init() error Lampp

Fixing undefined function curl_init() error Lampp

Fixing undefined function curl_init() error Lampp : Are you getting “PHP Fatal error: Uncaught Error: Call to undefined function curl_init()” means cURL is a PHP extension is not installed.
This problem is generally occurred when you installed Lampp and forgot to install php_curl.

How to install php_curl :

First step : Stop apache
sudo service apache2 stop

Second Step install php_curl
Ubuntu / Debian
sudo apt-get install php-curl
OpenSUSE
sudo zypper install php5-curl
CentOS / RedHat
sudo yum install php-curl

Third step start apche
sudo service apache2 start

Detecting Ubuntu and its version using NodeJS in Linux

Detecting Ubuntu and its version using NodeJS in Linux

In Linux we can detect ubuntu and its version like Ubuntu 18.04.4 LTS using Linux command “lsb_release -a | grep Description”, using nodejs child_process we can easily run Linux command and detect Linux version.

Code to detect Ubuntu and its version using Nodejs in Linux

The blow code is tested on Node JS Version : 12.4.0

/* by Sanjay Prasad */
const { exec } = require('child_process');
exec('lsb_release -a | grep Description', (err, stdout, stderr) => {
if (err) {
console.error(err)
} else {
console.log("stdout" +stdout.slice(12));
console.log(`stderr: ${stderr}`);
}
});

C program to swap two numbers using pointer

C program to swap two numbers using pointer

In this tutorial we will going to learn how to swap two numbers using pointer. If you want to learn more about pointer then you can go through my previous post Pointers in C Programming with Examples.

My System Configuration :

Fujitsu A555 with 12GB RAM, OS – Kubuntu 18.04, IDE used Geany (you can use your own favorite like Notepad++, Codeblock, Kate, Gedit, Sublime text …,  Compiler : GCC .

Complete Code for C program to swap two numbers using pointer

/*
* Filename : swappointer.c
* C program to swap two no
* using pointer
* By Sanjay Prasad
*/
#include <stdio.h>
void swap(int *n1, int *n2){
int temp;
temp=*n1;
*n1=*n2;
*n2=temp;
}
int main(){
int a,b;
printf("Enter 1st no. a : ");
scanf("%d",&a);
printf("\nEnter 2nd no. b: ");
scanf("%d",&b);
printf("\na contain %d",a);
printf("\nb contain %d",b);
swap(&a,&b);
printf("\nAfter Swap \na contain %d",a);
printf("\nAfter Swap \nb contain %d",b);
printf("\n");
return 0;
}

How to Compile and Run :

first create a file named swappointer.c somewhere. Open terminal and using cd to go there and use command given below :

gcc swappointer.c  (will compile code)

./a.out   (will execute code)

 

Pointers in C Programming with Examples

Pointers in C Programming with Examples

What is a pointer? Explain pointer arithmetic with example. Also explain use of malloc function in C programming with an example.

Pointer :
A pointer is a variable that points to or references a memory location in which data is stored. Each
memory cell in the computer has an address that can be used to access that location so a pointer
variable points to a memory location we can access and change the contents of this memory location
via the pointer.

Pointer declaration:
A pointer is a variable that contains the memory location of another variable. The syntax is as shown
below. You start by specifying the type of data stored in the location identified by the pointer. The
asterisk tells the compiler that you are creating a pointer variable. Finally you give the name of the
variable.
type * variable name
Example:
int *ptr;
float *string;

Pointer Arithmetic
Like other variables pointer variables can be used in expressions. For example if p1 and p2 are
properly declared and initialized pointers, then the following statements are valid.
y=*p1**p2;
sum=sum+*p1;
z= 5* – *p2/p1;
*p2= *p2 + 10;
C allows us to add integers to or subtract integers from pointers as well as to subtract one pointer
from the other. We can also use short hand operators with the pointers p1+=; sum+=*p2; etc., we can
also compare pointers by using relational operators the expressions such as p1 >p2 , p1==p2 and p1!
=p2 are allowed.

/*Program to illustrate the pointer expression and
pointer arithmetic*/
#include< stdio.h >
main(){
int ptr1,ptr2;
int a,b,x,y,z;
a=30;b=6;
ptr1=&a;
ptr2=&b;
x=*ptr1+ *ptr2 –6;
y=6*- *ptr1/ *ptr2 +30;
printf(“\nAddress of a +%u”,ptr1);
printf(“\nAddress of b %u”,ptr2);
printf(“\na=%d, b=%d”,a,b);
printf(“\nx=%d,y=%d”,x,y);
ptr1=ptr1 + 70;
ptr2= ptr2;
printf(“\na=%d, b=%d”,a,b);
}

Malloc Function

Description:
The function malloc() returns a pointer to a chunk of memory of size size, or NULL if there is an
error. The memory pointed to will be on the heap, not the stack, so make sure to free it when you are

done with it. It is basically used in Dynamic Memory Allocation.
Example:
typedef struct data_type {
int age;
char name[20];
} data;
data *person;
bob = (data*) malloc( sizeof(data) );
if( person != NULL ) {
person->age = 22;
strcpy( person->name, “Robert” );
printf( “%s is %d years old\n”, person->name, person->age );
}
free( person );

How to Add INR as New Currency in Opencart 3.x and make it default (Video)

How to Add INR as New Currency in Opencart 3.x and make it default (Video)

Adding Indian Currency in Opencart is really simple. Just follow the steps or watch Video How to Add a INR as New Currency in OpenCart 3.x and make it default Currency below it will hardly take 3 minutes.

For Adding Indian Currency INR Go to

System > Localization > currencies
Create new Currency with the following details
Currency Title – Indian Rupee
Code – INR
Symbol Left – ₹
Decimal Places – 2
Status – enabled

Now Changing INR as default default currency … Go to
System > Settings > Local (Tab)
change Country, Region / State, Currency

Watch Video How to Add INR as New Currency in Opencart 3.x and make it default Currency

I think its very simple, this was successfully tested on Open Cart 2.X,3.X , if you have any problem then let me know through comments or register on my website to discuss.

Do you have any Query / Suggestion