Linux - Disk is Read Only. Windows 10 Dual Boot as a culprit
by GarciaPL on Thursday 12 November 2020
If you would like to figure out week number in the month of your business date by using JodaTime in Java, please check below code snippet
Examples
- Week number in the month for business date of 2020-10-07 is 2
- Week number in the month for business date of 2020-10-21 is 4
LocalDate firstDayOfTheMonth = businessDate.dayOfMonth().withMinimumValue(); int weekOfMonth = Weeks.weeksBetween(firstDayOfTheMonth, businessDate.dayOfWeek().withMaximumValue().plusDays(1)).getWeeks();
New platform with IntelliJ Live Templates has been released! You can find it here IntelliJ Live Templates
CREATE TABLE MY_TABLE (
ID NUMERIC(19,0) NOT NULL,
STATUS NVARCHAR2(20) NOT NULL CHECK (STATUS IN ('OPEN', 'CLOSED'));
);
ALTER TABLE MY_TABLE ADD CONSTRAINT STATUS_VALIDATION CHECK (STATUS IN ('OPEN', 'CLOSED'));
Link to a ticket - https://youtrack.jetbrains.com/issue/DBE-10549
If constraint on column STATUS was created without a name during creating a table, Oracle will assign a random name for it. Unfortunately, we cannot modify the constraint directly.
Steps involved of dropping unnamed constraint linked to column STATUS
- Duplicate STATUS field into a new field STATUS2
- Define CHECK constraints on STATUS2
- Migrate data from STATUS into STATUS2
- Drop STATUS column
- Rename STATUS2 to STATUS
ALTER TABLE MY_TABLE ADD STATUS2 NVARCHAR2(10) DEFAULT 'OPEN'; ALTER TABLE MY_TABLE ADD CONSTRAINT MY_TABLE_CHECK_STATUS CHECK (STATUS2 IN ('OPEN', 'CLOSED')); UPDATE MY_TABLE SET STATUS2 = STATUS; ALTER TABLE MY_TABLE DROP COLUMN STATUS; ALTER TABLE MY_TABLE RENAME COLUMN STATUS2 TO STATUS;
I have installed Anaconda recently on my Windows 10 at work. I have been playing with it for a while, but then I have decided to uninstall it. Without restarting my computer, after a few days, I have decided to install Anaconda once again as I have found that I need it at the end.
I was astonished that after starting Power Shell or Cmder which emulates terminal as well, I was started getting an error listed below. It was very annoying as somehow some features like Scoop [1] and even Maven stopped working!
The system cannot find the path specified
Unfortunately, Windows 10 was not able to tell me which path he struggles with at this point. I started digging in the web to find out that the main reason for whole fuss was Anaconda which supposes to be deleted completely after the restart of PC which did not happen obviously.
Solution
Go to HKCU\Software\Microsoft\Command Processor\AutoRun
using Register Editor and clear found value. I presume that whatever you are going to find might be related to Anaconda as it was so in my case.
[1] Scoop - https://scoop.sh