Can we make Object whih is ...............

Hi friends
can we make object which is live for whole JVM life?
means once object is created then it will be not destroyed untill JVM killed.
and also we uses that object or not it should remain in JVM.
GC should not kill that object.
can anyone tell me idea or code to do this.
thnx in advance

No, unless you manage to keep a reference to it the whole time, like making a static reference to it in the class that has the main method. Though technically, this still wouldn't ensure that it's available during the whole JVM lifecycle I think, but in your case it might be sufficient.

Similar Messages

  • Install LiveType data button is dimmed and Can I make objects myself?

    Is it normal that the Install LiveType Data button is dimmed?
    How can I install new textures and object?
    And my second question is can I make objects myself?

    Werner C wrote:
    Is it normal that the Install LiveType Data button is dimmed?
    Umm, no. but you haven't told us aything about yoru installation procedure. It might be normal for what you're trying to do.
    How can I install new textures and object?
    Push the install button.
    And my second question is can I make objects myself?< </div>
    This is your third question. The short answer is yes but it's much more complicated than that. In previous editions of LT, there was an application that allowed you to create your own LiveFonts and other goodies but it's not on the the v3 installation script that I can tell. Your best bet is to figure out why you cannot run the installer properly and fix it.
    bogiesan

  • Can I make objects that do not print?  Like a guide box for labels.

    I wanted to print labels for my memorex DVD labels but couldn't find templates for pages.  The doc files open but pages prints the lines of the guides which are never exactly correct so they look horribly uneven.  Can I make a separate layer that doesn't print or objects that won't print but are selectable.

    The 'guides' are probably text boxes, into which you place the text.
    Select one of these, then use the Stroke controls in the Format bar to set the stroke to 'none.'
    Choose View > Show Layout to see the position of the box (and other layout elements, such as the left and top margins and the header box in this screen shot):
    When printed, or viewed with Show Layout turned off, the same portion of the same page will have this appearance (not including the difference in scale caused by the automatic scaling of graphics on this board):
    "View" in the instruction above means either the View button on the Toolbar or the View menu in the Menu Bar.
    Ragards,
    Barry

  • Can you make objects unmovable in an I web design?

    So they stay consistent through out the pages?

    If you create a "master" page, copy the objects and paste to all the others. The objects will appear in the same position as in the "master".
    You can also use the Metrics inspector to check and adjust the position on the x & y axis.

  • How can I make a button that on press the object appears and on second press the object to disappear

    Hello,
    I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
    on (press)
        _root.top1.gotoAndStop(2);
        _root.topp.gotoAndStop(2);
        _root.mm1.gotoAndStop(2);
              _root.m1.gotoAndStop(2);
    but from here I'm stuck.
    Thank you for your help

    What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
    If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
    object._visible = false;  // start with the object being invisible
    yourButtonName.onRelease = function(){
        object._visible = !object._visible;
    That one line in the function sets the object's _visible property to be the opposite of what it currently is.

  • How can we make smart objects smarter?

    Smart objects are great and can be a really useful time saver. That said, i'm having a problem and I'm hoping that there is a solution out there. I'll preface this with the statement that, I may not be using smart objects as they were intended, but I feel like this is how they should work:
    A basic example - say you have a "Login" button.
    It would be great/obvious to have that as a smart object. It would be greater still to have the on, off, rollover, clicked states to be within that smart object.
    Now, if you place that smart object as a linked object into a document, there is no way to say "in this instance, I want to show the off state of the button". If you open the smart object and change the state to that and save - then it will update all instances everywhere in all PSDs where it exists and all of your buttons are now in an off state.
    Now, clearly, in this example, the easy answer is just make 4 smart objects. Easy peasy.
    The problem with that is two fold:
    1. if "Login" changes to "Logon" I need to make that change in 4 places instead of just one.
    2. The button example is simple, but what if my smart object is more complicated than that? What if there a complex set of layers that make up that object? Making changes to multiple complex layer files kind of defeats the purpose of having smart objects no?
    You can embed the object and thus break the external link and change things to your heart's content without effecting other instances - but then what really is the value of creating the smart object then? You might as well just have a layer group that you drag from PSD to PSD.
    The way smart objects should work, IMHO, is that you should be able to toggle layers on and off per instance of the object, BUT any pixel modifications to a layer within, bubble up to all instances that are displaying that layer  (say - a colour change, or text change, etc).
    Thoughts?

    Hi,
    Check the below links.
    http://sharepoint.aspcode.net/view/635399286724222582123340/sso-between-2-host-named-sitecollections-with-different-subdomains
    http://blogs.msdn.com/b/russmax/archive/2013/10/31/guide-to-sharepoint-2013-host-name-site-collections.aspx
    http://blog.repsaj.nl/index.php/2014/07/sp2013-host-named-site-collections-adfs-claims-and-aam/
    Krishana Kumar http://www.mosstechnet-kk.com
    Please mark the replies and Proposed as answer if they help and solve your issue

  • Can you make a spreadshee​t object log every hour on the half hour?

    I have a spreadsheet object that logs the data every hour on the hour, i.e., at 1:00 p.m., 2:00 p.m., etc. Can I make it log every hour on the half hour, i.e., at 1:30 p.m., 2:30 p.m., etc.? If so, how?

    Hi,
    Yes you can make the spreadsheet object to behave in that way by just using with it the TimeOfHour object.
    The TimeOfHour object output goes high every hour at some offset into each hour. So is just a matter of defining the offset as being half an our and placing the output of this object in the yellow field "Log now=" of the Spreadsheet object.
    You can leave the "Interval=" and "Logging=" field empty since the "Log now=" will override them.
    I hope it helps
    Andre Oliveira

  • How can we make one object as synchronizable?

    Hi!
    I am new to java.How can we make one object as synchronizable?
    Thanx

    Synchronize is used to make an object and/or a functional sequence thread safe. By itself it does not make something thread safe.
    So the point is to make something thread safe not just to synchronize it.
    You can either sychronize a method like so....
          public synchronized void doit()
    Or you synchronize on an object (where 'Object' below is solely as an example, any object can be used)...
          Object lockObject = new Object();
          public void doit()
             sychronized (lockObject)

  • How can i make my object appear as a mesh?

    How can I make an object appear as a mesh? I dont want anything as complicated as a coloured gradient I just want a flat object to appear like a net. Is there an easy way to do this?
    Thanks
    J

    Jules,
    Depending on the shape, and upon the appearance (varying width and/or knotting or whatever), it may be anything from a Rectangular/Polar Grid (bundled with the Line Segment Tool) to something intricate and difficult.

  • How can 1 make an object of user defined class immutable?

    Hi All,
    How can one make an object of user defined class immutable?
    Whats the implementation logic with strings as immutable?
    Regards,

    Hi All,
    How can one make an object of user defined class
    immutable?The simple answer is you can't. That is, you can't make the object itself immutable, but what you can do is make a wrapper so that the client never sees the object to begin with.
    A classic example of a mutable class:
    class MutableX {
        private String name = "None";
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
    }I don't think it's possible to make this immutable, but you can create a wrapper that is:
    class ImmutableX {
        private final MutableX wrappedInstance;
        public ImmutableX (String name) {
            wrappedInstance = new MutableX();
            wrappedInstance.setName(name);
        public String getName() {
            return wrappedInstance.getName();
        // Don't give them a way to set the name and never expose wrappedInstance.
    }Of course, if you're asking how you can make your own class immutable then the simple answer is to not make any public or protected methods that can mutate it and don't expose any mutable members.
    Whats the implementation logic with strings as
    immutable?
    Regards,I don't understand the question.

  • How can I make the combo box turn to the value of black.

    When the show button is pressed (and not before), a filled black square should be
    displayed in the display area. The combo box (or drop down list) that enables the user to choose the colour of
    the displayed shape and the altering should take effect immediately.When the show button is pressed,
    the image should immediately revert to the black square, the combo box should show the value that
    correspond to the black.
    Now ,the problem is: after I pressed show button, the image is reverted to the black square,but I don't know
    how can I make the combo box turn to the value of black.
    Any help or hint?Thanks a lot!
    coding 1.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class test extends JFrame {
         private JPanel buttonPanel;
         private DrawPanel myPanel;
         private JButton showButton;
         private JComboBox colorComboBox;
    private boolean isShow;
         private int shape;
         private boolean isFill=true;
    private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
    "green", "lightgray", "magenta", "orange",
    "pink", "red", "white", "yellow"}; // color names list in ComboBox
    private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
                              Color.gray, Color.green, Color.lightGray, Color.magenta,
                              Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
         public test() {
         super("Draw Shapes");
         // creat custom drawing panel
    myPanel = new DrawPanel(); // instantiate a DrawPanel object
    myPanel.setBackground(Color.white);
         // set up showButton
    // register an event handler for showButton's ActionEvent
    showButton = new JButton ("show");
         showButton.addActionListener(
              // anonymous inner class to handle showButton events
         new ActionListener() {
                   // draw a black filled square shape after clicking showButton
         public void actionPerformed (ActionEvent event) {
                             // call DrawPanel method setShowStatus and pass an parameter
              // to decide if show the shape
         myPanel.setShowStatus(true);
                   isShow = myPanel.getShowStatus();
                                            shape = DrawPanel.SQUARE;
                        // call DrawPanel method setShape to indicate shape to draw
                                            myPanel.setShape(shape);
                        // call DrawPanel method setFill to indicate to draw a filled shape
                                            myPanel.setFill(true);
                        // call DrawPanel method draw
                                            myPanel.draw();
                             myPanel.setFill(true);
                             myPanel.setForeground(Color.black);
                   }// end anonymous inner class
         );// end call to addActionListener
    // set up colorComboBox
    // register event handlers for colorComboBox's ItemEvent
    colorComboBox = new JComboBox(colorNames);
    colorComboBox.setMaximumRowCount(5);
    colorComboBox.addItemListener(
         // anonymous inner class to handle colorComboBox events
         new ItemListener() {
         // select shape's color
         public void itemStateChanged(ItemEvent event) {
         if(event.getStateChange() == ItemEvent.SELECTED)
         // call DrawPanel method setForeground
         // and pass an element value of colors array
         myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
    myPanel.draw();
    }// end anonymous inner class
    ); // end call to addItemListener
    // set up panel containing buttons
         buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
         buttonPanel.add(showButton);
    buttonPanel.add(colorComboBox);
    JPanel radioButtonPanel = new JPanel();
    radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
    Container container = getContentPane();
    container.setLayout(new BorderLayout(10,10));
    container.add(myPanel, BorderLayout.CENTER);
         container.add(buttonPanel, BorderLayout.EAST);
    setSize(500, 400);
         setVisible(true);
         public static void main(String args[]) {
         test application = new test();
         application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    coding 2
    import java.awt.*;
    import javax.swing.*;
    public class DrawPanel extends JPanel {
         public final static int CIRCLE = 1, SQUARE = 2;
         private int shape;
         private boolean fill;
         private boolean showStatus;
    private int shapeSize = 100;
    private Color foreground;
         // draw a specified shape
    public void paintComponent (Graphics g){
              super.paintComponent(g);
              // find center
    int x=(getSize().width-shapeSize)/2;
              int y=(getSize().height-shapeSize)/2;
              if (shape == CIRCLE) {
         if (fill == true){
         g.setColor(foreground);
              g.fillOval(x, y, shapeSize, shapeSize);
    else{
                   g.setColor(foreground);
    g.drawOval(x, y, shapeSize, shapeSize);
              else if (shape == SQUARE){
         if (fill == true){
         g.setColor(foreground);
                        g.fillRect(x, y, shapeSize, shapeSize);
    else{
                        g.setColor(foreground);
    g.drawRect(x, y, shapeSize, shapeSize);
    // set showStatus value
    public void setShowStatus (boolean s) {
              showStatus = s;
         // return showstatus value
    public boolean getShowStatus () {
              return showStatus;
         // set fill value
    public void setFill(boolean isFill) {
              fill = isFill;
         // set shape value
    public void setShape(int shapeToDraw) {
              shape = shapeToDraw;
    // set shapeSize value
    public void setShapeSize(int newShapeSize) {
              shapeSize = newShapeSize;
    // set foreground value
    public void setForeground(Color newColor) {
              foreground = newColor;
         // repaint DrawPanel
    public void draw (){
              if(showStatus == true)
              repaint();

    Hello,
    does setSelectedIndex(int anIndex)
    do what you need?
    See Java Doc for JComboBox.

  • How can I make a decorative page border in Pages?

    How can I make a decorative page border in Pages?

    Hi Janet,
    I suppose that you are asking how to include a decorative border of your design into a pages document. How you design that border is rather out of the range of these discussions. So, let's say that you have a graphic that approximates a picture frame and has the required dimensions to frame your content.
    If you want to have the graphic appear on every page, Drag or Insert > Choose, to incorporate your design in to the document. The position it as you want it, and then Arrange > Send to Background and Format > Advanced > Move Object to Section Master.
    If there is more than one section in your document, there may be more considerations, but if you do this at the outset in the creation of your document, the design of the first section will flow to subsequent sections.
    Regards,
    Jerry

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • The book who I selected doesn't move to the right in CheckedListBox and the reason is that I can't make an return.his code is good just for first user who I selected

    Imprumut = loan
    I have 6 tables: 
    I have one combobox(from where I select utilizatori(users)) and 2 CheckedListBox(Between first box and second box I have 2 buttons:imprumuta(loan) and restituie(return))
    This c# code works just for first user: Utilizator, but something's not good. When I add new utilizator(user) and select it,  the loan will be add in my SQL DataBase, but... the book who I selected doesn't move to the right in CheckedListBox and the reason
    is that I can't make an return
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using MySql.Data.MySqlClient;
    namespace proiect
        public partial class Imprumut : Form
            MySqlConnection con = new MySqlConnection("DataSource=localhost;UserID=root;database=biblio1");
            //stabilim conexiunea
            MySqlCommand comUser;//interogarea pe baza careia umplem comboBox
            MySqlDataAdapter adaptu;
            DataTable userT = new DataTable();
            MySqlCommand cmdCarti;//interogarea pe baza careia umplem checkListBox
            MySqlDataAdapter adaptCarti;
            DataTable CartiTabel = new DataTable();
            MySqlCommand cmdCartiImprumutate;//interogarea pe baza careia umplem checkListBox
            MySqlDataAdapter adaptCartiImprumutate;
            DataTable CartiImprumutateTabel = new DataTable();
            public int UserId
                get
                    return Convert.ToInt32(user.SelectedValue.ToString());
            void Completez_Combo_User()
                try
                    comUser = new MySqlCommand("SELECT n.userid, CONCAT(n.UserName) as UserN FROM users n left join userroles us on n.userid=us.userid left join roles r on r.roleid=us.roleid WHERE r.roleid='3'",
    con);
                    adaptu = new MySqlDataAdapter(comUser);
                    adaptu.Fill(userT);
                    user.Items.Clear();
                    user.DataSource = userT;
                    //DataTable din care sunt preluate datele pentru ComboBox user
                    user.ValueMember = "UserID";
                    //Valoarea din coloana UserID nu se afiseaza in combobox
                    user.DisplayMember = "UserN";
                    //Eelementele afisate in combobox, preluate din concatenarea mai multor coloane
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            void Completez_CheckList_Carti()
                try
                    cmdCarti = new MySqlCommand("SELECT BookID, CONCAT(title, ' ', ISBN,' ',author)as date_carte FROM books WHERE NumberLeft > 0 ORDER BY BookID", con);
                    adaptCarti = new MySqlDataAdapter(cmdCarti);
                    adaptCarti.Fill(CartiTabel);
                    imp.Items.Clear();
                    //carti.DataSource=null;
                    imp.DataSource = CartiTabel;
                    //DataTable din care sunt preluate datele pentru ComboBox carte
                    imp.ValueMember = "BookID";
                    //Valoarea din coloana BookID nu se afiseaza in combobox
                    imp.DisplayMember = "date_carte";
                    //Eelementele afisate in combobox, preluate din concatenarea mai multor coloane
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
                void Completez_CheckList_Cartires()
                    try
                        cmdCartiImprumutate = new MySqlCommand(string.Format("SELECT b.BookID, CONCAT(title, ' ', ISBN,' ',author) as date_carte FROM books b inner join userbooks ub on ub.bookid = b.bookid
    WHERE ub.userid = {0} ORDER BY BookID", UserId), con);
                        adaptCartiImprumutate = new MySqlDataAdapter(cmdCartiImprumutate);
                        adaptCartiImprumutate.Fill(CartiImprumutateTabel);
                        res.Items.Clear();
                        //carti.DataSource=null;
                        res.DataSource = CartiImprumutateTabel;
                        //DataTable din care sunt preluate datele pentru ComboBox carte
                        res.ValueMember = "BookID";
                        //Valoarea din coloana BookID nu se afiseaza in combobox
                        res.DisplayMember = "date_carte";
                        //Eelementele afisate in combobox, preluate din concatenarea mai multor coloane
                    catch (Exception ex)
                        MessageBox.Show(ex.Message);
            void Inregistrez_imprumut_in_BD()
                int useridu = Convert.ToInt32(user.SelectedValue.ToString()); //useridu = id book
                int bookidi;
                try
                    DateTime azi = System.DateTime.Now; //  Data imprumutului
                    DateTime atunci = termenul.Value;   //  Data restituirii
                    MySqlTransaction tranzactie = con.BeginTransaction();
                    MySqlCommand adaugImpr = new MySqlCommand("INSERT INTO bookshistory(UserID, BookID,BorrowDate) VALUES(@UserID, @BookID, CAST(@BorrowDate as datetime))", con);
                    MySqlCommand scadCarti = new MySqlCommand("UPDATE books SET numberleft=numberleft-1 WHERE bookid=@bookid", con);
                    MySqlCommand adauga_userbooks = new MySqlCommand("INSERT INTO userbooks(userId,bookID)VALUES(@userID,@bookID)", con);
                    adauga_userbooks.Transaction = tranzactie;
                    adaugImpr.Transaction = tranzactie;
                    scadCarti.Transaction = tranzactie;
                    try
                        foreach (int i in imp.CheckedIndices)
                            imp.SelectedIndex = i;
                            bookidi = Convert.ToInt32(imp.SelectedValue.ToString());
                            MessageBox.Show(bookidi.ToString());
                                     //bookidi va fi id-ul cartea bifata, pe rand din checklistBox
                                     //Inregistrez in tabela imprumut
                            adaugImpr.Parameters.AddWithValue("@UserID", useridu);
                            adaugImpr.Parameters.AddWithValue("@BookID", bookidi);
                            adaugImpr.Parameters.AddWithValue("@BorrowDate", azi);
                            adaugImpr.ExecuteNonQuery();
                            adaugImpr.Parameters.Clear();
                            adauga_userbooks.Parameters.AddWithValue("@userID", useridu);
                            adauga_userbooks.Parameters.AddWithValue("@bookID", bookidi);
                            adauga_userbooks.ExecuteNonQuery();
                            adauga_userbooks.Parameters.Clear();
                                    //Scad numarl de carti disponibile pentru cartea imprumutat
                            scadCarti.Parameters.AddWithValue("@bookid", bookidi);
                            scadCarti.ExecuteNonQuery();
                            scadCarti.Parameters.Clear();
                        tranzactie.Commit();
                    catch (Exception ex)
                        tranzactie.Rollback();
                        string message = ex.Message;
                        if (ex.Message.ToLower().Contains("duplicate entry"))
                            message = "Una dintre carti mai exista deja";
                        MessageBox.Show(message);
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            void Inregistrez_restituire_in_BD()
                int useridu = Convert.ToInt32(user.SelectedValue.ToString()); //useridu = id book
                int bookidi;
                try
                    DateTime azi = System.DateTime.Now; //  Data imprumutului
                    DateTime atunci = termenul.Value;   //  Data restituirii
                    MySqlTransaction tranzactie = con.BeginTransaction();
                    MySqlCommand modificIstoric = new MySqlCommand("UPDATE bookshistory SET returndate = @returnDate WHERE userID = @userID AND bookID = @bookID", con);
                    MySqlCommand adaugCarti = new MySqlCommand("UPDATE books SET numberleft = numberleft + 1 WHERE bookID = @bookID", con);
                    MySqlCommand sterge_userbooks = new MySqlCommand("DELETE  FROM userbooks WHERE userID = @userID AND bookID = @bookID", con);
                    sterge_userbooks.Transaction = tranzactie;
                    modificIstoric.Transaction = tranzactie;
                    adaugCarti.Transaction = tranzactie;
                    try
                        foreach (int i in res.CheckedIndices)
                            res.SelectedIndex = i;
                            bookidi = Convert.ToInt32(res.SelectedValue.ToString());
                            MessageBox.Show(bookidi.ToString());
                            //bookidi va fi id-ul cartea bifata, pe rand din checklistBox
                            //Inregistrez in tabela imprumut
                            modificIstoric.Parameters.AddWithValue("@UserID", useridu);
                            modificIstoric.Parameters.AddWithValue("@BookID", bookidi);
                            modificIstoric.Parameters.AddWithValue("@returnDate", termenul.Value);
                            modificIstoric.ExecuteNonQuery();
                            modificIstoric.Parameters.Clear();
                            sterge_userbooks.Parameters.AddWithValue("@UserID", useridu);
                            sterge_userbooks.Parameters.AddWithValue("@BookID", bookidi);
                            sterge_userbooks.ExecuteNonQuery();
                            sterge_userbooks.Parameters.Clear();
                            //Scad numarl de carti disponibile pentru cartea imprumutat
                            //adaugCarti.Parameters.AddWithValue("@bookid", bookidi);
                            adaugCarti.Parameters.AddWithValue("@bookid", bookidi);
                            adaugCarti.ExecuteNonQuery();
                            adaugCarti.Parameters.Clear();
                        tranzactie.Commit();
                    catch (Exception ex)
                        tranzactie.Rollback();
                        MessageBox.Show(ex.Message);
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            public Imprumut()
                InitializeComponent();
                try
                    con.Open();
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
                Completez_Combo_User();
                Completez_CheckList_Carti();
                Completez_CheckList_Cartires();
                //selecteaza_carti_utilizator();
                //  Initializez termenul din dateTimePicker la data de peste 15 zile fata de data sistemului
                termenul.Value = System.DateTime.Now.AddDays(15);
            private void imprumuta_Click(object sender, EventArgs e)
                Confirmare c = new Confirmare("Confirmati imprumutul?");
                DialogResult dr = c.ShowDialog();
                if (dr == DialogResult.Yes)
                    try
                        Inregistrez_imprumut_in_BD();
                        MessageBox.Show("Imprumutul a fost inregistrat");
                        //Dupa inregistrarea imprumutului o parte din carti nu mai sunt disponibile pentru imprumut
                        //Reincarc in CheckList cu Carti noua lista cu carti ramase dupa imprumut
                        //Pentru asta "resetez" datele din dataTable cartiT (sursa pentru carti.DataSource)
                        CartiTabel.Clear();
                        adaptCarti.Fill(CartiTabel);
                        CartiImprumutateTabel.Clear();
                        adaptCartiImprumutate.Fill(CartiImprumutateTabel);
                    catch (Exception ex)
                        MessageBox.Show(ex.Message);
                if (dr == DialogResult.No)
                    MessageBox.Show("Imprumutul NU a fost inregistrat");
                    imp.ClearSelected();
                    //deselecteaza cartea selectat
                    foreach (int i in imp.CheckedIndices)
                        imp.SetItemChecked(i, false);
                    //debifeaza cartile bifate
                //if (imp.CheckedItems.Count > 0)
                //    //res.Items.Clear();
                //    foreach (string str in imp.CheckedItems)
                //        res.Items.Add(str);//adauga in partea cealalta, imprumuta
                //    while (imp.CheckedItems.Count > 0)
                //        imp.Items.Remove(imp.CheckedItems[0]);
            private void restituie_Click(object sender, EventArgs e)
                Confirmare r = new Confirmare("Confirmati restituirea?");
                DialogResult dr = r.ShowDialog();
                if (dr == DialogResult.Yes)
                    try
                        Inregistrez_restituire_in_BD();
                        MessageBox.Show("Restituirea a fost inregistrata");
                        //Dupa inregistrarea imprumutului o parte din carti nu mai sunt disponibile pentru imprumut
                        //Reincarc in CheckList cu Carti noua lista cu carti ramase dupa imprumut
                        //Pentru asta "resetez" datele din dataTable cartiT (sursa pentru carti.DataSource)
                        CartiTabel.Clear();
                        adaptCarti.Fill(CartiTabel);
                        CartiImprumutateTabel.Clear();
                        adaptCartiImprumutate.Fill(CartiImprumutateTabel);
                    catch (Exception ex)
                        MessageBox.Show(ex.Message);
                if (dr == DialogResult.No)
                    MessageBox.Show("Restituirea NU a fost inregistrata");
                    res.ClearSelected();
                    //deselecteaza cartea selectat
                    foreach (int i in imp.CheckedIndices)
                        res.SetItemChecked(i, false);
                    //debifeaza cartile bifate
                if (res.CheckedItems.Count > 0)
                    foreach (string str in res.CheckedItems)
                        imp.Items.Add(str);
                    while (res.CheckedItems.Count > 0)
                        res.Items.Remove(res.CheckedItems[0]);
            private void button2_Click(object sender, EventArgs e)
                con.Close();
                this.Close();
            //private void selecteaza_carti_utilizator()
            //    res.Items.Clear();
            //    MySqlCommand selectcart = new MySqlCommand("select title from books,userbooks where userbooks.userid='" + user.SelectedValue.ToString() + "' and userbooks.bookid=books.bookid", con);
            //    MySqlDataReader reader = selectcart.ExecuteReader();
            //    try
            //        while(reader.Read())
            //            res.Items.Add(reader["title"]);
            //    catch(Exception ex)
            //        MessageBox.Show(ex.Message);
            //    finally
            //        reader.Close();

    Hello Vincenzzo,
    This issue seems to be a window form UI implemented related issue, for this i suggest that you could ask it to the windows form forum:
    http://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winforms
    The current forum you posted to is used to discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.
    Regards.
    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.

  • In Lookout, how can I make the equivalent of a "4 changes per day" set-back thermostat?

    Ok... I need some help here....
    I have a Pot_TSP (Temperature setpoint) that uses a PLC register as its remote source. I added a night-time temperature setback feature by adding a "DAYTIME" expression as a permissive, and tying two new Pots (Pot_SP1 and Pot_SP2) to Pot_TSP's "reset value" :       NIF(Expression_Daytime, Pot_SP1, Pot_SP2). 
    Client now wants this increased to 4 optional temp changes per day, just like a household 7-day programmable T-stat. Adding the additional conditions to the "reset" parameter was easy; one extra TimeOfDay timer for each temperature Setpoint change, arranged as "OR" functions. Each time the clock hits one of these TOD targets, Pot_TSP gets "reset" and the "reset value" gets written to it. Here's where I start to bog down... How do you arrange this so that when one of the 4 TOD targets goes "true", its corresponding SP value gets written to Pot_TSP? The closest I've been able to get is this: make a new Pot (Pot_X) with a min of 1 and a max of 4 and use a NCHOOSE to select which of the 4 Temp setpoint Pots Pot_X will use as the (next) SP. If I rotate Pot_X and the clock hits a TOD target, a value corresponding to the selected Pot gets written to Pot_TSP. 
    So can someone please tell me how to get Pot_X to align itself with the TOD events? I can get a limping model if I slave the NCHOOSE function to a Counter object, but if the customer has Lookout turned off or disconnected long enough to miss one of the events, Pot_X will go out of sync. Same goes for incrementing the Pot object. Can't allow that...
    Since the clock never stops and only hits each TOD once every 24 hours, there would never be more than one of the 4 TOD conditions true at one time... is there a way to build an expression object (or the like) to ultimately produce a numeric (the Pot_TSP value) using the following logic: If TOD1 is true, return Pot_SP_1;  If TOD2 is true, return Pot_SP_2, If TOD3 is true, return Pot_SP_3; If TOD4 is true, return Pot_SP_4   ????
    Thanks guys.
    G

    Hi Ryan
    Thanks again for your input! I'm more comfortable with the DataTable object (now that it's become more familiar), and thanks to you I now have a DataTable constructed for one zone (7 rows for the days-of-the-week, and 16 columns for the variables). Displaying of the cell data, cursor navigation, and reading/writing to the Pots' remote position source (in other words the actual GUI) work just fine. In order to expedite completion of the project for which this DataTable is intended, I am at a point where I am prepared to clone the DataTable 3 times to get 4 zones (that's one panel), then clone that result times the number of panels the site has....but I'd like to run this by you first:
    Unless it's contrary to "best practices", should I do as above, or try to further multiplex the DataTable I already have by adding to it the other three zones? The Table I have now serves one zone; can it be expanded to serve (dare I suggest it) one panel (4 zones)? If you recall, I started out thinking I'd need one dedicated Pot for each variable in each zone (16) times 7 days = 96; using the DataTable, the cursor replaced the d-o-t-w so the number of Pots needed dropped to 16. My point: if I have to make separate DataTable objects for each zone, I also need to make 48 more Pots to serve them (which I'm obviously trying to avoid). Then I have to repeat this times the number of panels on site. I'm guessing that adding 3 more zones to the existing (one zone) DataTable is no problem since there's plenty of room left... 
    But would you add them as columns (to keep the cursor consistent across the zones) or add them as rows (to keep the columns consistent across the zones)? 
    If added as columns, can I avoid making those extra 48 Pots? Can I make my existing 16 Pots read/write to multiple columns, like change the Remote Source for Pot_Temp_SP_1 from "..\DataTable.B" to something like "nchoose(Pot_Zone_Selector,..\DataTable.B,..\DataTable.R)" where columns B and R contain Temperature setpoint values for Zones 1 and 2 respectively?
    If added as rows, I'm guessing I don't have to make those extra 48 Pots. But what's the best way to deal with the cursor? Should I be looking at multiple cursors (one for each zone)?
    I should also point out I've been using only L3 Pots since "normal" Pots won't accept an expression as a remote position source; if I change this to regular Pots coupled with SymbolicLinks, does it change the picture at all?
    ...and I'm using Ver 6.0.2
    Thanks,
    George

Maybe you are looking for

  • Clipping in Photoshop CS3 rendered Differently in Lightroom 1.4.1

    I called Adobe Tech Support in an attempt to get an answer to my question about why Lightroom (version 1.4.1) seems to show more clipping of an image than viewing clipping of the same image in Photoshop CS3 by using a curves adjustment (show clipping

  • Help for a massive dreamweaver noob...

    Hey guys hows it going! Will probably be bothering you with questions that will to most of you guys seem quite stupid, sorry in advance, over the coming months... So here is question number 1 which I cant quite figure out at the moment, well, its a t

  • SPDIF output broken with alsa (Xonar D2 card)

    Hi, since the last time I used the SACD player, foobar2000 under wine, I get no sound from my digital port. The config had been working for a few years by then, and usually foobar gets in the way of other applications using alsa, but when the applica

  • Sharepoint designer 2010 32 bit error when trying to create a workflow

    Windows 7 64 bit enterprise pc's with sharepoint designer 32 bit see these errors when trying to create a workflow on any Sharepoint 2010 farm - dev and production "The list of workflow actions on the server references an assembly that does not exist

  • Adobe Reader Help issue

    The issue happens to all adobe reader and standard versions which are version X and above, the solution available in http://helpx.adobe.com/acrobat/kb/error-online-help-content-cannot.html helps but its very slow to get to help feature and happens to