Employee and Catagory problem

Hellow all,
I have 2 Tables
1) Employee
2) Category
Employee Table Structure
1)emp_id
2)emp_name
Category Table Structure
1)Category_id
2)Category_name
I Need in Form when I enter Employee id = first 2 Digit which is 01,02,03 as on 99
For Example Employee Id = 01
Then Category_id = Employee Id
Other Wise
If i enter Employee id = 010001 or 010002 and as on 019999
Then Category_id= 01 (Its Because first 2 Digit enter in Category_id which is 01)
If i Enter Employee_id = 020001 or 020002 and as on 029999
Then Category_id=02 (Its Because first 2 Digit enter in Category_id which is 02)
I Think you genius guys understand
Regards
Shahzaib Ismail

Well now i need if Employee id = 2 Digit then Catagory_id not = employee id only if Employee Id Exceed 2 Digit the category id = first 2 Digit of Employee id
For Example
if i Enter 01 or 02 or 03 and as on only 2 Digit then its not Copy this code to Category_id
Else
If i Enter 010001 or 020005 or 030009 or 99099 and as on any number if my Employee id exceed from 2 Digit then its copy First 2 Digit in Category id in this case when i enter 010001 its copy 01
when i enter 020005 its copy 02
when i enter 030009 its copy 03
when i enter 990029 its copy 99
I hope you guys understand
Regards
Shahzaib

Similar Messages

  • Why I had no problems with the VZW employees and other people have?

    I think that most people who cannot resolve problems with the VZW have an attitude problem.
    Wise saying:  you can get more with honey than with vinegar.
    Since I “upgraded” my old Samsung Sway to a new Samsung Intensity III, in the past three weeks I spent many hours dealing with the VZW store employees, customer service reps, and tech support people. The phone was replaced two times, and I had no problem getting the replacements.
    The third phone did not working how I expected.
    Today I called VZW customer service and said I don’t need anymore trouble shooting and I wanted find a resolution, which will be satisfactory to both of us. After a short conversation with a customer service rep, I was connected with a tech support. I told him that I don’t need any more trouble shooting on the Samsung Intensity III because I already spent HOURS doing that on three devices.
    We spoke about what the VZW could offer me, about replacements with different phones, etc. Our conversation ended with me offering the resolution that could satisfy me, which was to keep this phone and my account will be credited for the $30.00 “upgrade” fee and I will buy Samsung Sway on eBay. NO PROBLEM. 
    My account was credited and I was advise about the ESN number and activation.
    Why I had no problems with the VZW employees and other people have? The answer is simple. I did not have attitude when I was spoke to them.
    So if you want the problem to be resolved, put your anger in you pocket before you start the conversation. You can say that you are angry, frustrated, etc like I did, but add that you understand that this is not their fault that the manufactures makes a crap phones.

    Yes, you are right. I lost my upgrade. Also, it’s true that I could buy the phone on eBay… if I knew then what I know now. In the past, I never had problem with any of my phones. Doing an upgrade with the VZW was a normal thing for me. I didn’t expect that Samsung Intensity III would be a junk phone.  My last upgrade was 4 years ago. I had $50.00 ‘new every two’ credit on my account, which was used for an upgrade.  I lost the $50.00 credit paying for Samsung Intensity III. Sometimes we learn from our mistakes or from a bad experience. Three weeks ago I did not know that I could buy a phone on eBay and activate with VZW without paying $30.00.
    Samsung Sway is coming from …eBay – keep your fingers crossed for me.

  • Who holds Verizon employees and management accountable and where can I file a complaint.

    I feel that writing this letter is a waste of time, but I feel the way customer service reps (not all) as well as their managers (again not all) need to held accountable for lies and disrespectful business practices they place on loyal customers.  This is a long and confusing issue, but in as short as possible, I have been a loyal Verizon Wireless customer for several years. This past September 2014, I along with about 200 other loyal customers waited for several hours in anticipation of the IPhone 6 being released outside of a big box Verizon Store located at 7790 Montgomery Rd, Cincinnati, OH 45236, phone number (513) 984-9939. Because of my early arrival, I was number two in line and number two to enter the store once opened.  At approximately 7:30 a.m., Verizon Store employees and an unknown woman claiming to be a manager came from the store with flyers in hand and explained the purchase process.  She advised customers were able to buy a maximum of three phones, but could only buy one phone at retail price without contract.  I informed the manager that I was not eligible for an upgrade at the time, as my wife and I still had about a year of service left on my current contract.  At that time I was told “too bad, there are a lot of customers here for the same thing, and if you want the iPhones you will have to add two lines of service.”  I had about $2000.00 in my hand willing to pay full price for phones and have them swapped out for my current devices and was told “too bad.”  Well after waiting in line for the amount of time I had, I pretty much had no other choice, entered the store, and paid for two new lines of service in order to get two IPhone 6 plus devices with 128 gb of storage. 
    Immediate upon returning home, I contacted Verizon customer service (phone call one 9/19/14) and requested to terminate both lines, and move the IPhone 6 plus phones to my original lines.  Upon explaining the situation to the customer service rep, he was confused as to why I was told I had to open two new lines, but complied.  Later in the night, I had realized service was still not activated on the lines after switching the IPhone 6 plus to my original numbers and call customer service again (call two 9/19/14).  After explaining the whole situation over again, I was again informed that the store was wrong and should not have made me add two new lines.  This customer service rep informed me of the cancellation fees ($350.00 per line x 2), which I told her I was aware, and had planned to pay $950.00 per phone originally so had no problem paying the termination fee.  The customer service rep again told me that all had been completed and the lines would be turned off.
    On Saturday September 20, 2014, I signed on to my Verizon wireless.com account and saw that I still had two lines (previously told were shut off) still active on my account, with no phones associated with the numbers.  Again, upon contacting customer service (call 3 9/20/2014) I had to explain the entire situation all over.  At that time I was advised by the customer service rep, that because I was not returning the phones and just wished to pay the termination fees, that I would need to wait until after 14 days of service to call in and cancel the lines, and also have to request a refund on the activation fees (should be waived if canceled within 72 hours of activation) and any service charges associated with having two lines with no physical phones actually being attached to them.  At this point I thanked the customer service rep and was informed that all notations to the account were visible in the account to anyone I spoke with.
    Friday October 3, 2014, I again contacted Verizon customer service (call 4 10/3/2014) to cancel these lines.  Upon explaining the situation again to the customer service rep, I was informed the store I got the phones from (A VERIZON WIRELESS OWNED STORE) had lied to me in that I needed to add lines.  At this point, the female representative informed me the activation fees would be waived, along with any other fees, and the lines were cancelled. 
    Saturday October 4, 2014 I again logged onto my Verizon Wireless.com account and saw that the lines I was told had twice been removed, were still active and alive with no physical devices actually being associated with the lines of service.  AGAIN, calling customer service (call 5 10/4/2014) I spoke with a gentleman and expressed my frustrations as to being misinformed several times thus far.  At this point, the customer service rep, after keeping me on hold for about 45 minutes, returned to the phone and advised my that the lines were set for cancelation, but not until my next billing cycle, and that I would need to call in again once all service, activation, and whatever else charges were put on my account to have them removed.  During the conversation, (without me asking for a single thing at any point during the conversation except just to have the lines turned off and refund the fees) The customer service rep informed me that he was sorry and his manager was sorry for inconvenience that VERIZON had caused me, as a small toke of VERIZON’s appreciation, VERIZON would waive any and all fees associated with the two lines I was forced to add, to include any and all early termination fees.  Again, I never once asked for anything, but was offered by VERIZON employees and a VERIZON manager.  I was also informed that when I did call back in, the next customer service rep would see all of these offers in my account notations and would comply.
    Tuesday October 7, 2014, I was able to view my bill and had observed the added charges associated with account activation, and lines of service.  At that point I again called Verizon customer service (Call 6, 10/7/2014) to have these charges removed.  Upon calling and AGAIN explaining the two weeks of hell VERIZON had caused me, I was again apologized to, and informed that the last customer service rep had notated everything as I had explained and was informed and exactly quoted by the representative from VERIZON “We are nothing without our integrity at VERIZON, and VERIZON told you we would waive all of these fees (as notated in my account) VERIZON will stand by our word.” At that point, I was told I would need to be placed on hold as the charges and fees were large (about $263.00 in service fees and $700.00 in early termination fees) it would take a while for the customer service rep to work with his manager to have these charges removed (and in the case of the ETFs, not post to the account at my next billing cycle).  After one hour of sitting on hold, I was again in contact with the customer service rep and told, he and his manager had put in for every single refund and credit, the VERIZON MANAGER had approved all, but one final approval was needed which may take a day or two.  AGAIN all of this is notated in the account as to offers and promises made by VERIZON wireless employees and managers, and again I had NEVER asked for a single penny refunded, but was offered.  I AGAIN was completely willing to pay for the phones and the ETFs without problem, but was again and again offered such refunds and credits by VERIZON employees.
    Wednesday October 9, 2014, because of the continual misinformation I have been given by VERIZON employees, I contacted VERIZON customer service again (call 7, 10/9/2014) to check on the status of the credits and refunds.  At that time, I was informed, that many of the credits had been approved, but both ETF fees were denied and would only be refunded if I returned the devices.  As frustrated and confused as I was, I calmly explained every single thing that was offered to me again by VERIZON and was confused as to why a MANAGER for VERIZON would offer such things and then they would be denied.  The female customer service rep informed me that she was unfamiliar with the situation, would message the male customer service rep and or manager I spoke with on October 7, 2014 and have them reach out to me to explain. I was also told I would hear from them within a “few hours.”  This call was placed at about 9:00 a.m., and by 6:00 p.m. I had still not heard anything back from VERIZON.  At that time I again called VERIZON customer service (call 8, 10/9/2014) and spoke with another customer service rep.  Again for the 8th time explained the entire VERIZON lying situation, and was told that he (VERIZON representative) saw was I had been offered several times (refunds and credits) in the account notations and “too bad, VERIZON does not offer refunds or waivers of ETFs.”  At this point in the conversation, without completely cursing out the representative, I asked to speak with his supervisor and was turned over to another supervisor to speak with.  Upon speaking with the supervisor, I was informed (for the first time) that although VERIZON WIRELESS employees / MANAGERs had offered me refunds of ETFs, WHICH WAS DOCUMENTED NUMEROUS TIMES BY VERIZON in my account details, VERIZON simply could not waive these fees.  I again informed the manager that I didn’t care about the fees and was willing to pay, but I was tired of being LIED TO.  At that point in the conversation, I was again apologized to over and over again and as a token of apology from VERIZON, he a VERIZON MANAGER offered me a $70.00 bill credit in order to help with the ETFs.  Again, I never once asked for anything, but was offered time and time again from VERIZON EMPLOYEES and MANAGERS.  I thanked him for his offer and the call ended.
    October 10, 2014 (AGAIN after repeatedly being lied to contacted VERIZON customer service to check on the status of my credits (call 9, 10/10/2014).  At that time, I spoke with a female representative and again explained the entire dilemma caused by VERIZON.  Again, I was apologized to countless times and was informed that a bill credit for $70.00 was pending as I was informed on the previous night by a VERIZON WIRELESS MANAGER, but she did not have access to see any further details.  After again apologizing countless times, the customer service representative seemed to be frustrated that I had been treated so negatively and informed me she was going to address this with her manager.  Upon her return to the line, and again without ever asking for one single thing, the VERIZON representative with her VERIZON MANAGER offered to meet “half way” with regards to the lowest ETF fees associated with my accounts and provide a $235.00 bill credit to help me and as a token of “sorry for VERIZON’s screw up and constant lies.”  I was also told I would be contacted by her manager within four hours at approximately or before 2:00 p.m.  5:00 p.m. on that same date, after not hearing anything back I again called VERIZON customer service (call 10, 10/10/2014) spoke with another customer service rep and told her the entire story over again.  I told the rep I wanted to speak with a manager right at that moment and was placed on the phone with a woman named Linda I believe. Linda informed me that the credit I was previously told I would be given earlier on that date was rejected and I would not be given it.  Again without completely going nuts, I calmly explained my complete disgust with VERIZON and the constant lies I was being told.  Again after countless apologies from another VERIZON MANAGER, she politely explained to me again the whole VERIZON cannot offer such refunds or credits associated with ETFs and was appalled that anyone in VERIZON would offer such things knowing they could not be given.  While working with her, she informed me the best solution to saving money was to cancel my original phone accounts and keep the two new lines that were pending deactivation, which would result in a $250.00 reduced ETF as opposed to a $700.00.  I agreed based on her advice without argument and was informed it may take a few hours for the new numbers to be placed back on the IPhones.  Two hours later, my phones still not turned on, I contacted VERIZON again.  I had also noted that every single bill credit previously applied to my account was back on the account.  At this point being as furious as I was, I again called VERIZON WIRELESS (call 11, 10/10/2014) demanded to speak with a MANAGER and was placed on hold.  After waiting for an hour on hold (no exaggeration) the customer service representative returned, apologized for everything including the wait time, and placed a male MANAGER on the phone. After explaining the entire three plus week VERIZON lying dilemma, which he was able to see in the account notes where every VERIZON employees acknowledged the misinformation of the previous employee I had spoke with, he again apologized and explained that I did not lose the bill credits, but because two lines had been canceled, the credits were instead applied to my unbilled ETFs, and they would appear on my next bill.  He also informed the SIM cards in my devices would still require more time to activate and that they should be turned on by 7:00 a.m. the next day.
    While doing research on the SIM issue, I found that VERIZON policy was immediate and SIMs would not require rebooting time to come out of I believe it is called “AG” or “aging” status.  Again contacting VERIZON customer service (call 12, 10/10/2014) spoke with a female customer service agent, who actually looking back was the only one not to represent falsehoods or lies, informed me that because the SIM cards were previously associated with cancelled lines, I would need to go to a VERIZON wireless store and get two new SIM cards.  At this point in the day it was about 10:00 p.m. and all VERIZON stores were closed for the day.  With no choice in the matter, I agreed, and asked just out of curiosity, on the status of the$70.00 bill credit, I was promised on October 9, 2014.  At that point the rep informed me that she was able to see that the VERIZON MANAGER had notated and put a credit request in while I was speaking with him, but then immediately cancelled his own request and closed the situation immediately following the completion of our call.  I believe at this point in the entire situation I was so fed up this did not surprise me whatsoever so who could I complain to.  The very nice customer service representative again apologized for the continued lies I was told and offered me (not a bill credit), but a data GB credit for 12 months (again without me asking for anything).  In her own words “I do not want to promise you the world and then lie to you and get your hopes up thinking it will happen as has happened to you numerous times.”    I truly appreciated her honesty and her acknowledgement of the complete disgusting actions by previous VERIZON employees and MANAGERS. 
    The next day October 11, 2014 I drove with both IPhones to the Verizon big box store, explained the entire story to the employee, was apologized to for a 20 minutes, the manager came out and apologized as well, GREAT CUSTOMER SERVICE!  The store is located at 2028 Florence Mall Rd, Space 1139, Florence, KY, (859) 746-3790 (Manager was great so was employee).  Never once offered me anything to make up for mistakes VERIZON had made in the past, which I really didn’t care because I never asked nor expected anything, but were truly grateful for my service (I am military and a Federal Law Enforcement Officer) and truly apologized for the actions of the Verizon Sore in Cincinnati Ohio (Again the manager stated the manager at the Cincinnati store lied), and especially apologized for all the lies and mis-information given to me over a three plus week time period.
                Finally, October 15, 2014, I log in to my Verizon wireless account to view my features and reactivate VERIZON’s high definition calling features and see that since September 19, 2014 (original date I purchased the IPhones) I have been charged for Verizon Cloud storage.  I HAVE NEVER AGREED TO THESE SERVICES, NEVER REQUESTED THESE SERVICES, NEVER EVEN NEW THEY WERE THERE!!!!  Again had to call VERIZON for the fraud and lies they are perpetrating on a daily basis, COMPLAIN to another customer service rep (call 13 10/15/2014) in order to get the fraudulent charges removed from my bill. 
    Conclusion
                Here I sit writing this long complaint that no one in VERIZON will ever be held accountable for, no one will answer for the lies, mis-information, and disrespect employees and VERIZON MANAGERS perpetrate even though each lie was documented by VERIZON in account notations, and no one will be accountable for the lies the retail stores tell in order to increase their QUOTA to activate a certain amount of new lines per month.  I am utterly disgusted with the treatment I have received, will be requesting these notations (if they have not been deleted from my account), have documented each conversation, and recorded many of the conversations, with an end result of pretty much nothing.  VERIZON does not care about their customers and could probably care less about my terrible experience.  While there are several other cellular options available, they are all crooks and liars just as the perfect documented examples of VERIZON employees and management lying in this case.
    Christopher

        Giogetz,
    Thank you for taking the time to share your experience. I am shocked by the many representatives that you had to speak to regarding your first request. This situation should have never gotten to be complicated and resulting in multiple calls from you. I apologize on behalf of those representatives for dropping the ball. I do agree that the representatives do need to be held accountable and I would like to submit feedback for those that you worked with. I have sent you a direct message. Please reply to the direct message so I can begin submitting feedback.
    AndreaS_VZW
    Follow us on Twitter @VZWSupport

  • Employee and Group responsible being overwitten when clicking "Change".

    Hi All,
    I have searched the forums for a solution to a problem I have had but did not get the bottom of it.
    I have done some debugging and managed to sort it and thought I'd share my findings with you.
    Problem:
    You are in the Web interaction centre (CRM 5.0 in my case) and you navigate to a previously saved activity.
    You click the "Change" button and the Employee Responsible and the Group Responsible are changed to the ones for the currently logged on user.
    You want to stop this happenning. In our case we have a call centre who amend activities and we do not want the details for employee and group changing.
    Solution:
    Go to SE18.
    Open BADI CRM_IC_INBOX_BADI.
    Go to an active implementation or create a new one.
    go to method DETERMINE_GROUP_RESPONSIBLE
    Add the following line of code to the method:
    C_SKIP_DEFAULT_LOGIC = 'X'.
    Hope this helps someone.
    Many thanks
    Gary Hawkins

    Thank You Gary. Appreciate it.
    Best Regards,
    Masood Imrani S.

  • MSS 60.1 Employee Documents iView problem

    Hi guys!
    I have implemented MSS BP ver. 60.1.19 and have problem with Employee Documents iView. It points on non-existing KM folder. However, if I would create it, it wouldn't help, because the portal creates user home folders in another path than the iView uses. Have someone of you solved this problem?
    Thanx for answers!
    Peter

    We had this problem and SAP gave us some new PAR files which fixed the problem.

  • Touchpad Speed and Finder problem

    Alright, I'm using a Penyrn baseline Macbook Pro that I picked up when it first came out. I'm loving it. It's great. So far, I've had a few big problems with it though.
    1) When I've been playing some graphic intensive games, like World of Warcraft, my Finder and dockbar freezes. Like, nothing would work, I couldn't alt-tab and while my game would work, I'd have to reset the entire computer.
    2) Again, while playing World of Warcraft, sometimes my Touchpad speed would get reset down to a slower setting. When I try and change it, it won't stay and often whenever I alt-tab between programs, it'll go back to the slower setting.
    3) Is there any place, Apple Store and what not that I could get it in for a check up? There's a few smaller things I feel IN the keyboard that's a bit defective and pixel problems.
    thanks!

    This will need more testing, which is outside of the scope of this forum. Its the upload speed which seems to be the issue, so there may be some faulty equipment.
    I have asked a moderator to provide assistance, they will post an invite on this thread.
    They are the only BT employees on this forum, and are a UK based team of people, who take personal ownership of your problem.
    Once you get a reply, make sure that you are logged into the forum, then click on their name, you will see a screen like this. Click on the link as shown below.
    Please do not send them a personal message, as they cannot deal with service issues that way.
    For your own security, do not post any personal details, on this forum. That includes any tracking number you are give.
    They will respond either by phone or e-mail, when its your turn in the queue.
    Please use the tracked e-mail, to reply, not via the forum. Thanks
    This is the form you should see when you click on the link. If you do not see this form, then you have selected the wrong link.
    When you submit the form, you will receive an enquiry number, so please keep a note of it
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Benefits Offering for Non-Employees and Retirees

    I am looking for those of you who have experience in setting up Benefits Offerings for Non-Employees and Retirees.

    We can set up different rates based on this criteria and if the business agrees to provide the data before we process Opne we have no problem. But, this is not ideal for them. My question is has anyone set up a field (what field if you have?), put it on a self service page before the enrollments page and then triggered the Open life event to reprocess based on updating this field? If so, how have you done this? Are there any other ways of allowing employees to choose smoker/non smoker before they get to the enrollment page but during the self service window for Open, and then having the enrollment page reflect only the rates based on their choice? Thanks again for your help.
    Gay

  • I just purchased a 13" MacBook Pro, when i have the charger pugged in I get tingling electric shocks from the case. Is this a known and fixable problem?

    I am using the supplied/genuine charger. The MBP is less than a week old and never dropped or abused.
    When I run my fingers over any part of the body I can feel tingling electric shocks. Surely this isn't acceptable or safe?

    The thing I find suspicious is that if it is a known problem, and there has been an official assessment that it poses no danger to the consumer, then I believe the documentation stating such would have to be made available upon request.  When a car maker issues an internal dealer alert about an maintenance issue that is not dangerous and which does not justify a recall, they are still required under consumer laws to make that information available to owners in writing if requested.  The same thing holds for most consumer products - you are not expected to merely take the word of an employee that it has been determined to be "acceptable and not dangerous" - the company is required to provide the documentation that supports that claim for a supposedly known issue.
    I've owned several Apple laptops since the introduction of the first all metal cased Titanium powerbooks up to my current MBP (the first unibody model), and NONE have ever done what you describe.  Regardless of what plug  connector I have used on the charger, or where I have plugged them in (at home, at work, hotels, airports, other peoples homes).
    If it is a known and documented problem, I would go back to the manager of that store and demand to see the internal documentation saying you "just have to live with it".  That sort of response just does not seem legitimate to me.

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • BOSD, Battery issues and Heating problem after iOS 8 upgrade

    i have upgraded my iPad mini to iOS 8. Ever since I upgraded to iOS 8 am facing blue screen issues and heating problem as well. This is really frustrating even the patch iOS 8.0.2 dint solve the problem. Are you guys listening our complaints. When will you fixing it.

    The same thing happened to me on my 2012 Subaru Outback.  I'm not sure this will help you since you have a Honda, but I'm posting this just in case.
    I paired the audio on my car with my iPhone 6.  However, when I turned the car off and back on again, the iPhone would not pair automatically.  I had to manually connect the iPhone with the car.  Turns out there are two separate bluetooth pairings on my car: one for phone which allows up to 5 devices and one for audio which allows only one device.  So I did the second bluetooth pairing for the phone (had already done the audio), and that fixed it.  YMMV

  • I am making code to try to make a game and my problem is that my code......

    I am making code to try to make a game and my problem is that my code
    will not let it change the hit everytime so im getting the first guy to hit 1 then next hits 8 and so on and always repeats.
    Another problem is that I would like it to attack with out me telling it how much times to attack. I am using Object oriented programming.
    Here is the code for my objects:
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class rockCrab {
         //Wounding formula
         double sL = 70;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 50;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         rockCrab() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              double done = rint(fH - fA);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("Rockcrab hit" +done);
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class self {
         //Wounding formula
         double sL = 1;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 1;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         self() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("You hit" +done);
    }Here is the main code that writes what the objects do:
    class fight {
         public static void main(String[] args) {
              self instance1 = new self();
              rockCrab instance2 = new rockCrab();
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
    }when the code is run it says something like this:
    you hit 1
    RockCrabs health is 9
    RockCrab hit 7
    your health is 38
    you hit 1
    RockCrabs health is 8
    RockCrab hit 7
    your health is 31
    you hit 1
    RockCrabs health is 7
    RockCrab hit 7
    your health is 24
    you hit 1
    RockCrabs health is 6
    RockCrab hit 7
    your health is 17
    my point is whatever some one hits it always repeats that
    my expected output would have to be something like
    you hit 1
    RockCrabs health is 9
    RockCrab hit 9
    your health is 37
    you hit 3
    RockCrabs health is 6
    RockCrab hit 4
    your health is 33
    you hit 2
    RockCrabs health is 4
    RockCrab hit 7
    your health is 26
    you hit 3
    RockCrabs health is 1
    RockCrab hit 6
    your health is 20
    Edited by: rade134 on Jun 4, 2009 10:58 AM

    [_Crosspost_|http://forums.sun.com/thread.jspa?threadID=5390217] I'm locking.

  • Remote and IR Problem

    A rather odd and annoying problem has recently been occuring on my MBP. A couple days ago my remote (after working without fail for over a year now) suddenly stopped working. Yesterday night and this morning it started working again but after a while it stopped again. I've read dozens of support articles which haven't really helped because there seems to be another problem.
    Most articles have stated that there is an option to disable the IR receiver in the "security" window under system preferences. When the IR and remote are not working this option disappears but when they are working the option is present. I have also tried replacing the battery without any result.
    I am now thinking that it might have something to do with heat buildup because it is mainly occuring after the laptop has been on for about a half hour, so I am going to try to borrow someone's fan.
    If anyone has any suggestions to solve this I would appreciate it if you could help. Thanks!
    MacBook Pro 1.83 GHz   Mac OS X (10.4.9)  

    check out this thread. Seems to be the same problem.
    http://discussions.apple.com/thread.jspa?messageID=4701905&#4701905

  • LG Ally text message and gps problems

    hello. ive been with verizon for about 10 years maybe. ive been overall happy with the service and customer service. but the prices should be alot lower.lol. i started out with the motorolas then switched to the lg phones. only problem with the motorola was the speakers. not loud enough. could never hear the phone ring. the lgs usually suffer from the same problem.
    i had a few phone problems but nothing like this lg ally. im on my second one and about to be my 3rd one in about 3 months. 1st phone i had every problem under the sun. this phone i am suffering from text message problems and gps problems. i suffer from what everyone else has problems with. the messages wont send. they will eventually lock up. it will show the envelope with the red explanation point ( i think thats the graphic). then usually everytime when i sent a text the texts will close. it will send then bounce back and show up as a draft and i have to resend it and wait for it to go thru. finally the last problem with the texts. when i send a text a phone number from my contacts shows up and freezes on the screen. its in white text with a black background. its the same number every time. it stays on the screen until i restart or pull my battery out.
    gps. when i open up google gps that comes with the phone i make sure the gps is on... when the directions are found and the map pops up 9 out of 10 times it just keeps saying searching for gps. the turn by turn never is found. the 1 time it does it takes a good 10 minutes to be found. atleast on my first one ally the gps did work 8 out of 10 times. it just took a good 5-10 minutes for gps to be found and show turn by turn.
    anyone else have these problems? where you able to fix them or did you need to get a new phone? the 2.1 update was supposed to fix problems. i think they just made it worse. the ally is supposed to have 2.2 froyo. where is it. is it ever going to get it. i got this phone because i like the lgs and the keyboard. also the sales representative on the phone was giving the lg ally rave reviews. why couldnt he say dont buy this go with a motorola droid. this phone is the biggest junk ever made

    I do apologize you are having trouble with your device I looked in our information system on the LG Ally in reguards to issues you are having it states if you have the Free Droid Security anti virus protection application down loaded it will cause the phone to lock up or freeze. Check and make sure you do not have the application on your device. Check you GPS settings and make sure correct. Go to Settings; Location & Security; make sure GPS is on wireless network. If this does not fix issue you can try doing a Master Reset on your device. Make sure your contacts are saved in your G-mail account or through Back Up Assistance.
    Master Reset/Soft Reset:
    Factory Reset option 1
    From the main screen, touch menu tab
    Touch Settings
    Touch Privacy
    Touch Factory Data reset
    Touch Reset Phone
    Warning: This will erase all data from your phone, including:
    Your Google account
    System and application data and settings
    Downloaded Applications
    It will not erase: Current System software and bundled applications; SD Card files, such as music or Photos
    Factory Reset option 2  - Warning this will reset device back to original factory settings.
    Turn off the phone
    Press and hold "home" + "end" + "volume up or down" keys together for a few seconds when the device is power off
    Once device displays boot information, release keys.
    Soft Reset
    Press the Power key.
    Touch Power off.
    Touch OK.
    Press the Power key to power on the device.
    or
    Remove battery cover, remove battery and reinstall.Also there is a new update for LG Ally it will be the Froyo 2.2 but there is not release date available at this time it will post on your device when available. Hope this Helps. Leslie

  • I am deleting files through my trash in my macbook pro (2010) and then emptying the trash can, but my hard disk space is not increasing! i recently upgraded to lion and the problem is new, wasn't the same with snow leopard! HELP!!!!!

    i am deleting files through my trash in my macbook pro (2010) and then emptying the trash can, but my hard disk space is not increasing! i recently upgraded to lion and the problem is new, wasn't the same with snow leopard! HELP!!!!!
    When i press command+I (Get Info) i see that there is 140 GB "Available Space" on my hard disk but when i click on my hard disk icon on the desktop, and then press "space" i only see 102 GB free!! What the f*???
    Please HELP!!!!!! Getting second thoughts on Lion!!!!

    Hi b,
    Have you restarted yet?

  • How do I fix my ipod classic that says very low batter after I have charged it and the problem persists?

    I have an Ipod video 30g that says Please wait very low battery. I charged it for about a day and the problem persists. I've tried using some solutions on the internet and none of them worked including: holding the menu and select, holding select and play to put it in disk mode with no avail. Is there anyone who can help me!!!

    Have you read this post written by another forum member?
    The Sad iPod icon.
    However, as your iPod was purchased on Boxing Day, why not get it serviced under the warranty?
    You can arrange online service here.
    Service request.
    Or if an Apple store is near you, take it there and have them check your iPod.
    You can make an appointment by using this link.
    Genius Bar Appointments.

Maybe you are looking for

  • How do I delete an old device off my iTunes account to all ow for a new one?

    I'm wanting to delete the 2 iPod touches off my account

  • Airport express vs. time capsule vs. router

    What is best to do? My airport express is now connected to my router (speedtouch) and works very well. Do I connect my newly bought time capsule to my router or keep this one wireless? Because with the airport express I can make use of airplay, which

  • How to pass in a parameter into a report viewer on a jsp - and hidden

    Hi, I've built a php application and am using the java environment to enable the crystal report/viewer.  The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report v

  • Help with Oracle Database XE edition tutorial

    Hi, I am a student and our instructor has told us to install 11g and now has us running through the 10g tutorial and I've run into a number of problems. There is one issue that I cannot find the solution for and was hoping that somebody could give me

  • DCNM LAN JAVA Client Not working

    Hi ,  Recently i installed the DCNM server , we are using nexus 7k in dc environment . I  purchased the DCNM server license and assigned it to  switches thourgh web dcnm client . Login in Java DCNM LAN is  not working , It says check your username/pa