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 | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Tests\TestCase; | |
class SettingsTest extends TestCase | |
{ | |
use DatabaseTransactions; | |
public function setUp() |
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 Illuminate\Http\Request; | |
class SettingsController extends Controller | |
{ | |
public function __construct() |
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
<template> | |
<div class="container"> | |
<div class="columns"> | |
<div class="column is-12"> | |
<div class="tabs help-tabs"> | |
<ul> | |
<li :class="[ lang === 'crontab' ? 'is-active' : '']"><a @click="lang='crontab'">Crontab</a> | |
</li> | |
<li :class="[ lang === 'php' ? 'is-active' : '']"><a @click="lang='php'">PHP</a></li> | |
<li :class="[ lang === 'bash' ? 'is-active' : '']"><a @click="lang='bash'">Bash</a></li> |
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
{ | |
"user": { | |
"debug": true, | |
"delay": 0.25, | |
"error_color": "D02000", | |
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme", | |
"gutter_theme_excludes": [], | |
"lint_mode": "background", | |
"linters": { | |
"php": { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Algolia with JS</title> | |
<link rel="stylesheet" href="app.css"> | |
</head> | |
<body> |
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
// PSR2 codin standard | |
class Foo extends Bar implements FooInterface | |
{ | |
public function sampleFunction($a, $b = null) | |
{ | |
if ($a === $b) { | |
bar(); | |
} elseif ($a > $b) { | |
$foo->bar($arg1); | |
} else { |
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 | |
trait HelloBufferWorld { | |
public function sayHello() { | |
echo 'Hello Buffer Engineers!'; | |
} | |
} | |
class ASampleClass { | |
use HelloBufferWorld; | |
} |
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 static org.junit.Assert.assertEquals; | |
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
/* | |
"Given an input string s, reverse words in a string." | |
Do this in-place without allocating an extra space. | |
The input string doesn't contain any leading or trailing |
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
#include <iostream> | |
#include <iomanip> | |
#include <algorithm> | |
#include <string> | |
using namespace std; | |
void reverseWordOrder(string::iterator begin, string::iterator end){ | |
// reverse string by chars | |
reverse(begin, end); | |
// now, reverse the words |
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
object Sorting { | |
def main(args: Array[String]) { | |
var lst = Array(1, 6, 2, 12, 22, 8, 99, 45, 12, 28, 1, 54) | |
val sortedList = quickSort(lst) | |
for(i <- sortedList) { | |
println(i) | |
} | |
} |
NewerOlder