Cancel 'a private profile.

I did my folders private when I added a password on my profile.  However, I have other users who need to see the documents in My Documents.  Is there a way to "undo" the private setting without moving my file in the folder to share Documents.

Here you go

http://www.Google.co.UK/search?q=undo+%22Make+profile+private&RLS=com.Microsoft: en - gb:IE - SearchBox & ie = UTF-8 & oe = UTF-8 & sourceid = ie7 & rlz = 1I7GGLT_en & redir_esc = & ei = oh8uTfCYH9T24QbSl_ChCw

Tags: Windows

Similar Questions

  • Windows Firewall: what does it mean 'private profile '?

    I guess that 'Private profile' refers to an IP address that does not perform routing to the Internet, but then, why is not called 'local' or 'LAN '? And why is it called a "profile"? I'm not trying to be semantically *-retentive or being here. In fact, I'm confused by the terminology.

    'Private profile' kindly explain in terms I can understand as: addressing IP or WAN c. privilege user, VPN, LAN, etc. (in particular, belongs to a 'private' VPN?)

    Thank you.

    PS: just so you know, I'm a geek:

    • Private? = ? IP4_localhost | IP4_A-LAN | IP4_B-LAN | IP4_C-LAN
    • Public? = ? IP4_A-WAN | IP4_B-WAN | IP4_C-WAN

    where:

    • IP4_localhost = 127.X.X.X/8
    • IP4_A-LAN = 10.X.X.X/8
    • IP4_B-LAN = 172. [16-31]. X.X/12
    • IP4_C-LAN = 192.168.X.X/16
    • IP4_A-WAN = [1-9]. X.X.X/8 | [11-99]. X.X.X/8 | 100 (0-63). X.X/8 | 100. [128-255]. X.X/8 | [101-126]. X.X.X/8
    • IP4_B-WAN IS [128-168]. X.X.X/12 | 169. [0-253]. X.X/12 | 169.255.X.X/12 | [170-171]. X.X.X/12 | 172. [0-15]. X.X/12 | 172 [32-255]. X.X/12 | [173-191]. X.X.X/12
    • IP4_C-WAN = 192.0.1.0/16 | 192,0. [3-255]. X / 16 | 192. [1-87]. X.X/16 | 192,88. [0-98]. X / 16 | 192,88. [100-255]. X / 16 | 192. [89-167]. X.X/16 | 192 [169-255]. X.X/16 | [193-197]. X.X.X/16 | 198. [0-17]. X.X/16 | 198. [20-50]. X.X/16 | 198,51. [0-99]. X / 16 | 198,51. [101-255]. X / 16 | [199-202]. X.X.X/16 | 203,0. [0-112]. X / 16 | 203,0. [114-255]. X / 16 | [204-223]. X.X.X/16

    Hello Mark,

    Please keep us updated on the status of the issue. I appreciate your efforts to resolve the issue.

    We can also refer to this Microsoft article and check if it helps.

    Windows Firewall with advanced security

    Please do not hesitate to answer, in the case where you are facing in the future other problems with Windows.

    Thank you

  • Private Windows Firewall profile is active

    Firewall Windows with advanced security for computers have them three columns:

    Domain profile. Profile private, public profile, given that the private profile said private profile is active, I was not able to 1) updated windows; (2) the computer has a very slow speed, perceptible and could work well typing or entering; (3) my google email account is interrupted two or three times within 30 minutes.

    All the suggestions and I would be happy.

    Hi Amanda,

     

    The problem you are experiencing has nothing to do with the Windows Firewall private profile; However, we must solve based on your question.

    I would be grateful if you could answer the following questions:

    1. what exactly happens when you try to run Windows Update?

    2. which antivirus app do you use?

    3. What is the exact full error message that you receive?

    4. have you made any recent hardware or exchange of software on your computer before the show?

    I suggest to follow the steps below and we update on the State of the question.

    Method 1:

     

    Follow the steps in the link below.

     

    The problems with the installation of the updates:

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updates

     

    Method 2:

    Follow the steps in the link below.

     

    Error message 'Windows Update cannot Check For Updates' when you try to install the updates:

    http://support.Microsoft.com/kb/2730071

     

    Method 3:

    Automatically troubleshoot and fix problems of Windows performance. Enhance, optimize and speed up Windows computers and make slow PC faster by running Microsoft Fix It.

     

    Fix Windows system on slow Windows performance issues:

    http://support.Microsoft.com/mats/slow_windows_performance/en

     

    Method 4:

     

    Follow the steps in the link below.

     

    Optimize Windows Vista for better performance:

    http://Windows.Microsoft.com/en-us/Windows-Vista/optimize-Windows-Vista-for-better-performance

    Important: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data may be lost

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

     

    For all windows questions do not hesitate to contact us and we will be happy to help you.

     

  • In fact, I'm looking for how to disable the discovery network for all profiles (Public, private, domain).

    * Original title: GPO registry key or change

    Hello

    In fact, I'm looking how to disable the network for all profiles (Public, private, domain) discovery and how to disable the file/printer sharing just to the private profile and public with a GPO or a script.

    I ' found some GPO as disable inbound/outbound rules for sharing files/printers and discovery of the network, but I think that a better and more easy solution exists.

    Please can you help me. :)

    Best regards.

    Hello

    According to the description, I understand that you want to disable the discovery network for profiles.

    I suggest refer you to the Microsoft Help Article below and check if that helps.

    https://blogs.technet.Microsoft.com/Networking/2010/12/06/disabling-network-discoverynetwork-resources/

    Registry warning

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • Execution of multiple user profiles does not not in Firefox 32.0.3

    Hello.

    I have several profiles user for work and private use. Today I decided to use Firefox for private use again (currently using Chrome for private use). Because on Chrome, the video is "pixelated" when video quality is superior to 720 p. Also for purposes of stability, if Firefox crashes, which happens frequently, I keep everything.

    In any case, I use the Profile Manager for execution of multiple user profiles.

    The problem is when I try to open a private profile when you're already running a work profile, it opens a new window of work profile, not a private.

    I use this shortcut: "C:\Program Files (x 86) \Mozilla" P - by default - noremote
    The "default" profile is the work, I have a different shortcut, which is private:
    "C:\Program Files (x 86) \Mozilla ' private Pei - noremote

    Any help will be much appreciated. Thank you.

    Hello tgolisa, I think the right command line parameter is -no-remote...

  • How to make a paid membership / profile area?

    Hi all

    I am building a Web site in the Muse, and so far I have a site with an area of subscription pay to download content.

    For my new website, I want to make a site where everyone can watch what's on the site, but they get paid to do their own profile and edit them. I would like visitors to make an account in just a few steps away - pay with Paypal - and go and create their own profile page. They profile remains online for a month, and payment must be recurring if not cancelled. (NOTE: profile paid must be editable, with name, own introduction or an introductory video, which can be visible to non-paying visitors)

    -What is possible within the Muse?

    As far as I know, I can imagine the entire site, but the profile box needs paid to do with a specific HTML tag to insert it?

    Can someone tell me please on this?

    Thank you!

    As always: it depends entirely on the server. If you have no control over the server to manage users and, ideally, a dynamic such as Joomla content management system, you can not do.

    Mylenium

  • Cannot cancel the job

    I have the following comprehensive code. After pressing the Undo button, it must cancel the file download, but it doesn't. It continues to download the file. Do not cancel kill instance (thread) FirstLineService download takes place? What is that cancel when not to kill FirstLineService instance?
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    
    public class Thr extends Application {
    
         @Override
         public void start(Stage stage) throws Exception {
              // TODO Auto-generated method stub
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         }
         
         private void setS(Group rg) {
              VBox vbox = new VBox();
              javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
              final TextField tf = new TextField();
              javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              rg.getChildren().add(vbox);
              final FirstLineService serv = new FirstLineService();     
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        tf.setText("STARTED!");
                   }
              });
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        // TODO Auto-generated method stub
                        serv.cancel();
                        tf.setText("CANCELLED!");
                   }
              });
         }
         
         private class FirstLineService extends Service {
    
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n;
                               System.out.println("Let the download begin!");
                               while((n = bin.read())!=-1){
                                    bos.write(n);
                               }
                               bos.close();
                             } catch (MalformedURLException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             }
                          System.out.println("File successfully downloaded!");
                          return null;
                    }
                };
            }
        }
         
         public static void main(final String[] arguments)
         {
              Application.launch(arguments);
         }
    
    }

    Hello. I made 2 small changes:
    1. your loop is incorrect. I replaced

     while((n = bin.read())!=-1){    
    

    with

     while (n !=  -1) {
                                n = bin.read() ;  
    

    2. I added the following to your loop:

       if (isCancelled()) {
    
                   n = -1;  //set eof to true
                   System.out.println("Cancelling...");
                                }
    

    Here's the modified code:

                      protected Void call() {
                        int n = 0;
                        boolean cancelled = false;
                        URL url;
                        try {
                            url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                            InputStream in = url.openStream();
                            File f = new File("spring.zip");
                            BufferedInputStream bin = new BufferedInputStream(in, 1024);
                            FileOutputStream fos = new FileOutputStream(f);
                            BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
    
                            System.out.println("Let the download begin!");
                            while (n !=  -1) {
                                n = bin.read() ;
                            System.out.println(n);
                                if (isCancelled()) {
                                    cancelled = true;
                                    n = -1;  //set eof to true
                                    System.out.println("Cancelling...");
                                }
    
                                bos.write(n);
                            }
                            bos.close();
                        } catch (MalformedURLException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        } catch (FileNotFoundException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                        if (n == -1  && cancelled) {
                                System.out.println("Task cancelled!");
                            }
                        else {
                          System.out.println("File successfully downloaded!");
    
                        }
    
                        return null;
    
                    }
    
  • Automating discovery of the network in Windows 7

    Hello

    I use Windows 7 Ultimate. The problem is when I go to network it keep ask me ' network discovery and file sharing is disabled. " Click here to change. " 

    It is so annoying to always click on that and select Public or private profile.

    I put the SSDP Discovery service to start automatically, but it is not affected Network Discovery Service.

    It is in the firewall exceptions.

    How to set or configure the network discovery so it starts automatically when the PC starts every time?

    Also

    I want to stop computer remotely.

    When he does it disables the network discovery because of Security Issues (Sounds like IP-Sec or something totally unaware of it). I want to turn it off or want to add Exception since it is linked only in the private network.

    Add Exception or lower security on off the computer remotely?

    Hello Chetan,

    I'll be happy to help you with the problem you have with the computer. I understand the frustration when things do not work as it should.

    To provide the proper resolution, that I would need more information on your side.

    1. What is the brand and model of the computer?

    2. have you made changes on the computer recently?

    3. What is the security software installed on the computer?

    4. What is the error message you get when you try to activate the option of network discovery?

    5. have logged as administrator?

    Method 1:

    Make sure that the following services are enabled on the computer.

    (a) click Start, type ""services.msc ' in the search and click on services. " Verify that these services are enabled:

    -TCP/IP NetBIOS Helper service

    -DNS Client

    -Function Discovery Resource Publication

    -SSDP Discovery
    -UPnP device host

    To start the service and set it to automatic, follow these steps:

    (b) click on each of the services listed above and click Properties.

    (c) click on the general tab, and then, next to Startup type, select Automatic.

    (d) click applyand then click Start.

    Method 2:

    If the problem persists, I suggest you follow the steps in this article.

    Enable or disable network discovery:
    http://Windows.Microsoft.com/en-us/Windows7/enable-or-disable-network-discovery

    To stop the remote computer, please follow the steps below:

    1. open the command prompt.

    2 'Net view' type and a list of computers should appear.

    3choose a target computer and don't forget not the name of the computer

    4type "stop m \ComputerName" " " ".

    (Type the letter attributed to what you want to do (see Tips)

    ( ComputerName is probably where you should put the name of the computer.)

    5your target computer will now disable.

    Tips:

    • f = forces any running application to close (if they have saved his job or not)
    • r = restart the computer
    • s = a normal closed

    Hope this information is useful. Please post incase you have any other questions, I'll be happy to help you.

    Thank you.

  • I have another account on windows 7 I don't have no more, he will not be removed

    whenever I have delete the account, he returned on his own after rebooting how to remove?

    Hello

    connect with another administrator account > then go to control panel > accounts of users and security for the family > click on change the account type > if you have not set the account as private profile, then click on the name of the account, then click on delete files. If nothing happens, try to change the type of account is admin, make the standard user and then delete it.

    At latest

  • While on internet, set Windows Firewall to 'block all '.

    Original title: Firewall Windows 'block all '.

    With the help of windows Firewall in Win7.

    Is there a way to easily set the firewall to 'Block All' (comings and goings) activity while I'm connected to the internet.

    I'm used to the use of 3rd party firewall and some have the choice of check "block all activity" on a right click of the icon 'taskbar '.

    I will use if go to leave the PC while on the net for more then a few seconds.

    I ask because firewalls 3rd party having this option does not work well with windows7.

    I don't want a process such as the control panel / advanced settings/unnecessary procedures / make / do that / go away/come back / freeze the system.

    Then having to do it all again in reverse to be reconnected.

    A simple one click / two click process that works.

    Anyone?

    Hello

    Thank you to provide us with an opportunity to help Microsoft Community, we are happy to help you.

    A firewall can help prevent hackers or malicious software (such as worms) to access your computer through a network or the Internet. A firewall can also help stop your computer from malware sent to other computers.

    If you want to block all connections using the Windows Firewall, please follow the steps mentioned below.

    1. Open the start menu.
    2. In the search box, search for "Windows Firewall".
    3. In the search results, select "Firewall with Advanced Security Windows".
    4. In the 'Présentation' section, check to see which profile is active. By default, it should 'private profile '.
    5. Click on the link marked "Windows Firewall properties.
    6. Select the tab 'private profile '.
    7. Make sure that "Firewall State" is set to "on (recommended)."
    8. Under "Incoming connections" click the menu drop down and select "Block all connections."
    9. Under "Outbound connections" click the menu drop down and select "block".
    10. Next to "Protected network connections", click on the button "Customize".
    11. Make sure all of the checkboxes are marked, especially 'Connection to the Local network' and 'Wireless network connection' (as appropriate).
    12. Click on the OK"" button. Closing this dialog box, click on the 'OK' button on the next dialog box.

    For more information, please see the link below.

    Windows Firewall with Advanced Security Properties Page

    Hope that the information provided is useful. Keep us updated on the State of the question, so that we can help you further.

  • Overlap two images, ordinary java works, and not in BlackBerry JDE 5

    I have an application for swing of simple java that takes two images and overlaps the other. While trying to this port in JDE5, I got out there is no class BufferedImage in the api of BB, but a similar class of the Bitmap. It's brought to BB mixing function is unable to produce an image that overlap. It shows a blank white screen.

    Here's the plain java function

    public BufferedImage blend( BufferedImage bi1, BufferedImage bi2,            double weight )   {     if (bi1 == null)          throw new NullPointerException("bi1 is null");
    
          if (bi2 == null)          throw new NullPointerException("bi2 is null");
    
          int width = bi1.getWidth();       if (width != bi2.getWidth())          throw new IllegalArgumentException("widths not equal");
    
         int height = bi1.getHeight();     if (height != bi2.getHeight())
    
              throw new IllegalArgumentException("heights not equal");
    
            BufferedImage bi3 = new BufferedImage(width, height,              BufferedImage.TYPE_INT_RGB);      int[] rgbim1 = new int[width];        int[] rgbim2 = new int[width];        int[] rgbim3 = new int[width];
    
          for (int row = 0; row < height; row++)     {         bi1.getRGB(0, row, width, 1, rgbim1, 0, width);           bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
             for (int col = 0; col < width; col++)          {             int rgb1 = rgbim1[col];               int r1 = (rgb1 >> 16) & 255;                int g1 = (rgb1 >> 8) & 255;             int b1 = rgb1 & 255;
    
                    int rgb2 = rgbim2[col];               int r2 = (rgb2 >> 16) & 255;                int g2 = (rgb2 >> 8) & 255;             int b2 = rgb2 & 255;
    
                    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));               int g3 = (int) (g1 * weight + g2 * (1.0 - weight));               int b3 = (int) (b1 * weight + b2 * (1.0 - weight));               rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;            }
    
               bi3.setRGB(0, row, width, 1, rgbim3, 0, width);       }
    
           return bi3;   } 
    

    Here's the java function of BB

      public Bitmap blend( Bitmap bi1, Bitmap  bi2,                      double weight )        {
    
                  if (bi1 == null)                       throw new NullPointerException("bi1 is null");
    
                    if (bi2 == null)                       throw new NullPointerException("bi2 is null");
    
                    int width = bi1.getWidth();            if (width != bi2.getWidth())                   throw new IllegalArgumentException("widths not equal");
    
                   int height = bi1.getHeight();          if (height != bi2.getHeight())
    
                            throw new IllegalArgumentException("heights not equal");
    
             Bitmap bi3 = new Bitmap(width, height);         int[] rgbim1 = new int[width];         int[] rgbim2 = new int[width];         int[] rgbim3 = new int[width];
    
                    for (int row = 0; row < height; row++)         {
    
                           bi1.getARGB(rgbim1,0,width,0,row, width,1);                       bi2.getARGB(rgbim2,0,width,0,row, width,1); 
    
                           for (int col = 0; col < width; col++)                  {                              int rgb1 = rgbim1[col];                                int r1 = (rgb1 >> 16) & 255;                           int g1 = (rgb1 >> 8) & 255;                            int b1 = rgb1 & 255;
    
                              int rgb2 = rgbim2[col];                                int r2 = (rgb2 >> 16) & 255;                           int g2 = (rgb2 >> 8) & 255;                            int b2 = rgb2 & 255;
    
                              int r3 = (int) (r1 * weight + r2 * (1.0 - weight));                            int g3 = (int) (g1 * weight + g2 * (1.0 - weight));                            int b3 = (int) (b1 * weight + b2 * (1.0 - weight));                            rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;                     }
    
                         bi3.setARGB(rgbim3, 0, width, 0,  row,width, 1);
    
                    }
    
                 return bi3;    }
    

    The weight of the arg is a value from 1 to 100.

    For reference, the full plain java source

    /* * To change this template, choose Tools | Templates * and open the template in the editor. */
    
    package imagetest;
    
    /** * * @author COMPUTER */// Blender1.java
    
    import java.awt.*;import java.awt.image.*;
    
    import javax.swing.*;import javax.swing.event.*;
    
    /** * This class describes and contains the entry point to an application that * demonstrates the blending transition. */
    
    public class Blender1 extends JFrame{  /**    *     */   private static final long serialVersionUID = 1L;
    
        /**    * Construct Blender1 GUI.     */
    
     public Blender1() {     super("Blender #1");      setDefaultCloseOperation(EXIT_ON_CLOSE);
    
            // Load first image from JAR file and draw image into a buffered image.
    
         ImageIcon ii1 = new ImageIcon(getClass().getResource("x.png"));       final BufferedImage bi1;      bi1 = new BufferedImage(ii1.getIconWidth(), ii1.getIconHeight(),              BufferedImage.TYPE_INT_RGB);      Graphics2D g2d = bi1.createGraphics();        int h = ii1.getImage().getHeight(null);       System.out.println("Blender1.Blender1()--------> height :" + h);       g2d.drawImage(ii1.getImage(), 0, 0, null);        g2d.dispose();
    
          // Load second image from JAR file and draw image into a buffered image.
    
            ImageIcon ii2 = new ImageIcon(getClass().getResource("y.png"));       final BufferedImage bi2;      bi2 = new BufferedImage(ii2.getIconWidth(), ii2.getIconHeight(),              BufferedImage.TYPE_INT_RGB);      g2d = bi2.createGraphics();       int h2 = ii2.getImage().getHeight(null);      System.out.println("Blender1.Blender1()--------> height :" + h2);      g2d.drawImage(ii2.getImage(), 0, 0, null);        g2d.dispose();
    
          // Create an image panel capable of displaying entire image. The widths       // of both images and the heights of both images must be identical.
    
         final ImagePanel ip = new ImagePanel();       ip.setPreferredSize(new Dimension(ii1.getIconWidth(), ii1             .getIconHeight()));       getContentPane().add(ip, BorderLayout.NORTH);
    
           // Create a slider for selecting the blending percentage: 100% means      // show all of first image; 0% means show all of second image.
    
          final JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 100);      slider.setMinorTickSpacing(5);        slider.setMajorTickSpacing(10);       slider.setPaintTicks(true);       slider.setPaintLabels(true);      slider.setLabelTable(slider.createStandardLabels(10));        slider.setInverted(true);     ChangeListener cl;        cl = new ChangeListener()     {         public void stateChanged( ChangeEvent e )         {             // Each time the user adjusts the slider, obtain the new              // blend percentage value and use it to blend the images.
    
                   int value = slider.getValue();                ip.setImage(blend(bi1, bi2, value / 100.0));          }     };        slider.addChangeListener(cl);     getContentPane().add(slider, BorderLayout.SOUTH);
    
           // Display the first image, which corresponds to a 100% blend     // percentage.
    
          ip.setImage(bi1);
    
           pack();       setVisible(true); }
    
       /**    * Blend the contents of two BufferedImages according to a specified weight.   *     * @param bi1  *            first BufferedImage  * @param bi2  *            second BufferedImage     * @param weight   *            the fractional percentage of the first image to keep     *     * @return new BufferedImage containing blended contents of BufferedImage  *         arguments   */
    
     public BufferedImage blend( BufferedImage bi1, BufferedImage bi2,         double weight )   {     if (bi1 == null)          throw new NullPointerException("bi1 is null");
    
          if (bi2 == null)          throw new NullPointerException("bi2 is null");
    
          int width = bi1.getWidth();       if (width != bi2.getWidth())          throw new IllegalArgumentException("widths not equal");
    
         int height = bi1.getHeight();     if (height != bi2.getHeight())
    
              throw new IllegalArgumentException("heights not equal");
    
            BufferedImage bi3 = new BufferedImage(width, height,              BufferedImage.TYPE_INT_RGB);      int[] rgbim1 = new int[width];        int[] rgbim2 = new int[width];        int[] rgbim3 = new int[width];
    
          for (int row = 0; row < height; row++)     {         bi1.getRGB(0, row, width, 1, rgbim1, 0, width);           bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
             for (int col = 0; col < width; col++)          {             int rgb1 = rgbim1[col];               int r1 = (rgb1 >> 16) & 255;                int g1 = (rgb1 >> 8) & 255;             int b1 = rgb1 & 255;
    
                    int rgb2 = rgbim2[col];               int r2 = (rgb2 >> 16) & 255;                int g2 = (rgb2 >> 8) & 255;             int b2 = rgb2 & 255;
    
                    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));               int g3 = (int) (g1 * weight + g2 * (1.0 - weight));               int b3 = (int) (b1 * weight + b2 * (1.0 - weight));               rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;            }
    
               bi3.setRGB(0, row, width, 1, rgbim3, 0, width);       }
    
           return bi3;   }
    
       /**    * Application entry point.    *     * @param args     *            array of command-line arguments  */
    
     public static void main( String[] args )  {     Runnable r = new Runnable()       {         public void run()         {             // Create Blender1's GUI on the event-dispatching             // thread.
    
                  new Blender1();           }     };        EventQueue.invokeLater(r);    }}
    
    /** * This class describes a panel that displays a BufferedImage's contents. */
    
    class ImagePanel extends JPanel{ /**    *     */   private static final long serialVersionUID = 4977990666209629996L;    private BufferedImage bi;
    
       /**    * Specify and paint a new BufferedImage.  *     * @param bi   *            BufferedImage whose contents are to be painted   */
    
     void setImage( BufferedImage bi ) {     this.bi = bi;     repaint();    }
    
       /**    * Paint the image panel.  *     * @param g    *            graphics context used to paint the contents of the current   *            BufferedImage    */
    
     public void paintComponent( Graphics g )  {     if (bi != null)       {         Graphics2D g2d = (Graphics2D) g;          g2d.drawImage(bi, null, 0, 0);        } }}
    

    Full java BB source

    /* * ImageScreen.java * * © ,  * Confidential and proprietary. */
    
    package src;
    
    /** *  */
    
    import java.io.OutputStream;import javax.microedition.io.Connector;import javax.microedition.io.file.FileConnection;import net.rim.device.api.system.Bitmap;import net.rim.device.api.ui.Field;import net.rim.device.api.ui.FieldChangeListener;import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.BitmapField;import net.rim.device.api.ui.component.ButtonField;import net.rim.device.api.ui.component.Dialog;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.HorizontalFieldManager;import net.rim.device.api.ui.container.MainScreen;import net.rim.device.api.ui.component.GaugeField;/** * The main screen to display an image taken from the camera demo. */public final class ImageScreen extends MainScreen{    /** The down-scaling ratio applied to the snapshot Bitmap */    private static final int IMAGE_SCALING = 7;
    
        /** The base file name used to store pictures */    private static final String FILE_NAME = System.getProperty("fileconn.dir.photos") + "IMAGE";
    
        /** The extension of the pictures to be saved */    private static final String EXTENSION = ".bmp";
    
        /** A counter for the number of snapshots taken */    private static int _counter;    Bitmap image1,image2; BitmapField imageField;     /** A reference to the current screen for listeners */    private ImageScreen _imageScreen;
    
       /**    * Constructor    * @param raw A byte array representing an image    */    public ImageScreen( final byte[] raw1,final byte[] raw2 )    {        // A reference to this object, to be used in listeners        _imageScreen = this;
    
            setTitle("Blend and Save");
    
            // Convert the byte array to a Bitmap image        image1 = Bitmap.createBitmapFromBytes( raw1, 0, -1, 1 );        image2 = Bitmap.createBitmapFromBytes( raw2, 0, -1, 1 );        // Create two field managers to center the screen's contents        HorizontalFieldManager hfm1 = new HorizontalFieldManager( Field.FIELD_HCENTER );        HorizontalFieldManager hfm2 = new HorizontalFieldManager( Field.FIELD_HCENTER );        HorizontalFieldManager hfm3 = new HorizontalFieldManager( Field.FIELD_HCENTER );        // Create the field that contains the image//blend(image1, image2, 50/ 100.0)        imageField = new BitmapField(blend(image1, image2, 50/ 100.0) ){
    
               public int getPreferredWidth(){ return 250;}           public int getPreferredHeight(){ return 150;}
    
             };
    
            hfm1.add( imageField ); 
    
            GaugeField scroller = new GaugeField("Adjust (alt + < >)",0,100,50,Field.EDITABLE | Field.FOCUSABLE);        //scroller.setBackground( net.rim.device.api.ui.decor.BackgroundFactory.createSolidBackground(0x00000000));          scroller.setChangeListener( new GaugeFieldListener() );         hfm2.add(scroller);         // Create the SAVE button which returns the user to the main camera        // screen and saves the picture as a file.        ButtonField photoButton = new ButtonField( "Save" );        photoButton.setChangeListener( new SaveListener(raw1,raw2) );        hfm3.add(photoButton);
    
            // Create the CANCEL button which returns the user to the main camera        // screen without saving the picture.        ButtonField cancelButton = new ButtonField( "Cancel" );        cancelButton.setChangeListener( new CancelListener() );        hfm3.add(cancelButton);
    
            // Add the field managers to the screen        add( hfm1 );        add( hfm2 );        add( hfm3 );scroller.setFocus();//scroller.setValue(50);    }    public Bitmap blend( Bitmap bi1, Bitmap  bi2,                      double weight )        {
    
                  if (bi1 == null)                       throw new NullPointerException("bi1 is null");
    
                    if (bi2 == null)                       throw new NullPointerException("bi2 is null");
    
                    int width = bi1.getWidth();            if (width != bi2.getWidth())                   throw new IllegalArgumentException("widths not equal");
    
                   int height = bi1.getHeight();          if (height != bi2.getHeight())
    
                            throw new IllegalArgumentException("heights not equal");
    
             Bitmap bi3 = new Bitmap(width, height);         int[] rgbim1 = new int[width];         int[] rgbim2 = new int[width];         int[] rgbim3 = new int[width];
    
                    for (int row = 0; row < height; row++)         {            // bi -> int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) 
    
                 // bit - > int[] argbData, int offset, int scanLength, int x, int y, int width, int height) 
    
                           bi1.getARGB(rgbim1,0,width,0,row, width,1);//  row, width, 1, , 0, width);                       bi2.getARGB(rgbim2,0,width,0,row, width,1); 
    
                           //bi1.getRGB(0, row, width, 1, rgbim1, 0, width);                       //bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
                           for (int col = 0; col < width; col++)                  {                              int rgb1 = rgbim1[col];                                int r1 = (rgb1 >> 16) & 255;                           int g1 = (rgb1 >> 8) & 255;                            int b1 = rgb1 & 255;
    
                              int rgb2 = rgbim2[col];                                int r2 = (rgb2 >> 16) & 255;                           int g2 = (rgb2 >> 8) & 255;                            int b2 = rgb2 & 255;
    
                              int r3 = (int) (r1 * weight + r2 * (1.0 - weight));                            int g3 = (int) (g1 * weight + g2 * (1.0 - weight));                            int b3 = (int) (b1 * weight + b2 * (1.0 - weight));                            rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;                     }                    //bi -> int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)                     //bit -> (int[] data, int offset, int scanLength, int left, int top, int width, int height)                      bi3.setARGB(rgbim3, 0, width, 0,  row,width, 1);
    
                        // bi3.setRGB(0, row, width, 1, rgbim3, 0, width);                }
    
                 return bi3;    }
    
       /**    * Handles trackball click events    * @see net.rim.device.api.ui.Screen#invokeAction(int)    */       protected boolean invokeAction(int action)    {        boolean handled = super.invokeAction(action); 
    
            if(!handled)        {            switch(action)            {                case ACTION_INVOKE: // Trackball click.                {                                 return true;                }            }        }                return handled;              }
    
     /**    * A listener used for the "Save" button    */    private class GaugeFieldListener implements FieldChangeListener    {        public void fieldChanged(Field field, int context)        {          int value =  ((GaugeField)field).getValue(); if (value==0){return;}          imageField.setBitmap( blend(image1, image2, value/ 100.0) );          ((GaugeField)field).setLabel("Adjust (alt + < >)"+value);        }    }   /**    * A listener used for the "Save" button    */    private class SaveListener implements FieldChangeListener    {        /** A byte array representing an image */        private byte[] _raw1,_raw2;
    
           /**        * Constructor.        * @param raw A byte array representing an image        */        SaveListener(byte[] raw1,byte[] raw2)        {            _raw1 = raw1;            _raw2 = raw2;        }
    
           /**        * Saves the image as a file in the BlackBerry filesystem        */        public void fieldChanged(Field field, int context)        {            try            {                       // Create the connection to a file that may or                // may not exist.                FileConnection file = (FileConnection)Connector.open( FILE_NAME + _counter + EXTENSION );
    
                    // If the file exists, increment the counter until we find                // one that hasn't been created yet.                while( file.exists() )                {                    file.close();                    ++_counter;                    file = (FileConnection)Connector.open( FILE_NAME + _counter + EXTENSION );                }
    
                    // We know the file doesn't exist yet, so create it                file.create();
    
                    // Write the image to the file                OutputStream out = file.openOutputStream();                out.write(_raw1);
    
                    // Close the connections                out.close();                file.close();            }            catch(Exception e)            {                Dialog.alert( "ERROR " + e.getClass() + ":  " + e.getMessage() );            }
    
                // Inform the user where the file has been saved            Dialog.inform( "Saved to " + FILE_NAME + _counter + EXTENSION );
    
                // Increment the image counter            ++_counter;
    
                // Return to the main camera screen            UiApplication.getUiApplication().popScreen( _imageScreen );        }    }
    
       /**    * A listener used for the "Cancel" button    */    private class CancelListener implements FieldChangeListener    {       /**        * Return to the main camera screen        */        public void fieldChanged(Field field, int context)        {            UiApplication.getUiApplication().popScreen( _imageScreen );        }    }}
    

    Yes, your original code:

    for (int col = 0; col < width; col++){int rgb1 = rgbim1[col];int r1 = (rgb1 >> 16) & 255;int g1 = (rgb1 >> 8) & 255;int b1 = rgb1 & 255;
    
    int rgb2 = rgbim2[col];int r2 = (rgb2 >> 16) & 255;int g2 = (rgb2 >> 8) & 255;int b2 = rgb2 & 255;
    
    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));int g3 = (int) (g1 * weight + g2 * (1.0 - weight));int b3 = (int) (b1 * weight + b2 * (1.0 - weight));rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;}
    

    Labour Code:

    for (int col = 0; col < width; col++)
    {
    int rgb1 = rgbim1[col];
    int a1 = (rgb1 >> 24) & 255;
    int r1 = (rgb1 >> 16) & 255;
    int g1 = (rgb1 >> 8) & 255;
    int b1 = rgb1 & 255;
    
    int rgb2 = rgbim2[col];
    int a2 = (rgb2 >> 24) & 255;
    int r2 = (rgb2 >> 16) & 255;
    int g2 = (rgb2 >> 8) & 255;
    int b2 = rgb2 & 255;
    
    int a3 = (int) (a1 * weight + a2 * (1.0 - weight));
    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));
    int g3 = (int) (g1 * weight + g2 * (1.0 - weight));
    int b3 = (int) (b1 * weight + b2 * (1.0 - weight));
    rgbim3[col] = (a3 << 24) | (r3 << 16) | (g3 << 8) | b3;
    }
    
  • Firewall Windows with advanced security rules do not take effect immediately?

    Hello everyone, I seem to have a problem with the Windows Firewall with advanced security. I put a rule that should prevent some IP address the ability to send packets to any port on my pc, however, it doesn't seem to work, said ip was still able to send packets until I installed the third-party firewall. That's what 'the netsh advfirewall firewall show = rulename rule name' indicates:

    Activated: Yes
    Direction: in
    Profiles: Domain, private, Public
    Group:
    LocalIP: all
    RemoteIP: x.x.x.x/32
    Protocol: all
    Traversed side: No.
    Action: block
    Protocol used to send packets was UDP.
    Is it normal that the rules from windows firewall do not take effect immediately?

    Thanks for the reply, I checked the Windows Firewall service, it is set to automatic, and two long-term services are started (BFE and MPSDRV). It turns out that the PC was connected to the Public network, while the Windows Firewall has been enabled only for the private profile. Activation of the firewall for the public profile, did the trick.

    Thanks for your comments.
  • Impossible to activate permanent "network discovery and file sharing" in advanced sharing without turning windows firewall at the wide service.

    Environment:

    I have a workgroup Windows 8 pro PC with all updates from Windows update. The PC is connected via WiFi (home) to a router (the same thing happens if I am connected to the router directly via RJ45). It's my "private network (NAT). I have the Windows Firewall is enabled in its default configuration. I use "Windows Defender" as my protection\firewall of virus software.  "When I go to: change options for sharing different network profiles" under advanced sharing options. I try to turn on file sharing and network discovery in the private profile. It shows that "the private sector is the current profile. The radio button lights. However, when I go to the file Explorer / network I got the message ' network discovery and file sharing are turned off. " The network computers and devices are not visible. Click here to change... " I click to change, however when I click to change it keeps returning and gives me the same message. I then go in ""network control and Internet\Network and sharing Center\Advanced sharing settings " and the option buttons in private profile for the network discovery and file sharing are turned off."

    If I turn off the Windows Firewall. Everything works. I need to open a hole in the windows firewall for 2 applications was discovered and network file sharing. I opened rather not just blindly ports. However, if this is the only solution, what ports do I need open.

    Hi all

    I have exactly the same problem.  (and I'm not the only one. - There are many!) The problem does not lie with the Windows Firewall. If I turn it off, discovery network and file sharing is turned on-tour he turn it back on and its all disabled subsequently and the rest of the way.  I've been round and round the forums of the world looking for a solution but still find a definitive answer. Can certain software engineering in Microsoft Please arrive at the correct answer.

    Thank you very much

    PT.

  • Why Adobe is always trying to take my money?

    I tried to cancel all adobe clouds last month, but now get an email saying you took money from my account again. The problem right now. You make it easy to register, but very very difficult to withdraw in the conditions of consumers. not impressed.

    Could you provide the Adobe ID on which you get fees after cancellation by private messaging.

    Concerning

    Stéphane

  • progressProperty and isCancelled causing a bound value that cannot be defined.

    I noticed that the cancellation of the following application causes errors because cannot set a bound value. I tried to add some conditions to avoid this error, but nothing helped.
    What follows is the main culprit:
    pb.progressProperty().bind(serv.progressProperty());
    You may also notice that I tried to use progressProperty and ChangeListener instead of the bind method. Unfortunately in vain. I can do progressbar works without bind (code) method?
    Full error message when Cancel button is the following:
    Service status: SCHEDULED
    Let the download begin!
    Service status: CANCELLED
    Service status cancelled when progress was: 0.09582292038557658
    java.lang.RuntimeException: A bound value cannot be set.
         at javafx.beans.property.DoublePropertyBase.set(Unknown Source)
         at javafx.scene.control.ProgressIndicator.setProgress(Unknown Source)
         at dm.Thr$2.handle(Thr.java:73)
         at dm.Thr$2.handle(Thr.java:1)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
    Cancelling!
    Finished/cancelled!
         at javafx.scene.Node.fireEvent(Unknown Source)
         at javafx.scene.control.Button.fire(Unknown Source)
         at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
         at com.sun.javafx.scene.control.skin.SkinBase$5.handle(Unknown Source)
         at com.sun.javafx.scene.control.skin.SkinBase$5.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.access$1300(Unknown Source)
         at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.notifyMouse(Unknown Source)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
         at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Application:
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    
    public class Thr extends Application {
    
         @Override
         public void start(Stage stage) throws Exception {
              
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         }
         
         final VBox vbox = new VBox();
         final javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
         final TextArea tf = new TextArea();
         final javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
         final ProgressBar pb = new ProgressBar();
         final FirstLineService serv = new FirstLineService();
         boolean cancelled = false;
         
         private void setS(Group rg) {
              
              tf.setPrefRowCount(5);
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              vbox.getChildren().add(pb);
              
              pb.setPrefWidth(450);
              rg.getChildren().add(vbox);
              
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        System.out.println("Service status: "+serv.getState());
                        tf.setText("STARTED!");
                   }
              });
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.cancel();
                        System.out.println("Service status: "+serv.getState());
                        System.out.println("Service status cancelled when progress was: "+serv.getProgress());
                        tf.appendText("\nCANCELLED!");
                        pb.setProgress(serv.getProgress());
                   }
              });
              //pb.setProgress(0);
              if (cancelled!=true) {
                   pb.progressProperty().bind(serv.progressProperty());
              } else {
                   pb.progressProperty().unbind();
              }
              
              /*pb.progressProperty().addListener(new ChangeListener<Task>() {
                   @Override
                   public void changed(ObservableValue<? extends Task> arg0,
                             Task arg1, Task arg2) {
                        // TODO Auto-generated method stub
                        pb.setProgress(serv.getProgress());
                   }
              });*/
         }
         
         private class FirstLineService extends Service {
    
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               int fileSize = url.openConnection().getContentLength()/1024;
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n=0;
                               int k=0;
                               System.out.println("Let the download begin!");
                               while(n !=-1){
                                    if (isCancelled()) {
                                         cancelled = true;
                                            n=-1;
                                            System.out.println("Cancelling!");
                                       } else {
                                       k=k+1;
                                    n=bin.read();
                                    bos.write(n);
                                    updateProgress(k/1024,fileSize);
                                    //pb.progressProperty().bind(this.progressProperty());
                                    //pb.setProgress(getProgress());
                                       }
                               }
                               bos.close();
                               System.out.println("Finished/cancelled!");
                             } catch (MalformedURLException e) {
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  e.printStackTrace();
                             }
                          return null;
                    }
                };
            }
        }
         
         public static void main(final String[] arguments)
         {
              Application.launch(arguments);
         }
    
    }

    What follows is the main culprit:
    pb.progressProperty () .bind (serv.progressProperty ());

    I think your problem is the following line:

       pb.setProgress(serv.getProgress())  //bound value cannot be set
    

    Add a listener for a serv progressProperty().

      serv.progressProperty().addListener(new ChangeListener() {
    
                       @Override
                       public void changed(ObservableValue o, Object oldVal,
                               Object newVal) {
                          pb.progressProperty().setValue(serv.getProgress());
                       }
                   });
    

    Here's the modified code:

    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
     import javafx.beans.value.*;
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    
    public class Thr extends Application {
    
         @Override
         public void start(Stage stage) throws Exception {
    
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         }
    
         final VBox vbox = new VBox();
         final javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
         final TextArea tf = new TextArea();
         final javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
         final ProgressBar pb = new ProgressBar();
         final FirstLineService serv = new FirstLineService();
         boolean cancelled = false;
    
         private void setS(Group rg) {
    
              tf.setPrefRowCount(5);
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              vbox.getChildren().add(pb);
    
              pb.setPrefWidth(450);
              rg.getChildren().add(vbox);
    
              btn.setOnAction(new EventHandler() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        System.out.println("Service status: "+serv.getState());
                        tf.setText("STARTED!");
                   }
              });
    
                     serv.progressProperty().addListener(new ChangeListener() {
    
                       @Override
                       public void changed(ObservableValue o, Object oldVal,
                               Object newVal) {
                          pb.progressProperty().setValue(serv.getProgress());
                       }
                   });
    
              btnC.setOnAction(new EventHandler() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.cancel();
                        System.out.println("Service status: "+serv.getState());
                        System.out.println("Service status cancelled when progress was: "+serv.getProgress());
                        tf.appendText("\nCANCELLED!");
                        //pb.setProgress(serv.getProgress());n
                   }
              });
              //pb.setProgress(0);
         //     if (cancelled!=true) {
    //               pb.progressProperty().bind(serv.progressProperty());//
    //          } else {
    //               pb.progressProperty().unbind();
    //          }
              /*
              pb.progressProperty().addListener(new ChangeListener() {
                   @Override
                   public void changed(ObservableValue arg0,
                             Task arg1, Task arg2) {
                        // TODO Auto-generated method stub
                        pb.setProgress(serv.getProgress());
                   }
              }); */
         }
    
         private class FirstLineService extends Service {
    
            protected Task createTask() {
                return new Task() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               int fileSize = url.openConnection().getContentLength()/1024;
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n=0;
                               int k=0;
                               System.out.println("Let the download begin!");
                               while(n !=-1){
                                    if (isCancelled()) {
                                         cancelled = true;
                                            n=-1;
                                            System.out.println("Cancelling!");
                                       } else {
                                       k=k+1;
                                    n=bin.read();
                                    bos.write(n);
                                    updateProgress(k/1024,fileSize);
                                    //pb.progressProperty().bind(this.progressProperty());
                                    //pb.setProgress(getProgress());
                                       }
                               }
                               bos.close();
                               System.out.println("Finished/cancelled!");
                             } catch (MalformedURLException e) {
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  e.printStackTrace();
                             }
                          return null;
                    }
                };
            }
        }
    
         public static void main(final String[] arguments)
         {
              Application.launch(arguments);
         }
    
    }
    

Maybe you are looking for