I have used Maven extensively for my personal projects, but now I have to set it up for a small team of 5-7 developers.
My main question is, what's the recommended approach for managing dependencies to commercial libraries that are not available in the Maven repos? How can I manage the dependency of these commercial libraries on the open source libraries that they use and are available in Maven repos?
Also, are there any other recommendations and advices that I should know or implement to make the setup as efficient, effective, and smooth as possible?
Thanks in advance.
According to Tomcat docs:
The maximum size in bytes of the POST
which will be handled by the container
FORM URL parameter parsing. The limit
can be disabled by setting this
attribute to a value less than or
equal to 0. If not specified, this
attribute is set to 2097152 (2
megabytes).
But what's "the container FORM URL parameter parsing"? Any ideas what is the purpose of "maxPostSize"?
Thanks in advance.
I just wanted to hear the opinion of Hibernate experts about DB schema generation best practices for Hibernate/JPA based projects. Especially:
What strategy to use when the project has just started? Is it recommended to let Hibernate automatically generate the schema in this phase or is it better to create the database tables manually from earliest phases of the project?
Pretending that throughout the project the schema was being generated using Hibernate, is it better to disable automatic schema generation and manually create the database schema just before the system is released into production?
And after the system has been released into production, what is the best practice for maintaining the entity classes and the DB schema (e.g. adding/renaming/updating columns, renaming tables, etc.)?
Thanks in advance.
Where can I find sample *X*HTML 5 pages? I mainly want to know if it is possible to mix and match XHTML 5 with other XML languages just like XHTML 1 or not. For example is something like this valid in XHTML 5?
<!DOCTYPE html PUBLIC "WHAT SHOULD BE HERE?"
"WHAT SHOULD BE HERE?">
<html xmlns="WHAT SHOULD BE HERE?"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<title><ui:insert name="title">Default title</ui:insert></title>
<link rel="stylesheet" type="text/css" href="./css/main.css"/>
</head>
<body>
<div id="header">
<ui:insert name="header">
<ui:include src="header.xhtml"/>
</ui:insert>
</div>
<div id="left">
<ui:insert name="navigation" >
<ui:include src="navigation.xhtml"/>
</ui:insert>
</div>
<div id="center">
<br />
<span class="titleText"> <ui:insert name="title" /> </span>
<hr />
<ui:insert name="content">
<div>
<ui:include src="content.xhtml"/>
</div>
</ui:insert>
</div>
<div id="right">
<ui:insert name="news">
<ui:include src="news.xhtml"/>
</ui:insert>
</div>
<div id="footer">
<ui:insert name="footer">
<ui:include src="footer.xhtml"/>
</ui:insert>
</div>
</body>
</html>
Thanks in advance.
Is it better to declare fields of a class in this way:
function MyClass() {
this.aMethod = function() {
// code
}
}
Or this way:
function MyClass() {
}
MyClass.prototype.aMethod = function() {
// code
}
Any why?
Thanks in advance.
Hi again , My problem still remains, thanks anyway to make it more clear there is my code:
<%=DTask.LU_TECHNICIAN_TITLE% :
0}"
alert('something')
"/
0}"
alert('something')
"
"
selected="selected"
I would expect this option to exist in PHP - Editor - Save Actions but the only thing available there is to "remove trailing whitespace"...
It's available in JavaScript - Editor - Save Actions but not php :(
Is there a plugin that will let me do this?
I set up various global parameters in Global.asax, as such:
Application["PagePolicies"] = "~/Lab/Policies.aspx";
Application["PageShare"] = "/Share.aspx";
Application["FileSearchQueries"] = Server.MapPath("~/Resources/SearchQueries.xml");
...
I have no problem accessing these variables form .ascx.cs or .aspx.cs file -- ie. files that are part of the Web content. However, I can't seem to access 'Application' from basic class objects (ie. standalone .cs files). I read somewhere to use a slight variations in .cs files, as follows, but it always comes throws an exception when in use:
String file = (String)System.Web.HttpContext.Current.Application["FileSearchQueries"];
The following Spotlight query, correctly returns all archive and ISO files on my system:
kind:iso OR kind:archive
However, Spotlight treats .bin files as archives too and returns .bin files in the results as well.
How can I modify the above query and exclude files that end in bin from the result? I tried the following query but it is not working:
(kind:iso OR kind:archive) AND NOT name:*bin
Thanks in advance.
I have a table with two rows. The first row contains an input and the second row contains a select. Even though I have set their widths to be 100%, the select box is a few pixels smaller than the input. Any ideas why is this so and how can I set their widths to be equal to each other and as big as possible (e.g. %100) in a way that works across all (A-grade) browsers?
<table width="100%" style="margin-top: 5px;">
<tr>
<td width="35"><label for="desc">Description</label></td>
<td>
<input type="text" style="width: 100%;" name="desc" id="desc" />
</td>
</tr>
<tr>
<td width="35"><label for="group">Group</label></td>
<td>
<select id="group" name="group" style="width: 100%; line-height: 17px;">
<option value="val">name</option>
</select>
</td>
</tr>
</table>
Hi all.
I'm trying to create a function that will store and repeat another function given as a parameter for a specific amount of time or repeats given.
But when you want to pass a function as a parameter you have to know all of its parameters before hand.
How would I do if I wanted to pass the function as one parameter, and the parameters as another?
void AddTimer(float time, int repeats, void (*func), params); // I know params has no type and that (*func) is missing parameters but it is just to show you what I mean
Thanks in advance
In some JavaScript code snippets (e.g. http://mckoss.com/jscript/object.htm) I have seen objects being created in this way:
var obj = new Foo;
However, at least at MDC, it seems that the parentheses are not optional when creating an object:
var obj = new Foo();
Is the former way of creating objects valid and defined in the ECMA standard? Are there any differences between the former way of creating objects and the later? Is one preferred over the other?
Thanks in advance.
Does anyone check the domain of an email address as part of their verification steps? eg. Confirm that gmail.com exists if the user specified [email protected] as their address.
I have a website that suddenly started to crash internet explorer.
The website loads and starts executing javascript but somewhere in there the machinery explodes. I don't even get a script error, it just crashes. I've tried to manually step through every single line of js with the built in debugger but then of course the problem doesn't occur.
If i choose to debug the application when it crashes i see the following message.
Unhandled exception at 0x6c5dedf5 in iexplore.exe: 0xC0000005: Access violation reading location 0x00000090.
The top 5 items in the call stack looks like this
VGX.dll!6c5dedf5()
[Frames below may be incorrect and/or missing, no symbols loaded for VGX.dll]
VGX.dll!6c594d70()
VGX.dll!6c594f63()
VGX.dll!6c595350()
VGX.dll!6c58f5e3()
mshtml.dll!6f88dd17()
VGX.dll seems to be part of the vml renderer and i am in fact using VML. I'm not suprised because i've had so many problems with vml, attributes has to be set in specific order, sometimes you cant set attributes when you have elements attached to the dom or vice versa (everything undocumented btw) but then the problems can usually be reproduced when debugging but not now :(
The problem also occurs in no plugin-mode.
Is there a better approach than trial and error to solve this?
Edit:
Adding a console outputting every suspect modification to the DOM made the problem only occur sometimes. (the console is also implemented in javascript on the same page, i'm able to see the output even after a crash as the window is still visible) Apparently it seems to be some kind of race condition.
I managed to track it down even further, and it seems to occur when you remove an object from the DOM too quickly after it's just been added. (most likely only for vml-elements with some special attribute, didn't try further) And it can't be fixed by adding a dead loop in front of removeChild(pretty bad solution anyway), the page has to be rendered by the browser once after the addChild before you can call removeChild. sigh
What's the easiest way to set the font sizes for ALL telerik control to a single value? I believe you can control fonts by modifying the CC of a specific control, but that's a pain because I am using many different control types...
I have defined a class named MyClass and I have defined two methods myMethod1 and myMethod2 for it:
function MyClass() {}
MyClass.prototype.myMethod1 = function() {...};
MyClass.prototype.myMethod2 = function() {...};
Inside myMethod1, I use jQuery and there's a callback closure defined there:
MyClass.prototype.myMethod2 = function() {
$.jQuery({success: function(data) {
this.myMethod2();
}, ...});
}
Now the problem is that this no longer is referring to MyClass. The question is how can I refer to it? At the moment I have assigned it to a variable named thisObj and access it this way:
MyClass.prototype.myMethod2 = function() {
var thisObj = this;
$.jQuery({success: function(data) {
thisObj.myMethod2();
}, ...});
}
Is there a better way to access MyClass.this from the closure nested in myMethod2?
Thanks in advance.
Facelets relies on XML namespaces to work with XHTML. How are HTML 4, and as far as I know, HTML 5 do not support namespaces. Also HTML 5 has some new elements that are not available in XHTML. Even HTML 4 and XHTML have some differences regarding elements and attributes they support.
The question is: Is it possible to render HTML 4/5 documents using Facelets? If so, how?
Does closing a java.sql.Connection also close all the statements, prepared statements, etc. obtained from that connection? Or is there going to be memory leak if I close the connection but leave the statements, etc. unclosed?
At the moment I achieve this using something like this:
var myElem = "<tr id='tr-1'><td>content</td></tr>";
$("#myTable").append(myElem);
$("#tr-1").click(function() {
// blah blah
});
Traditionally, when I wasn't using jQuery, I used to do something like this:
var myElem = document.createElement(...);
var myTable = document.getElementById("myTable");
myTable.appendChild(myElem);
myElem.onclick = function() {
// blah blah
}
The thing is, in the second approach I already have a reference to myElem and I don't have to scan the DOM ($("#tr-1")) to find it, like the jQuery approach, and hence it should be much faster especially in big pages. Isn't there a better jQuery-ish way to accomplish this task?
Hi,
I have a drop down field that if any items of it selected,it would be disabled,after that i submit the form,but then (after submitting) the drop down field dosent have any value, I want to have a value after submit but my drop down field is empty.
Thanks for any help,
(sorry for my English)
I have a function that allow me to generate random password. My function is working well without a puppetmaster. When i tried with a master an error appear when I called the function :
Error 400 on SERVER: bad value for range
Here is my function
module Puppet::Parser::Functions
newfunction(:get_random_password, :type => :rvalue, :doc => <<-EOS
Returns a random password.
EOS
) do |args|
raise(Puppet::ParseError, "get_random_password(): Wrong number of arguments " +
"given (#{args.size} for 1)") if args.size != 1
specials = ((33..33).to_a + (35..38).to_a + (40..47).to_a + (58..64).to_a + (91..93).to_a + (95..96).to_a + (123..125).to_a).pack('U*').chars.to_a
numbers = (0..9).to_a
alphal = ('a'..'z').to_a
alphau = ('A'..'Z').to_a
length = args[0]
CHARS = (alphal + specials + numbers + alphau)
pwd = CHARS.sort_by { rand }.join[0...length]
return pwd
end
end
The function is called in both case with $pwd = get_random_password(10).
When I specified the length directly in the function to 10 for example. the password is well generated in master mode.
Have you any idea why i can't specify the lentgth value ?
Thanks for any help.
I have a text input inside a <td> that has a padding of 5px; When setting its width to 100% it comes out of the boundaries of the <td> for 10px. Is there a way to make it fill the entire <td> (i.e. in practice its width should become 100% - 10px) without using JavaScript?
Thanks in advance
What are some alternative methods to generate 1000 distinct random integers in the range [0,8000] as opposed to the following:
naive method: generating a number and checking if it's already in the array. O(n^2)
linear shuffle: generate sequence 0 to 8000, shuffle, take the first 1000. O(n)