can one map all the application's objects to a UML map (maybe parsing through the code base) so one can have the objects visualized and see all the relations and the design patterns used?
I am looking for more complete sample code on how TeeFilter of Logback can be used to log HTTP messages.
I am trying to add this support to my Spring 3 (MVC)/Hibernate 3/Annotations Maven2 project. I have the config and xml files but I need to know where and how I can trigger this Filter to do the job for me in the Spring MVC framework.
Any help will be greatly appreciated.
I have been struggling in fixing this code, wonder what is wrong at all...
var tips = "<p class="adobe-reader-download">Most computers will open PDF documents automatically, but you may need to download <a title='Link to Adobe website-opens in a new window'";
tips +=" href='http://www.adobe.com/products/acrobat/readstep2.html' target='_blank'>Adobe Reader</a>.</p>";
if($("div#maincontent a[href*='.pdf']").length>0){
$("div#maincontent").children(":last-child").after(tip);
hello
I was wondering how to assign a style via code in adroid.
suppose I have a TextView created with the following snippet:
TextView myText = new TextView(this);
how do I assign the class xxx so that myText will be styled like an hard coded TextView like this:
<TextView style="@style/xxx" />
thanks
SELECT *
(
SELECT *
FROM `table1`
WHERE `id` NOT IN (
SELECT `id` FROM `table2`
WHERE `col4` = 5
)
group by `col2` having sum(`col3`) > 0
UNION
SELECT *
FROM `table1`
WHERE `id` NOT IN (
SELECT `id` FROM `table2`
WHERE `col4` = 5
)
group by `col2` having sum(`col3`) = 0
) t1;
For readability and performance reasons, I think this code could be refactored. But how?
Hi,
Just wondering, would the following code arrangement cause any issues when calling mysql_connect, i.e.:
public function connect() {
mysql_connect($this->host,
$this->username,
$this->password)
or die("Could not connect. " . mysql_error());
or does it need to be all on one line, i.e.:
mysql_connect($this->host,$this->username,$this->password) or die("Could not connect. " . mysql_error());
Thanks.
hey in my application i use web browser component on a windows form and display any website that user types in say "google.com"
but that website does not fit in properly with the screen size
how can i do that through code?
i cant find any property of windows mobile...
can somebody help!
I am new to iPhone development. I just registered with Apple for the iPhone Developer Program. When I try to build, I am receiving an error:
Code Sign error: a valid provisioning profile matching the application’s identifier could not be found
I'm not sure what is wrong. I tried browsing the Internet but I get confused. Can anyone help me with what I should do?
I'm working on a data mining research project and use code from a big svn.
Apparently one of the methods I use from that svn uses randomness somewhere without asking for a seed, which makes 2 calls to my program return different results. That's annoying for what I want to do, so I'm trying to locate that "uncontrolled" randomness.
Since the classes I use depend on many other, that's pretty painful to do by hand. Any idea how I could find where that randomness comes from ?
function checkLength(obj,url){
//alert("URL="+url+" OBJ="+obj);
if(obj) {
var params = 'query='+obj;
var myAjax = new Ajax.Request(url, {
method: 'post', parameters: params, onComplete: loadResponse
});
}
}
The code isn't working, but I don't know why. I think I need to include other files, but I don't know which
TinyMCE not working in ie with this js code. How can I solve the problem. Thanks in advance
<script type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugin : "tinyBrowser, media",
file_browser_callback : "tinyBrowser",
});
function toggleEditor(id) {
if (!tinyMCE.get(id))
tinyMCE.execCommand("mceAddControl", false, id);
else
tinyMCE.execCommand("mceRemoveControl", false, id);
}
</script>
I know i can simulate a memory warning on the simulator by selecting 'Simulate Memory Warning' from the drop down menu of the iPhone Simulator. I can even make a hot key for that.
But this is not what I'd like to achieve. I'd like to do that from the code by simply, lets say doing it every 5 seconds. Is that possible?
Under WindowsCE, C++ project, I'd like to get CPU utilization and memory allocation data real time - for logging and troubleshooting. Is there a library or activeX available that i could include in my code and use [without bringing my process to a halt, preferably], anyone knows?
thanks much for any insight!
O.
I know there are tools like Salamander that can compile a .NET WinForms apps to fully native code with no need for the CLR/.NET Framework to be on a machine. Is this possible for WPF apps as well?
I'm creating a ZK Web application which uses Spring Security for authentication and I'm trying to implement a create user function, where the administrator supplies the details and the user account is created. I've got to the part where I want to put this data into the database, but now I'm thinking I shouldn't hard code the connection to the database, there must be a way to get the connection details from the Spring Security configuration. Is there? If so how?
We are trying to install:
http://www.activecampaign.com/activespell/
But are getting this JS error:
[CPAINT Error] invalid HTTP response code '404'
It seems the ajax is unable to access something, but not sure what or why, anyone experienced this problem before?
I've been thinking if there's a way how to speed up freeing memory in .NET. I'm creating a game in .NET (only managed code) where no significant graphics is needed but still I would like to write it properly in order to not to lose performance for nothing.
For example is it useful to assign null value to objects that are not longer needed? I see this in a few samples over Internet.
Thanks for answers!
I'd like to run user supplied ruby code in server, what are the potentially nasty things that can happen? I mean things like deleting files etc. Can you give me more examples?
Thanks in advance!
What is the correct way of knowing operating system language (locale) from java code?
I have tried
Locale.getDefault()
System.getProperties("user.language")
etc.
but they are not correct nothing actually displays the "System Locale" which is available by the command "systeminfo" in windows.
Please help.
Does anyone know of a Windows Mobile 7 device aimed at business use?
I’m looking for something with bar code scanning capability.
Psion, hand held, and honeywell only offer 6.5 at the moment.
Granted, Windows Mobile 7 just barely came out and these sorts of devices usually lag a bit behind consumer toys...but hopefully someone can help.
I'm a bit perplexed by some code I'm currently writing. I am trying to preform a specific gradient descent (main loop included below) and depending on the initial conditions I will alternatively get good looking results (perhaps 20% of the time) or everything becomes NaN (the other 80% of the time). However it seems to me that none of the operations in my code could produce NaN's when given honest numbers!
My main loop is:
// calculate errors
delta = m1 + m2 - M;
eta = f1 + f2 - F;
for (int i = 0; i < numChildren; i++) {
epsilon[i] = p[i]*m1+(1-p[i])*m2+q[i]*f1+(1-q[i])*f2-C[i];
}
// use errors in gradient descent
// set aside differences for the p's and q's
float mDiff = m1 - m2;
float fDiff = f1 - f2;
// first update m's and f's
m1 -= rate*delta;
m2 -= rate*delta;
f1 -= rate*eta;
f2 -= rate*eta;
for (int i = 0; i < numChildren; i++) {
m1 -= rate*epsilon[i]*p[i];
m2 -= rate*epsilon[i]*(1-p[i]);
f1 -= rate*epsilon[i]*q[i];
f2 -= rate*epsilon[i]*(1-q[i]);
}
// now update the p's and q's
for (int i = 0; i < numChildren; i++) {
p[i] -= rate*epsilon[i]*mDiff;
q[i] -= rate*epsilon[i]*fDiff;
}
This behavior can be seen when we have
rate = 0.01;
M = 30;
F = 30;
C = {15, 25, 35, 45};
with the p[i] and q[i] chosen randomly uniformly between 0 and 1, m1 and m2 chosen randomly uniformly to add to M, and f1 and f2 chosen randomly uniformly to add up to F.
Does anyone see anything that could create these NaN's?
Hi
this is my code which will not work correctly ! what is wrong with its data type :( thanks
CREATE TABLE T1 (A INTEGER NOT NULL);
CREATE TABLE T3 (A SMALLINT NOT NULL);
INSERT T1 VALUES (32768.5);
SELECT * FROM T1;
INSERT T3 SELECT * FROM T1;
SELECT * FROM T3;
I want to load third-party jni library in runtime.
I've tried to load directly from sdcard. It expectedly failed.
I've tried to copy library from sdcard to /data/data/app/ and then
System.load(/data/data/libjni.so)
It works on HTC HERO, but fails on HTC Legend with Android 2.1.
it fails during execution of native code and write to log uninformative stack trace
Any other way to do it?