context

Contextual Menu Control for ASP.NET

Can anyone recommend a library or a guide in the right direction as to where can I find a Contextual Menu Control for ASP.NET similar to the ones Google uses in its Google Docs or Google Mail web apps ? I looked at the ASP.NET AJAX Control Toolkit as of Sept 2009 and there seems to be none willing to create one. ...

Is it possible to use Seam in a JBoss timed service?

I've started to write some new JBoss timed service that was meant to use some existing seam components. But it seems that I can't access these components because of non-existing contexts. Is it possible to use them other than in the typical situation with JSF? A little snippet to demonstrate what I want to do... @Service public class M...

Spring 3 Java Config: Imported @Configuration not enhanced?

I have an app that I'm trying to use the latest Spring 3 conventions with annotation-based configurations, but I also have legacy classes that use constructor-injection. Based on the Spring documentation you're supposed to just call the method that creates that dependency and pass it into the constructor that needs it. That seems to wo...

Tomcat not recognizing context in web service

I have a webservice running on tomcat (and working). I would like to extract the endpoint URL into a file outside the war, so that it can be changed without needing to redeploy the war. I am running locally with Tomcat 6 standalone on Windows XP. My thought was to have it in the Context, either as a context param or as an Environment va...

UIView & Graphics Context

The UIView class does not set a graphics context, so when I go to get the current context, it comes back as nil. I'm in a method subclassed off of UIView, how may I get the graphics context to be able to simply draw a line? Very new at the x-code game. Any help would be appreciated. ...

Extracting context from a set point in the middle of an HTML file.

I have some HTML, and I'm extracting a snippet at a certain point (an inline image), but I'd like to show some context around this image. I'm using PHP, and I know that both Symfony and Wordpress provide functions for dealing with what happens when you chop up text in the middle of some HTML (it closes all open tags), but nothing for de...

PHP how to tell vocabulary type in context

What I want to be able to do is tell if a word in a sentence is a noun, adverb, adjetive, etc.. I looked into FreeLing, and a few other open source projects that I could find that are able to do this, just wondering if there is one that works with PHP natively, if not, do you have any suggestions on other projects like FreeLing that mig...

LINQ context SubmitChanges

Regarding the SubmitChanges order (Insert, Update, Delete), is there a way to change that order? I need to have the Deletes executed first, any updates, then any new inserts. I have a datagrid where the user can do all add, changes and updates and submit. Since each grod row must have a unique item chosen in it (via a dropdown), it's pos...

How can my Django views know which template to render, or whether to return JSON?

Our site can be accessed from a full browser, from mobile browsers, and from a custom iPhone app. Since the logic is mostly the same regardless of the client, we're using the same views to process all types of requests. But at the bottom of every one of our views, we have something like: if request.is_mobile(): return render_to_resp...

How to intercept a static method call in C#

Hi All, I'm trying to implement some sort of Aspect Oriented Programming in C#, where I had some small success but found some important limitations. One of those limitations is the capability to intercept the call to a static method. For example, suppose We have the next object: public class SampleObject { public SampleObjectPro...

render_to_response always pass a variable

I'm finding myself always passing a 'user' variable to every call to render_to_response A lot of my renders looks like this return render_to_response('some/template', {'my':context,'user':user}) Is there a way to automatically send this 'user' variable without manually adding it to the context each time a method is called? ...

.NET: How to access ExceptionContext object from Exception object

Hello all, I'm writing a custom error-handling method, and am passing it an Exception object. I need to be able to access that Exception's ExceptionContext object, so I can set a property to true before I execute the Error view. Does anyone know how to get to the ExceptionContext, given just an Exception object? For reference, the reas...

Design of classes

Hi Can anyone point me to a good resource for designing object-oriented classes from context diagrams? Thanks. ...

JBoss application complete path

Hey, Is there any way I can get url address of an application from java code, I mean complete address not only value from getContextPath(). Something like http://localhost:8080/etc ...

JAXB unmarshalling based on sibling elements

I have the following xml fragment (which is outside of my control): <item> <name>Name</name> <category>1</category> <subcategory>2</subcategory> </item> I'd like <subcategory> to be unmarshalled to a class that looks like this: public class SubCategory { private Category parent; private int code; private String name; p...

Using NSString's drawAtPoint method in place of CGContextShowGlyphsAtPoint problems

Hi, In my app I'm trying to render text along a path; this is fine for most characters but not for Japanese (or anything non mac-Roman). I've been advised to use [NSString drawAtPoint] which displays the correct characters in my CATiledLayer; however, they dissapear after approximately 5 seconds. In this time I can zoom the layer and th...

Can we call getServletContext() inside contextInialized method ?

Dears, Creating servlet that implments contextInializer interface in this code, then accessing file inside contextinialized() using this line InputStream input = getServletContext().getResourceAsStream("/WEB-INF/file.properties")); this exception occurred java.lang.NullPointerException at javax.servlet.GenericSe...

Creating a forward compatible OpenGL 3.x context in Python

I am using wxPython and I want to use an OpenGL based canvas, but I don't want the context to support deprecated functionality. I've navigated through pyopengl and pyglet in Eclipse, but it did not look like they support this. I'm saying this because I could not find WGL functions used in assigning attributes to a context, as in this whi...

What can be used as [context] in jQuery( expression, [context] )?

The following code does not return anything: $('.foo', $('<div class="foo">foo</div><div class="bar">bar</div>').get(0)).html() Is there any way to specify a string representation of xml/html as the context parameter of the jQuery function? I'm trying to select a section of an html document retrieved from an ajax request; the ajax ...

Why does Perl treat a hash element as list context at declaration?

Given this code: #!/usr/bin/perl -w use strict; use warnings; sub foo { return wantarray ? () : "value1"; } my $hash = { key1 => foo(), key2 => 'value2' }; use Data::Dumper; print Dumper($hash); I get the following output: $VAR1 = { 'key1' => 'key2', 'value2' => undef }; When I would expect: $VAR1 = { 'key1' ...