Pointer to a variable
Good day everybody!
I want to ask you one question: is it somehow possible to
create a pointer to variable in AS2? I mean not a variable of a
complex type itself, but a pointer (or some kind of it) to such
variable.
Thank you for paying attention.
Thank you, but it's not exactly what I need. I'll try to
follow the logic of your example:
Similar Messages
-
CP7 - Show 4 (or more) decimal points for User Variable?
Is there a way to show 4 or more decimal points for user variables?
For some reason, I'm only showing two decimal points for user variables in Captivate 7.
MickyYeah, I was afraid of that.
Right now, I have am dividing the values of two separate text box entry fields. I have to calculate the values to determine if they are getting a promotion, lateral transfer or lower pay range.
I'll figure out a workaround or just use java. -
DEBUG - how can I put a "break-point" when a variable have a certain value
Hi
I need help...
Do you know some kind os instruction or tools to see and stop in debug a program when a variable have a specified value ?
For example:
At debug I want that a program "stop" when likp-vbeln = 70000123000.
Now for do this, I change the code and insert a IF( ), and i put a breakpoint. But i need a way without need change code.
ThanksHi Ricardo,
Use Watch point for this puppose.
Watchpoints allow you the option of monitoring the content of individual variables.
The Debugger stops as soon as the value of the monitored variable arrives.
In addition, conditions can be specified. The Debugger also checks whether such a condition is fulfilled.
Creating a Watchpoint
In the toolbar of the New Debugger, you will find the pushbutton Create Watchpoint . It brings you to the dialog box Create Watchpoint.
Using this function, you can enter the variable to be monitored.
All possible ABAP data structures are allowed here.
Hope this will help.
Regards,
Nitin. -
Pointer to substitution variable
I don't really know if this is a PLSQL or an APEX question but because I've encountered this problem in APEX so I'm going to ask it here.
I'm using APEX 3.2 (upgrade is in progress, you know how that goes)
In my DAO packages I refer to my apex application items so that I don't need to give them to the DAO as a parameter. (Hey they exist in the scope so why shouldn't I call them that way)
So I begin all my packages like:
g_naam tbl_contact.naam%type := v('P1_NAAM');Now this works perfectly when I'm working in the page processeses but when I'm in validation g_naam would equal null.
The strange thing is that v('P1_NAAM') contains the correct value. Now my theorie is that g_naam is loaded before the P1_NAME substitution value had the correct value.
In other programming languages you would make a pointer variable. This way both variables are always the same. Even if P1_NAME would change the global variable would always contain the correct variable.
Is something like a pointer possible in Oracle. I know cursors can do it but I'm not really referin to a query.
Of course this can easily be resolved if you always use the v('P1_NAAM') method. But when the name of your application item would change you're in big troubles :p.
Any help is greatly appreciated.
Regards
NicoStupid me, the variable is not null because of the scope. The variable is null because on declaration an error would occur.
If name was a varchar2(50) and you would enter 51 characters then on declaration my variable would fail. Functions that are called in global blocks will never result in a error.
On error they will return null.
So the correct answer for my problem would be
g_name varchar2(4000) := v('P1_NAME);Regards
Nico -
How to make Path point from inputed variable
Hi Im wandering how I can replicate the rectangle tool in Illustrator where by I can input sizes into a window and it shall draw an object for me. The problem I have is stating that a point should be a (variable1,variable2) instead of (X,Y)
im using the java ExtendScript Toolkit. so im trying:
var docRef = documents.add();
var piRef = activeDocument.pathItems;
var pathRef = piRef.add();
pathRef.setEntirePath( new Array(
new Array(0, 0),
new Array((shapeWidth), (shapeHeight)) ) ) ;
Although what im looking to do is more complex this is the part giving me trouble
any help would be greatly appreciatedThank you for the response
Yeah, I understand. I have to put the keyword first, the problem is sometimes I transfer almost around 800 photos at once. I haven't had much time to sort every photos and put the keyword on every Path photo. Beside so many photos in my library, and not well-organized. Also I have tried any possibilities of relevant criteria in smart album. But still zero result.
So, before I actually take the time to organize my thousands of photos manually, I was thinking maybe there's another way, simple and smart one, with this smart album feature. Anyone?
Ismail -
Is it possible to add quiz points from a variable?
Hello everyone!
I've got an activity coded in Flash CS5 in AS3 that returns a certain score. I would like to take that score and use it as the total Score for my Captivate 5 project.
I'm also having problems when accessing the variables cpQuizInfoTotalProjectPoints and cpQuizInfoPointsscored (they're returning a 0 value no matter what), but I don't even know if I'm going the right way like that.
Can anyone please help me with this?You are correct that the cpQuizInfoTotalProjectPoints and cpQuizInfoPointsscored are effectively READ-ONLY variables. You cannot change them via Advanced Actions in Captivate. They might however be modifiable via an AS3 widget. You can embed AS3 code in the widget that will execute when the Captivate SWF is running to perform all kinds of tasks. They're very powerful, but creating them requires you to know how to program in ActionScript 3. Even if you were already an AS3 programmer, you'd also still need to know quite a bit about the inner workings of Captivate to understand its internal structure and find out how to access the variables in a way that didn't break something else.
For information on how to program Captivate widgets, the best information is found on the Widget King blog: http://www.infosemantics.com.au/widgetking/
It has blog posts about creating question widgets. Please note that the information here is largely targeted at people with existing AS3 skills wishing to transfer them to Captivate. It's fairly complex.
As far as adding JavaScript functions to Captivate content: You would need to modify the HTM templates that Captivate uses when it publishes out to web content. The HTM pages have quite a bit of JavaScript already (to handle the possibility of using a right mouse click) but if you turn on SCORM quiz reporting, Cp uses totally different templates that have all the JavaScript code to hook the lesson into the SCORM API to communicate with the LMS. If you already know how to write JavaScript code, most of this will be understandable. If you don't already know JavaScript, don't wade in and start changing anything. You're more likely to break something.
The long and the short of it remains: Doing the kind of sophisticated scoring modifications you are talking about will require that you (or someone you know) has programming ability. -
How to send a variable from one class to another?
hello,
i have "One.as", which is the document class for one.swf.
i also have "two.swf", with "Two.swf" entered as its document
class...
One loads two into it. two is basically a 10 frame movieClip
with a variable at the beginning called "var endFrame:Boolean =
false", then on the last frame it says endFrame = true.
my question: how in the world do I communicate this back to
One.as??? i've tried ENTER_FRAME listeners, declaring the variable
here and there... and many other embarrassingly usuccessful
strategies.
i would just like to load in "three.swf" after two.swf
finishes... but One needs to know that it has indeed finished.
your help would be greatly appreciated. thanksyarkehsiow,
> David,
> thank you for responding.
Sure thing! :)
> so does what you are saying mean that endFrame is a
property of
> two (the movieClip), or Two (the Class)?
If you've written a property named endFrame for your Two
class, then
yes, Two.endFrame is a property of that class.
Looking back at your original post, I see that you wrote
this:
> One loads two into it. two is basically a 10 frame
movieClip
> with a variable at the beginning called "var
endFrame:Boolean = false",
> then on the last frame it says endFrame = true.
So it sounds like your Two class extends MovieClip. (I'm not
sure
that's true, but that's what it sounds like.) That means your
Two class
supports all the features of the MovieClip class, including a
play() method,
a currentFrame property, and so on. In addition, you've added
new
functionality that amounts to -- by the sound of it -- a
property named
endFrame. If you made your property public (i.e., public var
endFrame),
then it should be accessible by way of an object reference to
your Two
instance.
myTwoInstance.endFrame;
> so can i invoke that method in One.as? do I call it
Two.endFrame (if
> (Two.endFrame == true) {?
Methods are things an object can *do,* such as
gotoAndPlay(). What
you're describing is a property (a characteristic ... in this
case, a
Boolean characteristic). You wouldn't use the expression
Two.endFrame
unless that property was static. Static classes are those
that cannot have
an instance made of them. Think of the Math class. It
contains numerous
static properties in the form of constants, such as Math.PI,
Math.E,
Math.SQRT2, and so on. You can't create an instance of the
Math class -- it
wouldn't make sense to -- so Math is a static class.
On the other hand, you definitely create instances of the
MovieClip
class. Every movie clip symbol is an instance of MovieClip
class, which
means that each instance carries its own unique values for
MovieClip class
members. The MovieClip class defines x and y properties, but
each movie
clip symbol (that is, each instance of the MovieClip class)
configures its
own values of those properties, depending on where each
instance is located
on the Stage.
Assuming your Two class is not static, then somewhere along
the line,
your One class will have to make an instance of it. Somethine
like ...
// inside your One class ...
var myTwo:Two = new Two();
... at which point that myTwo variable because a reference to
that
particular instance of Two. You can invoke Two methods on
that instance.
You can invoke Two properties and events on that instance.
You can invoke
whatever functionality is defined by the Two class on that
myTwo instance.
If Two extends MovieClip, that means you can also invoke any
MovieClip class
member on that myTwo instance.
At some point in your One class, you can refer to that myTwo
instance
later and check if the value of myTwo.endFrame is true or
false.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Error msg pointing to nonexistent var (WARNING: LONG POST)
I'm sorry to have to post my entire program, but I keep getting an error msg that points to a variable that is NOWHERE in my code. The var is called PwChar. It's mentioned in the error msg, but is nowhere in my code. This is even after saving and recompiling it THREE TIMES. Please, someone, tell me where this error appears in my code, if you even can. Your help will be greatly appreciated. Here is the error msg:
C:\jdk1.2.1\bin>javac PwGenerator.java
PwGenerator.java:228: Incompatible type for =. Can't convert java.lang.Character
to char.
pwChar = new Character((char) (newAsciiRange));
^
PwGenerator.java:234: Incompatible type for =. Can't convert java.lang.Character
to char.
pwChar = new Character((char) (newAsciiRange[0]));
^
2 errors
Now here is my code (sorry for the length):
// My Javafied Password Generator
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class PwGenerator extends JApplet
private String pw;
private JPanel centerPanel, northPanel, southPanel;
private JComboBox numchars;
private JCheckBox lettersUpper, lettersLower, numbers, specialChars;
private JButton generate, reset;
private JTextField textfield;
private int asciiRange[], newAsciiRange[];
private String pwLength[] = {"6", "7", "8", "9", "10", "11", "12"};
private int lengthSelected;
private JLabel pwLabel, numCharLabel;
private boolean wantSpecialchars, wantNumbers, wantUppercase, wantLowercase;
public void init()
// instantiate widgets
asciiRange = new int[94];
numCharLabel = new JLabel("Number of characters for password");
numchars = new JComboBox(pwLength);
lettersUpper = new JCheckBox("Uppercase letters");
lettersLower = new JCheckBox("Lowercase letters");
numbers = new JCheckBox("Numbers");
specialChars = new JCheckBox("Special characters");
generate = new JButton("Generate password");
reset = new JButton("Clear");
textfield = new JTextField(12);
pwLabel = new JLabel("Your new password is: ");
// add widgets to the content pane
Container c = getContentPane();
c.setLayout(new BorderLayout());
centerPanel = new JPanel();
centerPanel.setLayout(new GridLayout(3, 2));
centerPanel.add(lettersUpper);
centerPanel.add(lettersLower);
centerPanel.add(numbers);
centerPanel.add(specialChars);
centerPanel.add(generate);
centerPanel.add(reset);
c.add(centerPanel, BorderLayout.CENTER);
northPanel = new JPanel();
northPanel.setLayout(new FlowLayout());
northPanel.add(numCharLabel);
northPanel.add(numchars);
c.add(northPanel, BorderLayout.NORTH);
southPanel = new JPanel();
southPanel.setLayout(new FlowLayout());
southPanel.add(pwLabel);
southPanel.add(textfield);
c.add(southPanel, BorderLayout.SOUTH);
} // end init
public void start()
// connect event handlers to the widgets
numchars.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e)
lengthSelected = Integer.parseInt(pwLength[numchars.getSelectedIndex()]);
CheckBoxHandler handler = new CheckBoxHandler();
lettersUpper.addItemListener(handler);
lettersLower.addItemListener(handler);
numbers.addItemListener(handler);
specialChars.addItemListener(handler);
generate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
setAsciiRange();
trimAsciiRange();
reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
textfield.setText("");
} // end start
public void setAsciiRange()
int numRange[] = new int[10];
int uppercaseRange[] = new int[26];
int lowercaseRange[] = new int[26];
int specialcharRange[] = new int[32];
System.out.println("Welcome to setAsciiRange!");
if (!wantSpecialchars && !wantNumbers && !wantUppercase && !wantLowercase)
JOptionPane.showMessageDialog(this, "You must make a selection", "Error", JOptionPane.ERROR_MESSAGE);
if (wantNumbers)
for (int i=0, j=48; i<numRange.length; i++, j++)
numRange[i] = j;
System.out.println("Number " + i + " is " + j +"\n");
} // end for
} // end if
if (wantUppercase)
for (int i=0, j=65; i<uppercaseRange.length; i++, j++)
uppercaseRange[i] = j;
System.out.println("Uppercase letter " + i + " is " + j + "\n");
} // end for
} // end if
if (wantLowercase)
for (int i=0, j=97; i<lowercaseRange.length; i++, j++)
lowercaseRange[i] = j;
System.out.println("Lowercase letter " + i + " is " + j + "\n");
} // end for
} // end if
if (wantSpecialchars)
for (int i=0, j=33; i<15; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=15, j=58; i<22; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=22, j=91; i<28; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=28, j=123; i<specialcharRange.length; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
} // end if
if (numRange != null)
System.arraycopy(numRange, 0, asciiRange, 0, numRange.length);
if (uppercaseRange != null)
System.arraycopy(uppercaseRange, 0, asciiRange, firstEmptyElement(), uppercaseRange.length);
if (lowercaseRange != null)
System.arraycopy(lowercaseRange, 0, asciiRange, firstEmptyElement(), lowercaseRange.length);
if (specialcharRange != null)
System.arraycopy(specialcharRange, 0, asciiRange, firstEmptyElement(), specialcharRange.length);
for (int i=0; i<asciiRange.length; i++)
System.out.println(asciiRange[i]);
private int firstEmptyElement()
int i;
for (i=0; i<asciiRange.length; i++)
if (asciiRange[i] == 0)
break;
return i;
private void trimAsciiRange()
newAsciiRange = new int[firstEmptyElement()];
for (int i=0; i<newAsciiRange.length; i++)
newAsciiRange[i] = asciiRange[i];
System.out.println("newAsciiRange element " + i + " is " + newAsciiRange[i]);
public void generatePw (int selectedLength)
int randomNum;
char pwChar;
pw = "";
for (int i=0; i<=lengthSelected; i++)
randomNum = 1 + (int) (Math.random() * newAsciiRange.length);
try {
pwChar = new Character((char) (newAsciiRange[i]));
pw += pwChar;
System.out.print(pwChar + " ");
catch(ArrayIndexOutOfBoundsException e) {
System.out.print("Setting out-of-bounds index to 0");
pwChar = new Character((char) (newAsciiRange[0]));
pw += pwChar;
System.out.print(pwChar + " ");
System.out.println(pw);
textfield.setText(pw);
private class CheckBoxHandler implements ItemListener
public void itemStateChanged(ItemEvent e)
if (e.getSource() == specialChars)
if (e.getStateChange() == ItemEvent.SELECTED)
wantSpecialchars = true;
else
wantSpecialchars = false;
} // end outer if
if (e.getSource() == numbers)
if (e.getStateChange() == ItemEvent.SELECTED)
wantNumbers = true;
} // end if
else
wantNumbers = false;
} // end else
} // end if
if (e.getSource() == lettersUpper)
if (e.getStateChange() == ItemEvent.SELECTED)
wantUppercase = true;
else
wantUppercase = false;
} // end if
if (e.getSource() == lettersLower)
if (e.getStateChange() == ItemEvent.SELECTED)
wantLowercase = true;
else
wantLowercase = false;
} // end ifI'm sorry to have to post my entire program, Ok - but next time please use code tags (even though it makes it easier this time, it makes it so much easier to read)
but I
keep getting an error msg that points to a variable
that is NOWHERE in my code. Does your editor have a "find" function? In Notepad it's CTL-F
The var is called
PwChar. no, it's called pwChar
It's mentioned in the error msg, but is
nowhere in my code. This is even after saving and
recompiling it THREE TIMES. Please, someone, tell me
where this error appears in my code, if you even can.
Your help will be greatly appreciated. Here is the
e error msg:
C:\jdk1.2.1\bin>javac PwGenerator.java
PwGenerator.java:228: Incompatible type for =. Can't
convert java.lang.Character
to char.
pwChar = new Character((char)
r((char) (newAsciiRange));
^
PwGenerator.java:234: Incompatible type for =. Can't
convert java.lang.Character
to char.
pwChar = new Character((char)
r((char) (newAsciiRange[0]));
^
2 errors
Now here is my code (sorry for the length):
// My Javafied Password Generator
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class PwGenerator extends JApplet
private String pw;
private JPanel centerPanel, northPanel,
l, southPanel;
private JComboBox numchars;
private JCheckBox lettersUpper, lettersLower,
r, numbers, specialChars;
private JButton generate, reset;
private JTextField textfield;
private int asciiRange[], newAsciiRange[];
private String pwLength[] = {"6", "7", "8", "9",
", "10", "11", "12"};
private int lengthSelected;
private JLabel pwLabel, numCharLabel;
private boolean wantSpecialchars, wantNumbers,
s, wantUppercase, wantLowercase;
public void init()
// instantiate widgets
asciiRange = new int[94];
numCharLabel = new JLabel("Number of characters
ters for password");
numchars = new JComboBox(pwLength);
lettersUpper = new JCheckBox("Uppercase
case letters");
lettersLower = new JCheckBox("Lowercase
case letters");
numbers = new JCheckBox("Numbers");
specialChars = new JCheckBox("Special
cial characters");
generate = new JButton("Generate password");
reset = new JButton("Clear");
textfield = new JTextField(12);
pwLabel = new JLabel("Your new password is: ");
// add widgets to the content pane
Container c = getContentPane();
c.setLayout(new BorderLayout());
centerPanel = new JPanel();
centerPanel.setLayout(new GridLayout(3, 2));
centerPanel.add(lettersUpper);
centerPanel.add(lettersLower);
centerPanel.add(numbers);
centerPanel.add(specialChars);
centerPanel.add(generate);
centerPanel.add(reset);
c.add(centerPanel, BorderLayout.CENTER);
northPanel = new JPanel();
northPanel.setLayout(new FlowLayout());
northPanel.add(numCharLabel);
northPanel.add(numchars);
c.add(northPanel, BorderLayout.NORTH);
southPanel = new JPanel();
southPanel.setLayout(new FlowLayout());
southPanel.add(pwLabel);
southPanel.add(textfield);
c.add(southPanel, BorderLayout.SOUTH);
} // end init
public void start()
// connect event handlers to the widgets
numchars.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e)
lengthSelected =
d =
Integer.parseInt(pwLength[numchars.getSelectedIndex()]
CheckBoxHandler handler = new CheckBoxHandler();
lettersUpper.addItemListener(handler);
lettersLower.addItemListener(handler);
numbers.addItemListener(handler);
specialChars.addItemListener(handler);
generate.addActionListener(new ActionListener()
er() {
public void actionPerformed(ActionEvent e)
setAsciiRange();
trimAsciiRange();
reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
textfield.setText("");
} // end start
public void setAsciiRange()
int numRange[] = new int[10];
int uppercaseRange[] = new int[26];
int lowercaseRange[] = new int[26];
int specialcharRange[] = new int[32];
System.out.println("Welcome to setAsciiRange!");
if (!wantSpecialchars && !wantNumbers &&
s && !wantUppercase && !wantLowercase)
JOptionPane.showMessageDialog(this, "You must
u must make a selection", "Error",
JOptionPane.ERROR_MESSAGE);
if (wantNumbers)
for (int i=0, j=48; i<numRange.length; i++,
; i++, j++)
numRange[i] = j;
System.out.println("Number " + i + " is " + j
is " + j +"\n");
} // end for
} // end if
if (wantUppercase)
for (int i=0, j=65; i<uppercaseRange.length;
ength; i++, j++)
uppercaseRange[i] = j;
System.out.println("Uppercase letter " + i + " is "
" + j + "\n");
} // end for
} // end if
if (wantLowercase)
for (int i=0, j=97; i<lowercaseRange.length;
ength; i++, j++)
lowercaseRange[i] = j;
System.out.println("Lowercase letter " + i +
" + i + " is " + j + "\n");
} // end for
} // end if
if (wantSpecialchars)
for (int i=0, j=33; i<15; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
for (int i=15, j=58; i<22; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is
i + " is " + j + "\n");
for (int i=22, j=91; i<28; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
for (int i=28, j=123;
j=123; i<specialcharRange.length; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
} // end if
if (numRange != null)
System.arraycopy(numRange, 0, asciiRange, 0,
ge, 0, numRange.length);
if (uppercaseRange != null)
System.arraycopy(uppercaseRange, 0, asciiRange,
Range, firstEmptyElement(), uppercaseRange.length);
if (lowercaseRange != null)
System.arraycopy(lowercaseRange, 0, asciiRange,
Range, firstEmptyElement(), lowercaseRange.length);
if (specialcharRange != null)
System.arraycopy(specialcharRange, 0,
ge, 0, asciiRange, firstEmptyElement(),
specialcharRange.length);
for (int i=0; i<asciiRange.length; i++)
System.out.println(asciiRange[i]);
private int firstEmptyElement()
int i;
for (i=0; i<asciiRange.length; i++)
if (asciiRange[i] == 0)
break;
return i;
private void trimAsciiRange()
newAsciiRange = new int[firstEmptyElement()];
for (int i=0; i<newAsciiRange.length; i++)
newAsciiRange[i] = asciiRange[i];
System.out.println("newAsciiRange element " + i
" + i + " is " + newAsciiRange[i]);
public void generatePw (int selectedLength)
int randomNum;
char pwChar;
pw = "";
for (int i=0; i<=lengthSelected; i++)
randomNum = 1 + (int) (Math.random() *
om() * newAsciiRange.length);
try {
pwChar = new Character((char) (newAsciiRange));
[b]pw += pwChar;
System.out.print(pwChar + " ");
catch(ArrayIndexOutOfBoundsException e) {
System.out.print("Setting out-of-bounds index to
o 0");
pwChar = new Character((char) (newAsciiRange[0]));
pw += pwChar;
System.out.print(pwChar + " ");
System.out.println(pw);
textfield.setText(pw);
private class CheckBoxHandler implements
ts ItemListener
public void itemStateChanged(ItemEvent e)
if (e.getSource() == specialChars)
if (e.getStateChange() == ItemEvent.SELECTED)
wantSpecialchars = true;
else
wantSpecialchars = false;
} // end outer if
if (e.getSource() == numbers)
if (e.getStateChange() == ItemEvent.SELECTED)
wantNumbers = true;
} // end if
else
wantNumbers = false;
} // end else
} // end if
if (e.getSource() == lettersUpper)
if (e.getStateChange() == ItemEvent.SELECTED)
wantUppercase = true;
else
wantUppercase = false;
} // end if
if (e.getSource() == lettersLower)
if (e.getStateChange() == ItemEvent.SELECTED)
wantLowercase = true;
else
wantLowercase = false;
} // end if -
Setting up JAVA_HOME env variable
Hi,
I am a linux user trying to kill my tomcat server. I try to run an .sh script and
I get the following error
tomcat/bin> ./shutdown.sh
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
How do I know where to point my environment variables to??tomcat/bin> ./shutdown.sh
The JAVA_HOME environment variable is not defined
correctly
This environment variable is needed to run this
program
NB: JAVA_HOME should point to a JDK not a JREIf this means something to you...
your environment should be set to a JDK directory [ [i]containing tools.jar in the lib sub-directory ] instead of a JRE.
export JAVA_HOME=/usr/local/jdk50 -
Hi 9 POINT CALIBRATION NOT WORKING IN VISION BUILDER
I try to do 9 point calibration by using run labview method in Vision builder .
here i tried teo labview files here Reference 1-1.vi working (it gives in mm) (here i am not assigning 9 points )
Reference 1-11.vi file i did invidual points to so that i can enter directly 9 point and real world ..
but its not working .
Is there anyway to 9 point calibraiton in vision builder .
if i have to use run labview step means .. please give me vi file to to enter 9 points (from set variable )
Attachments:
Reference_Points1-1.vi 12 KB
Reference_Points1-11.vi 23 KBI'm using Flash Builder 4.7 for a pure flash project (ie, no mxml) & all my graphics objects are in a swc that was exported from an FLA.
I've made some progress with that issue. If I explicitly assign the scale9Grid dimensions in the code, it seems to work:
obj.scale9Grid = new Rectangle(x,y,w,h)
...but having to do that is a real productivity killer. Would be nice to use the 9-slice guide setting in the FLA -
Trouble Understanding variables
I am committed to learning A3, but HOLY CRAP!! I have never
been a programmer, just a lowly designer. Apparently a pretty dumb
designer! :)
I can breeze through this in AS2 with no problem, but AS3 is
killin' me! I am trying to create a music player that will embed in
a web page, it will be XML driven and the XML will be populated via
a database and generated by PHP. I am using a listbox component to
display the playlist (from the XMLfile). I have figured out how to
start playing the first mp3 on the list.
Now when the user click a different button, I can get that
song to play also, but I ended up created a second sound object, so
the two play at the same time. Not good. I have tried and tried to
access the object that is playing the first sound so I can stop it
and load a new sound into it - I am about to pull my hair out!
I seem to missing a basic understanding of how to access this
object and change the variable value so I can play a new song. Any
help would be GREATLY appreciated!!Vern,
> If I understand correctly: any variable I am going to
use outside
> of the function that assigns its value needs to be
declared OUTSIDE
> of that function first?
Yes.
> Once declared it can be used anywhere, but if it isn't
declared
> outside, then the value is stuck inside that function.
Is that correct?
Close. In fact, if you're coding in the main timeline,
you're so close,
you could arguably define it in those terms and be fine.
Variables (and
functions) are available to the scope in which they're
declared. If you
declare a variable in the main timeline, then that variable
is available in
that frame and any subsequent frame of that timeline.
Depending on the
circumstances of your FLA, the main timeline may indeed feel
like
"everywhere," to the point where the variable could be said
to be used
"anywhere" -- but it's really not much different from the
restriction a
variable feels when declared inside a function; it's just
that the whole
movie takes place inside that "function"/FLA/SWF.
> If I got that right, then for my scrubber, I need to set
up some
> variables that hold SoundChannel.position, Sound.length,
> MovieClip.position
> THEN create a function which assigns values and
calculate the
> MovieClip.position
Yes. That way, any number of functions can use those
variables. But
keep in mind, all you really need are variables that point to
your instances
of Sound, SoundChannel, and MovieClip. Then use those
variables to
reference the necessary properties of those classes. (In
other words, no
need to make a mySound variable *and* a mySoundLength
variable: the mySound
variable suffices, because it leads to the Sound.length
property as simply
as mySound.length.)
> I never liked how clunky onEnterFrame could is. I assume
the Timer
> class is a bit more streamlined?
It's just another tool in the toolbox. :) Timer is the
recommended new
version of setInterval() and setTimeout() combined.
> I am so used to _root.movieClip.variable=foo; (I mean
the easy
> access to any variable from anywhere) but change is
good, I like
> change. Change is good.
I like change in my pocket! ;) The thing about an expression
like
_root.movieClip.variable is that you could often just
reference the variable
anyway, without the need for the "_root" reference. AS3 has
root (no
underscore), which behaves in many ways like _root, but dig
into that a bit
... you'll find some important differences.
> So it sounds as if, to include the loadbar within all of
this, then I need
> to move the playHead along the width of the loadbar, not
a set length
> in pixels.
You could do a set length, but it's much more flexible if
you use the
width of some other object, like a track or some other movie
clip. If you
go with the width of some object, you can *change* the width
of that object
and the code still works.
> The drag part should be easy enough, but adjusting the
actual audio
> from that may give some fits!
To derive volume, you'll take the position of the draggable
knob along
its track and divide that by the width of the track. Assume
you have a
ridiculously long volume track, 500px. The volume knob has
been dragged
halfway across, to 250px. 250 / 500 is 0.5, which is the AS3
way of
specifying 50% volume. Now imagine the track is 50px wide.
The knob has
been dragged all the way across (to 50px). 50 / 50 is 1,
which is 100%
volume. And so on.
> But here is my real question about that, will it be OK
to try and add
> that functionality in once the actual playHead is
working, or is
> that a mistake to not include it from the beginning?
Ehh, for something like this -- especially if you're
teaching yourself
and involved in a learning experience -- I'd say it doesn't
matter one way
or the other. Take small steps and master each step. Sooner
or later, what
you're doing will "click" for you, and after that, you'll
find that you can
add or remove features as you please.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
C# Script Task - MessageBox Variables
I dont know C#, so I thought I would start simple and try to do message box a variable. I am struggling even with that.
In VB.net I would print a value of the variable in a message box using the following syntax.
Msgbox(dts.variables(“VariableName”).value.tostring)
In C#
MessageBox.Show(Dts.Variables
At the point of selecting variables it is giving me this message.
Error 1 Non-invocable member 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTAProxy.ScriptObjectModel.Variables' cannot be used like a method.
I have following using statements defined. Do I need more?
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime.VSTAProxy;
using System.Windows.Forms;
using Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTAProxy;
I might be missing something. Can anyone help?
Thanks
SuthaWhy do I get the following exception?:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript() -
Define column width using a variable
Hi All,
Is there a way to define the width of a specific column using a variable in an rtf template?
I have a requirement that one column should fit it's (largest) content. Now my idea is to replace the static width in points with a variable, but seems to be impossible in MS Word.
I've already tried to use split-column-width but then I also have to use split-column-header etc. which seems a bit excessive.
Is there a way to do this nice and tidy?
Kind regards,
MachielThe script linked in this thread
http://forums.adobe.com/thread/1115330
can copy column widths; storing and retrieving them from a table style. The style won't apply the widths directly, but I have found it very useful. -
Do I need to set host side shared variables to RT FIFO?
Hello there,
in my application a LV host application communicates with compact RIO through shared variables. On cRIO i have some shared vars with RT FIFO enabled. On host side for those vars which are bound to cRIO i did the same. Is that neccessary?
In general I am confused about shared variable settings on both sides, for example when I want network buffering. Do I set buffering on RT side or on PC side or on both, what is the difference?
regards
ThomasDear Thomas,
thank you so much for your post. The shared variable with RT FIFO enabled works the same as the RT FIFO functions on the RT functions palette. The RT FIFO is for communication between the higher priority loop and the normal priority loop. You can see it like this; if the shared variable with RT Fifo enabled is network published there is a communication loop (hidden) which publishes the shared variable to the network port of the cRIO system. The RT FIFO option is only for the communication between your high priority loop and this hidden loop. The hidden loop is executed when the higher priority loop is idle. Again I speak about hidden loop just to create a clear picture.
So for your PC side no RT FIFO is needed. Please notice that by using shared variables you can lose data; for example the cRIO publishes the data faster then your PC can read the data; you will lose data points. Shared variables are based on UDB, you can see it like a radio station which is transmitting. It doesn't matter if people are listing to the radio station. Use the TCP functions (for example theSTM library ) or the network stream API if you don't want to lose data.
Please let me know if you have any further questions,
Best regards,
Martijn S
Applications Engineer
NI Netherlands -
How can see upto 2 decimal points
how can i get the result upto 2 decimal points in a variable which is of
double type, when i do
system.out.print(variable name);Use DecimalFormat.
DecimalFormat td=new DecimalFormat("0.00");
Maybe you are looking for
-
To repeat the problem: 1.) Open a .pdf file in Firefox 4 2.) Open a new tab by using the (+) tab button 3.) Try to select within the URL bar (unsuccessful) I cannot seem to direct my browser to a new website in a new tab after viewing a .pdf file wit
-
My Photoshop CS6 Preferences are frequently gone (lost) [Windows 7]
My Photoshop CS6 preferences are frequently deleted and I have to go thru the entire preferences menu to set them again. What causes the pereferenes to disappear? I am not doing any particular clean up. Is it possible to save the preferences in a fil
-
Any Flickr Export plugin available for Aperture 3?
I was happy to see Flickr included in Aperture 3, but to say the least, it really *****. The worst thing is that it applies my own keywords to all the uploaded images. I don't want the (full) names of peoples in my pictures to display at Flickr and h
-
Facebook Bug on KK 14.3.A.0.757
I don't know if this is the right section to post this but I observed this bug on the latest stock ROM KK 14.3.A.0.757. Whenever I open chat and try to send a voice message it freezes and force close and won't sent the message. Reopening the FB app t
-
Motion 3 crashed in the middle of a project 2 days ago. Since then, every time I open the program, I can't get the File Browser window to show up, and I can't "Add Behavior" or "Add Filter" (both buttons appear active, but when I hit them, nothing ha