Sunday, June 26, 2022

Build Mid level Gaming PC in 50K Budget - AMD Ryzen 5 5600G

Here I just shared my experience of building a PC with a minimum budget. Here my specifications,


Processor : AMD Ryzen 5 5600G with Radeon Graphics (APU)

Motherboard : Gigabyte B550

RAM : Corsair Vengeance LPX 16GB 

Hard Disk : 256GB NVM 

SMPS : Intex 450W SMPS

Cabinet : Fingers PowerTower C8 Full Tower


Why did I choose APU ?

Basically I'm building a PC for both purposes like Productivity and Gaming. In the current situation, We can't build PCs with CPU and Graphics Card at an affordable price. Due to silicon shortage, the graphic card prices are high. So I picked the APU's.

Why did I choose AMD Ryzen 5600G APU specifically ?

Yes, We have AMD Ryzen 3400G APU at lower prices with good performance. If I build the PC with 3400G, Maybe later if I have potential to add a Graphic card, that's not helpful here. Because it create a bottleneck, due to low CPU cores and Threads. So I picked AMD Ryzen 5600G. Because It has little high CPU cores and Threads. 

Gaming Performance

As of now, I just played few games 

  1. Cricket 19
  2. Cricket 22
  3. FIFA 22
  4. PUBG: Battlegrounds
  5. GTA V
  6. Euro Truck Simulator 2
  7. Race Room Racing Experience

AMD 5600G performed very well and was able to play with 60FPS. Here I attached some videos that I played with this PC. If you want, check it out.

  1. Cricket 19 (https://www.youtube.com/watch?v=1g7Gjr6sfb8)
  2. FIFA 22 (https://www.youtube.com/watch?v=iEpwRlsj_QA)

Productivity :

Basically I'm working as a software engineer. So I installed so many software's for development purposes. Here is the list of the software installed in this PC.

  1. Android Studio
  2. Microsoft Visual Studio
  3. Eclipse 
  4. Node
  5. Python
  6. Java
AMD 5600G  performed very well on the productivity side as well. There are no lag's and also we can access multiple software at the time without any slowness.

Monday, December 20, 2021

How to Increase the dedicated VRAM/GPU memory using BIOS (Gigabyte B550)

Steps to Increase the AMD Ryzen and Intel GPU/Video Memory in Gigabyte B550 Motherboard using BIOS ( Windows 10 ) :

I'm using AMD Ryzen 5 5600G ( Inbuild GPU) processor. But it suitable for both AMD and Intel Processors. 

# Start/Restart System, Press F12 to enter into the Select Boot Device. Then Click Enter Setup



# By default, BIOS opened in Easy Mode. Press F2 to Change Easy Mode to Advanced Mode.



# Move to the Settings Tab and Select IO Ports



# Then Select Integrated Graphics and Change Auto to Forces





# Now you can see the UMA Mode next to the Integrated Graphics. Change the UMA Mode from Auto to UMA Specified



# Now Change the UMA Frame Buffer Size from Auto to 2GB. We don't have a limit to select buffer size. Sometimes It's show the size upto 2GB, It's because of your mode. If you need to increase to 4GB, then need to changes mode CSM to UEFI. In my use case, 2GB is enough for me. If you want higher, then better you can select 4GB or 8GB( I prefer 2GB for 8GB ram and 4GB for 16GB ram specs ).  



# Then Move to the Save & Exit tab and Select Save and Exit Setup. Then Click Yes.



After the system restarted. Check the updated changes in Display adapter properties

# Right click desktop and Select Display Settings.



# Click Advanced display settings and Click Display adapter properties.


# There you can see the updated Video Memory. 


By default,

AMD Ryzen Series provides 512MB Video Memory.
Intel provides 128MB video Memory.


# If you have an AMD Ryzen GPU series processor means, we can check the video memory in the task manager too.


Saturday, December 11, 2021

How to fix black screen error in cricket 19 - Solution 2

Before trying this solution, please checkout and update the solution1 ( How to fix black screen error in cricket 19 - Solution 1 ) and then try the solution2. Because in my case this error resolved after did both solutions.

Solution 2 :

#1. Open Control Panel and Check the Installed Microsoft Visual C++ Versions. Most of them installed the latest version of the Microsoft Visual C++ 2015-2022 Redistributable (x64) or 2017 Redistributable (x64).

If you installed the latest version then uninstall it. Because it's causing the issue with cricket 19. Uninstall and Install the below mentioned version's.


#2. Install version 2012 Redistributable (x64) and Redistributable (x86) 


version2012

version2012





#3. Install version 2015-2019 Redistributable (x64) and Redistributable (x64) 


version2015-2019

#4.  Finally your control panel like this below,

control panel






Now you completed all the things, you run the cricket 19 and It's resolved your issue. It's worked for me. If it's worked for you, then update with me in comment section. If you have queries related to this, please reach me with comments. I will help you to resolve this.

Happy Gaming! 

How to fix black screen error in cricket 19 - Solution 1

Steps for fix black screen error in Cricket 19 Game: 

1. Open game installed folder




2. Right click the ashes application and select Properties




3. Enable the Run this program in compatibility mode for and Select Windows 7 ( Most of them have windows 8, But we need to select windows 7) and Enable both checkbox for Disable fullscreen optimizations and Run this program as an administrator.



4. Click Apply and Ok.

Now run the cricket 19 and check once, Most of them have resolved the above steps. If you face an issue again then try the second solution 2 (How to fix black screen error in cricket 19 - Solution 2). In my case it's resolved after applying both solutions.

If you have any queries, Please reach out to me through comments. I will help you resolve this issue.

Happy Gaming!

Sunday, November 28, 2021

Chrome Extension : Migrating to Manifest V3 from V2

Step for Migrating Manifest Version V2 to V3 

#Changing Manifest Version 


Update the Manifest Version 2 to 3 in manifest.json file.


//Manifest V2

"manifest_version" : 2 

//Manifest V3

"manifest_version" : 3

#Host Permissions


In MV2, We added all the permissions and hosts in permissions property. But in MV3, we need to provide the host permissions in a separate host_permissions property.  


//Manifest V2

"permissions : [

    "tabs",

    "scripting",

    "https://rajachandraan.blogspot.com/"

]


//Manifest V3

"permissions : [

    "tabs",

    "scripting"

],

"host_permissions" : [

    "https://rajachandraan.blogspot.com/"

]

Note : Don't need to add the content script match patterns inside host_permissions. That will be the same as V2.



#Content Security Policy


MV2 supports unsafe-eval for both extension and sandbox pages.


//Manifest V2

"content_security_policy" : "default-src *; script-src 'self' unsafe-eval; object-src 'self'"

MV3, doesn't supports unsafe-eval for extension pages. It's totally restricted. So we unable to use unsafe-eval for extension pages in MV3. But still we can use unsafe-eval for sandbox pages. 

Keep in mind, Sandbox pages doesn't supports chorme API's ( chrome.storage, chrome.scripting etc..). We need to pass the content/data to sandbox pages using postmessage().


//Manifest V3

"sandbox" :{
    "pages" : [
        "pages/popup.html"
     ]
}
"content_security_policy" {
    "extension_pages" : "default-src *; script-src 'self'; object-src 'self'"
    "sandbox" : "sandbox allow-scripts; script-src 'self' 'unsafe-eval'"
}

In the above example, popup.html supports unsafe-eval. But chrome extension API won't work.


#Action API


Both brower_action and page_action are different in MV2. In MV3, both actions are used within the action property.

//Manifest V2

{
    "browser_action" : { 
        "default_icon" : "icon.png",
        "default_title"  : "blogspot",
        "default_popup" : "pages/popup.html"
     }
    "page_action" : { ... }
}

chrome.browserAction.onClicked.addListener(tab => { console.log(tab) });
chrome.pageAction.onClicked.addListener(tab => { console.log(tab) });

//Manifest V3

{
    "action" : {
        "default_icon" : "icon.png",
        "default_title"  : "blogspot",
        "default_popup" : "pages/popup.html"
    }
}

chrome.action.onClicked.addListener(tab => { console.log(tab) });



#Web accessible resources


//Manifest V2

"web_accessible_resources" : [
    "payload.js",
    "widget.js",
    "index.html",
    "dasboard.html"
]

//Manifest V3 

"web_accessible_resources" : [{
    "resources" : [  "payload.js", "widget.js", "index.html", "dasboard.html" ],
    "matches" : ["https://*/*" , "http://*/*"]
    "extension_ids" : []
}]

In MV2, web accessible resources are accessible from any source. We can't control this. But in MV3, we can control this for limited hosts using matches.


#Remotely Hosted Code


In MV2, We can access and use files pulled from remote hosts/servers. But MV3, We can't access the remotely hosted code/files. We need to pack those remotely hosted files within extensions.


#Executing Scripts


//Manifest V2

chrome.tabs.executeScript({

  file: 'script.js'

});


//Manifest V3

chrome.scripting.executeScript({

  target: {tabId: tab.id},

  files: ['script.js']

});

 

Note : Don't forget to add scripting permission in manifest.json.



#Background Service Workers


MV2 Background pages are changed as a service worker in MV3. 

//Manifest V2

"background" : {

    "scripts" : ["background.js"]

}

//Manifest V3

"background" : {

    "service_worker" : "background.js"

}

Note : Service workers don't have access to DOM. So we can't have any DOM properties for service worker. It's also doesn't supports objects like window, cookie, localStorage etc. If you used these things in background.js, you need to think of a different way of handling.


If you completed the above all steps, Your extension is migrated to V3. I hope it's useful. If you have queries related to this migration, reach me with comments. I will help you with this. Thanks! Happy Coding!


Thursday, October 21, 2021

Install/Setup Angular and Ionic CLI

Angular and Ionic have a command line interface to create and run apps. So we need to install both CLI’s. Before installing CLI’s, make sure your computer has installed NodeJS. 




Install Angular CLI :


Run below command from Command prompt,

npm install -g @angular/cli

Note : -g options mean install globally. If installed globally, can access angular from anywhere. Otherwise it has limited access.


If you wanna install a specific angular version, mention the version end of command with @.

npm install -g @angular/cli@12.0.0

Once lation is done, make sure it’s installed correctly using the below command.

ng version


Install Ionic CLI :


Run below command from Command prompt,

npm install -g @ionic/cli

Note : -g options mean install globally. If installed globally, can access ionic commands from anywhere. Otherwise it has limited access.


If you wanna install a specific ionic version, mention the version end of command with @.

npm install -g @ionic/cli@6.0.0

Once installation is done, make sure it’s installed correctly using the below command.

ionic version


Now Installed both Angular and Ionic CLI successfully. You can start creating and running projects with Angular and Ionic.


Monday, October 18, 2021

Ionic OCR Plugin : Scan Text from Image using Capacitor with Example

I started this directly from the OCR native plugin installation. I assume you already have Angular and Ionic setup’s in your project. Checkout here to complete the installation setup.


Install OCR Native Plugin


npm install cordova-plugin-mobile-ocr

npm install @ionic-native/ocr

ionic cap sync


Install Camera Native Plugin


We need any one plugin to choose the image from the storage to perform a scan. Here we can use any plugin for choosing images from storage like Image Picker, Camera etc… In this tutorial, I’m going to use the Camera Plugin.


npm install cordova-plugin-camera

npm install @ionic-native/camera

ionic cap sync


Implement Camera and OCR Plugin into Code with Example


Import the camera and ocr package in your app module and inject inside the component constructor.


import { Camera, PictureSourceType } from '@ionic-native/camera/ngx';

import { OCR, OCRSourceType, OCRResult } from '@ionic-native/ocr/ngx';


Just created two buttons for choosing an image and capturing the image using a camera plugin. Then created one space to show the captured text.


app.component.html :

<ion-header>

  <ion-title>

      Scan Text

  </ion-title>

</ion-header>

<ion-content>

  <div>

    <ion-img [src]="image" *ngIf="image"></ion-img>

    <div class="ion-text-center ion-padding-vertical">

      <ion-button (click)="getPicture(camera.PictureSourceType.PHOTOLIBRARY)">Choose Image</ion-button>

    </div>

    <div class="ion-text-center ion-padding-vertical" *ngIf="!image">

      <ion-button (click)="getPicture(camera.PictureSourceType.CAMERA)">Capture Image</ion-button>

    </div>

  </div>

  <div class="ion-text-center">

    <ion-button color="secondary" *ngIf="image && !ocrResult" (click)="recognizeText()">Capture Text</ion-button>

  </div>

  <div class="ion-padding-horizontal" *ngIf="ocrResult">

    <h2 style="font-weight: bold;">Captured Text :</h2>

    <p>{{ocrResult}}</p>

  </div>

</ion-content>


app.component.ts :


import { Component } from '@angular/core';

import { Capacitor } from '@capacitor/core';

import { Camera, PictureSourceType } from '@ionic-native/camera/ngx';

import { OCR, OCRSourceType, OCRResult } from '@ionic-native/ocr/ngx';


@Component({

  selector: 'app-root',

  templateUrl: 'app.component.html',

  styleUrls: ['app.component.scss'],

})


export class AppComponent {

  image: any = "";

  nativeImageURI: any;

  ocrResult: any = '';


  constructor(private camera: Camera, private noteService: NotesService) { }


  ionViewWillEnter() {

  }


  getPicture(sourceType: PictureSourceType) {

    this.camera.getPicture({

      quality: 50,

      destinationType: this.camera.DestinationType.FILE_URI,

      encodingType: this.camera.EncodingType.JPEG,

      sourceType: sourceType,

      saveToPhotoAlbum: false,

      correctOrientation: true

    }).then((imageData) => {

      this.nativeImageURI = imageData;

      this.image = Capacitor.convertFileSrc(imageData);

    });

  }


  recognizeText() {

    this.ocr.recText(OCRSourceType.NORMFILEURL, this.nativeImageURI).then((res: OCRResult) => {

      if (res.foundText) {

        let allBlocks = res.lines.linetext;

        let allLines = '';

        allBlocks.filter((text) => {

          allLines = allLines + text + "\n";

        })

        this.ocrResult = allLines;

      } else {

        this.ocrResult = "This image doesn't have any text.";

      }

    }).catch((error: any) => {

      console.log(error);

    });

  }

}


I hope it will be helpful for you to use OCR and Camera Plugin in your project. If you have any queries please hit me with a comment.


Saturday, October 9, 2021

Ionic Cordova & Capacitor : How to Display Native Camera Plugin FILE URI path in Image tag

Here steps for display the camera plugin FILE URI image path inside image tag for both Ionic cordova and capacitors.  

Cordova :

Ionic 3 :

Step 1: 

getPicture(sourceType: PictureSourceType) {

    this.camera.getPicture({

      quality: 50,

      destinationType: this.camera.DestinationType.FILE_URI,

      encodingType: this.camera.EncodingType.JPEG,

      sourceType: sourceType,

      saveToPhotoAlbum: false,

      correctOrientation: true

    }).then((imageData) => {

      this.image = (<any>window).Ionic.WebView.convertFileSrc(imageData);

    });

  }

Step 2: 

<ion-img [src]="image"></ion-img>

Friday, October 8, 2021

How to Develop and Build Mobile Apps Without Money - Android / IOS

In general, Mobile applications need an environment/server setup to run and store the information on a database. So we need to spend some money to set up the environment. Most of the independent developers are capable of developing mobile applications. But they don’t have funds to move further. Regarding this, I did some research around this and I got a better idea.



Develop a Mobile Apps (Android / IOS) With Zero Investment :

We can develop mobile apps without any environment/server setup. Instead of an environment/server setup, we can use firebase. It’s developed and maintained by Google. Firebase has more features like normal and social media authentications, realtime and cloud databases, hosting etc... If you get a chance, go through their documents.


We have free plans on firebase with some limited access (Firebase Plan). I’m sure this limited access will be enough for the initial stage. Develop and publish the app with a free plan on initial releases. Once an app will grow and increase user count automatically will get some revenue from that app. Then we can upgrade the firebase plan based on our need and revenue if needed.


But we just need to spend 50$ once to publish an app in google play store. We can’t avoid this.


I hope it will be useful. If you have any queries, hit me with comments.


If you are a front-end developer, this is the best idea for you to build a mobile app. We can use angular and Ionic frameworks for frontend, backend Firebase.