Search Results

Search found 61 results on 3 pages for 'micah burnett'.

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

  • .NET WebAPI Serialization k_BackingField Nastiness

    - by Micah
    When i serialize the following: [Serializable] public class Error { public string Status { get; set; } public string Message { get; set; } public string ErrorReferenceCode { get; set; } public List<FriendlyError> Errors { get; set; } } I get this disgusting mess: <ErrorRootOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Printmee.Api"> <_x003C_Errors_x003E_k__BackingField> An exception has occurred. Please contact printmee support </_x003C_Errors_x003E_k__BackingField> <_x003C_LookupCode_x003E_k__BackingField>988232ec-6bc9-48f3-8116-7ff7c71302dd</_x003C_LookupCode_x003E_k__BackingField> </ErrorRootOfstring> What gives? How can i make this pretty? JSON responses also contain the k_BackingField

    Read the article

  • IQueryable<T> Extension Method not working

    - by Micah
    How can i make an extension method that will work like this public static class Extensions<T> { public static IQueryable<T> Sort(this IQueryable<T> query, string sortField, SortDirection direction) { // System.Type dataSourceType = query.GetType(); //System.Type dataItemType = typeof(object); //if (dataSourceType.HasElementType) //{ // dataItemType = dataSourceType.GetElementType(); //} //else if (dataSourceType.IsGenericType) //{ // dataItemType = dataSourceType.GetGenericArguments()[0]; //} //var fieldType = dataItemType.GetProperty(sortField); if (direction == SortDirection.Ascending) return query.OrderBy(s => s.GetType().GetProperty(sortField)); return query.OrderByDescending(s => s.GetType().GetProperty(sortField)); } } Currently that says "Extension methods must be defined in a non-generic static class". How do i do this?

    Read the article

  • Is there any way to get an ExtJS GridPanel to automatically resize its width, but still be contained

    - by Micah
    I want to include an ExtJS GridPanel inside a larger layout, which in turn must be rendered inside a particular div in some pre-existing HTML that I don't control. From my experiments, it appears that the GridPanel only resizes itself correctly if it's within a Viewport. For instance, with this code the GridPanel automatically resizes: new Ext.Viewport( { layout: 'anchor', items: [ { xtype: 'panel', title: 'foo', layout: 'fit', items: [ { xtype: 'grid', // define the grid here... but if I replace the first three lines with the lines below, it doesn't: new Ext.Panel( { layout: 'anchor', renderTo: 'RenderUntoThisDiv', The trouble is, Viewport always renders directly to the body of the HTML document, and I need to render within a particular div. If there is a way to get the GridPanel to resize itself correctly, despite not being contained in a ViewPort, that would be ideal. If not, if I could get the Viewport to render the elements within the div, I'd be fine with that. All of my ExtJS objects can be contained within the same div. Does anybody know of a way to get a GridPanel to resize itself correctly, but still be contained inside some non-ExtJS-generated HTML?

    Read the article

  • JSONP callback method is not defined

    - by Micah
    I'm trying to get a jsonp callback working using jquery within a greasemonkey script. Here's my jquery: $.ajax({ url: "http://mydomain.com/MyWebService?callback=?", data: { authkey: "temphash" }, type: "get", dataType: "json", cache: false, success: function(data) { console.log(data); } }); in my webservice (asp.net) I'm returning the response with a content type of application/javascript. The response the server is actually sending back is: jsonp1276109314602({"message":"I'm getting tired of this not working"}) The jsonp1276109314602 method name is being randomly generated by jquery, and I'm grabbing it with Request.QueryString["callback"] However my success function is never called and the firebug console gives me an error saying jsonp1276109314602 is not defined. What am I doing wrong?

    Read the article

  • How do I make a shortcut for a Perl program under Windows using a DOS batch file?

    - by Micah
    I'm trying to "hide" some of my perl program from the end user to make things easier on them. I'm doing what I can to keep them out of the command prompt. The program itself has a GUI designed in Perl/Tk, so they don't have to worry about the command prompt. Could I write out a quick batch file that goes along the lines of: START perl 'C:\[some path here]\myscript.pl' with START to start a program, the perl interpretor as my program, and the path/name of my perl script as the parameter? Would I have to specify where to find perl or would Windows just know because perl is in the computer's PATH variable? Thanks for the help!

    Read the article

  • Making a shortcut for a Perl program under Windows using a DOS batch file.

    - by Micah
    I'm trying to "hide" some of my perl program from the end user to make things easier on them. I'm doing what I can to keep them out of the command prompt. The program itself has a GUI designed in Perl/Tk, so they don't have to worry about the command prompt. Could I write out a quick batch file that goes along the lines of: START perl 'C:\[some path here]\myscript.pl' with START to start a program, the perl interpretor as my program, and the path/name of my perl script as the parameter? Would I have to specify where to find perl or would Windows just know because perl is in the computer's PATH variable? Thanks for the help!

    Read the article

  • ExpectedExceptionAttribute is not working in MSTest

    - by Micah
    This is wierd, but all of a sudden the `ExpectedExceptionAttribute' quit working for me the other day. Not sure what's gone wrong. I'm running VS 2010 and VS 2005 side-by-side. It's not working in VS 2010. This test should pass, however it is failing: [TestMethod] [ExpectedException(typeof(ArgumentNullException))] public void Test_Exception() { throw new ArgumentNullException("test"); } Any ideas? This really sux.

    Read the article

  • Linq Projection Question

    - by Micah
    I'm trying to do the following: from c in db.GetAllContactsQuery() select new { ID= c.ID, LastName = c.LastName, FirstName = c.FirstName, Email = c.Email, City =c.City+" "+c.State } The issue i'm running into is that if c.City or c.State are null, the City property returns null. How can I put a function right beside that City= declaration?

    Read the article

  • Inline image and caption in article - conform caption's width to image's width

    - by Micah
    Here's my code: <div class="image"> <img src="image.jpg" alt="Image description" /> <p class="caption">This is the image caption</p> </div> Here's my CSS: .image { position: relative; float: right; margin: 8px 0 10px 10px; } .caption { font-weight: bold; color: #444666; } As is above, the caption will conform to the width of div.image. My problem is often the img varies in size, from 100px width to 250px width. I'd like to make the caption width conform to the corresponding width of the image, no matter the size. While I'd love for this to be more semantic as well, I'm not sure how easy it would be to switch p.caption with img. Of course, I'd prefer that method but am taking this a step at a time. Is there some jquery code that I can use to detect the width of the image and add that width as an inline style to the caption tag? Is there a better way to do this? I'm open to suggestions.

    Read the article

  • How do I get a single value from a stored proc using Nettiers

    - by Micah
    I have a really simple stored procedure that looks like this: CREATE PROCEDURE _Visitor_GetVisitorIDByVisitorGUID ( @VisitorGUID AS UNIQUEIDENTIFIER ) AS DECLARE @VisitorID AS bigint SELECT @VisitorID = VisitorID FROM dbo.Visitor WHERE VisitorGUID = @VisitorGUID --Here's what I've tried RETURN @VisitorID 'Returns an IDataReader SELECT @VisitorID 'Returns an IDataReader --I've also set it up wuth a single output --parameter, but that means I need to pass --the long in by ref and that's hideous to me I'm trying to get nettiers to generate a method with this signature: public long VisitorService.GetVisitorIDByVisitorGUID(GUID visitorGUID); Basically I want Nettiers to call ExecuteScalar instead of ExecuteReader. What am I doing wrong?

    Read the article

  • Touch screens for kiosk applications

    - by Micah
    I'm developing a kiosk-style touchscreen application in Qt. Currently I'm using an Elo Touch surface acoustic wave touchmonitor which works well except for one thing: drag performance is way too poor to provide a good user experience. As this is the case for the cursor in X as well as in my application, it seems to be either the fault of X (probably not) or the touchmonitor. Since mobile platforms are able to achieve very high performance in this regard, it seems like it should be possible for vastly more powerful desktop systems. Does anybody have experience with getting good drag performance out of desktop touchmonitors? What hardware have you used? Is X to blame?

    Read the article

  • Authlogic_OpenID - "uninitialized constant Rack::OpenID"

    - by Micah Alcorn
    So I followed the railscast tutorial (http://railscasts.com/episodes/170-openid-with-authlogic) and used the old version of the plugin from Ryan's git file. I can now successfuly create/register a user using OpenID (Google), but I cannot log in with this user. When I submit the OpenID that has been registered, I get "uninitialized constant Rack::OpenID". Any ideas? Thanks!

    Read the article

  • Linq to Sql Projection Help

    - by Micah
    I've reached the end of my Linq rope. Need your help! Heres my table structure first(all linq to sql objects): InventoryItems -ID -AmtInStock IventoryKits -ID InventoryKits_to_InventoryItems -InventoryItemID -InventoryKitID So i need to do a projection like the following var q2=from k in GetAllKits()//returns IQueryable<InventoryKit> select new VMPublication()//ViewModel Object { ID = k.ID, Name = k.Name, WebAmountInStock = ,//need to get the Min() AmtInStock from InventoryItems here ItemCode = k.ItemCode, WebAmountOrdered = k.AmtOrdered.ToString(), WebReminderAmount = "", WebAmountWarning="", Type = "Kit" }; i have no idea how to get that Min() of InventoryItem's AmtInStock in that query. Please help! Very Appreciated!

    Read the article

  • Can you mix .NET framework Versions in a solution?

    - by Micah
    Our codebase where I work is .NET 2.0. For our new assembly/DLLs/web applications I would love to take advantage of what 3.5 has to offer. Can one mix .NET frameworks(per assembly) in a solution? Are there any IIS related caveats to this? I would love to hear any positive/negative/howto feedback. Let me know! Thanks!

    Read the article

  • How can I make rake assets:precompile build to the right location?

    - by Micah Gideon Modell
    I'm deploying my Rails 3 app to a subdirectory of my hosting service and therefore I'm using both a scope statement in my routes.rb and a config.assets.prefix. However, this causes my rake assets:precompile to build into public//assets instead of just into assets (since my prefix simply accounts for the scope). I can copy the files to the right location and everything will work, but I'd love for someone to tell me a better way (one must exist, right?). /config/application.rb config.assets.prefix = "/sapa/assets" /config/routes.rb scope "sapa" do … end Any help would be appreciated.

    Read the article

  • What is the best approach to binding commands in a ViewModel to elements in the View?

    - by Micah
    Anyone who has tried to implement RoutedCommands in WPF using M-V-VM has undoubtedly run into issues. Commands (non-UI commands that is) should be implemented in the ViewModel. For instance if I needed to save a CustomerViewModel then I would implement that as a command directly on my CustomerViewModel. However if I wanted to pop up a window to show the users addresses I would implement a ShowCustomerAddress command directly in the view since this a UI specific function. How do I define the command bindings in the viewmodel, and use them in the view?

    Read the article

  • How to validate Data Annotations with a MetaData class

    - by Micah
    I'm trying to validate a class using Data Annotations but with a metadata class. [MetadataType(typeof(TestMetaData))] public class Test { public string Prop { get; set; } internal class TestMetaData { [Required] public string Prop { get; set; } } } [Test] [ExpectedException(typeof(ValidationException))] public void TestIt() { var invalidObject = new Test(); var context = new ValidationContext(invalidObject, null, null); context.MemberName = "Prop"; Validator.ValidateProperty(invalidObject.Prop, context); } The test fails. If I ditch the metadata class and just decorated the property on the actual class it works fine. WTH am I doing wrong? This is putting me on the verge of insanity. Please help.

    Read the article

  • XHTML Validation issue trying to render '&' character inside an ASP.Net control

    - by Micah
    Ok, the description is kind of funky, but here's my problem: <asp:ListItem Value="0">All Leads <i>(include Archive & Trash)</i></asp:ListItem> <asp:ListItem Value="0">All Leads <i>(include Archive &amp; Trash)</i></asp:ListItem> <asp:ListItem Value="0" Text="All Leads <i>(include Archive & Trash)</i>" /> <asp:ListItem Value="0" Text="All Leads <i>(include Archive &amp; Trash)</i>" /> All three versions render the following html All Leads <i>(include Archive & Trash)</i> This of course fails XHTML validation. It needs to render the html like this: All Leads <i>(include Archive &amp; Trash)</i> How can I fix this? Thanks.

    Read the article

  • .NET OutOfMemoryException on XMLSerializer.Serialize

    - by Micah
    I have a web site that is throwing OutOfMemoryExceptions on whenever it gets to the following spot in my code: XmlSerializer xs = new XmlSerializer(t, xoverrides); Seeing how this only happens when it is on the web server, i don't have a ton of information on why this is happening. I know that the objects that it is serializing aren't anything too serious-- definitely less than a MB each. Have you had this before? Feel like helping me diagnose the issue? Any help is appreciated. Thanks!

    Read the article

  • How do I get a scalar value from a stored proc using Nettiers

    - by Micah
    I have a really simple stored procedure that looks like this: CREATE PROCEDURE _Visitor_GetVisitorIDByVisitorGUID ( @VisitorGUID AS UNIQUEIDENTIFIER ) AS DECLARE @VisitorID AS bigint SELECT @VisitorID = VisitorID FROM dbo.Visitor WHERE VisitorGUID = @VisitorGUID --Here's what I've tried RETURN @VisitorID 'Returns an IDataReader SELECT @VisitorID 'Returns an IDataReader --I've also set it up with a single output --parameter, but that means I need to pass --the long in by ref and that's hideous to me I'm trying to get nettiers to generate a method with this signature: public long VisitorService.GetVisitorIDByVisitorGUID(GUID visitorGUID); Basically I want Nettiers to call ExecuteScalar instead of ExecuteReader. What am I doing wrong?

    Read the article

  • How to keep alive an HttpModule (a.k.a register it as a singleton)

    - by Micah
    I pretty sure I've seen this somewhere but I can't seem to find it anywhere. I have an HttpModule that can be used across multiple requests. In other words instead of creating a new instance of the Module on every request it only ever needs to create it once. Does this ring a bell to anyone? If so, what's the method for configuring to work this way?

    Read the article

  • Dynamically Run IQueryable Method

    - by Micah
    Hi! I'm trying to run the Count() function of a Linq statement in an overriden Gridview function. Basically, I want to be able to assign a linq query to a gridview, and on the OnDataBound(e) event in my new extended gridview have it retrieve the count, using the IQueryable. This is where I'm at so far: protected override void OnDataBound(EventArgs e) { IEnumerable _data = null; if (this.DataSource is IQueryable) { _data = (IQueryable)this.DataSource; } System.Type dataSourceType = _data.GetType(); System.Type dataItemType = typeof(object); if (dataSourceType.HasElementType) { dataItemType = dataSourceType.GetElementType(); } else if (dataSourceType.IsGenericType) { dataItemType = dataSourceType.GetGenericArguments()[0]; } else if (_data is IEnumerable) { IEnumerator dataEnumerator = _data.GetEnumerator(); if (dataEnumerator.MoveNext() && dataEnumerator.Current != null) { dataItemType = dataEnumerator.Current.GetType(); } } Object o = Activator.CreateInstance(dataItemType); object[] objArray = new object[] { o }; RowCount = (int)dataSourceType.GetMethod("Count").Invoke(_data, objArray); Any ideas? I'm really new with working with IQueryables and Linq so I may be way off. How can I get my _data to allow me to run the Count function?

    Read the article

  • Changing the action of a form with javascript/jquery

    - by Micah
    I'm having an issue that is driving me crazy. I'm trying to modify the openid-selector to support facebook. I'm using RPXNow as my provider so it requires the form to be submitted to a different url than the standard. For example. RpxNow requires me to setup my form like this: <form action="https://wikipediamaze.rpxnow.com/openid/start?token_url=..."> This works for every provider except for facebook and myspace. Those require the form to be posted to a different url like this: <form action="https://wikipediamaze.rpxnow.com/facebook/start?token_url=..."> and <form action="https://wikipediamaze.rpxnow.com/myspace/start?token_url=..."> The open id selector has a bunch of buttons on the form each representing the openid providers. What I'm trying to do is detect when the facebook or myspace button is clicked and changed the action on the form before submitting. However it's not working. Here is my code. I've tried several variations all with the same "not supported" exception $("#openid_form").attr("action", form_url) document.forms[0].action = form_url Any suggestions? Update Here are more details on the code. I've ommitted some for brevity. The only thing i've done is added the facebook section to the "providers_large" object (which successfully adds the logo to the website), and instead of supply a url identifying the user, I'm creating a property called "form_url" which is what I want to set the action of my form to. If you look at the section title "Provider image click" you'll see where I'm checking for the presence of the property "form_url" and using jquery to change the action and submit the form. However when I step through the javascript in debug mode it tells me it's an ivalid operation. var providers_large = { google: { name: 'Google', url: 'https://www.google.com/accounts/o8/id' }, facebook: { name: 'Facebook', form_url: 'http://wikipediamaze.rpxnow.com/facebook/start?token_url=http://www.wikipediamaze.com/Accounts/Logon' }, }; var providers_small = { myopenid: { name: 'MyOpenID', label: 'Enter your MyOpenID username.', url: 'http://{username}.myopenid.com/' }, livejournal: { name: 'LiveJournal', label: 'Enter your Livejournal username.', url: 'http://{username}.livejournal.com/' }, flickr: { name: 'Flickr', label: 'Enter your Flickr username.', url: 'http://flickr.com/{username}/' }, technorati: { name: 'Technorati', label: 'Enter your Technorati username.', url: 'http://technorati.com/people/technorati/{username}/' }, wordpress: { name: 'Wordpress', label: 'Enter your Wordpress.com username.', url: 'http://{username}.wordpress.com/' }, blogger: { name: 'Blogger', label: 'Your Blogger account', url: 'http://{username}.blogspot.com/' }, verisign: { name: 'Verisign', label: 'Your Verisign username', url: 'http://{username}.pip.verisignlabs.com/' }, vidoop: { name: 'Vidoop', label: 'Your Vidoop username', url: 'http://{username}.myvidoop.com/' }, verisign: { name: 'Verisign', label: 'Your Verisign username', url: 'http://{username}.pip.verisignlabs.com/' }, claimid: { name: 'ClaimID', label: 'Your ClaimID username', url: 'http://claimid.com/{username}' } }; var providers = $.extend({}, providers_large, providers_small); var openid = { cookie_expires: 6*30, // 6 months. cookie_name: 'openid_provider', cookie_path: '/', img_path: 'images/', input_id: null, provider_url: null, init: function(input_id) { var openid_btns = $('#openid_btns'); this.input_id = input_id; $('#openid_choice').show(); $('#openid_input_area').empty(); // add box for each provider for (id in providers_large) { openid_btns.append(this.getBoxHTML(providers_large[id], 'large', '.gif')); } if (providers_small) { openid_btns.append('<br/>'); for (id in providers_small) { openid_btns.append(this.getBoxHTML(providers_small[id], 'small', '.ico')); } } $('#openid_form').submit(this.submit); var box_id = this.readCookie(); if (box_id) { this.signin(box_id, true); } }, getBoxHTML: function(provider, box_size, image_ext) { var box_id = provider["name"].toLowerCase(); return '<a title="'+provider["name"]+'" href="javascript: openid.signin(\''+ box_id +'\');"' + ' style="background: #FFF url(' + this.img_path + box_id + image_ext+') no-repeat center center" ' + 'class="' + box_id + ' openid_' + box_size + '_btn"></a>'; }, /* Provider image click */ signin: function(box_id, onload) { var provider = providers[box_id]; if (! provider) { return; } this.highlight(box_id); this.setCookie(box_id); // prompt user for input? if (provider['label']) { this.useInputBox(provider); this.provider_url = provider['url']; } else if(provider['form_url']) { $('#openid_form').attr("action", provider['form_url']); $('#openid_form').submit(); } else { this.setOpenIdUrl(provider['url']); if (! onload) { $('#openid_form').submit(); } } }, /* Sign-in button click */ submit: function() { var url = openid.provider_url; if (url) { url = url.replace('{username}', $('#openid_username').val()); openid.setOpenIdUrl(url); } return true; }, setOpenIdUrl: function (url) { var hidden = $('#'+this.input_id); if (hidden.length > 0) { hidden.value = url; } else { $('#openid_form').append('<input type="hidden" id="' + this.input_id + '" name="' + this.input_id + '" value="'+url+'"/>'); } }, highlight: function (box_id) { // remove previous highlight. var highlight = $('#openid_highlight'); if (highlight) { highlight.replaceWith($('#openid_highlight a')[0]); } // add new highlight. $('.'+box_id).wrap('<div id="openid_highlight"></div>'); }, setCookie: function (value) { var date = new Date(); date.setTime(date.getTime()+(this.cookie_expires*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); document.cookie = this.cookie_name+"="+value+expires+"; path=" + this.cookie_path; }, readCookie: function () { var nameEQ = this.cookie_name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }, useInputBox: function (provider) { var input_area = $('#openid_input_area'); var html = ''; var id = 'openid_username'; var value = ''; var label = provider['label']; var style = ''; if (label) { html = '<p>' + label + '</p>'; } if (provider['name'] == 'OpenID') { id = this.input_id; value = 'http://'; style = 'background:#FFF url('+this.img_path+'openid-inputicon.gif) no-repeat scroll 0 50%; padding-left:18px;'; } html += '<input id="'+id+'" type="text" style="'+style+'" name="'+id+'" value="'+value+'" />' + '<input id="openid_submit" type="submit" value="Sign-In"/>'; input_area.empty(); input_area.append(html); $('#'+id).focus(); } };

    Read the article

  • figuring out which field to look for a value in with SQL and perl

    - by Micah
    I'm not too good with SQL and I know there's probably a much more efficient way to accomplish what I'm doing here, so any help would be much appreciated. Thanks in advance for your input! I'm writing a short program for the local school high school. At this school, juniors and seniors who have driver's licenses and cars can opt to drive to school rather than ride the bus. Each driver is assigned exactly one space, and their DLN is used as the primary key of the driver's table. Makes, models, and colors of cars are stored in a separate cars table, related to the drivers table by the License plate number field. My idea is to have a single search box on the main GUI of the program where the school secretary can type in who/what she's looking for and pull up a list of results. Thing is, she could be typing a license plate number, a car color, make, and model, someone driver's name, some student driver's DLN, or a space number. As the programmer, I don't know what exactly she's looking for, so a couple of options come to mind for me to build to be certain I check everywhere for a match: 1) preform a couple of SELECT * FROM [tablename] SQL statements, one per table and cram the results into arrays in my program, then search across the arrays one element at a time with regex, looking for a matched pattern similar to the search term, and if I find one, add the entire record that had a match in it to a results array to display on screen at the end of the search. 2) take whatever she's looking for into the program as a scaler and prepare multiple select statements around it, such as SELECT * FROM DRIVERS WHERE DLN = $Search_Variable SELECT * FROM DRIVERS WHERE First_Name = $Search_Variable SELECT * FROM CARS WHERE LICENSE = $Search_Variable and so on for each attribute of each table, sticking the results into a results array to show on screen when the search is done. Is there a cleaner way to go about this lookup without having to make her specify exactly what she's looking for? Possibly some kind of SQL statement I've never seen before?

    Read the article

< Previous Page | 1 2 3  | Next Page >