Daily Archives

Articles indexed Tuesday April 20 2010

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

  • Screen capture doesn't work on MFC application in Vista

    - by David Thornley
    We've got some in-house applications built in MFC, with OpenGL drawing routines. They all use the same code to draw on the screen and either print the screen or save it to a JPEG file. Everything's been working fine in Windows XP, and I need to find a way to make them work on Vista. In three of our applications, everything works. In the remaining one, I can get the window border, title bar, menus, and task bar, but the interior never shows up. As I said, these applications use the exact same code to write to the screen and capture the window image, and the only difference I see that looks like it might be relevant is that the problem application uses the MFC multiple document interface, while the ones that work use the single document interface. Either the answer isn't on the net, or I'm worse at Googling than I thought. I asked on the MSDN forums, and the only practical suggestion I got was to use GDI+ rather than GDI, and that did nothing different. I have tried different things with every part of the code that captures and prints or save, given a pointer to the window, so apparently it's a matter of the window itself. I haven't rebuilt the offending application using SDI yet, and I really don't have any other ideas. Has anybody seen anything like this?

    Read the article

  • Plesk directory structure problems

    - by johnnietheblack
    I have an entire website with the following directory structure: /example.com /html (public) /css /js index.php /lib session.php other_lib_files.php /views index.php /models /controllers As illustrated, the html is public, and anything above it is private. My site now needs to upgrade servers, and the new server (Linux w/ Plesk) has the following structure (reduced to the problematic parts below): /myplesksite.com /httpdocs /css /js index.php /private /lib /models /views What I would THINK is that I should be able to put my /lib, /views, /models, etc in the directory directly above /httpdocs, the same way I had it in my previous server. Is that possible? Or do I have to put it in private? I would really love not to have to adjust my internal paths throughout the site if not necessary...

    Read the article

  • Microsoft Access 2003 menu bar is missing under toolbar customize

    - by tintincute
    Last time I was trying to hide the menu bars in my existing database. I added code in my module which I found on the internet. But now when I start Access I can't find the menu bars where I can usually see the File, Edit etc. I tried to restore the default, the menu bar can't be found under the customize toolbar. Any idea what happened? This is added from the website: Dim i For i = 1 To CommandBars.Count CommandBars(i).Enabled = False Next i I tried it but it didn't solve the problem. confused:(

    Read the article

  • HP c6180 driver refuses to install - "must reboot to continue delete files and continue install" loo

    - by Aszurom
    User called me last night, can't get HP drivers to install for printer. 500 meg download for latest c6180 driver. PC says "computer must be restarted to delete some files, then setup will continue." and it won't pass that point. (that's not exact phrasing of the error, and I'm not on the system now) Target machine is XP SP2. I upgraded to SP3. Fully patched. Ran malwarebytes, spybot, hijack this and turned off all startup entries. I noted that windows update also failed on optional printer driver updates for other printers installed on the machine. Went to printer server properties, removed all print drivers from system, deleted all printer ports. Made sure no services were marked disabled. After 5 hours of fighting this I started to get desperate, and uninstalled anything that referenced HP in the machine at all. Still no cure. I'm 6 hours into this and completely stumped. Google returns nothing applicable except unanswered requests for help on same topic.

    Read the article

  • ArrayList<String> NullPointerException

    - by Carlucho
    Am trying to solve a labyrinth by DFS, using adj List to represent the vertices and edges of the graph. In total there are 12 nodes (3 rows[A,B,C] * 4 cols[0,..,3]). My program starts by saving all the vertex labels (A0,..C3), so far so good, then checks the adjacent nodes, also no problems, if movement is possible, it proceeds to create the edge, here its where al goes wrong. adjList[i].add(vList[j].label); I used the debugger and found that vList[j].label is not null it contains a correct string (ie. "B1"). The only variables which show null are in adjList[i], which leads me to believe i have implemented it wrongly. this is how i did it. public class GraphList { private ArrayList<String>[] adjList; ... public GraphList(int vertexcount) { adjList = (ArrayList<String>[]) new ArrayList[vertexCount]; ... } ... public void addEdge(int i, int j) { adjList[i].add(vList[j].label); //NULLPOINTEREXCEPTION HERE } ... } I will really appreaciate if anyone can point me on the right track regrading to what its going wrong... Thanks!

    Read the article

  • Python Random Question

    - by coson
    Good Day, I am using Python 2.6 and am trying to run a simple random number generator program (random.py): import random for i in range(5): # random float: 0.0 <= number < 1.0 print random.random(), # random float: 10 <= number < 20 print random.uniform(10, 20), # random integer: 100 <= number <= 1000 print random.randint(100, 1000), # random integer: even numbers in 100 <= number < 1000 print random.randrange(100, 1000, 2) I'm now receiving the following error: C:\Users\Developer\Documents\PythonDemo>python random.py Traceback (most recent call last): File "random.py", line 3, in <module> import random File "C:\Users\Developer\Documents\PythonDemo\random.py", line 8, in <module> print random.random(), TypeError: 'module' object is not callable C:\Users\Developer\Documents\PythonDemo> I've looked at the Python docs and this version of Python supports random. Is there something else I'm missing? TIA, coson

    Read the article

  • LINQ to SQL vs Entity Framework for an app with a future SQL Azure version

    - by Craig L
    I've got a vertical market Dot Net Framework 1.1 C#/WinForms/SQL Server 2000 application. Currently it uses ADO.Net and Microsoft's SQLHelper for CRUD operations. I've successfully converted it to Dot Net Framework 4 C#/WinForms/ SQL Server 2008. What I'd like to do is also offer my customers the ability to use SQL Azure as a backend storage for their data instead of local/LAN SQL Server. If I know SQL Azure is in my application's future, should I: A. Switch to LINQ to SQL B. Swith to Entity Framework C. Stick with ADO.Net and SQLHelper Thanks !

    Read the article

  • problem with css showing the divisions of the page

    - by user225269
    This is most likely the culprit for this page: http://www.mypicx.com/04192010/ff/ table { border-collapse:collapse; } table,th, td { border: 1px solid black; font-family:Arial, Helvetica, sans-serif; letter-spacing: 1px; font-size:3; font-size:10px; } th { background-color:#A7C942; color:white; } I don't know why, but the page has some php scripts in it which shows a table from mysql database. As you can see in the url above. Please help, why do I see those lines everytime I put those css scripts

    Read the article

  • rockscroll or metalscroll for vis 2010

    - by Lodle
    Has any one found a replacement for rockscroll or metalscroll for visual studio 2010? I miss it so much that i looked into making one my self but only have word highlighting working and a place holder scroll bar and seems to be much harder than i thought it would be. Im happy to share what i got if someone is interested in helping.

    Read the article

  • can not set the bool value of app setting

    - by user262325
    Hello everyone I use the codes below to read and write a bool value from my application: -(void)SaveAppSetting; {     NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];     bool b=true;     [defaults setBool:b forKey:@"AnyKey"]; [defaults synchronize]; } -(void)LoadAppSetting; {     NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];     bool b=[defaults boolForKey: @"AnyKey"] ; } I found that "LoadAppSetting" worked well, it could get the correct value of item with key "AnyKey". The function "SaveAppSetting" looked like no function, it reported no error, but it can not change value of the item with key "AnyKey". "AnyKey" setting in Setting bundle is item Dictionary Type String PSToggleSwitchSpecifier Title String AnyKey's Title Key String AnyKey DefaultValue Boolean Checked Is there any person met the same problem? Thanks interdev

    Read the article

  • Format relative dates

    - by Jeffrey Aylesworth
    Is there a ruby gem that will format dates relative to the current time? I want output like "Tomorrow at 5pm", "Thursday next week at 5:15pm", I'm not too concerned about the exact output, just as long as it's relative dates in natural language

    Read the article

  • VirtualBox

    - by DesigningCode
    I was wanting to play around with something in a VM the other day.  I was curious what was available for free, if anything, for windows.   I quickly came across Virtual Box  ( http://www.virtualbox.org/ ).   Downloaded, Installed. No Problem!  Works really nicely.   It was commercial software (by sun (now oracle)) that turned open source.   In terms of a license it says :- In summary, the VirtualBox PUEL allows you to use VirtualBox free of charge for personal use or, alternatively, for product evaluation. An interesting feature it has is built in RDP.   Which is useful if you have a guest OS that doesn’t support RDP.   Speaking of RDP…..  which I will in my next blog post… I learnt something REALLY useful the other day.

    Read the article

  • Bridged NIC's but only one active

    - by rockinthesixstring
    I've "Bridged" the NIC's in my Server 2003 box but when I do a large file transfer, I see that only one is active at a time. What do I need to do to spread the love across both NIC's? I'm hoping to increase transfer speeds from my Server to my network. PS: I have a D-Link DGS-1016D Switch.

    Read the article

  • Designing a game database

    - by Ronald
    I'm trying to design a database to record game histories for a game I'm working on. I have 3 different tables: users, gamehistories, and gamescores. Columns for tables: users: uid, displayname, email gamehistories: gid, pubID, start (datetime), end (datetime) gamescores: gid, uid, score I am trying to produce the following result set given a userID (uid): Opponent's displayname, my score, opponent's score, duration Any ideas? Is my design ok? How can I query these tables to get game histories for a given uid?

    Read the article

  • ASP.NET 4.0 UpdatePanel and UserControl with PlaceHolder

    - by Chris
    I don't know if this is ASP.NET 4.0 specific but I don't recall having this problem in previous versions. I have very simple user control called "TestModal" that contains a PlaceHolder control which I use to instantiate a template in. When I put an UpdatePanel inside this UserControl on the page the updatepanel only does full postbacks and not partial postbacks. What gives? USER CONTROL MARKUP: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestModal.ascx.cs" Inherits="MyProject.UserControls.TestModal" %> <div id="<%= this.ClientID %>"> <asp:PlaceHolder ID="plchContentTemplate" runat="server"></asp:PlaceHolder> </div> USER CONTROL CODE BEHIND: public partial class TestModal : System.Web.UI.UserControl { private ITemplate _contentTemplate; [TemplateInstance(TemplateInstance.Single)] [PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(TemplateControl))] public ITemplate ContentTemplate { get { return _contentTemplate; } set { _contentTemplate = value; } } protected override void OnInit(EventArgs e) { base.OnInit(e); if (_contentTemplate != null) _contentTemplate.InstantiateIn(plchContentTemplate); } } ASPX PAGE MARKUP: <ajaxToolkit:ToolkitScriptManager ID="scriptManager" EnablePartialRendering="true" AllowCustomErrorsRedirect="true" CombineScripts="true" EnablePageMethods="true" ScriptMode="Release" AsyncPostBackTimeout="180" runat="server"></ajaxToolkit:ToolkitScriptManager> <uc1:TestModal ID="testModal" ClientIDMode="Static" runat="server"> <ContentTemplate> <asp:UpdatePanel ID="upAttachments" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server"> <ContentTemplate> <asp:LinkButton ID="lnkRemoveAttachment" runat="server"><img src="/images/icons/trashcan.png" style="border: none;" /></asp:LinkButton> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </uc1:TestModal>

    Read the article

  • Python urllib.urlopen IOError

    - by Michael
    So I have the following lines of code in a function sock = urllib.urlopen(url) html = sock.read() sock.close() and they work fine when I call the function by hand. However, when I call the function in a loop (using the same urls as earlier) I get the following error: > Traceback (most recent call last): File "./headlines.py", line 256, in <module> main(argv[1:]) File "./headlines.py", line 37, in main write_articles(headline, output_folder + "articles_" + term +"/") File "./headlines.py", line 232, in write_articles print get_blogs(headline, 5) File "/Users/michaelnussbaum08/Documents/College/Sophmore_Year/Quarter_2/Innovation/Headlines/_code/get_content.py", line 41, in get_blogs sock = urllib.urlopen(url) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 87, in urlopen return opener.open(url) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 203, in open return getattr(self, name)(url) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 314, in open_http if not host: raise IOError, ('http error', 'no host given') IOError: [Errno http error] no host given Any ideas?

    Read the article

  • CSS - how can I handle the size difference between serif and sans-serif fonts?

    - by orbit82
    I'm working on a WordPress that will allow the site administrator to switch between sans-serif and serif fonts. I'm trying to code the stylesheet in such a way that the font sizes are similar whether or not they choose Georgia vs Arial. The problem is that when I have it looking nice with a serif font, it looks WAY too big when in sans-serif. When I then adjust it to look nice in a sans-serif font, it looks WAY too small in serif. Is there an ideal font size and line-height that works well with both serif and sans-serif? Or do I need to make separate stylesheets (a serf version and a sans-serif version)? P.S. I've set a base font size on the body at 12px, and then set the rest of the font sizes as a percentage of the base. Of course, this base font size could be set in ems or in percent, because the percentages will still scale proportionally.

    Read the article

  • has_one and has_many associations: which side of the association is saved first

    - by SeeBees
    I have three simplified models: class Team < ActiveRecord::Base has_many :players has_one :coach end class Player < ActiveRecord::Base belongs_to :team validates_presence_of :team_id end class Coach < ActiveRecord::Base belongs_to :team validates_presence_of :team_id end I use the following code to test these models: t = Team.new team.coach = Coach.new team.save! team.save! returns true. But in another test: t = Team.new team.players << Player.new team.save! team.save! gives the following error: > ActiveRecord::RecordInvalid: > Validation failed: Players is invalid > from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/validations.rb:1090:in > `save_without_dirty!' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/dirty.rb:87:in `save_without_transactions!' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in > `save!' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in > `transaction' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:182:in > `transaction' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in > `save!' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:208:in > `rollback_active_record_state!' from > /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in > `save!' from (irb):14 I figured out when team.save! is called, it first calls player.save!. player needs to validate the presence of the id of the associated team. But at the time player.save! is called, team hasn't been saved yet, and therefore, team_id doesn't yet exist for player. This fails the player's validation, so the error occurs. But on the other hand, team is saved before coach.save!, otherwise the first example will get the same error as the second. So I've concluded that when a has_many bs, a.save! will save bs prior to a. When a has_one b, a.save! will save a prior to b. If I am right, why is this the case? It doesn't seem logical to me. Why has_one and has_many association have different order in saving? Any ideas? Thanks.

    Read the article

  • Java-Swing: Change getSource() in ActionListener

    - by Brandon
    I have a class that contains a JButton. This can't be changed. The problem is this: The actionListener calls getSource() and gets the JButton, not the container class. Can I change what getSource retrieves, before the actionListener is added? OR can JButtons have a variable reference to its container? I can't make a class extend a JButton. It caused bugs for drawing purposes... story of my week.

    Read the article

  • Partial template specialization on a class

    - by Jonathan Swinney
    I'm looking for a better way to this. I have a chunk of code that needs to handle several different objects that contain different types. The structure that I have looks like this: class Base { // some generic methods } template <typename T> class TypedBase : public Base { // common code with template specialization private: std::map<int,T> mapContainingSomeDataOfTypeT; } template <> class TypedBase<std::string> : public Base { // common code with template specialization public: void set( std::string ); // functions not needed for other types std::string get(); private: std::map<int,std::string> mapContainingSomeDataOfTypeT; // some data not needed for other types } Now I need to add some additional functionality that only applies to one of the derivative classes. Specifically the std::string derivation, but the type doesn't actually matter. The class is big enough that I would prefer not copy the whole thing simply to specialize a small part of it. I need to add a couple of functions (and accessor and modifier) and modify the body of several of the other functions. Is there a better way to accomplish this?

    Read the article

  • RTP Client Application on Android Mobile Device

    - by devang
    Hey folks,i am developing a RTP client on an Android device which can play streaming videos from a server. I am confused regarding how should i start about? i am thinking of developing a web app, using HTML,CSS and Javascript, which can later be wrapped in Android.is this approach correct? does javascript support real time media player? please guide me, i am a fresher and completely clueless..:(

    Read the article

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