L-EXP

Most viewed Feeds


      view feed content Job Post: Debaser [Sydney] (Top 50 graphic design Blogs)   [39 views, last view 7 h, 20 min and 44 secs ago]

DEBASER are looking to hire a junior / mid-weight designer who is passionate about music. The successful applicant will be working in print (packaging, POS and advertising) but web/flash experience is also welcomed. This is not an entry level position, at least 2 years industry experience is necessary. Please send resume & pdf folio no bigger than 4 mb to enquiries@debaser.com.au.


[Centre Pane Jobs ]
Design is Kinky - Top 50 graphic design Blogs
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content iWep Lite, saca las claves WEP de las redes WIFI (Blogs sobre el iPhone)   [290 views, last view 7 h, 29 min and 10 secs ago]
languagetypetext/htmlvalue

ACTUALIZACIÓN:

Esta es la nueva dirección de repositorio.

http://wazdev.ueuo.com/apt/repo/

1) Debeis desinstalar las versiónes anteriores de iWep.
2) Eliminar las sources previas.
3) Añadir esta dirección como source en Cydia.

Un saludo.

_________________

Como muchos ya sabréis iWep Lite nos permite descifrar las claves de algunas redes wifis y poder conectarnos usando la red de “otro”.

iWep Lite se estrena en este repositorio:

http://wazdev.ueuo.com/repo/

Artículos relacionados


basehttp://feeds.feedburner.com/eiphone
[Noticias iwep lite redes wep wifi ]
EstudioiPhone - Blogs sobre el iPhone
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content A new website for a new Intype (Ruby on Rails editors ( IDE))   [7 views, last view 7 h, 32 min and 24 secs ago]
languagetypetext/htmlvalue

While Martin and Juraj are moving Intype closer and closer to a release state, the work on the new Intype web is also moving on.

So what’s new with the web? Well, almost everything. The website will get a brand new, fresh redesign, a new structure as well as a complete new backend system, written from scratch in Ruby on Rails.

New structure

The structure of the website will change a bit, to better fit the need for information for a new user, as well as for the daily user of Intype:

  • Homepage - a compilation of all the important stuff going on
  • Blog
  • Screencasts - after the 0.3.5 release there will be more and more of the magic moving pictures of Intype features
  • Releases - perhaps the most important section. This will be the place for all stable and unstable releases and their release notes.
  • Manual - here you will find a complete documentation of Intype and its features. This is where you send your friends asking about how things work in Intype and say “RTFM” :)
  • Community - a light alternative to current Intype forums. This is the area where the community will meet, share ideas, feature requests or report bugs
  • About - the team, history, the filosophy of Intype and stuff like that
New looks

A few pictures are more than a thousand words, so here’s how the whole thing will look like.

Note that these images are not tuned to perfection yet (text constrast, font sizes, etc.) and are being constantly improved in monthly iterations as the site is being build up (I hate Martin for this).

Homepage

Blog

Manual

basehttp://feeds2.feedburner.com/Intype-Blog
[Miscellaneous ]
Intype - Ruby on Rails editors ( IDE)
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content SproutCore Goes Mobile! (Javascript libraries for web development)   [83 views, last view 8 h, 15 min and 5 secs ago]
languageentypetext/htmlvalue

One of the reasons we rewrote the build tools for SproutCore 1.0 was to make it easier to support building for multiple platforms.  SproutCore is now made up of six different smaller frameworks that you can mix and match as needed.

Today at SXSW I had a few hours to kill so I took some time to work on one of the new platforms we want to support.  Introducing SproutCore Mobile:

SproutCore Mobile shares the same Runtime, Foundation, and Datastore frameworks as its desktop cousin but it will come with a completely different view layer - custom built for the phone.

Even more important - the example includes an HTML5 ApplicationCache manifest file, which will be automatically generated by the build tools.  This means when you load the app on the iPhone, the phone will save a cached copy of your app and reuse it on future runs.  No more 25K limit to keep cached files.

Best of all, you can “install” SproutCore apps directly on your phone just by clicking the + icon in Mobile Safari.  The phone will add an icon for the app to your dashboard and download and cache all the files.  Launching is really fast.

For enterprise applications that don’t go onto the iTunes store, this is a great way to distribute your software without going through the hassle of the manual installer.  If you want to go through the store, you can always take your SC app and package it using PhoneGap instead.

Currently SproutCore Mobile only contains the button view you see above.  It’s likely that it will only ship with that view when SproutCore 1.0 is released.  However, all the other technologies needed to build mobile apps will now be in place.  All we need to do is add the views.

basehttp://www.sproutcore.com/2009/03/15/sproutcore-goes-mobile/
[Announcements New Features ]
SproutCore - Javascript libraries for web development
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content La Tormenta: todos sus episodios con Christian Meier y Natalia Streignard (Premios revelación web 2007 Yahoo)   [136 views, last view 8 h, 29 min and 7 secs ago]
languagetypetext/htmlvalue

Hasta los menos avezados en culebrones, telenovelas y series de sobremesa recordarán esta telenovela de Telemundo que se emitió en Televsión Española con bastante éxito hace ya un par de temoradas. Toda una superproducción de las series latinas, La Tormenta narra la historia de María Teresa Montilla y Santos Torrealba, dos personas que vienen de mundos opuestos y que descubrirán que del odio al amor sólo hay un paso aunque ellos harán hasta lo imposible por evitar enamorarse. De la ciudad a la Hacienda familiar, el típico e idílico marco campestre sin las comodidades que una chica de su estatus espera encontrar, es el viaje repentino que cambia la vida de la protagonista, que no podía ser otra que Natalia Streignard, Miss Venezuela en 1992 y protagonista en otra series como El Juramento.

Segura de que logrará su objetivo, llegará a su destino y se dará cuenta de que las cosas no eran como las imaginó. El recibimiento será hostil, especialmente por parte de Santos Torrealba, el capataz de la hacienda, que tiene fama de macho seductor. Desde el mismo momento en que se conocen, María Teresa y Santos se declaran la guerra.

Como Don Juan en esta dupla tenemos a Christian Meier, actor y cantante peruano que ha dado la vuelta al mudo, sobre todo latino, con discos como No me acuerdo quien fuí (1996) o Primero en Mojarme (1998), y que mueve a millares de fans en el mudo online detrás de cada nuevo papel que interpreta.

En el afán de tener las mejores series gratis, crear el mejor canal de telenovelas y ofrecer episodio a episodio una programación diferente en internet, Telemundo estrena en ADNStream de nuevo todos los capítulos de La Tormenta. Disfrutad de esta primera entrega simplemente haciendo CLIC

basehttp://blog.adnstream.tv/feed/
[Contenido Novedades christian meier culebrón culebrones eisodio el juramento emitida en television emitido en tv episodios gratis foro telenovelas gratis hacendado hacienda la tormenta maria teresa montilla natalia streigrand novela santos torrealba seri]
ADNStream - Premios revelación web 2007 Yahoo
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Tutorial para instalar Mcleaner 1.8.1 (Blogs sobre el iPhone)   [372 views, last view 8 h, 40 min and 5 secs ago]
languagetypetext/htmlvalue

Es una aplicación creada para nuestras necesidades modernas, si alguna vez no querías contestar tu iPhone a cierta persona ya sea la novia, la suegra, el de la renta, etc. esta es la solución Mcleaner nos permite entre sus caracteristicas desviar llamadas especificas, es decri, si le ponermos un numero telefonico o celular podemos selecionar que pase cuando entre una llamada de ese numero, que se vaya a buzón, que marque ocupado, que marque apagado, que le conteste con un sms. Y tiene infinidad de funciones entre ellas las principales son:

  • 1. Filtrar sms y llamadas.
  • 2. Soporte para hacer lista de personas aceptadas y rechazadas
  • 3. Seis formas para rechazar una llamada o sms
  • 4. Poner perfiles para un rapido cambio de filtros
  • 5. Modo de calendario para algunas ocaciones.
  • 6. Protección con contraseña para la aplicacion e informes.
  • 7. Opción de informacion falsa tras poner un password incorrecto).
  • 8. Auto respuesta para SMS .
  • 9. Posibilidad de bloquear un numero escondido.
  • 11. Opción para quitar la vista rapida de los Sms.

Mas información acerca de la App en su pagina

La aplicación es de paga sin embago aqui estan los pasos para instalarla. Es sencilla, aunque parezca complicada, cualquier duda pueden ponerla en el mismo tema o en el foro y su servidor les ayudara.

Instrucciones para Mac:

Antes de empezar tienes que descargar en el iPhone OpenSSH, y GNU Debugger (Ambos los encuentras en Cydia) y poner el iPhone en “never autounlock”

1) Abre terminal en el Mac (se encuentra en /Aplicaciones/Utilidades/Terminal.app)

2) Ya abierto terminal Escribimos el sigueinte comando:

ssh root@”iphone ip”

( La ip la encontramos en el iPhone en Ajustes>wifi>En el nombre de la red le picamos la flechita azul) por ejemplo si la ip es 192.168.0.100 entonces escribiremos el comando “ssh root@192.168.0.100″

3 )Despues nos pedira el nombre de usuario: aqui escribimos “root” enseguida nos pedira el password aqui escribimos “alpine”

4) Ya que hemos entrado escribimos “gdb”

5) Ahora solo copiamos y pegamos los siguientes comandos:

break *0×00003320
break *0×00003348
commands 1
silent
print $r4
set $pc=0×3328
continue
end
commands 2
silent printf “\n\n\nSERIAL:%c%c%c%c%c%c%c%c! ENJOY!\n\n\n”,$1,$2,$3,$4,$5,$6,$7,$8
end
attach -waitfor MCleaner

6) Abre Mcleaner en el iPhone

7) Ahora Escribimos “continue” en el mac

8 ) Esperamos que se termine de cargar Mcleaner en el iPhone

9) Damos click en la opcion “Buy and Activate”

10) Escribimos de Numero de serie 00000000 (8 ceros)

11) Observamos el mac y en el gdb aparecera nuestro numero de serie

12) Cerramos gdb (escribiendo “quit” en Terminal)

13) Cerramos Mcleaner y lo volvemos a abrir

14) Damos click en la opcion “Buy and Activate” y ahora ponemos el Numero de serie que nos dio el gdb en el paso 11

————
Intrucciones para Windows:

1) Descargamos  Putty en la computadora
1a) Instalar OpenSSH desde Cydia (por si no lo tienes instalado)
2) instalamos GNU Debugger desde Cydia
3) Abrimos Putty y conectamos nuestro iPhone por medio de SSH, Aqui nos pedira unos datos
Usuario(login9: root
Contraseña(password): alpine

4) Escribimos gdb y damos enter en el putty
5) En gdb pegamos los siguientes comandos

break *0×00003320
break *0×00003348
commands 1
silent
print $r4
set $pc=0×3328
continue
end
commands 2
silent
printf “\n\n\nSERIAL:%c%c%c%c%c%c%c%c! ENJOY!\n\n\n”,$1,$2,$3,$4,$5,$6,$7,$8
end
attach -waitfor MCleaner

6) Abrimos  Mcleaner en el iPhone
7) Escribimos “continue” en la computadora (gdb)
8 ) Esperamos que Mcleaner se termine de cargar
9) Picamos donde diga Buy and Activate (en la app Mcleaner)
10) Escribimos como Numero de serie 00000000 (8 ceros)
11) Vemos la pantalla de la compu y aparecera el numero de serie
12) Escribimos en la compu  ”quit” para cerrar gdb
13) cerramos Mcleaner
14) Abrimos de nuevo el Mcleaner
15)  Picamos en  ”Buy and Activate” Escribimos nuestro numero de serie

Artículos relacionados


basehttp://feeds.feedburner.com/eiphone
[Aplicaciones Tutoriales ]
EstudioiPhone - Blogs sobre el iPhone
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content 25+ Magento Templates For Your E-Commerce Business (Top 20 technology world blogs by wikio)   [23 views, last view 8 h, 50 min and 11 secs ago]
languageentypetext/htmlvalue

Magento is a popular open source e-commerce software platform that has a modular architecture and is extremely flexible. It comes with a number of online shop maintenance capabilities. It is also simple to configure and easy to customize. And despite the fact that it was launched just last year, it has been gaining more and more popularity among Web designers and e-business owners.

Magento has a ton of credentials in its pocket from some very big e-solution players. Magento Enterprise Edition, a commercial version aimed at larger companies, was launched just a month ago. The CMS includes such advanced features as marketing, promotional and SEO tools; analytics and reporting; mobile commerce; catalog-management tools. And Magento users have the freedom to customize their store with new themes, templates and plug-ins.

Below you’ll find a showcase of excellent Magento templates for your e-commerce business. Hopefully, these templates and resources will serve you either as an inspiration for your themes, or as the foundation for your customized themes.

Free Magento Templates

Modern Theme | Live Demo | Download
This is an alternative to the default theme created by the Magento core team. It brings a more corporate look and feel, with a clean and simple design.

Magento Classic Theme | Live Demo | Download
Templates-Master’s first free professional Magento theme, the Classic Theme is available in 10 colors, all available for free download. This is CSS3-powered theme, easy to customize and coming with free updates.

Telescope Theme | Live Demo | Download
Created by MagThemes, this theme is very popular in the Magento community. It is freely available for download and has already been downloaded over 6,000 times.

Pet Store Theme | Full Preview | Download
This is the first free Magento theme from Template Monster. Very simple and light design, and easy to customize according to your needs.

Computer Store Theme | Live Demo | Download
When you download this ready-made Web page design, you can practice editing it to gain experience working with this type of theme.

Blue Skin | Live Demo | Download
Another alternative to the Magento default interface, this one with a very minimal design that focuses on the shopping cart.

Electronics Store Theme | Full Preview | Download
This theme has a rugged, mechanical appearance. The strong color and font would show off electronic devices well. To download this theme, just go to the store checkout and pay nothing; you’ll receive the theme by email within 24 hours.

Linen Theme | Live Demo | Download
Another free theme from MagThemes. Linen Theme is very flexible. It has a stretch design (can stretch to fit 90% of your browser window) and a clean and simple layout that draws your customer’s attention to the products.

Eco Fashion | Full Preview | Download
The Eco Fashion e-commerce template is very easy to customize. With minor changes to the CSS and images, you can transform this into your own personal theme. It comes loaded with some key SEO tools, such as lightweight CSS menus and main page content that appears before the column, footer and header blocks.

Girly Store Theme | Live Demo | Download
A free pink theme for stores targeted at girls. Includes theme files, the PSD source file for the logo and fonts. It has the same power as the default Magento template; only some minor changes were made to the CSS, images and theme code, but not the core files. So, you can update to new releases of Magento with no problem.

Refresh | Full Preview | Download
Refresh is a free W3C-compliant, CSS-based template based on the original HTML/CSS template by StyleShout.com. This work is distributed under the Creative Commons Attribution 2.5 License, which means you are free to use and modify it for any purpose.

iPhone Optimized Theme | Full Preview | Download
One more alternative skin to the default Magento interface. The very clean layout was created mainly with the iPhone in mind. It includes automatic detection and delivery of packages and themes (templates, skins, CSS, layout) based on the user-agent (client) that can be configured to global, website and store views. This video shows a preview of how Magento looks on the iPhone.

Commercial Magento Templates

HelloPerfect | Live Demo | $99.00
A professional Magento template with a rocking background style. It has a clean and easy-to-navigate Web 2.0-style interface, made with a variety of different types of stores in mind.

JM Purity | Live Demo | Membership starts at $59.00
This template is simple but very clean and professional; users can customize the color a lot in just a few simple steps. JoomlArt has integrated its standard user tool into JM Purity, which enables buyers to control font size and color (default, red and blue) for optimal viewing.

Women’s Store | Live Demo | $185.00
This theme is intended mainly for a women’s accessories store. It’s a Template Monster template, so it obviously comes in multiple sources like PSD, XML, CSS and PHTML. Anyone who appreciates elegant, modern and unusual e-commerce websites will understand that this is more than just another HTML-based template.

HelloUniversal | Live Demo | $99.00
This template is perfect for any type of business and is available in your choice of three fabulous eye-catching colors (red, green, blue). A great start for your new online shop! Comes with the source PSD file.

Lingerie Store | Live Demo | $195.00
Another Template Monster template, this one targeted at female customers. The front page includes a big Flash slideshow gallery to introduce the store and products.

HelloPod | Live Demo | $99.00
This wonderful new theme comes in three colors (orange, blue and green), suitable for any type of online store. With a wonderfully sophisticated design, the theme looks stunning, and the exclusive widget helps it stand out too! It can be edited easily using the PSD files included in the package, and it is very SEO-friendly. Compatible with all major browsers.

Fitness Store | Live Demo | $180.00
This theme is a fantastic addition to the Template Monster Club. It is another very neat and clean old-school design with some compelling features. It has the same flexibility and powerful features that other Template Monster templates are known for, including an adaptable design and layout, a black-and-white color scheme and SEO optimization.

HelloTimes | Live Demo | $99.00
This classy theme from HelloTheme comes in two color schemes (blue and orange or blue and green). It is CSS3-powered and suitable for any type of store. The front page design is very clean and simple and includes a JavaScript content/image slider widget.

JM Mesolite | Live Demo | Membership starts at $59.00
This theme is an exact port of JoomlArt’s famous Joomla-based “Mesolite” template, with the same great features. But you’ll see in this new theme JoomlArt’s first extensions for Magento, namely a category list, product list, product slider and slideshow, all of which optimize the presentation of products to potential customers. The product slider and product list allow you to localize your store by displaying a specific groupings of products (such as ones based on best buys, top-rated, most reviewed, etc.).

Flower Store | Live Demo | $188.00
This incredible Magento template features a clean and beautiful new look and feel, designed to allow for quick and easy customization. Suitable for any kind of store, and comes with a dark background and eye-catching header design.

HelloModern | Live Demo | $99.00
This professional template has a clean and easy-to-navigate interface and is made with a variety of different types of stores in mind. It includes a clean and professional Web 2.0-style design, with very fast-loading HTML code. Compatible with all major browsers, and comes with fonts, PSD files and instructions.

Art & Photo Store | Live Demo | $195.00
This template features a clean and simple design and plenty of Template Monster’s horsepower under the hood, with a front-page Flash gallery, perfect for displaying products. It’s optimized with the latest Web technologies to increase your website’s efficiency.

Megastore | Live Demo | $149.00
A very professional-looking Magento theme for all kinds of stores, but mainly larger stores with many categories and products. Many optional widgets and product-image magnifiers are available. Supports four-column category pages.

Grunge Theme | Live Demo | $149.00
Grunge Theme is perfect for skateboarding, BMX biking, snowboarding and other extreme sports stores. It comes with a new “high-slide” gallery for product images, transparent pages, cross-browser compatibility and a new color scheme.

HelloMinty | Live Demo | $99.00
Another HelloThemes template, featuring a clean and lightweight design based on modern standards and using the full power of Magento, including a JavaScript content/image slider widget, which is simply great for displaying featured products. This theme comes in three colors (pink, blue and green). Suitable for any type of store.

Times Universal Theme | Live Demo | $154.00
The home page layout of the Times Universal Theme has three columns and JavaScript product and image sliders that are easy to use and SEO-friendly. It can be used for any kind of store that needs a classic look. Product tabs and a lightbox image module come already installed.

Further Resources

Check these out for more templates and Magento-related content:

  • HelloThemes Template Club
  • CMSTheme: Magento
  • Premium Magento Themes
  • eCommerce Themes: Magento Themes
  • TemplateMonster Template Club
  • JoomlArt Template Club
  • Official Magento Knowledge Base
Related articles

You may also want to take a look at the following related articles that we have previously published on Smashing Magazine:

  • 35 Free High-Quality E-Commerce Templates
  • 35 Beautiful Commercial And Free Joomla Templates
  • 100 Free High-Quality XHTML/CSS Templates
  • 30 Free High-Quality WordPress Themes
  • 100 Excellent Free WordPress Themes
About the Author

DKumar M. is a freelance Web and graphic designer and blogger. He is the author and owner of InstantShift.com, a daily resource for Web designers and developers, where he frequently publishes articles about design, collections of resources, inspiration, tutorials and more. You can also follow him on Twitter @instantshift.

(al)

© Dkumar M. for Smashing Magazine, 2009. | Permalink | 103 comments | Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine
Post tags: CMS, e-commerce, magento, shop, templates


basehttp://www.smashingmagazine.com/2009/05/05/25-magento-templates-for-your-e-commerce-business/
[Developer's Toolbox CMS e-commerce magento shop templates ]
Smashing Magazine - Top 20 technology world blogs by wikio
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Introducing GLSurfaceView (Find all the Google products and services)   [199 views, last view 8 h, 54 min and 58 secs ago]
languagetypetext/htmlvalue

GLSurfaceView is a new API class in Android 1.5. GLSurfaceView makes OpenGL ES applications easier to write by:

  • Providing the glue code to connect OpenGL ES to the View system.
  • Providing the glue code to make OpenGL ES work with the Activity life-cycle.
  • Making it easy to choose an appropriate frame buffer pixel format.
  • Creating and managing a separate rendering thread to enable smooth animation.
  • Providing easy-to-use debugging tools for tracing OpenGL ES API calls and checking for errors.

GLSurfaceView is a good base for building an application that uses OpenGL ES for part or all of its rendering. A 2D or 3D action game would be a good candidate, as would a 2D or 3D data visualization application such as Google Maps StreetView.

The Simplest GLSurfaceView Application

Here's the source code to the simplest possible OpenGL ES application:

package com.example.android.apis.graphics; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.opengl.GLSurfaceView; import android.os.Bundle; public class ClearActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new GLSurfaceView(this); mGLView.setRenderer(new ClearRenderer()); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); mGLView.onPause(); } @Override protected void onResume() { super.onResume(); mGLView.onResume(); } private GLSurfaceView mGLView; } class ClearRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Do nothing special. } public void onSurfaceChanged(GL10 gl, int w, int h) { gl.glViewport(0, 0, w, h); } public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); } }

This program doesn't do much: it clears the screen to black on every frame. But it is a complete OpenGL application, that correctly implements the Android activity life-cycle. It pauses rendering when the activity is paused, and resumes it when the activity is resumed. You could use this application as the basis for non-interactive demonstration programs. Just add more OpenGL calls to the ClearRenderer.onDrawFrame method. Notice that you don't even need to subclass the GLSurfaceView view.

Note that the GLSurfaceView.Renderer interface has three methods:

The onSurfaceCreated() method is called at the start of rendering, and whenever the OpenGL ES drawing context has to be recreated. (The drawing context is typically lost and recreated when the activity is paused and resumed.) OnSurfaceCreated() is a good place to create long-lived OpenGL resources like textures.

The onSurfaceChanged() method is called when the surface changes size. It's a good place to set your OpenGL viewport. You may also want to set your camera here, if it's a fixed camera that doesn't move around the scene.

The onDrawFrame() method is called every frame, and is responsible for drawing the scene. You would typically start by calling glClear to clear the framebuffer, followed by other OpenGL ES calls to draw the current scene.

How about User Input?

If you want an interactive application (like a game), you will typically subclass GLSurfaceView, because that's an easy way of obtaining input events. Here's a slightly longer example showing how to do that:

package com.google.android.ClearTest; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.content.Context; import android.opengl.GLSurfaceView; import android.os.Bundle; import android.view.MotionEvent; public class ClearActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new ClearGLSurfaceView(this); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); mGLView.onPause(); } @Override protected void onResume() { super.onResume(); mGLView.onResume(); } private GLSurfaceView mGLView; } class ClearGLSurfaceView extends GLSurfaceView { public ClearGLSurfaceView(Context context) { super(context); mRenderer = new ClearRenderer(); setRenderer(mRenderer); } public boolean onTouchEvent(final MotionEvent event) { queueEvent(new Runnable(){ public void run() { mRenderer.setColor(event.getX() / getWidth(), event.getY() / getHeight(), 1.0f); }}); return true; } ClearRenderer mRenderer; } class ClearRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Do nothing special. } public void onSurfaceChanged(GL10 gl, int w, int h) { gl.glViewport(0, 0, w, h); } public void onDrawFrame(GL10 gl) { gl.glClearColor(mRed, mGreen, mBlue, 1.0f); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); } public void setColor(float r, float g, float b) { mRed = r; mGreen = g; mBlue = b; } private float mRed; private float mGreen; private float mBlue; }

This application clears the screen every frame. When you tap on the screen, it sets the clear color based on the (x,y) coordinates of your touch event. Note the use of queueEvent() in ClearGLSurfaceView.onTouchEvent(). The queueEvent() method is used to safely communicate between the UI thread and the rendering thread. If you prefer you can use some other Java cross-thread communication technique, such as synchronized methods on the Renderer class itself. But queueing events is often the simplest way of dealing with cross-thread communication.

Other GLSurfaceView Samples

Tired of just clearing the screen? You can find more interesting samples in the API Demos sample in the SDK. All the OpenGL ES samples have been converted to use the GLSurfaceView view:

  • GLSurfaceView - a spinning triangle
  • Kube - a cube puzzle demo
  • Translucent GLSurfaceView - shows how to display 3D graphics on a translucent background
  • Textured Triangle - shows how to draw a textured 3D triangle
  • Sprite Text - shows how to draw text into a texture and then composite it into a 3D scene
  • Touch Rotate - shows how to rotate a 3D object in response to user input.
Choosing a Surface

GLSurfaceView helps you choose the type of surface to render to. Different Android devices support different types of surfaces, with no common subset. This makes it tricky problem to choose the best available surface on each device. By default GLSurfaceView tries to find a surface that's as close as possible to a 16-bit RGB frame buffer with a 16-bit depth buffer. Depending upon your application's needs you may want to change this behavior. For example, the Translucent GLSurfaceView sample needs an Alpha channel in order to render translucent data. GLSurfaceView provides an overloaded setEGLSurfaceChooser() method to give the developer control over which surface type is chosen:

setEGLConfigChooser(boolean needDepth)Choose a config that's closest to R5G6B5 with or without a 16-bit framebuffersetEGLConfigChooser(int redSize, int greenSize,int blueSize, int alphaSize,int depthSize, int stencilSize)Choose the config with the fewest number of bits per pixel that has at least as many bits-per-channel as specified in the constructor.setEGLConfigChooser(EGLConfigChooser configChooser)Allow total control over choosing a configuration. You pass in your own implementation of EGLConfigChooser, which gets to inspect the device's capabilities and choose a configuration.Continuous Rendering vs. Render When Dirty

Most 3D applications, such as games or simulations, are continuously animated. But some 3D applications are more reactive: they wait passively until the user does something, and then react to it. For those types of applications, the default GLSurfaceView behavior of continuously redrawing the screen is a waste of time. If you are developing a reactive application, you can call GLSurfaceView.setRenderMode(RENDERMODE_WHEN_DIRTY), which turns off the continuous animation. Then you call GLSurfaceView.requestRender() whenever you want to re-render.

Help With Debugging

GLSurfaceView has a handy built-in feature for debugging OpenGL ES applications: the GLSurfaceView.setDebugFlags() method can be used to enable logging and/or error checking your OpenGL ES calls. Call this method in your GLSurfaceView's constructor, before calling setRenderer():

public ClearGLSurfaceView(Context context) { super(context); // Turn on error-checking and logging setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS); mRenderer = new ClearRenderer(); setRenderer(mRenderer); }

Learn about Android 1.5 and more at Google I/O. Members of the Android team will be there to give a series of in-depth technical sessions and to field your toughest questions.

basehttp://feeds.feedburner.com/blogspot/hsDu
[Android 1.5 OpenGL ES ]
Google Android - Find all the Google products and services
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Introducing GLSurfaceView (Developing with Google Android)   [199 views, last view 8 h, 54 min and 58 secs ago]
languagetypetext/htmlvalue

GLSurfaceView is a new API class in Android 1.5. GLSurfaceView makes OpenGL ES applications easier to write by:

  • Providing the glue code to connect OpenGL ES to the View system.
  • Providing the glue code to make OpenGL ES work with the Activity life-cycle.
  • Making it easy to choose an appropriate frame buffer pixel format.
  • Creating and managing a separate rendering thread to enable smooth animation.
  • Providing easy-to-use debugging tools for tracing OpenGL ES API calls and checking for errors.

GLSurfaceView is a good base for building an application that uses OpenGL ES for part or all of its rendering. A 2D or 3D action game would be a good candidate, as would a 2D or 3D data visualization application such as Google Maps StreetView.

The Simplest GLSurfaceView Application

Here's the source code to the simplest possible OpenGL ES application:

package com.example.android.apis.graphics; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.opengl.GLSurfaceView; import android.os.Bundle; public class ClearActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new GLSurfaceView(this); mGLView.setRenderer(new ClearRenderer()); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); mGLView.onPause(); } @Override protected void onResume() { super.onResume(); mGLView.onResume(); } private GLSurfaceView mGLView; } class ClearRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Do nothing special. } public void onSurfaceChanged(GL10 gl, int w, int h) { gl.glViewport(0, 0, w, h); } public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); } }

This program doesn't do much: it clears the screen to black on every frame. But it is a complete OpenGL application, that correctly implements the Android activity life-cycle. It pauses rendering when the activity is paused, and resumes it when the activity is resumed. You could use this application as the basis for non-interactive demonstration programs. Just add more OpenGL calls to the ClearRenderer.onDrawFrame method. Notice that you don't even need to subclass the GLSurfaceView view.

Note that the GLSurfaceView.Renderer interface has three methods:

The onSurfaceCreated() method is called at the start of rendering, and whenever the OpenGL ES drawing context has to be recreated. (The drawing context is typically lost and recreated when the activity is paused and resumed.) OnSurfaceCreated() is a good place to create long-lived OpenGL resources like textures.

The onSurfaceChanged() method is called when the surface changes size. It's a good place to set your OpenGL viewport. You may also want to set your camera here, if it's a fixed camera that doesn't move around the scene.

The onDrawFrame() method is called every frame, and is responsible for drawing the scene. You would typically start by calling glClear to clear the framebuffer, followed by other OpenGL ES calls to draw the current scene.

How about User Input?

If you want an interactive application (like a game), you will typically subclass GLSurfaceView, because that's an easy way of obtaining input events. Here's a slightly longer example showing how to do that:

package com.google.android.ClearTest; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.content.Context; import android.opengl.GLSurfaceView; import android.os.Bundle; import android.view.MotionEvent; public class ClearActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new ClearGLSurfaceView(this); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); mGLView.onPause(); } @Override protected void onResume() { super.onResume(); mGLView.onResume(); } private GLSurfaceView mGLView; } class ClearGLSurfaceView extends GLSurfaceView { public ClearGLSurfaceView(Context context) { super(context); mRenderer = new ClearRenderer(); setRenderer(mRenderer); } public boolean onTouchEvent(final MotionEvent event) { queueEvent(new Runnable(){ public void run() { mRenderer.setColor(event.getX() / getWidth(), event.getY() / getHeight(), 1.0f); }}); return true; } ClearRenderer mRenderer; } class ClearRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Do nothing special. } public void onSurfaceChanged(GL10 gl, int w, int h) { gl.glViewport(0, 0, w, h); } public void onDrawFrame(GL10 gl) { gl.glClearColor(mRed, mGreen, mBlue, 1.0f); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); } public void setColor(float r, float g, float b) { mRed = r; mGreen = g; mBlue = b; } private float mRed; private float mGreen; private float mBlue; }

This application clears the screen every frame. When you tap on the screen, it sets the clear color based on the (x,y) coordinates of your touch event. Note the use of queueEvent() in ClearGLSurfaceView.onTouchEvent(). The queueEvent() method is used to safely communicate between the UI thread and the rendering thread. If you prefer you can use some other Java cross-thread communication technique, such as synchronized methods on the Renderer class itself. But queueing events is often the simplest way of dealing with cross-thread communication.

Other GLSurfaceView Samples

Tired of just clearing the screen? You can find more interesting samples in the API Demos sample in the SDK. All the OpenGL ES samples have been converted to use the GLSurfaceView view:

  • GLSurfaceView - a spinning triangle
  • Kube - a cube puzzle demo
  • Translucent GLSurfaceView - shows how to display 3D graphics on a translucent background
  • Textured Triangle - shows how to draw a textured 3D triangle
  • Sprite Text - shows how to draw text into a texture and then composite it into a 3D scene
  • Touch Rotate - shows how to rotate a 3D object in response to user input.
Choosing a Surface

GLSurfaceView helps you choose the type of surface to render to. Different Android devices support different types of surfaces, with no common subset. This makes it tricky problem to choose the best available surface on each device. By default GLSurfaceView tries to find a surface that's as close as possible to a 16-bit RGB frame buffer with a 16-bit depth buffer. Depending upon your application's needs you may want to change this behavior. For example, the Translucent GLSurfaceView sample needs an Alpha channel in order to render translucent data. GLSurfaceView provides an overloaded setEGLSurfaceChooser() method to give the developer control over which surface type is chosen:

setEGLConfigChooser(boolean needDepth)Choose a config that's closest to R5G6B5 with or without a 16-bit framebuffersetEGLConfigChooser(int redSize, int greenSize,int blueSize, int alphaSize,int depthSize, int stencilSize)Choose the config with the fewest number of bits per pixel that has at least as many bits-per-channel as specified in the constructor.setEGLConfigChooser(EGLConfigChooser configChooser)Allow total control over choosing a configuration. You pass in your own implementation of EGLConfigChooser, which gets to inspect the device's capabilities and choose a configuration.Continuous Rendering vs. Render When Dirty

Most 3D applications, such as games or simulations, are continuously animated. But some 3D applications are more reactive: they wait passively until the user does something, and then react to it. For those types of applications, the default GLSurfaceView behavior of continuously redrawing the screen is a waste of time. If you are developing a reactive application, you can call GLSurfaceView.setRenderMode(RENDERMODE_WHEN_DIRTY), which turns off the continuous animation. Then you call GLSurfaceView.requestRender() whenever you want to re-render.

Help With Debugging

GLSurfaceView has a handy built-in feature for debugging OpenGL ES applications: the GLSurfaceView.setDebugFlags() method can be used to enable logging and/or error checking your OpenGL ES calls. Call this method in your GLSurfaceView's constructor, before calling setRenderer():

public ClearGLSurfaceView(Context context) { super(context); // Turn on error-checking and logging setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS); mRenderer = new ClearRenderer(); setRenderer(mRenderer); }

Learn about Android 1.5 and more at Google I/O. Members of the Android team will be there to give a series of in-depth technical sessions and to field your toughest questions.

basehttp://feeds.feedburner.com/blogspot/hsDu
[Android 1.5 OpenGL ES ]
Google Android - Developing with Google Android
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Introducing GLSurfaceView (iA WebTrends 2008)   [199 views, last view 8 h, 54 min and 58 secs ago]
languagetypetext/htmlvalue

GLSurfaceView is a new API class in Android 1.5. GLSurfaceView makes OpenGL ES applications easier to write by:

  • Providing the glue code to connect OpenGL ES to the View system.
  • Providing the glue code to make OpenGL ES work with the Activity life-cycle.
  • Making it easy to choose an appropriate frame buffer pixel format.
  • Creating and managing a separate rendering thread to enable smooth animation.
  • Providing easy-to-use debugging tools for tracing OpenGL ES API calls and checking for errors.

GLSurfaceView is a good base for building an application that uses OpenGL ES for part or all of its rendering. A 2D or 3D action game would be a good candidate, as would a 2D or 3D data visualization application such as Google Maps StreetView.

The Simplest GLSurfaceView Application

Here's the source code to the simplest possible OpenGL ES application:

package com.example.android.apis.graphics; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.opengl.GLSurfaceView; import android.os.Bundle; public class ClearActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new GLSurfaceView(this); mGLView.setRenderer(new ClearRenderer()); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); mGLView.onPause(); } @Override protected void onResume() { super.onResume(); mGLView.onResume(); } private GLSurfaceView mGLView; } class ClearRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Do nothing special. } public void onSurfaceChanged(GL10 gl, int w, int h) { gl.glViewport(0, 0, w, h); } public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); } }

This program doesn't do much: it clears the screen to black on every frame. But it is a complete OpenGL application, that correctly implements the Android activity life-cycle. It pauses rendering when the activity is paused, and resumes it when the activity is resumed. You could use this application as the basis for non-interactive demonstration programs. Just add more OpenGL calls to the ClearRenderer.onDrawFrame method. Notice that you don't even need to subclass the GLSurfaceView view.

Note that the GLSurfaceView.Renderer interface has three methods:

The onSurfaceCreated() method is called at the start of rendering, and whenever the OpenGL ES drawing context has to be recreated. (The drawing context is typically lost and recreated when the activity is paused and resumed.) OnSurfaceCreated() is a good place to create long-lived OpenGL resources like textures.

The onSurfaceChanged() method is called when the surface changes size. It's a good place to set your OpenGL viewport. You may also want to set your camera here, if it's a fixed camera that doesn't move around the scene.

The onDrawFrame() method is called every frame, and is responsible for drawing the scene. You would typically start by calling glClear to clear the framebuffer, followed by other OpenGL ES calls to draw the current scene.

How about User Input?

If you want an interactive application (like a game), you will typically subclass GLSurfaceView, because that's an easy way of obtaining input events. Here's a slightly longer example showing how to do that:

package com.google.android.ClearTest; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.content.Context; import android.opengl.GLSurfaceView; import android.os.Bundle; import android.view.MotionEvent; public class ClearActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new ClearGLSurfaceView(this); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); mGLView.onPause(); } @Override protected void onResume() { super.onResume(); mGLView.onResume(); } private GLSurfaceView mGLView; } class ClearGLSurfaceView extends GLSurfaceView { public ClearGLSurfaceView(Context context) { super(context); mRenderer = new ClearRenderer(); setRenderer(mRenderer); } public boolean onTouchEvent(final MotionEvent event) { queueEvent(new Runnable(){ public void run() { mRenderer.setColor(event.getX() / getWidth(), event.getY() / getHeight(), 1.0f); }}); return true; } ClearRenderer mRenderer; } class ClearRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Do nothing special. } public void onSurfaceChanged(GL10 gl, int w, int h) { gl.glViewport(0, 0, w, h); } public void onDrawFrame(GL10 gl) { gl.glClearColor(mRed, mGreen, mBlue, 1.0f); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); } public void setColor(float r, float g, float b) { mRed = r; mGreen = g; mBlue = b; } private float mRed; private float mGreen; private float mBlue; }

This application clears the screen every frame. When you tap on the screen, it sets the clear color based on the (x,y) coordinates of your touch event. Note the use of queueEvent() in ClearGLSurfaceView.onTouchEvent(). The queueEvent() method is used to safely communicate between the UI thread and the rendering thread. If you prefer you can use some other Java cross-thread communication technique, such as synchronized methods on the Renderer class itself. But queueing events is often the simplest way of dealing with cross-thread communication.

Other GLSurfaceView Samples

Tired of just clearing the screen? You can find more interesting samples in the API Demos sample in the SDK. All the OpenGL ES samples have been converted to use the GLSurfaceView view:

  • GLSurfaceView - a spinning triangle
  • Kube - a cube puzzle demo
  • Translucent GLSurfaceView - shows how to display 3D graphics on a translucent background
  • Textured Triangle - shows how to draw a textured 3D triangle
  • Sprite Text - shows how to draw text into a texture and then composite it into a 3D scene
  • Touch Rotate - shows how to rotate a 3D object in response to user input.
Choosing a Surface

GLSurfaceView helps you choose the type of surface to render to. Different Android devices support different types of surfaces, with no common subset. This makes it tricky problem to choose the best available surface on each device. By default GLSurfaceView tries to find a surface that's as close as possible to a 16-bit RGB frame buffer with a 16-bit depth buffer. Depending upon your application's needs you may want to change this behavior. For example, the Translucent GLSurfaceView sample needs an Alpha channel in order to render translucent data. GLSurfaceView provides an overloaded setEGLSurfaceChooser() method to give the developer control over which surface type is chosen:

setEGLConfigChooser(boolean needDepth)Choose a config that's closest to R5G6B5 with or without a 16-bit framebuffersetEGLConfigChooser(int redSize, int greenSize,int blueSize, int alphaSize,int depthSize, int stencilSize)Choose the config with the fewest number of bits per pixel that has at least as many bits-per-channel as specified in the constructor.setEGLConfigChooser(EGLConfigChooser configChooser)Allow total control over choosing a configuration. You pass in your own implementation of EGLConfigChooser, which gets to inspect the device's capabilities and choose a configuration.Continuous Rendering vs. Render When Dirty

Most 3D applications, such as games or simulations, are continuously animated. But some 3D applications are more reactive: they wait passively until the user does something, and then react to it. For those types of applications, the default GLSurfaceView behavior of continuously redrawing the screen is a waste of time. If you are developing a reactive application, you can call GLSurfaceView.setRenderMode(RENDERMODE_WHEN_DIRTY), which turns off the continuous animation. Then you call GLSurfaceView.requestRender() whenever you want to re-render.

Help With Debugging

GLSurfaceView has a handy built-in feature for debugging OpenGL ES applications: the GLSurfaceView.setDebugFlags() method can be used to enable logging and/or error checking your OpenGL ES calls. Call this method in your GLSurfaceView's constructor, before calling setRenderer():

public ClearGLSurfaceView(Context context) { super(context); // Turn on error-checking and logging setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS); mRenderer = new ClearRenderer(); setRenderer(mRenderer); }

Learn about Android 1.5 and more at Google I/O. Members of the Android team will be there to give a series of in-depth technical sessions and to field your toughest questions.

basehttp://feeds.feedburner.com/blogspot/hsDu
[Android 1.5 OpenGL ES ]
Google Android - iA WebTrends 2008
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Los distintos tipos de tributos: impuestos, contribuciones y tasas (Recursos para seguir la actualidad económica y los mercados financieros ( España))   [561 views, last view 9 h, 3 min and 48 secs ago]

Todos pagamos tributos, incluso aquellos que no alcanzan el mínimo para tener que hacer la declaración a hacienda. Cuando somos pequeños y compramos cromos pagamos el IVA, cuando nos formamos tenemos que pagar tasas por la expedición de los títulos, cuando trabajamos y ganamos el IRPF. En esta entrada vamos a hablar sobre los distintos tipos de tributos que pagamos.

Un tributo no está definido por ley, aunque los distintos tipos de tributos (impuestos, tasas y contribuciones) si lo están definidas. No obstante podemos definir un tributo como prestaciones (algo que damos) patrimoniales (porque disminuyen nuestro patrimonio) obligatorias que debemos hacer a las entidades públicas. Los tributos surgen de la necesidad de financiar a las administraciones públicas, aunque en ocasiones también se persiguen otros fines. Con excepciones los tributos se pagan mediante prestaciones monetarias. Los tributos se pueden agrupar en tres categorías: impuestos, contribuciones y tasas.

Una figura importante antes de explicar lo que es un tributo es el hecho imponible. El hecho imponible es aquello (el hecho jurídico) que nos obliga a el pago del tributo según la normativa legal vigente. Por ejemplo para el IRPF será la obtención de renta o para el Impuesto de Bienes Inmuebles la posesión de un bien inmueble.

La Ley General Tributaria dice que los impuestos son tributos exigidos sin contraprestación cuyo hecho imponible está constituido por negocios, actos o hechos de naturaleza jurídica o económica que ponen de manifiesto la capacidad contributiva del sujeto pasivo como consecuencia de la posesión de un patrimonio, la circulación de bienes o la adquisición o gasto de la renta. Lo que viene a decir que los impuestos son pagos que hacemos porque demostramos que somos capaces de hacer el pago y financiar la administración pública.

La ley además define que no hay derecho a contraprestación, por lo que no podemos exigir nada (un bien o un servicio) a cambio de pagar impuestos. Por tanto no se tiene derecho a circular por una carretera, que nuestros hijos vayan a un colegio o utilizar el servicio de urgencias por pagar impuestos. La financiación de la administración y los servicios que presta son completamente independientes.

Los impuestos se pueden clasificar en directos (como el IRPF) e indirectos (como el IVA), en personales (porque el contribuyente paga por su capacidad global) y reales (el contribuyente paga por un hecho que demuestra su capacidad), en objetivos (no tienen en cuenta la capacidad del contribuyente) y subjetivos (la tienen en cuenta) y por último se pueden clasificar en periódicos (se pagan más de una vez en el tiempo) y en instantáneos (se pagan una vez por unos hechos).

El siguiente tipo de tributos son las contribuciones especiales. Según la ley general tributaria se trata de aquellos tributos cuyo hecho imponible consiste en la obtención por el sujeto pasivo de un beneficio o un aumento de valor de sus bienes por la realización de obras públicas o el establecimiento o ampliación de servicios públicos. Es decir, se trata de tributos (pagos a la administración) que hacemos porque hemos recibido una contraprestación, siendo esta la mayor diferencia que hay con los impuestos. Por ejemplo si se construye una obra pública como pueda ser una parada de metro que revalorice un terreno. Este tipo de contribuciones no ha de ser superior al coste del establecimiento o ampliación del servicio. Asimismo los ingresos recaudados han de dedicarse a sufragar los gastos de la obra o servicio que han hecho exigir la obra.

Por último tenemos las tasas, que la la semana pasada comentamos en mayor detalle son tributos que pagamos porque utilizamos para nuestro beneficio privado un bien público, porque la administración nos da un servicio o porque se realicen actividades en régimen de derecho público. También están los precios públicos, pero estos no son tributos ya que no obligatorios, sino que se trata de un pago por un bien o servicio prestado por la administración pública en el que también incurre el sector privado.

El estudio de los tributos no sólo es importante para aquellos interesados en sus finanzas personales, sino que también sirve para entender muchas de las decisiones que se toman desde el ente público ya que su fnanciación depende casi exclusivamente de lo que recauda con los tributos. Además entender el tipo de tributo que estamos pagando nos ayuda a la hora de saber el porqué se nos está cobrando y cuanto debe ser el pago.

Imagen | Paul Keleher, Flickr
En Actibva | Cómo cumplir con Hacienda sin pisar por sus oficinas, Preparar la declaración de la renta

Javier Navarro, editor de El Blog Salmón



Actibva BBVA - Recursos para seguir la actualidad económica y los mercados financieros ( España)
View original post|Add to del.icio.us|11 months ago | Share

      view feed content iHatch iPa, El iPhone te muestra como será tu hijo (Blogs sobre el iPhone)   [1 views, last view 9 h, 10 min and 45 secs ago]
languagevalue

¿Alguna vez te has preguntado como será el “careto” de tu hijo? Pues con el iPhone ya no tendrás esa duda.

La aplicación te pide una foto del padre y otra de la madre y luego mezcla los rasgos dando como resultado tu hijo (bueno, generalmente salen horribles)

Esta es la típica aplicación que triunfa en las reuniones de amigos.

Descarga la iPa aqui:
Rapidshare
Megaupload

Artículos Relacionados


typetext/htmlbasehttp://feeds.feedburner.com/eiphone
[Aplicaciones bebe foto hijo ]
EstudioiPhone - Blogs sobre el iPhone
View original post|Add to del.icio.us|6 months ago | Share

      view feed content Nueva pagina para descarga de IPAS Crackeadas (Blogs sobre el iPhone)   [122 views, last view 9 h, 12 min and 32 secs ago]
languagevalue

Nueva pagina para la descarga de ipas crackeadas:

http://apptrackr.org/

La pagina funciona perfectamente, la carga es muy rápida y fluida. Tiene una presentación parecida a la de Appulo.us pero con un fondo blanco. Incluye un buscador ipas también.

Puede ser un buen sustituto Appulo.us  debido a los muchos problemas de esta última en cuanto a carga y acceso.

Artículos Relacionados


typetext/htmlbasehttp://feeds.feedburner.com/eiphone
[Noticias appulo ipa ]
EstudioiPhone - Blogs sobre el iPhone
View original post|Add to del.icio.us|6 months ago | Share

      view feed content Como quitar el mensaje “Este Dispositivo no está hecho para el iPhone” (Blogs sobre el iPhone)   [106 views, last view 9 h, 14 min and 43 secs ago]
languagetypetext/htmlvalue

Existen muchos accesorios como docks, altavoces, etc para el iPhone pero cuando los conectamos sale un mensaje que nos avisa de que ese accesorio no está hecho para el iPhone y que si queremos activar el modo avión.

El mensaje es bastante molesto y podemos quitarlo de la siguiente manera:

1. Accedemos via SSH al iPhone.
2. Vamos a ”System/Library/PrivateFrameworks/IAP.framework/Support/”
3. Vemos una arhivo que se llama ‘iapd’
4. Lo editamos y le cambiamos el nombre por apd-old (si algo no funciona o queremos dejarlo como antes le volvemos a cambiar el nombre por iapd).
5. Descargamos el iapd parcheado para el firmware 3.0
6. Le damos permisos 775
7. Reiniciamos el iPhone y listo.

Artículos relacionados


basehttp://feeds.feedburner.com/eiphone
[Tutoriales accesorio iphone mensaje quitar ]
EstudioiPhone - Blogs sobre el iPhone
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content How to connect with SQLite using android (Developing with Google Android)   [233 views, last view 9 h, 18 min and 1 secs ago]
I want database connection code using android database connectivity
with SQLite.

I want sample easy code which i can extend later for advanced usage.

Thanks
Chetan



Google Android Community - Developing with Google Android
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Stupid Linux Tricks: avoid unnecessary system calls with /proc/net/arp (Ruby on Rails sample projects to learn from)   [6 views, last view 9 h, 19 min and 36 secs ago]

/proc is, for anyone interested in what's happening under the hood, an endless source of awesomeness. I recently experienced a bit of /proc awesomeness when sitting down to refactor an old VPN monitoring project using python.

Long story short, OpenVPN (http://openvpn.net/) prints a log called "openvpn-status.log" at fixed intervals. Contained within this log are the MAC addresses and common names of the VPN clients currently connected to the VPN server. The goal of the project was to take that log, swap the MAC addresses for local IP addresses and reprint the log on an intranet webpage.

The old way of doing this involved pinging all of the IP addresses on our subnet within the range of addresses that we had set aside for VPN clients and then scraping the output from # /usr/bin/arp -a to assign MAC addresses to IP addresses. This was alright, but in my program it required making a system (or, more specifically, a subprocess) call. Not optimal.

The new way of doing this is via the new awesomeness: /proc/net/arp. The setup is the same: you ping all the IP addresses in the range alotted for VPN clients to fill the arp cache but then, instead of working with the output from the arp program, you simply create a file-like object /proc/net/arp and work with that much simpler, easy to manipulate output.

To illustrate the difference, allow me to cut and paste both outputs. /usr/bin/arp -a first:

virginia:/var/log/openvpn# arp -v -a ? (192.168.2.89) at <incomplete> on br0 ? (192.168.2.85) at <incomplete> on br0 ? (192.168.2.82) at 00:FF:49:56:76:30 [ether] on br0 ? (192.168.2.87) at <incomplete> on br0 ? (192.168.2.83) at 00:FF:2D:53:53:20 [ether] on br0

Now take a gander at what /proc/net/arp spits out:

virginia:/var/log/openvpn# cat /proc/net/arp IP address HW type Flags HW address Mask Device 192.168.2.85 0x1 0x0 00:00:00:00:00:00 * br0 192.168.2.89 0x1 0x0 00:00:00:00:00:00 * br0 192.168.2.82 0x1 0x2 00:FF:49:56:76:30 * br0 192.168.2.87 0x1 0x0 00:00:00:00:00:00 * br0 192.168.2.83 0x1 0x2 00:FF:2D:53:53:20 * br0

Basically the same thing, but with /proc/net/arp you've got the option, if you're working with python, of simply creating a file-like object and working with that (instead of making a system call and having to strip off those parentheses):

f = file("/proc/net/arp")

From there, a quick list comprehension will get you all the data you need in a single, easy-to-use list:

output = [line.strip().split() for line in f.readlines()]

Two lines of code and you're ready to throw the data you need into a dictionary and do whatever it is you need to do.

Finally, the awesomeness isn't limited to python: when I'm trying to track down switches or other devices on the network that might not necessarily want to be found, all I've got to do to is rattle off the following bas one-liner and I've got all the data I need to start poking around:

cat /proc/net/arp |awk '{print $1 " " $4}'
[General ]
El Dorado - A Rails Community web application - Ruby on Rails sample projects to learn from
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content PowerShell for Failover Clustering: Finding the Drive Letter (Microsoft server and infrastructure technology blogs, news and resources)   [22 views, last view 9 h, 27 min and 15 secs ago]

Hi cluster scripting fans,

 

I often find myself looking for the drive letter(s) for a physical disk resource in a PowerShell console/script.  After a bit of investigation, here is a way to do that using Cluster WMI through PowerShell:

 

$DiskResourceName = "Cluster Disk 2"

$DiskResource = gwmi MSCluster_Resource -Namespace root/mscluster | ?{ $_.Name -eq $DiskResourceName }

$Disk = gwmi -Namespace root/mscluster -Query "Associators of {$DiskResource} Where ResultClass=MSCluster_Disk"

$Partition = gwmi -Namespace root/mscluster -Query "Associators of {$Disk} Where ResultClass=MSCluster_DiskPartition"

 

After you run those CMDlets in your PowerShell window on a cluster node, the $Partition variable will contain a MSCluster_DiskPartition WMI object per volume on the physical disk resource you specified with $DiskResourceName.

 

Here is an example when I run this against a physical disk resource with one partition:

 

$Partition | select Path

Path

----

L:

 

… and here with two partitions:

PS G:\Windows\system32> $Partition | select Path

Path

----

J:

Q:

 

Enjoy!

Ahmed Bisht

Senior Program Manager

Clustering & High-Availability

Microsoft


[cluster failover wsfc storage ahmed bisht failover clustering r2 PowerShell scripting drive letter ]
Clustering and High Availability : Microsoft Blog - Microsoft server and infrastructure technology blogs, news and resources
View original post|Add to del.icio.us|9 months ago | Share

      view feed content Oferta empleo seo febrero 2010 (Blogs y recursos SEO)   [1 views, last view 9 h, 32 min and 56 secs ago]
languagevalue

ACTUALIZACIÓN

Amplio algo de información y modifico (lo siento Lim) la info que ponías, si me pidieron que no publicara la empresa, tampoco considero adecuado que otros lo hagan.

Ampliación info oferta seo

  • Es una empresa situada en Madrid, bien comunicada y buen salario, con un volumen negociable por objetivos.
  • El volumen de términos a trabajar no es muy extenso pero si competidos.
  • El seo también participará en propuestas de “producto orientado a seo” que quieres montar un diccionario para ampliar la temática, montar un consultorio de preguntas… Comentalo, te escucharán.
  • Lo de Social media también va por eso, si tienes propuestas que sen de valor, podrás llevarlas a cabo y no tienen que limitarse a un twitter con rss, seguro que te dejan ir más allá.
  • El Puesto está en empleo seo, pero aunará diferentes acciones. Hay una persona encargada de temas de sem y hará falta meterse en analítica,  integraciones con portales, tal vez afiliados.
  • El equipo es bueno, he trabajado anteriormente con gente involucrada en el proyecto y muy buena relación.

Una oferta de empleo seo, para una empresa que está muy bien, pagan bien y el jefe es un crack

Multinacional sector financiero en pleno plan de crecimiento. Equipo joven y dinámico.
Se busca persona con experiencia clara y demostrable como responsable de SEO para definir la estrategia SEO de las 3 marcas del grupo

Funciones:

- estructura de las webs, interlocución con los equipos técnicos, seo off-site, etc
- Valorable también experiencia/capacidad para ser el responsable de la Analítica Web.
- Experiencia en Social Media
Valorable también experiencia como Consultor de Usabilidad

Mínimo de 3 años de experiencia

mails a: lhr000@gmail.com
asunto: puesto SEO

typetext/htmlbasehttp://www.vseo.es/feed/
[Buscadores Trabajo ]
SEO y Web 2.0 | VSEO - Blogs y recursos SEO
View original post|Add to del.icio.us|6 months ago | Share

      view feed content Installing Ubuntu on XenServer (Virtualization Blogs, resources and news)   [1134 views, last view 9 h, 37 min and 53 secs ago]

I thought I'd kick off my Citrix blog with a question I get pretty often from Linux enthusiasts: how to install unsupported Linux distributions on XenServer 4.1.

The most common solution people find is to use the "Other Install Media" template, insert the distribution installation CD, and find that the mouse cursor doesn't work when they boot into X11. The reason for this is that they are using the hardware-assisted emulation mode of installing Linux. In this mode (dubbed "HVM"), all input and output is emulated, and in particular the mouse interface uses the USB tablet interface. If the distribution doesn't include a driver for USB tablets, then no mouse will appear.

Windows guests run at high-speed in HVM mode due to the installation of the XenServer tools which install high-speed drivers, but these are not necessary for Linux distributions since they can be run in para-virtualized mode (dubbed "PV"). This involves obtaining a Xen-enabled PV kernel from the distribution, and modifying the VM record in XenServer to boot into this kernel instead of HVM mode. The XenServer built-in templates for popular distributions such as RHEL, CentOS or SUSE Linux already automate all this and are in PV mode from the installer onwards.

In the remainder of this post, I'll explain how to take a distribution without direct support (Ubuntu 8.04), get it installed in HVM mode on XenServer 4.1, and convert it to PV mode with a XenCenter graphical console.

  • Download the "Alternative Installation CD". The main installation CD uses graphical mode, which won't install as well in HVM mode due to the use of esoteric 16-bit mode instructions for the graphics operations. The 16-bit emulation mechanisms vary between processors (with better support on AMD chips, and a software instruction emulator required on Intel VT chips). However, the Ubuntu alternate CD uses a text-based installer which works fine.
  • Create a new VM on the XenServer 4.1 host using the "Windows Server 2003" template. This template is set up with a sensible set of hardware emulation flags and default disks, and so is a good base for the HVM installation of Ubuntu as well. Attach the Ubuntu ISO you just downloaded to the VM, and proceed to install Ubuntu as normal. You should install it onto the first disk, to make the subsequent steps in this guide easier.
  • When the installation is finished, reboot the VM (don't forget to detach the installation ISO first). It should boot up in HVM mode into the graphical login screen. The XenCenter display will show it as not being optimized, which is fine. At this stage, I prefer to work via a remote command-line using SSH. Open up a Terminal from Ubuntu, and run "sudo apt-get install openssh-server". Then find out the VM's IP address with "ifconfig eth0", and then connect to it remotely. Alternatively, you can continue to type in the commands directly into the terminal as well.
  • On the Ubuntu guest, you now need to install the latest Xen version of the Ubuntu kernel:
    • Install the Linux kernel virtual package with "sudo apt-get install linux-image-xen". This is a virtual package which pulls in the latest Xen kernel and modules, in my case 2.6.24.19.21.
    • You now need to workaround a bug in grub. Due to the switch in recent versions of Linux to work with the hypervisor-independent paravirt_ops interface, update-grub doesn't update the grub configuration with your newly installed Xen kernel. To fix this:
      • Open /boot/grub/menu.lst in your favourite editor.
      • Scroll to the bottom to the kernel list, and find the entry which looks like: title Ubuntu 8.04, kernel 2.6.24-16-generic root (hd0,0) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=<uuid> ro quiet splash initrd /boot/initrd.img-2.6.24-16-generic quiet
      • Add a new entry which is similar to this, but change all references to the 2.6.24-16-generic to the Xen kernel. In /boot I have vmlinuz-2.6.24-19-xen, so my new entry looks like: title Ubuntu 8.04, kernel 2.6.24-19-xen root (hd0,0) kernel /boot/vmlinuz-2.6.24-19-xen root=UUID=<uuid> ro quiet splash initrd /boot/initrd.img-2.6.24-19-xen quiet
      • Also edit the default entry in the menu.lst to match the number of the kernel you just added. I set mine to 3, since it is the fourth entry in the list and the indexing starts from 0.
  • When this is done, shut down the guest but do not reboot it just yet. You first need to edit the VM record for your Ubuntu VM to convert it to PV boot mode. From the control domain console of your XenServer:
    • Determine the UUID of the Ubuntu VM by using the xe CLI:
      • xe vm-list name-label=Ubuntu params=uuid --minimal : this will print out the UUID of the VM named "Ubuntu". If you are logged into the control domain, pressing the <tab> key will perform auto-completion of UUIDs in subsequent XE commands, so you don't need to keep typing it in every time!
      • xe vm-param-set uuid=<uuid> HVM-boot-policy= : this will clear the HVM boot mode from the VM.
      • xe vm-param-set uuid=<uuid> PV-bootloader=pygrub : this will switch the VM to using to the pygrub bootloader which starts the guest in PV mode by examining its filesystem for kernel.
      • vm vm-param-set uuid=<uuid> PV-args="console=tty0 xencons=tty" : this configures the kernel boot arguments to display the login console on the correct TTY, so that it shows up in the XenCenter console.
    • Next, you need to flag the root disk of the VM as bootable so that pygrub knows where to look for the PV kernel:
      • xe vm-disk-list uuid=<uuid> and look for the UUID of the VBD for the disk. VBD stands for "Virtual Block Device" and represents how to map the virtual disk into the virtual machine.
      • xe vbd-param-set uuid=<vbd uuid> bootable=true will set the root disk VBD to be bootable.
  • You should be all set now! If you boot up the Ubuntu VM, it should start up in text-mode with the high-speed PV kernel. If it doesn't work due to an incorrect grub configuration, you can use the xe-edit-bootloader script in the XenServer control domain to edit the grub.conf until it works.
  • The next step is to install the XenServer tools within the guest, so that metrics such as the network interface IP addresses are recorded and reported from XenCenter. To do this:
    • Due to a portability issues with the default shell in Ubuntu (dash), you will need to replace it by: sudo apt-get -y install bash && sudo dpkg-reconfigure dash. We've actually fixed this issue in future releases of XenServer, but for XenServer 4.1 you will need to use bash.
    • Attach the XenServer Tools ISO into the VM, and mount it into the guest with sudo mount /dev/xvdd /mnt
    • Install the tools with sudo dpkg -i /mnt/Linux/xe-guest-utilities_4.1.0-257_i386.deb.
    • The warnings about the VM being unoptimized should disappear, and additional information such as the IP address of the guest should appear in XenCenter.
  • In order to access the Ubuntu installation via the graphical console, you need to configure it to run VNC on the external network interface. XenCenter polls the guest to see if it is listening on the VNC port 5900, and offers the option to switch to the graphical console if it finds it. I followed the excellent instructions on this forum post. To summarise them:
    • sudo apt-get install vnc4server xinetd : to install the required packages
    • Edit /etc/gdm/gdm.conf and uncomment the RemoteGreeter=/usr/lib/gdm/gdmlogin line, set the key Enable=true in the [xdcmp] section.
    • Install a new service file for xinetd into /etc/xinetd.d/Xvnc with the following contents: service Xvnc { type = UNLISTED disable = no socket_type = stream protocol = tcp wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -geometry 1024x768 -depth 16 -cc 3 -once -SecurityTypes=none -extension XFIXES port = 5900 }
    • The major difference from the forum poster is to run it on port 5900, and not to restrict it to just localhost (since XenCenter also needs to connect to it).
    • Finally, restart the xinetd service by running sudo /etc/init.d/xinetd restart.

Once you're done with this installation, you can shut down the VM and convert it to a template. Any exports or clones will continue to run in PV mode, since the XenServer XVA export format records all of the metadata required to re-create the VM records.

Enjoy the Ubuntu on XenServer experience! Remember to report any issues you have with the in-guest packages on the Ubuntu support forums, or just give them positive feedback.

PS: many thanks to Andrew Peace and Ian Campbell for assistance. May their Linux beards remain long and uncut.

View Online | Add Comment
[xenserver grp-xsv ]
XenSource Blogs - Virtualization Blogs, resources and news
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Online Capistrano Tutorial #2 (Best Ruby on Rails Blogs )   [152 views, last view 10 h, 13 min and 49 secs ago]

The first online Capistrano tutorial session was very successful, thanks to everyone who participated. Now, it??s time to try again!

The second online Capistrano tutorial session is now open for registration: http://events.capify.org/events/2.

It is scheduled for Wednesday, August 13th, at 7pm (Mountain time), and will last two hours (plus up to an hour at the end for Q&A). As before, this tutorial is targeted at beginning Capistrano users, those will little or no prior experience. (If you??re looking for a session for more advanced users, keep watching this space??I??ll probably do one of those eventually, as soon as I can write a curriculum for it.)


[Announcements capistrano tutorial ]
the { buckblogs :here } blog - Best Ruby on Rails Blogs
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content The infamous Error #2044: Unhandled StatusEvent:. level=error, code= on LocalConnection (Start developing with Adobe AIR ( Apollo))   [295 views, last view 10 h, 23 min and 55 secs ago]
This is a blog post to all that was almost to throw their computers out of the window because they got "Error #2044: Unhandled StatusEvent:. level=error, code=" trying to communicate through LocalConnection. So I am trying to send a message from a Flex application running in Flash Player to an AIR application. In the AIR application [...]
[Flex,Adobe AIR ]
Adobe Air technology - Start developing with Adobe AIR ( Apollo)
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content VerifyError: Error #1014: Class flash.events::NativeWindowBoundsEvent could not be found. (Start developing with Adobe AIR ( Apollo))   [212 views, last view 10 h, 40 min and 22 secs ago]
If you are getting this error while working with flex...chances are that you are trying to create an Air application for the first time. You should run your Air application by simply pressing CTRL+F11. BTW: This is happening because your Flash Player is trying to run your Air app but it does not contain support for the Air libraries.VerifyError: Error #1014: Class flash.events::NativeWindowBoundsEvent could not be found.at flash.display::MovieClip/nextFrame()at mx.managers::SystemManager/deferredNextFrame()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:299]at mx.managers::SystemManager/preloader_initProgressHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2225]at flash.events::EventDispatcher/dispatchEventFunction()at flash.events::EventDispatcher/dispatchEvent()at mx.preloaders::Preloader/timerHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\preloaders\Preloader.as:398]at flash.utils::Timer/_timerDispatch()at flash.utils::Timer/tick()
[Flex ]
Adobe Air technology - Start developing with Adobe AIR ( Apollo)
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content Can’t Trade off It, But Good Discussion (Recursos para seguir la actualidad económica y los mercados financieros ( España))   [5 views, last view 10 h, 59 min and 19 secs ago]

      view feed content Mimicking iPhone Switch with jQuery (Best Ruby on Rails Blogs )   [231 views, last view 11 h, 8 min and 50 secs ago]

We had a need in one of our projects for a little on/off switching hotness and like so many other things, why not rip off Apple ? Enter the iPhoneSwitch jQuery plugin.

<style> #switch_demo img { border:none; display:block; margin:0; padding:0; } </style> <script type="text/javascript"> $(document).ready(function(){ $('#switch_demo').iphoneSwitch("off", function() { alert("Ooo you're turning me on."); }, function() { alert("Aw, you turned me off."); }); }); </script> <script type="text/javascript"> jQuery.fn.iphoneSwitch = function(start_state, switched_on_callback, switched_off_callback, options) { var state = start_state == 'on' ? start_state : 'off'; // define default settings var settings = { mouse_over: 'pointer', mouse_out: 'default', switch_on_container_path: "http://elccore.s3.amazonaws.com/3/24fef4cd68185831d6beb30572d675b92d93cfbc_1233797890_2.png", switch_off_container_path: "http://elccore.s3.amazonaws.com/3/70a1913abf422d561d5533eb2a07e0b8f0b959da_1233797890_1.png", switch_path: "http://elccore.s3.amazonaws.com/3/38e98ad511f3dcd6a4b40ad31313df484ba0b24d_1233797889_0.png", switch_height: 27, switch_width: 94 }; if(options) { jQuery.extend(settings, options); } // create the switch return this.each(function() { var container; var image; // make the container container = jQuery(''); // make the switch image based on starting state image = jQuery(''); // insert into placeholder jQuery(this).html(jQuery(container).html(jQuery(image))); jQuery(this).mouseover(function(){ jQuery(this).css("cursor", settings.mouse_over); }); jQuery(this).mouseout(function(){ jQuery(this).css("background", settings.mouse_out); }); // click handling jQuery(this).click(function() { if(state == 'on') { jQuery(this).find('.iphone_switch').animate({backgroundPosition: -53}, "slow", function() { jQuery(this).attr('src', settings.switch_off_container_path); switched_off_callback(); }); state = 'off'; } else { jQuery(this).find('.iphone_switch').animate({backgroundPosition: 0}, "slow", function() { switched_on_callback(); }); jQuery(this).find('.iphone_switch').attr('src', settings.switch_on_container_path); state = 'on'; } }); }); }; </script> Through the magic of jQuery, this is as easy as: <script type="text/javascript"> $(document).ready(function(){ // start state is off $('#switch_demo').iphoneSwitch("off", function() { alert("Ooo you're turning me on."); }, function() { alert("Aw, you turned me off."); } ); }); </script> Source code after the jump.

This was a pretty quick little plugin, with plenty of room for improvement. So go nuts. You can get the image and source files here.

jQuery.fn.iphoneSwitch = function(start_state, switched_on_callback, switched_off_callback, options) { var state = start_state == 'on' ? start_state : 'off'; // define default settings var settings = { mouse_over: 'pointer', mouse_out: 'default', switch_on_container_path: 'iphone_switch_container_on.png', switch_off_container_path: 'iphone_switch_container_off.png', switch_path: 'iphone_switch.png', switch_height: 94, switch_width: 27 }; if(options) { jQuery.extend(settings, options); } // create the switch return this.each(function() { var container; var image; // make the container container = jQuery('<div class="iphone_switch_container" style="height:'+settings.switch_height+'px; width:'+settings.switch_width+'px; position: relative; overflow: hidden"></div>'); // make the switch image based on starting state image = jQuery('<img class="iphone_switch" src="'+(state == 'on' ? settings.switch_on_container_path : settings.switch_off_container_path)+'" style="height:'+settings.switch_height+'px; width:'+settings.switch_width+'px; background-image:url('+settings.switch_path+'); background-repeat:none; background-position:'+(state == 'on' ? 0 : -53)+'px" />'); // insert into placeholder jQuery(this).html(jQuery(container).html(jQuery(image))); jQuery(this).mouseover(function(){ jQuery(this).css("cursor", settings.mouse_over); }); jQuery(this).mouseout(function(){ jQuery(this).css("background", settings.mouse_out); }); // click handling jQuery(this).click(function() { if(state == 'on') { jQuery(this).find('.iphone_switch').animate({backgroundPosition: -53}, "slow", function() { jQuery(this).attr('src', settings.switch_off_container_path); switched_off_callback(); }); state = 'off'; } else { jQuery(this).find('.iphone_switch').animate({backgroundPosition: 0}, "slow", function() { switched_on_callback(); }); jQuery(this).find('.iphone_switch').attr('src', settings.switch_on_container_path); state = 'on'; } }); }); };

Elc Tech Blog - Best Ruby on Rails Blogs
View original post|Add to del.icio.us|more than one year ago | Share

      view feed content NetBeans 6.0: plantillas de código (Conferencia Rails Hispana '07)   [606 views, last view 11 h, 13 min and 14 secs ago]

Las plantillas de código (code templates en inglés) son pequeños snippets de código fuente que se expanden automáticamente permitiéndonos modificar determinadas partes, mientras que otras partes se mantienen fijas. Aunque son una funcionalidad disponible en todo editor que se precie, no todo el mundo parece darse cuenta de su potencial: las plantillas de código son a los editores / IDEs lo que el DRY es a la programación.

Las plantillas se invocan normalmente escribiendo una pequeña palabra en el editor y pulsando una tecla o una combinación de teclas para ??dispararlas?. Para quien no conozca el mecanismo, las dos siguientes imágenes sirven como ejemplo: al escribir en el editor del NetBeans la palabra def y pulsar a continuación la tecla tab (primera imagen), obtenemos la expansión de una definición de un método en Ruby (segunda imagen).

El cursor queda situado automáticamente en method_name, permitiéndonos escribir el nombre que queramos, y una vez pulsamos enter o bien tab de nuevo, el cursor pasa al cuerpo del método, para que podamos seguir codificando.

NetBeans trae una serie de plantillas definidas por defecto, pero a través del menú Tools > Options > Editor > Code templates podemos acceder a un panel en el que, además de poder ver todas esas plantillas predefinidas, podemos crear las nuestras propias. Hay bastantes opciones a la hora de controlar cómo se expande la plantilla; para una descripción más exhaustiva de todas ellas, aquí está la página del wiki de NetBeans dedicada a las RubyCodeTemplates.

Aquí sólo vamos a mostrar la definición de la plantilla def tal y como viene ??de serie? con el NetBeans:

La sintaxis es sencilla:

  • El código (Ruby, RHTML, CSS, Java, etc.) se escribe tal cual y quedará así al expandir la plantilla.
  • Los valores ??plantillados? se definen mediante ${nombre default=?valor_por_defecto?}; estos valores se expandirán al valor default, pero podremos modificarlos cambiando ese valor por defecto por lo que nosotros queramos. Además, al poder nombrarlos, podremos hacer referencia a ellos en varias partes de la plantilla (ver ejemplo más adelante).
  • A mayores, existen una serie de valores predefinidos que nos permiten: situar el cursor al terminar la expansión (${cursor}); incrustar el código seleccionado (${selection}); incrustar el nombre del fichero en el que se está realizando la expansión (${file}) etc.

Las posibilidades son muchas (no tantas como en el TextMate, quizás, pero muchas al fin y al cabo :P). Como ejemplo, sirvan un par de plantillas que utilizamos muy a menudo en nuestros editores:

Plantilla b <% ${0 default="block"} do %> ${selection}${cursor} <% end %>

Con esta plantilla definimos bloques en Erb, algo que hacemos muy a menudo ya que normalmente usamos helpers de este tipo para capturar las distintas partes de nuestro layout.

Una cosa que hemos aprendido con la experiencia: algunas plantillas, se utilizan tanto para rodear código ya existente como para generar código desde cero. En esos casos el truco de poner ${selection}${cursor} permite utilizar la plantilla para ambos fines. ¡Y otra cosa importante! Las plantillas que incluyen el parámetro ${selection} se pueden invocar de dos maneras: utilizando una tecla (p.e. tab), en cuyo caso contarán con una selección vacía, o utilizando la combinación Alt+Enter. En funcionamiento:

Plantilla t <${0 default="div"} id="${1 default=""}">${selection}${cursor}</${0}>

Esta plantilla la utilizamos para generar tags HTML con un id. En este caso el parámetro 0 se sustituye con el nombre del tag, tanto en la apertura como en el cierre. El parámetro 1 se sustituye por el id del elemento. Y de nuevo utilizamos el truquillo de la selección para poder rodear HTML si lo deseamos.

Son sólo dos ejemplos, pero en nuestro trabajo diario utilizamos un buen puñado de plantillas que nos permiten acelerar las tareas de codificación y evitar errores al teclear. Pensad en el código que repetís constantemente y definid vuestras propias plantillas para facilitaros la tarea; una vez lo hagáis no podréis vivir sin ellas.


[Tecnología ]
Trabesoluciones: Asis García y David Barral - Conferencia Rails Hispana '07
View original post|Add to del.icio.us|more than one year ago | Share