Help with the code
Hi all,
i have records like in internal table itab
id amount
101 1 1.00
101 2 2.00
102 1 1.00
102 2 2.50
102 3 3.00
103 2 1.50
i want the output like like this internal table itab1
101 3.00
102 6.50
103 1.50
clear : wa_zoritem ,price.
total= 0.00
loop at itab into wa_itab.
on change of wa_itab1-id.
clear total.
total= total + wa_itab1-amount.
wa_itab1-id = wa_itab_copy-id.
wa_itab1-total= wa_itab_copy-total.
append wa_itab1 to itab1.
endon.
*MODIFY TABLE i_FINAL FROM wa_FINAL
TRANSPORTING COST.
*MODIFY wa_final to i_final.
wa_itab_copy = wa_itab.
clear : wa_itab.
endloop.
This works fine when i have multiple records
but this doesn't work when i have the follwwing record in itab
id amount
101 1 1.00
Thanks
hi,
*suppose the data is avialble in the internal table ITAB.
[code]
sort ITAB by ID amount.
delete adjacent duplicates from ITAB comparing ID.
*Now thw ITAB conatins only the records.
*101 3.00
*102 6.50
*103 1.50[/code]
Regards
Reshma
Similar Messages
-
Can you help with the code to publish Flash to my own domain.
Thank you for your help, I publish the my site to my own domain, I do not use .Mac, I tested your code and ity works well on .Mac, can you help with the code to publish to my own domain.
Thank you againYou appear to have just collected a variety of code snippets and thrown them together, including a section of AS2 code ( gage.onRelease = function() {... )
The suggestion I offered yesterday still stands. You should find a tutorial regarding AS3 and the atan2 function. Beyond that, what you show suggests this is a school assignment. You should seek help from your fellow students and instructor if that is the case. -
Multiple Users Login ( Help With The Code ) Please.
Hi all. Please help me...
I'm using www.wix.com to create my websites.
but since Wix.com don't able us to have member system conecet to database, i use Flash SWF As3 files...
Please can anyone help me with the Code?
Username=1 /Password= 1 /Url= www.1.com
Username=2 /Password= 2 /Url= www.2.com
Username=2 /Password= 2 /Url= www.2.com
*If user name 1 or 2 or 3 correct. Show massage ex: Welcome back, if not correct " Bad login"
*When login, it will open the url but in new page after the old one closed.
+ There is anyway to add " Password recovaring box too"?
but not connected to datdabase as i said?
Please help me, please! i areadly have code but it don't work for more than one user.
Thank u soooo much!!
LoaiHere's the code i have already,,
but i don't know how to add more than one user + when login it open new window ( popup ) i want it to open in the same window...
Please help.
stop();
//hide the password
//pass_txt.displayAsPassword = true;
//adding event listener to the login button
login_mc.addEventListener(MouseEvent.CLICK, loginUser);
function loginUser(e:MouseEvent):void{
//if both username and password are correct let the user logged in
if(name_txt.text == "1" && pass_txt.text == "1"){
navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-1" ), "_blank" );
display_txt.text = "Going to secure area";
else if(name_txt.text != "1" && pass_txt.text != "1"){
display_txt.text = "Login failed!";
if(name_txt.text == "2" && pass_txt.text == "2"){
navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-2" ), "_blank" );
display_txt.text = "Going to secure area";
else if(name_txt.text != "2" && pass_txt.text != "2"){
display_txt.text = "Login failed!"; -
ok, i tried putting the code right after the first <body and it still came down there in the same spot... the only thing that seemed to change was adding <center>to the beginning even then it was down..... if you can view source on my page www.gameinfocenter.com the h ome page ma b you mite know exactly where to put it....
The only thing you can do by simple pasting is to have the banner centered at the bottom of the screen.
For any other location, you will have to do a little bit more work to specify exactly where on the page you want the banner to show up. Here's a write up that I did a while back. It's pretty straightforward...
Adding HTML to iWeb pages -
Ajax - Multiple Values - Help with the code
Hi all,
My code is probably wrong, though, I don't know where the problem is. I'm not that good with programming and copied the example from oracle.com and modified it... I hope you guys can help me. Here is what I have:
A select list: P4_DOBJ1_NR (The user selects something from DOBJ_NR from the table dataobject)
A display as text item: P4_NAMSP1
Another display as text item: P4_DOBJ_NAME1
Here my code:
HTML Header Setting for my select list-attribut:
onchange="javascript:getDOBJ1Info(this);"
The HTML header from my page:
<script type="text/javascript">
function getDOBJ1Info(filter)
var xml = null;
var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=GETDOBJ1Info',0);
get.add('GOBJ1NO', filter.value);
ret = get.get('XML');
if(ret)
var oneItems = ret.getElementsByTagName("NAMSP");
if (oneItems)
var onedisplay = document.getElementById("P4_NAMSP1");
onedisplay.innerHTML = oneItems[0].getAttribute("VALUE");
var twoItems = ret.getElementsByTagName("DOBJ_NAME");
if (twoItems)
var twodisplay = document.getElementById("P4_DOBJ_NAME1");
twodisplay.innerHTML = twoItems[0].getAttribute("VALUE");
get = null;
</script>
An application item, called: GOBJ1NO
And the Application Process:
DECLARE
vONE VARCHAR2(100);
vTWO VARCHAR2(100);
BEGIN
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
htp.prn('<DATA>');
SELECT NAMSP, DOBJ_NAME INTO vONE, vTWO FROM DATAOBJECT WHERE DOBJ_NR = :GOBJ1NO;
htp.prn('<ONE VALUE="' || vONE || '"></ONE>');
htp.prn('<TWO VALUE="' || vTWO || '"></TWO>');
htp.prn('</DATA>');
EXCEPTION WHEN OTHERS THEN
htp.prn('<ONE VALUE="Error"></ONE>');
htp.prn('<TWO VALUE="Error"></TWO>');
END;Your process returns a XML document with structure
<DATA>
<ONE> value one </ONE>
<TWO> value two </TWO>
</DATA>but you are trying to retrieve element named "NAMSP"
so try to chang it to :
var oneItems = ret.getElementsByTagName("ONE");You will find fantastic examples on Denes Kubicek web site:
Try this url:
http://apex.oracle.com/pls/otn/f?p=31517:106:1074750275898234::NO
HTH
Thomas -
Need help with the code...
The program should accept two inputs from user in form of military time for example (1245). Then it should calculate and display the difference.
For some reason it displays 0's...
Please help.
Thanks.
public class TimeInterval
private int firstHour;
private int firstMin;
private int secondHour;
private int secondMin;
//Constructor
public TimeInterval(String first, String second)
String h1 = first.substring(0,1);
int h2 = Integer.parseInt(h1);
firstHour = h2;
//firstHour = Integer.parseInt(first.substring(0,1));
String m1 = second.substring(2,3);
int m2 = Integer.parseInt(m1);
firstMin = m2;
//firstMin = Integer.parseInt(second.substring(2,3));
String hh1 = first.substring(0,1);
int hh2 = Integer.parseInt(hh1);
secondHour = hh2;
//secondHour = Integer.parseInt(first.substring(0,1));
String mm1 = second.substring(2,3);
int mm2 = Integer.parseInt(mm1);
secondMin = mm2;
//secondMin = Integer.parseInt(second.substring(2,3));
//Methods
public int getHours()
int HourDifference = secondHour - firstHour;
return HourDifference;
public int getMinutes()
int MinutesDifference = secondMin - firstMin;
return MinutesDifference;
import java.util.Scanner;
public class TimeIntervalTest
public static void main(String[] args)
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the First time now:");
String hr = scanner.next();
System.out.print("Enter the Second time now:");
String mn = scanner.next();
System.out.println(hr);
System.out.println(mn);
TimeInterval timeDifference = new TimeInterval(hr, mn);
System.out.println(timeDifference.getHours());
System.out.println(timeDifference.getMinutes());
}I can't say I understand your code, but for a starter, I think you are misunderstanding method substring:
public class StringExample {
public static void main(String[] args) {
String first = "2345";
String h1 = first.substring(0,1);
System.out.println(h1);
} -
Urgent-Need help with the code.
Hi gurus,
I am trying to write a code where i am populating the ZZorg1,ZZorg2 and ZZorg3 in VBRP tableto 2LIS_13_VDITM.
WHEN '2LIS_13_VDITM'.
DATA: X_T_DATA Like MC13VD0ITM.
Loop at C_T_DATA into X_T_DATA.
Select Single ZZSORG1 into X_T_DATA-ZZSORG1
ZZSORG2 into X_T_DATA-ZZSORG2
ZZSORG3 into X_T_DATA-ZZSORG3
FROM VBRP
WHERE VBELN = X_T_DATA-VBELN
AND POSNR = X_T_DATA-POSNR.
MODIFY C_T_DATA from X_T_DATA.
ENDLOOP.
I am getting the following error when running a error check.
"ZZSORG2 INTO X_T_DATA-ZZSORG2" is not expected.Can anybody let me know what i am doing wrong as i new to ABAP.
Thanks in advance
Resolved it,thanks
Message was edited by:
sap noviceResolved it
-
I want to add BWART field from AUFM table to the DS:2LIS_04_P_COMP.
The AUFM table has key fields as :MBLNR,MJAHR and ZEILE.Can someone plz help with the code to put in the existing function module.I see that both 2LIS_04_P_COMP and AUFM have common field AUFNR process order.
Plz help ASAP.I want to add BWART field from AUFM table to the DS:2LIS_04_P_COMP.
The AUFM table has key fields as :MBLNR,MJAHR and ZEILE.Can someone plz help with the code to put in the existing function module.I see that both 2LIS_04_P_COMP and AUFM have common field AUFNR process order.
Plz help ASAP. -
How to connect my app interface with the code in flash builder?
I'm a beginner and learning my way around actionscript,mxml and flash builder.So this may seem foolish but please bear with me,I'm creating a very simple ios app using flash builder,I have created a simple app interface (A background and a custom navigation bar)using photoshop for my app,now the question is how do i import it into flash builder so that i can connect it with the code i have written? or is there another simpler way to create a app interface using other products like fireworks or catalyst?
In short, I want to know how is an app interface created(wt software) and how is it connected with its code using flash builder.Any help would be greatly appreciated, and tutorials would be swell
Thanks!Can you use stage.width or stage.stageWidth?
-
Hi can you help with the following panic attack report,
hi can you help with the following panic attack report, macbook pro OS 10.7.3
Interval Since Last Panic Report: 157997 sec
Panics Since Last Report: 1
Anonymous UUID: 7ADCF50C-CC18-405E-9D5C-03325D3A83FA
Thu Mar 29 05:37:28 2012
panic(cpu 0 caller 0xffffff80002c266d): Kernel trap at 0xffffff800021d905, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0xffffef801a845328, CR3: 0x0000000019452019, CR4: 0x00000000000606e0
RAX: 0xffffff801a8450d8, RBX: 0xffffff800e79f340, RCX: 0xffffff801a8450d8, RDX: 0xffffef801a8450d8
RSP: 0xffffff80a4623e90, RBP: 0xffffff80a4623eb0, RSI: 0x0000000020c85580, RDI: 0x0000000000000001
R8: 0xffffff80008bd890, R9: 0xffffff80058aeac8, R10: 0xfffffe80539a9928, R11: 0x0008000000053d89
R12: 0xffffff800e79f370, R13: 0xffffff8000846288, R14: 0xffffff801a8450c0, R15: 0x0000000000000001
RFL: 0x0000000000010206, RIP: 0xffffff800021d905, CS: 0x0000000000000008, SS: 0x0000000000000010
CR2: 0xffffef801a845328, Error code: 0x0000000000000002, Faulting CPU: 0x0
Backtrace (CPU 0), Frame : Return Address
0xffffff80a4623b50 : 0xffffff8000220702
0xffffff80a4623bd0 : 0xffffff80002c266d
0xffffff80a4623d70 : 0xffffff80002d7a1d
0xffffff80a4623d90 : 0xffffff800021d905
0xffffff80a4623eb0 : 0xffffff800021daad
0xffffff80a4623ee0 : 0xffffff800023caa9
0xffffff80a4623f10 : 0xffffff800023cb36
0xffffff80a4623f30 : 0xffffff80005a3258
0xffffff80a4623f60 : 0xffffff80005ca448
0xffffff80a4623fb0 : 0xffffff80002d7f39
BSD process name corresponding to current thread: SophosAntiVirus
Mac OS version:
11D50b
Kernel version:
Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64
Kernel UUID: 7B6546C7-70E8-3ED8-A6C3-C927E4D3D0D6
System model name: MacBookPro8,3 (Mac-942459F5819B171B)
System uptime in nanoseconds: 5720232329361
last loaded kext at 5694112402758: com.apple.iokit.IOSCSIBlockCommandsDevice 3.0.3 (addr 0xffffff7f807a3000, size 86016)
last unloaded kext at 248390619372: com.apple.driver.AppleUSBUHCI 4.4.5 (addr 0xffffff7f80a4e000, size 65536)
loaded kexts:
com.sophos.kext.sav 7.3.0
com.apple.driver.AppleUSBCDC 4.1.15
com.apple.driver.AppleHWSensor 1.9.4d0
com.apple.filesystems.autofs 3.0
com.apple.driver.AppleMikeyHIDDriver 122
com.apple.driver.AudioAUUC 1.59
com.apple.driver.AppleUpstreamUserClient 3.5.9
com.apple.driver.AppleMCCSControl 1.0.26
com.apple.driver.AppleHDA 2.1.7f9
com.apple.driver.AppleMikeyDriver 2.1.7f9
com.apple.driver.AppleIntelHD3000Graphics 7.1.8
com.apple.driver.AGPM 100.12.42
com.apple.kext.ATIFramebuffer 7.1.8
com.apple.driver.SMCMotionSensor 3.0.1d2
com.apple.iokit.IOUserEthernet 1.0.0d1
com.apple.driver.AppleSMCLMU 2.0.1d2
com.apple.Dont_Steal_Mac_OS_X 7.0.0
com.apple.driver.AudioIPCDriver 1.2.2
com.apple.driver.ACPI_SMC_PlatformPlugin 4.7.5d4
com.apple.driver.AppleMuxControl 3.0.16
com.apple.driver.AppleLPC 1.5.3
com.apple.ATIRadeonX3000 7.1.8
com.apple.driver.AppleUSBTCButtons 225.2
com.apple.driver.AppleUSBTCKeyboard 225.2
com.apple.driver.AppleIRController 312
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 33
com.apple.iokit.SCSITaskUserClient 3.0.3
com.apple.iokit.IOAHCIBlockStorage 2.0.1
com.apple.driver.AppleUSBHub 4.5.0
com.apple.driver.AppleFWOHCI 4.8.9
com.apple.driver.AirPort.Brcm4331 513.20.19
com.apple.iokit.AppleBCM5701Ethernet 3.0.8b2
com.apple.driver.AppleEFINVRAM 1.5.0
com.apple.driver.AppleAHCIPort 2.2.0
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleUSBEHCI 4.5.8
com.apple.driver.AppleACPIButtons 1.4
com.apple.driver.AppleRTC 1.4
com.apple.driver.AppleHPET 1.6
com.apple.driver.AppleSMBIOS 1.7
com.apple.driver.AppleACPIEC 1.4
com.apple.driver.AppleAPIC 1.5
com.apple.driver.AppleIntelCPUPowerManagementClient 167.3.0
com.apple.nke.applicationfirewall 3.2.30
com.apple.security.quarantine 1.1
com.apple.driver.AppleIntelCPUPowerManagement 167.3.0
com.apple.iokit.IOSCSIBlockCommandsDevice 3.0.3
com.apple.iokit.IOUSBMassStorageClass 3.0.1
com.apple.kext.triggers 1.0
com.apple.driver.AppleAVBAudio 1.0.0d11
com.apple.driver.DspFuncLib 2.1.7f9
com.apple.driver.AppleSMBusController 1.0.10d0
com.apple.iokit.IOSurface 80.0
com.apple.iokit.IOFireWireIP 2.2.4
com.apple.iokit.IOBluetoothSerialManager 4.0.3f12
com.apple.iokit.IOSerialFamily 10.0.5
com.apple.iokit.IOAVBFamily 1.0.0d22
com.apple.driver.AppleHDAController 2.1.7f9
com.apple.iokit.IOHDAFamily 2.1.7f9
com.apple.iokit.IOAudioFamily 1.8.6fc6
com.apple.kext.OSvKernDSPLib 1.3
com.apple.driver.ApplePolicyControl 3.0.16
com.apple.driver.AppleSMC 3.1.1d8
com.apple.driver.IOPlatformPluginFamily 4.7.5d4
com.apple.driver.AppleSMBusPCI 1.0.10d0
com.apple.driver.AppleGraphicsControl 3.0.16
com.apple.driver.AppleBacklightExpert 1.0.3
com.apple.iokit.IONDRVSupport 2.3.2
com.apple.kext.ATI6000Controller 7.1.8
com.apple.kext.ATISupport 7.1.8
com.apple.driver.AppleIntelSNBGraphicsFB 7.1.8
com.apple.iokit.IOGraphicsFamily 2.3.2
com.apple.driver.BroadcomUSBBluetoothHCIController 4.0.3f12
com.apple.driver.AppleUSBBluetoothHCIController 4.0.3f12
com.apple.iokit.IOBluetoothFamily 4.0.3f12
com.apple.driver.AppleThunderboltDPInAdapter 1.5.9
com.apple.driver.AppleThunderboltDPAdapterFamily 1.5.9
com.apple.driver.AppleThunderboltPCIDownAdapter 1.2.1
com.apple.driver.AppleUSBMultitouch 227.1
com.apple.iokit.IOUSBHIDDriver 4.4.5
com.apple.driver.AppleUSBMergeNub 4.5.3
com.apple.driver.AppleUSBComposite 4.5.8
com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.0.3
com.apple.iokit.IOBDStorageFamily 1.6
com.apple.iokit.IODVDStorageFamily 1.7
com.apple.iokit.IOCDStorageFamily 1.7
com.apple.driver.XsanFilter 403
com.apple.iokit.IOAHCISerialATAPI 2.0.1
com.apple.iokit.IOSCSIArchitectureModelFamily 3.0.3
com.apple.driver.AppleThunderboltNHI 1.3.2
com.apple.iokit.IOThunderboltFamily 1.7.4
com.apple.iokit.IOUSBUserClient 4.5.8
com.apple.iokit.IOFireWireFamily 4.4.5
com.apple.iokit.IO80211Family 412.2
com.apple.iokit.IOEthernetAVBController 1.0.0d5
com.apple.iokit.IONetworkingFamily 2.0
com.apple.iokit.IOAHCIFamily 2.0.7
com.apple.iokit.IOUSBFamily 4.5.8
com.apple.driver.AppleEFIRuntime 1.5.0
com.apple.iokit.IOHIDFamily 1.7.1
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 177.3
com.apple.kext.AppleMatch 1.0.0d1
com.apple.security.TMSafetyNet 7
com.apple.driver.DiskImages 331.3
com.apple.iokit.IOStorageFamily 1.7
com.apple.driver.AppleKeyStore 28.18
com.apple.driver.AppleACPIPlatform 1.4
com.apple.iokit.IOPCIFamily 2.6.8
com.apple.iokit.IOACPIFamily 1.4
Model: MacBookPro8,3, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2.2 GHz, 4 GB, SMC 1.70f5
Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 1024 MB
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333235533642465238432D48392020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333235533642465238432D48392020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.100.98.75.19)
Bluetooth: Version 4.0.3f12, 2 service, 18 devices, 2 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: TOSHIBA MK7559GSXF, 750.16 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 3
USB Device: hub_device, 0x0424 (SMSC), 0x2514, 0xfa100000 / 2
USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 8
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0245, 0xfa120000 / 4
USB Device: hub_device, 0x0424 (SMSC), 0x2514, 0xfd100000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3Get rid of Sophos Anti-Virus software you have installed. Use the uninstaller or:
Uninstalling Software: The Basics
Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash. Applications may create preference files that are stored in the /Home/Library/Preferences/ folder. Although they do nothing once you delete the associated application, they do take up some disk space. If you want you can look for them in the above location and delete them, too.
Some applications may install an uninstaller program that can be used to remove the application. In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
Some applications may install components in the /Home/Library/Applications Support/ folder. You can also check there to see if the application has created a folder. You can also delete the folder that's in the Applications Support folder. Again, they don't do anything but take up disk space once the application is trashed.
Some applications may install a startupitem or a Log In item. Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder. Log In Items are set in the Accounts preferences. Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab. Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
Some software use startup daemons or agents that are a new feature of the OS. Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term. Unfortunately Spotlight will not look in certain folders by default. You can modify Spotlight's behavior or use a third-party search utility, Easy Find, instead. Download Easy Find at VersionTracker or MacUpdate.
Some applications install a receipt in the /Library/Receipts/ folder. Usually with the same name as the program or the developer. The item generally has a ".pkg" extension. Be sure you also delete this item as some programs use it to determine if it's already installed.
There are many utilities that can uninstall applications. Here is a selection:
AppZapper
Automaton
Hazel
CleanApp
Yank
SuperPop
Uninstaller
Spring Cleaning
Look for them at VersionTracker or MacUpdate.
For more information visit The XLab FAQs and read the FAQ on removing software. -
How can I print the "number lines" with the code in Visual Studio?
How can I print the "number lines" with the code in Visual Studio?
Hi BillionaireMan,
What about your issue now?
If you have resolved it, you can share the solution here, which will be beneficial for other members with the same issue.
If you did not, please tell us more information,we will try my best to help you.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Noob needs help with this code...
Hi,
I found this code in a nice tutorial and I wanna make slight
adjustments to the code.
Unfortunately my Action Script skills are very limited... ;)
This is the code for a 'sliding menue', depending on which
button u pressed it will 'slide' to the appropriate picture.
Here's the code:
var currentPosition:Number = large_pics.pic1._x;
var startFlag:Boolean = false;
menuSlide = function (input:MovieClip) {
if (startFlag == false) {
startFlag = true;
var finalDestination:Number = input._x;
var distanceMoved:Number = 0;
var distanceToMove:Number =
Math.abs(finalDestination-currentPosition);
var finalSpeed:Number = .2;
var currentSpeed:Number = 0;
var dir:Number = 1;
if (currentPosition<=finalDestination) {
dir = -1;
} else if (currentPosition>finalDestination) {
dir = 1;
this.onEnterFrame = function() {
currentSpeed =
Math.round((distanceToMove-distanceMoved+1)*finalSpeed);
distanceMoved += currentSpeed;
large_pics._x += dir*currentSpeed;
if (Math.abs(distanceMoved-distanceToMove)<=1) {
large_pics._x =
mask_pics._x-currentPosition+dir*distanceToMove;
currentPosition = input._x;
startFlag = false;
delete this.onEnterFrame;
b1.onRelease = function() {
menuSlide(large_pics.pic1);
b2.onRelease = function() {
menuSlide(large_pics.pic2);
b3.onRelease = function() {
menuSlide(large_pics.pic3);
b4.onRelease = function() {
menuSlide(large_pics.pic4);
I need to adjust five things in this code...
(1) I want this menue to slide vertically not horizontally.
I changed the 'x' values in the code to 'y' which I thought
would make it move vertically, but it doesn't work...
(2) Is it possible that, whatever the distance is, the
"sliding" time is always 2.2 sec ?
(3) I need to implement code that after the final position is
reached, the timeline jumps to a certain movieclip to a certain
label - depending on what button was pressed of course...
I tried to implement this code for button number two...
b2.onRelease = function() {
menuSlide(large_pics.pic2);
if (currentPosition = finalDestination) {
this.large_pics.pic2.gotoAndPlay("s1");
--> sliding still works but it doesn't jump to the
appropriate label...
(4) I wanna add 'Next' & 'Previous' buttons to the slide
show - what would be the code in this case scenario ?
My first thought was something like that Flash checks which
'pic' movieclip it is showing right now (pic1, pic2, pic3 etc.) and
depending on what button u pressed u go to the y value of movieclip
'picX + 1' (Next button) or 'picX - 1' (Previous button)...
Is that possible ?
(5) After implementing the Next & Previous buttons I need
to make sure that when it reached the last pic movieclip it will
not go further on the y value - because there is no more pic
movieclip.
Options are to either slide back to movieclip 'pic1' or
simply do nothing any more on the next button...
I know this is probably Kindergarten for you, but I have only
slight ideas how to do this and no code knowledge to back it up...
haha
Thanx a lot for your help in advance !
Always a pleasure to learn from u guys... ;)
MikeHi,
I made some progress with the code thanx to the help of
Simon, but there are still 2 things that need to be addressed...
(1) I want the sliding time always to be 2.2 sec...
here's my approach to it - just a theory but it might work:
we need a speed that changes dynamically depending on the
distance we have to travel...
I don't know if that applies for Action Scrip but I recall
from 6th grade, that...
speed = distance / time
--> we got the time (which is always 2.2 sec)
--> we got the disctance
(currentposition-finaldestination)
--> this should automatically change the speed to the
appropriate value
Unfortunately I have no clue how the action script would look
like (like I said my action script skills are very limited)...
(2) Also, one other thing I need that is not implemented yet,
is that when the final destination is reached it jumps to a certain
label inside a certain movieclip - every time different for each
button pressed - something like:
if (currentPosition = finalDestination) {
this.large_pics.pic2.gotoAndPlay("s1");
that statement just doesn't work when I put it right under
the function for each button...
Thanx again for taking the time !!!
Mike -
Need some help with the Table Function Operator
I'm on OWB 10gR2 for Sun/Solaris 10 going against some 10gR2 DB's...
I've been searching up and down trying to figure out how to make OWB use a Table Function (TF) which will JOIN with another table; allowing a column of the joined table to be a parameter in to the TF. I can't seem to get it to work. I'm able to get this to work in regular SQL, though. Here's the setup:
-- Source Table:
DROP TABLE "ZZZ_ROOM_MASTER_EX";
CREATE TABLE "ZZZ_ROOM_MASTER_EX"
( "ID" NUMBER(8,0),
"ROOM_NUMBER" VARCHAR2(200),
"FEATURES" VARCHAR2(4000)
-- Example Data:
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (1,'Room 1',null);
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (2,'Room 2',null);
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (3,'Room 3','1,1;2,3;');
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (4,'Room 4','5,2;5,4;');
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (5,'Room 5',' ');
-- Destination Table:
DROP TABLE "ZZZ_ROOM_FEATURES_EX";
CREATE TABLE "ZZZ_ROOM_FEATURES_EX"
( "ROOM_NUMBER" VARCHAR2(200),
"FEATUREID" NUMBER(8,0),
"QUANTITY" NUMBER(8,0)
-- Types for output table:
CREATE OR REPLACE TYPE FK_Row_EX AS OBJECT
ID NUMBER(8,0),
QUANTITY NUMBER(8,0)
CREATE OR REPLACE TYPE FK_Table_EX AS TABLE OF FK_Row_EX;
-- Package Dec:
CREATE OR REPLACE
PACKAGE ZZZ_SANDBOX_EX IS
FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX;
END ZZZ_SANDBOX_EX;
-- Package Body:
CREATE OR REPLACE
PACKAGE BODY ZZZ_SANDBOX_EX IS
FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX
AS
RETURN_VALUE FK_Table_EX := FK_Table_EX();
i NUMBER(8,0) := 0;
BEGIN
-- TODO: Put some real code in here that will actually read the
-- input string, parse it out, and put data in to RETURN_VALUE
WHILE(i < 3) LOOP
RETURN_VALUE.EXTEND;
RETURN_VALUE(RETURN_VALUE.LAST) := FK_Row_EX(4, 5);
i := i + 1;
END LOOP;
RETURN RETURN_VALUE;
END UNFK;
END ZZZ_SANDBOX_EX;
I've got a source system built by lazy DBA's and app developers who decided to store foreign keys for many-to-many relationships as delimited structures in driving tables. I need to build a generic table function to parse this data and return it as an actual table. In my example code, I don't actually have the parsing part written yet (I need to see how many different formats the source system uses first) so I just threw in some stub code to generate a few rows of 4's and 5's to return.
I can get the data from my source table to my destination table using the following SQL statement:
-- from source table joined with table function
INSERT INTO ZZZ_ROOM_FEATURES_EX(
ROOM_NUMBER,
FEATUREID,
QUANTITY)
SELECT
ZZZ_ROOM_MASTER_EX.ROOM_NUMBER,
UNFK.ID,
UNFK.QUANTITY
FROM
ZZZ_ROOM_MASTER_EX,
TABLE(ZZZ_SANDBOX_EX.UNFK(ZZZ_ROOM_MASTER_EX.FEATURES)) UNFK
Now, the big question is--how do I do this from OWB? I've tried several different variations of my function and settings in OWB to see if I can build a single SELECT statement which joins a regular table with a table function--but none of them seem to work, I end up getting SQL generated that won't compile because it doesn't see the source table right:
INSERT
/*+ APPEND PARALLEL("ZZZ_ROOM_FEATURES_EX") */
INTO
"ZZZ_ROOM_FEATURES_EX"
("ROOM_NUMBER",
"FEATUREID",
"QUANTITY")
(SELECT
"ZZZ_ROOM_MASTER_EX"."ROOM_NUMBER" "ROOM_NUMBER",
"INGRP2"."ID" "ID_1",
"INGRP2"."QUANTITY" "QUANTITY"
FROM
(SELECT
"UNFK"."ID" "ID",
"UNFK"."QUANTITY" "QUANTITY"
FROM
TABLE ( "ZZZ_SANDBOX_EX"."UNFK2" ("ZZZ_ROOM_MASTER_EX"."FEATURES")) "UNFK") "INGRP2",
"ZZZ_ROOM_MASTER_EX" "ZZZ_ROOM_MASTER_EX"
As you can see, it's trying to create a sub-query in the FROM clause--causing it to just ask for "ZZZ_ROOM_MASTER_EX"."FEATURES" as an input--which isn't available because it's outside of the sub-query!
Is this some kind of bug with the code generator or am I doing something seriously wrong here? Any help will be greatly appreciated!Hello Everybody!
Thank you for all your response!
I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
I had created a Z table with the following fields :
ZADS :
MANDT
VKORG
ABGRU.
I had written a select query as below :
I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table
select vkorg abgru from ZADS into it_rej.
Earlier :
IT_REJ is a Work area:
DATA : BEGIN OF IT_REJ,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
Now :
DATA : BEGIN OF IT_REJ occurs 0,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
I guess this will fix the issue correct?
PLease suggest!
Regards,
Developer. -
What's wrong with the code?
public void run()
try
{ for(;;)
mgr = (RTPManager)RTPManager.newInstance();
mgr.addSessionListener(this);
mgr.addReceiveStreamListener(this);
try{ /*****port1 = port2 = 29261, which port is only used in here
localAddr = new SessionAddress(InetAddress.getLocalHost(), port1);
destAddr = new SessionAddress(ipAddr, port2);
}catch(Exception e)
System.out.println(e + " 4");
try{
mgr.initialize(localAddr);
}catch(Exception e)
System.out.println(e + " 5");
//set buffer
bc = (BufferControl)mgr.getControl("javax.media.control.BufferControl");
if (bc != null)
bc.setBufferLength(20);
try{
mgr.addTarget(destAddr);
}catch(Exception e)
System.out.println(e + " 2");
catch(Exception e)
System.out.println(e+ " 3");
the error when i run the code is like that:
javax.media.rtp.InvalidSessionAddressException: Can't open local data port: 29261
5
java.io.IOException: Address already in use: Cannot bind 2
which means there is error in :
mgr.initialize(localAddr);
mgr.addTarget(destAddr);
But i don't know what's wrong with the code,
can any one help me?I do not find any problem using the same ports for local and destination address with several unicasts. My problems are others.
But note that the error is even at constructing the localAddress, I mean before trying the destinationAddress. Thus the reason cannot be the former is already in use. In fact I think the later belongs to a remote hosts. Likely, it is trying to access the destinationAddress through the localAddress, but this has not been constructed properly. -
Help with html code - inserting video into Muse
I am seeking help writing the code to insert a video into Muse. I uploaded video into my Business Catalyst hosting. I need it to autoplay, loop and not show any controls or frames.
When I host video on Vimeo or YouTube, I see markings on the video that is why I am trying to just host in the same place that the files are stored for my website. If there is a way to host on youtube with out any markings showing up on the video I would be open to that too.
I don't want to see any play button or time bar.
Thanks in advance!!Hello,
Just as an FYI - we also have an HTML5 video tool over at MuseThemes.com that achieves this, but works on mobile devices as well. The link above looks like it uses Flash, which isn't common anymore since the release of HTML5 based video.
Simply drag the widget out onto your canvas, and link up your videos / set options like loop, controls visible, etc. It's quite a flexible widget, and there's a complete training video included so you don't get stuck
Check out the widget here
Just wanted to provide another alternative that could be helpful. Cheers!
Steve Harris
MuseThemes.com
Maybe you are looking for
-
[SOLVED] Xorg & Firefox lock Gnome desktop, causing massive CPU usage
Hi there, since I have installed ArchLinux x64 on this laptop (Core 2 Duo, 9600M GT with Nvidia's binary driver 195.36.15-2, Gnome 2.30) Xorg spins out of control every so often - more often repeatedly in an hour, sometimes not for a prolonged time.
-
Duplicate Email Messages Mail 4.3
Greetings, I am running Snow Leopard 10.6.4 and using the built-in Mac Mail client 4.3. I subscribe to MobileMe and have my primary mail alias and second mail alias. I use server based rules to manage my inbox. For the past few weeks, I've been getti
-
Where is "save as Adobe pdf "in backstage for word 2013
Hi, I saw "save as adobe pdf" in the file tab in office 2013 for some users but I dont know how can I aktive it for my pc?
-
Rows to Column Conversion in ABAP
Hello guys, I wanted to create a report in which I need to convert rows in to column. e.g. I have a itab_col which contains my column header as follows. itab_col-plant itab_col-name 1000 Plant A 2000 Pla
-
Would a new iPhone 4s come with iOS 6 installed?
Curious at what week the iPhone 4s started shipping with iOS preinstalled. Week 37? Week 38? Later? Thanks!