Search Results

Search found 4637 results on 186 pages for 'john threepwood'.

Page 97/186 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • close android open home widget

    - by John
    Hi, I have android open home running on my google android phone. I'd like to close it but I can't see how to. I don't want to un-install it just close it. I've tried turning my phone off and on but it boots up with it loaded. Anyone have any ideas? Thanks

    Read the article

  • Can't get RDFlib to work on windows

    - by john
    I have installed RDFlib 3.0 and everything that is needed, but when I run the following code I get an error. The code below is from: http://code.google.com/p/rdflib/wiki/IntroSparql. I have tried for hours to fix this but with no success. Can please someone help? import rdflib rdflib.plugin.register('sparql', rdflib.query.Processor, 'rdfextras.sparql.processor', 'Processor') rdflib.plugin.register('sparql', rdflib.query.Result, 'rdfextras.sparql.query', 'SPARQLQueryResult') from rdflib import ConjunctiveGraph g = ConjunctiveGraph() g.parse("http://bigasterisk.com/foaf.rdf") g.parse("http://www.w3.org/People/Berners-Lee/card.rdf") from rdflib import Namespace FOAF = Namespace("http://xmlns.com/foaf/0.1/") g.parse("http://danbri.livejournal.com/data/foaf") [g.add((s, FOAF['name'], n)) for s,_,n in g.triples((None, FOAF['member_name'], None))] for row in g.query( """SELECT ?aname ?bname WHERE { ?a foaf:knows ?b . ?a foaf:name ?aname . ?b foaf:name ?bname . }""", initNs=dict(foaf=Namespace("http://xmlns.com/foaf/0.1/"))): print "%s knows %s" % row The error I get is: Traceback (most recent call last): File "...", line 18 in <module> initNs=dict(foaf=Namespace("http://xmlns.com/foaf/0.1/"))): TypeError: query() got an unexpected keyword argument 'initNS'

    Read the article

  • Decoupling the view, presentation and ASP.NET Web Forms

    - by John Leidegren
    I have an ASP.NET Web Forms page which the presenter needs to populate with controls. This interaction is somewhat sensitive to the page-life cycle and I was wondering if there's a trick to it, that I don't know about. I wanna be practical about the whole thing but not compromise testability. Currently I have this: public interface ISomeContract { void InstantiateIn(System.Web.UI.Control container); } This contract has a dependency on System.Web.UI.Control and I need that to be able to do things with the ASP.NET Web Forms programming model. But neither the view nor the presenter may have knowledge about ASP.NET server controls. How do I get around this? How can I work with the ASP.NET Web Forms programming model in my concrete views without taking a System.Web.UI.Control dependency in my contract assemblies? To clarify things a bit, this type of interface is all about UI composition (using MEF). It's known through-out the framework but it's really only called from within the concrete view. The concrete view is still the only thing that knows about ASP.NET Web Forms. However those public methods that say InstantiateIn(System.Web.UI.Control) exists in my contract assemblies and that implies a dependency on ASP.NET Web Forms. I've been thinking about some double dispatch mechanism or even visitor pattern to try and work around this.

    Read the article

  • Fluently setting C# properties and chaining methods

    - by John Feminella
    I'm using .NET 3.5. We have some complex third-party classes which are automatically generated and out of my control, but which we must work with for testing purposes. I see my team doing a lot of deeply-nested property getting/setting in our test code, and it's getting pretty cumbersome. To remedy the problem, I'd like to make a fluent interface for setting properties on the various objects in the hierarchical tree. There are a large number of properties and classes in this third-party library, and it would be too tedious to map everything manually. My initial thought was to just use object initializers. Red, Blue, and Green are properties, and Mix() is a method that sets a fourth property Color to the closest RGB-safe color with that mixed color. Paints must be homogenized with Stir() before they can be used. Bucket b = new Bucket() { Paint = new Paint() { Red = 0.4; Blue = 0.2; Green = 0.1; } }; That works to initialize the Paint, but I need to chain Mix() and other methods to it. Next attempt: Create<Bucket>(Create<Paint>() .SetRed(0.4) .SetBlue(0.2) .SetGreen(0.1) .Mix().Stir() ) But that doesn't scale well, because I'd have to define a method for each property I want to set, and there are hundreds of different properties in all the classes. Also, C# doesn't have a way to dynamically define methods prior to C# 4, so I don't think I can hook into things to do this automatically in some way. Third attempt: Create<Bucket>(Create<Paint>().Set(p => { p.Red = 0.4; p.Blue = 0.2; p.Green = 0.1; }).Mix().Stir() ) That doesn't look too bad, and seems like it'd be feasible. Is this an advisable approach? Is it possible to write a Set method that works this way? Or should I be pursuing an alternate strategy?

    Read the article

  • wordpress: cant get category id when SEO URL is turned on

    - by John K
    <?php /* Plugin Name: Members */ function myFilter2($query) { if ($query->is_category) { $currently_listing_categories = $query->query_vars['category__in']; print_r($currently_listing_categories); } } add_filter('pre_get_posts','myFilter2'); ?> This plugin display the category ids when the url is not SEO friendly http://domain.com/wplab/wpla4/?cat=4 . but when I turn on SEO http://domain.com/wplab/wpla4/category/members/ the array is empty how can I get the category id with SEO friendly urls

    Read the article

  • ASP.NET WebMethod Returns JSON wrapped in quotes

    - by CL4NCY
    Hi, I have an asp.net page with a WebMethod on it to pass JSON back to my javascript. Bellow is the web method: [WebMethod] public static string getData(Dictionary<string, string> d) { string response = "{ \"firstname\": \"John\", \"lastname\": \"Smith\" }"; return response; } When this is returned to the client it is formatted as follows: { \"d\": \"{ \"firstname\": \"John\", \"lastname\": \"Smith\" }\" } The problem is the double quotes wrapping everything under 'd'. Is there something I've missed in the web method or some other means of returning the data without the quotes? I don't really want to be stripping it out on the client everytime. Also I've seen other articles where this doesn't happen. Any help would be appreciated thanks.

    Read the article

  • Java String Replace and null characters

    - by praspa
    Testing out someone elses code (of course it was ...) , I noticed a few JSP pages printing funky non-ascii characters. Taking a dip into the source I found this tidbit. // remove any periods from first name e.g. Mr. John --> Mr John firstName = firstName.trim().replace('.','\0'); Does replacing a character in a String with a null character even work in Java? I know that '\0' will terminate a c-string. Would this be the culprit to the funky characters? Thanks PR

    Read the article

  • Workaround for richfaces combobox hotkey bug

    - by John
    Hi, Does anyone know a workaround for the bug https://jira.jboss.org/jira/browse/RF-8076 ? Just to clarify things, we have a form with multiple inputs, one of them being a combobox with auto complete features. We've setup a hotkey via <rich:hotKey key="return" ... /> It works great everywhere except in the combobox, and I would really like to get it working on the combobox as well. The behaviour I want when the ENTER key is pressed inside the combobox is: If the combobox context was modified by auto complete then do nothing Else action the event on ENTER key pressed We're running on seam/richfaces. I'm open to any workaround, but simplicity is much sought for. Thanks!

    Read the article

  • Rails: redirect_to :controller=>'tips', :action => 'show', :id => @tip.permalink

    - by john
    hi, I tried to redirect rails to show action by passing controller, action, and params. However, rails ignores the name of action totally! what I got is http://mysite/controllername/paramId so i have error message.... here is the action code I used: def update @tip = current_user.tips.find(params[:id]) @tip.attributes = params[:tip] @tip.category_ids = params[:categories] @tip.tag_with(params[:tags]) if params[:tags] if @tip.save flash[:notice] = 'Tip was successfully updated.' redirect_to :controller=>'tips', :action => 'show', :id => @tip.permalink else render :action => 'edit' end end

    Read the article

  • How can I extend a LinkButton to allow HTML text in Flex?

    - by John Isaacks
    I am feeding the label to my LinkButton directly from a string I receive from a Google API that puts html to format the label. I want to extend linkbutton to allow this. I wrote a class myself to allow html text for the label and that aspect of it works but now the background that appears when you hover is way too big. I tried to override measure() to fix this but I didn't have a clue how. Here is the class I wrote: package com.kranichs.components { import mx.controls.LinkButton; public class HTMLLinkButton extends LinkButton { protected var _isHTML:Boolean; public function HTMLLinkButton() { super(); } [Bindable] public function set isHTML(value:Boolean):void { _isHTML = value; } public function get isHTML():Boolean { return _isHTML; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); if(_isHTML) { textField.htmlText = label; } } } }

    Read the article

  • TypeError: 'NoneType' object does not support item assignment

    - by R S John
    I am trying to do some mathematical calculation according to the values at particular index of a NumPy array with the following code X = np.arange(9).reshape(3,3) temp = X.copy().fill(5.446361E-01) ind = np.where(X < 4.0) temp[ind] = 0.5*X[ind]**2 - 1.0 ind = np.where(X >= 4.0 and X < 9.0) temp[ind] = (5.699327E-1*(X[ind]-1)**4)/(X[ind]**4) print temp But I am getting the following error Traceback (most recent call last): File "test.py", line 7, in <module> temp[ind] = 0.5*X[ind]**2 - 1.0 TypeError: 'NoneType' object does not support item assignment Would you please help me in solving this? Thanks

    Read the article

  • Question about oracle db connection with .NET

    - by john
    I'm trying to connect to an oracle database with .net but i get the error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified however, when I enter add a new database connection through toolsconnect to database. it works fine. even after copying the connection string which is: Data Source=source here;Persist Security Info=True;User ID=userhere;Password=pass;Unicode=True

    Read the article

  • selecting a row by means of a button ... using didSelectRowAtIndexPath

    - by John Smith
    hey people , I have a question concerning a button I would like to create which selects my previous selected row. This is what I came up so far but since I'm new with the functionality and such I could definately use some pointers I created a toolbar with a button and behind this button is the following action. -(void)clickRow { selectedRow = [self.tableView indexPathForSelectedRow]; [self.tableView:[self tableView] didSelectRowAtIndexPath:selectedRow]; } in my didSelectRowAtIndexPath there is a rootViewController being pushed rvController = [RootViewController alloc] ...etc So what I would like is my function clickRow to select the row and push the new rootviewcontroller (which has the right info since I'm using a tree ). I tried something like this as well -(void)clickRow { NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; NSArray *Children = [dictionary objectForKey:@"Children"]; rvController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:[NSBundle mainBundle]]; rvController.CurrentLevel += 1; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } The last function works a little but a little is not enough;) For instance if I press the middle row or any other it constantly selects the toprow. thnx all for those of you reading and trying to help

    Read the article

  • PHP - Plesk - Cron - Allowed memory size exhausted?

    - by John
    ini_set('max_execution_time',0); ini_set('memory_limit','1000M'); These are the first two lines at the very top of my script. I was under the impression if I ran something via cron memory limits didn't apply, but I was wrong. Safe mode is off and when I test to see if these values are being set they are but I keep getting the good ol' "PHP Fatal: Memory exhausted" error. Any ideas what I may be doing wrong? And whats the "more elegant way" of writing "infinite" for the "memory limit" value is it -1 or something?

    Read the article

  • How to tell what account my webservice is running under in Visual Studio 2005

    - by John Galt
    I'm going a little nuts trying to understand the doc on impersonation and delegation and the question has come up what account my webservice is running under. I am logged as myDomainName\johna on my development workstation called JOHNXP. From Vstudio2005 I start my webservice via Debug and the wsdl page comes up in my browser. From Task Manager, I see the following while sitting at a breakpoint in my .asmx code: aspnet_wp.exe pid=1316 UserName=ASPNET devenv.exe pid=3304 UserName=johna The IIS Directory Security tab for the Virtual Directory that hosts my ws.asmx code has "Enable Anonymous access" UNCHECKED and has "Integrated Windows Authentication" CHECKED. So when the MSDN people state "you must configure the user account under which the server process runs", what would they be refering to in the case of my little webservice described above? I am quoting from: http://msdn.microsoft.com/en-us/library/aa302400.aspx Ultimately, I want this webservice of mine to impersonate whatever authenticated domain user browses through to an invoke of my webservice. My webservice in turn consumes another ASMX webservice on a different server (but same domain). I need this remote webservice to use the impersonated domain user credentials (not those of my webservice on JOHNXP). So its getting a little snarly for me to understand this and I see I am unclear about the account my web service uses. I think it is ASPNET in IIS 5.1 on WinXP but not sure.

    Read the article

  • Font advance calculation problem on Blackberry OS 5.0

    - by John
    I am currently working on my own implementation of a tab bar for a BlackBerry app, where each tab bar has a title that is right aligned (i.e. the last character in each should be the same distance from the right hand side of the screen). To work out where to draw the text I am using the following calculation: screen width - advance of title - indent. The font I am using is 'BBAlpha Sans' (height 28). Using BlackBerry OS 4.6 everything seems to be calculated properly and the text is aligned when I move between tabs, however I am finding that when I use OS 5.0 it doesn't calculate the advance properly and as a result the alignment is off by maybe 5 pixels or so. With the default font (also BBAlpha Sans, but height 24 - for OS 5.0 at least) it works fine in both versions.. but I don't necessarily always want to use the default font/size, so any ideas what could be going wrong? Is this a bug in the 5.0 API? Thanks. Code: public class TitleBarBackground extends Background { .. public void draw(Graphics graphics, XYRect rect) { graphics.pushRegion(rect); .. Font titleBarFont = FontFamily.forName("BBAlpha Sans").getFont(Font.PLAIN, 28); ... int textWidth = titleBarFont.getAdvance(title); graphics.drawText(title, rect.width - textWidth - TITLE_OFFSET, textYOffset); graphics.popContext(); } .. }

    Read the article

  • Thoughts on try-catch blocks

    - by John Boker
    What are your thoughts on code that looks like this: public void doSomething() { try { // actual code goes here } catch (Exception ex) { throw; } } The problem I see is the actual error is not handled, just throwing the exception in a different place. I find it more difficult to debug because i don't get a line number where the actual problem is. So my question is why would this be good? ---- EDIT ---- From the answers it looks like most people are saying it's pointless to do this with no custom or specific exceptions being caught. That's what i wanted comments on, when no specific exception is being caught. I can see the point of actually doing something with a caught exception, just not the way this code is.

    Read the article

  • Integrating lesser known e-payment gateways full of surprises?

    - by John
    I've integrated about half a dozen e-payment gateways, from popular ones (like paypal) to not-so popular ones. It seems every time I try to integrate a non-popular epayment gateway, I exceed my original time-estimation. I think I'm a decent programmer, but my time estimations probably needs work. Do other programmers run into many "surprises" when integrating e-payment gateways they've never heard of? Any advice will help. thanks

    Read the article

  • Python: Is there a way to get HTML that was dynamically created by Javascript?

    - by Joschua
    As far as I can tell, this is the case for LyricWikia. The lyrics (example) can be accessed from the browser, but can't be found in the source code (can be opened with CTRL + U in most browsers) or reading the contents of the site with Python: from urllib.request import urlopen URL = 'http://lyrics.wikia.com/Billy_Joel:Piano_Man' r = urlopen(URL).read().decode('utf-8') And the test: >>> 'Now John at the bar is a friend of mine' in r False >>> 'John' in r False But when you select and look at the source code of the box in which the lyrics are displayed, you can see that there is: <div class="lyricbox">[...]</div> Is there a way to get the contents of that div-element with Python?

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >