Posts

RIP Routing Information Protocol

รู้จักกับ Routing Information Protocol (RIP) Routing Information Protocol หรือ RIP เป็นโปรโตคอลเลือกเส้นทางประเภท Distance Vector ที่ถูกออกแบบมาให้ใช้กับเครือข่ายขนาด เล็กไปจนถึงขนาดกลาง เป็นโปรโตคอลเลือกเส้นทางมาตรฐานที่ไม่ขึ้นอยู่กับผู้ผลิตรายใด โดยมี RIP Version 1 ที่ได้รับมาตรฐาน RFC 1058 RIP เป็นโปรโตคอลที่เรียบง่าย อีกทั้งยังง่ายต่อการจัดตั้ง แต่ความเรียบง่ายของมัน กลับซ่อนปัญหาที่น่ากลัวไว้อยู่เบื้องหลัง คุณลักษณะการทำงานของ RIP คุณลักษณะของ RIP มีดังต่อไปนี้  RIP อาศัย ค่าของจำนวน Hop เป็นหลัก เพื่อการเลือกเส้นทาง โดยจำกัดที่ไม่เกิน 15 Hop  RIP จะส่งข่าวสารเกี่ยวกับการปรับปรุงเส้นทางออกไปทุก 30 วินาที  การส่งข้อมูลเกี่ยวกับการปรับปรุงตารางเส้นทาง เป็นการส่งออกไปทั้งหมดของตารางทั้งที่เป็นของเก่าและของใหม่  การส่งข่าวสารเกี่ยวกับการปรับปรุงเส้นทาง จะเกิดขึ้นกับ Router ที่เชื่อมต่อกันโดยตรงเท่านั้น การทำงานขั้นพื้นฐานของ RIP Version 1 การทำงานขั้นพื้นฐานของ RIP ค่อนข้างเรียบง่าย ภายใต้กฎกติกา ดังนี้  เมื่อใดที่ มีการ Boot ...

หน้าล็อกอิน Authentication Login manual บน Laravel 5

Authentication Login manual 1. Create controller cmd command Or custom create php file สร้างไว้ที่ App\Http\Controller\AccountController.php php artisan make : controller [Name]Controller code: AccountCobtroller.php <?php namespace App\Http\Controllers; use Input; use Session; use Auth; use View; use Hash; use App\Account; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Redirect; class AccountController extends Controller { public function __construct() { // } /**********************************************************************/ /*******************************Login**********************************/ /**********************************************************************/ public function getLogin() { if (Auth::check()) { // return Redirect::to('')->with('success', 'You are already logged in'); retur...

[RESOLVED] Call to undefined function pg_query (), Wamp Server PostgreSQL

[RESOLVED] Call to undefined function pg_query (), Wamp Server PostgreSQL [RESOLVED] Call to undefined function pg_query (), Wamp Server PostgreSQL to install our beloved localhost test server, and try to start connecting with the great aand PHP DB Manager PostgrSQL we noticed a very common mistake that would be   Call to undefined function pg_query () which is solved by doing the following:  1 ..- activate our php.ini extensions that brings WampServer, and extensions that we have are:    php_pgsql.dll   ,  php_pdo_pgsql.dll    these extensions are enabled clearing to the point semicolon (;) is in front of the name (Example:;  php_pdo_pgsql.dll remove it; there are forward and becomes:     php_pdo_pgsql.dll  ), save changes in php.ini.  2. NEXT go to the route:          C: \ wamp \ bin \ php \ php5.4.3 We place the library call:    libpq.dll    t...

Performing Inner Join for Multiple Columns in the Same Table

Performing Inner Join for Multiple Columns in the Same Table tbColors color_code , color_name 1 , 'blue' 2 , 'green' 3 , 'yellow' 4 , 'red' tbAnswers answer_id , favorite_color , least_favorite_color , color_im_allergic_to 1 , 1 , 2 3 2 , 3 , 1 4 3 , 1 , 1 2 4 , 2 , 3 4 This seems like the way to go: SELECT A . answer_id , C1 . color_name AS favorite_color_name , C2 . color_name AS least_favorite_color_name , C3 . color_name AS color_im_allergic_to_name FROM tbAnswers AS A INNER JOIN tbColors AS C1 ON A . favorite_color = C1 . color_code INNER JOIN tbColors AS C2 ON A . least_favorite_color =...

Tutorial: Using PHP’s JSON encode and decode functions to handle data sent to and from your app

Tutorial: Using PHP’s JSON encode and decode functions to handle data sent to and from your app JSON  makes dealing with data in your app exceptionally easy and manageable. The best part about  JSON  is you can look at it and understand it. It’s not like the confusing spaghetti DOM that you get with XML, it’s a lean minimal representation of your data. If you’re dealing with chunks of data in your app, you want to be using  JSON . So while your app will happily eat up all the  JSON  you can throw at it, you still need to make it in the first place – and/or have a server side app that is capable of reading it. If, like me, you use PHP to handle things on a server then things are pretty straightforward. You can use PHP’s  json_encode  and  json_decode  functions. Encode will take your arrays, or objects, and create a  JSON  string of your data. While decode will take a  JSON  string, sent from your app, and turn...