[.NET] Access Embedded Resource File

Sometimes it’s necessary to embed a resource file in the assembly in order to make the distribution easier, or to protect the resource file.

In order to set the resource as embedded, it’s necessary to change the “Build Action” to Embedded Resource:

Continue reading “[.NET] Access Embedded Resource File” »

Updating the UI from a background thread on Android

Whenever it’s needed to perform some heavy/slow task on a mobile application, it’s a good practice to perform that specific operation on the background, using a thread.

Continue reading “Updating the UI from a background thread on Android” »

Cool tooltips with Tooltipsy – How to use them with a jquery dialog

One of these days I discovered this wonderful JQuery plugin which allows us to create some cool tooltips with jquery.

The credits go to Brian Cray for creating this great plugin.

The usage is simple. All you have to do is to download the javascript file from the plugin website and then apply the plugin to you object. By default, the plugin shows on the tip content the title of the object, but this can easily be overridden by using the “content” attribute, and passing the desired html.
Continue reading “Cool tooltips with Tooltipsy – How to use them with a jquery dialog” »

Using an enum on a FluentNHibernate mapping [C#]

One of these days I needed to map a C# class to a database table using FluentNHibernate. So far so good….
But then I got stuck as one the class properties was an enum.

As it turns out, there is no automatic mapping to enums.

The solution is to use a Custom Type and let FluentNHibernate know that that specific property has a custom type.
How can that be achieved?

Continue reading “Using an enum on a FluentNHibernate mapping [C#]” »

Aptana Studio 3 – A great Open Source IDE

It’s not easy to choose the right tools for our work. Today I’ll talking about the Aptana Studio 3.0.

Aptana Studio is an IDE based in Eclipse (built in java, thus multiplatform). I currently use Aptana Studio as my Rails IDE under Mac OS X and the experience, so far, has been great.

The syntax highlighting, the autocomplete ( among many other features ) turn this IDE into a productivity buster.You can download it here.

Including features such as GIT integration, built-in terminal, deployment wizard, integrated ruby debugger, its an excellent choice for web development.
Continue reading “Aptana Studio 3 – A great Open Source IDE” »

How to use reCaptcha Validation on Ruby On Rails

Security should always be an issue when it comes to computer applications.
Web applications and websites are even more exposed, so likely every weak spot will be exploited someday.

For years, web forms have been used by robots, spreading spam on most websites.

Captcha appeared in order to verify if the user accessing the form is human or not. It does that by showing an image with a text. The image cannot be converted into text by any OCR mechanism, but the human user is still able to read.

So how can we use recaptcha (www.recaptcha.net) with rails?
Continue reading “How to use reCaptcha Validation on Ruby On Rails” »

How to check/uncheck checkbox with jquery

JQuery is a great framework and a great help bringing some eye-candy and interface richness into our webapps.

Like me, most of the web developers  don’t have the chance of learning JQuery from the top to the bottom, and all that’s left is a step-by-step approach, where the learning comes from specific needs on the current project.

Let’s see how we can check, uncheck and see the checkbox state with jquery.
Continue reading “How to check/uncheck checkbox with jquery” »

Custom foreign keys on Ruby on Rails Active Record

ActiveRecord, like all ORM’s, is one of the greatest things on earth, IMHO :)

By using the Convention or Configuration approach, ActiveRecord and even Rails, allows you to skip a few parts and go straight to what matters: the development.

sometimes, though, the “Sensible defaults” of rails and ActiveRecord are’t enough, but like most ORM’s, the convention can easily be overridden in order to get things done.

When you add a relationship between classes all you have to do is to add a references and has_many on the other side. If you follow the naming rules everything works.

Continue reading “Custom foreign keys on Ruby on Rails Active Record” »

How to create SEO friendly URL’s on your rails web application

When you are creating something for the web, you have to keep in mind that your website must be as easy to find as possible. You need to think of the best companies who can help build links for you so that you can internally generate more provide with leading people to another website. Keep in mind there are SEO agency/ agencies that are willing to help your web grow, like for example SEO Boise.

What is the average SEO Adelaide prices? The average SEO price in Australia ranges from $750 to $3,000+ per month. See the full price range and calculate your Seo packages for small businesses to get an estimate.

SEO, or Search Engine Optimization (http://en.wikipedia.org/wiki/Search_engine_optimization) should always be in your mind when designing and creating your website. A great company, like Edmonton Alberta SEO that work’s for local Edmonton businesses, can create a web design to fit your communication goals, brand guidelines and target audience and tracking your customers journey map should be a big part of that (https://www.salesforce.com/products/marketing-cloud/best-practices/customer-journey-maps/)

Lets imagine a blog. By default the route to each post would be something like:
which works just fine.
But this is not SEO friendly, as the search engine crawlers won’t link the URL to the content.
Continue reading “How to create SEO friendly URL’s on your rails web application” »