Search Results

Search found 1337 results on 54 pages for 'rob nicholson'.

Page 40/54 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Simple iPhone tally method question

    - by Rob
    Just trying to create a simple method that counts up 1 on the tally when the button is pressed. My knowledge is extremely limited and I am pretty sure that my problem is somewhere in the method implementation: -(IBAction) updateTally:(id) sender { NSString *text; int total = 0; total = total + 1; text=[[NSString alloc] initWithFormat: @"%i", total]; lblTally.text = text; } I have done the necessary interface declarations for the lblTally UILabel and the updateTally method. I suspect that there is some sort of an NSString/int/%i/%@ mixup that I am making but I'm not sure how to fix it. When I run the program as it currently is it displays a 0 in the lblTally label field on the iphone. When I press the button it then displays a 1 in that field. However, if I continue to press the button - nothing happens.

    Read the article

  • Symfony: Pre filtering submitted values before/after validation

    - by Rob
    Hi All I've been scouring the net and i have found nothing! I am using symfonys form framework to build a simple 'Create' form. Validation is fine. However i'd like to pre-filter my submitted values, so adding ucfirst, strtoupper, and the like. I'm not sure if im missing something crucial here, but the way i see it is the only way to do this would be to create my own custom validators and utilizing the doClean method, which seems daft since i'd have hundreds of validators for each php function! Hope you guys can help, i've been crawling through source code, api's, numerous books and blogs and i haven't found a thing :( Either it's impossible, or it's really easy, i hope its the latter!

    Read the article

  • iphone selecting a row to change view

    - by Rob J
    I have created the view Controllers and attached those to control their respective views. I can't figure out how to make the following code to go the right views though. (This is in the root view controller:) - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { RunViewController *runViewController = [[RunViewController alloc] initWithNibName:@"RunView" bundle:[NSBundle mainBundle]]; CalcViewController *calcViewController = [[CalcViewController alloc] initWithNibName:@"CalcView" bundle:[NSBundle mainBundle]]; PushViewController *pushViewController = [[PushViewController alloc] initWithNibName:@"PushView" bundle:[NSBundle mainBundle]]; SitViewController *sitViewController = [[SitViewController alloc] initWithNibName:@"SitView" bundle:[NSBundle mainBundle]]; TimerViewController *timerViewController = [[TimerViewController alloc] initWithNibName:@"TimerView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:runViewController animated:YES]; [runViewController release]; [self.navigationController pushViewController:pushViewController animated:YES]; [pushViewController release]; [self.navigationController pushViewController:sitViewController animated:YES]; [sitViewController release]; [self.navigationController pushViewController:timerViewController animated:YES]; [timerViewController release]; [self.navigationController pushViewController:calcViewController animated:YES]; [calcViewController release]; runViewController = nil; pushViewController = nil; sitViewController = nil; timerViewController = nil; calcViewController = nil; } Each time I select any of the rows in the table - all of the views come up. How do I arrange them to only open the view that it is supposed to?

    Read the article

  • Configure Symfony for use with Memcached

    - by Rob Wilkerson
    I have 2 Symfony applications (1 using 1.2.x, another using 1.4.x and both using Propel) that need to share some specific session information. Although I have no experience with memcached, my sense--after some reading--is that it may be able to serve as an external (FAST) repository that each app could read and write to. Unfortunately, I can't find much information about how to use it with Symfony in any capacity, much less in the quasi-cache, quasi-messaging server I'm envisioning. My questions, I suppose, are: Am I mistaken in believing that memcached be used in this manner and access by multiple systems? How can I configure Symfony to access a memcached repository? Thanks.

    Read the article

  • Where can I find some good tutorials for C++

    - by Rob
    My friend has convinced me to start learning some C++, so my question is simple: where can I find some good tutorials for it? But please don't link me to the usual dry boring tutorials that only tells you the function syntax, I need more thorough explanations. I get sidetracked very easily, and I need tutorials that are more on a human level, that I'll not only learn from, but enjoy reading as well. So I'd appreciate any links that would help :)

    Read the article

  • Undefined Variable? But I defined it...

    - by Rob
    Well before anyone claims that theres a duplicate question... (I've noticed that people who can't answer the question tend to run and look for a duplicate, and then report it.) Here is the duplicate you are looking for: http://stackoverflow.com/questions/2481382/php-claims-my-defined-variable-is-undefined However, this isn't quite a duplicate. It gives me a solution, but I'm not really looking for this particular solution. Here is my problem: Notice: Undefined variable: custom Now here is my code: $headers = apache_request_headers(); // Request the visitor's headers. $customheader = "Header: 7ddb6ffab28bb675215a7d6e31cfc759"; //This is what the header should be. foreach ($headers as $header => $value) { $custom .= "$header: $value"; } Clearly, $custom is defined. According to the other question, it's a global and should be marked as one. But how is it a global? And how can I make it a (non-global)? The script works fine, it still displays what its supposed to and acts correctly, but when I turn on error messages, it simply outputs that notice as well. I suppose its not currently necessary to fix it, but I'd like to anyway, as well as know why its doing this.

    Read the article

  • how to connect to MSSQL using activerecord, JDBC, JTDS and Integrated Security

    - by Rob
    As per the above, I've tried: establish_connection(:adapter => "jdbcmssql", :url => "jdbc:jtds:sqlserver://myserver:1433/mydatabase;domain='mynetwork';", :username => 'user', :password=>'pass' ) establish_connection(:adapter => "jdbcmssql", :url => 'jdbc:jtds:sqlserver://myserver:1433/mydatabase;domain="mynetwork";user="mynetwork\user"' ) establish_connection(:adapter => "jdbcmssql", :url => "jdbc:jtds:sqlserver://myserver:1433/mydatabase;domain='mynetwork';", :username=>'user' ) establish_connection(:adapter => "jdbcmssql", :url => "jdbc:jtds:sqlserver://myserver:1433/mydatabase;domain='mynetwork';integratedSecurity='true'", :username=>'user' ) .. and various other combinations. Each time I get: net/sourceforge/jtds/jdbc/SQLDiagnostic.java:368:in `addDiagnostic': java.sql.SQLException: Login failed for user ''. The user is not associated with a trusted SQL Server connection. (NativeException) Any tips? Thanks, activerecord (2.3.5) activerecord-jdbc-adapter (0.9.6) activerecord-jdbcmssql-adapter (0.9.6) jdbc-jtds (1.2.5) jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) Client VM 1.6.0_18) [x86-java]

    Read the article

  • .net 3.5 message framing

    - by Rob
    We have message framing working by using a lengh prefix but using .NET 2.0 beginSend/BeginReceive. Is message framing any different in 3.5, if so how should we implement it using the new framework? Are there any useable examples out there which focus purely on message framing using 3.5? Many thanks

    Read the article

  • When do Symfony's user attributes get written to session?

    - by Rob Wilkerson
    I have a Symfony app that populates the "widgets" of a portal application and I'm noticing something (that seems) odd. The portal app has iframes that make calls to the Symfony app. On each of those calls, a random user key is passed on the query string. The Symfony app stores that key its session using myUser->setAttribute(). If the incoming value is different from what it has in session, it overwrites the session value. In pseudo-code (and applying a synchronous nature for clarity even though it may not exist): # Widget request arrives with ?foo=bar if the user attribute 'foo' does not equal 'bar' overwrite the user attribute 'foo' with 'bar' end What I'm noticing is that, on a portal page with multiple widgets (read: multiple requests coming in more or less simultaneously) where the value needs to be overwritten, each request is trying to overwrite. Is this a timing problem? When I look at the log prints, I'd expect the first request that arrives to overwrite and subsequent requests to see that the user attribute they received matches what was just put into cache by the initial request. In this scenario, it could be that subsequent requests begin (and are checked) even before the first one--the one that should overwrite the cached value--has completely finished. Are session values not really available to subsequent requests until one request has completed entirely or could there be something else that I'm missing? Thanks.

    Read the article

  • How to use LINQ for CRUD with a simple SQL table?

    - by Rob Ferno
    Every LINQ blog I found there seemed around 2 years old, I understand the syntax but need more direction on creating the SQL mapping and context classes. I just need to use LINQ for 2 SQL tables I have, nothing complicated. Do folks write the SQL mapping classes by hand for such cases or is there a decent tool for this? Can someone point me in the right direction?

    Read the article

  • How do I get Hudson to stop escaping parts of my shell script?

    - by Rob Spieldenner
    I would like to have a shell script that copies some logs from a part of my system to the hudson workspace so I can archive them. So right now I have #!/bin/bash -ex cp /directory/structure/*.log . This is kind enough to be changed to cp '/directory/structure/*.log' . Which of course is not found since I don't have a file named *.log. So how do I get this script to work?

    Read the article

  • Developing a high-performance, scalable Comet application

    - by Rob
    Well, the title says most of it. I'm looking to develop a chat application that will hopefully become something more, and currently I'm considering my options for what I should build it on top of. I've taken a look at Tornado with Redis as my primary option - Tornado, being a Comet server, is perfect for long polling to retrieve the messages on Redis, which I have the intention of using as both a persistent data store, as well as a message queue with its nifty subpub features. However, I've also heard good things about Django, RabbitMQ, MongoDB and Orbited. JavaScript isn't a big problem for me, so Orbited's JavaScript support isn't too much of a boon. Really, I'd probably be happy to develop on the route I've chosen for myself, but if there are any gaping deficiencies in my plan, I'd like some kind person to point them out before I find I've wasted months on this.

    Read the article

  • How can I add a function reference to an object literal

    - by rob
    I need to add binders to DOM elements after rendering is done. Therefore I want to pass a list with (ID, callback) tuples to the rendering function so it can bind it after the rendering is done. So i would like to create a list of such objects and pass it to the rendering function: {id:'#someDOMelement', callback: someObject.someFunction} and bind it after the rendering like this: $(binders[i].id).bind('click', binders[i].callback);

    Read the article

  • ReSharper 5 disable resolve view

    - by Rob
    I just did a fresh installation of Visual Studio 2010 Ultimate and ReSharper 5. But now ran into the following situation; return View("~/Plugin/Plugin.Product.dll/Plugin.Product.Views.CreateProduct.ascx"); From a controller i'm returning a view a shown above. ReSharper 5 is trying to resolve this view, but can't find it. Which is explainable in my situation. What i want is to disable the option for ReSharper to try and resolve the views. Is this possible?

    Read the article

  • Automatically Organize Tags in Tax/Folksonomy

    - by Rob Wilkerson
    I'm working on a process that will perform natural language processing (NLP) on one--and potentially several--of our content rich sites. What I'd like to do once the NLP is complete is to automatically organize the output (generally a set of terms that you might think of as tags given the prevalence of that metaphor) into some kind of standard or generally accepted organizational structure. In a perfect world, I'd really like this to be crowd sourced under the folksonomy concept (as opposed to a taxonomy) since the ultimate goal is to target/appeal to real people rather than "domain experts", but I'm open to ideas and best practices. For the obvious purpose of scalability, I'd like to automate the population of this tax/folksonomy so that "some guy" in the team/organization isn't responsible for looking at a bunch of words (with or without context) and arbitrarily fleshing out the contextual components of the tree. I have a few ideas for doing this that require some research to establish viability, but I have exactly zero practical experience with this sort of thing so the ideas really just boil down to stuff I made up that might perform some role in accomplishing the task. Imagining that others have vastly more experience with this sort of thing, I'm hoping that I can stand on your shoulders. Thanks for your thoughts and insights.

    Read the article

  • Easiest way to choose a percentage of an amount of rows from a MySQL table?

    - by Rob
    I have a script that has a GET variable: $_GET['percentage'] I have a MySQL table of data. Now lets say that there are 100 rows of data in this table. In pseudo-code: SELECT data FROM table Now would it be possible to select $_GET['percentage'] of random data from table? For example (again in pseudo-code): $_GET['percentage'] = 10; SELECT 10% of data from table order by rand() If this IS possible, how could I do it?

    Read the article

  • C++ pimpl idiom wastes an instruction vs. C style?

    - by Rob
    (Yes, I know that one machine instruction usually doesn't matter. I'm asking this question because I want to understand the pimpl idiom, and use it in the best possible way; and because sometimes I do care about one machine instruction.) In the sample code below, there are two classes, Thing and OtherThing. Users would include "thing.hh". Thing uses the pimpl idiom to hide it's implementation. OtherThing uses a C style – non-member functions that return and take pointers. This style produces slightly better machine code. I'm wondering: is there a way to use C++ style – ie, make the functions into member functions – and yet still save the machine instruction. I like this style because it doesn't pollute the namespace outside the class. Note: I'm only looking at calling member functions (in this case, calc). I'm not looking at object allocation. Below are the files, commands, and the machine code, on my Mac. thing.hh: class ThingImpl; class Thing { ThingImpl *impl; public: Thing(); int calc(); }; class OtherThing; OtherThing *make_other(); int calc(OtherThing *); thing.cc: #include "thing.hh" struct ThingImpl { int x; }; Thing::Thing() { impl = new ThingImpl; impl->x = 5; } int Thing::calc() { return impl->x + 1; } struct OtherThing { int x; }; OtherThing *make_other() { OtherThing *t = new OtherThing; t->x = 5; } int calc(OtherThing *t) { return t->x + 1; } main.cc (just to test the code actually works...) #include "thing.hh" #include <cstdio> int main() { Thing *t = new Thing; printf("calc: %d\n", t->calc()); OtherThing *t2 = make_other(); printf("calc: %d\n", calc(t2)); } Makefile: all: main thing.o : thing.cc thing.hh g++ -fomit-frame-pointer -O2 -c thing.cc main.o : main.cc thing.hh g++ -fomit-frame-pointer -O2 -c main.cc main: main.o thing.o g++ -O2 -o $@ $^ clean: rm *.o rm main Run make and then look at the machine code. On the mac I use otool -tv thing.o | c++filt. On linux I think it's objdump -d thing.o. Here is the relevant output: Thing::calc(): 0000000000000000 movq (%rdi),%rax 0000000000000003 movl (%rax),%eax 0000000000000005 incl %eax 0000000000000007 ret calc(OtherThing*): 0000000000000010 movl (%rdi),%eax 0000000000000012 incl %eax 0000000000000014 ret Notice the extra instruction because of the pointer indirection. The first function looks up two fields (impl, then x), while the second only needs to get x. What can be done?

    Read the article

  • My iPhone app has been downloaded by people all over the world, but has no use to anyone outside of

    - by Rob Lourens
    I wrote a basic free app for the bus schedule in my American university's town which was accepted into the app store on Saturday. Since then the app has been downloaded (assuming I'm reading the iTunes Connect reports right) 18 times in Canada, 6 times in Germany, and many times from other places all over the world. I can't figure out why all these people are downloading it... are there services automatically downloading free apps for some purpose that I can't even imagine? Should I put a price on it ASAP?

    Read the article

  • Use jquery ':contains' to find specific javascript within a span

    - by Rob
    This is my first time here, I hope that this is clear. So i will have code similar to this this. <span class="mediaSource ui-draggable" id="purchsePlay7915504"> <a href="" onclick="return popup_window(this, 'MediaView', 850, 680)" class="control" enter code hereid="GenericLink"></a> <img id="Any_71" alt="Media Source" src="images/9672web.gif" class="mediaStationIcons mediaWin"/> <img class="player" alt="Media Source" src="images/playmedia.gif" style="display: none;"/> </span> The href portion is generated on the backend, and I have no access to it. I need to modify some existing jquery code to do something based on what the 'onclick' function is(there are different ones e.g. popup_window1,popup_window2 etc.) . I tried something like this: $('.segmentLeft span.mediaSource').click(function(){ if ($('span:contains("popup_window")').length > 0) { do something } }); but it does not seem to work.

    Read the article

  • nServiceBus registering subscribers but subscribers not receiving messages

    - by Rob Ellis
    My subscriber queue isn't picking up messages. The only unusual aspect to this is that the publisher is receiving messages which are generated from a website (and then a class library) which are then WCF'd to the publisher who publishes on behalf of the website/class library. If I remove the publisher's <add Messages=""> then I get an error saying the publisher doesn't know where to route the messages. Help! I've almost cut'n'pasted the WcfIntegration and PubSub samples, so I don't know why it isn't working! PUBLISHER: <MsmqTransportConfig InputQueue="RSApp_InputQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress="" ForwardReceivedMessagesTo=""> <MessageEndpointMappings> <add Messages="Messages" Endpoint="RSApp_InputQueue" /> </MessageEndpointMappings> </UnicastBusConfig> SUBSCRIBER: <!-- SUBSCRIBER --> <MsmqTransportConfig InputQueue="RSApp_SubscriberQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress="" ForwardReceivedMessagesTo=""> <MessageEndpointMappings> <add Messages="Messages" Endpoint="RSApp_InputQueue" /> </MessageEndpointMappings> </UnicastBusConfig>

    Read the article

  • Grails Services / Transactions / RuntimeException / Testing

    - by Rob
    I'm testing come code in a service with transactional set to true , which talks to a customer supplied web service the main part of which looks like class BarcodeService { .. /// some stuff ... try{ cancelBarCodeResponse = cancelBarCode(cancelBarcodeRequest) } catch(myCommsException e) { throw new RuntimeException(e) } ... where myCommsException extends Exception .. I have a test which looks like // As no connection from my machine, it should fail .. shouldFailWithCause(RuntimeException){ barcodeServices.cancelBarcodeDetails() } The test fails cause it's catching a myCommsException rather than the RuntimeException i thought i'd converted it to .. Anyone care to point out what i'm doing wrong ? Also will the fact that it's not a RuntimeException mean any transaction related info done before my try/catch actually be written out rather than thrown away ?? Thanks

    Read the article

  • Is there a major downside to using .htaccess files in your svn/git repository?

    - by Rob
    If our .htaccess files are purely for mod rewrites, is there a security / development downside to committing .htaccess files alongside other files in your repository? For various reasons (our SEO optimisers like to add pretty urls as new promotions occur, etc) we need a fair few rewrite rules inside these files. Would I be better off pushing the routing into php-land and dealing with it there? Or is reading from a .htaccess via apache fine? The .htaccess files are not exposed via the web server, so that's not a security risk.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >