How to change mysql engine from Myisam to Innodb
ALTER TABLE tbl_employees ENGINE=INNODB;
ALTER TABLE tbl_employees ENGINE=INNODB;
Error: MySQL shutdown unexpectedly.This may be due to a blocked port,missing dependencies improper privileges, a crash or a shutdown by another method press the logs button to view error logs and check the windows Event Viewer for more clues if you need more help copy and post this entire log window on the forums … Read More »
nodemon is not working in windows.nodemon -v is showing the below errors nodemon : File C:\Users\AppData\Roaming\npm\nodemon.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170 At line:1 char:1 + nodemon -v + ~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess Fix… Read More »
Error [ERR_REQUIRE_ESM]: require() of ES Module E:\node-course\notes-app\node_modules\chalk\source\index.js from E:\node-course\app.js not supported. Instead change the require of index.js in E:\node-course\app.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (E:\node-course\notes-app\app.js:8:15) { code: ‘ERR_REQUIRE_ESM’ Solution is use lower version of chalk — npm install chalk@4.1.2
1. CALL IT A DAY : To stop what you are doing I m tired. Let’s Call it a day. 2. BRING DOWN THE CURTAIN : To put an end The accident brought the curtain down on his remarkable sports career 3. TAKE A BREAK :To pause or relax briefly The meeting is very hectic. let us take… Read More »
Startup applications not working in windows10 after changing the passoword If you change the password of windows machine it will reset some account login related things.One of machine is not loading the startup application after password reset. To make this properly working you can do the following steps 1. Type run from the start option… Read More »
Create Component —————-
1 |
ng g c dashboard --spec=false --inline-style |
here dashboard component will be created with folder dashboard.So inside Dashboard folder following files will be available src/app/dashboard/dashboard.component.html src/app/dashboard/dashboard.component.ts Service,Guards Creation —————- here authentication guard service is created using the following commands
1 2 |
ng g s services/authentication --flat --spec=false ng g g guards/authentication --flat --spec=false |
it will generate the following two files inside services,guards folders src/app/services/authentication.ts src/app/guards/authentication.guard.ts
When i m trying to access nodejs api using angular its throwing this error Solution:
1 2 3 4 5 |
npm install cors --save use the below code in the nodejs file var cors = require('cors') app.use(cors()) |
C:\xampp\htdocs\myproj>php artisan –version While executing this command it throws the below error. Solution: Normaly this issue will happen if the config files contains url(). Please remove all the url() related things from the config.php Or comment all the code and try the above command once more it will show properly. In UrlGenerator.php line 111: Argument… Read More »
This is explained here using the below model,controller files EmpMaster.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class EmpMaster extends Model { /** * The database table used by the model. * * @var string */ use SoftDeletes; protected $table = 'employee_master'; protected $primaryKey = 'EmpId'; /** * Attributes that should be mass-assignable. * * @var array */ protected $fillable = ['EmpId', 'created_at', 'updatedBy', 'updated_at', 'deletedBy', 'deleted_at']; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = []; /** * The attributes that should be casted to native types. * * @var array */ protected $casts = []; /** * The attributes that should be mutated to dates. * * @var array */ protected $dates = ['created_at', 'updated_at','deleted_at']; /** |
Controller.php
1 2 3 |
$Idarray = array('EmpId'=>5621); $updateArray = array('deleted_at' => now(),'deletedBy' => 1); EmpMaster::DeleteRecords($updateArray,); |