Very similar to this question, except for Java.
What is the recommended way of encoding strings for an XML output in Java. The strings might contain characters like "&", "<", etc.
I have a email address like [email protected] and [email protected][email protected] ... etc
I want a Mysql select query so that it would trim user names and .com an returns output as
gmail,ymail,hotmail etc
I'm beginning to work on a project which has some extensive XML XSLT processing to render output HTML.
Some changes need to be made to the XSLT and I need some tool that can help me modify it without having to run the solution every time. Something that can help me visualize the changes I'm making to the rendered HTML.
I've found StylusStudio but I preferably would want a freeware that I could use
Hello!
In my Ubuntu 10.10, following this tutorial, I don't face step 2. I mean, while installing the packets, I don't face anything related to configuration.
Then, when I run a command, such a
mysql -u root -p
, I get this error:
ERROR 2002 (HY000): Can't connect to
local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
As I see in other treads,
ps aux | grep mysqld
gives me just this output:
1000 4508 0.0 0.0 5172 760 pts/0 S+
19:53 0:00 grep --color=auto mysqld
What is happening??
Thanks in advance
Are there any example log4j configuration files (XML).
I have a java main application.
I want log4j to output to console AND write to file.
Any examples of this would be greatly appreciated.
I'm using netbeans if that matters.
I need to get a path to the GIT on Max OS X 10.6 using Python 2.6.1 into script variables. I use this code for that:
r = subprocess.Popen(shlex.split("which git"), stdout=subprocess.PIPE)
print r.stdout.read()
but the problem is that output is empty (I tried stderr too). It works fine with another commands such as pwd or ls.
Can anyone help me with that?
In the following script, I get the "stop message received" output but the process never ends. Why is that? Is there another way to end a process besides terminate or os.kill that is along these lines?
from multiprocessing import Process
from time import sleep
class Test(Process):
def __init__(self):
Process.__init__(self)
self.stop = False
def run(self):
while self.stop == False:
print "running"
sleep(1.0)
def end(self):
print "stop message received"
self.stop = True
if __name__ == "__main__":
test = Test()
test.start()
sleep(1.0)
test.end()
test.join()
I have a file containing data as follows
10 20 30 40 70
20 30 70
30 40 10 20
29 70
80 90 20 30 40
40 45 65 10 20 80
45 65 20
I want to remove all subset transaction from this file.
output file should be like follows
10 20 30 40 70
29 70
80 90 20 30 40
40 45 65 10 20 80
Where records like
20 30 70
30 40 10 20
45 65 20
are removed because of they are subset of other records.
Hi,
I am developing an application in Netbeans, and it is using JavaDB. I can connect to it and execute queries without issues, but for some reason, the "Output - JavaDB Database Process" pane within Netbeans keeps displaying
Security manager installed using the Basic server security policy.
Could not listen on port 1527 on host localhost:
java.net.BindException: Address already in use
How do I find out what process is already using, or bound to that port?
On Ubuntu Karmic, Netbeans 6.7.1
Can anyone tell me why the output of this class is 'xa'?
why the other exception won't be caught?
public class Tree {
public static void main(String... args){
try
{
throw new NullPointerException(new Exception().toString());
} catch (NullPointerException e)
{
System.out.print("x");
}
catch (RuntimeException e)
{
System.out.print("y");
}
catch (Exception e)
{
System.out.print("z");
}
finally{System.out.println("a");}
}
}
Hello,
How do I detect all the characters in an image? The image is in png and the font is constant. For simplicity, lets assume that the image has only numeric digits and there are only 4 digits on an image. I need to read all of them and output the text.
Can you help?
Thanks in advance.
Hay All.
I have a list which consists of many lists, here is an example
[
[Obj, Obj, Obj, Obj],
[Obj],
[Obj],
[
[Obj,Obj],
[Obj,Obj,Obj]
]
]
Is there a way to join all these items together as 1 list, so the output will be something like
[Obj,Obj,Obj,Obj,Obj,Obj,Obj,Obj,Obj,Obj,Obj]
Thanks
Simply I need to write
"echo" t${count} = "$"t${count}"
To a text file, including all the So the output would be something like:
echo " t1 = $t1"
With " as they are. So I have tried:
count=1
saveIFS="$IFS"
IFS=$'\n'
array=($(<TEST.txt))
IFS="$saveIFS"
for i in "${array[@]}"
do
echo "echo" t${count} = "$"t${count}""
(( count++ ))
done >> long1.txt
And variations on this such as:
echo "echo" """"" t${count} = "$"t${count}""
But I guess the wrapping in double " is only for variables.
Ideas?
i want current CTC of each employee following is the design of my table
Ecode Implemented Date Salary
7654323 2010-05-20 350000
7654322 2010-05-17 250000
7654321 2003-04-01 350000
7654321 2004-04-01 450000
7654321 2005-04-01 750000
7654321 2007-04-01 650000
i want oracle query for following output
Ecode Salary
7654321 650000
7654322 250000
7654323 350000
thanks in advance
See also
Oracle Query for getting MAximum CTC (Salary) of Each Employee
Hi,
I'm using ASP.NET MVC and have a model which has an image (byte array) in one of the fields. I'm trying to output this image into the src attribute of the img tag. I'm looking to do something like '. How can I do this?
Hi There,
I'm trying to create a glossary using the glossaries package in latex. Is there a way to force all defined terms to appear in the output glossary, even if they are unused in the text? I see this as the equivalent to \nocite for glossary entries.
Cheers,
Ken.
Hi all,
I want to run & control a process remotely, I found the best way is the WMI APIs,
The WMI gives me information about the remote process but I need more control like waiting it and getting the standard output and errors,
how can I do that, and can I get an instance of System.Diagnostics.Process class by instance ID remotely?
note: I tried to get an instance of the Process by Process.GetProcessByPID and passign machineName parameter, but and Exception has thrown.
Thanks in advance.
Can anyone please confirm that yes/no Gnuplot 4.5 (on CVS) can output 2D animated PNG files? I have numerous datasets but one line that I'd like to show iteratively in 3 different places in my graph. Can this be done directly from gnuplot or is this something that would need to be animated externally from multiple frames?
Hi Guys,
I am using JQuery.
I have got one link as given below:
<li><a href="http://staging/english/Skywards/skywards.aspx" id="skywardsTopLoginLink">Login</a></li>
Now I want to check on page load whether Flash/javascript is installed or disabled and according to output the Login link will work, I mean if flash/javascript is disabled or not installed then it will go to the above Href else it will open jQuery model dialog box for login functionality
I want to encode a UTF-8 string to a ISO 8859- string in Java
I have this:
String title = new String(item.getTitle().getText().getBytes("ISO-8859-1"));
But it isn't working, the output is Sørensen for example
Look at this ruby example:
puts ["Dog","Cat","Gates"].1
This will output Cat as ruby allows me to directly access the "anonymous" array created.
If I try this in PHP, however:
echo array("Dog","Cat,"Gates")[1]
This won't work.
What is this called, not only concerning arrays but all functions?
Where else is it possible?
Feel free to change the question title when you know how this "feature" is called.
I'm looking for a way to create a vCards from Outlook Contacts. Ive seen plenty of examples of how to do the reverse, but that's not what i want. I believe it will involve either the OpenSharedItem method or the OpenSharedFolder method but I havent seen any examples of how to implement this. Does anyone know of where I might find a sample or two? My end goal is to output all my Contacts as vCards to a folder.
How to apply GROUP_CONCAT in this Query if you guys have any idea or any alternate solution about this please share me. Helps are definitely appreciated also (see Query or result required)
Query
SELECT WEEK(cpd.added_date) AS week_no,COUNT(cpd.result) AS death_count
FROM cron_players_data cpd WHERE cpd.player_id = 81
AND cpd.result = 2 AND cpd.status = 1
GROUP BY WEEK(cpd.added_date);
Query output result screen
Result Required
23,24,25 AS week_no 2,3,1 AS death_count