Skip to content

Instantly share code, notes, and snippets.

View teerasej's full-sized avatar
🎯
Teaching about cross platform mobile app development and A.I

Teerasej Jiraphatchandej teerasej

🎯
Teaching about cross platform mobile app development and A.I
View GitHub Profile
@teerasej
teerasej / Create_page.dart
Created May 28, 2019 07:15
ตัวอย่างการจัด Layout ใน Flutter Widget แบบมีช่องว่างอยู่ระหว่าง UI ด้านบนกับด้านล่าง โดยการใช้ Column
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Create'),
),
body: Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@teerasej
teerasej / app.json
Last active February 14, 2019 14:45
ไฟล์ app.json ที่แสดงข้อมูลต่างๆ สำหรับการใช้งานกับ Expo CLI
{
"expo": {
"name": "nextflow-contact-book",
"slug": "nextflow-contact-book",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
@teerasej
teerasej / async-await.js
Created February 6, 2019 16:16 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@teerasej
teerasej / main.dart
Created January 19, 2019 10:16
เรียน Dart กับ Nextflow - Data Type - start - ต่อยอดกับการสร้างแอพ iOS และ Android https://nextflow.in.th/google-flutter-training/
// Copyright 2019 Amaround Co.,Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license
// เรียน Dart และต่อยอดสร้างแอพ iOS และ Android ด้วย Google Flutter ดูที่นี่เลย https://nextflow.in.th/google-flutter-training/
void main() {
var message = "Nextflow.in.th";
var foundedYear = 2013;
print("${message} ก่อตั้งเมื่อปี");
@teerasej
teerasej / main.dart
Last active January 19, 2019 10:16
เรียน Dart กับ Nextflow - Data Type - Completed - ต่อยอดกับการสร้างแอพ iOS และ Android https://nextflow.in.th/google-flutter-training/
// Copyright 2019 Amaround Co.,Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license
// เรียน Dart และต่อยอดสร้างแอพ iOS และ Android ด้วย Google Flutter ดูที่นี่เลย https://nextflow.in.th/google-flutter-training/
void main() {
String message = "Nextflow.in.th";
String foundedYear = "2013";
print("${message} ก่อตั้งเมื่อปี" + foundedYear);
@teerasej
teerasej / main.dart
Created January 19, 2019 05:30
เรียน Dart กับ Nextflow - วิธีการใช้งานตัวแปรประเภทข้อความ (String) - ต่อยอดกับการสร้างแอพ iOS และ Android https://nextflow.in.th/google-flutter-training/
// Copyright 2019 Amaround Co.,Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license
// เรียน Dart และต่อยอดสร้างแอพ iOS และ Android ด้วย Google Flutter ดูที่นี่เลย https://nextflow.in.th/google-flutter-training/
void main() {
var price = 100;
var amount = 10;
var message = 'ผลลัพธ์ของ';
@teerasej
teerasej / main.dart
Last active January 19, 2019 05:30
เรียน Dart กับ Nextflow - การประกาศตัวแปร Variable - ต่อยอดกับการสร้างแอพ iOS และ Android https://nextflow.in.th/google-flutter-training/
// Copyright 2019 Amaround Co.,Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license
// เรียน Dart และต่อยอดสร้างแอพ iOS และ Android ด้วย Google Flutter ดูที่นี่เลย https://nextflow.in.th/google-flutter-training/
void main() {
var price = 100;
var amount = 10;
var result = price * amount;
print(result);
@teerasej
teerasej / index.ts
Last active September 19, 2018 09:30
Example mock up data for Ionic Training by www.nextflow.in.th
// Basic JavaScript object
postArray = [
{ title: 'Aute officia commodo occaecat commodo do excepteur ex quis sint.' , message: 'Ad ex est elit id magna eu laborum cupidatat dolore officia quis eu labore dolor. Consequat anim ea labore reprehenderit cillum. Eu ea labore culpa cillum. Eu et reprehenderit nulla quis. Anim magna exercitation minim anim cupidatat cillum quis aliqua incididunt ut commodo reprehenderit. Ut labore occaecat aliqua esse excepteur et. Ea voluptate quis magna sunt Lorem aliqua culpa do irure sint mollit quis. Ea sunt eu in ipsum anim consequat consectetur do. Eiusmod id est nostrud laboris ullamco fugiat anim cillum et labore occaecat. Ex tempor pariatur nulla qui anim culpa.', createDate: new Date() }
, { title: 'Id dolore sunt mollit laboris esse veniam nostrud irure.' , message: 'Ad ex est elit id magna eu laborum cupidatat dolore officia quis eu labore dolor. Consequat anim ea labore reprehenderit cillum. Eu ea labore culpa cillum. Eu et reprehenderit nulla quis. Anim magna
@teerasej
teerasej / git.md
Created May 19, 2018 09:19
คำสั่ง clone แอพอ่านข่าว 3
https://github.com/teerasej/nextflow-ionic-news-app nextflow-ionic-news-app-3 --branch login-start
@teerasej
teerasej / fishing_vessel.md
Last active May 9, 2018 08:08
เพิ่มส่วนการสร้าง Web API ให้กับ Web server ที่ใช้ CodeIgniter สำหรับศูนย์พัฒนาการประมง

Controller

  1. สร้างไฟล์ application/controllers/api/FishingVessel.php
  2. วางโค้ดด้านล่างลงไป
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class FishingVessel extends CI_Controller {
 public function __construct()