howto

Tutorial/Suggestions on YUI with Ruby on Rails

I'm looking at using YUI in my Ruby on Rails application. What is the best tutorial, examples, or how-tos about generally integrating YUI into my Rails app. Thanks in advance! ...

How to write this in SQL?

I have one table called Visit and another called Measurement. Primary key on Visit is vis_id and it is also foreign key in table Measurement. Now I would like to write a report based on data in table Measurement on following conditions: Visit has field "itemAmount". I want only have data that has itemAmount = 2 in table Visit and both r...

What is the simplest way to do branching and merging using Tortoise SVN?

I have not found a really simple "how to" any where so I came up with my own through trial and error and wanted to share it, i.e. I will answer this question myself. ...

Why does Scala implicitly convert Char to Int?

Looking at scala's Predef object, which is automatically imported, I found the following gem implicit def char2int(x : Char) : Int This has caused some sleazy bugs to sneak into my code (used _1 instead of _2 in Map[Char,Int]). I really don't get it, why would I want to implicitly convert Char to Int. The whole idea of having the Char...

How to write my own include files for NASM?

I'm currently teaching myself assembly language programming on AMD64 for Linux. I've just discovered the NASMX project with its include files. They certainly make things a lot easier, but I would eventually like to extend them and even to be able to write my own. I have lots of enthusiasm and patience to do this, just no knowledge, onl...

Where can I learn the SQL way to get data out

There's a gap in my SQL knowledge I'd like to fill and I'm after recommendations on where to find resources, eg. websites, how-tos, books, etc. I've been using SQL databases for a long time. I'm quite comfortable with: basic SQL and its syntax; creating tables and indexes; inserting data; and basic DBMS maintanenance. Where I struggle ...

compiling SQLJ with Ant

How to compile SQLJ with ant? ...

Ruby on Apache with mod_ruby

Hello. I really want to run some ruby code on Apache server. I've got libapache2-mod-ruby and libapache-ruby1.8 installed (complete list of what is installed is here). What do I do now to make it run (here`s an example)? ...

O(nlogn) Algorithm - Find three evenly spaced ones within binary string

I had this question on an Algorithms test yesterday, and I can't figure out the answer. It is driving me absolutely crazy, because it was worth about 40 points. I figure that most of the class didn't solve it correctly, because I haven't come up with a solution in the past 24 hours. Given a arbitrary binary string of length n, find th...

how to group by and count using MySQL

I have data which looks like this: ID post_author post_title guid 3309 21 Should somebody not yet on SQL 2008 wait for SQL 2008 R2, since it's near release? http://sql.stackexchange.com/questions/379/should-somebody-not-yet-on-sql-2008-wait-for-sql-2008-r2-since-its-near-release 1695 429 How do we politely decline well meaning a...

Language Based Scanning in a UILabel

Hello, I'm developing a twitter client (YES, another one) for the RTL languages. How can a UILabel alignment be configured depending on the language of a tweet. So if language of the tweet is Arabic for example the alignment would be UITextAlignmetRight and vice versa. ...

How To: Platform builder for windows CE 6.0

I am a novice to Platform Builder. I need to know how to work with platform builder. As I googled I was not able to find where to start from. Following is what I am looking for. What exact tools to download? As I searched there is no tool called as platform builder. So what to download. Any books or articles on the same. Walkthrough...

How to create PagePreview with more than one page using PDFSharp?

I am using PDFSharp to create PDF files in my C# application. It's working very good, but i did not find out how to create preview with more than one page. I have no trouble creating and saving document with multiple pages, also embedding PagePreview into my Form is working. But how do i display (and draw on) more than one page in the P...

What is this syntax in Java? I do not recognize it.

This is a syntax question. I was looking at some open source files and I met some syntax that I cannot recognize and I was hoping you could clear it up for me. (This is taken from the Main.java in the Rhino debugger here) public static String[] processOptions(String args[]) { String usageError; goodUsage: for (int...

How-To Deal with Multi-Criteria Queries in 3-Tier Architecture

Assuming a basic 3-Tier application (UI-Service-Data Access) with a total abstraction of Data Access layer (SQL, Xml ...) The UI applications are composed with Datagrids with multi criteria filters, find etc.. So how-to deal with mutli-criteria queries in this architecture without having to create multiple service methods with all poss...

How to achieve Comet using Flash

How can comet be used with Flash programs? What will be needed at server side for the same? Does this require any customised servers or will normal IIS or Apache do? Also is Juggernaut an example of flash based comet? how does it achieve comet? ...

link in dreamweaver using php

how can i link flash files using dreamweaver with the use of PHP code? ...

Is there a way to hook in to OSX sleep/wake events via Applescript?

The problem I am trying to solve is quite simple. When I open the lid of my MacBook I like to have the Dock on the left side of the screen, but when I get home and connect my MacBook to my Cinema display and set up dual monitors, I want the dock on the bottom of the Cinema, not on the left side of the MacBook. I don’t want to have to g...

RoR: How to Change fields on Join statement generated by Active Record's sum function.

I'm doing a sum using the Sum function provided by RubyOnRails' Active Record as follows: s=DatosMateria.sum('inscritos',:conditions=> "datos_materia.ano=2005 AND materias.codigo=2394",:include=>"materias") it returns 0 and generates me the following SQL statement: SELECT sum('datos_materia'.inscritos) AS sum_inscritos FROM 'datos_m...

How to generate JAVA RMI stubs and skeletons from Interface?

Is there an action (menu / shortcut) that I miss or plug-in to add to a basic JavaEE distribution of Eclipse 3.5 that will allow to generate / regenerate files that usualy done from command line call for rmic? I am aware of the "RMI Plug-in for Eclipse version 2.0" I am looking for a free one. ...