This file contains hidden or 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.stou.myapp1 | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.Gravity | |
import android.widget.Button | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.toast_test.* | |
class MainActivity : AppCompatActivity() { |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center_horizontal|center_vertical"> | |
<Button | |
android:id="@+id/button4" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" |
This file contains hidden or 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
# Have you ever saw this error while trying to merge/embed subtitles | |
# into a video file on Windows? | |
# | |
# Fontconfig error: Cannot load default config file | |
# [Parsed_subtitles_0 @ 0000000002bf1ee0] No usable fontconfig configuration # file | |
# found, using fallback. | |
# Fontconfig error: Cannot load default config file | |
# | |
# This scripts merges subtitles (if present) and transcodes video files | |
# to H.264 mp4 video files with similar quality level. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
function doGet(e){ | |
// URL ของ sheet เรา | |
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/18P8xV_kaKlI-aU7tvMR9i8ncihw0sm-ZM3XBOfHHMXI/edit#gid=0"); | |
// ใส่ชื่อ sheet | |
var sheet = ss.getSheetByName("Users"); | |
return getUsers(sheet); | |
This file contains hidden or 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
เพิ่ม | |
intentMap.set('sheet', scoreHandler); | |
อย่าลืม callback | |
function scoreHandler(agent){ | |
let i = ""; | |
const score = request.body.queryResult.parameters.score; | |
return axios.get('ใส่ api หรือลิงก์ไฟล์ json').then((result) => { | |
if(!!score){ | |
for(i in result.data){ |
This file contains hidden or 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
class Article < ApplicationRecord | |
extend FriendlyId | |
friendly_id :title, use: [:slugged, :history] | |
has_one_attached :image | |
has_many_attached :attachments | |
def normalize_friendly_id(value) | |
sep = "-" | |
value.to_s | |
url_reserved = /[<>#%"\[\]\{\}\|\/\^:;@&=$\+,\\]|\s+/ |
This file contains hidden or 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 java.util.Scanner; | |
public class samiti { | |
public static void main(String args[]){ | |
//Choose Logic | |
int choose = 0; | |
This file contains hidden or 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 static java.lang.Math.abs; | |
public class EvenOddSum { | |
public static void main(String args[]) { | |
int odd = 0; | |
int even = 0; | |
int i = 0; | |
while( i<=100){ |
This file contains hidden or 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
// Listener Autofill | |
const AUTOFILLED = 'is-autofilled'; | |
const onAutoFillStart = (el) => el.classList.add(AUTOFILLED); | |
const onAutoFillCancel = (el) => el.classList.remove(AUTOFILLED); | |
document.querySelector('input').addEventListener('animationstart', onAnimationStart, false); | |
const onAnimationStart = ({ target, animationName }) => { | |
switch (animationName) { | |
case 'onAutoFillStart': | |
return onAutoFillStart(target) |