User Profile

Collapse

Profile Sidebar

Collapse
artov
artov
Last Activity: Dec 27 '10, 11:11 AM
Joined: Jul 29 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • artov
    replied to Implicit conversion
    Have you thought that your answer could be "I cannot do it, since there is no implicit conversion from string to int, since strings can contain characters that are not numbers"?
    See more | Go to post

    Leave a comment:


  • Do you mean something like:

    Code:
    public class Parent {
      public Parent(int arg1, int arg2) {...}
    }
    public class Child : Parent {
      public Child(int arg3, int arg4, string arg5) : base(arg3,arg4) {...}
    }
    See more | Go to post

    Leave a comment:


  • artov
    replied to Jagged array program
    I know, I am not allowed to answer these "solve my home work" questions, but..

    What do you mean by "static jagged array"? To me, jagged array is an (one dimensional) array, that has arrays as its elements. The element arrays can have different dimensions (i.e. they are jagged). How can you statically decide the jaggedness? Aren't each element created as needed, i.e. dynamically?
    See more | Go to post

    Leave a comment:


  • artov
    replied to Best way to store this type of data?
    in PHP
    What are these "Todays"? Why do you need them on both tables? Does it mean that you keep archive data of product information, i.e. what was price of a product at some todays, or what?
    See more | Go to post

    Leave a comment:


  • artov
    replied to generate pin numbers for patients
    in PHP
    You might like to check uniqid() function; it claims to generate unique strings. If you need to put the patients to some categories, the first argument might come in handy (it is a string that is attached to start of the id).
    See more | Go to post
    Last edited by Dormilich; Dec 21 '09, 10:45 AM. Reason: corrected function name

    Leave a comment:


  • It depends how you like to use the array. Small search with google gave this page: http://www.oracle.com/technology/sam...ind/index.html where the procedure is called once for each array element (the procedure inserts the values to a table).

    I do not know how the array call is implemented, but it might be, that the array is moved as a whole to the server and the server side calls the procedure for...
    See more | Go to post

    Leave a comment:


  • artov
    replied to how to pass string to database query?
    in PHP
    Yes, you could, but you do not like to. Study SQL injection (for example from http://en.wikipedia.org/wiki/SQL_injection) and use parameterized statements instead.
    See more | Go to post

    Leave a comment:


  • artov
    replied to C# cant make an object of my class
    You did not tell us how you called the constructor, but based on the error message, I assume something like



    which means that you are calling the Product constructor with no parameters. However, you do not have parameterless constructor, as the error message tells. Either create one (you can have several constructors with different number or types of parameters) or call the constructor with right parameters, like...
    See more | Go to post

    Leave a comment:


  • artov
    replied to Insert time
    You have also decide if you mean the time on the client or the server. If you are using the time in the client, you should use DateTime in C#, something like



    But if you mean server time, you should use

    So what is the difference? If the database and client are on the same computer, no much. But if there are several PCs as client, their clock differ somewhat, so it is better to use common clock, and server's...
    See more | Go to post

    Leave a comment:


  • artov
    replied to Pass null value to Guid Parameter
    Guid is a structure, so you cannot pass a null to your method. You either have to create a class that contains the guid as a field, or use Nullable<Guid> as the parameter.
    See more | Go to post

    Leave a comment:


  • artov
    replied to Marshal.SizeOf() is giving improper size
    in .NET
    If you use the plain struct, you allow the compiler to put the fields the way it likes. If you know how the data should be (and you seem to, since you know the real size), you should use tell it to the compiler with StructLayout attribute. I have used following when porting C code

    Code:
    [StructLayout(LayoutKind.Explicit)]
    public struct IDName
    {
        [FieldOffset(0)]
        public ushort Id;
        [FieldOffset(2)]
    ...
    See more | Go to post

    Leave a comment:


  • artov
    replied to Check the empty table
    There are two cases where zero comes on "empty table":

    1. If table's size is zero:

    Code:
    Type table[] = new Type[0];
    then Length property (table.Length) of the table is zero.

    2. When table is created, its elements contain default value of the Type. If the Type is numeric value, its default value is zero (either integer zero, floating zero or decimal zero). In a way, this kind of table...
    See more | Go to post

    Leave a comment:


  • artov
    replied to how can i show processing image
    If you know the size of the image beforehand, have you thought on using progress bar (in System.Windows. Forms, the ProgressBar class)? Update it each time you get more of the picture.
    See more | Go to post

    Leave a comment:


  • artov
    replied to What is "this" in object constructors?
    It is quite common to use same name for object's instances and parameters in constructors, like

    Code:
    public class Appointment
    {
       float duration;
       string name;
       DateTime time;
    
       public Appointment(string name, DateTime time, float duration)
       {
          this.name = name;
          this.time = time;
          this.duration = duration;
       }
    ..
    }
    ...
    See more | Go to post

    Leave a comment:


  • wastman
    wastman posted a Visitor Message for artov
    do you become a friend?
    See more | Go to post

  • artov
    replied to how to call a form in vb.net dynamically
    in .NET
    What do you mean by form name? Name property of the Control class or something else? And more important, what do you mean by calling form? Do you mean creating the form, and then sending ShowDialog or is the form already created, but possible hidden?
    See more | Go to post

    Leave a comment:


  • artov
    replied to double compare 0.2 != 0.2 How?
    Because 0.2 cannot be represented exact on floating point, value readed by the compiler and calculated from two double numbers (where 0.8 cannot also be repsesented exact), there has to be some differences.

    For online help, check http://www.h-schmidt.net/FloatApplet/IEEE754.html or read wikipedia.
    See more | Go to post

    Leave a comment:


  • artov
    replied to what is the difference in declaring this way
    For coding preferences, you might like to try Microsoft's StyleCop and FxCop.

    StyleCop recommends to drop the underlines, btw,
    See more | Go to post

    Leave a comment:


  • artov
    replied to string from c# to c++
    Is everything you receive garbage, or only the end? If the end, you might like to send not only the string, but its length also and use characters up to the length.
    See more | Go to post

    Leave a comment:


  • artov
    replied to line break in message box
    The \r\n works on Microsoft's implementation of C#. There are others, that might use \n (for example Mono on Linux). I have started to use Environment.New Line, since it knows what works on the system.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...