Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 203/433 | < Previous Page | 199 200 201 202 203 204 205 206 207 208 209 210  | Next Page >

  • delta-dictionary/dictionary with revision awareness in python?

    - by shabbychef
    I am looking to create a dictionary with 'roll-back' capabilities in python. The dictionary would start with a revision number of 0, and the revision would be bumped up only by explicit method call. I do not need to delete keys, only add and update key,value pairs, and then roll back. I will never need to 'roll forward', that is, when rolling the dictionary back, all the newer revisions can be discarded, and I can start re-reving up again. thus I want behaviour like: >>> rr = rev_dictionary() >>> rr.rev 0 >>> rr["a"] = 17 >>> rr[('b',23)] = 'foo' >>> rr["a"] 17 >>> rr.rev 0 >>> rr.roll_rev() >>> rr.rev 1 >>> rr["a"] 17 >>> rr["a"] = 0 >>> rr["a"] 0 >>> rr[('b',23)] 'foo' >>> rr.roll_to(0) >>> rr.rev 0 >>> rr["a"] 17 >>> rr.roll_to(1) Exception ... Just to be clear, the state associated with a revision is the state of the dictionary just prior to the roll_rev() method call. thus if I can alter the value associated with a key several times 'within' a revision, and only have the last one remembered. I would like a fairly memory-efficient implementation of this: the memory usage should be proportional to the deltas. Thus simply having a list of copies of the dictionary will not scale for my problem. One should assume the keys are in the tens of thousands, and the revisions are in the hundreds of thousands. We can assume the values are immutable, but need not be numeric. For the case where the values are e.g. integers, there is a fairly straightforward implementation (have a list of dictionaries of the numerical delta from revision to revision). I am not sure how to turn this into the general form. Maybe bootstrap the integer version and add on an array of values? all help appreciated.

    Read the article

  • SQLDatasource CommandTimeout not working

    - by Cedric Aube
    Good day, I'm using a SQLDataSource with a dynamic query generated c#, based on user choices in many fields. However, since our tables are very large, sometimes, I get a command timeout exception. I tried to set the property in 'Selecting' of the SqlDataSource like so: protected void SqlDataSource_PSearch_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { e.Command.CommandTimeout = 900; } but with not luck, like if this attribute was ignored. .NET 2.0, Sql server 2005. Any idea?

    Read the article

  • Error running java -jar command

    - by dmantamp
    Hi all, I created a jar file using the following ANT script <manifestclasspath property="jar.classpath" jarfile="${bin.dir}/${jar.app.name}" maxparentlevels="0"> <classpath refid="main.class.path" /> </manifestclasspath> <target name="jar"> <mkdir dir="${build.dir}/lib/isp"/> <mkdir dir="${build.dir}/lib/jasper"/> <copy todir="${build.dir}/lib/jasper"> <fileset dir="${lib.jasper.dir}"> <include name="**/*.jar" /> </fileset> </copy> <copy todir="${build.dir}/lib/isp"> <fileset dir="${lib.isp.dir}"> <include name="**/*.jar" /> </fileset> </copy> <jar jarfile="${bin.dir}/${jar.app.name}" index="true" basedir="${classes.dir}" excludes="lib/mytest.jar " > <manifest> <attribute name="Main-Class" value="${main.class}" /> <attribute name="Class-Path" value="${jar.classpath}" /> </manifest> </jar> </target> The resulting jar file has the following MANIFEST.MF entry. Main-Class: dm.jb.Main Class-Path: lib/isp/OfficeLnFs_2.2.jar lib/isp/RXTXcomm.jar lib/isp/ba rbecue-1.0.6d.jar lib/isp/commons-logging-1.1.jar lib/isp/forms-1.0.5 .jar lib/isp/gnujaxp.jar lib/isp/helpUI.jar lib/isp/inspInstaller.jar lib/isp/itext-2.0.1.jar lib/isp/itext-2.0.2.jar lib/isp/jcalendar-1. 3.2.jar lib/isp/jcl.jar lib/isp/jcommon-1.0.10.jar lib/isp/jcommon-1. 0.9.jar lib/isp/jdnc-0_7-all.jar lib/isp/jdnc-runner.jar lib/isp/jdom .jar lib/isp/jfreechart-1.0.6.jar lib/isp/jlfgr-1_0.jar lib/isp/junit .jar lib/isp/log4j-1.2.9.jar lib/isp/looks-1.3.2.jar lib/isp/msbase.j ar lib/isp/mssqlserver.jar lib/isp/msutil.jar lib/isp/mysql-connector When I try to run the command java -jar mytest.jar, it fails and throws error saying dm.jb.Main not found. But I could run the class by specifying the classpath java -classpath dm.jb.Main Please help me DM

    Read the article

  • PyQt4.QtWebKit.QWebFrame missing findAllElements() method on debian

    - by user249095
    I recompiled PyQt4 from source, but the issue still exists. On another ArchLinux system, it works well. Can someone help me? Thanks! on Debian: import PyQt4.QtWebKit dir(PyQt4.QtWebKit.QWebFrame.findAllElements) Traceback (most recent call last): File "", line 1, in AttributeError: type object 'QWebFrame' has no attribute 'findAllElements' on ArchLinux: import PyQt4.QtWebKit dir(PyQt4.QtWebKit.QWebFrame.findAllElements) ['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']

    Read the article

  • Set attributes from dictionary in python

    - by Oscar Reyes
    Is it possible to create an object from a dictionary in python in such a way that each key is an attribute of that object? Something like this: dict = { 'name': 'Oscar', 'lastName': 'Reyes', 'age':32 } e = Employee( dict ) print e.name # Oscar print e.age + 10 # 42 I think it would be pretty much the inverse of this question: Python dictionary from an object's fields

    Read the article

  • Clickatell SOAP wsdl to JAXB java classes

    - by timvb
    Hi all, I'm trying to generate JAXB classes from the Clickatell wsdl: You can find the wsdl definition here it quite large: http://api.clickatell.com/soap/webservice.php?WSDL When trying to generate java classes from this Wsdl i got the following errors: [ERROR] undefined simple or complex type 'SOAP-ENC:Array' [ERROR] undefined attribute 'SOAP-ENC:arrayType' I hope someone can help me out. Cheers, Tim

    Read the article

  • A Tab Exception Message

    - by Kooper
    06-14 00:21:30.398: ERROR/AndroidRuntime(332): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost' what it means? I've already given the id for tabhost.And I can see the id in R.java. Here is the .xml: TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" TabWidget android:id="@+id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" FrameLayout android:id="@+id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" LinearLayout TabHost

    Read the article

  • How can I use django.core.files.File

    - by Jake
    The docs for django.core.files.File imply I can do this: print File(open(path)).url but the File object has no attribute 'url' However, django.db.models.fields.files.FieldFile extends File and does have all the attributes described in the docs for File, but I can't create one without giving it a model field. All I want it something that does what the docs for django.core.files.File (link above) say it does, take a python file and give it attributes like 'url' and 'path' and 'name', can anyone help? Cheers, Jake

    Read the article

  • XSL How to copy identical + add copy with attributes changes

    - by Alex
    Hello I need to copy a node and its sub-nodes: first: one identical copy followed by a modified copy with some attributes values changed Here is the extract to change: <Configuration Name="Debug|Win32" OutputDirectory=".\Debug" IntermediateDirectory=".\Debug" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" BasicRuntimeChecks="3" RuntimeLibrary="1" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" WarningLevel="4" SuppressStartupBanner="TRUE" DebugInformationFormat="4" CompileAs="0"/> </Configuration> In the second copy I need to change all "Debug" to "Release" and some attribute values also. Thanks

    Read the article

  • How can I decrypt encrypted files using a PEM private key?

    - by Phil Cole
    I have files which have either been encrypted with a public key and the Blowfish algorithm, or a public key and the AES-256 algorithm. I'm looking to put together a Perl script that would be able to use the private keys (which I do have) to decrypt the files. The public and private key files are all in PEM format, and while I can find ways of reading the PEM files, and ways of decrypting data with a key, I haven't yet found a way of going from PEM - key. Any suggestions?

    Read the article

  • Problem with hash function: hash(1) == hash(1.0)

    - by mtasic
    I have an instance of dict with ints, floats, strings as keys, but the problem is when there are a as int and b as float, and float(a) == b, then their hash values are the same, and thats what I do NOT want to get because I need unique hash vales for this cases in order to get corresponding values. Example: d = {1:'1', 1.0:'1.0', '1':1, '1.0':1.0} d[1] == '1.0' d[1.0] == '1.0' d['1'] == 1 d['1.0'] == 1.0 What I need is: d = {1:'1', 1.0:'1.0', '1':1, '1.0':1.0} d[1] == '1' d[1.0] == '1.0' d['1'] == 1 d['1.0'] == 1.0

    Read the article

  • Internet Explorer: Error Message: 'nodeType' is null or not an object

    - by Patrick
    hi, I get the following error in IE Line: 173 Character: 5 Code: 0 Error Message: 'nodeType' is null or not an object This is the line of code where it crashes: if($clone.attr("nodeType") == 1 && !$clone.hasClass("dontend")){ website: http://www.donatellabernardi.ch/drupal/ I've debugged the attribute nodeType in Firebug and the output is always "1". thanks

    Read the article

  • (infragistics) ultradropdown

    - by pjb
    using a ultradropdown control from infragistic, i want to capture the "Tab" key press and focus the control somewhere else right now i have tried -KeyPress event -KeyDown event //if (e.KeyChar == (char)Keys.Tab) //{ //i'm using sender to find out which control was tab out. // SmartFocusControl(sender); //} now this work for most of the keyboards press except "TAB" both event never get fired on "TAB" key press... wondering why... Thank you.

    Read the article

  • ASP.NET MVC 1.0: OutputCache, RenderPartial and WriteSubstitution

    - by David
    Hi folks, after digging into this topic and having the requirement, that a single page should be totally cached, except for a Html.RenderPartial("LogOnUserControl"); i couldn't find any working solution on this... the only "it getting warmer" thing i foudn was this solution , which unfortunately is not working with a "partial view", which requires the Request.IsAuthenticated attribute ( the fakeContext is losing this info ) Have you heard of any other solution to do this?!

    Read the article

  • How to inherit from DataAnnotations.ValidationAttribute (it appears SecureCritical under Visual Stud

    - by codetuner
    Hi, I have an [AllowPartiallyTrustedCallers] class library containing subtypes of the System.DataAnnotations.ValidationAttribute. The library is used on contract types of WCF services. In .NET 2/3.5, this worked fine. Since .NET 4.0 however, running a client of the service in the Visual Studio debugger results in the exception "Inheritance security rules violated by type: '(my subtype of ValidationAttribute)'. Derived types must either match the security accessibility of the base type or be less accessible." (System.TypeLoadException) The error appears to occure only when all of the following conditions are met: a subclass of ValidationAttribute is in an AllowPartiallyTrustedCallers assembly reflection is used to check for the attribute the Visual Studio hosting process is enabled (checkbox on Project properties, Debug tab) So basically, in Visual Studio.NET 2010: create a new Console project, add a reference to "System.ComponentModel.DataAnnotations" 4.0.0.0, write the following code: . using System; [assembly: System.Security.AllowPartiallyTrustedCallers()] namespace TestingVaidationAttributeSecurity { public class MyValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { } [MyValidation] public class FooBar { } class Program { static void Main(string[] args) { Console.WriteLine("ValidationAttribute IsCritical: {0}", typeof(System.ComponentModel.DataAnnotations.ValidationAttribute).IsSecurityCritical); FooBar fb = new FooBar(); fb.GetType().GetCustomAttributes(true); Console.WriteLine("Press enter to end."); Console.ReadLine(); } } } Press F5 and you get the exception ! Press Ctrl-F5 (start without debugging), and it all works fine without exception... The strange thing is that the ValidationAttribute will or will not be securitycritical depending on the way you run the program (F5 or Ctrl+F5). As illustrated by the Console.WriteLine in the above code. But then again, this appear to happen with other attributes (and types?) too. Now the questions... Why do I have this behaviour when inheriting from ValidationAttribute, but not when inheriting from System.Attribute ? (Using Reflector I don't find special settings on the ValidationAttribute class or it's assembly) And what can I do to solve this ? How can I keep MyValidationAttribute inheriting from ValidationAttribute in an AllowPartiallyTrustedCallers assembly without marking it SecurityCritical, still using the new .NET 4 level 2 security model and still have it work using the VS.NET debug host (or other hosts) ?? Thanks a lot! Rudi

    Read the article

  • ASP.NET MVC Routing Via Method Attributes

    - by TorgoGuy
    In the StackOverflow Podcast #54, Jeff mentions they register their URL routes in the StackOverflow codebase via an attribute above the method that handles the route. Sounds like a good concept (with the caveat that Phil Haack brought up regarding route priorities). Could someone provide some sample to to make this happen? Also, any "best practices" for using this style of routing?

    Read the article

  • J2ME UI on Samsung Bada platform

    - by Kiran Kuppa
    Hello All, When a J2ME application runs on Samsung Bada phone (GT-S5320, in my case),a virtual keypad is shown on the screen by default and always! This virtual keypad consists of the following keys - LEFT,RIGHT,UP,DOWN,FIRE and SOFT1, SOFT2. Is there anyway I can control when this keypad is displayed and when it isn't. I understand that this would be a platform specific solution. But does it exist? Thanks, -- Kiran Kuppa

    Read the article

  • Why default constructor does not appear for value types?

    - by Arun
    The below snippet gives me a list of constructors and methods of a type. static void ReflectOnType(Type type) { Console.WriteLine(type.FullName); Console.WriteLine("------------"); List<ConstructorInfo> constructors = type.GetConstructors(BindingFlags.Public | BindingFlags.Static | BindingFlags.NonPublic |BindingFlags.Instance | BindingFlags.Default).ToList(); List<MethodInfo> methods = type.GetMethods().ToList(); Type baseType = type.BaseType; while (baseType != null) { constructors.AddRange(baseType.GetConstructors(BindingFlags.Public | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Default)); methods.AddRange(baseType.GetMethods()); baseType = baseType.BaseType; } Console.WriteLine("Reflection on {0} type", type.Name); for (int i = 0; i < constructors.Count; i++) { Console.Write("Constructor: {0}.{1}", constructors[i].DeclaringType.Name, constructors[i].Name); Console.Write("("); ParameterInfo[] parameterInfos = constructors[i].GetParameters(); if (parameterInfos.Length > 0) { for (int j = 0; j < parameterInfos.Length; j++) { if (j > 0) { Console.Write(", "); } Console.Write("{0} {1}", parameterInfos[j].ParameterType, parameterInfos[j].Name); } } Console.Write(")"); if (constructors[i].IsSpecialName) { Console.Write(" has 'SpecialName' attribute"); } Console.WriteLine(); } Console.WriteLine(); for (int i = 0; i < methods.Count; i++) { Console.Write("Method: {0}.{1}", methods[i].DeclaringType.Name, methods[i].Name); // Determine whether or not each field is a special name. if (methods[i].IsSpecialName) { Console.Write(" has 'SpecialName' attribute"); } Console.WriteLine(); } } But when I pass an ‘int’ type to this method, why don’t I see the implicit constructor in the output? Or, how do I modify the above code to list the default constructor as well (in case I’m missing something in my code).

    Read the article

  • Making Hudson job depend on another job

    - by Jonik
    I have two Hudson jobs: Upload Launch-instance I want to make Launch-instance dependent on the other one, so that triggering Launch-instance automatically causes Upload to be run first. Can I achieve this using Hudson's built-in features or with a plugin? Note that I do not want Upload to always trigger Launch-instance, which is what the "Build after other projects are built" option on Launch-instance would do. What I want is more analogous to how depends attribute works for an Ant target.

    Read the article

  • Android: Scrolling an Imageview

    - by luca
    I have an ImageView that is twice the height of a normale screen ( 960 dip). I would like to scroll it nicely up and down on the screen. The bottom of the screen should contain a bottom. I have tried various combinations of ScrollView and Imageviews without any success. I have also thinkered with the :isScrollContainer attribute without results. Anyone knows how to do this? Cheers, Luca

    Read the article

  • How to decrypt encrypted files using a PEM private key

    - by Phil Cole
    I have files which have either been encrypted with a public key and the Blowfish algorithm, or a public key and the AES-256 algorithm. I'm looking to put together a perl script that would be able to use the private keys (which I do have) to decrypt the files. The public and private key files are all in PEM format, and while I can find ways of reading the PEM files, and ways of decrypting data with a key, I haven't yet found a way of going from PEM - key. Any suggestions?

    Read the article

< Previous Page | 199 200 201 202 203 204 205 206 207 208 209 210  | Next Page >