Search Results

Search found 45193 results on 1808 pages for 'select call'.

Page 53/1808 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • Using Fortran to call C++ Functions

    - by Dane Larsen
    I'm trying to get some FORTRAN code to call a couple c++ functions that I wrote (c_tabs_ being one of them). Linking and everything works just fine, as long as I'm calling functions that don't belong to a class. My problem is that the functions I want the FORTRAN code to call belong to a class. I looked at the symbol table using nm and the function name is something ugly like this: 00000000 T _ZN9Interface7c_tabs_Ev FORTRAN won't allow me to call a function by that name, because of the underscore at the beginning, so I'm at a loss. The symbol for c_tabs when it's not in a class is quite simple, and FORTRAN has no problems with it: 00000030 T c_tabs_ Any suggestions? Thanks in advance.

    Read the article

  • select n largest using LINQ

    - by Mathias
    This is likely a novice question about LINQ, but assuming I have a set of Items with a DateTime property, one date having at most one item, how would I go about selecting the N most recent items from a date of reference, that is, the N items which have a date smaller that the requested date, and the largest date? My naive thought would be to first select items with a date smaller than the reference date, sort by date, and select the N first items from that subset. var recentItems = from item in dataContext.Items where item.Date<=date orderby item.Date descending select item; var mostRecentItems = recentItems.Take(5).ToList(); Is this the "right" way to do it, or are there obviously better ways to achieve my goal?

    Read the article

  • Select columns from join table only without requiring a join

    - by Kent Boogaart
    Given these tables: create table Orders ( Id INT IDENTITY NOT NULL, primary key (Id) ) create table Items ( Id INT IDENTITY NOT NULL, primary key (Id) ) create table OrdersItems ( OrderId INT not null, ItemId INT not null, primary key (OrderId, ItemId) ) Is it possible to use HQL/criteria API to contruct a query that results in the following SQL: SELECT [OrderId], [ItemId] FROM [OrdersItems] I've tried both of these approaches: var hqlResults = session .CreateQuery("select order.id, item.id from Order order inner join order.Items item") .List(); var criteriaResults = session .CreateCriteria<Order>() .CreateAlias("Items", "item", NHibernate.SqlCommand.JoinType.None) .SetProjection(Projections.Property("id"), Projections.Property("item.id")) .List(); But both approaches insist on generating a join (or fail because the join isn't present, in using criteria), resulting in SQL such as: select order.Id, item.Id from Orders order inner join OrdersItems ordersItems on order.Id = ordersItems.ArticleId inner join Items item on ordersItems.CategoryId = item.Id Is there any way to have NHibernate generate a query that selects columns only from the join table, without requiring a join?

    Read the article

  • How to get <select> options either (value or text) using jQuery

    - by Muhammad Sajid
    Hello, i have a code for <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C</option> </select> and i want that how ever i select any option, it will show in an alert message. i have try <script type='text/javascript'> //var value = $("#list option[value=2]").text(); //var value = $("#list option:selected").text(); //var value = $('#list').val(); var value = $(this).val(); alert(value); </script> but fail.

    Read the article

  • Google API fonts in a select box

    - by Vivek Dragon
    get all available fonts from google font api I like to apply the same function in my Fiddle HTML <select id="styleFont"> <option value="0">Myraid Pro</option> <option value="1">Sans ref</option> <option value="2">Times New Roman</option> <option value="3"> Arial</option> </select> <br> <textarea id="custom_text"></textarea> CSS #custom_text{ resize: none;}? Script $("#styleFont").change(function () { var id =$('#styleFont option' + ':selected').text(); $("#custom_text").css('font-family',id); });? I tried to add the google API fonts in my select box by using https://www.googleapis.com/webfonts/v1/webfonts?key=YOUR-API-KEY how to add this to my html page

    Read the article

  • Using numeric values to select item from a dropdown box with JavaScript

    - by Shyam
    Hi, I have a multitude of dropdown boxes within my webpage. One of these dropdown boxes is used for a single selected value out of a list of options. <SELECT id="Box0" name=""> <OPTION value="0">none</OPTION> <OPTION value="1">first</OPTION> <OPTION value="2">second</OPTION> </SELECT> How can I add an event to this section, so when it is in focus, I could use numeric keys like 1,2.. to select an option instead of using the mouse or arrow keys for selecting an option? For clarification: if I press "1" on my keyboard, the selected value would become "first", with "2" the selected value becomes "second". I choose not to use a library/framework such as JQuery/Mootools. Thanks,

    Read the article

  • Nested mysql select statements

    - by Jimmy Kamau
    I have a query as below: $sult = mysql_query("select * from stories where `categ` = 'businessnews' and `stryid`='".mysql_query("SELECT * FROM comments WHERE `comto`='".mysql_query("select * from stories where `categ` ='businessnews'")." ORDER BY COUNT(comto) DESC")."' LIMIT 3") or die(mysql_error()); while($ow=mysql_fetch_array($sult)){ The code above should return the top 3 'stories' with the most comments {count(comto)}. The comments are stored in a different table from the stories. The code above does not return any values and doesn't show any errors. Could someone please help?

    Read the article

  • jquery - lose click() event after ajax call???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and closes upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • Maintaining white space in html select tag

    - by Marius
    Hi, I have a list of strings that I would like to display in a HTML select object. The strings look something like : id - name - description I would like the fields to align however. In PHP I'm using sprintf ("%4s%10s%20s", $id, $name, $description); which works fine. The problem is the multiple spaces is compacted to 1 space in the select list. I tried using the pre and white-space CSS properties of the select box, but it has no effect. Any suggestions?

    Read the article

  • select from varchar2 column with numeric value sometimes gives invalid number error

    - by Rene
    I'm trying to understand why, on some systems, I get an invalid number error message when I'm trying to select a value from a varchar2 column while on other systems I don't get the error while doing the exact same thing. The table is something like this: ID Column_1 Column_2 1 V text 2 D 1 3 D 2 4 D 3 and a query: select ID from table where column_1='D' and column_2 = :some_number_value :some_number_value is always numeric but can be null. We've fixed the query: select ID from table where column_1='D' and column_2 = to_char(:some_number_value) This original query runs fine on most systems but on some systems gives an "invalid number" error. The question is why? Why does it work on most systems and not on some?

    Read the article

  • How to Select Multiple Records from Multiple Tables at Once - SQL Server/C#/.NET/T-SQL

    - by peace
    I have two tables Customer and CustomerPhone. Customer usually has multiple phone numbers, so when i run select statement on customer 101, i will get multiple records due to the multiple phone numbers. As you see below all the "Phone" and "Fax" field belongs to CustomerPhone table. These are considered as two records in the CustomerPhone table whereas the rest of fields relate to Customer table which is a single record. What should i do to fill Phone and Fax field in this case? Should i run select statement on CustomerPhone first and then run select statement on Customer?

    Read the article

  • Show up value of select option in IE

    - by Pete
    Hello, I have a problem with a html select object and its options in IE. My html <select id="Select1" onchange="closeMenu1(this.value)"> <option></option> <option>1</option> <option>2</option> And the javascript function closeMenu1 (x) { var show = document.getElementById("divID"); show.innerHTML = x; } Now, in every browser except the IEs the divID will show up the value which I selected in the select object. But IE doesn’t. Can somebody please tell me a way around that? Thanks.

    Read the article

  • "select * into table" Will it work for inserting data into existing table

    - by Shantanu Gupta
    I am trying to insert data from one of my existing table into another existing table. Is it possible to insert data into any existing table using select * into query. I think it can be done using union but in that case i need to record all data of my existing table into temporary table, then drop that table and finally than apply union to insert all records into same table eg. select * into #tblExisting from tblExisting drop table tblExisting select * into tblExisting from #tblExisting union tblActualData Here tblExisting is the table where I actually want to store all data tblActualData is the table from where data is to be appended to tblExisting. Is it right method. Do we have some other alternative ?

    Read the article

  • Eclipse call hierarchy skips calls in undefined #ifdef regions

    - by stupakov
    Hi all, The "call hierarchy" and "declaration" features in Eclipse CDT omit results that exist in undefined (greyed out) #ifdef regions. Example: void blah(void) { #ifndef ABC foo(); #else //line is greyed out bar(); //line is greyed out #endif //line is greyed out } The call hierarchy for foo() will list blah() as a caller; the call hierarchy for bar() will not list blah(). I'm not expecting it to do full resolution of which #define blocks will get compiled, I simply would like it to return all calls/declarations of the function I'm searching for, regardless of the #define blocks that surround it. Other IDEs such as SlickEdit are able to do this. Does anyone know of a way to get Eclipse to adopt this behavior? Thanks.

    Read the article

  • jQuery-ajax call: async property is not working?

    - by user269386
    Hi, given to certain circumstances, I'm forced to keep page settings (Javascript-values) in the session and it has to be done right before leaving the page (I can't use cookies, since "pageSettings" can become quite large and localStorage is not an option yet ;) ). So this is how I tried it. However it seems that when I call the page directly again, the call of "http://blabla.com/bla" happens asynchronous, even though the async-attribute is set (I don't receive the settings of the previous call, but of the one before): $jQ(document).ready(function () { $jQ(window).unload(Main.__setSessionValues); }); var Main = { pageSettings: {}, __setSessionValues: function __setSessionValues() { $jQ.ajax({ type: "POST", async: false, url: "http://blabla.com/bla", data: { pageSettings: Object.toJSON(Main.pageSettings) } }); } }; Does anyone know what the problem might be? thanks in advance

    Read the article

  • Servlet mapping for ajax call parameters

    - by Woho87
    Hi guys! <servlet-mapping> <servlet-name>Test</servlet-name> <url-pattern>/GetContacts*</url-pattern> </servlet-mapping> I got a simple problem where I can't find any solution on the internet. I have a ajax calls that have the url http://localhost:80/Push/GetContacts?id=23..... The above servlet mapping is not correct for the AJAX call. it issues a http 404 not found call. What is the right syntax to enable my ajax call?

    Read the article

  • What's wrong in this SELECT statement

    - by user522211
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True") Dim cmdSelect As New System.Data.SqlClient.SqlCommand("SELECT * FROM Table1 WHERE Seats ='" & TextBox1.Text & "'", SQLData) SQLData.Open() Using adapter As New SqlDataAdapter(cmdSelect) Using table As New Data.DataTable() adapter.Fill(table) TextBox1.Text = [String].Join(", ", table.AsEnumerable().[Select](Function(r) r.Field(Of Integer)("seat_select"))) End Using End Using SQLData.Close() End Sub This line will be highlighted with blue line: TextBox1.Text = [String].Join(", ", table.AsEnumerable().[Select](Function(r) r.Field(Of Integer)("seat_select")))

    Read the article

  • Select more then one node from XML using LINQ

    - by podeig
    I have such XML <root> <content> .... </content> <index> .... </index> <keywords> .... </keywords> </root> But I need to select just and nodes. <content> .... </content> <index> .... </index> I found out how to select just one node. XElement Content = new XElement("content", from el in xml.Elements() select el.Element("content").Elements()); How can I get both nodes?

    Read the article

  • How to select the specific cell in Jtable?

    - by Nitz
    Hey guys Now in my one jframe i have used two jtables with different data. But now what i want is..as soon as user select one cell on first table, then in second table, the cell next to selected cell of the first table should be selected. means.... if user had selected the cell which is on column - 3 and row - 1 [ first table cell position ] then next table should automatically select the cell at column - 4 and row - 1 [ second table cell position ] i know how to get the selected row and column of jtable but i don't know how to set Select on jtable.

    Read the article

  • WCF - call same service from client and server side

    - by Steve
    I have a simple WCF service that I call server side from code behind via a service reference. It's used for validation and works and was automatically setup by Visual Studio and is using SOAP I think because the binding is wsHttpBinding. I want to use the same WCF service, but call it client side from jQuery using ajax(). I'm trying to implement it by way of these instructions. But if I make the changes to get the client side call working, I have to add the decoration below which I think will break what works on the server side and also change the system.serviceModel section in web.config. [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, RequestFormat= WebMessageFormat.Json) ] How do I have a WCF service that can be called both from the server-side and client side (jQuery/ajax)?

    Read the article

  • How to call a bool function...

    - by Gerri
    Hello, I did not see anything that address my particular code problem. I have a bool function in a class; the bool function is named: bool Triplet::operator ==(const Triplet& operand)const And I am trying to call it in Main but having problems just getting the call right. Apparently if I leave out any thing in the wording it gives an error that I have too few aruguments and if I try to use the entire wording of the function, I get the error that I need a semi-colon, but I already have a semi-colon at the end of the call, so I know that something else is wrong and I simply cannot figure out what is wrong! Any help would be appreciated! Thanks in advance.

    Read the article

  • 2 Select or 1 Join query ?

    - by xRobot
    I have 2 tables: book ( id, title, age ) ---- 100 milions of rows author ( id, book_id, name, born ) ---- 10 millions of rows Now, supposing I have a generic id of a book. I need to print this page: Title: mybook authors: Tom, Graham, Luis, Clarke, George So... what is the best way to do this ? 1) Simple join like this: Select book.title, author.name From book, author WHERE ( author.book_id = book.id ) AND ( book.id = 342 ) 2) For avoid the join, I could make 2 simple query: Select title FROM book WHERE id = 342 Select name FROM author WHERE book_id = 342 What is the most efficient way ?

    Read the article

  • SQL 2008 Select Top 1000 and update the selected database drop-down

    - by CWinKY
    When you right click and do a Select top 1000 rows from a table in sql 2008, it opens a tab and writes the sql and then executes it. This is okay, however I'll erase the sql and use the same tab often to do other sql statements. What annoys me is that I have to go to the database drop-down at the top of the window and change it to the current database I'm in because it says Master. How can I make sql 2008 update the selected database for this tab automatically when I right click a table and do select top 1000? On a side note, can I automatically hide the select statement that it generates and just show grid of results?

    Read the article

  • Select option in iPhone and Android browsers.

    - by alex
    I'd like a select box that will alert the value when the user selects the option. (in iPhone) <select> <option> 1 </option> <option> 2 </option> <option> 3 </option> </select> In my web browser on the desktop, I can do: onclick, but on the phone, onclick doesn't work.

    Read the article

  • Select 2 Rows from Table when COUNT of another table

    - by Marcus
    Here is the code that I currently have: SELECT `A`.* FROM `A` LEFT JOIN `B` ON `A`.`A_id` = `B`.`value_1` WHERE `B`.`value_2` IS NULL AND `B`.`userid` IS NULL ORDER BY RAND() LIMIT 2 What it currently is supposed to do is select 2 rows from A when the 2 rows A_id being selected are not in value_1 or value_2 in B. And the rows in B are specific to individual users with userid. What I need to do is make it also so that also checks if there are already N rows in B matching a A_id (either in value_1, or value_2) and userid, and if there are more than N rows, it doesn't select the A row.

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >