Hi can anyone solve this my problem
class myclass
public static void main(String arg[])
when i execute program
javac myclass.java
then run program
java myclass
everything is ok here.But my confusion is that when we define main () method,we write it with parameterized method (String ar[]) and at the run time we are not giving any parameter.
or value.then how it is work actually. even there is not function overloading.
at the run time we are not giving any parameter or value.then how it is work actuallyThe argument array is of zero length.
In the example you posted, add a line and see this for yourself:class MyClass {
public static void main(String[] args) {
System.out.println(args.length);
}Not that in Java, class names should start with a capital letter.
[http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html]
Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
luck, db
Similar Messages
-
Hi all, I upgraded my MBP to Lion , but on the screen where i need to type my password, click on my photo and it does not appear the place for me to type my password and it stay stuck there. Can anyone solve this problem for me?
Reboot the machine holding Command and r keys down, you'll boot into Lion Recovery Partition
In there will be Disk Utility, use that to select your Lion OS X Partition and Repair Permissions.
After that is done reboot the machine and see if you can log in.
If not repeat the above steps to get into Lion Recovery, get online and reinstall Lion again, it will overwrite the installed version and hopefully after that it wil work.
Reboot and try again.
If not follow my steps to create a Snow Leopard Data Recovery drive, then option boot from it and grab a copy of your files off the machine.
Then reinstall all your programs onto the external drive like setting up a new machine, then use Disk Utility to erase the entire internal boot drive (select the drive media on the far left, not the partiton slightly indented) format Option: GUID , 1 partition OS X Extended and then use Carbon Copy Cloner to clone the external to the newly formatted internal drive. Once that is finished reboot and disconnect the external drive.
Once you go that, boot into Snow Leopard and update to 10.6.8, use the AppStore and option click on Purchases and download Lion again and install.
Lots of work, but there is no Lion disks.
https://discussions.apple.com/message/16276201#16276201 -
hi i got a mac mini but when i connect it to my smartax mt882 modem via ethernet it says device not connected can anyone solve this issue it work fine with the usb connection but the ethernet is giving me problems plz help
Hello, give this a try...
Make a New Location, Using network locations in Mac OS X ...
http://support.apple.com/kb/HT2712
10.5, 10.6, 10.7 & 10.8…
System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
10.5.x/10.6.x/10.7.x/10.8.x instructions...
System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
The interface that connects to the Internet should be dragged to the top of the list.
For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
208.67.222.222
208.67.220.220
(There may be better or faster DNS numbers in your area, but these should be a good test).
Click OK. -
I have set a passcode for my iphone and later I forgot it, and I tried it so many times but it was not correct now the iphone is disable it doesn't work in tune, can anyone solve this problem??
You can solve this problem. Just follow these instructions:
http://support.apple.com/kb/ht1212 -
How can i solve this replication problem between TT and ORACLE
Hi
I have an application that using AWT cashgroup implement the replication between TT (7.0.6.7) and ORACLE(10g);
but i encounter this problem:
16:16:50.01 Err : REP: 2302682: ABM_BAL_WH:meta.c(4588): TT5259: Failed to store Awt runtime information for datastore /abm_wh/abm_bal_ttdata/abm_bal_wh on Oracle.
16:16:50.02 Err : REP: 2302682: ABM_BAL_WH:meta.c(4588): TT5107: TT5107: Oracle(OCI) error in OCIStmtExecute(): ORA-08177: can't serialize access for this transaction rc = -1 -- file "bdbStmt.c", lineno 3726, procedure "ttBDbStmtExecute()"
16:16:50.02 Err : REP: 2302682: ABM_BAL_WH:receiver.c(5612): TT16187: Transaction 1316077016/357692526; Error: transient 0, permanent 1
the isolation level of my date store is read-committed ,and the sys.ODBC.INI file is also set Isolation=1(readcommitted mode)
so ,I still wonder how the error ORA-08177!
how can i solve this replication problem?
thank you.I suspect this is failing on an UPDATE to the tt_03_reppeers table on Oracle. I would guess the TT repagent has to temporarily use serializable isolation when updating this table. Do you have any other datastores with AWT cachegroups propagating into the same Oracle database? Or can you identify if some other process is preventing the repagent from using serializable isolation? If you google ORA-08177 there seem to be ways out there to narrow down what's causing the contention.
-
Can anyone solve this error? 0xc 19a0013
can anyone solve this error? 0xc 19a0013 my black ink cartridge will not print and its full. i've cleaned the heads and still no black. please help.
Hello family1023, and welcome to the HP Forums, I hope you enjoy your experience!
I see you are experiencing print system issues. I would love to try and help you, but I do need a little information first. I am linking a few HP Support documents below that will show you how to find your product number. Also, please include which operating system you are using. Also, if you're using Windows, please include whether your operating system is 32-bit or 64-bit. With this information and the product number we can provide you with accurate information.
How Do I Find My Model Number or Product Number?
Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
Which Windows operating system am I running?
Is the Windows Version on My Computer 32-bit or 64-bit?
Please let me know what you find, and thanks for posting on the HP Forums!
Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
Jamieson
I work on behalf of HP
"Remember, I'm pulling for you, we're all in this together!" - Red Green. -
Can anyone solve this puzzle using SQL?
Can anyone solve this puzzle using SQL?
http://www.greylabyrinth.com/puzzle/puzzle182DylanB123 wrote:
Took me almost 4 min just to get all the permutations/combinations using only dual. May try out the full thing when traffic does down on the DB.Well this looks like it gives the correct answer...
SQL> select * from disks;
DISK COLOUR
1 WGYBRK
2 WBYGKR
3 WBGRKY
4 WRGYKB
5 WKGBYR
6 WBKYGR
7 WGKBYR
7 rows selected.
Elapsed: 00:00:00.04
SQL> select disk_perms,
2 offset_1,
3 offset_2,
4 offset_3,
5 offset_4,
6 offset_5,
7 offset_6,
8 offset_7
9 from (select permutations disk_perms
10 from ( select replace (sys_connect_by_path (n, ','), ',')
11 permutations
12 from ( select to_char (level) n
13 from dual
14 connect by level <= 7) yourtable
15 connect by nocycle n != prior n)
16 where length (permutations) = 7) disk_permutations
17 cross join
18 (select tab1.c offset_1,
19 tab2.c offset_2,
20 tab3.c offset_3,
21 tab4.c offset_4,
22 tab5.c offset_5,
23 tab6.c offset_6,
24 tab7.c offset_7
25 from (select level - 1 as c from dual connect by level <= 6) tab1,
26 (select level - 1 as c from dual connect by level <= 6) tab2,
27 (select level - 1 as c from dual connect by level <= 6) tab3,
28 (select level - 1 as c from dual connect by level <= 6) tab4,
29 (select level - 1 as c from dual connect by level <= 6) tab5,
30 (select level - 1 as c from dual connect by level <= 6) tab6,
31 (select level - 1 as c from dual connect by level <= 6) tab7) offset_combinations
32 join disks d1 on d1.disk = substr(disk_perms,1,1)
33 join disks d2 on d2.disk = substr(disk_perms,2,1)
34 join disks d3 on d3.disk = substr(disk_perms,3,1)
35 join disks d4 on d4.disk = substr(disk_perms,4,1)
36 join disks d5 on d5.disk = substr(disk_perms,5,1)
37 join disks d6 on d6.disk = substr(disk_perms,6,1)
38 join disks d7 on d7.disk = substr(disk_perms,7,1)
39 where substr( substr(d6.colour,offset_6+1)||substr(d6.colour,decode(offset_6,0,7,1),offset_1), 3,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 5,1)
40 and substr( substr(d5.colour,offset_5+1)||substr(d5.colour,decode(offset_5,0,7,1),offset_5), 2,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 5,1)
41 and substr( substr(d5.colour,offset_5+1)||substr(d5.colour,decode(offset_5,0,7,1),offset_5), 1,1) = substr( substr(d6.colour,offset_6+1)||substr(d6.colour,decode(offset_5,0,7,1),offset_5), 4,1)
42 and substr( substr(d4.colour,offset_4+1)||substr(d4.colour,decode(offset_4,0,7,1),offset_4), 1,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 4,1)
43 and substr( substr(d4.colour,offset_4+1)||substr(d4.colour,decode(offset_4,0,7,1),offset_4), 6,1) = substr( substr(d5.colour,offset_5+1)||substr(d5.colour,decode(offset_5,0,7,1),offset_5), 3,1)
44 and substr( substr(d3.colour,offset_3+1)||substr(d3.colour,decode(offset_3,0,7,1),offset_3), 6,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 3,1)
45 and substr( substr(d3.colour,offset_3+1)||substr(d3.colour,decode(offset_3,0,7,1),offset_3), 5,1) = substr( substr(d4.colour,offset_4+1)||substr(d4.colour,decode(offset_4,0,7,1),offset_4), 2,1)
46 and substr( substr(d2.colour,offset_2+1)||substr(d2.colour,decode(offset_2,0,7,1),offset_2), 5,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 2,1)
47 and substr( substr(d2.colour,offset_2+1)||substr(d2.colour,decode(offset_2,0,7,1),offset_2), 4,1) = substr( substr(d3.colour,offset_3+1)||substr(d3.colour,decode(offset_3,0,7,1),offset_3), 1,1)
48 and substr( substr(d1.colour,offset_1+1)||substr(d1.colour,decode(offset_1,0,7,1),offset_1), 3,1) = substr( substr(d2.colour,offset_2+1)||substr(d2.colour,decode(offset_2,0,7,1),offset_2), 6,1)
49 and substr( substr(d1.colour,offset_1+1)||substr(d1.colour,decode(offset_1,0,7,1),offset_1), 4,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 1,1)
50 and substr( substr(d1.colour,offset_1+1)||substr(d1.colour,decode(offset_1,0,7,1),offset_1), 5,1) = substr( substr(d6.colour,offset_6+1)||substr(d6.colour,decode(offset_6,0,7,1),offset_6), 2,1)
51 /
DISK_PERMS
OFFSET_1 OFFSET_2 OFFSET_3 OFFSET_4 OFFSET_5 OFFSET_6 OFFSET_7
5172643
5 0 3 2 5 4 2
Elapsed: 00:00:03.90
SQL>If you take the positions as in
1
6 2
7
5 3
4and the rotations (offsets) as anticlockwise based on my colour strings being in a clockwise order from the top. -
Can anyone solve this query requirement
Would like to know if anyone solved this situation in the query before. If yes, or If you have any ideas, could you please share it with me.
Below is the scenario.
Cube data: We have a number of 'FACILIIES'. 'Surveys' are conducted for each facility once in every six to 18 months. No fixed time intervals though. And surveys are numbered sequencially, always in the increasing order with respect to time. each survey has a 'survey date'. and a keyfigure 'Count'.
DATA IN THE CUBE AS OF 4/30/2005
FACILITY...SURVEYID...SURVEYDATE...COUNTKEYFIGURE
525... 121... 1/6/2004... 6
624... 132... 2/20/2004... 7
525... 138... 10/1/2004... 5
624... 140... 9/15/2004... 4
525... 157... 3/10/2005... 8
624... 245... 4/15/2005... 6
If the query is run for the above data, is shouls be displayed like this.
REPORT AS OF 04/30/2005
FACILITY...LATESTSURVEY...LATESTCOUNT...PREVIOUSSURVEY PRECOUNT
525... 157... 8... 138... 5
624... 245... 6... 140... 4
Once the data is updated further, this is the data in the Cube as of 10/30/2005
DATA IN THE CUBE AS OF 10/30/2005
FACILITY...SURVEYID...SURVEYDATE...COUNTKEYFIGURE
525... 121... 1/6/2004... 6
624... 132... 2/20/2004... 7
525... 138... 10/1/2004... 5
624... 140... 9/15/2004... 4
525... 157... 3/10/2005... 8
624... 245... 4/15/2005... 6
525... 290... 8/20/2005... 9
624... 312... 10/15/2005... 4
REPORT AS OF 04/30/2005
FACILITY LATESTSUREY LATESTCOUNT PREVIOUSSURVEY PRECOUNT
525... 290... 9... 157... 8
624... 312... 4... 245... 6
Dynamically, the latest survey and previous survey has to be determined. Any ideas on how to solve... We alrady thought of making changes to the Survey Master data. Any thing that can be done in the query itself?
thanks
Gova
(I could not improve the display format, so I used '...' to separate the fields. may be SDN should look into improving the display format)Hi Gova..
We too had a similar requirement..to get the previous records..
We had to end up having to populate the Previous record in a seperate field on the same line..
I think you are on the right path to modify the master data and have the previous survey and previous count populated on every line..
Good Luck
Ashish.. -
Please can anyone solve this problem...it's taking over my life!!
Hi, I hope someone can hep me with this as it's driving me crazy!!...I have a magnify glass effect for my main movie and everything is working great, except I need the magnify glass to stay within certain boundaries on the stage...basically when someone moves there mouse away from the flash movie in the centre of the page in a browser, it cuts off the glass and it looks funny (see www.zoeglazebrook.co.uk)...
Kglad has very kindly donated many hours to trying to solve this but it still isn't working unfortunately.
This is the code on the main timeline, and I just need to add in 125, 127, 1095, 775 coordinates in there to make it not go past these points on the stage:
var moveGlass:Number;
magnifyingGlass.onPress = function() {
moveGlass = setInterval(startGlass,1);
function startGlass() {
magnifyingGlass._x = _root._xmouse;
magnifyingGlass._y = _root._ymouse;
magnifyingGlass.onEnterFrame = function(){
this.largeobject._x = (this._parent.original._x-this._x)*2;
this.largeobject._y = (this._parent.original._y-this._y)*2;I'm not sure I understand your question.
I think you are asking about how once you start clicking it doesn't go off? You can add something like this:
magnifyingGlass.onRelease=magnifyingGlass.onReleaseOutside=function(){
delete this.onEnterFrame;
If I'm following you correctly. Or not.
I'm actually more annoyed by also having the pointer still show. So you might add a Mouse.hide() when they press and a Mouse.unhide() when they release. BTW, you need the onReleaseOutside because if you are limiting where the magnifying glass can be dragged then the pointer might not be above the glass when they release. Most people forget the onReleaseOutside and it causes a lot of problems.
Also I'm confused about your confusion of "...whether it's better to have a start drag on there instead."
startDrag() does just that. It takes the item that is referenced and makes it follow the pointer. And it also gives you an easy way to limit the bounds of that dragging to a rectangle. However you can only drag one thing at a time using startDrag and there is no way to do other things as you drag.
In this case you need to also reposition the large view at the same time based upon the position of the pointer. Therefore you need some other kind of loop that says, "every little bit of time make the glass match the mouse coordinates and also align the large image." You could probably make some kind of combined solution that starts the magnifying glass moving with startDrag and uses an onEnterFrame to position the large view, but why make it more complex than it needs to be? -
Can anyone solve this cmos puzzle?
Attached are two CMOS circuits created in Multisim 10.1 (10.1.197)
The first circuit was created after the second.
I'd created two identical oscillators with both CMOS gates and a CMOS IC, but neither of them responded with anywhere near the correct frequency. (The oscillator of my design wasn't working right -- the C had an impossible square waveform, which prompted further investigation into the circuit.) I wanted to investigate this to determine what I needed to do to get the frequency roughly correct. So I decided to go simple-stupid: start with a simple RC circuit, and slowly, step by step, transform it into a CMOS oscillator, just to see where the frequency went to lunch. The circuits below resulted from this quest for the answer.
I'm very puzzled. These CMOS gates don't appear to work at all. I never could get a legal CMOS output (<50mV).
As I see it, my RC oscillator has no chance of working if the gates don't work. This is bad enough that I'm going to have to break out EWB 5.12 now, just to see if all those years ago CMOS didn't work and I'd never noticed.
If anyone out there can solve this puzzler, modify these circuits so that I can get legal CMOS operation, I'd like to know how it's done.
Attachments:
cmos_puzzler.ms10 90 KB
simpleRC_becomeOSC_puzzle.ms10 255 KBThe first piece of the puzzle is that you don't have VSS tied to GND so they are disconnected.
Second, you don't have the proper timebase set on the scope for your analysis, part of your answer lies here:
http://www.datasheet4u.com/html/4/0/0/4001B_FairchildSemiconductor.pdf.html
looking specifically at Tplh (time propogation low to high) with VDD at 5V.
As I read it, the NOR should have a low based on your dual high condition, BUT, during startup, there is no stablization of during the current inrush to allow the inputs to stablize. During this process, the input ramps the output in a linear fashion, once the inputs reach proper operating level, then gate switchs after the 120ns setup prop delay time(datasheet), at which time, then goes low and remains low for the duration, as it should.
I'm not sure how your trying to measure a frequency out of that since it becomes steady state with DC power supplies.
This comes from the simpleRC scope.....I hope this is what you were looking for???
Chris
Signature: Looking for a footprint, component, model? Might be here > http://ni.kittmaster.com
Attachments:
SS005.png 13 KB -
Can anyone solve this one?
Hi,
I've got a problem with compiling the code below.
I've downloaded a java and a class file. The class file is working (it's a slide-menu).
Because I wanted to update a record in a DB, I changed the java file. The part I changed is the part under ActionPerformed. The actionPerformed code is working independently.
But when I implement it in the java file, he stops compiling.
I tried to compile the original code, but it stopped also at the same line. In the new code it's line 318.
The line is:
this.add(mainMenu);
and the error is:
method add(java.awt.Menu) not found in class FisMenu.
The strangest thing is that he gives an error in the code which is used in the WORKING class file.
I have had a hint to use Japplet instead of Applet, that�s why I post this problem here.
can anyone help me out?
thanks in advance.
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.net.*;
import java.util.*;
import netscape.javascript.*;
import sqlj.runtime.*;
import sqlj.runtime.ref.*;
import java.sql.*;
import java.lang.*;
public class FisMenuApplet extends Applet implements MouseListener, ActionListener {
String title, img, bgcolor, text, font, size, style, menufont, menustyle, menusize, data;
String actions[], targets[];
java.awt.Menu menus[];
MenuItem menuItems[];
int fontsize, menufontsize;
CardLayout cardlayout;
java.awt.Menu mainMenu;
Image bgImage = null;
boolean parseError = false, imgError = false;
URL imgUrl;
Label label;
Font labelFont, menuFont;
//Construct the applet
public FisMenuApplet() {
//Initialize the applet
public void main() {
cardlayout = new CardLayout();
title = getParameter("title");
if (title == null) title = "Menu";
// the colors for bgcolor and text are used only for the applet label
// Java 1.1 menus themselves don't support colors, although some Unix implementations
// allow a menu's background color to be inherited from the object it's attached to.
bgcolor = getParameter("bgcolor");
if (bgcolor == null) bgcolor = "white";
else bgcolor = bgcolor.toLowerCase();
text = getParameter("text");
if (text == null) text = "blue";
else text = text.toLowerCase();
// font, size and style are used for the applet's text label (if any)
font = getParameter("font");
if (font == null) font = "SansSerif";
size = getParameter("size");
if (size == null) fontsize = 11;
else
try {
fontsize = Integer.parseInt(size);
} catch(NumberFormatException f) {
fontsize = 11;
style = getParameter("style");
if (style == null) style = "plain";
labelFont = new Font(font, translateStyle(style), fontsize);
// menufont, menusize and menustyle default to font, size and style if undefined,
// but they can be also defined explicitely in case we want the popup menu to look different
// from the applet's text label (if any)
menufont = getParameter("menufont");
if (menufont == null) menufont = font;
menusize = getParameter("menusize");
if (menusize == null) menufontsize = fontsize;
else
try {
menufontsize = Integer.parseInt(menusize);
} catch(NumberFormatException f) {
menufontsize = 11;
menustyle = getParameter("menustyle");
if (menustyle == null) menustyle = style;
menuFont = new Font(menufont, translateStyle(menustyle), menufontsize);
data = getParameter("data");
parseData(data);
this.addMouseListener(this);
this.setBackground(translateColor(bgcolor));
this.setForeground(translateColor(text));
this.setFont(labelFont);
this.setLayout(cardlayout);
img = getParameter("img");
if (img != null) {
try { // absolute URL
imgUrl = new URL(img);
bgImage = this.getImage(imgUrl);
} catch(MalformedURLException a) {
try { // relative URL
imgUrl = new URL(this.getDocumentBase(), img);
bgImage = this.getImage(imgUrl);
} catch(MalformedURLException r) {
imgError = true;
bgImage = this.getImage(this.getDocumentBase(), img);
} else {
label = new Label(title);
label.setAlignment(1);
label.addMouseListener(this);
this.add(title, label);
//Start the applet
public void start() {
//Stop the applet
public void stop() {
//Destroy the applet
public void destroy() {
//Get parameter info
public String[][] getParameterInfo() {
String pinfo[][] =
{"title", "String", "Menu title"},
{"img", "URL", "Background image"},
{"bgcolor", "Color or Hex RGB value", "Menu background color"},
{"text", "Color or Hex RGB value", "Menu foreground color"},
{"font", "Font name", "Menu font name"},
{"size", "Integer", "Menu font size"},
{"style", "Sum of BOLD,PLAIN,ITALIC", "Menu font style"},
{"menufont", "Font name", "Menu font name"},
{"menusize", "Integer", "Menu font size"},
{"menustyle", "Sum of BOLD,PLAIN,ITALIC", "Menu font style"},
{"data", "Menu item names, actions and targets", "Menu data"},
return pinfo;
public void paint(Graphics g) {
if (bgImage != null)
g.drawImage(bgImage,0,0,this);
if (imgError)
this.showStatus("FisMenuApplet: invalid URL for img parameter " + img);
if (parseError)
this.showStatus("FisMenuApplet Error: unbalanced braces in data parameter tag.");
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
public void mouseClicked(MouseEvent e) {
popup();
public void mouseEntered(MouseEvent e) {
popup();
public void mouseExited(MouseEvent e) {
public void actionPerformed(ActionEvent e)
// Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
try
Connection con = DriverManager.getConnection("jdbc:odbc:tom", "", "");
System.out.println("jdbc:odbc connectie...");
Statement stmt = con.createStatement();
//Update database record
stmt.executeUpdate(
"update fis_tuser_preferences set word_path = 'ffisau01' ");
System.out.println("ffisau01");
//Close conection and commit transaction
con.close();
System.out.println("connection closed");
catch (Exception f)
System.err.println("problems connecting to URL");
public void popup() {
// if (!parseError)
// mainMenu.show(this,this.getSize().width/2,this.getSize().height/2);
private Color translateColor(String c) {
if(c.equalsIgnoreCase("white"))
return(Color.white);
else if(c.equalsIgnoreCase("lightgray"))
return(Color.lightGray);
else if(c.equalsIgnoreCase("gray"))
return(Color.gray);
else if(c.equalsIgnoreCase("darkgray"))
return(Color.darkGray);
else if(c.equalsIgnoreCase("black"))
return(Color.black);
else if(c.equalsIgnoreCase("red"))
return(Color.red);
else if(c.equalsIgnoreCase("pink"))
return(Color.pink);
else if(c.equalsIgnoreCase("orange"))
return(Color.orange);
else if(c.equalsIgnoreCase("yellow"))
return(Color.yellow);
else if(c.equalsIgnoreCase("green"))
return(Color.green);
else if(c.equalsIgnoreCase("magenta"))
return(Color.magenta);
else if(c.equalsIgnoreCase("cyan"))
return(Color.cyan);
else if(c.equalsIgnoreCase("blue"))
return(Color.blue);
// allow for Hex RGB values (and an optional leading #, as in HTML syntax)
else if (c.length() == 6 || (c.length() == 7 && c.charAt(0) == '#')) {
if (c.length() == 7)
c = c.substring(1);
return(new Color(hexToInt(c.substring(0,2)),
hexToInt(c.substring(2,4)),hexToInt(c.substring(4,6))));
else
return(Color.white);
private int hexToInt(String c) {
try {
return(Integer.parseInt(c, 16));
} catch(NumberFormatException h) {
return 0;
private int translateStyle(String s) {
int style = 0;
String token = null;
StringTokenizer st = new StringTokenizer(s,",+ \t\n\r");
do {
try {
token = st.nextToken();
} catch(NoSuchElementException n) {}
if (token.equalsIgnoreCase("PLAIN"))
style += Font.PLAIN;
else if (token.equalsIgnoreCase("BOLD"))
style += Font.BOLD;
else if (token.equalsIgnoreCase("ITALIC"))
style += Font.ITALIC;
} while (st.hasMoreTokens());
return style;
private void parseData(String s) {
// menuItem counters start at -1 so that at first increment, they get set to
// the first array subscript value of 0
// menu counters start at 0 so that at first increment, they get set to
// the array subscript value of 1, the first value (0) being reserved for the main menu
int levelCtr = -1, menuCtr = 0, menuItemCtr = -1;
int levelCount = 0, menuCount = 0, menuItemCount = -1;
int parentMenuPtr[];
String itemToken = null, datatoken = null;
String title = "", action = "", target = "_self";
boolean newMenu = false;
if (s == null || s.indexOf("{") == -1) {
parseError = true;
return;
StringTokenizer braces = new StringTokenizer(s,"{}",true);
StringTokenizer braceCtr = new StringTokenizer(s,"{}",true);
StringTokenizer asterisks;
// Get the number of menus and menuItems for which to allocate array space
do {
try {
itemToken = braceCtr.nextToken();
} catch(NoSuchElementException i) {}
if (itemToken.charAt(0) == '{') {
if (newMenu)
menuCount++;
newMenu = true;
levelCtr++;
if (levelCount < levelCtr) levelCount = levelCtr;
} else if (itemToken.charAt(0) == '}') {
if (newMenu)
menuItemCount++;
newMenu = false;
levelCtr--;
} while (braceCtr.hasMoreTokens());
if (levelCtr != -1) {
parseError = true;
return;
// allocate one more element than the counter values , since the first subscript value is 0
actions = new String[menuItemCount+1];
targets = new String[menuItemCount+1];
menuItems = new MenuItem[menuItemCount+1];
menus = new java.awt.Menu[menuCount+1];
parentMenuPtr = new int[levelCount+1];
mainMenu = new java.awt.Menu(title);
menus[0] = (java.awt.Menu)(mainMenu);
this.add(mainMenu);
itemToken = null;
newMenu = false;
// Parse the data Param and build the menu and menu items
do {
try {
itemToken = braces.nextToken();
} catch(NoSuchElementException i) {}
if (itemToken.charAt(0) == '{') {
if (newMenu) {
menuCtr++;
menus[menuCtr] = new java.awt.Menu(title);
menus[menuCtr].setFont(menuFont);
menus[parentMenuPtr[levelCtr]].add(menus[menuCtr]);
parentMenuPtr[levelCtr+1] = menuCtr;
newMenu = true;
levelCtr++;
} else if (itemToken.charAt(0) == '}') {
if (newMenu) {
menuItemCtr++;
actions[menuItemCtr] = action;
targets[menuItemCtr] = target;
menuItems[menuItemCtr] = new MenuItem(title);
menuItems[menuItemCtr].setFont(menuFont);
menuItems[menuItemCtr].addActionListener(this);
menuItems[menuItemCtr].setActionCommand(new Integer(menuItemCtr).toString());
menus[parentMenuPtr[levelCtr]].add(menuItems[menuItemCtr]);
newMenu = false;
levelCtr--;
} else if (!itemToken.trim().equals("")) {
asterisks = new StringTokenizer(itemToken,"*");
try {
title = asterisks.nextToken();
// a menu separator is a -, but allow for hr as well, as in HTML syntax
if (title.equals("-") || title.equalsIgnoreCase("HR"))
title = "-";
} catch(NoSuchElementException i) {
title = "-";
try {
action = asterisks.nextToken();
} catch(NoSuchElementException i) {
action = "";
try {
target = asterisks.nextToken();
} catch(NoSuchElementException i) {
target = "_self";
} while (braces.hasMoreTokens());Congratulations!
I understand completely that you don't like to look at my code and I don't aspect you to help me.
But I'll sure appriciate any help from you or anyone else, today and in the future :)
about the working class file, I downloaded it once and it's working, but when I compile the java file it crashes (even in de original downloaded code).
I just need a way for my code to accept the add method (even if there are major changes needed). -
Can anyone solve this error??
I have following files
1)
CaptureApplet.html
<APPLET CODE=CaptureApplet WIDTH=320 HEIGHT=300>
</APPLET>
import java.applet.*;
import java.awt.*;
import java.net.*;
import java.util.*;
import javax.media.*;
import javax.media.protocol.FileTypeDescriptor;
import javax.media.protocol.DataSource;
import javax.media.control.StreamWriterControl;
import javax.media.format.*;
import java.io.IOException;
public class CaptureApplet extends Applet implements ControllerListener
CaptureDeviceInfo di = null;
Processor player = null;
StateHelper sh = null;
DataSink filewriter = null;
public void init()
Vector deviceList = CaptureDeviceManager.getDeviceList(new AudioFormat(AudioFormat.LINEAR,8000.0,8,1,Format.NOT_SPECIFIED,AudioFormat.SIGNED,8,Format.NOT_SPECIFIED,Format.byteArray));
if (deviceList.size() > 0)
di = (CaptureDeviceInfo)deviceList.firstElement();
else
// Exit if we can't find a device that does linear,
// 44100Hz, 16 bit,
// stereo audio.
System.exit(-1);
try
player = Manager.createProcessor(di.getLocator());
sh = new StateHelper(player);
catch (IOException e)
System.exit(-1);
catch (NoProcessorException e)
System.exit(-1);
// Configure the processor
if (!sh.configure(10000))
System.exit(-1);
// Set the output content type and realize the processor
player.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.WAVE));
if (!sh.realize(10000))
System.exit(-1);
// get the output of the processor
DataSource source = player.getDataOutput();
// create a File protocol MediaLocator with the location of the
// file to which the data is to be written
MediaLocator dest = new MediaLocator("file://foo.wav");
// create a datasink to do the file writing & open the sink to
// make sure we can write to it.
try
filewriter = Manager.createDataSink(source, dest);
filewriter.open();
catch (NoDataSinkException e)
System.exit(-1);
catch (IOException e)
System.exit(-1);
catch (SecurityException e)
System.exit(-1);
// if the Processor implements StreamWriterControl, we can
// call setStreamSizeLimit
// to set a limit on the size of the file that is written.
StreamWriterControl swc = (StreamWriterControl)player.getControl("javax.media.control.StreamWriterControl");
//set limit to 5MB
if (swc != null)
swc.setStreamSizeLimit(5000000);
// now start the filewriter and processor
public void start()
try
filewriter.start();
catch (IOException e)
System.exit(-1);
// Capture for 5 seconds
sh.playToEndOfMedia(5000);
sh.close();
// Wait for an EndOfStream from the DataSink and close it...
filewriter.close();
public synchronized void controllerUpdate(ControllerEvent event)
}2) StateHelper.java
import javax.media.*;
public class StateHelper implements javax.media.ControllerListener {
Player player = null;
boolean configured = false;
boolean realized = false;
boolean prefetched = false;
boolean eom = false;
boolean failed = false;
boolean closed = false;
public StateHelper(Player p) {
player = p;
p.addControllerListener(this);
public boolean configure(int timeOutMillis) {
long startTime = System.currentTimeMillis();
synchronized (this) {
if (player instanceof Processor)
((Processor)player).configure();
else
return false;
while (!configured && !failed) {
try {
wait(timeOutMillis);
} catch (InterruptedException ie) {
if (System.currentTimeMillis() - startTime > timeOutMillis)
break;
return configured;
public boolean realize(int timeOutMillis) {
long startTime = System.currentTimeMillis();
synchronized (this) {
player.realize();
while (!realized && !failed) {
try {
wait(timeOutMillis);
} catch (InterruptedException ie) {
if (System.currentTimeMillis() - startTime > timeOutMillis)
break;
return realized;
public boolean prefetch(int timeOutMillis) {
long startTime = System.currentTimeMillis();
synchronized (this) {
player.prefetch();
while (!prefetched && !failed) {
try {
wait(timeOutMillis);
} catch (InterruptedException ie) {
if (System.currentTimeMillis() - startTime > timeOutMillis)
break;
return prefetched && !failed;
public boolean playToEndOfMedia(int timeOutMillis) {
long startTime = System.currentTimeMillis();
eom = false;
synchronized (this) {
player.start();
while (!eom && !failed) {
try {
wait(timeOutMillis);
} catch (InterruptedException ie) {
if (System.currentTimeMillis() - startTime > timeOutMillis)
break;
return eom && !failed;
public void close() {
synchronized (this) {
player.close();
while (!closed) {
try {
wait(100);
} catch (InterruptedException ie) {
player.removeControllerListener(this);
public synchronized void controllerUpdate(ControllerEvent ce) {
if (ce instanceof RealizeCompleteEvent) {
realized = true;
} else if (ce instanceof ConfigureCompleteEvent) {
configured = true;
} else if (ce instanceof PrefetchCompleteEvent) {
prefetched = true;
} else if (ce instanceof EndOfMediaEvent) {
eom = true;
} else if (ce instanceof ControllerErrorEvent) {
failed = true;
} else if (ce instanceof ControllerClosedEvent) {
closed = true;
} else {
return;
notifyAll();
}When I am running the Applet it crashes.
Can anyone tell me what the problem is.
Using JCreater and even commandline both gave same error as below
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.-1)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkExit(SecurityManager.java:744)
at java.lang.Runtime.exit(Runtime.java:88)
at java.lang.System.exit(System.java:906)
at CaptureApplet.init(CaptureApplet.java:34)
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)>
Applets do not have permission to terminate the JVM. I don't write applets, so I don't know what the proper approach is to "end" an applet, ...>You might
a) Add a new component to a CardLayout that displays the problem.
b) Pop a JDialog or JOptionPane with same, and/or
c) showDocument(errorpage.html)
Edit 1:
Note that an applet will need to be signed and trusted by the end user, before it has any chance of 'capturing' anything. Even as a fully trusted applet, it will still not be able to System.exit(int).
Edited by: AndrewThompson64 on Apr 22, 2009 7:38 PM -
Can anyone verify this color problem
Importing a photoshop solid color green,(72, 182, 70), file (tif adobe98) into Aperture 3.2.3 on a lion machine. When this file gets imported to aperture the color changes dramatically. When I convert that same file to sRGB in photoshop and then import it into aperture it looks as if most or all of the color was NOT lost or hosed as the Adobe98 file was. Can anyone explain what is going on? Thanks Ireally want color management to work. david
Thank you for your help. I am glad that I am not alone with this problem. I feel it is a really huge error, but most people don't care, because they don't own a wide gamut display. If you don't see the problem you don't miss a solution.... For sure the Apple Aperture folks use Apple Displays, they can't see the problem too, if it exists outside my own Aperture installation. To verify this I did the following:
1) Fresh installation of Aperture: Trashed Aperture.app, trashed Aperture Application settings, reinstalled Aperture 3 from DVD and did the 3.3.1 update. Made a new library. It did not help!!!
2) Used my Macbook Pro to verify. The same problem!!!
How can I verify this on a Laptop display with really small gamut? This is a way to test it for you without owning a WideGamut Monitor:
Download the already known display gamut test image:
http://www.colormanagement.org/de/monitortest.html
Import it in Aperture
Open it in Photoshop independent from Aperture
Be sure that View > Onscreen Proofing in Aperture and the similar in Photoshop is OFF
Place the both application windows beside each other, as you can see the both images at once. I estimate at this time you can't see the stripes not in Aperture and not in Photoshop.
Now change the system wide display profile to "Wide Gamut RGB". If the problem resists in your system too, you will see the background stripes in Photoshop but not in Aperture.
It looks like in my screenshot here:
Left Aperture: No stripes, right Photoshop: Stripes in the second and third image.
To switch to WideGamutRGB is nearly the same as using to the CG301 Eizo profile, the difference in seen colors is not huge at my MacPro. On my MacBook Pro it is a way off, but it simulates that the Laptop display has WideGamut. The display gets the 0-255 steps in colors from the graphics card but these steps are in a much wider color space. So the LCD of the laptop gets compressed colors with the steps in the background compressed to the 0-255. The result are terrible colors but you can see the driffernece of the steps too.
I hope my explanation was understandable. If your test shows the same as mine I think we proofed a really big bug in Aperture. For me it is catastrophic, because I am a big fan of Aperture. Its workflow, its smoothness, the look and feel, the print module etc. etc. everything is nearly perfect. But not with this severe colour mangagement problem that forces some kind of sRGB for all image editing.
A note: This testimage is specially made to value the quality of monitors regarding color gamut. If you see the stripes in image 2 it is okay for AdobeRGB, if see them only in image 3 it is good for sRGB, if you see them not at all the gamut of the display is less than sRGB for the color red. Thiss tells the legend on the right side in German. To see the stripes with all displays you can switch of the blue and green channels in Photoshop..... -
Hello All;
I need the support of you brillant people in solving this
problem.I have to play a flash file in a qt widget.But presently it
is not possible. Can any body tell me that how can I play any flash
file in Qt widget.I have to control all its activity such as volume
control,resizing event ,etc in a widget.
If it is not possible than I would request the Adobe flash
player developers that please provide me a support to solve it, a
handsome price will be paid according to there service.
But the conditions are :-
1. It should play in qt widget.
2.It has all the controls so that I can pass commands to
monitore it.
3.It is able to play all type of flash files.
4.The operating system must be Linux (fedora 6).
5.Time duration is with in a week.
waiting for reply of you brillant people.
Your New friend,
Aki Tomar
TextWell, there IS a SWF track inside of QuickTime. I don't know
anything about QuickTime widgets, but I suspect they still support
hte Flash track. Trick is, they only support up to a Flash Player 5
formatted SWF. That functionality hasn't been updated by Apple. (
http://www.apple.com/au/quicktime/technologies/interactivity/)
I have no idea if the Linux version has a Flash track ability
or not. Nor can I advise you how to actually -get- your SWF into
the MOV. You'll have to google that..
Can't deliver it the other way around? MOV inside of Flash?
That's what I'd look at. -
CAN SOMEONE SOLVE THIS APPLICATION PROBLEM? URGENT!
As per the installation instruction in the "Read Me for
Installing Schema and Examples for the Tutorial " write-up, I
executed all the scripts listed there. But when I try to add
the application component portlet, I do not find the
TUTORIAL30_APPLICATION listed under TUTORIAL APPLICATION. When I
try to access the TUTORIAL30_APPLICATION by clicking the
Applications under the provider "Oracle Portal", it lists the
TUTORIAL30_APPLICATION but when I try to select this
application, it gives the following error messages:
NOTE: THIS PROBLEM I AM FACING WHATEVER I CREATE UNDER
APPLICATION and TRY TO ADD IT. WHEN I TRY TO FIND OUT MY
PARTICULAR FORM OR REPORT UNDER MY NEWLY CREATED APPLICATION
ALSO, THE PROBLEM IS SAME. SHOULD I RE-INSTALL PORTAL FROm THE
SCRATCH?
<!--StartFragment-->PORTAL30.wwpob_page.render_portlet_screen:
SIGNATURE (parameter names) MISMATCH
VARIABLES IN FORM NOT IN PROCEDURE: P_APP_ID
NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:^^9
DAD name: portal30
PROCEDURE : PORTAL30.wwpob_page.render_portlet_screen
URL :
http://GALAXY:80/pls/portal30/PORTAL30.wwpob_page.render_portlet_
screen?
p_providerid=927142&p_portletid=10&p_referencepath=&p_mode=100&p_
back_url=&p_app_id=1880851862
PARAMETERS :
============
P_PROVIDERID:
927142
P_PORTLETID:
10
P_REFERENCEPATH:
P_MODE:
100
P_BACK_URL:
P_APP_ID:
1880851862
ENVIRONMENT:
============
PLSQL_GATEWAY=WebDb
GATEWAY_IVERSION=2
SERVER_SOFTWARE=Apache/1.3.12 (Win32) ApacheJServ/1.1
mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.22
GATEWAY_INTERFACE=CGI/1.1
SERVER_PORT=80
SERVER_NAME=GALAXY
REQUEST_METHOD=GET
QUERY_STRING=p_providerid=927142&p_portletid=10&p_referencepath=&
p_mode=100&p_back_url=&p_app_id=1880851862
PATH_INFO=/pls/portal30/PORTAL30.wwpob_page.render_portlet_screen
SCRIPT_NAME=/pls
REMOTE_HOST=
REMOTE_ADDR=127.0.0.1
SERVER_PROTOCOL=HTTP/1.1
REQUEST_PROTOCOL=HTTP
REMOTE_USER=
HTTP_CONTENT_LENGTH=
HTTP_CONTENT_TYPE=
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.5; Windows
NT 5.0)
HTTP_HOST=galaxy
HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/msword,
application/x-comet, */*
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_ACCEPT_LANGUAGE=en-us
HTTP_ACCEPT_CHARSET=
HTTP_COOKIE=portal30=1099809DBE27A307E6FF5A5FF7E396AF52E5454321FA
A327D5BB5E6DA30D30796B206707FAE9EB7BD8790F59A74BBB23B583571C566D2
DADAA731C1568F3FCB57FBF52030A3048D4134154E7045BD074000B614984DF6A
3F;
portal30_sso=2FB35B6FA45359778768C27D9B08A5F491569395DDA49D88BC88
C9AF1C05A5AAAA444725B5302FDCE62BDF1DE2596D12314B3C01B14129371F9BC
3E2281C7BF3E737399C65AC10E97D8441700B9D7A9DE7DEDD8E5D64A8F7
Authorization=
HTTP_IF_MODIFIED_SINCE=
Please look into the problem and provide me the solution.
If I want to un-install the tutorial etc. what should I do?.
I suspect in the execution of the following command script:
cd ..\src\wwu\appimp.cmd -s <PortalOwner_username> -p
<PortalOwner_password> -m CREATE -a TUTORIAL30_APPLICATION -f
<demo_dir>/hlw30_trl_comp.sql -o portalnew -c <connect_string>
I executed the above command as follows:
c:\pschema> appimp.cmd -s portal30 -p portal30 -m CREATE -a
TUTORIAL30_APPLICATION -f hlw30_trl_comp.sql -o portalnew -c
ORCL8
How to re-execute the above script?. I tried to re-execute the
above script by deleting the TUTORIAL30_APPLICATION rows from
wwv_modules$ table, but the appimp.cmd script terminated after
the following messages:
...Importing component: ID = 3365687784 Name = TUTORIAL_HRREP
Owner = TUTORIAL30_APPLICATION Type = REPORT
Input truncated to 6 characters
Disconnected from Oracle8i .......
Thanks,
A. Moyeed
E-mail: [email protected]
Note:
OS Windows 2000 Professional
Database: Oracle 8.1.6.0.0
Portal 3.0.6.3.3InPHeCTed wrote:
Most Wifi hotspots are configured for PC's and not Macs. Most will work with macs, but will have some issues. Unfortunately there is no way to solve this other than asking the hospitals to update their wifi network with Mac-friendly wireless routers
How do you configure a hot spot for PC only? What are "Mac-friendly wireless routers"? Hot spots use wifi technology based on 802.x. This is a wifi standard supported by wifi routers, PCs, and Apple products.
Maybe you are looking for
-
'UIComponent is null' error while opening a tab in ADF
Hi, I am using JDeveloper 11.1.1.5.0 I am navigating from one ADF page to other in my ADF task flow. 2nd ADF page is having multiple tabs with showDetailItem. My requirement is that i need to open a particular tab in 2nd page from 1st page (1st page)
-
Is there any way to remove that annoying box ? thanks Sonny
-
In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thank
-
Mail system with sender information
Dear All, Can anyone help me in finding a function module which sends a mail to an external system and also gives the SENDER and RECEIVER information?
-
JDeveloper as A Database Design Tool
Would anyone recommend it? I'm looking into usage of a few tools at the moment and I'm suprisingly impressed with JDeveloper. I find it to be a hell of a lot easier to use then Oracle Designer which i Just don't like. If anyone has used it in a proje