Search Results

Search found 3496 results on 140 pages for 'chris boden'.

Page 89/140 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • How to send windows messages to non-main forms

    - by Chris
    How do I go about sending a Windows Message to a form in my application that is not the MainForm? Using the code below gives me an Access Violation. procedure TMainForm.SendMessageToAnotherForm; begin SendMessage(MyForm.Handle,WM_MY_MESSAGE,0,0); end; MyForm has already been created and is the top most window.

    Read the article

  • Lexing partial SQL in C#

    - by Chris T
    I'd need to parse partial SQL queries (it's for a SQL injection auditing tool). For example '1' AND 1=1-- Should break down into tokens like [0] => [SQL_STRING, '1'] [1] => [SQL_AND] [2] => [SQL_INT, 1] [3] => [SQL_AND] [4] => [SQL_INT, 1] [5] => [SQL_COMMENT] [6] => [SQL_QUERY_END] Are their any at least lexers for SQL that I base mine off of or any good tools like bison for C# (though I'd rather not write my own grammar as I need to support most if not all the grammar of MySQL 5)

    Read the article

  • Silverlight Assembly.Load() only works with the full/strong name

    - by chris
    Apparently the implementation of Assembly.Load() in Silverlight needs a full/strong name. E.g. this works: Assembly.Load("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..."); while this will fail even if MyAssembly is already loaded: Assembly.Load("MyAssembly"); Is there a workaround so that it's possible to use the simple name?

    Read the article

  • C# String.Replace with a start/index (Added my (slow) implementation)

    - by Chris T
    I'd like an efficient method that would work something like this EDIT: Sorry I didn't put what I'd tried before. I updated the example now. // Method signature, Only replaces first instance or how many are specified in max public int MyReplace(ref string source,string org, string replace, int start, int max) { int ret = 0; int len = replace.Length; int olen = org.Length; for(int i = 0; i < max; i++) { // Find the next instance of the search string int x = source.IndexOf(org, ret + olen); if(x > ret) ret = x; else break; // Insert the replacement source = source.Insert(x, replace); // And remove the original source = source.Remove(x + len, olen); // removes original string } return ret; } string source = "The cat can fly but only if he is the cat in the hat"; int i = MyReplace(ref source,"cat", "giraffe", 8, 1); // Results in the string "The cat can fly but only if he is the giraffe in the hat" // i contains the index of the first letter of "giraffe" in the new string The only reason I'm asking is because my implementation I'd imagine getting slow with 1,000s of replaces.

    Read the article

  • getting boost::gregorian dates from a string

    - by Chris H
    I asked a related question yesterday http://stackoverflow.com/questions/2612343/basic-boost-date-time-input-format-question It worked great for posix_time ptime objects. I'm have trouble adapting it to get Gregorian date objects. try { stringstream ss; ss << dateNode->GetText(); using boost::local_time::local_time_input_facet; //using boost::gregorian; ss.imbue(locale(locale::classic(), new local_time_input_facet("%a, %d %b %Y "))); ss.exceptions(ios::failbit); ss>>dayTime; } catch (...) { cout<<"Failed to get a date..."<<endl; //cout<<e.what()<<endl; throw; } The dateNode-GetText() function returns a pointer to a string of the form Sat, 10 Apr 2010 19:30:00 The problem is I keep getting an exception. So concretely the question is, how do I go from const char * of the given format, to a boost::gregorian::date object? Thanks again.

    Read the article

  • JQuery UI + tabs : How to kow to get the selected tab with imbricated tabs

    - by chris
    Hi, I'm new to Jquery. I'm using JQuery UI and i have imbricated Tabs : Tabs in tabs. ____ tab 1 | tab 2 | tab 3 | tab 4| tab 5 ______ tab 1-1 | tab 1-2 | tab 1-3 | tab 1-4| tab 1-5 I'm using $('#div').bind('tabsselect', function(event, ui) { selectedTab = ui.index; alert('selectedTab : ' + selectedTab); }); to kown the selected index. If i click on "tab "1 the selected index returned is correct. But when click on tabs in the second level ("tab 1-xx") the event is fired too. I want to resctriced the bind('tabsselect', function(event, ui) on the first level of tab (tab x). How can i do that ? Thanks

    Read the article

  • Adding a button to a combobox in wpf

    - by Chris McGrath
    Pretty much I have an Editable Combobox and I want to add a button to the right of the drop down button which clears the selected item. So... |TextBox |X|v| I was thinking something like... <Style...> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <ControlTemplate.Resources> <Style TargetType="{x:Type TextBox}">...Add button here...</Style> </ControlTemplate.Resources> <ContentPresenter /> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • Can't send an email using a google apps account with PHPMailer

    - by Chris
    I'm trying to simply send an email using my google apps account with php. I am able to send an email in a .net application using the port 587 host smtp.googlemail.com and SSL enabled. The username is my full email address. require_once('PHPMailer_v5.1\class.phpmailer.php'); try { $mail = new PHPMailer(); $mail->Mailer = 'smtp'; $mail->SMTPSecure = 'tls'; $mail->Host = $host; $mail->Port = 587; $mail->SMTPAuth = true; $mail->Username = $from; $mail->Password = $password; $mail->AddAddress($to, $to_name); $mail->From = $from; $mail->FromName = $from_name; $mail->Subject = $subject; $mail->MsgHTML($body); $mail->IsHTML(true); $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); } catch (Exception $e) { echo $e->getMessage(); } Haven't been able to get this to work, but I've tried several different variations of this. $mail->SMTPSecure = 'ssl'; // Error: Could not connect to SMTP host. $mail->SMTPSecure = 'tls'; // Takes forever, then I get "this stream does not support SSL/crypto PHPMailer_v5.1\class.smtp.php" I don't care how, but I need to send an email using gmail here. It can be with this library or a different one.

    Read the article

  • Using Javascript in Google Web Optimizer Page Sections

    - by Chris S
    Is it possible to use Javascript in the content of a page section variation? I want different variations to make different Javascript function calls, so I have variation content like: Variation 1 <script type="text/javascript">my_func('abc');</script> Variation 2 <script type="text/javascript">my_func('def');</script> However, when I preview my page, I can't verify that my_func(content){ alert(content); } is actually being run. Does GWO not support JS content, or am I missing something?

    Read the article

  • Where To Call Custom Method? viewDidLoad, viewWillLoad...

    - by Chris
    I am loading some info from a server. I have created a separate method to do this. I am then calling [self myCustomMethod] to run the method. No matter where I call [self myCustomMethod] (initWithNibName, viewDidLoad, viewWillLoad, viewWillAppear, viewDidAppear), the custom method is getting called twice - what's the deal?

    Read the article

  • Implementing Drag and Drop using MouseListener for custom Components

    - by Chris Lieb
    I am working on a school assignment that requires me to be able to pick up a tile, drag it to a location, then drop it there. I was able to get this working using TransferHandler and a bunch of stuff from the dnd package, but this is not an acceptable way to perform this action for this assignment according to the professor. So, I am trying to achieve the same effect using the MouseListener interface. The basic setup is this: I have a JPanel-derived class called LocationView that contains JLabel-dervived instances of TileView. I need to get events that give me the LocationView that has the mouse pressed on and the LocationView that has the mouse released on. I am proxying mouse events through the TileView to its containing LocationView so that I can properly handle the mousePressed event. I added System.out.println()'s to the mouse listeners for mousePressed and mouseReleased to both LocationView and TileView so that I could observe the events that were being generated. To my surprise, pressing the mouse on Tile A in Location A, then dragging to Location B and releasing would generate a mouse released event for both Tile A and Location A, but not for Location B. I need the mouse released event triggered for only Location B. To try to work around this, I tried implementing a glass pane based off of the FinalGlassPane found at http://weblogs.java.net/blog/2006/09/20/well-behaved-glasspane. After adding the glass pane and adding an event listener for it, I can see that the mouse events are indeed filtering through the glass pane, but the mouse released event is still only being called on the item the mouse was clicked on. Is there a way to have mousePressed and mouseReleased events associated with the same drag action be called on separate components?

    Read the article

  • Graph visualization code in javascript?

    - by Chris Farmer
    Hi. I have a data structure that represents a directed graph, and I want to render that dynamically on an HTML page. Does anyone know of any javascript code that can do a reasonable job with graph layout? These graphs will usually be just a few nodes, maybe ten at the very upper end, so my guess is that performance isn't going to be a big deal. Ideally, I'd like to be able to hook it in with jQuery so that users can tweak the layout manually by dragging the nodes around. Edit: Google's Visualization API seems to be more "graphs as charts" oriented than "graphs as nodes" oriented. I didn't see any node-oriented visualizations already built there, anyway. Do you know that one exists?

    Read the article

  • Get street address at lat/long pair

    - by Chris Wenham
    I've seen that it's possible to get the latitude and longitude (geocoding, like in Google Maps API) from a street address, but is it possible to do the reverse and get the street address when you know what the lat/long already is? The application would be an iPhone app (and why the app already knows lat/long), so anything from a web service to an iPhone API would work.

    Read the article

  • Java: split a List into two sub-Lists?

    - by Chris Conway
    What's the simplest, most standard, and/or most efficient way to split a List into two sub-Lists in Java? It's OK to mutate the original List, so no copying should be necessary. The method signature could be /** Split a list into two sublists. The original list will be modified to * have size i and will contain exactly the same elements at indices 0 * through i-1 as it had originally; the returned list will have size * len-i (where len is the size of the original list before the call) * and will have the same elements at indices 0 through len-(i+1) as * the original list had at indices i through len-1. */ <T> List<T> split(List<T> list, int i); [EDIT] List.subList returns a view on the original list, which becomes invalid if the original is modified. So split can't use subList unless it also dispenses with the original reference (or, as in Marc Novakowski's answer, uses subList but immediately copies the result).

    Read the article

  • How to stop a curl while requesting or stop the running php script?

    - by Chris
    I using url to request remote urls that sometimes may very slow or just down. In this case, my php scripts still waiting for the response, it makes apache has to many requests stay in memory and then overload. I need a way to stop curl requesting or stop running php script when specified time passed. I'd tried declare(), it makes no sense for curl. Can someone know how to solve it? BTW: what is the effect of CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT? They don't work like what I think.

    Read the article

  • Howto ignore specific undefined variables in Pydev (eclipse)

    - by chris.nullptr
    I'm writing a crossplatform python script on windows using Eclipse with the Pydev plugin. The script makes use of the os.symlink() and os.readlink() methods if the current platform isn't NT. Since the os.symlink() and os.readlink() methods aren't available on the windows platform Pydev flags them as undefined variables--like so: Is there a way to explicitly ignore certain undefined variable name errors (e.g. os.symlink())?

    Read the article

  • Excel 2010 Access to path is denied temp

    - by Chris Anderson
    I am using excel data reader to read data from an excel file. FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read); //1. Reading from a binary Excel file ('97-2003 format; *.xls) IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); //2. Reading from a OpenXml Excel file (2007 format; *.xlsx) IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream); http://exceldatareader.codeplex.com/ This reads excel 1997-2003 format and excel 2007 format on my local machine and when we move it to our test server. However, when moved to production, it works for excel 97-2003 files, but when I try to read 2007 files I receive the following error: Access to the path 'C:\Documents and Settings\PORTALS03\ASPNET\LOCALS~1\Temp\TMP_Z129388041687919815' is denied. How is it possible that the 97-2003 excel file can be read but the 2007 files throw access is denied?

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >