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

Linux Error: unknown filesystem. grub rescue>

Linux Error: unknown filesystem. grub rescue>

Recently when trying Kubuntu 19.04 as dual boot with Ubuntu I got a error “Error: unknown filesystem. grub rescue>”, I can’t boot my system and also not able to boot any live USB as my system gone to GRUB2 Rescue Mode.

then I tried the code below
grub rescue>ls (hd0) (hd0,1) (hd0,2) (hd0,3) (hd0,4)
then I tried
grub rescue> set root=(hd0,2)
grub rescue> set prefix=(hd0,2)/boot/grub
grub rescue> insmod normal
grub rescue> normal

Note : (hd0,2) is working for me.
Now once you boot into Ubuntu, run the following two commands as well:

sudo update-grub
sudo grub-install /dev/sda

Now my system works boot normally .

PHP Getting Best two of Three Numbers for CBSE Result Tabulation

PHP Getting Best two of Three Numbers for CBSE Result Tabulation

In this post I will show how to get best two out of Three Numbers using PHP, Actually I have developed CBSE based School ERP for Our company and for generating Result tabulation you need to find out best two numbers from T1,T2 and T3. Lets dive into code without wasting time ..

Script / Code to find out best two out of Three Numbers

<?php
/*
* Getting Best two of Three Numbers
* By Sanjay Prasad
*/
$fd1=10;
$fd2=11.5;
$fd3=8.5;
$num1=number_format($fd1,1);
$num2=number_format($fd2,1);
$num3=number_format($fd3,1);
$num=array($num1,$num2,$num3);
rsort($num);
//var_dump($num);
$fd4 = $num[0] + $num[1];
echo $fd4;
//output will be 21.5
?>

RRB NTPC 2019 Most Important Question Current Affairs

RRB NTPC 2019 Most Important Question Current Affairs

RRB is going to conduct RRB NTPC Examination soon, so in this post I am going to post some of most important Current Affairs question with their answer.

What is RRB NTPC Examination!

The RRB NTPC is a competitive exam for the non-technical posts conducted by Railway Recruitment Board. The full form of NTPC is Non-Technical Popular Categories.

RRB NTPC 2019 Most Important Question with their answer

1. Who became the first Indian Wrestler to qualify for the 2020 Tokyo Olympics?
Answer : Vinesh Phogat.
2. In which country is the tallest tower in South Asia unveiled ?
Answer : Sri Lanka.
3. Each year World Red Cross and Red Crescent Day is celebrated on !
Answer : Friday, 8 May.
4. Pandit Jasraj has established his reputation in which of the following fields?
Answer : Music .
5. Who is the director of the Indian documentary film ‘Moti Bagh’ nominated for the 2019 Oscars?
Answer : Nirmal Chandra
6. Who won the 2019 IBSF World Billiards Championship title in Myanmar?
Answer : Pankaj Adwani.
7. Which scientist discovered the radioactive element radium?
Answer : Marie Curie.
8. Tripitakas are sacred books of a) Hindus b) Jews c) Jains d) Buddhists.
Answer : d) Buddhists
9) Which Indian cricketer has been appointed the first Chancellor of Rai Sports University in Sonipat?
Answer : Kapil Dev
10) When was the Howdy Modi program organized?
Answer : 22th September, 2019.
11. In which country will the FIFA Under 17 Women’s World Cup 2020 be held?
Answer : India.
12. Which state government has decided to ban private practice of government doctors?
Answer : Andhra Pradesh
13. SYED MUSHTAQ ALI TROPHY is associated with
a) Hockey b) Cricket c) Basketball d) Football.
Answer : Cricket
14. Who won 2019 Cricket World cup (ODI) .
Answer : England
15. In Human beings the process of digestion of food begins in a) Stomach b) Food Pipe c) Mouth
d) Small Intestine .
Answer : C) Mouth.
16.Which of the following organism have parasitic mode of nutrition?
a) Penicillium
b) Plasmodium
c) Paramecium
d) Parrot
Answer : b) Plasmodium
17.Name the first enzyme that mix with food in the digestive tract?
a) Pepsin
b) Trypsin
c) Amylase
d) None of the above
Answer : c) Amylase
18.The solution of one of the following compounds will conduct electricity. This compound is:
a) CCl4
b) HCl
c) CaCl2
d) CH3Cl
Answer: c) CaCl2 (calcium chloride)
Explanation: CaCl2 form ionic bond and so will conduct electricity.
19. Which of the following in biology is the energy currency of cells?
a) PDP
b) DTP
c) ATP
d) ADP
Answer: c) ATP
20. Which animal has three-chambered heart?
a) Pigeon
b) Lizard
c) Fish
d) Lion
Answer: b) Lizard (Generally Amphibians and reptiles has 3 chambered heart)

Fedora 31 released Officially, Check Out its New Features

Fedora 31 released Officially, Check Out its New Features

Fedora 31 released Officially, Check Out its New Features
Fedora 31 is released officially, so one can download it from its official website getfedora.org and enjoy its new features report bugs or set fedora 31 as own primary workstation or development environment if you are developer.

Whats new in Fedora 31

Toolboox
As per fedoramagazine.org “If you haven’t used the Fedora Toolbox, this is a great time to try it out. This is a simple tool for launching and managing personal workspace containers, so you can do development or experiment in an isolated experience. It’s as simple as running “toolbox enter” from the command line.
This containerized workflow is vital for users of the ostree-based Fedora variants like CoreOS, IoT, and Silverblue, but is also extremely useful on any workstation or even server system. Look for many more enhancements to this tool and the user experience around it in the next few months — your feedback is very welcome.”

Distro Name Fedora
Based On RPM based
Distro Version Fedora 31
Desktop Environment GNOME 3.34
Website getfedora.org
Download Download Fedora 31 Workstation 64bit
Karnel 5.0
Grub NA
Systemd 243
Samba 4.11.2
Shell Bash 5.0
GCC 9.2.1
QT 5.12.5
Python 3.8
NodeJS 12
VIM 8.1
File Manager Nautilus (3.34.1)
Java
Browser Firefox 70
Email Client Thunderbird 68.2.0
Video Player NA
Office Libra Office 6.3.3

Honor Lite 10 best phone under 7500Rs. with Antutu score135000

Honor Lite 10 best phone under 7500Rs. with Antutu score135000

Honor 10 Lite 3GB/32GB priced Rs. 7999 (After 10% Credit/Debit card discount Rs. 7200), is looks like a Premium Smart phone that can be seen on high end phone and tons of feature with average Antutu score 135000.

Should I buy Honor Lite 10 3GB/32GB

Pros:
Excellent performance.
PUBG on HD, High FPS without lag. From 100-0% battery.

Excellent battery
5-5.5 hours of PUBG on HD, High FPS, 50% brightness.
It lasts longer than many 4000 mAh phones like Redmi Note 7.

Excellent built quality.
I’ve checked all phones close to its price range. Honor 10 Lite and Realme 3 strongest phone around.

Excellent sound quality in speaker + earphones.
It’s loud, clear and stereo! Flipkart, amazon Gsmarena, 91mobiles also rated it excellent in their review.
The sound quality is better than all phones in its price (in my country).

Cons:
Rear Camera can be improved little bit.
Missing Infrared blaster, USB C-Type, Blutooth 5, Only 10W Fast Charging .

Honor Lite 10 3GB/32GB, Antutu Score and pros and Cons

Specification Remarks
ANTUTU SCORE Average Score 135,000 Very Good
Gaming PubG Can be played in Medium graphic Can be played most of the games smoothly using GPU Turbo 3
SOC Hisilicon Kirin 710 (12 nm)
GPU – Mali-G51 MP4
Good and Power Efficeient
OS Android 9.0 (Pie); EMUI 9.1 Well optimized, lag free and butter smooth
Android 10 Honor will provide android 10 Listed on Android 10 on Honor Website
RAM and ROM 3GB RAM 32GB ROM Excellent
Battery 3400mAH, Battery charging 10W Good enough for 1day usages
Dimension 154.8 x 73.6 x 8 mm (6.09 x 2.90 x 0.31 in)
162 g
Very Light weight and small
Display 6.21 inches inch FHD+
1080 x 2340 pixels, 19.5:9 ratio (~415 ppi density)
Excellent
Camera 13 MP, f/1.8, 26mm (wide), PDAF
2 MP, f/2.4, depth sensor,
Secondary 24MP
with AI get get better quality images
Video Rear Camera 1080p@30/60fps

Secondary 1080p@30fps

with AI get get better quality videos
OTG Yes
Infrared Blaster No
NFC No
Dual Active VoLTE Yes can run two jio sim ..
Bluetooth  version 4.2 Expected 5
FM Radio Yes
Sensor Fingerprint, G-sensor, Proximity, Light, Compass
GPS A-GPS, GLONASS, BDS Better GPS Lock
Sound Good Enough not Loud

Final Thought
At Rs. 7999 (After 10% Credit/Debit card discount Rs. 7200), no phone compete honor 10 lite, with Premium Look that can be
seen on high end phone and tons of feature it will going to be the best Buy.

How to create a WordPress dropdown list using get_categories()

How to create a WordPress dropdown list using get_categories()

Wondering how to create a WordPress dropdown list ? In this article, we walk you through this process with code (using get_categories functions) given below. First we will create
a varibale $args and pass some parameters like hide_emty (1 will hide and 0 will display category with 0 post), similarly if you want to hide certain category
then pass category id in array like array(1,13).

Wondering how to create a WordPress dropdown list Code

<select name="category" id="category" class="form-control" >
<option value="">Select Category </option>
<?php
$args=array(
'hide_empty' => 1,
'exclude' => array(1,13), //hiding category id 1 and 13 ...
);
$categories = get_categories($args);
foreach ($categories as $category) {
//$option .= '<option value="'.get_option('home').'/category/'.$category->slug.'">';
$option .= '<option value="'.$category->slug.'">';
$option .= $category->cat_name;
//$option .= ' ('.$category->category_count.')';
$option .= '</option>';
}
echo $option;
?>
</select>

Indian States and Union Territories Drop down list HTML ascending order

Indian States and Union Territories Drop down list HTML ascending order

Indian States and Union Territories Drop down list HTML ascending order code is given below, if someone is not want to use database for storing and fetching state list then this code going to save our precious time

Code for Indian States and Union Territories Drop down list HTML ascending order

<select name="state" id="state" class="form-control">
<option value="Andhra Pradesh">Andhra Pradesh</option>
<option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</option>
<option value="Arunachal Pradesh">Arunachal Pradesh</option>
<option value="Assam">Assam</option>
<option value="Bihar">Bihar</option>
<option value="Chandigarh">Chandigarh</option>
<option value="Chhattisgarh">Chhattisgarh</option>
<option value="Dadar and Nagar Haveli">Dadar and Nagar Haveli</option>
<option value="Daman and Diu">Daman and Diu</option>
<option value="Delhi">Delhi</option>
<option value="Lakshadweep">Lakshadweep</option>
<option value="Puducherry">Puducherry</option>
<option value="Goa">Goa</option>
<option value="Gujarat">Gujarat</option>
<option value="Haryana">Haryana</option>
<option value="Himachal Pradesh">Himachal Pradesh</option>
<option value="Jammu and Kashmir">Jammu and Kashmir</option>
<option value="Jharkhand">Jharkhand</option>
<option value="Karnataka">Karnataka</option>
<option value="Kerala">Kerala</option>
<option value="Madhya Pradesh">Madhya Pradesh</option>
<option value="Maharashtra">Maharashtra</option>
<option value="Manipur">Manipur</option>
<option value="Meghalaya">Meghalaya</option>
<option value="Mizoram">Mizoram</option>
<option value="Nagaland">Nagaland</option>
<option value="Odisha">Odisha</option>
<option value="Punjab">Punjab</option>
<option value="Rajasthan">Rajasthan</option>
<option value="Sikkim">Sikkim</option>
<option value="Tamil Nadu">Tamil Nadu</option>
<option value="Telangana">Telangana</option>
<option value="Tripura">Tripura</option>
<option value="Uttar Pradesh">Uttar Pradesh</option>
<option value="Uttarakhand">Uttarakhand</option>
<option value="West Bengal">West Bengal</option>
</select>

Demo Output for Indian States and Union Territories Drop down list

How to Use Ajax in WordPress Booking Request Example

How to Use Ajax in WordPress Booking Request Example

This post is all about how to use AJAX in WordPress . In this example we will create a booking request section that will send email regarding booking using ajax.
I assumes that you already have basic knowledge of WordPress, javascript (jquery), bootstrap…. The code given below is simple to understand and already running on a wordpress website. I can’t name the website I build so please go through codes given below … I will solve queries using comment section.

How to Use Ajax in WordPress HTML Part

<section id="search">
<div class="container-fluid">
<form id="bookingForm" method="post">
<div class="row">
<div class="col-md-2">
<input type="text" name="checkin" id="bk_checkin" class="datepicker form-control" placeholder="Select Check In Date" required/>
</div>
<div class="col-md-2">
<input type="text" name="checkout" id="bk_checkout" class="datepicker form-control" placeholder="Select Check Out Date" required/>
</div>
<div class="col-md-3">
<input type="text" name="name" id="bk_name" class="form-control" placeholder="Enter Full Name" required/>
</div>
<div class="col-md-3">
<input type="text" name="email" id="bk_email" class="form-control" placeholder="Enter Email ID" required/>
</div>
<div class="col-md-2"><button type="submit" class="btn btn-info btn-block">Book</button></div>
</div>
<div class="col-md-12">
<div id="bookingResponse"></div>
</div>
</form>
</div>
</section>

How to Use Ajax in WordPress Javascript Part

In your theme folder create folder js and inside js folder create javascript file bookingrequest.js with code given below

jQuery(document).ready(function($) {
$("#bookingForm").on("submit",function(e){
e.preventDefault();
var checkin= $("#bookingForm #bk_checkin").val();
var checkout= $("#bookingForm #bk_checkout").val();
var name= $("#bookingForm #bk_name").val();
var email= $("#bookingForm #bk_email").val();
$("#bookingForm #bookingResponse").html('<p class="text-center"><i class="fa fa-spin fa-cog fa-2x"></i></p>');
$.ajax({
url: booking_ajax_obj.ajaxurl, // or example_ajax_obj.ajaxurl if using on frontend
data: {
'action': 'booking_ajax_request',
'checkin' : checkin,
'checkout' : checkout,
'name' : name,
'email' : email,
},
success:function(data) {
$("#bookingForm #bookingResponse").html(data)
console.log(data);
},
error: function(errorThrown){
console.log(errorThrown);
}
});
});
});

How to Use Ajax in WordPress PHP Part

Just copy the code below and paste inside functions.php

//Booking request file Register
function booking_ajax_enqueue() {
// 1st enqueue
wp_enqueue_script(
'booking-ajax-script',
get_template_directory_uri() . '/js/bookingrquest.js',
array('jquery')
);
// 2nd Register
wp_localize_script(
'booking-ajax-script',
'booking_ajax_obj',//url in js file will be url: booking_ajax_obj.ajaxurl
array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) )
);
}
add_action( 'wp_enqueue_scripts', 'booking_ajax_enqueue' );
// booking function
//action in javascript file will be 'action': 'booking_ajax_request'
add_action( 'wp_ajax_booking_ajax_request', 'booking_ajax_request' );
add_action( 'wp_ajax_nopriv_booking_ajax_request', 'booking_ajax_request' );
function booking_ajax_request() {
$to= 'info@codentricks.com';
// The $_REQUEST contains all the data sent via ajax
if (isset($_REQUEST) ) {
$checkin = sanitize_text_field(trim($_REQUEST['checkin']));
$checkout = sanitize_text_field(trim($_REQUEST['checkout']));
$name = sanitize_text_field(trim($_REQUEST['name']));
$email = sanitize_text_field(trim($_REQUEST['email']));
if($checkin==""){
echo '<br/><div class="alert alert-danger">Select Check in Date</div>';
}else if($checkout==""){
echo '<br/><div class="alert alert-danger">Select Check Out Date</div>';
}else if($name==""){
echo '<br/><div class="alert alert-danger">Please enter your Full Name</div>';
}else if(!filter_var($email, FILTER_VALIDATE_EMAIL) === true){
echo '<br/><div class="alert alert-danger"><b>Sorry</b> Invalid Email ID</div>';
}else{
$subject = 'Booking Request';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$email."\r\n".
'Reply-To: '.$email."\r\n" .
'X-Mailer: PHP/' . phpversion();
$msg = '<html><body><p>';
$msg .= 'Check In : '.$checkin.'<br/>';
$msg .= 'Check Out : '.$checkout.'</p>';
//$msg .= 'Full Name : '.$name.'';
$msg .= '<p>From <br/>'.$name.'<br/>'.$email.'</p>';
$msg .= '</body></html>';
if(mail($to, $subject, $msg, $headers)){
echo '<br/><div class="alert alert-success">Your Booking Request sent successfully, we will contact you as soon as possible.</div>';
} else{
echo '<br/><div class="alert alert-danger"><b>Sorry </b>Mail was not sent, Please try Later</div>';
}
}
}else{
echo '<br/><div class="alert alert-danger">Something went Wrong ...</div>';
}
die();
}

Select Removing all option enter new values using Javascript Object

Select Removing all option enter new values using Javascript Object

Sometimes We face some problem How can i dynamically remove all options of a drop down box in javascript? How to reset Select box all option and enter new values ? How to create dynamic dropdown from javascript Object if you don’t want to use any database.

In this tutorial I will show an example how to do this in a easy way, you can even copy paste and create a filename.html and open in browser

First we need two dropdown, When we select an option from First One(that will hold some class like VI and VII [CBSE]), Sencond drodown will show related mathematics topic/lession to related Class

Removing all option of dropdown and enter new values using Javascript Object

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Creating dynamic Dropdown using Javascript Object</title>
</head>
<body>
<h1>Creating dynamic Dropdown using Javascript Array</h1>
<label>First Drop Down</label><br/>
<select name="student_class" id="student_class" class="change form-control" required>
<option value="">Select a Class</option>
<option value="VI">VI</option>
<option value="VII">VII</option>
</select><br/>
<label for="">Topics</label><br/>
<select name="topic" id="topic" class="form-control" required>
<option value="">Select a Topic</option>
</select>
<!--Jquery CDN -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<!--Jquery CDN -->
<script>
$(document).ready(function(){
$("#student_class").change(function(){
var className=$("#student_class").val();
var cobj;
if(className=="VI"){
cobj ={'Knowing Your Numbers':'Knowing Your Numbers','whole Numbers':'whole Numbers','Playing with Numbers':'Playing with Numbers','Basic Geometric Ideas':'Basic Geometric Ideas','Understanding Elemetary shapes':'Understanding Elemetary shapes',
'Integers':'Integers','Fractions':'Fractions','Decimals':'Decimals','Data Handling':'Data Handling','Mensuration':'Mensuration','Algebra':'Algebra','Ration and Proportions':'Ration and Proportions','Symmetry':'Symmetry','Practical Geometry':'Practical Geometry'
};
}else if(className=="VII"){
cobj = {'Integers' : 'Integers','Fractions and Decimals' : 'Fractions and Decimals','Data Handling' : 'Data Handling','Simple Equations' : 'Simple Equations','Lines and Angles' : 'Lines and Angles','The Triangle and its Properties' : 'The Triangle and its Properties'
,'Congruence of Triangles' : 'Congruence of Triangles','Comparing quantities' : 'Comparing quantities'};
}else if(className=="VIII"){
cobj = {ValueA : 'Text A',ValueB : 'Text B',ValueC : 'Text C',ValueD : 'Text D',ValueE : 'Text E',ValueF : 'Text F'};
}else if(className=="IX"){
cobj = {ValueA : 'Text A',ValueB : 'Text B',ValueC : 'Text C',ValueD : 'Text D',ValueE : 'Text E',ValueF : 'Text F'};
}else if(className=="X"){
cobj = {ValueA : 'Text A',ValueB : 'Text B',ValueC : 'Text C',ValueD : 'Text D',ValueE : 'Text E',ValueF : 'Text F'};
}else{
}
var select = document.getElementById("topic");
//removing previous option
while (select.firstChild) {
select.removeChild(select.firstChild);
}
// generating option based onclick
for(index in cobj) {
select.options[select.options.length] = new Option(cobj[index], index);
}
});
});
</script>
</body>
</html>

Infinix Hot 8 specification, pros and cons

Infinix Hot 8 specification, pros and cons

Infinix Hot 8 the cheapest and best phone as per specification going for flash sale on Flipkart from 12th September, 2019. In this post I will discuss specification, pros and cons of Infinix Hot 8, price and other details.

Before buying any smart phone Indian customer first think about its Camera quality, Battery Backup , performance and then build quality and other details.  Infinix hot 8 priced Rs. 6999 packed with Mediatek P22 SOC, 4GB RAM, 64GB ROM and around 6.52 inch  HD+ display.

 

Infinix Hot 8 Specification, Antutu Score  and pros and Cons

Specification Remarks
ANTUTU SCORE Around 82K Good
PubG Can be played in low graphic Not a PubG Device
SOC Mediatek Helio P22 (12nm) Good and Power Efficeient
RAM and ROM 4GB RAM 64GB ROM Excellent
Battery 5000mAH Excellent
Display 6.52 inch HD+, Good
Camera Primary 13MP + 2MP with quad LED, Secondary 8MP with AI get get better quality images
OTG Yes
NFC No
Dual Active VoLTE Yes can run two jio sim ..
Bluetooth  version 5 Excellent
FM Radio Yes
Sensor Fingerprint, G-sensor, Proximity, Light, Compass
GPS Only GPS A
Sound Dirac surround sound

Infinix hot 8 conclusion

Infinix Hot 8 is recommended device to buy as no company is providing such specification at this price its better than real me c2, Redmi 7A …

Do you have any Query / Suggestion