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 | |
namespace App\Http\Controllers; | |
use App\Place; | |
use App\Schedule; | |
use Illuminate\Http\Request; | |
class ScheduleController extends Controller | |
{ |
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
$ laravel new Todois |
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
=============================================================================================================== | |
0. Buat fungsi sederhana untuk menghitung jumlah huruf hidup dan huruf mati dari suatu kalimat. Contoh: | |
input: "omama" hasil: "huruf mati: 2, huruf hidup: 2" (huruf hidup yaitu o dan a. a tidak perlu muncul 2x) | |
1. Buat fungsi sederhana untuk mengurutkan abjad dari suatu kalimat, dengan memisahkan huruf hidup dan huruf mati. Contoh: | |
input: "omama" hasil: "aaomm" ('a', dan 'o' sebagai huruf hidup dan 'm' sebagai huruf mati) | |
input: "osama" hasil: "aaoms" | |
2. Buat webservice untuk salah satu fungsi di atas (boleh pilih nomor 0 atau nomor 1) |
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 pattern = [ | |
[2, 4, 5], | |
[1, 3, 4, 5, 6], | |
[2, 4, 5, 6], | |
[1, 2, 5, 7, 8], | |
[1, 2, 3, 4, 6, 7, 8, 9], | |
[2, 3, 5, 8, 9], | |
[4, 5, 8], | |
[4, 5, 6, 7, 9], | |
[5, 6, 8] |
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
DIR=deployments/docker | |
RECIPE=${DIR}/docker-compose.yaml | |
NAMESPACE=builder${COMPONENT} | |
MIGRATION_PATH=`pwd`/migrations/test | |
include .env | |
export $(shell sed 's/=.*//' .env) | |
DIND_PREFIX ?= $(HOME) |
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
/* | |
HOW TO USE | |
zipFile( FOLDER-WANT-TO-ZIP, TARGET-DIRECTORY ) | |
PACKAGE : archive/zip | |
*/ | |
func zipFile(source, target string) error { | |
zipfile, err := os.Create(target) | |
if err != nil { | |
return err |
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 command = (cmd, text, position) => { | |
let index = position - 1; | |
let countL = 0; | |
let countB = 0; | |
cmd.map(item => { | |
if(item === "l"){ | |
countL += 1 |
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
func TestFileUpload(t *testing.T) { | |
url := fmt.Sprintf("http://localhost%s/api/file-upload", HTTP_PORT_TEST) | |
var fileSize int = 1024 | |
sampleFile, err := createFileWithFormat(fileSize, ".jpeg") | |
if err != nil { | |
t.Fatal(err) | |
} | |
defer os.Remove(sampleFile) |
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 React, { Component } from 'react' | |
import { | |
View, | |
Text, | |
Image, | |
TouchableOpacity, | |
FlatList, | |
Dimensions, | |
StyleSheet | |
} from 'react-native' |
OlderNewer