multiple

how to sum multiple sql queries together?

Hi! I'm trying to run multiple queries on multiple tables- similar to "select count(*) from TableA where x=1" per table. What I'd like to do, is get all of the count(*) values that are returned and sum them into a single value... Any ideas? ...

How to efficiently process 300+ Files concurrently in scala

Hello I'm going to work on comparing around 300 binary files using Scala, bytes-by-bytes, 4MB each. However, judging from what I've already done, processing 15 files at the same time using java.BufferedInputStream tooks me around 90 sec on my machine so I don't think my solution would scale well in terms of large number of files. Ideas...

MySQL: Select multiple tables

I want to select multiple tables with MySQL. But I don't know exactly the name of them, but they have all the same structure. For example: table_345: id || row_1 || row_2 || row_3 I want to have something like that: SELECT `id` FROM table_* ...

Open Links in Multiple Browser Windows / Tabs

Hi, I have a requirement to click on multiple links (selecting them) and then click a button that will open all selected links in new windows or tabs. This will of course be dependent upon the browser behaviour. My plan is to use Javascript to add the selected links to an array and then upon clicking the submit button, the javascript w...

MongoDB: How to update multiple documents with a single command?

I was surprised to find that the following example code only updates a single document: > db.test.save({"_id":1, "foo":"bar"}); > db.test.save({"_id":2, "foo":"bar"}); > db.test.update({"foo":"bar"}, {"$set":{"test":"success!"}}); > db.test.find({"test":"success!"}).count(); 1 I know I can loop through and keep updating until they'r...

Zend Framework - multiplate navigation blocks

Hi I want to use the navigation helper to build my navigation menus using Acl. The Acl part I have working fine. I now want to be able to display a few different types of navigation. E.g. admin-nav, side-nav, new-nav, etc. I cannot find anything about this in the docs. Only how to set the navigation and then use that one navigation obj...

C# multiple replace works slow, any faster idea ?

return mystring.replace(/&/g, "&amp;").replace(/>/g, "&gt;") .replace(/</g, "&lt;").replace(/"/g, "&quot;"); The above is my code, and I guess since it tracks the string 4 times, it makes it slower. Is there any other way (method prefered) to replace those special characters in only one loop? Well I can do it with a for loop an...

Selecting one element with multiple selectors in Jquery

Hi All, Im kinda new to Jquery, so this might be easy, then again i cant seem to find anything on Google. So here goes. I basically have this: <div> <div id="row1" class="col1" onMouseOver="OnMouseOver(11)"> I dont want to select this </div> <div id="row1" class="col2" onMouseOver="OnMouseOver(12)"> I wan...

Hibernate map collection with constant key

Hi, I'm trying to map a collection (of type map) using a foreign key and a fixed value as the key/mapping arguments. I have several tables of product types and a language table which holds stuff like product names and so on. Now let's say we have an Accessory table which holds (obviously) accessories, then the name of an accesory is s...

SQLite - SELECT over multiple entries of the same data/column

I am a bit new to SQLite, and I am having a slight dilemma about my database design. I'll explain. Suppose you and your friends use a number of different nicknames on the Internet (can be more than one per person). What we have here is an ID of the person and a list of all nicknames that this person uses. This is a single entry in a larg...

How do I handle a multiple select form field in Perl?

What is the best, in Perl, way to get the selected values of a multiple select form field? <select name="mult" multiple="multiple"> <option value="1">Opt. 1</option> <option value="2">Opt. 2</option> <!-- selected --> <option value="3">Opt. 3</option> <option value="4">Opt. 4</option> <!-- selected --> <option value="5">...

Mysql join 2 database and 3 tables query?

SELECT db1_t1.userid as userid , db1_t1.customer_id as vw_customer , db2_t1.customers_id as customer , db2_t1.orders_id as order FROM database1.table1 db1_t1 LEFT JOIN database2.table1 db2_t1 ON db1_t1.customer_id = db2_t1.customers_id It gives me this error: You have an er...

Mysql query, select 2 databases with 4 tables + nested SELECT?

This is my current query $sel = "SELECT db1t1.userid, db1t1.customer_id, db2t1.customers_id, db2t1.orders_id, db2t2.products_price FROM database1.table1 db1t1 LEFT JOIN database2.table1 db2t1 ON db1t1.customer_id = db2t1.customers_id LEFT JOIN database2.table2 db2t2 ON db2t1.orders_id = db2t2.orders_id WHERE db1t1.use...

Delete multiple records from a table using subsonic T4 templates?

Hi, Using templates, how can I delete multiple records from a table in same Delete statement? Please advise. Thanks Pankaj ...

MySQL search multiple tables for information

Hi all!, I'm building a searchfunctionallity where a user can select the different libraries to search in with the provided keywords. Also the AND operator is supported. My problem is that when I try to search for information it gets somehow multiplied or it gets increased exponential?? I'm using a MySQL database and PHP to process the...

Is there anyway to download multiple files from an ASP.NET page?

Is there anyway to download multiple files from an ASP.NET page? What I want is, the method for downloading multiple files from an ASP.NET page without prompting the user with Save dialog box, the files should be get downloaded into some particular location in the client's machine (where the ASP.NET page is browsed). I tried creating a...

Why are Multiple File Uploads not Simple without Flash/.NET?

The only tools/plugins I've seen online that allow for multiple files to be selected for upload through one single dialog box using a SHIFT or CTRL click action (as opposed to clicking on a single file per for file uploads) exist for controls made in Flash/.NET/Java, not just straight Javascript/HTML/PHP. Why is that the case? I'd ima...

Synchronizing on two or more objects (Java)

I have code similar to following: public class Cache{ private final Object lock = new Object(); private HashMap<Integer, TreeMap<Long, Integer>> cache = new HashMap<Integer, TreeMap<Long, Integer>>(); private AtomicLong FREESPACE = new AtomicLong(102400); private void putInCache(TreeMap<Long, Integer> tempMap, int fileNr){ i...

How can I select multiple rows in UITableView

Hi I want to display some selected contacts in a list and then I need a feature to select multiple contacts at a time and then on clicking a button it should trigger an email to the selected contacts. For this I am using UITableView to display the contacts but I am not able to find any way to unable the multiple selection for UITable...

querying multiple servers

Hi everyone I am building a web service which needs to query 1 to n file servers, and receive multiple files as a result. Does anyone have a good idea on doing this? Would Threads do any good job? What if the connection with some servers takes longer than the others? How do I know if I really have ALL the queried files? Thanks ...