Helpful posts and threads

I am trying to make some sense of this and can't. Some threads that have a Green Star adjacent to them also indicate which post is either "Helpful" (yellow star) and which is the one that "Solved" (green star) the problem. But then there are other threads that indicate the Green star and when you take a look at the individual posts, there are no stars anywhere. Is there logic to this or is this a bug? Is there a way for us to find out which post is the one deserving of a green star?
Patrick

854/3300
Hi Patrick,
You may even find also a thread with the "Solved" star awarded to somebody, but with no "Answered" adjacent green star...
So no, there is no certain way to find which post, especially considering sometimes stars can be awarded too soon, before a better answer comes "too late", or even sometimes stars can be mistakenly awarded to wrong answers.
Of course the system generally works, but for a given question that you are not sure of, the best way is to read the whole thread.
Axl

Similar Messages

  • Deleting posts and locking a thread

    Yesterday, there was a reply made to the FMB size shrinks dramatically thread, where the poster described a situation where his Forms 10 fmb file somehow became corrupted, and the compiled fmx would no longer open or run. He posted that finding the semicolon - semicolon Replace All procedure had fixed the problem.
    I posted a reply that acknowledged his post and warned anyone else reading and trying the procedure to be careful, that any "referenced" program units copied from another source would lose its reference link to the source. (Fortunately, most people do not use the referenced feature.)
    Now today, I see those two posts have been deleted, and the thread is locked.
    I would like to point out that the "semicolon - semicolon replace-all" process STILL works even on the latest version of the Forms Builder. Forms Builder has always stuffed compiled code into fmb files, and it can cause trouble when trying to run the fmx against a new database. (It was a less-than-optimum idea back in the beginning of the client/server Forms development cycle, but has never been fixed.) The replace-all / save process removes the old compiled code so the fmb is significantly smaller and clean, and a new compile will generate new and clean code.
    I realize the thread is over five years old, but deleting new posts and locking the thread removes valuable information that just might help someone even today. I hope whoever locked the thread and deleted the posts will reconsider their actions. This forum is a valuable resource for Forms developers around the world, and even information in very old threads can be useful.

    altenbach wrote:
    Maybe the act of marking a solution should lock the thread 15 minutes later automatically.
    That would work for most of the cases.  But then there are those who for whatever reason don't mark solutions.  Maybe allow some of us to mark solutions for people in that board?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Where to find old thread/post and closed the thread

    where to find old thread/post and closed the thread
    i try to search by email id, by userid but no results display at all only new post are shown

    Hi,
    where to find old thread/post and closed the thread
    i try to search by email id, by userid but no results display at all only new post are shownMake sure that u have specified the Correct date range parameter as required.
    Regards,
    X A H E E R

  • I have a problem in this that i want to paas a form in a case that when user pres n then it must go to a form but error arises and not working good and threading is not responding

    made in cosmos help please need it
    using System;
    using Cosmos.Compiler.Builder;
    using System.Threading;
    using System.Windows.Forms;
    namespace IUOS
        class Program
            #region Cosmos Builder logic
            // Most users wont touch this. This will call the Cosmos Build tool
            [STAThread]
            static void Main(string[] args)
                BuildUI.Run();
            #endregion
            // Main entry point of the kernel
            public static void Init()
                var xBoot = new Cosmos.Sys.Boot();
                xBoot.Execute();
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                a:
                Console.WriteLine("------------------------------");
                Console.WriteLine("WELCOME TO THE NEWLY OS MADE BY THE STUDENTS OF IQRA UNIVERSITY!");
                Console.WriteLine("------------------------------");
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("\t _____                                
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |___________");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|_____|        |____________|         |____________|      ____________");
                string input;
                Console.WriteLine();
                Console.Write("\nAbout OS     : a");
                Console.Write("\nTo Shutdown  : s");
                Console.Write("\nTo Reboot    : r");
                Console.Write("\nStart Windows Normaly : n");
                Console.WriteLine();
                input = Console.ReadLine();
                if (input == "s" || input == "S"){
                    Cosmos.Sys.Deboot.ShutDown();
                else
                if (input == "r" || input == "R"){
                    Cosmos.Sys.Deboot.Reboot();
                else
                if (input == "a" || input == "A"){
                    Console.ForegroundColor = ConsoleColor.DarkBlue;
                    Console.Clear();
                    Console.WriteLine("\n\n\n-------------------------------------");
                    Console.WriteLine("version: DISPLAYS OS VERSION");
                    Console.WriteLine("about: DISPLAYS INFO ABOUT ANGRY OS");
                    Console.WriteLine("hello or hi: DISPLAYS A HELLO WORLD");
                    Console.WriteLine("MESSAGE THAT WAS USED TO TEST THIS OS!!");
                    Console.WriteLine("-----------------------------------");
                    Console.Write("You Want to know : ");
                    input = Console.ReadLine();
                    if (input == "version"){
                        Console.WriteLine("--------------------");
                        Console.WriteLine("OS VERSION 0.1");
                        Console.WriteLine("--------------------");
                    else
                    if (input == "about"){
                        Console.WriteLine("--------------------------------------------");
                        Console.WriteLine("OS IS DEVELOPED BY Qazi Jalil-ur-Rahman & Syed Akber Abbas Jafri");
                        Console.WriteLine("--------------------------------------------");
                    Console.Write("Want to go back to the main window");
                    Console.Write("\nYes : ");
                    string ans = Console.ReadLine();
                    if (ans == "y" || ans == "Y")
                        goto a;
                        Thread.Sleep(10000);
                    else
                    if (input == "n" || input == "N")
                        Thread.Sleep(5000);
                        Console.Clear();
                        for (int i = 0; i <= 0; i++){
                            Console.Write("\n\n\n\n\t\t\t\t\t  ____        ____   ___  
                            Console.Write("\n\t\t|\t\t |  |      |    |     
    |   |  | |  |  |");
                            Console.Write("\n\t\t|\t|    |  |----  |    |     
    |   |  | |  |  |---");
                            Console.Write("\n\t\t|____|____|  |____  |___ |____  |___|  |    |  |___");
                            Thread.Sleep(500);
                        Thread.Sleep(5000);
                        Console.Clear();
                        BootUserInterface();
                        Console.ReadLine();
    //                    Form1 fo = new Form1();
                    else{
                        for (int i = 0; i <= 5; i++){
                            Console.Beep();
                            Thread.Sleep(1000);
                            goto a;
                while (true);
            private static void BootUserInterface() {
                Thread t = new Thread(UserInterfaceThread);
                t.IsBackground = true;
                t.SetApartmentState(ApartmentState.STA);
                t.Start();
            private static void UserInterfaceThread(object arg) {
                Form1 frm = new Form1();  // use your own
                Application.Run(frm);
     

    Hi
    Jalil Cracker,
    >>when user pres n then it must go to a form but error arises and not working good and threading is not respondin
    Could you post the error information? And which line caused this error?
    If you want to show Form1, you can use form.show() method
    Form1 frm = new Form1();
    frm.Show();
    In addition, Cosmos is an acronym for C# Open Source Managed Operating System. This is not Microsoft product.If the issue is related to Cosmos, it would be out of our support. Thanks for your understanding. And you need raise an issue at Cosmos site.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Documents and threads to start with Crystal reports with BI

    Hi,
    I am a BI consultant and searching for documents and threads to gain knowledge on Crystal reports .Could any one pls send me the pointers for the same...
    Kindly do the needful
    Points are assured.
    Thanks
    James

    You are in the right place for Crystal Reports and you may also want to look in the BI Forums.
    A good place to start is the Help file for Crystal Reports Designer and download our sample reports. They don't use B1 as the data source but it will help to see how to use CR.
    You need to specify specific questions and "how to's". Books have been written on how to use Crystal reports which is beyond the scope of this forum on one post.
    Thank you
    Don

  • REST API POST and GET Error--Retriving following sites news feed

    i have used below code to retrive the newsfeeds but im getting 403 error.i think url formation for POST and GET is wrong.Kindly anyone worked help mee. 
    var feedManagerEndpoint;
    // Get the SPAppWebUrl parameter from the query string and build
    // the feed manager endpoint.
    $(document).ready(function () {
    var appweburl;
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1) {
    var param = params[i].split("=");
    if (param[0] === "SPAppWebUrl") appweburl = param[1];
    alert(appweburl);
    feedManagerEndpoint = decodeURIComponent(appweburl)+ "/_api/social.feed";
    alert(feedManagerEndpoint);
    postToMyFeed();
    // Publish a post to the current user's feed by using the
    // "<app web URL>/_api/social.feed/my/Feed/Post" endpoint.
    function postToMyFeed() {
    alert('pOST');
    $.ajax( {
    url: feedManagerEndpoint+"/my/Feed/Post",
    type: "POST",
    data: JSON.stringify( {
    'restCreationData':{
    '__metadata':{
    'type':'SP.Social.SocialRestPostCreationData'
    'ID':null,
    'creationData':{
    '__metadata':{
    'type':'SP.Social.SocialPostCreationData'
    'ContentText':'This post was published using REST.',
    'UpdateStatusText':false
    headers: {
    "accept": "application/json;odata=verbose",
    "content-type":"application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: getMyFeed,
    error: function (xhr, ajaxOptions, thrownError) {
    alert("POST error:\n" + xhr.status + "\n" + thrownError);
    // Get the current user's feed by using the
    // "<app web URL>/_api/social.feed/my/Feed" endpoint.
    function getMyFeed() {
    alert('get');
    $.ajax( {
    url: feedManagerEndpoint +"/my/Feed",
    headers: {
    "accept": "application/json;odata=verbose"
    success: feedRetrieved,
    error: function (xhr, ajaxOptions, thrownError) {
    alert("GET error:\n" + xhr.status + "\n" + thrownError);
    // Parse the JSON data and iterate through the feed.
    function feedRetrieved(data) {
    var stringData = JSON.stringify(data);
    var jsonObject = JSON.parse(stringData);
    alert(jsonObject);
    var feed = jsonObject.d.SocialFeed.Threads;
    alert(feed.results);
    var threads = feed.results;
    var feedContent = "";
    for (var i = 0; i < threads.length; i++) {
    var thread = threads[i];
    var participants = thread.Actors;
    var owner = participants.results[thread.OwnerIndex].Name;
    feedContent += '<p>' + owner +
    ' said "' + thread.RootPost.Text + '"</p>';
    $("#message").html(feedContent);

    Hi Scott,
    With EnableQueryRules and ProcessBestBets set to true in the search rest api, we can get the promoted results(best bets) in SharePoint 2013.
    I recommend to type the search rest api URL in the browser directly and then check if the best bets are displayed at the top of the search results.
    It will not displayed inside the table for normal results.
    Please also make sure that the query text matches the query rule condition.
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Parallel function call and thread issue

    Sorry to post one issue here which is related to code. i was debugging a code which was wrote long time back by one developer. the issue is two function is called parallel using thread and one function set a variable true at end and another function just
    looping until the variable is set to true. the variable value is not getting set to true. here i am posting a code snippet and just tell me what is mistake in the code for which variable is not getting set to true by first function.
    when user click button then two function is invoked
    private void UPDATE_Click(object sender, System.EventArgs e)
    SavedFirst();
    AddCheckThread();
    public void SavedFirst()
    IsOpen = true;
    System.Threading.Thread loadT = new System.Threading.Thread(new System.Threading.ThreadStart(SaveAll));
    loadT.Start();
    IsOpen = false;
    private void AddCheckThread()
    if (!ALLFlag)
    loadingThread = new System.Threading.Thread(new System.Threading.ThreadStart(addCheck));
    loadingThread.Priority = System.Threading.ThreadPriority.Lowest;
    loadingThread.Start();
    private void SaveAll()
    if (this.InvokeRequired)
    this.Invoke(new MethodInvoker(delegate
    ALLFlag = false;
    if (!ALLFlag)
    loadingThread = new System.Threading.Thread(new System.Threading.ThreadStart(AddProducts));
    loadingThread.Priority = System.Threading.ThreadPriority.Lowest;
    loadingThread.Start();
    return;
    private void AddProducts()
    if (this.InvokeRequired)
    this.Invoke(new MethodInvoker(delegate
    ALLFlag = false;
    if (System.Windows.Forms.MessageBox.Show(this, "Would you like to add the details into the Database?", "Add?", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
    if (comboOUR.SelectedItem == null || comboCountry.SelectedItem == null || comboSelleble.SelectedItem == null || txtOereff.Text == "" || txtUKPrice.Text == "" || txtUSPrice.Text == "" || txtSUrCharge.Text == "" || txtOURUS.Text == "" || txtOURUK.Text == "")
    FormValidation();
    else
    Gather_Data();
    bool isInserted = false;
    if (System.Windows.Forms.MessageBox.Show(this, "Would you like to add the details into \"Detailed-Product\" Too?", "Add?", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
    isInserted = bbaProduct.BBASaveProduct();
    if (isInserted == true)
    isInserted = false;
    isInserted = bbaProduct.InsertInProductTable(BBAProduct.DetailProductID);
    if (isInserted == true)
    System.Windows.Forms.MessageBox.Show(this, "Product Successfully Added ", "Add");
    else
    System.Windows.Forms.MessageBox.Show(this, "Error Occurred !! Not Added Into the Database ", "Add");
    else
    System.Windows.Forms.MessageBox.Show(this, "Error Occurred !! Not Added Into the Database ", "Add");
    else
    isInserted = bbaProduct.InsertInProductTable(0);
    if (isInserted == true)
    System.Windows.Forms.MessageBox.Show(this, "Successfully Inserted Into the database", "Add");
    else
    System.Windows.Forms.MessageBox.Show(this, "Error Occurred !! Not Added Into the Database", "Add");
    else
    System.Windows.Forms.MessageBox.Show(this, "Process Cancelled By The User", "Add");
    ALLFlag = true;
    return;
    #region Add Check
    private void addCheck()
    if (this.InvokeRequired)
    this.Invoke(new MethodInvoker(delegate
    this.Opacity = 0.8;
    axShockwaveFlash1.Visible = true;
    axShockwaveFlash1.Play();
    while (!ALLFlag)
    int x = 0;
    axShockwaveFlash1.Visible = false;
    axShockwaveFlash1.Visible = false;
    axShockwaveFlash1.StopPlay();
    this.Opacity = 1;
    ALLFlag = false;
    loadingThread.Abort();
    return;
    help me to locate where is the mistake for which ALLFlag value is not getting set to true. thanks

    Your reliance on a field value across threads isn't going to work reliably.  In a multi-core/multi-threaded world the memory model allows for reading data out of order for optimization reasons.  Additionally the CPU can and will cache recently
    used data in memory that isn't shared across processors.  This can get you into trouble as you will not be reading the same value across processors.
    The only correct way to ensure that multiple threads access the same data correctly is to use sync objects that are designed for that such as a Semaphore or Mutex.  Sync objects allow you to safely share data across threads.
    Overall your code appears to be trying to update the UI using a thread but since it is calling Invoke each time you are basically spawning a thread that then blocks waiting for the UI thread.  You could pretty much eliminate your issues by getting rid
    of the threading calls altogether along with any sort of state management variables that were arbitrarily created (ALLflags) and simply use BeginInvoke.  You didn't post who was calling your higher level save methods but if it is a UI element then BeginInvoke
    and InvokeRequired are completely redundant as is all the threading.
    You can cleanly update this code to eliminate all the extra variables and threading and simply use the newer async/await functionality to help resolve the issues your code is having.  But you still have problems with the invoked code.  In one of
    the methods you are looping while waiting for a variable to be set.  But since you invoked it then it is occurring on the UI thread.  Because it is on the UI thread and that can only do 1 thing at a time, if ALLflag is false your code will deadlock. 
    The only other code that would set it to true cannot run because it is also invoked on the UI thread and only one of them can run at any one time.  Basically each of your threads are going to try to run on the same thread and only 1 of them will be able
    to.  Until the first thread method finishes the second one will never run.
    If you need Boolean flags then consider using a ManualResetEvent instead.  It is thread safe, works across threads and doesn't have any of the problems of a Boolean field when talking about threading. But you still have a deadlock between your invoked
    code that nothing will solve except rewriting your code.
    Michael Taylor
    http://blogs.msmvps.com/p3net

  • Message before posting new thread

    How about displaying a message before posting new threads in abap devlopment forums which tells the members to use search button before posting new threads.
    I think this may improve the quality of forums to an extent.
    Plz give ur comment on this.

    I think most people who answer simple questions do so because they are genuinely trying to help and are perhaps not familiar with the type of user IDs who ask such questions.
    But they should heed the warnings (in most cases they realize this themselves before a warning is required). I also know a numer of people who stop visiting SDN when they realize this, and that is a big pity.
    Users who carry on and on and on without heeding the warnings are deleted as well. This has happened already and there are two more in the pipeline. But Guestification is a last resort and not a perfect one either. It is only really effective when points are the reason for the misuse.
    I am sure that without a points system in its current form we would have less noise, but we would only eliminate the childish points gamers.
    What I think we need to work on is further improving the reputation of the SDN forums for quality content.
    Eg. when someone posts something which is incorrect or questionable, then question it (politely as possible / appropriate).
    That way people who answer will realize that their accounts have a track record for questionable quality, and will think twice before posting some bla-bla-bla or not reading the question carefully => if the question is "What is reports and tables" then when thinking twice, they wont answer at all....
    Cheers,
    Julius
    PS: I will start drafting a sticky thread for FAQs and memorable discussions, and then we can make a team effort of contributing to it and the mods can update it as appropriate.
    Edited by: Julius Bussche on Sep 27, 2008 10:20 PM

  • Help BAPI_MATERIAL_SAVE_DATA and customer fields

    Hello all,
    I have a problem updating a customer defined field for mara using the BAPI_MATERIAL_SAVE_DATA. out extension of mara has fields that go over 240 chars in EXTENSIONIN-VALUEPART1. In fact the total length of the customer fields is 258. I put the 18 chars in VALUEPART2. However, the value for the 2 fields that I place in VALUEPART2 is not posted to mara. I checked that the 2 fields are concatenated in the final AMARA_UEB table passed to FM MATERIAL_MAINTAIN_DARK.
    Has anyone had the same problem? I am in a 4.6 environment.
    Thanks,

    check this thread
    Urgent Help required please! BAPI_MATERIAL_SAVEDATA Extension
    check the notes mentioned in my post, and you need to add some entries to the table T130F
    Edited by: Vijay Babu Dudla on Oct 3, 2008 11:57 PM

  • Where should one ask for help with a thread   ???

    Having posted a link to this thread because the op needed someone to check a site in Panther.... and because not so long ago I read here that this was the place to ask for such help.....
    I now find the my request has been removed... musta offended the tou of course.
    Sooo - how should a person try to get help with a thread in future? - we ain't all l4's and have a lounge to play in.

    Interesting question. This forum was available for this type of request at certain points in Discussions' history, and it has often been recommended that users post issues like yours here.
    Technically, as per the red print at the top of this forum, it is inappropriate to use this forum for that purpose. In the case you cite, I'd recommend putting a new topic in to the Safari forum with a specific request for the help that is required in the Subject line. If you do it that way, you will most likely reach more users who will be able to help you.
    Good luck.

  • Failure to Post new Thread

    Hi,
    I tried to post a new thread, but I get an error u201EMethod not implementedu201C, I have asked a colleguea
    of mine, to post the thread, but he was not able to do this either.
    I was trying to post to
    http://forums.sdn.sap.com/post!default.jspa?forumID=134
    Can anyone give me a advice, how to contact the SDN help team? Best would be a phone number or
    a name.
    I have tried the mail adresse, but after a first reply the whole thing ended in the nirvana.
    I tried to contact them a couple of weeks ago, the same issue, but I did not press this matter to strongly,
    since I am rarely using SDN.
    With kind regards
    Uwe Gebhardt
    Edited by: Uwe Gebhardt on Nov 8, 2011 1:51 PM
    Edited by: Uwe Gebhardt on Nov 8, 2011 1:57 PM

    Since this is your second post with the same subject and no one has posted a suggestion or answer, my suggestion is to have your nearest Genius Bar check out the problem. The diagnosis and troubleshooting are a free service.
    FWIW, typing ALL CAPS is considered shouting on the internet; it is also difficult to read, so please do not use all caps in your subject lines.

  • Form posting and feedback

    Once I create a form how do I post it on my website and how do I receive e-mail answers of form posted to me on my website? I own www.sportsdds.com and am trying to activate my Contact Form. I use Adobe Dreamweaver CS6. Please e-mail me to [email protected]

    Randy, I am sorry but your reply was absolutely useless to me. I do not understand a word you said. Your reply is very high-brow and I am a new user to Adobe Dreamweaver CS6. You reply needs to be more graphic and less wordy. It is certainly no "cook book." And it comes across unintelligible to the general public. I have no idea what you are talking about. You give no examples nor do you try to teach. Sorry. Perhaps another staff member can help if you are unable to.
    Dr Michael D Kurtz
    Date: Fri, 21 Feb 2014 10:45:58 -0800
    From: [email protected]
    To: [email protected]
    Subject: Form posting and feedback
        Re: Form posting and feedback
        created by Brian Havlin in FormsCentral - View the full discussion
    Hi,
    Please refer to the following document for instructions on how to embed a form in a page on your website.
    http://forums.adobe.com/docs/DOC-1991
    To receive an email when a new response is submitted, you can use the Email Notifications feature.
    Regards,
    Brian
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6144203#6144203
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6144203#6144203
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6144203#6144203. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in FormsCentral at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Need to understand the relation between ManualResetEvent and thread

    please help me to understand the below code
    what is resetEvent.Set() and WaitOne() ? what it does ?
    var resetEvent = new ManualResetEvent(false);
    ThreadPool.QueueUserWorkItem(
    arg =>
    DoWork();
    resetEvent.Set();
    resetEvent.WaitOne();
    again help me to understand the below code
    var events = new List<ManualResetEvent>();
    foreach(var job in jobs)
    var resetEvent = new ManualResetEvent(false);
    ThreadPool.QueueUserWorkItem(
    arg =>
    DoWork(job);
    resetEvent.Set();
    events.Add(resetEvent);
    WaitHandle.WaitAll(events.ToArray());
    why this line WaitHandle.WaitAll(events.ToArray()); is required ?
    why adding ManualResetEvent instance to list ?
    looking for discussion. thanks

    WaitOne() will cause the current (main) thread to wait until the thread pool thread has called the Set() method. If you don't call the WaitOne() method, the code line below ThreadPool.QueueUserWorkItem(...) will get executed before the delegate that you
    pass do the ThreadPool.QueueUserWorkItem method has actually finished its execution because the threads are being executed simultaneously:
    var resetEvent = new ManualResetEvent(false);
    ThreadPool.QueueUserWorkItem(
    arg =>
    //this will be executed simultaneously on thread B
    Thread.Sleep(10000);
    //tell thread A to continue
    resetEvent.Set();
    //thread A waits here until thread B calls the Set() method...
    resetEvent.WaitOne();
    string s = "abc"; //this line won't get executed until thread B has called the Set() method provided that the WaitOne() method is called by thread A above.
    >>why this line WaitHandle.WaitAll(events.ToArray()); is required ?
    It causes the main thread to wait until the Set method of all ManualResetEvent objects in the events list has been called. Othwerwise the execution of the main thread would continue immediately after the foreach loop has been executed. By this time the DoWork
    method of all jobs has not yet been completed because they are being executed on another thread.
    WaitHandle.WaitAll(events.ToArray());
    string s = "abc"; //this line won't get executed until all the Set() method of all ManualResetEvent objects in events has been called
    >>why adding ManualResetEvent instance to list ?
    Because you (appearantly) want to wait for all objects in the list, i.e. you want to wait for the DoWork method to complete for all jobs before you continue the execution of the main thread (and go on to assign the string s to the value "abc"
    in the above example).
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Example of WAIT and CONTINUE using checkBox and thread and getTreeLock()

    I had so much trouble with this that I descided to
    post if incase it helps someone else
    // Swing Applet example of WAIT and CONTINUE using checkBox and thread and getTreeLock()
    // Runs form dos window
    // When START button is pressed program increments x and displys it as a JLabel
    // When checkBox WAIT is ticked program waits.
    // When checkBox WAIT is unticked program continues.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    public class Wc extends JApplet {
    Display canvas;//drawing surface is displayed.
    Box buttonPanel;
    Box msgArea;
    public static JButton button[] = new JButton [2];
    public static JCheckBox checkBox[] = new JCheckBox[2];
    public static JLabel msg[] = new JLabel [2];
    String[] buttonDesc ={"Start","Quit"};
    public static final int buttonStart = 0;
    public static final int buttonQuit = 1;
    String[] checkBoxDesc ={"Wait"};     
    public static final int checkBoxWait = 0;
    public boolean wait;
    public Graphics g;
    //================================================================
    public static void main(String[] args){
    Frame f = new Frame();
    JApplet a = new Wc();
    f.add(a, "Center"); // Add applet to window
    a.init(); // Initialize the applet
    f.setSize(300,100); // Set the size of the window
    f.show(); // Make the window visible
    f.addWindowListener(
    new WindowAdapter(){
    public void windowClosing(WindowEvent e){System.exit(0);}
    }// end main
    //===================================================
    public void init() {
    canvas = new Display();
    setBackground(Color.black);
    getContentPane().setLayout(new BorderLayout(3,3));
    getContentPane().add(canvas, BorderLayout.CENTER);
    buttonPanel = Box.createHorizontalBox();
    getContentPane().add(buttonPanel, BorderLayout.NORTH);
    int sbZ;
    // add button
    button[0] = new JButton(buttonDesc[0]);
    button[0].addActionListener(canvas);
    buttonPanel.add(button[0]);
    button[1] = new JButton(buttonDesc[1]);
    button[1].addActionListener(canvas);
    buttonPanel.add(button[1]);
    // add checkBox
    sbZ=0;
    checkBox[sbZ]=new JCheckBox(checkBoxDesc[sbZ]);
    checkBox[sbZ].setBackground(Color.white);
    checkBox[sbZ].setOpaque(true);
    checkBox[sbZ].addActionListener(canvas);
    buttonPanel.add(checkBox[sbZ]);
    msgArea = Box.createVerticalBox(); // add message
    sbZ=0;
    msg[sbZ]=new JLabel("1",JLabel.LEFT);
    msg[sbZ].setOpaque(true);
    msg[sbZ].setBackground(Color.black);
    msg[sbZ].setForeground(Color.red);
    msgArea.add(msg[sbZ]);
    getContentPane().add(msgArea, BorderLayout.SOUTH);
    } // end init();
    //===================================================
    public void stop(){canvas.stopRunning();}
    //===================================================
    // The following nested class represents the drawing surface
    // of the applet and also does all the work.
    class Display extends JPanel implements ActionListener, Runnable {
    Image OSI;
    Graphics OSG; // A graphics context for drawing on OSI.
    Thread runner; // A thread to do the computation.
    boolean running; // Set to true when the thread is running.
    public void paintComponent(Graphics g) {
    if (OSI == null) {
    g.setColor(Color.black);
    g.fillRect(0,0,getWidth(),getHeight());
    else {g.drawImage(OSI,0,0,null);}
    }//paintComponent
    public void actionPerformed(ActionEvent evt) {
    String command = evt.getActionCommand();
    if (command.equals(buttonDesc[buttonStart])) {
    startRunning();
    if (command.equals(buttonDesc[buttonQuit])) {
    stopRunning();
    if (command.equals(checkBoxDesc[checkBoxWait])){
    System.out.println("cb");
    if (checkBox[checkBoxWait].isSelected() ) {
    wait = true;
    System.out.println("cb selected twait "+wait);
    return;
    wait = false;
    synchronized(getTreeLock()) {getTreeLock().notifyAll();}
    System.out.println("cb selected fwait "+wait);
    } // end command.equal cb wait
    } //end action performed
    // A method that starts the thread unless it is already running.
    void startRunning() {
    if (running)return;
    // Create a thread that will execute run() in this Display class.
    runner = new Thread(this);
    running = true;
    runner.start();
    } //end startRunning
    void stopRunning() {running = false;System.exit(0);}
    public void run() {
    button[buttonStart].setEnabled(false);
    int x;
    x=1;
    while(x>0 && running){
    x = x + 1;
    msg[0].setText(""+x);
    try{SwingUtilities.invokeAndWait(painter);}catch(Exception e){}
    //importand dont put this in actionPerformed
    if (wait) {
    System.out.println("run "+wait);
    synchronized(getTreeLock()) {
    while(wait) {
    System.out.println("while "+wait);
    try {getTreeLock().wait();} catch(Exception e){break;}
    } //end while(wait)
    } // end sync
    } // end if(wait)
    } // endwhile(x>0)
    stopRunning();
    } // end run()
    Runnable painter = new Runnable() {
    public void run() {
    Dimension dim = msg[0].getSize();
    msg[0].paintImmediately(0,0,dim.width,dim.height);
    Thread.yield();
    }//end run in painter
    } ; //end painter
    } //end nested class Display
    } //end class Wc

    I just encountered a similar issue.  I bought a new iPhone5s and sent my iPhone4s for recycling as it was in great shape, no scratches, no breaks, perfect condition.  I expected $200 and received an email that I would only receive $24.12.  The explanation was as follows:  Phone does not power on - Power Supply Error.   Attempts to discuss don't seem to get past a customer service rep that can only "escalate" my concern.  They said I would receive a response, but by email.  After 4 days no response.  There is something seriously wrong with the technical ability of those in the recycling center.

  • Question about EJB and thread safe coding - asking again!

    sorry everyone, no one seems to be interested in helping me on this, so i post it again.
    i have a question about the EJB and thread safe coding. when we build EJBs, do we need to worry about thread safe issue? i know that EJBs are single threaded, and the container manages the thread for us. maybe i am wrong about this. if i wasnot, how can we program the EJB so that two or more instance of EJB are not going to have deadlock problem when accessing data resources. do we need to put syncronization in ours beans, do we even need to worry about creating a thread safe EJB? thanks in advance. the question really bothers me a lot lately.

    sorry everyone, no one seems to be interested in
    helping me on this, so i post it again.Excellent plan. Why not search a little bit on your own instead of waiting for your personal forum slaves to answer your call. See below.
    i have a question about the EJB and thread safe
    coding. when we build EJBs, do we need to worry about
    thread safe issue? Read this: http://forum.java.sun.com/thread.jsp?forum=13&thread=562598&tstart=75&trange=15
    i know that EJBs are single
    threaded, and the container manages the thread for us.
    maybe i am wrong about this. if i wasnot, how can we
    program the EJB so that two or more instance of EJB
    are not going to have deadlock problem when accessing
    data resources. do we need to put syncronization in
    ours beans, do we even need to worry about creating a
    thread safe EJB? thanks in advance. the question
    really bothers me a lot lately.
    Java's Thread Tutorial
    JavaWorld: Introduction to Java threads
    IBM: Introduction to Java threads
    Google: java+threads+tutorial

Maybe you are looking for

  • How to schedule job?

    Hello All, i have a few questions about jobs (scheduling jobs) I want to run one procedure at 7:00 A.M and I want to stop this procedure at 12:30 PM on Daily basis.Is it possible with DBMS_JOB? I don't know how to stop running job at specified time.

  • Recovery from backup fails... what to do?

    My iPhone 3gs has been getting slower and slower over some time now. Sometimes it could take up to one minuet to lock the phone after pressing the button. Also my photos was unavailable from the iPhone, every time I tried to access the photos or an a

  • Problem with printing in SMARTFORM

    Hello, I have a problem with a printout. I wrote form in SMARTFORM. There is a HP LJ2420 printer in our local network. This printer is my local printer (LP1) and it is defined in SAP (for example S005). When I print this form on LP1 printout is ok. I

  • Hide scroll bar from the web window

    We have our application working on Oracle forms 10g hosted on unix application server. We have a requirement to hide the vertical scroll bar which appears on the web page(not on the form) Is there a server config setting which can be done to hide the

  • How to speep up opening html page in JEditorPane

    When i call jeditorPane.setPage( URL u ) it takes about 20 seconds to show page in my JEditoPane. Could you write how to speed up loading html page. My page has 30 page. Thanks!