Search Results

Search found 4893 results on 196 pages for 'expect'.

Page 47/196 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • What method can I override in GridViewHeaderRowPresenter to prevent it from drawing some columns?

    - by Carlo
    The thing is that I created a custom column that inherits from GridViewColumn, and I added a Visibility dependency property to it. Now I want to create a custom GridViewHeaderRowPresenter, that does not draw the columns when their visibility is hidden or collapsed, but other than the OnRender() method, I can't think of anything else. Thanks. Btw, the reason I'm doing this is because removing or adding columns doesn't work like we would expect it (some specs for our app) and I believe what I'm trying to do here would work if pulled out correctly.

    Read the article

  • Is there a work around for slow performance of do.call(cbind.xts,...) in R 2.15.2?

    - by Petr Matousu
    I would expect cbind.xts and do.call(cbind.xts) to perform with similar elapsed time. That was true for R2.11, R2.14. For R2.15.2 and xts 0.8-8, the do.call(cbind.xts,...) variant performs drastically slower, which effectively breaks my previous codes. As Josh Ulrich notes in a comment below, the xts package maintainers are aware of this problem. In the meantime, is there a convenient work around?

    Read the article

  • Python, invoke super constructor

    - by Mike
    class A: def __init__(self): print "world" class B(A): def __init__(self): print "hello" B() hello In all other languages I've worked with the super constructor is invoked implicitly. How does one invoke it in Python? I would expect super(self) but this doesn't work

    Read the article

  • One-liner javascript to collect values from object graph?

    - by Kevin Pauli
    Given the following object graph: { "children": [ { "child": { "pets": [ { "pet": { "name": "fido" } }, { "pet": { "name": "fluffy" } } ] } }, { "child": { "pets": [ { "pet": { "name": "spike" } } ] } } ] } What would be a nice one-liner (or two) to collect the names of my grandchildren's pets? The result should be ["fido", "fluffy", "spike"] I don't want to write custom methods for this... I'm looking for something like the way jQuery works in selecting dom nodes, where you can just give it a CSS-like path and it collects them up for you. I would expect the expression path to look something like "children child pets pet name"

    Read the article

  • Minutia on Objective-C Categories and Extensions.

    - by Matt Wilding
    I learned something new while trying to figure out why my readwrite property declared in a private Category wasn't generating a setter. It was because my Category was named: // .m @interface MyClass (private) @property (readwrite, copy) NSArray* myProperty; @end Changing it to: // .m @interface MyClass () @property (readwrite, copy) NSArray* myProperty; @end and my setter is synthesized. I now know that Class Extension is not just another name for an anonymous Category. Leaving a Category unnamed causes it to morph into a different beast: one that now gives compile-time method implementation enforcement and allows you to add ivars. I now understand the general philosophies underlying each of these: Categories are generally used to add methods to any class at runtime, and Class Extensions are generally used to enforce private API implementation and add ivars. I accept this. But there are trifles that confuse me. First, at a hight level: Why differentiate like this? These concepts seem like similar ideas that can't decide if they are the same, or different concepts. If they are the same, I would expect the exact same things to be possible using a Category with no name as is with a named Category (which they are not). If they are different, (which they are) I would expect a greater syntactical disparity between the two. It seems odd to say, "Oh, by the way, to implement a Class Extension, just write a Category, but leave out the name. It magically changes." Second, on the topic of compile time enforcement: If you can't add properties in a named Category, why does doing so convince the compiler that you did just that? To clarify, I'll illustrate with my example. I can declare a readonly property in the header file: // .h @interface MyClass : NSObject @property (readonly, copy) NSString* myString; @end Now, I want to head over to the implementation file and give myself private readwrite access to the property. If I do it correctly: // .m @interface MyClass () @property (readonly, copy) NSString* myString; @end I get a warning when I don't synthesize, and when I do, I can set the property and everything is peachy. But, frustratingly, if I happen to be slightly misguided about the difference between Category and Class Extension and I try: // .m @interface MyClass (private) @property (readonly, copy) NSString* myString; @end The compiler is completely pacified into thinking that the property is readwrite. I get no warning, and not even the nice compile error "Object cannot be set - either readonly property or no setter found" upon setting myString that I would had I not declared the readwrite property in the Category. I just get the "Does not respond to selector" exception at runtime. If adding ivars and properties is not supported by (named) Categories, is it too much to ask that the compiler play by the same rules? Am I missing some grand design philosophy?

    Read the article

  • why is optional chaining required in an if let statement

    - by b-ryan ca
    Why would the Swift compiler expect me to write if let addressNumber = paul.residence?.address?.buildingNumber?.toInt() { } instead of just writing: if let addressNumber = paul.residence.address.buildingNumber.toInt() { } The compiler clearly has the static type information to handle the conditional statement for the first dereference of the optional value and each following value. Why would it not continue to do so for the following statements?

    Read the article

  • jquery / javascript for upload the file from browser to server

    - by Lalit
    Hi, I am developing the application in asp.net mvc with c#. I want the functionality that , a div will popup, so that i can facilate to use to upload the image file from his browser to server , in application domains file system. as usual. This question may be repeat , but i expect something more like how to build this scenario, and what are the security issues may come? and what care have to take while coding in the security perspective ?

    Read the article

  • Why would restarting MySQL make my site faster?

    - by beagleguy
    hey all, my site started dragging lately, the queries taking exceptionally longer than I would expect with properly tuned indexes. I just restarted the mysql server after 31 days uptime and every query is now substantially faster and the whole site renders 3-4 times faster. Would there be anything that jumps out at you as to why this may have been? Improper settings on my.cnf perhaps? Any ideas as to what I can start looking at to try and pinpoint why? thanks

    Read the article

  • Good way to create PDF from Office documents in Java

    - by Sindri Traustason
    I'm looking for a good way to convert Office (mostly Microsoft) documents to PDF in Java. I've been looking at using the OpenOffice SDK but from the samples I've looked at it looks like this requires having OpenOffice running in server mode to do the work. Does anyone know of a good way to do this? Good meaning the less external requirements, the better. A 100% Java API would be best, but I don't expect that actually exists.

    Read the article

  • Validate site/domain via javascript

    - by Chez
    I have a standard html form where the user can specify a website/domain: favourite website: [ ] I expect the user to type things like: [www.google.com] [www.yahoo.com] [www.example.co.jp] I want to validate the domain/site via javascript so if a user had typed something wrong: [www...google.com] [www.-example.com] I tell them straight away. Can anybody post this javascript ? Alternatively can anybody point me to a site where I can look at their javascript ? Many Thanks

    Read the article

  • Replace method doesn't work properly

    - by John Smith
    Hello I have a string and when i try to use replace method in for loop it doesn't work String phrase="hello friend"; String[] wordds=phrase.split(" "); String newPhrase="sup friendhello weirdo"; for (int g=0;g<2;g++) { finalPhrase+=newPhrase.replace(wordds[g],"");} } System.out.println(finalPhrase) It prints out "sup hello weirdo" and i expect it to print "sup weirdo". What am i doing wrong?

    Read the article

  • Odd SQL behavior, I'm wondering why this works the way it does.

    - by Matthew Vines
    Consider the following Transact sql. DECLARE @table TABLE(val VARCHAR(255) NULL) INSERT INTO @table (val) VALUES('a') INSERT INTO @table (val) VALUES('b') INSERT INTO @table (val) VALUES('c') INSERT INTO @table (val) VALUES('d') INSERT INTO @table (val) VALUES(NULL) select val from @table where val not in ('a') I would expect this to return b, c, d, NULL but instead it returns b, c, d Why is this the case? Is NULL not evaluated? Is NULL somehow in the set 'a'?

    Read the article

  • increase ssh timeout

    - by cerr
    I'm trying to connect to a mobile host connected over a 3G cell router from linux with ssh [email protected] -p 2200 and all I immediately get is (doesn't even seem to run into a timeout) ssh: connect to host 74.198.25.220 port 2200: Network is unreachable However, when I try the same IP on port 2200 with putty on Windows, it presents my with the password prompt just fine as I'd expect. What's going on here, do I need to increment my ssh timeout period to get this going or what? Thank you, Ron

    Read the article

  • How to display image in Swing? in textarea?

    - by Nitesh Panchal
    Hello, I am creating a chat application using JApplet. I have a TextArea where all chat messages go. Everything in working fine and smooth just as you would expect a basic chat application to do. Now i want to add support for gestures. I wanted to know, how can we show an icon in textarea? it only takes string in append() method. Thanks in advance :)

    Read the article

  • Can the Windows Phone 7 Series emulator be made to run on Windows XP?

    - by sweeney
    Well thats all there is to it...is this possible? I understand that officially it's not supported but has anyone figured it out? I have some work to do where XP would be the preferred platform. I would expect that users of the actual device are not required to use Windows 7 so it stands to reason that this can be done. Any poitners in the right direction would be greatly appreciated. Thanks, brian

    Read the article

  • Standard library function in R for finding the mode?

    - by Nick
    In statistical language R, mean() and median() are standard functions which do what you'd expect. mode() tells you the internal storage mode of the R object, not the value that occurs the most in its argument. But surely there is a standard library function that implements mode for a vector (or list).

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >