Deep Inside Learning

I work as Android Developer. Currently learning the Machine Learning, Data Science and Life too. This is my personal blog and any views expressed here are mine, and not my employers.

Page 4


Publishing Source Code of Jahamanga

As a support to Open Source Community, today i’m publishing the source code of Jahamanga(https://play.google.com/store/apps/details?id=com.antares.jahamanga) to github (https://github.com/linggom/Jahamanga)

Please enjoy it, and if have a question do not hesitate to contact me.

Specification :

  1. Develop using android studio
  2. Using gradle 2.1
  3. Using some 3rd pary library (Retrofit for REST API library, Glide for image load and caching, Parse for statistics)

regards
goman

View →


Math and Pixar Movies

Watch to see how geometric mathematics implement in pixar. See how pascal triangle applied in pixar movies.

IMAGE ALT TEXT HERE

View →


Sirat, create your Pojo and We generate the query

I’m to lazy to create a pojo and a query to provide in contentprovider. So after thinking i’m have decide to cut this and create a tools to help that. So i’m created Sirat.

Sirat (https://github.com/linggom/sirat/) is using annotation like in hibernate (http://hibernate.org/) to set some attribute in java. Actually this is what sirat do can convert from this :

When we called

    Sirat.generateQuery(Dog.class))

It will convert this class :

    class Dog{
        @PRIMARY_KEY private String name;
        @NOT_NULL private String type;
        private long birthDate;
        @UNIQUE private int uuid;
        @Ignore private String birthPlace;
    }

Into this class :

    CREATE TABLE 'Dog' (
        'type' TEXT NOT NULL , 
        'name' TEXT, 
        'uuid' INTEGER, 
        'birthDate' LONG,  
        PRIMARY KEY ('name'),  
        UNIQUE ('uuid')
    )

So how it works...

Continue reading →


Hackathon Product : Stylo, Choose the Right Style

Yesterday (17 November 2014) me and my friend Muhar (https://twitter.com/depemu) participated in Startup Asia 2014 Hackathon by TechInAsia. The event actually held in my almamater campus Bina Nusantara University (www.binus.ac.id). I think the startup asia 2014 theme and the traffic in binus actually the same “I love traffic jam”. Okay lets move on to our idea.

Our main concept of idea basically is to choose what fashion brand celebrity wear and we can show every detail of the item that celebrity used. And also we can show the stylo of celebrity of user is fit or not. Last but not least we can buy item from Our E-commerce platform". We were participated in AWS Challenge (http://aws.amazon.com), PayPal Startup Blue Print (https://blueprint.paypal.com/), TackThis (http://tackthis.com.sg/) and MigMe (http:/mig.me).

Why we choose these idead ? Basically we are giving different experience...

Continue reading →


Jahamanga Statistics

This is statistics of manga that user read on jahamanga
Naruto =219
One Piece = 161
Crayon Shin-chan= 119
Bleach = 113
Doraemon = 97
Detective Conan = 58
Slam Dunk = 52
Hunter x Hunter = 43

mangaStatistic.png

View →


Bet is not illegal

I started to bet for my future. And what is that i’m betting ? No its not disclosure. Wait it on 5 years again after read this blog
how-google-works-51-638.jpg

View →


SRM 635 Div 2 250 & 500 Points

After long time not participate in topcoder because of work load, i decide after office today afternoon to participate in simple problem div 2

*IdentifyingWood (250 points) : *

for this case in my mind i need to 1 loop iterate through n ( length of s text ) and check if i can flag every char in t

public class IdentifyingWood {

    public static String check(String s, String t){
        int ls = s.length();
        int lt = t.length();
        int a = 0;
        String wood = "Yep, it's wood.";
        String none = "Nope.";
        for (int i = 0; i < ls; i++) {
            if (a < lt){
                if (s.charAt(i) == t.charAt(a)){
                    a++;
                }
            }
            else{
                break;
            }
        }
        if (a == lt){
            return wood;
        }
        return none;
    }

}

*QuadraticLaw (500 points) : *

in this...

Continue reading →


Hibernate Sometimes Friend Sometimes Enemy

Everyone must know about a feauture in windows OS (if you are currently using pc or notebook), hibernate. Sometimes its help us when we are have a work and our notebook battery is draining to 0%. And windows automatically save your job and hibernate the notebook. So after you plug in a power source and power on your notebook you can continue your last work.

But, once again but. This feauture is killing me. I’m make 2 partition in my computer and this is my fault i put Ubuntu and Windows on same partition. Yesterday i make new partition to try Windows 10 Technical Preaview and i leave the download at my notebook and plug out the power. My download is not finish and the power is off. And when i try to turn on my notebook. Something happenend. After read some article and try to fix using Ubuntu live cd, Windows DVD. And nothing worked. So the last option for my solution is to erase all...

Continue reading →


Gauss is the Bad Boy

How to sum 1 … 10 ? Easy, (1+10)*10/2 = 55

But Why it can be like that ? let me explain

We Want to sum(s) 1 to 10, the equation will be

Sample 1 :

s = 1+2+3+4+5+6+7+8+9+10
s = 10+9+8+7+6+5+4+3+2+1
========================  +
2s = 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11
2s = 10 * 11
s = (10 * 11)/2
s = (10 * (10+1))/2

Sample 2 :

We Want to sum(s) 2 to 14, the equation will be :

s = 2 + 3 + 4 + 5  + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14
s = 14 + 13 + 12 + 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2
=============================================== +
2s = 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16
s = 12 * 16 / 2
s = (12 * (14 + 2)) / 2

Sum = n*(U1+Un)/2

And the most interesting story behind this formula is gauss write this on whiteboard when he is so bad and get punishment to count 1 to 100.

Source: http://id.wikipedia.org/wiki/Carl_Friedrich_Gauss

Continue reading →


Fast inverse square root

Fast inverse square root in hexadecimal 0x5f3759df is used to count the
x½

The code implementation is from Quake III Arena source code :

float Q_rsqrt( float number )
{
    long i;
    float x2, y;
    const float threehalfs = 1.5F;
    x2 = number * 0.5F;
    y  = number;
    i  = * ( long * ) &y;                       // evil floating point bit level hacking
    i  = 0x5f3759df - ( i >> 1 );               // what the fuck?
    y  = * ( float * ) &i;
    y  = y * ( threehalfs - ( x2 * y * y ) );   // 1st iteration
 //y  = y * ( threehalfs - ( x2 * y * y ) );   // 2nd iteration, this can be removed

    return y;
}

example : consider the number x = 0.15625, for which we want to calculate 1/√x ≈ 2.52982. The first steps of the algorithm are illustrated below:

00111110001000000000000000000000 Bit pattern of both x and i
00011111000100000000000000000000 Shift right one position...

Continue reading →