I have the following jQuery function (simplified):
function doSomething(el, str) {
el.find('.class').text(str));
}
Don't worry about the .text() part, in reality I'm doing something a bit more complicated than that... But since that's irrelevant to my question, I'm just using .text() here as a simple example.
The problem is, everyti...
The following snippet searches for the index of the first occurrence of a value in an array. However, when the parentheses around $index are removed, it does not function correctly. What am I doing wrong?
my ($index) = grep { $array[$_] eq $search_for } 0..$#array;
...
I'm using guids as PK for my entities.
As EF doesn't support the newid() SQL statement, I force a Guid.NewGuid() in my creation methods.
Here is my problem :
I've a table with a clustered unique constraint (2 strings, not PK).
I'm running some code in the same EF context which perfoms operations and adds/links entities, etc.
Is it pos...
Hi,
Anyone got any details on the overhead of a native -> managed context switch in Mono? Namely the overhead caused by calling .NET methods/creating .NET objects using the C API.
Thanks.
...
I need to create an option for all files that would run a batch file located in Windows directory or any other directory.
The batch file will basically delete the files and will also delete it from another server.
I have the batch file wworking just need the context menu option.
Thanks.
...
Simple Painting:
Fingering the iPhone screen paints temporary graphics to a UIView. These temporary graphics are erased after a touch ends, and are then stored into an underlying UIView.
The process is simple:
1) Touch Starts & Moves >>
2) Paint Temporary Graphics on top UIView>>
3) Touch Ends >>
4) Pass Temporary Graphics To under...
I'm currently using EF and am running into this issue:
The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects.
For the page load sequence, I am filling dropdownlists via this:
using (DatabaseEntities db = new DatabaseEntities())
{
MyDictionary = new Dictionary<Guid,...
I am using JBoss4.0.1 and Struts2.1.6
I have an application which have some configuration file(appConfig.xml in folder WEB-INF/config).
This congiuration file contains the relative paths of other files to be read.(other.xml, some.xml etc). Application is deployed as .war inside default/deploy
I have a Utility package that reads the con...
Given a UIImage of any dimension, I wish to generate a square "icon" sized version, px pixels to a side, without any distortion (stretching). However, I'm running into a little snag. Not quite sure where the problem is. Here's what I'm doing so far.
First, given a UImage size, I determine three things: the ratio to use when scaling down...
Hello experts,
I've created webpart with SPGridView but I have one problem with it.
When I click on DateTime column Header, items in the header context dropdownmenu (which appears when you click on the header of the column) aren't sorted correctly.
Datasource is assigned via ObjecDataSource. Filtering on other types of columns (string...
I have two web application running on two different versions of Tomcat. App1 is on Tomcat5 and App2 is on Tomcat6. Is there any way, so that I can make a communication among these two. For example -
If there is a JavaScript file in App2/js/mycode.js, then I would like to refer this from App1/page/mypage.jsp. For both applications I have ...
I created a simple custom context processor that needs to only be run
once per request. After putting in some logging hooks I found that it
is being called twice per request.
Is this a known "feature" that a missed in the docs?
Is it related to the number of templates in the inheritance tree?
Is it a bug in 1.03?
Thanks.
...
The Scenario
Currently I have a c# silverlight business application. The application is hosted in Asp.net using the ADO.Net entity framework and a domain service class to read/write to/from my sql server database.
The Setup
Client UI
In my silverlight client interface I have an autocomplete box which uses a query to get a list of ite...
I have a webservice application .That application did attach a file from remote machine and detach file from local machine.
Its code is as follows
private void attachFile(string file, SoapContext context)
{
System.IO.FileStream fs = System.IO.File.OpenRead(file);
DimeAttachment da = new DimeAttachment("image/jpe...
How I can execute a JavaScript function/piece of code in a specific context which it would see as a global context? This is not the same as changing this (call/apply), this is more like changing 'window'.
Basically, if I have the following code:
(function() { x.value = 5; return value; })()
is there a way to make it work (return 5) w...
Hi,
I'm using Spring's FileSystemXmlApplicationContext in Osgi activator. Unfortunately, it doesn't load any bean from the provided XML files.
I'm sure that it finds the xml configuration files, because I was testing with incorrect name of my xml configuration file, and it threw an FileNotFoundException.
Here is a snippet from my cod...
I am creating an object called "letter" which has multiple "recipients" added to it.
when savechages is called on the context i get this error.
"Entities in 'EchoEntities.LetterRecipients' participate in the 'FK_LetterRecipient_Letter' relationship. 0 related 'Letter' were found. 1 'Letter' is expected."
Also when only adding 1 recipie...
I'm trying to understand why in javascript, you might want to change the context of a function. I'm looking for a real world example or something which will help me understand how / why this technique is used and what its significance is.
The technique is illustrated using this example (from http://ejohn.org/apps/learn/#25)
var object...
I'm using Spring and struts and have the following entry in '/META-INF/context.xml'
<Context cachingAllowed="false" useHttpOnly="true">
<Resource name="jdbc/xxx" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
maxActive="100" maxIdle="30" maxWait="10000"
...
Hi there,
thank you for taking the time to read my question.
I have significantly rephrased my question after some new findings.
My problem is that in my ajax callback, when I set the context of my query to be the returned html of my ajax call, it cannot find any elements.
Some findings:
The problem never occurs in Firefox
The pro...