wget -e robots=off -r -l 50 --timeout=10 -t 2 --delete-after http://webpage.com/;
ab -c 10 -n 1000 http://webpage.com...
Custom Plugin for Clients
<?php
/*
* Plugin Name: Client Plugin
* Plugin URI: http://webdesign.com
* Description: Custom Plugin for Clients
* Version:...
iOS SDK - GET UDID from different Device System Version
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
- (NSString*)deviceUDID...
iOS SDK Url encode for special characters
//!*'();:@&=+$,/?%#[]
- (NSString *)encodeWith:(NSString *)string
{
return CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,...
iOS SDK Custom NSLog
// Modify to Prefix.pch
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#import...
iOS SDK Fix Custom TextField Placehold issues
#import "CustomTextField.h"
#define TEXTFIELD_PADDING 10.0
@implementation CustomTextField
//placehold
- (CGRect)textRectForBounds:(CGRect)bounds
{
...
Split Excel Worksheets into New Workbooks and to any Image Format using Cl
#######
Section 1 ######
app_sid = '####### Section 1 ######
app_sid = '77******-1***-4***-a***-80**********'
app_key = '*********************'
Aspose::Cloud::Common::AsposeApp.new(app_sid,...
Image Replacement Code
/*
* Image replacement
*/
.ir {
overflow: hidden;
/* IE 6/7 fallback */
*text-indent: -9999px;
&:before {
content: "";
display:...
Declaring, Setting and Using Variables in SQL Script
/*
This example is connecting to a Lab Test table with LabTest = Name of Lab Test,
LabDate = Date that the LabTest was Performed
CREATE TABLE [dbo].[LabTests](
...
How To Add visual composer support to WP Touch Theme
function add_js_script () {
wp_enqueue_script( "js_script", plugins_url()."/js_composer/assets/js/js_composer_front.js" );
wp_enqueue_style(...
CSS check id name someone-text has in name id
div[id^="apply_form"] .row-fluid:first-child
{
margin-bottom:15px;...
Wordpress get/insert post attachments at custom size linked to custom size
<?php
// To insert custom loop of post attachments as images (at core or custom size) linked not to full size image but custom-configured (or core)...
How to Open all external links in a new window
$('a').each(function() {
// The link's href
var theHref = $(this).attr('href').toLowerCase();
// The current domain
var currentDomain = window.location.host;
...
Hides plugins from the plugins page by defined author(s)
<?php
/*
Author:
Description: Hides plugins from the plugins page by defined author(s)
Plugin Name: Plugin Hider
Plugin URI:
Text Domain: plugin-hider
...
How to Add "Post to Diigo" button on website
<a href="#" onclick="window.open('https://www.diigo.com/post?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),...
HTML5 Basic Markup
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport"...
Get Viewport width. jQuery
function viewportWidth() {
var $body = $('body'),
viewPortWidth = $body.css('overflow', 'hidden').width();
...
wordpress load post with ajax
*************** HEADER
<script>
$(document).ready(function(){
$.ajaxSetup({cache:false});
$(".trick").click(function(){...
Preliminary async-dal for Android
// AsyncHandler interface
public interface AsyncHandler {
void onSuccess(Object result);
void onError(Object result);
}
// DAO implementation
public...
php array()
<?php
$identity = array(
"name" => "Sam",
"age" => "47",
...
extract function use case
<?php
extract($identity); //var_dump(extract($identity)) == int 3
?&g...
Fix UITableView background issue on iOS 7
#pragma mark Table View Delegate methods
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath...
wordpress sort by post view
<?php
$args = array(
'orderby' => 'meta_value',
...
information about a file path
<?php
$path_parts = pathinfo('/www/htdocs/inc/lib.inc.php');
echo $path_parts['dirname'], "\n"; // /www/htdocs/inc
echo $path_parts['basename'],...
Refactoring of Jumping
private void Jump() {
if (touchingPlatform) {
rigidbody.AddForce(jumpVelocity, ForceMode.VelocityChange);
...
Read Tap as Jump
if ((Input.GetButtonDown("Jump")) ||
((Application.platform == RuntimePlatform.Android) && (Input.touchCount > 0 &&...
String to character in JAVA
// Case 1 with using charAt()
String str = "Hai Navas";
for(int i=0;i<str.lenght();i++){
char c = str.charAt(i);
System.out.println("Character"+i+":"+c);
}
//...
Script para comprobar el estado de Apache2.
#! /bin/bash
#Recomiendo insertar este script en el crontab para que se ejecute cada cierto tiempo.
npid="/var/run/apache2.pid"
if [ -e $npid ]
then
...
Wordpress excerpt
function improved_trim_excerpt($text) {
global $post;
if ( '' == $text ) {
...
Position Expression to place a layer on edge of solid
l = thisComp.layer("bar") //the control layer
startX = l.transform.position[0]; //the position of the control layer
s = l.transform.scale[0]/100; //the...
mytime.h
#include <sys/time.h>
#include <time.h>
#include <sys/timeb.h>
#include <stdlib.h>
#include <stdio.h>
#define TIME_s 0
#define...
Hire iOS developer from AgileInfoways.com
However, a number of the tips are all about Apple development such as whether the developer has experience with Objective-C coding, and Xcode tools....
Muffin Cheatsheet
<?php
/*
Plugin Name: Box WDC 10
Plugin URI: http://webdesign.com
Description: Add a simple author box to your blog
Version: 0.1
Author: Bob Bobertson
Author...
Make your forms responsive with this snippet of code.
<style>
.moonray-form
{
width: 100%!important;
max-width: 400px; /* Or whatever maximum width you would prefer to change...
iOS SDK UIScrollView - UIScrollIndicator flash
[self performSelector:@selector(flashScrollIndicators:) withObject:_scrollView afterDelay:0.5];
#pragma mark - UIScrollIndicator flash handling method
-...
Linear Range Mapping
// add a slider to a null
// use this slider to control another property
// the slider has a range of 0 to 100
// you can clamp that value by adjusting...
C# Code Sample to Create PDF from HTML Using REST API
stringstrURI = "http://api.aspose.com/v1.1/pdf/outPdfFile.pdf?templateFile=input.html&templateType=html";
stringsignedURI = Sign(strURI);
StreamReader...
Java Code Sample to Create PDF from HTML Using REST API
//build uri to create empty pdf
String strURI = "http://api.aspose.com/v1.1/pdf/outPdfFile.pdf?templateFile=input.html&templateType=html";
...
Ruby Code Sample to Create PDF from HTML Using REST API
app_sid = '77******-1***-4***-a***-8***********'
app_key = '89******************************'
Aspose::Cloud::Common::AsposeApp.new(app_sid, app_key)
#build...
jcarousel wrap and autoscroll
$('.jcarousel').jcarousel({
wrap:'both'
})
.jcarouselAutoscroll({interval:2000}...
Actualizar kernel en Ubuntu
#Mirar versión de kernel instalado.
uname -a
#Bajamos los paquetes necesarios correspondiente a la arquitectura de nuestro procesador.
http://kernel.ubuntu.com/~kernel-ppa/mainline
#Instalamos...
string.split = function(text, split)
result = {}
result2 = {}
a = text:gsub("(.-)" .. split, function(c) table.insert(result, c)...
string* greetingArray()
{
string greetings[50000];
for(int i = 0; i < 50000; i++)
{
...
public boolean intersects(ImageView block,ImageView round){
float blockBottom = block.getY()+block.getHeight();
float blockLeft = block.getX();
...
public class TopLevelViewModel
{
public TopLevelID { get; set; }
public TopLevelTitle { get; set; }
...
PRAVILA
1.Zabranjeno psovanje!
2.Zabranjeno fan 4 fan!
3.Zabranjeno pitati za rank!
4.Zabranjeno pustati pesme koje su duze od 5:00!
5.Zabranjeno pisati woot/skip/meh!
6.Zabranjeno...
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_mixer.h>
#include <iostream>
#include "Constants.h"
#include "Texture2D.h"
#include...
Subscribe to:
Posts (Atom)