A PHP Error was encountered

Severity: Notice

Message: Undefined property: stdClass::$vdo_id

Filename: controllers/Course.php

Line Number: 93

Backtrace:

File: /var/www/html/online.pharmacyguru.net/app/controllers/Course.php
Line: 93
Function: _error_handler

File: /var/www/html/online.pharmacyguru.net/index.php
Line: 315
Function: require_once

การแสดงผลของ Code prettify

วิธีการติดตั้ง Code Prettify ทำให้โค้ดที่แสดงผลหน้าเว็บสวยงาม

var net = require('net');

var HOST = '127.0.0.1';
var PORT = 6969;

net.createServer(function(sock) {
    
    console.log('CONNECTED: ' + sock.remoteAddress +':'+ sock.remotePort);

    setTimeout(function() {
      write_data(sock,String(getRandomInt(1000,9999)));
    },1000);

    sock.on('close', function(data) {
        console.log('CLOSED: ' + sock.remoteAddress +' '+ sock.remotePort);
    });

    sock.on('error', function(err) {
        console.log(err);
    });
    
}).listen(PORT, HOST);

console.log('Server listening on ' + HOST +':'+ PORT);

function write_data(sock,data){
  sock.write('0x01');
  sock.write('0x20');
  sock.write('0x20');
  sock.write('0x20');
  sock.write('0x20|');

  sock.write(data+'.4321|');
  
  sock.write('0x03');
  sock.write('0xB6');
  sock.write('0x99');
  setTimeout(function() {
    write_data(sock,String(getRandomInt(100,9099)));
  },500);
}

function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
  }
  

var net = require('net');

var HOST = '127.0.0.1';
var PORT = 6969;

net.createServer(function(sock) {
    
    console.log('CONNECTED: ' + sock.remoteAddress +':'+ sock.remotePort);

    setTimeout(function() {
      write_data(sock,String(getRandomInt(1000,9999)));
    },1000);

    sock.on('close', function(data) {
        console.log('CLOSED: ' + sock.remoteAddress +' '+ sock.remotePort);
    });

    sock.on('error', function(err) {
        console.log(err);
    });
    
}).listen(PORT, HOST);

console.log('Server listening on ' + HOST +':'+ PORT);

function write_data(sock,data){
  sock.write('0x01');
  sock.write('0x20');
  sock.write('0x20');
  sock.write('0x20');
  sock.write('0x20|');

  sock.write(data+'.4321|');
  
  sock.write('0x03');
  sock.write('0xB6');
  sock.write('0x99');
  setTimeout(function() {
    write_data(sock,String(getRandomInt(100,9099)));
  },500);
}

function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
  }
  

Writer :