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
<?php | |
function TwoSum($nums, $target) { | |
$map = []; | |
for ($i = 0; $i < count($nums); $i++) { | |
$complement = $target - $nums[$i]; | |
if (isset($map[$complement])) { | |
return [$map[$complement], $i]; | |
} |
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
<?php | |
function ThreeFive() { | |
for($i = 1; $i < 101; $i++) { | |
echo str_replace('3', 'Three', str_replace('5', 'Five', $i)) . ' '; | |
} | |
} | |
ThreeFive(); |
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
CREATE OR REPLACE PROCEDURE chat.get_by_property_id(IN property_id uuid, OUT _result record) | |
LANGUAGE plpgsql | |
AS $procedure$ | |
BEGIN | |
SELECT g.id, g.is_default, g.property_id INTO _result | |
FROM chat."group" g | |
WHERE g.property_id = property_id AND g.is_default = true; | |
IF NOT FOUND THEN | |
INSERT INTO chat.group(is_default, created_at, property_id) VALUES(true, now(), property_id) RETURNING * INTO _result; | |
END IF; |
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
2022-11-16T15:16:43+07:00 [info]: main - listening on http://192.168.144.3:4001 at 2022-11-16T15:16:43+07:00 | |
socket for redundant listening on http://192.168.144.3:4000 | |
2022-11-16T15:16:43+07:00 [info]: db.sqlite - SQLite Connection has been established successfully. | |
Add screen PID_NM_029 to zone1 | |
Add screen PID_NM_015 to zone3 | |
Add screen PID_S1_027 to zone7 | |
Add screen PID_NM_024 to zone2 | |
Add screen PID_NM_030 to zone1 | |
Add screen PID_S1_004 to zone10 | |
Add screen PID_NM_019 to zone2 |
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
const AUTHENTICATION_PROTO_DIR = path.resolve("proto/authentication"); | |
const authenticationProtoFiles = fs.readdirSync(AUTHENTICATION_PROTO_DIR); | |
const authenticationProtoPaths = _.map(authenticationProtoFiles, (f) => | |
path.join(AUTHENTICATION_PROTO_DIR, f) | |
); | |
const grpc = new GRPCClient( | |
authenticationProtoPaths, |
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
1 | |
<?xml version="1.0" encoding="UTF-8"?> | |
<WsPisDevicesState> | |
<Dev Type="PIS" Identifier="25" State="0" /> | |
<Dev Type="PIS" Identifier="26" State="0" /> | |
<Dev Type="PIS" Identifier="27" State="0" /> | |
<Dev Type="PIS" Identifier="28" State="0" /> | |
<Dev Type="PIS" Identifier="29" State="0" /> | |
<Dev Type="PIS" Identifier="30" State="0" /> | |
<Dev Type="PIS" Identifier="31" State="0" /> |
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
Params >> [ 1, 'Hello, this is a test ฟหกดเ้่กดพะเั้ี่ราส', 'en' ] | |
Request >> { | |
verb: 'PccWsPisShowSpecialMessage', | |
params: [ 1, 'Hello, this is a test ฟหกดเ้่กดพะเั้ี่ราส', 'en' ], | |
returnVal: [Function: httpReturnXml], | |
httpRequest: { | |
method: 'POST', | |
lowermethod: 'post', | |
path: '/', | |
lowerpath: '/', |
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
{ | |
"propertyId": "8a3d6183-305c-4ab1-a89b-bfb31194ed4d", | |
"template_id": "ead59f85-2706-4ce5-853b-ebc2ba5f27c1", | |
"title_th": "ไฟดับ TH", | |
"title_en": "ไฟดับ EN", | |
"description_th": " TH การไฟฟ้านครหลวง จัดตั้งศูนย์บริการข้อมูลข่าวสารการไฟฟ้านครหลวงที่ฝ่ายประชาสัมพันธ์และเผยแพร่ ชั้น 17 อาคารสำนักงานใหญ่ เพลินจิต เมื่อปี 2541 ต่อมาในปี 2555 การไฟฟ้านครหลวงได้ปรับปรุงโครงสร้างการแบ่งส่วนงาน จึงได้โอนงานศูนย์บริการข้อมูลข่าวสารการไฟฟ้านครหลวง มาสังกัดฝ่ายกฎหมายปัจจุบัน ศูนย์บริการข้อมูลข่าวสารการไฟฟ้านครหลวง ตั้งอยู่ที่บริเวณชั้น 1 อาคารสำนักงานใหญ่ การไฟฟ้านครหลวงวัตถุประสงค์\r\n1. เปิดเผย่ข้อมูลข่าวสารให้กับประชาชนในฐานะหน่วยงานของรัฐตามพระราชบัญญัติข้อมูลข่าวสารของราชการ พ.ศ. 2540\r\n2. สร้างความรู้ความเข้าใจแก่สาธารณชนในเรื่องสิทธิในการรับรู้ข้อมูลข่าวสารในการดำเนินการของการไฟฟ้านครหลวง\r\n3. รวบรวม จัดเก็บ และบริหารจัดการข้อมูลตามที่พระราชบัญญัติข้อมูลข่าวสาร พ.ศ. 2540 กำหนดให้เป็นระบบสามารถสืบค้นข้อมูลได้อย่างมีประสิทธิภาพ\r\n4. ดำเนินงานด้านข้อมูลข่าวสารของการไฟฟ้านครหลวง ให้คำปรึกษาและความรู้ความเข |
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
export const postEmergencyNews = async (formData, propertyId) => { | |
const accessToken = await token.get(); | |
// eslint-disable-next-line no-undef | |
const data = new FormData(); | |
_.forEach(formData, (item, key) => { | |
if (_.size(formData, 'file') > 0) { | |
if (key === 'file') { | |
data.append('file', { | |
uri: | |
Platform.OS === 'android' |
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
version: '3.1' | |
services: | |
sql-server1: | |
image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04 | |
ports: | |
- 1433:1433 | |
environment: | |
- ACCEPT_EULA=Y | |
- SA_PASSWORD=abcABC123 |
NewerOlder