This file contains hidden or 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
| ## Install PHP 7 | |
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:ondrej/php-7.0 | |
| sudo apt-get update | |
| sudo apt-get install -y php7.0 | |
| ## Install Apache2 | |
| sudo add-apt-repository ppa:ondrej/apache2 | |
| sudo apt-get update | |
| sudo apt-get install apache2 |
This file contains hidden or 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
| sudo fallocate -l 4G /swapfile | |
| sudo chmod 600 /swapfile | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| sudo swapon -s |
This file contains hidden or 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
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:ondrej/php-7.0 | |
| sudo apt-get update | |
| sudo apt-get install -y php7.0 |
This file contains hidden or 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
| private ArrayList<Keyword> items = new ArrayList<Keyword>(); | |
| private void DelItems(ArrayList<String> delid){ | |
| Iterator<Keyword> iter = items.iterator(); | |
| while (iter.hasNext()) { | |
| if (delid.contains(((Keyword)iter.next()).id)) { | |
| iter.remove(); | |
| } | |
| } | |
| } |
This file contains hidden or 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
| private void logout(){ | |
| SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); | |
| Editor editor = pref.edit(); | |
| editor.clear(); | |
| editor.commit(); | |
| } | |
| private void storeSomthing(){ | |
| SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); | |
| Editor editor = pref.edit(); |
This file contains hidden or 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
| private void someConfirm(){ | |
| new AlertDialog.Builder(new ContextThemeWrapper(getContext(), android.R.style.Theme_Material_Dialog_Alert)) | |
| .setMessage("정말로?") | |
| .setNegativeButton("Yes", new DialogInterface.OnClickListener() { | |
| public void onClick(DialogInterface arg0, int arg1) { | |
| //TODO~ | |
| } | |
| }) | |
| .setPositiveButton("No", new DialogInterface.OnClickListener() { | |
| public void onClick(DialogInterface arg0, int arg1) { |
This file contains hidden or 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
| //선택된 이미지를 크롭 | |
| private void makeCrop(Uri picUri){ | |
| Intent pickImageIntent = new Intent("com.android.camera.action.CROP"); | |
| pickImageIntent.setDataAndType(picUri, "image/*"); | |
| pickImageIntent.putExtra("crop", "true"); | |
| pickImageIntent.putExtra("outputX", 200); | |
| pickImageIntent.putExtra("outputY", 200); | |
| pickImageIntent.putExtra("aspectX", 1); | |
| pickImageIntent.putExtra("aspectY", 1); | |
| pickImageIntent.putExtra("scale", true); |