Search Results

Search found 11 results on 1 pages for 'baddie'.

Page 1/1 | 1 

  • Get coords of an oval in Tkinter

    - by Baddie
    I can't seem to figure out how to reterive the x,y position of an oval created on a Tkinter canvas using Python via c.create_oval(x0, y0, x1, y2) I understand that Tkinter creates the oval inside the box specified by x0,y0,x1,y2 and if I can get those coordinates that would also work. I need the coordinates to move the oval by an offset equal to the mouse coords and the actual oval.

    Read the article

  • Entity Framework One-To-One Mapping Issues

    - by Baddie
    Using VS 2010 beta 2, ASP.NET MVC. I tried to create an Entity framework file and got the data from my database. There were some issues with the relationships, so I started to tweak things around, but I kept getting the following error for simple one-to-one relationships Error 1 Error 113: Multiplicity is not valid in Role 'UserProfile' in relationship 'FK_UserProfiles_Users'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *. myEntities.edmx 2024 My Users table is consists of some other many-to-many relationships to other tables, but when I try to make a one-to-one relationship with other tables, that error pops up. Users Table UserID Username Email etc.. UserProfiles Table UserProfileID UserID (FK for Users Table) Location Birthday

    Read the article

  • What happens when I load an assembly?

    - by Baddie
    In my ASP.NET MVC application, I have the following setup: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="bin;extras"/> I have referenced assemblies located in the extras folder in the views and they have worked perfectly (using <%@ Import Namespace="myNameSpace" %>). My questions What happens when that line is called? Where is the assembly loaded? Why is it that I can't overwrite the assembly located in the extras folder that contains myNameSpace with a newer version? (I get an error saying that the assembly is "open" in another program) Is there a way to overwrite the assembly with a newer version without having the application restart?

    Read the article

  • How far does Dependency Injection reach?

    - by Baddie
    My web app solution consists of 3 projects: Web App (ASP.NET MVC) Business Logic Layer (Class Library) Database Layer (Entity Framework) I want to use Ninject to manage the lifetime of the DataContext generated by the Entity Framework in the Database Layer. The Business Logic layer consists of classes which reference repositories (located in the database layer) and my ASP.NET MVC app references the business logic layer's service classes to run code. Each repository creates an instance of the MyDataContext object from the Entity Framework Repository public class MyRepository { private MyDataContext db; public MyRepository { this.db = new MyDataContext(); } // methods } Business Logic Classes public class BizLogicClass { private MyRepository repos; public MyRepository { this.repos = new MyRepository(); } // do stuff with the repos } Will Ninject handle the lifetime of MyDataContext despite the lengthy dependency chain from the Web App to the Data Layer?

    Read the article

  • How do I Relate these 4 Tables

    - by Baddie
    Trying to setup a simple Thread/Poll table mapping. Here is what I have: Threads table ThreadID (Primary Key/Identity Column) Polls table PollID (Primary Key, FK for ThreadID for one-to-one relation) Question PollOptions table PollOptionID (Identity/Primary Key) Text PollID PollVotes table PollVoteID (Primary Key/Identity) PollOptionID I'm not sure if this is a proper relationship. It seems wrong but I'm not sure whats wrong with it. A Thread can have 0 or 1 Poll. A Poll can have 2 or more PollOptions. A PollOption can have 0 or many PollVotes. I'm going to be using Entity Framework and before I generate the code for it (VS 2010, .NET 4) I want to make sure I have the proper relationship mapping.

    Read the article

  • JavaScript check if anonymous object has a method

    - by Baddie
    How can I check if an anonymous object that was created as such: var myObj = { prop1: 'no', prop2: function () { return false; } } does indeed have a prop2 defined? prop2 will always be defined as a function, but for some objects it is not required and will not be defined. I tried what was suggested here: http://stackoverflow.com/questions/595766/how-to-determine-if-native-javascript-object-has-a-property-method but I don't think it works for anonymous objects .

    Read the article

  • JavaScript/jQuery short hand function definitions

    - by Baddie
    I'm using a jQuery plugin that has its functions defined as such: $('#mydiv').pluginAction({ someproperty: val, format: 'mm hh', labels: ['yes', 'no', 'maybe'], labels1: ['never', 'always'] }); In my HTML page, I have multiple DIVs that have the same properties for format, labels, labels1, but different values for someproperty. Is there some type of JavaScript notation I can take advantage of to shorten the definition so that I don't have to have duplicate code?

    Read the article

  • Ninject and Custom Controller Factory

    - by Baddie
    I'm using MEF with ASP.NET MVC as demonstrated at http://blog.maartenballiauw.be/post/2009/06/17/Revised-ASPNET-MVC-and-the-Managed-Extensibility-Framework-(MEF).aspx. When I try to use Ninject, it seems that nothing gets injected. I did some debugging, and when I reverted to the original controller factory the injection worked. What needs to be changed, or what does Ninject need in terms of controller factories for it to work?

    Read the article

  • HTTP POSTed files automatically uploaded to root directory

    - by Baddie
    I just inherited an ASP.NET WebForms web application that I was tasked with refactoring. One of the features is a file upload and while debugging I noticed that as soon as a file is posted to a certain page/handler, it is automatically uploaded to the root directory of the application. The file is then moved to the proper location. I can't seem to figure out whats causing this automatic upload of the file. Is there something I'am overlooking in ASP.NET WebForms that allows this to happen? Is it an IIS configuration or something?

    Read the article

  • Set element style to the :hover style using jQuery

    - by Baddie
    Is it possible (using jQuery or otherwise) to set the style of a certain element to the :hover style defined in a stylesheet? .regStyle { background-color: #000; } .regStyle:hover { background-color: #fff; } Trying it out $("#differentButton").click(function(){ // this doesn't work $("#someElement").addClass("regStyle:hover").remove("regStyle"); });

    Read the article

  • Forwarding 80 to 443 on Nagios woes

    - by Ethabelle
    I perhaps just need some extra insight because I don't see where I'm going wrong. I used an SSL Cert to secure our nagios server. We want to specifically require all traffic over nagios (like 2 users, lol) to use SSL. So I thought, oh, mod_rewrite + Rewrite Rule in .htaccess, right? So I went into the DocumentRoot and did a vi .htaccess (one didn't already exist) and then I put in the following rule; RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://our.server.org/$1 [R,L] This does absolutely nothing. Does nada. Whhhyy.. Note: AllowOverride all in httpd.conf is on. Also, I verified that the module is not uncommented out ... but note, I couldn't find the mod_rewrite module installed so I copied it over from another server and placed it in modules/mod_rewrite.so . It was weird because it was enabled in the httpd.conf file, but then didn't exist in modules ... I'm a baddie :(

    Read the article

1