Dynamic string problem
Hallow I wont to do a string dynamic that when I wont to ask for relation 027 and 034 the string bring me both of relation my problem is that didnt work what wrong.
DATA ceck_str TYPE string.
<b>IF switch_history = 'X' .
ceck_str = 'relat EQ ''027'''.
ELSE.
ceck_str = 'relat EQ ''027'' OR relat EQ ''034'''. ENDIF.</b>
3----select the employee who register to course--
SELECT objid sobid priox istat endda begda
FROM hrp1001
INTO CORRESPONDING FIELDS OF TABLE d_itab
FOR ALL ENTRIES IN z_course_table
WHERE otype = 'D'
AND objid = z_course_table-objid
AND sclas = 'P'
<b>AND (ceck_str).</b>
regards
Hi,
IF switch_history = 'X' .
ceck_str = 'relat EQ ''027'''.
ELSE.
ceck_str = 'relat EQ ''027'' OR relat EQ ''034'''. ENDIF.
Here in below statement
ceck_str = 'relat EQ <b>''027'''.</b>
ceck_str = 'relat EQ <b></b>''027'' OR relat EQ ''034'''
In ABAP " is used for comment so 027"" and 027'' OR relat EQ ''034'''
will be considered as comment
Similar Messages
-
Is there a way to evaluate a dynamic string?
Is there a way to evaluate a dynamic string?
The first example is static and does what I want.
The second example is dynamic and shows the problem I am
having.
Thank you in advance.wolfv wrote:
> Is there a way to evaluate a dynamic string?
This can be done, it involves the proper nesting of the DE()
'Delay
Evaluate' and Evaluate() functions. IIRC it would be
<cfoutput...>#Evaluate(DE(str))#</cfoutput>.
Another way to handle this type of functionality is to write
out the
dynamic CFML into a file, then include that file for
processing.
As an aside, this often turns out to be much more problematic
then the
perceived benefits. -
Dynamic String Substitution in Eclipse with JSP
Hi folks,
I'm wondering if it is possible to dynamically change token for ant that are present in my jsp with the dynamic string substitution in jsp inside tomcat. Right now, I'm loading the bootstrap with my runner and pointing to my application. In preference, I've put some token like @STATIC_URL@ that should replace by something else. But It seem that Tomcat goes directly to the source of the jsp and does'nt really care about the string substition of eclipse. Is there a way to do that?Hi there,
Since this is more of an Ant or an Eclipse question it is better to post the question in those forums / mailing lists as people on those lists will be able to help you better:
Here's the link to subscribe to the Ant User Mailing List, once you subscribe send a new e-mail to the list:
http://ant.apache.org/mail.html
Forum for Eclipse:
http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?cat=28&forum=472 -
I need to make a dynamic string array.
Deeper explanation:
I am trying to use a FOR loop to send a series of commands to an 8-channel device. Each channel requires 7 (actually, 1/2 need only 5, the other 1/2 need 7) strings to set them up and the entire sequence needs to be performed 8 times. I started a test .vi by simply using a constant array of type sting. I can sequentially pick each string and program my device perfectly. Now I'd like to do things like add the channel # somewhere in the mix, use variable values based on other controls in my .vi to set the parameters of the channel.
EXAMPLE:
The user sets certain values that determine delays and width for an 8-channel DDG (Digital Delay Generator, to some, a pulse generator). These values then need to be loaded into the DDG. The Strings will look something like this:
ULSE1TATE 1
ULSE1:WIDTH 0.009 000 *NOTEpaces behind decimal are for better viewability only
ULSE1ELAY 0.000 000
ULSE1YNC T0
ULSE1:CMODE DUTY
ULSE1COUNTER 1
ULSE1:BCOUNTER 1
ULSE2TATE 1
ULSE2:WIDTH 0.000 300
ULSE2ELAY 0.008 700
ULSE2YNC T0
ULSE2:CMODE NORMAL
So widith and delay params change, the pulse# changes, and whether it's on certain channels decides if the mode is duty or normal and duty comes with the subsequent params pcount and bcount.
help?
PS - I am going to move the state, sync, and cmode to a common, initialize loop run only at program start, but I still need to use width, delay, and (variably) pcount and bcount.
PPS - I am trying to edit post to diable smilies. Commands should read:"colon, P (or D)" not ,
PPPS - Success, at least for me. I disabled smilies in my settings, I don't know if that means my posts won't show smilies or if just what I am looking at won't show smilies, any responders let me know how it's showing for you.
Message Edited by Radiance_Jon on 07-16-2007 01:48 PM
Message Edited by Radiance_Jon on 07-16-2007 01:52 PMsmercurio_fc wrote:
Well, in my experience I have found that dealing with errors early on is the best course of action as it leads to less headaches down the road...
Auto-indexing is one of the more powerful features of LabVIEW. If you're familiar with text-based languages it's equivalent to the "foreach" statement. Basically it allows you to wire an array into a for-loop and the size of the array tells LabVIEW how many times the loop needs to execute. Inside the loop LabVIEW peels of each element of the array in order for each iteration of the loop. Looks like this:
My comment regarding not needing the sequence frame was related to using the error cluster since that wire would allow you enforce data dependency like so:
Note that the VISA resource wire does the same thing.
"I got a little aggravated at how NI seemed to handle the loops in those two frames concurrently". That's because LabVIEW is a data-flow language, and not a sequenced language like C or VB. In fact, that's one of the things that makes LabVIEW so powerful.
Message Edited by smercurio_fc on 07-16-2007 04:48 PM
MAN! I KNEW that!!!! GGRRRRR!!! That makes sense. Actually that's WHY I connected the error lines in the first place was to aide in flow control. OH!!! Still getting used to LabVIEW.
But I still have a question related to flow control. Check out the pic below. LabVIEW runs everything in a seemingly random order... well at least where it STARTS each chain of data. It obviously starts with the static constants or the earliest data in each chain, but I can't figure out how in the world it's deciding WHICH chain to start first. It kind of seems to go with the lower right and work it's way to top-left, but it doesn't exactly do that either. I dunno if it's worth you answering this concern or not, but if you got one for me I'd be much obliged.
I should take a LabVIEW class! Yeah right, as if they'd let me... R&D means I won't need it tomorrow ;( which stinks cause I'm liking LabVIEW the more I learn it. (I was not fond of it in the beginning, but that was my stubborness).
thanks again so much for all your help!!!!
Also, I am using all those strings to make my display appear as I want it to... I wonder if there is another way? I am aware of system labels, but I like the look of the recessed, grayed control boxes better.
Message Edited by Radiance_Jon on 07-16-2007 05:06 PM -
Dynamic Link Problem beim Batchencoden???
Habe seit kurzem folgendes Problem: Exportiere ich mehrere Videos über den Media Encoder, habe ich bei fast der Hälfte der Filme "kaputte Videos" entweder nur an den Effekten oder beim kompletten Video. Rechne ich die Filme einzeln raus, ist alles ok. Das stinkt sehr nach Dynamic Link Problem. Ich kennen das z.T. schon in der Zusammenarbeit mit After Effects. Hier rechne ich meine Projekte erst, bevor ich sie in Premiere reinhole. Aber auf das Batchencoden kann ich nicht verzichten, da ich teilweise 30 und mehr Clips in verschiedenen Formaten rausrechnen muss und das wirklich nicht einzeln erledigen will.
Frage: Hat jemand ne Idee (das Problem existiert erst seit kurzer Zeit), ob da irgendwelche caches vollaufen, kann man dynamic link irgendwie "resetten" oder muß ich das ganze Production Premium Paket CS5.5 neu installieren (wollte ich eigentlci vermeiden!!!!!)?
Ach ja, System Windows 7 64Bit mit CS5.5
Gruß
StefanOperator error. Answered my own question. I haven't used Dynamic Link much. It works fine. I was momentarily confusing the import of a PP project vs. a Dynamic Linked Sequence.
-
Is anybody having trouble keeping the source files linked in After Effects after using dynamic link from Premiere?
Please refer to this link:
cwrig, "CS4 Dynamic Link Problem" #1, 26 Oct 2008 1:02 pm
This is very frustrating.
Thanks for your time!Did some more tests and here is what does and doesn't work for me.
Losing footage -
Yes I was having the issue (and the topic is in the premiere forum also)
Here is what seems to solve it.
It loses the footage if I use the original folder which has spaces in the name. Not sure if that is the culprit but both methods proved consistent in every test I did.
it worked when I used a new folder called "Test" at the root of my editing drive.
Crashing-
Not sure if other have the issue but when I close AE, PPro will just sit there with an hour glass and show as not responding.
If I close PPro first and then AE and reopen PPro then all seems to work as it is supposed to.
This was also consistent in every test I did. -
Class.forName() with dynamic String
I'm trying to create objects of a class whose name depends on a runtime database lookup. So my code looks like this:
package com.mycompany.ourproduct.ourpackage;
String className = rs.getString(1);
Class c = Class.forName(className);
When I run the program, I get a ClassNotFoundException. But everything runs fine if I replace the code above with this:
package com.mycompany.ourproduct.ourpackage;
// String className = rs.getString(1);
String className = "com.mycompany.ourproduct.ourpackage.oursubpackage.MyClass"
Class c = Class.forName(className);
The problem seems to be in the dynamic linking. Although the class I'm trying to load is in a different package, it is a public class (and I can load it with a static string). Neither does moving it to the same package fix the problem.
I've noticed that if I supply a mis-named class with a static string, the exception reads:
java.lang.ClassNotFoundException: com.mycompany.ourproduct.misspelledpackage.SomeClass
but the same exception prints as follows when the string comes from the database:
java.lang.ClassNotFoundException: com/mycompany/ourproduct/misspelledpackage/SomeClass
I thought the difference was one of compile-time linking and run-time linking, but oddly enough, I still get the dots for misspelled classes that I (1) supply on the command line, (2) read from a file, or (3) concatenate from command line arguments plus info from a file. It's just when I pull the class name from the database that I get the slashes. Does anyone know what's going on?
Here's what I get from java -version:
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)
Any help would be greatly appreicated!Hmm. Weird. Have you looked at the String you're getting back from the database? Does it have slashes or dots? (Should be dots.) Have you made sure any leading/trailing spaces have been trimmed? Try doing classname.equals("com.mycompany... etc.") to see if it really is the same string as the constant that does work.
If it turns out the String is correct, and the only difference is whether that String came from a databaes or a literal, then I don't know what's going on. The first step, though, is to verify whether that's really the case, or if you're not getting the String you think you are. -
Iv not used flash for a while so am just converting from AS2
to AS3 and am having problems with some simple actionscript
I have a dynamic textbox created through actionscript inside
a movieclip and im trying to change the content of this but save
the previous value.
Iv taken the previous value and saved it in a variable (a
string) called
oldTxt (witch is working when i use trace statements to
check)
and then assigning the new text with
theTextField.text = "some new text"; (again working
perfectly)
the problem is when i try to re-asign the old value stored in
oldTxt, nothing happens.
the code im using is
theTextField.text = oldTxt; but its just removing all the
text.
any suggestions?button.addEventListener(MouseEvent.ROLL_OUT, navOut);
function navOut(MouseEvent):void {
trace(oldTxt);
theTextField.text = oldTxt;
works fine when i replace oldTxt with "some new text" and the
value of oldTxt is coming up in the trace -
I modified the EchoDom example (http://webservice.bea.com/dom.zip) client to be
dynamic (with WSDL) and deployed the service as a document type service. The ear
file is deployed correctly and I am able to execute the service from the URL without
any errors. However when I run the dynamic client, I see the following exception
trace. I see a similar error (serialization fails on class weblogic.apache.xerces.dom.DocumentImpl)
when I deploy the service as rpc. What am I doing incorrectly? Please help.
Sriram
run:
[java] javax.xml.rpc.JAXRPCException: failed to invoke operation 'echoDom
' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed
to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.Se
rializationException: mapping lookup failure. class=interface javax.xml.soap.SOA
PElement class context=TypedClassContext{schemaType=['http://examples.org']:echo
Dom}]StackTrace[
[java]
[java] javax.xml.soap.SOAPException: failed to serialize interface javax.x
ml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping
l
ookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedCla
ssContext{schemaType=['http://examples.org']:echoDom}
[java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
Part.java:328)
[java] at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:2
97)
[java] at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.
java:619)
[java] at weblogic.webservice.core.ClientDispatcher.send(ClientDispatch
er.java:206)
[java] at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDisp
atcher.java:143)
[java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
tion.java:444)
[java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
tion.java:430)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:53
9)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
2)
[java] at examples.dom.Client.diiCall(Client.java:132)
[java] at examples.dom.Client.main(Client.java:164)
[java] Caused by: weblogic.xml.schema.binding.SerializationException: mappi
ng lookup failure. class=interface javax.xml.soap.SOAPElement class context=Type
dClassContext{schemaType=['http://examples.org']:echoDom}
[java] at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(Ru
ntimeUtils.java:151)
[java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
ntimeUtils.java:187)
[java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
ntimeUtils.java:174)
[java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
Part.java:324)
[java] ... 10 more
[java] ]
[java]
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:55
9)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
2)
[java] at examples.dom.Client.diiCall(Client.java:132)
[java] at examples.dom.Client.main(Client.java:164)
[java] Exception in thread "main"
[java] Java Result: 1Hi Bruce,
I made the changes that you suggested. It didn't work. I still see the same deserialization
exception.
Sriram
Bruce Stephens <[email protected]> wrote:
Hi,
Try this format in your dynamic client:
call.setProperty("javax.xml.rpc.security.auth.username", "username");
call.setProperty("javax.xml.rpc.security.auth.password", "password");
HTHs,
Bruce
Sriram Chavali wrote:
If I had a weblogic security role enforcement in place for my WS EJB,how do I
pass the user credentials from a dynamic client? I set the USERNAME_PROPERTYand
PASSWORD_PROPERTY properties on the Call, but I see a deserializationerror on
the response and the SOAPElement interface.
A static client works fine when I pass the user credentials from thegetMyWSPort(String,
String) call.
Please help,
Sriram
"Sriram Chavali" <[email protected]> wrote:
Hi Bruce,
It worked perfectly.
Thanks for your help
Sriram
Bruce Stephens <[email protected]> wrote:
Hi Sriram,
OK, we are getting close. It looks like the problem is with the
helloComplexWorldResponse so looking at the client, I would change
the
invoke to look something like this:
String result = (String) call.invoke(new Object[] {doc});
If that still has problems, then try it without the return, i.e.make
it
a void return in the HelloWorldServiceEJB.java and go from there.
Regards,
Bruce
Sriram Chavali wrote:
Hi Brue,
Your example works fine for me. I am building an EJB implementationthat follows
your example where I see the error. The attached zip file has the
server
and client
(dynamic, which follows your example). The build file is build1.xml.
Thanks
Sriram
Bruce Stephens <[email protected]> wrote:
Hi Sriram,
hmmm...the sample I provided sends a Document with a dynamic client,
so
I'm confused as to where/why you are still seeing the same failure
as
the original post. Would you go back and look carefully at the
client
code (ClientHotelDyn.java) and note two important features:
1) adding the call.setProperty(Call.OPERATION_STYLE_PROPERTY,
"document");
2) adding the typemapping for the Document
If you are still experiencing problems, please post your codeand/or
open a dialog with our super support team: http://support.bea.com
or
[email protected]
Thanks,
Bruce
Hi Bruce,
The consumers for the service that I am building will be non-java
clients.
I wish
to demonstrate a reference implementation for them without using
the
generated
client side classes and hence the dynamic client.
Thanks for your example code. It worked fine. Just to add a
twist
to
your latest
example, I modified sample10 from Manoj's website (an EJB example)to accept an
org.w3c.dom.Document. I took your build file and tailored it
to
building
the sample10
and it worked fine for a static client, however when I modified
the
client to
be dynamic, I see the trace pasted at the end of this message.
Any
suggestions
run:
[java] javax.xml.rpc.JAXRPCException: failed to invoke
operation
'helloComp
lexWorld' due to an error in the soap layer (SAAJ); nested exceptionis: Message
[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
mapping lookup failure for xml type ['http://www.bea.com/servers/wls70/samples/
examples/webservices/basic/javaclass']:helloComplexWorldResponse
and
java interf
ace javax.xml.soap.SOAPElement]StackTrace[
[java]
[java] javax.xml.soap.SOAPException: failed to deserialize
xml:weblogic.xml
schema.binding.DeserializationException: mapping lookup failurefor
xml type
http://www.bea.com/servers/wls70/samples/examples/webservices/basic/javaclass']:
helloComplexWorldResponse and java interface javax.xml.soap.SOAPElement
[java] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:
389)
[java] at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage
java:458)
[java] at weblogic.webservice.core.ClientDispatcher.receive(ClientDispa
tcher.java:297)
[java] at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDisp
atcher.java:144)
[java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
tion.java:444)
[java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
tion.java:430)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:53
9)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
2)
[java] at tutorial.sample10.client.Main.<init>(Main.java:105)
[java] at tutorial.sample10.client.Main.main(Main.java:40)
[java] Caused by: weblogic.xml.schema.binding.DeserializationException:map
ping lookup failure for xml type ['http://www.bea.com/servers/wls70/samples/exam
ples/webservices/basic/javaclass']:helloComplexWorldResponse
and
java
interface
javax.xml.soap.SOAPElement
[java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(
RuntimeUtils.java:325)
[java] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:
384)
[java] ... 9 more
[java] ]
[java]
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:55
9)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
2)
[java] at tutorial.sample10.client.Main.<init>(Main.java:105)
[java] at tutorial.sample10.client.Main.main(Main.java:40)
BUILD SUCCESSFUL
Thanks
Sriram
Bruce Stephens <[email protected]> wrote:
Hi Sriram,
Give this example a spin and see if it fits your needs.
Just curious, why do you need to have a dynamic client?
Thanks,
Bruce
Sriram Chavali wrote:
I am using WLS 8.1 on Windows XP.
Sriram
"Sriram Chavali" <[email protected]> wrote:
I modified the EchoDom example (http://webservice.bea.com/dom.zip)
client
to be
dynamic (with WSDL) and deployed the service as a document
type
service.
The ear
file is deployed correctly and I am able to execute the
service
from
the URL without
any errors. However when I run the dynamic client, I see
the
following
exception
trace. I see a similar error (serialization fails on class
weblogic.apache.xerces.dom.DocumentImpl)
when I deploy the service as rpc. What am I doing incorrectly?Please
help.
Sriram
run:
[java] javax.xml.rpc.JAXRPCException: failed to invoke
operation
'echoDom
' due to an error in the soap layer (SAAJ); nested exceptionis:
Message[
failed
to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.Se
rializationException: mapping lookup failure. class=interface
javax.xml.soap.SOA
PElement class context=TypedClassContext{schemaType=['http://examples.org']:echo
Dom}]StackTrace[
[java]
[java] javax.xml.soap.SOAPException: failed to serializeinterface
javax.x
ml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
mapping
l
ookup failure. class=interface javax.xml.soap.SOAPElement
class
context=TypedCla
ssContext{schemaType=['http://examples.org']:echoDom}
[java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
Part.java:328)
[java] at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:2
97)
[java] at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.
java:619)
[java] at weblogic.webservice.core.ClientDispatcher.send(ClientDispatch
er.java:206)
[java] at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDisp
atcher.java:143)
[java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
tion.java:444)
[java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
tion.java:430)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:53
9)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
2)
[java] at examples.dom.Client.diiCall(Client.java:132)
[java] at examples.dom.Client.main(Client.java:164)
[java] Caused by: weblogic.xml.schema.binding.SerializationException:
mappi
ng lookup failure. class=interface javax.xml.soap.SOAPElement
class
context=Type
dClassContext{schemaType=['http://examples.org']:echoDom}
[java] at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(Ru
ntimeUtils.java:151)
[java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
ntimeUtils.java:187)
[java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
ntimeUtils.java:174)
[java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
Part.java:324)
[java] ... 10 more
[java] ]
[java]
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:55
9)
[java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
2)
[java] at examples.dom.Client.diiCall(Client.java:132)
[java] at examples.dom.Client.main(Client.java:164)
[java] Exception in thread "main"
[java] Java Result: 1
Name: sample10.zip
sample10.zip Type: Zip Compressed Data (application/x-zip-compressed)
Encoding: base64 -
Dynamic String in URL of Plain HTTP adatper
Hi, buddies.
Recently we are trying to interact with a system by using the GET method of HTTP. Thus the string of URL maybe vary. Can I acheive that in plain http adapter?
Thanks in advance.Since we sill use the Get method of HTTP, all the information we send to the external system should be through the URL address.
For instance, if I want to check the information of user userA, the URL gonna be
http://hostname:8000/infoquery?username=userA
if I want to check the information of user userB, the URL gonna be
http://hostname:8000/infoquery?username=userB
My problem is, how can I use the variable string (userA/userB in the above example) in the URL or Http Destination?
Actually I found following information in sap help:
● If you want to use an HTTP destination or URL set by the mapping, set the URL or HTTP Destination indicator. (The indicator displayed depends on the Addressing Type you selected above). If you set the indicator, the URL or HTTP destination set dynamically is called by HTTP.
If the message header does not contain the URL or the HTTP destination, and you have set the Fail If Adapter-Specific Message Attributes Missing indicator, the XI message is set to status System Error. If you do not set the indicator, the URL or HTTP destination defined statically in the communication channel is used.
The technical names of the fields are:
○ URL: TargetURL
○ HTTP Destination: HTTPDest
But I haven't figured how it works out. -
I have a problem, i want to use a extend to arraylist to implement different validation to objects. So i added a method add(Person person), dynamic binding, but it has a incorrect behavior, i think
import java.util.ArrayList;
import java.util.Collection;
public class Test {
class MyList extends ArrayList {
public boolean add(Object arg0) {
System.out.println("add norm");
return super.add(arg0);
public boolean add(Person arg0) {
System.out.println("add person");
return super.add(arg0);
class Person{
public static void main(String[] args) {
new Test().test();
private void test() {
Collection col1 = new MyList();
col1.add(new Person());
ArrayList col2 = new MyList();
col2.add(new Person());
MyList col3 = new MyList();
col3.add(new Person());
}My output=
add norm
add norm
add person
My wanted output
add person
add person
add person
Why?in case you don't understand why you're getting "addning norm"
you are using polymorphism. You declared your objects to be of type Collection and ArrayList. This means you can only use methods of those type, eventhough the underlying object is a MyList instance. Now, Collections and ArrayList class only have the add(Object obj) method signature....so, when you say add(new Person()), it will only see add(Object obj)
When you declared your object as MyList, then it see add(Person p), so it use the add(Person p) method. -
How to load dynamically String into a VI using LabVIEW Run-time Engine Version 7.0?
I would like to be able to traduce string into my application using import string method. I create an program with my VI to translate. When I use the import method, I get this error: the VI is locked. WHY ? because it works well in the edit mode but not using LabVIEW Run-time Engine Version 7.0 .
Hello loup,
If you call dynamically a VI in your LabVIEW application you must add this VI when you build the .exe file.
To add this VI, go to the Tab "Source Files" when you build application and click on "Add Dynamic VI..." then chose the VI you call.
It should solve your problem.
In the attached file you can found an example of LV program that translate front panel.
Try to build exe file and add "Languages.vi" as dynamic VI and .txt files as "Support files".
I test it, it works.
I hope that this will help you.
Best Regards,
Sanaa T
National Instruments
Attachments:
Translation.zip 69 KB -
Null String and Empty String problem
Hello everyone,
since i am totally new in JSP, i am getting problem in handling strings.
Suppose i have a variable users = ""; then
I want to ask when to use:
if (users.equals(""))
and
if(users == "")
in my code, variable users has value "regional" for regional users.
and i am checking this code as:
if (users.equals{"regional")) {
out.print ("I am inside code");
at that time, the code is throwing error (run time error)
and when i changed the code as:
if (users == "regional") {
out.print ("I am inside code");
this time, the code is not generating error but the part message "I am inside code " is not displaying. The code do not inserts inside the if condition
I hope u understand my problem. Can anybody help me out with this.This has basically nothing to do with JSP, but with basic Java knowledge.
When using the '==' operator to compare Objects (yes, String is actually a subclass of Object), then it will look if they are of the same reference. Using the '==' operator to compare primitive datatypes (int, boolean, char, etc) will look if they have the same value.
That is why the Object class has the equals() method to give the ability compare with another objects. And you can only invoke it when the Object is actually instantiated. So if it is not null.
if (string != null && string.equals("somevalue")) {
// or
if ("somevalue".equals(string)) {
}should work.
Edit rym82: this will not throw a NPE, but an ordinary compilation error ;)
Message was edited by:
BalusC -
POI getCellStyle and empty string problem
I'm having a problem getting the style of a cell from and excel input file and setting to an output file.
I also have a problem recognizing blank cells that are not null in the input file here is my code any help would be great.
package Trace;
import java.io.*;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import java.util.StringTokenizer;
import org.apache.poi.poifs.filesystem.*;
import java.lang.Runtime;
public class Converter1 {
private static short bhyvb= 0;
private static short foreground, background;
private static String[][] cellGridOut;
private static int numRows, numColumns, clock;
private static POIFSFileSystem fs;
private static HSSFWorkbook wbin, wbout;
private static HSSFSheet sheetIn, sheetOut;
private static HSSFRow rowIn, rowOut;
private static HSSFCell cellIn, cellIn1, cellOut;
private static FileOutputStream fileOut = null;
private static String rowIterator, rowIterator1;
private static HSSFCellStyle style, style1;
public static void main(String[] args) {
//Take in 2 inputs mandatory, Input Event Trace excel file and Time Interval respectively
if (args.length != 1)System.err.println("Input Excel File");
//Create a new POI file system and HSSF workbook with your excel input file
InputStream input = Converter.class.getResourceAsStream(args[0]);
try{
fs = new POIFSFileSystem(input);
wbin = new HSSFWorkbook(fs);
}catch (Exception e){System.err.println("File input error");}
wbout = new HSSFWorkbook();
sheetIn = wbin.getSheetAt(0);
numRows = sheetIn.getLastRowNum();//numRows=723
style = wbout.createCellStyle();
//style.setFillForegroundColor(HSSFColor.LIGHT_YELLOW.index);
//style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
//get number of columns
rowIn = sheetIn.getRow(0);
boolean done = false;
int testNullPointer;
numColumns=0;
while(!done){
//System.out.println(ColumnInc);
cellIn = rowIn.getCell((short)numColumns);
numColumns+=1;
try{
testNullPointer = cellIn.getCellType();
}catch(NullPointerException npe){
done = true;
numColumns-=1; //number of columns = 25
converterIt();
//Create new output file, if it exists delete it
File myFile = new File("converted.xls");
if(myFile.exists()){
myFile.delete();
//Create new file output stream
try {
fileOut = new FileOutputStream(myFile);
} catch (IOException ioe) {}
//write all conversion data to output file
try{
wbout.write(fileOut);
fileOut.close();
}catch (IOException ioe) {}
public static void converterIt(){
boolean nextDone = false;
boolean nextDone1 = false;
for(int i=0; i<numColumns; i++){
clock =1;
rowIn = sheetIn.getRow(0);
cellIn = rowIn.getCell((short)i);
String getTopRow = cellIn.getStringCellValue();
sheetOut = wbout.createSheet(getTopRow+"_s"+i);
sheetOut.setColumnWidth((short)0, (short)(13 * 256));
sheetOut.setDefaultColumnWidth((short)25);
for(int j=0; j<=numRows; j++){
if(j==0){
rowIn = sheetIn.getRow(j);
cellIn = rowIn.getCell((short)i);
String temp2 = cellIn.getStringCellValue();
rowOut = sheetOut.createRow((short)j);
cellOut = rowOut.createCell((short)j);
cellOut.setCellValue(temp2);
cellOut = rowOut.createCell((short)(j+1));
cellOut.setCellValue("CLOCK");
if(j==1){
rowIn = sheetIn.getRow(j);
cellIn = rowIn.getCell((short)i);
double temp3 = cellIn.getNumericCellValue();
rowOut = sheetOut.createRow((short)j);
cellOut = rowOut.createCell((short)0);
cellOut.setCellValue(temp3);
cellOut = rowOut.createCell((short)1);
cellOut.setCellValue("");
nextDone=false;
nextDone1=false;
if(j>1){
rowIn = sheetIn.getRow(j);
try{
cellIn = rowIn.getCell((short)i);
}catch(NullPointerException npe){
rowIterator = "";
nextDone=true;
if(!nextDone){
try{
rowIterator = cellIn.getStringCellValue();
style = cellIn.getCellStyle();
}catch(NullPointerException npe){}
if(j==2){
rowOut = sheetOut.createRow((short)(clock+1));
cellOut = rowOut.createCell((short)0);
cellOut.setCellValue(rowIterator);
cellOut = rowOut.createCell((short)1);
cellOut.setCellValue(j-1);
clock+=1;
}else{
rowIn = sheetIn.getRow(j-1);
try{
cellIn = rowIn.getCell((short)i);
}catch(NullPointerException npe){
rowIterator1 = "";
nextDone1=true;
if(!nextDone){
try{
rowIterator1 = cellIn.getStringCellValue();
}catch(NullPointerException npe){}
if(rowIterator1!=rowIterator && j>2){
rowOut = sheetOut.createRow((short)clock+1);
cellOut = rowOut.createCell((short)0);
cellOut.setCellValue(rowIterator);
//System.out.println(style);
cellOut.setCellStyle(style);
cellOut = rowOut.createCell((short)1);
cellOut.setCellValue(j-1);
clock+=1;
}//if
}//for
}//for
}//converterIt
}//Converter1 CLASSENDI am not sure about the cell style as it looks like you are doing it right. For the null or blank cells it looks like you are only checking for null not "".
-
Search and replace string problems
Hi to all,
I have problem with Search and replace string function. It shows me a wrong Value (Number) from 15 to 100 is everything OK (15=0, 30=1, 45=2, 100=3), but after 100 ........
Take look in VI and if you have any ideas post them please
THX
Igor
Attachments:
indexing.vi 10 KBthere will be no 15115 string, but 15 or 115 and 15 is 0, 115 is 4. Anyway, i have changed string input format and now its working THX for your help
Attachments:
indexing.vi 10 KB
Maybe you are looking for
-
Z report for materials that are lying as rejected material - sent to vendor
Dear All, i have to create a report where my client is suppose to generate a report of : scenario: all materials that are rejected in quality inspection is to be sent back to vendor. now what happens is sometimes 50 materials are rejected in one mo
-
Hello! I'm a student and I'm currently making a project using pattern matching. My patterns are from chick foot/feet. I'm created multiple pattern matching VI's to detect all the feet because I find it difficult/impossible to match all the feet with
-
So after purchasing my new Xserve which i will be using as my company's primary mail server. i own a domain hosted by my ISP, and I have a static IP. I have also purchased a sonicwall pro 2040 firewall and have opened up the ports needed for the mail
-
I have lost facetime on my macbook pro. Calls ring but message says fail
I have lost facetime on my macbook pro. I place the call, it rings then says 'failed'. Has been working very well until now. Any ideas anyone? Thanks.
-
Weblogic/security/service/SubjectManagerImpl
In which library/jar this class can be found weblogic/security/service/SubjectManagerImpl ????