Search Results

Search found 1496 results on 60 pages for 'adam hart'.

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • javascript not working on localhost

    - by Adam McMahon
    Ok so I'm lost here, frustrated and pulling my hair and out. Plus probably about to be fired or take a pay cut. I moved Files from a development server to my local machine. The files are consistent (used diff tool), all the dependencies are there. It works for the most part. The problem is that the some of the javascript (not all) is just not working. We're using jquery and a lot of plugins for it. I've checked with the web developer plugin in firefox and all the js files are loading. I cleared the cache in both firefox and chrome multiple times to no avail. The development server is a windows server running wamp. My local machine is running ubuntu. Somebody tell me what I missed.

    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

  • 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

  • Tab Content Does Not Refresh After First Click of Like Button

    - by Adam
    I've implemented a very simple "like guard" for a facebook tab, and am running into an issue with my test users. Multiple testers are reporting that when they open a tab and click the "like" button, they do not always get a page refresh (so the like guard does not disappear until they do a manual reload). This is using facebook's like button at the top of the page, not one I've coded up myself. As a sanity check, I enabled some simple logging on my server and have been able to recreate the issue - I hit "like" or "unlike" but there seems to be no request made to my index.php page, so definitely no refresh happening. I'm aware of this old bug https://developers.facebook.com/bugs/228778937218386 but this one seems different. For starters, after the first click of the "like" button, if I just continue clicking unlike/like/.... then the refresh happens automatically, as expected. What's especially weird is that if I reload the page after the first failed refresh, the refreshes start working again as expected, ie the first update to my like status triggers a page refresh. Some possibly (?) relevant info: My Tab is part of a test page, and is unpublished I am only using http hosting for the tab content, since my https isn't set up yet So far I've just tested with other admins - so maybe user role affects this? Curious to see if anyone has run into this issue before.

    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

  • How do I secure password parameters in RESTful web service URIs?

    - by adam
    i'm a newbie to server-side programming, so please forgive me if this gets messy. i've been contracted to create a web service to allow authenticated users to access a database. users have to enter a login and password. been reading and reading about REST vs SOAP, and i thought i'd settled on a RESTful design when i came across this statement: "Data that needs to be secure should not be sent as parameters in URIs." this seems like a major demerit against a RESTful approach. i'm aware that with https the password would be encrypted to prevent man-in-the-middle interception, but that leaves the server logs and client history as possible exposure points. is there a RESTful solution out there for this problem, or do i need to go SOAPy? any advice appreciated.

    Read the article

  • C# - Ensuring an assembly is called via a specified assembly

    - by Adam Driscoll
    Is there any built in functionality to determine if an assembly is being called from a particular assembly? I have assembly A which references assembly B. Assembly A exposes PowerShell cmdlets and outputs types that are found within B. Certain methods and properties with in types of exposed by B are of interest to types in assembly A but not of interest to consumers of PowerShell or anyone attempting to load types in B directly and call methods within it. I have looked into InternalsVisibleToAttribute but it would require extensive rework because of the use of interfaces. I was devising a shared key system that would later be obfuscated but that seemed clunky. Is there any way to ensure B is called only by A?

    Read the article

  • Restoring a saved opengl ES buffer (i.e. writing it back to screen)

    - by Adam
    I'm writing an iPhone app where I need to save and load the screen contents. I was able to save the screen using glReadPixels(), but since there's no glDrawPixels() in openGL ES, I'm having a lot of trouble restoring that buffer to the screen. I gather that I need to save the screen as a texture: http://stackoverflow.com/questions/708760/what-is-the-equivalent-of-gldrawpixels-in-opengl-es-1-1 But I'm not sure how to implement this. Does anyone have or know of any code samples that do this? I'm an openGL noob, so any help would be greatly appreciated :)

    Read the article

  • How do I avoid nesting forms when offering inline editing of lists with checkboxes for mass updates.

    - by adam
    A lot of sites offer the ability to edit lists of items inline as well as allowing multiple items to be selected via checkboxes and have an action performed all at once e.g. delete, mark as spam etc. But how do you implement this without violating html rules. I need one form for the checkboxes with individual submit_tags for the mass actions. But after a user clicks on an item in the list, another form via Ajax will be inserted within the checkbox form. How do I avoid doing this? I'm using rails and jQuery.

    Read the article

  • [PHP] Local/Dev/Live deployment - best workflow

    - by Adam Kiss
    Hello, situation We our little company with 3 people, each has a localhost webserver and most projects (previous and current) are on one PC network shared disk. We have virtual server, where some of our clients' sites and our site. Our standard workflow is: Coder PC ? Programmer localhost ? dev domain (client.company.com) ? live version (client.com) It often happens, that there are two or three guys working on same projects at the same time - one is on dev version, two are on localhost. When finished, we try to synchronize the files on dev version and ideally not to mess up any files, which *knock knock * doesn't happen often. And then one of us deploys dev version on live webserver. question we are looking for a way to simplify this workflow while updating websites - ideally some sort of diff uploader or VCS probably (Git/SVN/VCS/...), but we are not completely sure where to begin or what way would be ideal, therefore I ask you, fellow stackoverflowers for your experience with website / application deployment and recommended workflow. We probably will also need to use Mac in process, so if it won't be a problem, that would be even better. Thank you

    Read the article

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