Update PyCharm on Linux

In-Application Patch Upgrade From the 2017 versions onward, it is now possible to perform a seamless upgrade without being required to download a tarball. PyCharm will prompt you that an upgrade is available. If you’ve installed under /opt, temporarily elevate privileges: $ sudo chown -R yourusername:root /opt/pycharm_dir/ If selected, PyCharm will upgrade itself, and upon … Read more

Microsoft.AspNetCore.App 2.1.1 upgrade “Blocked by project”

Easy. Was looking for a resolution for this earlier and I all I had to do was just add this in the projects affected. <PropertyGroup> <RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion> </PropertyGroup> Additionally for .NET Core 3 and beyond, <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> </PropertyGroup> There was also an answer posted by Patrick below pointing out that certain projects require the .NET Core … Read more

Laravel: Listen for Model save or update (after or before they’re done)

Inside your model, you can add a boot() method which will allow you to manage these events. For example, having User.php model: class User extends Model { public static function boot() { parent::boot(); self::creating(function($model){ // … code here }); self::created(function($model){ // … code here }); self::updating(function($model){ // … code here }); self::updated(function($model){ // … code … Read more

Node.js setup for easy deployment and updating

Combining all knowledge gathered (Big thanks to Julian Knight for the ideas) and methods tested in the past week, I’ve decided to settle for the deployment solution described below (I thought I’d be nice to share to help others with comparable questions): Auto-restarting on script errors and automatic reloading on script changes is handled by … Read more

MongoDB – Update an object in nested Array

Apply the $set operator together with the $ positional operator in your update to change the name field. The $ positional operator will identify the correct element in the array to update without explicitly specifying the position of the element in the array, thus your final update statement should look like: db.collection.update( { “friends.u.username”: “michael” … Read more

Update single field using spring data jpa

You can try something like this on your repository interface: @Modifying @Query(“update EARAttachment ear set ear.status = ?1 where ear.id = ?2”) int setStatusForEARAttachment(Integer status, Long id); You can also use named params, like this: @Modifying @Query(“update EARAttachment ear set ear.status = :status where ear.id = :id”) int setStatusForEARAttachment(@Param(“status”) Integer status, @Param(“id”) Long id); The … Read more