Daily Archives

Articles indexed Wednesday May 5 2010

Page 13/119 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • A Tkinter StringVar() Question

    - by Graham
    I would like to create a StringVar() that looks something like this: someText = "The Spanish Inquisition" #Here's a normal variable whose value I will change eventually TkEquivalent = StringVar() #and here's the StringVar() TkEquivalent.set(string(someText)) #and here I set it equal to the normal variable. When someText changes, this variable will too... HOWEVER: TkEquivalent.set("Nobody Expects " + string(someText)) If I do this, the StringVar() will no longer automatically update! How can I include that static text and still have the StringVar() update to reflect changes made to someText? Thanks for your help.

    Read the article

  • Generics List Interface...newb question

    - by newToProgramming
    The List interface is the following: public interface List<E>{ public boolean add(Object e); public boolean remove(Object e); public boolean contains(Object e); ...etc Why aren't the add, remove and contains methods written like the following? public boolean add(E e) public boolean remove(E e) public boolean contains(E e)

    Read the article

  • Bind event to right mouse click

    - by zac
    How can I trigger some action with right click after disabling the browser context menu ? I tried this . . . $(document).ready(function(){ $(document).bind("contextmenu",function(e){ return false; $('.alert').fadeToggle(); }); }); .alert { visibility: hidden; }

    Read the article

  • FluentNhibernate many-to-many mapping - resolving record is not inserted

    - by Dmitriy Nagirnyak
    Hi, I have a many-to-many mapping defined (only relevant fields included): // MODEL: public class User : IPersistentObject { public User() { Permissions = new HashedSet<Permission>(); } public virtual int Id { get; protected set; } public virtual ISet<Permission> Permissions { get; set; } } public class Permission : IPersistentObject { public Permission() { } public virtual int Id { get; set; } } // MAPPING: public class UserMap : ClassMap<User> { public UserMap() { Id(x => x.Id); HasManyToMany(x => x.Permissions).Cascade.All().AsSet(); } } public class PermissionMap : ClassMap<Permission> { public PermissionMap() { Id(x => x.Id).GeneratedBy.Assigned(); Map(x => x.Description); } } The following test fails as there is no record inserted into User_Permission table: [Test] public void AddingANewUserPrivilegeShouldSaveIt() { var p1 = new Permission { Id = 123, Description = "p1" }; Session.Save(p1); var u = new User { Email = "[email protected]" }; u.Permissions.Add(p1); Session.Save(u); var userId = u.Id; Session.Evict(u); Session.Get<User>(userId).Permissions.Should().Not.Be.Empty(); } The SQL executed is (SQLite): INSERT INTO "Permission" (Description, Id) VALUES (@p0, @p1);@p0 = 'p1', @p1 = 1 INSERT INTO "User" (Email) VALUES (@p0); select last_insert_rowid();@p0 = '[email protected]' SELECT user0_.Id as Id2_0_, user0_.Email as Email2_0_ FROM "User" user0_ WHERE user0_.Id=@p0;@p0 = 1 SELECT permission0_.UserId as UserId1_, permission0_.PermissionId as Permissi2_1_, permission1_.Id as Id4_0_, permission1_.Description as Descript2_4_0_ FROM User_Permissions permission0_ left outer join "Permission" permission1_ on permission0_.PermissionId=permission1_.Id WHERE permission0_.UserId=@p0;@p0 = 1 We can clearly see that there is no record inserted into the User_Permissions table where it should be. Not sure what I am doing wrong and need an advice. So can you please help me to pass this test. Thanks, Dmitriy.

    Read the article

  • HTML Doctype Setting / IE Quirks Mode

    - by Frederico
    I'm working within the parameters of an un-reachable developer, whom has created an html generation system for our products.. Whenever a new page is generated he places: <!-- updated page at 05/MAY/2010 02:58.58 --> <!-- You must use the template manager to modify the formatting of this page. --> resulting in my code looking like: <!-- updated page at 05/MAY/2010 02:55.30 --> <!-- You must use the template manager to modify the formatting of this page. --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> I don't believe IE read's this doctype at all, as when looking at the developer screen, it renders in Quirks mode... is there any other way to force IE out of this horrible Quirks mode? I've been trying to reach the developer but he has been rather un-available.. Thank you in advance for any help you might have to offer.

    Read the article

  • Cast errors with IXmlSerializable

    - by Nathan
    I am trying to use the IXmlSerializable interface to deserialize an Object (I am using it because I need specific control over what gets deserialized and what does not. See my previous question for more information). However, I'm stumped as to the error message I get. Below is the error message I get (I have changed some names for clarity): An unhandled exception of type 'System.InvalidCastException' occurred in App.exe Additional information: Unable to cast object of type 'System.Xml.XmlNode[]' to type 'MyObject'. MyObject has all the correct methods defined for the interface, and regardless of what I put in the method body for ReadXml() I still get this error. It doesn't matter if it has my implementation code or if it's just blank. I did some googling and found an error that looks similar to this involving polymorphic objects that implement IXmlSerializable. However, my class does not inherit from any others (besides Object). I suspected this may be an issue because I never reference XmlNode any other time in my code. Microsoft describes a solution to the polymorphism error: https://connect.microsoft.com/VisualStudio/feedback/details/422577/incorrect-deserialization-of-polymorphic-type-that-implements-ixmlserializable?wa=wsignin1.0#details The code the error occurs at is as follows. The object to be read back in is an ArrayList of "MyObjects" IO::FileStream ^fs = gcnew IO::FileStream(filename, IO::FileMode::Open); array<System::Type^>^ extraTypes = gcnew array<System::Type^>(1); extraTypes[0] = MyObject::typeid; XmlSerializer ^xmlser = gcnew XmlSerializer(ArrayList::typeid, extraTypes); System::Object ^obj; obj = xmlser->Deserialize(fs); fs->Close(); ArrayList ^al = safe_cast<ArrayList^>(obj); MyObject ^objs; for each(objs in al) //Error occurs here { //do some processing } Thanks for reading and for any help.

    Read the article

  • data grid in flex 3

    - by Madhu
    I have initially two data grids,a button and a list.. If i select one item in grid one and second in grid 2 and after clicking the button the details should be displayed on the list depending upon the selection.presently iam not dealing with the data base. iam doing it stand alone.

    Read the article

  • Microsoft Fax Routing

    - by Gerard
    Hi All, I have a general question about MS Fax Routing service in Server 2008. Is it possible to have multiple extensions on the fax server. For example if the fax number is 90081000, can there be an extension for 1001, 1002 etc etc. Are we able to create these extension from within the MS Fax software and then route the different extensions to different email addresses? Thanks Regards g

    Read the article

  • ipad simulator rotating

    - by Mike
    I am testing an application on iPad Simulator and I need it to start my app in the position the simulator is but every time I run the app, the simulator rotates the simulator to portrait. Is there a way to stop this behavior? thanks.

    Read the article

  • 24 Extra Hot Free Linux Games (Part 3 of 3)

    <b>LinuxLinks:</b> "Now, let's scrutinize the 8 games at hand. For each game we have compiled its own portal page, providing screenshots of the game in action, a full description of the game, with an in-depth analysis of the features of the game, together with links to relevant resources and reviews."

    Read the article

  • Configuring network entirely VMware Workstation

    - by MRB
    Hello everyone! You could help me how to configure a network entirely virtual with VMWare Workstation 6.5 which has the Windows Server 2003 and XP workstations, but all virtual server and workstation windows xp.Outra thing is through my Windows Server 2003 I will release Internet access for Windows workstations xp.Everyone I'd like to simulate at home as if in a company but everything virtual. My host is a Windows XP thanks!

    Read the article

  • What Makes an Effective Search Engine Optimization Marketing Campaign?

    In the recent years, the Internet has increasingly become popular as a marketing tool. More so, it even gives traditional marketing and advertising channels a run for their money because of its ability to attract millions of customers. This fact can be attributed to the growing number of Internet users around the world who look for information online.

    Read the article

  • Can SOTI's MobiControl software interfere with an ASP.Net web service?

    - by MusiGenesis
    We have a set of WinMo (5.0) devices running a .NET CF application that talks to an ASP.Net web service running on a server. The devices connect to the network either via ActiveSync through a networked PC or directly to the network via an Ethernet dongle. In our development environment, the communication between devices and web service is 100% reliable. In our production environment, the communications are failing erratically and unpredictably. Sometimes calls to the web service (even to a simple test call that just returns a boolean) begin failing every time on a particular device, with the error message "Could not establish connection to network." This is usually fixed by flip-flopping the selected combo box values on the SETTINGS | NETWORKS screen. Sometimes calls on a particular device begin failing with a generic "WebException" message. The fix for this problem (so far) is either to reset the device (i.e. reinstall the OS) or else it just can't be fixed on some devices. To the best of our knowledge, everything about the DEV and PROD systems are the same (same server and device specs). The most obvious difference to us is that the PROD devices are all controlled by SOTI's MobiControl (which is server-side software that communicates with a SOTI client application installed on each device), whereas our DEV environment does not have SOTI installed anywhere (obviously we should have it there as well - long story). Does anybody have any experience with SOTI MobiControl and/or know of any documented problems where SOTI interferes with other communication mechanisms on a device?

    Read the article

  • mod_rewrite if file exists

    - by Mathieu Parent
    Hi everyone, I already have two rewrite rules that work correctly for now but some more code has to be added to work perfectly. I have a website hosted at mydomain.com and all subdom.mydomain.com are rewrited to mydomain.com/subs/subdom . My CMS has to handle the request if the file being reached does not exist, the rewrite is done like so: RewriteCond $1 !^subs/ RewriteCond %{HTTP_HOST} ^([^.]+)\.mydomain\.com$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ subs/%1/index.php?page=$1 [L] My CMS handles the next part of the parsing as usual. The problem is if a file really exists, I need to link to it without passing through my CMS, I managed to do it like this: RewriteCond $1 !^subs/ RewriteCond %{HTTP_HOST} ^([^.]+)\.mydomain\.com$ RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.*)$ subs/%1/$1 [L] So far it seems to work like a charm. Now I am being picky and I need to have default files that are stored in subs/default/. If the file exists in the subdomain folder, we should grab this one but if not, we need to get the file from the default subdomain. And if the file does not exist anywhere, we should be using the 404 page from the current subdomain unless there is none. I hope it describes well enough. Thank you for your time!

    Read the article

  • In Python, are there builtin functions for elementwise map of boolean operators over tuples of lists

    - by bshanks
    For example, if you have n lists of bools of the same length, then elementwise boolean AND should return another list of that length that has True in those positions where all the input lists have True, and False everywhere else. It's pretty easy to write, i just would prefer to use a builtin if one exists (for the sake of standardization/readability). Here's an implementation of elementwise AND: def eAnd(*args): return [all(tuple) for tuple in zip(*args)] example usage: >>> eAnd([True, False, True, False, True], [True, True, False, False, True], [True, True, False, False, True]) [True, False, False, False, True] thx

    Read the article

  • Beginning python for the web

    - by Josh K
    I'm looking for a nice tutorial or framework for developing Python written web applications. I've done lots in PHP, but very little in Python or Ruby and figured I'd start with the first one alphabetically.

    Read the article

  • "rsAccessDenied" error for SSRS 2008

    - by JackLocke
    Hi All, I have been trying to access SSRS Web Service URL hxxp://myServer:80/ReportServer (from Reporting Service Configuration Manager), but my IE always shows "rsAccessDenied" message saying that my account doesn't have privilage required to view. Here are my system specs. Its my laptop with Windows 7 x64, and SQL Server 2008 with SP1 and I am using Mixed Mode Authentication with My account as SysAdmin privilages and this is what I have been trying / tried ... (ofcourse with restarting the service everytime I make any change in configuration), I changed service account from Reporting Service Configuration Manager to make it use My account but nothing happend. I tried running my IE as admin, by RUN AS ADMIN but still same message. Then I read somewhere I have to delete/recreate my encryption keys as well, so I tried again with that, then it was asking me to enter ID/PWD to access server here I am totally blank because it was not accepting my account credentials !!!. Weird thing is I can see my existing reports if I follow this URL hxxp://myServer:80/Reports , for which My guess is solely used to view reports. I have read post here about kind of same problem, but it seems that OP just left forum after asking question... Also, MSDN does have these helps hxxp://msdn.microsoft.com/en-us/library/ms156034.aspx hxxp://msdn.microsoft.com/en-us/library/bb630430.aspx but both of this didn't workout for me. I will really appriciate it if any one can help me out. Jack p.s. I was not allowed to post more than 1 URL because of my "reputation" so I had to change the string a bit. Please replace hxxp wih http in URLs.

    Read the article

  • Calculating depth and descendants of tree

    - by yuudachi
    Can you guys help me with the algorithm to do these things? I have preorder, inorder, and postorder implemented, and I am given the hint to traverse the tree with one of these orders. I am using dotty to label (or "visit") the nodes. Depth is the number of edges from the root to the bottom leaf, so everytime I move, I add +1 to the depth? Something like that? No idea about the algorithm for descendants. They are asking about the number of nodes a specific node has under itself. These are normal trees btw.

    Read the article

  • Does .Net use Device Dependent or Device Independent Bitmaps?

    - by Brian
    When loading an image into memory, does .Net use DDB, DIB, or something else entirely? If possible, please cite your sources. I'm wondering because we currently have a classic ASP application that is using a 3rd party component to load images that is occasionally creating a “Not enough storage is available to process this command.” error. The error is very inconsistent but tends to happen on larger images (not always, but often). After resetting IIS, processing the same file again typically works just fine. After much research I have found that DDBs tend to have this problem when processing large images because they work out of video memory. Considering that we are running on a web server with an integrated video card and limited shared memory, this could certainly be our problem. We are in the early stages of converting our app to .Net and am wondering if using .Net for this might be a viable alternative to our current method which is why I am asking the question. Any advice is welcome :) but out of curiosity if nothing else, I am really hoping for an answer to the question; does .Net use DDB or DIB?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >