Skip to content

Instantly share code, notes, and snippets.

View devloe's full-sized avatar

Juan Pablo Lozano devloe

View GitHub Profile
<?php
array(5) {
["WebAuthenticationDetail"] array(1) {
["UserCredential"] array(2) {
["Key"] "E3naToZ4L9zjveIg"
["Password"] "ifyFeqYnrE3zjbjeT882dSMqS"
}
}
["ClientDetail"] array(2) {
[
{
"title": "Cada día sabemos más y entendemos menos.",
"author": "Albert Einstein"
}, {
"title": "Hemos averiguado que vivimos en un insignificante planeta de una triste estrella perdida en una galaxia metida en una esquina olvidada de un universo en el que hay muchas más galaxias que personas.",
"author": "Carl Sagan"
}, {
"title": "Si estamos solos en el Universo, seguro sería una terrible pérdida de espacio.",
"author": "Albert Einstein"
[
{
name: "Hotel Dante",
stars: 4,
url: "http://www.hoteldante.com",
url_book: "http://www.hoteldante.com/reserva.php", // url de la página de reserva que se ve en el iframe
created: "2009-10-06",
photos: ["http://www.dominio.com/foto1.jpg", "http://www.dominio.com/foto2.jpg", "http://www.dominio.com/foto3.jpg"],
address: "Av. Street 19",
location: [0.94352343543, 0.452352345234],
// Sluggify inputs with name attribute beggining
// with "title". The result is apply to inputs with
// attribute name beggning with "slug"
$(".form-extended").each(function()
{
var self = this;
var slug = $("[name^=slug]", self);
$("[name^=title]", self).on("keydown blur", function(){
@devloe
devloe / BLdqH.markdown
Created August 22, 2014 16:38
Natural form killer.
@devloe
devloe / gist:182488903a5c2b63d87b
Last active June 4, 2023 17:40
Ejemplo básico de CRUD en Laravel
<?php
// Tenemos un objeto producto en la base de datos
class Product extends Eloquent
{
protected $table = 'products';
}
class BaseController extends Controller{
05-07 23:06:27.920 1239-1239/com.devyanlab.qomento E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache
05-07 23:06:27.924 1239-1239/com.devyanlab.qomento E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
05-07 23:06:38.944 1239-1239/com.devyanlab.qomento E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.devyanlab.qomento/com.devyanlab.qomento.SignupActivity}: android.view.InflateException: Binary XML file line #61: Error inflating class de.hdodenhof.circleimageview.CircleImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.
@devloe
devloe / acitvity
Last active December 30, 2015 00:28
videoAdapter = new VideoAdapter(this, videoItems);
listView.setAdapter(videoAdapter);
listView.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> av, View v, int position,
long id) {
VideoModel data = (VideoModel) listView.getItemAtPosition(position);
data.start = true;
videoAdapter.notifyDataSetChanged();
//VideoLayout view = (VideoLayout) listView.getChildAt(position - listView.getFirstVisiblePosition());
public static void connect(String url)
{
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet("http://192.168.1.36/breves/_beta/public/" + url);
HttpResponse response;
try {
response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
if (entity != null) {
InputStream instream = entity.getContent();
<?
$SQL_query_init = mysql_query('select * from ' . TBL_IMGEMPREN . ' where `id_em` = "'.$idparent.'" and `area` = "mini_estado" and `estado` = "general" ');
while($campi = mysql_fetch_array($SQL_query_init)) { ?>
<a href="../data/emprendimientos/<?=$campi['area']?>/<?=$campi['archivo_nombre']?>" class="fancybox">
<img src="../data/emprendimientos/<?=$campi['area']?>/<?=$campi['archivo_nombre']?>">
</a>
<? } ?>