context

Geeting internal Oracle connection from Hibernate in JBoss

Hello, I need to set an application context through Hibernate. I found there is a method setApplicationContext on oracle.jdbc.internal.OracleConnection. I wrote a test, in which I was getting the Oracle connection from the Hibernate session and it worked fine. However, when I moved the code to my application running under JBoss where co...

iPhone OpenGL ES - occasional initialisation problem

I am using OpenGL for a 2D graphing application. I have recently started having strange problems with the UIView that displays the GL render buffer. Sometimes (40% of the time?) when it initialises, the view is in a frozen state, occasionally displaying artefacts of the last successful running of the program. The rest of the program is...

Android: ProgressDialog doesn't show

Hi, I'm trying to create a ProgressDialog for an Android-App (just a simple one showing the user that stuff is happening, no buttons or anything) but I can't get it right. I've been through forums and tutorials as well as the Sample-Code that comes with the SDK, but to no avail. This is what I got: btnSubmit.setOnClickListener(new...

Apply Button() to an element inside a variable

If have a variable data = '<div>... <button id="remember"> ... </button> ...</div>', is it possible to apply the .button(); method to a button inside that variable? I've tried the following: $('#remember', data).button(); but that doesn't work. After that i just do $(data).dialog();, which works. I've come with a workaround and that...

why jsf is better than struts ?

someone said to me that jsf is better to share information within context, but struts 1.1 can't. In JSR168, if we need to develop a portlet, share information in context is critical. so jsf is better option. so what is share information within context ? Does that mean that different application deployed in the same container can share d...

Is there anyway to bring web @Context into JUnit (CXF+Spring)

I am trying to create unit test environment to test RESTFul services (cfx+spring) in my dev environemnt. To test RESTFul Services, I require @Context within JUnit test cases. @Context should contain HttpRequest, HttpSession, ServletContext, ServletConfig and all other webserver related information. I have setup the JUnit for the above, ...

How to create TestContext for Spring Test?

Newcomer to Spring here, so pardon me if this is a stupid question. I have a relatively small Java library that implements a few dozen beans (no database or GUI). I have created a Spring Bean configuration file that other Java projects use to inject my beans into their stuff. I am now for the first time trying to use Spring Test to inj...

Please explain me Context class in Android

I'm new to Android. Can someone explain me the concept of Context class/Object. What it is? What it will be used for? Why Context class? ...

Are there any context-sensitive code search tools?

I have been getting very frustrated recently in dealing with a massive bulk of legacy code which I am trying to get familiar with. Say I try to search for a particular function call, I get loads of results that turn out to be completely irrelevant; some of them are easy to spot, eg a comment saying // Fixed functionality in foo() so d...

Drupal: How can one use Context to trigger a reaction for a Taxonomy Term condition caused by a View?

What I would like to do is use the Context module to insert $body_classes of my choosing based on a Taxonomy Term condition. Fine, that's what the Context module is for. Seems simple enough IF your content/page source is a node that is involved with the appropriate Terms. However, I have a page generated by Views that has the appropri...

Set context property in jaxws request

Hey, I would like to set context attribute for every webservice made by my application. I tried this went I create the port: ((BindingProvider) port).getRequestContext().put("SomeInfo", someInfo); And to retrieve on webservice: HttpServletRequest request = (HttpServletRequest) getMessageContext().get(MessageContext.SERVLET_REQUEST);...

Global Entity Framework Context in WPF Application

Good day, I am in the middle of development of a WPF application that is using Entity Framework (.NET 3.5). It accesses the entities in several places throughout. I am worried about consistency throughout the application in regard to the entities. Should I be instancing separate contexts in my different views, or should I (and is a a...

When to use context processor

I have a site on which I'm including a userBox with some data shown for each logged user (your name, avatar etc). From what I already know about django it seems obvious, that I should add query for user to context processor (so that I can use {{user}} variable in this included userBox ). But while using django-lfs shop I've noticed, that...

How can I tell if a set of parens in Perl code will act as grouping parens or form a list?

In perl, parentheses are used for overriding precedence (as in most programming languages) as well as for creating lists. How can I tell if a particular pair of parens will be treated as a grouping construct or a one-element list? For example, I'm pretty sure this is a scalar and not a one-element list: (1 + 1) But what about more compl...

creating my own context processor in django

Hay, I have come to a point where i need to pass certain variables to all my views (mostly custom authentication type variables). I was told writing my own context processor was the best way to do this, but i am having some issues. My settings file looks like this TEMPLATE_CONTEXT_PROCESSORS = ( "django.contrib.auth.context_proces...

How to properly use Object Contexts in Entity Framework using BackgroundWorker

Good day, I am developing using Entity Framework and WPF, and I am encountering some errors and I don't know why. When saving a record (using a BackgroundWorker), I set the entities change tracker to nothing (null), attach the record to a new disposable context, save it, detach, and dispose of the context. Saving a record fires and ev...

Monitoring pthread context switching

I would like to monitor the the context switching behavior in a multi-threaded pthread application. In other RTOSes(Micro C OS) I have been able to register a context switch callback for each thread in the application, and then log (or toggle a gpio) and watch the thread context switching in real time. This was a valuable tool for deb...

How can I make a custom layout / change header background color … with Tex, Latex, ConTeXt ?

Hi, currently I produce dynamically this document http://download.stephane-klein.info/exemple_document.png with Python Report Labs… to produce pdf documents. Now, I would like try to produce this document with Tex / Latex / ConTeXt… I've some questions : how can I make the layout ? how can I make header background color ? how can I ...

Django Thread-Safety for templatetags

Hi, I am coming here, because I have a question about Django and Thread. I read the documentation http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#template-tag-thread-safety and I would like to now if the next code could be impacted also, at the rendering context. class ChatterCountNode(NodeBase): def __init__(self,...

How to add icons to the android context menu?

How to add icons to the android context menu? ...