"Boolean" arguments and mutability

Hi All,
I've come across an issue passing Boolean arguments into methods. Basically the problem is that the method needs to take Boolean values and then return those values, as well as other values. i.e:
public SomeClass myMethod(Boolean bool1, Boolean bool2){ ... }
The problem is that because Booleans are immutable, it's not possible to change their value inside the method. Also, since the method is already returning a value it's not really feasible to return an array of arguments. I could potentially put all of the arguments in an object array / collection or something ugly like that but that seems like a fairly poor solution. At the moment the best option seems like coding a mutable version of Boolean.
My question is - is there a better way to accomplish this? If not, should the java language be modified to support mutable Booleans either by changing 'Boolean' or by adding a new class?

Encephalopathic wrote:
MJ_ wrote:
The problem is that because Booleans are immutable, it's not possible to change their value inside the method. And you shouldn't try to do this anyway. That would mean that your method was producing a "side-effect", and this is not desired.
Maybe, but you could then argue that for any object that's passed as an argument. I'm not sure that's a valid reason not for the functionality to exist.
Also, since the method is already returning a value it's not really feasible to return an array of arguments. I could potentially put all of the arguments in an object array / collection or something ugly like that but that seems like a fairly poor solution. At the moment the best option seems like coding a mutable version of Boolean.This doesn't make any sense. If you need to return a bunch of things, you create a class to hold these things. If the booleans within your return object need to be different, then you create new boolean variables within your method and add those to the returning object. By the way, why are you using Booleans here and not booleans? Is there a definite need for the wrapper object and not the primative?Yes, creating a class with the return values is also an option. Still a bit kludgy though as I wouldn't use it for anything else.
My question is - is there a better way to accomplish this? If not, should the java language be modified to support mutable Booleans either by changing 'Boolean' or by adding a new class?I think you may need to rethink your basic program design. You can start by telling us what you are trying to accomplish here in a general, non-programmatic sense.Well, the gist is that there's a method that's comparing objects in two collections. The return value is the result of that comparison. There are two boolean values which are passed to the method, and they are used to say whether to iterate forward to the next entry in each collection. I'm happy to rethink the design, so long as it doesn't require much rework (since the method already works and breaking it would be a bad thing)

Similar Messages

  • Immutable and mutable object

    Here I want to post some solutions to immutable and mutable objects. First I'll brifely discribe the case when only one type (immutable or mutable) is need accross the application. Then, I'll describe case when both types is using. And finally, the case when only some object can modify this object, while for others it is immutable one. That will be illusrated on the objects discribing current date as number milliseconds from Zero Epoch Era (January 1, 1970).
    Let's start from an exampe for Immutable Object.
    public final class ImmutableDate {
        private final long date;
        public ImmutableDate(long date){
             this.date= date;
        public long getDate(){
            return date;
    }The class is final, so it is imposible to extend it (if it is possible to extend it, it will be possible to add some mutable data-members to the class. Data-member is final to avoid changing (if it is Object it is just warning to programmer not to change it, compiler just can check that reference wasn't changed, but state of this data-member can be changed). There is no method that returns reference to the data-member outside the ImmutableDate. (if data-member was immutable object,it would be possible to return refference to it, if data-member was mutable object and it was possible to revieve reference to it, than it was possible to change the state of data-member through setter function).
    Now, lets consider that we need only MutableDate. The implementation is obvious:
    public  class MutableDate {
        private long date;
        public MutableDate (long date){
             this.date= date;
        public long getDate(){
            return date;
        public void setDate(long date){
          this.date=date;
    }This is regular class.
    The question is how what should I do in the case I need both[b ]Mutable and Immutable Object. It is possible to use the above way of implementation. But there are following problems wih this:
    * Code is not re-usable. For example, getDate() is implemented twice.
    * Implementation is closed to the interface.
    * There is no abstraction such a Date. Usable, when we doen't care whether object is mutable or immutable.
    It will be also nice to have a mechanism to recieve immutable copy from any object. It can be implemnted as getImmutableDate() function. This function is usable, when we have Date object (or MutableDate) at hand and want to store it in HashMap. So immutable copy is needed. It also usable as deffencive copy of MutableDate, if want one to transfer Date to simebody we don't want to change the state.
    Second and third points leads us to declare interfaces:
    public interface Date {
      public long getDate();
      public ImmutableDate getImmutableDate(); 
    public interface ImmutableDate extends Date  {
    public interface MutableDate extends Date {
      public void setDate(long date);
    public final class ImmutableDateImpl implements Date, ImmutableDate {
    public class MutableDateImpl  implements Date, MutableDate {
    }Lets talk more on the first point. In this short example it will look like it is not bug disadvantage. But think, that there are ten data members and setting other value isnot trivvial (for example, other private data members should be recalculated) and you'll realise that this is a problem. What solution OO proposed in such a cases? Right, inheritance. But there is one pitfalls here. Immutable object has to be final (see explanation above). So the only way to do this is to define some new class and inherit from him. It will be look like the following:
    abstract class AbstractDate implements Date  {
       protected long date;
       public AbstractDate(long date){
         this.date=date;
       public long getDate(){
         return date;
    public final class ImmutableDateImpl extends AbstractDate implements Date, ImmutableDate {
      public ImmutableDateImpl(long date){
        super(date);
      public final ImmutableDate getImmutableDate(){return this;}
    public class MutableDateImpl extends AbstractDate implements Date, MutableDate {
      public MutableDateImpl(long date){
        super(date);
      public void setDate(long date){
        this.date=date;
      public final ImmutableDate getImmutableDate(){
        return return new ImmutableDateImpl(date);
    }Note that AbstractDate is declare package-private. It is doing to avoid casting this type in the application. Note also that it is possible to cast immutable object to mutable (interface MutableDate doen't extends ImmutableDate, but Date). Note also that data memer is
    protected long date;That is not private, but protected and not final. It is a cost of getting re-usability. IMHO, It is not big price. Being protected is not a problem, IMHO. Final is more for programmer, rahter than to compiler (see explanation above). Only in the case of primitive data type compiler will inforce this. programmer can know, that in he shouldn't changed this value in AbstractDate, and ImmutableDate, and he can do it only in MutableDate.
    I want to write some words about getImmutableDate() function. This function is usable, when we have Date object (or MutableDate) at hand and want to store it in HashMap. So immutable copy is needed. It also usable as deffencive copy of MutableDate, if want one to transfer Date to somebody we don't want to change the state.
    Let consider the following scenarion. We are writting a game, say chess. There are two players, that plays, desk where they play, and environmemnt (arbiter) that enforces rules. One of the players is computer. From OO point of view the implementation has to the following. There is Desk that only Environment can modify it. ComputerPlayer has to be able only to view ("read") the Desk, but not to move figute ("write"). ComputerPlayer has to talk with Environment what he want to do, and Environmnet after confirmation should do it. Here desk is immutable object to everyone, but Environment.
    If we go back to our Date, the implementation of this scenario could be
    interface AlmostImmutableDate extends Date {
      public void setDate(long date);
    public class Class1 {
      public static ImmutableDate getImmutableDate(long date){return new AlmostImmutableDateImpl(date);}
      private static class AlmostImmutableDateImpl implements Date, ImmutableDate/*, AlmostImmutableDate*/ {
        private long date;
        public AlmostImmutableDate(long date){
          this.date=date;
        public long getDate(){
          return date;
        public void setDate(long date){
          this.date=date;
        public final ImmutableDate getImmutableDate(){
          return this;
    } Which such implementation only Class1 can modify AlmostImmutableDateImpl. Others even don't know about existance of this type (it is private static class).
    It is possible to extends somehow to the case, when not one object, but (a little) group of object can modify Date. See the code above with uncommented part. One way to this is to difine new interface, say AlmostImmutableDate, with package-private scope. AlmostImmutableDateImpl will implements this interface. So, all object that has the same package as AlmostImmutableDate will can to cast the object to this type and modify it.
    Note, that AlmostImmutableDate has to extend Date interface (or ImmutableDate), but not MutableDate! If it will extand MutableDate, than it wiil be possible to cast to MutableDate in any package.
    If there is no MutableDate object in the application, so AlmostImmutableDate is unique. If there is MutableDate object in the application and we want to construct such almost immutable object, so copy&paste is needed to declare AlmostImmutableDate interface.
    Summary.
    It is difficult to define really pair of immutable object and mutable object in Java. Implementation consuming time and not very clear. There are many points to remember about (for example, data-member is not final, or order of inheritance, immutable object has to be final, and so on).
    I want to ask. If these solutions are complete? That is, it is not possible to modify immutable object or almost immutable objects not in the package of AlmostImmutableInterface. Not using reflexion, of course.
    Is these solutions are not to complicated?
    What do you think about delcaration of the third class AbstractDate? Has it to implement date? Perhaps, it is possible to define Date as abstract class (as AbstractDate was)? What do you think about definning
    protected long date;in AbstractDate?
    What do you think about function getImmutableDate() defined in Date interface? Perhaps, it should be declared in other place (even other new interface) or shouldn't be delcare at all?

    It seems to me that you are over thinking the problem:
    Why not just:
    public interface Date {
        long getDate();
    public interface MutableDate extends Date {
        void setDate(long);
    public class ImmutableDate implements Date
        final long date;
        public ImmutableDate(long date){
             this.date= date;
        public ImmutableDate(Date date){
             this.date= date.getDate();
        public long getDate(){
            return date;
    public class ModifiableDate implements MutableDate
        final long date;
        public ModifiableDate(long date){
             this.date= date;
        public ModifiableDate(Date date){
             this.date = date.getDate();
        public long getDate(){
            return date;
        public void setDate(long date){
            this.date = date;
    }

  • How to add arguments and switches to AUT

    Hi,
    Usually when I start my AUT from terminal, I will use command like for example
    $ ./appname.bin
    This is internally called from RCPTT when it calls AUT. But some times I have to pass some arguments and switches. How shall I do that? Take for example the following,
    $ ./appname.bin -data @NoDefault
    How can call my AUT using these parameters or arguments and switches?
    Kindly let me know.
    Thanks
    Jeevan

    Hi Ulyana,
    I am not clear about what that link is about to say and I am not able to get my desired output using that. I don't want to pass VM arguments. I want to pass a Runtime Configuration argument which changes the behaviour of my application when I pass -data @noDefault while calling it.
    For example:
    When I call it "./appname.bin it opens normaly with an already default workspace
    When I call it "./appname.bin -data @noDefault" it will not take any default workspace and will ask me for choosing an workspace
    Hi Matias,
    I can do that, but I want to do this only for one particular test case and not for the entire AUT.
    Kindly let me know how to solve this.
    Thank you all
    Jeevn

  • Startup Classes w/ Arguments and Startup Order

    Hi,
    I know we can control the order of startup classes by specifying them in a
    comma delimited list like this:
    weblogic.system.startupClass.a=class1,class2,class3
    Now what if class1 and class2 have several startup arguments that I need to
    pass??? I would hate to think that I'll have to write my own startup
    manager just to do this one simple thing?
    So... if anyone knows how to specify startup arguments AND control the order
    of startup classes please let me know...
    Thanks in advance,
    Stephen Earl
    SmartPoint, Inc.

    Hi Don,
    I've attempted to mirror the functionality of the Weblogic startup system
    with no success. Basically I have an xml document specifying the startup
    specifications much like the WL startup system (ie. Description, ClassName,
    Args). To mirror the WL system I apparently need access to StartupThread
    which, like most other WL classes, is undocumented and unexposed for use.
    How would you suggest implementing such functionality??? Considering that
    I'd like to have similar functionality to the current system (ie.
    T3StartupDefs, RMI Servers, etc.) how can I and any other BEA customer
    achieve this short of rewriting the startup mechanism???
    Stephen Earl
    SmartPoint, Inc.
    "Don Ferguson" <[email protected]> wrote in message
    news:[email protected]...
    I have looked over the source code for startup classes and how thearguments
    are processed, and I'm afraid I don't see any mechanism to accomplish what
    you want, i.e., to specify the order that startup classes are executed,
    and provide names-value pairs that are associated with each class.
    You might have to come up with your own mechanism for associating
    arguments with startup classes.
    Anne-Katrin Schroeder-Lanz wrote:
    well, if you absolutely must have identically named args for each class,
    then you're stumped. should you be able to extract any kind of support
    from
    BEA here, I'd appreciate a notification, since we've got the sameproblem to
    deal with.
    happy hacking, anne
    Anne-Katrin Schroeder-Lanz
    Development
    memIQ AG
    T: +49-89-45639-19385
    F: +49-89-45639-33-385
    mailto:[email protected]
    "Stephen Earl" <[email protected]> wrote in message
    news:[email protected]...
    OK... and now say that I have a startup argument called RETRIES. This
    argument needs to be 10 for startup class A and 20 for startup class
    B.
    Now
    way I can see to handle this situation.
    BEA... I've logged a production 3 case regarding this issue and have
    not
    even received an initial response from support. Hello... Hello...
    Steve...
    "Anne-Katrin Schroeder-Lanz" <[email protected]> wrote in message
    news:[email protected]...
    hi,
    just use the startArgs as documented on the list of startup classes
    and
    pass
    a collective list of args, e.g.:
    weblogic.system.startupClass.<logical_name>= xxx.yyy.Foo,
    xxx.yyy.Bar
    weblogic.system.startupArgs.<logical_name>= arg4Foo=some_value,
    arg4Bar=another_value
    hth,
    cheers, anne
    Anne-Katrin Schroeder-Lanz
    Development
    memIQ AG
    T: +49-89-45639-19385
    F: +49-89-45639-33-385
    mailto:[email protected]
    "Stephen Earl" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I know we can control the order of startup classes by specifying
    them
    in
    a
    comma delimited list like this:
    weblogic.system.startupClass.a=class1,class2,class3
    Now what if class1 and class2 have several startup arguments that
    I
    need
    to
    pass??? I would hate to think that I'll have to write my own
    startup
    manager just to do this one simple thing?
    So... if anyone knows how to specify startup arguments AND controlthe
    order
    of startup classes please let me know...
    Thanks in advance,
    Stephen Earl
    SmartPoint, Inc.

  • Desktop search engine: boolean search and highlighting hits

    On Windows I had dtSearch to search the desktop (www.dtsearch.com). Is there something similar for Mac OS? I have already tried out several apps. DEVONsphere Express provides boolean search, Insider has preview, but the preview doesn't work with binary files as "DOC" etc.
    DtSearch allows sophisticated boolean search and provides a very performing preview with highlighted hits. It works with many types of files, including including Office, different email-applications etc. dtSearch allows also to limit the search on a selection of folders and/or files. Unfortunately, there is apparently no Mac OS Version of dtSearch.

    Some of the free or cheap seach apps match with my boolean search needs. None of them hights the hits in a preview. That's my issue: I want to have a preview with highlighted hit. I want to jump from hit to hit with lightening speed.
    Now I have found out that DEVONthink Pro Office is a program for Mac which is similar to dtSearch. It costs a bit less, but also about $ 150.
    DEVONthink works quite well. Only the boolean NEAR-function has to be improved. "term1 NEAR term2" highlights all the term1 and term2, not only the ones which are close to each other.

  • Sync boolean data and clock outputs

    Hi ppl.
    I was hopping someone could help me with a sync problem:
    a) I want to output a counter (pulse train) using the USB-6289 board internal counter (clock);
    b) I want to output a boolean array (data);
    c) The outputs should be in sync, and the 16-bit word should output in full;
    I have got the a) and b) parts working, I believe, however the c) part, when I run the vi in continuous mode, the pulse train with the counter works fine, but the boolean
    array just assumes the "1" value (I see this in my Logic Analyzer) and maintains this value throughout the whole time...What am I doing wrong in this part?
    I have attached my vi and a printscreen of the boolean data and code.
    Thanks in advance fot the reply.
    Hardware: USB-8289
    LabVIEW v8.5
    Cheers
    Attachments:
    test1.vi ‏32 KB
    untitled2.JPG ‏187 KB

    1.  Wire up your error wires.
    2.  Don't ever use Run Continuous.  It is only there for debugging purposes.  Put a while loop around your code and use a Stop button to stop the while loop.  Any code that should happen only at the beginning such as creating tasks or clocks should occur before the while loop.  Code that should occur on at the end such as clearing tasks should occur after the while loop.
    3.  Perhaps you want to use continuous samples rather than finite?
    4.  Look through all the DaqMX examples.  There might be one that better describes how to link the timing of one task to another.  I'm not an expert in DAQ, so I'm not sure if everything is set up properly.

  • Regular expressions with boolean connectives (AND, OR, NOT) in Java?

    I'd like to use regular expression patterns that are made up of simple regex patterns connected via AND, OR, or NOT operators, in order to do some keyword-style pattern matching.
    A pattern could look like this:
    (.*Is there.*) && (.*library.*) && !((.*badword.*) || (^$))
    Is there any Java regex library that allows these operators?
    I know that in principle these operators should be available, since Regular languages are closed under union, intersection, and complement.

    AND is implicit,
    xy -- means x AND yThat's not what I need, though, since this is just
    concatenation of a regex.
    Thus, /xy/ would not match the string "a y a x",
    because y precedes x.So it has to contain both x and y, but they could be
    in any order?
    You can't do that easily or generally.
    "x.*y|y.*x" wouldll work here, but obviously
    it will get ugly factorially fast as you add more
    terms.You got that right: AND means the regex operands can appear in any order.
    That's why I'm looking for some regex library that does all this ugly work for me. Again, from a theoretical point of view, it IS possible to express the described semantics of AND with regular expressions, although they will get rather obfuscated.
    Unless somebody has done something similar in java (e.g., for C++, there's Ragel: http://www.cs.queensu.ca/~thurston/ragel/) , I will probably use some finite-state-machine libraries and compile the complex regex's into automata (which can be minimized using well-defined operations on FSMs).
    >
    You'd probably just be better off doing multiple
    calls to matches() or whatever. Yes, that's another possibility, do the boolean operators in Java itself.
    Of course, if you
    really are just looking for literals, then you can
    just use str.contains(a) && !str.contains(b) &&
    (str.contains(c) || str.contains(d)). You don't
    seem to need regex--at least not from your example.OK, bad example, I do have "real" regexp's in there :)

  • Compiler error with default arguments and static template function

    Hi 
    The following does not compile with visual studio 2010 sp1, and compiles with gcc.
    #include <string>
    class A
    public:
       template<class T>
       static T& Get(const std::wstring&);
    class B
     public:
      void f(
        double d,
        double c =A::Get<double>(L"test"));
    int main()
        B b;
        b.f(5);
    It gives me the following error 
    error C2783: 'T & A::Get(const wchar_t *)' : could not deduce template argument for 'T'
    If I change Get to be global function and not static function of A, it compiles.

    It seems to be a compiler bug.  It fails in VS2012, but compiles in VS2013.
    For completion sake, the problem exists if A is a namespace containing Get.  But not if Get is global.
    The only solutions I can see are try to workaround the problem (make Get global) or upgrade to a newer version of VS.

  • How to implement boolean comparison and event structure?

    Hello all,
    I'm currently developing an undergraduate lab in which a laptop sends out a voltage via USB-6008 to a circuit board with an op-amp, the voltage is amplified, and then sent back into the laptop. The student is going to have to determine an "unknown" voltage which will run in the background (they can do this by a step test, graph V_in vs V_out and extrapolate to the x-axis).
    Currently, I have two loops that are independent in my VI. The first loop is used to "Set the zero." When 0 voltage (V_in) is sent out of the laptop it returns a value around -1.40V (V_out) typically. Thus, I created the first loop to average this value. The second loop, averages the V_out values that come into the laptop as the V_in numeric control changes. Then I take the "set zero" value from the first loop and subtract it from the second loop average to get as close to 0V for V_out when V_in is 0V.
    The problem I'm facing is, the event structure waits for the V_in numeric control value change, but after "SET ZERO" is pressed, if there is an unknown value, it will not be added to the average for V_out until V_in is changed by the user. So, I tried implementing a comparison algorithm in the "[0] Timeout Case." This algorithm works for step tests with positive values for V_in, but there are two problems.
    1) Negative values cannot be used for V_in
    2) If a user uses increasing positive values for V_in there is no trouble, but if they try to go back to 0, the value change event has been called and it is added to V_out as well as the timeout case.
    Sorry for the extremely long post, but I've been banging my head over this and can't figure out how to properly implement this. I'm using LabVIEW 8.0.
    Attachments:
    Average Reset Test.vi ‏371 KB

    OK you have bigger problems than Raven's Fan is pointing out.
    When the first event loop stops ( after pressing "") (the boolean text is "Set Zero")  The second loop may start- (AND PROCESSES all of the events it was registered to process before the loop started!)  that would enclude the value change event from "" (The boolean text is Stop) Being pressed bebore the loop started.  Of course, since the labels of "Set Zero" and Stop are identical nulls....................................................BOTH event trigger at the same time and are processed as soon as the event loop they are registerd to is available.
    Get it ... The two buttons labeled "" both queue Value change events to both loops registered to act on the value change of the control labled ""!
    Both loops will do what you programmed in the case of "" Value Change!  This can, (as you have observered) lead to confusing code actions.
    Do avoid controls with duplicate labels (There is a VI Analizer test for that!)  Do avoid multiple event structures in the same hierarchy. 
    DO NOT bring this to your studients to help you learn LabVIEW!  We get enough studii asking embarassing questions
    VI Analizer will help you provide sound templates.  If you need help with that hit my sig line- e-mail me and I'll always be willing to help.
    Jeff

  • Search problems : Boolean expressions and spam folder

    I get about 1000 spam per day that I have to check.
    Some of them contains certain keyword that the real emails would never have.
    I would like to setup a smart folder or similar that found all emails in the spam folder that contains any of those keywords. I read some blogs etc. that said that spotlight boolean expressions could be used but they do not seem to work.
    e.g. "pill OR berry" yields no results at all but when each of the keywords are used on their own they produce 80 or so results each.
    Another problem I have is that I can do a manual search in the spam folder by typing in the search field and it yields results. But if I save that as a smart folder it yields no results at all. It seems that the rules do not work on the spam folder.
    I then tried to do all this from spotlight in the finder. I found the folder where the spam mailbox emails are stored (called "messages"). I managed to construct a nice search query and save it as a search. But if I delete one of the emails from the finder it still remains in Mail and the next time I start Mail it will be regenerated from somewhere.
    Anyone have any insights to provide here?

    I had actually missed that preference. Unfortunately it did not help.
    Even if I make a new smart mailbox with just one rule (the email must be in the spam folder) it doesnt work. It doesn't matter if I change between any/all either.
    I started experimenting with adding a rule saying that the email must not be in any of the other mailboxes but spam. That seemed to work for a bit but as I added more rules, excluding more mailboxes, it eventually broke. I will investigate it a bit more but currently don't have high hopes...

  • Can I use Boolean parameters and 'is empty ' in smart groups & mail rules?

    How do you do the following smartgroup in Mail? State is MA or NH or ME and Email is not 'empty'? I also would like to make the following rule in Mail: If FROM is 'empty' and Subject is 'empty' then move to Trash. In other words is it possible to use invisible charakters <blank> or <empty> and boolean parameters in search fields. Any hits will be appreciated. ---Stefan

    I have the same question, plus a couple more. Most of the spam that I get follows one of five simple patterns:
    1. It contains one or more empty fields (to, from, subject, or message body),
    2. It sometimes lacks a "from" or "subject" field entirely.
    3. Mail recipients are sequential (e.g. [email protected], [email protected], [email protected]).
    4. Total message size is 0.7 KB or less. (Due to empty fields.)
    5. It contains a gif or jpeg touting whatever product the spammer is flogging.
    It seems like it would be trivial to incorporate filter rules to take care of empty or non-existent fields (categories 1 and 2). But I can't see a way to do that in Mail currently. Hopefully Apple is working on this? Or maybe there's a third-party add-on that can address this?
    Also it would be easy to take care of #3 with the use of simple grep expressions. But I don't think Mail can do this yet. (Again, any third-party solutions out there?)
    For #4, obviously a rule that could take into account message size would help deal with those emails.
    And for #5, it's more problematic, but since there are programs out there that can read graphics, hence the need for captcha "encryption" on web sites, why not use such an app as a Mail extension? It would be great if it could interoperate with Mail's rules, so you could set up something like "if message contains a jpeg or gif and if the image contains 'penile enlargement' then delete/put in junk folder."
    Currently I put all messages with attachments (that haven't already been approved by my whitelist) in a "limbo" folder for later review. But I have to use a minor kluge to do this. Ideally I'd just say "if message has an attachment" or "if message attachment is not empty," but those options aren't available so I have to say "if name of attachment contains '.'" Since pretty much all files have a "." in them, it seems to work fine, but strictly speaking it's not as elegant as I'd like it to be.
    iMac G5 iSight, Powerbook Ti   Mac OS X (10.4.5)  
    PowerBook G4 (Ti)   Mac OS X (10.4.1)  
    iMac G5 iSight, Powerbook Ti   Mac OS X (10.4.5)  

  • Boolean attributes and SQL column types

    I have a MS SQL database table I am managing with SIM. One of the attributes needs to represent a boolean value. In my schema, the attribute is:
    <AccountAttributeType id='17' syntax='boolean'
                          name='foreignStudent' mapName='Foreign_Student'
                          mapType='string'/>which is what is generated when editing the Resource Schema through the administrative UI.
    What data type should I be using for the column in SQL? I have tried bit, tiny int and char(1), but am always seeing the same issue. When I save the user, the accounts[...].foreignStudent is true, and SIM sets the value in the database column to 1 (or '1'). But when I open the user again, accounts[...].foreignStudent is read in as false, and so SIM thinks it needs to update the resource.
    Same thing happens if I try a mapType='boolean' or mapType='integer'.
    Thanks in advance!

    Thanks, Paul, but although I have some flexibility in the database design, I need the column to hold either a 0/1 or F/T.
    I have worked around it by treating it as an int and not a Boolean, and making sure I just assign values of 0, 1 and null. But I am curious to know if anyone has successfully mapped a boolean attribute type to a SQL bit type rather than varchar(5)...

  • Remote start arguments and nodemanager

    Hi,
    if we provide the value '-ms96m -mx128m' for 'Arguments' under <domain>-Servers-<server>-Configuration-Remote
    Start we get the following error:
    <BaseProcessControl: saving process id of Weblogic Managed server 'condor-1',
    pid: 16388>
    Error occurred during initialization of VM
    Incompatible initial and maximum heap sizes specified
    Child exited
    Without any arguments the server starts with the heap-configuration of the nodemanager.
    How do we have to provide a different setting?
    Btw. we had to change the startNodeManager.sh-script to get things running. Without
    exporting CLASSPATH and PATH we were unable to start java with an ld.so.1-error.
    Regards,
    Christian
    WLS 6.1sp1, Solaris 2.6

    Hi,
    if we provide the value '-ms96m -mx128m' for 'Arguments' under <domain>-Servers-<server>-Configuration-Remote
    Start we get the following error:
    <BaseProcessControl: saving process id of Weblogic Managed server 'condor-1',
    pid: 16388>
    Error occurred during initialization of VM
    Incompatible initial and maximum heap sizes specified
    Child exited
    Without any arguments the server starts with the heap-configuration of the nodemanager.
    How do we have to provide a different setting?
    Btw. we had to change the startNodeManager.sh-script to get things running. Without
    exporting CLASSPATH and PATH we were unable to start java with an ld.so.1-error.
    Regards,
    Christian
    WLS 6.1sp1, Solaris 2.6

  • Controlling the Boolean Controls and generating Numeric Output correspondingly

    Hello everyone,
    I am working on a project of electrode activation, here I was thinking that how could I control one electrode at a time and generate a numeric output of it correspondingly. I want to substitute each electrode with a an LED on Front Panel and generate numeric value of each LED on Block Diagram.
    So it can be divided into two parts
    1- Control the Boolean outputs
    Here, my target is that if I have 5 leds who are used as Boolean control, should be controlled in such a way that only one of them glows at a time and the remaining turns off.
    I mean that for instance if #3 was glowing and the user pressed #2 then #3 should be turned off and only #2 glows.
    2- Generating Numeric value correspondingly
    Then according to the position of LEDs I want to generate a numeric value correspondingly, like previously output 3 was coming and the output 2 comes when second LED glows.
    I request all the participants on this group to help me on it.
    Regards
    Solved!
    Go to Solution.

    Thanks very much Dennis, Its really what i need.
    But i have a bounding in the radio button to place all option together. 
    Since i am activating the appropiate electrode on the body, all the options could not come vertically or horizontally.
    So can you pls guide me how can i make my 5 electrode behave like a radio control.
    Thanks once again.

  • Boolean operators (and/or, etc.) in bridge spotlight search?

    Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right?
    I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways.
    Would be much obliged for any help, thanks!

    Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right?
    I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways.
    Would be much obliged for any help, thanks!

Maybe you are looking for

  • Issue with Hierarchies

    Hi , We are working on BO on top of BW pilot version and finding different issues with different tools. 1) Used existing BW queries/created universe.When we run the report using Web Intelligence, not able to get the way Hierachies displays in BEx.(Tr

  • How to get vendor text in PO header?

    The requirement is to put vendor text in vendor master (XK03) and in Purchasing screen -> extras->text. We have a Purchasing Memo as well as a "Purchase Order Text" which i fill up. I require that the "Purchase order text" field value from vendor mas

  • Ipad mini battery issues

    device is showing 100% chared while pluged in and 98% as soon as i remove the charger ? iOS 6.1.2 upgraded

  • Plant wise Vendor

    We have one Company code and one Purchasing organization and 9 Plants.Now i want to see Plant / Profit centre wise vendors list. Is there any specific T-code for Plant wise /Profit centre wise vendors? How to Process this requirement!

  • XML Processing in ABAP

    Hi, I need to load XML file into ABAP and then process data. Can I use call transformation for that?? My SAP version is 4.7 E(Basis 620). Is there any difference for SAP version 4.6C???? Thanks.