Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 30/584 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Mock Assertions on objects inside Parallel ForEach's???

    - by jacko
    Any idea how we can assert a mock object was called when it is being accessed inside Parallel.ForEach via a closure? I assume that because each invocation is on a different thread that Rhino Mocks loses track of the object? Pseudocode: var someStub = MockRepository.GenerateStub() Parallel.Foreach(collectionOfInts, anInt => someStub.DoSomething(anInt)) someStub.AssertWasCalled(s => s.DoSomething, Repeat.Five.Times) This test will return an expectation violation, expecting the stub to be called 5 times but being actually called 0 times. Any ideas how we can tell the lambdas to keep track of the thread-local stub object?

    Read the article

  • jQuery ajax inside a loop problem

    - by steamboy
    Hello, This js loop script always get the last value of ui_item inside a jquery ajax funciton. How can a catch the correct value of each iteration? for (var i = 0; i <= split_files_cb_value_holder.length - 1; i++){ var split_values = split_files_cb_value_holder[i].split(':'); ui_item = split_files_cb_value_holder[i]; $.ajax({ type: "POST", url: "ds/index.php/playlist/check_folder", data: "component_type="+$('#component_type').val()+"&value="+split_values[1], success: function(msg) { console.log(ui_item); //ALWAYS GETS THE LAST VALUE }, error: function() { alert("An error occured while updating. Try again in a while"); } }); } Thanks!

    Read the article

  • Trying to establish remote debug with visual studio running inside vmpalyer

    - by Kazoom
    i have this configuration a visual studio running inside virtual machine. the host machine has xp on it and so does the virtual machine. i have to run remote debug on the third machine which is connected to the host machine. i m currently facing this problem i m not able to ping my virtual machine from my host machine, however reverse is possible. how to resolve that? both my machine are on same workgroup (not domain, arent they both same?)

    Read the article

  • How to commit inside a CURSOR Loop?

    - by user320587
    Hi, I am trying to see if its possible to perform Update within a cursor loop and this updated data gets reflected during the second iteration in the loop. DECLARE cur CURSOR FOR SELECT [Product], [Customer], [Date], [Event] FROM MyTable WHERE [Event] IS NULL OPEN cur FETCH NEXT INTO @Product, @Customer, @Date, @Event WHILE @@FETCH_STATUS = 0 BEGIN SELECT * FROM MyTable WHERE [Event] = 'No Event' AND [Date] < @DATE -- Now I update my Event value to 'No Event' for records whose date is less than @Date UPDATE MyTable SET [Event] = 'No Event' WHERE [Product] = @Product AND [Customer] = @Customer AND [Date] < @DATE FETCH NEXT INTO @Product, @Customer, @Date, @Event END CLOSE cur DEALLOCATE cur Assume when the sql executes the Event column is NULL for all records In the above sql, I am doing a select inside the cursor loop to query MyTable where Event value is 'No Event' but the query returns no value even though I am doing an update in the next line. So, I am thinking if it is even possible to update a table and the updated data get reflected in the next iteration of the cursor loop. Thanks for any help, Javid

    Read the article

  • AJAX response inside jqplot not working

    - by JuanGesino
    I'm trying to render data from an AJAX response as a bar chart with jqplot. To render this bar chart I use two variables: s1 which contains the numbers ex: s1 = [22,67,32,89] ticks which contains the name corresponding to a number inside s1 ex: ticks = ["Jack", "Mary", "Paul", "John"] So my AJAX returns two variables, data1 and data2. When I console.log(data1) I get 22,67,32,89 When I console.log(data2) I get "Jack", "Mary", "Paul", "John" I then add the square brackets and change variable: s1 = [data1] ticks = [data2] When I console.log(s1) I get ["22,67,32,89"] When I console.log(ticks) I get "Jack", "Mary", "Paul", "John" And the graph does not render, this is my code: s1 = [data]; ticks = [data]; plot4 = $.jqplot('chartdiv4', [s1], { animate: !$.jqplot.use_excanvas, series:[{color:'#5FAB78'}], seriesDefaults:{ renderer:$.jqplot.BarRenderer, pointLabels: { show: true } }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks }, yaxis:{min:0, max:100, label:'%',labelRenderer: $.jqplot.CanvasAxisLabelRenderer} }, highlighter: { show: false } }); });

    Read the article

  • Finding controls inside nested master pages

    - by evanmortland
    I have a master page which is nested 2 levels. It has a master page, and that master page has a master page. When I stick controls in a ContentPlaceHolder with the name "bcr" - I have to find the controls like so: Label lblName =(Label)Master.Master.FindControl("bcr").FindControl("bcr").FindControl("Conditional1").FindControl("ctl03").FindControl("lblName"); Am I totally lost? Or is this how it needs to be done? I am about to work with a MultiView, which is inside of a conditional content control. So if I want to change the view I have to get a reference to that control right? Getting that reference is going to be even nastier! Is there a better way? Thanks

    Read the article

  • Declaring a function inside a function?

    - by nunos
    I have came across the following code, and being a c beginner, I came here for your help. This function is from a c implmentation of a queue. Bool queuePut(Queue *q, char c) { void beep(); if (queueFull(q)) { beep(); return false; } //do stuff return true; } So, I am getting a strange error with gcc on the void beep(). Can someone please explain me what is this, declaring a function inside a function. Or is it the void beep() simply out of place? I was given this code and there's always the possibility that it isn't correct. Thanks.

    Read the article

  • set different volumes inside app

    - by blacksheep
    i'd lioke to set the volume inside the touchesBegan action on half the volume of the IBAction. (void) awakeFromNib { [super awakeFromNib]; engine = [[Finch alloc] init]; E = [[RevolverSound alloc] initWithFile:PATH(@"E.wav")rounds:9]; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; CGPoint location = [touch locationInView:self.view]; if(CGRectContainsPoint(Edrop.frame,location)){ [E play]; } } (IBAction)bass:(id)sender { if(CGRectIntersectsRect(finga.frame,e.frame)){ if(finga.center.y <= e.center.y) [E play]; } } thanx, blacksheep

    Read the article

  • T-SQL: How Do I Create A "Private" Function Inside A Stored Procedure

    - by RPM1984
    Okay so im writing a SQL Server 2008 Stored Procedure (maintenance script). In doing so, being a good boy i've done plenty of error handling, checking rowcounts, printing output messages, etc But in doing this, ive found myself writing over and over again something like this: SELECT @RowsAffected = @@ROWCOUNT IF @RowsAffected > 0 BEGIN PRINT CAST(@RowsAffected, NVARCHAR(2)) + 'rows updated.' END Or debug messages like this: PRINT 'User ' + CAST(@UserId AS NVARCHAR(5)) + ' modified successfully' Is there a way i can create a kind of 'subroutine' inside the stored procedure (like a private method) that can accept something as a parameter (doesnt have to though) and do some logic? I want to be able to do something like this: CheckRowCounts Or this: PrintUserUpatedMessage(@UserId) Which would then perform the above logic (check rowcount, print message, etc) And yes obviously i can create a UDF, but then i would need to create/drop it etc as this logic is only required for the life of the execution of this stored procedure. Getting sick and tired of writing the same code over and over again, and changing all the different areas ive used it when i get an error =) Can anyone help?

    Read the article

  • ASP.NET (VB) - Close an opened SQL connection inside Function

    - by B1GB0Y
    Can anyone tell me how I close an opened SQL connection inside a Function? I call a Select Function like this: Function Selec(ByVal SQLStr As String) As SqlDataReader Dim SQLConn As New SqlConnection() Dim SQLCmd As New SqlCommand() SQLConn.ConnectionString = Session("bd") SQLConn.Open() SQLCmd.Connection = SQLConn SQLCmd.CommandText = SQLStr Selec = SQLCmd.ExecuteReader End Function And in another page I do a While method to retrieve me the data like this: (Note: BDcon.BD is the name of the Class that have Functions) Dim write as New BDcon.BD Dim menu As SqlDataReader = writeBD.Selec("SELECT something from Table") While menu.Read 'Do something End While menu.Close 'This close just the DataReader and not the SqlConnection Finally I want to Close my SQL Connection by Function like this: Function Close() As SqlConnection Dim SQLConn As New SqlConnection() SQLConn.ConnectionString = Session("bd") SQLConn.Close() End Function I think that the problem is on the Close() Function, I want to close the connection but I don't know how to call my Opened Conneciton. Please anyone can help me? Thanks in advance :)

    Read the article

  • Synchronisation construct inside pragma for

    - by Sayan Ghosh
    Hi, I have a program block like: for (iIndex1=0; iIndex1 < iSize; iIndex1++) { for (iIndex2=iIndex1+1; iIndex2 < iSize; iIndex2++) { iCount++; fDist =(*this)[iIndex1].distance( (*this)[iIndex2] ); m_oPDF.addPairDistance( fDist ); if ((bShowProgress) && (iCount % 1000000 == 0)) xyz_exception::ui()->progress( iCount, (size()-1)*((size()-1))/2 ); } } } } I have tried parallelising the inner and outer loop and by putting iCount in a critical region. What would be the best approach to parallelise this? If I wrap iCount with omp single or omp atomic then the code gives an error and I figured out that would be invalid inside omp for. I guess I am adding many extraneous stuffs to paralellise this. Need some advice... Thanks, Sayan

    Read the article

  • How to Append a div with javascript inside

    - by Damathryx
    I have this <div id="inprog_table"> </div> I tried this to insert var div = document.getElementById('inprog_table'); div.innerHTML = div.innerHTML+ "<div class='row'> <div class='col-xs-7'> "+ $(".row.active .col-xs-7 p:first-child").text()+" </div> <div class='col-xs-2'> "+ $(".row.active .col-xs-7 p:last-child").text()+" </div> <div class='col-xs-2'> 1 </div>" inside inprog_table div. I know it's really wrong, but I don't know how to append all of this.

    Read the article

  • Including javascript files from other projects inside the same solution

    - by gnomixa
    I have a project called WebResources where I have all the JS files that I intend to use in 2 other projects (all three projects sit in the same solution). I just spent 2 hours playing around with the file paths and VS just doesn't see the JS file (unless I specify the full path with the drive letter). Is there a trick to including javascript files relatively from other projects? My file structure is something like: Project1 Default.aspx Project2 WebResourcesProject /js testToInclude.js No matter how I try to include testToInclude.js inside Default.aspx, VS doesn't see it. Any ideas?

    Read the article

  • asp.net disappearing data from Dropdownlist inside listview when loading from DataTable

    - by piotrmichal
    Hello I have a problem with dropdowllist ddl1 that is inside of insertitem of listview. I populate it from table on page load. In Page_load I have: if (!Page.IsPostBack) { ListView1.DataBind(); InsDropDownList3.DataSource = GetAllPlayersName(); InsDropDownList3.DataBind(); } DropDownList ddl1 = (DropDownList)ListView1.InsertItem.FindControl("InsDropDownList1"); if (ddl1 != null) { DataTable t = GetAllPlayersName(); ddl1.DataSource = t; ddl1.DataBind(); } When I select a row in listview or edit it data from dropdownlist in insertitem row disappears - list became empty until I close page and open again. There is another InsDropDownList3 outside of listview and there is no problem with this one. Why one is loosing data and the other one not? As I understand ddl1 should even get data every time page loads.

    Read the article

  • Having an @ inside of a string - PHP

    - by Msencenb
    So I know that you use a backslash to escape most things in php however the @ symbol is an operator that suppresses error messages. I'm trying to put an email string like this inside of an array "[email protected]", however php is throwing an error. How do you escape the @ sign? EDIT: Here is the code example that was throwing the error: $arr = array(3=> "[email protected]",4=> "[email protected]"); However replacing the double quotes with single quotes fixes the error as answered below.... why is that true?

    Read the article

  • Add a listener inside or outside get method

    - by James P.
    I'm learning Swing and have composed an interface using a series of get methods to add components. Is it a good practise to add a Listener inside a get method as follows? I'd like to make things as decoupled as possible. private JButton getConnectButton() { if (connectButton == null) { connectButton = new JButton(); connectButton.setText("Connect"); connectButton.setSize(new Dimension(81, 16)); connectButton.setLocation(new Point(410, 5)); connectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // actionPerformed code goes here } }); } return connectButton; }

    Read the article

  • map view inside table view cell

    - by kudorgyozo
    Hello, i have another (probably unanswered) question about map views. I have a map view inside a table view cell and i want to disable the table view scrolling if the scrolling begins in the map view. Also the zooming gesture does not function normally. It only functions if the zooming gesture is done horizontally on the iphone display. The same thing happens with swiping gestures. It only affects the map if i swipe the map area horizontally. If i swipe vertically the table view scrolls instead, and i want to disable that. Any ides how to do it?

    Read the article

  • Search a string to find which records in table are inside said string

    - by Improfane
    Hello, Say I have a string. Then I have a number of unique tokens or keywords, potentially a large number in a database. I want to search and find out which of these database strings are inside the string I provide (and get the IDs of them). Is there a way of using a query to search the provided string or must it be taken to application space? Am I right in thinking that this is not a 'full text search'? Would the best method be to insert it into the database to make it a full text search?

    Read the article

  • How to force a node inside tiny mce ?

    - by KutePHP
    Hi All, I'm using tiny mce for my project and want to validate the node inside the tiny mce. On click of a text element, let's say a paragraph with some id, I load editor for the element. But, sometimes if user replaces the whole content, the node and its HTML is lost. I want to retain this node and only the content is removed. The node can be a paragraph or heading or ul or ol. EDIT : I'm providing dummy text such as "Lorem epsum .....". User will be removing this dummy text and add his content. How can I accomplish this ?

    Read the article

  • Performance problem Loading Dataset inside a virtual.

    - by ShaneH
    Host Configuration: HP EliteBook 8530w 4G Ram Win7 Ultimate 64Bit RC SQL Server 2005 64bit Developer Edition Virtual: Windows Virtual PC 1G Ram allocated Integration Services installed Windows XP 64bit Up to date service packs and .Net framework through 3.5 SP1 Sharing the Gigabit network adapter of the Host I have a simple .Net console application which loads a dataset of approximately 37K rows. Running the application on the host executes in approximately 4 seconds. Running inside the virtual takes 729 seconds. The size of the application grows to about 65Mb when the dataset is finished loading, no calculated columns or event handlers are attached. [edit] I changed the virtual to use a loopback adapter to communicate with the host and performance is now on par with running on hardware. Any ideas as to why it would going over the network adapter be almost 200x longer? TraceRt shows that the connection is only one hop. Thanks, Shane Holder

    Read the article

  • How to put tags inside an html attribute?

    - by Mycol
    Using xslt i want to create an attribute: <span class="tooltip"> <xsl:attribute name="onmouseover"> <xsl:text>javascript:function(</xsl:text> <span class="label">Aggiunta</span> <xsl:apply-tempaltes/> <xsl:text>)</xsl:text> </xsl:attribute> The problem is that only the pure text is putted inside the attribute, like <span class="tooltip" onmouseover="javascript:function(Aggiunta ...)"> whithout the span tags or the tags that may come from apply-templates. So how can I put html code into an attribute?

    Read the article

  • Getting 'this' pointer inside dependency property changed callback

    - by mizipzor
    I have the following dependency property inside a class: class FooHolder { public static DependencyProperty CurrentFooProperty = DependencyProperty.Register( "CurrentFoo", typeof(Foo), typeof(FooHandler), new PropertyMetadata(OnCurrentFooChanged)); private static void OnCurrentFooChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FooHolder holder = (FooHolder) d.Property.Owner; // <- something like this // do stuff with holder } } I need to be able to retrieve a reference to the class instance in which the changed property belongs. This is since FooHolder has some event handlers that needs to be hooked/unhooked when the value of the property is changed. The property changed callback must be static, but the event handler is not.

    Read the article

  • Oracle SQL: How to use more than 1000 items inside an IN statement

    - by Mehper C. Palavuzlar
    I have an SQL statement where I would like to get data of 1200 ep_codes by making use of IN. When I include more than 1000 ep_codes inside IN statement, Oracle says I'm not allowed to do that. To overcome this, I tried to change the SQL code as follows: SELECT ... FROM ... WHERE ... AND ep_codes IN (...1000 ep_codes...) OR ep_codes IN (...200 ep_codes...) The code was executed succesfully but the results are strange. Is it appropriate to do that using OR between INs or should I execute two separate codes as one with 1000 and the other with 200 ep_codes?

    Read the article

  • Fade out text value inside of text field using jQuery

    - by Dwayne
    I am not entirely sure if this is possible or not, I am pretty knowledgeable when it comes to jQuery and JavaScript in general, but this one has me stumped. I've created a simple plugin that clears a text input on focus and then displays the default value if nothing has been entered. Is it possible to fade out just the text itself inside of the text input, and not the whole field itself? All attempts seem to result in the text field itself fading out and eventually hiding the element from view. I did come up with a solution of using spans containing the default value and absolutely positioning them over the text input, hiding and showing them depending if a user has entered any text or not. I would much rather a much straightforward approach if one exists.

    Read the article

  • Referring to a non-final variable data inside an inner class

    - by shoaibmohammed
    Im doing a program in GWT. Here is the snippet where Im having problem private String[] populateRSSData() { 1==>> String[] data = null; try { new RequestBuilder(RequestBuilder.GET, "../database.php?action=populaterss").sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { 2==>> data=response.getText().split("~"); } @Override public void onError(Request request, Throwable exception) { Window.alert(exception.getMessage()); } }); } catch (RequestException e) { Window.alert(e.getMessage()); } return data; } Now the problem arises that I get an error that the variable 1==>> data should be declared final. But if I declare it as final then i cannot store the datas in 2==>> The error i get Cannot refer to a non-final variable data inside an inner class defined in a different method RSS_Manager.java Please suggest

    Read the article

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