Search Results

Search found 1573 results on 63 pages for 'adam lane'.

Page 45/63 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • C# / IronPython Interop and the "float" data type

    - by Adam Haile
    Working on a project that uses some IronPython scripts to as plug-ins, that utilize functionality coded in C#. In one of my C# classes, I have a property that is of type: Dictionary<int, float> I set the value of that property from the IronPython code, like this: mc = MyClass() mc.ValueDictionary = Dictionary[int, float]({1:0.0, 2:0.012, 3:0.024}) However, when this bit of code is run, it throws the following exception: Microsoft.Scripting.ArgumentTypeException was unhandled by user code Message=expected Dictionary[int, Single], got Dictionary[int, float] To make things weirder, originally the C# code used Dictionary<int, double> but I could not find a "double" type in IronPython, tried "float" on a whim and it worked fine, giving no errors. But now that it's using float on both ends (which it should have been using from the start) it errors, and thinks that the C# code is using the "Single" data type?! I've even checked in the object browser for the C# library and, sure enough, it shows as using a "float" type and not "Single"

    Read the article

  • Mobile web development - how to?

    - by Adam Kiss
    Hello, I would like to start developing mobile-friendly versions of websites for my clients, however, I am baffled with options and google search wasn't very helpful - there is so many options and opinions, I've been reading for few days now and still have no idea how to start. What's your opinion/experience about/with it? My main points: mobile devices supported (in order of relevance): iPhone 3G, iPhone 2G, Blackberry, Droid powered mobiles, other phone friendly numbers, phone friendly emails contact/register form working on each (or the most possible) devices listed jQTouch seems superb (simple, quick, working), I'm not sure about it on blackberry/droid and I don't want to create 6 web versions for each mobile device - Makes even less sense if you consider, that I'm starting with small web (6-10 pages, 1 contact form, 3 register forms) to play with. Thank you

    Read the article

  • Why use constants in programming?

    - by Adam N
    I've just been going back over a bit of C studying using Ivor Horton's Beginning C book. I got to the bit about declaring constants which seems to get mixed up with variables in the same sentence. Just to clarify, what is the difference in specifying constants and variables in C, and really, when do you need to use a constant instead of a variable? I know folks say to use a constant when the information doesn't change during program execution but I can't really think of a time when a variable couldn't be used instead. Thanks

    Read the article

  • an asp.net routing issue

    - by Adam Right
    my route implementation on Global.asax protected void Application_Start(object sender, EventArgs e) { this.intRoutes(RouteTable.Routes); } void intRoutes(RouteCollection Rts) { Rts.MapPageRoute("search", "{language}/{page}", "~/search.aspx"); Rts.MapPageRoute("category", "{language}/{name}/{no}/{categoryname}", "~/category.aspx"); Rts.MapPageRoute("product", "{language}/{name}/{no}/{productname}", "~/product.aspx"); } the problem is; if i use product routing on a hyperlink, like as follows; <asp:HyperLink ID="hyProduct" NavigateUrl='<%#HttpUtility.UrlDecode(((Page)HttpContext.Current.Handler).GetRouteUrl("product", new{ language=getUIFromHelper(),name=getNameFromHelper(),no=Eval("code"),productname=getProductNameFromHelper(Eval("name"))})) %>' runat="server" Text="something" /> everything goes fine, the link is written as expected like /en/products/06.008.001.150.0510/davis-fish-seeker-green but when i click that link the category.aspx page runs insted of product.aspx. am i missing out something ?

    Read the article

  • Is there a size limitation for an Access DB destination in SSIS?

    - by Adam V
    I'm creating an SSIS package, which will read through a user's SQL database and populate the tables in an Access database. However, for the largest user databases, I start getting errors around the time the Access file reaches approx. 2 GB. Has anyone run into this problem? Is this a size limitation for this operation? More information: I'm getting the error code 0xC020907B, but no additional information that I can see. Error: 0xC0209029 at , [733]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (746)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (746)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

    Read the article

  • Do something before closing the browser window

    - by Adam Kiss
    Hello, we have an web-application built in flash (it's actually just getting built :D) where is very important to be notified, when user closes his window. Since it's in flash, we do not worry about Javascript, we do not support non-javascript users. What is the safest (meaning it's 100% sure it gets called) X-browser way to call php script to close session, make some db changes, etc.? Thank you

    Read the article

  • Is there a preferred method of including the source code(s) of other software you've used in your ap

    - by Adam S
    I've used a few F/OSS libraries in my commercial application. As per their licenses, I am obligated to include their source codes along with my VS2008 application. This is my first time making a "real" commercial application, and I would appreciate some advice on how best to go about including their source codes. I don't want to package them as zip files alongside my installed. I still want my installer to be a single file.

    Read the article

  • What could possibly be causing this NPE in onCreate?

    - by Adam Johns
    I am getting an NPE in onCreate of the following file (MySubActivity): public class MySubActivity extends MySuperActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myTextView.setText(getResources().getString(R.string.myString)); } } MySuperActivity: public class MySuperActivity extends Activity { protected TextView myTextView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_layout); myTextView = (TextView)findViewById(R.id.myTextViewid); } } The strange thing is that I have never seen this crash while testing the app. The page works fine when I test it. However I got a crash report from Google notifying me of the crash. I cannot reproduce it, and I have no idea under what scenario this crash could happen. Seeing as how it works for me, the resource ids and string names etc. must be correct. The only thing that came across my mind was that maybe the user had their phone set to a different language, so it couldn't properly pull the resources. However, there are default resources for all of them, and I tested changing the language of my emulator and it didn't crash. Any ideas?

    Read the article

  • Does the "using" directive provide any benefit?

    - by Adam Drummond
    Is there a programmatic benefit to using a using statement? Notice the difference between this sample: using Application.Data; namespace Application.Web { public class SampleClass { public void SampleMethod() { List<Category> categories = CreateCategoriesData(); Category expected = categories[0]; ... ... } } } And this one: namespace Application.Web { public class SampleClass { public void SampleMethod() { List<Data.Category> categories = CreateCategoriesData(); Data.Category expected = categories[0]; ... ... } } }

    Read the article

  • jquery mobile mPDF not rendering on form submission

    - by Adam
    Im trying to have the user submit form data to a mPDF page the will render a pdf with the data included. The problem Im having is that jquery mobile initializes the mPDF page not allowing the mPDF to render properly. Im trying to figure out how to stop jquery mobile from initializing the mPDF page. Just a note, when I remove query mobile the functionality works. HTML <form id="rxForm" method="post" action="rxPDF.php"> <input type="text" name="dueDate"></form> </form> <button id="printPDF">Submit</button> JQUERY $('#printPDF').on('click', function() { console.log('pdf'); $('#rxForm').submit(); return false; }); mPDF <?php include ("library/mpdf.php"); $dueDate = $_POST['dueDate']; $html = 'The date is '.$dueDate.''; $mpdf = new mPDF(); $mpdf->WriteHTML($html, 0); $mpdf->Output(); exit; ?> I appreciate anyone's help!

    Read the article

  • Optimizing a Parking Lot Problem. What algorithims should I use to fit the most amount of cars in th

    - by Adam Gent
    What algorithms (brute force or not) would I use to put in as many cars (assume all cars are the same size) in a parking lot so that there is at least one exit (from the container) and a car cannot be blocked. Or can someone show me an example of this problem solved programmatically. The parking lot varies in shape would be nice but if you want to assume its some invariant shape that is fine. Another Edit: Assume that driving distance in the parking lot is not a factor (although it would be totally awesome if it was weighted factor to number of cars in lot). Another Edit: Assume 2 Dimensional (no cranes or driving over cars). Another Edit: You cannot move cars around once they are parked (its not a valet parking lot). I hope the question is specific enough now.

    Read the article

  • GIT Clones on Multiple Machines

    - by Adam
    Here's my setup... Laptop (Mac) - git clone of svn repository Thumb drive - git clone of laptop git repository Server (Win Server 08) - git clone of thumb drive repository I'm having trouble keeping them in sync for some reason... If I make a change on the server, I'll do a "git pull " on the thumb drive to get the changes. Take the thumb drive to the laptop and do "git pull " on the laptop. From there, I can do "git svn dcommit" and everything goes up to the SVN repo with no problem. If I pull changes from SVN with "git svn rebase" and then do a pull onto the thumb drive and do a "git status" it says that I'm ## revisions ahead of the master/origin and I can't figure out why.

    Read the article

  • Specify artifact version outside of pom

    - by Adam B
    Is there a way to specify the artifact version outside of the POM file? I have 2 CI projects that build an artifact. One builds a "stable" development version from a 'develop' branch and the other builds an unstable version which is the result of merging all active feature branches into the develop branch. I want the stable version to build as xyz-1.0.jar and the integration build to go in as xyz-1.0-SNAPSHOT.jar. Is there a way for the CI job to run a maven task or specify via the command line if a release or snapshot jar should be built without manually modifying the POM? Currently I have the version specified as 1.0 in the pom. I considered using the release plugin but I don't want the automatic version number increase and tagging that it does.

    Read the article

  • Trouble applying a simple template

    - by Adam S
    I'm having trouble applying a template to my checkboxes. I have the following template: <ControlTemplate x:Key="TriStateRed" TargetType="{x:Type CheckBox}"> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="{x:Null}" > <Setter TargetName="path" Property="Data" Value="M 0 2.5 A 5 2.5 0 1 1 5 5 L 5 8 M 5 10 L 5 10" /> <Setter TargetName="path" Property="Stroke" Value="Red" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> However, visual studio gives me the following error: Cannot find the Trigger target 'path'. (The target must appear before any Setters, Triggers, or Conditions that use it.) Can anyone make sense of this?

    Read the article

  • Federated (Synced) Subversion servers?

    - by Adam Haile
    Is it possible to create "federated" Subversion servers? As in one server at location A and another at location B that sync up their local versions of the repository automatically. That way when someone at either location interacts with the repository they are accessing their respective local server and therefore has faster response times.

    Read the article

  • Why are items being placed below?

    - by Adam DePolo
    This is really confusing and I have never had this occur. For my computer, it is fine. But for anyone else's computer I have tried, it screws up. So on my site, designatease.com , the second bar down, it places the fifth item down below the first four. I am not sure why it is doing this. I want them to span across the bar but the stop at about half way. Help me out SOF. HTML <html> <head> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Design At Ease - Home</title> </head> <body> <div id="header"> <div id="logo"><a class="logoclass">DesignAtEase.com</a></div> <ul id="headerlinks"> <li><a href="index.html">Home</a></li> <li><a href="coding.html">Coding</a></li> <li><a href="graphics.html">Graphics</a></li> <li><a href="database.html">Database</a></li> <li><a href="support.html">Support</a></li> <li><a href="more.html">More</a></li> </ul> </div> <ul id="quicklinks"> <li><a href="quickstart.html">Quick Start</a></li> <li><a href="tagsmain.html">Tag Helper</a></li> <li><a href="html.html">HTML</a></li> <li><a href="css.html">CSS</a></li> <li><a href="photoshop.html">Photoshop</a></li> <li><a href="quickstart.html">Quick Start</a></li> <li><a href="tagsmain.html">Tag Helper</a></li> </ul> </body> </html> CSS body{ background:#fffffc; margin: auto auto; } #header{ background:#e5e5e5; height:35px; width:100%; border-bottom: 1px #c9c9c9 solid; } #headerlinks{ position:relative; display:inline; float:right; margin-right:5%; bottom:37px; } #headerlinks li{ display:inline; padding-left:25px; } #headerlinks li a{ color:#777777; display:inline; font-size:18px; font-family: sans-serif; text-decoration:none; } #headerlinks li a:hover{ color:#a3a3a3; display:inline; font-size:18px; font-family: sans-serif; text-decoration:none; } #logo{ position:relative; color:black; margin-left:5%; top:5px; } .logoclass{ color:#212121; display:inline; font-size:24px; font-family: sans-serif; text-decoration:none; } #quicklinks{ width:90%; margin-left:auto; margin-right:auto;; height:25px; background:#e5e5e5; border-bottom: 1px #c9c9c9 solid; border-left: 1px #c9c9c9 solid; border-right: 1px #c9c9c9 solid; top:-16px; position:relative; } #quicklinks li{ display:inline; } #quicklinks li a{ } #quicklinks li a:hover{ } #wrapper{ width:80%; height:100%; }

    Read the article

  • Computing, storing, and retrieving values to and from an N-Dimensional matrix

    - by Adam S
    This question is probably quite different from what you are used to reading here - I hope it can provide a fun challenge. Essentially I have an algorithm that uses 5(or more) variables to compute a single value, called outcome. Now I have to implement this algorithm on an embedded device which has no memory limitations, but has very harsh processing constraints. Because of this, I would like to run a calculation engine which computes outcome for, say, 20 different values of each variable and stores this information in a file. You may think of this as a 5(or more)-dimensional matrix or 5(or more)-dimensional array, each dimension being 20 entries long. In any modern language, filling this array is as simple as having 5(or more) nested for loops. The tricky part is that I need to dump these values into a file that can then be placed onto the embedded device so that the device can use it as a lookup table. The questions now, are: What format(s) might be acceptable for storing the data? What programs (MATLAB, C#, etc) might be best suited to compute the data? C# must be used to import the data on the device - is this possible given your answer to #1?

    Read the article

  • Where can I find a powerful, standards compliant, web-based interactive org chart API?

    - by Adam Soltys
    Hi, I'm looking to build an interactive web-based org chart for a large organization. I somewhat like the interface at ancestry.com where you can hover over people and pan/zoom around and click on different nodes to make them the root. Ideally, I'd like it if people could belong to multiple organizational entities like committees, working groups, etc. In other words the API should support graphs in general, not just trees. I'd like to be able to visually explode each organizational substructure into substituents by clicking on it, with a nice animation of the employees ballooning or spilling out so you can really interactively drill down through the organization. I found http://code.google.com/apis/visualization/documentation/gallery/orgchart.html but it looks a bit rudimentary. I know there are desktop tools like OrgPlus and Visio that can build static charts but I'm really looking for a free, web-based API with open standards-based output like SVG or HTML5 Canvas elements rather than Flash or some proprietary output. Something I can embed into a custom web application and style myself. Something interactive.

    Read the article

  • jQuery .die isnt killing an attached event?

    - by adam
    Hi I've just started experimenting with .live and .die and having some great results but one thing isn't working. I've been tinkering with firebugs console to try out my written code live to see if i can figure out the reason why .die isn't killing off an attached event. First if i do this //attach ajax submission $('a[href$=edit]').live("click", function(event) { $.get($(this).attr("href"), null, null); return false; }); Then as expected when I click on a link the ajax fires off and my server side code injects a form for inline editing. But sometimes I want to disable this behaviour and also make the link unclickable so I do the following //unbind ajax form creation when we click on a link, then disable its semantic behaviour $('a[href$=edit]').die("click").click( function(){ return false; } ); which works but if then try to remove this and restore that ajax goodness with the code below it doesn't work, Instead the link remains unclickable. I cant figure out why? Can anyone help? //remove any previous events from the links $('a[href$=edit]').die(); //attach ajax submission $('a[href$=edit]').live("click", function(event) { $.get($(this).attr("href"), null, null); return false; });

    Read the article

  • Using CreateSourceQuery in CTP4 Code First

    - by Adam Rackis
    I'm guessing this is impossible, but I'll throw it out there anyway. Is it possible to use CreateSourceQuery when programming with the EF4 CodeFirst API, in CTP4? I'd like to eagerly load properties attached to a collection of properties, like this: var sourceQuery = this.CurrentInvoice.PropertyInvoices.CreateSourceQuery(); sourceQuery.Include("Property").ToList(); But of course CreateSourceQuery is defined on EntityCollection<T>, whereas CodeFirst uses plain old ICollection (obviously). Is there some way to convert? I've gotten the below to work, but it's not quite what I'm looking for. Anyone know how to go from what's below to what's above (code below is from a class that inherits DbContext)? ObjectSet<Person> OSPeople = base.ObjectContext.CreateObjectSet<Person>(); OSPeople.Include(Pinner => Pinner.Books).ToList(); Thanks! EDIT: here's my version of the solution posted by zeeshanhirani - who's book by the way is amazing! dynamic result; if (invoice.PropertyInvoices is EntityCollection<PropertyInvoice>) result = (invoices.PropertyInvoices as EntityCollection<PropertyInvoice>).CreateSourceQuery().Yadda.Yadda.Yadda else //must be a unit test! result = invoices.PropertyInvoices; return result.ToList(); EDIT2: Ok, I just realized that you can't dispatch extension methods whilst using dynamic. So I guess we're not quite as dynamic as Ruby, but the example above is easily modifiable to comport with this restriction EDIT3: As mentioned in zeeshanhirani's blog post, this only works if (and only if) you have change-enabled proxies, which will get created if all of your properties are declared virtual. Here's another version of what the method might look like to use CreateSourceQuery with POCOs public class Person { public virtual int ID { get; set; } public virtual string FName { get; set; } public virtual string LName { get; set; } public virtual double Weight { get; set; } public virtual ICollection<Book> Books { get; set; } } public class Book { public virtual int ID { get; set; } public virtual string Title { get; set; } public virtual int Pages { get; set; } public virtual int OwnerID { get; set; } public virtual ICollection<Genre> Genres { get; set; } public virtual Person Owner { get; set; } } public class Genre { public virtual int ID { get; set; } public virtual string Name { get; set; } public virtual Genre ParentGenre { get; set; } public virtual ICollection<Book> Books { get; set; } } public class BookContext : DbContext { public void PrimeBooksCollectionToIncludeGenres(Person P) { if (P.Books is EntityCollection<Book>) (P.Books as EntityCollection<Book>).CreateSourceQuery().Include(b => b.Genres).ToList(); }

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >