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
public void onClick(View v) { | |
if (v.getId() == R.id.Button01) { // if you pressed the 'Button01' | |
finish(); // finish this Activity | |
} | |
} |
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 com.example.lockscreen; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
import android.view.Window; | |
import android.view.WindowManager; | |
import android.widget.Button; | |
import android.widget.Toast; |
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 com.example.userinput; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.KeyEvent; | |
import android.view.MotionEvent; | |
public class UserInputActivity extends Activity { |
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
Intent intent = new Intent(Intent.ACTION_PICK); | |
intent.setType("image/*"); | |
intent.setData(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); | |
startActivityForResult(intent, 0); |
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
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); |
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
@ECHO ON | |
REM install choco | |
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
REM utility | |
choco install chocolatey-core.extension -y | |
choco install 7zip -y | |
choco install sysinternals -y | |
choco install procexp -y |
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
# Simple environment setup script | |
# Install Applications | |
choco install fiddler4 | |
choco install notepadplusplus | |
choco install visualstudiocode | |
choco install greenshot | |
choco install GoogleChrome | |
choco install putty | |
choco install ccleaner |
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
#!/bin/sh | |
SL=/etc/apt/sources.list | |
cp ${SL} ${SL}.org | |
## | |
sed -e 's/\(us.\)\?archive.ubuntu.com/ftp.daumkakao.com/g' -e 's/security.ubuntu.com/ftp.daumkakao.com/g' < ${SL}.org > ${SL} | |
## check |
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
import os | |
def rename_movie_file(path, check_str): | |
for filename in os.listdir(path): | |
file_name, file_ext = os.path.splitext(filename) | |
file_ext = file_ext.lower() | |
if file_ext == '.md': | |
if check_str in filename: | |
file_name = file_name.replace(check_str, "") | |
rename_filename = file_name + file_ext |
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
import re # 정규식(Regular Expression) | |
str = '2019-04-19 오후 1:50:39' # 2019-04-19 1:50:39 PM 로 바꾸고 싶다. dateutil.parser.parse()를 사용하기 위해서 | |
list = re.split('오후 ', str) # '오후 '를 str에서 찾아서 둘로 쪼개어 각각을 list에 넣는다. 오후 다음에 Space가 있음에 유의 | |
print(list) | |
newstr = list[0] + list[1] + ' PM' | |
print(newstr) |
OlderNewer