CoPilot Live para Android, al fin un buen GPS

Filed Under (Android) by admin on 02-07-2009

Tagged Under : , ,

Con el lanzamiento de iPhone OS 3.0 se anunció que diversas aplicaciones de navegación GPS llegarían para el terminal de Apple. También los poseedores de un teléfono con Android podrán disfrutar de esta funcionalidad, pues se acaba de presentar CoPilot Live para Android

Este software de navegación GPS permite no solo convertir nuestro móvil en un navegador convenciional, sino que aprovecha la conectividad de este para añadir funciones adicionales. Así, por ejemplo, podemos recibir información del tráfico, previsiones del tiempo o ver la localización de nuestros contactos.
CoPilot Live para Android ofrece navegación guiada por voz con mapas en 2D y 3D. También incorpora funciones adicionales como asistente de carril, alertas de velocidad y de radares o carteles de dirección realistas. Se integra con las funciones del teléfono, permitiendo realizar llamadas a los puntos de interés, navegar a nuestros contactos o compartir nuestra localización por SMS.

Está disponible en el Android Market y la versión con mapas de España y Portugal tiene un precio de 26 libras, mientras que la versión con mapas de toda Europa cuesta 60 libras.

Linq to SQL Debug Visualizer, depura facilmente tus consultas LINQ to SQL

Filed Under (.Net, LINQ, SQLServer) by admin on 01-07-2009

Tagged Under : , ,

Using the LINQ to SQL Debug Visualizer

One of the nice development features that LINQ to SQL supports is the ability to use a “debug visualizer” to hover over a LINQ expression while in the VS 2008 debugger and inspect the raw SQL that the ORM will ultimately execute at runtime when evaluating the LINQ query expression.

For example, assume we write the below LINQ query expression code against a set of data model classes:

We could then use the VS 2008 debugger to hover over the “products” variable after the query expression has been assigned:

And if we click the small magnifying glass in the expression above, we can launch the LINQ to SQL debug visualizer to inspect the raw SQL that the ORM will execute based on that LINQ query:

If you click the “Execute” button, you can even test out the SQL query and see the raw returned results that will be returned from the database:

This obviously makes it super easy to see precisely what SQL query logic LINQ to SQL ORM is doing for you. 

You can learn even more about how all this works by reading the Part 3: Querying our Database segment in my LINQ to SQL series above.

How to Install the LINQ to SQL Debug Visualizer

The LINQ to SQL Debug Visualizer isn’t built-in to VS 2008 – instead it is an add-in that you need to download to use.  You can download a copy of it here.

The download contains both a binary .dll assembly version of the visualizer (within the \bin\debug directory below), as well as all of the source code for the visualizer:

To install the LINQ to SQL debug visualizer, follow the below steps:

1) Shutdown all running versions of Visual Studio 2008

2) Copy the SqlServerQueryVisualizer.dll assembly from the \bin\debug\ directory in the .zip download above into your local \Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers\ directory:

3) Start up Visual Studio 2008 again.  Now when you use the debugger with LINQ to SQL you should be able to hover over LINQ query expressions and inspect their raw SQL (no extra registration is required).

El TraceSystem para ver resultados por consola

Filed Under (.Net) by admin on 29-06-2009

Tagged Under : , ,

Util para trazas:

System.Diagnostics.Trace.TraceInformation(“blabla”)

String Format for Double [C#]

Filed Under (.Net) by admin on 29-06-2009

Tagged Under : ,

The following examples show how to format float numbers to string in C#. You can use static method String.Format or instance methods double.ToString and float.ToString.

Digits after decimal point

This example formats double to string with fixed number of decimal places. For two decimal places use pattern „0.00“. If a float number has less decimal places, the rest digits on the right will be zeroes. If it has more decimal places, the number will be rounded.

[C#]

// just two decimal places
String.Format("{0:0.00}", 123.4567);      // "123.46"
String.Format("{0:0.00}", 123.4);         // "123.40"
String.Format("{0:0.00}", 123.0);         // "123.00"

Next example formats double to string with floating number of decimal places. E.g. for maximal two decimal places use pattern „0.##“.

[C#]

// max. two decimal places
String.Format("{0:0.##}", 123.4567);      // "123.46"
String.Format("{0:0.##}", 123.4);         // "123.4"
String.Format("{0:0.##}", 123.0);         // "123"

Digits before decimal point

If you want a float number to have any minimal number of digits before decimal point use N-times zero before decimal point. E.g. pattern „00.0“ formats a float number to string with at least two digits before decimal point and one digit after that.

[C#]

// at least two digits before decimal point
String.Format("{0:00.0}", 123.4567);      // "123.5"
String.Format("{0:00.0}", 23.4567);       // "23.5"
String.Format("{0:00.0}", 3.4567);        // "03.5"
String.Format("{0:00.0}", -3.4567);       // "-03.5"

Thousands separator

To format double to string with use of thousands separator use zero and comma separator before an usual float formatting pattern, e.g. pattern „0,0.0“ formats the number to use thousands separators and to have one decimal place.

[C#]

String.Format("{0:0,0.0}", 12345.67);     // "12,345.7"
String.Format("{0:0,0}", 12345.67);       // "12,346"

Zero

Float numbers between zero and one can be formatted in two ways, with or without leading zero before decimal point. To format number without a leading zero use # before point. For example „#.0“ formats number to have one decimal place and zero to N digits before decimal point (e.g. „.5“ or „123.5“).

Following code shows how can be formatted a zero (of double type).

[C#]

String.Format("{0:0.0}", 0.0);            // "0.0"
String.Format("{0:0.#}", 0.0);            // "0"
String.Format("{0:#.0}", 0.0);            // ".0"
String.Format("{0:#.#}", 0.0);            // ""

Align numbers with spaces

To align float number to the right use comma „,“ option before the colon. Type comma followed by a number of spaces, e.g. „0,10:0.0“ (this can be used only in String.Format method, not in double.ToString method). To align numbers to the left use negative number of spaces.

[C#]

String.Format("{0,10:0.0}", 123.4567);    // "     123.5"
String.Format("{0,-10:0.0}", 123.4567);   // "123.5     "
String.Format("{0,10:0.0}", -123.4567);   // "    -123.5"
String.Format("{0,-10:0.0}", -123.4567);  // "-123.5    "

Custom formatting for negative numbers and zero

If you need to use custom format for negative float numbers or zero, use semicolon separator;“ to split pattern to three sections. The first section formats positive numbers, the second section formats negative numbers and the third section formats zero. If you omit the last section, zero will be formatted using the first section.

[C#]

String.Format("{0:0.00;minus 0.00;zero}", 123.4567);   // "123.46"
String.Format("{0:0.00;minus 0.00;zero}", -123.4567);  // "minus 123.46"
String.Format("{0:0.00;minus 0.00;zero}", 0.0);        // "zero"

Some funny examples

As you could notice in the previous example, you can put any text into formatting pattern, e.g. before an usual pattern „my text 0.0“. You can even put any text between the zeroes, e.g. „0aaa.bbb0“.

[C#]

String.Format("{0:my number is 0.0}", 12.3);   // "my number is 12.3"
String.Format("{0:0aaa.bbb0}", 12.3);          // "12aaa.bbb3"

See also

Interesante Uploader para JQuery (jqUploader)

Filed Under (JavaScript) by admin on 24-06-2009

Tagged Under : ,

Dejo la página web:

http://www.pixeline.be/experiments/jqUploader/

Tiene demos.

Más de lo mismo:

http://www.phpletter.com/Our-Projects/AjaxFileUpload/

http://www.arzion.com/empresa-de-internet/posts/Subiendo-archivos-con-ajax-a-traves-de-JQuery

RingDroid

Filed Under (Android) by admin on 17-06-2009

Tagged Under : , ,

RingDroid es una pequeña aplicación que se ha ganado un puesto en muchos terminales Android y es que pese a su limitado tamaño ofrece una posibilidad muy solicitada, el poder seleccionar determinadas partes de nuestras canciones y guardar dichas partes como tono de alarma, tono de notificación o incluso tono de llamada siendo esta guardada de un modo que podamos asignar determinados tonos a nuestros contactos sin tener que usar única y exclusivamente los tonos que vienen por defecto en nuestro HTC Magic.

Si bien es cierto que desde nuestros contactos podemos asignar un todo a todos y cada uno de ellos, ese tono debe ser uno de los incluidos de serie con el terminal, algo que en caso de ir asignando tonos se hace realmente difícil el poder seleccionar el tono más adecuado teniendo en cuenta que son tonos incluidos que probablemente poco tengan que ver con nuestro contacto. Si a nuestra pareja o amigos los hemos relacionado con determinadas canciones, lo mejor es poder asignar dichas canciones con las que poder identificarlos y ahí es cuando RingDroid aparece como una interesante aplicación que nos facilita este hecho.

RingDroid nos permite seleccionar determinadas partes de una canción que nos puedan interesar, sea el estribillo, determinados ritmos, etc. Una vez hecha la selección podemos hacer una previsualización de la misma y ver si hemos clavado el comienzo y el final de dicha selección y entonces la podremos guardar como tono, en caso de quererla guardar como tono de llamada, automáticamente se insertará dentro de nuestros tonos por defecto por lo que ya será posible seleccionar dicho tono a la hora de asignar una canción a uno de nuestros contactos o por lo contrario poder seleccionar la reciente selección como tono predefinido para nuestro terminal.

Ringdroid ofrece una interfaz muy sencilla que nos facilitará el trabajo de poder seleccionar determinadas partes de nuestras canciones con dos pestañas que, tan solo arrastrando marcaremos el comienzo y el final del trozo deseado.

Minimizar Thunderbird en la TaskBar

Filed Under (Internet) by admin on 17-06-2009

Tagged Under : , ,

Os dejo un plugin para no tener que estar con el thunderbird abierto en la barra de windows:

https://addons.mozilla.org/es-ES/thunderbird/addon/2110

La jQuery UI, jQuery tuneado

Filed Under (JavaScript) by admin on 17-06-2009

Tagged Under : , , , ,

Desde http://jqueryui.com/ puedes descargarte la versión completa de jQuery ( o descargarte la parte que más te interese: http://jqueryui.com/download) y además acompañarla de un Theme que la verdad estan bastante currandos ( http://jqueryui.com/themeroller/ )

En la imagen os dejo mis pruebas con el Theme “Start”

Llamadas sencillas AJAX con JQUERY

Filed Under (JavaScript) by admin on 17-06-2009

Tagged Under : , , , ,

Antes de todo y si se quiere emepzar bien, no será de más echarle una ojeada a la documentacion de JQuery, que relativamente no es mucha: http://docs.jquery.com/Main_Page

1- ponemos un identificador (atributo id) para seleccionarlo desde jQuery.

 <a href="#" id="enlaceajax">Haz clic!</a>

2- recordemos cómo asignar una función para cuando se haga clic en el enlace:

$(document).ready(function(){

$("#enlaceajax").click(function(evento){

//elimino el comportamiento por defecto del enlace

evento.preventDefault();

//Aquí pondría el código de la llamada a Ajax

});

})

3- Y ahora la parte más interesante, donde podemos ver qué tan fáciles son las cosas con este framework Javascript. Una única línea de código será suficiente:

 $("#destino").load("contenido-ajax.html");

Ejemplo completo:

<html>

<head>

<title>Ajax Simple</title>

<script src="jquery-1.3.2.min.js" type="text/javascript"></script>

<script>

$(document).ready(function(){

$("#enlaceajax").click(function(evento){

evento.preventDefault();

$("#destino").load("contenido-ajax.html");

});

})

</script>

</head>

<body><a href="#" id="enlaceajax">Haz clic!</a>

<br>

<div id="destino"></div>

</body>

</html>

Tambien es muy interesante, aparte de ver la callback de load en el ejemplo anterior, ver la $.ajax(options)

De tal forma de hacer llamadas así de facil:

 $.ajax({   type: "POST",

url: "some.php",

data: "name=John&location=Boston",

success: function(msg){

alert( "Data Saved: " + msg );

}});

Más documentación en la API de AJAX de JQuey :  http://docs.jquery.com/Ajax

App de Google Analytics para Iphone

Filed Under (Iphone) by admin on 10-06-2009

Tagged Under : , , ,

Completa app para Iphone de el motor de estadisticas de Google.

Disponible en la AppStore por $5.99

http://analyticsapp.com/