context

CALayer and obtaining currentcontext of its UIView

I try to learn the drawing process in UIView in iphone. as I understand the drawing process accurs only if the method [UIView drawRect] exists. it starts with [CALayer display] and from within that method [UIView drawRect] is called (to be precise :first [UIView drawLayer:layer inContext:context] is called and from within this method ...

How can I resolve this case of `Useless use of a variable in a void context`?

How can I resolve this case of Useless use of a variable in a void context? For example: my $err = $soap_response->code, " ", $soap_response->string, "\n"; return $err; I get warnings like Useless use of a variable in a void context? Why? How can I resolve it ? ...

How do I force a UIImageView and its subviews to redraw in a new context?

kSBCanvas is a SBCanvas, which is a subclass of UIImageView. It has a few UIImageView subviews. It all renders great to the iPhone screen. I need composite the kSBCanvas and its subviews to an imageview that I want to write to disk. I do the following: UIGraphicsBeginImageContext(kSBCanvas.bounds.size); [kSBCanvas drawRect: [kSBCa...

two context problem

Hi! I'm new here and hope you can help me a little. I use two contexts: <Context docBase="Base1" path="/Con1" reloadable="true"/> <Context docBase="Base1" path="/Con2" reloadable="true"/> Is it possible to start the tomcat in a way that we use just one context but we can somehow keep the other context? (maybe unvisible for the serv...

How to do context help ("what is this?" button) in WinForms?

How to make "what is this?" button like those in top-right corner of dialog boxes. I cant set Form.HelpButton to true because I have Minimize & Maximize buttons there. ...

How to get HTML with “JavaScript enabled”?

I would like to get the HTML code from a page with PHP. So I do this: $url = 'http://en.wikipedia.org/wiki/New_York_City'; $html = file_get_html($url); The problem is, Wikipedia doesn't send the <script> tag to the PHP request, so it doesn't show the JavaScript. I guess that's because Wikipedia sees that the "requester" doesn't have J...

Spring context XML validator for eclipse?

Hi, Is there any way to validate spring context xml files in eclipse? Features like: Validate class attribute of bean Validate bean references Validating with autowireing perhaps? We're not working with annotations on current project unfortunatly. I dislike the current workflow: "deploy it and get a nullpointer for a classname typo"...

How to access sprint context in jUnit tests annotated with @RunWith and @ContextConfiguration?

I have following test class @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"/services-test-config.xml"}) public class MySericeTest { @Autowired MyService service; ... } Is it possible to access services-test-config.xml programmatically in one of such methods? Like: ApplicationContext ctx = somehowGet...

HttpModule to Write Out JavaScript Script References to the Response

On my page in the Page_Load event I add a collection of strings to the Context object. I have an HttpModule that will fire EndRequest and retrieve the collection of strings. What I then do is write out a script reference tag (based on the collection of strings) to the response. The problem is that the page reads the script reference but ...

Android change context for findViewById to super from inline class

I am trying to get the value of a EditText in a dialog box. A the "*"'ed line in the following code, the safeNameEditText is null; i am assuming because the 'findVeiwById' is searching on the context of the 'AlertDialog.OnClickListener'; How can I get/change the context of that 'findViewById' call? protected Dialog onCreateDialog(int...

Calling generic method in spring.net application context

Hi, I'm trying to invoke this method in spring.net, but i'm having trouble getting the configuration right. Method: public void AddRepository<TEntity>(IRepository<TEntity> repository) where TEntity : IEntity { Repositories.Add(repository.GetType().Name, repository); } Config: <object type="Spring.Objects.Factory.Config.Method...

Core Data: Merging multiple Managed Object Contexts and deleting objects

I have an iPhone project where I have a series of Managed Objects in a Managed Object Context within the main application thread. On a separate thread, I import new objects from a webserver into a second Managed Object Context. If the import goes ok without errors, I save the import context. This triggers contextDidSave from which I c...

What is a Context in iPhone?

Can any body explain me what is a Context and how can i use it? There is also Graphics Context (CGContextRef).Is there any relation between Context and Graphics Context? ...

Detect Applet context (am I inside an applet?)

Hi, I'm wondering if there's a way for a Java class to figure out if it is being used within an applet? That is, I have a library (a .jar file) that can be used by 3rd-party applications and applets. It does work within applets, but I'd like to do some things differently, depending on whether or not the library is used in an applet - ...

Border image on UIView

I want to have a UIView subclass that has a border image, but i dont want or care about this 'new' frame/bounds around the border image itself. What i wanted to do was just use drawRect and draw outside of the rect but all drawing is clipped and i dont see a way to not clip drawing outside of this context rect. So now i have added a su...

Passing context between templatetags, django

Hi overflowers, I am using django to create a web-application. I have created a template in where I load a templatetag. In this templatetag i load another templatetag. From the template I pass context to the first templatetag, but the context is not available from the second templatetag (inside the first templatetag) - see below. I ho...

Django: request object to template context transparancy

Hi! I want to include an initialized data structure in my request object, making it accessible in the context object from my templates. What I'm doing right now is passing it manually and tiresome within all my views: render_to_response(...., ( {'menu': RequestContext(request)})) The request object contains the key,value pair which i...

need to get the context value in top of page, where the context value will be set only at the bottom of the page?

<script runat="server"> protected void Page_Load(object sender, EventArgs e) { Response.Write("Page Load:"); } public string setContext(string sName, string sVal) { HttpContext.Current.Items[sName] = sVal; return sVal; } public string getContext(string sName) { st...

Regexp: Replace only in specific context

In a text, I would like to replace all occurrences of $word by [$word]($word) (to create a link in Markdown), but only if it is not already in a link. Example: [$word homepage](http://w00tw00t.org) should not become [[$word]($word) homepage](http://w00tw00t.org). Thus, I need to check whether $word is somewhere between [ and ] and on...

Tomcat 5.5 - multiple contexts using same path

Is it possible to set up multiple contexts using the same path? For example: <Context docBase="/www/websites/site1/java/base" path="/base" reloadable="true"/> <Context docBase="/www/websites/site2/java/base" path="/base" reloadable="true"/> ...