I want to access a scrollviewer from another thread. Please tell me how to do detach it from the Main Thread so that I can change the Offsets of the scrollviewer.
Thanks
Hi im a beginner so sorry for my question if it sounds naive.
I want to implement a thread that runs in the background and listens all the time. By listening i mean, say it keeps check on a value returned from main thread and if the vaue exceeds certain figure, it executes some method, or say exits the program.
If you could give me some idea or at least refer me to something useful, that'll be great.
I have this string stream:
"do=whoposted&t=1934067" rel=nofollow>61</A></TD><TD class=alt2 align=middle>5,286</TD></TR><TR><TD id=td_threadstatusicon_1911046 class=alt1><IMG id=thread_statusicon_1911046 border=0 alt="" src="http://url.com/forum/images/statusicon/thread_new.gif"> </TD><TD class=alt2><IMG title=Node border=0 alt=Node src="http://url.com/forum/images/icons/new.png"></TD><TD id=td_threadtitle_1911046 class=alt1 title="http://lulzimg.com/i14/7bd11b.jpg Complete name : cool-thread...."><DIV><A id=thread_gotonew_1911046 href="http://url.com/forum/f80/cool-topic-new/"><IMG class=inlineimg title="Go to first new post" border=0 alt="Go to first new post" src="http://url.com/forum/images/buttons/firstnew.gif"></A> [MULTI] <A style="FONT-WEIGHT: bold" id=thread_title_1911046 href="http://url.com/forum/f80/cool-topic-name-1911046/">Cool Topic Name</A> </DIV><DIV class=smallfont><SPAN style="CURSOR: pointer" onclick="window.open('http://url.com/forum/members/u2031889/', '_self')">m3no</SPAN> </DIV></TD><TD class=alt2 title="Replies: 11, Views: 1,554"><DIV style="TEXT-ALIGN: right; WHITE-SPACE: nowrap" class=smallfont>Today <SPAN class=time>08:04 AM</SPAN><BR>by <A href="http://url.com/forum/members/u1131830/" rel=nofollow>karetsos</A> <A "
The lines I am interested are similar to this:
<A style="FONT-WEIGHT: bold" id=thread_title_1911046 href="http://url.com/forum/f80/cool-topic-name-1911046/">Cool Topic Name</A>
From here all I am trying to extract are:
Thread id: 1911046 (could be from either location in the string)
Thread name: "Cool Topic Name"
Thread link: "http://url.com/forum/f80/cool-topic-name-1911046/"
Currently I use this:
Regex pattern = new Regex ( "<A\\s+href=\"([^\"]*)\">([^\\x00]*?)\\s+id=thread_title_(\\S+)</A>" );
MatchCollection matches = pattern.Matches ( doc.ToString ( ) );
foreach ( Match match in matches )
{
int id = Convert.ToInt32 ( match.Groups [ 1 ].Value );
string name = match.Groups [ 3 ].Value;
string link = match.Groups [ 2 ].Value;
...
}
I would appreciate if someone can help me fix the pattern to match it. This used to work but it returns 0 matches.
I have a Java application that I run from a console which in turn exec's another Java process. I want to get a thread/heap dump of that child process. On Unix I could do a "kill -3 " but on Windows AFAIK the only way to get a thread dump is Ctrl-Break in the console. But that only gives me the dump of the parent process, not the child. Is there another way to get that heap dump?
While I'm pretty sure this might just get closed, I might just have some free time on my hands so I'm opening a request thread to see if anyone desires a jQuery plugin that I might be able to provide - if you have a specific request for a plugin that you can't find which isn't overly demanding ( such as a game ) can you reply to this thread?
This is just a hypothetical scenario to illustrate my question. Suppose that there are two threads and one TVar shared between them. In one thread there is an atomically block that reads the TVar and takes 10s to complete. In another thread is an atomically block that modifies the TVar every second. Will the first atomically block ever complete? Surely it will just keep going back to the beginning, because the log is in an inconsistent state?
What is the advantage of using a ConcurrentBag(Of MyType) against just using a List(Of MyType)?
The MSDN page on the CB (http://msdn.microsoft.com/en-us/library/dd381779(v=VS.100).aspx) states that
ConcurrentBag(Of T) is a thread-safe
bag implementation, optimized for
scenarios where the same thread will
be both producing and consuming data
stored in the bag
So what is the advantage? I can understand the advantage of the other collection types in the Concurrency namespace, but this one puzzled me.
Thanks.
how to include extra component for blackberry like
import net.rim.device.api.ui.decor.*;
import net.rim.device.api.ui.extension.component.*;
Plz help me.This interface for creating array of images.how to use scroll entry object.
hi i am having threading issues in my vsto project
// code for function
var threadUpdate = new Thread(_fun){IsBackgroud = true};
threadUpdate.Start();
threadList.add(threadUpdate);
// code for progressbar
Progressbar pb = new Prgressbar(){Title =@"abc"}
pb.Show()
it was working in perfect condition before i add wpf progress bar.
as the plugin has been running as single thread
can i ask how can running multi threading in outlook
thanks
im using a UIWebView to show html content in my app, the app contains two arrows to navigate between topics just like a RSS reader app, but when the user hits up or down arrow, the next topic doesn't show up until the data come back and the user still able to interact with the UI which is a bit confusing,
My question: how to block the UI when user moves to the next/back topic ? in other words how to make loadHTMLString:baseURL: works as a synchronous calling ? thanks !
Is there any way to remove certain assemblies or namespaces from the index of (or entirely from) the Visual Studio 2005 Documentation? System.Web.UI and System.Windows.Forms contain many identical class names and I'd like to eliminate those in System.Web.UI that are irrelevant to me.
I've been stuck the last few days trying to convert the following Apache/Mod_Rewrite rewrite rule to NGINX format. Anyone know where I am going wrong?
MOD_REWRITE:
RewriteCond %{QUERY_STRING} topic=([0-9]+)
RewriteRule /forum/index\.php /forum/vbseo301.php?action=thread&oldid=%1 [L]
NGINX:
location /forum/index.php {
if ($args ~ "topic=([0-9]+)"){
rewrite ^/forum/index\.php?topic=(.+)$ /forum/vbseo301.php?action=thread&oldid=$1 last;
}
}
I have been googling this question for some time but got no answers. What's the Apache process model?
By process model, I mean how Apache manage process or thread to handling HTTP request.
Does it fork one process for each HTTP request?
Does it have process/thread pool?
Can we config it?
Is there any online doc for such Apache details?
I'm doing a little program and I want to distribute using this recipe:
single directory with _main_.py in it
zip this directory and echo #!/usr/bin/env python\n file.zip
making it executable
The problem is that in this package I have also extra files (I'm using pygtk toolkit and I need images and ui xml files). When I try to access these files I have the error that the resource is unavailable (the path that I'm trying to open is something like file.zip/gui/gui.ui ).
How can I handle this situation?
foreach(textbox t in this.controls)
{
t.text=" ";
}
this is what i want to do. to clear all the textboxes in my page, at a time
but it gives an error like
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
plz tell me how to do this
My code does not update the thread field. It is null. Anyone have any ideas?
INSERT INTO [Messages]([Sender], [Receiver], [Job_Number], [Subject], [MessageText], [DateSent])
VALUES(@Sender, @Receiver, @Job_Number, @Subject, @MessageText, @DateSent)
SET @ThreadID = SCOPE_IDENTITY()
UPDATE [Messages]
SET Thread = @ThreadID
WHERE MessageID = @ThreadID
Lets say I have a vector of int which I've prefilled with 100 elements with a value of 0.
Then I create 2 threads and tell the first thread to fill elements 0 to 49 with numbers, then tell thread 2 to fill elements 50 to 99 with numbers. Can this be done? Otherwise, what's the best way of achieving this?
Thanks
I have a contact page on my site that seems to have been latched on to by a spammer.
The error itself is:
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.ReadByte()
at System.Web.UI.ObjectStateFormatter.DeserializeIndexedString(SerializerBinaryReader reader, Byte token)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
Google turns up little.
I assume they are submitting an invalid viewstate, but the exception has no line number so im stumped.
I need to have a buffered char stream, into which I write in one thread and from which I read in another thread. Right now I'm using PipedReader and PipedWriter for it, but those classes cause a performance problem: PipedReader does a wait(1000) when its internal buffer is empty, which causes my application to lag visibly.
Would there be some library which does the same thing as PipedReader/PipedWriter, but with better performance? Or will I have to implement my own wheels?
Hello,
I am developing in C# using the SerialPort class.
SerialPort.Write() is a blocking method.
How can I exit this method when I want to stop writing? I use a thread to write.
I abort this thread when I want to stop writing but the COM port continues to write.
Any ideas?
Thanks a lot.
Sorry for my basic English.
What does this do exactly?
var counts = new Dictionary<string, int>();
for (int i = 0; i < 10; i++)
counts[string.Format("STA Thread Queue Worker Thread No. {0}", i + 1)] = 0;
Thanks
I am writing a networking application using the java.nio api. My plan is to perform I/O on one thread, and handle events on another. To do this though, I need to synchronize reading/writing so that a race condition is never met.
Bearing in mind that I need to handle thousands of connections concurrently, is synchronization worth it, or should I use a single thread for I/O and event handling?
What does "object affine" mean? For instance, there are object affine thread pools. While I understand both thread pools and affine transformations in math, I can't think of an association between them.
I have created an array of threads and started all of them. How to know whether all threads have completed work. I don't want to use thread.wait or thread.join.
Hi everyone,
I am trying to call a method that passes an object called parameters.
Thread t1 = new Thread(delegate() { target.DoWork(parameters); });
t1.Start();
My test is failing all the time and i am not able step through the method..
Can someone please put me in the right direction
Thanks