List in long form files in the directory "/ etc" for the file "ETCDIR" and view them,
while the monitor sequential manner.
how i can do it? with commands tee and more
I am using Apache fop-0.95 to build pdf files from a JSP web application on IBM iSeries V5R4 using Websphere 6.0. Everything works perfect in my development using Websphere Development Studio client. When I put the application on the server, I get an error at this line.
FopFactory fopFactory = FopFactory.newInstance();
The error is:
java.lang.UnsatisfiedLinkError: javax/imageio/ImageIO
Does anyone know how I can fix this error?
All of the fop class files are part of the EAR file. The files were installed to the projects \WEB-INF\lib directory. I have added the fop jar files to the classpath, using the admin console.
I am running IBM WebSphere Application Server - Express, 6.0.2.9
Build Number: cf90614.22 on IBM iSeries V5R4
i have some element in my container and want to save all properties of this elements. i list this element by VisualTreeHelper and save its attributes in DB, question is that how to retrieve this properties and affect them? i think that The Silverlight have some statement that behave like Exec in Sql-Server.
i save properties in one line that delimited by semicolon.(if you have any suggestion ,appreciate)
I want to make a script that starts a program and then sends it key input.
#!/bin/bash
./program
(PRESS CONTROL-Z)
Is this possible? From what I've found I thought it might require key codes but I could be wrong.
I'm trying to print string that contains new line, but the result read \n as a space, so instead of getting result like this:
DR
DC
DD
I get this:
DR DC DD
Thats the code am sending:
A253,26,0,3,1,1,N,"DR\nDC\nDD"
i have installed the netbeans version 6.8 with glassfish version 3 on a redhat machine.
the thing is that when i try starting/stopping the glassfish via the netbeans, it works fine, BUT when i try starting the glassfish via:
./asadmin stop-domain domain1
i get the error
"GlassFish requires Java SE version 6. Your JDK is version 4"
i have got only one JDK instance installed
rpm -qa | grep jdk
will return "jdk-1.6.0_18-fcs"
any ideas ?
I have following code in jsf page, backed by jsf managed bean
<h:dataTable value="#{poolBean.pools}" var="item">
<h:column>
<f:facet name="header">
<h:outputLabel value="Id"/>
</f:facet>
<h:outputText value="#{item.id}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputLabel value="Start Range"/>
</f:facet>
<h:inputText value="#{item.startRange}" required="true"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="End Range"/>
</f:facet>
<h:inputText value="#{item.endRange}" required="true"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Pool type"/>
</f:facet>
<h:selectOneMenu value="#{item.poolType}" required="true">
<f:selectItems value="#{poolBean.poolTypesMenu}"/>
</h:selectOneMenu>
</h:column>
<h:column>
<f:facet name="header"/>
<h:commandButton id="ModifyPool" actionListener="#{poolBean.updatePool}" image="img/update.gif" title="Modify Pool">
<f:attribute name="pool" value="#{item}"/>
</h:commandButton>
</h:column>
</h:dataTable>
This code fragment is dedicated to editing come collection of items. Each row of the table contains "edit" button that submits changed values of the row to the server. It has the item itself as an attribute. Submit is performed by calling actionListener method in the backing managed bean.
This code runs correctly on Glassfish v 2.1
But when the server was updated to Glassfish v 2.1.1, the attribute stopped to be passed correctly. Instead of passing edited item (when we change the values in table row, we are actually changing the underlying object fields), the source item is submitted to server, i.e. the item that was previously given to the page. All the changes that were made on the page are discarded.
I tried to update jsf version from 1.2_02 to 1.2_14 (we are using jsf RI), but it had no effect.
Perhaps anyone came across the same problem? Any help and suggestions will be appreciated.
setup
I'm following defunkt's gist setup guide.
[smotchkkiss ~]$ sudo gem install gist
[smotchkkiss ~]$ git config --global github.user "my github name"
[smotchkkiss ~]$ git config --global github.token "my github token"
[smotchkkiss ~]$ echo "puts 'hello, gist.'" > hello.rb
[smotchkkiss ~]$ gist hello.rb
output
Usage: open [-e] [-t] [-f] [-W] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
-n, --new Open a new instance of the application even if one is already running.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
return value
nil
help!
nil return value? What gives? No new gist appears in my My Gists page on github.
I am curious about if there is any project about a replacement for the current unix-shells (like bash, ash, rsh ...), at least adding some new ideas or paradigm in this area. I was searching but i found very few information, this project http://en.wikipedia.org/wiki/Friendly_interactive_shell seems interesting, but not so diferent from the nowadays solutions.
What do you think? Do you imagine a linux-distribution on 2020 that still having bash?
How can be an evolution of this programs?
Br
I'm trying to write a Perl script that will work better with KDE's kwrited, which, as far as I can tell, is connected to a pts and puts every line it receives through the KDE system tray notifications, with the title "KDE write daemon". Unfortunately, it makes a separate notification for each and every line, so it spams up the system tray with multiline messages on regular old write, and for some reason it cuts off the entire last line of the message when using wall (One-line messages are also goners.). I was also hoping to make it so that it could broadcast across a LAN with thick clients. Before starting on that (which would require ssh, of course), I tried to make an ssh-less version to make sure it works. Unfortunately, it doesn't. perl ./write.pl "Testing 1 2 3" where the following is the contents of ./write.pl:
#!/usr/bin/perl
use strict;
use warnings;
my $message = "";
my $device = "";
my $possibledevice = '`w -hs | grep "/usr/bin/kwrited"`'; #Where is kwrited?
$possibledevice =~ s/^[^\t][\t]//;
$possibledevice =~ s/[\t][^\t][\t ]\/usr\/bin\/kwrited$//;
$possibledevice = '/dev/'.$possibledevice;
unless ($possibledevice eq "") {
$device = $possibledevice;
}
if ($ARGV[0] ne "") {
$message = $ARGV[0];
$device = $ARGV[1];
}
else {
$device = $ARGV[0] unless $ARGV[0] eq "";
while (<STDIN>) {
chomp;
$message .= <STDIN>;
}
}
if ($message ne "") {
system "echo \'$message\' > $device";
}
else {
print "Error: empty message"
}
produces the following error:
$ perl write.pl "Testing 1 2 3"
Use of uninitialized value $device in concatenation (.) or string at write.pl line 29.
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `echo 'foo' > '
Somehow, the regular expressions and/or the backtick escape in processing $possibledevice are not working properly, because where kwrited is connected to /dev/pts/0, the following works perfectly:
$ perl write.pl "Testing 1 2 3" /dev/pts/0
I have a before_save defined as follows:
def before_save
self.token = generate_token
end
I want to skip it for specific save method calls. so in my code I would like to do
@user.save
without before_save filter getting called. Can I do that?
Windows 7 computer running SQL Server Express 2008.
When I try to run net start mssql$sqlexpress I receive an error:
System error 5 has occurred.
Access is denied
The SQL service is running under "Network Service" account
The service starts fine if I use the services window. Could somebody help me figure out why I am receiving this error?
I am created jar file.The jar file is an executable one.But how can i run the jar file from the out side,using created batch file.I want to know the batch file coding to run the jar file without mentioning class path. Or is there any way to do it?
How do I write a batch process on the Mac for pdf2swf, I want to convert all pdfs in a folder into swf. But pdf2swf doesn't have a option to convert a folder of pdfs to swfs, you have to do it one at a time. I'm not sure how if I should use a Apple script or a Shell script, either one I'm not sure how to get or assign a file name variable.
pdf2swf file_name_variable.pdf -o file_name_variable.swf -T 9 -f
Thanks
I have a form with a cmdbutton that at the moment opens another form and shows all records for several types of PartitionStyles and TrimFinishs (486 at present), I need to be able to filter the second form to show only the TrimFinish I need.
Private Sub lbl600SeriesS_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmModules"
stLinkCriteria = "Forms!frmModules![TrimFinish] = 1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
At the moment it shows only a new record, I know there should be 162 records using 1, what have I missed or done incorrect.
Our application lets users call phone numbers. Users would like to be able to block their caller ID.
On other platforms, we let the user specify a custom dialing prefix. For instance, on my cell provider it's #31#.
I've tried two approaches so far.
First:
id url = [NSURL URLWithString: @"tel:#31#0000000"]
// produces nil
Second:
id encoder = ["#31#0000000" stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
// produces %2331%230000000
id url = [NSURL URLWithString: [NSString stringWithFormat: @"tel:%@", encoded]];
// produces a valid-looking NSURL which doesn't do anything
I'm thinking at this point that I'm just not allowed to dial # and *, even from a Cocoa touch application. (I know it's not allowed from a web app.) Is this true, or am I missing something obvious?
I have a plain text file with words, which are separated by comma, for example:
word1, word2, word3, word2, word4, word5, word 3, word6, word7, word3
i want to delete the duplicates and to become:
word1, word2, word3, word4, word5, word6, word7
Any Ideas? I think, egrep can help me, but i'm not sure, how to use it exactly....
C/Obj-C Developers- I am looking for a way to listen for a specific word or small set of words to be spoken and fire an event. Needs to be able to run on the iPhone/iPad ... Looking for ideas?
I'm building a custom db deployment utility, I need to read text files containing sql scripts and execute them against the database.
Pretty easy stuff, so far so good.
However I've encountered a snag, the contents of the file are read successfully and entirely, but once passed into the SqlCommand and then executed with SqlCommand.ExecuteNonQuery only part of the script is executed.
I fired up Profiler and confirmed that my code is not passing all of the script.
private void ExecuteScript(string cmd, SqlConnection sqlConn, SqlTransaction trans)
{
SqlCommand sqlCmd = new SqlCommand(cmd, sqlConn, trans);
sqlCmd.CommandType = CommandType.Text;
sqlCmd.CommandTimeout = 9000000; // for testing
sqlCmd.ExecuteNonQuery();
}
// I call it like this, readDMLScript contains 543 lines of T-SQL
string readDMLScript = ReadFile(dmlFile);
ExecuteScript(readDMLScript, sqlConn, trans);
I have a simple Class
package chapter10;
public class CompilationTest {
public static void main(String[] args) {
System.out.println("HELLO WORLD");
}
}
The path is
Test\src\chapter10\CompilationTest.java
I successfully compiled the code into the same folder and now I have
Test\src\chapter10\CompilationTest.class
However when I try to run from the same folder it I get this error
>java CompilationTest
Exception in thread "main" java.lang.NoClassDefFoundError: CompilationTest (wrong name: chapter10/CompilationTest)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: CompilationTest. Program will exit.
When I run using
>java chapter10/PropertiesTest
Exception in thread "main" java.lang.NoClassDefFoundError: chapter10/PropertiesTest
Caused by: java.lang.ClassNotFoundException: chapter10.PropertiesTest
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: chapter10/PropertiesTest. Program will exit.
i wonder if there is a good software that will run commands with voice recognition?
eg. if i say "delete temporary folder" it will delete that folder.
thanks
hello all,
i am using "use Win32::Process" for my application run as below, it runs fine but i did not get any way to get the output to a .txt file.
i used NORMAL_PRIORITY_CLASS rather than CREATE_NEW_CONSOLE to get the output on the same terminal itself but i don't know how to redirect it to a txt file.
/rocky
!/usr/bin/perl
use strict;
use warnings;
use Win32::Process;
Win32::Process::Create(my $ProcessObj,
"iperf.exe",
"iperf.exe -u -s -p 5001",
0,
NORMAL_PRIORITY_CLASS,
".") || die ErrorReport();
my @command_output;
push @command_output,$ProcessObj;
open FILE, "zz.txt" or die $!;
print FILE @command_output;
close FILE;
sleep 10;
$ProcessObj-Kill(0);
sub ErrorReport{
print Win32::FormatMessage( Win32::GetLastError() );
}
I am new to powerbuilder and having a lot of trouble using datawindows. I can't get my head around the insert mechanism of it. Can someone explain it to me, or at least point me in the right direction(article, tips etc...) ?
Hi,
I have a Unix shell script test.sh. Within the script i would like to invoke another shell and then execute the rest of the commands in the shell script from the child shell and exit
To make it clear:
test.sh
#! /bin/bash
/bin/bash /* create child shell */
<shell-command1>
<shell-command2>
......
<shell-commandN>
exit 0
What my intention is to run the shell-commands1 to shell-commandN from the child shell. Kindly tell me how to do this
I'd like to use ngrep and/or perl to monitor the incoming data stream on a socket, then, when the appropriate characters arrive, like in this case, the string "192.168.1.101:8080", input to the data stream a redirect to another ipaddress, such as "192.168.1.102"
Is this even possible?