How to pass joint in a function
hi,
i want to pass Right Hand joint in a function and want to store last 5 position of joint in an point array. but when i pass the joint as below :-
Point point = ExponentialWeightedAvg(Joint HandRight)
it tells that joint is a type not a variable.
so,
how can i pass right hand joint and do some calculations.
thanks !!
The syntax you wrote is incorrect. As with any programming language, you should be familiar how to write the correct syntax in the language of choice, since that would be a pre-requisite for using the SDK.
We already provide a BodyBasics sample that demonstrates how you can pass joint information to other functions. The key will be to get the joint position and pass that to the function you want:
CameraSpacePoint position = joints[JointType.HandRight].Position;
Carmine Sirignano - MSFT
Similar Messages
-
How to pass argument in main function ?
How to pass arguments in main function of one class from another class ?
I don't want to pass argument from command prompt.
I want to try something like this -
class Test{
public static void main(String args[]){
for(int i=0;i<args.length;i++)
System.out.println(args);
class Fun{
public static void main(String args[]){
Test t=new Test("Hello","good bye");
when i run Fun class it gives error.
Suggest me how can i do that.In Fun class main method does not take arguments that is fine. In Test class instead of main method you can have constructor to take input parameters as suggested by BalusC
However, if you want to make your existing code work, you can call (though not appropriate) main() method of Test class from main() method of Fun class (As main() method is static object is not required to invoke this):
Test.main(new String[]{"Hello","good bye"});Here is your code:
class Test{
public static void main(String args[]){
for(int i=0;i<args.length;i++)
System.out.println(args);
public class Fun{
public static void main(String args[]){
//Test t=new Test("Hello","good bye");
Test.main(new String[]{"Hello","good bye"});
} Thanks,
Mrityunjoy -
How to pass parameters to ABAP function in Crystal report
Hi All,
I am creating a Crystal report on top of SAP ECC 6.0. I am trying to call ABAP functions. But I am not able to see an option to pass any parameters to the function.
Can you please help with how to pass a parameter to a ABAP function?
Thanks
ChetanHi there,
we thought we found the problem. But the ABAP function is now RFC compatible and i still do not see the export parameters of the ABAP function in Crystal.
Question: The ABAP function does not deliver columns as the result but a table instead. Could this be the problem? Regarding to this we will have to change the output functinality of the ABAP-function to teliver colums instead of a table.
Thanks for your help,
regards
Sebastian -
How to pass parameters to planning function in WAD
Hi All,
I want to pass parameters to planning function in WAD. Pls suggest how can I do that.
Thanx
Amit JainHi Amit,
insert your planning function as a command in WAD ("EXEC_PLANNING_FUNCTION"). In the screen where you enter the technical name of your planning function you can also insert Data Bindings. There you can do a selection binding for a special characteristic or a variable value. If you want to assign a static (fix) value to a variable for example you can do a variable binding (technical name of variable/variable type "Variable Input String"/Variable Input String: set the required value).
The same thing can be done executing planning sequences within WAD.
Brgds,
Marcel -
How to pass variable in a function
I would like to ask how to pass the value "char" into the
"onSoundComplete" function? many thanks! many thanks!
_root.playVO = function(pageNum, char){
var myVO:Sound = new Sound();
myVO.loadSound("vo/vo" + pageNum + ".mp3", true);
_root.myVO.onSoundComplete = function(char){
_root.attachMovie("indicator", "indicator",
_global.curLevel++);
_root[char].mouth.gotoAndStop("mute");
_root.indicator.clickIndicator_btn.onRelease = function(){
_root.play();
_root.currentPage++;
_root.display(_root.currentPage);
this._parent.removeMovieClip();
}I don't think you can pass variables into the onSoundComplete
handler function. But you don't really need to as you've written
the code. You're passing it into the playVO function so it should
be availble to the onComplete handler (which you've written inside
playVO) without having to restate it. As long as you pass it in
when calling playVO (e.g. playVO(myVar);)
Hope that helps! -
How to pass parameters to Responder functions?
Hi guys,
Im using AMFPHP, and would like to pass some paramteres to Function in Responder, how can i do that?
new Responder('success', 'fault'); // I would like to pass few simple parameters to success function.
Saludos
marcintry following, you may provide the type for event argument in function(event)
new Responder(function(event):void{actualFunction(evnet,yourParam);}, 'fault'); -
How to pass parameter into extract function (for XMLTYPE)
I have a table PROBLEMXML with XMLTYPE field xml_column. In this column there are several deffinitions for the problem. There is no max amount of deffinitions and it can be no definition at all. I need to return all definitions for every problem as a string wirh definitions separated by ";".
Query
SELECT extract(prob.Def,'/Definitions/Definition[1]/@var') || ';'|| extract(prob.Def,'/Definitions/Definition[2]/@var')
FROM PROBLEMXML j ,
XMLTABLE (
'/problem'
PASSING j.xml_column
COLUMNS probid VARCHAR (31) PATH '/problem/@id',
Def XMLTYPE PATH '/problem/Definitions') prob
where PROBLEM_ID =1;
returns exactly what I want a;m.
But
declare
my_var varchar2(2000) :=null;
n1 number;
n2 number;
begin
n1:=1;
n2:=2;
SELECT extract(prob.Def,'/Definitions/Definition[n1]/@var') || '|'|| extract(prob.Def,'/Definitions/Definition[n2]/@var') into my_var
FROM ETL_PROBLEMXML_STG_T j ,
XMLTABLE (
'/problem'
PASSING j.xml_column
COLUMNS probid VARCHAR (31) PATH '/problem/@id',
Def XMLTYPE PATH '/problem/Definitions') prob
where PROBLEM_ID =1;
dbms_output.put_line(my_var);
end;
returns NULL.
Is there is a way to pass parameter into extract function?I need to return all definitions for every problem as a string wirh definitions separated by ";".In XQuery, there's the handy function "string-join" for that.
For example :
SQL> WITH etl_problemxml_stg_t AS (
2 SELECT 1 problem_id,
3 xmltype('<problem id="1">
4 <Definitions>
5 <Definition var="var1"></Definition>
6 <Definition var="var2"></Definition>
7 <Definition var="var3"></Definition>
8 </Definitions>
9 </problem>') xml_column
10 FROM dual
11 )
12 SELECT j.problem_id,
13 prob.probid,
14 prob.def
15 FROM etl_problemxml_stg_t j,
16 XMLTable(
17 'for $i in /problem
18 return element r
19 {
20 $i/@id,
21 element d { string-join($i/Definitions/Definition/@var, ";") }
22 }'
23 passing j.xml_column
24 columns
25 probid varchar2(30) path '@id',
26 def varchar2(100) path 'd'
27 ) prob
28 ;
PROBLEM_ID PROBID DEF
1 1 var1;var2;var3 -
How to pass values from one function to another
Hi,
I am a middle school teacher and a newbie in Flash Actionscript. I am trying to create a countdown timer for use in my class during tests. The start and pause functions work as required, but not the pause button. When I click on the pause button, the timer is reset to 0:00:00. Please help. Here is the code I had written so far:
var Subject1timeLeftHr;
var Subject1timeLeftMin;
var Subject1timeLeftSec;
Subject1start_btn._visible = true;
Subject1pause_btn._visible = false;
Subject1rotor_mc.gotoAndStop(1);
Subject1rotor_mc._visible = false;
Subject1durationHr_txt.text = "0";
Subject1durationMin_txt.text = "00";
Subject1durationSec_txt.text = "00";
Selection.setFocus(Subject1durationHr_txt);
function SubjectdurationHr(SubjectxdurationHr_txt, SubjectxdurationMin_txt)
if (SubjectxdurationHr_txt.length == 1)
Selection.setFocus(SubjectxdurationMin_txt);
function SubjectdurationMin(SubjectxdurationMin_txt, SubjectxdurationSec_txt)
if (SubjectxdurationMin_txt.length == 2)
Selection.setFocus(SubjectxdurationSec_txt);
function SubjectdurationSec(SubjectxdurationSec_txt, SubjectxdurationHr_txt)
if (SubjectxdurationSec_txt.length == 2)
Selection.setFocus(SubjectxdurationHr_txt);
Subject1durationHr_txt.onChanged = function()
SubjectdurationHr(Subject1durationHr_txt,Subject1durationMin_txt);
Subject1durationMin_txt.onChanged = function()
SubjectdurationMin(Subject1durationMin_txt,Subject1durationSec_txt);
Subject1durationSec_txt.onChanged = function()
SubjectdurationSec(Subject1durationSec_txt,Subject1durationHr_txt);
function startcountdown(SubjectxdurationLeft, SubjectxdurationHr, SubjectxdurationHr_txt, SubjectxdurationMin, SubjectxdurationMin_txt, SubjectxdurationSec, SubjectxdurationSec_txt, Subjectxduration, SubjectxstartTime, SubjectxendTime, Subjectxtimer_mc, Subjectxpause_btn, Subjectxstart_btn, Subjectxrotor_mc, SubjectxtimeLeft, SubjectxtimeLeftHr, SubjectxtimeLeftMin, SubjectxtimeLeftSec, SubjectxtimeLeftHr_txt, SubjectxtimeLeftMin_txt, SubjectxtimeLeftSec_txt)
delete SubjectxdurationLeft;
delete SubjectxdurationHr;
delete SubjectxdurationMin;
delete SubjectxdurationSec;
delete Subjectxduration;
delete SubjectxdurationHr_txt.text;
delete SubjectxdurationMin_txt.text;
delete SubjectxdurationSec_txt.text;
SubjectxstartTime = getTimer();
Subjectxtimer_mc.onEnterFrame = function()
if (SubjectxdurationHr_txt.text == Nan || SubjectxdurationMin_txt.text == Nan || SubjectxdurationSec_txt.text == Nan)
else
SubjectxdurationHr = 60 * 60 * 1000 * Number(SubjectxdurationHr_txt.text);
SubjectxdurationMin = 60 * 1000 * Number(SubjectxdurationMin_txt.text);
SubjectxdurationSec = 1000 * Number(SubjectxdurationSec_txt.text);
Subjectxduration = SubjectxdurationHr + SubjectxdurationMin + SubjectxdurationSec;
SubjectxendTime = SubjectxstartTime + Subjectxduration;
SubjectxdurationLeft = SubjectxendTime - getTimer();
if (SubjectxdurationLeft > 0)
SubjectxdurationHr_txt._visible = false;
SubjectxdurationMin_txt._visible = false;
SubjectxdurationSec_txt._visible = false;
Subjectxpause_btn._visible = true;
Subjectxstart_btn._visible = false;
Subjectxrotor_mc._visible = true;
Subjectxrotor_mc.play();
SubjectxtimeLeft = SubjectxdurationLeft / (1000 * 60 * 60);
SubjectxtimeLeftHr = Math.floor(SubjectxtimeLeft);
SubjectxtimeLeftMin = Math.floor((SubjectxtimeLeft - SubjectxtimeLeftHr) * 60);
SubjectxtimeLeftSec = Math.floor(((SubjectxtimeLeft - SubjectxtimeLeftHr) * 60 - SubjectxtimeLeftMin) * 60);
SubjectxtimeLeftHr_txt.text = String(SubjectxtimeLeftHr);
if (SubjectxtimeLeftHr_txt.length < 1)
SubjectxtimeLeftHr_txt.text = "0" + SubjectxtimeLeftHr_txt.text;
SubjectxtimeLeftMin_txt.text = String(SubjectxtimeLeftMin);
if (SubjectxtimeLeftMin_txt.length < 2)
SubjectxtimeLeftMin_txt.text = "0" + SubjectxtimeLeftMin_txt.text;
SubjectxtimeLeftSec_txt.text = String(SubjectxtimeLeftSec);
if (SubjectxtimeLeftSec_txt.length < 2)
SubjectxtimeLeftSec_txt.text = "0" + SubjectxtimeLeftSec_txt.text;
else
delete Subjectxtimer_mc.onEnterFrame;
SubjectxtimeLeftHr_txt.text = "";
SubjectxtimeLeftMin_txt.text = "";
SubjectxtimeLeftSec_txt.text = "";
SubjectxdurationHr_txt._visible = true;
SubjectxdurationMin_txt._visible = true;
SubjectxdurationSec_txt._visible = true;
Subjectxrotor_mc.gotoAndStop(1);
Subjectxrotor_mc._visible = false;
SubjectxdurationHr_txt.text = "0";
SubjectxdurationMin_txt.text = "00";
SubjectxdurationSec_txt.text = "00";
Subjectxpause_btn._visible = false;
Subjectxstart_btn._visible = true;
Selection.setFocus(SubjectxdurationHr_txt);
function pausecountdown(SubjectxdurationHr_txt, SubjectxtimeLeftHr, SubjectxdurationMin_txt, SubjectxtimeLeftMin, SubjectxdurationSec_txt, SubjectxtimeLeftSec, Subjectxstart_btn, Subjectxpause_btn, Subjectxrotor_mc)
delete Subjectxtimer_mc.onEnterFrame;
SubjectxdurationHr_txt.text = String(SubjectxtimeLeftHr);
SubjectxdurationMin_txt.text = String(SubjectxtimeLeftMin);
SubjectxdurationSec_txt.text = String(SubjectxtimeLeftSec);
Subjectxstart_btn._visible = true;
Subjectxpause_btn._visible = false;
Subjectxrotor_mc.stop();
Subject1pause_btn.onRelease = function()
pausecountdown(Subject1durationHr_txt,Subject1timeLeftHr,Subject1durationMin_txt,Subject1t imeLeftMin,Subject1durationSec_txt,Subject1timeLeftSec,Subject1start_btn,Subject1pause_btn ,Subject1rotor_mc);
Subject1start_btn.onRelease = function()
startcountdown(Subject1durationLeft,Subject1durationHr,Subject1durationHr_txt,Subject1dura tionMin,Subject1durationMin_txt,Subject1durationSec,Subject1durationSec_txt,Subject1durati on,Subject1startTime,Subject1endTime,Subject1timer_mc,Subject1pause_btn,Subject1start_btn, Subject1rotor_mc,Subject1timeLeft,Subject1timeLeftHr,Subject1timeLeftMin,Subject1timeLeftS ec,Subject1timeLeftHr_txt,Subject1timeLeftMin_txt,Subject1timeLeftSec_txt);
Subject1cancel_btn.onRelease = function()
Subject1timeLeftHr_txt.text = "";
Subject1timeLeftMin_txt.text = "";
Subject1timeLeftSec_txt.text = "";
Subject1durationHr_txt._visible = true;
Subject1durationMin_txt._visible = true;
Subject1durationSec_txt._visible = true;
Subject1durationHr_txt.text = "0";
Subject1durationMin_txt.text = "00";
Subject1durationSec_txt.text = "00";
Subject1timeLeftHr_txt._visible = true;
Subject1timeLeftMin_txt._visible = true;
Subject1timeLeftSec_txt._visible = true;
Subject1pause_btn._visible = false;
Subject1start_btn._visible = true;
Subject1rotor_mc._visible = false;
Subject1rotor_mc.gotoAndStop(1);
delete Subject1timer_mc.onEnterFrame;
delete Subject1durationLeft;
delete Subject1duration;
delete Subject1durationHr_txt.text;
delete Subject1durationMin_txt.text;
delete Subject1durationSec_txt.text;I think you need to spend some time reducing your code to practical levels. You seem to be passing everything in the book to every function and I would guess that probably none of it is necessary. If you declared those variables at the beginning, then you don't need to pass them into any function because they are gobally available to any of the code/functions that follows them. Similarly, if you have textfields on the stage, you do not need to pass those into any functions for the same reason.
I see you making overuse of "delete" (and possibly errant use as well). Probably the only thing you might want/need to use is...
delete Subjectxtimer_mc.onEnterFrame;
Which stops the enterframe activity from firing off, which I will guess is being used to update the textfields that indicate the time.
And that conditional that uses == Nan isn't likely to do anything except wonder what an Nan is. Textfields hold strings, which are quoted. SO unless you have a variable named Nan somewhere that has a String value assigned to it, that conditional won't be doing anything for you. You probably won't need it at all if you get this working properly. -
How to pass value from Javascript function to a Java class method
Hi All,
I want to pass a value, which I catch in a Javascript function to a method in a Java class. I have tried many combinations but it gives me error.
This is the way I am doing
function assignBill() {
proj = projPh.substring(0,indSlash);
<% myproject.getProj(" project_cd = '" + proj + "'");%>
proj is the variable which I want to pass to getProj methods.
If any one has done this, please let me know. Thanks for your help.
Ritesh MehtaThe only way to receive something from clients page is to submit it somehow: through a form or link, but the info has to make it back to the server obviously. I dont know how your app works, but you can use the the javascript -location.href- function(i think) to submit the var to the server and process it there.
-
How to pass parameters to a function ?
I defined successfully a function like
CREATE OR REPLACE FUNCTION my_func (inparm IN TEST.COL1%TYPE) RETURN NUMBER
When I try to call this function with
EXEC my_func 1;
I am getting an error:
ORA-06550 resp. PLS-00103 Found "0" when expection of of := . ( @ % ;
So how to I pass parameter values otherwise?SQL> create or replace function my_func(inparm test.c1%type) return number
2 as
3 begin
4 return 1;
5 end;
6 /
Function created.
SQL> set serveroutput on
SQL> exec dbms_output.put_line(my_func(1));
1
PL/SQL procedure successfully completed. -
How to pass strin in a function
Hi,
I have 1 function and the parameter is v1 varchar2(2000).
Now I am calling this function in Select query and I want to pass 'SME','DSP' string in a function parameter.How can I pass
Please help.
Regards
AnantI have 1 function and the parameter is v1 varchar2(2000)A basic thing is that, you can not specify length in parameter specification. How can you say parameter is
VARCHAR2(200) ?
Post your function code and what you want to do clearly. -
How to pass variables inside onRelease = function() ?
Hi all
I am creating MCs through a loop, but I want to assign an
onRelease function to each created MC, in
that same loop. And I need to use the variables from the loop
into the function...
So I tried this:
for(var sVar in flashVars){
i++;
var mcName = sVar.substr(0,3);
// create the MCs:
duplicateMovieClip(_root.testBut,"medium"+sVar,i);
_root["medium"+sVar].testText.text=sVar;
// assign the function to each created MC:
_root["medium"+sVar].onRelease = function(){
_root[mcName]._x=0;
The problem is that the variable "mcName" is not passed into
the function. How do I solve this?
seb ( [email protected])
http://webtrans1.com | high-end web
design
An Ingenious WebSite Builder:
http://sitelander.commyIP wrote:
> or perhaps more ideal;
>
> for(var sVar in flashVars)
> {
> i++;
> //var mcName = sVar.substr(0,3);
>
> // create the MCs:
> duplicateMovieClip(_root.testBut,"medium"+sVar,i);
> _root["medium"+sVar].testText.text=sVar;
> _root["medium"+sVar].mcName = sVar.substr(0,3);
>
>
> // assign the function to each created MC:
> _root["medium"+sVar].onRelease = function()
> {
> trace(this.mcName)
> _root[mcName]._x=0;
> }
> }
>
thanks but this does not work.
I think that the problem is that the variables defined in the
for loop do not exist in the scope of
the function.
when the MC is clicked, and the onRelease function says:
_root[mcName]._x=0;
the variable "mcName" is empty.
seb ( [email protected])
http://webtrans1.com | high-end web
design
An Ingenious WebSite Builder:
http://sitelander.com -
How to pass value from Javascript function to JSP ?
hi,
hello i have 2 jsp page and one external javascript page.
from page 1.jsp
i am calling a fuction named fun(1).and i am passing that value to external
javascript page
from external javascript.js
i am getting this value in the fun(w) and sending this Page2.jsp like this
var url = "page2.jsp?id ="+w;
http.open("get","page2.jsp?id ="+w );
and in page2.jsp
i am getting that value like
String k = request.getParameter("w");
but this is showing error. how cloud i get that value on this page2.jsp ?
plz any one help me to study this
regards
Vishnu Sankar Shello sir
thank u very much..i got the output
Message was edited by:
vishnu_shankar -
How to pass "EnterpriseManagementObject" Type as Function parameter?
Hello, dear Colleagues.
I'm trying to pass "EnterpriseManagementObject" as Function parameter.
Here is the piece of code:
$SCSM = 'SERVER_NAME'
function Add-Comment {
param (
[parameter(Mandatory=$true,Position=0)][Alias('Id')][String]$pSRId,
[parameter(Mandatory=$true,Position=1)][Alias('Comment')][String]$pComment,
[parameter(Mandatory=$true,Position=2)][Alias('EnteredBy')][String]$pEnteredBy,
[parameter(Mandatory=$true,Position=3)][Alias('IsAnalyst')][Bool]$AnalystComment,
[parameter(Mandatory=$true,Position=4)][Alias('IRObject')][EnterpriseManagementObject]$IRObject
if ($IRObject) {
$NewGUID = ([guid]::NewGuid()).ToString()
if ($AnalystComment)
$Projection = @{__CLASS = "System.WorkItem.Incident";
__SEED = $IRObject;
AnalystComments = @{__CLASS = "System.WorkItem.TroubleTicket.AnalystCommentLog";
__OBJECT = @{"Id" = $NewGUID;
Comment = $pComment;
DisplayName = $NewGUID;
EnteredBy = $pEnteredBy;
EnteredDate = (Get-Date).ToUniversalTime();
IsPrivate = $false
New-SCSMObjectProjection -Type System.WorkItem.IncidentPortalProjection -Projection $Projection -ComputerName $SCSM -ErrorAction stop
} else {
Write-Host $pSRId "could not be found"
$IncidentClass = Get-SCSMClass -name System.WorkItem.Incident$ -ComputerName $SCSM
$Incident = Get-SCSMObject -Class $IncidentClass -Filter "name -eq $c" -ComputerName $SCSM
Add-Comment -Id $c -Comment $text -EnteredBy $name -IsAnalyst $False -IRObject $Incident -ErrorAction stop
With GetType() I watched $Incident is "EnterpriseManagementObject":
IsPublic IsSerial Name BaseType
True True EnterpriseManagementObject Microsoft.EnterpriseManagement.Common.EnterpriseManagementObjectBaseWithProperties
But PS script returns error TypeNotFound:
Add-Comment : Unable to find type [EnterpriseManagementObject]. Make sure that the assembly that contains this type is loaded.
At C:\script.ps1:146 char:13
+ Add-Comment -Id $c -Comment $text -EnteredBy $name -IsAnalyst $True ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (EnterpriseManagementObject:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
Is there a way to pass "EnterpriseManagementObject" as Function parameter?
Thanks.First of all the error indicates that you haven't loaded the assembly which contains the class you're trying to load.
Try loading the assembly by running:
[Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.Core") | Out-Null
Secondly if you want to use type based parameters restrictions you should use full type name, which can be found with the command:
$SomeObject.GetType().FullName
You should end up with: Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject -
Hello friends,
I am displaying values ie, amounts in the screen using write statements here i have to display the
sign left side , i am using Function module 'CLOI_PUT_SIGN_IN_FRONT'
Does anybody help me - How to pass paramter into this Function module.
Regards,
PhaneendraIf you look to the code of the function module, you can see it is condensing the value.
I would make a copy of this function, and remove the condense lines to give the result you want.
data: text1(1) type c.
search value for '-'.
if sy-subrc = 0 and sy-fdpos <> 0.
split value at '-' into value text1.
condense value.
concatenate '-' value into value.
else.
condense value.
endif.
Maybe you are looking for
-
Platform migration from HP UX to RHEL
Hi all, specifications of my system EBS R12.0.4 , DB 10.2.0.3 (2 node RAC) OS is HP UX 11.31 I have to migrate it to RHEL 5 I need advice on this process .
-
How to transfer music from iTunes onto iPhone using Mac OS X Lion
I need help to transfer my music from itunes library onto Iphone. Or is there a way to save all data before i download mac os x mountain lion?
-
Wallpaper zooming in and out when going to home screen
Whenever I go to my home screen, my wallpapers zooms in and out by itself and it's rather annoying. I want to know if there's a way to stop it form doing it. Is it like an effect or something? How can I turn that off? Thanks
-
Inizializzazione di DLL fallita
Al caricamento di un programma di controllo scritto con Labview che utilizza NIDAQ, il più delle volte, viene visualizzato il seg. messaggio di windows: Analog Inut: Labview.exe Inizializzazione di DLL Fallita Inizializzazione DLL c:\winnt\system32\n
-
Can sonmebody tell me how to install the Most Visited tab in Firefox 4?
In the old version of Firefox the most useful tab for me was Most Visited but this doesn't seem to be avialbale in Firefox4?