Search Results

Search found 1393 results on 56 pages for 'brian'.

Page 33/56 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • How do i replace a key up keyCode with another in jQuery?

    - by Brian Scott
    I currently have a table which only has a single editable column. I have a jQCuery change() event associated with the column's input controls to prevent any non numeric keys being pressed, other than tab / delete / backspace. I would like to replace the Enter key with a Tab press. Can someone please show me the relevant statement to replace the keyCode based on the Enter character being intercepted?

    Read the article

  • What is the best method for implementing mouse wheel activity in Delphi VCL forms?

    - by Brian Frost
    As a long time user of Delphi 7, I've rolled my own mouse wheel handling in a few controls but lately I've noticed that some recent applications only need the mouse cursor to be placed over a control (e.g a list box or tree view) for the mouse wheel activity to cause that control to scroll. This feels nice (as opposed to having to click focus a control before it responds to the wheel. Now I've moved to Delphi 2010 I'm wondering what is the 'correct' behavior? And what can I use in Delphi that avoids me having to bodge this with my own solutions now? Thanks.

    Read the article

  • Is it correct that blueprint css allows you to formulate your layout as a grid instead of in terms o

    - by brian
    One of the arguments I've heard about blueprint css is that it lets you think of your layout in terms of a grid rather than in terms of floats. This seems like a big advantage to me because I always get confused about where my floats are going to end up - sometimes a float will unexpectedly drop down below some other floats and I have a hard time figuring out how to reposition everything. Does this make blueprint css a good choice for me - or should I just put the time in to learn how to use floats properly and do all of my layouts manually?

    Read the article

  • How do I get a window caption?

    - by P.Brian.Mackey
    I would like to get a Window Caption as given by spy++ (highlighted in red) I have code to do this (or so I thought)...but it seems to work pretty awful....in some cases 1% of the time... public delegate bool EnumDelegate(IntPtr hWnd, int lParam); [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool IsWindowVisible(IntPtr hWnd); [DllImport("user32.dll", EntryPoint = "GetWindowText", ExactSpelling = false, CharSet = CharSet.Auto, SetLastError = true)] static extern int GetWindowText(IntPtr hWnd, StringBuilder lpWindowText, int nMaxCount); [DllImport("user32.dll", EntryPoint = "EnumDesktopWindows", ExactSpelling = false, CharSet = CharSet.Auto, SetLastError = true)] static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDelegate lpEnumCallbackFunction, IntPtr lParam); static List<NativeWindow> collection = new List<NativeWindow>(); public static NativeWindow GetAppNativeMainWindow() { GetNativeWindowHelper.EnumDelegate filter = delegate(IntPtr hWnd, int lParam) { StringBuilder strbTitle = new StringBuilder(255); int nLength = GetNativeWindowHelper.GetWindowText(hWnd, strbTitle, strbTitle.Capacity + 1); string strTitle = strbTitle.ToString(); if (!string.IsNullOrEmpty(strTitle)) { if (strTitle.ToLower().StartsWith("window title | my application")) { NativeWindow window = new NativeWindow(); window.AssignHandle(hWnd); collection.Add(window); return false;//stop enumerating } } return true;//continue enumerating }; GetNativeWindowHelper.EnumDesktopWindows(IntPtr.Zero, filter, IntPtr.Zero); if (collection.Count != 1) { //log error ReleaseWindow(); return null; } else return collection[0]; } public static void ReleaseWindow() { foreach (var item in collection) { item.ReleaseHandle(); } }

    Read the article

  • asp:Menu Not working on webhost

    - by Brian
    I'm using Visual Studio Web Express 2008 to develop an ASP.Net website. I have a master page that every page inherits from and on that master page I have the asp:menu control. On my local machine the menu control works just fine. The javascript is emitted and the links work as well. However, when I upload it to my webhost service provider, the javascript is not emitted and my links do not work. I'm getting a feeling that my service provider really doesn't know much about .Net as they suggested that I make sure that I upload the .js files which isn't necessary. Does anyone have any suggestions that I can give them? They're asking me what requirements are needed. It seems to me that something is not setup on their server properly but according to them, they have .Net 3.5 SP1 installed.

    Read the article

  • How do you authenticate user generated "apps" for your app?

    - by Brian Armstrong
    I'm think something like Facebook apps here. User generated pieces of code that people can write to interact with my app. I understand how an authenticated API works, but this seems a little more complicated because not only does the APP have to authenticate itself (with a regular api-key) but the USER using the app has to be authenticated somehow too, without giving the app free reign. I've been reading a bit here to see how FB does it: http://wiki.developers.facebook.com/index.php/How_Facebook_Authenticates_Your_Application And it looks like you have to pass a signature in addition to the api-key along with every call, but I'm having trouble wrapping my head around how this gets generated and used on the other end (my server). Figure there must be a simple explanation of this out there? Thanks! P.S. I'm building a Rails app if there are any applicable gems/plugins.

    Read the article

  • Possible Encoding Issue Reading HTM File using .Net Streamreader

    - by Brian Boatright
    I have an HTML file with a ® (copyright) and ™ (trademark) symbol in the text. These are just two among many other symbols. When I read the html file into a literal control it converts the symbols to something else. The copyright symbol converts to ? (open box in ff) The trademark symbol converts to ™ (as expected) If (System.IO.File.Exists(FullName)) Then Dim StreamReader1 As New System.IO.StreamReader(FullName) Contents.Text = StreamReader1.ReadToEnd() StreamReader1.Close() End If Contents is a <asp:Literal runat="server" ID="Contents"></asp:Literal> and it's the only control in the aspx page. From some research I think this is related to the encoding but I don't know why it would change how to fix it. The html file does not contain any Content-Type settings in the head section.

    Read the article

  • Do not compile t4 file

    - by brian b
    Suddenly, after doing a TFS 2010 get, Visual Studio 2010 is attempting to compile my .tt file as if it was c#. Moreover, anytime I set it to "Build Action=None", Build Action gets mysteriously reset to Compile. This is breaking our builds on the desktop. I can get builds to work on the desktop by closing then reopening VS. Our builds on TFS are totally broken because of this. What to do? The template generates a (totally ok) c# file, so I need the project to build. I tried changing the file extension from .tt to .donotbuilddammit but that had no effect.

    Read the article

  • Authenticated Referrals & Server-Side Auth Flow - What is the redirect_uri?

    - by Brian P. Hamachek
    From an authenticated referral (such as from a timeline story) to my website, I am trying to use the server-side authentication flow to obtain an access token for the referred user. I need to pass my app secret, the auth code, and the original redirect URI to the Facebook access token endpoint. Since I did not initiate the authentication request, how do I determine the original redirect_uri? The link from the Facebook timeline looks like: http://www.facebook.com/connect/uiserver.php?app_id=153644678059870&method=permissions.request&redirect_uri=http%3A%2F%2Fwww.wnmlive.com%2Fpost%2F141833948%3Ffb_action_ids%3D10100708033267487%26fb_action_types%3Dwnm-live%253Acomment%26fb_source%3Drecent_activity&response_type=code&display=page&auth_referral=1 So I figure that the redirect URI I need to pass is: http%3A%2F%2Fwww.wnmlive.com%2Fpost%2F141833948%3Ffb_action_ids%3D10100708033267487%26fb_action_types%3Dwnm-live%253Acomment%26fb_source%3Drecent_activity The URI that the user is ultimately redirected to is: http://www.wnmlive.com/post/141833948?fb_action_ids=10100708032119787&fb_action_types=wnm-live%3Apost&fb_source=recent_activity&code=AQALK-Mwb_Nwi4z7FWnFaL6tEXvNtVJiRKrgarG9X73sp22TJyk8v2GWKtuXuevJk4hPSRNnuNpEgZXLFdOS_k-pY-mE15DYytIa8Y7VdSw3VL-XYi-CR9BCqRQGq4uBJvSSdZayCp6MWzDMaNqWd5r8OhKVnOhg_yDlvfoLl21N2SMwkJaOfD5mlPnPb5A-Q4A#_=_ Is it safe to assume that I can just chop off everything starting with the "&code=" and use that as the redirect URI?

    Read the article

  • jQuery $.each(arr, foo) versus $(arr).each(foo)

    - by Brian M. Hunt
    In jQuery, what's the difference between the following two constructions of jQuery.each: // Given var arr = [1,2,3,4], results = [], foo = function (index, element) { /* something done to/with each element */ results.push(element * element); // arbitrary thing. } // construction #1 $.each(arr, foo); // results = [1,4,9,16] // construction #2 $(arr).each(foo); // results = [1,4,9,16] Is there any difference, or is it purely syntax?

    Read the article

  • Java - JTable multiple instances

    - by Brian
    I have a JTable that gets data added to it from another JTable. Now I want to switch between JTables according to the day selected in a JComboBox. For example, if I choose Monday I add programs added to it then I select Tuesday from the JComboBox and a fresh JTable appears. If I go to Monday again the programs should still be there (until the program is closed). How do I create multiple JTables (the JTable remains the same) for the days and let the info remain there until program closure? Here is an example to show you what I mean:

    Read the article

  • Generic type in generic collection

    - by Brian Triplett
    I have generic type that looks like: public class GenericClass<T, U> where T : IComparable<T> { // Class definition here } I then have a collection of these instances. What is the cleanest way to pass through the type constraints? public class GenericCollection<V> where V : GenericClass<T, U> // This won't compile { private GenericClass<T, U>[] entries; public V this[index] { get{ return this.entries[index]; } } } Is there perhaps a better way to design this? I think that specifying GenericCollection<T, U, V> where V : GenericClass<T, U> seems awkward. Might be my only option though....

    Read the article

  • How to get parameter values from an XmlNode in C#

    - by Brian
    How do I get the values for parameters in a XmlNode tag. For example: <weather time-layout="k-p24h-n7-1"> <name>Weather Type, Coverage, and Intensity</name> <weather-conditions weather-summary="Mostly Sunny"/> </weather> I want to get the value for the parameter 'weather-summary' in the node 'weather-conditions'.

    Read the article

  • FullCalendar displaying last weeks events below this weeks events

    - by Brian
    I am developing an application to manage an On-Call calendar, using FullCalendar to render it. Most events are 1 week long, starting at 8:00 AM Tuesday and ending the following Tuesday at 8:00 AM. Another event, presumably with a different person on-call, will follow that event. During a hallway usability test, someone commented that the month calendar view was difficult to read because the previous weeks event is not at the top of the stack, instead rendering below the event that starts during that week. When being viewed, the eye perceives that it should go down 1 line to view the remaining timeline because the event from last week is there, instead of moving down to the following week. I investigated what I believe to be the problem: function segCmp(a, b) { return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); } sorts the events for a row, but uses the length of the event in the calculation. Since the current week's event will have a longer duration, it always get sorted to the top. To test, I changed the start dates to Wednesday so the durations are closer. This cause the events to render how I would expect, with last weeks events at the top and this weeks at the bottom. I thought that if one of the events in the compare doesn't start that week, then it should only be compared based on the start times. I modified the function to be: function segCmp(a, b) { if (a.isStart == false || b.isStart == false) { return (a.event.start - b.event.start); } return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); } This solved my problem, and the rendering now looks good - and passes the hallway test. What I don't know is if this would have an impact in other areas. I have taken a look at the other views (month, week, day) and they all seem to be rendering properly as well. I am just not familiar with FullCalendar enough to file a bug or feature request on this, or if this would even be considered a bug. I am wondering if what I modified is correct, or if it is not what a better modification would be to fix this issue. Thanks! Below I have the json results for what should be displayed: [{"title":"Person 1 - OnCall (OSS On Call)","id":12,"allDay":false,"start":"2010-11-30T15:00:00.0000000Z","end":"2010-12-07T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/12"}, {"title":"Person 2 - OnCall (OSS On Call)","id":13,"allDay":false,"start":"2010-12-07T15:00:00.0000000Z","end":"2010-12-14T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/13"}, {"title":"Person 3 - OnCall (OSS On Call)","id":14,"allDay":false,"start":"2010-12-14T15:00:00.0000000Z","end":"2010-12-21T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/14"}, {"title":"Person 4 - OnCall (OSS On Call)","id":15,"allDay":false,"start":"2010-12-21T15:00:00.0000000Z","end":"2010-12-28T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/15"}, {"title":"Person 5 - OnCall (OSS On Call)","id":16,"allDay":false,"start":"2010-12-28T15:00:00.0000000Z","end":"2011-01-04T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/16"}, {"title":"Person 6 - OnCall (OSS On Call)","id":17,"allDay":false,"start":"2011-01-04T15:00:00.0000000Z","end":"2011-01-11T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/17"}, {"title":"Christmas","id":2,"allDay":true,"start":"2010-12-25T07:00:00.0000000Z","end":null,"editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/2"}, {"title":"New Years Eve","id":3,"allDay":true,"start":"2010-12-31T07:00:00.0000000Z","end":null,"editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/3"}, {"title":"New Years Day","id":4,"allDay":true,"start":"2011-01-01T07:00:00.0000000Z","end":null,"editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/4"}]

    Read the article

  • Problem with filling dataset

    - by Brian
    This is a small portion of my code file. Each time my debugger reaches the line 'NewDA.Fill(NewDS);' at runtime it jumps to the catch. I'm positive the daynumber variable gets a value that's present in the database and I've tried the query outside of the codefile on my database and it works fine. I'm also using the connectionstring 'db' on more parts of the code with successful results. string QueryNew = "SELECT activityname AS [Name], activitycategorynumber AS [Category] " + "FROM ACTIVITY WHERE daynumber = @daynumber"; SqlCommand NewCmd = new SqlCommand(QueryNew, db); NewCmd.Parameters.Add("@daynumber", SqlDbType.Int).Value = daynumber; SqlDataAdapter NewDA = new SqlDataAdapter(NewCmd); DataSet NewDS = new DataSet(); NewDA.Fill(NewDS);

    Read the article

  • Mapping to a JSON method with url-pattern

    - by Brian
    I'm creating a Spring MVC application that will have a controller with 'RequestMapping'-annotated methods, including a JSON method. It currently has static content that resides in webapps/static, and the app itself resides in webapps/myapp. I assume that Catalina's default servlet is handling the static content, and my *.htm url-pattern in web.xml is returning the request for my JSP page, but I haven't been able to get the JSON method to be called. How do I write the url-pattern in the servlet mapping to do so? Using /* has not worked; it prevents the app from being accessed at all. Is there anything else to be aware of? EDIT: The url-pattern '/' appears to allow the JSON request through, because a 406 error is returned. What then would need to be modified to allow JSON to be returned?

    Read the article

  • can I read exactly one UDP packet off a socket?

    - by Brian Palmer
    Using UNIX socket APIs on Linux, is there any way to guarantee that I read one UDP packet, and only one UDP packet? I'm currently reading packets off a non-blocking socket using recvmsg, with a buffer size a little larger than the MTU of our internal network. This should ensure that I can always receive the full UDP packet, but I'm not sure I can guarantee that I'll never receive more than one packet per recvmsg call, if the packets are small. The recvmsg man pages reference the MSG_WAITALL option, which attempts to wait until the buffer is filled. We're not using this, so does that imply that recvmsg will always return after one datagram is read? Is there any way to guarantee this? Ideally I'd like a cross-UNIX solution, but if that doesn't exist is there something Linux specific?

    Read the article

  • Helicon ISAPI_REWRITE for masking folder

    - by Brian
    Hello, I would like to use the Helicon ISAPI_REWRITE module to rewrite a url: 123.45.67.89/folder to www.site.com I need to mask the IP/folder due to an IIS structure change. The reason why I don't want to get into, but it's valid based on the setup. Any help would be appreciated. Thanks.

    Read the article

  • Design Patterns: What's the antithesis of Front Controller?

    - by Brian Lacy
    I'm familiar with the Front Controller pattern, in which all events/requests are processed through a single centralized controller. But what would you call it when you wish to keep the various parts of an application separate at the presentation layer as well? My first thought was "Facade" but it turns out that's something entirely different. In my particular case, I'm converting an application from a sprawling procedural mess to a clean MVC architecture, but it's a long-term process -- we need to keep things separated as much as possible to facilitate a slow integration with the rest of the system. Our application is web-based, built in PHP, so for instance, we have an "index.php" and an IndexController, a "account.php" and an AccountController, a "dashboard.php" and DashboardController, and so on.

    Read the article

  • Create a binary indicator matrix in R

    - by Brian Vanover
    I have a list of data indicating attendance to conferences like this: Event Participant ConferenceA John ConferenceA Joe ConferenceA Mary ConferenceB John ConferenceB Ted ConferenceC Jessica I would like to create a binary indicator attendance matrix of the following format: Event John Joe Mary Ted Jessica ConferenceA 1 1 1 0 0 ConferenceB 1 0 0 1 0 ConferenceC 0 0 0 0 1 Is there a way to do this in R? Sorry for the poor formatting.

    Read the article

  • Does a Collection<T> wrap an IList<T> or enumerate over the IList<T>?

    - by Brian Triplett
    If I am exposing a internal member via a Collection property via: public Collection<T> Entries { get { return new Collection<T>(this.fieldImplimentingIList<T>); } } When this property is called what happens? For example what happens when the following lines of code are called: T test = instanceOfAbove.Entries[i]; instanceOfAbove[i] = valueOfTypeT; It's clear that each time this property is called a new reference type is created but what acctually happens? Does it simply wrap the IList<T> underneath, does it enumerate over the IList<T> and to create a new Collection<T> instance? I'm concerned about performance if this property is used in a for loop.

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >