This file contains 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 ro.florinm.simplepianokeyboard; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.os.Handler; | |
import android.os.Message; | |
import android.support.v4.view.MotionEventCompat; |
This file contains 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
@Override | |
protected void onDraw(Canvas canvas) { | |
for (int i=0; i < GlobalVars.getInstance().WHITE_COUNT; i++) { | |
canvas.drawRect(whites.get(i).rect, i == 23 ? downKeyColor : whiteKeyColor); | |
canvas.drawLine(whites.get(i).rect.left, top_pad, whites.get(i).rect.left, height, blackLineColor); | |
} | |
canvas.drawLine(0, top_pad, width, top_pad, blackLineColor); | |
canvas.drawLine(0, height, width, height, blackLineColor); | |
for (Key k : blacks) { |
This file contains 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
123 | |
aa | |
aaaa | |
aaaaaaa | |
bbbb | |
cc | |
ccccc | |
cccccclast | |
dddd | |
djgfk |
This file contains 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
sed -n "/aa/,/cc/p" test.txt |
This file contains 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
start="aa" | |
end="cc" | |
end=$(grep "$end" text.txt | tail -1) | |
sed -n "/$start/,/$end/p" test.txt |
This file contains 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 ro.florinm.simplepianokeyboard; | |
import android.content.Context; | |
import android.media.AudioAttributes; | |
import android.media.MediaPlayer; | |
import android.media.SoundPool; | |
import android.util.SparseArray; | |
public class AudioSoundPlayer { |
This file contains 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
{ | |
"q1":{"q":"2 to the 10th?", "a":"1024"}, | |
"q2":{"q":"Value of PI?", "a":"3.14"} | |
} |
This file contains 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
[easyfc title="General knowledge" file="flashcards/general_k.txt"/] |
This file contains 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
<TextView | |
android:id="@+id/test_text" | |
style="?attr/TextViewStyle" | |
android:layout_width="0dp" | |
android:layout_height="200dp" | |
android:layout_marginStart="5dp" | |
android:layout_marginTop="10dp" | |
android:layout_marginEnd="5dp" | |
android:layout_marginBottom="200dp" | |
android:background="#504C4C" |
This file contains 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
TextView tv = findViewById(R.id.test_text); | |
tv.setMovementMethod(new ScrollingMovementMethod()); |
OlderNewer