Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Tuesday, October 3, 2017

HTTP Response Code


100  = Continue
101  = Switching Protocols
102  = Processing (WebDAV)

200  = OK
201  = Created
202  = Accepted
203  = Non-Authoritative Information
204  = No Content
205  = Reset Content
206  = Partial Content
207  = Multi-Status (WebDAV)
208  = Already Reported (WebDAV)
226  = IM Used

300  = Multiple Choices
301  = Moved Permanently
302  = Found
303  = See Other
304  = Not Modified
305  = Use Proxy
306  = (Unused)
307  = Temporary Redirect
308  = Permanent Redirect (experimental)

400  = Bad Request
401  = Unauthorized
402  = Payment Required
403  = Forbidden
404  = Not Found
405  = Method Not Allowed
406  = Not Acceptable
407  = Proxy Authentication Required
408  = Request Timeout
409  = Conflict
410  = Gone
411  = Length Required
412  = Precondition Failed
413  = Request Entity Too Large
414  = Request-URI Too Long
415  = Unsupported Media Type
416  = Requested Range Not Satisfiable
417  = Expectation Failed
418  = I'm a teapot (RFC 2324)
420  = Enhance Your Calm (Twitter)
422  = Unprocessable Entity (WebDAV)
423  = Locked (WebDAV)
424  = Failed Dependency (WebDAV)
425  = Reserved for WebDAV
426  = Upgrade Required
428  = Precondition Required
429  = Too Many Requests
431  = Request Header Fields Too Large
444  = No Response (Nginx)
449  = Retry With (Microsoft)
450  = Blocked by Windows Parental Controls (Microsoft)
451  = Unavailable For Legal Reasons
499  = Client Closed Request (Nginx)

500  = Internal Server Error
501  = Not Implemented
502  = Bad Gateway
503  = Service Unavailable
504  = Gateway Timeout
505  = HTTP Version Not Supported
506  = Variant Also Negotiates (Experimental)
507  = Insufficient Storage (WebDAV)
508  = Loop Detected (WebDAV)
509  = Bandwidth Limit Exceeded (Apache)
510  = Not Extended
511  = Network Authentication Required
598  = Network read timeout error
599  = Network connect timeout error




Reference :

http://www.restapitutorial.com/httpstatuscodes.html#

Wednesday, September 20, 2017

The requested operation cannot be performed on a file with user-mapped section open - Android Studio


Solution :
Rebuild android studio again... aaand... doneee... :)

Tuesday, July 11, 2017

array_change_key_case di PHP

Fungsi array_change_key_case intinya ngubah key suatu array menjadi huruf kapital atau menjadi huruf kecil. Contohnya seperti terlihat di bawah
Hasilnya :

Tuesday, April 25, 2017

First Time playing with react-native (android)

Installation :
npm install -g react-native-cli --no-optional

Setelah selese tar dapat messeg kek gini :

Naah...terus jalanin emulator androidnya... tunggu emualtornya sampe bener2 siap... :D
Terus tambain path baru ANDROID_HOME dan path directory sdknya kyk gini :

Naaah... terus jalanin perintah 'react-native run-android' :

Naaah.. silahkan sabar menunggu... :D

Sambil nunggu tar emulatornya muncul notif2 kyk gini :

Setelah selesai.... Tar hasil di emulatornya seperti ini....

Nunggu source codenya dibuild agak lebih lama dibanding pake android studio.. :v

Dasa Jade Template - NodeJS

Di postingan sebelumnya kita udah ngekonfig node express yg basic... Naah disini kita nyoba2 jade template yg basic2... :)
Contoh jade templatenya bisa dilihat di layout.jade didalam folder views kyk gambar di bawah :
Terus 'block content' itu bisa dilihat didalam index.jade kyk gini :
Tampilannya seperti ini :




Friday, April 21, 2017

SailsJS untuk Pemula - part I

Pertama-tama mari kita install SailsJS-nya pake npm ajjah. Silahkan jalankan perintah ini :

'npm i sails -g --no-optional'
Naah... disitu -g flag buat global directory, trus --no-optional biar g' usah nginstall dependencies di windows (soalnya skrg lg make windows 7)
Silahkan ditunggu beberapa menit biar packagenya kedownload ke repo local kita. Tar klu udah selese, kita bisa nyoba pake command 'sails -h' yg hasilnya kek gini :
Naaah... berikutnya kita ngebuat project sails baru pake perintah ini 'sails new myFirstSails'
myFirstSails itu nama folder project kita tar klu udah jadi.......
Struktur folder utama project sailsnya kyk gini :
Terus folder model dan controllernya ada didalam folder api kyk gini :
Naah...terakhir klu projectnya mau di run, pake perintah 'sails lift'

Port defaultnya 1337... Kalu dibuka tampilannya seperti ini :

Cooool...... Cukup sekian dl untuk part pertama... :D

Wednesday, April 19, 2017

Nodejs Express Generator

Next, let's install express-generator by running this command "npm i express-generator -g --no-optional" 

I'm ruunning nodejs in windows 7, so I need that --no-optional flag in order to prevent fsevent error message :D

After installing express-generator, we can see it's folder inside node-modules like this 
Next.... Let's test our express generator by running 'express -h' like this :

Ok... Let's create our first express-generator project 'express myFirstExpGen'
After running that command, we can see our directory content like this :
Btw,, actually we can specify view engine by using --v=pug|jade|ejs and etc. We also can specify css engine by using --c=less|stylus|sass|compass.... In this post I'm using default engine so it will be jade for view and plain css for css.

Next, let's run 'npm install' for installing project dependencies..

Last... Let's run our express, for windows, we can use this command :
'set DEBUG=projectDirName:* & npm start'

And then open localhost:3000 
Yeeei.... btw.... www file inside of  bin directory is our starting project file, and that file loads app.js.

Aaaand in this default project, we already have /users so if we open the page we will gonna see something like this :
It's content :

Sunday, July 17, 2016

myFirst Express HellowWorld Node.js Project :D

Mari kita bikin projectnya dari awal pake nodeclipse.... :D


Terus klu kita run....klik kanan app.js, terus pilih run as node application :
Tampilannya di browser...
Yooooowh..... :D Terus klu kita ubah jadi Hellow Hisoka...

Hasilnya...

npm install connect in Nodeclipse

If you want to install connect module in nodeclipse, first thing you have to do is opening the package.json in your nodeclipse project like this :
Next.... add dependencies for connect-flass as shown below :
Next... right click on package.json, choose "Run as -- npm install" :
aaaand... doneee....
You can also install another module by just adding it here on depencies section, for example adding  "passport-google-oauth": "*", 
Then run it again as npm install...
Well... that's all... :D :D :D :D