Search Results

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

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

  • Regex on memcached key?

    - by Mickey Cheong
    Hi, Is it possible to grab a list of memcached key based on some regex? I understand that one solution is to store the key in the database and grab the list when I need to delete those keys. This means that, it is going to incur additional cost to the db. I was wondering if there is another way to do it without DB overhead. Cheers, Mickey

    Read the article

  • Marshal generic return types for com interop

    - by Israel Chen
    Is it possible to Marshal a generic return type as non-generic for COM interop? Let's say I have the following class: [ComVisible(true)] public class Foo { public IEnumerable GetStr() // Generic return type { yield break; } } I know that IEnumerable implements IEnumerable. Can I force tlbexp.exe (via return: attribute or some other way) to expose GetStr() method as a method returning IEnumerbale?

    Read the article

  • {ApplicationName}/ScriptResource.axd and invalid viewstate.

    - by J.W.
    I have an asp.net web form application running in a web farm? All the machine keys are configured the same in web.config according to MSDN recommendation, still, it periodically throw out "System.Web.HttpException: Invalid viewstate.", and according to the stack. It's in this line Request : /{applicationname}/ScriptResource.axd +92 Note:{applicationname} is my application name.

    Read the article

  • Using sql column names in hibernate createSQlquery result

    - by Ricardo
    Hi all, i have a couple of sql views with composite primary keys that i want to query, and since Hibernate makes it a pain to work with composite keyes, im using createSQLQuery. The problem is that this method can only return a List, and i need to refer to the colums by their index. Any chance i could do like jdbc and refer to the columns by their sql name insted of their index? thanks

    Read the article

  • Cassandra: Using LongType

    - by TheDeveloper
    I'm trying to insert data into a ColumnFamily with "CompareWith" attribute "LongType". However, when trying to insert data under numerical keys, I get a thrift error. When attempting the same operation with the cassandra-cli program, I get the error "A long is exactly 8 bytes". How can I resolve this? Should I use a different comparison type? Thanks

    Read the article

  • sort associative array in awk - help?

    - by Richard
    Hi all, I have an associative array in awk that gets populated like this... chr_count[$3]++ When I try to print my chr_counts I use this: for (i in chr_count) { print i,":",chr_count[i]; } But not surprisingly, the order of i is not sorted in any way. Is there an easy way to iterate over the sorted "keys" of chr_count?

    Read the article

  • Volume Control in android application

    - by rantravee
    Hi, I'd like to know how to control my application's volume from the volume keys ( contrary to my belief , I've read they control only the ringer volume). Should I overwrite the onKey Down/Up ? , or is there other way to accomplish this ? . I'm asking because if I overwrite the upper mentioned function for an activity, then the functions will receive the event only if a view associated with the this activity has the focus, and I looking for something "Globaly" ( to work no matter what activity is running now)

    Read the article

  • How do I mock a class property with mox?

    - by Harley
    I have a class: class myclass(object): @property def myproperty(self): return 'hello' Using mox and py.test, how do I mock out myproperty? I've tried: mock.StubOutWithMock(myclass, 'myproperty') myclass.myproperty = 'goodbye' and mock.StubOutWithMock(myclass, 'myproperty') myclass.myproperty.AndReturns('goodbye') but both fail with AttributeError: can't set attribute.

    Read the article

  • Spring ROO Serverside validation doesn't work

    - by Hussain
    I have created a User domain with not null fields. If i remove following javascript validation on submit. Spring.addDecoration(new Spring.ValidateAllDecoration({elementId:'proceed', event:'onclick'})); Server side validation for notNull attribute doesn't work. On save user is created without validation error. Am I missing something over here ??

    Read the article

  • Unable to cast lists with Reflection in C#

    - by DrLazer
    I am having a lot of trouble with Reflection in C# at the moment. The app I am writing allows the user to modify the attributes of certain objects using a config file. I want to be able to save the object model (users project) to XML. The function below is called in the middle of a foreach loop, looping through a list of objects that contain all the other objects in the project within them. The idea is, that it works recursively to translate the object model into XML. Dont worry about the call to "Unreal" that just modifes the name of the objects slightly if they contain certain words. private void ReflectToXML(object anObject, XmlElement parentElement) { Type aType = anObject.GetType(); XmlElement anXmlElement = m_xml.CreateElement(Unreal(aType.Name)); parentElement.AppendChild(anXmlElement); PropertyInfo[] pinfos = aType.GetProperties(); //loop through this objects public attributes foreach (PropertyInfo aInfo in pinfos) { //if the attribute is a list Type propertyType = aInfo.PropertyType; if ((propertyType.IsGenericType)&&(propertyType.GetGenericTypeDefinition() == typeof(List<>))) { List<object> listObjects = (aInfo.GetValue(anObject,null) as List<object>); foreach (object aListObject in listObjects) { ReflectToXML(aListObject, anXmlElement); } } //attribute is not a list else anXmlElement.SetAttribute(aInfo.Name, ""); } } If an object attributes are just strings then it should be writing them out as string attributes in the XML. If an objects attributes are lists, then it should recursively call "ReflectToXML" passing itself in as a parameter, thereby creating the nested structure I require that nicely reflect the object model in memory. The problem I have is with the line List<object> listObjects = (aInfo.GetValue(anObject,null) as List<object>); The cast doesn't work and it just returns null. While debugging I changed the line to object temp = aInfo.GetValue(anObject,null); slapped a breakpoint on it to see what "GetValue" was returning. It returns a "Generic list of objects" Surely I should be able to cast that? The annoying thing is that temp becomes a generic list of objects but because i declared temp as a singular object, I can't loop through it because it has no Enumerator. How can I loop through a list of objects when I only have it as a propertyInfo of a class? I know at this point I will only be saving a list of empty strings out anyway, but thats fine. I would be happy to see the structure save out for now. Thanks in advance

    Read the article

  • Non-relational database modeling tool?

    - by Angel Escobedo
    Hey guys, please recommend some tools you have used succesfully on DW, DataMart, BI an non-relational modeling. Example for automatic creation of snow-flake Schemas, dimensions and facts tables. Wich tools makes you sense familiarity with the diagrams and surrogates keys and it will have the option for export or connect to SQL Server 2008. Thanks

    Read the article

  • Edit/show Primary Key in Django Admin

    - by emcee
    It appears Django hides fields that are flagged Primary Key from being displayed/edited in the Django admin interface. Let's say I'd like to input data in which I may or may not want to specify a primary key. How would I go about displaying primary keys in Django-admin, and how could I make specifying it optional? Many thanks in advance, beloved hive-mind.

    Read the article

  • Div positioning on a canvas with arrows bindings

    - by ideotop
    I'm searching for a little piece of javascript that can attach to a div (in data-x data-y attributes for example) the x,y coordinates of a draggable div. And then be able to draw arrows between them (using a data-targetid attribute?). If the solution can look like a simple version of graphview, jsPlumb or vizster but without the complicated library, and only in javascript/html

    Read the article

  • jquery data selector

    - by Tauren
    I need to select elements based on values stored in an element's .data() object. At a minimum, I'd like to select top-level data properties using selectors, perhaps like this: $('a').data("category","music"); $('a:data(category=music)'); Or perhaps the selector would be in regular attribute selector format: $('a[category=music]'); Or in attribute format, but with a specifier to indicate it is in .data(): $('a[:category=music]'); I've found James Padolsey's implementation to look simple, yet good. The selector formats above mirror methods shown on that page. There is also this Sizzle patch. For some reason, I recall reading a while back that jQuery 1.4 would include support for selectors on values in the jquery .data() object. However, now that I'm looking for it, I can't find it. Maybe it was just a feature request that I saw. Is there support for this and I'm just not seeing it? Ideally, I'd like to support sub-properties in data() using dot notation. Like this: $('a').data("user",{name: {first:"Tom",last:"Smith"},username: "tomsmith"}); $('a[:user.name.first=Tom]'); I also would like to support multiple data selectors, where only elements with ALL specified data selectors are found. The regular jquery multiple selector does an OR operation. For instance, $('a.big, a.small') selects a tags with either class big or small). I'm looking for an AND, perhaps like this: $('a').data("artist",{id: 3281, name: "Madonna"}); $('a').data("category","music"); $('a[:category=music && :artist.name=Madonna]'); Lastly, it would be great if comparison operators and regex features were available on data selectors. So $(a[:artist.id>5000]) would be possible. I realize I could probably do much of this using filter(), but it would be nice to have a simple selector format. What solutions are available to do this? Is Jame's Padolsey's the best solution at this time? My concern is primarily in regards to performance, but also in the extra features like sub-property dot-notation and multiple data selectors. Are there other implementations that support these things or are better in some way?

    Read the article

  • WCF - Serialization Exception even after giving DataContract and DataMember

    - by Lijo
    Hi Team, I am getting the following exception eventhough I have specified the Datacontract and Datamember. Could you please help me to understand what the issue is? "Type 'MyServiceLibrary.CompanyLogo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute." using System.ServiceModel; using System.ServiceModel.Dispatcher; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.Runtime.Serialization; using MyServiceLibrary; namespace MySelfHostConsoleApp { class Program { static void Main(string[] args) { System.ServiceModel.ServiceHost myHost = new ServiceHost(typeof(NameDecorator)); myHost.Open(); Console.ReadLine(); } } } //The Service is using System.ServiceModel; using System.Runtime.Serialization; namespace MyServiceLibrary { [ServiceContract(Namespace = "http://Lijo.Samples")] public interface IElementaryService { [OperationContract] CompanyLogo GetLogo(); } public class NameDecorator : IElementaryService { public CompanyLogo GetLogo() { Shape cirlce = new Shape(); CompanyLogo logo = new CompanyLogo(cirlce); return logo; } } [DataContract] public class Shape { public string SelfExplain() { return "sample"; } } [DataContract] public class CompanyLogo { private Shape m_shapeOfLogo; [DataMember] public Shape ShapeOfLogo { get { return m_shapeOfLogo; } set { m_shapeOfLogo = value; } } public CompanyLogo(Shape shape) { m_shapeOfLogo = shape; } } } //And the host config is <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="MyServiceLibrary.NameDecorator" behaviorConfiguration="WeatherServiceBehavior"> <host> <baseAddresses> <add baseAddress="http://localhost:8017/ServiceModelSamples/FreeServiceWorld"/> </baseAddresses> </host> <endpoint address="" binding="basicHttpBinding" contract="MyServiceLibrary.IElementaryService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="WeatherServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="False"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration> Thanks Lijo

    Read the article

  • Insert default value if input-text is deleted

    - by Kim Andersen
    Hi all I have the following piece of jQuery code: $(".SearchForm input:text").each(function(){ /* Sets the current value as the defaultvalue attribute */ if(allowedDefaults.indexOf($(this).val()) > 0 || $(this).val() == "") { $(this).attr("defaultvalue", $(this).val()); $(this).css("color","#9d9d9d"); /* Onfocus, if default value clear the field */ $(this).focus(function(){ if($(this).val() == $(this).attr("defaultvalue")) { $(this).val(""); $(this).css("color","#4c4c4c"); } }); /* Onblur, if empty, insert defaultvalue */ $(this).blur(function(){ alert("ud"); if($(this).val() == "") { $(this).val($(this).attr("defaultvalue")); $(this).css("color","#9d9d9d"); }else { $(this).removeClass("ignore"); } }); } }); I use this code to insert some default text into some of my input fields, when nothing else is typed in. This means that when a user sees my search-form, the defaultvalues will be set as an attribute on the input-field, and this will be the value that is shown. When a user clicks inside of the input field, the default value will be removed. When the user sees an input field at first is looks like this: <input type="text" value="" defaultvalue="From" /> This works just fine, but I have a big challenge. If a user have posted the form, and something is entered into one of the fields, then I can't show the default value in the field, if the user deletes the text from the input field. This is happening because the value of the text-field is still containing something, even when the user deletes the content. So my problem is how to show the default value when the form is submitted, and the user then removes the typed in content? When the form is submitted the input looks like this, and keeps looking like this until the form is submitted again: <input type="text" value="someValue" defaultvalue="From" /> So I need to show the default value in the input-field right after the user have deleted the content in the field, and removed the focus from the field. Does everyone understand what my problem is? Otherwise just ask, I have struggled with this one for quite some times now, so any help will be greatly appreciated. Thanks in advance, Kim Andersen

    Read the article

  • Adding "Max Length" to Regex

    - by SeToY
    How can I extend already present Regex's with an attribute telling that the regex can't exceed a maximum length of (let's say) 255? I've got the following regex: ([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?) I've tried it like that, but failed: {.,255([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)}

    Read the article

  • How to transverse a Btree?

    - by Phenom
    I have a BST and I'm trying to figure out how transverse it so that the keys are displayed ascending order. All I can figure out is that this can be done with a recursive function. What's the pseudo-code to do it?

    Read the article

  • How to get form elements from one form to another form in drupal

    - by ugesh.gali
    I have two forms in drupal and the form values is stores in DB.The first form contanins some fields related to company by default like id conpany,name etc.The second form consists of attributes .If I add attributes to the second form the attribute field should be visible in first form. Ex If i add loaction or any other field it should visible in first form as location field.

    Read the article

  • App starts in 1.5 emulator but doesn't in 1.6

    - by DixieFlatline
    My app works on 1.5 emulator and 1.5 device. When i try to start it on 1.6 emulator, it produces strange exceptions (doesn't even start). I don't have any 1.6 device to try this app if it works on a real device. I get some warnings in Eclipse ( warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a broken compiler.) and get cant rid of them (i think they come from some apache jars that i need to make http multipart posts). Is it possible that this jars are cause for my exceptions in 1.6 or is it something else? My logacat: 04-29 16:14:55.874: ERROR/AndroidRuntime(392): Uncaught handler: thread main exiting due to uncaught exception 04-29 16:14:55.894: ERROR/AndroidRuntime(392): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.poslji.gor/com.poslji.gor.FormFiller}: java.lang.NumberFormatException: unable to parse 'null' as integer 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.os.Handler.dispatchMessage(Handler.java:99) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.os.Looper.loop(Looper.java:123) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.ActivityThread.main(ActivityThread.java:4203) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at java.lang.reflect.Method.invokeNative(Native Method) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at java.lang.reflect.Method.invoke(Method.java:521) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at dalvik.system.NativeStart.main(Native Method) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): Caused by: java.lang.NumberFormatException: unable to parse 'null' as integer 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at java.lang.Integer.parseInt(Integer.java:358) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at java.lang.Integer.parseInt(Integer.java:333) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at com.poslji.gor.FormFiller.nastavi(FormFiller.java:322) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at com.poslji.gor.FormFiller.onCreate(FormFiller.java:188) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 04-29 16:14:55.894: ERROR/AndroidRuntime(392): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)

    Read the article

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