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
<?php | |
/** | |
* Get the validation rules that apply to the request. | |
* | |
* @return array | |
*/ | |
public function rules() | |
{ | |
return [ | |
static::$poolName => 'required|string', |
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
<?php | |
/** | |
* Retrieve a user by their unique identifier. | |
* | |
* @param mixed $identifier | |
* @return Authenticatable|null | |
*/ | |
public function retrieveById($identifier) | |
{ | |
return session($identifier, null); |
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
<?php | |
/** | |
* Validate a user against the given credentials. | |
* | |
* @param Authenticatable $user | |
* @param array $credentials | |
* @return bool | |
*/ | |
public function validateCredentials(Authenticatable $user, array $credentials) | |
{ |
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 random | |
import torch | |
import pathlib | |
import os | |
from torch.utils import data | |
import PIL | |
import PIL.Image | |
from collections import defaultdict | |
from bisect import insort_right |
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 app.submissions.dicoding.footballmatchschedule | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.support.v7.widget.LinearLayoutManager | |
import android.view.View | |
import android.view.ViewGroup | |
import android.widget.TextView |
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 bisect | |
n = int(input('')) | |
n_scores = input('') | |
n_scores = map(int, n_scores.split()) | |
m = int(input('')) | |
m_scores = input('') | |
m_scores = map(int, m_scores.split()) |
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
<?php | |
$data = Model::all(); | |
$graphData = $data->map(function($item, $key) { | |
return [ | |
'y' => $item->net_lending, | |
'name' => $item->nama_cab | |
]; | |
}); |
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
def valid_n(n): | |
return 2 < n < 10 | |
def valid_z(z): | |
return 1 < z < 100000 | |
def F(x, y, z, n): | |
value = x**n + y**n - z**n |
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
antRoutes = [ | |
[1,2,9,10,25,26], | |
[4,3,8,11,24,27], | |
[5,6,7,12,23,28], | |
[16,15,14,13,22,29], | |
[17,18,19,20,21,30], | |
[36,35,34,33,32,31] | |
]; | |
detik = input('Semut di detik berapa? ') |
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
mkdir build && | |
cd build && | |
cmake -DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DENABLE_CXX11=ON \ | |
-DBUILD_PERF_TESTS=OFF \ | |
-DWITH_XINE=ON \ | |
-DBUILD_TESTS=OFF \ | |
-DENABLE_PRECOMPILED_HEADERS=OFF \ |
NewerOlder