Search Results

Search found 969 results on 39 pages for 'george stocker'.

Page 20/39 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Autofac / MVC4 / WebApi (RC) Dependency Injection issue after upgrading from beta

    - by George D.
    var resolver = new AutofacWebApiDependencyResolver(container); configuration.ServiceResolver.SetResolver(resolver); after updating to ASP.NET MVC4 (RC) I get the following error: 'System.Web.Http.HttpConfiguration' does not contain a definition for 'ServiceResolver' and no extension method 'ServiceResolver' accepting a first argument of type 'System.Web.Http.HttpConfiguration' could be found (are you missing a using directive or an assembly reference?) I realize after reading this (http://www.asp.net/web-api/overview/extensibility/using-the-web-api-dependency-resolver) that these interfaces have changed, but I am not sure how to apply this change to how I use Autofac. Do i need to wait for a new release from Autofac or is there another way I can get past this.

    Read the article

  • Cinema4D XML scene not rendering texture

    - by George Profenza
    I was playing with the Cinema 4D command line options and ran into a problem that might not be specific to the command line options. I saved a basic scene(a textured cube) in two formats: the original .c4d(binary) format and .xml(Cinema 4D XML via File Export). the .c4d file renders with the texture applied, while the .xml file renders without the texture applied. I had a look at the xml file, and there is a node that holds a reference to the image used as texture, and there is another node which seems to store the pixels in xml. When I opened the .xml document in Cinema 4D, the document did store the material with the texture, but it was not applied to the object. Am I missing something when I export to XML ? How can I export a Cinema 4D XML that can render with the texture applied ?

    Read the article

  • Best way to translate from IDictionary to a generic IDictionary

    - by George Mauer
    I've got an IDictionary field that I would like to expose via a property of type IDictionary<string, dynamic> the conversion is surprisingly difficult since I have no idea what I can .Cast<>() the IDictionary to. Best I've got: IDictionary properties; protected virtual IDictionary<string, dynamic> Properties { get { return _properties.Keys.Cast<string>() .ToDictionary(name=>name, name=> _properties[name] as dynamic); } }

    Read the article

  • response.Text is undefined when returning variable

    - by George
    Not sure if the problem is related to Ajax or something silly about JavaScript that I'm overlooking in general, but I have the following script where fox.html is just plain text that reads, "The quick brown fox jumped over the lazy dog." : function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","fox.html",true); xmlhttp.send(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { fox = xmlhttp.responseText; alert(fox); } } } onload = loadXMLDoc; The above script alerts the contents of fox.html onload just fine. However if I change the script so that: { fox = xmlhttp.responseText; alert(fox); } becomes: { fox = xmlhttp.responseText; return fox; } and alert(loadXMLDoc()); onload I get 'undefined'. I'm wondering why this is so.

    Read the article

  • Copy one jagged array ontop of another.

    - by George Johnston
    How could I accomplish copying one jagged array to another? For instance, I have a 5x7 array of: 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0 and a 4x3 array of: 0,1,1,0 1,1,1,1 0,1,1,0 I would like to be able to specify a specific start point such as (1,1) on my all zero array, and copy my second array ontop of it so I would have a result such as: 0, 0, 0, 0, 0, 0, 0 0, 0, 1, 1, 0, 0, 0 0, 1, 1, 1, 1, 0, 0 0, 0, 1, 1, 0, 0, 0 0, 0, 0, 0, 0, 0, 0 What would be the best way to do this?

    Read the article

  • MVVM-Light EventToCommand Behavior for CheckBox Checked/Unchecked in Silverlight

    - by George Durzi
    I would like to handle the Checked and Unchecked events of a Checkbox control and execute a command in my ViewModel. I wired up an EventTrigger for both the Checked and Unchecked events as follows: <CheckBox x:Name="chkIsExtendedHr" IsChecked="{Binding Schedule.Is24Hour, Mode=TwoWay}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Checked"> <GalaSoft_MvvmLight_Command:EventToCommand CommandParameter="{Binding IsChecked, ElementName=chkIsExtendedHr}" Command="{Binding Path=SetCloseTime, Mode=OneWay}" /> </i:EventTrigger> <i:EventTrigger EventName="Unchecked"> <GalaSoft_MvvmLight_Command:EventToCommand CommandParameter="{Binding IsChecked, ElementName=chkIsExtendedHr}" Command="{Binding Path=SetCloseTime, Mode=OneWay}" /> </i:EventTrigger> </i:Interaction.Triggers> </CheckBox> I defined a RelayCommand in my ViewModel and wired up an action for it: public RelayCommand<Boolean> SetCloseTime{ get; private set; } ... SetCloseTime= new RelayCommand<bool>(ExecuteSetCloseTime); The parameter in the action for the command always resolves to the previous state of the CheckBox, e.g. false when the CheckBox is checked, and true when the CheckBox is unchecked. void ExecuteSetCloseTime(bool isChecked) { if (isChecked) { // do something } } Is this expected behavior? I have a workaround where I have separate triggers (and commands) for the Checked and Unchecked and use a RelayCommand instead of RelayCommand<bool>. Each command executes correctly when the CheckBox is checked and unchecked. Feels a little dirty though - even dirtier than having UI code in my ViewModel :) Thanks

    Read the article

  • Does this PHP function protect against SQL injection?

    - by George Edison
    I have this function I'm using and I want to be sure that it fully protects against SQL injection attacks: function MakeSafeForQuery($string) { // replace all of the quote // chars by their escape sequence $ret = str_replace("\\","\\\\",$string); $ret = str_replace("'","\\'",$ret); $ret = str_replace("\"","\\\"",$ret); return $ret; } Am I missing anything serious?

    Read the article

  • NerdDinner difficulties

    - by George
    Hello guys, I'm having a problem with the Create method of the NerdDinner tutorial, which is very good BTW. As you can see here http://nerddinnerbook.s3.amazonaws.com/Part5.htm in the Create method, he removed the ID field of the aspx page. I did that too, but I cannot add any dinners because I get a primary key violation. How is NerdDinner controlling the ids of each dinner? I revised the tutorial and could not see any references to identity fields on SQL database. I even created a method to get me the highest id in the table: public int GetHighestDinnerId() { int resultado = (from dinner in dataContext.Dinners select dinner.DinnerId).Max(); return resultado; } which does not work either. Any thoughts? Thank you

    Read the article

  • Changing the style of a Combo-Box in WPF (in Blend preferably)

    - by George Sealy
    I'm having some issues trying to change the look / style of a combo box in Expression Blend / WPF. While there are tutorials out there describing setting styles for buttons, there seem to be a few wrinkles with ComboBox controls. Can anyone offer any advice, or point me towards good tutorials that cover re-styling something more complex than a button?

    Read the article

  • how to subtract circle from an arbitrary polygon

    - by George
    Given an arbitary polygon with vertices stored in either clockwise/counterclockwise fashion (depicted as a black rectangle in the diagram), I need to be able to subtract an arbitrary number of circles (in red on the diagram) from that polygon. Removing a circle could possibly split the polygon into two seperate polygons (as depicted by the second line in the diagram). I'm not sure where to start. http://www.freeimagehosting.net/image.php?89a0276d9d.jpg

    Read the article

  • Glassfish v3 logging

    - by George Liolios
    How to in Glassfish v3 can use stdout and stderr in Primary Key class the glassfish server log ($GF_HOME/domains/domain1/logs/server.log).Is there a setting that has to be turned or do applications now have to support their own logging?

    Read the article

  • iPhone: UIImageView not showing images

    - by George
    Hello, I've got UIImageView drawn in my nib-file and it's connected to a imageView iboutlet. I can load single pictures which will show up very nicely, but when it comes to drawing many images separately as like an animation, images won't show. I've got drawImage() function which takes NSData-objects(image data) and draws it to a screen(imageView). Main function has got for loop which loops 300 times as quickly as it can and each time it calls that drawImage function and passes different image data to it. Sometimes when I execute this code, last picture from that "animation" shows up, sometimes not at all. Maybe I need to schedule enough time for imageView so that the image can be shown? Hope someone has some clues. Thanks in advance!

    Read the article

  • Starting with NHibernate

    - by George
    I'm having major difficulties to start off with NHiberante. Main problems: Where my hbm.xml files should reside? I create a Mappings folder but I received an error "Could not find xxx.hbm.xml file." I tried to load the specific class through the dialect cf.AddClass(typeof(xxx)); but it still gives me the same error (the files are marked as embebed resources. Also I'm having major problems in connection to it. I stopped trying to use the cfg xml file and tried a more direct approach with a library I have here. Configuration cfg = new Configuration(); cfg.AddClass(typeof(Tag)); ISessionFactory sessions = cfg.BuildSessionFactory(); AgnosticConnectionHandler agch = new AgnosticConnectionHandler("xxx","xxx","geo_biblio","localhost", 5432,DatabaseInstance.PostgreSQL); ISession sessao = sessions.OpenSession(agch.GetConnection); ITransaction tx = sessao.BeginTransaction(); Tag tag1 = new Tag(); tag1.NomeTag = "Teste Tag NHibernate!!!"; sessao.Save(tag1); tx.Commit(); sessao.Close(); Any tips for me? I'm getting the exception in line 2 of this code, and still not sure what to do. Any help is appreciated. Thanks

    Read the article

  • Copy EXIF Metadata from TIF to JPEG in C# / VB.NET

    - by George
    Hello! I would really appreciate if you could shed light on this problem. I have 2 images, one was created from TIF file with metadata, the other is an in-memory image that will be saved as jpeg. Then I use this routine to transfer exif metadata from first image to the second one (that is from the one created from tif file to the in-memory image): For Each _p In image1.PropertyItems image2.SetPropertyItem(_p) Next And this works perfectly fine. All exif items are successfully copied. I confirmed this by using watches in debug mode. The problem comes when you save image2 as jpeg using this: Dim eps As EncoderParameters = New EncoderParameters(1) eps.Param(0) = New EncoderParameter(Encoder.Quality, 85) Dim ici As ImageCodecInfo = GetEncoderInfo("image/jpeg") image2.Save("C:\1.jpg", ici, eps) Only very few EXIF properties are saved with image2 jpeg file however, namely only camera model and camera maker. However If I save image2 as TIF, all properties from the original tif will be there. Can anyone explain why is that? Thanks.

    Read the article

  • How to write JavaScript to a separate window?

    - by George Edison
    I have opened a new window with JavaScript: var newwin = window.open('','preview','width=600,height=500'); Now I want to write some JavaScript to the window: newwin.document.write("<script type='text/javascript'>alert('Hi!');<" + "/script>"); newwin.document.close(); However, the script never gets executed. Am I doing something wrong?

    Read the article

  • How come this image won't resize to fit the sprite?

    - by George Edison
    I have this snippet of ActionScript code that is supposed to resize an image to fit the sprite: package { import flash.display.Sprite; import flash.display.Bitmap; import flash.events.Event; public class Main extends Sprite { [Embed(source = 'img.png')] private var TheImage:Class; public static const TheImageWidth:Number = 1300; public static const TheImageHeight:Number = 1300; public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point var image:Bitmap = new TheImage(); addChild(image); image.scaleX = width / TheImageWidth; image.scaleY = height / TheImageHeight; } } } Why isn't it working?

    Read the article

  • jQuery ajax not preloading images

    - by George Wiscombe
    I have a list of galleries, when you click on the title of a gallery it pulls in the contents (HTML with images). When the content is pulled in it preloads the html but not the images, any ideas? This is the JavaScript i'm using: $('#ajax-load').ajaxStart(function() { $(this).show(); }).ajaxStop(function() { $(this).hide();}); // PORTFOLIO SECTION // Hide project details on load $('.project > .details').hide(); // Slide details up / down on click $('.ajax > .header').click(function () { if ($(this).siblings(".details").is(":hidden")) { var detailUrl = $(this).find("a").attr("href"); var $details = $(this).siblings(".details"); $.ajax({ url: detailUrl, data: "", type: "GET", success: function(data) { $details.empty(); $details.html(data); $details.find("ul.project-nav").tabs($details.find(".pane"), {effect: 'fade'}); $details.slideDown("slow"); }}); } else {$(this).siblings(".details").slideUp();} return false; }); You can see this demonstrated at http://www.georgewiscombe.com Thanks in advance!

    Read the article

  • How to get QWebKit to display image?

    - by George Edison
    Okay, I have a Qt executable in the same directory as a file logo.png. I call the following: QString msg("<html><body><img src='logo.png' /></body></html>"); webView->setHtml(msg); where webview is the QWebKit pointer However, when I execute the program, the image does not display. I am executing the program from the directory that the image is in... why won't it display?

    Read the article

  • Ajax UpdatePanels SetFocus issue

    - by George
    I set the AutoPostback property of a textbox to True so I can process the TextChanged event on the server and, based on what they typed in the textbox, appropriately display a message in an update panel. The problem is, when the partial screen refresh is performed, no control on the screen has focus. 99% of the time, when the text in the textbox is changed, it is because the user has tabbed forward, and so, to limit the disruption in the lost of focus, I perform a "Focus" call on teh next control in the tab sequence. For the most part, this works OK, but of course, is disputive if the user is tabbing in the reverse order or has used the mouse to set the focus to another control. In these situations, the focus would be set to the next control even though the user was trying to set focus elsewhere. OK, that sucks. Now what I consider the bigger problem with calling the focus method on the server: In IE, it works OK, but in Mozilla Firefox and Chrome, setting the focus causes a repositioning of the scroll bar, even though none is necessary because the control is already in view. I realize that I could switch to doing AJAX web service calls, but these darn Updae Panels are so convenient if used in moderation. is there anyway to use updatepanels and not have these focus/scroll issues?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >