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
/* Véi, foca no código | |
.---. | |
/o o\ | |
__(= " =)__ | |
//\'-=-'/\\ | |
) (_ | |
/ `"=-._ | |
/ \ ``"=. |
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 com.xxnoobmanxx.util; | |
import android.util.Pair; | |
import org.json.JSONObject; | |
import java.io.ByteArrayOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.UnsupportedEncodingException; |
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
$pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('MyProject\PDOStatement', array())); |
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 | |
/** | |
* This gist was based on a comment by yura_imbp at php.net | |
* http://php.net/manual/pt_BR/function.readfile.php#83653 | |
*/ | |
$local_file = 'file.zip'; | |
$download_file = 'name.zip'; | |
// set the download rate limit (=> 20,5 kb/s) |
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 com.xxnoobmanxx.util; | |
import android.Manifest; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.location.LocationManager; | |
import android.location.LocationProvider; | |
import android.os.Bundle; |
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
@if (isset($paginator) && $paginator->lastPage() > 1) | |
<ul class="pagination"> | |
<?php | |
$interval = isset($interval) ? abs(intval($interval)) : 3 ; | |
$from = $paginator->currentPage() - $interval; | |
if($from < 1){ | |
$from = 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
class ExampleAdapter extends PagerAdapter { | |
private List<String> strings; | |
private Context context; | |
public ExampleAdapter(Context context){ | |
this.context = context; | |
strings = new ArrayList<String>(); |
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
DELIMITER $$ | |
CREATE FUNCTION haversine_geo_distance (lat1 REAL, lon1 REAL, lat2 REAL, lon2 REAL) | |
RETURNS REAL | |
BEGIN | |
DECLARE RR LONG; | |
DECLARE o1 REAL; | |
DECLARE o2 REAL; | |
DECLARE Ao REAL; | |
DECLARE AA REAL; |
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
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); | |
header("Content-Type: application/force-download"); | |
header("Content-Type: application/octet-stream"); | |
header("Content-Type: application/download");; | |
header("Content-Transfer-Encoding: binary "); | |
header("Content-Disposition: attachment; filename=\"file.xls\""); | |
header("Pragma: no-cache"); | |
header("Expires: 0"); | |
$out = fopen("php://output", 'w'); |
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
[type="checkbox"].custom-checkbox { | |
display: none; | |
} | |
[type="checkbox"].custom-checkbox + label.custom-checkbox-placeholder { | |
display: inline-block; | |
width: 15px; | |
height: 15px; | |
margin: 0 5px; | |
border: 1px solid #444444; |
OlderNewer