Recent Posts

Binary Search For Duplicate Data

GOAL

The goal of this article it to describe an algorithm to find first target item or last target item from sorted list with duplication using binary search and how to implement them in C++.

What is binary search?

Binary search is one of the search algorithms, that finds position or judges existence of an target value on sorted array.

Binary search compares the current value defined as a half of target range of the array to the target value. Binary search compares the middle element of current target range in the array to the target value. The current target range is narrowed according to the result of comparison as below.

What if there are same values in the array?

If there are same values, the found element can be first one, last one or other. How can we change this algorithm to search for the smallest or largest element?

Find first index

If the value currently focused is equal to the target value, the current value is contained to the next range as a max value. End the process when min index equal to max index, then check if the min value is equal to the target value.

(more…)

[Trouble Shooting] Human Fall Flat Workshop in Unity

An error “ArgumentException: Input Axis Joystick Look Horizontal is not setup.” occurred when Play button clicked.

Some people have the similar problem as I have.
ArgumentException: Input Axis Joystick Look Horizontal is not setup.
Error: Input Axis Not Set Up

It’s easy to solve. Put “<SteamLibrary>\steamapps\common\Human Fall Flat\WorkshopPackage\ProjectSettings” into <UnityProjects>\<Project directory>.

The following is the detail of this problem.

Problem

I followed the guide to start creating workshop of Human Fall Flat in Unity. When I start “Play” mode, I couldn’t control the Human and he was twisted!!

The following is the detail of the error.

ArgumentException: Input Axis Joystick Look Horizontal is not setup.
 To change the input settings use: Edit -> Project Settings -> Input
HumanControls.get_calc_joyLook ()
HumanControls.ReadInput (System.Single& walkForward, System.Single& walkRight, System.Single& cameraPitch, System.Single& cameraYaw, System.Single& leftExtend, System.Single& rightExtend, System.Boolean& jump, System.Boolean& playDead, System.Boolean& shooting)
Multiplayer.NetPlayer.PreFixedUpdate ()
Multiplayer.NetGame.PreFixedUpdate ()
Multiplayer.NetGamePre.FixedUpdate ()

Cause

“Input Axis <NAME> is not setup.” means that the input axis named “NAME” is not defined in Input Manager. Click “Edit” > “Project Settings” > “Input” and check the list of input axis. There is no axis named “Joystick Look Horizontal”.

The project settings, including the “Input Axis”, are defined in the “ProjectSettings” directory in steamapps. Therefore, you need to place this ProjectSettings directory in your own project directory. In my case, I placed a wrong one.

Solution

Close unity project. And put the “ProjectSettings” into the project directory.

Result

You can control the character with no error.

Error “Docker.ApiServices.WSL2.WslKernelUpdateNotInstalledException”

This is a trouble shooting log.

Problem

I downloaded the installer of Docker-Desktop from download page here. And executed the installer and start Docker. Then the error was displayed after starting Docker-Desktop.

Cause

Let’s see the window behind the exception window by Microsoft .NET Framework.

The WSL 2 Linux kernel is now installed using a separate MSI update package.
Please click the link and follow the instructions to install the kernel update:
http://aka.ms/wsl2kernel.

Press Restart after installing the Linux kernel.

That’s the cause of the error. We should install “WSL 2” by ourselves now.

Solution

Install WSL 2 Linux kernel whose installer is in http://aka.ms/wsl2kernel.

from wsl_update_x64.msi

After installing WSL 2, restart the Docker-Desktop.

The window displayed when started successfully

Categories

AfterEffects Algorithm Artificial Intelligence Blender C++ Computer Graphics Computer Science Daily Life DataAnalytics Event Game ImageProcessing JavaScript Kotlin mathematics Maya PHP Python SoftwareEngineering Tips Today's paper Tools TroubleShooting Unity Visual Sudio Web Windows WordPress 未分類