Hi guys,
I want to get a context-param configure in my web.xml. In a method call normally (with seam 2.2.0), I do this:
readDirectory = (String) FacesContext.getCurrentInstance()
.getExternalContext().getInitParameter(
"ReadDirectory");
It's work fine, but in asynchronous method (@Asynchronous)...
Hi Folks,
I'll start with an example snippet:
self.addwidget({
box: ns.box({
text: 'Foobar',
fromTop: ~~(Math.random()*window.innerHeight),
fromLeft: ~~(Math.random()*window.innerWidth),
toTop: 240,
toLeft: ...
Hi everyone,
I am currently using eclipse and Mylyn. My problem is that when I change the level of interest required for an item to show up in mylyn context, I cannot get eclipse navigator to accept the new settings. In fact, if I close the task and open it again, the degree of interest meter-thingy has reset itself. The only solution ...
Hi , I am new to this and am just trying to understand the with statement.I get to understand that it is supposed to replace the try except block.Now suppose I do something like this:-
try:
name='rubicon'/2 #to raise an exception
except Exception,e:
print "no not possible"
finally:
print"Ok I caught you"
Now how do I replace ...
Hi all,
This might be a simple question, but i've been looking around and can't find the answer,
well, as my title said, is there any code to show the context menu on the android from a code, instead press the menu button? eg. when i touch the screen then it'll call the context menu?
Regards,
AnD
...
I try to display a Toast inside a AsyncTask.
This first piece of code is placed in an activity that we may call MyActivity, and works fine:
Toast.makeText(this, "Toast!", Toast.LENGTH_SHORT).show();
Then I create a new instance of MyObject and calls method(). This code is also placed in MyActivity.
MyObject obj = new MyObject(this);...
I am using WebView in an ActivityGroup and it will throw an exception if WebView show Dialog and complain the activity is not valid. But it's okay if I set the context of the WebView to the TOP activity. So I wish to know how to set the context in the layout xml ?
...
I have a Windows.Forms application and we need to use one session and keep it opened, because our application is a legacy product that we're moving to NH.
Here is the code that gets a session:
public static ISession GetCurrentSession()
{
ISession session;
if ( CurrentSessionContext.HasBind( SessionFactory ) )
{
ses...
My JSF application works in my local tomcat for URL like http://localhost:8080/MyApp/admin, but not on the hosting server, the URL there is http://www.myapp.com/admin
Do I need to do something with 'context.xml'/ put BocBase & AppBase. I got these things googling, but could not understand what exactly I have to do. Can anyone help me wit...
Inside a webservice defined like
@WebMethod
public ResponseType myMethod()
{
...
}
How can I get the calling url? In a http servlet I can use the ServletRequest object to get the url with something like request.getRequestURL().
Thanks,
Adam
...
I followed the instructions and examples on Android website to create a context menu but mine shows up completely black and i cannot change any options in it ; anyone out there had the same experience and can help me solve this issue.
FWIW, here are my class .java and the menu .xml files
<?xml version="1.0" encoding="utf-8"?>
<menu xml...
Android API level 8 introduced the Context.getExternalFilesDir() method, providing a File object reference to an SD card path specific to your app. I am wondering how to mimic this as low as API level 5.
I see there is a Context.getDir() method, but I can't tell from reading about it how this differs.
...
In my JSF application, I have a sub-context 'admin' and I have some pages under 'web/admin' folder. I am able to access all the pages under 'web' with the URL www.abc.com but I am getting 'requested resource not found' for the request www.abc.com/admin.
I could make out that this is the issue with the 'context' specification in 'context...
in my war's META-INF/context.xml I have:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/foobar" docBase="my-long-war-name"/>
I deploy my war to the webapps/ directory and I confirm that my contex.xml is in %CATALINA_HOME%\conf\Catalina\localhost with the name my-long-war-name.xml
Now, instead of accessing my REST service thr...
I'd like to extend Application in my Android app. I've done this such that I've created an extended Application object called MyApplication and added it to the manifest.
I'd now like to add some getters and setters to hold some information. It looks like I'll need to pass the application Context to any classes which do not contain a C...
Hi all,
I would like to have my own contexts for some CDI-based projects. I need (want) custom scopes so that I can isolate the how long a component lives and where.
To implement your own context, you need to implement the Context interface which is pretty self-explanatory, but how or where to you really define when it is created?
Th...
There are a ton of activity stack related questions on StackOverflow, but I didn't really see any that answered the question I have. I'm working on an online game that (for now) has 3 different activities:
Login/Register
Menu (seen when logged in, includes "new game", "my stats", and a few other things...I'm just worried about the "ne...
Greetings,
I am trying to implement a "context" system similar to the one used by GitHub. For example, a Post may be created belonging either to the User or one of the Companies the User belongs to depending on whether to User is in the "User" context or a context that refers to one of the Companies.
As a part of this, I'd like to be a...
Hello,
I need to implement a method that can measure Time and CPU cycles of context switch between threads in Windows.
Here is my code
#include <stdio.h>
#include <windows.h>
#include <time.h>
LARGE_INTEGER initialTimeStamp, finalTimeStamp, freq;
DWORD ThreadProc(LPVOID lpdwThreadParam)
{
SwitchToThread();
return 0;
}
int main()
...
I am trying to draw a circle using mouse on the canvas using mouse events, but it does not draw anything:
tools.circle = function () {
var tool = this;
this.started = false;
this.mousedown = function (ev) {
tool.started = true;
tool.x0 = ev._x;
tool.y0 = ev._y;
ctx.moveTo(tool.x0,tool.y0);
};
this.mousemove = function (ev) {
var center...