Fresh pair of Eyes required.
As experts in web design and this is probably the best place to get help and as they always say a fresh pair of eyes on something spot the errors.
Would you please look at my site and give me advice on how to improve it or any other suggestions that you may have. I would really appreciate this and thank you in anticipation. the site can be visited at:
http://web.mac.com/madie2
Macnikon
The fluro-green background in 'news update' should be made less of an eye-sore IMO, perhaps a very light gray to match the black/white style of the rest of the website. Use of red text should also be avoided for similar reasons as mentioned before, I think a warm orange or bold grayscale colours to make it stand out would be better suited.
I'm getting a broken link on this image:
http://web.mac.com/madie2/iWeb/MAdie%20Photography/Images/FC2643A4-ABFB-D5B0-888 0A1B3EB5944AC.jpg
from this page:
http://web.mac.com/madie2/iWeb/MAdie%20Photography/Press%20Coverage.html
Similar Messages
-
Maintenance Windows - I need another pair of eyes
Hello Everyone,
I am looking for a second pair of eyes to ensure I have this process down 100%. The goal is a scheduled client computer reboot following the May patch install.
Assign a 12 hour maintenance window on my client computer collection.
Enforce a 10 hour reboot cycle (initial notification).
Enforce a non-dismissible notification at the 3 hour mark.
I am running some final tests today. Below is my maintenance window:
This is the reboot behavior I assigned:
My first test this morning resulted in the computer say it was going to reboot in 90 minutes! I double checked the computer only had the single maintenance window applied and the client settings were assigned and set properly. I'm concerned there may be
some hidden maximum value on the restart settings.Ensure that you don't have any applications/updates that are set to install and reboot outside of maintenance windows.
If my answer helped you, check out my blog:
DeployHappiness. Subscribe by
RSS or
email. -
I need another pair of eyes.... my loops have got me twisted!
Hey I'm trying to put together a basic tic tac toe game without using any classes. I've written enough code to allow one person to choose a valid position and for next to do so as well. So the game begins and the first player is asked to choose a position on the board,... you select a valid space between 1 and 9, otherwise you have to choose again, after you enter a valid number between 1 and 9 and second bit of code takes the integer value you've entered and converts it into a string for us to compare against the position. Since the 3X3 array is initialized to the numbers 1-9 corresponding with the positions the user selects, if anything other than the number entered appears in the position, the spot has previously been filled and the user is supposed to be prompted to select another position. So... getting back to the problem, after the user selects a bad position the code jumps back up to the top instead of executing the specific error code i tried to have triggered. Along the way you'll notice I've that I've commented out entire blocks of code with some ideas that I've had the have pretty much brought me back to the same place. I feel I've been looking at this thing for too long and i need some fresh perspective. I'm sure I'll be kicking myself when one you nobles points out my flaw.
By the way player 2 code differs from player one so choose a base and let me know which approach works best.
thanks for the consideration
import java.util.Scanner; // importing the scanner to be able to accept user input
public class ticTacToe { // matches the name of the file "ticTacToe.java"
public static void main(String[] args) { //declaring the main class
// *** Beginning: declaring all variables and objects ***
Scanner keyboard = new Scanner (System.in); //creating the scanner object to accept user input
char [][] board = new char [3][3];
int row, column, i ,j;
int userInput;
char userInputChar;
boolean emptySpotTest = false;
//boolean userInputTest;
// *** End: declaring all variables and objects ***
// *** Beggining of Header ***
System.out.println("X O X - Welcome to Benjamin's Tic Tac Toe Game - O X O\n");
System.out.println("This Game has been designed to be played by two players.");
System.out.println("As usual, one person will be player X and the other O.");
System.out.println("When you choose where you'd like to place your piece enter a number between 1 and 9.\n");
System.out.println(" 1 | 2 | 3 ");
System.out.println("---|---|--- ");
System.out.println(" 4 | 5 | 6 ");
System.out.println("---|---|--- ");
System.out.println(" 7 | 8 | 9");
//*** End of Header ***
//Initialize all of the elements in the array
for(i = 0; i < 3; i++){
board [0] = Integer.toString(i + 1).charAt(0);
for(i = 0; i < 3; i++){
board [1][i] = Integer.toString(i + 4).charAt(0);
for(i = 0; i < 3; i++){
board [2][i] = Integer.toString(i + 7).charAt(0);
for (i = 0; i < 3; i++){
System.out.printf( " %c | %c | %c", board[i][0], board[i][1], board[i][2]);
if (i != 2) System.out.print("\n---|---|---\n");
int moveCounter = 0; //used to count the number of moves to trigger a test for a winner
while (moveCounter >= 0){ //starting a game
while (moveCounter % 2 == 0){ //finding out if player 1 should go
emptySpotTest = false; //initialize the test to negative to be sure to run the tests every time we go in the above while loop
do{ //get an integer between 1 and 9 from the user
System.out.print("\nPlayer X please choose your spot on the board: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
// figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
do{
if (board [row][column] == userInputChar){
board [row][column] = 'X';
moveCounter++;
else{
while (emptySpotTest = false) {
System.out.print("Error: Player X, please enter a position that has not been taken: ");
userInput = keyboard.nextInt();
// figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
if (board [row][column] == userInputChar){
board [row][column] = 'X';
emptySpotTest = true;
moveCounter++;
}else emptySpotTest = false;
} while (emptySpotTest = false);
do{
System.out.print("Error: Player X, please enter a position that has not been taken: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
//figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
if (board [row][column] == userInputChar){
board [row][column] = 'X';
emptySpotTest = true;
moveCounter++;
}else emptySpotTest = false;
} //end of else statement
//} while (emptySpotTest = false); //end of while for 2nd test
}//end of while statement for palyer 1
while (moveCounter % 2 != 0){ //finding out if player 2 should go
emptySpotTest = false; //initialize the test to negative to be sure to run the tests every time we go in the above while loop
do{ //get an integer between 1 and 9 from the user
System.out.print("\nPlayer O please choose your spot on the board: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
// figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
do{
if (board [row][column] == userInputChar){
board [row][column] = 'O';
moveCounter++;
else{
emptySpotTest = false;
} while (emptySpotTest = false);
do{
if (emptySpotTest = false){
do{
System.out.print("Error: Player O, please enter a position that has not been taken: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
//figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
if (board [row][column] == userInputChar){
board [row][column] = 'O';
emptySpotTest = true;
moveCounter++;
}else emptySpotTest = false;
}while (emptySpotTest = false);
} //end of while statement for palyer 2
}//end of gamecounter while
}//end of public static void main
}//end of public class ticTacToe
//begin player 2 code
while (moveCounter % 2 != 0){ //finding out if player 2 should go
emptySpotTest = false; //initialize the test to negative to be sure to run the tests every time we go in the above while loop
do{ //get an integer between 1 and 9 from the user
System.out.print("\nPlayer O please choose your spot on the board: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
// figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
if (board [row][column] == userInputChar){
board [row][column] = 'O';
emptySpotTest = true;
moveCounter++;
else {
do{
do{
System.out.print("Error: Player O, please enter a position that has not been taken: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
//figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
// finished converting the position to a string
if (board [row][column] == userInputChar){
board [row][column] = 'O';
emptySpotTest = true;
moveCounter++;
}else emptySpotTest = false;
}while (emptySpotTest = false);
} //end of else statement
}//end of gamecounter while
}//end of public static void main
}//end of public class ticTacToe
if (board[row][column] == userInputChar){ //test condition for the while statement directly below
board [row][column] = 'X'; //mark the spot with an X if it's empty
emptySpotTest = true; //set the boolean to to true meaning the spot is empty
moveCounter++; //test code
System.out.print(emptySpotTest); //test code
System.out.println(" " + board[row][column]); //test code
else {
emptySpotTest = false;
System.out.print(emptySpotTest); //test code
System.out.println(" " + board[row][column]); //test code
while (emptySpotTest = false){
do{
System.out.print("Error: Player X, please enter a position that has not been taken: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
if (board[row][column] == userInputChar){
board [row][column] = 'X'; //mark the spot with an X if it's empty
System.out.print(emptySpotTest); //test code
System.out.println(" " + board[row][column]); //test code
emptySpotTest = true; //set the boolean to to true meaning the spot is empty
moveCounter++; //test code
System.out.print(emptySpotTest); //test code
} //this segment of code is run after the user initially enters the number than it checks to see if
//the space is free if not it keep looing until it's satisfied
for (i = 0; i < 3; i++){
System.out.printf( " %c | %c | %c", board[i][0], board[i][1], board[i][2]);
if (i != 2) System.out.print("\n---|---|---\n");
//moveCounter++; //increment the move counter
while (moveCounter % 2 != 0){ //finding out if player 2 should go
emptySpotTest = false;
do{ //get an integer between 1 and 9 from the user
System.out.print("\nPlayer O please choose your spot on the board: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
// figure out what position the player has selected
row = (userInput - 1) / 3;
column = (userInput - 1) % 3;
userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
if (board[row][column] == userInputChar){ //test condition for the while statement directly below
board [row][column] = 'O'; //mark the spot with an X if it's empty
emptySpotTest = true; //set the boolean to to true meaning the spot is empty
System.out.print(emptySpotTest); //test code
System.out.println(" " + board[row][column]); //test code
else {
emptySpotTest = false;
while (emptySpotTest = false){
do{
System.out.print("Error: Player O, please enter a position that has not been taken: ");
userInput = keyboard.nextInt();
} while (userInput < 1 || userInput > 9);
if (board[row][column] == userInputChar){
board [row][column] = 'O'; //mark the spot with an X if it's empty
System.out.print(emptySpotTest); //test code
System.out.println(" " + board[row][column]); //test code
emptySpotTest = true; //set the boolean to to true meaning the spot is empty
System.out.print(emptySpotTest); //test code
} //this segment of code is run after the user initially enters the number than it checks to see if
//the space is free if not it keep looing until it's satisfied
System.out.println(board[row][column]);
System.out.println(emptySpotTest); //test code
System.out.print("\n");
for (i = 0; i < 3; i++){
System.out.printf( " %c | %c | %c", board[i][0], board[i][1], board[i][2]);
if (i != 2) System.out.print("\n---|---|---\n");
System.out.print("\n");
moveCounter++; //increment the move counter
System.out.print("\n" + moveCounter);
I suggest you try using a debugger to step through the program to see what it is doing.
This will help you understand what you program does.
I also suggest you try formatting your code in a readable manner or using a code formatter to do this for you. -
Can I get another pair of eyes on this? CSS and IE
Can someone please have a look at this code, it is driving me nuts...
It isn't really a JSP problem, more of a CSS problem with IE 6 I think... anyway here is a simple version of the code:
<html>
<head>
<link type="text/css" rel="stylesheet" href="simpTest.css"/>
<style type="text/css">
.defaultsidebaritem
background : transparent url(/HomeMVC/images/inactive.gif) no-repeat scroll center;
.defaultsidebaritem#moused
background : transparent url(/HomeMVC/images/hover.gif) no-repeat scroll center;
color:red;
.areasidebaritem
background : transparent url(/HomeMVC/images/inactive.gif) no-repeat scroll center;
.areasidebaritem#moused {
background : transparent url(/HomeMVC/images/hover.gif) no-repeat scroll center;
</style>
</head>
<body>
<div class="sidebar">
<div class="defaultsidebaritem" id="default-1" onMouseOver="this.id='moused';"
onMouseOut="this.id='default-1';" onClick="document.location='/HomeMVC/default.do';">
<div class="sidebartext">The Luke's Home Page</div>
</div>
<div class="areasidebaritem" id="web-1" onMouseOver="this.id='moused';"
onMouseOut="this.id='web-1';" onClick="document.location='/HomeMVC/index.do';">
<div class="sidebartext">Start Here</div>
</div>
<div class="defaultsidebaritem" id="default-7" onMouseOver="this.id='moused';"
onMouseOut="this.id='default-7';" onClick="document.location='/HomeMVC/html/index.do';">
<div class="sidebartext">HTML - How To</div>
</div>
</div>
</body>
</html>
(the CSS code)
.sidebar
width : 200px;
float : left;
clear : left;
.defaultsidebaritem
height : 30px;
width : 150px;
cursor : pointer;
float:left;
clear:left;
.areasidebaritem
height : 30px;
width : 150px;
cursor : pointer;
margin-left: 10px;
float:left;
clear:left;
.sidebartext
background-color : transparent;
float : left;
width : 150px;
height : 20px;
margin-top : 6px;
text-align : center;
color : white;
.areasidebaritem#moused {
}Basically, is is supposed to be a side bar where when you mouse over the buttons, the div'sbackground image changes.
In Mozilla this works fine. In IE, exactly as written, only the first and the last images will have the change in image.
1) Only the <div class="areasidebaritem"> does not work, the other two do.
2) If I move the style for .areasidebaritem#moused to an external CSS, then it works. I cut and paste it from the external css into my JSP and it no longer does.
3) The javascript involved is fine: alerts placed around show correct ids before and after the event is fired.
4) No style inside the areasidebaritem#moused definition will be changed (as long as the style sheet is included in the .jsp file, if it is inside an external .css everything works). The .areastylesheet styles (class without the id) work correctly.
5) If I change the <div>'s class to defaultsidebaritem it works fine.
6) If I change the <div>'s class to anything else (like asidebaritem) and update the css involved to include those classes, it still won't work
It can't be a missing image problem, because as I have it now, defaultsidebaritem and areasidebaritem use the same images.
Any clue as to why IE might be screwing around here? I am just about ready to include a caption saying "IE users will be missing some functionality" or some such... because I honestly do not see why the middle button won't work :-(
Thanks for any help yall might be able to provide...Observations after some fiddling with it:
- only the first #moused declaration in the style block seems to work
- If you swap the order of the declarations, the other one works.
- If you declare a new style block, and put the second rule in there, it works
- If you use a different id eg #moused2 it also works.
I would probably put it in the category of browser bug.
Cheers,
evnafets -
Hello Everyone,
I have a form that needs a little love.....I have it setup to take values from drop downs and match the values from numeric fields with the dropdowns and multiply the information depending on what is selected. The problem I am running into is it isn't always working. If I select one of the first two options in packDes1 then it works exactly like it should though if i select any other monthly option it doesn't multiply correctly.
The form is found at the following URL for Download:
http://www.shingleme.com/NewCostForm_6_15_2010.pdf
Any help is appreciatedPaul,
Thank you again for coming through!!!!!! Once I fixed the typo and put the "if" code block on one line it worked. I have a strange question then though. can you do something like
var j = 'justin';
textfield.rawValue = j.rawValue (Where j is the value justin and justin is the name of a textfield)
The reason I ask is I went and used find/replace for the other rows in the form to separate all of them but wanted to use inplace substitution though wasn't sure how to do it.
Justin -
Is a matching pair of Ram required to run an iMac 1.83Ghz Intel Core 2 Duo?
I have an iMac 17" 1.83Ghz Intel Core 2 Duo with the standard 512mb ram (2x 256mb) installed. If I replace one of the memory slots with one 1gb ram stick, and leave one 256mb ram stick (1.256gb ram total), will my system run properly? Will it run at its optimal performance level? Or will Installing 2 sticks of 512mg ram perform better?
Also, is 1gb - 1.256gb ram enough to run parallels (windows xp) smoothly?
Thanks in advance.Hi Jay
Welcome to Apple Discussions
First use the link below:
How to identify your iMac
If you have a 17-inch iMac (MA710LL) Intel GMA 950 graphics processor with 64MB of DDR2 SDRAM shared with main memory then YES you need to keep the ram matched in that model.
iMac (Early 2006), iMac (Mid 2006), iMac (17-inch Late 2006 CD): Memory Specifications -
Would someonoe take a look at the navbar on this
site I'm
redesigning please.
In IE7 drop down under ministries and stewardship fall behind
the sidebar top box. IE6 and FF look fine.
There are still a few errors that I'm working through, but
don't believe they have anything to do with the navbar acting this
way in IE7.
Also in IE6 my header sometimes gets very elongated.
Thoughts?
Hope someone can help. Thanks.
LynneHi Bass2ply!
The solution:
// from rear to front
for(int i = iStringLength; i>=0; i--)
if ((sb.charAt(i)==',') || (sb.charAt(i)=='%')
sb.deleteCharAt(i);
Best Regards -
5310 w/ dead display - need a pair of eyes
Hi.
The display on my 5310 has died but otherwise the phone works fine as long as you can remember the shortcuts. Anyway, this sucks and I need someone to tell me exactly what to click in order to change the USB mode to PC Suite (it is currently data storage). I am going to export everything and import it to a new phone.Press keys in following order menu key>left nav key>menu key>7 times down nav key>menu key>2 times down nav key>menu key>2 times up nav key>menu key . Now its done to pc suite mode if it helped plz kudo
-
Seeking another pair of eyes - MSI H77MA-G43 + i5 2500K
Hello everyone,
I have read the CPU compatibility sticky and I think I have come to a conclusion but I wanted to run it past a larger group.
I have a MSI H77MA-G43 that won't POST (sits in a power cycle "infinite loop") and I *believe* it is possible my MSI H77MA-G43 has a BIOS that is not compatible with my i5 2500K CPU.
Using the CPU Compatibility checker for my motherboard (tried to post the link - cant) - I can see that 2500Ks with D2 stepping are supported on BIOS version 7756v10.
Core i5 Sandy Bridge i5-2500K 100 3.30 1M 6M D2 95 7756v10.zip
So - I believe my issue may be I have an older motherboard BIOS and if I could find a spare CPU that will boot it - I could boot the BIOS and flash to upgrade it.
Does anyone have an opinions if that seems sane or not?
Thank you,
-A-Dear XFM and flobelix,
Edit: I finally read it correctly Flobelix - there is no version NOT supporting :-) -- Good news!!
XFM - I'm not home right now but I will post more detailed information. For troubleshooting purposes I only have RAM (single stick or dual stick tried both) and a Geforce Ti560 video card installed.
I'm running the system outside of a case and I've tried replacing the power supply with another one - and same behavior EXCEPT there are now 3 "medium" duration beeps that occur as the system cycles on and off power.
Edit: Nevermind - symptoms exactly the same. 3 Beeps was clearly memory - I didn't have the memory seated well when I did my single channel test. Checked memory seating VERY carefully and now (with new power supply) have the identical issue.
Edit Again: My old motherboard has 2 x4pin 12V ATX connectors and the "big" ATX connector with its additional little "4pin" add on. The new motherboard has the big connector (duh + 4pin) but it only has 1x4pin 12V ATX connectors....
Any chance this has something to do with it?
Tonight I re-thermal pasted my CPU hoping it was some kind of thermal shutdown issue...no change. Still endlessly loops - I'm going to let it sit for 30minutes endlessly looping and see if anything changes.
Thank you,
-A- -
Stacking quotes - need another pair of eyes
Oracle 11.2.0.1 SE-One, 64-bit
Oracle Linux 5.6 x86-64
Given the following procedure, and focusing on the call to dbms_scheduler
create or replace
PROCEDURE dw.fix_job_timezone(
p_jobschema_in IN VARCHAR2 default null)
IS
type sched_jobs_tbl_type
IS
TABLE OF dba_scheduler_jobs.job_name%TYPE INDEX BY binary_integer;
t_sched_jobs sched_jobs_tbl_type;
v_job VARCHAR2(128);
BEGIN
SELECT
job_name
bulk collect INTO
t_sched_jobs
FROM
dba_scheduler_jobs
WHERE
owner = p_jobschema_in
ORDER BY
job_name ;
FOR i IN t_sched_jobs.first .. t_sched_jobs.last
LOOP
v_job := '"' || p_jobschema_in || '"."'||t_sched_jobs(i) || '"';
dbms_output.put_line('Processing '||v_job);
dbms_scheduler.set_attribute_null (v_job, 'START_DATE');
END LOOP;
END;If the owner of the above procedure connects and calls dbms_scheduler directly:
SQL> show user
USER is "DW"
SQL> exec DBMS_SCHEDULER.set_attribute_null ('"ESTEVENS"."EDS_SQLNAV_JOB1"', 'ST
ART_DATE');
PL/SQL procedure successfully completed.Yet, when calling the above procedure:
SQL> exec dw.fix_job_timezone('ESTEVENS');
Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
BEGIN dw.fix_job_timezone('ESTEVENS'); END;
ERROR at line 1:
ORA-27486: insufficient privileges
ORA-06512: at "SYS.DBMS_ISCHED", line 4398
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
ORA-06512: at line 1
SQL>Maybe a problem with the enclosing quotes, or lack of?
Change the key line to
dbms_scheduler.set_attribute_null ('v_job', 'START_DATE'); And we get
SQL> exec dw.fix_job_timezone('ESTEVENS');
Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
BEGIN dw.fix_job_timezone('ESTEVENS'); END;
ERROR at line 1:
ORA-27476: "DW.V_JOB" does not exist
ORA-06512: at "SYS.DBMS_ISCHED", line 4398
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
ORA-06512: at line 1Or
dbms_scheduler.set_attribute_null ('''||v_job||''', 'START_DATE'); And get
SQL> exec dw.fix_job_timezone('ESTEVENS');
Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
BEGIN dw.fix_job_timezone('ESTEVENS'); END;
ERROR at line 1:
ORA-27452: '||v_job||' is an invalid name for a database object.
ORA-06512: at "SYS.DBMS_ISCHED", line 4398
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
ORA-06512: at line 1
dbms_scheduler.set_attribute_null ('v_job', 'START_DATE');
And getERROR at line 1:
ORA-27476: "DW.V_JOB" does not exist
ORA-06512: at "SYS.DBMS_ISCHED", line 4398
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
ORA-06512: at line 1
I’ve been chasing my tail to get the right combination of single-quotes and possibly concatenation, but it has eluded me.Hi,
EdStevens wrote:
... If the owner of the above procedure connects and calls dbms_scheduler directly:
SQL> show user
USER is "DW"
SQL> exec DBMS_SCHEDULER.set_attribute_null ('"ESTEVENS"."EDS_SQLNAV_JOB1"', 'ST
ART_DATE');
PL/SQL procedure successfully completed.Yet, when calling the above procedure:
SQL> exec dw.fix_job_timezone('ESTEVENS');
Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
BEGIN dw.fix_job_timezone('ESTEVENS'); END;
ERROR at line 1:
ORA-27486: insufficient privileges
ORA-06512: at "SYS.DBMS_ISCHED", line 4398
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
ORA-06512: at line 1
Remember that privileges granted through roles don't count in AUTHID DEFINER stored procedures.
Your procedure doesn't specify AUTHID, so it defaults to DEFINER; therefore, the privilges to do anything in the procedure must be granted directly to the procedure owner (or to PUBLIC), and not merely to some role that the procedure owner has.
Maybe a problem with the enclosing quotes, or lack of?I don't think so. If the quotes were wrong, I would expect a compile-time error, not a run-time error. Also, regardless of when you got the error, I would expect the error message for misplaced quotes to be something about syntax, like "keyword not found where expected', rather than something about privileges.
You're already doing the smart thing:
{code}
dbms_output.put_line('Processing '||v_job);
dbms_scheduler.set_attribute_null (v_job, 'START_DATE');
END LOOP;
{code}displaying v_job pefore running it. If you can run that same command in an EXEC command (as the procedure owner), then it's definitely an AUTHID DEFINER problem, and you need the privileges granted directly to you. -
Cadac Template - Carousel Advice Required
Hey guys the design firm I work for are pretty new to building websites and Business Catalyst has been a really great resource for us as they are easy to use and the templates look great!
We are graphic designers and know very little programming. I am developing the Cadac Template for one of our clients and I don't know how to edit the slider.
Does anyone know what I need to do in the code to make the slider show only 4 images with no text or sidebar?
Here's a link to the site so far http://nightingalesgoldencare.businesscatalyst.com/Thanks Justin,
With your input and a fresh pair of eyes it's fixed - I think.
It would seem the template designer has chosen to include some of the <div class="???"> statements within the html of each "Page" rather than the "Page Template". Something I consider dangerous when the end users of the CMS may not be web savvy. As had happened in this case those users can delete those <div> statements if they choose to edit the "Pages" using the back end... the very same <div> statements that are responsible for giving the page its structure.
Add that to my earlier rant about this template's unsuitability for a CMS system in its current incarnation
So... In this case... the Slide/Carousel "Description" was entered into the "Description" box from scratch - hence it contained none of the required <div> statements to enclosed it correctly.
We've shifted those essential <div> statements from to the"Pages" to the "Page Templates" where they are less likely to be accidentally removed.
It also didn't help that the Carousel "Detail Layout" already had extra table regions that we didn't need. -
Remote access VPN on ASA5520 Ping Issues.
Hi I hope someone might be able to help me. I have setup a remote access VPN on an ASA 5520. The VPN client connects ok, accepts my username and password and then I am in. I get an allocated IP address of 172.16.1.1 from the local pool. The problem is that I cannot then ping the inside LAN which is 192.168.1.1. I've got isakmp nat traversal set to default which is 20. I've been looking at this all day and I think I've gone crossed eyed, a fresh pair of eyes are definitley required, so any help would be gratefully received. My config is
Saved
ASA Version 7.0(8)
hostname Hospira-firewall
enable password 2KFQnbNIdI.2KYOU encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
dns-guard
interface GigabitEthernet0/0
speed 100
duplex full
nameif outside
security-level 0
ip address 213.212.66.52 255.255.255.248
interface GigabitEthernet0/1
speed 100
duplex full
nameif inside
security-level 100
ip address 192.168.1.1 255.255.255.0
interface GigabitEthernet0/2
shutdown
no nameif
no security-level
no ip address
interface GigabitEthernet0/3
shutdown
no nameif
no security-level
no ip address
interface Management0/0
shutdown
no nameif
no security-level
no ip address
ftp mode passive
same-security-traffic permit intra-interface
access-list NONAT extended permit ip 192.168.1.0 255.255.255.0 172.16.1.0 255.255.255.0
access-list Split standard permit 192.168.1.0 255.255.255.0
pager lines 24
mtu outside 1500
mtu inside 1500
ip local pool mypool 172.16.1.1-172.16.1.253 mask 255.255.255.0
no failover
asdm image disk0:/asdm-508.bin
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list NONAT
nat (inside) 1 192.168.1.0 255.255.255.0
route outside 0.0.0.0 0.0.0.0 213.212.66.49 1
route outside 172.16.1.0 255.255.255.0 213.212.66.49 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00
timeout mgcp-pat 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
group-policy hospira internal
group-policy hospira attributes
vpn-simultaneous-logins 400
split-tunnel-policy tunnelspecified
split-tunnel-network-list value Split
webvpn
username user password 08S9WUsiSMr3RauN encrypted
http 0.0.0.0 0.0.0.0 outside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set hospira esp-3des esp-md5-hmac
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
crypto dynamic-map dmap 1 set transform-set hospira
crypto dynamic-map dmap 1 set security-association lifetime seconds 28800
crypto dynamic-map dmap 1 set security-association lifetime kilobytes 4608000
crypto dynamic-map dmap 1 set reverse-route
crypto map mymap 1 ipsec-isakmp dynamic dmap
crypto map mymap 2 match address NONAT
crypto map mymap 2 set security-association lifetime seconds 28800
crypto map mymap 2 set security-association lifetime kilobytes 4608000
crypto map mymap interface outside
isakmp identity address
isakmp enable outside
isakmp policy 1 authentication pre-share
isakmp policy 1 encryption 3des
isakmp policy 1 hash sha
isakmp policy 1 group 2
isakmp policy 1 lifetime 86400
isakmp policy 65535 authentication pre-share
isakmp policy 65535 encryption 3des
isakmp policy 65535 hash sha
isakmp policy 65535 group 2
isakmp policy 65535 lifetime 86400
isakmp nat-traversal 20
tunnel-group DefaultRAGroup ipsec-attributes
pre-shared-key *
tunnel-group hospira type ipsec-ra
tunnel-group hospira general-attributes
address-pool mypool
default-group-policy hospira
tunnel-group hospira ipsec-attributes
pre-shared-key *
telnet timeout 5
ssh timeout 5
console timeout 0
class-map inspection_default
match default-inspection-traffic
policy-map global_policy
class inspection_default
inspect dns maximum-length 512
inspect ftp
inspect h323 h225
inspect h323 ras
inspect netbios
inspect rsh
inspect rtsp
inspect skinny
inspect esmtp
inspect sqlnet
inspect sunrpc
inspect tftp
inspect sip
inspect xdmcp
inspect icmp
inspect icmp error
service-policy global_policy global
Cryptochecksum:98f85c39a5cbffe66b0f6585d5083c7c
: end
Many thanksHi Richard ,
- we don't need access-list with RA connection , we have the dynamic map that acts as a template , so your crypto config :
crypto map mymap 1 ipsec-isakmp dynamic dmap
crypto map mymap 2 match address NONAT
crypto map mymap 2 set security-association lifetime seconds 28800
crypto map mymap 2 set security-association lifetime kilobytes 4608000
crypto map mymap interface outside
map with seq 1 is being binded to the dynamic map , now map 2 you are using the nonat access list as the encryption trigger for this map , so this should not be there as it encrypt traffic from the inside subnet to the pool .
please remove the second entry, then test if not working please provide a capture from the inside interface .
HTH
Mohammad. -
Help with building a JTree using tree node and node renderers
Hi,
I am having a few problems with JTree's. basically I want to build JTree from a web spider. The webspide searches a website checking links and stores the current url that is being processed as a string in the variable msg. I wan to use this variable to build a JTree in a new class and then add it to my GUI. I have created a tree node class and a renderer node class, these classes are built fine. can someone point me in the direction for actually using these to build my tree in a seperate class and then displaying it in a GUI class?
*nodeRenderer.java
import javax.swing.*;
import javax.swing.tree.*;
import java.awt.*;
import java.net.*;
public class nodeRenderer extends DefaultTreeCellRenderer
implements TreeCellRenderer
public static Icon icon= null;
public nodeRenderer() {
icon = new ImageIcon(getClass().getResource("icon.gif"));
public Component getTreeCellRendererComponent(
JTree tree,
Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) {
super.getTreeCellRendererComponent(
tree, value, sel,
expanded, leaf, row,
hasFocus);
treeNode node = (treeNode)(((DefaultMutableTreeNode)value).getUserObject());
if(icon != null) // set a custom icon
setOpenIcon(icon);
setClosedIcon(icon);
setLeafIcon(icon);
return this;
*treeNode.java
*this is the class to represent a node
import javax.swing.*;
import javax.swing.tree.*;
import java.util.*;
import java.net.*;
* Class used to hold information about a web site that has
* been searched by the spider class
public class treeNode
*Url from the WebSpiderController Class
*that is currently being processed
public String msg;
treeNode(String urlText)
msg = urlText;
String getUrlText()
return msg;
//gui.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class gui extends JFrame implements Runnable
*declare variable, boolean
*thread, a object and a center
*pane
protected URL urlInput;
protected Thread bgThread;
protected boolean run = false;
protected WebSpider webSpider;
public gui()
*create the gui here
setTitle("Testing Tool");
setSize(600,600);
//add Buttons to the tool bar
start.setText("Start");
start.setActionCommand("Start");
toolBar.add(start);
ButtonListener startListener = new ButtonListener();
start.addActionListener(startListener);
cancel.setText("Cancel");
cancel.setActionCommand("Cancel");
toolBar.add(cancel);
ButtonListener cancelListener = new ButtonListener();
cancel.addActionListener(cancelListener);
close.setText("Close");
close.setActionCommand("Close");
toolBar.add(close);
ButtonListener closeListener = new ButtonListener();
close.addActionListener(closeListener);
//creat a simple form
urlLabel.setText("Enter URL:");
urlLabel.setBounds(100,36,288,24);
formTab.add(urlLabel);
url.setBounds(170,36,288,24);
formTab.add(url);
current.setText("Currently Processing: ");
current.setBounds(100,80,288,24);
formTab.add(current);
//add scroll bars to the error messages screen and website structure
errorPane.setAutoscrolls(true);
errorPane.setHorizontalScrollBarPolicy(javax.swing.
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
errorPane.setVerticalScrollBarPolicy(javax.swing.
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
errorPane.setOpaque(true);
errorTab.add(errorPane);
errorPane.setBounds(0,0,580,490);
errorText.setEditable(false);
errorPane.getViewport().add(errorText);
errorText.setBounds(0,0,600,550);
treePane.setAutoscrolls(true);
treePane.setHorizontalScrollBarPolicy(javax.swing.
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
treePane.setVerticalScrollBarPolicy(javax.swing.
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
treePane.setOpaque(true);
treeTab.add(treePane);
treePane.setBounds(0,0,580,490);
treeText.setEditable(false);
treePane.getViewport().add(treeText);
treeText.setBounds(0,0,600,550);
//create the tabbed window
centerPane.setBorder(new javax.swing.border.EtchedBorder());
formTab.setLayout(null);
errorTab.setLayout(null);
treeTab.setLayout(null);
centerPane.addTab("Search Parameters", formTab);
centerPane.addTab("Error Messages", errorTab);
centerPane.addTab("Website Structure", treeTab);
//add the tool bar and tabbed pane
getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
getContentPane().add(centerPane, java.awt.BorderLayout.CENTER);
*create the tool bar pane, a center pane, add the buttons,
*labels, tabs, a text field for user input here
javax.swing.JPanel toolBar = new javax.swing.JPanel();
javax.swing.JButton start = new javax.swing.JButton();
javax.swing.JButton cancel = new javax.swing.JButton();
javax.swing.JButton close = new javax.swing.JButton();
javax.swing.JTabbedPane centerPane = new javax.swing.JTabbedPane();
javax.swing.JPanel formTab = new javax.swing.JPanel();
javax.swing.JLabel urlLabel = new javax.swing.JLabel();
javax.swing.JLabel current = new javax.swing.JLabel();
javax.swing.JTextField url = new javax.swing.JTextField();
javax.swing.JPanel errorTab = new javax.swing.JPanel();
javax.swing.JTextArea errorText = new javax.swing.JTextArea();
javax.swing.JScrollPane errorPane = new javax.swing.JScrollPane();
javax.swing.JPanel treeTab = new javax.swing.JPanel();
javax.swing.JTextArea treeText = new javax.swing.JTextArea();
javax.swing.JScrollPane treePane = new javax.swing.JScrollPane();
javax.swing.JTree searchTree = new javax.swing.JTree();
*show the gui
public static void main(String args[])
(new gui()).setVisible(true);
*listen for the button presses and set the
*boolean flag depending on which button is pressed
class ButtonListener implements ActionListener
public void actionPerformed(ActionEvent event)
Object object = event.getSource();
if (object == start)
run = true;
startActionPerformed(event);
if (object == cancel)
run = false;
startActionPerformed(event);
if (object == close)
System.exit(0);
*this method is called when the start or
*cancel button is pressed.
void startActionPerformed (ActionEvent event)
if (run == true && bgThread == null)
bgThread = new Thread(this);
bgThread.start();
if (run == false && bgThread != null)
webSpider.cancel();
*this mehtod will start the background thred.
*the background thread is required so that the
*GUI is still displayed
public void run()
try
webSpider = new WebSpider(this);
webSpider.clear();
urlInput = new URL(url.getText());
webSpider.addURL(urlInput);
webSpider.run();
bgThread=null;
catch (MalformedURLException e)
addressError addErr = new addressError();
addErr.addMsg = "URL ERROR - PLEASE CHECK";
SwingUtilities.invokeLater(addErr);
*this method is called by the web spider
*once a url is found. Validation of navigation
*happens here.
public boolean urlFound(URL urlInput,URL url)
CurrentlyProcessing pro = new CurrentlyProcessing();
pro.msg = url.toString();
SwingUtilities.invokeLater(pro);
if (!testLink(url))
navigationError navErr = new navigationError();
navErr.navMsg = "Broken Link "+url+" caused on "+urlInput+"\n";
return false;
if (!url.getHost().equalsIgnoreCase(urlInput.getHost()))
return false;
else
return true;
*this method is called internally to check
*that a link works
protected boolean testLink(URL url)
try
URLConnection connection = url.openConnection();
connection.connect();
return true;
catch (IOException e)
return false;
*this method is called when an error is
*found.
public void URLError(URL url)
*this method is called when an email
*address is found
public void emailFound(String email)
/*this method will update any errors found inc
*address errors and broken links
class addressError implements Runnable
public String addMsg;
public void run()
errorText.append(addMsg);
current.setText("Currently Processing: "+ addMsg);
class navigationError implements Runnable
public String navMsg;
public void run()
errorText.append(navMsg);
*this method will update the currently
*processing field on the GUI
class CurrentlyProcessing implements Runnable
public String msg;
public void run()
current.setText("Currently Processing: " + msg );
//webspider.java
import java.util.*;
import java.net.*;
import java.io.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
import javax.swing.tree.*;
import javax.swing.*;
*this class implements the spider.
public class WebSpider extends HTMLEditorKit
*make a collection of the URL's
protected Collection urlErrors = new ArrayList(3);
protected Collection urlsWaiting = new ArrayList(3);
protected Collection urlsProcessed = new ArrayList(3);
//report URL's to this class
protected gui report;
*this flag will indicate whether the process
*is to be cancelled
protected boolean cancel = false;
*The constructor
*report the urls to the wui class
public WebSpider(gui report)
this.report = report;
*get the urls from the above declared
*collections
public Collection getUrlErrors()
return urlErrors;
public Collection getUrlsWaiting()
return urlsWaiting;
public Collection getUrlsProcessed()
return urlsProcessed;
* Clear all of the collections.
public void clear()
getUrlErrors().clear();
getUrlsWaiting().clear();
getUrlsProcessed().clear();
*Set a flag that will cause the begin
*method to return before it is done.
public void cancel()
cancel = true;
*add the entered url for porcessing
public void addURL(URL url)
if (getUrlsWaiting().contains(url))
return;
if (getUrlErrors().contains(url))
return;
if (getUrlsProcessed().contains(url))
return;
/*WRITE TO LOG FILE*/
log("Adding to workload: " + url );
getUrlsWaiting().add(url);
*process a url
public void processURL(URL url)
try
/*WRITE TO LOGFILE*/
log("Processing: " + url );
// get the URL's contents
URLConnection connection = url.openConnection();
if ((connection.getContentType()!=null) &&
!connection.getContentType().toLowerCase().startsWith("text/"))
getUrlsWaiting().remove(url);
getUrlsProcessed().add(url);
log("Not processing because content type is: " +
connection.getContentType() );
return;
// read the URL
InputStream is = connection.getInputStream();
Reader r = new InputStreamReader(is);
// parse the URL
HTMLEditorKit.Parser parse = new HTMLParse().getParser();
parse.parse(r,new Parser(url),true);
catch (IOException e)
getUrlsWaiting().remove(url);
getUrlErrors().add(url);
log("Error: " + url );
report.URLError(url);
return;
// mark URL as complete
getUrlsWaiting().remove(url);
getUrlsProcessed().add(url);
log("Complete: " + url );
*start the spider
public void run()
cancel = false;
while (!getUrlsWaiting().isEmpty() && !cancel)
Object list[] = getUrlsWaiting().toArray();
for (int i=0;(i<list.length)&&!cancel;i++)
processURL((URL)list);
* A HTML parser callback used by this class to detect links
protected class Parser extends HTMLEditorKit.ParserCallback
protected URL urlInput;
public Parser(URL urlInput)
this.urlInput = urlInput;
public void handleSimpleTag(HTML.Tag t,MutableAttributeSet a,int pos)
String href = (String)a.getAttribute(HTML.Attribute.HREF);
if((href==null) && (t==HTML.Tag.FRAME))
href = (String)a.getAttribute(HTML.Attribute.SRC);
if (href==null)
return;
int i = href.indexOf('#');
if (i!=-1)
href = href.substring(0,i);
if (href.toLowerCase().startsWith("mailto:"))
report.emailFound(href);
return;
handleLink(urlInput,href);
public void handleStartTag(HTML.Tag t,MutableAttributeSet a,int pos)
handleSimpleTag(t,a,pos); // handle the same way
protected void handleLink(URL urlInput,String str)
try
URL url = new URL(urlInput,str);
if (report.urlFound(urlInput,url))
addURL(url);
catch (MalformedURLException e)
log("Found malformed URL: " + str);
*log the information of the spider
public void log(String entry)
System.out.println( (new Date()) + ":" + entry );
I have a seperate class for parseing the HTML. Any help would be greatly appreciated
mrvHi Sorry to be a pain again,
I have re worked the gui class so it looks like this now:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class gui extends JFrame implements Runnable
*declare variable, boolean
*thread, a object and a center
*pane
protected URL urlInput;
protected Thread bgThread;
protected boolean run = false;
protected WebSpider webSpider;
public String msgInfo;
public String brokenUrl;
public String goodUrl;
public String deadUrl;
protected DefaultMutableTreeNode rootNode;
protected DefaultTreeModel treeModel;
public gui()
*create the gui here
setTitle("Testing Tool");
setSize(600,600);
//add Buttons to the tool bar
start.setText("Start");
start.setActionCommand("Start");
toolBar.add(start);
ButtonListener startListener = new ButtonListener();
start.addActionListener(startListener);
cancel.setText("Cancel");
cancel.setActionCommand("Cancel");
toolBar.add(cancel);
ButtonListener cancelListener = new ButtonListener();
cancel.addActionListener(cancelListener);
close.setText("Close");
close.setActionCommand("Close");
toolBar.add(close);
ButtonListener closeListener = new ButtonListener();
close.addActionListener(closeListener);
//creat a simple form
urlLabel.setText("Enter URL:");
urlLabel.setBounds(100,36,288,24);
formTab.add(urlLabel);
url.setBounds(170,36,288,24);
formTab.add(url);
current.setText("Currently Processing: ");
current.setBounds(100,80,288,24);
formTab.add(current);
//add scroll bars to the error messages screen and website structure
errorPane.setAutoscrolls(true);
errorPane.setHorizontalScrollBarPolicy(javax.swing.
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
errorPane.setVerticalScrollBarPolicy(javax.swing.
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
errorPane.setOpaque(true);
errorTab.add(errorPane);
errorPane.setBounds(0,0,580,490);
errorText.setEditable(false);
errorPane.getViewport().add(errorText);
errorText.setBounds(0,0,600,550);
treePane.setAutoscrolls(true);
treePane.setHorizontalScrollBarPolicy(javax.swing.
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
treePane.setVerticalScrollBarPolicy(javax.swing.
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
treePane.setOpaque(true);
treeTab.add(treePane);
treePane.setBounds(0,0,580,490);
treeText.setEditable(false);
treePane.getViewport().add(treeText);
treeText.setBounds(0,0,600,550);
//JTree
// NEW CODE
rootNode = new DefaultMutableTreeNode("Root Node");
treeModel = new DefaultTreeModel(rootNode);
treeModel.addTreeModelListener(new MyTreeModelListener());
tree = new JTree(treeModel);
tree.setEditable(true);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.setShowsRootHandles(true);
treeText.add(tree);
//create the tabbed window
centerPane.setBorder(new javax.swing.border.EtchedBorder());
formTab.setLayout(null);
errorTab.setLayout(null);
treeTab.setLayout(null);
centerPane.addTab("Search Parameters", formTab);
centerPane.addTab("Error Messages", errorTab);
centerPane.addTab("Website Structure", treeTab);
//add the tool bar and tabbed pane
getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
getContentPane().add(centerPane, java.awt.BorderLayout.CENTER);
*create the tool bar pane, a center pane, add the buttons,
*labels, tabs, a text field for user input here
javax.swing.JPanel toolBar = new javax.swing.JPanel();
javax.swing.JButton start = new javax.swing.JButton();
javax.swing.JButton cancel = new javax.swing.JButton();
javax.swing.JButton close = new javax.swing.JButton();
javax.swing.JTabbedPane centerPane = new javax.swing.JTabbedPane();
javax.swing.JPanel formTab = new javax.swing.JPanel();
javax.swing.JLabel urlLabel = new javax.swing.JLabel();
javax.swing.JLabel current = new javax.swing.JLabel();
javax.swing.JTextField url = new javax.swing.JTextField();
javax.swing.JPanel errorTab = new javax.swing.JPanel();
javax.swing.JTextArea errorText = new javax.swing.JTextArea();
javax.swing.JScrollPane errorPane = new javax.swing.JScrollPane();
javax.swing.JPanel treeTab = new javax.swing.JPanel();
javax.swing.JTextArea treeText = new javax.swing.JTextArea();
javax.swing.JScrollPane treePane = new javax.swing.JScrollPane();
javax.swing.JTree tree = new javax.swing.JTree();
*show the gui
public static void main(String args[])
(new gui()).setVisible(true);
*listen for the button presses and set the
*boolean flag depending on which button is pressed
class ButtonListener implements ActionListener
public void actionPerformed(ActionEvent event)
Object object = event.getSource();
if (object == start)
run = true;
startActionPerformed(event);
if (object == cancel)
run = false;
startActionPerformed(event);
if (object == close)
System.exit(0);
*this method is called when the start or
*cancel button is pressed.
void startActionPerformed (ActionEvent event)
if (run == true && bgThread == null)
bgThread = new Thread(this);
bgThread.start();
//new line of code
treeText.addObject(msgInfo);
if (run == false && bgThread != null)
webSpider.cancel();
*this mehtod will start the background thred.
*the background thread is required so that the
*GUI is still displayed
public void run()
try
webSpider = new WebSpider(this);
webSpider.clear();
urlInput = new URL(url.getText());
webSpider.addURL(urlInput);
webSpider.run();
bgThread = null;
catch (MalformedURLException e)
addressError addErr = new addressError();
addErr.addMsg = "URL ERROR - PLEASE CHECK";
SwingUtilities.invokeLater(addErr);
*this method is called by the web spider
*once a url is found. Validation of navigation
*happens here.
public boolean urlFound(URL urlInput,URL url)
CurrentlyProcessing pro = new CurrentlyProcessing();
pro.msg = url.toString();
SwingUtilities.invokeLater(pro);
if (!testLink(url))
navigationError navErr = new navigationError();
navErr.navMsg = "Broken Link "+url+" caused on "+urlInput+"\n";
brokenUrl = url.toString();
return false;
if (!url.getHost().equalsIgnoreCase(urlInput.getHost()))
return false;
else
return true;
*this method is returned if there is no link
*on a web page, e.g. there us a dead end
public void urlNotFound(URL urlInput)
deadEnd dEnd = new deadEnd();
dEnd.dEMsg = "No links on "+urlInput+"\n";
deadUrl = urlInput.toString();
*this method is called internally to check
*that a link works
protected boolean testLink(URL url)
try
URLConnection connection = url.openConnection();
connection.connect();
goodUrl = url.toString();
return true;
catch (IOException e)
return false;
*this method is called when an error is
*found.
public void urlError(URL url)
*this method is called when an email
*address is found
public void emailFound(String email)
/*this method will update any errors found inc
*address errors and broken links
class addressError implements Runnable
public String addMsg;
public void run()
current.setText("Currently Processing: "+ addMsg);
errorText.append(addMsg);
class navigationError implements Runnable
public String navMsg;
public void run()
errorText.append(navMsg);
class deadEnd implements Runnable
public String dEMsg;
public void run()
errorText.append(dEMsg);
*this method will update the currently
*processing field on the GUI
public class CurrentlyProcessing implements Runnable
public String msg;
//new line
public String msgInfo = msg;
public void run()
current.setText("Currently Processing: " + msg );
* NEW CODE
* NEED THIS CODE SOMEWHERE
* treeText.addObject(msgInfo);
public DefaultMutableTreeNode addObject(Object child)
DefaultMutableTreeNode parentNode = null;
TreePath parentPath = tree.getSelectionPath();
if (parentPath == null)
parentNode = rootNode;
else
parentNode = (DefaultMutableTreeNode)
(parentPath.getLastPathComponent());
return addObject(parentNode, child, true);
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
Object child)
return addObject(parent, child, false);
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
Object child,boolean shouldBeVisible)
DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
if (parent == null)
parent = rootNode;
treeModel.insertNodeInto(childNode, parent, parent.getChildCount());
if (shouldBeVisible)
tree.scrollPathToVisible(new TreePath(childNode.getPath()));
return childNode;
public class MyTreeModelListener implements TreeModelListener
public void treeNodesChanged (TreeModelEvent e)
DefaultMutableTreeNode node;
node = (DefaultMutableTreeNode)
(e.getTreePath().getLastPathComponent());
try
int index = e.getChildIndices()[0];
node = (DefaultMutableTreeNode)
(node.getChildAt(index));
catch (NullPointerException exc)
public void treeNodesInserted(TreeModelEvent e)
public void treeStructureChanged(TreeModelEvent e)
public void treeNodesRemoved(TreeModelEvent e)
I beleive that this line of code is required:
treeText.addObject(msgInfo);
I have placed it where the action events start the spider, but i keep getting this error:
cannot resolve symbol
symbol : method addObject (java.lang.String)
location: class javax.swing.JTextArea
treeText.addObject(msgInfo);
Also the jtree is not showing the window that I want it to and I am not too sure why. could you have a look to see why? i think it needs a fresh pair of eyes.
Many thanks
MrV -
Hello,
I'm new to this version of ASDM / CLI
ASA 9.1(3) ASDM 7.1(4)
I'm currently running TWO 5512x. They are connected through VPN.
NETWORK_OBJ_192.168.42.0_24: 192.168.42.1 / 24
Filmtrack-Dev: 192.168.43.1 / 24
AWSV: 10.1.0.0 /16
RSORD: 192.168.200.0 / 24
Traffic is passing fine for both main and dev. However I cannot pass traffic to dev for the AWSV and RSORD subnets. ASWSV and RSORD are connected to MAIN through VPN. Main can connect to AWSV and RSORD
I've seen a couple of discussions which address the same thing. I've attempted to make those changes, but it's still not working. Maybe a fresh pair of eyes can see what I've missing or misconfigured. Thanks for any insight and input.
Most of these entries were created when the wizard was used to create the tunnels.
Message was edited by: Chuck Ostlie - Updated attachmentsHi,
Ok, so lets see what we need to do.
There a basically 2 options on how you can enable traffic from the DEV site through the MAIN site to all 3 HOSTING sites.
Request the HOSTING site VPN device admins to all add the DEV network in the L2L VPN connections as a remote network and apply the NAT0 configuration for traffic to pass without NAT being applied to the traffic
Dont request any changes to the HOSTING site VPN settings but rather go around this limitation by doing Dynamic PAT / Dynamic Policy PAT for your DEV site traffic after the traffic has entered the MAIN site ASA and before it has entered the VPN connection to the HOSTING sites.
Naturally of the above options the second one enables you to do the changes without waiting around for all the HOSTING sites to make the required changes. If the current traffic from MAIN site works to all the HOSTING sites then you should have no problems getting the traffic from DEV to HOSTING work.
I will go through the second options needed configuration compared to the full configurations you attached earlier. Judging by your UPDATE they might have changed in some parts so take that into account. I will try to use different "access-list" , "object" and "object-group" configurations and naturally introduce net "nat" configurations. If something was to get broken for reason or another then you should be able to revert back to using the old "nat" and "access-list" configurations.
Lets start with the DEV site configurations
DEV SITE
My doubt regarding the DEV SITE is how do you manage the ASA? I can only see management enabled from behind the local networks? Do you perhaps use the VPN Client connection to jump to some internal device and use it to manage the ASA and DEV SITE? I was originally about to remove the NAT configuration for the VPN Client but I imagine that you are using the VPN to manage the ASA in the above mentioned way so we could not do that change without you loosing that connectivity so we would have to leave the current NAT in place UNLESS you enable SSH connectivity through public Internet first so you can have CLI access to the ASA at all times even though you wasnt able to use any VPN connection to DEV SITE. Let me know how you have handle making changes to DEV SITE before making any changes.
The below configurations contain the following steps
The "object-group" , "object" and "access-list" configurations you see at the start are basically the basis for the configurations we are going to add. The contain the information that the ASA needs to both build the L2L VPN and perform the correct NAT
After we have created these configurations we remove the current NAT configurations and the ACL from the L2L VPN configurations. This naturally means that there is an outage on the L2L VPN connection.
At the very last step we use the earlier created "object-group" , "object" and "access-list" configurations to build the new configuration and hopefully also make the configuration easier to read in the process
object-group network REMOTE-SITES
description MAIN and HOSTING sites
network-object 192.168.42.0 255.255.255.0
network-object 192.168.100.0 255.255.255.0
network-object 192.168.200.0 255.255.255.0
network-object 10.1.0.0 255.255.0.0
object network DEV-SITE
subnet 192.168.43.0 255.255.255.0
access-list MAIN-SITE-L2LVPN remark Encryption Domain for MAIN site L2LVPN
access-list MAIN-SITE-L2LVPN permit ip object DEV-SITE object-group REMOTE-SITES
no nat (Inside,Outside) source static NETWORK_OBJ_192.168.43.0_24 NETWORK_OBJ_192.168.43.0_24 destination static DM_INLINE_NETWORK_2 DM_INLINE_NETWORK_2 no-proxy-arp route-lookup
no crypto map Outside_map 1 match address Outside_cryptomap
nat (Inside,Outside) source static DEV-SITE DEV-SITE destination static REMOTE-SITES REMOTE-SITES
crypto map Outside_map 1 match address MAIN-SITE-L2LVPN
MAIN SITE
The MAIN SITE is a bit more configuration work simply because it holds 4 L2L VPN connections. With regards to the below changes I presume you are also on site to manage the ASA
The below configurations contain the following steps
The "object-group" , "object" and "access-list" configurations you see at the start are basically the basis for the configurations we are going to add. The contain the information that the ASA needs to both build the L2L VPN and perform the correct NAT
After we have created these configurations we remove the current NAT configurations and the ACLs from the L2L VPN configurations. This naturally means that there is an outage on the L2L VPN connections.
At the very last step we use the earlier created "object-group" , "object" and "access-list" configurations to build the new configuration and hopefully also make the configuration easier to read in the process
object-group network HOSTING-SITES
description HOSTING sites
network-object 192.168.100.0 255.255.255.0
network-object 192.168.200.0 255.255.255.0
network-object 10.1.0.0 255.255.0.0
object network MAIN-SITE
subnet 192.168.42.0 255.255.255.0
object network DEV-SITE
subnet 192.168.43.0 255.255.255.0
object network HOSTING-VIRGINIA
subnet 10.1.0.0 255.255.0.0
object network HOSTING-CHICAGO
subnet 192.168.100.0 255.255.255.0
object network HOSTING-LONDON
subnet 192.168.200.0 255.255.255.0
object network DEV-PAT-ADDRESS
host 192.168.42.254
access-list DEV-SITE-L2LVPN remark Encryption Domain for DEV site L2LVPN
access-list DEV-SITE-L2LVPN permit ip object HOSTING-SITES object DEV-SITE
access-list DEV-SITE-L2LVPN permit ip object MAIN-SITE object DEV-SITE
access-list HOSTING-VIRGINIA-L2LVPN remark Encryption Domain for HOSTING VIRGINIA site L2LVPN
access-list HOSTING-VIRGINIA-L2LVPN permit ip object MAIN-SITE object HOSTING-VIRGINIA
access-list HOSTING-CHICAGO-L2LVPN remark Encryption Domain for HOSTING CHICAGO site L2LVPN
access-list HOSTING-CHICAGO-L2LVPN permit ip object MAIN-SITE object HOSTING-CHICAGO
access-list HOSTING-LONDON-L2LVPN remark Encryption Domain for HOSTING LONDON site L2LVPN
access-list HOSTING-LONDON-L2LVPN permit ip object MAIN-SITE object HOSTING-LONDON
no nat (Inside,Outside) source static NETWORK_OBJ_192.168.42.0_24 NETWORK_OBJ_192.168.42.0_24 destination static Filmtrack-Dev Filmtrack-Dev no-proxy-arp route-lookup
no nat (Inside,Outside) source static DM_INLINE_NETWORK_2 DM_INLINE_NETWORK_2 destination static Rackspace-ORD Rackspace-ORD no-proxy-arp route-lookup
no nat (Inside,Outside) source static DM_INLINE_NETWORK_1 DM_INLINE_NETWORK_1 destination static Filmtrack-Dev Filmtrack-Dev no-proxy-arp route-lookup
no nat (Inside,Outside) source static NETWORK_OBJ_192.168.42.0_24 NETWORK_OBJ_192.168.42.0_24 destination static Amazon-Virginia Amazon-Virginia no-proxy-arp route-lookup
no nat (Inside,Outside) source static DM_INLINE_NETWORK_3 DM_INLINE_NETWORK_3 destination static Amazon-Virginia Amazon-Virginia no-proxy-arp route-lookup
no nat (Inside,Outside) source static DM_INLINE_NETWORK_4 DM_INLINE_NETWORK_4 destination static Rackspace-LON Rackspace-LON no-proxy-arp route-lookup
no nat (Outside,Outside) source static Filmtrack-Dev Filmtrack-Dev destination static Rackspace-ORD Rackspace-ORD no-proxy-arp
no nat (Outside,Outside) source static Rackspace-ORD Rackspace-ORD destination static Filmtrack-Dev Filmtrack-Dev no-proxy-arp route-lookup
no crypto map Outside_map 1 match address Outside_cryptomap
no crypto map Outside_map 2 match address Outside_cryptomap_1
no crypto map Outside_map 3 match address Outside_cryptomap_2
no crypto map Outside_map 4 match address Outside_cryptomap_3
crypto map Outside_map 1 match address DEV-SITE-L2LVPN
crypto map Outside_map 2 match address HOSTING-CHICAGO-L2LVPN
crypto map Outside_map 3 match address HOSTING-VIRGINIA-L2LVPN
crypto map Outside_map 4 match address HOSTING-LONDON-L2LVPN
nat (Inside,Outside) 1 source static MAIN-SITE MAIN-SITE destination static DEV-SITE DEV-SITE
nat (Outside,Outside) 2 source dynamic DEV-SITE DEV-SITE-PAT destination static HOSTING-CHICAGO HOSTING-CHICAGO
nat (Outside,Outside) 3 source dynamic DEV-SITE DEV-SITE-PAT destination static HOSTING-VIRGINIA HOSTING-VIRGINIA
nat (Outside,Outside) 4 source dynamic DEV-SITE DEV-SITE-PAT destination static HOSTING-LONDON HOSTING-LONDON
The main diffence in the above configurations for MAIN SITE are how we do NAT and how we configure the new L2L VPN ACLs.
The MAIN SITE to DEV SITE ACL and NAT is quite straight forward. As you can manage both sites you naturally have NAT0 configured and both networks can connect with eachother through the L2LVPN.
All of the HOSTING SITES only have the MAIN SITE address space as source in the L2L VPN to avoid the need for changes on the HOSTING SITES VPN devices. The NAT configurations for the DEV to HOSTING SITES is done so that we NAT any source address from DEV SITE to the IP address under DEV-SITE-PAT. Since this IP address is part of the MAIN SITE subnet it matches also the current MAIN SITE to HOSTING SITES L2L VPN connections and therefore connectivity should be fine.
Naturally the Dynamic PAT that we perform from DEV SITE to HOSTING SITES means that only DEV SITE can open connections to HOSTING SITES and not the other way around. To be able to connect from HOSTING SITES to DEV SITE would mean that we would configure Static NAT for the DEV SITE IP addresses to some MAIN SITE IP address towards the HOSTING SITE L2L VPN connections.
The above contains quite a bit of configurations and text. I hope you are able to make out what I aiming with my example configurations. My main worry (as mentioned before) is the fact that you should make sure that you have CLI access to both MAIN SITE and DEV SITE ASA so you are in no way reliant on any VPN connection to manage each ASA during these changes. So if you are at MAIN SITE LAN when doing changes then make sure that you can log onto the DEV SITE ASA using the external public IP of the DEV SITE ASA. You should allow the SSH connections from the MAIN SITE public IP address of the ASA. This way remote management of DEV SITE ASA should stay unchanged.
Since it seems you have not yet used SSH on the DEV SITE you would need these configurations possibly
ssh version 2
ssh timeout 30
ssh 255.255.255.255 Outside
ssh 255.255.255.255 Outside
crypto key generate rsa modulus 1024
With I mean a public IP address from where you can initiate management connections to manage the ASA.
You could also consider doing the same with the "http" commands you already have so you can atleast temporarily use ASDM from the external network also.
Hope I made any sense
Let me know what the situation is and if you can try the changes out
- Jouni -
Anywhere Access (Windows Server 2012 R2 Essentials)
I am need some help. I have a Windows Server 2012 R2 Essentials server at my house. Currently I am trying to setup Anywhere Access, but I have issues. First, the router that I got from my ISP doesn't have UPnP, so I have to do port forwarding.
1. Which ports need to be opened? Ive tried opening ports 80, 443, 1723, and I still get any error when setting up UPnP (done this several times).
Is there anything that I have missed that I don't know about? Needing a fresh pair of eyes. Are there any other ports that I need to open and forward them to my server? Would i have to doing anything on the advanced firewall settings on the server?
Thank you,
David MarksYou can just open 80 and 443, no need for 1723.
When running the Anywhere Access wizard, tell it to skip the router setup.
Robert Pearman SBS MVP
itauthority.co.uk |
Title(Required)
Facebook |
Twitter |
Linked in |
Google+
Maybe you are looking for
-
Satellite A100-049: CDs and DVDs don't read after standby
I have a new satellite A100-049 that came with vista home premium pre-installed. After returning to the computer from sleep/standby (Whatever the mode is when the light pulses yellow) no discs can be read in the drive. The disc will spin continually
-
I don't have IT education background,can I start SAP as career
I don't have IT education background,can I start SAP as career
-
How to browse through System drives in ABAP
Hello Experts, I want to search the system drives for pdf files...Could you please help me with tyhe approach or with the code?? Actually i want to save a file as .PDF so i want that user will have the facility to browse through his/her hard drives
-
Firefox 4 hangs at loading so I can't see the toolbar to fix it. I just downloaded it.
Firefox 4 hangs BEFORE getting the toolbar and I can't get in to change settings such as system restore settings and the other solutions you have in the help section. ALSO, your help section only shows 3.6 and earlier solutions which really bugs me.
-
Difference between Foreign Currency or Multi Currency
Hello, can someone tell me the difference between using a Foreign Currency in a BP, and using the Multi-Currency option? Does this affect also de Copy Exchange Rate From Base Document option? Thank you.