How to fix AnimationEvent ‘Hit’ on animation ‘Attack1’ has no receiver! in Unity

2020/09/20   -Unity

Overview When we got free Animation at Unity Asset Store and used it with SimpleAnimation, I encountered following error. AnimationEvent ‘Hit’ on animation ‘Attack1’ has no receiver! Are you missing a component? To come to the point, the error could be fixed by deleting Animation Event from the Inspector. The following shows how to fix it step by step. Environments Windows10Unity 2020.1.f1 When error happened We used two packages, Robot Kyle from the Unity Technologies and WARRIOR PACK BUNDLE 3 FREE Animation from Explosive to control Robot Kyle with attack animation. Robot Kyle https://assetstore.unity.com/packages/3d/characters/robots/space-robot-kyle-4696#reviews WARRIOR PACK BUNDLE 3 FREE Warrior …

【Python】From DataFrame To list type

2020/09/14   -Python

Overview Pandas can get data from a database with read_sql easily.Here we can show how to convert dataframe to list type for only one row from database. Example table in databse a,b,c are columns of this test_table. abc110100220200330300440400test_table Let’s get only “a” column from this table with pandas.These are sample code. import pandas as pd import psycopg2 connection = psycopg2.connect(host=’host’, dbname=’database’, user=’username’, password=’password’) df = pd.read_sql("SELECT a FROM test_table", connection) df.head() Result If you want to convert this result from dataframe to list type, you may think like [1, 2, 3, 4]. There is a simple method to convert dataframe …

【Python】Not getting all rows with BeautifulSoup

2020/09/09   -Python

Overview When Scraping with Beautiful Soup a problem occurred like not getting all rows of the table but a few of them. This example shows how to fix it Environment Python 3.7.3 Problem occurred example This is a example table you want to scrape. NumberName1Sato2Kato3Ito4Goto I saw the html code in a web browser by pushing F12 key. <table class="test_table"> <thead> <tr> <th>Number</th> <th>Name</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Sato</td> </tr> </tbody> <tbody> <tr> <td>2</td> <td>Kato</td> </tr> </tbody> <tbody> <tr> <td>3</td> <td>Ito</td> </tr> </tbody> <tbody> <tr> <td>4</td> <td>Goto</td> </tr> </tbody> </table> When I use the following code to scrape the …

【Unity】The way to fix error CS0619:’GUIText’ is obsolete:’GUIText has been removed. Use UI.Text instead.’

2020/09/06   -Unity

Overview There occured error CS0619:’GUIText’ is obsolete:’GUIText has been removed. Use UI.Text instead.’ to use Standard Assets. This article shows a way to fix it. Environment Unity 2019.4.3f1 Occurences Making C# script from Assets > Create > C# Script . Attaching the script to Sphere object by drag & drop, I get message ‘Can’t add script’ . This massage warns that the name of the script is different from its class name or there are some error of compiling. But I don’t find any error for compiling or the difference of the names. Now, finding these GUIText error in console …

【Unity】Object starts to chase the player approaching

2020/09/02   -Unity

Overview There is a sample the Cube Object starts to chase the player who goes in a certain area around it. Environment Unity 2020 1.1f1Windows10 Picture of implementation Step1 : Set the player Ethan from the Standard Assets can be used as a human object. Flowwing article explains how to set Ethan and move him. 【Unity】Standard Assetsでサクッと人間をキー操作する After place Ethan on Terrian, set the Tag in inspector “Player”. Adding rigidbody and capusule collider is needed. Step:2 Cube Object chasing player Next, Set 3D Object Cube. GameObject > 3D Object Cube Adding Character Controller and Sphere Collider to the Cube Object. …

Bulk insert to Oracle with Python

2020/07/04   -Oracle, Python
 ,

Overview There is an example code to insert data in bulk to Oracle database with python cx_Oracle Environments python 3.7.3Oracle 18c Express Edition Step1 : Creating the table Creating the table ‘oracle_insert’ in the schema ‘USER01’. CREATE TABLE USER01.ORACLE_INSERT( col1 int ,col2 int ,col3 int ) Step2 : Insert in bulk with executemany dataset is the dataset to be insertedMaking a connection to database with cx_OracleInserting in bulk with using cur.executemany() import cx_Oracle dataset =[ [1,2,3] ,[4,5,6] ,[7,8,9] ,[10,11,12] ,[13,14,15] ,[16,17,18] ,[19,20,21] ] HOST = ‘localhost’ PORT = ‘1521’ DB_NAME = ‘xepd1’ USER = ‘user01’ PASSWORD = ‘password01’ SERVICE_NAME = …

【Python】Transforming datetime to date and time with pandas dateframe

2020/07/01   -Python

Original Data This code is to make sample dataframe. import pandas as pd import datetime as dt df = pd.DataFrame([dt.datetime(2020,6,1,0,0,0),dt.datetime(2020,6,2,10,0,0),dt.datetime(2020,6,3,15,0,0)],columns=[‘datetimes’])     datetimes 0 2020-06-01 00:00:00 1 2020-06-02 10:00:00 2 2020-06-03 15:00:00 Transforming dataframe to date and time. It can realize to use lambda & apply functions like following. df[‘dates’] = df[‘datetimes’].apply(lambda x : dt.date(x.year,x.month,x.day)) df[‘times’] = df[‘datetimes’].apply(lambda x : dt.time(x.hour,x.minute,x.second))      datetimes      dates   times 0 2020-06-01 00:00:00 2020-06-01 00:00:00 1 2020-06-02 10:00:00 2020-06-02 10:00:00 2 2020-06-03 15:00:00 2020-06-03 15:00:00 If you want to get with string, these code is better. df[‘dates’] = df[‘datetimes’].apply(lambda x : x.strftime(‘%Y/%m/%d’)) df[‘times’] = df[‘datetimes’].apply(lambda x …

Python : Insert dataframe data into MySQL table 

2020/05/31   -Python
 

Overview Dataframe type in python is so useful to data processing and it’s possible to insert data as dataframe into MySQL . There is a sample of that. Environments Python 3.7.3MySQL 5.5.62 Step1 : Making the table Defining a table like the following. > CREATE DATABASE testdb; > CREATE TABLE testdb.mysql_table( col1 int ,col2 int ,col3 int ); Step2 : Making data Making data for insert from python. the data should be the same type as the table you will insert it. The column name of dataframe is also same as the table if they are different you will get …

Connection to PostgreSQL, Oracle&MySQL from Python

2020/05/21   -Python
 

Overview There are some samples to connect PostgreSQL, Oracle, MySQL from Python. How to connect PostgreSQL Package installation pip install psycopg2 Example import psycopg2 HOST = ‘your_host’ PORT = ‘5432’ DB_NAME = ‘your_db_name’ USER = ‘your_user_name’ PASSWORD = ‘your_password’ conn = psycopg2.connect("host=" + HOST + " port=" + PORT + " dbname=" + DB_NAME + " user=" + USER + " password=" + PASSWORD ) cur = conn.cursor() cur.execute("select version()") rows = cur.fetchall() cur.close() conn.close() print(rows) Connect to MySQL Package installation pip install mysqlclient Example import MySQLdb HOST = ‘your_host’ PORT = 3306 #Not str but int DB_NAME = ‘your_db_name’ …

Installation of MySql on ReadyNAS

2020/05/14   -ReadyNAS
 ,

Overview MySQL plugin for ReadyNAS is available if your NETGEATR NAS device is connected to online. The following shows how to install MySQL plugin and enable it. Environment ReadyNAS 6.10.3MySQL Server1.0.1 (plugin) Step1 : Install MySQL plugin At first let’s open ReadyNAS service from web browser. This page is refence to access it. NETGEAR ReadyNASの設定 After opening ReadyNAS home, select a Available Apps tab. When you input ‘mysql’ into the search box at left side , you can find MySQL server pugin and click install. Completed installation, then MySql Server shows at Installed Apps list. You may find ‘Launch’ button …

Language Switcher

Categories