Search Results

Search found 1439 results on 58 pages for 'rob ford'.

Page 42/58 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • 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

  • 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

  • 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

  • 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

  • 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

  • .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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • how to make it easy for users to register at my site?

    - by rob
    I want to make it dirt simple for users coming to my site to register so they can post comments, vote on things, etc. I would like for them to be able to use their facebook id, twitter id, yahoo mail id, gmail id, AIM id, msn id, or whatever else people are likely to have (not necessarily all of those, but the more the better). I want my mom to be able to do it in 30 seconds or less. (that is, no "enter your open id url here" type thing that would confuse her). I prefer they not have to pick a unique name, as that gets annoying as the site gets more users and it gets hard to find one that is unique. What is the best option here? I'm not quite sure about OpenId vs. OAuth, and whether there are other options. And I'd like it to be as simple for me, the developer, as possible (of course!). I don't want to spend forever learning some protocol, nor have to structure my whole app around this. It would be great if there was a site with sample code that is pretty easy to drop in. BTW, StackOverflow is a good example of a site that was easy for me to register for.

    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

  • iPhone scrolling the view up when keyboard is open

    - by Rob
    I understand that this problem is incredibly common and I have read through quite a few answers but am having trouble understanding how the code works. This works: -(void)textFieldDidBeginEditing:(UITextField *)sender { if ([sender isEqual:txtLeaveAddyLine1]) { //move the main view, so that the keyboard does not hide it. if (self.view.frame.origin.y >= 0) { [self setViewMovedUp:YES]; } } } In this example, txtLeaveAddy is the very first UITextField that is hidden by the keyboard and it works like a charm. As I cycle through the text fields on the screen it scrolls up when the user enters into that txtLeaveAddyLine1 field. However, when I try to add the fields below the txtLeaveAddyLine1 field - nothing happens. For example: -(void)textFieldDidBeginEditing:(UITextField *)sender { if ([sender isEqual:txtLeaveAddyLine1]) { //move the main view, so that the keyboard does not hide it. if (self.view.frame.origin.y >= 0) { [self setViewMovedUp:YES]; } } if ([sender isEqual:txtLeaveAddyLine2]) { //move the main view, so that the keyboard does not hide it. if (self.view.frame.origin.y >= 0) { [self setViewMovedUp:YES]; } } } Am I not using this function correctly?

    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

  • Replace a control on the screen

    - by Rob Bonner
    Hello all, I have an instance of a FlowCoverView (a great library that emulates cover flow on the iPhone). And it works great, with the exception of an update. When I update my table behind the scenes, I have no way of telling this control (that is defined in IB) that it has been updated, and to reload. (much like you can with a table using reloadData) To the question, is there a way to replace a control that is on the screen with another control to force the reload?

    Read the article

  • What causes a UIViewController to become active?

    - by Rob Bonner
    I am sure this is an easy question, but one that has escaped me for some time now. Say I have a UIViewController, either defined as a root in an XIB or on a stack. At some point in my code I want to replace it with another view controller. Just flat out replace it. How would I do that? I have tried defining the controller and assigning, but not sure what actually makes it push on the screen with the absence of a navigation controller.

    Read the article

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