Categories
Mastering Development

How to use a cut in prolog to find the number of daughters?

Exercise: Observe the family structure below where each person has a gender specification as their third parameter (m = male, f = female). Use a cut to write the predicate numDaughters(L, Count) in such a way that family(Husband, Wife, Kids), numDaughters([Husband, Wife|Kids],X) lists each family in the database and the number of daughters in each […]

Categories
Mastering Development

Do I need to escape special characters in application.properties?

I’ve special characters such as " (doublequotes), @, ~, !, %, &, }, ] in the datasource password field. When I run my springboot app and when it attempts to connect to the database I run into – com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer […]

Categories
Mastering Development System & Network

2010 to 2016 Public Folder Migration – Error: MigrationMRSPermanentException

Migrating 60gb of 2010 public folders to 2016 (on premise, 9 PF mailboxes). Mailboxes 2-9 show as "Synced" and mailbox 1 shows "Failed" with this error: Data migrated: 8.504 GB ‎(9,130,858,171 bytes)‎ Migration rate: 0 B ‎(0 bytes)‎ Error: MigrationMRSPermanentException: Error: Property expression "1234 Folder name" isn‎’t valid. Valid values are: Strings formed with characters […]

Categories
Mastering Development

Prolog – How to set timestamp as an argument in a predicate?

Is there any way to use get_time(T) [which is built-in function] as an argument when I assert new facts to DB? (I just want to compare between facts assertion time). Code: :- dynamic start/2. start_interval(A) :- start(A, _), !, false. start_interval(A) :- assert(start(A, get_time(T))). Run Example: Warning: c:/users/*****/desktop/prolog/4.pl:6: Warning: Singleton variables: [T] Welcome to SWI-Prolog […]

Categories
User Help

Pressing both shift keys together for correct output

I have a Dell Inspiron 15 which I use for work. At random intervals, the shift keys on the laptop will take turns to fail. It only happens for a few keys, namely "T, Y, {, }, !, @, #, $, &, *, (, )". When I hold both shift keys down at the same […]

Categories
User Help

Pressing both shift keys together for correct output

I have a Dell Inspiron 15 which I use for work. At random intervals, the shift keys on the laptop will take turns to fail. It only happens for a few keys, namely "T, Y, {, }, !, @, #, $, &, *, (, )". When I hold both shift keys down at the same […]

Categories
Mastering Development System & Network

Password policy requirements

Through Group Policy, one can setup a password policy, enforcing stricter passwords. There are two settings that contradict eachother, and I’m wondering which one has an effect over the other if both of them are enabled: Both policies are located here: Computer Configuration (Enabled) > Policies > Windows Settings > Security Settings > Account Policies/Password […]

Categories
Mastering Development

Is it possible to write an inconsistent Prolog program using only pure Prolog, cut and `false`?

This one tickled my interest in theory: Is it possible to write an inconsistent Prolog program, i.e. a program that answers both false and true depending on how it is queried, using only pure Prolog, the cut, and false? For example, one could query p(1) and the Prolog Processor would says false. But when one […]

Categories
Mastering Development

How to split a java string with a regex?

I am struggling a bit with splitting a string. Here is an example of an input and the correct output I want: Input: “Hope you’re doing well! I am doing ok. ” <— A few spaces after the period Output: [Hope, ” “, you’re, ” “, doing, well, “!” , ” “, “I”, ” “, […]

Categories
User Help

Pass variable to filename in Windows FOR / DO Batch File

I have the following code where I systematically go through and compress each file individually. I don’t care what the file name is, but I want it hidden more or less so will just call each file “file 1”, “file 2”, “file 3” etc. But how do I pass the variable fn=file!count! to the 7z.exe […]