Search Results

Search found 3380 results on 136 pages for 'tim b james'.

Page 81/136 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • Maven test failure xml FileNotFoundException

    - by James
    My Maven build is failing on Hudson with a FileNotFoundException, I do not get the same failure through NetBeans. The FileNotFoundException is for some xml files in the same packages as my test classes themselves. It would appear these are not getting copied as part of the build in the same way the class files are. Do I have to add something to my POM for the xml files to be copied? If any more information is required please let me know, I wanted to keep the question short incase it was something simple.

    Read the article

  • In Magento, is it possible to populate your product models from an external API instead of the Magento DB?

    - by James Pelton
    I currently have Magento 1.7 CE installed. I want to use the Magento Product Models, except I want to get the price for the product from an external API (our pricing exists outside of Magento). I know what I could use the Magento API to import all the prices from our existing database, but our pricing changes very often, and we would then need to maintain two databases. Basically I'm wondering if there is something in Magento I can overwrite to call our API instead of the DB?

    Read the article

  • How to Edit a Google Doc

    - by Tim Lytle
    There doesn't seem to be (to my knowledge) an API to edit Google Docs (not spreadsheets, their HTML based documents). Has anyone done something like the? Maybe by downloading the HTML version, editing and uploading the changes?

    Read the article

  • Batch folder of images into grayscale using php

    - by James
    Can anyone spot where I'm going wrong here. It should be creating grayscale copies of images in one folder and saving them in another folder. Could it be to do with the way im referencing the file locations. Folder permissions on both folders are 777 function grayscalecopy($targetfile, $outputfile){ $size = GetImageSize($targetfile); $width = $size[1]; $height = $size[0]; $canvas = imagecreatetruecolor($width, $height); $sourceimage = imagecreatefromjpeg($targetfile); imagefilter($sourceimage, IMG_FILTER_GRAYSCALE); imagecopy($canvas, $sourceimage, 0, 0, 0, 0, $width, $height); imagejpeg($canvas, $outputfile, 95); imagedestroy($sourceimage); imagedestroy($canvas); echo "Converted ".$targetfile." to grayscale as ".$outputfile." ".$width."x".$height."<br/>"; } $serverfiles = glob("artworkimages/thumbs/*.*"); //$numbertocache = count($serverfiles); $numbertocache = 10; for ($i=0; $i<$numbertocache; $i++) { $serverfilesshort=explode("/",$serverfiles[$i]); $serverfilesshort=$serverfilesshort[count($serverfilesshort)-1]; grayscalecopy($serverfiles[$i], "artworkimages/thumbs/grays/".$serverfilesshort); }

    Read the article

  • Facebook Connect Dialog Popup

    - by James
    Hello, When using the "Connect" facebook connect button, when I click it, it opens up a new popup window outside of the current window. This is quite annoying, how am I able to use the inline modal dialog that is found on most sites? I've attached a sample site to see if you can make anything out of it. http://bit.ly/c9Emi Thank you.

    Read the article

  • How do I correctly detect presence of FLTK using SCONS?

    - by James Morris
    I'm trying to build an application I've downloaded which uses the SCONS "make replacement" and the Fast Light Tool Kit Gui. The SConstruct code to detect the presence of fltk is: guienv = Environment(CPPFLAGS = '') guiconf = Configure(guienv) if not guiconf.CheckLibWithHeader('lo', 'lo/lo.h','c'): print 'Did not find liblo for OSC, exiting!' Exit(1) if not guiconf.CheckLibWithHeader('fltk', 'FL/Fl.H','c++'): print 'Did not find FLTK for the gui, exiting!' Exit(1) Unfortunately, on my (Gentoo Linux) system, and many others (Linux distributions) this can be quite troublesome if the package manager allows the simultaneous install of FLTK-1 and FLTK-2. Being Idealistic, I attempted to modify the SConstruct file to use fltk-config --cflags and fltk-config --ldflags (or fltk-config --libs might be better than ldflags) by adding them like so: guienv.Append(CPPPATH = os.popen('fltk-config --cflags').read()) guienv.Append(LIBPATH = os.popen('fltk-config --ldflags').read()) But this causes the test for liblo to fail! Looking in config.log shows how it failed: scons: Configure: Checking for C library lo... gcc -o .sconf_temp/conftest_4.o -c "-I/usr/include/fltk-1.1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT" gcc: no input files scons: Configure: no How should this really be done?

    Read the article

  • What are the alternatives to public fields?

    - by James
    I am programming a game in java, and as the question title suggestions i am using public fields in my classes. (for the time being) From what i have seen public fields are bad and i have some understanding why. (but if someone could clarify why you should not use them, that would be appreciated) The thing is that also from what i have seen, (and it seems logical) is that using private fields, but using getters and setters to access them is also not good as it defeats the point of using private fields in the first place. So, my question is, what are the alternatives? or do i really have to use private fields with getters and setters? For reference here is one of my classes, and some of its methods. I will elaborate more if needs be. //The player's fields. public double health; public String name; public double goldCount; public double maxWeight; public double currentWeight; public double maxBackPckSlts; public double usedBackPckSlts; // The current back pack slots in use public double maxHealth; // Maximum amount of health public ArrayList<String> backPack = new ArrayList<String>(); //This method happens when ever the player dynamically takes damage(i.e. when it is not scripted for the player to take damage. //Parameters will be added to make it dynamic so the player can take any spread of damage. public void beDamaged(double damage) { this.health -= damage; if (this.health < 0) { this.health = 0; } } public void gainHealth(double gainedHp) { this.health += gainedHp; if (this.health > this.maxHealth) { this.health = this.maxHealth; } }

    Read the article

  • What is the best way when creating a Google Widget, to store the data for the Widget to be shared by

    - by Tim McJilton
    I know this may end up getting closed quickly. I could not find this in my searching through APIs. And this is probably a very simple question but here we go... How do you store data on a google application you create in which you and others in a specific group or more specifically the people who can edit a specific calendar, can reach this data? Person A,B,C have read/write access to a calendar, and lets say they want to co-ordinate information. I want this information to not be accessible to modify by all 3 though it is not stored in a calendar? (Though I thought about just creating an event in 1900 and then that fullfills that, but at the same time is a very hack way to do it) I would appreciate any insight you can give me when it comes to data handling in google applications, I am very new to it, but have been looking into it.

    Read the article

  • Is Minus Zero some sort of JavaScript performance trick?

    - by James Wiseman
    Looking in the jQuery core I found the folloiwng code convention: nth: function(elem, i, match){ return match[3] - 0 === i; }, And I was really curious about the snippet match[3] - 0 Hunting around for '-0' on google isn't too productive, and a search for 'minus zero' brings back a reference to a Bob Dylan song. So, can anyone tell me. Is this some sort of performance trick, or is there a reason for doing this rather than a parseInt or parseFloat? Thanks

    Read the article

  • Requirements of an issue/bug tracker

    - by James Brooks
    I've been looking at various issue/bug trackers available on the net. There are some very good ones, but I'm unable to use them as my server does not support Perl/Ruby (for example), I'm not too bothered however because I am able to write code in PHP and as such would prefer something in that language. So I've taken it upon myself to write a custom issue tracker system. As of now it's in early planning stages, and before I continue, I'd like to find out what people need from such an application. My current list of things to add include: Creating/Editing/Deleting issues - both on user and admin level Related issues (similar to that of STO) Admins will be able to create builds/milestones and version control of projects Admins will be able to assign users/groups to a project Roadmap of projects Possible SVN integration with Git? What do you think? There are a couple more things I'd like to add, but I'm sure you'll think of a better way of adding such feature. What would you like to see from an issue tracker?

    Read the article

  • Is It Possible to get a (rough) Mobile Phone Location from a HTTP Request

    - by Tim Lytle
    If memory serves me correctly, google does this for the maps site. I know google's mobile maps app can determine the rough location (I assume using some kind of cell tower lookup), yet I seem to remember the site getting somewhat close to the current location when viewing on a mobile browser. Anyone know how/if that's possible? Does the IP address change based on the tower or area (seems like they'd be using some kind of gateway common to the carrier)?

    Read the article

  • How to label each equation in align environment?

    - by Tim
    Hi, I wonder how to label each equation in align environment? For example \begin{align} \label{eq:lnnonspbb} \lambda_i + \mu_i = 0 \\ \mu_i \xi_i = 0 \\ \lambda_i [y_i( w^T x_i + b) - 1 + \xi_i] = 0 \end{align} only label the first equation and only the first equation can be referred later. Thanks and regards!

    Read the article

  • JSON Twitter List in C#.net

    - by James
    Hi, My code is below. I am not able to extract the 'name' and 'query' lists from the JSON via a DataContracted Class (below) I have spent a long time trying to work this one out, and could really do with some help... My Json string: {"as_of":1266853488,"trends":{"2010-02-22 15:44:48":[{"name":"#nowplaying","query":"#nowplaying"},{"name":"#musicmonday","query":"#musicmonday"},{"name":"#WeGoTogetherLike","query":"#WeGoTogetherLike"},{"name":"#imcurious","query":"#imcurious"},{"name":"#mm","query":"#mm"},{"name":"#HumanoidCityTour","query":"#HumanoidCityTour"},{"name":"#awesomeindianthings","query":"#awesomeindianthings"},{"name":"#officeformac","query":"#officeformac"},{"name":"Justin Bieber","query":"\"Justin Bieber\""},{"name":"National Margarita","query":"\"National Margarita\""}]}} My code: WebClient wc = new WebClient(); wc.Credentials = new NetworkCredential(this.Auth.UserName, this.Auth.Password); string res = wc.DownloadString(new Uri(link)); //the download string gives me the above JSON string - no problems Trends trends = new Trends(); Trends obj = Deserialise<Trends>(res); private T Deserialise<T>(string json) { T obj = Activator.CreateInstance<T>(); using (MemoryStream ms = new MemoryStream(Encoding.Unicode.GetBytes(json))) { DataContractJsonSerializer serialiser = new DataContractJsonSerializer(obj.GetType()); obj = (T)serialiser.ReadObject(ms); ms.Close(); return obj; } } [DataContract] public class Trends { [DataMember(Name = "as_of")] public string AsOf { get; set; } //The As_OF value is returned - But how do I get the //multidimensional array of Names and Queries from the JSON here? }

    Read the article

  • How to test if a gawk string contain a number?

    - by Tim Menzies
    In gawk I know two ways to test if a string contains a number. Which is best? Method one: using regular expressions: function method1(x) { return x ~ /^[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][+-]?[0-9]+)?$/ } Method two: the coercion trick (simpler): function method2(x) { return (x != "") && (x+0 == x) } Is there any reason to favor the more complex method1 over the simpler method2?

    Read the article

  • BinaryWriterWith7BitEncoding & BinaryReaderWith7BitEncoding

    - by Tim
    Mr. Ayende wrote in his latest blog post about an implementation of a queue. In the post he's using two magical files: BinaryWriterWith7BitEncoding & BinaryReaderWith7BitEncoding BinaryWriterWith7BitEncoding can write both int and long? using the following method signatures: void WriteBitEncodedNullableInt64(long? value) & void Write7BitEncodedInt(int value) and BinaryReaderWith7BitEncoding can read the values written using the following method signatures: long? ReadBitEncodedNullableInt64() and int Read7BitEncodedInt() So far I've only managed to find a way to read the 7BitEncodedInt: protected int Read7BitEncodedInt() { int value = 0; int byteval; int shift = 0; while(((byteval = ReadByte()) & 0x80) != 0) { value |= ((byteval & 0x7F) << shift); shift += 7; } return (value | (byteval << shift)); } I'm not too good with byte shifting - does anybody know how to read and write the 7BitEncoded long? and write the int ?

    Read the article

  • Removing an array dimension where the elements sum to zero

    - by James
    Hi, I am assigning a 3D array, which contains some information for a number of different loadcases. Each row in the array defines a particular loadcase (of which there are 3) and I would like to remove the loadcase (i.e. the row) if ALL the elements of the row (in 3D) are equal to zero. The code I have at the moment is: Array = zeros(3,5) % Initialise array Numloadcases = 3; Array(:,:,1) = [10 10 10 10 10; 0 0 0 0 0; 0 0 0 0 0;]; % Expand to a 3D array Array(:,:,2) = [10 10 10 10 10; 0 0 0 0 0; 0 0 0 0 0;]; Array(:,:,3) = [10 10 10 10 10; 0 0 0 0 0; 0 0 20 0 0;]; Array(:,:,4) = [10 10 10 10 10; 0 0 0 0 0; 0 0 20 0 0;]; % I.e. the second row should be removed. for i = 1:Numloadcases if sum(Array(i,:,:)) == 0; Array(i,:,:) = [] end end At the moment, the for loop I have to remove the rows causes an indexing error, as the size of the array changes in the loop. Can anyone see a work around for this? Thanks

    Read the article

  • Make Ant's delete task fail when a directory exists and is not deleted but not when it doesn't exist

    - by Tim Visher
    I have tho following clean function in my build script and I'd like to know how I can improve it. <target name="clean" description="Clean output directories."> <!-- Must not fail on error because it fails if directories don't exist. Is there really no better way to do this? --> <delete includeEmptyDirs="true" failonerror="false"> <fileset dir="${main.build.directory}" /> <fileset dir="dist" /> <fileset dir="${documentation.build.directory}" /> <fileset dir="/build-testing" /> </delete> </target> Specifically regarding my comment, I'm unhappy with the fact that I can't run this on a fresh box because the directory structure hasn't been set up yet by the other targets. We run the build in such a way that it entirely recreates the structures necessary for testing and deployment every time to avoid stale class files and such. With the way that delete currently is set up, a failure to delete a file does not fail the build and I'd like it to. I don't want it to fail the build if the file doesn't exist though. If it doesn't exist then what I'm asking it to do has already happened. Thoughts?

    Read the article

  • How to use pure in D 2.0

    - by James Dean
    While playing around with D 2.0 I found the following problem: Example 1: pure string[] run1() { string[] msg; msg ~= "Test"; msg ~= "this."; return msg; } This compiles and works as expected. When I try to wrap the string array in a class I find I can not get this to work: class TestPure { string[] msg; void addMsg( string s ) { msg ~= s; } }; pure TestPure run2() { TestPure t = new TestPure(); t.addMsg("Test"); t.addMsg("this."); return t; } This code will not compile because the addMsg function is impure. I can not make that function pure since it alters the TestPure object. Am i missing something? Or is this a limitation? The following does compile: pure TestPure run3() { TestPure t = new TestPure(); t.msg ~= "Test"; t.msg ~= "this."; return t; } Would the ~= operator not been implemented as a impure function of the msg array? How come the compiler does not complain about that in the run1 function?

    Read the article

  • A new method of supporting FOSS?

    - by James
    I have been kicking an idea around for sometime and wondered if something of it's nature hadn't already been invented. The premise is a website that integrates code management, project/team management, and micro-transactions. Donations, in and of themselves, are a sporadic, and unreliable method of supporting developers. Furthermore most free software that accepts donations is started by programmers ,be it to learn, because of a hobby, or because they saw a niche that needed to be filled. There is no method in place of of saying "hay, the FOSS community needs this kind of software, will someone develop it, and accept donations!?" Programmers should be programming, not busy begging for money. Basically the idea is people can go to the site in question, and start a project or make a request. Anyone signed up with the site can start a request. Each member account is free to support or "upvote" a project request. Requests and the associated number of votes let programmers in the community know the needs of the community. When a project is started a request for developers can be put forth. Developers have a ranking based on commits to other projects. The project founder can send invites to known Developers, or accept invites from members based on developer ranking. Once the project has at least one team-member, an objectives sheet or "draft" can be put out, listing design, goals, and features. The founding member and each team-member may contribute to this sheet. Each "milestone", or "Feature" is represented by an article. An article is any unit of a draft that can be voted on by The Project Founder, Team-members, and contributors...which brings me to the next half of this idea. --Microtransactions-- People signed up with this hypothetical website can purchase credits which then can be transfered to projects they would like to support. Anyone who transfers credits to a project is known as a contributor to that project. At anytime a Founder, or the lead team-member may submit an article, or a design (multiple articles) for consideration. All team-members, as well as the Founder, can vote once for each article freely. Contributors may vote yes or no on a number of articles (independent of any given meeting where a particular design or article is considered) equal to the number of credits they have placed into a contributors fund for that particular project. A contributors fund is a proxy between a sites credit account, and a projects credit account. It is sort of like a promise to contribute, instead of an actual contribution. Contributers may place constraints on particular articles such that if those constraints (a yes or no vote) are satisfied then a manually specified amount of credits is automatically transfered to the project account. This allows a project to develop based on the needs of those who may (in the future) financially rely on the project. --- Code commits & milestones --- When a team-member makes a commit, they may specify if it's a minor commit, a bug fix, a compatibility patch (i.e. for a new platform), or a milestone (an article voted on previously). People signed up with the website, may download the updated project and test it to see if the programmer's assertion is true about the commit. A report may then be filed on a small form, giving a one or two paragraphs, and a positive or negative confirmation of the programmer's goal for that particular commit. After all milestones for a particular draft are complete, a new draft is submitted for voting. Also funds may withdrawn by each team-member based on the proportion of commits and milestones confirmed (fulfilled the stated purpose) for each programmer. --- voting --- Members, contributor, and non-contributor, may make priority requests for particular articles of a draft. The project founder may or may not opt to fill those requests based on the volume of upvotes. A fulfilled priority request means that any team-member that makes a community-confirmed commit for an article is, when all articles for the draft are fulfilled, granted a portion of project credits in proportion to the average priority of all the articles he committed. ---- Notes --- While this is horribly prone to design-by-committee the one saving grace is that the lead team-member may place constraints on a draft such that some, or ALL articles must be voted yes. Commits may not begin until a draft satisfying said constraints is approved. What does SO think, is this idea feasible? Does anyone see major problems with this? Is there any insights, or improvements that could be made?

    Read the article

  • Convert any currency string to double

    - by James
    I need to store multiple currencies in SQL server. I understand that SQL won't support all different types of currencies (unless I store it as a string, but I don't want to do that). My idea was to convert all the values from their currency format to a standard double and store that instead. Then just re-format based on the culture info when displaying. However, I have tried doing something like e.g. var cultureInfo = new System.Globalization.CultureInfo("en-US"); double plain = return Double.Parse("$20,000.00", cultureInfo); This doesn't ever seem to work it always throws a FormatException. Even removing the currency symbol and just trying to do this based on the number alone does the same thing. This is just an example I want to support pretty much any type of currency. Is there a standard way of stripping out currency and getting the value as a double?

    Read the article

  • How to make IE 9 Standards Mode the default mode?

    - by Evik James
    I have a web site that works perfectly fine in IE9 when compatibility mode is turned OFF (the compatibility symbol is gray). When compatibility mode is turned on (blue), the jQuery doesn't work at all. I have added the following tag to the site to tell the browser that compatibility mode should NOT be used. <meta http-equiv="X-UA-Compatible" content="IE=Edge" > I have the doctype as this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Still, the browser doesn't seem to default to standard mode and the user must manually ensure that they are NOT in compatibility mode. Can I disable IE 9 Compatibility Mode? Have I done what I need to do to disable IE 9 Compatibility Mode? Can the user always override IE 9 Standards Mode?

    Read the article

  • WebBrowser question

    - by James Jeffery
    I have a web page loaded into a WebBrowser object. What I want to do is access the elements on that page to input data. For example, enter username and password and submit the form. How is this possible? Any ideas? Could I use HTMLAgilityPack to access the elements and set their values?

    Read the article

  • Automatic annotation for matlab plot?

    - by Tim
    Hi I have quite a few points plotted in a figure. I am now using annotation() function to add annotation in the same way for these points based on their locations. See my previous question. However they tend to mess up where the points are close to each other. Is there some function available to position the annotations as apart as possible? Thanks and regards!

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >