Posts

Showing posts from January, 2021

Date Formate change from Y-m-d to d-m-Y in jquery | javascript | js

Image
                            var dob=$("#dob").val();               var new_dob=dob.split("-").reverse().join("-");               $("#dob").val(new_dob);

Order a MySQL table by two columns

Image
  ORDER BY article_rating DESC, article_time DESC

Rename a table in MySQL

Image
    Try any of these RENAME TABLE `group` TO `member` ; or ALTER TABLE `group` RENAME `member` ;

Please run Mix again in Laravel with Vuejs

Image
  Below code will solve this issue. let mix = require('laravel-mix'); mix.browserSync({ proxy: process.env.APP_URL, files: [ 'public/assets/css/**/*.css', 'public/assets/js/bundle.js', 'app/**/*.php', 'resources/views/**/*.php', ] }) .js('resources/assets/js/app.js', 'js') .sass('resources/assets/sass/app.scss', 'css');

checkbox and radio button value

Image
  $("input[name=rate]:checked").val();

Subdomain Creation in VPS Hosting Like Digital Ocean and Kamatera

Image
    sudo apt-get update   sudo mkdir -p / var /www/ok.mwtc.in/public_html   sudo chown -R $USER:$USER /var/www/ok.mwtc.in/public_html   sudo chmod -R 755 / var /www   sudo cp /etc/apache2/sites-available/ 000 - default .conf /etc/apache2/sites-available/ok.mwtc.in.conf   sudo nano /etc/apache2/sites-available/ok.mwtc.in.conf   <VirtualHost *:80>         ServerAdmin info@example.com         ServerName ok.mwtc.com         DocumentRoot /var/www/ok.mwtc.in/public_html           <Directory /var/www/ ok.mwtc.in /public_html/>             Options Indexes FollowSymLinks             AllowOverride All        ...

Target class controller does not exist - Laravel 8

Image
  "In previous releases of Laravel, the RouteServiceProvider contained a $namespace property. This property's value would automatically be prefixed onto controller route definitions and calls to the action helper / URL::action method. In Laravel 8.x, this property is null by default. This means that no automatic namespace prefixing will be done by Laravel." Laravel 8.x Docs - Release Notes   You would have to use the Fully Qualified Class Name for your Controllers when referring to them in your routes when not using the namespace prefixing. use App \ Http \ Controllers \ UserController ; Route::get( '/users' , [UserController::class, 'index' ]); // or Route::get( '/users' , 'App\Http\Controllers\UserController@index' );  

Timezone in php for Bharat (India)

Image
  date_default_timezone_set( 'Asia/Kolkata' ); echo date( 'd-m-Y H:i' );

jQuery show for 5 seconds then hide

Image
  $( "#myElem" ).show(); setTimeout ( function ( ) { $( "#myElem" ).hide(); }, 5000 );

Delete first character or number from string or number in js

Image
  var s1 = "foobar" ; var s2 = s1.substring( 1 ); alert(s2); // shows "oobar"

How to use Formdata for file upload and data save using ajax

  var form = $( '#fileUploadForm' )[ 0 ]; var data = new FormData(form); data.append( "CustomField" , "This is some extra data, testing" ); $( "#btnSubmit" ).prop( "disabled" , true ); $.ajax({ type : "POST" , enctype : 'multipart/form-data' , url : "upload.php" , data : data, processData : false , contentType : false , cache : false , timeout : 600000 , success : function ( data ) { console .log(); },

Codeigniter (CI) Table Join

Image
    $this ->db->select( 'users.usrID, users_profiles.usrpID' ) ->from( 'users' ) ->join( 'users_profiles' , 'users.usrID = users_profiles.usrpID' ); $result = $this ->db->get();

SQL Database Table Joins - Inner,Left,Right and Outer For Every Develope...

Image

Bootstrap 4 offset | Take space from left in bootstrap

Image
  If you want to take left space in div so you can use this according to your need of space you give numbers here instead of of 3. offset-sm-3 offset-md-3 offset-xs-3 offset-lg-3

JavaScript TypeError – Invalid assignment to const “X”

Image
  This JavaScript exception invalid assignment to const occurs if a user tries to change a constant value. Const declarations in JavaScript can not be re-assigned or re-declared. Message: TypeError: invalid assignment to const "x" (Firefox) TypeError: Assignment to constant variable. (Chrome) TypeError: Assignment to const (Edge) TypeError: Redeclaration of const 'x' (IE) Error Type: TypeError Cause of Error: A const value in JavaScript is changed by the program which can not be altered during normal execution. < script >      const GFG = "This is GFG";      // Error here      GFG = "This is GeeksForGeeks";  </ script >   Output(in console): TypeError: Assignment to const  

Multiple Element Hide Show Control using Jquery in Hindi Explanation

Image

HTML Table to Excel Conversion without using any external library in PHP...

Image

Basic python with Google Colab in Hindi Explanation

Image

Delete Duplicate Data or Row from Mysql Database Table in Hindi Explanation

Image