public class GenericResponseMessage
{
// indicates result of HTTP API call, 200 = success, 400 = parameter invalid, 500 = internal server error
public int status { get; set; }
// indicates error messages, otherwise null
public string[] message { get; set; }
}
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 math | |
class D2Vector: | |
def __init__(self, X, Y): | |
self.X = X | |
self.Y = Y | |
def __add__(self, other): | |
X = self.X + other.X | |
Y = self.Y + other.Y |
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 csv | |
csvfiles = { | |
'ACRU': 'ACRU.csv', | |
'ANLI': 'ANLI.csv', | |
'BBUA': 'BBUA.csv' | |
} | |
data = {} | |
for key, filename in csvfiles.items(): |
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
<script> | |
let b = [{ | |
code: '999' | |
, problem: [{ | |
a: '1', | |
b: '2', | |
z: [{ | |
z1: '7z', | |
z2: '8z' | |
}, { |
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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script | |
src="https://code.jquery.com/jquery-3.2.1.min.js" | |
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" | |
crossorigin="anonymous"></script> | |
<script> |
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
using System; | |
using System.IO; | |
using System.Windows.Forms; | |
using testClientBinaryWebservice01.service1; | |
namespace testClientBinaryWebservice01 | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() |
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
// เช็คว่า มี permission READ_CONTACTS รึเปล่า | |
if (ContextCompat.checkSelfPermission(thisActivity,Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { | |
// เข้ามาในนี้ได้ แปลว่า ไม่มี | |
// Should we show an explanation? | |
if (ActivityCompat.shouldShowRequestPermissionRationale(thisActivity, | |
Manifest.permission.READ_CONTACTS)) { | |
// โชว์คำอธิบายแบบไม่บล็อค ตัวอย่างที่ไม่บล็อคก็เช่น toast ซึ่งข้อความันขึ้นมาบนจอก็จริง แต่โค้ดไม่ได้ค้าง | |
// this thread waiting for the user's response! After the user |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<style> | |
table,th, td { | |
border: 1px solid black; | |
} |
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
<!ELEMENT students (student+)> | |
<!ELEMENT student (firstname,middlename?,lastname,email)> | |
<!ELEMENT firstname (#PCDATA)> | |
<!ELEMENT middlename (#PCDATA)> | |
<!ELEMENT lastname (#PCDATA)> | |
<!ELEMENT email (#PCDATA)> | |
<!ATTLIST student id CDATA #REQUIRED> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AffineCiphers | |
{ | |
class Program | |
{ |
NewerOlder