Categories
Linux Mastering Development

Possible to match multiple conditions in one case statement?

I would like to do something like this where on Friday, the output is for both conditions that match: #!/bin/bash #!/bin/bash NOW=$(date +”%a”) case $NOW in Mon) echo “Mon”;; Tue|Wed|Thu|Fri) echo “Tue|Wed|Thu|Fri”;; Fri|Sat|Sun) echo “Fri|Sat|Sun”;; *) ;; esac As the code above is written, the only output on Friday would be: Tue|Wed|Thu|Fri Desired output on […]

Categories
Linux Mastering Development

zip file with fat format (on linux)

I am trying to import contacts from micro-SD to (non Android) Nokia phone. So I first exported current contacts on micro-SD card in hope that i will be able to modify the exported file and then import it. Exported file type is Nokia backup file .NBF. it seem it is actually an ordinary zip file. […]

Categories
Linux Mastering Development

How to make “Focus follow mouse” for Dolphin File Explorer?

I use Dolphin file explorer, within which I frequently switch back and forth to the terminal panel. So I was wondering how to make “Focus follow mouse” within Dolphin, so that I don’t need to click the terminal each time I have to enter something. I noticed that the terminal panel doesn’t register as a […]

Categories
Linux Mastering Development

How to enlarge an ext3/ext4 filesystem through debugfs?

I’m in a situation where I want to enlarge the default size of an ext4 filesystem used by the firmware. The problem is resize2fs is doing extra things like clearing some filesystems features and relocating the journal to the beginning of the device’s partition (as a result my device keep crashing before mounting anything and […]

Categories
Linux Mastering Development

Readyboost on linux

I wanted to know if you can do “readyboost” in Linux. ReadyBoost is a program that caches files that are frequently used by Windows 10. It stores the cached files on USB flash drive(s) or SD memory card. I use Manjaro i3. My laptop is an HP Stream with 2GB RAM and 32GB Hard Drive.

Categories
Linux Mastering Development

How to add rule file into /etc/udev/rules.d in NixOS?

I’m following this instruction: https://github.com/nns779/px4_drv make under the directory fwtool builds it930x-firmware.bin and make under driver builds px4_drv kernel module. Now it930x.nix and px4_drv.nix is here. https://gist.github.com/gtgteq/30cb73c344477d26f8c69768e010331a /etc/udev/rules.d/99-px4video.rules of px4_drv is not show in system. How to make available this rule file?

Categories
Mastering Development

Why is the response value incorrect for POST in Swagger?

I am writing API document through Swagger. For GET method, the Sample model value of Response is returned correctly, but not correct for POST. It is always fixed at the same value. Swagger Config.java @Bean public Docket api(){ return new Docket(DocumentationType.SWAGGER_2).host(“localhost:8080”).select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.ant(“/api/**”)) .build() .directModelSubstitute(LocalDate.class, String.class) .genericModelSubstitutes(ResponseEntity.class) .alternateTypeRules( newRule(typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class) )) .useDefaultResponseMessages(false) .ignoredParameterTypes( […]

Categories
Mastering Development

How can I Google sheet multiple string in one cell

Basically, I am trying to gather all column 2 to show as different strings on excel: COLUMN 1 | COLUMN 2 Column 3 | Column 4 www.example.com | apple www.example.com | apple, coconut www.abc.com | apple Return www.abc.com |apple, banana, coconut www.hello.com | apple www.hello.com | apple, banana www.example.com | apple www.hello.com | banana www.abc.com […]

Categories
Mastering Development

Need help for making stored procedure in sql

• usp_VehicleList: Select an alphabetized list of Vehicle Descriptions and IDs (will be used later to populate dropdown lists) • usp_CustomerDelete: Delete records from the Customers table • usp_CustomerInsert: Insert new records into the Customers table (this should return the newly created customerID as output) • usp_CustomerUpdate: Update records in the Customers table • usp_CustomerSelectByX: […]

Categories
Mastering Development

Converting javascript chained setter to typescript

I’ve been using this idiom in javascript to create chained setters. function bar() { let p = 0; function f() { } f.prop = function(d) { return !arguments.length ? p : (p = d, f); } return f; } This allows me to do an easy creation and setting as const b = bar().prop(2), having […]