We have an rich client application running with dojo 1.2.x.
Sometimes users are pasting comments from their word 2007 into an textfield.This is an repeating source for errors with displaying this comments inside an an dojox.grid.
Is there any "javascript" way to stop users pasting from word?
First of all I don't know if it this question belongs here if not please tell me.
I've recently evolved from freelancer to a small .net/php development shop and we're trying to figure out what the best tools for team development will be (code repository, continuos integration server, automated testing, etc.).
Do you have some recommendations, preferible open source or low cost since we are starting out. (We already have visual studio for all the team members).
Thanks
I have an Image control in my Flex application:
<mx:Image id="img" source="@Embed('img.png')"
percentHeight="100" percentWidth="100" />
Because the image is scaled, there are a lot of scaling artifacts. Can I change the image to use a different type of filtering?
I need to modify a GLib's time-out interval while it is in execution. Is that possible? I took a look to the source code and it seems possible to me, but is required use some non-public functions from GLib internals. Should I reimplement GTimeoutSource or there are a way to do it?
I am using aptana radrails
empty rail project :
scaffold Article titre:string body:text categorie_id:integer ordre:integer
Migrate - it works fine
scaffold Categorie titre:string ordre:integer
It generate the files but when i access http://127.0.0.1:3000/categories i have the following error :
NameError in Categories#index
Showing app/views/categories/index.html.erb where line #22 raised:
undefined local variable or method `new_categorie_path' for #
Extracted source (around line #22):
19:
20:
21:
22: <%= link_to 'New categorie', new_categorie_path %
i deleted recreated my whole rails project a few times, changed categorie with another name but it keep failling. Why ?
I am playing sound with OpenAL, and it seems to increase memory footprint dramatically for every little sound I play. It seems that OpenAL never frees memory itself and that playing a Source causes memory footprint to grow.
I couldn't find any good resources about OpenAL memory management, but I bet I must do a lot of stuff myself. Maybe someone knows a ressource for that?
Using Hibernate + annotations, I'm trying to do the following:
Two entities, Entity1 and Entity2.
Entity1 contains a simple generated value primary key.
Entity2 primary key is composed by a simple generated value + the id of entity one (with a many to one relationship)
Unfortunately, I can't make it work.
Here is an excerpt of the code:
@Entity
public class Entity1 {
@Id @GeneratedValue
private Long id;
private String name;
...
}
@Entity
public class Entity2 {
@EmbeddedId
private Entity2PK pk = new Entity2PK();
private String miscData;
...
}
@Embeddable
public class Entity2PK implements Serializable {
@GeneratedValue
private Long id;
@ManyToOne
private Entity1 entity;
}
void test() {
Entity1 e1 = new Entity1();
e1.setName("nameE1");
Entity2 e2 = new Entity2();
e2.setEntity1(e1);
e2.setMiscData("test");
Transaction transaction = session.getTransaction();
try {
transaction.begin();
session.save(e1);
session.save(e2);
transaction.commit();
} catch (Exception e) {
transaction.rollback();
} finally {
session.close();
}
}
When I run the test method I get the following errors:
Hibernate: insert into Entity1 (id, name) values (null, ?)
Hibernate: call identity()
Hibernate: insert into Entity2 (miscData, entity_id, id) values (?, ?, ?)
07-Jun-2010 10:51:11 org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: null
07-Jun-2010 10:51:11 org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: failed batch
07-Jun-2010 10:51:11 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
SEVERE: Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at test.App.main(App.java:32)
Caused by: java.sql.BatchUpdateException: failed batch
at org.hsqldb.jdbc.jdbcStatement.executeBatch(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(Unknown Source)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247)
... 8 more
Note that I use HSQLDB.
Any ideas about what is wrong ?
I have downloaded and install a python library, via setup.py , python2.5 setup.py install ...
now the version is changed at the source . a newer library is available. originally , i have clone it via mercurial, and install it. right now , i have updated repository.
how do i use the newer version ? overwrite the installation ?
by simply doing setup.py install again ?
I travel a bit and I'm looking for a hosted vcs with good support for Visual Studio. My projects aren't open source so I need security as well. Any recommendations or suggestions? Thanks
Hi
I want to write a video editing software, and the "logical" conclusion is that the language I must to use is C++... But I don't like it (sorry c++ fans)
I would like to write it with something cool, like Lisp or Haskell or Erlang... But I don't know if the open source implementation of those languages (I don't have money to buy licenses) let me made a competitive software (in the performance area)
What do you think? what do you recommend?
I recently read the source code of couch-db, I find this type definition which i don't understand:
-type branch() :: {Key::term(), Value::term(), Tree::term()}.
-type path() :: {Start::pos_integer(), branch()}.
-type tree() :: [branch()].
I did read Erlang doc, But what is the meaning of Start, Key, Value and Tree? From what i understand, they are Erlang variables! I didn't find any information about this in Erlang doc.
An exception got thrown from a lib I use in my project. As I looked at the callstack, I clicked at the lib function that threw the exception. An "Open File" dialog popped up, prompting me to tell it where the lib source is located. Now clearly something is wrong. This should happen automatically somehow. How do I tell VS where to look for all files from that lib?
Hello,
I have a web application which is developed in cakePHP, but from last few week, a virus is affected to the site and its not showing any pages. even if we go to the source code, nothing is there to display.
I have checked the index.php, there is no extra entry. Can some help me to find out the solution. and, how can i prevent these virus attacks?
Thanks in advance
Is this the right way to go about referencing a file in a parent directory relative to a php source file?:
require_once('../referenced_file.php');
I don't seem to have any effect doing the above.
I had been told to deploy a *.war file within tomcat and this application should be working fine.
But for an unknown reason all I get is:
System Exception: javax.servlet.jsp.JspException: ValidatorResources not found in application scope under key "org.apache.commons.validator.VALIDATOR_RESOURCES"
I know that this application has been developed with STRUTS and I can obtain the source. But as I am not a specialist in this field, I come to ask for some help.
Could you tell me what file could generate this exception please?
Can you recommend any good open source editor/display templates (mostly editor), preferrably utilising jQuery.
Like AutoComplete, datePicker, color picker, multi-select, grids, trees etc.
Thanks in advance
Why are joins bad or 'slow'. I know i heard this more then once. I found this quote
The problem is joins are relatively
slow, especially over very large data
sets, and if they are slow your
website is slow. It takes a long time
to get all those separate bits of
information off disk and put them all
together again.
source
I always thought they were fast especially when looking up a PK. Why are they 'slow'?
I'm using the post-receive-email script included with git. (Source is here.) It works just fine, but I want each email to be sent from the author of the commits pushed. How do I do it?
My post-receive file currently looks like this, and I want to customize the from-email-address.
#!/bin/sh
export [email protected]
$(dirname $0)/post-receive-email
I need to source some graphics/icons for my application I'm writing (Windows WinForms). I need graphics for toolbar buttons, icons for form headers and graphics for wizard dialog boxes.
As a last resort I'm willing to create them myself - a move that might make them (and my whole application) look amazingly bad.
What are some good sources (free or not) where I can get these kinds of programmer icons? I'd like the icons to be at least 32x32 256 color.
I want to build a regex that matches PHP-style error messages in HTML source code.
Does anybody know of one that exists or how I can create a list of possible PHP error outputs?
Hi... I'm looking for an application developed in C# with following qualities, which is available as source code...
Based on OO Architecture
Must connect to DB.
Must handle atleast a "one to many master child" relationship (eg: Order and items ordered)
Should display the data using Datagrid or other similar controls.
Reports (either with report buider or otherwise)
I want to understand the layering of objects better... Do you have any links...
Thanks.
Hi all,
Now I have my website built on PHP & Mysql. Consider this like a forum. Now when a user posts a reply in my website 1 (ex. www.website1.com), I want to be able to show the starting thread and it's related replies in a sister website of mine. I want to do this in a way that it does not show the rest of the page & other page contents (like logo etc.). I don't think iframe would be a solution because an iframe would embed the whole page and the users visiting my sister website (totally different domain i.e. www.website2.com) would be able to see all the page contents, like logo etc. I want to avoid that. I want to make them see only limited information from website 1 and only the info. that I intend.
I hope that makes sense. In a way, you could say that I am trying to replicate my 1 website, and show only a limited part of it. Users browsing 2nd website can post a reply in the 2nd website and it should automatically be posted & visible to the visitors of the website 1. Users of website 1 should not know that a user of website 2 has posted it. They would feel that some user from website 1 has posted it. Do I have to use 2 separate mysql DB or just 1? I think it would be problematic if I am trying to use different DB. I also feel I might have to face DB connectivity issues as I can connect to only 1 DB at a time.
It's basically like users of website1.com should feel that they are replying to users of website1.com & users of website2.com should feel that they are replying to users of website2.com. (I need it this way to bridge the gap between them). At the same time I want to make the front end of the websites different so that they don't feel that they are replying to some other users outside the domain. These websites would be under my control and I will have access to the source code at any time. If I need to change the source code, these changes are welcome.
Is this really possible?
Thank you in advance.
I am using LINQ expressions in my code
like this
var obj = Collection.Single(collection = (collection.ShortName.Equals("AAA")));
The problem is that this line works fine for me, no problems.
But when I upload the same executable to some remote machine with same 32 bit Windows XP. The code execution is just stopping at this line of source.
Can anyone help me.
I need to find the Name and speed of the processor on my machine. I'm building an open source help desk suite and finding this really entertaining!
Thanks for the help guys!