Search Results

Search found 27691 results on 1108 pages for 'multi select'.

Page 74/1108 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Putting Select Statement on Hibernate Transaction

    - by Mark Estrada
    Hi All, I have been reading the net for a while regarding Hibernate but I can seem to understand one concept regarding Transaction. On some site that I have visit, Select statements are in transaction mode like this. public List<Book> readAll() { Session session = HibernateUtil.getSessionFactory() .getCurrentSession(); session.beginTransaction(); List<Book> booksList = session.createQuery("from Book").list(); session.getTransaction().commit(); return booksList; } While on some site, it does not advocate the use of transaction on Select statements public List<Book> readAll() { Session session = HibernateUtil.getSessionFactory() .getCurrentSession(); List<Book> booksList = session.createQuery("from Book").list(); return booksList; } I am thinking which one should I follow. Any thoughts please? Are transactions needed on Select Statements or not? Thanks

    Read the article

  • How to set drop down list option up to specific value

    - by bugbug
    If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery? <select name="car"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> I don't know how to manager control that have same identity. ??? $('input[name="car"]').attr('checked', true);

    Read the article

  • how to get entire document in scrapy using hxs.select

    - by Chris Smith
    I've been at this for 12hrs and I'm hoping someone can give me a leg up. Here is my code all I want is to get the anchor and url of every link on a page as it crawls along. from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import HtmlXPathSelector from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from urlparse import urljoin #from scrapy.item import Item from tutorial.items import DmozItem class HopitaloneSpider(CrawlSpider): name = 'dmoz' allowed_domains = ['domain.co.uk'] start_urls = [ 'http://www.domain.co.uk' ] rules = ( #Rule(SgmlLinkExtractor(allow='>example\.org', )), Rule(SgmlLinkExtractor(allow=('\w+$', )), callback='parse_item', follow=True), ) user_agent = 'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))' def parse_item(self, response): #self.log('Hi, this is an item page! %s' % response.url) hxs = HtmlXPathSelector(response) #print response.url sites = hxs.select('//html') #item = DmozItem() items = [] for site in sites: item = DmozItem() item['title'] = site.select('a/text()').extract() item['link'] = site.select('a/@href').extract() items.append(item) return items What I'm doing wrong... my eyes hurt now.

    Read the article

  • Selected option in view when SIZE is greater than 1

    - by joe
    How do you get the selected option to be in view on page load? <select name="whatever" size="5"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7" selected>7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select>

    Read the article

  • SQL Server Cursor data as result of stored procedure

    - by Dmitry Borovsky
    Hello, I have a stored procedure DECLARE cursor FOR SELECT [FooData] From [FooTable]; OPEN cursor ; FETCH NEXT FROM cursor INTO @CurrFooData; WHILE @@FETCH_STATUS = 0 BEGIN SELECT @CurrFooData AS FooData; INSERT INTO Bar (BarData) VALUES(@CurrFooData); FETCH NEXT FROM cursor INTO @CurrFooData; END; CLOSE cursor DEALLOCATE cursor But in result I have a lot of tables, not one. How can I return one table with 'FooData' column and all '@CurrFooData' rows?

    Read the article

  • Filemaker XSL Select Column By Name

    - by Kevin Sylvestre
    I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <people> <xsl:for-each select="fm:FMPXMLRESULT/fm:RESULTSET/fm:ROW"> <person> <name> <xsl:value-of select="fm:COL[01]/fm:DATA"/> </name> <location> <xsl:value-of select="fm:COL[02]/fm:DATA"/> </location> </person> </xsl:for-each> </people> </xsl:template> </xsl:stylesheet> Any ideas? Thanks.

    Read the article

  • iPhone xcode - Activity Indicator with tab bar controller and multi table view controllers

    - by Frames84
    I've looked for a tutorial and can't seem to find one for a activity indicator in a table view nav bar. in my mainWindow.xib I have a Tab Bar Controller with 4 Tabs controllers each containing a table view. each load JSON feeds using the framework hosted at Google. In one of my View Controller I can add an activity indicator to the nav bar by using: UIActivityIndicatorView *activityIndcator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0,0,20,20)]; [activityIndcator startAnimating]; UIBarButtonItem *activityItem = [[UIBarButtonItem alloc] initWithCustomView:activityIndcator]; self.navigationItem.rightBarButtonItem = activityItem; however and can turn it off by using: self.navigationItem.rightBarButtonItem.enabled = FALSE; But if i place this in my viewDidLoad event it shows all the time. I only want it to show when I select a row in my table view. so I added it at the top of didSelectRowAtIndexPath and the stop line after I load a feed. it shows but takes a second or two and only shows for about half a second. is the an event that firers before the didSelectRowAtIndexPath event a type of loading event? if not what is the standard menthord for implementing such functionality?

    Read the article

  • Optimizing an embedded SELECT query in mySQL

    - by Crazy Serb
    Ok, here's a query that I am running right now on a table that has 45,000 records and is 65MB in size... and is just about to get bigger and bigger (so I gotta think of the future performance as well here): SELECT count(payment_id) as signup_count, sum(amount) as signup_amount FROM payments p WHERE tm_completed BETWEEN '2009-05-01' AND '2009-05-30' AND completed > 0 AND tm_completed IS NOT NULL AND member_id NOT IN (SELECT p2.member_id FROM payments p2 WHERE p2.completed=1 AND p2.tm_completed < '2009-05-01' AND p2.tm_completed IS NOT NULL GROUP BY p2.member_id) And as you might or might not imagine - it chokes the mysql server to a standstill... What it does is - it simply pulls the number of new users who signed up, have at least one "completed" payment, tm_completed is not empty (as it is only populated for completed payments), and (the embedded Select) that member has never had a "completed" payment before - meaning he's a new member (just because the system does rebills and whatnot, and this is the only way to sort of differentiate between an existing member who just got rebilled and a new member who got billed for the first time). Now, is there any possible way to optimize this query to use less resources or something, and to stop taking my mysql resources down on their knees...? Am I missing any info to clarify this any further? Let me know... EDIT: Here are the indexes already on that table: PRIMARY PRIMARY 46757 payment_id member_id INDEX 23378 member_id payer_id INDEX 11689 payer_id coupon_id INDEX 1 coupon_id tm_added INDEX 46757 tm_added, product_id tm_completed INDEX 46757 tm_completed, product_id

    Read the article

  • return only the last select results from stored procedure

    - by Madalina Dragomir
    The requirement says: stored procedure meant to search data, based on 5 identifiers. If there is an exact match return ONLY the exact match, if not but there is an exact match on the not null parameters return ONLY these results, otherwise return any match on any 4 not null parameters... and so on My (simplified) code looks like: create procedure xxxSearch @a nvarchar(80), @b nvarchar(80)... as begin select whatever from MyTable t where ((@a is null and t.a is null) or (@a = t.a)) and ((@b is null and t.b is null) or (@b = t.b))... if @@ROWCOUNT = 0 begin select whatever from MyTable t where ((@a is null) or (@a = t.a)) and ((@b is null) or (@b = t.b))... if @@ROWCOUNT = 0 begin ... end end end As a result there can be more sets of results selected, the first ones empty and I only need the last one. I know that it is easy to get the only the last result set on the application side, but all our stored procedure calls go through a framework that expects the significant results in the first table and I'm not eager to change it and test all the existing SPs. Is there a way to return only the last select results from a stored procedure? Is there a better way to do this task ?

    Read the article

  • Who to select value from DropDown list in PHP???Problem

    - by sandy
    Hello .. I want to know the error in this code The following code retrieves the names of the members of the database query in the dropdownlist But how do I know who you selected.... I want to send messages only to the members that selected form dropdown list <?php include ("connect.php"); $name = $_POST['sector_list']; echo $name ; ?> <form method="POST" action="" > <input type="hidden" name="sector" value="sector_list"> <select name="sector_list" class="inputstandard"> <option size ="40" value="default">send to </option> <?php $result = mysql_query('select * from members ') or die (mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo '<option size ="40" value=" '. $row['MemberID'] . '" name="' . $row['MemberName']. '">' . $row['MemberName']. '</option>'; } ?> </select> </form> I hope somebody can help me

    Read the article

  • MS SQL Cursor data as result of stored procedure

    - by Dmitry Borovsky
    Hello, I have some stored procedure DECLARE cursor FOR SELECT [FooData] From [FooTable]; OPEN cursor ; FETCH NEXT FROM cursor INTO @CurrFooData; WHILE @@FETCH_STATUS = 0 BEGIN SELECT @CurrFooData AS FooData; INSERT INTO Bar (BarData) VALUES(@CurrFooData); FETCH NEXT FROM cursor INTO @CurrFooData; END; CLOSE OldestFeeds DEALLOCATE OldestFeeds But in result I have a lot of tables, not one. How can I return one table with 'FooData' column and all '@CurrFooData' rows?

    Read the article

  • How to make groupbox invisble on select of a radiobutton

    - by Aditya
    Hi, I am doing an Windows Application using XAML ,WPF in C#. I have 2 radio buttons called "WriteData" and "ReadData". when writeData is selected, I need groupbox with a textbox and browse button inside it to be displayed at a particular location, (this i have already designed in UI..) <GroupBox Header="Browse Data" Name="grpBrowseData" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030"> <Grid Name="grdBrowse" Height="60" Width="1030"> <Button x:Name="btnBrowseButton" Margin="0,7.5,45,20" Content="Browse" Click="BrowseButton_Click" HorizontalAlignment="Right" Width="111" /> <TextBox x:Name="txtBxBrowseTB" Margin="46,13.993,185,17.5" Text="TextBox" TextWrapping="Wrap" TextChanged="BrowseTB_TextChanged" ></TextBox> <Label HorizontalAlignment="Left" Margin="-1.25,8.75,0,15" Name="label1" Width="47.5" FontSize="13" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">Path:</Label> Now, if I select "ReadData" radio button, a combo box should be visible in the SAME LOCATION where the above groupbox is displayed, the xaml code for this <GroupBox Header="Select the Project" Name="grpSelectProject" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030" Visibility="Visible" Margin="-1030,0,0,0"> <Grid Name="grdSelectProject" Height="60" Width="1030"> <Label HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="0,11.662,0,20.825" Width="95.103">Select the Project</Label> <ComboBox Margin="119.952,13.994,493.969,16.66"></ComboBox> </Grid></GroupBox> so, how do I make only one visible as per the radio button selected. In the ReadData_click event i tried to make other groupbox invisble. but I wasnt able to do that. please help me. Thanks Ramm

    Read the article

  • Update/Insert without select

    - by user348731
    I have this very simple class public class ProductAttributeValuePortal { public virtual int ID { get; set; } public virtual Domain.Entity.Portals.ProductPortal Product { get; set; } public virtual Attribute Attribute { get; set; } public virtual string Value { get; set; } } with this very simple map public ProductAttributeValueMap () { Table("DM.dbo.ProductAttributeValues"); Id(x => x.ID, "ProductAttributeValue_id"); References(x => x.Product); References(x => x.Attribute); Map(x => x.Value); } Each time i make a insert NHibernate makes a Select of the attribute like : NHibernate: INSERT INTO MachineData.dbo.ProductAttributeValues (Value, Product_id, Attribute_id) VALUES (@p0, @p1, @p2); select SCOPE_IDENTITY();@p0 = '6745', @p1 = 39, @p2 = 'BSTD' NHibernate: SELECT attribute_.Attribute_id, attribute_.Name as Name21_, attribute_.AttributeType as Attribut3_21_, attribute_.TagName as TagName21_, attribute_.MapTo as MapTo21_ FROM MachineShared.dbo.Attributes attribute_ WHERE attribute_.Attribute_id=@p0;@p0 = 'DLB' What am i doing wrong. And where do i find some really uptodate books about nhibernate/Fluent nhibernate

    Read the article

  • unknown column in where clause

    - by ranzy
    $result = mysql_query("SELECT * FROM Volunteers WHERE Volunteers.eventID = " . $var); $sql = mysql_query("SELECT * FROM Members WHERE Members.pid = " . $temp); I am also doing or die(mysql_error()) at the end of both statements if that matter. My problem is that the first statement executes perfectly but in that table I store an attribute called pid. So the second statement is supposed to take that and return the row where it equals that pid so I can get the name. I get an error that says unknown column in 'a2' in 'where clause' where a2 the pid attribute returned from the first statement. Thanks for any help!

    Read the article

  • javascript to select text from web page

    - by phil swenson
    I'm trying to write a bookmarklet that grabs any selected text on a web page and sends it to my website. It should (hopefully) work in Chrome, FFX, Safari, and IE. I did a search and found a function, but it doesn't appear to work. Here is the code: <html> <body> <div onClick=getSelText()>Click</div> <div>please select me</div> </body> <script language=javascript> function getSelText(){ var txt = 'nothing'; if (window.getSelection){ txt = "1" + window.getSelection(); } else if (document.getSelection) { txt = "2" + document.getSelection(); } else if (document.selection) { txt = "3" + document.selection.createRange().text; } else return; alert("selected text = " + txt); } </script> </html> when I select the text in the div "please select me" and hit the click div, I just get "selected text = 1" thanks

    Read the article

  • Data in column not changed

    - by shanks
    I have sql 2005 and when i run below query, data from RealTimeLog table transfer to History but when new data come in RealTimeLog table old data not changed by new one means OutTime data is not changed with new data from RealTimeLog. insert into History (UserID,UserName,LogDate, [InTime], [OutTime]) SELECT UserID,UserName,[LogDate],CONVERT(nvarchar,MIN(CONVERT(datetime, [LogTime], 108)), 108), CONVERT(nvarchar, MAX(CONVERT(datetime, [LogTime], 108)), 108) From RealTimeLog where not Exists (select * from History H Where H.UserID = RealTimeLog.UserID AND H.UserName=RealTimeLog.UserName AND H.LogDate=RealTimeLog.LogDate) GROUP BY UserID,UserName,[LogDate] ORDER BY UserID,[LogDate] for ex. 1 Shanks 02/05/2010 9:00 10:00 if new Max time generated suppose 11:00 in RealtimeLog then it is not inserted in History table and output remain same as above.

    Read the article

  • JOIN two tables to show already purchased items

    - by Norbert
    I have a table where I keep all my templates: templates template_id template_name template_price These templates can be purchased by a registered user and then are inserted in the payments table: payments payment_id template_id user_id Is there a way to join these two tables and get not just a list of templates that have been purchased by a certain user, but all the templates? And then figure out from there which ones have already been purchased? I used this SELECT, but only the ones that the user bought showed up. I would like to have all the rows from templates, but empty in case the user_id doesn't match. SELECT * FROM templates LEFT JOIN payments ON templates.template_id = payments.template_id WHERE user_id = 2 GROUP BY templates.template_id

    Read the article

  • SQL problem - select accross multiple tables (user groups)

    - by morpheous
    I have a db schema which looks something like this: create table user (id int, name varchar(32)); create table group (id int, name varchar(32)); create table group_member (foobar_id int, user_id int, flag int); I want to write a query that allows me to so the following: Given a valid user id (UID), fetch the ids of all users that are in the same group as the specified user id (UID) AND have group_member.flag=3. Rather than just have the SQL. I want to learn how to think like a Db programmer. As a coder, SQL is my weakest link (since I am far more comfortable with imperative languages than declarative ones) - but I want to change that. Anyway here are the steps I have identified as necessary to break down the task. I would be grateful if some SQL guru can demonstrate the simple SQL statements - i.e. atomic SQL statements, one for each of the identified subtasks below, and then finally, how I can combine those statements to make the ONE statement that implements the required functionality. Here goes (assume specified user_id [UID] = 1): //Subtask #1. Fetch list of all groups of which I am a member Select group.id from user inner join group_member where user.id=group_member.user_id and user.id=1 //Subtask #2 Fetch a list of all members who are members of the groups I am a member of (i.e. groups in subtask #1) Not sure about this ... select user.id from user, group_member gm1, group_member gm2, ... [Stuck] //Subtask #3 Get list of users that satisfy criteria group_member.flag=3 Select user.id from user inner join group_member where user.id=group_member.user_id and user.id=1 and group_member.flag=3 Once I have the SQL for subtask2, I'd then like to see how the complete SQL statement is built from these subtasks (you dont have to use the SQL in the subtask, it just a way of explaining the steps involved - also, my SQL may be incorrect/inefficient, if so, please feel free to correct it, and point out what was wrong with it). Thanks

    Read the article

  • Fix single entry from mbr

    - by Sander
    I use EasyBCD to manage my tripleboot of (1) Windows Server 2008 R2, (2) Windows 7 Professional and (3) Ubuntu Linux. While trying to change the order of my boot menu I ended up losing the Windows Server entry. Luckily I had a boot menu backup (.bcd file) that allowed me to restore my boot menu using EasyBCD. However, when I now select the Windows Server option in my boot menu the Windows Server Recovery Environment starts up. So I have to select language/keyboard layout/etc. and then I have 3 options as shown in the image below. . My goal is to fix the one corrupted Windows Server entry from my boot menu without messing up or losing the two other ones. I'm guessing the Recovery Console (Command Prompt) is the next step and that I will be needing bootrec.exe. But when consulting this page: Use the Bootrec.exe tool in the Windows Recovery Environment to troubleshoot and repair startup issues in Windows (about half way down there's a link that shows the bootrec.exe options) I'm getting uncertain. The page lists 4 options for bootrec.exe : /FixMbr /FixBoot /ScanOs /RebuildBcd What option do I need to fix just the server entry of my boot menu? Thanks in advance, Sander P.S. All three OS's are on the same physical disk (3 different partitions). Disk layout: System reserved (primary partition, 100 MB) Windows 7 (primary parition, 150 GB) Windows Server 2008 (primary partition, 150 GB) Extended partition (linux partitions (/,/swap,/home), 150GB + data partition, 150 GB) P.P.S. This is what my boot menu looks like using EasyBCD (Detailed/Debug mode) on my Windows 7 installation. Windows Boot Manager -------------------- identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795} device partition=\Device\HarddiskVolume1 description Windows Boot Manager locale en-US inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e} default {93f90e43-cae8-11df-b05a-c9177e705936} resumeobject {93f90e3e-cae8-11df-b05a-c9177e705936} displayorder {93f90e43-cae8-11df-b05a-c9177e705936} {93f90e3f-cae8-11df-b05a-c9177e705936} {93f90e46-cae8-11df-b05a-c9177e705936} toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d} timeout 10 displaybootmenu Yes Windows Boot Loader ------------------- identifier {93f90e43-cae8-11df-b05a-c9177e705936} device partition=\Device\HarddiskVolume3 path \Windows\system32\winload.exe description Windows Server 2008 R2 - Standard locale en-US inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7} recoverysequence {93f90e44-cae8-11df-b05a-c9177e705936} recoveryenabled Yes osdevice partition=\Device\HarddiskVolume3 systemroot \Windows resumeobject {93f90e42-cae8-11df-b05a-c9177e705936} nx OptOut Windows Boot Loader ------------------- identifier {93f90e3f-cae8-11df-b05a-c9177e705936} device partition=C: path \Windows\system32\winload.exe description Windows 7 - Professional locale nl-NL inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7} recoverysequence {93f90e40-cae8-11df-b05a-c9177e705936} recoveryenabled Yes osdevice partition=C: systemroot \Windows resumeobject {93f90e3e-cae8-11df-b05a-c9177e705936} nx OptIn Real-mode Boot Sector --------------------- identifier {93f90e46-cae8-11df-b05a-c9177e705936} device partition=C: path \NST\AutoNeoGrub0.mbr description Ubuntu 10.04 - Lucid Lynx

    Read the article

  • Walking through an SQLite Table

    - by galford13x
    I would like to implement or use functionality that allows stepping through a Table in SQLite. If I have a Table Products that has 100k rows, I would like to retrive perhaps 10k rows at a time. Somthing similar to how a webpage would list data and have a < Previous .. Next > link to walk through the data. Are there select statements that can make this simple? I see and have tried using the ROWID in conjunction with LIMIT which seems ok if not ordering the data. // This seems works if not ordering. SELECT * FROM Products WHERE ROWID BETWEEN x AND y;

    Read the article

  • MVC multi page form losing session

    - by Bryan
    I have a multi-page form that's used to collect leads. There are multiple versions of the same form that we call campaigns. Some campaigns are 3 page forms, others are 2 pages, some are 1 page. They all share the same lead model and campaign controller, etc. There is 1 action for controlling the flow of the campaigns, and a separate action for submitting all the lead information into the database. I cannot reproduce this locally, and there are checks in place to ensure users can't skip pages. Session mode is InProc. This runs after every POST action which stores the values in session: protected override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); if (this.Request.RequestType == System.Net.WebRequestMethods.Http.Post && this._Lead != null) ParentStore.Lead = this._Lead; } This is the Lead property within the controller: private Lead _Lead; /// <summary> /// Gets the session stored Lead model. /// </summary> /// <value>The Lead model stored in session.</value> protected Lead Lead { get { if (this._Lead == null) this._Lead = ParentStore.Lead; return this._Lead; } } ParentStore class: public static class ParentStore { internal static Lead Lead { get { return SessionStore.Get<Lead>(Constants.Session.Lead, new Lead()); } set { SessionStore.Set(Constants.Session.Lead, value); } } Campaign POST action: [HttpPost] public virtual ActionResult Campaign(Lead lead, string campaign, int page) { if (this.Session.IsNewSession) return RedirectToAction("Campaign", new { campaign = campaign, page = 0 }); if (ModelState.IsValid == false) return View(GetCampaignView(campaign, page), this.Lead); TrackLead(this.Lead, campaign, page, LeadType.Shared); return RedirectToAction("Campaign", new { campaign = campaign, page = ++page }); } The problem is occuring between the above action, and before the following Submit action executes: [HttpPost] public virtual ActionResult Submit(Lead lead, string campaign, int page) { if (this.Session.IsNewSession || this.Lead.Submitted || !this.LeadExists) return RedirectToAction("Campaign", new { campaign = campaign, page = 0 }); lead.AddCustomQuestions(); MergeLead(campaign, lead, this.AdditionalQuestionsType, false); if (ModelState.IsValid == false) return View(GetCampaignView(campaign, page), this.Lead); var sharedLead = this.Lead.ToSharedLead(Request.Form.ToQueryString(false)); //Error occurs here and sends me an email with whatever values are in the form collection. EAUtility.ProcessLeadProxy.SubmitSharedLead(sharedLead); this.Lead.Submitted = true; VisitorTracker.DisplayConfirmationPixel = true; TrackLead(this.Lead, campaign, page, LeadType.Shared); return RedirectToAction(this.ConfirmationView); } Every visitor to our site gets a unique GUID visitorID. But when these error occurs there is a different visitorID between the Campaign POST and the Submit POST. Because we track each form submission via the TrackLead() method during campaign and submit actions I can see session is being lost between calls, despite the OnActionExecuted firing after every POST and storing the form in session. So when there are errors, we get half the form under one visitorID and the remainder of the form under a different visitorID. Luckily we use a third party service which sends an API call every time a form value changes which uses it's own ID. These IDs are consistent between the first half of the form, and the remainder of the form, and the only way I can save the leads from the lost session issues. I should also note that this works fine 99% of the time. EDIT: I've modified my code to explicitly store my lead object in TempData and used the TempData.Keep() method to persist the object between subsequent requests. I've only deployed this behavior to 1 of my 3 sites but so far so good. I had also tried storing my lead objects in Session directly in the controller action i.e., Session.Add("lead", this._Lead); which uses HTTPSessionStateBase, attempting to circumvent the wrapper class, instead of HttpContext.Current.Session which uses HTTPSessionState. This modification made no difference on the issue, as expected.

    Read the article

  • jquery can't get the change event on select element

    - by user63898
    i have this code the jquery code never got triggered none of the scripts are triggered : $('select[name=privileges]').change(function(){ alert("id"); var id = $(this).find(':selected')[0].id; alert(id); $('#changevalue').val(id); }) or this: $("#privileges_select").change(function() { alert($('#privileges_select option:selected').html()); }); <form method="GET" action="create_new_user.php"> user:<input type="text" size="40" name="user_name"/> password:<input type="text" size="40" name="password"/> <select name=privileges id="privileges_select"> <option name='opt_1'>admin</option> <option name='opt_2'>ordinary</option> </select> <input type="hidden" name="item_options_id" value="" id="changevalue" /> <input type="submit" value ="create" /> <input type="reset" /> </form> in the end i like to send the selected option id in the form get

    Read the article

  • Increasing FD_SETSIZE

    - by user1633717
    I need to increase the FD_SETSIZE value from 1024 to 4096. I know it'd be better to use poll()/epoll() but I want to understand what are pros/cons. The main question is: have I to recompile glibc? I read several thread where the change of .h after changing FD_SETSIZE works recompiling only the user application. Reading the glibc code (and the kernel too), actually it seems to me that if I want to use select(), FD_* macro and so on, I have to recompile all because the size of fd_set is changed. At this point I have to recompile all not only my application because if in the system there is an another "common" application that uses select and friends, I could have problem. Am I right?

    Read the article

  • advanced select in Stored Procedure

    - by Auro
    Hey i got this Table: CREATE TABLE Test_Table ( old_val VARCHAR2(3), new_val VARCHAR2(3), Updflag NUMBER, WorkNo NUMBER ); and this is in my Table: INSERT INTO Test_Table (old_val, new_val, Updflag , WorkNo) VALUES('1',' 20',0,0); INSERT INTO Test_Table (old_val, new_val, Updflag , WorkNo) VALUES('2',' 20',0,0); INSERT INTO Test_Table (old_val, new_val, Updflag , WorkNo) VALUES('2',' 30',0,0); INSERT INTO Test_Table (old_val, new_val, Updflag , WorkNo) VALUES('3',' 30',0,0); INSERT INTO Test_Table (old_val, new_val, Updflag , WorkNo) VALUES('4',' 40',0,0); INSERT INTO Test_Table (old_val, new_val, Updflag , WorkNo) VALUES('4',' 40',0,0); now my Table Looks like this: Row Old_val New_val Updflag WorkNo 1 '1' ' 20' 0 0 2 '2' ' 20' 0 0 3 '2' ' 30' 0 0 4 '3' ' 30' 0 0 5 '4' ' 40' 0 0 6 '5' ' 40' 0 0 (if the value in the new_val column are same then they are together and the same goes to old_val) so in the example above row 1-4 are together and row 5-6 at the moment i have in my Stored Procedure a cursor: SELECT t1.Old_val, t1.New_val, t1.updflag, t1.WorkNo FROM Test_Table t1 WHERE t1.New_val = ( SELECT t2.New_val FROM Test_Table t2 WHERE t2.Updflag = 0 AND t2.Worknr = 0 AND ROWNUM = 1 ) the output is this: Row Old_val New_val Updflag WorkNo 1 1 20 0 0 2 2 20 0 0 my Problem is, i dont know how to get row 1 to 4 with one select. (i had an idea with 4 sub-querys but this wont work if its more data that matches together) does anyone of you have an idea?

    Read the article

  • jquery select this parent from inside image.

    - by michael
    I have the following code, i'm trying to make a loader appear then the image fade in once it is loaded. I want to make the function reusable so i can just add an image to a div with the loader id and it will work. I cant figure out how to select the parent loader div from inside the image. the commented line works fine but, i think that will select all divs. i just want to select the parent loader div. can anyone help, thanks. <div id="loader" class="loading"> <img src="http://www.inhousedesign.co.nz/images10/caravan_01.jpg" style="display: none;"/> </div> $("#loader").each(function(){ var source = $(this).find("img").attr('src'); var img = new Image(); $(img).load(function(){ $(this).hide(); //$("#loader").removeClass('loading').append(this); $(this).parents("div:first").removeClass('loading').append(this); $(this).fadeIn(800); }).attr('src', source); });

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >