Is there a Java library/API available to interact with Windows OS, like executing commands on the command prompt and returning the output back to the program?
I want to perform the following artistic effect with my MFC app.
Can anyone tell me, how to perform it ?
Input Image :
Output Image :
Waiting for the reply...
Thanks in advance...
I have added some nullable value types to my serializable class. I perform a serialization using XmlSerializer but when the value is set to null, I get an empty node with xsi:nil="true". This is the correct behaviour as I have found here: http://msdn.microsoft.com/en-us/library/ybce7f69%28VS.80%29.aspx
Is there a way to switch off this option so that nothing is output when the value type is null?
Hi,
May I know the reason of getting the output of the following code as: 1,10,10? Why not it is as: 10, 10?
<script type="text/javascript">
var str="1, 100 or 1000?";
var patt1=/10?/g;
document.write(str.match(patt1));
</script>
So I want to build a try method into my powershell script below. If I am denied access to a server, I want it to skip that server. Please help..
[code]$Computers = "server1", "server2"
Get-WmiObject Win32_LogicalMemoryConfiguration -Computer $Computers | Select-Object `
@{n='Server';e={ $_.__SERVER }}, `
@{n='Physical Memory';e={ "$('{0:N2}' -f ($_.TotalPhysicalMemory / 1024))mb" }}, `
@{n='Virtual Memory';e={ "$('{0:N2}' -f ($_.TotalPageFileSpace / 1024))mb" }} | `
Export-CSV "output.csv"[/code]
If I make a simple diff in git with e.g.:
git diff origin/master
where can I find good references on how to read the output of git. The man page on git-diff is rather long, and explains many cases which are maybe not necessary for a start.
i want to bind image in image control but according to the value in Eval
if Eval == True
then
imageurl = "image1"
else
imageurl = "image"
how to write if condition with eval to get above output
How obtain the running process with absolute path name from ps command
13598 ? Ssl 0:00 /opt/something --run-id 2 -n /home/laks/f1 -l l.log
I need the output as -
/opt/something --run-id 2 -n /home/laks/f1 -l l.log
After adding log4j to my application I get the following output every time I execute my application:
log4j:WARN No appenders could be found for logger (slideselector.facedata.FaceDataParser).
log4j:WARN Please initialize the log4j system properly.
It seems this means a configuration file is missing.
Where should this config file be located and what is a good start content?
I'm using plain java for developing a desktop application. So no webserver etc...
I understand that echo is slightly faster, and print can be used as a function, but I've been reading an e-book on PHP, and the writer is using print, instead of echo, to output very simple text.
print "Your name is $name\n";
So my question is, when would it be appropriate for me to use print as opposed to echo?
I need to implement the following scenario in a REST service implemented in WCF:
the user submits a binary file and a set of parameters
the server consumes the file, does some clever work and generates a binary output file
the user retrieves that binary result file
and all that is done in a single operation from the client perspective.
It's pretty easy in a non-REST service. How do I do that in a REST service? Where do I get started?
I prefer to edit in one large file rather than many independent files, but due to limitations in languages, source control, and the preference of team mates I need to output to many files.
What I'm looking for would recurse through all the files in a source directory and generate a single file to edit in VIM, with special file seperator markers. On save it would save the the changes to the correct file(s) ideally in a smart manner, based only on changes made.
Does something like this exist?
Currently, I have osmething like this in all of my classes:
# Import logging to log information
import logging
# Set up the logger
LOG_FILENAME = 'log.txt'
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
This works well, and I get the output I want, but I would really like to have all this sort of information in one place, and be able to just do something like import myLogger and then start logging, and then hopefully be able to just go into that file and turn off logging when I need an extra performance boost.
Thanks in advance
I am trying to remove the "Hide this data" from this XML which is proceeded with the qualifier type="noView"
<element version="Local">
<qualifier name="Public" type="View" />
Good to go
</element>
<element version="Local">
<qualifier name="Public" type="noView" />
Hide this data
</element>
I am using this XSL
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="qualifier">
<xsl:call-template name="replace-noview" />
</xsl:template>
<xsl:template name="replace-noview">
<xsl:param name="text" select="@type"/>
<xsl:choose>
<xsl:when test="contains($text, 'noView')">
<xsl:copy-of select="."/>
<xsl:text>DELETED</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
The output I'm getting is
<element identifier="ContactName" version="Local">
<qualifier name="Public" type="View" />
Good to go
</element>
<element identifier="ContactName" version="Local">
<qualifier name="Public" type="noView" />DELETED
Hide this data
</element>
I am matching the "noView" attribute and can add the "DELETED" text. However I need to remove the follow "Hide this data" text.
The output I would like is
<element identifier="ContactName" version="Local">
<qualifier name="Public" type="View" />
Good to go
</element>
<element identifier="ContactName" version="Local">
<qualifier name="Public" type="noView" />
DELETED
</element>
If I have an object I need to store in viewstate, what kinds of things can I do to optimize the size it takes to store the object? Obviously storing the least amount of data will take less space, but aside from that, are there ways to architect the class, properties, attrbutes etc, that will effect how large the serialized output is?
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.
We have server on Python and client + web service on Ruby. That works only if file from URL is less than 800 k. It seems like "socket.puts data" in a client works, but "output = socket.gets" - not. I think problem is in a Python part. For big files tests run "Connection reset by peer". Is it buffer size variable by default somewhere in a Python?
It seems to me that some of these should fail, but they all output what they are supposed to:
$, = "\n";
%test = (
"one" => ["one_0", "one_1"],
"two" => ["two_0", "two_1"]
);
print @{$test{"one"}}[0],
@{$test{"one"}}->[0],
$test{"two"}->[0],
$test{"one"}[1];
Why is this?
hi friends,
I am trying to insert data into particular table through pl/sql stored procedure,my requirement is while inserting i should generate PRIMARY KEY values for particular column and also i should return that PRIMARY KEY value to output and one more thing is that for another column i should validate my string such that it should contain only characters not integers.
please help me in writing code for the above requirement
Thanks and regards
thulasi policherla
Hi everyone...
I'd asked a question about the splitting the a string like below:
Input string: "a=aa| b=b||b | c=cc"
and the output:
a=aa
b=b||b
c=cc
Kobi's answer was:
var matches = "a=aa|b=b||b|c=cc".match(/(?:[^|]|\|\|)+/g)
his answer was correct.
But I need to use "split" method and save store the outputs in a array.
so I can't use the Match Method.
So please help me...
Is there any way, given a function passed as a parameter, to alter its input parameter string before evaluating it?
Here's pseudo-code for what I'm hoping to achieve:
test.func <- function(a, b) {
# here I want to alter the b expression before evaluating it:
b(..., val1=a)
}
Given the function call passed to b, I want to add in a as another parameter without needing to always specify ... in the b call. So the output from this test.func call should be:
test.func(a="a", b=paste(1, 2))
"1" "2" "a"
I have a list containing a tuples and long integers the list looks like this:
table = [(1L,), (1L,), (1L,), (2L,), (2L,), (2L,), (3L,), (3L,)]
How do i convert the table to look like a formal list?
so the output would be:
table = ['1','1','1','2','2','2','3','3']
For information purposes the data was obtained from a mysql database.
My project need to compare output(only urls) of google and yahoo for a particular keyword.
Can i access entire urls for a particular keyword from google and yahoo? Do they provide any library or any other thing for that?how can i do that?..