Categories
Mastering Development

Sorting with a comparator in python

In python 3.x the use of comparators is deprecated. Instead python relies on a key function the assigns a key values to each element and uses those keys to sort. But this is a problem when there is a complicated way to determine whether one element should come before another. Example: A set of string […]

Categories
Mastering Development

Remove quotes from column name

Assume i have following table: create table t1( clid number, category varchar2(100) ); insert into t1 values(1, ‘A’); insert into t1 values(1, ‘B’); insert into t1 values(2, ‘A’); insert into t1 values(2, ‘C’); insert into t1 values(3, ‘A’); insert into t1 values(3, ‘B’); I need to pivot this table and count the number of times […]

Categories
Mastering Development

Why does my code enter into an infinite loop at the initial nested for loop on execution?

This code I am trying to right is for the Attribute parser question for the C++ program on Hackerrank. The code is not complete yet as I am passing into this dreadful infinite loop again and again as im not able to solve it. The code: struct tag{ char name[100]; char att[100][100]; char val[100][100]; }; […]

Categories
Mastering Development

Writing unit tests against PrintfFormat

I have 2 questions. 1. I have a type that I’m trying to understand by writing unit tests against it, however I can’t reason what to do with PrintfFormat type ValueFormat<‘p,’st,’rd,’rl,’t,’a> = { format: PrintfFormat<‘p,’st,’rd,’rl,’t> paramNames: (string list) option handler: ‘t -> ‘a } with static member inline construct (this: ValueFormat<_,_,_,_,_,_>) = let parser s […]

Categories
Mastering Development System & Network

systemd-gpt-auto-generator doesn’t mount EFI system partition

according to the documentation, the systemd-gpt-auto-generator should automatically find the EFI system partition and generate a mount unit to mount it on /efi. However this does not appear to work on my system, despite all the requirements being met. I have an NVMe drive, /dev/nvme0n1, the EFI system partition is /dev/nvme0n1p1, and I’m using systemd-boot […]

Categories
CMS Magento Mastering Development

All I Want To Do Is Install Magento2 and all I get are problems!!!!! It’s driving me mad!

honestly I’ve been driven mad by various online guides on how to install Magento2 on CentOS only to find there’s some certain version of PHP I need, or finding out that the web installer does not work – or even the CLI installer won’t work. After spending days trying to figure it all out, then […]

Categories
CMS Magento Mastering Development

All I Want To Do Is Install Magento2 and all I get are problems!!!!! It’s driving me mad!

honestly I’ve been driven mad by various online guides on how to install Magento2 on CentOS only to find there’s some certain version of PHP I need, or finding out that the web installer does not work – or even the CLI installer won’t work. After spending days trying to figure it all out, then […]

Categories
Mastering Development

Assuming initial position is (1, 1), find out if you can reach (x, y) by the following given rules at each step

You are given the coordinates (x,y). Initially, you are at (1,1) and are required to go to (x,y) using the following rule: If the current position is (a,b) then in the next move, you can move only to (a+b,b) or (a,a+b). Write a program to check if you can reach (x,y) using only the described […]

Categories
Ask Cooking & Recipes

These Five Easy Peasy Mahi-Mahi Recipes Will Give Your Brain A Boost

As a Pescatarian I’m still a picky eater. I mean do I really want to go for the Tilapia that eats poo and who knows what else… or Salmon with skin on it… and when I’m out to a restaurant you might witness me asking the waiter(ess), “Is the Salmon fishy?” Which in return my […]

Categories
Linux Mastering Development Ubuntu

How can I mass-link files?

I have hundreds of folders, in quantities from one to a couple dozen in each of twenty or more parent folders, each uniquely named (across my entire system) in a way that will cause them all to correctly sort in date order. They’re arranged like this: . ├── ASA Specs ├── Camera Making ├── Camera […]