Search Results

Search found 8588 results on 344 pages for 'thread abort'.

Page 133/344 | < Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >

  • Syntax error in SWIG using __thread keyword

    - by user366838
    I am trying to make some code thread safe for use with pthreads. This code is written in C++, but is linked to using SWIG. g++ compiles this correctly, but when swig tries to create a wrapper, I get: fast_alloc.hh:109: Error: Syntax error in input(3) The original, unsafe code that compiles correctly is: static void *freeLists[Num_Buckets]; and the error occurs when I change it to: static __thread void *freeLists[Num_Buckets]; I have made other parts thread safe adding "__thread", for example, this works: static __thread unsigned newCount[Num_Buckets];

    Read the article

  • For Loop help In a Hash Cracker Homework.

    - by aaron burns
    On the homework I am working on we are making a hash cracker. I am implementing it so as to have my cracker. java call worker.java. Worker.java implements Runnable. Worker is to take the start and end of a list of char, the hash it is to crack, and the max length of the password that made the hash. I know I want to do a loop in run() BUT I cannot think of how I would do it so it would go to the given max pasword length. I have posted the code I have so far. Any directions or areas I should look into.... I thought there was a way to do this with a certain way to write the loop but I don't know or can't find the correct syntax. Oh.. also. In main I divide up so x amount of threads can be chosen and I know that as of write now it only works for an even number of the 40 possible char given. package HashCracker; import java.util.*; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Cracker { // Array of chars used to produce strings public static final char[] CHARS = "abcdefghijklmnopqrstuvwxyz0123456789.,-!".toCharArray(); public static final int numOfChar=40; /* Given a byte[] array, produces a hex String, such as "234a6f". with 2 chars for each byte in the array. (provided code) */ public static String hexToString(byte[] bytes) { StringBuffer buff = new StringBuffer(); for (int i=0; i<bytes.length; i++) { int val = bytes[i]; val = val & 0xff; // remove higher bits, sign if (val<16) buff.append('0'); // leading 0 buff.append(Integer.toString(val, 16)); } return buff.toString(); } /* Given a string of hex byte values such as "24a26f", creates a byte[] array of those values, one byte value -128..127 for each 2 chars. (provided code) */ public static byte[] hexToArray(String hex) { byte[] result = new byte[hex.length()/2]; for (int i=0; i<hex.length(); i+=2) { result[i/2] = (byte) Integer.parseInt(hex.substring(i, i+2), 16); } return result; } public static void main(String args[]) throws NoSuchAlgorithmException { if(args.length==1)//Hash Maker { //create a byte array , meassage digestand put password into it //and get out a hash value printed to the screen using provided methods. byte[] myByteArray=args[0].getBytes(); MessageDigest hasher=MessageDigest.getInstance("SHA-1"); hasher.update(myByteArray); byte[] digestedByte=hasher.digest(); String hashValue=Cracker.hexToString(digestedByte); System.out.println(hashValue); } else//Hash Cracker { ArrayList<Thread> myRunnables=new ArrayList<Thread>(); int numOfThreads = Integer.parseInt(args[2]); int charPerThread=Cracker.numOfChar/numOfThreads; int start=0; int end=charPerThread-1; for(int i=0; i<numOfThreads; i++) { //creates, stores and starts threads. Runnable tempWorker=new Worker(start, end, args[1], Integer.parseInt(args[1])); Thread temp=new Thread(tempWorker); myRunnables.add(temp); temp.start(); start=end+1; end=end+charPerThread; } } } import java.util.*; public class Worker implements Runnable{ private int charStart; private int charEnd; private String Hash2Crack; private int maxLength; public Worker(int start, int end, String hashValue, int maxPWlength) { charStart=start; charEnd=end; Hash2Crack=hashValue; maxLength=maxPWlength; } public void run() { byte[] myHash2Crack_=Cracker.hexToArray(Hash2Crack); for(int i=charStart; i<charEnd+1; i++) { Cracker.numOfChar[i]////// this is where I am stuck. } } }

    Read the article

  • Source Lookup Path is correct but debugger can't find file (Eclipse EE IDE)?

    - by Greg McNulty
    When debugging stepping over each line does work. Stepping into a function located in another file debugger displays: Source not found. Also displays option for Edit Source Lookup Path... but the correct package is listed there. (Also tried pointing with the directory path.) No other breakpoints set, as is a common solution. Any point in the right direction is helpful. Thank You. Thread[main] in the debugger window: Thread [main] (Suspended) ClassNotFoundException(Throwable).<init>(String, Throwable) line: 217 ClassNotFoundException(Exception).<init>(String, Throwable) line: not available ClassNotFoundException.<init>(String) line: not available URLClassLoader$1.run() line: not available AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method] Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: not available Launcher$ExtClassLoader.findClass(String) line: not available Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available Launcher$AppClassLoader.loadClass(String, boolean) line: not available Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available MyMain.<init>() line: 24 MyMain.main(String[]) line: 36

    Read the article

  • Android: roatating images in a loop.

    - by user573736
    Hello, I am trying with no success to modify the code example from: http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html so it will rotate the images in a loop, when clicking on the image once. (second click should pause). I tried using Handler and threading but cannot update the view since only the main thread can update UI. Exception I get from the code below: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. [in 'image1.startAnimation(rotation);' ('applyRotation(0, 90);' from the main thread)] package com.example.flip3d; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.animation.AccelerateInterpolator; import android.widget.ImageView; public class Flip3d extends Activity { private ImageView image1; private ImageView image2; private boolean isFirstImage = true; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); image1 = (ImageView) findViewById(R.id.image01); image2 = (ImageView) findViewById(R.id.image02); image2.setVisibility(View.GONE); image1.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if (isFirstImage) { applyRotation(0, 90); isFirstImage = !isFirstImage; } else { applyRotation(0, -90); isFirstImage = !isFirstImage; } } }); } private void applyRotation(float start, float end) { // Find the center of image final float centerX = image1.getWidth() / 2.0f; final float centerY = image1.getHeight() / 2.0f; // Create a new 3D rotation with the supplied parameter // The animation listener is used to trigger the next animation final Flip3dAnimation rotation = new Flip3dAnimation(start, end, centerX, centerY); rotation.setDuration(500); rotation.setFillAfter(true); rotation.setInterpolator(new AccelerateInterpolator()); rotation.setAnimationListener(new DisplayNextView(isFirstImage, image1, image2)); if (isFirstImage) { image1.startAnimation(rotation); } else { image2.startAnimation(rotation); } } } How can I manage to update the UI and control the rotation within onClick listener? Thank you, Oakist

    Read the article

  • What does this exception mean? and how do i solve this? java

    - by Nitesh Panchal
    Hello, I am using IcePDF component to view pdf in JApplet on my web page. But for some reason i get this error. Can anybody tell why is this happening and how to solve it? Exception in thread "thread applet-applet.KitKitApplet.class-1" java.lang.StackOverflowError at java.util.PropertyPermissionCollection.implies(Unknown Source) at java.security.Permissions.implies(Unknown Source) at sun.security.provider.PolicyFile.implies(Unknown Source) at java.security.ProtectionDomain.implies(Unknown Source) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPropertyAccess(Unknown Source) at java.lang.System.getProperty(Unknown Source) at org.icepdf.core.util.Defs.property(Defs.java:59) at org.icepdf.core.util.Defs.property(Defs.java:63) at org.icepdf.core.util.Defs.property(Defs.java:63) at org.icepdf.core.util.Defs.property(Defs.java:63) at org.icepdf.core.util.Defs.property(Defs.java:63) at org.icepdf.core.util.Defs.property(Defs.java:63) at org.icepdf.core.util.Defs.property(Defs.java:63)

    Read the article

  • Saving part of audio file (java)

    - by m159701m
    Hi evryone, While playing an audio file (.wav) I want , if I resort to ctrl+c , to stop the playback and save part of the audio file in a file called "file2.wav". Here's the thread I'd like to add to my code. Unfortunately it doesn't work at all. Thanks in advance class myThread extends Thread{ public void run(){ try { PipedOutputStream poStream = new PipedOutputStream(); PipedInputStream piStream = new PipedInputStream(); poStream.connect(piStream); File cutaudioFile = new File ("file2.wav"); AudioInputStream ais = new AudioInputStream(piStream, AudioFileFormat.Type.WAVE , cutaudioFile); poStream.write(ais,AudioFileFormat.Type.WAVE,cutaudioFile); }catch (Exception e){ e.printStackTrace(); } } // end run } // end myThread

    Read the article

  • how to create a system-wide independent universal counter object primarily for Database keys?

    - by andora
    I would like to create/use a system-wide independent universal 'counter object' that can be called via COM in a thread-safe manner. The counter object will be passed an ID to identify which counter to return, handle the counting, 'persist' the count (occasionally), have reasonable performance (as fast as possible) perhaps capable of 1000 counts per second or better (1mS) and be accessible cross-process/out-of-process. The current count status must be persisted between object restarts/shutdowns. The counter object is liklely to be a 'singleton' type object implemented in some form of free-threaded dictionary, containing maybe 10 counters (perhaps 50 max). The count needs to be monotonic and consistent, (ie: guaranteed unique sequential values). Each counter should have a few methods, like reset, inc, dec, set, clear, remove. As a luxury, I would like to have a variable-increment (ie: 'step by' value). To support thread-safefty, perhaps some sorm of critical-section or mutex call. It just needs to return a long/4byte signed integer. I really want something that can be called from anywhere, including VBScript, so I figure COM is my preferred solution. The primary use of this is for database keys. I am unable to use autoinc or guid type keys and have ruled out database-generated counting systems at this point. I've spent days researching this and I have really struggled to find a solution. The best I can find is a free-threaded dictionary object that can be instantiated using COM+ from Motobit - it seems to offer all the 'basics' and I guess I could create some form of wrapper for this. So, here are my questions: Does such a 'general purpose counter-object already exist? Can you direct me to it? (MS did do an IIS/ASP object called 'MSWC.Counter' but this isn't 'cross-process'/ out-of-process component and isn't thread-safe. (but if it was, it would do!) What is the best way of creating such a Component? (I'd prefer VB6 right-now, [don't ask!] but can do in VB.NET2005 if I had to). I don't have the skills/knowledge/tools to use anything else. I am desparate for a workable solution. I need specific guidance! If anybody can code something up for me I am prepared to pay for it.

    Read the article

  • Threading and pcap issues.

    - by cftmon
    I have a GUI program that allows a user a scan a network, the issue is that when the pcap_loop function is called, my GUI program becomes unresponsive.(the pcap_loop blocks the current thread). When i try to use pthreads, i got a SIGSEGV fault at the pcap_loop function.Why?It's as if the thread can't see the procPacket function itself. void procPacket(u_char *arg, const struct pcap_pkthdr *pkthdr, const u_char *packet) { //show packets here } void* pcapLooper(void* param) { pcap_t* handler = (pcap_t*) param; pcap_loop(handler, 900 ,procPacket, NULL ); } //some function that runs when a button is pressed //handler has been opened through pcap_open_live pthread_t scanner; int t = pthread_create(&scanner,NULL,&pcapLooper, &handler ); if(t) { std::cout << "failed" << std::endl; } pthread_join(scanner,NULL); //do other stuff.

    Read the article

  • HttpURLConnection getting locked

    - by Nayn
    Hi, I have a thread running under tomcat which creates a HttpUrlConnection and reads it through BufferedInputStream. After fetching data for some urls, it stalls. I got the jstack of the process which says HttpUrlConnection is locked and BufferedInputStream is also locked. "http-8080-1" daemon prio=10 tid=0x08683400 nid=0x79c9 runnable [0x8f618000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) - locked <0x956ef8c0> (a java.io.BufferedInputStream) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072) - locked <0x956ef910> (a sun.net.www.protocol.http.HttpURLConnection) Could somebody help here. Thanks

    Read the article

  • python threading and performace?

    - by kumar
    I had to do heavy I/o bound operation, i.e Parsing large files and converting from one format to other format. Initially I used to do it serially, i.e parsing one after another..! Performance was very poor ( it used take 90+ seconds). So I decided to use threading to improve the performance. I created one thread for each file. ( 4 threads) for file in file_list: t=threading.Thread(target = self.convertfile,args = file) t.start() ts.append(t) for t in ts: t.join() But for my astonishment, there is no performance improvement whatsoever. Now also it takes around 90+ seconds to complete the task. As this is I/o bound operation , I had expected to improve the performance. What am I doing wrong?

    Read the article

  • ASP.NET application stopping event?

    - by Barguast
    I have a ASP.NET application which implements a custom in-memory cache. I'm using this as opposed to ASP.NET's caching mechanism as I needed a more complex way to handle what to drop from the cache. Part of this custom cache is a separate thread which occasionally searches for data to drop from the cache whenever it gets too large. What I need to do is signal this cache maintenance thread to stop whenever the ASP.NET application 'exits'. I guess this basically amounts to when the web site is stopped in IIS. Is there a pre-existing event I can utilise to do this? Thanks.

    Read the article

  • calling invokeAndWait from the EDT

    - by Aly
    Hi, I have a problem following from my previous problem. I also have the code SwingUtillities.invokeAndWait somewhere else in the code base, but when I remove this the gui does not refresh. If I dont remove it the error I get is: Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread at java.awt.EventQueue.invokeAndWait(Unknown Source) at javax.swing.SwingUtilities.invokeAndWait(Unknown Source) at game.player.humanplayer.model.HumanPlayer.act(HumanPlayer.java:69) The code in HumanPlayer.act is: public Action act(final Action[] availiableActions) { try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { gui.update(availiableActions); } }); } catch (InterruptedException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } synchronized(performedAction){ while(!hasPerformedAction()){ try { performedAction.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } setPerformedAction(false); } return getActionPerfomed(); }

    Read the article

  • How do I debug a difficult-to-reproduce crash with no useful call stack?

    - by David M
    I am encountering an odd crash in our software and I'm having a lot of trouble debugging it, and so I am seeking SO's advice on how to tackle it. The crash is an access violation reading a NULL pointer: First chance exception at $00CF0041. Exception class $C0000005 with message 'access violation at 0x00cf0041: read of address 0x00000000'. It only happens 'sometimes' - I haven't managed to figure out any rhyme or reason, yet, for when - and only in the main thread. When it occurs, the call stack contains one incorrect entry: For the main thread, which this is, it should show a large stack full of other items. At this point, all other threads are inactive (mostly sitting in WaitForSingleObject or a similar function.) I have only seen this crash occur in the main thread. It always has the same call stack of one entry, in the same method at the same address. This method may or may not be related - we do use the VCL in our application. My bet, though, is that something (possibly quite a while ago) is corrupting the stack, and the address where it's crashing is effectively random. Note it has been the same address across several builds, though - it's probably not truly random. Here is what I've tried: Trying to reproduce it reliably at a certain point. I have found nothing that reproduces it every time, and a couple of things that occasionally do, or do not, for no apparent reason. These are not 'narrow' enough actions to narrow it down to a particular section of code. It may be timing related, but at the point the IDE breaks in, other threads are usually doing nothing. I can't rule out a threading problem, but think it's unlikely. Building with extra debugging statements (extra debug info, extra asserts, etc.) After doing so, the crash never occurs. Building with Codeguard enabled. After doing so, the crash never occurs and Codeguard shows no errors. My questions: 1. How do I find what code caused the crash? How do I do the equivalent of walking back up the stack? 2. What general advice do you have for how to trace the cause of this crash? I am using Embarcadero RAD Studio 2010 (the project mostly contains C++ Builder code and small amounts of Delphi.)

    Read the article

  • Multiplying matrices: error: expected primary-expression before 'struct'

    - by justin
    I am trying to write a program that is supposed to multiply matrices using threads. I am supposed to fill the matrices using random numbers in a thread. I am compiling in g++ and using PTHREADS. I have also created a struct to pass the data from my command line input to the thread so it can generate the matrix of random numbers. The sizes of the two matrices are also passed in the command line as well. I keep getting: main.cpp:7: error: expected primary-expression before 'struct' my code @ line 7 =: struct a{ int Arow; int Acol; int low; int high; }; My inpust are : Sizes of two matrices ( 4 arguments) high and low ranges in which o generate the random numbers between. Complete code: [headers] using namespace std; void *matrixACreate(struct *); void *status; int main(int argc, char * argv[]) { int Arow = atoi(argv[1]); // Matrix A int Acol = atoi(argv[2]); // WxX int Brow = atoi(argv[3]); // Matrix B int Bcol = atoi(argv[4]); // XxZ, int low = atoi(argv[5]); // Range low int high = atoi(argv[6]); struct a{ int Arow; // Matrix A int Acol; // WxX int low; // Range low int high; }; pthread_t matrixAthread; //pthread_t matrixBthread; pthread_t runner; int error, retValue; if (Acol != Brow) { cout << " This matrix cannot be multiplied. FAIL" << endl; return 0; } error = pthread_create(&matrixAthread, NULL, matrixACreate, struct *a); //error = pthread_create(&matrixAthread, NULL, matrixBCreate, sendB); retValue = pthread_join(matrixAthread, &status); //retValue = pthread_join(matrixBthread, &status); return 0; } void matrixACreate(struct * a) { struct a *data = (struct a *) malloc(sizeof(struct a)); data->Arow = Arow; data->Acol = Acol; data->low = low; data->high = high; int range = ((high - low) + 1); cout << Arow << endl<< Acol << endl; }// just trying to print to see if I am in the thread

    Read the article

  • some OVERLAPS using WSASend not returning in a timely manner using GetQueuedCompletionStatus?

    - by Geoffrey
    Background: I'm using CreateIoCompletionPort, WSASend/Recv, and GetQueuedCompletionStatus to do overlapped socket io on my server. For flow control, when sending to the client, I only allow several WSASend() to be called when all pending OVERLAPs have popped off the IOCP. Problem: Recently, there are occassions when the OVERLAPs do not get returned to the IOCP. The thread calling GetQueuedCompletionStatus does not get them and they remain in my local pending queue. I've verified that the client DOES receive the data off the socket and the socket is connected. No errors were returned when the WSASend() calls were made. The OVERLAPs simply "never" come back without an external stimulus like the following: Disconnecting the socket from the client or server, immediately allows the GetQueuedCompletionStatus thread to retrieve the OVERLAPs Making additional calls to WSASend(), sometimes several are needed, before all the OVERLAPs suddenly pop off the queue. Question: Has anyone seen this type of behavior? Any ideas on what is causing this? Thanks, Geoffrey

    Read the article

  • remote function with pthread

    - by user311130
    Hi all, I wrote some code in c, using pthread (I configured the linker and compiler in eclipse IDE first). #include <pthread.h> #include "starter.h" #include "UI.h" Page* MM; Page* Disk; PCB* all_pcb_array; void* display_prompt(void *id){ printf("Hello111\n"); return NULL; } int main(int argc, char** argv) { printf("Hello\n"); pthread_t *thread = (pthread_t*) malloc (sizeof(pthread_t)); pthread_create(thread, NULL, display_prompt, NULL); printf("Hello\n"); return 1; } that works fine. However, when I move display_prompt to UI.h no "Hello111 " output is printed. anyone know how to solve that? Elad

    Read the article

  • Custom SQL Server driver

    - by hoodoos
    I had a crazy thought about writing my own SQL Server driver to make it work something like non-blocking http client, so it won't be thread thirsty and could handle lots of db queries within one thread. I tried to look over google for some guidelines about implementing SQL Server client protocol, but found none really, where do those guys get information about it when they write own implementations for PHP or python? I need a really low level to be documented so I can implement all phases of working with a connection through sockets. And would be really nice to have a an example in c# language. :)

    Read the article

  • AudioRecord doesn't work for Motorola Milestone

    - by hcpl
    I'm having this problem only on Motorola Milestone. Code: // init recorder recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 8000); recordInstance.startRecording(); //more code here recordInstance.stop(); The errorinformation I have (can't find more for the moment since I don't have a milestone myself for debugging): Uncaught handler: thread main exiting due to uncaught exception java.lang.IllegalStateException: stop() called on an uninitialized AudioRecord. at android.media.AudioRecord.stop(AudioRecord.java:51 6) Apparantly I'm not the only one with this problem. Some very similar threads I found (without solution): http://groups.google.com/group/android-developers/browse_thread/thread/6dd24aeb484b2e40 http://androidcommunity.com/forums/f2/problem-using-audiorecord-in-motorola-milestone-30935/ http://community.developer.motorola.com/t5/Android-App-Development-for/Problem-using-AudioRecord-on-Milestone-device/m-p/3889 http://www.fring.com/forums/showthread.php?t=16194

    Read the article

  • crashing out in a while loop python

    - by Edward
    How to solve this error? i want to pass the values from get_robotxya() and get_ballxya() and use it in a loop but it seems that it will crash after awhile how do i fix this? i want to get the values whithout it crashing out of the while loop import socket import os,sys import time from threading import Thread HOST = '59.191.193.59' PORT = 5555 COORDINATES = [] def connect(): globals()['client_socket'] = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client_socket.connect((HOST,PORT)) def update_coordinates(): connect() screen_width = 0 screen_height = 0 while True: try: client_socket.send("loc\n") data = client_socket.recv(8192) except: connect(); continue; globals()['COORDINATES'] = data.split() if(not(COORDINATES[-1] == "eom" and COORDINATES[0] == "start")): continue if (screen_width != int(COORDINATES[2])): screen_width = int(COORDINATES[2]) screen_height = int(COORDINATES[3]) return def get_ballxy(): update_coordinates() ballx = int(COORDINATES[8]) bally = int(COORDINATES[9]) return ballx,bally def get_robotxya(): update_coordinates() robotx = int(COORDINATES[12]) roboty = int(COORDINATES[13]) angle = int(COORDINATES[14]) return robotx,roboty,angle def print_ballxy(bx,by): print bx print by def print_robotxya(rx,ry,a): print rx print ry print a def activate(): bx,by = get_ballxy() rx,ry,a = get_robotxya() print_ballxy(bx,by) print_robotxya(rx,ry,a) Thread(target=update_coordinates).start() while True: activate() this is the error i get:

    Read the article

  • Change DateTimePicker Calendar Runtime

    - by Smart pro
    I want to view the calendar in another culture, for example let it show in Arabic. I use this code in the Main, but the calendar is still in the same culture: CultureInfo sa = new CultureInfo("ar-SA", false); sa.DateTimeFormat.Calendar = new System.Globalization.HijriCalendar(); // Sets the culture to Arabic (Saudi Arabia) Thread.CurrentThread.CurrentCulture = sa; // Sets the UI culture to Arabic (Saudi Arabia) Thread.CurrentThread.CurrentUICulture = sa; I add the DateTimePicker on a form and expect that it shows the date in Arabic after running, but the DateTimePicker or Calendar is not changed to that culture.

    Read the article

  • asp.net Background Threads Exception Handling

    - by Chris
    In my 3.5 .net web application I have a background thread that does a lot of work (the application is similar to mint.com in that it does a lot of account aggregation on background threads). I do extensive exception handling within the thread performing the aggregation but there's always the chance an unhandled exception will be thrown and my entire application will die. I've read some articles about this topic but they all seem fairly outdated and none of them implement a standard approach. Is there a standard approach to this nowadays? Is there any nicer way to handle this in ASP.NET 4.0?

    Read the article

  • BizTalk Server Threading in Receive Pipelines

    - by ToxicAvenger
    I am building custom pipeline components for receive pipelines in BizTalk Server (2006 and 2009). I am building the components in a streaming fashion. My question: for any single inbound message, if I have a disassembling component, when I create n messages from a single inbound message, will the message agent always use a single thread when reading the (body) streams and persisting the messages to the message box? I would think so, but confirmation would be helpful. Say if I create five messages in the disassembler, will any of these messages be persisted sequentially from the same thread? Or could these messages be processed in parallel?

    Read the article

  • Mutex takes a long while to unlock

    - by l.thee.a
    I have two threads. First one is something like this: while(1) { pthread_mutex_lock(&mutex); //DO WORK pthread_mutex_unlock(&mutex); pthread_yield(); } The second one locks the mutex on user event, change some settings and unlocks. Thread one does ~ 200 iterations a second. However on occasion it takes the second thread up to 3 seconds to get active (to unlock the mutex). How do I ensure faster response?

    Read the article

  • C++ Windows IOCP - HTTP POST data missing

    - by Mike Trader
    I have written a very simple IOCP HTTP server that works for the GET verb, but not POST. I create a socket and a listen thread in which accept() is waiting for a connection. When a client connects I call ioctlsocket() to unblock the socket then I associate the socket with IOCP and finally call WSARecv() to read the data. Some data is indeed read and when that has happened, IOCP wakes up a worker thread via GetQueuedCompletionStatus() and I recover the request data. I only ever get the request header when I POST from any browser. Any suggestions as to why? I am assuming the IOCP completes when ALL the data has arrived from TCP?

    Read the article

< Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >