How to add Zero to an integer value from left (like 999 to 0999)
hello,
any body please tell me how to add "0" to an integer from left
i just want to make my value 999 to 0999
and i tried with converting it to strings but after adding zero i have to make the string to integer again because my method accepts integers onli.
thanks in advance
ranadheer
i will be much clear now
i have a jar file which takes date and time as input
but the it accepts only 4 digits in the Year field
so if i have date with year before 1000 its not
accepting.so with keeping year field as integer i
have to make the 3 digits to 4 digits by appending
0 at the front
thanks and regards
RanadheerThen you need to keep that variable as a String (before parsing it to a Date object), not as a numerical value. You can prepend a String to another String using the + operator.
String s = "0"+"123";
Similar Messages
-
How can I grab a specific integer value from iTunes Current Album?
Currently I'm working with these two bits of code:
This returns the "album" value from the track current playing in iTunes.
on run
set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set albumName to (get album of current track)
end if
end tell
end if
return albumName
end run
This brings up the the site I am working with (not the real site).
tell application "Firefox" to activate
tell application "Firefox"
open location "http://google.com/"
end tell
Assuming all albums are formatted:
"XXXX[year]-XX[month]-XX[day]" = 10 numbers
How can I grab the first the first 10 numbers of the "Album" value? Eventually I want to figure out how to grab them then append them to the end of a URL to streamline functionality with a fan site. Thanks for any assistance!The 'return' within the run handler is going to stop the first script. How are you trying to get that data to the second script?
If they're the same script just put the data into a variable and append it to the URL. This simplified script shows the principle:
on run
tell application "iTunes"
if player state is playing then
set albumName to (get album of current track)
end if
end tell
set theDateString to text 1 thru 10 of albumName as text
tell application "Firefox"
open location "http://bandsname.com/" & theDateString
end tell
end run -
Hello Everyone,
How to update zero to a column value when record does not exist in table but should display the column value when it exists in table
Regards
Regards Gautam SAs per my understanding...
You Would like to see this
Code:
SELECT COALESCE(Salary,0) from Employee;
Regards
Shivaprasad S
Please mark as answer if helpful
Shiv -
How can we read the screen field values from the report selection screen wi
Hi expart,
How can we read the screen field values from the report selection screen with out having an ENTER button pressed .
Regards
Razzuse this code...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
**Read the Values of the SCREEN FIELDs
CALL FUNCTION 'DYNP_VALUES_READ' -
How to pass column name as a values from one page to another
hi
i have created a report(pivot) from a table
SQL> SELECT * FROM T;
C1 C2 C3 D SEQ
A AA 2 1
A AB 3 2
A AC 2 3
B AB 5 4
B AC 6 5
SQL> SELECT C1
2 ,NVL(MAX(CASE WHEN C2='AA' THEN C3 END),'') AA
3 ,NVL(MAX(CASE WHEN C2='AB' THEN C3 END),'') AB
4 ,NVL(MAX(CASE WHEN C2='AC' THEN C3 END),'') AC
5 ,SUM(C3) FROM T GROUP BY C1;
C1 AA AB AC SUM(C3)
A 2 3 2 7
B 5 6 11
SQL>
my requirement in Apex is like this(reverse)
eg-
when i click on cell values '2' then,it should return
C1 C2 C3 D SEQ
A AA 2 1
{quote}how to pass column name as a values from one page to another
for example i have to pass 'c2' as a value to next page{quote}for report pivot you can reffer below link
Report
Amuthanks for your reply
i 'm doing what exactly you mention here .
my problem here is
i have 15 columns
i am executing a query based on the values of the column(column name) in the target page
1)here i am passing(all) the column values to the next page-but i want to pass only one column values(column name)
when i click on any cell of that column
OR
2)i can pass all column name to target page -there(in the target page) i can filter out
i think option 1 would good if you filter out the unwanted columns
Regards
Amul -
How to stop non statistical condition type value from updating total amount
Gurus,
Can any body explain me how to do following setting,
How to Stop non statistical condition type value from updating Total Amount
Regards,
SaiDear Sai,
You need to make that condition type as Statistical one
Go to SPRO - Sales and Distr. - Basic Functions - Pricing - Define and Assign Pricing Proc - Maintain Pricing Proc - Control Date
Select the proc. - select the condition type and activate the check box Statistical
This will show the amount of the condition but will not consider for the net value calculation
Hope this will help you
regards,
Sagar -
How to get POF object's field value from query result
hi,all:
I want to get field value from the query result, my code is below
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Contact c=(Contact)iter.next();
System.out.println ("firstame####=" + c.getFirstName());
* but I get error*
Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
at com.oracle.handson.QueryExample.query(QueryExample.java:86)
at com.oracle.handson.QueryExample.main(QueryExample.java:43)
who can tell me how to get POF object's field value from query resultHi,
If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Map.Entry entry = iter.next();
Contact c=(Contact)entry.getValue();
System.out.println ("firstame####=" + c.getFirstName());
}JK -
How to retrieve start and end date values from sharepoint 2013
Hi,
How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
Thanks
Gowri BalaguruHi Srini
Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
Thanks
Tripple k -
How can I keep photos on iPod Touch from looking like color negatives?
How can I keep photos on iPod Touch from looking like color negatives?
You don't have to keep your photos in iPhoto to sync to your iPod according to Apple's website which states you can sync from folders in other locations:
"Syncing Photos from a Mac
To sync photos from iPhoto or a folder on your Mac:
1. Connect your iPod to your computer and open iTunes.
2. Select your iPod in the DEVICES section of the iTunes Source list.
3. In the main iTunes browser window, select the Photos tab.
4. Select the checkbox labeled "Sync photos from" and then choose either iPhoto, Aperture, Choose Folder, or Pictures, from the menu.
* If you choose iPhoto, select "All photos and albums" to copy all of your photos in iPhoto, or "Selected albums only" and select individual rolls or albums you want to include.
* If you choose Choose Folder, navigate to and select the folder of photos you want, then click Choose. Select "All photos" to copy all photos in the folder, or choose "Selected folders" to sync particular subfolders.
* If you choose Pictures, choose "All photos" to copy all photos in the folder, or choose "Selected folders" to sync particular subfolders.
5. If you want iTunes to also include the full-resolution versions of your photos, select the "Include full-resolution photos" checkbox. To access full-size photo files, be sure to enable your iPod for disk use.)
6. Once you have decided which photos you'd like to sync, click Apply."
Hope this helps! -
How to add zero into value prefix??
I have one reuqirement about adding zero prefix into value of Infoobject AAAA. Infoobject AAAA is the attribute of Infoobject BBBB. I need to write a ABAP code in the transfer rule of infoobject BBBB.
The length of infoobject BBBB is 10. That means system will automatically add zero if the length of the value is less than 10 after data loading.
Any body know how to write itHi Dreshof,
Try this:-
CONSTANTS: c_zeros(10) TYPE c VALUE '0000000000'.
SHIFT TRANS_STRUCTURE-aaaa RIGHT DELETING TRAILING SPACE.
OVERLAY TRANS_STRUCTURE-aaaa WITH c_zeros.
RESULT = TRANS_STRUCTURE-aaaa.
The correct code is as shown below. Please ignore the code above this.
Hi Again,
Try this:-
CONSTANTS: c_zeros(10) TYPE c VALUE '0000000000'.
DATA: wa_aaaa LIKE TRANS_STRUCTURE-aaaa,
SHIFT wa_aaaa RIGHT DELETING TRAILING SPACE.
OVERLAY wa_aaaa WITH c_zeros.
RESULT = wa_aaaa.
This will work.
Now do a syntax check. If all is ok. Save.
Hope it helps ,
Best regards,
Sunmit.
Edited by: sunmit bhandari on Jun 27, 2009 12:40 AM
Message was editted after your post below -
How to add a character before formula values in BEx.
Hi Guys,
Can anybody please let me know how to add a character before result of a formula.
Ex. formula is 10/30*100
I want to see in report 33.3 %
thanks in advance
peter bhi..
You can use a formula variable with Customer Exit -
Getting integer values from a JTable
Hello
The table's cells contain integer values. I would like to save each one of theme them in an array of integers.
The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages.
I tried something like:
Object o = table.getModel().getValueAt(i, j);
a[x]=Integer.parseInt(o.toString());Please help.
Thank you. :)WalterLaan wrote:
The next line in the exception stacktrace contains a class name and a line number. So go to that class source file and that line number and fix the problem there.Yes, guenouni, we're not mind readers. You need to be clearer and give precise details. The single best way to get the most useful possible help is to take a few minutes and write and post a SSCCE . If you do that, it will show your serious. -
How to get the Open Order Qty value from Transaction Code RWBE?
Hello,
Recently I have a program that needs to extract the value of Open Order Qty value from RWBE.
My specific steps are as follows:
- I go to tcode <b>RWBE</b>
- I select the <b>material and plant</b>
- I tick the checbox for <b>"Also select special stocks"</b> and <b>"Also select stock commitments"</b>
- I execute the program double click one of the rows for the <b>Unrestricted Use coulmn</b> and view the <b>Open Order Qty</b>.
My question is how is this particlar variable attained? I tried Ekbe and the ELIKZ feild from EKPO and I still cant seem to get the right value.
Hope to hear from you soon.
Thank you and good day.check with FM :
CALL FUNCTION 'MB_ADD_PURCHASE_ORDER_QUANTITY'
EXPORTING
x_matnr = t_matnr-matnr " TGA/4.6 Erw. Lot
x_meins = t_matnr-basme " TGA/4.6 Erw. Lot
x_matnr = prt_matnr-matnr " TGA/4.6 Erw. Lot
x_meins = prt_matnr-basme " TGA/4.6 Erw. Lot
x_elikz = space
x_loekz = space
TABLES
xtab = xtab
xwerks = r_werks.
above fm will get open order qty for given material in po -
How can I get dataTable to display values from the java layer?
When I use the dataTAble in my JSP page it will only display values from my java layer if the facets tag has it's name set to "header". Why is this happening?
If I set it to "header" and I look at the page source it actually has created the correct number of rows but it doesn't put the values between the <td> tags? It see's the length of my list but it doesn't pick the values out of the list.
<h:dataTable var="data" value="#{NameBean.test}" border="1">
<h:column>
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<!-- <h:outputFormat styleClass="outputFormat" id="format1" value="#{NameBean.test}"></h:outputFormat>-->
<h:outputText styleClass="outputText" value="#{NameBean.test}" style="" rendered="true" escape="false"/>
</f:facet>
</h:column>
</h:dataTable>
public List gettest()
List li = new LinkedList();
Object Developers[] = {"M@n00j", "sdsadas"};
for( int i = 0; i < Developers.length; i++ )
li.add(Developers);
return li;
Thanks in advance to anyone that can help.
-ls6vI've been able to get it working with some of those changes along with changes in the JSP. I think it's a setting or two in the JSP that'll allow the program to run correctly.
I have a list and it's returned like what you suggested. A day or two ago I tried to move the outputtext outside of the facet tag but nothing would print, I know believe that's related to the following setting in the JSP:
rows="0" in the <h:dataTAble tag
Unfortunately the dataTAble isn't displaying the values correctly. It prints all of the values (Strings) in the list on each row and it make a new row for the number of items in the list.......... ???
Here's what it's printing to the screen (the table):
===================
== [asdasd], [sddfdfd] ==
===================
===================
== [asdasd], [sddfdfd]==
===================
what it should print:
============
== [asdasd] ==
============
============
== [sddfdfd] ==
============
My code:
public List gettest()
List li = new ArrayList();
li.add("asdasd");
li.add("affffd");
return li;
}JSP
<h:dataTable border="1" columnClasses="list-column-left"
headerClass="list-header"
rowClasses="list-row-odd"
id="table"
rows="0"
value="#{NameBean.test}"
var="data">
<h:column>
<f:facet name="header">
<h:outputText value="test"/>
</f:facet>
<h:outputText value="#{NameBean.test}" style="" rendered="true" escape="false"/>
</h:column>
</h:dataTable> -
How to add a new name in the from box - NOT a new email address
Hi
I wish to add email addresses to the from box when I write emails.
I have my own domain name registered with a third party which I add forwards to which arrive in my thunderbird in tray and it is easy to add a new one to forward to my email server into thunderbird.
But cannot find out how to add the address the from box without adding a new email address?
I did manage it a few years ago with an old version of thunderbird but I have just move over from XP pro
to 7 Pro and had to install the new Thunderbird so must either be forgeting the simple or going daft in my old age!!
Help!
Cheers MarkYou need to add them.
One possible route is to add a new address as an alternative identity for an existing address.
Tools|Account Settings|{select account}|Account settings→Manage Identities
Maybe you are looking for
-
Which program for basic business presentations?
Forgive me but I need to ask for advice on what program to use for video editing for basic business presentations. I think Premiere Pro is way beyond my needs, mainly in terms of learning curve (as well as the cost). For what it's worth, I'm an avid
-
How do I get iTunes to email my receipts to my iCloud account?
I've been desperately trying to get iTunes to accept my new iCloud email address for my iTunes account, but have had no luck. I've logged in to iTunes via my iCloud email, but it just sends me to my current iTunes account instead of to the supposedly
-
Comodo anti-virus detected the file hi.bat
Comodo anti-virus detected the file C:\Toshiba\Drivers\hi.bat as unclassified Malware-risk High. I don't no what to do. Delete? I need some help please.
-
SharePoint 2010. We've migrated domains, one user that was no longer with the company was not migrated to the new domain and was deleted. She had created several subsites that we are no longer able to access, the user not found message. How can I fix
-
Can't manipulate symbols with Flash CS5 3-D rotation tools:
Please help! I am just learning to use Flash CS5 Professional (aided by the "Flash Basics" tutorials of Lynda.com). I am presently trying to manipulate symbols as motion-tweens with the 3-D rotation tool found in the Flash toolbar. At the moment I'm