Category Archives for Uncategorized
compile – set – run mongoose web server in android (emulator)
run web server mongoose in android
source code mongose
http://mongoose.googlecode.com/files/mongoose-3.8.tgz
ndk android
https://developer.android.com/tools/sdk/ndk/index.html
ndk target 32, for 64bit linux
version: android-ndk32-r10-linux-x86_64.tar.bz2
sdk android
https://developer.android.com/sdk/index.html
sdk for linux
extract ndk to ~/tmp/android-ndk-r10
extract mongoses-3.8 to ~/tmp/mongoose
extract sdk to ~/tmp/android-sdk-linux
#insert this code include $(CLEAR_VARS) LOCAL_MODULE := mongoose LOCAL_SRC_FILES := main.c mongoose.c include $(BUILD_EXECUTABLE)
if success you will find the file in ~/tmp/mongoose/libs/armeabi
create and run emulator, emulator api level 18 (because more faster loading)
debian 7 install sun java jdk
install fresh crunchbang, remove all ntfs partition … and i stuck at java installed
the method from http://g3n1k.wordpress.com/2014/01/04/crunchbang-waldorf-debian-wheezy-install-java-sunoracle-jdk/ didnt work
google and found this
https://wiki.debian.org/Java/Sun
follow step there and stuck in depedency … at last found this work
before you update, make sure you remove other repository,
open synaptic -> setting -> repositories -> tab Other Software
now update and install sun java jdk
composer, install – use
install composer
make folder project and composer.json file
write this code in composer.json
use composer for download source
intall octave in debian Wheezy, for image processing
simply word, octave is software for numerical (like MATLAB) but you can use for image processing ( Teori dan aplikasi pengolahan citra – Abdul Kadir)
to install octave in debian wheezy, we must install graphicsmagick first. graphicsmagick use as engine for processing image in octave. we will build graphicsmagick from source, becouse its need option quantum depth min 16bit, and also we will buil octave from source
install all packages needed
download source graphicsmagick from
http://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.19/GraphicsMagick-1.3.19.tar.xz/download
extract with your command or gui
install graphicsmagick
Set GraphicsMagick libs path
download octave
ftp://ftp.gnu.org/gnu/octave/octave-3.8.1.tar.gz
configure and install octave
make shortcut in bin, so you can use it as command
install packages images and dependecy so you can play with images
https://www.gnu.org/software/octave/doc/interpreter/Installing-and-Removing-Packages.html
download package from http://octave.sourceforge.net/packages.php
for octave image processing you need these control, general, signal and image package, download that four package
test octave with…
Lihat pos aslinya 18 kata lagi
add new drive / partition linux (virtualbox)
– add new drive (virtualbox), my new drive is webdisk.qed (8GB)
– start linux box
– check mounting hardisk
– check partition
sdb connected
– start fdisk
– check if partition true
– create new partition
– check again
– write partition
– read (again) partition
– check with fdisk
– format partition with ext4 extension
– create dir for mounting
– mounting otomatis at boot
– change owner to user
– mounting all partition
– check all volume
– test create file
www-data read user home folder
move websites folder to home user
www-data is apache2 user
ub is my user
and you want save your server home folder ex: /home/ub/websites
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/ub/websites
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/ub/websites/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
LogLevel info
ErrorLog /home/ub/websites/logs/error_ub
CustomLog /home/ub/websites/logs/custom_ub combined
RewriteEngine On
RewriteLog /home/ub/websites/logs/rewrite_ub
RewriteLogLevel…
Alias /doc/ “/usr/share/doc/”
<Directory “/usr/share/doc/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Lihat pos aslinya 1 kata lagi
php debug with file logs
php real time file debug
today i add third-party libraries class, this class stream output file,
because its output stream i cant debug it with show value in browser
i can’t get parameter value in process, and didn’t where error start …
lucky … php can write to file, so we can write value in file log and read it
i use CodeIgniter Framework, so i will show the controller class
first create folder and file
now create class controller
test with browser
and how to real time debug ???
open terminal, go to folder file.log and type
OOP JavaScript #fast-learn
basic OOP javascript encapsulation, inheritance, polymorphism
oop javascript, encapsulation, inheritance, polymorphism
more resource
http://www.techumber.com/2013/08/javascript-object-oriented-programming-tutorial.html
http://stackoverflow.com/questions/9850892/should-i-use-polymorphism-in-javascript
http://www.codeproject.com/Articles/315169/Polymorphism-in-JavaScript
bar chart – complete code – d3.js
d3.js bar chart (almost) complete
D3 bar chart complete code (svg, axis, hover, random data, transition, delay, click)
structure
bar-chart.html code
data.json