context

Valid OpenGL context

I'm a newbie to OpenGL programming. How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code. ...

How do you deploy a WAR that's inside an EAR as the root (/) context in Glassfish?

I have an EAR file that contains two WARs, war1.war and war2.war. My application.xml file looks like this: <?xml version="1.0" encoding="UTF-8"?> <application version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.c...

Handling context-path refs when migrating "/" site to Java EE packaging

An existing Java site is designed to run under "/" on tomcat and there are many specific references to fixed absolute paths like "/dir/dir/page". Want to migrate this to Java EE packaging, where the site will need to run under a context-root e.g. "/dir/dir/page" becomes "/my-context-root/dir/dir/page" Now, the context-root can be easil...

Allow only Copy/Paste Context Menu in System.Windows.Forms.WebBrowser Control

The WebBrowser control has a property called "IsWebBrowserContextMenuEnabled" that disables all ability to right-click on a web page and see a context menu. This is very close to what I want (I don't want anyone to be able to right-click and print, hit back, hit properties, view source, etc). The only problem is this also disables the ...

wxPython wxDC object from win32gui.GetDC

I am getting a DC for a window handle of an object in another program using win32gui.GetDC which returns an int/long. I need to blit this DC into a memory DC in python. The only thing I can't figure out how to do is get a wxDC derived object from the int/long that win32gui returns. None of the wxDC objects allow me to pass an actual D...

Farpoint spreadsheet - disable cell right click menu

I'm using Farpoint Spreadsheet for WinForms with C#. How can I disable the "context menu" displayed when right-clicking over a cell that is being edited? ...

LINQ to SQL disconnected updating object from different data context

http://geekswithblogs.net/michelotti/archive/2007/12/17/117791.aspx I'm using ASP.NET with C# and trying to use linq to sql to update a data context as exhibited on the blog linked above. I created the timestamp field in the table just as stated and am using the following method: private void updateRecord(TableName updatedRecord) { c...

What is the reason behind "non-static method cannot be referenced from a static context"?

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message. You can either make the non static method static or make an instance of that class to use its properties. Why? I am not asking for solutions. I would be grateful...

Adding handlers to Dynamically Created Context Menu

I need to populate a context menu from a database at run time. I do not know the number of items that will be in the list, so I would like to handle the click event in a single place. How do I declare the handler so I can tell which menu item actually triggered the click. Thanks, Dave Public Function GetBookmarkContextMenu(ByVal aBo...

Tomcat context.xml files, is there a hiearchy?

I am trying to use symbolic links in one of the applications I have running on Tomcat5. Thanks to some help from another StackOverflow question I was able to do it by creating a context.xml file in /...myapplication/META-INF/context.xml I am now trying to implement this on a production server. However, there are other applications ...

Simultaneous updates across two display contexts in openGL

Sorry, I'll be more detailed. I have a c# .NET application with which I've created a custom image display control. Each image display represents its own display context and draws the image using glDrawPixels (Yes I know it would be better to use textures, I plan to in the futures but this app is already too far along and my time is lim...

Which Tomcat 5 context file takes precedence?

Tomcat documentation says: The locations for Context Descriptors are; $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml $CATALINA_HOME/webapps/[webappname]/META-INF/context.xml On my server, I have at least 3 files floating around: 1 ...tomcat/conf/context.xml 2 ...tomcat/Catalina/localhost/myapp.xml 3 ...tomcat/webapps/myapp/...

Call function with "this"

I have an onclick handler for an <a> element (actually, it's a jQuery-created handler, but that's not important). It looks like this: function handleOnClick() { if(confirm("Are you sure?")) { return handleOnClickConfirmed(); } return false; } From this function, the this object is accessable as the <a> element cli...

How do you create "Aliases" in Apache Tomcat?

I am working on a web application that allows users to upload attachments. These attachments are stored on a different drive than that of the web application. How can I create an alias (equivalent to Apache HTTP server's aliases) to this drive so that users can download these attachments? Currently I am creating a context file and dum...

How can I specify system properties in Tomcat configuration on startup?

I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "-Dmy.prop=value". I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configuration file. I would like to do this because, first, it is eas...

What is the difference between the scalar and list contexts in Perl?

What is the difference between the scalar and list contexts in Perl and does this have any parallel in other languages such as Java or Javascript? ...

Silverlight Datagrid: Changing cell styles, based on values

I have some data. I want to go through that data and change cells (for example - Background color), if that data meets a certain condition. Somehow, I've not been able to figure it out how to do this seemingly easy thing in Silverlight. ...

Execute process as normal user from MSI (wix) under different context

I'm trying to configure an installer for some software we use within the company. The installer is pushed out to target machines via SMS, and it performs the following steps: Terminate any currently running instances of the app (the app is a utility, so this isn't an impact on the user). Remove the previous version. Install the update...

Closures and Context Free Grammars

I'm looking over my syllabus for my theoretical computer science class and within the heading of Context Free Grammars it lists "closure properties". I have looked through my textbook on this subject and found quite little. The little it does have is a bit above my head at the moment (I haven't taken the course yet) but I understand a li...

Should the context attributes in web application being made thread-safe?

Hi, I am creating a context (e.g. TestContext.java) as a singleton in the web application. Multi struts actions will access the context. Should I create the context attributes as thread-safe? Thanks. ...