Select Sqlite3 command won't execute

My problem is that I have a program working with some sql statement const char *sqlStatement = "SELECT lastPlayed FROM Settings;"; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) != SQLITE_OK) { NSLog(@"database error"); } if(sqlite3_step(compiledStatement) == SQLITE_ROW){ ... } My problem is that with this sql command it will write to the nslog that database error and it won't get into the b

Select() Input Field with Knockout.js

I am new to Knockout.js. What is the best way to select() an <input /> when it becomes visible? View: <p> Name: <b data-bind="visible: !editing(), text: name, click: edit">&nbsp;</b> <input data-bind="visible: editing, value: name, hasfocus: editing" /> </p> ViewModel: function PersonViewModel(name) { // Data this.name = ko.observable(name); this.editing = ko.observable(false); // Behaviors this.edit = function() { t

show selected option in Select

The HTML file has select element that is populated from a list of states. I need to show a particular state, FL, as selected entry. <select id='mystate' template iterate="x in myStatesList"> <option>{{x}}</option> </select> Tried following in dart file but it does not work: inserted() { var x = query('#mystate') as SelectElement; x.options.selectedIndex = 10; } Also tried calling function in option that returned 'selected' as follows: <option {{gv(x)}}&

Select IOCP and non-blocking IO

I have 3rd party library that uses non-blocking send, recv (in Windows), so I can use libevent (or libev) with select backend to event loop. Is there easy way to use IOCP backend (libevent2, libuv)? Because in different manuals write, that i must use WSASend, WSARecv functions with some additional arguments (pointer to OVERLAPPED structure). How can I use IOCP backend event loop with this 3rd party library without rewriting its code? Or it is not impossible?

ASP.net: How to toggle a checkbox based on a dropdownlist selection

I have a dropdownlist control and it's populated with a list of peoples names from a database. I want to enable a CheckBox control if the user selects a person in the list and disable the checkbox if they select BLANK (also an option in the list). Here is a portion of my code... <tr> <td>&nbsp;<asp:Label ID="lblAssignedTo1" runat="server" Text="Assigned To:"></asp:Label></td> <td><asp:DropDownList ID="ddlAssignedTo1" runat="server"

Select Counting records twice

I need to have 2 columns for a result. 1 source table/view has the field called "Date_Entered" which is yyyy-mm-dd hh.mm.ss for each entry (full date/time stamp) I need a query that builds 2 columns of results. The results are the total number of records per month per year. Would look like this ... Year_2012..... Year_2013 498................. 132 134................. 564 787................. 342 and so on for 12 results per year(if applicable) what I

Using SELECT Multiple to perform a filtered search

I have searched previous questions and either haven't understood the answer or it was slightly different to my issue. I manage an Business Management System and this system uses a MS Access Database (MDE file). The system itself is an intranet site using ASP pages and is a repository for all of our processes and procedures, while also providing our continual improvement system. I have only average programing ability and am limited by not being able to modify the MDE file (except for creating n

Select Laravel and Eloquent: Specifying columns in when retrieving related items

This is a followup post to: Laravel 4 and Eloquent: retrieving all records and all related records The solution given works great: $artists = Artist::with('instruments')->get(); return \View::make('artists')->withArtists($artists); It also works with just: $artists = Artist::get(); Now I'm trying to specify the exact columns to return for both tables. I've tried using select() in both the statement above and in my Class, like this: ArtistController.php $artists = Artist::select('

WCF OData Service stored procedure call generates "Operation could destabilize the runtime" error with $select option

I've been trying to call a stored procedure through Entity Framework and WCF Data Services (OData). It returns an entity not a complex type. Following walkthroughs found all over the web (like this one), I came up with this code inside my service: [WebGet] public IQueryable<Entity> GetEntitiesByParameterId(int parameterId) { return CurrentDataSource.GetEntitiesByParameterId(parameterId).AsQueryable(); } Calling the proc this way: ~WcfService.svc/GetEntitiesByParameterId?parameterId

Comparing two fileds in select command

I am trying to select all records from Transaction_Table where Tr_Amount = Instrument_Number using following Code Select * from Transaction_Table where abs(Tr_Amount) = Cast(Instrument_number as INTEGER) However there are some rows in the table where Instrument_Number is Alphanumeric instead of Just Numeric Data. I there a way to skip the alphanumeric instances in Instrument_Number field in the command.

"selected" tag on option doesn't work when select has formControlName

Don't know what happened but in that case there is no selected option and I have to choose something from the list. When I delete formControlName="localization from select, then Gdańsk is selected at the start. Lokalization control looks like this localizationCtrl = new FormControl("", Validators.required); there is no difference when I replace that on: localizationCtrl = new FormControl(""); of course next step was to add that control to offerForm by doing: ... localization: this.localizatio

Select Why Cassandra doesn't let to query clustering key by IN restriction?

Does anyone know why I cannot use query where I restrict clustering column by IN and I select collection column? Let me elaborate on that. Let's say I have data model similar to the following: create table inventory ( sku text, class text, unit text, node text, supply map<text, frozen<delta_and_time>>, supply_compacted int, primary key ((sku, class, unit), node)); when

vim: how to select and replace one word for all its appearance?

In a file, I wish to replace all "middle" with "medium", I dont' wish to use :%s:middle:medium:g I wish to 1. put the focus on the word of "middle" 2. press 'gd' to high light it, 3. and then do something to replace all its appearance(multiple places) into "medium". What's more, does vim provide that when I replace a word, while typing, all its locations will display the same change? How to do this, should I use normal mode or visual mode?

select2 Clear Search Input

I have problems with my Select2 filters. I need to implement Clear button. I have 4 filters, two of them are simple select filters, and two are inputs with search bar that are developed through query parameter of select2.js <div class="input-append"> <select class="filter-select form-control data-filter fCombo-select"> <option></option> </select> </div> <div class="input-append"> <input type="hidden" class="fCombo-select"/> </div>

Cassandra Select Query for List and Frozen

I have user define type like CREATE TYPE point ( pointId int, floor text); And I have table like: CREATE TABLE path ( id timeuuid, val timeuuid, PointList list<frozen <point>>, PRIMARY KEY(id,val) ); And have create index like create index on path(PointList); But the problem is I am not able to execute select query where PointList = [floor : "abc"]. I google for 2 hours but not able to find the hint. I am using this query to execute select query Select * from path wher

Select What is the equivalent of the "Where In" command in Lambda?

What is the equivalent of the "Where In" command in Lambda? I have a list of numbers that I want to compare this list with a field from another list and return each one that was available list<user> Listusers= { userid=1 , name='ali ', userid=2 , name='reza', userid=3 , name='maryam', userid=4 , name='sara', }; List<int> listIds={1,2,3,4,5}; var eee= "select * form Listusers Where userid in (listIds)";

Select How to use the iterator tag in Struts2?

I have class A { private String field1; private String field2; private B b; } class B { private String field3; } List<A> myList; How can I access the field3 using the myList? This would work for field1 and field2, but how about field3? <s:iterator value="myList"> <tr> <td><s:property value="field1"/></td> <td><s:property value="field2"/></td> </tr

select the inverse of sql result as a string list

having a sql e.g. something like the following resulting in some rows with one value. I search a different sql than SELECT * FROM some_sql which results in one row with comma separated values. WITH some_sql AS ( SELECT 1 FROM DUAL UNION SELECT 2 FROM DUAL ) SELECT * FROM some_sql this SQL results in the two rows with value 1 and 2. I seach a SQl resulting in 1,2 without changing the code of 'some_sql'.

[Symfony]--Get value from selected Item

how to get a value of selected item from select option In symfony?(from article below) I have that config in my form: $this->widgetSchema['category_id'] = new sfWidgetFormDoctrineChoice(array( 'model' => 'Category', 'method' => 'getLibelleCat', 'add_empty' => 'select category' )); $this->widgetSchema['article_id'] = new sfWidgetFormDoctrineDependentSelect (array( 'model' => 'Article', 'method' => 'getLibelle',

Select Yii fail to retrieve max column value

I have two models, one is Auction, the other is Bid. An Auction has many Bids. they are associated by foreign key auction_id in Bid Now, I want to find the max value of the Bid's price for each Auction. $dataProvider = new CActiveDataProvider('Auction', array('criteria' => array( 'with' => array( 'bids' => array( 'alias'=>'b', 'group' => 'auction_id',

extjs nested data view select a node

i have data view with following tpl. <tpl for="."> <tpl for="departments"> {title} </tpl> <tpl for="records"> <div class="thumb-wrap"> {name} </div> </tpl> </tpl> and my json redear like this reader : new Ext.data.JsonReader( { root : 'data', }, [ 'departments' , 'records' ] ), and my item se

Select SQL Server 2000 query that omits commas in resulting rows?

Wondering if there is a way to query a SQL Server database and somehow format columns to omit commas in the data if there is any. Reason for asking is I have 10000+ records and through out the data the varchar have data like 3,25% and other 1%. I'd prefer not to alter the data in the original table thus asking if a select with other functions would do the trick. I have thought about selecting all the data into a temp table and stripping the commas but that is a lot of work for every time I

selenium webdriver how to select from list menu item

How do I select an item in the list of menu items once it appears as a dropdown? I tried sendKeys to input the text like "Brown Mustard", but it clears out when I hit the submit button. I know I should be able to type it in the field but WebDriver sendKeys didn't work, so if you have suggestions on how to select from a list menuitems, thanks so much! Here's the html snippet of the text field and the menu items that appear when you enter say "B" <input id="combobox0-text" class="ui-auto

AngularJS select directive not working with option

This example seems simple enough, I just can't seem to figure out why it is not working (I don't want to use ng-options because that doesn't work with select2, a plugin I want to use once I get this figured out): HTML: <div ng-app="myApp"> <div ng-controller="MyCtrl"> selectedNumber: {{selectedNumber}} <select ng-model="selectedNumber"> <option ng-repeat="number in numbers" value="{{number}}">{{number}}</option> </select&

issue with opera and border radius selection arrow showing outside when animated

view the example here: http://qwee.net the problem is only on safari when viewing the page on safari the link arrow pops up a ways outside the spinning circle. On firefox the select cursor changes exactly on the border. I assume the issue is something with safari allowing the area outside the border radius to be selected... not sure my code looks something like this: @keyframes spincounterclockwise { 0% {transform: rotate(360deg); -o-transform: rotate(360deg);} 100% {transform: rotate(0

Select Joining data from three views

I need to bring in data from 3 different views into my results. View A has almost all the data I need but it uses primary keys for two fields and I need to pull in the identifiers from the UI so it looks like this: View A: PortfolioID, SecurityID, then 20 other points I need View B: PortfolioID, PortfolioCode, View C: SecurityID, Symbol I need to select all the data from View A but instead of PortolioID I need the corresponding PortfolioCode from View B and instead of SecurityID I need th

Select One Element in Each Row of a Numpy Array by Column Indices

Is there a better way to get the "output_array" from the "input_array" and "select_id" ? Can we get rid of range( input_array.shape[0] ) ? >>> input_array = numpy.array( [ [3,14], [12, 5], [75, 50] ] ) >>> select_id = [0, 1, 1] >>> print input_array [[ 3 14] [12 5] [75 50]] >>> output_array = input_array[ range( input_array.shape[0] ), select_id ] >>> print output_array [ 3 5 50]

Set maximum text selection range in webpage

I would like to set limit of text selection on my web page with javascript. What I mean - if someone try to select text with the mouse cursor (or pressing ctrl+a), the maximum selected range have to be 100 characters, i.e. he will copy maximum 100 characters from my page. Is it possible?

Using rand() to select one of 2 specific numbers

I'm trying to call rand() to select one of two numbers, either a 1 or a 2. so that: (pseudo) //the first call might print 2 printf("%d",rand(1 or 2)); //prints 1, perhaps //and the second call might print 2 printf("%d",rand(1 or 2)); //prints 2, perhaps How can this be done? Perhaps call these variables int first=1; int second=2; and work from there?

dojox/gesture/swipe prevents the html select to open dropdown

can anyone please explain to me why the html SELECT control (or any other control like BUTTON) placed inside the div (that is registered with dojox/gesture/swipe events) cannot be opened? I'd welcome any workarounds pls require({ }, [ 'dojo/dom', 'dojox/gesture/swipe', 'dojo/on', 'dojo/_base/event' ], function(dom, swipe, on, event) { var div = dom.byId('testSwipe'); var isSwipe = false; on(div, swipe.end, function(e) { console.log("### SWIPE"); }); }); http:/

select as an array an OrientDb tree subgraph specific out relations

Exploring OrientDB, I am stuck with the following query: I've a set of classes Package, Library, Application, each with a name as attribute. I've also a class Person with name and email as attributes. Relations are defined as classes 'require' or 'writtenBy' from E. Applications vertices may have 'require' edges to one or more Librarys. Librarys vertices may have 'require' edges to one or more Packages. Packages vertices also may have 'require' edges to one or more Packages ! Applications

Select from H2 adds "clob:" to texts in clojure

I am using a h2 database with clojure. I made a table and put some data in like this (j/create-table :locations [:id "bigint primary key auto_increment"] [:title "varchar (255)"] [:part "clob"]) (j/insert-records :locations {:title "Steven Gerrard: I'm not the new Beckham" :part "He might not have the Becks appeal -- but Steven Gerrard says he's ready to light up Hollywood in his own way..."})) ) ) And then I selected the data (defn newest [] (database/mysql-db) (

Select ffmpeg - extract exact number of frames from video

I want to create a maximum of 30 images from a video (and tile them for a sprite sheet). I've tried using the 'select' with 'mod' but if the total number of frames does not fit neatly into the desired number of images (30) then I sometimes end up with more images, sometimes less. For example if my video is 72 frames long, my 'mod' would be 72 / 30, which is 2.4. I'm running this from a python script so i'm doing something like the following for the filter: select='not(mod(n\," + str(mod) + "

epoll VS select

I have read a couple of networking books to get some idea of differences between epoll and select but they only covered this concepts slightly. I will be appreciated if you guys can provide me the key differences in details. Thanks in advance

describe select query

DESCRIBE (or SHOW COLUMNS) does not seem to work except for a table. I want to be able to retrieve the equivalent of DESCRIBE <table>, but for an arbitrarily complex SELECT query. For example, I would like to say: DESCRIBE (arbitrary SELECT statement) AStable2 where the SELECT statement might contain JOINs and so on In the simplest case DESCRIBE (SELECT * from table1) as table2 should yield the same results as DESCRIBE table1 Is there some SQL that I can use to get this,

Does the w3c.org site have documentation on "select"?

I cannot work out where this doco might be - i'm assuming they do have something on it. I realise this is a dead simple question, but no amount of searching is bringing this up for me. Bing/DuckDuck etc search cannot find anything particularly relevant, and the only w3c.org links I followed went to "functions", which apparently "select" isn't. EDIT (Apologies for ambiguity) I am looking for the definition of something along the lines of : <xsl:variable name="variableName" select="some/pat

grails multiple select: values are not stored in related object

I have a multiple select as follows: <g:select name="receiptItems" from="${HealthService.findAllByDoctor(Doctor.findBySecUser(new ReceiptController().getCurrentlyLoggedUser()))}" multiple="multiple" optionKey="id" optionValue="${{it.healthServiceType.healthService}}" size="5" value="${receiptInstance?.healthServices*.id}" class="many-to-many" onchange="${remoteFunction( controller: 'Receipt',

Select Optimizing conditional query in sybase

I would like to get help on optimizing my query below. I want to have a view that exposes employee data across years. This view has data from employee table which has employeeID, year and employee demographs as columns. I also have a table called testemployees which has EmployeeID and Year. This is a subset of employee table which might or might not have data. What I am trying to accomplish is: If there is data in testEmployees table my view should fetch employee details only for employees in

How to generate select option depends on the selection of the radio button

I'm trying to make a web form using 2 radio buttons & 2 select option elements : <input type="radio" name="optionsRadio" value="oA">Option A <br> <input type="radio" name="optionsRadio" value="oB">Option B Option1:<select id="mainCategDropMenu" name="mainCategDropMenu"></select> <br /> Option2:<select name="subCategDropMenu" id="subCategDropMenu"></select> <script language="javascript">

Select How to replace records with maps in MatchHead of Match Specification?

An Erlang match specification supports the following pattern with record in MatchHead of Match Specification: #recordName{field1=1, field='$1', _='_'} This matches all the recordName records from a table which has field1 == 1 and also does an implicit binding of field to be used later in MatchBody. Is there anything similar with maps? I tried (apart from Google) the following syntax(es): % ERROR: * 1: only association operators '=>' are allowed in map construction #{key:=1, key:='$1', _

Get text from selected option

I have a form with some <select> bound to an object comming from a webservice : <select [(ngModel)]="configDatas.type" name="type" id="type"> <option value="0">Disabled</option> <option value="1">Day</option> <option value="2">Week</option> </select> <select [(ngModel)]="configDatas.days" name="days" id="days"> <option value="0">Monday</option> <option value="1">Tuesday</op

how to use select (jdbc) with prepared statement using javafx

I have a jdbc code and I want to select my data from database using prepared statement and javaFX . I mean i want to use java fx to get the String part . here is my data access code ,But I dont know how to write the controller method with Parameters and how to iterate the list. public ArrayList selectByNameAndFamily(Person person) throws Exception { preparedStatement = connection.prepareStatement("select * from person where name = ? and family = ?"); preparedStatement.setString(1,

Vue 2.0 - How do I get the old selected option value?

How can I get the old selected option value (with Vue) on updating a form? My view: <div class="well" id="app"> <div class="form-group"> <label>Room category</label> <select class="form-control" name="room_category_id"> <option style="display: none" value="">Attach a room category to a room</option> @foreach($room_categories as $room_category) <option value="{{ $

Select Couchbase order by index is very slow

I have created an index in s1_date but this query is still very slow (15 s) but when I remove "order by s1_date desc" it gets faster about (10 ms) This is the query: SELECT * FROM `bucket_1` WHERE type = 'type1' AND (batch_number1 like '' OR batch_number2 like '' OR batch_number2 like '' OR batch_number3 like '' OR batch_number4 like '' OR batch_number5 like '') order by s1_date desc limit 10

Select Retrieve rows with a given set of values and no others

Working with Db2 on z/OS. Consider a simple example of an ORDER table and a child ORDER_ITEM table. the PK for the child is ORD_NUM plus PART_NUM. I want to find the rows in the ORDER_ITEM table with parts that have only a certain set of PART_NUM values and no other. So for example, if the parts I'm interested in are PART1, PART2 and the ORDER_ITEM table has rows like so ORD1 PART1 ORD1 PART2 ORD2 PART1 ORD3 PART2 ORD4 PART1 ORD4 PART2 ORD4 PART3 A query like SELECT blah FROM ORDER_ITEM WHERE

jquery mobile select works in fiddle, not in sandbox

I have this fiddle (thanks to user named once) which behaves nicely: you select one option in the dropdown, and it shows a table column corresponding to that option and hides the three others. html </div> <!-- /header --> <div data-role='content'> <table class='mytable'> <caption style='text-align: left;'>Table A</caption> <thead> <TR> <TH align='left'>Type</TH> <TH al

  1    2   3   4   5   6  ... 下一页 最后一页 共 7 页