Can i user char as the key in the hashtable

I need to use char as the key in my hashtable
Hashtable h=new Hashtable();
char a='s'
h.put(a,'x');
i tried hashtable accepts String as the key .how to convert the
String in to char

and, as bbritta has pointed out, the 'x' for the value in the code you and I threw out there is a char, not a Character, so it won't do for the value parm in the put call - try
h.put(a, new Character('x'));When you pull these things out of your Map via the get method you'll need to cast to Character and use charValue to get the thing back as a char (if that's how you need it).
Hope that made sense
Lee

Similar Messages

  • C# Code that can add user directly to the AD through custom share Point form

    Hi
    Here is my requirement. Can anyone resolve??? 
    Trying to build a Visual web Part in which system administrator can add user directly to the AD through custom share Point form.
    Please help in doing this...

    Hi
    Use DirectoryEntries.Add Method
    https://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentries.add.aspx
    Or
    www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C
    Or.
    www.morgantechspace.com/2013/10/create-new-active-directory-user-in-c.html?m=1
    Regards, Rajendra Singh If a post answers your question, please click Mark As Answer on that ost and Vote as Helpful http://sharepointundefind.wordpress.com/

  • Can two user accounts on the same mac share the Address Book

    My wife and I have separate user accounts on the same Mac but we would like to share the same Address Book. I have searched the forums to no avail. It seems silly to use .mac to do so, and a needless expense when the information is already on the same computer.

    David M.F. Chapman wrote:
    My wife and I have separate user accounts on the same Mac but we would like to share the same Address Book.
    That's not possible. you have to use Mobileme if you want to share the address book.
    I have searched the forums to no avail. It seems silly to use .mac to do so, and a needless expense when the information is already on the same computer.

  • Can Multiple users work on the same work Repository ?

    I have master repository and work repository on one machine, can multiple developers connect andwork on the same work repository? how?

    oh Yes!
    it is v simple.
    follow the steps:-
    once master and work repository has been created on a system.U just need to know all the information supplied wen creating a login to designer.
    like user name and password of database,url,driver as well as master's repository uname and password.
    if u have the following information with you,then u can create a new login with designer provided all the above information and u will have full access to designer
    in work repository u want to connect

  • How can different users spool to the same file?

    I am using SQL*plus for 10g db. I am spooling query output to a file. Query should be run and spooled multiple times overwriting previous output.
    here is the main piece from the query.sql file
    SPOOL output.txt
    SELECT....
    SPOOL OFF
    Let's say user Dan runs this query for the first time. An output.txt is created. Dan can run the query multiple times and each time new data is spooled to output.txt. Now Mike is trying to run this query. Nothing happens!
    ++I thought the issue has to be with file permissions. However, the issue remained after I gave ALL permissions (a=rwx) to both files: query.sql & output.txt. Funny thing is that I created query.sql and now I (or any other users, except Dan) cannot run it.++
    Thank you!

    No it does not show any error. I'll go back to the technique used in this organization - capturing output through trace (funcation of the virtual terminal). Thanks anyway.

  • Can several users post on the same blog (SLS 10.6.2)?

    On Snow Leopard Server 10.6.2 a user (let's say user A, defined in open directory) can have it's own blog. Is there a way to allow another user (user B, defined in open directory) to post entries on user A's blog? Or can I setup a company's blog where serveral users belonging to one group are allowed to post on?
    Best regards,
    Christian

    You have to setup a new wiki collaboration page, activate the blog function for that wiki (settings in the web interface, on the wiki home page).
    Then you have to add users and/or groups that you want to give access to in the settings (also in the settings inside the wiki interface, once you have created the wiki).
    You can also activate the group calendar for the new wiki, in the settings page, so that you get a web calendar for the wiki.

  • Can a user exist in the org structure multiple times?

    With one user id / single sign on?  If so what are the impacts?  Eg: when they log on what attributes get picked up?
    Thanks

    Hi,
    it is possible, but if you have a 50-50 assignment you can't steer what attributes are taken into account, so you might be lucky, or you won't .
    You can change the assignment of the CP to the S to something like 51-49, the 51 position will then be used to determine the attribute values.
    If you want to buy for multiple companies/plants, maintain the BUK attribute and the extended attributes for locations.
    The only real problem shows up when a user should be allowed to buy cross backend system. This is not possible. Then you should start thinking about a buy on behalf scenario or multiple user accounts.
    Regards,
    Robin

  • Can't get hold of the user.waveset.roles in my workflow

    Hey,
    I am developing a workflow process that adds a role to each user during reconsiliation if they don't already have it.
    1. It gets the user view.
    2.. It checks to see if the user has a particular role. (This is where my problem lies, as the user.wavset.roles value returns null).
    3. If the user already has the role the process ends.
    4. If the user doesnt have the role it appends it to user.waveset.roles and then checks in the user view.
    So at the moment the process always thinks the user hasnt got the role because I can't get user.wavset.roles to return a value. Although I can access it when I append!?
    Any ideas anyone why I cant access the user.waveset.roles value in the second step? It prints out that the value is null on the stack trace.
    The Activity code looks like this:
    <Activity id='5' name='Check Roles'>
    <Transition to='end'>
    <match>
    <upcase>
    <block trace='true'>
    <ref>user.waveset.roles</ref>
    </block>
    </upcase>
    <upcase>
    <rule name='Entrust GetAccess Role Name'/>
    </upcase>
    </match>
    </Transition>
    <Transition to='ProcessUser'/>
    <WorkflowEditor x='163' y='9'/>
    </Activity>

    Check once if the variable "user" is holding the user view or not.
    I'm not sure if you have already tried this....
    If we are getting the user view using a workflow service then by default the fetched user view is placed in a variable called "view". So we may have to use 'view.waveset.roles'.
    If we want to store the fetched user view in the variable "user", then in the Action that gets the user view, we may have to return the value from "view" to "user", wherein "user" is a global variable defined at the workflow level.Then we can refer "user" in all the activities throughout the workflow.

  • How to override the onTouchUp in the user control which can be used to fire the event not only on this user control, but whole application

     I am a new to the C# and WPF. Right now, I want to override onTouchUp event in my user control. Then I can add user control in
    the references for reuse. The problem is each time I want to test this event on the application, the event only fire at area of user control, not whole screen. Anyone has solution for this?

    You cannot just add a UserControl to a window and expect its OnTouchUp method to get invoked when a TouchUp event occurs outside of the user control. That is not how routed events work.
    The OnTouchUp method of the UserControl will only be invoked when a TouchUp event occurs from within the UserControl.
    The event will indeed bubble up to the parent elements of the UserControl and you could for example handle the event in the parent window:
    <Window x:Class="WpfApplicationSlider.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" TouchUp="Window_TouchUp">
    The OnTouchUp method of the UserControl will however never get invoked when you touch an element outside of the UserControl because an event only travels between the source element and the handler(s). This is how routed events work.
    If you want a "global" TouchUp event handler you should override the OnTouchUp of the top-level
    window:
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    protected override void OnTouchUp(TouchEventArgs e)
    base.OnTouchUp(e);
    //do your thing...
    If you want to be able to reuse the functionality across all of your windows in case you have several you could for example create an abstract window class and make all your windows inherit from this one:
    namespace WpfApplication1
    public abstract class BaseWindow : System.Windows.Window
    protected override void OnTouchUp(System.Windows.Input.TouchEventArgs e)
    base.OnTouchUp(e);
    //do your thing...
    MainWindow:
    public partial class MainWindow : BaseWindow
    public MainWindow()
    InitializeComponent();
    <local:BaseWindow x:Class="WpfApplicationSlider.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WpfApplication1"
    Title="MainWindow" Height="350" Width="525">
    </local:BaseWindow>
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and please start a new thread if you have a new question.

  • How to prevent user from deactivating the adobe software

    I am working in a training center, We've got 20 machines here installed with Adobe CS3 production premium (not using network license). The problem now i foresee is the software deactivate problem, i found user can deactivate the adobe software even they dont have XP administrator rights.
    And what i know about activation of adobe software is that there is a limit of activation count of 30 tries and after that i have to call the adobe technical support for help.
    Is there any way that i can prevent user from deactivating the software in terms of registry modification or what other kinds of method.
    Thanks
    Ivan

    If you have 20 machines I assume you have a volume license, which does not require de/activation anyway.
    If you have 20 separate licences... well, the only thing I can think of is to block the Adobe Activation domains of adobe.com through the firewall of your network. You should probably contact Adobe directly for more specific info.

  • How can I restrict more then one user to access the table?

    Hi !
    I have a problem and two solutions and I am a bit confused as to
    which one is the best one and/or can there be any better way of
    handling the problem ?
    Problem : I have to update a key field of a table when I update
    it in the form 5.0 screen. I am basically doing a maintenance of
    a table and if a certain field is updated then the change has to
    be reflected in two more tables. But the issue is that the field
    is a part of the key in those two tables. So all I can think of
    is that I need to insert new set or rows for that new value of
    the field and delete the old set of records for old values of
    the field.
    There are two ways of doing it;
    1.One option can be to explicitely define two cursors separately
    and fetch the values in them one by one and then insert the new
    records and then delete the old records in both the tables. This
    I feel will be a cumbersome process both in terms of processing
    time and the coding.
    2.Second option I was thinking can be to create two flat tables
    (without keys) and insert the values in them and update the
    changed field there and then insert the rows in the respective
    tables. Delete the old records in the main tables and delets the
    records in these flat tables. This is a bit more faster and
    easier to predict and code. This seems to be a better option for
    me.
    Any comments on these ?
    In both the cases I was thinking of making some provision so
    that more then one person can't update the table simultaneously.
    Since if there are more then one persons doing the processing
    then some inconsistency might creep into the whole process.
    This is easier to do in the second process as if I check the
    data in the flat tables and if there is some data then I can
    presume that some one is doing the processing and I can ask the
    other person to hold for a while. But in this case how can I
    stop more then two people to simultaneously check for the empty
    table and start inserting the record ?
    I was just thinking of having a sepatare table having only one
    field and this will be a key field and as the process begins the
    process will insert a fix value say 'Y' in the key field and at
    the end of the process the record will be deleted and this way
    we can restrict the user to access the process more then one at
    a time..? Since you can't have same value of the key in a table
    more then once.
    Any better way of handling it will be deeply appreciated.
    How about locking the table at the begining and releasing the
    lock at the end ? Will there be any issue in that? since I am
    inserting and deleting the rows in the same transaction.
    Comments welcome,
    Shobhit
    null

    How about performing the update IN the database using a stored
    procedure?
    By using non-database fields on your form to get the
    information, you can then call the procedure in the database to
    perform the updates. If an error occurs in the procedure you
    rollback, if necessary, and send a message or status back to the
    form. If it succeeds you might wish to commit and then re-
    execute the form's query -- using either the original key values
    or the new key values...
    null

  • HT1420 Can multiple users have Itunes accounts on the same computer?

    New to the Mac. Can my wife and I have separate iTunes directories on the same computer accessed based on our login?

    Yes. This happens automatically with different user accounts on the computer, and can be manually set up for a single account by launching iTunes with the Option key held down.
    (94685)

  • JBO-25014: Another user has changed the row with primary key oracle.jbo.Key

    Hi,
    I am developing a Fusion Web Application using Jdeveloper 11.1.2.1.0. I have a home.jspx page that has a ADF table built on efttBilling View Object. . When you click on one of the rows in the table, it will take you to detail.jspx where you can edit the row and save. When 'save' is clicked, stored procedures are executed to update/insert rows into few tables , and then go back to home.jspx where you need to see updated content for that row.
    To get down to the exact issue, updates are made to the tables on which the efttBilling View Object is built using a stored procedure. Once this is done, I am trying to requery view object to see new content. But I keep getting JBO-25014: Another user has changed the row with primary key oracle.jbo.Key error. Following are the approaches I followed to query new results:
    a. Executed Application Modules Commit Method. Created 'Commit' Action binding and tied it to homePageDef.xml. Called this binding from a view scope bean.
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
         OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
       if (!operationBinding.getErrors().isEmpty())
        return null;
    b. Marked 'Refresh on Insert' , 'Refresh on Update', 'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    c. Tried to Requery View Object. Created a refreshViewObject method in Application Module Impl.java file, exposed this method to the client interface and created a invokeMethod Action binding in home.jspx
    Code in Application Module:
      public void refresheftTransactionsforBillingAccountViewObj1View()
        System.out.println("In eftTransactionsforBillingAccountViewObj1");
      findViewObject("eftTransactionsforBillingAccountViewObj1").executeQuery();
    Code in view scope bean
            DCBindingContainer bindings =
           (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding operation =
            bindings.getOperationBinding("refresheftTransactionsforBillingAccountViewObj1View");
            operation.execute();
    I have searched web, ADF forums and tried methods suggested in there but no sucess.
    Could anyone please provide some insight in this issue. I have been battling with this since quite some time. I can provide you with the log file too.
    Thanks!
    Shai.

    What code does your Commit method have .. can you try using the Commit executable from the AM itself instead ?
    Also -
    Shai wrote:
    'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    which all attributes you set this property for . it should just be for History columns as such.
    Did you also check if this could be your scenario ?
    Decompiling ADF Binaries: Yet another reason for &quot;JBO-25014: Another user has changed the row with primary key orac…
    OR
    JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
    OR
    Another user has changed the row with primary key -Table changed externally
    Message was edited by: SudiptoDesmukh

  • Hi all, i'm new and facing a problem while creating a new file for Xcode. I can't select the box "with XIB for user interface" if the subclass is "UIViewController".this problem happen after i upgrade Xcode to 4.6 version.Appreciate for any help rendered.

    Hi all, i'm new to Mac book & Xcode. I'm learning and facing problems while creating a new file for Xcode. Before i upgrade the software, i have no issue to create simple steps in apps. After upgrade Xcode to 4.6 version, i'm facing lot's of issue eg.
    1) "the identity "iphone developer" doesn't match any valid certificate/ private key pair",
    2) can't select the box "with XIB for user interface" if the subclass is "UIViewController"..
    Appreciate for any help rendered.

    Mikko777 wrote:So what is the best?
    I wouldn't judge. I've been to Arch for a week, you know? But as said, it's VERY close to it.
    What I dislike after a week is makepkg not handling dependencies automatically (which would be overhead, so probably not appropriate).
    Mikko777 wrote:Also theres KDEmod for modular kde, dunno if its for 64 bits tho.
    Don't actually need that as said ... I see no real benefit of having that other than not beeing a KDE user or having Gentoos useflags.
    Mikko777 wrote:PS:You produce a lot of text and welcome smile
    Yeah. Wonder why I'm still employed? So do I ...

  • What can I do to prevent the control key from not working in the future?

    Background:
    I bough an macbook pro about 1 year and 3 months ago and after 9 months of usage my control key stopped working for about an hour or two.This happened every time I turned on or awoke my mac from sleep (lid down).I sent it to an authorized apple service center and they replaced the keyboard.Everything was fine for about 4-5 months when the same thing happened again, ctrl key stopped working but this time not when turning on my mac but at random times and for random intervals.I sent it again to the service center but they told me that this time it won't be for free because my 1 year warranty has expired.I should mention that in European Union and Romania (the country where I am from and from which the mac was purchased) the law is that any electronics device sold has to come with at least 2 years of warranty.Apple seems to ingore this law.
    Anyway, after long conversations with apple uk on the phone they agreed to pay for the keyboard but not for the labor which was 70 eur ($100).It's not much but my 2 year warranty should have covered it.The sad part is that I have no guarantee that it's indeed a keyboard error and not something else, this might happen again in 4 months and I doubt this time apple would agree paying for the keyboard (which is 150eur) ($215).
    I should also mention that before calling apple uk I tried apple's romanian number (listed on their site) and it didn't work on the 3 phone networks that I've tried (2 fixed and one mobile) which led me to believe that apple support is in fact a big joke.
    Suffice to say that I will no longer purchase any apple devices or software, I regret purchasing mac os x lion just a week ago, when I will no longer use it because I intend to sell all my apple gear (timecapsule, iphone4, macbook pro) and buy stuff from companies that value their customers and respect their contracts.
    My questions are this:
    1) why does apple ignore EU and Romanian law?
    2) what can I do to prevent this from happening in the future
    3) can I request that my macbook be more thoroughly inspected? I suspect the keyboard is not the main problem and it will soon happen again as it happened two times already.
    4) can I do something for the repair labor charge to be waved? It is illegal in my country to ask for one in this scenario...

    Everyone reading your posts here is just another MacBook Pro user. We're all volunteers, not Apple employees. No one here can speak for Apple.
    In my personal opinion, buying Apple products in a country where Apple has no stores and no corporate presence is a risk that the buyer takes knowingly. I don't think it's a wise risk, and I don't recommend that anyone take it. A small percentage of the products sold anywhere are going to have problems, and it makes more sense to buy an inferior product that can at least be serviced locally than to buy a superior product that may have to be sent thousands of miles for repair if anything ever goes wrong with it.

Maybe you are looking for

  • Y2P dim screen, caps lock indicator stuck on. Already disabled adaptive brighness... Warranty?

    Hi guys. Recently bought my second Y2P, this one second hand. Reason being my previous one was the 4GB i5 model, this one is the 8GB i7 Now I've noticed a few things when I compare them. Firstly, and most annoyingly, the screen on this one is signifi

  • Query Engine Error in Crystal Report

    I have a asp application with crystal report as reporting tool. Every thing works fine with Oracle 9i, but when i migrate to Oracle Database 10g Release2 some of the reports in crystal report shows following error report. Query Engine Error:'HY00:[or

  • Application Loader Error ITMS-90125

    When i try to send my multi-folio app to store using application loader, i get "ERROR ITMS-90125 "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This

  • What Version of Flash should I use for XP Version 2002???

    I have an older PC with base XP on it and I am having trouble installing/running flash. Can anyone tell me what version of Flash that will support my old PC running Windows XP Professional Version 2002??? Everything else is working fine except for Fl

  • Remove convert web page to pdf icon

    The convert web page to pdf icon, is just a link to d/l the software, and is totally useless after installing it. It shouldn't be sitting there permanently.