This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"user_name" : "", | |
"report_instigator" : "launcher", | |
"stack_frames" : [ "Exception: java.lang.NullPointerException: \"null\"", " at com.vizor.unreal.controllers.settings.GamesSettingsTab.createDefaultInstallDirectory(GamesSettingsTab.java:88)", " at com.vizor.unreal.controllers.settings.GamesSettingsTab.refresh(GamesSettingsTab.java:66)", " at com.vizor.unreal.controllers.SettingsController.lambda$onSelectGameSettings$5(SettingsController.java:76)", " at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)", " at java.security.AccessController.doPrivileged(AccessController.java:<unknown source>)", " at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)", " at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)" ], | |
"system_params" : { | |
"runtime.ram.free" : 307598432, | |
"runtime.ram.max" : 7635730432, | |
"runtime.ram.total" : 398983168, | |
"machine.cpu.count" : 4, | |
"machine.ram.total" : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vizor.unreal.util.os; | |
import com.sun.management.OperatingSystemMXBean; | |
import java.lang.management.ManagementFactory; | |
import java.lang.management.RuntimeMXBean; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import static com.vizor.unreal.util.StringUtils.humanReadableByteCount; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Version tryParse(final String string) | |
{ | |
if (nonNull(string)) | |
{ | |
final int[] versionItems = new int[segmentsCount]; | |
final String[] split = string.split("\\."); | |
// Rescue 'x.y.z.w...' - like strings. | |
if (split.length > versionItems.length) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vizor.unreal.util; | |
import java.lang.reflect.Field; | |
import java.nio.file.Path; | |
import java.util.Collections; | |
import java.util.Set; | |
import java.util.stream.Stream; | |
import static java.util.stream.Collectors.toSet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Matrix4f Rotation(Vec3f rotation) | |
{ | |
float x = (float)Math.toRadians(rotation.getX()); | |
float y = (float)Math.toRadians(rotation.getY()); | |
float z = (float)Math.toRadians(rotation.getZ()); | |
float sinX = (float)Math.sin(x); | |
float sinY = (float)Math.sin(y); | |
float sinZ = (float)Math.sin(z); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vizor.unreal.util; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.reflect.Method; | |
@SuppressWarnings("unused") | |
public class Bits | |
{ | |
private static MethodHandle getMethodHandle(Class<?> clazz, String methodName, Class<?>... argClasses) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Objects; | |
import java.util.Queue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <queue> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
#include <iostream> | |
template <typename T> | |
class ConcurrentQueue | |
{ | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FVariant FVarHandle::GetVariant() | |
{ | |
// Holds the serialized value. | |
TArray<uint8> LocalValue; | |
// Write bytes to memory. | |
FMemoryWriter Writer(LocalValue, true); | |
Writer.Serialize(MemoryAddress, Property->GetSize()); | |
FVariant Variant(LocalValue); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates the similarity (a number within 0 and 1) between two strings. | |
* | |
* Example implementation of the Levenshtein Edit Distance | |
* See http://r...content-available-to-author-only...e.org/wiki/Levenshtein_distance#Java | |
*/ | |
float GetSimilarity(const std::string& First, const std::string& Second) | |
{ | |
std::string Shorter = (First.length() > Second.length()) ? Second : First; | |
std::string Longer = (First.length() > Second.length()) ? First : Second; |