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 KB
The 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
Similar Messages
-
Can anyone solve this PLL puzzle?
I created a Phase Locked Loop circuit using Multisim10.0. It uses the Multisim clock oscillator, and the circuit appears to work great.
However, I just discovered that if I use the same parts that I used to create the Phase Locked Loop circuit in an oscillator circuit added to the same schematic, the Phase Locked Loop circuit doesn't work any more, while the new oscillator circuit pumps out a frequency that is way off. 4+MHz is no where near 1kHz, the design frequency.
What happened? The evidence says my newly-added oscillator brings in something that kills a previously working circuit that uses the same old parts. Every part used was taken from the previously working circuit, aside from the variable resistor values. How did the Multisim rules change from 10.0 to 10.1? What am I missing here?
Did the Phase Locked Loop circuit really work to begin with? Which circuit is the broken one?
As I see things, in order to solve this puzzle, I need to come up with a factor that involves both circuits. Some factor is going to kill both simultaneously.
Note what I'm saying here. (At least when I ran them this was the case.) Delete just the oscillator circuit, and run the circuit that remains. It works. Undo the deletion. The oscillator reappears where it was, and the previously working circuit stops working. There's something in that oscillator circuit that kills. It's like switching on and off a light bulb.
When I tried to upload both circuits, the extension isn't acceptable now. Therefore, change the extensions to ms10. (What the frig is going on?? I just uploaded here yesterday and didn't change the extension. Am I in the Twilight Zone or something?)
Attachments:
phase_locked_loop.txt 1 KB
phase_locked_loop_puzzle.txt 1 KBJust curious
Attachments:
phase_locked_loop.txt 1 KB
phase_locked_loop_puzzle.txt 1 KB -
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. -
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 -
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. -
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 -
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.. -
Can anyone solve this Phase Locked Loop puzzle?
I created a Phase Locked Loop circuit using
Multisim10.0. It uses the Multisim clock oscillator, and the circuit
appears to work great.
However,
I just discovered that if I use the same parts that I used to create
the Phase Locked Loop circuit in an oscillator circuit added to the
same schematic, the Phase Locked Loop circuit doesn't work any more,
while the new oscillator circuit pumps out a frequency that is way
off. 4+MHz is no where near 1kHz, the design frequency.
What
happened? The evidence says my newly-added oscillator brings in
something that kills a previously working circuit that uses the same
old parts. Every part used was taken from the previously working
circuit, aside from the variable resistor values. How did the Multisim
rules change from 10.0 to 10.1? What am I missing here?
Did the Phase Locked Loop circuit really work to begin with? Which circuit is the broken one?
As
I see things, in order to solve this puzzle, I need to come up with a
factor that involves both circuits. Some factor is going to kill both
simultaneously.
Note what I'm saying here. (At least when I ran
them this was the case.) Delete just the oscillator circuit, and run
the circuit that remains. It works. Undo the deletion. The
oscillator reappears where it was, and the previously working circuit
stops working. There's something in that oscillator circuit that
kills. It's like switching on and off a light bulb.
Message Edited by Euler's Identity on 08-02-2008 12:10 AM
Attachments:
phase_locked_loop1.ms10 649 KB
phase_locked_loop_puzzle1.ms10 174 KBAh hey why not?
After all, I still can't predict what the next filenames I uplaod are going to look like, not yet at least.
However, at this point, it is safe to say it won't be what I uploaded.
[drum roll]
Attachments:
phase_locked_loop1.ms10 649 KB
phase_locked_loop_puzzle1.ms10 174 KB -
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 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 -
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 anyone solve this puzzle for me..?
Hello everybody,
I've got the following question in one of the mock tests for Java certification exams.
the output that I was expecting is 10010
but is shows 10020 as output.
can anybody explain..!
class ValHold{
public int i = 10;
public class A{
public static void main(String argv[]){
A o = new A();
o.amethod();
public void amethod(){
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.print( v.i );
}//End of amethod
public void another(ValHold v, int i){
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.print(v.i);
System.out.print(i);
}ThanksHello everybody,
I've got the following question in one of the mock
tests for Java certification exams.
the output that I was expecting is 10010
but is shows 10020 as output.
can anybody explain..!
class ValHold{
public int i = 10;
public class A{
public static void main(String argv[]){
A o = new A();
o.amethod();
public void amethod(){
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.print( v.i );
/End of amethod
public void another(ValHold v, int i){
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.print(v.i);
System.out.print(i);
Here we get the output 100
The reference v in this method is local to this
method. It is copy of the reference from amethod.
New object is created and assigned to vh. The reference v points to this second object.
After returning from the method, the reference v in amethod still points
to first object where value of i is still 20
>
>
Thanks -
Can anyone explain this baffling puzzle with BT To...
Hi All,
I have been a BT Total BB customer for about 7 years, and still use the model 1 Home Hub (the big white one). It has been more or less fine all this time. Up to last week I have ran 2 laptops, an XBox and an iPad, all wirelessly, from various points around the house with no major issues.
Last Monday I bought a new PC. It came equipped with a rather pathetic dongle-based wireless network capability. It simply didn't work. It could see my router OCCASIONALLY, but basicially it flipped from seeing "No Connections are Available" to very very weak signals from the various routers in the street. On the rare occasions when it did manage to connect to my router and let me surf, I got terrible speeds, with web pages taking minutes to appear. I'm taking 200 BYTES ps.
It is because of this rubbish network dongle I thought. I took the entire rig back and got a refund. Then I bought another new PC, this time with a PCI Network card: a good one: dual band, 2 ariels. go-faster stripes, the lot. Thing is, this is doing exactly the SAME THING!!
So I am now in a position where all my old equipment still works just fine, 5 bars, surfs fine from almost anywhere in the house, while TWO new PCs exhbit a completely flaky network, where networks appear and disappear every few minutes. I can sit the old laptop right beside the new PC, and one works solidly and the others is completely unusable!
Is there any rational explanation for this? Is there some capability issue between old routers (mine is the original I got when I signed up 7 years ago), and newer network cards?
I appeciate any help or answers!I tend to think that the comments about MAC address filtering and wireless security are a bit misleading - if these things were the problem then it would not work at all as opposed to working sporadically.
I must admit, reading your post I had exactly the same problem moving into a new house last year, my desktop PC in my room would get terrible wireless reception with constant erroring and was practically unusable whilst a laptop sat next to it was just fine. I tried a million different things and eventually bought an external wireless antenna like the one here:
Edimax EA-IO7D 7dBi Indoor Omni-Directional High Gain Antenna with Desktop Stand - 1m Cable
It solved the problem for me though I am still mystified as to what the problem is - I suspect that there is something in the environment causing interference though I don't know what. My house is of average size and fairly modern with thin walls so I would not anticipate any problems.
Some things to try are to move the PC right next to the hub (or vice versa, whichever is easier) and see if this improves things or borrow a wireless router from a friend, turn off all encryption and see what signal strength you get there.
Maybe you are looking for
-
Migration from SQL Server 2008 to Oracle 11g
Hi there, I have a quick question, Anyone who have experienced to migration procedures,function from SQL Server 2008 to 11g R2. Is it possible? I migrated tables and views through Oracle heterogenious servinces but I am not sure about the fucntions a
-
What to do if row chaining is found?
Hello Alls, If i found rows chaining in my table then what i have to do? also in my database there is one table which contain the 2,00,00,000 of records so it is advisable to make partition of this table for faster searching? and how to check perform
-
Does anyone know where I can get a download for Creative Suite 3? Please Help!
I have been asking everywhere and so far haven't found a download site for Creative Suite 3. My computer crashed and I lost all of my files. When I went to try to reinstall my program I found everything to do it except the install disc (I have the
-
1CL_OXI_018 : can we make this Classification DS as delta enabled??
hey all help required.. i want to make 1CL_OXI_018 classification DS as delta enabled.. can any how i do this? if so kindly respond. regards vijay
-
Illigal use of my business name
a former employee is continuing using my business name that he registered for skype ...he is no longer with us and i need it deleted from skype ....please tell me how