Skip to main content

Posts

Showing posts from December, 2019

Tròn 4 con mắt

お酒納め

Cuối năm ăn lẩu cua

アンちゃんかわいい

Mini Heniken x Sushi

はやたろうの忘年会

Bình thường chém gió với mấy ông này đã vui, giờ được đi uống chung nữa thì phải gọi là vui vl

終バスはない

Roommate dẫn bồ về không đáng sợ

Ăn uống xong không chịu rửa bát đĩa làm thằng kia toàn phải về rửa cho. Còn mình thì ko có chỗ rửa bát :v

Vừa bước lên xe bus thì cậu cấp 3 nhường ghế cho

美味しかった

Nước bọt có vị gì vậy? from 2017

Cuối năm lên lab thì làm gì

Git và Github cơ bản

Git là cái gì ?   Để trả lời câu hỏi Git là cái gì thì trước hết chúng ta cùng tìm hiểu về Source Control/Version Control là cái gì ? Hệ thông giúp lưu trữ mọi thay đổi của source code Hỗ trợ nhiều người làm việc cùng lúc Tìm sực thay đổi code Revert các thay đổi, đưa code về version cũ hơn, không lo mất code   Sau khi hiểu về Source Control/Version Control thì mình giới thiệu về Git Ra đời năm 2005 Tác giả là Linus Torvald, hỗ trợ viết Linux kernel  Toàn bộ code và history được lưu trữ trên máy người dùng Có 3 khái niệm quan trọng nhất là repo, commit, branch Tải và cài đặt Git MacOS: https://git-scm.com/download/mac  Window: https://git-scm.com/download/win  Linux: https://git-scm.com/download/linux GitHub là cái gì ? Dịch vụ lưu trữ Git Repository lớn nhất thế giới Cho phép code chung với mọi người trên thế giới Các lệnh cơ bản git init Tạo ra 1 Repository git clone Lấy Code từ trên mạng về git pull Đồng bộ từ trên mạng về máy git add Thêm f

杉浦研の忘年会

Cuối năm đi làm không có mống khách nào

Chủ nhật ngày trước và bây giờ

Đi làm còn được nghe nhạc miễn phí

Code error in game Oceanhorn 2

Learn Python #4 Variables & Data Types

  This tutorial, I want to talk to you about using variables in Python. Now in Python you are going to be dealing with a lot of data. So a lot of times in our program we are going to be working with all types of information and data and values. Sometime that data can be difficult to manage. So in Python we have this thing called a variable. And it's basically just a container where we can store certain data values. When we use a variable when we put those data values inside containers and make it a lot easier for us to work with and manage all of different data inside of our programs. So variables are extremely helpful and it's sort of like a core topic in Python that you're really going to want to know and master. So in this tutorial I will show you everything you need to know to get started with variables. We're going to look at what they are? Why they are useful and we'll look at the different types of variables and the different of data that we can store inside

AndroidのAudioRecordの基本を理解する

 Androidで音声処理をするために、AudioRecordクラスを利用しました。これがいくつかの日本語ページを参照しましたが、どうも仕様に曖昧な部分が多かった。。。  そもそも音声処理の基本知識がないと理解しづらいのもあると思いますが、positionNotificationPeriodとかnotificationMarkerPositionなどの何が違うのかよくわからないAPIも多いです。ということで、公式ドキュメント及びローカルテストで順調した仕様をメモ(コメント付きのコード)に残します。 ・Android API:27 (Anroid 8.1 Oreo) ・Kotlin import android.media.AudioRecord import android.media.MediaRecorder import android.util.Log import kotlin.math.max /** * AudioRecord クラスのサンプルコード */ class AudioRecordSample { // サンプリングレート (Hz) // 全デバイスサポート保障は44100のみ private val samplingRate = 44100 // フレームレート (fps) // 1秒間に何回音声データを処理したいか // 各自好きに決める private val frameRate = 10 // 1フレームの音声データ(=Short値)の数 private val oneFrameDataCount = samplingRate / frameRate // 1フレームの音声データのバイト数 (byte) // Byte = 8 bit, Short = 16 bit なので, Shortの倍になる private val oneFrameSizeInByte = oneFrameDataCount * 2 // 音声データのバッファサイズ (byte) // 要件1:oneFrameSizeInByte より大きくする必要がある /

Chắc Indo biết bài thần chú của VN rồi nên không dám tạt nữa

Learn Python #3 Drawing a Shape

  In this tutorial I want to say to you about a basic python program. So we are going to write it as a very simple python program. We are going to look at how we can go ahead and write up program we are going to talk about. How our program are getting executed by python. And we are going to draw out a little shape onto the screen. This is going to be pretty cool. I am excited to talk you guys about just the very basics of python and really just sort of give you an introduction.   So we can actually print something out onto the screen and python using something called a print statement. So I can just type out print ( " /|" ) print ( " / |" ) print ( " / |" ) print ( " / |" ) print ( " /____|" )  When we use this print statement were basically telling python like Just print something out onto the console. There is a lot of situations where we are gonna see what is going on in our code. We can use that print statement an

Learn Python #2 Hello World

  In this tutorial, we are going to create our first Python program and we are going to able to run it and see how everything works.   The first thing I want to do is open up Pycharm. So Pycharm was the IDE (Integrated Development Environment) that we download in the last tutorial. So you can change the appearance by click Configure then choose Preferences.   So click Create new project. And it give us New project window. So you can just name your project. And click Create. And this is going to go ahead and create new project. Click to your project's name that you create at the left side and select New -> Python File. The a small window appear. Just name your Python File.   This is just going to be a hello world programs. So we are just gonna print something out into the screen. So just write print ( "Hello World" ) So this is like a very basic Python program. It's just going to print out Hello World onto the screen. Then click to Run tab and choose Run.

Learn Python #1 Installing Python & PyCharm

  Python is one of the most popular programming languages in the world and is's by far one of the most sought after for jobs. It's such a powerful and the surgeon easy to use language. A lot of programming languages out there just aren't very beginner friendly there, lot of syntax there, a lot of like little things that if you get wrong the program will yell at you. Python is complete opposite of that.   First of all, we have to install Python in the computer and install a text editor that we can use to write ours Python programs in.   Let's download Python in  https://www.python.org/downloads/  then install it.  One of the most popular IDE for Python is called PyCharm. Let's download Community version at  https://www.jetbrains.com/pycharm/download/ . It's Free, open-sourse.

Fan của mì mỡ

Đừng có gáy sớm

Cắt tóc cạo râu xong nhìn trẻ ra 5 tuổi

Android Developer - audioRecord.read()の基本を理解する

 現在、卒業研究に関するテーマでAndroid Studioを使って、研究しています。それでaudioRecord.read()の使い方をいろいろ調べましたが、あまり結果が出なかったか曖昧な部分が多かったです。そのため、自分が理解できることをここで簡単にまとめます。   Androidで音声処理をするためにAudioRecordクラスを利用しました。録音するため、audioRecord.read()を使うことになります。それの基本の使い方を紹介したいと思います。    まず、録音を開始するため、audioRecorder.startRecording()から始まります。 その次、read(short[] audioData, int offsetInShorts, int sizeInShorts)により録音した音声がbuf配列に入ります。  このメソッドを呼び出したときに"buf"に格納されている値は何かというと、サンプルの配列です。各サンプルはチャンネルの配列です。各チャンネルは、求めたものに応じて、8ビットまたは16ビットの値を持ちます。データはスキップされず、常に固定サイズのフォーマットになります。  したがって、1チャンネルと8ビットを選択した場合、各バイトは1つのサウンドが聞こえます。16ビットを選択した場合、核サウンドは2バイト長です。2つのチャンネルを使用する場合は、サンプルごとにチャンネル1、チャンネル2の順に並べます。  私は使っている16ビットなので何もしゃべらないとき、buf配列に入った値は [96、0、101、-1、101、2、110、-1、-41、2、-80、0、-117、1、119、-1、………] になります。  個々の値は、要求された周波数でサンプリングされたときのサウンドデータの振幅です。実験した結果から、0、-1、2、…(奇数番)の値は入力した音声の振幅です。もう一つの数字は何か現時点でまだ理解できません。その数字は勝手に変動します。  あくまで基本です。 パフォーマンス等のより高度な見識が得られればまた記します。間違ったところを指摘お願いします。

研究が進んだ