Using more than one expresion for if/else statements

hi im making a program that requires something to happen if 2 conditions are true. so its kinda like if (a = 5 /* whatever the AND operator is *\ b = 5)
i would really apreciate it if someone would show me an example of how to do this
thanks

if(a==5 && b==5)
would work too...people and their useless brackets...
now if you really want to blow someones mind, figure out what this does
if( (a==5 || (b==5 && a=6) ) || (a==3 && b==(a+2))){                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Has anyone used more than one event for one project?

    Hi,
    I have an opinion about Final Cut Pro X that hasn't changed since my first few days with it.  I waited to see if I would get used to it.  But, after a fair amount of time, I still am not comfortable with 'Events' and 'Projects'.  The separation of the media and projects creates more problems than solutions with my workflow.
    The purpose of it was to add flexibility for both the professionals and consumers using it, but my first impressions are still the same.  The new Event and Project system adds complexity to organization and archiving.  I wouldn't write this if it wasn't enough of a hindrance for me, that I encounter constantly.  I think the new Final Cut Pro X is incredible, but this issue is definitely important to me.
    Has anyone out there used more than 1 Event for 1 Project?  Some of us create more than 1 Project for an Event, to make different version of a video, or for brainstorming, or to make a part 1 and part 2 of a video, but I've never had more than 1 Event for 1 Project.  I don't need to use the media from multiple Events for the same Project.  And I've never used it for a reason.  I don't think someone will want to use their Hawaii vacation footage for a Denver vacation project, and a Florida vacation project.  I think we should bring back the connection between Events and Projects in a meaningful way. 
    This is a throw back to the older days, but that's not always a bad thing.  Let us keep our projects, or timelines, in the Events folder.  Make an area above the JPG section, and PNG section, and MOV section, and call it the Projects section.  Then we can easily find our Projects and add a new Project every time we need it, and organize our files quickly - without having to keep track of more windows. Final Cut Pro X is all about being more simplified than other video programs, and I think this goes right along with that idea.
    Thanks,
    - David

    My original fear was that FCPX was just going to be iMovie Pro... It so is not!
    People use the interface in different ways. I think that's what most of us like about it, it's flexibiity to accommodate different types of workflows.  For me, I use the Events browser mostly like I'd be using the Finder. All the imported clips I use are referenced by the hard disks on which they reside. I know where to find them in the Event Browser and I know where to find them in the Finder.  I use a lot of stock footage and therefore *reuse* a lot of stock footage from project to project. I'm not going to re-import duplicates into different events because I don't find that the least bit convenient and I do find it a terrible waste of precious HD real estate.
    But that's me.
    Some people like to load up everything they're going to use in a single project in a single event... I get that. You can command click your way through a bunch of clips, type E and everything is automatically arranged on your storyline in the order you selected the clips. That is *awesome*!! Instant storyline (/timeline.) Furthermore, for those that need to share projects, it's easier to bundle up the events and projects if they're all together (albeit in two different folders) on one disk (— at least they are always at the top level of the drive and easy to find.)
    Keeping your Events media in a different location (satellite drives) and keeping your current project on your *fastest* drive is probably the fastest way to edit (particularly if your satellite drives are Firewire or Thunderbolt [peer-to-peer interfaces don't hog system resources].) There is little cross interference in disk accesses that way. So essentially, you can keep FCPX dealing with original clip data that doesn't need to be quite as fast, reading and writing to slower drives on your system, while letting it plow through the heavy work on your fastest access drive (usually your internal HD.)
    By no means is FCPX "more simplified". It has a huge amount of power. It has all the best parts of Color, Soundtrack Pro and Motion built in. It allows you to explore *ideas* in real time rather than having to plan for them a week in advance [layout, round-tripping plans to Color, STP and/or Motion for titling or effects.]  You can grab and move around elements anywhere on your "palette" with simple mouse moves and an occasional key press. The list goes on. Bottom line, it doesn't matter how you organize your events or your projects. It's all about the finished product. And for me, I can turn that around in about 1/5th the time (not claiming it's great — but I think better results in 20% of the time, on average, than it would have taken in Studio.) [Not a professional video editor -- I'm a graphic designer, and I develop Motion graphics for FCPX to make all "you guys" look better.]

  • Problem Using more than one patchset for Kernels

    I'm using vanilla 2.6.10 sources, with the -mh4 bluetooth patch, but I also want to apply the -as patch, as Arch has now adopted it for the standard kernel. So I have the following lines in the PKGBUILD:
    ##### Apply any patches here, if you set the patch variable above uncommment the following line
    patch -Np1 -i ../patch-2.6.10-as5 || return 1
    patch -Np1 -i ../patch-2.6.10-mh4 || return 1
    and I have the patches downloaded into the build directory. When I run makepkg, I get a HUNK FAILED error at the patching stage, and makepkg aborts. If I run it with the -mh4 patch only, it works OK.
    I realise this is nothing to do with the PKGBUILD, which I am sure will produce a uniquely-named package in about 30 minutes or so. Would you have any general advice regarding the use of more than one patch?

    yeah - i have done this with a few patchsets.  it's easy if you know what you are doing.
    i'll explain what is happening just in case you don't know - all patches are created based on the original code and work by matching existing code and replacing it with new code - if you apply one patch then another the first patch may alter some of the references that the second patch is try to match - so it fails.  what you need to do is to check where it has failed.
    it will say patching core.c or something and the it will say HUNK FAILED - that means the first patchset changed the core.c code and the second patch can't find what it is looking for.
    you then need to open the first patch - find out where core.c was changed and how and then open the second patch to see what it now needs to look for and then you'll then have to make new diffs to finish the process or eidt the old diffs (which is tricky but shorter)
    it ain't easy.  if you have more than a few hunk failed don't even bother - there is no guarantee that they patches will provide a build-able kernel.
    this whole process lies at the core of creating these massive patchsets - if you can combine both patchsets and get a successful build out of it you can consider yourself a novice kernel hacker. it can be done.
    i can't help much more than that i'm afraid - i'll ask cactus to split these two posts too a new thread for you

  • How do I use more than one folder for screensaver on my mac

    I have 3 separate folders that I want my computer to use when it switches to the screensavers but I can only get it to use one folder. I really want it to switch choose from the 3 different folders. Someone set it up for me before so I know it does it, I just can't figure out how. Thanks!

    The presets from earlier versions of GR should all be in the same place anyhow.. so reinstalling GR5 into it's correct locvation shouldn't affect anything regarding those other presets. In fact, as far as I can recall.. GR5 should ask if you want to import older presets when you first run GR5 standalone (The app version of GR5 in your applications folder) after install....
    Then those same presets should be present in in the AU version of GR5....
    Also GR4 (So long as you updated it to the latest version via the Service Center) should also continue to work with Logic Pro anyhow.. and load when you load an older project which used that version....
    Finally, any version you may have installed elsewhere.. won't work with Logic Pro because LP uses the AU Component version that is installed by the NI installer and therefore located in your components folder...  Those other versions are more likely to be copies of the standalone version.. which LP9 doesn't use.

  • Can i use more than one computer for my photoshop editing

    i am a subscriber to Photoshop CC. I have signed up with my laptop, however can I use this program on my other computer as well?

    You can install on up to 2 machines at any one time. Even if you have a Mac and Windows, that's the great advantage of CC!
    Creative Cloud for desktop FAQ

  • Can I have more than one ID for my iPad

    Can I use more than one ID for my iPad, iPhone and iPod.? I am using the same for all 3 now.
    My wife have one iPod and can I share my apps with her.? And if...How?
    We are using the same computor for all devices.
    Thanks in advance....
    Best regards.....Reidar45

    The spell check goes with the keyboard layout being used.  Just activate both English and French in Settings > General > Keyboard and then use the Globe key to switch between them.
    (I think there is bug in Pages, however, so that this doesn't work for that -- you have to change the OS language).

  • Using more than one external drive with apple tv and itunes

    I've searched the forums and haven't found a clear answer for this. Is it possible to use two seperate drives for the itunes library? I've already filled up my external firewire drive and would like to get another one.
    I've read in several places that people are doing this, but haven't found clear instructions on how its done.
    Much thanks!
    Brown.Recluse

    I don't think you can have more then one folder designated as you itunes library folder, so you can not have more then one drive for your library folder. However you can use more than one drive for you content. I have 6 drives that I use right now. I store the movies and tv shows on those drives. I drag a movie into then library tab in itunes and it just links itunes to the path of the movie. To do this however you have to unclick a option in itunes. It is the menu that you tell the path to you library, you have to unclick “copy to your library” not sure if this is the exact name of this. If you don't do this it will try to copy the movie you dragged in instead of linking it. I actually have nothing in my Itunes library folder. You can also do this with purchased content as well. Just move the purchase content to a drive of your choice from the itunes library. Delete it from itunes. Then drag it into itunes from the new drive. I hope this all makes sense, let me know if you have any other questions.

  • Can I use more than one Apple ID for an Apple TV?

    I wanted to use more than one Apple ID account on my Apple TV, is that possible?

    Welcome to the Apple Community.
    You can only use one ID for purchasing from the Apple TV, but you can stream content from multiple libraries even though they have different ID's

  • Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    As long as the profiles are different (ex. HID vs AD2P) you will not have any issues. But say if you try to use 2 keyboards at once, it won't work. Or 2 headsets at once. Your scenario seems fine.

  • Using more than one PU and PC for the same database

    I have a scenario described here: [http://www.seamframework.org/Community/UsingTwoParallelNestedConversationsWithParentAtomicConversation|http://www.seamframework.org/Community/UsingTwoParallelNestedConversationsWithParentAtomicConversation]
    which uses Seam, EJB3, JPA, Hibernate, Richfaces (modalPanel) and JSF.
    The question I have is the following:
    is there any negative consequence (memory consumption, performance hit, etc.) of using more than one persistence unit in the persistence.xml that points to the same EntityManagerFactory? I was thinking of having one PersistenceContext (Seam-managed PC - an extended PC which is conversation-scoped) which uses one PU and reserving the other PC for the modalPanel forms and backing beans (SFSBs).
    The reason I needed to use this solution/approach is so that when using Hibernate MANUAL flush with SMPC, I can achieve isolated synchronization of the PersistenceContext without updating values in the modalPanel forms and vice versa.
    Any tips on best practices or alternative solutions? thx.
    persistence.xml snippet:
       <persistence-unit name="boBETS">
          <provider>org.hibernate.ejb.HibernatePersistence</provider>
          <jta-data-source>java:/boBETSDatasource</jta-data-source>
          <properties>
             <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
             <!-- <property name="hibernate.hbm2ddl.auto" value="validate"/>   -->
             <property name="hibernate.show_sql" value="true"/>
             <property name="hibernate.format_sql" value="true"/>
             <property name="hibernate.generate_statistics" value="true"/>
             <property name="jboss.entity.manager.factory.jndi.name" value="java:/boBETSEntityManagerFactory"/>
             <property name="hibernate.default_catalog" value="boBETS"/>
             <property name="hibernate.default_schema" value="dbo"/>
          </properties>
       </persistence-unit>
       <!-- using boBETS2 for ListValueParamAction for now! trying to isolate the em.flush() such that we can achieve atomic conversations for the
       base form as well as the popup form! -->   
       <persistence-unit name="boBETS2">
          <provider>org.hibernate.ejb.HibernatePersistence</provider>
          <jta-data-source>java:/boBETSDatasource</jta-data-source>
          <properties>
             <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
             <!-- <property name="hibernate.hbm2ddl.auto" value="validate"/>   -->
             <property name="hibernate.show_sql" value="true"/>
             <property name="hibernate.format_sql" value="true"/>
             <property name="hibernate.generate_statistics" value="true"/>
             <property name="jboss.entity.manager.factory.jndi.name" value="java:/boBETS2EntityManagerFactory"/>
             <property name="hibernate.default_catalog" value="boBETS"/>
             <property name="hibernate.default_schema" value="dbo"/>
          </properties>
       </persistence-unit>What happens if I were to have 10 PUs and 10 PCs in the same app? Whether they're all pointing to same DB or not. What's the consequence of using "too many"?

    Yes, you can use multiple iCloud accounts in multiple User Accounts on one computer, but, as you know not multiple iTunes Match accounts. Keep in mind that the two services are not the same.
    Since you've posted your question to the iTunes Match forum, which it really doesn't pertain to, you might want to also post it to the iCloud on my Mac forum.

  • Can I use more than one flash-drive for ready-boost on Satellite L650/0ed

    Hi,
    I have a toshiba Satellite L650/0ed, is it alright if i use more than one 8gb flash-drive for 'ready boost' - what is the maximum number of flash-drives use can dedicate to 'ready-boost'.
    In addition, if i use a 16gb flash-drive, will this dedicate more memory to 'ready-boost'.
    Why is the seagate 1tb 3.5 expansion drive not compatible for ready-boost.
    Thank you,
    -Brent907

    Hi mate
    Please check this Microsoft page which describes the ReadyBosst
    http://windows.microsoft.com/en-US/windows7/products/features/readyboost
    There you can find this statement:
    +ReadyBoost works with most flash storage devices. In Windows 7, it can handle more flash memory and even multiple devices *up to eight* , for a maximum 256 gigabytes (GB) of additional memory.+
    Hopefully this can be helpful!

  • FIOS DVR Manager for iPhone - can I use more than one iPhone?

    Can the FIOS DVR manager be used from more than one iPhone for the same DVR?

    Only one device can be used at a time to program your ASTB. In theory, you can use different phones however, each time you switch devices you will need to register the phone and obtain a new authorization code to access your ASTB.

  • Using More Than One App At A Time

    Does anyone know if there is a way to use more than one app at a time? It would be nice to get back to the home screen without quitting an app if you are in the middle of something.

    I know I have seen some apps that specifically say that they can be used while surfing the web, etc. It may be a function of the app that it can continue to run while you're doing something else. I'm kind of surprised that a radio app wouldn't allow for that.

  • How can I use more than one Data Provider in my web Apps

    I am trying to use two different data provider in my web apps to run two different queries from the same table ,the data provider A is working correctly but when I attempt to run data provider B ,It display an error page ,here is the error message : Exception Details :javax.servlet.ServletEx ception
    java.lang.RuntimeException: java.sql.SQLException : Cannot connect .Both dataSourceName and url properties are null.

    Hi,
    You can use more than one data provider in your application. However if you have defined a dataprovider for a particular table already, and wish to bind a component, select the component and use its context menu to Bind to Data...

  • Can I use more than one Apple ID on one device

    I have seen some answers to this type of question before but not that since the ios 6 so will ask again. My household shares an Apple ID and it has worked great as we have added devices and purchased apps.  My problem now is this, we have hit a point where I have work things on my iPad and iPhone that I really don't need to be shared with the whole family but it isn't a major deal or security risk. I don't want to give up the advantages of having the household ID.  Is there an easy way to have another ID on my iPad and switch between them without having major complications?  I am for the most part a techie so not afraid of these kind of things but I can't afford to lose everything right now and take the time to set it all back up so getting advice here.  Thanks in advance for any help you can give.

    You can use more than one apple id, but keep in mind that when apps need updating that you'll will need to sign in with correct credentials to update them.
    Share an apple id for the itunes and app stores, but keep your own for icloud, facetime and messages.
    Managing and Sharing multiple id's with your family
    http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/

Maybe you are looking for