Skip to content

Instantly share code, notes, and snippets.

View 64lines's full-sized avatar

Julian Alexander Murillo 64lines

  • Universidad Politécnica de Cartagena
  • Cartagena, Murcia - Spain
View GitHub Profile
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);
@64lines
64lines / JSONParsing.java
Last active August 5, 2016 04:55
Get JSON Data to put it into an Object
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());
@64lines
64lines / InternetManifest.xml
Last active August 5, 2016 04:53
Several Android Permissions (Access Internet, Writing to an External Storage, Change Wi-Fi State, Read Contacts, Read Profile, Get user Accounts)
<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" />
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
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:
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.
@64lines
64lines / SentimentAnalysisPageWords.js
Last active July 7, 2016 18:28
[JAVASCRIPT] Sentiment Analysis with current web page words.
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()
@64lines
64lines / negative_words_spanish.txt
Last active August 5, 2016 04:39
Negative Spanish Words for Sentiment Analysis
no
odio
arrepentida
arrepentido
enoja
sufrir
sufrió
sufrirá
sufre
mal
@64lines
64lines / GetHtmlElements.js
Last active October 7, 2016 01:23
[JAVASCRIPT] - Get Html Elements in "pure" functional programming
basics = {
one: function() {
return 1;
},
zero: function() {
return 0;
},
findElementByTag: function(name) {
return document.getElementsByTagName(name);
},
@64lines
64lines / Japanese.txt
Last active August 2, 2016 21:48
Japanese Dictionary of Expressions and Modisms in Japanese Language with Romanji equivalent.
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 => 私はビデオゲームをプレイしています