Search Results

Search found 10004 results on 401 pages for 'thread pool'.

Page 5/401 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Which version of ZFS allows shrinking of a pool?

    - by George Bailey
    I found a list of versions and their Solaris release numbers http://download.oracle.com/docs/cd/E19253-01/819-5461/appendixa-1/index.html I know that you can grow a pool by replacing drives with larger ones or adding new drives or mirrors to the pool. I heard that ZFS did not yet support shrinking pools by removing drives/mirrors. But that has probably been changed. Which version (if any) released the ability to shrink a pool?

    Read the article

  • C# thread with multiple parameters

    - by Lucas B
    Does anyone know how to pass multiple parameters into a Thread.Start routine? I thought of extending the class, but the C# Thread class is sealed. Here is what I think the code would look like: ... Thread standardTCPServerThread = new Thread(startSocketServerAsThread); standardServerThread.Start( orchestrator, initializeMemberBalance, arg, 60000); ... } static void startSocketServerAsThread(ServiceOrchestrator orchestrator, List<int> memberBalances, string arg, int port) { startSocketServer(orchestrator, memberBalances, arg, port); } Thank you in advance. BTW, I start a number of threads with different orchestrators, balances and ports. Please consider thread safety also.

    Read the article

  • Using EnterCriticalSection in Thread to update VCL label

    - by user257188
    I'm new to threads. I'm using a 3rd party library that uses threads which at times call a procedure I've provided. How do I update update a TLabel.Caption from my procedure when its called by the thread? If I've called InitializeCriticalSection elsewhere, is it as simple as EnterCriticalSection(CritSect); GlobalVariable := 'New TLabel.Caption'; LeaveCriticalSection(CritSect); And then in my main thread: EnterCriticalSection(CritSect); Label1.Caption:= 'New TLable.Caption'; LeaveCriticalSection(CritSect); But, how do I get the main thread code to be called? The thread can use SendMessage? Or is there some better/easier way (.OnIdle could check a flag set by the thread?) Thanks.

    Read the article

  • Thread local storage with __declspec(thread) fails in C++/CLI

    - by EFrank
    I'm working on a project where we mix .NET code and native C++ code via a C++/CLI layer. In this solution I want to use Thread Local Storage via the __declspec(thread) declaration: __declspec(thread) int lastId = 0; However, at the first access of the variable, I get a NullReferenceException. To be more precise, the declaration is done within a ref class (a .NET class implemented in C++/CLI). I have already read something about __declspec(thread) does not work with delay loaded DLLs. Am I using delay loaded DLLs automatically if I use .NET?

    Read the article

  • Make process run on non EDT (event dispatch thread) thread from EDT

    - by Aly
    I have a method running on the EDT and within that I want to make it execute something on a new (non EDT) thread. My current code is follows: @Override public void actionPerformed(ActionEvent arg0) { //gathering parameters from GUI //below code I want to run in new Thread and then kill this thread/(close the JFrame) new GameInitializer(userName, player, Constants.BLIND_STRUCTURE_FILES.get(blindStructure), handState); }

    Read the article

  • Thread Local Memory for Scratch Memory.

    - by Hassan Syed
    I am using Protocol Buffers and OpensSSL to generate, HMACs and then CBC encrypt the two fields to obfuscate the session cookies -- similar Kerberos tokens. Protocol Buffers' API communicates with std::strings and has a buffer caching mechanism; I exploit the caching mechanism, for successive calls in the the same thread, by placing it in thread local memory; additionally the OpenSSL HMAC and EVP CTX's are also placed in the same thread local memory structure ( see this question for some detail on why I use thread local memory and the massive amount of speedup it enables even with a single thread). The generation and deserialization, "my algorithms", of these cookie strings uses intermediary void *s and std::strings and since Protocol Buffers has an internal memory retention mechanism I want these characteristics for "my algorithms". So how do I implement a common scratch memory ? I don't know much about the rdbuf of the std::string object. I would presumeably need to grow it to the lowest common size ever encountered during the execution of "my algorithms". Thoughts ?

    Read the article

  • VB.NET 2.0 - StackOverflowException when using Thread Safe calls to Windows Forms Controls

    - by LamdaComplex
    I have a Windows Forms app that, unfortunately, must make calls to controls from a second thread. I've been using the thread-safe pattern described on the http://msdn.microsoft.com/en-us/library/ms171728.aspx. Which has worked great in the past. The specific problem I am having now: I have a WebBrowser control and I'm attempting to invoke the WebBrowser.Navigate() method using this Thread-Safe pattern and as a result I am getting StackOverflow exceptions. Here is the Thread-Safe Navigate method I've written. Private Delegate Sub NavigateControlCallback(ByRef wb As WebBrowser, ByVal url As String) Private Sub AsyncNavigate(ByRef wb As WebBrowser, ByVal URL As String) Try If wb.InvokeRequired Then Dim callback As New NavigateControlCallback(AddressOf AsyncNavigate) callback(wb, url) Else wb.Navigate(url) End If Catch ex As Exception End Try End Sub Is there a Thread-Safe way to interact with WinForms components without the side effect of these StackOverflowExceptions?

    Read the article

  • Having to keep on restarting the Application Pool?

    - by smclintock
    One of our major websites (built on PHP, MSSQL, IIS7) has started to become unresponsive every few hours and I'm having to log on to the server and restart the application pool. The rest of the websites on the server are fine, so I figure it may be due to a code problem? Whilst I look over all the code, specifically the database connections, would anyone have any advice on how I could better track this down to what is actually causing it to become unresponsive? By "unresponsive" I mean when you enter the URL it doesn't resolve and times out. Thanks for any help, Steven.

    Read the article

  • C++ boost thread id and Singleton

    - by aaa
    hi. Sorry to flood so many questions this week. I assume thread index returned by thread.get_id is implementation specific. In case of the pthreads, is index reused? IE, if thread 0 runs and joins, is thread launched afterwords going to have a different ID? the reason I ask this is a need to implement Singleton pattern with a twist: each thread gets its own instance. I know it sounds very crazy, but threads control hardware (cuda) which does not permit device memory sharing. What is a good way to implement such pattern?

    Read the article

  • Pass off execution to different/specific thread in Java

    - by Mike
    I have about 4 threads. One thread keeps checking some data that the other thread is updating. The others are doing some processing in the background. All have been started at this point. My question is when the checking thread sees that the data has not been updated yet I currently sleep for a little bit but is there any way for me to tell the system to back to executing the thread that does the updating? That or is there any way I can put something like a listener on the data(a String) and once its updated an event will fire that will do what it needs to do? I tried using yield() and it seemed to just keep returning to the thread I called yield() from. Thanks

    Read the article

  • Way to kill python thread from inside thread?

    - by user859434
    I have some python code that currently performs expensive computation by performing the computation in parallel through many threads. For a given time period, many threads are created and started on the fly that share the same code which is explicitly stated within the run method of the thread. My question is how do I stop/kill a thread at the end of its run method? (the run is only called once) I need to do this in order to create more threads for the next batch of computation. #Example class someThread(threading.Thread): def __init__(self): #some init code def run(self): #Explicitly Stated Code without constant loops #Something performed to stop/kill this thread

    Read the article

  • C++/CLI managed thread cleanup

    - by Guillermo Prandi
    Hi. I'm writing a managed C++/CLI library wrapper for the MySQL embedded server. The mysql C library requires me to call mysql_thread_init() for every thread that will be using it, and mysql_thread_end() for each thread that exits after using it. Debugging any given VB.Net project I can see at least seven threads; I suppose my library will see only one thread if VB doesn't explicitly create worker threads itself (any confirmations on that?). However, I need clients to my library to be able to create worker threads if they need to, so my library must be thread-aware to some degree. The first option I could think of is to expose some "EnterThread()" and "LeaveThread()" methods in my class, so the client code will explicitly call them at the beginning and before exiting their DoWork() method. This should work if (1) .Net doesn't "magically" create threads the user isn't aware of and (2) the user is careful enough to have the methods called in a try/finally structure of some sort. However, I don't like it very much to have the user handle things manually like that, and I wonder if I could give her a hand on that matter. In a pure Win32 C/C++ DLL I do have the DllMain DLL_THREAD_ATTACH and DLL_THREAD_DETACH pseudo-events, and I could use them for calling mysql_thread_init() and mysql_thread_end() as needed, but there seem to be no such thing in C++/CLI managed code. At the expense of some performance (not much, I think) I can use TLS for detecting the "usage from a new thread" case, but I can imagine no mechanism for the thread exiting case. So, my questions are: (1) could .net create application threads without the user being aware of them? and (2) is there any mechanism I could use similar to DLL_THREAD_ATTACH / DLL_THREAD_DETACH from managed C++/CLI? Thanks in advance.

    Read the article

  • Java - Thread problem

    - by Yatendra Goel
    My question is related to all those methods(including Thread.sleep(...)) which throw InterruptedException. I found a statement on Sun's tutorial saying InterruptedException is an exception that sleep throws when another thread interrupts the current thread while sleep is active. Is that means that the interrupt will be ignored if the sleep is not active at the time of interrupt? Suppose I have two threads: threadOne and threadTwo. threadOne creates and starts threadTwo. threadTwo executes a runnable whose run method is something like: public void run() { : : try { Thread.sleep(10 * 1000); } catch (InterruptedException e) { return; } : : : // In the middle of two sleep invocations : : try { Thread.sleep(10 * 1000); } catch (InterruptedException e) { return; } : : } After thread creation, threadOne interrupts threadTwo. Suppose the threadTwo is in the middle of two sleep invocations at the time of interrupt (when no sleep method was active), then will the second sleep method throw InterrupteException as soon as it is invoked? If not, then will this interrupt will be ignored forever? How to be sure that threadTwo will always know about the interrupt (doesn't matter whether its one of the sleep method is active or not)?

    Read the article

  • Is boost shared_ptr <XXX> thread safe?

    - by sxingfeng
    I have a question about boost :: shared_ptr. There are lots of thread. class CResource { xxxxxx } class CResourceBase { public: void SetResource(shared_ptr<CResource> res) { m_Res = res; } shared_ptr<CResource> GetResource() { return m_Res; } private: shared_ptr<CResource> m_Res; } CResourceBase base; //---------------------------------------------- Thread A: while (true) { ...... shared_ptr<CResource> nowResource = base.GetResource(); nowResource.doSomeThing(); ... } Thread B: shared_ptr<CResource> nowResource; base.SetResource(nowResource); ... //----------------------------------------------------------- If thread A do not care the nowResource is the newest . Will this part of code have problem? I mean when ThreadB do not SetResource completely, Thread A get a wrong smart point by GetResource? Another question : what does thread-safe mean? If I do not care about whether the resource is newest, will the shared_ptr nowResource crash the program when the nowResource is released or will the problem destroy the shared_point?

    Read the article

  • Sheet and thread memory problem

    - by Xident
    Hi Guys, recently I started a project which can export some precalculated Grafix/Audio to files, for after processing. All I was doing is to put a new Window (with progressindicator and an Abort Button) in my main xib and opened it using the following code: [NSApp beginSheet: REC_Sheet modalForWindow: MOTHER_WINDOW modalDelegate: self didEndSelector: nil contextInfo: nil]; NSModalSession session=[NSApp beginModalSessionForWindow:REC_Sheet]; RECISNOTDONE=YES; while (RECISNOTDONE) { if ([NSApp runModalSession:session]!=NSRunContinuesResponse) break; usleep(100); } [NSApp endModalSession:session]; A Background Thread (pthread) was started earlier, to actually perform the work and save all the targas/wave file. Which worked great, but after an amount of time, it turned out that the main thread was not responding anymore and my memory footprint raised unstoppable. I tried to debug it with Instruments, and saw a lot of CFHash etc stuff growing to infinity. By accident i clicked below the sheet, and temporary it helped, the main thread (AppKit ?) was releasing it's stuff, but just for a little time. I can't explain it to me, first of all I thought it was the access from my thread to the Progressbar to update the Progress (intervalled at 0,5sec), so I cut it out. But even if I'm not updating anything and did nothing with the Progressbar, my Application eat up all the Memory, because of not releasing it's "Main-Event" or whatsoever Stuff. Is there any possibility to "drain" this Main thread Memory stuff (Runloop / NSApp call?). And why the heck doesn't the Main thread respond anymore (after this simple task) ??? I don't have a clou anymore, please help ! Thanks in advance ! P.S. How do you guys implement "threaded long task" Stuff and updating your gui ???

    Read the article

  • How to trace the connection pool in a Java Web application - DBMS_APPLICATION_INFO

    - by Cleiton Garcia
    Hello, I need improve the traceability in a Web Application that usually run on fixed db user. The DBA should have a fast access for the information about the heavy users that are degrading the database. 5 years ago, I implemented a .NET ORM engine which makes a log of user and the server using the DBMS_APPLICATION_INFO package. Using a wrapper above the connection manager with the following code: DBMS_APPLICATION_INFO.SET_MODULE('" + User + " - " + appServerMachine + "',''); Each time that a connection get a connection from the pool, the package is executed to log the information in the V$SESSION. Has anyone discover or implemented a solution for this problem using the Toplink or Hibernate? Is there a default implementation for this problem? I found here a solutions as I implemented 5 years ago, but I'd like to know with anyone have a better solution and integrated with the ORM. http://stackoverflow.com/questions/53379/using-dbmsapplicationinfo-with-jboss My application is above Spring, the DAO are implemented with JPA (using hibernate) and actually running directly in Tomcat, with plans to (next year) migrate to SAP Netwevare Application Server. Thanks.

    Read the article

  • Application pool crashing regularly (8007006d) (Service Unavailable)

    - by Phil
    I have a basic web form site running. Nothing out of the ordinary. It is frequently crashing the application pool. The error code I got from the logs is '8007006d'. Googling this does not come up with the usual bevy of results.... I do get a few people with a similar problem. Any the advise seems to be that the error is related to registry permissions. Can anyone confirm / disconfirm this theory. That if I get error 8007006d it is definately a reg permissions problem? Here is the code from my page. I'm not seeing anything that would cause a memory leak or make this happen. It is basically just one big insert command with many parameters? Imports System.Web.Configuration Imports System.Data.SqlClient Imports System.Net.Mail Imports System.IO Imports System.Globalization Partial Class _Default Inherits System.Web.UI.Page Public Sub WriteError(ByVal errorMessage As String) Try Dim path As String = "~/Error/" & DateTime.Today.ToString("dd-mm-yy") & ".txt" If (Not File.Exists(System.Web.HttpContext.Current.Server.MapPath(path))) Then File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close() End If Using w As StreamWriter = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path)) w.WriteLine(Constants.vbCrLf & "Log Entry : ") w.WriteLine("{0}", DateTime.Now.ToString(CultureInfo.InvariantCulture)) Dim err As String = "Error in: " & System.Web.HttpContext.Current.Request.Url.ToString() & ". Error Message:" & errorMessage w.WriteLine(err) w.WriteLine("__________________________") w.Flush() w.Close() End Using Catch ex As Exception WriteError(ex.Message) End Try End Sub Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad otherlanguagespecify.Text = "Language: Speaking: Reading: Writing:" 'Show / hide 'other' panels ProvincePanel.Visible = False If Province.SelectedValue = "Other" Then ProvincePanel.Visible = True End If languagespanel.Visible = False If OtherLanguage.Checked Then languagespanel.Visible = True End If End Sub Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click Dim areasexpertise As String = String.Empty Dim areasli As ListItem Dim english As String = String.Empty Dim connstring As String = WebConfigurationManager.ConnectionStrings("Str").ToString() Dim c As SqlConnection = New SqlConnection(connstring) Dim s As String = ("INSERT INTO [MBA_EOI]") & _ ("([subdate],[surname], [name], [dob], [nationality], [postaladdress],") & _ ("[province],[city], [postcode], [worktelephone],") & _ ("[hometelephone], [mobile], [email],[fax], [institution1],") & _ ("[institution2], [institution3], [institution4], [institutiondate1], [institutiondate2],") & _ ("[institutiondate3], [institutiondate4],[institutionquals1], [institutionquals2], [institutionquals3],") & _ ("[institutionquals4],[profdates1], [profdates2],") & _ ("[profdates3], [profdates4], [profdates5], [profdates6], [profdates7], ") & _ ("[profloc1], [profloc2], [profloc3], [profloc4], [profloc5],") & _ ("[profloc6], [profloc7], [profcomp1], [profcomp2], [profcomp3],") & _ ("[profcomp4], [profcomp5], [profcomp6], [profcomp7], [profpos1],") & _ ("[profpos2], [profpos3], [profpos4], [profpos5], [profpos6],") & _ ("[profpos7], [profdesc1], [profdesc2], [profdesc3], [profdesc4],") & _ ("[profdesc5],[profdesc6],[profdesc7], [company1], [company2],") & _ ("[company3], [company4], [company5], [nature1], [nature2],") & _ ("[nature3], [nature4], [nature5], [workdate1], [workdate2],") & _ ("[workdate3], [workdate4], [workdate5], [contactname1], [contactname2],") & _ ("[contactname3], [contactname4], [contactname5], [wtelephone1], [wtelephone2],") & _ ("[wtelephone3],[wtelephone4], [wtelephone5], [philosophy], [publications],") & _ ("[english], [otherlanguage], [areasofexpertise], [otherareasofexpertise],") & _ ("[assessortrue], [coordinatortrue], [facilitatortrue], [moderatortrue], [productdevelopertrue],") & _ ("[projectmanagertrue], [assessorexp], [coordinatorexp], [facilitatorexp], [moderatorexp],") & _ ("[productdeveloperexp], [projectmanagerexp], [assessorlvl], [coordinatorlvl], [facilitatorlvl],") & _ ("[moderatorlvl], [productdeveloperlvl], [projectmanagerlvl], [assessorpref], [coordinatorpref],") & _ ("[FacilitatorPref], [ModeratorPref], [ProductDeveloperPref], [ProjectManagerPref], [designation], [professortrue],") & _ ("[professorlvl], [professorexp], [professorpref], [lecturertrue], [lecturerpref], [lecturerlvl], [lecturerexp], [affiliations], [educationmore], ") & _ ("[wemail1], [wemail2], [wemail3], [wemail4], [wemail5])") & _ ("VALUES") & _ ("(@subdate, @surname, @name, @dob, @nationality, @postaladdress,") & _ ("@province,@city, @postcode, @worktelephone,") & _ ("@hometelephone, @mobile, @email, @fax, @inst1,") & _ ("@inst2, @inst3, @inst4, @instdate1, @instdate2,") & _ ("@instdate3, @instdate4, @instquals1, @instquals2, @instquals3,") & _ ("@instquals4, @profdates1, @profdates2,") & _ ("@profdates3, @profdates4, @profdates5, @profdates6, @profdates7,") & _ ("@profloc1, @profloc2, @profloc3, @profloc4, @profloc5,") & _ ("@profloc6, @profloc7, @profcomp1, @profcomp2, @profcomp3,") & _ ("@profcomp4, @profcomp5, @profcomp6, @profcomp7, @profpos1,") & _ ("@profpos1, @profpos1, @profpos4, @profpos5, @profpos6,") & _ ("@profpos7, @profdesc1, @profdesc2, @profdesc3, @profdesc4,") & _ ("@profdesc5, @profdesc6, @profdesc7, @company1, @company2,") & _ ("@company3, @company4, @company5,@nature1, @nature2,") & _ ("@nature3, @nature4, @nature5, @workdate1, @workdate2,") & _ ("@workdate3, @workdate4, @workdate5, @contactname1, @contactname2,") & _ ("@contactname3, @contactname4, @contactname5, @wtelephone1, @wtelephone2,") & _ ("@wtelephone3,@wtelephone4, @wtelephone5, @philosophy, @publications,") & _ ("@english, @otherlanguage, @areasofexpertise, @otherareasofexpertise,") & _ ("@assessor, @coordinator, @facilitator, @moderator, @productdeveloper,") & _ ("@projectmanager, @assessorexp, @coordinatorexp, @facilitatorexp, @moderatorexp,") & _ ("@productdeveloperexp, @projectmanagerexp, @assessorlvl, @coordinatorlvl, @facilitatorlvl,") & _ ("@moderatorlvl, @productdeveloperlvl, @projectmanagerlvl, @assessorpref, @coordinatorpref,") & _ ("@facilitatorpref, @moderatorpref, @productdeveloperpref, @projectmanagerpref, @designation, @professor, @professorlvl, @professorexp, @professorpref,") & _ ("@lecturer, @lecturerpref, @lecturerlvl, @lecturerexp, @affiliations, @educationmore, ") & _ ("@wemail1, @wemail2, @wemail3, @wemail4, @wemail5)") 'Setup birthday Dim birthdaystring As String = MonthBirth.SelectedValue.ToString & "/" & DayBirth.SelectedValue.ToString & "/" & YearBirth.SelectedValue.ToString Dim birthday As DateTime = Convert.ToDateTime(birthdaystring) Try Dim x As New SqlCommand(s, c) x.Parameters.AddWithValue("@subdate", DateTime.Now()) x.Parameters.AddWithValue("@surname", Surname.Text) x.Parameters.AddWithValue("@name", Name.Text) x.Parameters.AddWithValue("@dob", birthday) x.Parameters.AddWithValue("@nationality", Nationality.Text) x.Parameters.AddWithValue("@postaladdress", Postaladdress.Text) x.Parameters.AddWithValue("@designation", Designation.SelectedItem.ToString) 'to control whether or not 'other' province is selected If Province.SelectedValue = "Other" Then x.Parameters.AddWithValue("@province", Otherprovince.Text) Else x.Parameters.AddWithValue("@province", Province.SelectedValue.ToString) End If x.Parameters.AddWithValue("@city", City.Text) x.Parameters.AddWithValue("@postcode", Postcode.Text) x.Parameters.AddWithValue("@worktelephone", Worktelephone.Text) x.Parameters.AddWithValue("@hometelephone", Hometelephone.Text) x.Parameters.AddWithValue("@mobile", Mobile.Text) x.Parameters.AddWithValue("@email", Email.Text) x.Parameters.AddWithValue("@fax", Fax.Text) 'Add education params to x command x.Parameters.AddWithValue("@inst1", Institution1.Text) x.Parameters.AddWithValue("@inst2", Institution2.Text) x.Parameters.AddWithValue("@inst3", Institution3.Text) x.Parameters.AddWithValue("@inst4", Institution4.Text) x.Parameters.AddWithValue("@instdate1", Institutiondates1.Text) x.Parameters.AddWithValue("@instdate2", Institutiondates2.Text) x.Parameters.AddWithValue("@instdate3", Institutiondates3.Text) x.Parameters.AddWithValue("@instdate4", Institutiondates4.Text) x.Parameters.AddWithValue("@instquals1", Institution1quals.Text) x.Parameters.AddWithValue("@instquals2", Institution2quals.Text) x.Parameters.AddWithValue("@instquals3", Institution3quals.Text) x.Parameters.AddWithValue("@instquals4", Institution4quals.Text) 'Add checkbox params to x command Dim eli As ListItem For Each eli In EnglishSkills.Items If eli.Selected Then english += eli.Text + " | " End If Next x.Parameters.AddWithValue("@english", english) For Each areasli In Expertiselist.Items If areasli.Selected Then areasexpertise += " ; " & areasli.Text End If Next x.Parameters.AddWithValue("@areasofexpertise", areasexpertise) If OtherLanguage.Checked.ToString Then x.Parameters.AddWithValue("@otherlanguage", otherlanguagespecify.Text) Else x.Parameters.AddWithValue("@otherlanguage", DBNull.Value) End If 'Add competencies params to x command x.Parameters.AddWithValue("@assessor", AssessorTrue.Checked) x.Parameters.AddWithValue("@coordinator", CoordinatorTrue.Checked) x.Parameters.AddWithValue("@facilitator", FacilitatorTrue.Checked) x.Parameters.AddWithValue("@moderator", ModeratorTrue.Checked) x.Parameters.AddWithValue("@productdeveloper", ProductDeveloperTrue.Checked) x.Parameters.AddWithValue("@projectmanager", ProjectManagerTrue.Checked) x.Parameters.AddWithValue("@assessorexp", Assessorexp.Text) x.Parameters.AddWithValue("@coordinatorexp", coordinatorexp.Text) x.Parameters.AddWithValue("@facilitatorexp", facilitatorexp.Text) x.Parameters.AddWithValue("@moderatorexp", moderatorexp.Text) x.Parameters.AddWithValue("@productdeveloperexp", productdeveloperexp.Text) x.Parameters.AddWithValue("@projectmanagerexp", projectmanagerexp.Text) x.Parameters.AddWithValue("@assessorlvl", Assessorlevel.Text) x.Parameters.AddWithValue("@coordinatorlvl", Coordinatorlevel.Text) x.Parameters.AddWithValue("@facilitatorlvl", Facilitatorlevel.Text) x.Parameters.AddWithValue("@moderatorlvl", Moderatorlevel.Text) x.Parameters.AddWithValue("@productdeveloperlvl", Productdeveloperlevel.Text) x.Parameters.AddWithValue("@projectmanagerlvl", Projectmanagerlevel.Text) x.Parameters.AddWithValue("@assessorpref", AssessorPref.Text) x.Parameters.AddWithValue("@coordinatorpref", CoordinatorPref.Checked) x.Parameters.AddWithValue("@facilitatorpref", FacilitatorPref.Checked) x.Parameters.AddWithValue("@moderatorpref", ModeratorPref.Checked) x.Parameters.AddWithValue("@productdeveloperpref", ProductDeveloperPref.Checked) x.Parameters.AddWithValue("@projectmanagerpref", ProjectManagerPref.Checked) x.Parameters.AddWithValue("@professorpref", ProfessorPref.Checked) x.Parameters.AddWithValue("@professorlvl", Professorlevel.Text) x.Parameters.AddWithValue("@professor", ProfessorTrue.Checked) x.Parameters.AddWithValue("@professorexp", professorexp.Text) x.Parameters.AddWithValue("@lecturerpref", LecturerPref.Checked) x.Parameters.AddWithValue("@lecturerlvl", Lecturerlevel.Text) x.Parameters.AddWithValue("@lecturer", LecturerTrue.Checked) x.Parameters.AddWithValue("@lecturerexp", lecturerexp.Text) 'Add professional experience params to x command x.Parameters.AddWithValue("@profdates1", ProfDates1.Text) x.Parameters.AddWithValue("@profdates2", ProfDates2.Text) x.Parameters.AddWithValue("@profdates3", ProfDates3.Text) x.Parameters.AddWithValue("@profdates4", ProfDates4.Text) x.Parameters.AddWithValue("@profdates5", ProfDates5.Text) x.Parameters.AddWithValue("@profdates6", ProfDates6.Text) x.Parameters.AddWithValue("@profdates7", ProfDates7.Text) x.Parameters.AddWithValue("@profloc1", ProfDates1.Text) x.Parameters.AddWithValue("@profloc2", ProfDates2.Text) x.Parameters.AddWithValue("@profloc3", ProfDates3.Text) x.Parameters.AddWithValue("@profloc4", ProfDates4.Text) x.Parameters.AddWithValue("@profloc5", ProfDates5.Text) x.Parameters.AddWithValue("@profloc6", ProfDates6.Text) x.Parameters.AddWithValue("@profloc7", ProfDates7.Text) x.Parameters.AddWithValue("@profcomp1", ProfCompany1.Text) x.Parameters.AddWithValue("@profcomp2", ProfCompany2.Text) x.Parameters.AddWithValue("@profcomp3", ProfCompany3.Text) x.Parameters.AddWithValue("@profcomp4", ProfCompany4.Text) x.Parameters.AddWithValue("@profcomp5", ProfCompany5.Text) x.Parameters.AddWithValue("@profcomp6", ProfCompany6.Text) x.Parameters.AddWithValue("@profcomp7", ProfCompany7.Text) x.Parameters.AddWithValue("@profpos1", Profpos1.Text) x.Parameters.AddWithValue("@profpos2", Profpos2.Text) x.Parameters.AddWithValue("@profpos3", Profpos3.Text) x.Parameters.AddWithValue("@profpos4", Profpos4.Text) x.Parameters.AddWithValue("@profpos5", Profpos5.Text) x.Parameters.AddWithValue("@profpos6", Profpos6.Text) x.Parameters.AddWithValue("@profpos7", Profpos7.Text) x.Parameters.AddWithValue("@profdesc1", ProfDesc1.Text) x.Parameters.AddWithValue("@profdesc2", ProfDesc2.Text) x.Parameters.AddWithValue("@profdesc3", ProfDesc2.Text) x.Parameters.AddWithValue("@profdesc4", ProfDesc4.Text) x.Parameters.AddWithValue("@profdesc5", ProfDesc5.Text) x.Parameters.AddWithValue("@profdesc6", ProfDesc6.Text) x.Parameters.AddWithValue("@profdesc7", ProfDesc7.Text) 'Add references parameters to x command x.Parameters.AddWithValue("@company1", company1.Text) x.Parameters.AddWithValue("@company2", company2.Text) x.Parameters.AddWithValue("@company3", company3.Text) x.Parameters.AddWithValue("@company4", company4.Text) x.Parameters.AddWithValue("@company5", company5.Text) x.Parameters.AddWithValue("@nature1", natureofwork1.Text) x.Parameters.AddWithValue("@nature2", natureofwork2.Text) x.Parameters.AddWithValue("@nature3", natureofwork3.Text) x.Parameters.AddWithValue("@nature4", natureofwork4.Text) x.Parameters.AddWithValue("@nature5", natureofwork5.Text) x.Parameters.AddWithValue("@workdate1", workdate1.Text) x.Parameters.AddWithValue("@workdate2", workdate2.Text) x.Parameters.AddWithValue("@workdate3", workdate3.Text) x.Parameters.AddWithValue("@workdate4", workdate4.Text) x.Parameters.AddWithValue("@workdate5", workdate5.Text) x.Parameters.AddWithValue("@contactname1", ContactName1.Text) x.Parameters.AddWithValue("@contactname2", ContactName2.Text) x.Parameters.AddWithValue("@contactname3", ContactName3.Text) x.Parameters.AddWithValue("@contactname4", ContactName4.Text) x.Parameters.AddWithValue("@contactname5", ContactName5.Text) x.Parameters.AddWithValue("@wtelephone1", Telephone1.Text) x.Parameters.AddWithValue("@wtelephone2", Telephone2.Text) x.Parameters.AddWithValue("@wtelephone3", Telephone3.Text) x.Parameters.AddWithValue("@wtelephone4", Telephone4.Text) x.Parameters.AddWithValue("@wtelephone5", Telephone5.Text) x.Parameters.AddWithValue("@wemail1", Email1.Text) x.Parameters.AddWithValue("@wemail2", Email2.Text) x.Parameters.AddWithValue("@wemail3", Email3.Text) x.Parameters.AddWithValue("@wemail4", Email4.Text) x.Parameters.AddWithValue("@wemail5", Email5.Text) 'Add other areas of expertise parameter x.Parameters.AddWithValue("@otherareasofexpertise", Otherareasofexpertise.Text) 'Add philosophy / pubs / affils comands to x command x.Parameters.AddWithValue("@philosophy", learningphilosophy.Text) x.Parameters.AddWithValue("@publications", publicationdetails.Text) x.Parameters.AddWithValue("@affiliations", affiliations.Text) x.Parameters.AddWithValue("@educationmore", educationmore.Text) c.Open() x.ExecuteNonQuery() c.Close() Catch ex As Exception WriteError(ex.ToString) End Try 'If everyone is happy, redirect to thank you page If (Page.IsValid) Then Response.Redirect("Thanks.aspx") End If End Sub End Class

    Read the article

  • "pushModalScreen called by a non-event thread" thrown on event thread

    - by JGWeissman
    I am trying to get my Blackberry application to display a custom modal dialog, and have the opening thread wait until the user closes the dialog screen. final Screen dialog = new FullScreen(); ...// Fields are added to dialog Application.getApplication().invokeAndWait(new Runnable() { public void run() { Application.getUiApplication().pushModalScreen(dialog); } }); This is throwing an Exception which says "pushModalScreen called by a non-event thread" despite the fact that I am using invokeAndWait to call pushModalScreen from the event thread. Any ideas about what the real problem is? Here is the code to duplicate this problem: package com.test; import net.rim.device.api.ui.*; import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; public class Application extends UiApplication { public static void main(String[] args) { new Application(); } private Application() { new Thread() { public void run() { Application.this.enterEventDispatcher(); } }.start(); final Screen dialog = new FullScreen(); final ButtonField closeButton = new ButtonField("Close Dialog"); closeButton.setChangeListener(new FieldChangeListener() { public void fieldChanged(Field field, int context) { Application.getUiApplication().popScreen(dialog); } }); dialog.add(closeButton); Application.getApplication().invokeAndWait(new Runnable() { public void run() { try { Application.getUiApplication().pushModalScreen(dialog); } catch (Exception e) { // To see the Exception in the debugger throw new RuntimeException(e.getMessage()); } } }); System.exit(0); } } I am using Component Package version 4.5.0.

    Read the article

  • JMeter: how to asign a single distinct value from CSV Data Set Config to each thread in thread group?

    - by JohnnyM
    I have to make a load test for a relatively large number of users so I cant realy use User Parameters pre-processor to parametrize each thread with custom user data. I've read that I should use CSV Data Set Config instead. However I run into a problem with how JMeter interprets the input of this Config. Example: I have a thread group of 3 threads and Loop Count:10 with one HTTP request sampler with server www.example.com and path: \${user}. The csv file (bullet is a single line in file) for CSV Data Set Config to extract the user parameter: 1 2 3 4 5 Expected output is that for thread 1-x the path of the request should be: \x. So the output file should consist of 10 samples per thread namely: for thread 1-1 : 10 requests to www.example.com\1 for thread 1-2 : 10 requests to www.example.com\2 for thread 1-3 : 10 requests to www.example.com\3 but instead i get requests to each \1 - \5 and then to EOF. Does anyone know how to achieve the expected effect with CSV Data Set Config in jmeter 2.9?

    Read the article

  • Fireing Android Dialogs from another thread without Message Loop

    - by Jox
    In a SurfaceView, I'm dispatching new thread that draws on canvas within standard "LockCanvas-Draw-unlockCanvasAndPost" loop. (note that thread doesn't contains message loop). How to show Android standard Dialog from that thread? As thread doesn't have msg loop, following code doesn't work: Builder builder = new AlertDialog.Builder(this); builder.setTitle("Alert"); builder.setMessage("Stackoverflow!"); builder.setNegativeButton("cancel", null); builder.show();

    Read the article

  • Find TableLeyout in a thread (Because of the ProgressDialog)

    - by Shaulian
    Hi all, On my activity, im getting some big data from web, and while getting this data i want to show the user a ProgressDialog with spinning wheel. That i can do only with putting this code into a thread, right ? the problem is that after im getting this data i need to insert it into my tableLayout as TableRows and it seems impossible to access the TableLayout from the thread. What can i do to show this progress dialog and to be able access the table layout from the thread ?? Is there any event that happens on the end of the thread ? My code fails for : _tableLayout.addView(_tableRowVar, new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); My full code is : final ProgressDialog dialog = ProgressDialog.show(MyActivity.this, "", "Getting data.\nPlease wait...",true); new Thread() { public void run() { try { TableLayout _tableLayout; _tableLayout = (TableLayout)MyActivity.this.findViewById(R.id.tableLayoutID); List<String> data = getDataFromWeb(); // Get the data and bind it into the table publishTableLayoutWithTableRows(_tableLayout, data ); } catch (Exception e) { new AlertDialog.Builder(MyActivity.this) .setMessage(e.getMessage()) .show(); } dialog.dismiss(); } }.start();

    Read the article

  • access list element from thread

    - by phm
    Hello I have a "List" in the main application and I am trying to access its elements from within a thread. I am getting this exception: {"The calling thread cannot access this object because a different thread owns it."} System.SystemException {System.InvalidOperationException} Thanks

    Read the article

  • android call an outside function from a thread

    - by junmats
    hi.. say for example I have this code in my activity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Thread cThread = new Thread(new Runner()); cThread.start(); } private NotifyMe(){ //do something here } and this is my Runner class: public class TCPClient implements Runnable { public void run(){ //call NotifyMe() [THIS IS MY QUESTION] } } I have a thread on my activity that runs the Runner Class. Once the thread start, I would like to call the NotifyMe() function that is located at the activity. Is this possible? Please let me know if you don't understand my question. Thanks in advance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >