How to display the entire double number without the Exponent
I know this is silly, but please help.
myString ="45.5"
myBytes = Double.parseDouble(myString );
convertedBytes = (myBytes * 1048576.0);
System.out.println(myBytes + "MegaBytes = " + convertedBytes + "Bytes");
prints:
45.5MegaBytes = 4.7710208E7Bytes
How do I output:
45.5MegaBytes = 47710208.0Bytes
Thanks,
I think I am just going to go with
println((int)Math.floor(mydouble + 0.5d));Note:
- you shouldn't cast to an int, we never know (e.g. try with > 2048MB.)
- you could use round(mydouble) instead of (long)floor(mydouble + 0.5d) (both are equivalent, but the first one looks clearer IMHO.)
Similar Messages
-
HT4061 how can i find my imei number without the phone
how can i find my imei number without my phone but got the origional number
iTunes on you computer saves this information.
Open iTunes.
Open Preferences. (In Mac OS X, choose iTunes > Preferences. In Windows, choose Edit > Preferences.)
Click the Devices tab.
Position the mouse arrow over the iPhone name to display the numbers including IMEI of the backed-up device. -
How to display the fields in ALV Output without using Field catalog?
How to display the fields in ALV Output without using Field catalog?
Could you pls tell me the coding?
Akshitha.Hi,
u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
data: itab type table of mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = itab
CHANGING
ct_fieldcat = lt_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*Pass that field catalog into the fillowing FM
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_grid_title = 'REPORTING'
is_layout = gt_layout
it_fieldcat = lt_fieldcat[]
tables
t_outtab = itab. -
How to display the entire application in two different languages in apex
Hi,
How to display the entire application in two different languages in apex...
For example i need to display each item in both English and Hindi..
To achieve this initially i have the select the language otherwise the item label alone ll be displayed in both languages ...
Anyhow how it ll be apex is it possible
Regards,
PavanHi pars,
http://www.packtpub.com/sites/default/files/1346-chapter-6-creating-multilingual-apex-applications.pdf?utm_source=packtp…
In this link also i struck in
In page 10 of that document
The application is now ready to be translated. Everything is in place to run it in any language imaginable.To ca ll the application in another language, change the URL of your application to the following:
http://yourdomain:port/pls/apex/f?p=&APP_ID.:&PAGE_ID.:&SESSION_ID.:LANG:NO::FSP_LANGUAGE_PREFERENCE:nl
This example will call the chosen page in the application and show it in the Dutch language instead of in English. To select another language change the property nl at the end of the URL to your desired language code.
Thanks alot for ur suggestions.kindly provide more inputs.............. -
How to display the data according to the search criteria
Hi ,
I want to display the order data in my application.
I have certain search criteria in my application like
ordernumber , date etc.
If I click the submit button without giving any criteria , all the data is getting displayed properly in the table.
But,If I want to display the data according to the order number, all the orders present are getting displayed , but actually it should display the order only for that particular order number.
The code is like : onActionSearch()
wdThis.wdComponentController().executeGetlist_Input();
Can any one tell me how to display the orders depending upon the search criteria.
Ideas & suggestions are truely welcome.
Thanks & Regards
Neha MahantyHi Neha,
Design ur RFC in such a way that it should display the result according to your search criteria.
If you are making a search on "Order Number" pass some input(search criteria along with some parameter, if order number is not null then pass "X" as parameter) to RFC so that it will return the result accordingly. And same with date also.
Thanks n Regards,
Jhansi Miryala -
In sap scripts how to display the driver program
Hi,
I Want to know the sap scripts How to display the output to driver programHi,
Go to NACE Transaction.
Select application for ex: if sales V1.
Click on output types.
Select the output type for ex : BA00
Double click on Processing routines.
There you can find the Driver Program name and Script/smart form name.
Reward if useful.
Thanks,
Raju -
How to display the results in order by based on search value
Hi All,
how to display the results in the below order.
CREATE TABLE TEST( SONGID NUMBER, TITLE VARCHAR2(200))
INSERT INTO TEST(SONGID,TITLE) VALUES (10,'AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)');
INSERT INTO TEST(SONGID,TITLE) VALUES (11,'CICCONE, MADONNA (CA)');
INSERT INTO TEST(SONGID,TITLE) VALUES (12,'DALLIN, MADONNA LOUISE/STOCK');
INSERT INTO TEST(SONGID,TITLE) VALUES (13,'MADONNA');
INSERT INTO TEST(SONGID,TITLE) VALUES (14,'MADONNA (A)/ AHMADZAI, MIRWAIS (C)');
INSERT INTO TEST(SONGID,TITLE) VALUES (15,'MADONNA (CA)');
INSERT INTO TEST(SONGID,TITLE) VALUES (16,'MIRWAIS AHMADZAI, MADONNA');
INSERT INTO TEST(SONGID,TITLE) VALUES (17,'MIRWAIS (CA)/ MADONNA (CA),AHMADZAI');
INSERT INTO TEST(SONGID,TITLE) VALUES (18,'MADONNA (CA),CICCONE');
SELECT *FROM TEST WHERE INSTR (TITLE, 'MADONNA') > 0
output:
SONGID TITLE
10 AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)
11 CICCONE, MADONNA (CA)
12 DALLIN, MADONNA LOUISE/STOCK
13 MADONNA
14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
15 MADONNA (CA)
16 MIRWAIS AHMADZAI, MADONNA
17 MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
18 MADONNA (CA),CICCONE
Expected output :
13 MADONNA
14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
15 MADONNA (CA)
18 MADONNA (CA),CICCONE
...if user searches with 'MADONNA' , I have to display the results like title starts with 'MADONNA' first then rest of the records.
Please let me know is it possible to display the results in that order.
Regards,
RajasekharThis may be a bit more accurate:
SQL> SELECT *
2 FROM TEST
3 WHERE INSTR (TITLE, 'MADONNA') > 0
4 ORDER BY INSTR (TITLE, 'MADONNA')
5 ,TITLE
6 ;
SONGID TITLE
13 MADONNA
14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
15 MADONNA (CA)
18 MADONNA (CA),CICCONE
12 DALLIN, MADONNA LOUISE/STOCK
11 CICCONE, MADONNA (CA)
17 MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
16 MIRWAIS AHMADZAI, MADONNA
10 AHMADZAI, MIRWAIS (CA)/ MADONNA (CA) -
How to display the proxy settings for a specific group of servers in an OU ?
Hi,
Can anyone here please assist me in how to display the value of Proxy server settings from the computers in a specific OU member ?
$Computers = Get-ADComputer -Filter * -SearchBase "OU=Terminal Servers,OU=Servers,DC=domain,DC=com" | Where-Object { Test-Connection $_.Name -Count 1 -Quiet }
ForEach ($Computer in $Computers) {
| Export-csv "C:\Proxy-Setting-Results.csv" -Append -NoTypeInformation -UseCulture
I've done similar script for some other task but not sure how to do this for Proxy setting.
Thanks.
/* Server Support Specialist */Proxy settings are not set in Active Directory
The below code works for 2003 servers and Win XP
$colItems = get-wmiobject -class "Win32_Proxy" -namespace "root\CIMV2" `
-computername $env:computername
foreach ($objItem in $colItems) {
write-host "Caption: " $objItem.Caption
write-host "Description: " $objItem.Description
write-host "Proxy Port Number: " $objItem.ProxyPortNumber
write-host "Proxy Server: " $objItem.ProxyServer
write-host "Server Name: " $objItem.ServerName
write-host "Setting ID: " $objItem.SettingID
write-host
You can try checking the registry values- Works in 2008 + and Windows 7
Get-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
or use netsh
netsh winhttp show proxy -r <remotemachinename>
Regards Chen V [MCTS SharePoint 2010] -
How to display the text as a Bold in the Text Element of a Smart Form
Hi,
I created one Smart Form.
In that i created the Text element.
I provide some data also in that.
It is coming as a MS WORD.
I executed my smart form.
Customer Number: &WA_KNA1-KUNNR&
it display the data of the particular customer.
But i need to display the Customer Number as BOLD or else Increase the Size.
For this also I created one SMARTSTYLE.
In that I created the Paragraph and Character Formats also.
Now i assignee that SMARTSTYLE in the Output Option Tab of the Text Element also.
But i unable to get the CUSTOMER NUMBER in Bold.
In MS WORD we have BOLD button.
I selected the Text and Press the BOLD button. At that time it is Highlighted.
Whenever i press the SAVE Button.
Then it is not saved with BOLD.
It is coming in Normal Format.
In the ECC 6.0. I am unable to get the Text as a BOLD.
This text Element is like a MS WORD.
Can you please tell me how to display the Data with BOLD. please tell me. I am unable to get that one.
Thank You.
Regards,
B. Krishna.Hi,
Check where u have given BOLD. In character Format or in Paragraph format.
In SMART FORM,
1. Change to OLD EDITOR if u are confused with the new one.
(This can be done by clicking the button left to new editor ).
2. If it is PARAGRAPH FORMAT,
Give the name of paragraph format in the editor.
P1 &WA_KNA1-KUNNR&
If it is CHARACTER FORMAT,
<C1> &WA_KNA1-KUNNR&
Thanks,
Nithya. -
How to display the time length of video (current time/ total time) ?
Hi,everyone. I would like to ask how to display the time length of the video which show only in system example: it show the current time and total time? using AS 3.0.
It there any information or solution to solve it? .
I appreciate it any of you able to answer it. ^^
Thank you.Hi,
Actually I have this requirement for MAC OS 10.5. With the code you provided, I got the output as "6289375". When I changed the URL to point to my file (file:///Users/VPKVL/Desktop/MyRecord/tempAudio.wav), I am getting the below mentioned Exception:
Exception in thread "main" javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561)
at com.sun.media.sound.MixerClip.open(MixerClip.java:165)
at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
at TestWavLength.main(TestWavLength.java:13)The "tempAudio.wav" file is created by using java sound API. I am using the SSB USB Headphone Set to record the audio with the following settings for AudioFormat object:
AudioFormat audioFormat = new AudioFormat(
AudioFormat.Encoding.PCM_SIGNED, // the audio encoding
// technique
48000.0F,// sampleRate the number of samples per second
16, // sampleSizeInBits the number of bits in each sample
2, // channels the number of channels (1 for mono, 2 for
// stereo, and so on)
4, // frameSize the number of bytes in each frame
48000.0F,// frameRate the number of frames per second
false); // bigEndian indicates whether the data for a single
// sample is stored in big-endian byte order
// (false means little-endian)Can you please suggest where I am going wrong ? -
How to display the context of a Jbutton to a JTextField
Hi,
There is a key pad (1-9) on a GUI where each key is represented by a JButton. There is also a data entry filed, implemented using JTextField.
However, when the user enters the ID using the key pad buttons each number should be displayed in the data entry field correspondingly (similar to calculator). I have already written the handlers for each button just don't know how to display the contexts in the text field, e.g. if the button 1 is pressed the 1 should be appeared in the text filed immediately. Anyone can help me to get this done?
Thanks in advance,
RMPReza_mp wrote:
.. Anyone can help me to get this done?In the actioPerformed method, call textField.setText( textField.getText() + "new data" ) -
How to display the content of a BLOB column in a ADF/BC pages ?
How to display the content of a BLOB column in a ADF/BC pages ?
There is some image in database table blog column. And we want to display image on the screeen.
There is some example about upload and dowload blog columns.
(steve not yet document example page etc...)
But We want to display blog picture in a image component...
is there any basic way to do it ?
Thanks a lot...Ali,
You could just download the sample app... but... here is the servlet code from the demo (look at it just for technique - you'll obviously have to change it for your needs)...
John
package oracle.fodemo.storefront.servlet;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.servlet.*;
import javax.servlet.http.*;
import oracle.jbo.ApplicationModule;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.ViewObject;
import oracle.jbo.client.Configuration;
import oracle.jbo.domain.BlobDomain;
import oracle.jbo.domain.DBSequence;
import oracle.jbo.domain.Number;
import oracle.jbo.server.ViewObjectImpl;
public class ImageServlet
extends HttpServlet
private static final String CONTENT_TYPE =
"image/jpg; charset=windows-1252";
public void init(ServletConfig config)
throws ServletException
super.init(config);
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
response.setContentType(CONTENT_TYPE);
response.setContentType(CONTENT_TYPE);
String detailProductId = request.getParameter("detail");
String thumbnailProductId = request.getParameter("thumbnail");
boolean thumbnail = true;
String productId = null;
OutputStream os = response.getOutputStream();
String amDef = "oracle.fodemo.storefront.store.service.StoreServiceAM";
String config = "StoreServiceAMLocal";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef, config);
ViewObjectImpl vo =
(ViewObjectImpl) am.findViewObject("ProductImages"); // get view object (the same as used in the table)
if (detailProductId != null)
productId = detailProductId;
thumbnail = false;
else
productId = thumbnailProductId;
vo.defineNamedWhereClauseParam("paramThumbnail", null, null);
vo.defineNamedWhereClauseParam("paramProductId", null, null);
vo.setWhereClause("DEFAULT_VIEW_FLAG = :paramThumbnail AND PRODUCT_ID = :paramProductId");
vo.setNamedWhereClauseParam("paramThumbnail", (thumbnail? "Y": "N"));
vo.setNamedWhereClauseParam("paramProductId", productId);
vo.executeQuery();
Row product = vo.first();
BlobDomain image = (BlobDomain) product.getAttribute("Image");
InputStream is = image.getInputStream();
// copy blob to output
byte[] buffer = new byte[10 * 1024];
int nread;
while ((nread = is.read(buffer)) != -1)
os.write(buffer, 0, nread);
os.close();
vo.setWhereClause(null);
vo.removeNamedWhereClauseParam("paramProductId");
vo.removeNamedWhereClauseParam("paramThumbnail");
Configuration.releaseRootApplicationModule(am, false);
} -
How to display the index of current desktop when enable multiple spaces
I was using 10.6 before and used to using Spaces and puts applications into different desktops.
Now I'm using 10.8 and I know that the Spaces has been integrated into Mission Control.
The problem is, I can see the current desktop on the top bar in 10.6, but in 10.8 I cannot see it so I usually forget where I am.
Does anyone know how to display the index of current desktop?Does anyone know how to display the index of current desktop?
Brute force - - I have written the number of the Desktop directly onto the wallpaper picture I am using for each Desktop (easy to do with Preview).
All Desktops are using different wallpaper photos, so they are easily recognized by the color scheme, and in the upper left corner is the number.
Regards
Léonie -
How to display the eror message in the iView
Hi
I want to check the user input in the client side and display an error message in the iView instead of displaying the error message as an alert
it is ok when I tried to do it as an alert
alert('ERROR MESSAGE');
but the problem is how to display the error message as a text in the iView ...
I wrote the below code..
any one can see it and has any sugestion?
Thanks
=============
<%@ taglib uri="tagLib" prefix="hbj" %>
<%
String compid = "";
String message = "";
%>
<hbj:content id="MyContent">
<hbj:page title = "Selection Screen">
<hbj:form id = "myForm">
<br>
<br>
<br>
<center>
<H3>Benefits Statement </H3>
<H4>Selection Screen</H4>
<hbj:gridLayout
id="FSSLayout"
debugMode="False"
width="40%"
cellSpacing="5"
>
<hbj:gridLayoutCell
rowIndex="1"
columnIndex="1"
width="10%"
horizontalAlignment="LEFT"
style="WildStyle"
>
<hbj:label
id="label_inputPernr"
required="TRUE"
text="Personal Number:"
design="LABEL"
labelFor="inputPernr"
/>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="1"
columnIndex="2"
width="40%"
horizontalAlignment="LEFT"
>
<hbj:inputField id = "inputPernr"
>
<%
compid=MyContent.getParamIdForComponent(inputPernr);
%>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="10"
columnIndex="1"
width="40%"
horizontalAlignment="CENTER"
colSpan="2"
>
<hbj:button id = "myButton" text="Submit.." design="EMPHASIZED"
tooltip="Click me to submit this form" onClick="ClickEvent" onClientClick="validRequired()">
</hbj:button>
</hbj:gridLayoutCell>
</hbj:gridLayout>
</center>
<p font="Arial" size=20><%= message%></p>
</hbj:form>
<SCRIPT LANGUAGE="Javascript">
function validRequired()
var myvar = document.getElementById('<%=compid%>').value;
var ivID='<%=componentRequest.getComponentContext().getContextName()%>';
if (myvar = " ")
message = "Enter Employee Number";
ivuRefresh(ivID);
htmlbevent.cancelSubmit=true;
</SCRIPT>
</hbj:page>
</hbj:content>No problem, here is an example of some html code and javascript that you can adapt to your needs. You can display this standalone to see how it works.
I hope this helps
<html>
<head>
<script language="JavaScript">
function validateForm(){
if(document.getElementById("nameField").value == "")
document.getElementById("errormessage").innerHTML = "Please enter the Name";
else if(document.getElementById("ageField").value == "")
document.getElementById("errormessage").innerHTML = "Please enter the Age";
else if(document.getElementById("idField").value == "")
document.getElementById("errormessage").innerHTML = "Please enter the id";
else
document.getElementById("errormessage").innerHTML = "";
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Name</td>
<td><input type="input" id="nameField" name="nameField"></td>
</tr>
<tr>
<td>Age</td>
<td><input type="input" id="ageField" name="ageField"></td>
</tr>
<tr>
<td>Id</td>
<td><input type="input" id="idField" name="idField"></td>
</tr>
<tr><td><font color="red"><span id="errormessage"></span></font></td></tr>
<tr><td><input type="button" name="validate" onClick="validateForm()" value="Click to validate"/></td></tr>
</table>
</body>
</html> -
How to display the velocity template in browser
Hi All,
Am new to vm. Can anyone help me, how to display the content of .vm file in browser ?
Am able to display the content of .vm file in console.
Whether this is because of any path issues ?
Thanks in Advance.Hi PKG,
I think the easiest way to achive this, is to design your RenderListItem form like your ShowForm and restrict the number of items in your collection renderer to "1".
So a list is rendererd with exactly one item.
Kind Regards
--Matthias
Maybe you are looking for
-
I'm setting up my new laptop. MS internet explorer won't let me install Firefox. says my security setting won't allow the download . . .
-
How do I get an unlock code for an Iphone 3
How do I get an unlock code for an Iphone 3?
-
Does APPS have dynamic port allocation going on somewhere
Hi Gurus, We have a situation where 5 Test instances of Ebiz all reside on the same server. The production Instance has its own dedicated server. We seem to get intermittent, but frequent problems with some of the test environments taking the ports w
-
Hi, While Purchasing I have calculated my VAT amount as 100. Out of which I wanted to put 60 in my vat recoverable and 40 will be loaded on inventory. Please suggest How do I configure the same in SAP?? Shall I create Two different condition type for
-
Sort string in certain order in Crystal XI
Hi All I have a report that lists all of our fleet in 'facilitycode' order. Like this; 101 1000 1001 110 1112 1113 111, etc. The field is a string and I have found how to sort this through converting to a number. My problem is one facility code is '2