This file contains hidden or 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 | |
echo "Hola Mundo"; | |
?> |
This file contains hidden or 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
/** | |
* Search Videos | |
* @param array $params | |
* | |
*/ | |
function search($params){ | |
$params = $this->__paramsToUrl($params); | |
$this->socket = new HttpSocket(); | |
$uri = "http://gdata.youtube.com/feeds/api/videos".$params; | |
$request = array( |
This file contains hidden or 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 | |
/** | |
* Search Videos | |
* @param array $params | |
* | |
*/ | |
function search($params){ | |
$params = $this->__paramsToUrl($params); | |
$this->socket = new HttpSocket(); | |
$uri = "http://gdata.youtube.com/feeds/api/videos".$params; |
This file contains hidden or 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
//Amarramos a las anchors un evento | |
$(document).ready(function(){ | |
$("a").click(function(){ | |
alert("hola mundo!"); | |
}); | |
}); | |
//hacemos una llamada ajax | |
$.ajax({ | |
type: "POST", |
This file contains hidden or 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
//Amarramos a las anchors un evento | |
$(document).ready(function(){ | |
$("a").livequery('click',function(event){ | |
alert("hola mundo!"); | |
}); | |
}); | |
//Con livequery unicamente nos preocupamos por hacer nuesta llamada | |
//live query se encarga de re-ligar los eventos :D | |
$.ajax({ |
This file contains hidden or 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#Author: David Valdez | |
#Correo: david.valdez210[arroba]gmail.com | |
#Commands: | |
# rola.py | |
version = "1.0" |
This file contains hidden or 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
#!/usr/bin/env python | |
import re | |
import urllib2 | |
class get_ip: | |
def __init__(self): | |
pass | |
This file contains hidden or 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 getGroupOrder($field){ | |
global $post,$wpdb; | |
$elements = $wpdb->get_results("SELECT group_count FROM ".RC_CWP_TABLE_POST_META." WHERE post_id = ".$post->ID." AND field_name = '{$field}' ORDER BY order_id ASC"); | |
foreach($elements as $element){ | |
$order[] = $element->group_count; | |
} |
This file contains hidden or 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 | |
$my_field_order = getGroupOrder('field'); | |
foreach($my_field_order as $value){ | |
$element = get('field',$value); | |
} | |
?> |
This file contains hidden or 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
#getting all posts related with a write panel in magicfields | |
select * from wp_posts where wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private') AND 0 < (SELECT count(wp_postmeta.meta_value) FROM wp_postmeta WHERE wp_postmeta.post_id = wp_posts.ID and wp_postmeta.meta_key = '_rc_cwp_write_panel_id' and wp_postmeta.meta_value = '{$write_panel_id}'); |
OlderNewer