select

UIPicker detect tap / touch on currently selected row

Okay guys, I have a UIPickerView and I want to do something when the user TAPS the currently selected row. I have it working right now where if they tap a row which is NOT selected, it rotates to the selected center view. However, when they tap this already selected row, the method didSelectRow is not called. I need something that execu...

How to set default value for HTML select element?

I thought some thing like this would work: <select name="hall" id="hall" value="3"> <option> 1 </option> <option> 2 </option> <option> 3 </option> <option> 4 </option> <option> 5 </option> </select> But it didn't. So How could I set a default value for select? Thanks. ...

How can I do SELECT UNIQUE with LINQ?

I have a list like this: Red Red Brown Yellow Green Green Brown Red Orange I am trying to do a SELECT UNIQUE with LINQ, i.e. I want Red Brown Yellow Green Orange var uniqueColors = from dbo in database.MainTable where dbo.Property == true select dbo.Color.Name; I then changed this to var uniqueColors = from dbo in database.Ma...

Jquery: Is there something wrong with my .load()?

I have a problem with this code... The preloader shows up when this function is fired, but it never hides. The page also shows up before the image inside it is finished loading. Is there something wrong with my load function? $('select.select').change(function() { var x = $(this).val(); //Hide the current page and show the p...

jQuery select "change" event not fired

I have three depending selects. First one, have some values. <select id="first"> <option value="1">v1</option> <option value="2">v2</option> </select> Second and third are blank: <select id="second"></select> <select id="third"></select> I want to populate blank selects via ajax requests. So I do: jQuery('body').delegate('#first'...

Adding both a collection and a custom field to a Select Box

I am making a select box, and I'm using a collection in it. But at the top of all the selections I want to add something that otherwise wouldn't be in that collection. Here is my select box : = select (@organization, "tabs", @organization.tabs.collect { |t| [t.title, t.id] }, {}, {:class => "text_tab_link"} ) And I would like to ad...

How to group by week of the year dates or day dates that start on Sundays in oracle 10?

Given a table: day_date (form of yyyy-mm-dd) column2 column3 I want to group the data by weeks, and the start of each week goes from Sunday to Saturday, but I want to display the day_date. I have looked around all over, and I'm rusty on my SQL. Thanks! ...

Select top statement ordering by non-unique column

I have two sql queries select * from table1 ORDER BY column1 Select top 10 * from table1 ORDER by column1 Column1 is a non unique column and table1 does not have a primary key. When I run both queries, I'm getting the rows returning in different orders. I attribute this to the fact that the criterion for ranking (the Order By) is no...

Selecting a "select option" after creating it with ajax

I have a page that has a series of "related" selects. Everything works fine UNLESS there is an option that is pre-selected. I can set the "pre-selection" to work if I put an "alert" in the code but without it it doesn't work. For Example: function loader(){ if ($("#prod_1").val() > 0){ switchBatch(1); $('#batch_1')...

Get results from mysql based on latitude longidude

Hi all, I have a mysql Database and 2 tables let's say clients and schools. Now each table has columns latitude and longitude. And I need do make a SELECT for example from second table where schools are in a given radius of one record from first table. Calculations should be made based on latitude and longitude. PS: I am using PHP. ...

"Select" comparing neighboring elements in Mathematica

In Mathematica the command Select only lets define a selection criterion for each element of a list on its own. I want to specify a criterion that is dependend of a function of the previous and/or next element and a function on all elements, respectively. The first and last element cannot be tested that way, but they should be selected ...

Mysql Trigger error

1.I m using mysql 5.2.2 version 2.I create table in my test database CREATE TABLE account (acct_num INT, amount DECIMAL(10,2)); 3.I also Create trigger CREATE TRIGGER ins_sum BEFORE INSERT ON account FOR EACH ROW SET @sum = @sum + NEW.amount; 4.I insert data into account table INSERT INTO account VALUES(137,14.98),(141,1937.50),...

Dynamic select menu's in Rails?

Hi Everyone, I am trying to get dynamic select menu's working in my Rails application. I have a model called kase, a model called person and a model called company. When a user creates a new kase, they are presented with a select field to choose a Person and a select field to choose a Company. I am trying to make it dynamic, so if t...

problem with <select> and :after with CSS in WebKit

Hi, I would like to add some style on a select box with the pseudo :after (to style my select box with 2 parts and without images). Here's the HTML: <select name=""> <option value="">Test</option> </select> And it doesn't work. I don't know why and I didn't find the answer in the W3C specs. Here's the CSS: select { -webkit-appea...

html multi <select> array in PHP post

<form> <input class="date-pick" type="text" value="2010/08/02" name="date" /> <table id="events_selection"> <tr> <td> <img src="/admin/ajax/image.php?filename=/media/immagini/danieledaniela/1.jpg&maxw=200" /> <select name=...

Transact-SQL Select with Name only

Let's say I have the following two tables: Fields FieldID INT FieldName NVARCHAR(50) Values FieldID INT Value NVARCHAR(1000) From the following stored procedure, how can I select only the values that are linked to a field which has the same FieldName than the one received as a parameter? CREATE PROCEDURE [dbo].[GetValues] @FieldN...

Use select in PHP, MySQL when I know exactly which column i need

Hello, now i use this code: $welcome_text = mysql_query("SELECT * FROM `text` WHERE `name` = 'welcome'"); while ($row = mysql_fetch_array($welcome_text, MYSQL_ASSOC)) { echo $row['content']; } Is it possible to use it without WHILE if i know exactly which one column i need? Something like this: $welcome_text = mysql_query("SELECT '...

Need help with SQL ORDER BY

I have a table of contacts which has name and default_name columns among others. Contact name is name, unless name=NULL and then it is default_name (which cannot be NULL). I would like to order my selection by contact name. For example: contact_id name default_name ---------- ---- ------------ ...

How to keep header from being selected when there is one item in a QTableWidget?

I can't seem to keep the horizontal header from being selected when I select a single row in a QTableWidget. Example: How can I prevent the header from being selected too? This only happens when one row is in the table. If it has more than two rows, then it works as expected and only the row itself is selected. Note: I have set u...

Most correct way to select option in <select> box

I know there are multiple ways to select a particular option from a using jQuery: $select.val("someValue") $option.attr("selected", "selected") $select[0].selectedIndex = 1 Assuming you have both the index of the option you wish to be selected and its value, what's the most correct way (from the above, or otherwise) to make it selec...