Bitwise operators--please explain ?
I've been reading about bitwise operators, and I get the concept about what they do. My question is why would you ever need an operator like this? When do you need to manipulate memory like this? I can't concieve of a use for it, but obviously there must be one. Just curious--thanks.
Hi...
when you have packed different values into one variable...
hmmm... for example, when you use RGB color system, normally, you have the 3 values of the colors in just one 32 bit integer value, in this format:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
R G B
where X = one bit... (an integer is 32 bit size)...
then, you need bitwise operators for extract the values for each color, something like this:
int color = something that obtain the value of the pixel...
int r = (color & 0xFF0000)>>16;
int g = (color & 0xFF00)>>8;
int b = color & 0xFF;
another use of the bitwise operators is in some devices with digital inputs/outputs, where the values of that are given packed in just one integer value (or another type)....
I hope this helps you...
ps. sorry for my english...
EOF
Similar Messages
-
Bitwise operators in XSLT:-
Hi ,
Does XSLT has support for BITWISE operations, If so Can you please help me out of that >
If not , Is there any other way to apply BITWISE logic to the flow in the BPEL.
I tried it using Java Embedded activity in the BPEL, but I am getting the following Exception SCAC-50012,tried referring to this Exception, but not able to get the exact view of that error., as this activity in the BPEL doesnt have JAVA editor I am not able to point out the same.Hi everybody,
I have the following queries in JAVA.
1)Is "Operator Overloading" is nothing but
but "Method Overloading" in Java?There's no operator overloading in Java. For example + can't be changed to mean something else.
2)Regarding BitWise Operators, i just wanna have
have an simple example abt the usage of bitwise
operators. i.e., in real world where we will be using
these ?Just one example of many is the use of bitwise XOR in simple encryption/decryption. The scheme is called XOR scrambling.
byte key = 0x77; // a key byte 0101 0101
byte any = ......; // any byte to be scrambled
byte scramble = key ^ any; // the scrambled byte
byte unscramble = key ^ scramble; // unscramble == any, the original byte is back againIt builds on the fact that if you XOR any byte with a bit pattern (key) two times you get the original byte back again. -
In our enterprise MPLS network we are using 192.168.20.0/24 subnet, in this subnet we have not assigned the IP 192.168.20.200/30 & 204/30, But still these subnets are reachable . Are these NNI IP ...Please explain.
I have checked with ISP, there response is like below:
Those are the NNI to GBNET IPs for Dominican Republic. They are Network IPs. You should be able to ping them-that means they are working.
WANRT01#show ip route | include 192.168.20.20
B 192.168.20.200/30 [20/0] via 192.168.20.226, 02:18:29
B 192.168.20.204/30 [20/0] via 192.168.20.226, 02:18:29
Here its shows from any of our MPLS site we are able to trace the IP and it seems like, 192.168.20.204/30 is one more site but in actual its not.
INMUMWANRT01#ping 192.168.20.205
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.205, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 224/232/260 ms
INMUMWANRT01#trace
INMUMWANRT01#traceroute 192.168.20.205
Type escape sequence to abort.
Tracing the route to 192.168.20.205
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.20.226 24 msec 24 msec 24 msec
2 192.168.20.206 [AS 8035] 232 msec 232 msec 252 msec
3 192.168.20.205 [AS 8035] 224 msec 224 msec * -
Please explain me how I can use Form feed(\f) and Carriage return(\r)
what is Form feed(\f) and Carriage return(\r)?
Please explain to me.
Thank you.These control characters aren't used much these days except that if you example a Windows or MSDOS text file in a binary editor you'll find each line ends with "\r\n". However when reading or writing text through classes these carriage returns will be added and removed automatically so your program doesn't see them.
The controlls date back to teletype machines which operated rather like typewriters. Cariage return, as it's name implied, caused the print head to move back to the start of the line, line feed advanced a line (without, necessarilly, returning the carriage) and formfeed skipped to the next page.
Newline on these machines was always "return, linefeed" because executing the carriage return on these machine could take too long. The early machines had only a single character buffer so that they had to executed the characters as quickly as they arrived. So doing the linefeed after the carriage return gave the carriage more time to return. On some teletypes if you did "linefeed, return" then the first character of the new line would often be printed somewhere in the middle of the line.
This is the origin of the MSDOS/Windows end of line sequence.
Many printers will still respect formfeed if printing is direct. Some will take carriage return without linefeed to allow you to start again overprinting the same line.
However printing, these days, is seldom direct but done in bitmap form. -
Please explain me, how to remove an usb stick or memory chip? With experiences only in pc:s, I do not find on my first apple e.g. MacBook Air a solution. Until now I have succeeded to destroy one chip full of photos and - there's no life more in the port...
Someone told me just to remove the chip in clicking it to the trash can and voilá - it would be done. But as I did so, on the screen appeared a text which let me know, that that way had been the wrong one...
I should have clicked Finder plus something.... which I do not now remember but which was then not found behind the Finder.
So please would someone be so kind and tell me, where I can find explanations for the most simple functions. The manual I got does not include a clue.
Thank you!First make sure that no application is using or has open any files on the disk. Then:
Click and drag the disk icon on the desktop to the trash. Wait for the system to recognize the action, and the icon should disappear from the desktop. It is then safe to remove the device.
Alternatively, you can secondary click on the disk icon, and then primary click "Eject (name of disk)". Wait for the icon to disappear off the desktop, and then it is safe to remove the drive.
Here is a detailed help document on the subject.
http://docs.info.apple.com/article.html?path=Mac/10.7/en/mchlp1056.html -
Hi any one please explain background job scheduling
Hi any one please explain background job scheduling . Good answer can be rewarded.
ThanksBackground jobs are pgms that are scheduled to be run in the Background without user interaction. So this can be done only for Type 1(executable) Program and not for Module-Pool Programs. Typically, a variant is defined and the pgm is run using the same.
The transaction code is sm36 -Define Background job. Using the Start Condition tab you can define when you want the job to run (specific time or if it has to follow after a particular job is done etc.,) Using the Step tab you can assign the pgm name and variant.
After the job is scheduled, you can check the status in sm37, along with the Job log and Spool.
For more info:
http://help.sap.com/saphelp_bw30b/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm -
Can someone please explain how to download all my songs from cloud without having to tick each cloud individually
Music > iTunes Store > Music Quick Links > Purchased > Not in My Library > Download All.
tt2 -
My macbook air will not connect to the internet due to a self assigned IP address. I have tried trawling the support forums for hours, but either I can't understand the suggestions, or they don't work. Please explain to me in simplest terms how I can fix this. Many thanks!
The warranty entitles you to complimentary phone support for the first 90 days of ownership.
If you bought the product in the U.S. directly from Apple (not from a reseller), you have 14 days from the date of delivery in which to exchange or return it for a refund. In other countries, the return policy may be different. If you bought from a reseller, its return policy applies. -
I am having email problems with the new Mountain Lion. stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely. Help
Incoming Mail (IMAP) Server - requires SSL:
imap.gmail.com
Use SSL: Yes
Port: 993
Outgoing Mail (SMTP) Server - requires TLS:
smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name:
your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
Email Address:
your full Gmail email address ([email protected]) Google Apps users, please enter username@your_domain.com
Password:
your Gmail password
The Quick Answer
Follow the instructions below to set up IMAP1 access in most email clients.
Google Apps users, please follow the default instructions unless otherwise noted, replacing 'your_domain.com' with your actual domain2 name.
this is all greek to me. WHAT IS STARTTLS? On the first page of Apple set up there is a TLS certificate and it is marked NONE- should I change it to the long APPLE CERT option? The next page under ADVANCED: THERE IS A BOX SSL MARKED. Then IMAP Path Prefix - I put stmp.gmail.com.. is that right? Port 993 can use this one? as 456 doesn't work and 587 said it wasn't safe. Under AUTHENTICATION I used PASSWORD. Should I have used external client cert TLS?
Please help me set this up securely. ThanksApple - Support - Mail Setup Assistant
-
I just purchased a new laptop, so consequently had to buy Itunes Match to get all of my music back. Now everything is in the cloud, and I can't play them and cannot make a cd. Please explain how I can get my library out of the cloud and keep them on my computer so they are available when I want them? Wow.......why have you made everything so difficult now?
SKF5656 wrote:
I just purchased a new laptop, so consequently had to buy Itunes Match to get all of my music back.
No you didn't.
Now everything is in the cloud
Except for anything you did not purchase in iTunes Store.
Only you iTunes purchases are in the cloud.
Reada the article that brenden dv posted to copy your iTunes library to new computer. -
I have had my old Iphone 5s replaced with a new one but I would like to know how to extract my old contacts from the iTunes backup? Please explain in basic english i am a beginner
Hey,
I think you will find that you have to have a debit/credit card stored on yur account regardless of whether your have iTunes Credit or want to purchase a free App. I don't know why, I assume its for ID verification or is part of the terms and conditions. I occasionally have to re-verify my credit card info even when just trying to run Update on one of my Apps or like I said downloading a free App.
If you need further clarification all you can do is contact iTunes Support:
https://expresslane.apple.com/ServiceOptionAction.action
Hope this helps. Andrew -
Could you please explain when we connect R/3 system to BW
Hi,
could you please explain when we connect R/3 system to BW
1. Procedure
2. SAP BW need to do anything
3. Effort required by SAP BW
Regards,
kranthiHello Kranthi,
When we need to make a conncetion between R/3 & BW , First logon to R/3 system , Go to T/code - SM59 .
There u find connections . Select on ABAP and click on New
Then Provide the description
Go to technical settings tab :
Provide load balancing : No
if you know the server name : give it in the target host name
or give the IP Address ;
Then after that go to logon & Security Tab :
provide the RFC user ID , Client & Password .
And now check the connection by clicking on the connection test
If it shows some 2mins ,like that then it is ok ...
Otherwise then it is a problem ...
repeat the same thing by giving the target as R/3 here .
now go the RSA1 , select the source systems , create source systems
Select BW source systems
give the target system details , such as system no . System ID ,server name ..
And also background user id & password for both the target systemm & source system .
Now Select the created source system , context menu & Check the connection .
This job is performed with the help of basis people , not only by BW team .
This is maintaince is done for every system ( Dev , Qaulity & production seperately )
Thanks
PT
Edited by: PT on Dec 9, 2008 11:17 AM -
In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE! Thank god Pages 09 is still there.
…and the other 98 missing features.
Just use Pages '09, which should be in your Applications/iWork folder.
Rate/review Pages 5 in the App Store.
Peter -
Please explain XSLT mapping from initial
Hi Experts,
I have Altova XMLspy but I dont know how to use it for doing XSLT mapping.
Can anyone of you please explain a simple XSLT mapping in Altova so that I can try.I have checked many blogs related to XSLT mapping but didnt find my answers.
If you can guide me with a simple xslt mapping it would be great.
Thanks,
RaviHi Ravi
Please check the below links.
XSLT Tutorial
http://www.altova.com/documents/XMLSpyTutorial.pdf
http://www.altova.com/documents/2013/xmlspytutorialstd.pdf
http://xml-xslt-dtd-xsd.wonderhowto.com/how-to/use-xmlspy-for-xml-editing-217876/
Regards
Osman -
(ABAP) Code in Transformation--Please explain
I am getting a strange issue when used the below code
Target : Charasteristic,Data Type CHAR 5
Code:
DATA: years TYPE tfmatage,
months TYPE tfmatage.
*DATA: result TYPE c LENGTH 5.(Showing error if included:Result is already declared)
DATA: l_res TYPE p DECIMALS 2.
IF source-field-/bic/zdob IS INITIAL.
result = ''.
ELSE.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
i_date_from = source-field-/bic/zdob
i_date_to = sy-datum
i_flg_separate = 'X'
IMPORTING
e_months = months
e_years = years.
if months 0.
l_res = years + months / 100.
WRITE l_res TO RESULT.
else.
write years to RESULT.
ENDIF.
ENDIF.
WRITE / RESULT.
I am using the above code (given by Mat in SDN) as a field routine in Transformations...can any one please explain me in detail(step by step) whats it doing.
My requirment is to cal age of the employee in YY:MM format based on his DOB & SY datum.
FIMA_DAYS_AND_MONTHS_AND_YEARS give Years & Months between 2 dates
Please update me where i was doing wrong
If months = 0 the the result should be only years
Ex: if Months & Years of FM Output is 40Y,0M the i want only 40 to be updated insted of 40.00 so that the reason why i enhanced your code
But it is giving me strange output
For Output which got months it is being update correctly but
for output for which months are 0 it is being update as
If FM output is 40Y,0M
then the output being updated is ' 40' (2 spaces before 40)
In report i need to enter 2 spaces before 40 to retrive values of 40
Please correct error
Please ask if you need any info
ThanksHi,
Are you using transformations?
You should not use Result because Result field is a part of SAP generated code.
Exclude declaration of result and check the code.
Maybe you are looking for
-
Do I have to reinstall my printer drivers after upgrading to 10.8? I seem to have lost the ability to communicate with either of 2 wireless printers and to download pictures from my camera. (Photoshop keeps telling me it can't find the device.) Any s
-
My apple id is not work in itunes stores
my apple id is not work in itunes stores
-
How to sequence Microsoft System Center Service Manager?
AppV Version: 5.0 OS: Windows 7 64-bit Application Name: System Center Service Manager 7.5.2905.0 Issue: This applications has a shortcut named as "Service Manager Shell" which will launch as shown in screenshot below, The same shortcut will launch a
-
Photos app error "iCloud Storage is full"
i'v been uploading my photos all week long, i have 200gb on iCloud but its saying that its full when i have 100gb+ left still. i had an unpaid iTunes bill penning for like 2 days which i thought was the problem but its payed now and everything thing
-
Print photos from my smart phone
Can I print pics and docs from my smart phone to my HP Photosmart All In One Printer B269a ? Model name CD035A ? Also is the code from my printer called by another name such as URL or other, because thoes words are not on the printed doc I got when