Menu
  • HOME
  • TAGS

Show specific data based on the role of the user

jquery,asp.net-mvc,user,administrator,usersettings

You can give some class to button in view like in menu <button class="btnCreateView"></button> In Footer Give the same button with other class name <button class="btnCreateFooter" style="display:none;"></button> Now in the view not footer Add this jquery <script> $(document).ready(function(){ if( $('.btnCreateView').length > 0 ) { $('.btnCreateFooter').show(); } }); <script> ...

Dictionary in Settings throws an exception?

c#,exception,dictionary,usersettings

.NET settings do not handle generics very well. This is what I do: [XmlRoot("dictionary")] public class MyDictionary : SerializableDictionary<int, string> { } ...

FileInfo in UserSettings saves as Null?

c#,fileinfo,usersettings

You can't. XmlSerializer requires a parameter-less constructor - which FileInfo does not have. It's marked Serializable because there are other serializers that don't have the same requirement. Related question....

Access other user's local application settings in C#

c#,configuration,.net-3.5,impersonation,usersettings

I ended up running another custom made console program under User2 which reads settings file as XmlDocument. Reading settings file: if (File.Exists(settingsPath)) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.Load(settingsPath); XmlNode settingsNode = xmlDocument.SelectSingleNode("/XPath.to.node.you.are.looking.for"); foreach(XmlNode xmlNode in settingsNode.ChildNodes) { //do some work } } ...

Analog for C#'s Settings in Java?

java,jar,usersettings

There is no API for doing that. Is it possible to locate the .jar file where a particular class resides, and modify it? Yes, with some work. But you shouldn't do it, because: The change may not be seen until the next time a Java Virtual Machine is started. It...

How can I update a resource string that has been changed in the UI by the user?

c#,usersettings

You can use Isolated Storage to persist user settings. In case that you don't know what that is, the following might help you get started: "What is it?"-type article on InformIT MSDN documentation ...

How can I implement a class that can be saved in User Settings?

c#,wpf,serialization,usersettings

SoundViewModel needs a parameterless constructor for deserialization. Only public properties will be serialized. You can skip properties using [XmlIgnore]. You also can't save generic types in user settings (Observable<T> in your case). There's an easy work-around though and I often do this with dictionaries. [Serializable] public class MySerializableCollection : List<SoundViewModel>{}...

Grant UTL_HTTP permission in PLSQL

plsql,oracle-sqldeveloper,reserved-words,usersettings

Log on as SYS AS SYSDBA. Execute grant execute on sys.utl_http to "Database"; Do not use any square brackets! That should work. Piece of advice: Do not name your DB user 'Database'. To reset your SYS password Run cmd.exe as administrator. cd to your ${ORACLE_HOME}/database. Find the PWDsomething.ora file...