Search Results

Search found 1104 results on 45 pages for 'grant trevor'.

Page 21/45 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • what causes a bad token on iPhone- NSLog(@"token:%@",[devToken description]); crashes

    - by Grant M
    I am getting a bad token passed to me in - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken this code crashes on my iPhone but not my clients. - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { NSLog(@"token:%@",[devToken description]); } I think something is wrong with my stored notifications settings on my iPhone but I can't find a way to delete them. deleting the app does not seem to do it.

    Read the article

  • Techniques for querying a set of object in-memory in a Java application

    - by Edd Grant
    Hi All, We have a system which performs a 'coarse search' by invoking an interface on another system which returns a set of Java objects. Once we have received the search results I need to be able to further filter the resulting Java objects based on certain criteria describing the state of the attributes (e.g. from the initial objects return all objects where x.y z && a.b == c). The criteria used to filter the set of objects each time is partially user configurable, by this I mean that users will be able to select the values and ranges to match on but the attributes they can pick from will be a fixed set. The data sets are likely to contain <= 10,000 objects for each search. The search will be executed manually by the application user base probably no more than 2000 times a day (approx). It's probably worth mentioning that all the objects in the result set are known domain object classes which have Hibernate and JPA annotations describing their structure and relationship. Off the top of my head I can think of 3 ways of doing this: For each search persist the initial result set objects in our database, then use Hibernate to re-query them using the finer grained criteria. Use an in-memory Database (such as hsqldb?) to query and refine the initial result set. Write some custom code which iterates the initial result set and pulls out the desired records. Option 1 seems to involve a lot of toing and froing across a network to a physical Database (Oracle 10g) which might result in a lot of network and disk activity. It would also require the results from each search to be isolated from other result sets to ensure that different searches don't interfere with each other. Option 2 seems like a good idea in principle as it would allow me to do the finer query in memory and would not require the persistence of result data which would only be discarded after the search was complete. Gut feeling is that this could be pretty performant too but might result in larger memory overheads (which is fine as we can be pretty flexible on the amount of memory our JVM gets). Option 3 could be very performant but is something I would like to avoid as any code we write would require such careful testing that the time taken to acheive something flexible and robust enough would probably be prohibitive. I don't have time to prototype all 3 ideas so I am looking for comments people may have on the 3 options above, plus any further ideas I have not considered, to help me decide which idea might be most suitable. I'm currently leaning toward option 2 (in memory database) so would be keen to hear from people with experience of querying POJOs in memory too. Hopefully I have described the situation in enough detail but don't hesitate to ask if any further information is required to better understand the scenario. Cheers, Edd

    Read the article

  • Using delegate Types vs methods

    - by Grant Sutcliffe
    I see increasing use of the delegate types offered in the System namespace (Action; Predicate etc). As these are delegates, my understanding is that they should be used where we have traditionally used delegates in the past (asynchronous calls; starting threads, event handling etc). Is it just preference or is it considered practice to use these delegate types in scenarios such as the below; rather than using calls to methods we have declared (or anonymous methods): public void MyMethod { Action<string> action = delegate(string userName { try { XmlDocument profile = DataHelper.GetProfile(userName); UpdateMember(profile); } catch (Exception exception) { if (_log.IsErrorEnabled) _log.ErrorFormat(exception.Message); throw (exception); } }; GetUsers().ForEach(action); } At first, I found the code less intuitive to follow than using declared or anonymous methods. I am starting to code this way, and wonder what the view are in this regard. The example above is all within a method. Is this delegate overuse.

    Read the article

  • How to access referenced table from ASPX in-line code (datagridview control)

    - by Grant
    Hi, i am trying to bind data to a datagridview control on an ASPX webpage and am using something like this.. <asp:TemplateField HeaderText="MyField"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "MyField") %> </ItemTemplate> </asp:TemplateField> the problem i am having is that the data for the 'MyField' field is actually an integer that is a reference to a string value in another sql table. Does anyone know how i can reformat my code line above to show the string value instead of the int value?

    Read the article

  • PHP Magento Screen Scraping

    - by Grant unwin
    I am trying to scrape a suppliers magento site in an effort to save some time because of there being around 2000 products I need to gather info for. I'm totally OK with writing a screen scraper for pretty much anything but i've encountered a major problem. Im using get_file_contentsto gather the html of the product page. The problem is: You need to be logged in, to view the product page. Its a standard magento login, so how can I get round this in my screen scraper? I don't require a full script, just advice on a method. Thanks

    Read the article

  • Browser not handling exception from AJAX panel, ASP.NET c#

    - by Grant
    Hi, i am having trouble catching errors in an AJAX panel. Even when i throw an exception in the c# code behind the front end completely ignores it. Here is the code i have setup, can anyone see why? I ideally want to show a js alert window on error. Code Behind: protected void btnX_Click(object sender, EventArgs e) { throw new ApplicationException("test"); } protected void ScriptManager_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e) { ScriptManager.AsyncPostBackErrorMessage = e.Exception.Message; } Markup: <script type="text/javascript" language="javascript"> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, e) { window.alert(e.get_error().name); } </script> <asp:ScriptManager ID="ScriptManager" runat="server" AllowCustomErrorsRedirect="true" OnAsyncPostBackError="ScriptManager_AsyncPostBackError" />

    Read the article

  • How to properly align textboxes on a webpage with labels

    - by Grant
    Hi, this is a CSS / design question. I have three textboxes that i want to be center aligned on a web page. Then i want a label description to the right of each one. When i use attribute like text:align:centre because the labels are of different length it throws out the aligment of the textboxes [see image link below] http://www.mediafire.com/imageview.php?quickkey=qcyoajm2iuk Is there an easy way of keeping the textboxes aligned and then have the labels off the to the right without changing the textboxes? Thanks.

    Read the article

  • Extract a portion of a Qt .ui file into its own .ui file

    - by Grant Limberg
    We have a designer creating a user interface for an application. The main window has several QStackedWidgets used for in place panel switching. What I'd like to be able to do is extract each individual panel that makes up each page of the QStackedWidget into it its own .ui file. Is there an easy way to accomplish this from within Qt Designer, or are there any other tools to help accomplish this task short of redesigning all of the panels in their own .ui files?

    Read the article

  • Upgrading IIS web sever framework 2.0 to 3.5 considerations

    - by Grant
    Hi, i will be responcible for upgrading an IIS web server from the Microsoft .NET framework v2.0 to v3.5. I am wondering if there is anything special i need to know or any caveats i should be aware of before proceding? The site gets a fair number of hits per day and I will be taking it down and performing the upgrade at an off-peak time. Aside from double clicking the installer is there anything i need to know? Will the server need to be rebooted afterwards, does the installer handle all of the configuration changes? etc.. Thanks.

    Read the article

  • How do I get Xcode and TextMate to calibrate syntax highlighting colours the same way?

    - by Grant Heaslip
    This is a mostly insignificant problem, but it's been bugging me for a while and I figured someone on here might be as ridiculously OCD as I am (this is a programmer community after all). Basically, the problem is that TextMate doesn't seem to calibrate syntax highlighting colours, while Xcode does. What this means in practice is that, while I've faithfully recreated my TextMate theme in Xcode, the syntax highlighting in Xcode seems noticeably less vivid that it does in TextMate. If I use DigitalColor Meter to check the actual colours in Xcode, they don't match the values I entered, while in TextMate they do. Any ideas what's going on here? Thanks!

    Read the article

  • Not enough storage is available to complete this operation - Program or Storage memory?

    - by Grant Crofton
    I've been given a Windows Mobile app written in .Net CF 3.5 to fix, and one of the problems is to do with storage. The message 'Not enough storage is available to complete this operation' has appeared a few times - it's logged in the SQL CE database, and always happens during data access (but not the same bit of data access). The thing I'm slightly confused about is whether this refers to Program Memory (e.g. RAM) or Storage Memory (e..g permanent storage). It would appear to be storage memory, but the devices seem to have plenty free. While there are some OutOfMemoryExceptions, these appear totally unrelated to this problem (in that that happen at a different time due to an image-related issue). We're using SQL CE 3.5 with a single connection, which is stored along with the app on the device (as opposed to the storage card). The device is a Motorola MC75 running Windows Mobile 6.1. Any thoughts?

    Read the article

  • Static methods on ASP.NET web sites

    - by Grant
    Hi, i was wondering.. if i have a static method on an asp.net web site (plain vanilla), is that accessible by all users of all sessions? I guess what i am saying is the single instance of a method available to each client? or is there 1 instance for all clients for the site..

    Read the article

  • How to create a mobile friendly website [infrastructure]

    - by Grant
    Hi, if i wanted to create a mobile friendly version of a relatively small website would it be better to have a sub domain that redirects to a completely new url with sperate markup and styling or would it be better to detect the useragent in code and programatically change to a different mobile friendly stylesheet, or is their a better infrastructure based solution i am overlooking.. Thanks.

    Read the article

  • how many dojo fliteringselect can I have on a form?

    - by Grant Collins
    I have a quick question How many dojo filteringselects can I have on a form? I have a form with 2 filteringselects on it, both getting data from different json datastores to populate the values. However only the first filteringselect is being populated, the other grabs no data. I am using Zend Framework and Zend_Dojo_Form to create the form elements for this. Many thanks. Ok looks like my code is broken somewhere then. The element that is failing in my form is: $location = new Zend_Dojo_Form_Element_FilteringSelect('location'); $location->setAutocomplete(true) ->setStoreId('countiesstore') ->setStoreType('dojo.data.ItemFileReadStore') ->setStoreParams(array('url' => $baseUrl.'/dojo/counties')) ->setAttrib('searchAttr', 'title') ->setRequired(true) ->removeDecorator('DtDdWrapper') ->removeDecorator('label') ->removeDecorator('HtmlTag') ->removeDecorator('Error'); When I go to http://localhost/dojo/counties I get the json file to read, but the element isn't populated with any data. Any ideas?

    Read the article

  • Zend_Dojo_Form not rendering in layout

    - by Grant Collins
    Hi, I have a quick question about adding Zend_Dojo_Form into Zend_layouts. I have a Zend_Dojo_Form that I want to display in the layout that is used for a particular controller. I can add the form to the layout without any issue however the dojo elements fail to render, as they would do if I added the form to a standard view. Is there any reason why this would be the case? Do I need to do something to the layout so that it will enable the components for this embedded form in the layout. Any other dojo enabled forms that are added in the view using this layout work fine. My form is created in the usual way: class QuickAddJobForm extends Zend_Dojo_Form{ public function init(){ $this->setName('quickaddjobfrm') ->setMethod('post') ->setAction('/addjob/start/); /*We now create the elements*/ $jobTitle = new Zend_Dojo_Form_Element_TextBox('jobtitle', array( 'trim' => true ) ); $jobTitle->setAttrib('style', 'width:200px;') ->addFilter('StripTags') ->removeDecorator('DtDdWrapper') ->removeDecorator('HtmlTag') ->removeDecorator('Label'); .... $this->addElements(array($jobTitle, ....)); In the controller I declare the layout and the form in the init function: public function init(){ $this->_helper->layout->setLayout('add-layout'); $form = new QuickAddJobForm(); $form->setDecorators(array(array('ViewScript', array('viewScript' => 'quickAddJobFormDecorator.phtml')))); $this->_helper->layout()->quickaddjob = $form; In my layout Where I want the form I have: echo $this->layout()->quickaddjob; Why would adding this form in the layout fail to render/add the Dojo elements? All that is currently being displayed are text boxes, rather than some of the other components such as ComboBoxes/FilteringSelects etc... Thanks in advance.

    Read the article

  • Python/Django: log to console under runserver, log to file under Apache

    - by Justin Grant
    How can I send trace messages to the console (like print) when I'm running my Django app under manage.py runserver, but have those messages sent to a log file when I'm running the app under Apache? I reviewed Django logging and although I was impressed with its flexibility and configurability for advanced uses, I'm still stumped with how to handle my simple use-case. My apologies for not being able to find the answer elsewhere-- this is a newbie question I know.

    Read the article

  • C# Multi threading- Move objects between threads

    - by Grant
    Hi, i am working with a winforms control that is both a GUI element and also does some internal processing that has not been exposed to the developer. When this component is instantiated it may take between 5 and 15 seconds to become ready so what i want to do is put it on another thread and when its done bring it back to the gui thread and place it on my form. The problem is that this will (and has) cause a cross thread exception. Normally when i work with worker threads its just with simple data objects i can push back when processing is complete and then use with controls already on the main thread but ive never needed to move an entire control in this fashion. Does anyone know if this is possible and if so how? If not how does one deal with a problem like this where there is the potential to lock the main gui?

    Read the article

  • T-SQL 2005 - Divide by zero error encountered

    - by Grant
    Hi, I am trying to get some percentage data from a stored procedure using code similar to the line below. Obviously this is going to cause a (Divide by zero error encountered) problem when base.[XXX_DataSetB] returns 0 which may happen some of the time. Does anyone know how i can deal with this in the most efficient manner? Note: There would be about 20+ lines looking like the one below... cast((base.[XXX_DataSetB] - base.[XXX_DataSetA]) as decimal) / base.[XXX_DataSetB] as [XXX_Percentage]

    Read the article

  • Should I convert overly-long UTF-8 strings to their shortest normal form?

    - by Grant McLean
    I've just been reworking my Encoding::FixLatin Perl module to handle overly-long UTF-8 byte sequences and convert them to the shortest normal form. My question is quite simply "is this a bad idea"? A number of sources (including this RFC) suggest that any over-long UTF-8 should be treated as an error and rejected. They caution against "naive implementations" and leave me with the impression that these things are inherently unsafe. Since the whole purpose of my module is to clean up messy data files with mixed encodings and convert them to nice clean utf8, this seems like just one more thing I can clean up so the application layer doesn't have to deal with it. My code does not concern itself with any semantic meaning the resulting characters might have, it simply converts them into a normalised form. Am I missing something. Is there a hidden danger I haven't considered?

    Read the article

  • How to convert unicode character to its escaped ascii equivalent in c#

    - by Grant
    Hi, i am beginning with a string containing an encoded unicode character "& #xfc;". I pass the string to an object that performs some logic and returns another string. That string is converting the original encoded character to its unicode equivalent "ü". I need to get the original encoded character back but so far am not able. I have tried using the HttpUtility.HtmlEncode() method but that is returning "& #252;" which is not the same. Can anyone help?

    Read the article

  • Need help in understanding a SELECT query

    - by Grant Smith
    I have a following query. It uses only one table (Customers) from Northwind database. I completely have no idea how does it work, and what its intention is. I hope there is a lot of DBAs here so I ask for explanation. particularly don't know what the OVER and PARTITION does here. WITH NumberedWomen AS ( SELECT CustomerId ,ROW_NUMBER() OVER ( PARTITION BY c.Country ORDER BY LEN(c.CompanyName) ASC ) women FROM Customers c ) SELECT * FROM NumberedWomen WHERE women > 3 If you needed the db schema, it is here

    Read the article

  • AJAX Panel not throwing exceptions

    - by Grant
    Hi, i have just noticed something strange in some asp.net markup. I have a standard form with a couple of textboxes and a submit button. When clicked the code behind will attempt to perform some logic and then return. If the input values are not valid it used to throw an exception. The moment i wrapped the controls in an AJAX update panel and try to submit bad data, no exception is thrown and the panel returns like nothing was wrong. Does anyone know how to return this to the previous behavior whilst keeping the update panel?

    Read the article

  • How do I find what text/HTML is on screen in a UIWebview?

    - by Grant M
    I would like to know what the first piece of text/html that is currently showing on screen, or more generally where in pixel location a particular tag or piece of text is in the UIWebview. I know that I can use window.pageYOffset to get the scroll position of the UIwebview, but how do I find out what text or HTML item is there?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >