How to convert an int variable into Number
Hi all,
I am using Jdeveloper 11.1.1.2
When I insert a row in a entity object I want to create another row in another entity object, but when I am setting the attribute for the new row I have a problem.
Here is the code:
int a = EO1Impl.paramA;
NameEO2Impl.setAttribute("Attribute1", a);
The error is that variable a is an int, while Attribute1 is a Number.
How can convert an int to a Number.
Thank you.
Andrea9,
If a, as you say is an int, and assuming you mean an oracle.jbo.domain.Number,
NameEO2Impl.setAttribute("Attribute1", new oracle.jbo.domain.Number(a));works just fine.
John
Similar Messages
-
How to convert an int variable into String type
hi everybody
i want to know how to convert an interger variable into string variable
i have to implement a code which goes like this
Chioce ch;
for(int i=0;i<32;i++)
// here i need a code to convert the int variable i into a string variable
ch.add(String variable);
how do i convert that int variable i into a String type variable??
can anyone help me?Different methods:
int a;
string s=a+"";or
String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
Ema -
How to convert a scalar variable into a 1-D length N array?
Hi guys,
I am new in Labview. I use Labview to accquire the output data from a measurement circuit with RS232 bus. The result needs some mathematical operation to have a meaningful number. After this operation the result is a scalar variable that is changing as new data read from my circuit. I want to see the power spectrum of this signal so tried to use FFT block (Labview 6.1, signal processing->frequency domain->real fft / power spectrum). However because the fft block needs 1-D array type of data as input, I can not just connect my result to the fft block. The error it gives me is:
These cannot be wired together because their data types (numeric,
string, array, cluster, etc.) do not match. Show the Context Help
window to see what data type is required.
The type of the source is double [64-bit real (~15 digit precision)].
The type of the sink is 1-D array of double [64-bit real (~15 digit precision)].
So I guess I have to do something to convert my result into a 1-D array with a length N, which is the number of data I use for one FFT transform. But the question is how.
I pass the data directly through a For-loop, the result is a 1-D array with all the members having the same value as the input value(my calculated result). Then next time a new result come in, all of the members of that array changes to the new value.
Please help!Hi nano,
"So I interpret that as putting the for loop (the subVI) in another for loop?" - Yes, correct.
See example! (Also on better using LV primitives.)
Where is this "vsource control block"?
Message Edited by GerdW on 03-02-2009 11:24 PM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
example.vi 20 KB -
How to convert the exponential data into number
Hi,
I have a table with a column which is a vaarchar2(60). I have a CSV file in which, I have stored value as 77052512125510000, but it got converted into 7.71E16. And when I have stored the same in the database, it got saved as 7.71E16. How can I get the original value
Please help
Regards
Edited by: Sarma12 on May 25, 2012 3:11 AMSarma12 wrote:
The issue is, the data is already copied into the database. Now while retrieving from the database, I am getting that value in the scientific notation and not similar to the data which I have in the CSV file.
RegardsYou need to be smarter than the tools you use
bcm@bcm-laptop:~$ sqlplus user1/user1
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 25 09:50:02 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
09:50:03 SQL> @test
09:50:07 SQL> drop table test;
Table dropped.
09:50:09 SQL> create table test (id number);
Table created.
09:50:10 SQL> insert into test values (77052512125510000);
1 row created.
09:50:10 SQL> select * from test;
ID
7.7053E+16
09:50:10 SQL> column id format 999999999999999999999
09:50:10 SQL> select * from test;
ID
77052512125510000
09:50:10 SQL>
09:50:10 SQL> -
How do I enter a variable into an equation?
How do I enter a variable into an equation?
Jacob,
Spreadsheets don't use equations, so the usual nomenclature can be confusing.
When you enter something into a spreadsheet cell, it is either a Literal Value (Constant), or an Expression, preceded by an equal sign, that tells the spreadsheet to display something. Every Cell Reference in the Expression is a Variable. The equal sign in this case does not signify an equality, it just signals the spreadsheet that you want it to do something, defined by the expression that follows.
Here's an equation: A1 = B1 + C1 + 10, where B1 and C1 are variables and 10 is a constant.
To figure out what the value of A1 is, you write an expression in cell A1. That Expression would be: =B1 + C1 + 10. The operation that is performed by the spreadsheet is that it looks at B1 and C1, adds whatever it sees there and then adds the constant 10, and displays the result in A1.
It can get very complex. Expressions can contain Functions that catch the Time or generate a random number, or round a value, etc. Just remember that anything you see in a cell can be changed, so that content, that cell address, is a variable
Jerry -
How to convert trailing minus sign into the leading minus sign
Hi
Can any plz tell me How to convert trailing minus sign into the leading minus sign? I mean in PI the amount filed shows like 150.00- i want to convert that into -150.00.
Thanks
GovindaHi Shabarish,
The code works but what if the input is something like [ 10.000-] i.e. with some spaces before 10.000- and the output as per your code comes as [- 10.000]. How do we tackle such cases if there is inconsistency in data i.e. some values come as [ 10.000-] i.e. spaces before the number and some values as [12.000-].
The output of this will come as
[- 10.000]
[-12.000]
How to make it as
[-10.000]
[-12.000]
Regards,
Shaibayan -
How to pass a JavaScript variable into a java method
I would like to know how to pass a JavaScript variable into a java method with in a <% %> tag inside a JSP file like so:
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<script LANGUAGE="JavaScript">
myValue = someDynamicValue;
<% System.out.println(myValue)%>
</script>
</head>
<body>
</body>
</html>
obviously "System.out.println(myValue)" will not work because myValue is seen as a java variable and not a JavaScript variable.
I would like to know how to let the jsp file, that I wrote in the above code, see myValue as a JavaScript variable and not a java variable so that I can pass it to a java method.
NOTE: the java method does not have to be a println() method, it can be any method of my choice.
NOTE: someDynamicValue is a JavaScript value that can dynamically changeI don't believe you can. JSPs are really just elaborate templates that an engine such as Tomcat parses and generates an HTML page based on. That page is then displayed to the user. By the time you want to use some function in Javascript, the JSP has already been parsed and generated.
Basically, Javascript and JSPs can't talk to each other. One's server-side and the other is client-side. -
How to pass a jsp variable into javascript??
<p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<p><html>
<p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
<p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
<p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
<p>Time until next game
<p><c:forEach var="tuple" items="${tuples}">
<p><c:if test="${fn:contains(tuple, 'row ')}">
<p> <p><code>
<p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
<p> <font color="blue">
<p> <c:out value="${values[17]}" />
<p><c:set var="remainingtime" value="${values[17]}" />
<p> </font>
<p> </code>
<p></c:if>
<p></c:forEach>
<p><form name="counter"><input type="text" size="8" name="d2"></form>
<p><script>
<p>var milisec=0
<p>var seconds=eval("document.myForm.remaining").value;
<p>function display(){
<p> if (milisec<=0){
<p> milisec=9
<p> seconds-=1
<p>}
<p>if (seconds<=-1){
<p> milisec=0
<p> seconds+=1
<p> }
<br>else
<p> milisec-=1
<p> document.counter.d2.value=seconds+"."+milisec
setTimeout("display()",100)
<p>}
<p>display()
<p></script>
<p></body>
<p></html>
<p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
Message was edited by:
hamham3001
Message was edited by:
hamham3001
Message was edited by:
hamham3001
Message was edited by:
hamham3001Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
<html>
<body>
<form name=f>
<%!
String str = "A String"
%>
<script>
var avariable = <%=str%>
<script>
</form>
</body>
</html>
Let me know if you face any problem -
How to convert a PDF file into a full editable WORD file?
Hi,
I tried to convert a pdf file into word but it is not fully editable. I can edit the title from the main page and that's it. The rest of the word document is saved as image. I tried editing teh pdf file but that one is not working either.
Please help on how to convert a PDF file into a full editable WORD file.
Thank youNot all PDF files are created equal. When a PDF file is created with Adobe Tools it is usually "tagged" with information about the fonts the images, the layout etc... This way when the PDF is saved to a new format like PPT or DOC then the results are usually usable. However, if you have a PDF file that was not tagged for some reason then run the Accessibility tools on the PDF to acquire some basic tagging. This may get you a better result. Also if you have a PDF that is an image, then you may want to run OCR on it.
-
How to convert my MM alias into an AppleID to use it with iCloud?
I used MobileMe and created a mail that became my Apple ID. Then I created an alias that became my main e-mail so now with iCloud I wish that aslias could become my Apple ID. I don't care to loose the first Apple ID but "How to convert my MM alias into an AppleID to use it with iCloud?"
You cannot convert an alias to Apple ID.
You can transfer your MM to iCloud with your main Apple ID.
There will be your alias as well.
Regards -
How to convert an NWDI project into a Local project?
Hi Experts,
Please tell me " how to convert an NWDI project into a Local project? "
If you cHi Srini
1. Copy/Paste Webdynpro components in the new project as was suggested before
2. Or create new project, copy _comp folder from old project to the new one. But, do not forget to update .dcdef & .project files manually after this. You have to set the correct project name in .dcdef and set the correct local project path in .project.
BR, Sergei -
How to Convert Oracle Apps Report into XML Publisher
Hi
How to Convert Oracle Apps Report into XML Publisher?
ThanksIn Brief :
Re: XML Publisher
In Details :
http://www.oracle.com/technology/products/xml-publisher/docs/XMLEBSRep.pdf -
How to convert data from rows into columns
Hi,
I have a sql table and the data looks like this
GLYEAR GLMN01 GLMN02 GLMN03 GLMN04
2007 -109712.40 6909.15 4758.72 56.88
2007 -13411.32 19132.9 -5585.07 4362.64
Where GLyear reprsents Year and GLMN01 is February, GLMN02 is March and so on,
Now i want my output to be something like this which i want to insert into another table
GLYear GLMonth GLAmount
2007 February -109712.40
2007 March 6909.15
2007 April 56.88
My new table has 3 columns, GLYear,GLMonth,GLAmount.
Can someone please help me with the select statement on how to do this, i can work with the inserts.
Thanks.I want you to check these form tread they have the same discussion as you. They will definitely solve your problem
http://blog.jontav.com/post/8344518585/convert-rows-to-columns-columns-to-rows-in-sql-server
http://dba.stackexchange.com/questions/19057/convert-rows-to-columns-using-pivot-in-sql-server-when-columns-are-string-data
http://stackoverflow.com/questions/18612326/how-to-convert-multiple-row-data-into-column-data-in-sql-server
I hope this helps you in solving your problem.
Please remember to click “Mark as Answer” on the post that has answered your question as it is very relevant to other community members dealing with same problem in seeking the right answer -
Hi...
2.....how to convert normal function module into remote enabled function module?
thanks and regards,
k.swaminath.Hi,
In the attributes tab select radio button as remote enabled instead of normal..
u can call the remote enabled fm as...
CALL FUNCTION <Function module> destination <destination name>
Regards,
Nagaraj -
i can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.
function(){return A.apply(null,[this].concat($A(arguments)))}
hope1hope2 wrote:
i can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.
It's very unlikely that you'l
l find any help here; this forum is used only
for testing purposes. Unfortunately, I cannot suggest
another forum
Extra line breaks kindly supplied by the software.
Maybe you are looking for
-
Embed H.264 exported videos in Powerpoint 2010
Hello, We are using CS 5.5 on Windows 7 x64. Our videos are exported using the H.264 format. The problem is: We can embed the video in powerpoint (assumed quicktime is installed) but when we want to play it in the presentation, it simply shows a blac
-
How to delete and avoid notes in mail application
CAN ANYBODY HELP ME ON THIS SUBJECT PLEASE
-
TS1307 Why does send mail just stop working and how do you fix it?
Using MacBook Pro bought last Chrismas and its mail client 5.2 In the last 2 weeks send mail has stopped working for both my wife and myself (we have different logins / accounts / email address providers) We have tried different wifi / isp providers
-
"The disk containing your iPhoto Library is running low on space."
This window just popped up when I was downloading some pictures. I've never seen that message before. Not exactly sure what it means. Is my storage at capacity? Do I need to delete some photos? Thanks for any help you can offer!
-
Watermarking feature is TOO global for my calendar project!
I sure do hope there is someone who has a solution to this conundrum. I am in the process of finishing-off a tutorial on creating CD-case calendars for others to follow. I am at a point in the process of showing/explaining how to utilize the LR Water