context

Django template tag basic question

It looks like this template tag works like a charm for most people: http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/ For some reason I get this error: Caught an exception while rendering: 'is_paginated' I use this template tag in my template like so: {% load digg_paginator %} {% digg_paginator %} Where di...

calling WinForms contextmenustrip programmatically

I programmatically create a Picture Box in c# windows program. I assign it with a value for the Tag property. I would like to print out that tag number programmatically, just for test purposes. so I try this: private void Form1_Load(object sender, EventArgs e) { pic.ContextMenuStrip = contextMenuStrip1; pic.ContextMenuStrip.Clic...

OpenGL Viewer Control & Rendering Contexts

I have built an OpenGL Viewer control that can simply be dropped onto a windows form (at design time) and assigned an OpenGL display list (at run time). The viewer control handles navigation, display options (e.g. background color), etc. It is also responsible for creating and destroying rendering and device contexts as necessary. Obv...

Selenium IDE - how to customize right click context menu

On right click, the context menu appears and provides few selenium commands. It does not provides all selenium commands. The list of commands is dynamic and gets updated with mostly used selenium commands. I want to make the command list static for context menu. Any idea how can I do that? Any help will be appreciatetd. ...

Entity Framework - refresh objects from database

I'm having trouble with refreshing objects in my database. I have an two PC's and two applications. On the first PC, there's an application which communicates with my database and adds some data to Measurements table. On my other PC, there's an application which retrives the latest Measurement under a timer, so it should retrive measure...

jQuery: Trying to write my first plugin, how can I pass a selector to my func?

Hi, I am trying to start writing some simple jQuery plugins and for my first try if figured I would write something that does nothing else but apply .first & .last classes to passed elements. so for instance i want to ultimately be able to: $('li').firstnlast(); So that in this html structure: <ul> <li></li> <li></li> <...

Using beans from another project

Hello; I'm a novice on spring, i started to develop a new application with 2 modules, each one is a project, the first one is a java project, it contains the services beans declared in a servicescontext.xml, the second prpject is a web application that use the first project. I need to declare beans in the web application that use the se...

How do I use Perl's localtime with print to get the timestamp?

I have used the following statements to get the current time. print "$query executed successfully at ",localtime; print "$query executed successfully at ",(localtime); print "$query executed successfully at ".(localtime); Output executed successfully at 355516731103960 executed successfully at 355516731103960 executed succes...

jQuery HOW TO?? pass additional parameters to success callback for $.ajax call ?

Hello jQuery Ninjas! I am trying, in vain it seems, to be able to pass additional parameters back to the success callback method that I have created for a successful ajax call. A little background. I have a page with a number of dynamically created textbox / selectbox pairs. Each pair having a dynamically assigned unique name such as...

AOP and .NET: Is Contexts an obsolete concept?

Recently I've started learning about Contexts in .NET (context-bound, context-agile, message sinks, etc.). Several alarm bells started ringing: All context-bound classes are derived from ContextBoundObject, which in turn is derieved from MarshalByRefObject. MarshalByRefObject is a part of the .NET Remoting architecture. The .NET Remot...

jQuery add() function and the context of jQuery objects

Given the following HTML example... <div id='div1'>div one</div> <div id='div2'>div two</div> ...I found that the following jQuery code... $('#div1').click(function() { var $d = $(this); // Using 'this' instead of '#div1' $d.add('#div2').remove(); }); ...would not add #div2 to the set referenced by $d, but this code......

Scala closure context

I am not a Groovy expert, but I did read the book "Groovy in Action". In Groovy, each closure comes with a "context", where the items inside the closure can get access to pseudo-variables like "this", "owner", and "delegate", that let the items know who called the closure. This allows one to write DSLs like this (from Groovy in Action): ...

Alfresco SDK example fails

Hello everyone ! My problem is that when I launch the "First Foundation Client" from the SDK I get an error at runtime which looks like Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexerComponent' defined in class path resource [alfresco/core-services-context.xml]:...

Nested multithread operations tracing

I've a code alike void ExecuteTraced(Action a, string message) { TraceOpStart(message); a(); TraceOpEnd(message); } The callback (a) could call ExecuteTraced again, and, in some cases, asynchronously (via ThreadPool, BeginInvoke, PLINQ etc, so I've no ability to explicitly mark operation scope). I want to trace all operati...

Is there a dojo enhanced grid example with context menu

I am looking for an example of a dojo enhanced grid that contains a context menu on either a cell or row menu where the cell or row data is accessed. I have managed to create an enhanced grid with a row context menu. I can create a function that captures the event of clicking on the row menu item. However, I am not sure how to access ...

What is the difference between an object's scope and it's context in javascript?

In the vernacular, scope and context have a lot in common. Which is why I get confused when I read references to both, such as in the quote below from an article on closures: Scope refers to where variables and functions are accessible, and in what context it is being executed. (@robertnyman) As far as I can tell, context is just ...

Context module for block visibility

I have a site built in Drupal 6 that requires a number of blocks that are only visible to certain roles or on specific pages. Normally, I would use the block configuration settings to control page and role visibility. However I recently ran across the context module that effectively splits the site into "sections" or "groups" of related ...

JavaCC: How can I specify which token(s) are expected in certain context?

Hello, everyone! I need to make JavaCC aware of a context (current parent token), and depending on that context, expect different token(s) to occur. Consider the following pseudo-code: TOKEN <abc> { "abc*" } // recognizes "abc", "abcd", "abcde", ... TOKEN <abcd> { "abcd*" } // recognizes "abcd", "abcde", "abcdef", ... TOKEN <element1...

Ruby equivalent to "grep -C 5" to get context of lines around the match?

I've searched for this a bit but I must be using the wrong terms - does ruby have a way to grep for a string/regex and also return the surrounding 5 lines (above and below)? I know I could just call "grep -C 5 ..."or even write my own method, but it seems like something ruby would have and I'm just not using the right search terms. ...

Reference to Window in Android

How do you get a reference to the window from outside of an Activity or from the context? Is it possible to access the window without having a reference to an activity? ...