Logofail, a vulnerability in the loading of vendor logo image files from BIOS bypasses secure boot measures from all major BIOS vendors.
More info...>>>ITwacht<<<
Logofail, a vulnerability in the loading of vendor logo image files from BIOS bypasses secure boot measures from all major BIOS vendors.
More info...A study in Nature Human Behaviour shows that people are more likely to pick negative news articles to read:
Among others, popular OpenSSL and GnuTLS implementations are vulnerable.
The authors recommend to stop using RSA PKCS#1 v1.5 and switch to Elliptic curve Diffie-Hellman.
I have a program on my new Windows 11 machine, for which I'd like to add the .exe to my start menu.
When I use the right click menu on the .exe to do this, nothing happens.
Here's how I solved the problem:
Moshi is a library for marshalling/unmarshalling JSON. The Moshi API is very similar to the API of its predecessor Gson. Just like Gson, Moshi does not have support for LocalDate(Time) processing. This is the recommended Java Date/Time representation, so Moshi does not work out of the box for Java, and that's a shame.
Here's how you can solve this, for LocalDateTime. The procedure for LocalDate is similar.
public class LocalDateTimeAdapter {
// Specify in which format you want your DateTime
private final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
@ToJson
public String toText(LocalDateTime dateTime) {
return dateTime.format(formatter);
}
@FromJson
public LocalDateTime fromText(String text) {
return LocalDateTime.parse(text, formatter);
}
}
Moshi moshi = new Moshi.Builder()
.add(new LocalDateTimeAdapter())
.build();
// That's all!
// Now just parse (or serialise) your data as normal
// Here serialising a Ticket object
JsonAdapter<Ticket> jsonAdapter = moshi.adapter( Ticket.class);
System.out.println(jsonAdapter.indent(" ").toJson(ticket));
dependencies {
implementation("com.squareup.moshi:moshi:1.15.0")
implementation("com.squareup.moshi:moshi-adapters:1.15.0")
//...
}
In the adapter I'm converting LocalDateTime to/from Date and then use the Moshi adapter to convert the Date to/from JSON.
//...
// Do NOT import this from com.squareup.moshi.Rfc3339DateJsonAdapter, that one's deprecated
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter;
public class DelegatingLocalDateTimeAdapter {
// adding .nullSafe() to the adapter allows it to write null dates in json rather than skipping them
private static final JsonAdapter<Date> ADAPTER = new Rfc3339DateJsonAdapter().nullSafe();
@ToJson
public String toJson(LocalDateTime timestamp) {
return ADAPTER.toJson(Date.from(timestamp.atZone(ZoneId.systemDefault()).toInstant()));
}
@FromJson
public LocalDateTime fromJson(String json) throws IOException {
return LocalDateTime.ofInstant( ADAPTER.fromJson(json).toInstant(), ZoneId.systemDefault());
}
}
Moshi moshi = new Moshi.Builder()
.add(new DelegatingLocalDateTimeAdapter())
.build();
// That's all!
// Now just parse (or serialise) your data as normal
// Here serialising a Ticket object
JsonAdapter<Ticket> jsonAdapter = moshi.adapter( Ticket.class);
System.out.println(jsonAdapter.indent(" ").toJson(ticket));
Powershell command to get parent processes of all processes with a given name (javaw.exe):
Get-CimInstance Win32_Process -Filter "Name = 'javaw.exe'" | select ParentProcessId
Or in a script. TYhis one takes the process name as a parameter and also shows the , this time with the parent process name:
$targetProcessName = $args[0]
$targetProcessName = $args[0]
$targetProcesses = Get-CimInstance -ClassName Win32_Process -Filter "Name = '$targetProcessName'"
foreach ($process in $targetProcesses) {
$parentProcessId = $process.ParentProcessId
$parentProcess = Get-CimInstance -ClassName Win32_Process -Filter "ProcessId = $parentProcessId"
Write-Output "Process: $($process.processId) $($process.Name), Parent Process: $($ParentProcessId) $($parentProcess.Name)"
}
Some highlights:
With the upcoming new LTS (Long Term Support) release of Java, Java 21, quite some preview features of earlier releases are finally completed. These are the most important goodies we get withe the new LTS release:
Umlet 15.1 now generates UML class diagrams from code.
You can give it a file or directory and will generate class elements in a grid like diagram with no relations.
The generation stops if Umlet encounters an enum, which is a bit of a bummer, but still this can give your a nice headstart if you already have some code.
This release is (maybe even more importantly) also reported to solve a nasty bug that crashed Umlet 15.0 on some actions.