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
| public class RequestJSONTask extends AsyncTask<String, Void, String> { | |
| private Exception exception; | |
| protected String doInBackground(String... urls) { | |
| String jsonResponse; | |
| try { | |
| URL url = new URL(parseUrl(urls[0])); | |
| InputStream in = url.openStream(); | |
| InputStreamReader inputStreamReader = new InputStreamReader(in); |
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
| public List<Comment> obtainList(String jsonResponse) { | |
| List<Comment> commentList = new ArrayList<>(); | |
| try { | |
| JSONArray jsonArray = new JSONArray(jsonResponse); | |
| for (int i = 0; i < jsonArray.length(); i++) { | |
| JSONObject jsonObject = jsonArray.getJSONObject(i); | |
| Comment comment = new Comment(); | |
| comment.setId(jsonObject.get("pk").toString()); |
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
| <uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
| <uses-permission android:name="android.permission.READ_PROFILE" /> | |
| <uses-permission android:name="android.permission.READ_CONTACTS" /> | |
| <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |
| <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> | |
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
| <uses-permission android:name="android.permission.INTERNET" /> |
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
| Tao of Programming | |
| by Geoffrey James | |
| Book 1: The Silent Void | |
| Thus spake the Master Programmer: | |
| "When you have learned to snatch the error code from the trap frame, it will be time for you to leave." | |
| 1.1 |
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
| Teach Yourself Programming in Ten Years | |
| Peter Norvig | |
| Why is everyone in such a rush? | |
| Walk into any bookstore, and you'll see how to Teach Yourself Java in 24 Hours alongside endless variations offering to teach C, SQL, Ruby, Algorithms, and so on in a few days or hours. The Amazon advanced search for [title: teach, yourself, hours, since: 2000 and found 512 such books. Of the top ten, nine are programming books (the other is about bookkeeping). Similar results come from replacing "teach yourself" with "learn" or "hours" with "days." | |
| The conclusion is that either people are in a big rush to learn about programming, or that programming is somehow fabulously easier to learn than anything else. Felleisen et al. give a nod to this trend in their book How to Design Programs, when they say "Bad programming is easy. Idiots can learn it in 21 days, even if they are dummies." The Abtruse Goose comic also had their take. | |
| Let's analyze what a title like Teach Yourself C++ in 24 Hours could mean: |
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
| How To Become A Hacker | |
| Eric Steven Raymond | |
| Table of Contents | |
| Why This Document? | |
| What Is a Hacker? | |
| The Hacker Attitude | |
| 1. The world is full of fascinating problems waiting to be solved. |
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
| listPositiveWords = []; | |
| listNegativeWords = []; | |
| function getAllPageWords() { | |
| var dictWords = {}; | |
| var text = ""; | |
| $.each($("p"), function(key, value) { | |
| var listWords = $(value).text().split(" "); | |
| $.each(listWords, function(key, value){ | |
| word = value.toLowerCase() |
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
| no | |
| odio | |
| arrepentida | |
| arrepentido | |
| enoja | |
| sufrir | |
| sufrió | |
| sufrirá | |
| sufre | |
| mal |
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
| basics = { | |
| one: function() { | |
| return 1; | |
| }, | |
| zero: function() { | |
| return 0; | |
| }, | |
| findElementByTag: function(name) { | |
| return document.getElementsByTagName(name); | |
| }, |
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
| I can change it => Watashi wa sore o henkō suru koto ga dekimasu => 私はそれを変更することができます | |
| I can do it => Dekimasu => できます | |
| What are you doing? => Nanishiteruno? => 何してるの? | |
| How are you? => Ogenkidesuka? => お元気ですか? | |
| Are you ok? => Daijōbudesuka? => 大丈夫ですか? | |
| I am eating an apple => Watashi wa ringo o tabete imasu => 私はリンゴを食べています | |
| I am playing video games => Watashi wa bideogēmu o purei shite imasu => 私はビデオゲームをプレイしています |