Skip to content

Instantly share code, notes, and snippets.

View chrishieu's full-sized avatar
🧑‍🚒
keep calm and stay focused

chrishieu

🧑‍🚒
keep calm and stay focused
View GitHub Profile
<?php
class TextInput {
// Properties
public $value;
// Methods
function add($text) {
$this->value .= $text;
}
<?php
$a1=array('Ava', 'Emma', 'Olivia');
$a2=array('Olivia', 'Sophia', 'Emma');
function unique_names ($a1, $a2) {
return (array_unique(array_merge($a1,$a2), SORT_REGULAR));
}
print_r(unique_names($a1, $a2));
<?php
$input = array("Input.txt" => "Randy", "Code.py" => "Stan", "Output.txt" => "Randy");
$arr = array();
foreach ($input as $key => $item) {
$arr[$item][] = $key;
}
var_dump($arr);
@chrishieu
chrishieu / sample_resp.json
Last active August 27, 2021 09:04
Hieu_sample_resp_public
{
"value": {
"id": "01f15513-d59d-4082-a145-3cd4a5084741",
"result": "D",
"reason": "Credo: High Risk Country (Vietnam)",
"statedIp": "0:0:0:0:0:ffff:ac12:4",
"accountCode": "credolab_test@mafc.com.vn",
"trackingNumber": 140497178202088257,
"details": {
"device": {
@chrishieu
chrishieu / frms.json
Created June 15, 2020 06:39
FRMS Phase 1 Output Proc
{
"status" : "True",
"data": []
}
{
"status" : "False",
"data": []
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
import { Get, Controller, Render, Dependencies } from '@nestjs/common';
import { CategoryServiceImpl } from 'Services/Implementation/category.service.impl';
import { CategoryService } from 'Services/category.service';
import { DictionaryServiceImpl } from 'Services/Implementation/dictionary.service.impl';
import { PromotionServiceImpl } from 'Services/Implementation/promotion.service.impl';
import { PromotionService } from 'Services/promotion.service';
import { DictionaryService } from 'Services/dictionary.service';
@Controller()
@Dependencies(CategoryServiceImpl, PromotionServiceImpl, DictionaryServiceImpl)
<html>
<head>
<title>Quà tặng từ Savy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="shortcut icon" type="image/png" href="https://savy.tpb.vn/money_saving/images/popup/20181104/1541297408704.png"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style type="text/css">
@font-face {
font-family: TP;
{
"success": "true",
"code": 200,
"notify": {
"code": 204,
"message": "No content",
},
"popup":{
"code": 204,
"message": "No content",
{
"success": "true",
"code": 200,
"popup":{
"code": 200,
"image": "https://www.shopsundek.com/upload/articoli/dettaglio/BIKINI-MINI-MAGNOLIA-A-TRIANGOLO-SUNDEK_7982_dettaglio.jpg",
"text": "Lorem ipsum"
},
"notify": {
"code": 200,