Skip to content

Instantly share code, notes, and snippets.

DANG HAI AN zyzo

Block or report user

Report or block zyzo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zyzo
zyzo / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zyzo
zyzo / casse-tête.pl
Last active Aug 29, 2015
casse-tete-prolog : calculer les methodes de poser des cercles avec les trous sur un disque
View casse-tête.pl
/* disque(Nom, Motif) - Modélisation des disques */
disque(a, [-1, 0, 0, 0, 0, 0]).
disque(b, [-1, -1, 0, 0, 0, 0]).
disque(c, [-1, 0, -1, 0, 0, 0]).
disque(d, [-1, 0, 0, -1, 0, 0]).
disque(e, [-1, -1, -1, 0, 0, 0]).
disque(f, [-1, -1, 0, -1, 0, 0]).
disque(g, [-1, 0, -1, 0, -1, 0]).
disque(h, [-1, -1, -1, -1, 0, 0]).
View date-sorting.js
/** Derivative work from date-de plug-in :
* https://github.com/DataTables/Plugins/blob/master/sorting/date-de.js
*
* date and time : dd[DATE_SP]mm[DATE_SP]yy HH[TIME_SP]mm[TIME_SP]ss
* date : dd[DATE_SP]mm[DATE_SP]yy
*
* @author zyzo
* @example
* "columnDefs": [
{type : 'datetime', targets : 3},
@zyzo
zyzo / android-imageswitcher
Created Apr 1, 2014
Android snippet - manipulating ImageSwitcher class
View android-imageswitcher
protected void onCreate(Bundle savedInstanceState) {
...
mImageSwitcher = (ImageSwitcher) findViewById(R.id.switcher1);
mImageSwitcher.setFactory(new ViewFactory() {
@Override
public View makeView() {
return new ImageView(GameActivity.this);
}
});
@zyzo
zyzo / android-bitmap
Created Mar 24, 2014
Android snippet - displaying and playing around with Bitmap image
View android-bitmap
package com.dha.contagion;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Point;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
You can’t perform that action at this time.