Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Hendy Irawan ceefour

🏠
Working from home
View GitHub Profile
@ceefour
ceefour / ArticleListActivity.java
Last active Oct 20, 2017
Weather for Android (template) + Kinigram notes
View ArticleListActivity.java
// onCreate
// Cara menangani apabila sebuah item di ListView diklik
listView = (ListView) findViewById(android.R.id.list);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
final Article item = (Article) adapterView.getAdapter().getItem(i);
Log.i(TAG, "Item " + i + " clicked: " + item);
// new Intent(...)
// startActivity(...);
@ceefour
ceefour / Query.java
Last active Sep 20, 2017
GraphQL Java
View Query.java
package com.hendyirawan.jws1051;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class Query implements GraphQLQueryResolver {
@ceefour
ceefour / Country.java
Last active Sep 20, 2017
Training Java Web Services
View Country.java
package com.hendyirawan.jws1038;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
@Entity
public class Country implements Serializable {
@ceefour
ceefour / SentenceTagger.java
Created Jan 14, 2017
Nyobain pake HMM untuk mengenali kata dalam chat (termasuk yang alay), awalnya sih agak lumayan dengan training sample sedikit.......... giliran training samplenya ditambah, malah ngaco :'( kesimpulan sementara ga bisa pake HMM dengan cara ini ha ha ha.. (menyedihkan)
View SentenceTagger.java
import com.google.common.collect.ImmutableList;
import org.apache.mahout.classifier.sequencelearning.hmm.HmmEvaluator;
import org.apache.mahout.classifier.sequencelearning.hmm.HmmModel;
import org.apache.mahout.classifier.sequencelearning.hmm.HmmTrainer;
import org.apache.mahout.classifier.sequencelearning.hmm.HmmUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Arrays;
@ceefour
ceefour / kaldi-jtrmal-windows-vc14-fix.txt
Created Mar 21, 2016
kaldi build, branch jtrmal:windows-vc14-fix, Visual Studio Community 2015 Update 1 in Win 10 Pro 64-bit
View kaldi-jtrmal-windows-vc14-fix.txt
1>------ Build started: Project: kaldi-cudamatrix, Configuration: Debug x64 ------
1> cu-matrix.cc
1> Generating Code...
1> Compiling...
1> cu-vector.cc
1> cu-tp-matrix.cc
1> cu-sparse-matrix.cc
1> cu-sp-matrix.cc
1> cu-rand.cc
1> cu-packed-matrix.cc
@ceefour
ceefour / Lifespan-observations_2015-02-21.scm
Created Jun 7, 2015
Lifespan-observations_2015-02-21.scm
View Lifespan-observations_2015-02-21.scm
(define count (count-all))
(define message (string-append " Atoms loaded " "\n"))
(display count)
(display message)
(InheritanceLink
(ConceptNode "Lifespan_Observations_Increased_GeneSet")
(ConceptNode "Geneset")
)
(InheritanceLink
@ceefour
ceefour / ImageMetaDataTest.java
Created Jun 3, 2015
JPEG EXIF Metadata extraction with Apache Tika 1.8
View ImageMetaDataTest.java
// inspired by http://blog.jeroenreijn.com/2010/04/metadata-extraction-with-apache-tika.html
package com.hendyirawan.smartroad;
import com.google.common.base.Preconditions;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.tika.Tika;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.ParseContext;
View install-opencv-2.4.11-in-ubuntu.sh
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
View diagram_default
{
"checklists": [
{
"uid": "checklist_one_edited_too_good",
"type": "Checklist",
"name": "Checklist One edited too good",
"children": [
{
"uid": "checklist_one_child",
@ceefour
ceefour / gist:5990167
Created Jul 13, 2013
gradle NullPointerException
View gist:5990167
adri@amanah ~/git/soluvas-buzz $ git branch -v
* master 1072c4e mo pake quartz
adri@amanah ~/git/soluvas-buzz $ gradle -v
------------------------------------------------------------
Gradle 1.6
------------------------------------------------------------
Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC
You can’t perform that action at this time.