Search Results

Search found 1642 results on 66 pages for 'dan morgan'.

Page 42/66 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • xsd.exe creating invalid constraints in dataset from xsd file

    - by Dan Neely
    I have a sequence with an allowed minimum length of zero in my xsd. When I try and load an xml file which doesn't have any elements of the sequence into the DataSet that xsd.exe created I get an exception indicating that my file violated one of the DataSet's constraints. The xml file validates against the schema so I know it's valid. Is there anything I can do to make the tool generate a valid dataset? <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="Numbers" type="xs:double"/> </xs:sequence> Edit: if I change my schema to this the generated code works properly. It looks wrong to me though since it appears to be implying that I could have sequence items with nothing in them, which doesn't make any sense. <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="Numbers" type="xs:double" minOccurs="0"/> </xs:sequence>

    Read the article

  • Resharper Warnings with MVVM

    - by Dan Bryant
    As I implement the MVVM pattern with WPF, I'm finding that Resharper is often warning me that certain properties are never used in my ViewModels. The problem is that they are being used, but only by the data binding system. Has anyone else encountered this annoyance and is there a way to help Resharper realize that these properties are, indeed, being used? I am glad, at least, that VS 2010 properly realizes that [Import] tagged members won't "always be null", but hopefully I can fix this issue as well.

    Read the article

  • Unable to control requests for static files on Google App Engine

    - by dan
    My simple GAE app is not redirecting to the /static directory for requests when url is multiple levels. Dir structure: /app/static/css/main.css App: I have two handlers one for /app and one for /app/new app.yaml: handlers: - url: /static static_dir: static - url: /app/static/(.*) static_dir: static\1 - url: /app/.* script: app.py login: required HTML: Description: When page is loaded from /app HTTP request for main.css is successful GET /static/css/main.css But when page is loaded from /app/new I see the following request: GET /app/static/css/main.cs That's when I tried adding the /app/static/(.*) in the app.yaml but it is not having any effect.

    Read the article

  • Delphi: Problems with TList of Frames

    - by Dan Kelly
    I'm having a problem with an interface that consists of a number of frames (normally 25) within a TScrollBox. There are 2 problems, and I am hoping that one is a consequence of the other... Background: When the application starts up, I create 25 frames, each containing approx. 20 controls, which are then populated with the default information. The user can then click on a control to limit the search to a subset of information at which point I free and recreate my frames (as the search may return < 25 records) The problem: If I quit the application after the initial search then it takes approx. 5 seconds to return to Delphi. After the 2nd search (and dispose / recreate of frames) it takes approx. 20 seconds) Whilst I could rewrite the application to only create the frames once, I would like to understand what is going on. Here is my create routine: procedure TMF.CreateFrame(i: Integer; var FrameBottom: Integer); var NewFrame: TSF; begin NewFrame := TSF.Create(Self); NewFrame.Name := 'SF' + IntToStr(i); if i = 0 then NewSF.Top := 8 else NewSF.Top := FrameBottom + 8; FrameBottom := NewFrame.Top + NewFrame.Height; NewFrame.Parent := ScrollBox1; FrameList.Add(NewFrame); end; And here is my delete routine: procedure TMF.ClearFrames; var i: Integer; SF: TSF; begin for i := 0 to MF.FrameList.Count -1 do begin SF := FrameList[i]; SF.Free; end; FrameList.Clear; end; What am I missing?

    Read the article

  • Why doesn't this UIButton show its text label?

    - by Dan Ray
    Everything about this UIButton renders great except the text that's supposed to be on it. NSLog demonstrates that the text is in the right place. What gives? UIButton *newTagButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [newTagButton addTarget:self action:@selector(showNewTagField) forControlEvents:UIControlEventTouchUpInside]; newTagButton.titleLabel.text = @"+ New Tag"; NSLog(@"Just set button label to %@", newTagButton.titleLabel.text); newTagButton.titleLabel.font = [UIFont systemFontOfSize:17]; newTagButton.titleLabel.textColor = [UIColor redColor]; CGSize addtextsize = [newTagButton.titleLabel.text sizeWithFont:[UIFont systemFontOfSize:17]]; CGSize buttonsize = { (addtextsize.width + 20), (addtextsize.height * 1.2) }; newTagButton.frame = CGRectMake(x, y, buttonsize.width, buttonsize.height); [self.mainView addSubview:newTagButton];

    Read the article

  • PHP image resize and rounded image corners dynamically

    - by Dan
    I'm working of a script that dynamically ads rounded edges to an image then crops it down to a certain size. At the moment the script ads the rounded edges to the picture but i cannot get it so the original image is resized to fit within the dimensons of the final outputted image (140px x 120px) The problem is that the orginal uploaded image depending on it's orginal dimensions change the size it is in the final PNG { $image_file = $_FILES['image']['tmp_name']; $corner_radius = isset($_GET['radius']) ? $_GET['radius'] : 20; // The default corner radius is set to 20px $topleft = (isset($_GET['topleft']) and $_GET['topleft'] == "no") ? false : true; // Top-left rounded corner is shown by default $bottomleft = (isset($_GET['bottomleft']) and $_GET['bottomleft'] == "no") ? false : true; // Bottom-left rounded corner is shown by default $bottomright = (isset($_GET['bottomright']) and $_GET['bottomright'] == "no") ? false : true; // Bottom-right rounded corner is shown by default $topright = (isset($_GET['topright']) and $_GET['topright'] == "no") ? false : true; // Top-right rounded corner is shown by default $imagetype=$_FILES['image']['type']; $endsize=$corner_radius; $startsize=$endsize*3-1; $arcsize=$startsize*2+1; if (($imagetype=='image/jpeg') or ($imagetype=='jpg')) { $image = imagecreatefromjpeg($image_file); } else { if (($imagetype=='GIF') or ($imagetype=='gif')) { $image = imagecreatefromgif($image_file); } else { $image = imagecreatefrompng($image_file); } } $forecolor ='#ffffff'; $size = getimagesize($image_file); // Top-left corner $background = imagecreatetruecolor($size[0],$size[1]); imagecopymerge($background, $image, 0, 0, 0, 0, $size[0], $size[1], 100); $startx=$size[0]*2-1; $starty=$size[1]*2-1; $im_temp = imagecreatetruecolor($startx,$starty); imagecopyresampled($im_temp, $background, 0, 0, 0, 0, $startx, $starty, $size[0], $size[1]); $bg = imagecolorallocate($im_temp, 255,255,255); $fg = imagecolorallocate($im_temp, 255,255,255); if ($topleft == true) { if(!imagearc($im_temp, $startsize, $startsize, $arcsize, $arcsize, 180,270,$bg))echo "nope"; imagefilltoborder($im_temp,0,0,$bg,$bg); } // Bottom-left corner // Top-right corner if ($topright == true) { imagearc($im_temp, $startx-$startsize, $startsize,$arcsize, $arcsize, 270,360,$bg); imagefilltoborder($im_temp,$startx,0,$bg,$bg); } $image = imagecreatetruecolor(140,120); imagecopyresampled($image, $im_temp, 0, 0, 0, 0, $size[0],$size[1],$starty+1310,$startx+1500); // Output final image if(!imagepng($image,'hello.png')) echo "boo"; if(!imagedestroy($image)) echo "2"; if(!imagedestroy($background)) echo "3"; if(!imagedestroy($im_temp)) echo "4"; } EDIT: My question is how to get the orginal image reized so it fits into the 140 x 120 image that is processed with the rounded edges?

    Read the article

  • LINQ to SQL - How to efficiently do either an AND or an OR search for multiple criteria

    - by Dan Diplo
    I have an ASP.NET MVC site (which uses Linq To Sql for the ORM) and a situation where a client wants a search facility against a bespoke database whereby they can choose to either do an 'AND' search (all criteria match) or an 'OR' search (any criteria match). The query is quite complex and long and I want to know if there is a simple way I can make it do both without having to have create and maintain two different versions of the query. For instance, the current 'AND' search looks something like this (but this is a much simplified version): private IQueryable<SampleListDto> GetSampleSearchQuery(SamplesCriteria criteria) { var results = from r in Table where (r.Id == criteria.SampleId) && (r.Status.SampleStatusId == criteria.SampleStatusId) && (r.Job.JobNumber.StartsWith(criteria.JobNumber)) && (r.Description.Contains(criteria.Description)) select r; } I could copy this and replace the && with || operators to get the 'OR' version, but feel there must be a better way of achieving this. Does anybody have any suggestions how this can be achieved in an efficient and flexible way that is easy to maintain? Thanks.

    Read the article

  • How can I access IEnumerable<T> extension methods on my custom subclass of BindingList<T>?

    - by Dan
    I have a custom subclass of BindingList<T> that I want to execute a LINQ query over using the handy extension methods. For example: public int GetSum(MyList<T> list) { return list.Sum(x => x.Value); } But the compiler complains that it can't resolve Sum because it doesn't recognize list as an IEnumerable<T>, which it obviously is, because this works: public int GetSum(MyList<T> list) { return ((IEnumerable<T>)list).Sum(x => x.Value); } Anyone have a clever way I can avoid the ugly and unecessary cast?

    Read the article

  • Simple 2 column CSS layout with nested divs

    - by Dan
    Hello, I have good familiarity with CSS but for some reason I am unable to achieve the result I want in this case. Here is the link to my test site http://danberinger.com/test.html Keep in mind that I want a 2 column layout and that the background wrapper color (gray) is not showing. Instead the body background color image is being put in place of where the wrapper background should be. Any suggestions would be greatly appreciated.

    Read the article

  • Resources for finding Haskell jobs?

    - by Dan
    Where is a good place to go to find a job where I can (frequently) use Haskell? Just to be clear, I am not asking: What's the Haskell market like? Why is Haskell used so little in the industry? What is Haskell actually useful for? Nor am I asking you to tell me that Haskell jobs can't be found. That is the default conclusion if no good responses show up here. I am asking, for the 2 or 3 Haskell jobs that are out there, how can I find them?

    Read the article

  • Linking Libraries in Xcode

    - by Dan
    Hey all, I'm using a powerbook (osx 10.5) and recently downloaded and installed FFTW 3.2 (link text). I've been able to compile and run some simple programs based on the online tutorial using the terminal: g++ main.cpp -lfftw3 -lm however, I can't get the same program to compile in Xcode. I get a linking error, "symbol(s) not found". There is a file called libfftw3.a in /usr/local/lib. How can this be linked? Furthermore, apparently the libraries have to be linked in a particular order, i.e. see: link text thanks for any help

    Read the article

  • Oracle - Updating one column or another based on a condition

    - by z-dan
    I want to update a record in a table but based on a condition I will either update one column or another but I do not want to have 2 separate statements because the statements are very long and detailed. Here is the basic idea with over simplification to get to the point. PROCEDURE Animal_something(p_updater VARCHAR2) begin if p_updater = 'person' then -- I want to update the modified_by else -- if p_updater = 'a process' I want to update modified_by_process Update table_creatures set animal_type = 'Dog , **modified_by** = 'Bob' **or do this** **modified_by_process =** 'creature_package' where animal_legs = '4' I don't want: if p_updater = 'person' then Update table_creatures set animal_type = 'Dog , modified_by = 'Bob' where animal_legs = '4'; else Update table_creatures set animal_type = 'Dog , modified_by_process = 'creature_package' where animal_legs = '4'; end;

    Read the article

  • Why does this extension method throw a NullReferenceException in VB.NET?

    - by Dan
    From previous experience I had been under the impression that it's perfectly legal (though perhaps not advisable) to call extension methods on a null instance. So in C#, this code compiles and runs: // code in static class static bool IsNull(this object obj) { return obj == null; } // code elsewhere object x = null; bool exists = !x.IsNull(); However, I was just putting together a little suite of example code for the other members of my development team (we just upgraded to .NET 3.5 and I've been assigned the task of getting the team up to speed on some of the new features available to us), and I wrote what I thought was the VB.NET equivalent of the above code, only to discover that it actually throws a NullReferenceException. The code I wrote was this: ' code in module ' <Extension()> _ Function IsNull(ByVal obj As Object) As Boolean Return obj Is Nothing End Function ' code elsewhere ' Dim exampleObject As Object = Nothing Dim exists As Boolean = Not exampleObject.IsNull() The debugger stops right there, as if I'd called an instance method. Am I doing something wrong (e.g., is there some subtle difference in the way I defined the extension method between C# and VB.NET)? Is it actually not legal to call an extension method on a null instance in VB.NET, though it's legal in C#? (I would have thought this was a .NET thing as opposed to a language-specific thing, but perhaps I was wrong.) Can anybody explain this one to me?

    Read the article

  • Starting company and getting a good deal

    - by Dan
    Hi, I'm having the possibility to start a small company with someone else. I'm a software programmer and been working on a field where there isn't much competition, at least in the platform I'm developing, which is the one with highest market share. This other person comes from marketing so he would find / provide clients and be in charge of the business side. So initially it would be me, the tech guy with the knowledge to develop our product and products based on my development, and this person who would become CEO (basically a 50/50 share). The idea is getting a product on our own, but also perform projects for others in order to get some cash. The problem is that his idea is doing this without initial capital. He tells me that he could get some customers from past business (which is mostly true as he has been in the business for some time) and then with the money obtained from such development, we could hire some freelance developers and build our own platform. I've already discussed with him that I don't find this the best way, provided that we need to compete against other companies some of who are VC funded and have many developers working fulltime. But most of all, I'm thinking of whether this is a fair deal to do, provided that this person is not providing anything other than clients, and I'd be the one having to do the work and dedicate time, thus also taking most of the risks. In all fairness, I'd expect him to put some initial capital, given that initially I'm putting some of my code which in some way is money given the time I've dedicated to it. So the question here is, does this seem fair to you? Is this the way it is usually done? My only concern here is that I don't have previous experience with such deals, and I ignore whether this is the usual thing to do in other cases. Certainly having a marketing person helps a lot. As you probably know being a programmer doesn't make me the most indicated person for marketing ;-) but at the same time I'm not sure if this could be a good deal or I'd just be making a pretty inconvenient deal. Hope I made my point clear, but feel free to let me know if more details are needed. Thanks in advance

    Read the article

  • Eclipse jvm.dll error when loading

    - by Dan James Palmer
    Trying to open Eclipse after a couple of months and get this error: So I checked that folder to see if it existed, and it did: I checked my PATH Was correct and it was also correct: When this error first occurred I had 3 Java installations. JRE 7 Update 10, JDK 7 Update 7 32bit and 64 bit. I uninstall ALL and restarted my machine. Eclipse then stated, as expected that I needed a JRE or a JDK. So I downloaded and installed the latest JDK and now I get this error, despite everything appearing to be correct. Any ideas?

    Read the article

  • How can I specify my own Rhino context in Java?

    - by Dan Howard
    I'm trying to ensure that my Rhino scripts (running under Java 6) are strict so that if a script developer misspells an expression I want an exception to be thrown. Currently what happens is the expression simply evaluates to "undefined". Now according to Mozilla org https://developer.mozilla.org/en/New_in_Rhino_1.6R6 there are features to enable strict checking in the context. I cannot find a working example of this. What I did so far was write a class to extend ContextFactory and then override the hasFeature method. public class ScriptContextFactory extends ContextFactory { protected boolean hasFeature(Context context, int featureIndex) { switch (featureIndex) { case Context.FEATURE_STRICT_EVAL: return true; case Context.FEATURE_STRICT_VARS: return true; } return super.hasFeature(context, featureIndex); } } Then in the Main I set mine to the default. ContextFactory.initGlobal(new ScriptContextFactory()); and I get an illegal state exception. :( Any ideas or samples on how this works? TIA

    Read the article

  • Is there a cleaner way to Bind property to owner's DataContext?

    - by Dan Bryant
    I have some code that looks like this: <Expander Header="{Binding SelectedSlot.Name}" Visibility="{Binding ShowGroupSlot, Converter={StaticResource BooleanToVisibility}}"> <Controls:GroupPrototypeSlotControl Slot="{Binding DataContext.SelectedSlot, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}}" /> </Expander> This works, but the ugliness of the Slot Binding bothers me. This is required because the GroupPrototypeSlotControl has a GroupPrototypeViewModel as its DataContext. If I simply use {Binding SelectedSlot}, it attempts to resolve it on the 'child' ViewModel, which fails. I get around this by explicitly looking at the DataContext of my parent control. Is there a cleaner way to do this type of binding?

    Read the article

  • C# Breakpoint Weirdness

    - by Dan
    In my program I've got two data files A and B. The data in A is static and the data in B refers back to the data in A. In order to make sure the data in B is invalidated when A is changed, I keep an identifier for each of the links which is a long byte-string identifying the data. I get this string using BitConverter on some of the important properties. My problem is that this scheme isn't working. I save the identifiers initially, and with I reload (with the exact same data in A) the identifiers don't match anymore. It seems the bit converter gives different results when I go to save. The really weird thing about it is, if I place a breakpoint in the save code, I can see the identifier it's writing to the file is fine, and the next load works. If I don't place a breakpoint and say print the identifiers to console instead, they're totally different. It's like when my program is running at full-speed the CPU messes up some instructions. This isn't the first time something like this happens to me. I've seen it in other projects. What gives? Has anyone every experienced this kind of debugging weirdness? I can't explain how stopping the program and not stopping it can change the output. Also, it's not a hardware problem because this happens on my laptop as well.

    Read the article

  • How do I get a right outer join in L2E?

    - by Dan
    I have two tables that I set up through the VS Entity Data Model Diagram tool. I'm trying to do a right outer join and it doesn't return results from the 2nd table. I have set up a 0..1 to MANY relationship from the diagram tool. When I run a Linq-To-Entities query, it still defaults to an INNER JOIN. From my understanding of entities, if I set up the relationship using VS, when I join the tables, it should automagically figure out the join syntax based on the relationship I supply. It doesn't seem to be doing that. I am using EF v1 (not Linq-to-Sql). Query I'm running: from s in SomeTable join t in SomeOtherTable on s.ID equals t.ID select new { s.MyFieldName, t.MyOtherFieldName }

    Read the article

  • Integrating YUI tests with CruiseControl

    - by Dan R
    I am using YUI to test my JavaScript app, and want to integrate the test results into my CruiseControl build system. How can I use CruiseControl to run the tests? I initially thought about using the JUnit plugin to drive the tests, but that is a no go. Does anyone else have this working? (Please note: Changing either YUI or CruiseControl isn't an option for me.)

    Read the article

  • How to jQuery plugin effects to items created later in the DOM

    - by Dan Denney
    How do I apply jQuery plugin effects to items that are created by an event? So, what I am attempting to do is have all uls throughout a site use the jquery.scroll.js plugin for styling. I currently have it working on all active uls. However, there are some category/subcategory sections. I am still new to writing any jQuery on my own and there is a leap in logic that I don't understand on applying plugins to items when they are loaded later. In the real example, users click a category from a ul and a sub category is loaded via Rails and JSON. For a light sample, I made a jsfiddle that simulates the issue that I run into. The category ul is styled correctly, but the subcategory ul doesn't pick up the styling. I'm hoping for some assistance not just in whipping up some code to fix it, but in pointing me in the direction of what I need to learn for this functionality. http://jsfiddle.net/dandenney/25R8F/1/ Thank you in advance!

    Read the article

  • How do I get the WVGA Android browser to stop scaling my images?

    - by Dan Fabulich
    I'm designing an HTML page for display in Android browsers. Consider this simple example page: <html> <head><title>Simple!</title> </head> <body> <p><img src="http://sstatic.net/so/img/logo.png"></p> </body> </html> It looks just fine on the standard HVGA phones (320x480), but on HDPI WVGA sizes (480x800 or 480x854) the built-in browser automatically scales the image up; it looks ugly. I've read that I should be able to use this tag to force the browser to stop scaling my page: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" /> ... but all that does is disable user scaling (the zoom buttons disappear); it doesn't actually prevent the browser from scaling my image. Adjusting the scale factors (setting them all to 2.0 or 0.5) has no effect at all. How can I force the WVGA browser to stop scaling my images?

    Read the article

  • Best language for scripting large scale file management

    - by Dan
    The National Park Service's Natural Sounds Program collects multiple terabytes of data each year measuring soundscapes. In your opinion, what is best available scripting language to manage massive amounts of files and file types? We would like to easily design and run efficient user-friendly scripts to search for and retrieve/create copies of files that may be located in different directories according a single static hierarchy. The OS will most likely be windows. Thanks!

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >