select

I cannot calculate a division in my SQL code

The following code works without problems: select donem, mekankodu, count(yayin_kodu) yc, SUM(CASE WHEN iade =0 THEN 1 ELSE 0 END) yys from ( select donem, bayi_adi, bayi_kodu, x.mekankodu, mekan_adi, mekan_tipi, yayin_kodu, yayin_adi, ...

How can I disable an <option> in a <select> based on its value in JavaScript?

I have a <select> with a number of <option>s. Each has a unique value. I need to disable an <option> with a given defined value (not innerhtml). Anyone have an idea how? ...

JQuery: How to get name of a select when value is known?

Hi, I need to get the name of a select (#Dropdown) when its value is known but can't seem to get the syntax right. Here's an example: $(document).ready(function() { var countrycode = '55'; var name = $("#Dropdown[value=countrycode]").text(); // fails here if(name == 'Germany') {..... etc I can get it to work as follows i...

MySQL find nearest matching row

Hi there, I thought that this would be simple enough, but I just can't get my head around it. I have a mapping/lookup table with two columns. Col1 is used to lookup values from Col2. Col1 is a straight INT column with values in it incrementing in counts of 20, and starting from 500. So, it has values like 500, 520, 540 and so on. Each...

Determining which object was selected using a listbox

Hi, i have a array of objects, for example people and info about them. how could i determine who was selected in the listbox where only their first and last name is shown? Is it even possible somehow to link a item in the listbox with a item in the array? Obviously i can't rely on SelectedIndex because when the names in the listbox get ...

C: Using a select call, when I am reading, how do I keep track of the data?

First of all, I've never worked with C before (mostly Java which is the reason you'll find me write some naive C code). I am writing a simple command interpreter in C. I have something like this: //Initialization code if (select(fdmax+1, &read_fds, NULL, NULL, NULL) == -1) { perror("Select dead"); exit(EXIT_FAILURE); } .... .....

SELECT to pick users who both viewed a page

I have a table that logs page views of each user: +--------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+----------------+ | view_id | int(11) | NO | PRI | NULL | auto_increment | ...

long running queries: observing partial results?

As part of a data analysis project, I will be issuing some long running queries on a mysql database. My future course of action is contingent on the results I obtain along the way. It would be useful for me to be able to view partial results generated by a SELECT statement that is still running. Is there a way to do this? Or am I stuck ...

does 'KEY' in SHOW CREATE TABLE mean a column is indexed?

I am dealing with a db I did not create. I will be issuing a number of long-running queries involving three integer columns of a large table: id (a primary key), x and y. (I won't be writing/updating records; just issuing queries.) SHOW CREATE TABLE shows that: `primary_key` int(11) NOT NULL auto_increment, `x` int(11) default NULL, `y...

dijit.form.select will close surrounding tooltip dialog in IE

Hi, I have encountered a strange behaviour using dijit.form.select inside a tooltip-dialog. Here's a shortened part of my code: <div id="toolbar" dojoType="dijit.Toolbar"> <div dojoType="dijit.form.DropDownButton"> <div dojoType="dijit.TooltipDialog" id="tooltip"> <input dojoType=dijit.form.TextBox type="text" id="textbox">...

partial results from a long-running SELECT query?

We are issuing some long running queries on a mysql database. (The context is offline data analysis, not an application.) How we will proceed in research terms depends on the results we obtain along the way. It would be useful for us to be able to view (partial) results as they are generated by a SELECT statement -- before the query comp...

Select, where id = multiple from other select

I'm tired and I can't wrap my head around this. I have two tables: table menu @id = id, @nr = id of parent |======|======| | id | nr | |======|======| | 10 | 9 | | 11 | 10 | | 12 | 10 | | 13 | 10 | |======|======| table content @id = id, @mf = menu - first in tree, @mi = menu item linked to content |======|======...

C: Addressing the case of partial headers when using select in the context of HTTP...

This is in reference to a previous question of mine which was already answered: http://stackoverflow.com/questions/2159628/c-using-a-select-call-when-i-am-reading-how-do-i-keep-track-of-the-data My protocol actually sends how much data it is about send initially before it sends any other data. But yesterday, when testing out this code ...

Can't access the option value using javascript on Internet Explorer

I have the following setup "<form name=\"mylimit\" style=\"float:left\"> <select name=\"limiter\" onChange=\"limit()\"> <option selected=\"selected\">&nbsp;</option>"; ... I wrote a js script to access the selected value of the selectField 'limiter' like so: var w = document.mylimit.limiter.selectedIn...

Select everything in a pre box when you click on it?

The select() method only seems to work with textareas and input spaces, and I don't know javascript very well, so I'm not coming up with any solutions. Does anyone know how to highlight everything in a pre box when you click on it? What I'm trying to do is make it so a visitor can easily highlight everything in the pre so they can then...

How to get label of select option with jQuery?

<select> <option value="test">label </option> </select> The value can be retrieved by $select.val(). What about the label? Is there a solution that will work in IE6? ...

flowDocumentReader Selection propperty

i have written a code to select a text in flow documet reader and bring it into view docView1.Focus(); docView1.Selection.Select(textRange.Start, textRange.End); docView1.BringIntoView(textRange.Start.GetCharacterRect(LogicalDirection.Forward)); but flowdocumentreader.selection is not supported in .net framework 3....

c++ Socket select and receive problem

Hi all; Below is the code fragment I have issue with socket programing. Here after select call, If I do not put a sleep on line 9, on Windows XP, 1 byte is received on line 11 (instead 4 byte is sent from server as integer), when I check xmlSize, it is set to 0. Because iResult is 1, execution continues and on line 15 second receive is c...

Writable Select Box

Looking for a Jquery plugin so I can have a select box that includes a writable option. So using javascript to merge a select box with an input field. I'm thinking this would be a fairly common requirement, Anyone know of such a plugin? Thanks ...

C: Question about Beej's networking guide... Is there an assumption here?

I was just going through the Networking Guide by Beej and am curious about this part of the code (specifically marked with "From here" and "To here"): // main loop for(;;) { read_fds = master; // copy it if (select(fdmax+1, &read_fds, NULL, NULL, NULL) == -1) { perror("select"); exit(4); ...