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
package solitari; | |
public class Carta { | |
int numero; | |
int seme; | |
public Carta(int numero, int seme) { | |
this.numero = numero; | |
this.seme = seme; |
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
private static String getConsonanti(String stringa) { | |
String risultato = ""; | |
for(int i = 0; i < stringa.length(); i++) { | |
if("AEIOU".indexOf(stringa.charAt(i)) == -1) { | |
risultato += stringa.charAt(i); | |
} | |
} | |
return risultato; | |
} |
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
(function(d,b,e,g){for(var h=e-b,c=Array(d),f={};b<=e;b++){var a=b;do a=a.toString().split("").reduce(function(a,b){return parseInt(a,10)+parseInt(b,10)});while(a>d||-1<g.indexOf(a));c[a-1]=void 0===c[a-1]?1:c[a-1]+1}c.forEach(function(a,b){f[b+1]=100*a/h});return f})(24,1362,1832,[17]); |
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\Database\Eloquent\Model as Eloquent; | |
class Model extends Eloquent { | |
public function scopeNext($query) | |
{ | |
$id = $this->getKeyName(); | |
$query = $this->newQuery(); |
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 _filterEmail($email) | |
{ | |
$rule = array("\r" => '', "\n" => '', "\t" => '', '"' => '', ',' => '', '<' => '', '>' => ''); | |
return strtr($email, $rule); | |
} | |
function _filterName($name) |
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
#!/bin/bash | |
CMD="env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh; | |
brew update; brew upgrade; brew cleanup; | |
composer self-update; composer global update; homestead update" | |
if [ "$1" = "-b" ]; then | |
> ~/.upgrade.log | |
eval "( $CMD ) >~/.upgrade.log 2>&1 &" | |
else | |
eval $CMD |
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
class Data { | |
protected: | |
int day_, month_, year_; | |
bool valid_; | |
bool isLeapYear(int year) | |
{ | |
return year % 4 == 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
var animate = function() { | |
var t = {delay: 0,duration: 400,easing: "0.645 0.045 0.355, 1"}, e = function() { | |
return Array.prototype.includes ? function(t, e) { | |
return t.includes(e) | |
} : function(t, e) { | |
return t.some(function(t) { | |
return t === e | |
}) | |
} | |
}(), n = function() { |
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
<android.support.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:theme="@style/PenPalTheme" | |
android:fitsSystemWindows="true" | |
tools:context=".MainActivity"> |
OlderNewer