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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = 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
import android.util.Log; | |
import java.util.Arrays; | |
/** | |
* RC4+ Encryption - from Stack Overflow | |
* Stack Overflow : http://stackoverflow.com/a/12290876 | |
* Original Code : https://code.google.com/p/a9cipher/source/browse/src/com/a9development/a9cipher/RC4.java?r=1b5bdf2a70b3ef8cc9464f8a31332a2ec9f54e7a | |
*/ |
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> | |
<!-- WYSIWYG Editor --> | |
<div class="editor mb-4"> | |
<editor-menu-bar class="editor-bar" :editor="editor"> | |
<div slot-scope="{ commands, isActive, focused, getMarkAttrs }"> | |
<!-- Image --> | |
<label | |
class="btn btn-plain mb-0" | |
:class="{ 'is-loading': isUploading }" | |
v-tooltip="'Add Image'"> |
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
<script> | |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(f){return f.raw=f};$jscomp.createTemplateTagFirstArgWithRaw=function(f,g){f.raw=g;return f}; | |
(function(f){var g=function(d,a,c){c=void 0===c?!1:c;a||(a=window.location.href);d="[?&]"+d.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)";a=(c?new RegExp(d):new RegExp(d,"i")).exec(a);if(!a)return null;if(!a[2])return"";a=(a=a[2].replace(/\+/g," "))?decodeURIComponent(a.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25")):a;return a=a.replace(/[&<>="#;]/g,"")},l=function(d){d+="=";for(var a=document.cookie.split(";"),c=0;c<a.length;c++){for(var b=a[c];" "===b.charAt(0);)b=b.substring(1,b.length);if(0===b.indexOf(d))return b.substring(d.length, | |
b.length)}return null},m=function(d,a){var c=encodeURIComponent,b=function(e){return e+"="+d[e]};(void 0===a?0:a)&&(b=function(e){return c(e)+"="+c(d[e])});return Object.keys(d).map(b).join("&")};setTimeout(function(){var d=f;d=void 0===d?"oo-link":d;var a=g("fbclid"),c=l("fbp"),b=l("fbc");d=docume |
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 | |
/* | |
* Plugin Name: Paulund WP List Table Example | |
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
* Plugin URI: http://www.paulund.co.uk | |
* Author: Paul Underwood | |
* Author URI: http://www.paulund.co.uk | |
* Version: 1.0 | |
* License: GPL2 | |
*/ |
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 | |
// requires php5 | |
define('UPLOAD_DIR', 'images/'); | |
$img = $_POST['img']; | |
$img = str_replace('data:image/png;base64,', '', $img); | |
$img = str_replace(' ', '+', $img); | |
$data = base64_decode($img); | |
$file = UPLOAD_DIR . uniqid() . '.png'; | |
$success = file_put_contents($file, $data); | |
print $success ? $file : 'Unable to save the file.'; |
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 Shuchkin\SimpleXLSX; | |
... | |
$file = $request->file('file'); | |
$file_path = $file->getRealPath(); | |
if ( $xlsx = SimpleXLSX::parse($file_path) ) { | |
$rows = $xlsx->rows(); |
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 app = express() | |
app.use(function (req, res, next) { | |
res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate'); | |
res.header('Expires', '-1'); | |
res.header('Pragma', 'no-cache'); | |
next() | |
}); |
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 String updateProfile(Map map) { | |
File image = (File) map.get(KEY_IMAGE); | |
File background = (File) map.get(KEY_BACKGROUND); | |
FCUser user = (FCUser) map.get(KEY_USER); | |
String userJsonString = user.toJSONUpdate().toString(); | |
// TODO : Change HTTPClient to HttpUrlConnection or Android Async HTTP and Upload Image | |
HttpClient httpClient = new DefaultHttpClient(); |
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
// Degrees to Radians | |
export const degsToRads = deg => (deg * Math.PI) / 180.0; | |
// Radians to Degrees | |
export const radsToDegs = rad => rad * 180 / Math.PI; | |
// Round like PHP Function | |
export const round = (num, dec) => { | |
var num_sign = num >= 0 ? 1 : -1; | |
return parseFloat((Math.round((num * Math.pow(10, dec)) + (num_sign * 0.0001)) / Math.pow(10, dec)).toFixed(dec)); |
NewerOlder