18.5.13
libgfx Beginner Resources
Started out learning libgfx today. Here's some useful links to get you started.
26.4.13
Dota 2 Game decided in 8 minutes, Alliance vs Mouz - Game 2 (G-1 League - NA/EU Qualifier)
Flawless victory. I always loved NoTidehunter for their interesting and unconventional pick. Apart from Luna and SD, it was a pretty unconventional pick as opposed to Magnus, Rubick and Lifestealer. Axe in particular, is a crowd favorite, and I hope to see it more often in TI3.
[Spoiler Alert]
In game 2,The Alliance surprised their opponents with Axe and Dazzle as their last two picks, while the Germans opted for a more standard team centered on a tri-core of Magnus, Lifestealer and Weaver. The unorthodox play continued as
The Alliance proceeded to ninja a level 1 Roshan on the strength of Luna's Lunar Blessing and Shadow Wave.
With Aegis in hand, the Swedes followed up with an aggresive trilane ofLoda on Axe with Shadow Demon and Dazzle to creep-skip agaisnt the defensive trilane of
mouz. The potent Distruption into Shadow Wave combination helped Axe pick up first blood and
The Alliance completely shut down the Lifestealer, Rubick and Jaikiro, forcing untimely rotations of Naix into the jungle and his supports to the top lane.
The Swedes rolled off this early momentum, dominating all of their lanes and getting multiple pickoffs with a 9 minute Mekansm, Energy Booster and Tranquil Boots onLoda to assert control over the game, leading in both gold and experience throughout the entire match.
The Alliance eventually marched down bottom lane for their first set of barracks at 12 minutes and three minutes later, they proceeded to take both middle barracks with
mouz offering little resistance to either push, ending the game with a 19-0 hero score for
The Alliance.
http://www.dotacinema.com/news/g-1-qualifiers-the-alliance-vs-mousesports
[Spoiler ends]
Looking forward to their match against NaVi later!
http://www.reddit.com/r/DotA2/comments/1d4x3a/g1_league_winners_bracket_round_3_begins_in_3/
20.4.13
8-Bit Games
VIM Adventures
VIM Adventures is an online game based on VIM's keyboard shortcuts. It's the "Zelda meets text editing" game. So come have some fun and learn some VIM!
http://vim-adventures.com/
Mozilla's BrowserQuest
A MMORPG running on HTML 5.
Source code: https://github.com/mozilla/BrowserQuest
13.8.12
21.7.12
17.7.12
Rushing & Pushing for updates
Recently, people are getting more and more impatient. On the Android scene, developers are always pressured to deliver the latest software after announcements or preview were released. I mean, naturally its normal for the consumer to crave for new software updates. But I think it is getting ridiculous. Like a child throwing tantrum.
I've seen so many consumers demanding for their new software updates the moment it has been announced. WHERE IS MY ICS? WHERE IS CM10? WHERE IS JELLY BEAN? I think developers are at a dilemma here. Of course, they would want to perfect their software before rolling out the updates, squashing bugs and tweaking performance. However, they also can't afford to be known for always being outdated and slow in their updates. For example, HTC was known for their fast (and relatively painless) updates. Recently, Samsung is gaining reputation for quickly rolling out ICS to their devices. Motorola on the other hand, seems backwards and takes forever to deliver their software updates.
This put alot of pressure on the developers. I've seen so many app updates & software updates broken and riddle with bugs. Both are on the losing end. Consumer gets broken product, while developer gets their reputation tarnish.
Should we as consumers be more patient? Or is it our right to push the developers? CM10 seems to be coming out soon. We shall see how good their software will be. It's a battle of Speed vs Reliability.
I've seen so many consumers demanding for their new software updates the moment it has been announced. WHERE IS MY ICS? WHERE IS CM10? WHERE IS JELLY BEAN? I think developers are at a dilemma here. Of course, they would want to perfect their software before rolling out the updates, squashing bugs and tweaking performance. However, they also can't afford to be known for always being outdated and slow in their updates. For example, HTC was known for their fast (and relatively painless) updates. Recently, Samsung is gaining reputation for quickly rolling out ICS to their devices. Motorola on the other hand, seems backwards and takes forever to deliver their software updates.
This put alot of pressure on the developers. I've seen so many app updates & software updates broken and riddle with bugs. Both are on the losing end. Consumer gets broken product, while developer gets their reputation tarnish.
Should we as consumers be more patient? Or is it our right to push the developers? CM10 seems to be coming out soon. We shall see how good their software will be. It's a battle of Speed vs Reliability.
5.7.12
Thinking.. modules for next year
CS2105 Introduction to Computer Networks
CS2106 Introduction to Operating Systems
4MC / Examinable / 25% Lab
The module that I thought I would score very well due to my interest and confidence, but nope.Lecture – As I’ve said, LULLABY. Read the textbook. The fact that each slide on the lecture notes consists of 1 word (I’m not kidding) doesn’t help at all – and he covers things at a different order than the textbook. Might want to watch the webcast.
Tutorial – My tutor was the lecturer, so naturally it was rather sleep-inducing; but he’s very knowledgeable and you can ask him for any clarifications/doubts. Need to pay attention to tutorial as the nifty details are important
Lab – There is almost no way you can get the absolute correct answers – unless your friend is a computer science expert, he will not get the perfect answers. Sometimes the lab assistant might be nice and give you the answers
The examination was a killer for me, I wasn’t sure of most of my answers. Plus, the lecturer is teaching this module for the first time for my year.
My grade: A-
My rating: Hard
From http://xianyou.wordpress.com/2010/12/30/nus-module-review-ay1011-semester-1/
26.6.12
Replace Fragment
http://stackoverflow.com/questions/7723964/replace-fragment-inside-a-viewpager
http://pastebin.com/QqrUaVzk
http://pastebin.com/QqrUaVzk
23.6.12
Android Color Hex
screen_background_light #FFFFFFFF RGBA(255,255,255,1) screen_background_dark #FF000000 RGBA(0,0,0,1) status_bar_closed_default_background #FF000000 RGBA(0,0,0,1) status_bar_opened_default_background #FF000000 RGBA(0,0,0,1) search_bar_default_color #FF000000 RGBA(0,0,0,1) safe_mode_background #60000000 RGBA(0,0,0,0.38) screen_background_dark_transparent #80000000 RGBA(0,0,0,0.5) screen_background_light_transparent #80FFFFFF RGBA(255,255,255,0.5) safe_mode_text #80FFFFFF RGBA(255,255,255,0.5) white #FFFFFFFF RGBA(255,255,255,1) black #FF000000 RGBA(0,0,0,1) transparent #00000000 RGBA(0,0,0,0) background_dark #FF000000 RGBA(0,0,0,1) background_light #FFFFFFFF RGBA(255,255,255,1) bright_foreground_dark #FF000000 RGBA(0,0,0,1) bright_foreground_light #FFFFFFFF RGBA(255,255,255,1) bright_foreground_dark_disabled #80FFFFFF RGBA(255,255,255,0.5) bright_foreground_light_disabled #80000000 RGBA(0,0,0,0.5) bright_foreground_dark_inverse #FFFFFFFF RGBA(255,255,255,1) bright_foreground_light_inverse #FF000000 RGBA(0,0,0,1) dim_foreground_dark #BEBEBE RGBA(190,190,190,1) dim_foreground_dark_disabled #80BEBEBE RGBA(190,190,190,0.5) dim_foreground_dark_inverse #323232 RGBA(50,50,50,1) dim_foreground_dark_inverse_disabled #80323232 RGBA(50,50,50,0.5) hint_foreground_dark #808080 RGBA(128,128,128,1) dim_foreground_light #323232 RGBA(50,50,50,1) dim_foreground_light_disabled #80323232 RGBA(50,50,50,0.5) dim_foreground_light_inverse #BEBEBE RGBA(190,190,190,1) dim_foreground_light_inverse_disabled #80BEBEBE RGBA(190,190,190,0.5) hint_foreground_light #808080 RGBA(128,128,128,1) highlighted_text_dark #9983CC39 RGBA(131,204,57,0.6) highlighted_text_light #9983CC39 RGBA(131,204,57,0.6) link_text_dark #5C5CFF RGBA(92,92,255,1) link_text_light #0000EE RGBA(0,0,238,1) suggestion_highlight_text #177BBD RGBA(23,123,189,1) input_method_fullscreen_background #FFF9F9F9 RGBA(249,249,249,1) input_method_fullscreen_background_holo #80000000 RGBA(0,0,0,0.5) selected_day_background #FF0092F4 RGBA(0,146,244,1) lighter_gray #DDD RGBA(221,221,221,1) darker_gray #AAA RGBA(170,170,170,1) perms_dangerous_grp_color #33B5E5 RGBA(51,181,229,1) perms_dangerous_perm_color #33B5E5 RGBA(51,181,229,1) shadow #CC222222 RGBA(34,34,34,0.8) search_url_text_normal #7FA87F RGBA(127,168,127,1) search_url_text_selected #FF000000 RGBA(0,0,0,1) search_url_text_pressed #FF000000 RGBA(0,0,0,1) search_widget_corpus_item_background #DDD RGBA(221,221,221,1) sliding_tab_text_color_active #FF000000 RGBA(0,0,0,1) sliding_tab_text_color_shadow #FF000000 RGBA(0,0,0,1) keyguard_text_color_normal #FFFFFF RGBA(255,255,255,1) keyguard_text_color_unlock #A7D84C RGBA(167,216,76,1) keyguard_text_color_soundoff #FFFFFF RGBA(255,255,255,1) keyguard_text_color_soundon #E69310 RGBA(230,147,16,1) keyguard_text_color_decline #FE0A5A RGBA(254,10,90,1) lockscreen_clock_background #FFFFFFFF RGBA(255,255,255,1) lockscreen_clock_foreground #FFFFFFFF RGBA(255,255,255,1) lockscreen_clock_am_pm #FFFFFFFF RGBA(255,255,255,1) lockscreen_owner_info #FF9A9A9A RGBA(154,154,154,1) facelock_color_background #000000 RGBA(0,0,0,1) screen_background_holo_light #FFF3F3F3 RGBA(243,243,243,1) screen_background_holo_dark #FF000000 RGBA(0,0,0,1) background_holo_dark #FF000000 RGBA(0,0,0,1) background_holo_light #FFF3F3F3 RGBA(243,243,243,1) bright_foreground_holo_dark #FFF3F3F3 RGBA(243,243,243,1) bright_foreground_holo_light #FF000000 RGBA(0,0,0,1) bright_foreground_disabled_holo_dark #FF4C4C4C RGBA(76,76,76,1) bright_foreground_disabled_holo_light #FFB2B2B2 RGBA(178,178,178,1) bright_foreground_inverse_holo_dark #FF000000 RGBA(0,0,0,1) bright_foreground_inverse_holo_light #FF000000 RGBA(0,0,0,1) dim_foreground_holo_dark #BEBEBE RGBA(190,190,190,1) dim_foreground_disabled_holo_dark #80BEBEBE RGBA(190,190,190,0.5) dim_foreground_inverse_holo_dark #323232 RGBA(50,50,50,1) dim_foreground_inverse_disabled_holo_dark #80323232 RGBA(50,50,50,0.5) hint_foreground_holo_dark #808080 RGBA(128,128,128,1) dim_foreground_holo_light #323232 RGBA(50,50,50,1) dim_foreground_disabled_holo_light #80323232 RGBA(50,50,50,0.5) dim_foreground_inverse_holo_light #BEBEBE RGBA(190,190,190,1) dim_foreground_inverse_disabled_holo_light #80BEBEBE RGBA(190,190,190,0.5) hint_foreground_holo_light #808080 RGBA(128,128,128,1) highlighted_text_holo_dark #6633B5E5 RGBA(51,181,229,0.4) highlighted_text_holo_light #6633B5E5 RGBA(51,181,229,0.4) link_text_holo_dark #5C5CFF RGBA(92,92,255,1) link_text_holo_light #0000EE RGBA(0,0,238,1) group_button_dialog_pressed_holo_dark #46C5C1FF RGBA(197,193,255,0.27) group_button_dialog_focused_holo_dark #2699CC00 RGBA(153,204,0,0.15) group_button_dialog_pressed_holo_light #FFFFFFFF RGBA(255,255,255,1) group_button_dialog_focused_holo_light #4699CC00 RGBA(153,204,0,0.27) legacy_pressed_highlight #FFFEAA0C RGBA(254,170,12,1) legacy_selected_highlight #FFF17A0A RGBA(241,122,10,1) legacy_long_pressed_highlight #FFFFFFFF RGBA(255,255,255,1) holo_blue_light #FF33B5E5 RGBA(51,181,229,1) holo_green_light #FF99CC00 RGBA(153,204,0,1) holo_red_light #FFFF4444 RGBA(255,68,68,1) holo_blue_dark #FF0099CC RGBA(0,153,204,1) holo_green_dark #FF669900 RGBA(102,153,0,1) holo_red_dark #FFCC0000 RGBA(204,0,0,1) holo_purple #FFAA66CC RGBA(170,102,204,1) holo_orange_light #FFFFBB33 RGBA(255,187,51,1) holo_orange_dark #FFFF8800 RGBA(255,136,0,1) holo_blue_bright #FF00DDFF RGBA(0,221,255,1)
From http://forum.xda-developers.com/showthread.php?t=1458666&page=2
Parse ftw
Manage to 'sync' Asynctasker with Parse's database. Next step, deriving data from Parse, and run background thread occasionally.
Note: Better save a copy of the code.
http://stackoverflow.com/questions/10976843/run-my-code-in-background-every-1-sec-effectively-in-android
http://stackoverflow.com/questions/5774092/running-a-repeating-task-in-background-on-a-real-time-application
Note: Better save a copy of the code.
http://stackoverflow.com/questions/10976843/run-my-code-in-background-every-1-sec-effectively-in-android
http://stackoverflow.com/questions/5774092/running-a-repeating-task-in-background-on-a-real-time-application
Success hampered by speed
Parsing Match Type
Good. Fast and no complications.
Parsing Tweet & News
Bad. Takes 2.5s to parse one tweet/news.
Possible solutions
Good. Fast and no complications.
Parsing Tweet & News
Bad. Takes 2.5s to parse one tweet/news.
Possible solutions
- Make use of Parse's platform. First, put data into Parse's database. Subsequently, listfragment will be built from Parse's database. Update database every 6 hours.
- Find a way to scrape data on a server, and publish it on a simple HTML website.
18.6.12
onListItemClick, a new beginning
http://android-er.blogspot.sg/2012/01/listfragment.html
Trying to implement more features to the ListFragment. May consider SimpleAdapter.
Another consideration: new ArrayList>(); from http://eureka.ykyuen.info/2010/01/03/android-simple-listview-using-simpleadapter/
Another consideration: Custom ArrayAdapter
from http://android-er.blogspot.sg/2010/06/custom-arrayadapter-with-with-different.html
http://www.vogella.com/articles/AndroidListView/article.html
Changing Colour of TextView base on Conditions (THE KEY)
http://stackoverflow.com/questions/4134875/android-listactivity-row-color-based-on-object-state
No matter on the chosen solution, replacing the displayed fragment in an activity is done like this:
FragmentTransaction transaction = getFragmentManager().beginTransaction();transaction.replace(android.R.id.content, new MyFragment());transaction.commit();
Trying to implement more features to the ListFragment. May consider SimpleAdapter.
Another consideration: new ArrayList
Another consideration: Custom ArrayAdapter
from http://android-er.blogspot.sg/2010/06/custom-arrayadapter-with-with-different.html
http://www.vogella.com/articles/AndroidListView/article.html
Changing Colour of TextView base on Conditions (THE KEY)
http://stackoverflow.com/questions/4134875/android-listactivity-row-color-based-on-object-state
Moving on
NullPointerException(when switching off the screen)
http://stackoverflow.com/questions/8748064/starting-activity-from-fragment-causes-nullpointerexception
Fragment calling Fragment (the next big headache)
http://blog.radioactiveyak.com/2011/02/android-app-surgery-earthquake-redux.html
http://stackoverflow.com/questions/9281797/cant-refresh-data-in-listfragment#_=_
Communications between Fragments
http://stackoverflow.com/questions/5194548/how-to-pass-data-between-fragments
http://stackoverflow.com/questions/8748064/starting-activity-from-fragment-causes-nullpointerexception
Fragment calling Fragment (the next big headache)
http://blog.radioactiveyak.com/2011/02/android-app-surgery-earthquake-redux.html
http://stackoverflow.com/questions/9281797/cant-refresh-data-in-listfragment#_=_
Communications between Fragments
http://stackoverflow.com/questions/5194548/how-to-pass-data-between-fragments
17.6.12
Asynctask, a pain in the ass
http://stackoverflow.com/questions/3291490/common-class-for-asynctask-in-android\
This might offer more clues.
http://stackoverflow.com/questions/9938135/is-it-possible-to-pass-a-fragment-in-a-constructor
This might offer more clues.
http://stackoverflow.com/questions/9938135/is-it-possible-to-pass-a-fragment-in-a-constructor
Football Odds HTML
<div class="mainheader"> <span class="mainheader">FOOTBALL ODDSspan> div> <div class="bodytext"> <ul> <li><a href="/mobile?function=oddsMatch&league=All Matches">All Matchesa>li> <li><a href="/mobile?function=oddsMatch&league=Championship">Championshipa>li> <li><a href="/mobile?function=oddsMatch&league=Euro+Champ+2012">Euro Champ 2012a>li> <li><a href="/mobile?function=oddsMatch&league=J+League">J Leaguea>li> <li><a href="/mobile?function=oddsMatch&league=M+League">M Leaguea>li> <li><a href="/mobile?function=oddsMatch&league=S.League">S.Leaguea>li> <li><a href="/mobile?function=oddsMatch&league=Specials">Specialsa>li> <li><a href="/mobile?function=oddsMatch&league=US+Soccer+League">US Soccer Leaguea>li> ul> <br /> <a href="/mobile">Homea> div> body>
15.6.12
Progress! Step-by-Step
Stopped at Step 6 of http://mobile.tutsplus.com/tutorials/android/android-sdk_fragments/
Plans
Plans
- Twitter Integration. http://www.sitepoint.com/loading-twitter-data-into-android-with-lists/
This tutorial, http://mobile.tutsplus.com/tutorials/android/android-listview/, was a success, and might just be what I need.
Sadly, the other tutorial on fragments was hard and I couldn't understand it.
Dynamic ListView
http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/
http://p-xr.com/android-tutorial-dynamicaly-load-more-items-to-the-listview-never-ending-list/
http://stackoverflow.com/questions/4049298/dynamic-array-instead-of-static-when-creating-listview-icons-and-text-android
http://stackoverflow.com/questions/3338677/dynamic-display-of-listview-elements-partially-working
Sadly, the other tutorial on fragments was hard and I couldn't understand it.
Dynamic ListView
http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/
http://p-xr.com/android-tutorial-dynamicaly-load-more-items-to-the-listview-never-ending-list/
http://stackoverflow.com/questions/4049298/dynamic-array-instead-of-static-when-creating-listview-icons-and-text-android
http://stackoverflow.com/questions/3338677/dynamic-display-of-listview-elements-partially-working
14.6.12
Fragment Adapter code that might be useful
public static class PagerAdapter extends FragmentPagerAdapter {
public PagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public int getCount() {
return VIEW_COUNT;
}
@Override
public Fragment getItem(int position) {
Fragment fragment = null;
switch (position) {
case 0:
fragment = Fragment1.newInstance(context_);
break;
case 1:
fragment = Fragment2.newInstance(context_);
break;
case 2:
fragment = Fragment3.newInstance(context_);
break;
default:
break;
}
return fragment;
}
}
via http://stackoverflow.com/questions/7445437/replace-fragment-with-another-fragment-inside-viewpager
Sounds like a plan: Ops Jake viewpagerindicator
Met a deadend on my own. Might as well use Jake's lib. This means starting all over again. I should dedicate at most 1 more day to fix the interface. Implementing Fragments is going to be challenging.
Will analyse the sample code, together with the app on my android phone. Need to start digging the real code.
Will analyse the sample code, together with the app on my android phone. Need to start digging the real code.
Keywords, directions
Horizontal View Swiping with ViewPager
http://blog.stylingandroid.com/archives/537
http://android-developers.blogspot.sg/2011/08/horizontal-view-swiping-with-viewpager.html
http://developer.android.com/guide/developing/projects/projects-eclipse.html
http://www.developer.com/ws/android/programming/add-horizontal-paging-to-your-android-applications.html
http://blog.stylingandroid.com/archives/537
http://android-developers.blogspot.sg/2011/08/horizontal-view-swiping-with-viewpager.html
http://developer.android.com/guide/developing/projects/projects-eclipse.html
http://www.developer.com/ws/android/programming/add-horizontal-paging-to-your-android-applications.html
Subscribe to:
Posts (Atom)




















