Search Results

Search found 7375 results on 295 pages for 'parameter'.

Page 32/295 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Using free function as pseudo-constructors to exploit template parameter deduction

    - by Poita_
    Is it a common pattern/idiom to use free functions as pseudo-constructors to avoid having to explicitly specify template parameters? For example, everyone knows about std::make_pair, which uses its parameters to deduce the pair types: template <class A, class B> std::pair<A, B> make_pair(A a, B b) { return std::pair<A, B>(a, b); } // This allows you to call make_pair(1, 2), // instead of having to type pair<int, int>(1, 2) // as you can't get type deduction from the constructor. I find myself using this quite often, so I was just wondering if many other people use it, and if there is a name for this pattern?

    Read the article

  • Sending URL as a parameter using javascript

    - by Prashant Singh
    I have to send a name and a link from client side to the server. I thought of using AJAX called by Javascript to do this. This is what I mean. I wished to make an ajax request to a file called abc.php with parameters :- 1. http://thumbs2.ebaystatic.com/m/m7dFgOtLUUUSpktHRspjhXw/140.jpg 2. Apple iPod touch, 3rd generation, 32GB To begin with, I encoded the URL and tried to send it. But the server says status Forbidden Any solution to this ? UPDATE :: It end up calling to http://abc.com/addToWishlist.php?rand=506075547542422&image=http://thumbs1.ebaystatic.com/m/mO64jQrMqam2jde9aKiXC9A/140.jpg&prod=Flat%20USB%20Data%20Sync%20Charging%20Charger%20Cable%20Apple%20iPhone%204G%204S%20iPod%20Touch%20Nano Javascript Code :: function addToWishlist(num) { var myurl = "addToWishlist.php"; var myurl1 = myurl; myRand = parseInt(Math.random()*999999999999999); var rand = "?rand="+myRand ; var modurl = myurl1+ rand + "&image=" + encodeURI(storeArray[num][1]) + "&prod=" + encodeURI(storeArray[num][0]); httpq2.open("GET", modurl, true); httpq2.onreadystatechange = useHttpResponseq2; httpq2.send(null); } function useHttpResponseq2() { if (httpq2.readyState == 4) { if(httpq2.status == 200) { var mytext = httpq2.responseText; document.getElementById('wish' + num).innerHTML = "Added to your wishlist."; } } } Server Code <?php include('/home/ankit/public_html/connect_db.php'); $image = $_GET['image']; $prod = $_GET['prod']; $id = $_GET['id']; echo $prod; echo $image; ?> As I mentioned, its pretty basics More Updates : On trying to send a POST request via AJAX to the server, it says :- Refused to set unsafe header "Content-length" Refused to set unsafe header "Connection"

    Read the article

  • Unable to out/retval parameter in COM interface method in VC++ 2008

    - by user196614
    Hi, I want to create a simple COM component in VC++ 2008. I have created ATL Project with all default options. I have added Simple ATL object (interface IDemo). Now I want to add a methos inside IDemo. But the "Add Method Wizard" does not allow me to add out/retval type of parameters to the method. I can add in type of parameters. Is it possible to add out/retval type of parameters? If yes then How can I do it? Thanks

    Read the article

  • Passing a parameter to ant from CruiseControl Dashboard

    - by MSUDrew
    I am working on incorporating CruiseControl into my teams build process. What we need is a way to pass a Clearcase view name into the ant script so it knows what view to use when building. Sometimes a developer needs to create a build that is used for their testing only and not on the main integration branch. Is there a way to do this?

    Read the article

  • ajax strange error with sending multiple parameter

    - by kawtousse
    hi everyone, please check with me where is the error in this ajax code to send 2 parameters: var xhr = getXhr(); // On défini ce qu'on va faire quand on aura la réponse xhr.onreadystatechange = function(){ // On ne fait quelque chose que si on a tout reçu et que le serveur est ok if(xhr.readyState == 4 && xhr.status == 200) { selects = xhr.responseText; // On se sert de innerHTML pour rajouter les options a la liste //document.getElementById('prjsel').innerHTML = selects; } }; xhr.open("POST","ServletEdition",true); xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); id=document.getElementById(idIdden).value; fu=document.getElementById("formUpdate").value; //alert(fu); var i=1; xhr.send("id=" +id+", fu="+i); i cant got the value of fu i don't know why. thanks

    Read the article

  • Mandatory Parameters in Request object (WCF)

    - by Martin Moser
    lHi, I'm currently writing a WCF service. One of those methods get's a request object and returns a response object. In the request there are a couple of value-type members. Is there a way to define members are mandatory in the declarative way? I'm in an early stage of development and I don't want to start with versioning now. In addition I don't want to have method sig with 25 parameters, therefore I created the request object. The problem I have is that due to the value-types, I can never be sure if the consumer of the service intended to have the default value in there, or it was just by lazyness. On consumer side you don't easily detect that you probably missed that property. So I would like to have something that forces the caller of the service to provide an value, and if not he ideally get's a compile-time error. any ideas? tia, Martin

    Read the article

  • parameter extends a class

    - by coubeatczech
    Hello, I want to do a class thats accepts anything ordered and prints greater. (I'm just learning so I know it's a bit useless) class PrinterOfGreater[T extends Ordered](val a:T, val b:T){println(a > b)} I know that it can't be written by this style in scala, but I don't know how to write it properly... Do anybody know?

    Read the article

  • Parameter cannot be null error after success save

    - by tigermain
    I am getting the following nhibernate error when saving an entity (via: NHibernateSession.Save(entity);) despite it being persisted to the database fine "Value cannot be null.\r\nParameter name: id" This is my hbm file <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="JeanieMaster.Domain.Entities" assembly="JeanieMaster.Domain"> <class name="ActionLog" table="ActionLog" schema="[DBSVR1].[mydatabase].[dbo]" select-before-update="false" optimistic-lock="none"> <id name="Id" column="ActionLogId" type="Int32"> <generator class="identity"/> </id> <property name="ActionId" type="Int32"/> <many-to-one name="User" class="JeanieUser" column="UserId" /> <many-to-one name="ApplicationProvider" class="ApplicationProvider" column="ApplicationProviderId" /> <many-to-one name="ContentProvider" class="ContentProvider" column="ContentProviderId" /> <many-to-one name="SearchLog" class="SearchLog" column="SearchLogId" /> <property name="Data" type="string"/> <property name="DateCreated" type="DateTime"/> <property name="ActionDuration" type="Double"/> </class> </hibernate-mapping>

    Read the article

  • adding other parameter to function

    - by Ronnie Chester Lynwood
    hello. i got a function that listing downloads in a table with foreach. it's also lists searched term, search type. public function fetchDownloads($displaySite=true) { $downloads = array(); $sqlWhere = ""; if(isset($this->q)) { if(strlen($this->q) <= $this->recents_length && !empty($this->q)) { $insertRecent = $this->processDataHook("insertRecent",$this->q); if($insertRecent) { if(!@mysql_query("INSERT INTO wcddl_recents (query) VALUES ('".$this->qSQL."')")) { @mysql_query("UPDATE wcddl_recents SET searches = searches+1 WHERE query = '".$this->qSQL."'"); } } } if($this->search_type == "narrow") { $sqlWhere = " WHERE title LIKE '%".mysql_real_escape_string(str_replace(" ","%",$this->q))."%'"; } elseif($this->search_type == "wide") { $qExp = explode(" ",$this->q); $sqlWhere = array(); foreach($qExp as $fq) $sqlWhere[] = "title LIKE '%".mysql_real_escape_string($fq)."%'"; $sqlWhere = implode(" OR ",$sqlWhere); $sqlWhere = " WHERE (".$sqlWhere.")"; } } if(isset($this->type)) { if(!empty($sqlWhere)) { $sqlWhere .= " AND type = '".$this->typeSQL."'"; } else { $sqlWhere = " WHERE type = '".$this->typeSQL."'"; } } $sqlWhere = $this->processDataHook("fetchDownloadsSQLWhere",$sqlWhere); $this->maxPages = mysql_query("SELECT COUNT(*) FROM wcddl_downloads".$sqlWhere.""); $this->maxPages = mysql_result($this->maxPages,0); $this->numRows = $this->maxPages; $this->maxPages = ceil($this->maxPages/$this->limit); $sqlMain = "SELECT id,sid,title,type,url,dat,views,rating FROM wcddl_downloads".$sqlWhere." ORDER BY ".(isset($this->sqlOrder) ? mysql_real_escape_string($this->sqlOrder) : "id DESC")." LIMIT ".$this->pg.",".$this->limit.""; $sqlMain = $this->processDataHook("whileFetchDownloadsSQL",$sqlMain); $sqlMain = mysql_query($sqlMain); $this->processHook("whileFetchDownloads"); while($row = mysql_fetch_assoc($sqlMain)) { if($displaySite) { $downloadSite = mysql_query("SELECT name as sname, url as surl, rating as srating FROM wcddl_sites WHERE id = '".$row['sid']."'"); $downloadSite = mysql_fetch_assoc($downloadSite); $row = array_merge($row,$downloadSite); } $downloads_current = $this->mapit($row,array("stripslashes","strip_tags")); $downloads_current = $this->processDataHook("fetchDownloadsRow",$downloads_current); $downloads[] = $downloads_current; } $this->pageList = $this->getPages($this->page,$this->maxPages); $this->processHook("endFetchDownloads"); return $downloads; } I want to add if $_REQUEST['site'] is set, order downloads by sname that catching from wcddl_sites.

    Read the article

  • Insert multiple records from a XML string differing on one parameter in SQL SERVER 2008

    - by Rohit
    Below in a query which inserts records to SimpleDictationProfileMapping table after reading it from a XML string. Now this query inserts a single record in which DictationCaptureProfileID is @dictationCaptureProfileId . Now i want to insert multiple rows in which @dictationCaptureProfileId is different and other 2 values are same. What i want to achieve by this is in case parent changes all child values should also change. INSERT INTO SimpleDictationProfileMapping ( DictationCaptureProfileID, DictationProfileMappingAttributeID, DictationProfileMappingAttributeValue ) SELECT @dictationCaptureProfileId, row.value('@attrId','varchar(max)'), row.value('@value', 'varchar(max)') FROM @simpleDictationCaptureProfileMappings.nodes('/simpleMappingAtribute/attribute') AS d ( row ) ; I want INSERT INTO SimpleDictationProfileMapping ( DictationCaptureProfileID OR (SELECT DictationCaptureProfileID FROM DictationCaptureProfile WHERE SystemDictationCaptureProfileID = @systemDictationCaptureProfileID), DictationProfileMappingAttributeID, DictationProfileMappingAttributeValue ) SELECT @dictationCaptureProfileId , row.value('@attrId','varchar(max)'), row.value('@value', 'varchar(max)') FROM @simpleDictationCaptureProfileMappings.nodes ('/simpleMappingAtribute/attribute') AS d ( row ) ; Please tell how to achieve this.

    Read the article

  • tsql - using internal stored procedure as parameter is where clause

    - by vondip
    Hi all, I'm tryng to build a stored procedure that makes use of another stored proceudre. Taking its result and using it as part of its where clause, from some reason I receive an error: Invalid object name 'dbo.GetSuitableCategories'. Here is a copy of the code: select distinct top 6 * from ( SELECT TOP 100 * FROM [dbo].[products] products where products.categoryId in (select top 10 categories.categoryid from [dbo].[GetSuitableCategories] ( -- @Age -- ,@Sex -- ,@Event 1, 1, 1 ) categories ORDER BY NEWID() ) --and products.Price <=@priceRange ORDER BY NEWID() )as d union select * from ( select TOP 1 * FROM [dbo].[products] competingproducts where competingproducts.categoryId =-2 --and competingproducts.Price <=@priceRange ORDER BY NEWID() ) as d and here is [dbo].[GetSuitableCategories] : if (@gender =0) begin select * from categoryTable categories where categories.gender =3 end else begin select * from categoryTable categories where categories.gender = @gender or categories.gender =3 end Thank you very much!~

    Read the article

  • Using Parameter Values In SQL Statement

    - by Dangerous
    I am trying to write a database script (SQL SERVER 2008) which will copy information from database tables on one server to corresponding tables in another database on a different server. I have read that the correct way to do this is to use a sql statement in a format similar to the following: INSERT INTO <linked_server>.<database>.<owner>.<table_name> SELECT * FROM <linked_server>.<database>.<owner>.<table_name> As there will be several tables being copied, I would like to declare variables at the top of the script to allow the user to specify the names of each server and database that are to be used. These could then be used throughout the script. However, I am not sure how to use the variable values in the actual SQL statements. What I want to achieve is something like the following: DECLARE @SERVER_FROM AS NVARCHAR(50) = 'ServerFrom' DECLARE @DATABASE_FROM AS NVARCHAR(50) = 'DatabaseTo' DECLARE @SERVER_TO AS NVARCHAR(50) = 'ServerTo' DECLARE @DATABASE_TO AS NVARCHAR(50) = 'DatabaseTo' INSERT INTO @SERVER_TO.@DATABASE_TO.dbo.TableName SELECT * FROM @SERVER_FROM.@DATABASE_FROM.dbo.TableName ... How should I use the @ variables in this code in order for it to work correctly? Additionally, do you think my method above is correct for what I am trying to achieve and should I be using NVARCHAR(50) as my variable type or something else? Thanks

    Read the article

  • apache mod_rewrite regex problem with multiple parameter

    - by iko
    Regular expressions have always been my pet peeves. Every time I think that I finally got it I have a new problem ! I want to catch url like this : http://www.mydomain.com/boutique/blabla-1/bla-bla2/99/104 http://www.mydomain.com/boutique/blabla1/99 and eventually : http://www.mydomain.com/boutique/blabla-1/bla-bla2/product1/99/104/55/ after a lot of tries and errors I came up with this which seems to work with http://www.gskinner.com/RegExr/ but not in apache ^.*/boutique/([a-zA-Z-]*)(/?[a-zA-Z-]*)/?([0-9]*)/?([0-9]*)/?$ boutique.php?c1=$3&c2=$4 (I was only working with the first two url so far) MY apache rewrite log debug files are helpless : pass through /Users/iko/Sites/mysite/boutique.php I'm only interrested in getting the ids. Any help we'll be welcomed ! Thank you.

    Read the article

  • Implicit parameter in Scalaz

    - by Thomas Jung
    I try to find out why the call Ø in scalaz.ListW.<^> works def <^>[B: Zero](f: NonEmptyList[A] => B): B = value match { case Nil => Ø case h :: t => f(Scalaz.nel(h, t)) } My minimal theory is: trait X[T]{ def y : T } object X{ implicit object IntX extends X[Int]{ def y = 42 } implicit object StringX extends X[String]{ def y = "y" } } trait Xs{ def ys[T](implicit x : X[T]) = x.y } class A extends Xs{ def z[B](implicit x : X[B]) : B = ys //the call Ø } Which produces: import X._ scala> new A().z[Int] res0: Int = 42 scala> new A().z[String] res1: String = y Is this valid? Can I achieve the same result with fewer steps?

    Read the article

  • How to escape parameter in windows command line?

    - by Rryk
    I need to run the following command from the command line in Windows 7: SumatraPDF.exe -inverse-search "\"C:\Program Files\eclipse\inverse_search.bat\" \"%f\" %l" However I need to modify it a little, since my installation of Eclipse is located in here: C:\Program Files (x86)\Eclipse (C++) How do I escape this line correctly? Do I need to escape parenthesis and pluses too? Or is it just enough to escape double quotes?

    Read the article

  • Pass Parameter to Subroutine in Codebehind

    - by Sanjubaba
    I'm trying to pass an ID of an activity (RefNum) to a Sub in my codebehind. I know I'm supposed to use parentheses when passing parameters to subroutines and methods, and I've tried a number of ways and keep receiving the following error: BC30203: Identifier expected. I'm hard-coding it on the front-end just to try to get it to pass [ OnDataBound="FillSectorCBList("""WK.002""")" ], but it's obviously wrong. :( Front-end: <asp:DetailsView ID="dvEditActivity" AutoGenerateRows="False" DataKeyNames="RefNum" OnDataBound="dvSectorID_DataBound" OnItemUpdated="dvEditActivity_ItemUpdated" DataSourceID="dsEditActivity" > <Fields> <asp:TemplateField> <ItemTemplate> <br /><span style="color:#0e85c1;font-weight:bold">Sector</span><br /><br /> <asp:CheckBoxList ID="cblistSector" runat="server" DataSourceID="dsGetSectorNames" DataTextField="SectorName" DataValueField="SectorID" OnDataBound="FillSectorCBList("""WK.002""")" ></asp:CheckBoxList> <%-- Datasource to populate cblistSector --%> <asp:SqlDataSource ID="dsGetSectorNames" runat="server" ConnectionString="<%$ ConnectionStrings:dbConn %>" ProviderName="<%$ ConnectionStrings:dbConn.ProviderName %>" SelectCommand="SELECT SectorID, SectorName from Sector ORDER BY SectorID"></asp:SqlDataSource> </ItemTemplate> </asp:TemplateField> </Fields> </asp:DetailsView> Code-behind: Sub FillSectorCBList(ByVal RefNum As String, ByVal sender As Object, ByVal e As System.EventArgs) Dim SectorIDs As New ListItem Dim myConnection As String = ConfigurationManager.ConnectionStrings("dbConn").ConnectionString() Dim objConn As New SqlConnection(myConnection) Dim strSQL As String = "SELECT DISTINCT A.RefNum, AS1.SectorID, S.SectorName FROM Activity A LEFT OUTER JOIN Activity_Sector AS1 ON AS1.RefNum = A.RefNum LEFT OUTER JOIN Sector S ON AS1.SectorID = S.SectorID WHERE A.RefNum = @RefNum ORDER BY A.RefNum" Dim objCommand As New SqlCommand(strSQL, objConn) objCommand.Parameters.AddWithValue("RefNum", RefNum) Dim ad As New SqlDataAdapter(objCommand) Try [Code] Finally [Code] End Try objCommand.Connection.Close() objCommand.Dispose() objConn.Close() End Sub Any advice would be great. I'm not sure if I even have the right approach. Thank you!

    Read the article

  • web service with no input parameter

    - by cateof
    I have a WSDL with various portTypes. Some of the contain only output <operation name="getServerTimeZone"> <output message="s0:getServerTimeZoneSoapOut"/> </operation> I would expect that the correct should be: <operation name="getServerTimeZone"> <input message="s0:getServerTimeZoneSoapIn"/> <output message="s0:getServerTimeZoneSoapOut"/> </operation> The problem is that when I am trying to create stubs from the WSDL using gsoap wsdl2h parser I got the following error: No wsdl:definitions/portType/operation/input I haven't tested with other tools (ie WSDL2Java). My question: Is it valid to have a portType with no input? I am using AltovaXML Spy and this WSDL passes the validation.... Is there any meaning having WSDL operation with no input? (I am not talking about One-Way Message Passing, where you can have input but no output - this is valid).

    Read the article

  • Passing a value from child window to parent

    - by gnomixa
    Here is my scenario: i have a parent web page, in my javascript code I open a new window. This new window is a server-side aspx page. This child page needs to save some data in the database, and after saving it returns an ID. Now, I need to pass this ID from the child server page to the parent's javascript. Essentially I need the child server code to trigger: 1) return the value to the javascript code of the parent page 2) close itself What would be the acceptable way to do it?

    Read the article

  • PROBLEM: PHP strip_tags & multi-dimensional array form parameter

    - by Tunji Gbadamosi
    I'm having problems stripping the tags from the textual inputs retrieved from my form so as to do something with them in checkout.php. The input is stored in a multi-dimensional array. Here's my form: echo '<form name="choose" action="checkout.php" method="post" onsubmit="return validate_second_form(this);">'; echo '<input type="hidden" name="hidden_value" value="'.$no_guests.'" />'; if($no_guests >= 1){ echo '<div class="volunteer">'; echo '<fieldset>'; echo '<legend>Volunteer:</legend>'; echo '<label>Table:</label>'; echo '<select name="volunteer_table">'; foreach($tables as $t){ echo '<option>'.$t.'</option>'; } echo '</select><br><br>'; echo '<label>Seat number:</label>'; echo '<select name="volunteer_seat">'; foreach($seats as $seat){ echo '<option>'.$seat.'</option>'; } echo '</select><br><br>'; //echo '<br>'; echo '</fieldset>'; echo '</div>'; for($i=0;$i<$no_guests;$i++){ $guest = "guest_".$i; echo '<div class="'.$guest.'">'; echo '<fieldset>'; echo '<legend>Guest '.$i.':</legend>'; echo '<label>First Name:</label>'; echo '<input type="text" name="guest['.$i.']['.$first_name.']" id="fn'.$i.'">'; echo '<label>Surname:</label>'; echo '<input type="text" name="guest['.$i.']['.$surname.']" id="surname'.$i.'"><br><br>'; echo '<label>Date of Birth:</label> <br>'; echo '<label>Day:</label>'; echo '<select name="guest['.$i.'][dob_day]">'; for($j=1;$j<32;$j++){ echo"<option value='$j'>$j</option>"; } echo '</select>'; echo '<label>Month:</label>'; echo '<select name="guest['.$i.'][dob_month]">'; for($j=0;$j<sizeof($month);$j++){ $value = ($j + 1); echo"<option value='$value'>$month[$j]</option>"; } echo '</select>'; echo '<label>Year:</label>'; echo '<select name="guest['.$i.'][dob_year]">'; for($j=1900;$j<$year_limit;$j++){ echo"<option value='$j'>$j</option>"; } echo '</select> <br><br>'; echo '<label>Sex:</label>'; echo '<select name="guest['.$i.']['.$sex.']">'; echo '<option>Female</option>'; echo '<option>Male</option>'; echo '</select><br><br>'; echo '<label>Table:</label>'; echo '<select name="guest['.$i.']['.$table.']">'; foreach($tables as $t){ echo '<option>'.$t.'</option>'; } echo '</select><br><br>'; echo '<label>Seat number:</label>'; echo '<select name="guest['.$i.']['.$seat_no.']">'; foreach($seats as $seat){ echo '<option>'.$seat.'</option>'; } echo '</select><br><br>'; //echo '<br>'; echo '</fieldset>'; echo '</div>'; } } else{ echo '<div id="volunteer">'; echo '<fieldset>'; echo '<legend>Volunteer:</legend>'; echo '<label>Table:</label>'; echo '<select name="volunteer['.$table.']">'; foreach($tables as $t){ echo '<option>'.$t.'</option>'; } echo '</select><br><br>'; echo '<label>Seat number:</label>'; echo '<select name="volunteer['.$seat_no.']">'; foreach($seats as $seat){ echo '<option>'.$seat.'</option>'; } echo '</select><br><br>'; //echo '<br>'; echo '</fieldset>'; echo '</div>'; } echo '<input type="submit" value="Submit form">'; echo '</form>'; here's checkout.php: if(isset($_POST['guest'])){ foreach($_POST['guest'] as $guest){ $guest['first_name'] = strip_tags($guest['first_name']); $guest['surname'] = strip_tags($guest['surname']); } //$_SESSION['guest'] = $guests; }

    Read the article

  • java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2)

    - by sam
    @WebMethod(operationName = "SearchOR") public SearchOR getSearchOR (@WebParam(name = "comp") String comp, @WebParam(name = "name") String name) { //TODO write your implementation code here: SearchOR ack = null; try{ String simpleProc = "{ call getuser_info_or(?,?)}"; CallableStatement cs = con.prepareCall(simpleProc); cs.setString(1, comp); cs.setString(2, name); ResultSet rs = cs.executeQuery(); System.out.print("2"); /* int i = 0, j = 0; if (rs.last()) { i = rs.getRow(); ack = new SearchOR[i]; rs.beforeFirst(); }*/ while (rs.next()) { // ack[j] = new SearchOR(rs.getString(1), rs.getString(2)); // j++; ve.add(rs.getString(1)); ve.add(rs.getString(2)); }}catch ( Exception e) { e.printStackTrace(); System.out.print(e); } return ack; } I am getting error at portion i have made bold.It is pointing to that location.My Query is here: DELIMITER $$ DROP PROCEDURE IF EXISTS discoverdb.getuser_info_or$$ MySQL returned an empty result set (i.e. zero rows). CREATE PROCEDURE discoverdb.getuser_info_or ( IN comp VARCHAR(100), IN name VARCHAR(100), OUT Login VARCHAR(100), OUT email VARCHAR(100) ) BEGIN SELECT sLogin, sEmail INTO Login, email FROM ad_user WHERE company = comp OR sName=name; END $$ MySQL returned an empty result set (i.e. zero rows). DELIMITER ;

    Read the article

  • Table rows with identifying parameter in each row SQL SERVER 2008 into single row

    - by LiverpoolsNumber9
    Sorry - my question title is probably as inept at my attempt to do this. I have the following (well, similar) in a table in a CMS pageID key value 201 title Page 201's title 201 description This is 201 201 author Dave 301 title Page 301's title 301 description This is 301 301 author Bob As you've probably guessed, what I need is a query that will produce: pageID title description author 201 Page 201's title This is page 201 Dave 301 Page 301's title This is page 301 Bob If anybody could help, i'd be eternally grateful - I know this is "please send me the code" but I'm absolutely stuck. Thanks in advance.

    Read the article

  • RichFaces a4j:support parameter passing

    - by Mark Lewis
    Hello I have a number of rich:inplaceInput tags in RichFaces which represent numbers in an array. The validator allows integers only. When a user clicks in an input and changes a value, how can I get the bean to sort the array given the new number and reRender the list of rich:inplaceInput tags so that they're in numerical order? EG <a4j:region> <rich:dataTable value="#{MyBacking.config}" var="feed" cellpadding="0" cellspacing="0" width="100%" border="0" columns="5" id="Admin"> ... <a4j:repeat... <a4j:region id="MsgCon"> <rich:inplaceInput value="#{h.id}" validator="#{MyBacking.validateID}" id="andID" showControls="true"> <a4j:support event="onviewactivated" action="#{MyBacking.sort}" reRender="Admin" /> </rich:inplaceInput> </a4j:region> </a4j:repeat> </data:Table> </a4j:region> Note I do NOT want to use dataTable sort functions. The table is complicated and I've specified id="Admin" (ie the whole table) to reRender as I've not found a way to send more localised values to the backing bean through the inplaceInput. This question is about how to use a4j:support action attribute to call the sort method so that when the reRender rerenders the component, it outputs the list in sorted order. I have the sort method working ok when I click a button to sort, but I want to have the list sorted automatically as soon as a new valid value is entered into the inplaceInput component. Thanks

    Read the article

  • Passing objects by reference or not in C#

    - by Piku
    Suppose I have a class like this: public class ThingManager { List<SomeClass> ItemList; public void AddToList (SomeClass Item) { ItemList.Add(Item); } public void ProcessListItems() { // go through list one item at a time, get item from list, // modify item according to class' purpose } } Assume "SomeClass" is a fairly large class containing methods and members that are quite complex (List<s and arrays, for example) and that there may be a large quantity of them, so not copying vast amounts of data around the program is important. Should the "AddToList" method have "ref" in it or not? And why? It's like trying to learn pointers in C all over again ;-) (which is probably why I am getting confused, I'm trying to relate these to pointers. In C it'd be "SomeClass *Item" and a list of "SomeClass *" variables)

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >