Search Results

Search found 96 results on 4 pages for 'geoff baum'.

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

  • PHP DOM vs SimpleXML for Atom GData feed parsing

    - by Geoff Adams
    I'm building a library to access the Google Analytics Data Export API. All the data the library accesses is in Atom format and utilises numerous different namespaces throughout. My experiments with the API have used SimpleXML for parsing so far, especially as all I have been doing is accessing the data held within the feed. Now I'm coming to write a library I am wondering whether forging ahead with SimpleXML will be adequate or whether the enhanced functionality of the DOM module in PHP would be of benefit in the future. I haven't written much code for this part of the library yet so the choice is still open. I have read that the PHP DOM module can be a better choice if you need to build an XML DOM on the fly or modify an existing one, but I'm not entirely sure I would need that functionality anyway due to the nature of the API (no pushing data to the server, for instance). SimpleXML is certainly easier to use and I have seen people saying that for read-only situations it is all you need. Essentially the question is, what would you use? Compatibility will not be an issue as the server configuration will match the application's requirements. Is it worth building the library with PHP DOM in mind or should I stick with SimpleXML for now? Update: Here are two examples of the kind of feeds I will be dealing with: Account feed Data feed

    Read the article

  • How to determine direction of navigation from IE WebBrowser (IHtmlWindow2 or Javascript)

    - by Geoff Cox
    I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control. So its off to the COM ActiveX control underneath to determine the direction of navigation. I've been looking at IHtmlWindow2 and IHtmlDocument2 and IOmHistory, but don't see anything that happens on navigation to tell me if the navigation is caused by going back, forward, a new address, or a refresh. Since IHtmlWindow and Javascript have the same DOM, maybe someone knows how from Javascript. I've also been looking at the IWebBrowser2 interface, but can't find anything there either. Is there an event or property I need to inspect?

    Read the article

  • Silverlight: Determine whether DataContext is inherited or not

    - by Geoff Hudik
    At runtime in a generic fashion (i.e. iterating UIElements) can I determine if a given FrameWorkElement has a non-inherited DataContext property set? I want a list of elements where DataContext was explicitly set, not inherited from higher up in the chain. I thought perhaps GetBindingExpression() would help but so far it has not. Using Silverlight beta 3.

    Read the article

  • Haskell typeclass

    - by Geoff
    I have a Haskell typeclass question. I can't munge the syntax to get this (seemingly reasonable) program to compile under GHC. import Control.Concurrent.MVar blah1 :: [a] -> IO ([a]) blah1 = return blah2 :: [a] -> IO (MVar [a]) blah2 = newMVar class Blah b where blah :: [a] -> IO (b a) instance Blah [] where blah = blah1 -- BOOM instance Blah (MVar []) where blah = blah2 main :: IO () main = do putStrLn "Ok" I get the following error message, which kind of makes sense, but I don't know how to fix it: `[]' is not applied to enough type arguments Expected kind `*', but `[]' has kind `* -> *' In the type `MVar []' In the instance declaration for `Blah (MVar [])'

    Read the article

  • How to catch prompts with PySVN?

    - by Geoff
    I'm new to Python and PySVN in general, and I'm trying to export my SVN repository using pysvn. Here's my code: #set up svn login data def svn_credentials (realm, username, may_save): return True, svn_login_name, svn_login_password, False #establish connection svn_client = pysvn.Client () svn_client.callback_get_login = svn_credentials #export data svn_client.export('server-path-goes-here', 'client-path-goes-here', force=True Which works fine, but if the password is wrong or the user name is unknown, this code just sits. I believe it's being presented with a user login prompt on the SVN side, but I'm at a loss as to how to check whats happening with callback_get_login. Any help would be greatly appreciated.

    Read the article

  • When/why does Internet Explorer block installation of a (signed) ActiveX control?

    - by Geoff
    When the user visits a page that contains a signed ActiveX control that has never been seen before, I'd expect IE to ask the user for permission to install the control. But sometimes IE puts up a security warning instead. For example, consider this site, which has a test control: http://www.pcpitstop.com/testax.asp I'd expect to get this message -- and sometimes, I do: "The website wants to run the following add-on: 'XXX' from 'YYY'. If you trust the the website and the add-on and want to allow it to run, click here..." But under IE8 on XP, I usually get this instead: "To help protect your security, Internet Explorer has restricted this site from showing certain content. Click here for options..." What's going on? Any ideas? Thanks!

    Read the article

  • SharePoint weekly summary alert with calculated columns

    - by Geoff
    I have a SharePoint list that accepts incoming email and has two calculated columns based on the Email Subject. Immediate alerts, RSS etc all work fine but the Weekly Summary Alert has #VALUE! for all the calculated columns. Is there a reason for this? Can I get it to show that actual calculated value?

    Read the article

  • Non distinct Unique ID in MySQL database table.

    - by Geoff
    First of, a simplified version: I am wondering if I can create a trigger to activate during INSERT (it's actually LOAD DATA INFILE) and NOT enter records for an RMA already in my table? I have a table that has no records that are unique. Some may be duplicates but there is one field that I can use to know if the data has been entered or not. For instance RMA Op Days --------------------- 213 Repair 0.10 213 Test 0.20 213 Repair 0.10 So I could do an index on the three columns together but as you see it's possible for an RMA to be in a step for the same amount of time twice so it's possible to have duplicate records. This data comes from a report that I cannot edit and this is all it provides. The key is that an RMA's data is only in the report once so if my database already has that RMA in it's records I want to skip the loading of that RMA's records from the report. By all means please let me know if that didn't make sense, I'll Explain as needed. I'm sure it's not uncommon but I couldn't find anything on the net.

    Read the article

  • problem with sql job and datetime parameter

    - by geoff swartz
    Another developer created a stored procedure that is set up to run as a sql job each month. It takes one parameter of datetime. When I try to invoke it in the job or in just a query window I get an error "Incorrect syntax near ')'" The call to execute it is... exec CreateHeardOfUsRecord getdate() When I give it a hard coded date like exec CreateHeardOfUsRecord '4/1/2010' it works fine. Any idea why I can't use getdate() in this context? Thanks.

    Read the article

  • How to order a HasMany collection by a child property with Fluent NHibernate mapping

    - by Geoff Hardy
    I am using Fluent NHibernate to map the following classes: public abstract class DomainObject { public virtual int Id { get; protected internal set; } } public class Attribute { public virtual string Name { get; set; } } public class AttributeRule { public virtual Attribute Attribute { get; set; } public virtual Station Station { get; set; } public virtual RuleTypeId RuleTypeId { get; set; } } public class Station : DomainObject { public virtual IList<AttributeRule> AttributeRules { get; set; } public Station() { AttributeRules = new List<AttributeRule>(); } } My Fluent NHibernate mappings look like this: public class AttributeMap : ClassMap<Attribute> { public AttributeMap() { Id(o => o.Id); Map(o => o.Name); } } public class AttributeRuleMap : ClassMap<AttributeRule> { public AttributeRuleMap() { Id(o => o.Id); Map(o => o.RuleTypeId); References(o => o.Attribute).Fetch.Join(); References(o => o.Station); } } public class StationMap : ClassMap<Station> { public StationMap() { Id(o => o.Id); HasMany(o => o.AttributeRules).Inverse(); } } I would like to order the AttributeRules list on Station by the Attribute.Name property, but doing the following does not work: HasMany(o => o.AttributeRules).Inverse().OrderBy("Attribute.Name"); I have not found a way to do this yet in the mappings. I could create a IQuery or ICriteria to do this for me, but ideally I would just like to have the AttributeRules list sorted when I ask for it. Any advice on how to do this mapping?

    Read the article

  • how to create a linq query using join and max

    - by geoff swartz
    I have 2 tables in my linq dbml. One is people with a uniqueid called peopleid and the other is a vertical with a foreign key for peopleid and a uniqueid called id. I need to create a type of linq query that does a left outer join on people and gets the latest record in the vertical table based off the max(id) column. Can anyone suggest what this should look like? Thanks.

    Read the article

  • vspace vs. vskip

    - by Geoff
    What is the difference between \vspace{-1em} and \vskip -1em, for example? I guess the first is LaTeX, and the latter is TeX. When is the proper time to use one and not the other, and why?

    Read the article

  • querying databases on same server with linq

    - by geoff swartz
    In normal sql I could do joins on tables in different databases as long as they were on the same server (or linked servers). In linq I can't figure out how to do that. Is this possible? For example, if I have a database called db1 and another called db2. db1 has a table called people and db2 has a table called address I could do something like... select a.addressline1, p.firstname from db1.dbo.people p inner join db2.dbo.address a on p.peopleid = a.peopleid Is this possible with linq? Thanks.

    Read the article

  • Convolve a column vector

    - by Geoff
    This is an OpenCV2 question. I have a matrix: cv::Mat_<Point3f> points; representing some space curve. I want to smooth it (using, for example a Gaussian kernel). I have tried using: cv::Mat_<Point3f> result; cv::GaussianBlur(points, result, cv::Size(4 * sigma, 1), sigma, sigma, cv::BORDER_WRAP); But I get the error: Assertion failed (columnBorderType != BORDER_WRAP)

    Read the article

  • need help with mvc & routes

    - by geoff
    I'm very new to MVC and I'm trying to get a new site set up using it. For SEO reasons we need to make the url of a page something like "Recruiter/4359/John_Smith" or basically {controller}/{id}/{name}. I have that working when I create the url in the code behind like so... //r is a recruiter object that is part of the results for the view r.Summary = searchResult.Summary + "... &lt;a href=\"/Recruiter/" + r.Id + "/" + r.FirstName + "_" + r.LastName + "\"&gt;Read More&lt;/a&gt;" But when I am using the collection of results from a search in my view and iterating through them I am trying to create another link to the same page doing something like <%=Html.ActionLink<RecruiterController>(x => x.Detail((int)r.Id), r.RecruiterName)%> but that doesn't work. When I use that code in the view it gives me a url in the form of /Recruiter/Detail/4359 I was told by a coworker that I should use the Html.ActionLink to create the link in both the view and the controller so that if the route changes in the future it will automatically work. Unfortunately he wasn't sure how to do that in this case. So, my problems are... How can I make the Html.ActionLink work in the view to create a url like I need (like r.Summary above)? How do I use the Html.ActionLink in a controller instead of hardcoding the link like I have above?

    Read the article

  • Using Beyond Compare for Visual Diff in TortoiseHg

    - by geoff
    I am trying to use Beyond Compare for Visual Diff in TortoiseHg. eg Right click on a modified file in explorer and select Visual Diff from TortoiseHg context menu... BeyondCompare opens but only shows the 'welcome' screen and not the file I want to diff. Am I missing something? I have setup the mercurial.ini file as follows: [extensions] extdiff = [extdiff] cmd.bcomp = C:\Program Files (x86)\Beyond Compare 3\BCompare.exe opts.bcomp = /ro [tortoisehg] vdiff = bcomp [merge-tools] bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp bcomp.args = $local $other $base $output bcomp.priority = 1 bcomp.premerge = True bcomp.gui = True [ui] merge = bcomp

    Read the article

  • Whats the python way for recursively setting file permissions?

    - by Geoff
    What's the "python way" to recursively set the owner and group to files in a directory? I could just pass a 'chown -R' command to shell, but I feel like I'm missing something obvious. I'm mucking about with this: import os path = "/tmp/foo" for root, dirs, files in os.walk(path): for momo in dirs: os.chown(momo, 502, 20) This seems to work for setting the directory, but fails when applied to files. I suspect the files are not getting the whole path, so chown fails since it can't find the files. The error is: 'OSError: [Errno 2] No such file or directory: 'foo.html' What am I overlooking here?

    Read the article

  • odd behavior with C# ftp client class

    - by geoff
    I found an ftp client class in c# over a year ago and have been using it in a process that uploads files on a nightly basis. A few days ago we started having a problem where it would time out. I'm not well versed in this so I'm not sure why it's doing this. When the program starts uploading a file it checks to see if it's logged in and if not, it calls the login method. In that method is this block of code. if (this.resultCode != 230) { this.sendCommand("PASS " + password); if (!(this.resultCode == 230 || this.resultCode == 202)) { this.cleanup(); throw new FtpException(this.result.Substring(4)); } } On the line that says this.sendCommand("PASS"... it goes into this code. private void sendCommand(String command) { if (this.verboseDebugging) Debug.WriteLine(command, "FtpClient"); Byte[] cmdBytes = Encoding.ASCII.GetBytes((command + "\r\n").ToCharArray()); clientSocket.Send(cmdBytes, cmdBytes.Length, 0); this.readResponse(); } If I let the program run, it times out. However if I step through it into the sendCommand method it executes fine. Does anyone know why it would work fine when I step through it? Nothing on our end has changed and I've been told nothing on the client's end has changed so I'm stumped. Thanks.

    Read the article

  • hashing password giving different results

    - by geoff
    I am taking over a system that a previous developer wrote. The system has an administrator approve a user account and when they do that the system uses the following method to hash a password and save it to the database. It sends the unhashed password to the user. When the user logs in the system uses the exact same method to hash what the user enters and compares it to the database value. We've run into a couple of times when the database entry doesn't match the user's entry whey they should. So it appears that the method isn't always hashing the value the same. Does anyone know if this method of hashing isn't reliable and how to make it reliable? Thanks. private string HashPassword(string password) { string hashedPassword = string.Empty; // Convert plain text into a byte array. byte[] plainTextBytes = Encoding.UTF8.GetBytes(password); // Allocate array, which will hold plain text and salt. byte[] plainTextWithSaltBytes = new byte[plainTextBytes.Length + SALT.Length]; // Copy plain text bytes into resulting array. for(int i = 0; i < plainTextBytes.Length; i++) plainTextWithSaltBytes[i] = plainTextBytes[i]; // Append salt bytes to the resulting array. for(int i = 0; i < SALT.Length; i++) plainTextWithSaltBytes[plainTextBytes.Length + i] = SALT[i]; // Because we support multiple hashing algorithms, we must define // hash object as a common (abstract) base class. We will specify the // actual hashing algorithm class later during object creation. HashAlgorithm hash = new SHA256Managed(); // Compute hash value of our plain text with appended salt. byte[] hashBytes = hash.ComputeHash(plainTextWithSaltBytes); // Create array which will hold hash and original salt bytes. byte[] hashWithSaltBytes = new byte[hashBytes.Length + SALT.Length]; // Copy hash bytes into resulting array. for(int i = 0; i < hashBytes.Length; i++) hashWithSaltBytes[i] = hashBytes[i]; // Append salt bytes to the result. for(int i = 0; i < SALT.Length; i++) hashWithSaltBytes[hashBytes.Length + i] = SALT[i]; // Convert result into a base64-encoded string. hashedPassword = Convert.ToBase64String(hashWithSaltBytes); return hashedPassword; }

    Read the article

  • need help with xpath expression

    - by geoff swartz
    I have an xml node that looks like <slot highcount="20" lowcount="10" /> I've tried the following xpath expression: XmlNode node = xdoc.SelectSingleNode("slot[@lowcount>=12] && slot[@highcount <=12]"); but I get an invalid token error and I don't have enough experience with this to know what I'm doing wrong. Any ideas?

    Read the article

  • Using module include in OCaml

    - by Geoff
    In OCaml 3.11, I want to "extend" an existing module using the include directive, like so: module MyString = struct include String let trim s = ... end No problem. But now I want to expose this module's type explicitly (i.e. in a .mli file). I want something like this: module MyString : sig include String val trim : string -> string end But the include syntax is not correct because String refers to a module, not a module type (and the compiler does indeed barf). How can I refer to the module type for String here (without having write it out explicitly in a sig expression)? Thanks!

    Read the article

  • Advice: Python Framework Server/Worker Queue management (not Website)

    - by Muppet Geoff
    I am looking for some advice/opinions of which Python Framework to use in an implementation of multiple 'Worker' PCs co-ordinated from a central Queue Manager. For completeness, the 'Worker' PCs will be running Audio Conversion routines (which I do not need advice on, and have standalone code that works). The Audio conversion takes a long time, and I need to co-ordinate an arbitrary number of the 'Workers' from a central location, handing them conversion tasks (such as where to get the source files, or where to ask for the job configuration) with them reporting back some additional info, such as the runtime of the converted audio etc. At present, I have a script that makes a webservice call to get the 'configuration' for a conversion task, based on source files located on the worker already (we manually copy the source files to the worker, and that triggers a conversion routine). I want to change this, so that we can distribute conversion tasks ("Oy you, process this: xxx") based on availability, and in an ideal world, based on pending tasks too. There is a chance that Workers can go offline mid-conversion (but this is not likely). All the workers are Windows based, the co-ordinator can be WIndows or Linux. I have (in my initial searches) come across the following - and I know that some are cross-dependent: Celery (with RabbitMQ) Twisted Django Using a framework, rather than home-brewing, seems to make more sense to me right now. I have a limited timeframe in which to develop this functional extension. An additional consideration would be using a Framework that is compatible with PyQT/PySide so that I can write a simple UI to display Queue status etc. I appreciate that the specifics above are a little vague, and I hope that someone can offer me a pointer or two. Again: I am looking for general advice on which Python framework to investigate further, for developing a Server/Worker 'Queue management' solution, for non-web activities (this is why DJango didn't seem the right fit).

    Read the article

  • Better way to download a binary file?

    - by geoff
    I have a site where a user can download a file. Some files are extremely large (the largest being 323 MB). When I test it to try and download this file I get an out of memory exception. The only way I know to download the file is below. The reason I'm using the code below is because the URL is encoded and I can't let the user link directly to the file. Is there another way to download this file without having to read the whole thing into a byte array? FileStream fs = new FileStream(context.Server.MapPath(url), FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); long numBytes = new FileInfo(context.Server.MapPath(url)).Length; byte[] bytes = br.ReadBytes((int) numBytes); string filename = Path.GetFileName(url); context.Response.Buffer = true; context.Response.Charset = ""; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); context.Response.ContentType = "application/x-rar-compressed"; context.Response.AddHeader("content-disposition", "attachment;filename=" + filename); context.Response.BinaryWrite(bytes); context.Response.Flush(); context.Response.End();

    Read the article

  • Launch an SWF full screen

    - by Geoff
    I have a swf file (a flash game). I want to run some script to open it in full-screen mode. I'm not attached to any browser, but I do run Linux, so a bash, or generic answer is what I'm looking for. I'm also open to building a lite browser application if need-be.

    Read the article

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