Binary comparison

Hello i m a beginner in java .kindly help me in solving this question.
wat 'll happen when u compile and run this code
int Output=10;
boolean b1=false;
if((b1==true)&& ((Output+=10)==20)){
      System.out.println("We r equal" + Output);
} else {
      System.out.println("not equal" + output);
Options---
1.Compile error, attempting to perform binary comparison on logical data type
2.Compilation and output of "We r  equal 10"
3.Compilation and output of "Not equal 20"
4.Compilation and output of "Not equal 10"

Hi
The Answer is
4.Compilation and output of "Not equal 10"
Because The else part will be executed insted of and condition the b1=false.
The + operator with the String always concatinate the String
and the variable
See this link
http://www.gginc.biz/jfront/index.html
Kind Regards
Mukesh

Similar Messages

  • Binary comparison and linguistic comparisons

    I was doing some performance testing to see if I have linguistic comparisons turned on at a session level and NLS_Sort set to Japanese_M, can I still perform binary comparisons on some of my columns and make them use the binary index.
    I was pleasently surprised to see that this worked.
    alter session set nls_sort=Japanese_M nls_comp=linguistic
    select * from test where nlssort(id, 'NLS_Sort=Binary') = nlssort('00000000-0000-0000-0000-000000000001', 'NLS_Sort=Binary');
    As per the explain plan this was using the Binary index. I would have thought that since I am using a function nlssort, I would probably have to create a function base binary index for this to work.

    The parser is clever enough, in some contexts, to recognize NLSSORT(...,'NLS_SORT=BINARY') and remove it from the query. This is the opposite operation to adding NLSSORT implicitly when NLS_COMP=ANSI/LINGUISTIC.
    -- Sergiusz

  • Do integrity checks by file comparison really work?

    Hello,
    I use a program (Beyond Compare) which has a Folder Compare module, with a function for doing a binary comparison between the files inside two folders. I use it to check the integrity of my backups, by comparing my main hard disk files, with the ones on
    the backup hard disks. If two files get recognized as being different, then one of them should be corrupt (if they didn't get modified "normally").
    My question is: will this method work to detect real file corruptions? Will it detect any kind of corruption, both copy corruptions, and "bit rot" corruptions? Will there be no problem regarding read cache? I mean: if the first file to compare gets read
    from disk, and is kept in a read cache (by Windows or by the hard disk, or by something else), will the second file get read from the same cache (if Windows or the hard disk think they are identical files)? Do Windows and hard disks have some kind of procedure
    to detect if a file to read from disk is already available in cache, even if it is in a different folder than the "original" one? Perhaps some kind of file-checksum-system which decides that the files are same? (And this system would not notice if the file
    to compare is corrupt). If this would be true, then integrity checks by file comparison would not work, because in practice the same file would be read twice (first from disk, and then from cache), instead of reading both the two files to be compared from
    disk.
    I have already done tests by manually "corrupting" files (changing slightly the contents, while keeping size and timestamp the same), and it works (the files get recognized as different). But I'm not sure if it will work also with "real" corrupt files.
    I'm interested mostly about Windows 8 Pro 64bit and NTFS (but would like to know also in general).
    Thanks.

    I also have Beyond Compare and have used it to check backup data.
    Yes, Windows does RAM caching.  If you have a comparison program read enough file data that you
    can be sure the RAM cache is flushed, then you can be sure that reading the file data back and comparing it with the original data is a valid way to ensure you have uncorrupted backups.
    Note that NTFS now does online recovery, so just the act of reading back the data can trigger processes inside the file system implementation that will recover the data if it should start to experience "bit rot" (weakening or failure of the
    storage medium).  But this is not strictly necessary as other operations, such as defragmentation etc., will occasionally access the disk data as well.
    Some time back I wrote a small utility that calculates a CRC-32 on all the data from all the files in a set of folders.  This is another way that re-reading all the data can be triggered, as well as producing a summary number that can be easily
    compared to determine that all is well - though one doesn't need my software to do it...  There are hash programs available that can accomplish the same things.  Search for SHA-1 programs, but beware there can be malware associated with free programs
    and download sites.
    It's good that people think about data integrity.  There's all too little of that nowadays.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • File comparison tool for Windows 8.1?

    I'm looking for a file comparison tool. I'm on Windows 8.1 Pro (Upgrade). There was a program called Windiff. Is it still available, and functional for Win 8.1? If so, where do I get it? If not, or if there's anything better, what should I use? Thanks
    in advance for any help.

    Hi,
    It's ok to use fc command:
    >fc /?
    Compares two files or sets of files and displays the differences between
    them
    FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]
       [drive1:][path1]filename1 [drive2:][path2]filename2
    FC /B [drive1:][path1]filename1 [drive2:][path2]filename2
      /A         Displays only first and last lines for each set of differences.
      /B         Performs a binary comparison.
      /C         Disregards the case of letters.
      /L         Compares files as ASCII text.
      /LBn       Sets the maximum consecutive mismatches to the specified
                 number of lines.
      /N         Displays the line numbers on an ASCII comparison.
      /OFF[LINE] Do not skip files with offline attribute set.
      /T         Does not expand tabs to spaces.
      /U         Compare files as UNICODE text files.
      /W         Compresses white space (tabs and spaces) for comparison.
      /nnnn      Specifies the number of consecutive lines that must match
                 after a mismatch.
      [drive1:][path1]filename1
                 Specifies the first file or set of files to compare.
      [drive2:][path2]filename2
                 Specifies the second file or set of files to compare.
    Kate Li
    TechNet Community Support

  • BINARY data types

    Hi all,
    I have a simple question. I want to reproduce the SET data types (mysql) in Oracle. So I want assign a binary value to a column. I create a column with CHAR(1) type and I want assign for example 00000010 binary value.
    It's possible ?
    Thanks in advance

    2) RAW data type is not present in express edition. And I use it for migration testing...Why do you believe that the RAW data type isn't present in the express edition? The UTL_RAW package is included in the express edition and I'm not finding any obvious documentation indicating that RAW columns aren't supported in the express edition.
    3) In certain case, I need to store approximately 60 elements. That's why I want to use binary data type. It reduce space to 8 bytes.Unless we're talking about a table with billions of rows, is a difference of at most 52 bytes per row really going to make a difference? Particularly given the extra overhead of doing the binary comparisons? And 52 bytes is an upper limit, since trailing NULL values don't require any storage space
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#sthref735
    Plus, 60 separate flag columns will be a heck of a lot easier for future reporting tools to handle rather than having everyone try to decode the values. And you can use bitmap indexes, regular indexes, etc much more easily.
    Justin

  • Second digital signature invalidates the first one

    Hello to all,
    I'm having some troubles adding a second digital signature to an already digitally signed PDF. The library that I'm using in order to handle the PDFs is an open source one, so I'm programmatically editing the PDFs. The first PDF I produce, PDF1 (the PDF with one signature), has a valid digital signature. The second PDF I produce, PDF2 (the PDF with the two signatures), has the second signature marked as valid, but the first one as invalid with the following error:
    Error during signature verification. 
    Unexpected byte range values defining scope of signed data.
    Details: The signature byte range is invalid
    I've read and applied all the "best practices" on PDF digital signature, so I'm adding the second signature in incremental mode and I'm sure that the second PDF has no changes in the first part, this because if I make a binary comparison of PDF1 and PDF2, the first part of the PDF2 equals PDF1. So if you remove the incremental part from PDF2 (after the first %%EOF), you obtain PDF1 again with the valid digital signature. So the problem seems to be in something new in the incremental part of PDF2 that makes Acrobat Reader X thinks that the first digital signature is invalid.
    If you want to see the three PDFs, here are the links:
    The original PDF: https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BzrgexS80Iq_ODQxZTY2MDk tNTQyYi00YTE0LTk0MTctYWMxNDFiOWY4MjA5&hl=en_US
    PDF1: https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BzrgexS80Iq_ZDQ3MTk1ZmI tNWI4NS00YzdhLTkxNmUtODk1NjVmY2M2NTVh&hl=en_US
    PDF2: https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BzrgexS80Iq_ZGM1YmZhMWE tY2JiYi00YzZkLWE5ZjItNzgwM2RlNzExYWE1&hl=en_US
    Any help will be very apreciated. Best regards.

    Hi,
    I'm not sure if this helps, but I found something unusual with your PDF2. Just at the beginning of the second incremental update (with the new signature), the first object is added without a carriage return. This make the last line of the previous update looks like this:
    %%EOF3 0 obj
    May this leads to incorrect parsing and then invalidates the signature? Not sure about that, but as far as I can read offsets, your byte ranges are correct.

  • ISE 1.1.4 and Windows 2012 AD

    Hi.
    I'm trying to get 802.1x certificate authentication up and running. I want to use both user and machine certificate.
    On "vanilla" v1.1.4, I got an error message with user certificate. After some reading it seems support for AD 2012 was added in patch 2.
    So I installed patch 4, and user certificate authentication works!
    But I still have problems with machine certificate authentication.
    I get these errors:
    Machine authentication against Active Directory has failed.
    Check whether the machine's account is present and enabled in Active  Directory. Also, check whether the Active Directory is reachable.
    But the machine is indeed both present and enabled in AD.
    And AD is working too. I know this from the user certificate authentication, because binary comparison is enabled:
    24432  Looking up user in Active Directory - [email protected]
    24469  The user certificate was retrieved from Active Directory successfully
    22054  Binary comparison of certificates succeeded
    22037  Authentication Passed
    12506  EAP-TLS authentication succeeded
    So is Windows Server 2012 AD supported for machine authentication? Or do I need to go go v1.2 for that?
    Or it could just be something wrong with my setup
    Thanks.

    Hi, and thank you for answering.
    The release notes (for both 1.1.3 and 1.1.4 says:
    CSCug98513: Integrate components to support AD 2012 or mixed mode (2008)
    Centrify version is upgraded to support Active Directory 2012 and mixed 2008/2012 environments.
    That's all that is mentioned about 2012 AD.
    Not sure what it means, though.

  • Corruption in text files retrieved through Adobe Drive on Mac

    I am running an OpenCMIS based CMIS server on Mac. When viewing text files retrieved from the CMIS repository through Adobe Drive, there is nontextual content appearing at the end of the file. XCode, for example, ends up displaying this content as a variable number of '¿' characters. This is not just a visual problem as file comparisons between a file retrieved through Adobe Drive and the same file retrieved through other means detect the files as being different.
    This is only happening with text files. Binary comparison of nontext files retrieved through Adobe Drive and files retrieved through other means detect the files identical.
    This only occurs when the CMIS server is running on a Mac and Adobe Drive is running on a Mac. Adove Drive running on a Windows machine and connecting to this same CMIS server does not have this problem and vice versa.
    This problem does not occur if I retrieve files through other CMIS clients.
    Any help/resolution you could offer on this issue would be appreciated.

    Having same issue. Using Indesign CC 2014.2 update, OS X 10.10.3 and any server using a smb, afp, or cifs connection.

  • Machine authentication using certificates

    Hi,
    I am facing this error while machine authenticates agaist AD for wireless users. My requirement is users with corporate laptop get privileged vlan and BYOD should get normal vlan.I am using Cisco ISE 1.1.1 and configured authentication policies to diffrenciate clients based on corp asset and BYOD. Authentication policy result is identity sequnce which uses certificate profile and AD. All corp laptops should be authenticated using certificates and then followed by AD user and pass. when I configure XP users to validate server certificate this error comes in ISE log "Authentication failed : 11514 Unexpectedly received empty TLS message; treating as a rejection by the client" and if I disable validate sewrver certificate then this error "Authentication failed : 22049 Binary comparison of certificates failed".
    Any help??
    Thanks in advance.

    Hi [answers are inline]
    I  have tried using Cisco Anyconnect NAM on Wondows XP for machine and  user authentication but EAP-chaining feature is not working as expected.  I am facing few challenges. I have configured NAM to use eap-fast for  machine and user authentication and ISE is configured with required  authorisation rule and profiles/results. when machine boots up it sends  machine certificate and gets authenticated against AD and ISE matches  the authorisation rule and assigns authZ profile without waiting for  user credentials.
    This is expected for machine authentication, since the client hasnt logged in machine authentication will succeed so the computer has connectivity to the domain.
    Now when a user logs on using AD user/pass,  authentication fails as the VLAN assigned in AuthZ profile does not have  access to AD. ISE should actually check with their external database  but Its not.
    Do you see the authentication report in ISE? Keep in mind that you are authenticating with a client that has never logged into the workstation before. I am sure you are looking for the feature which starts the NAM process before the user logs in. Try checking this option here:
    http://www.cisco.com/en/US/docs/security/vpn_client/anyconnect/anyconnect31/administration/guide/ac04namconfig.html#wp1074333
    Note the section below:
    –Before  User Logon—Connect to the network before the user logs on. The user  logon types that are supported include user account (Kerberos)  authentication, loading of user GPOs, and GPO-based logon script  execution.
    If you choose Before User Logon, you also get to set Time to Wait Before Allowing a User to Logon:
    Time to Wait Before Allowing User to Logon—Specifies the maximum (worst  case) number of seconds to wait for the Network Access Manager to make a  complete network connection. If a network connection cannot be  established within this time, the Windows logon process continues with  user log on. The default is 5 seconds.
    Note If the Network Access Manager is configured to manage wireless connections, set Time to wait before allowing user to logon to 30 seconds or more because of the additional time it may take to  establish a wireless connection. You must also account for the time  required to obtain an IP address via DHCP. If two or more network  profiles are configured, you may want to increase the value to cover two  or more connection attempts.
    You will have to enable this setting to allow the supplicant to connect to the network using the credentials you provide, the reason for this is you are trying to authenticate a user that has never logged into this workstation before. Please make changes to the configuration.xml file, and then select the repair option on the anyconnect client and test again.
    Interestingly, if I login with an AD user which is local to  the machine its gets authenticated and gets correct AuthZ  profile/access level. If I logoff and login with different user, Windows  adapter gets IP address and ISE shows successful authentication /authz  profile but NAM agent prompts limited connectivity. Any help??
    Please make the changes above and see if the error message goes away.
    Thanks,
    Tarik Admani
    *Please rate helpful posts*

  • Anyone got ACS SE 4.2.1 authenticating against server 2008 R2 via LDAP?

    Hi, I'm working on a new network implementation where the customer has ACS SE and wants to use AD for machine based authentication of wired 802.1x clients.
    As the support for 2008 R2 server (64-bit OS used here) using remote agent is not yet released they are attempting to set this up using an LDAP connection. The final goal is to use certificate based authentication, and I have had a message indicating this authentication type may not work due to an issue with binary comparison, so we started with basic username/password accounts first.
    So far the ACS is populating its external user database fields with the domains setup on AD, but user authentication is failing.
    Briefly we started with basic username/password usng MD5-CHAP on XP to an account configured on ACS, that worked fine. Then set up the external user database to use an LDAP connection to AD, and an unknown user policy, this dosent work. It looks like the issue could be do with the LDAP attributes not being set correctly.
    Has anyone used LDAP as an authentication mechanism against 2008 R2 based AD and got it working?

    Aacole,
    The above error message says that your external database that is LDAP doesn't support EAP-MD5 and that is quite true.
    You may check the below listed link for protocol and database compatibility.
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_server_for_windows/4.2/user/guide/Overvw.html#wp824733
    Since you are using LDAP its only supports EAP-GTC.
    Do let me know if you need any further suggestions.
    Regds,
    JK
    Do rate helpful posts-

  • EAP-TLS and ACS 5.1 with AD

    Hello,
    I want to set up the ACS 5.1 for dot1x-Port authentication. I want to make a machine authentication against an AD-Domain and I got the following error Message:
    24435  Machine Groups retrieval from Active Directory succeeded
    24100  Some of the expected attributes are not found on the subject record. The default values, if configured, will be used for these attributes.
    24483  Failed to retrieve the machine certificate from Active Directory.
    22049  Binary comparison of certificates failed
    22057  The advanced option that is configured for a failed authentication request is used.
    22061  The 'Reject' advanced option is configured in case of a failed authentication request.
    12507  EAP-TLS authentication failed
    11504  Prepared EAP-Failure
    11003  Returned RADIUS Access-Reject
    What ist the problem? I can't find documents how to configure this in detail.
    Can some one helf me?
    King regardes
    Torsten

    Hi Torsten,
    The option you are looking for is under system configuration:
    Configuring Local Server Certificates
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_system/5.1/user/guide/admin_config.html#wp1052640
    Under acs-->Users and Identity Stores-->Local certificate-->Edit. You can only import/configure CA certificate:
    Configuring CA Certificates
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_system/5.1/user/guide/users_id_stores.html#wp1158666
    HTH
    Regards,
    JK
    Plz rate helpful posts-

  • Acs & 802.1x & external db (odbc)

    Hello
    I'm evaluating 802.1x authentication per eap-tls with ACS-Server (4.0). The authentication have to be done with an external odbc database (- we cannot use AD/windows database for this project). The certs on the server and on the client are ok. The SQL-Server returns OK. BUT: the authentication fails with "certificate name or binary comparison failed". In the auth.log file there are entries like:
    AUTH 01/09/2007 14:40:05 I 1554 3440 pvAuthenticateUser: authenticate 'host/pcqj1c.sitest.net' against ODBCACS
    AUTH 01/09/2007 14:40:05 I 0376 3440 External DB [ODBCAuthDll.dll]: FindUser start for user [host/pcqj1c.sitest.net]
    AUTH 01/09/2007 14:40:05 I 0376 3440 External DB [ODBCAuthDll.dll]: Authentication OK for user [host/pcqj1c.sitest.net]
    AUTH 01/09/2007 14:40:06 I 0897 3440 AuthenProcessResponse: process response for 'host/pcqj1c.sitest.net'
    AUTH 01/09/2007 14:40:06 E 0361 3440 EAP: TLS: No match between name in certificate and user account
    The CN in the clients cert is "pcqj1c.sitest.net"
    Can anybody help ?
    regards
    Roland

    I am in a installation with 802.1x.
    I have install a Cisco ACS and cisco 2950 Switch and I am authorizating users via MS-CHAPv2 against the Cisco ACS
    ACS is validating users against a Microsoft Active directory.
    I have the following problem: When user logs in, it takes between 45 to 90 seg to log the user and change the vlan.
    I have install Windows XP Service Pack 2 and patches:
    xp-kb817778-x86-esn
    xp-kb826942-x86-esn
    I have change the switch software to the latest release.
    How can I reduce this delay? Any idea?

  • FTP transfer problem

    Hi,
    I've created a code that transfer files from a Robot Controller to a PC.
    My code is working, I can see all the files in my computer and I don't have any error from LabVIEW, but the size of the files are not exactly the same.
    We decided to compare the files (binary comparison) with UltraCompare and some bytes are not the same, which cause us big trouble.
    I'm using LabVIEW 2010 SP1.
    You can see in attachment the result from the UltraCompare Software, also the 2 files transfered with CoreFTP and with my LabVIEW code.
    Any ideas why some bytes are not exactly the same?
    Thank you
    Stephanie
    Attachments:
    FTP Problem.zip ‏110 KB

    The FTP VIs are part of the internet toolkit I believe.
    The files you retrieved with CoreFTP correctly match the ones you uploaded?  Also are all the differences single bits like in the pictures?
    There's a file error line from the retrieve VI - do you ever see anything of note on it?
    If you do all the transfers without using binary mode do you have the same issue?
    Another, maybe better, option would be to use the retrieve multiple VI.  This would let you wire the cluster you build in the second to last for loop straight to the VI instead of having to use the last for loop.
    http://zone.ni.com/reference/en-XX/help/370014E-01/internetftp/ftp_retrieve_multiple/
    Also I didn't see the close FTP session VI anywhere.  You might make sure you're using it.

  • Regression testing on PDF output files from Reports?

    My current client is looking to do more automated regression testing of the output (content) of their reports, most of which are output from Reports6i into Adobe Acrobat PDF file format. Is anyone currently using or aware of a tool (QARun, WinRunner, etc.) that will do this? (Most of the tools can do a binary comparison of the PDF files that were output, but we need something that will look into the PDF files themselves and tell us where any differences are found in the actual content (text) of the report itself.)
    Thanks in advance for any info anyone can provide!
    - Bill

    Dear Nick,
    Just ensure a printer is configured. This can be done by typing in echo $PRINTER at the $Prompt.
    If it returns null then configurea printer and i fell this should resolve your problem,
    Since it did resolve my problem.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Nick Mavrakis:
    I am having some trouble getting pdf output in the unix environment from Reports 6i.
    If I kick off a defined report file (.rep) from the command line as follows:
    rwrun60 testreport.rep destype=file desformat=pdf desname=testreport.pdf userid=connection_details
    I get the following errors:
    REP-0004: Warning: Unable to open user preference file.
    REP-3300: Fatal error in toolkit.
    UI-9: This function call is out of context
    If I run the command without the file output options (rwrun60 testreport.rep userid=connection_details) then the report opens up on the screen correctly. From here, if I try to generate a pdf file, I get the following error:
    REP-1800: Formatter error.
    The report is defined as character type, and is a simple listing of approximately 50 records from a database table. There are no graphics or any pl/sql defined in the report.
    Has anyone had similar problems in trying to do this?
    Any help is greatly appreciated.
    Cheers
    Nick<HR></BLOCKQUOTE>
    null

  • Test of the Java Skill

    Question 25:
    What will happen when you attempt to compile and run the following code?
    ?@?@ int Output = 10;
    ?@?@ boolean b1 = false;
    ?@?@ if ((b1==true)&&((Output+=10)==20)){
    ?@?@ System.out.println(?gWe are equal ?g + Output);
    ?@?@ else{
    ?@?@ System.out.println(?gNot equal!?h + Output);
    ?@?@ A. Compile error, attempting to perform binary comparison on logical data type
    ?@?@ B. Compilation and output of ?gWe are equal 10?h
    ?@?@ C. Compilation and output of ?gNot equal! 20?h
    ?@?@ D. Compilation and output of ?gNot equal! 10?h
    ?@?@ Question 26:
    ?@?@ Which of the following are true?
    ?@?@ A. Java uses a time-slicing scheduling system for determining which Thread will execute.
    ?@?@ B. Java uses a pre-emptive, co-operative system for determining which Thread will execute.
    ?@?@ C. Java scheduling is platform dependent and may vary from one implementation to another.
    ?@?@ D. You can set the priority of a Thread in code.
    Read Mroe: http://www.wb2b2c.com

    >
    Read Mroe: http://www.wb2b2c.com
    Considering this and your other post I have to ask.
    Are you in fact the world's dumbest forum spammer?

Maybe you are looking for

  • What is needed to plug in mac charger in europe ?

    what is needed to plug in mac charger in europe ?

  • Need Help ASAP! TV Show won't sync, required disc not found

    I need some help!!! I am trying to sync a TV SHow to my iPod and I can't get it to work. For some reason in iTunes, I have to completely unplug and plug in my iPod anytime I want it to sync, pressing the sync button does not work, neither does pressi

  • N80 (58.01) Update successfull :-)

    Great! updated from V3.0617.0.6 03-05-2006 RM-92 Nokia N80 (58.01) to V 4.0623.0.041 26-07-2006 RM-92 Nokia N80 (58.01) It worked!!!

  • Oracle数据库实用脚本

    <p>以下是Maclean.Liu所编写或收集的Oracle数据库实用脚本的列表,在这里分享一下:</p> <p> </p> <p><a title="Script:收集Enterprise Manager Grid Control/Agent/Database Control诊断信息" href="http://www.oracledatabase12g.com/archives/script-collect-grid-control-agent-db-console-diag.html" t

  • JSF Portlet

    HI, this is Naresh. i am very new to the JSF portlets, if you have any guidelines please share me thanks in advance Regards, -Naresh.