This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cors from 'cors' | |
import express, { json, urlencoded } from 'express' | |
import puppeteer from 'puppeteer' | |
const app = express() | |
app.use(cors()) | |
app.use(json({ inflate: true })) | |
app.use(urlencoded({ extended: true })) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To parse this JSON data, do | |
// | |
// final products = productsFromJson(jsonString); | |
import 'dart:convert'; | |
ProductsModel productsFromJson(String str) => ProductsModel.fromJson(json.decode(str)); | |
String productsToJson(ProductsModel data) => json.encode(data.toJson()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'dart:math' as math; | |
class StickyNote extends StatelessWidget { | |
final double? bodyHeight; | |
final Color? color; | |
final Widget body; | |
final int angle, shape; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12 | |
WORKDIR /app | |
COPY package.json . | |
RUN npm install | |
COPY . . | |
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:webview_flutter/webview_flutter.dart'; | |
class WebViewHtmlString extends StatefulWidget { | |
final String html; | |
WebViewFromString(this.html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:flutterapp/model/user.dart'; | |
import 'package:intl/intl.dart'; | |
import 'package:provider/provider.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
char *name = "Khatthaphone"; | |
char *class = "2IT"; | |
char *student_id = "FNEN0376/16"; | |
char *date = "20th March 2018"; | |
// download source code at: | |
// https://gist.github.com/khatthaphone/6ecc58601c07c2948d564bef4c2c0976 | |
// tested and compiled with clang 3.8.0-2ubntu4 on ubuntu 16.04.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity | |
android:name=".activity.MainActivity"> | |
<!--ເພີ່ມບ່ອນນີ້--> | |
<meta-data | |
android:name="android.app.searchable" | |
android:resource="@xml/searchable" /> | |
</activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.sengx.intentdemo; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ປະກາດຕົວປ່ຽນທີ່ຄົງຄ່າເປັນແບບ define ເພາະຈະເກັບຄ່າຄົງຄ່າບໍ່ສາມາດປ່ຽນແປງໄດ້ (constant) | |
// ແລະ ປະຢັດຄວາມຈຳ ເພາະໃຊ້ຄວາມຈຳຕາມຈຳນວນທີ່ໃຊ້ແທ້ | |
// (int ຈະຈອງຄວາມຈຳໄວ້ 4 bytes ບໍ່ວ່າເຮົາຈະເກັບຄ່າໜ້ອຍດຽວກໍຕາມແຕ່) | |
#define GAS_SENSOR A0 // ຂາທີ່ເຊື່ອມເຊັນເຊີແກສເອົາ input | |
#define LED 13 // ຂາທີ່ເຊື່ອມ LED ລາຍງານສະຖານະ | |
#define DANGER_GAS_LEVEL 250 // ຄ່າທີ່ຈະປຽບທຽບເມື່ອລະດັບແກສເທົ່າກັບ ຫຼື ຫຼາຍກວ່າຄ່ານີ້ ໃຫ້ເຮັດໄປກຳນົດ LED ລາຍງານສະຖານະ | |
int gas_level; // ຕົວປ່ຽນສຳລັບເກັບລະດັບແກສ |
NewerOlder