Search Results

Search found 84 results on 4 pages for 'damien sawyer'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • How do I use a custom cookie session serializer in Rack?

    - by Damien Wilson
    Hello SO. I'm currently integrating Warden into a new Rack application I'm building. I'd like to implement a recent patch to Rack that allows me to specify how sessions are serialized; specifically, I'd like to use Rack::Session::Cookie::Identity as the session processor. Unfortunately, the documentation is a little unclear as to what syntax I should use to configure Rack::Session::Cookie in my rackup file, can anyone here tell me what I'm doing wrong? config.ru require 'my_sinatra_app' app = self use Rack::Session::Cookie.new(app, Rack::Session::Cookie::Identity.new), {:key => "auth_token"} use Warden::Manager do |warden| # Must come AFTER Rack::Session warden.default_strategies :password warden.failure_app Jelli::Auth.run! end run MySinatraApp error message from thin !! Unexpected error while processing request: undefined method `new' for #<Rack::Session::Cookie:0x00000110124128> PS: I'm using bundler to manage my gem dependencies and I've likewise included rack's master branch as the desired version. Update: As suggested in the comments below, I have read the documentation; sadly the suggested syntax in the docs is not working. Update: Still no luck on my end; offering up a bounty to whoever can help me figure this out.

    Read the article

  • Remove binding to FrameworkElementFactory

    - by Damien
    I am currently creating a datatemplate to display data in a listview control in a specific manner and bound to the data. This works fine. But I need to be able to remove the bindings when the screen is closed and control is being disposed. How can I do this? I am thinking of just passing null as the second parameter of SetBinding and not sure if this will fix the issue. Also I have tried BindingOperation.ClearBindings, but I have a FrameworkElementFactory object and not a DependancyObject. Any help would be appricaited. //Create a Element Factory object to save the elements that make //up the DataTemplate cellTemplateFactory = new FrameworkElementFactory(typeof(TextBlock)); //Set the binding to the text property of the textblock element var binding = new Binding(dispColumn.BindingField) { TargetNullValue = string.Empty, Mode = BindingMode.OneTime };

    Read the article

  • Warning: expects resource but string given

    - by Damien
    I get: "Resource id #8 Warning: mysql_fetch_array() expects parameter 1 to be resource, string given" Heres the code: $sql="SELECT password FROM user WHERE userid=$userid"; echo $password=mysql_query($sql); while($row = mysql_fetch_array($password)) { $password = $row['password']; } Any ideas?

    Read the article

  • Interpret a rule applying multiple xpath queries on multiple XML documents

    - by Damien
    Hi, I need to build a component which would take a few XML documents in input and check the following kind of rules: XML1:/bookstore/book[price>35.00] != null and (XML2:/city/name = 'Montreal' or XML3://customer[@language] contains 'en') Basically my component should be able to: substitute the XML tokens with the corresponding XML document(before colon) apply xpath query on this XML document check the xpath output against expected result ("=", "!=", "contains") follow the basic syntax ("and", "or" and parentheses) tell if the rule is true or false Do you know any library which could help me? maybe JavaCC? Thanks

    Read the article

  • Validate number of nested attributes

    - by Damien MATHIEU
    Hello, I have a model with nested attributes : class Foo < ActiveRecord::Base has_many :bar accepts_nested_attributes_for :bar end It works fine. However I'd want to be sure that for every Foo, I have at least two Bar. I can't access the bar_attributes in my validations so it seems I can't validate it. Is there any clean way to do so ?

    Read the article

  • Is there a better way to minimize this C# event repetition?

    - by Damien Wildfire
    I have a lot of code like this: public class Microwave { private EventHandler<EventArgs> _doorClosed; public event EventHandler<EventArgs> DoorClosed { add { lock (this) _doorClosed += value; } remove { lock (this) _doorClosed -= value; } } private EventHandler<EventArgs> _lightbulbOn; public event EventHandler<EventArgs> LightbulbOn { add { lock (this) _lightbulbOn += value; } remove { lock (this) _lightbulbOn -= value; } } // ... } You can see that much of this is boilerplate. In Ruby I'd be able to do something like this: class Microwave has_events :door_closed, :lightbulb_on, ... end Is there a similar shorter way of removing this boilerplate in C#?

    Read the article

  • Is there a better way to write this repetitive event-declaration code in C# when implementing an int

    - by Damien Wildfire
    I have a lot of code like the following, where I explicitly implement some events required by an interface. public class IMicrowaveNotifier { event EventHandler<EventArgs> DoorClosed; event EventHandler<EventArgs> LightbulbOn; // ... } public class Microwave : IMicrowaveNotifier { private EventHandler<EventArgs> _doorClosed; event EventHandler<EventArgs> IMicrowaveNotifier.DoorClosed { add { lock (this) _doorClosed += value; } remove { lock (this) _doorClosed -= value; } } private EventHandler<EventArgs> _lightbulbOn; event EventHandler<EventArgs> IMicrowaveNotifier.LightbulbOn { add { lock (this) _lightbulbOn += value; } remove { lock (this) _lightbulbOn -= value; } } // ... } You can see that much of this is boilerplate. In Ruby I'd be able to do something like this: class Microwave has_events :door_closed, :lightbulb_on, ... end Is there a similar shorter way of removing this boilerplate in C#? Update: I left a very important part out of my example: namely, the events getting implemented are part of an interface, and I want to implement it explicitly. Sorry for not mentioning this earlier!

    Read the article

  • Delete document with an empty ID

    - by Damien MATHIEU
    Hello, I have a CouchDB database in production. One of the documents has been edited (in Futon by an other developer). And it's lost it's ID (don't ask me how he did it). So now the document's id is an empty string, which makes it impossible to edit or delete via Futon. Is there a way I could hack into CouchDB to delete that document anyway ?

    Read the article

  • Enum : get the keys list

    - by Damien MATHIEU
    Hello, I'm not a java developer. But I'm currently taking a look at Android applications development so I'm doing a bit of nostalgy, doing some java again after not touching it for three years. I'm looking forward using the "google-api-translate-java" library. In which there is a Language class. It's an enum allowing to provide the language name and to get it's value for Google Translate. I can easily get all the values with : for (Language l : values()) { // Here I loop on one value } But what I'd want to get is a list of all the keys names (FRENCH, ENGLISH, ...). Is there something like a "keys()" method that'd allow me to loop through all the enum's keys ?

    Read the article

  • How to stop a Timer-X timer (jQuery)

    - by Damien K.
    I'm using Timer-X's timerDelayCall function in order to have a repeating rotator on my page, which starts automatically as the page loads: jQuery.timerDelayCall({ interval: 2000, repeat: true, callback: function(timer) { ... (my rotator logic here) } } }); The problem is that I'm trying to make a function that includes stopping that timer: function signUp() { ... (timer stop code here) } The documentation stats that timer.stop() does that, but however I format it, I get errors about it not being declared. I have tried every variation I can think of, such as: timer.stop(); jQuery.timer.stop(); $(document).timer.stop(); jQuery.timerDelayCall({ callback: function(timer) { timer.stop() } }); I'm sure I'm missing something simple - I come from a PHP background yet I'm new to javascript - but can't see what it is exactly. Help is much appreciated!

    Read the article

  • Control is set to false, jQuery selector fails

    - by Damien Joe
    Hi I have some controls on an asp.net modal which I show manually via code behind. Now I am trying to attach a selector on one of the controls inside pageLoad(), problem being is that the modal container is initially set to visible=false. I tried checking for length but it still throws exception if ($('#<%= myControl.ClientId %>').length > 0) { $('#<%= myControl.ClientID %>').click(function() { // Do work }); } Compiler Error Message: CS0103: The name 'myControl' does not exist in the current context

    Read the article

  • Stopping jQuery Jumping to Newly Loaded Content.

    - by Damien
    I have a div with is replaced upon certain user actions. These actions are performed under the div that is being replaced and in the case that the div is too large to fit completely into the view window, along with the buttons used to change it underneath, the browser will jump to the top of the newly loaded div. Which is annoying. Does anyone know of a way to stop these? Cheers. Here is the jQuery code. ChartContent is a small blob of html function UpdateChartImage(ChartContent) { //do updates on div here var existingChart = $("#" + $(ChartContent).attr("id")); existingChart.fadeOut("fast", function() { existingChart.replaceWith(ChartContent); }).fadeIn("fast"); } Incidentally I have prevented the button from doing it's default behaviour so I don't think it's related to that.

    Read the article

  • Updating a C# 2.0 events example to be idiomatic with C# 3.5?

    - by Damien Wildfire
    I have a short events example from .NET 2.0 that I've been using as a reference point for a while. We're now upgrading to 3.5, though, and I'm not clear on the most idiomatic way to do things. How would this simple events example get updated to reflect idioms that are now available in .NET 3.5? // Args class. public class TickArgs : EventArgs { private DateTime TimeNow; public DateTime Time { set { TimeNow = value; } get { return this.TimeNow; } } } // Producer class that generates events. public class Metronome { public event TickHandler Tick; public delegate void TickHandler(Metronome m, TickArgs e); public void Start() { while (true) { System.Threading.Thread.Sleep(3000); if (Tick != null) { TickArgs t = new TickArgs(); t.Time = DateTime.Now; Tick(this, t); } } } } // Consumer class that listens for events. public class Listener { public void Subscribe(Metronome m) { m.Tick += new Metronome.TickHandler(HeardIt); } private void HeardIt(Metronome m, TickArgs e) { System.Console.WriteLine("HEARD IT AT {0}",e.Time); } } // Example. public class Test { static void Main() { Metronome m = new Metronome(); Listener l = new Listener(); l.Subscribe(m); m.Start(); } }

    Read the article

  • Casting/dereferencing member variable pointer from void*, is this safe?

    - by Damien
    Hi all, I had a problem while hacking a bigger project so I made a simpel test case. If I'm not omitting something, my test code works fine, but maybe it works accidentally so I wanted to show it to you and ask if there are any pitfalls in this approach. I have an OutObj which has a member variable (pointer) InObj. InObj has a member function. I send the address of this member variable object (InObj) to a callback function as void*. The type of this object never changes so inside the callback I recast to its original type and call the aFunc member function in it. In this exampel it works as expected, but in the project I'm working on it doesn't. So I might be omitting something or maybe there is a pitfall here and this works accidentally. Any comments? Thanks a lot in advance. (The problem I have in my original code is that InObj.data is garbage). #include <stdio.h> class InObj { public: int data; InObj(int argData); void aFunc() { printf("Inside aFunc! data is: %d\n", data); }; }; InObj::InObj(int argData) { data = argData; } class OutObj { public: InObj* objPtr; OutObj(int data); ~OutObj(); }; OutObj::OutObj(int data) { objPtr = new InObj(data); } OutObj::~OutObj() { delete objPtr; } void callback(void* context) { ((InObj*)context)->aFunc(); } int main () { OutObj a(42); callback((void*)a.objPtr); }

    Read the article

  • Is this a good way to generically deserialize objects?

    - by Damien Wildfire
    I have a stream onto which serialized objects representing messages are dumped periodically. The objects are one of a very limited number of types, and other than the actual sequence of bytes that arrives, I have no way of knowing what type of message it is. I would like to simply try to deserialize it as an object of a particular type, and if an exception is thrown, try again with the next type. I have an interface that looks like this: public interface IMessageHandler<T> where T : class, IMessage { T Handle(string message); } // elsewhere: // (These are all xsd.exe-generated classes from an XML schema.) public class AppleMessage : IMessage { ... } public class BananaMessage : IMessage { ... } public class CoconutMessage : IMessage { ... } Then I wrote a GenericHandler<T> that looks like this: public class GenericHandler<T> : IMessageHandler<T> where T: class, IMessage { public class MessageHandler : IMessageHandler { T IMessageHandler.Handle(string message) { T result = default(T); try { // This utility method tries to deserialize the object with an // XmlSerializer as if it were an object of type T. result = Utils.SerializationHelper.Deserialize<T>(message); } catch (InvalidCastException e) { result = default(T); } return result; } } } Two questions: Using my GenericHandler<T> (or something similar to it), I'd now like to populate a collection with handlers that each handle a different type. Then I want to invoke each handler's Handle method on a particular message to see if it can be deserialized. If I get a null result, move onto the next handler; otherwise, the message has been deserialized. Can this be done? Is there a better way to deserialize data of unknown (but restricted) type?

    Read the article

  • Continuously reading from a stream in C#?

    - by Damien Wildfire
    I have a Stream object that occasionally gets some data on it, but at unpredictable intervals. Messages that appear on the Stream are well-defined and declare the size of their payload in advance (the size is a 16-bit integer contained in the first two bytes of each message). I'd like to have a StreamWatcher class which detects when the Stream has some data on it. Once it does, I'd like an event to be raised so that a subscribed StreamProcessor instance can process the new message. Can this be done with C# events without using Threads directly? It seems like it should be straightforward, but I can't get quite get my head around the right way to design this.

    Read the article

  • IBM Rational Application Developer V7.0.0

    - by Damo
    Hi When I try to start my local server in RAD it takes ages to start. In startserver.log it stays at the following log statement for about 5 minutes ADMU3100I: Reading configuration for server: server1 When it moves on from this log statement, the server starts as normal. I have tried creating a new server profile and starting a server with no projects but I get the same results. What could be the issue here? Any assistance would be greatly appreciated. Regards Damien

    Read the article

  • Emacs24: emacsclient doesn't use global application menu

    - by codethief
    I noticed that Emacs24 makes use of Unity's global application menu. (I'm using Damien Cassou's Emacs24 snapshots.) However, it doesn't do that when emacs, emacsclient or emacsclient.emacs24 are run but just with emacs24. How can I fix that? (Is that a bug? If so, should I file a report in Emacs' or libappmenu's bugtracker?) [EDIT]: As far as I can see this could be related to https://bugs.launchpad.net/ubuntu/+source/appmenu-gtk/+bug/673302 .

    Read the article

  • jquery, jsonp and no success

    - by Damo
    Hi I have the following jquery in my code$j.getJSON("http://localhost:8080/WWTestHarnessWEB/ReadersToolkitFinalController.htm?jsoncallback=?", {'uID': 1}, function(data){alert(data);}); The json that i am returning looks like the following ({"positiveCount":"0","negativeCount":"999"}) But my alert is never firing. Any idea what i need to do to ensure that this will work? regards Damien

    Read the article

  • PeopleSoft and PeopleTools at Oracle OpenWorld 2012

    - by PeopleTools Strategy
    From Jeff Robbins PeopleTools 8.52 Gregory Sawyer October 12.00 Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} Oracle Open World is once again just around the corner.  This is a huge event for Oracle with thousands of individual sessions that cover all sorts of topics.  Here’s a link to a note from Paco Aubrejuan about PeopleSoft’s plans for this year’s conference: [link: http://www.oracle.com/us/industries/utilities/pfst-oow12-letter-1841052.pdf] Each year, PeopleTools sessions prove to be among the highest rated and best attended sessions of the conference. Once again we’ve put together a broad program of sessions and a great Hands on Lab, so be sure to use the Open World Schedule Builder to pre-register for the sessions you think will be of greatest value to you: [link: https://www.oracle.com/webapps/token/scheduler] Highlights of our program include: · Customer success with PeopleTools 8.52 · Great new features of the upcoming PeopleTools 8.53 · PeopleSoft’s new mobile solutions · Innovative technologies for your PeopleSoft system: Integration, User Experience, Lifecycle Management and more We’re excited about all that we have planned and look forward to seeing you there.  Stop by the DEMOGrounds to ask questions, see new features or just say hello. See you all there Jeff

    Read the article

  • Passing parameters to custom RESTful routes in Rails (using :collection)

    - by dwhite
    I am trying to add a custom route to my RESTful routes using the :collection param on map.resources like so: map.resources :products, :collection => { :tagged => :get } The tagged action takes in a :tag parameter. I am able to link to the URL route using: tagged_products_path(:tag => tag.name). My issue with this is that the URL that this generates: /products/tagged?tag=electronic I would like the tag to be in the URL and not the tag, like so: /products/tagged/electronic Of course this can be accomplished by a separate named route, but I'm wondering if I'm missing something and there is a way to do this with the :collection hash. Thanks in advance for your help -Damien

    Read the article

  • Oracle: delete suddenly taking a long time

    - by Damo
    Hi We have a feed process which runs every day of the year. As part of that we delete every row from a table (approx 1 million rows) every day, repopulate it using 5 different stored procedures and then commit the transaction. This is the only commit statement that we call. All of a sudden the delete has started takign about 2 hours to complete. The delete is also very simple (delete from T_PROFILE_WORK) This has worked perfectly well for the past year, but in the past week i have noticed this issue. Any help on this is greatly appreciated Thanks Damien

    Read the article

  • ATG Live Webcast April 5: Managing Your Oracle E-Business Suite with Oracle Enterprise Manager

    - by BillSawyer
    The next ATG Live Webcast covers one of the hottest topic areas in E-Business Suite Tools and Technology: Lifecycle Management. Angelo Rosado, Product Manager, ATG Development will lead you through using Oracle Enterprise Manager 12c and the latest E-Business Suite Plug-in to manage E-Business Suite systems. You can register for the Apr. 5, 2012 event at: Managing Your Oracle E-Business Suite with Oracle Enterprise Manager The topics covered in this webcast will be: Manage your EBS system configurations Monitor your EBS environment's performance and uptime Keep multiple EBS environments in sync with their patches and configurations Create patches for your EBS customizations and apply them with Oracle's own patching tools Date:               Thursday, April 5, 2012Time:              8:00 AM - 9:00 AM Pacific Standard TimePresenter:    Angelo Rosado, Product Manager, ATG DevelopmentWebcast Registration Link (Preregistration is optional but encouraged)To hear the audio feed:   Domestic Participant Dial-In Number:            877-697-8128    International Participant Dial-In Number:      706-634-9568    Additional International Dial-In Numbers Link:    Dial-In Passcode:                                              99342To see the presentation:    The Direct Access Web Conference details are:    Website URL: https://ouweb.webex.com    Meeting Number:  597073984If you miss the webcast, or you have missed any webcast, don't worry -- we'll post links to the recording as soon as it's available from Oracle University.  You can monitor this blog for pointers to the replay. And, you can find our archive of our past webcasts and training here.If you have any questions or comments, feel free to email Bill Sawyer (Senior Manager, Applications Technology Curriculum) at BilldotSawyer-AT-Oracle-DOT-com. 

    Read the article

  • ATG Live Webcast March 29: Diagnosing E-Business Suite JVM and Forms Performance Issues (Performance Series Part 4 of 4)

    - by BillSawyer
    The next webcast in our popular EBS series on performance management is going to be a showstopper.  Dave Suri, Project Lead, Applications Performance and Gustavo Jimenez, Senior Development Manager will discuss some of the steps involved in triaging and diagnosing E-Business Suite systems related to JVM and Forms components. Please join us for our next ATG Live Webcast on Mar. 29, 2012: Triage and Diagnostics for E-Business Suite JVM and Forms The topics covered in this webcast will be: Overall Menu/Sections Architecture Patches/Certified browsers/jdk versions JVM Tuning JVM Tools (jstat,eclipse mat, ibm tda) Forms Tools (strace/FRD) Java Concurrent Program options location Case studies Case Studies JVM Thread dump case for Oracle Advanced Product Catalog Forms FRD trace relating to Saving an SR Java Concurrent Program for BT Date:               Thursday, March 29, 2012Time:              8:00 AM - 9:00 AM Pacific Standard TimePresenters:  Dave Suri, Project Lead, Applications Performance                        Gustavo Jimenez, Senior Development ManagerWebcast Registration Link (Preregistration is optional but encouraged)To hear the audio feed:   Domestic Participant Dial-In Number:            877-697-8128    International Participant Dial-In Number:      706-634-9568    Additional International Dial-In Numbers Link:    Dial-In Passcode:                                              99342To see the presentation:    The Direct Access Web Conference details are:    Website URL: https://ouweb.webex.com    Meeting Number:  597073984 If you miss the webcast, or you have missed any webcast, don't worry -- we'll post links to the recording as soon as it's available from Oracle University.  You can monitor this blog for pointers to the replay. And, you can find our archive of our past webcasts and training here.If you have any questions or comments, feel free to email Bill Sawyer (Senior Manager, Applications Technology Curriculum) at BilldotSawyer-AT-Oracle-DOT-com. 

    Read the article

  • ATG Live Webcast: Planning Your Oracle E-Business Suite Upgrade from 11i to 12.1 and Beyond

    - by BillSawyer
    I am pleased to announce the next ATG Live Webcast event on December 1, 2011. Planning Your Oracle E-Business Suite Upgrade from 11i to 12.1 and Beyond Are you still on 11i and wondering about your next steps in the E-Business Suite lifecycle? Are you wondering what the upgrade considerations are going to be for 12.2? Do you want to know the best practices for upgrading E-Business Suite regardless of your version? If so, this is the webcast for you. Join Anne Carlson, Senior Director, Oracle E-Business Suite Product Strategy for this one-hour webcast with Q&A. This session will give you a framework to make informed upgrade decisions for your E-Business Suite environment. This event is targeted to functional managers, EBS project planners, and implementers. The agenda for the Planning Your Oracle E-Business Suite Upgrade from 11i to 12.1 and Beyond includes the following topics: Business Value of the Upgrade Starting Your Upgrade Project Planning Your Upgrade Approach Preparing for Your Upgrade Execution Extended Support for 11i Additional Resources Date:            Thursday, December 1, 2011Time:           8:00 AM - 9:00 AM Pacific Standard TimePresenter:  Anne Carlson, Senior Director, Oracle E-Business Suite Product StrategyWebcast Registration Link (Preregistration is optional but encouraged)To hear the audio feed:    Domestic Participant Dial-In Number:           877-697-8128    International Participant Dial-In Number:      706-634-9568    Additional International Dial-In Numbers Link:    Dial-In Passcode:                                              98515To see the presentation:    The Direct Access Web Conference details are:    Website URL: https://ouweb.webex.com    Meeting Number:  271378459 If you miss the webcast, or you have missed any webcast, don't worry -- we'll post links to the recording as soon as it's available from Oracle University.  You can monitor this blog for pointers to the replay. And, you can find our archive of our past webcasts and training at http://blogs.oracle.com/stevenChan/entry/e_business_suite_technology_learningIf you have any questions or comments, feel free to email Bill Sawyer (Senior Manager, Applications Technology Curriculum) at BilldotSawyer-AT-Oracle-DOT-com.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >