Help needed for Time Calc Java Script
Hi,
I am trying to create a timesheet in PDF and have hit a speed bump. Is there anyone there who could provide me with a script that calculated the difference between 2 times? (Field2 time)-(Feild 1 Time) = Duration.I am desperate and have tried everything.
I proccess the payroll for a company and all of the 500 or so timesheets that I received each fortnight are paper copies and I am pulling my hair out. I need to use Adobe forms (We have Adobe Pro 9 and I am using the XML forms, not live cycle) as the serach engine that we use for emails cannot search on excel documents.
I have no Java script experience and I am getting completely lost in the subject. Any help would be greatly appreciated.
Thanks anyone who can help at all.
-Sohnia
hi friend here example for time calulation start and end time example..<br />just copy and paste then run it ur browser.<br /><br /><HTML><br /><script language="JavaScript"><br /><!--<br /><br />var h1 = 1;<br />var h2 = 2;<br />var days = 0;<br />var m1 = 1;<br />var m2 = 2;<br />var am1 = 1;<br />var am2 = 2;<br />function findtime(h1,h2,days,m1,m2,am1,am2)<br />{<br />var answer = "why";<br />var mdiff = 1;<br />var hdiff = 2;<br />pdays = parseInt(days);<br />ph1 = parseInt(h1);<br />ph2 = parseInt(h2);<br />pm1 = parseInt(m1);<br />pm2 = parseInt(m2);<br />if(am1 == 2 & ph1 < 12) ph1 = ph1 + 12;<br />if(am2 == 2 & ph2 < 12) ph2 = ph2 + 12;<br />if(am1 == 1 & ph1 == 12) ph1 = 24;<br />if(am2 == 1 & ph2 == 12) ph2 = 24;<br />if(am1 == 2 & am2 == 1 & ph2 < 24) ph2 = ph2 + 24;<br />if(am1 == am2 & ph1 > ph2) ph2 = ph2 + 24;<br />if(pm2 < pm1){<br />pm2 = pm2 + 60;<br />ph2 = ph2 - 1;<br />}<br />mdiff = pm2 - pm1;<br />hdiff = (ph2 - ph1) + (pdays * 24);<br />if(hdiff == 0) answer = mdiff + ' minutes';<br />else if(hdiff == 1) answer = '1 hour and ' + mdiff + ' minutes'<br />else answer = hdiff + ' hours and ' + mdiff + ' minutes'<br />return answer<br />}<br /><br />//--><br /></script><br /></HEAD><br /><br /><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><br /><BODY BGCOLOR=FFFFFF TEXT=000000 LINK=0000FF VLINK=800080><br /><br /><div align="center"><table width="950" border="0" cellpadding="0" bgcolor="#899194" cellspacing="0"><br /><br /> <br /><tr><td valign="middle" width="33%"><br /><br /><center><br /><form><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR=#FFFFFF><br /><!--ROW 1--><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR="#B6D4D2"><br /><!--ROW 1--><br /><td colspan=4><br /><center>Time Between Times Calculations - Multiple Days</center><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Required Data Entry<br /></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><br /><td align="center">Start time</td><br /><td align="center"><input type="text" name="hour1" size="5"></td><br /><td align="center"><input type="text" name="minute1" size="5"></td><br /><td align="center"><select name="period1"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><tr><br /><td colspan="3"> Add Complete Interim Days</td><td align="center"><input type="text" name="adays" size="5" value="0"></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><td align="center">End time</td><br /><td align="center"><input type="text" name="hour2" size="5"></td><br /><td align="center"><input type="text" name="minute2" size="5"></td><br /><td align="center"><select name="period2"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan=4 BGCOLOR="#B6D4D2"><br /><input type="button" value="Calculate" <br />onclick="h1=form.hour1.value;<br />h2=form.hour2.value;<br />m1=form.minute1.value;<br />m2=form.minute2.value;<br />days=form.adays.value;<br />am1=form.period1.options[period1.selectedIndex].value;<br />am2=form.period2.options[period2.selectedIndex].value;<br />if(h1 < 0 | h1 > 12) alert('Your start hour is not valid');<br />else if(h2 < 0 | h2 > 12) alert('Your end hour is not valid');<br />else if(m1 < 0 | m1 > 59) alert('Your start minute is not valid');<br />else if(m2 < 0 | m2 > 59) alert('Your end minute is not valid');<br />else form.answer.value=findtime(h1,h2,days,m1,m2,am1,am2);"><br /> <br /><input type="reset" value="Clear Values"><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Calculated Results<br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan="4"><br />Time Difference <input type="text" name="answer" size="40"><br /><tr><td>[email protected]</td></tr><br /></td><br /></tr><br /></table><br /></form><br /></td><br /></tr><br /></table><br /><br /></center><br /></td><br /></tr><br /></table><br /></center><br /><br /></TD><br /></TR><br /></TABLE><br /></BODY> <br /></HTML>
Similar Messages
-
HELP NEED FOR INVOKING THE JAVA CODE INSIDE JSP
Hello,
any one knows how to Write a java code inside the .jsp files... please if any one knows it please ....help me .....hi .
Use scriptlets , for example :
<html>
<%
int x;
for(x=1;x<=5;x++)
out.println(x);
%>
</html> -
Re: Help needed for easy Math & Java problems
The logic in pseudo code :
IF length <= 1
Price = Base price;//Base price = 8 in your case;
ELSE IF length <= 10
Price = Base price + (Extra Meter Price * (length - 1));
ELSE IF length <= 20
Price = (Base price + (Extra Meter Price * (length - 1))) * Discount1
ELSE
Price = (Base price + (Extra Meter Price * (length - 1))) * Discount2
RETURN Price.
Code it in Java then.
Do not use magic numbers.The logic in pseudo code :
IF length <= 1
Price = Base price;//Base price = 8 in your case;
ELSE IF length <= 10
Price = Base price + (Extra Meter Price * (length - 1));
ELSE IF length <= 20
Price = (Base price + (Extra Meter Price * (length - 1))) * Discount1
ELSE
Price = (Base price + (Extra Meter Price * (length - 1))) * Discount2
RETURN Price.
Code it in Java then.
Do not use magic numbers. -
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say. -
Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with re
Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with reddish cast and loss of detail
System: Windows 7
Adobe CS5
Printer: Epson Stylus Photo 1400
Paper: Inkjet matte presentation paper with slight luster
Installed latest patch for Adobe CS5
Epson driver up to date
After reading solutions online and trying them for my settings for 2 days I am still unable to print what I am seeing on my screen in Adobe CS5. I calibrated my monitor, but am not sure once calibration is saved if I somehow use this setting in Photoshop’s color management.
The files I am printing are photographs of dogs with lots of detail I digitally painted with my Wacom tablet in Photoshop CS5 and then printed with Epson Stylus 1400 on inkjet paper 20lb with slight luster.
My Printed images lose a lot of the detail & come out way to dark with a reddish cast and loss of detail when I used these settings in the printing window:
Color Handling: Photoshop manages color, Color management -ICM, OFF no color adjustment.
When I change to these settings in printer window: Color Handling: Printer manages color. Color management- Color Controls, 1.8 Gamma and choose Epson Standard it prints lighter, but with reddish cast and very little detail and this is the best setting I have used so far.
Based on what I have read on line, I think the issue is mainly to do with what controls are set in the Photoshop Color Settings window and the Epson Printer preferences. I have screen images attached of these windows and would appreciate knowing what you recommend I enter for each choice.
Also I am confused as to what ICM color management system to use with this printer and CS5:
What is the best ICM to use with PS CS5 & the Epson 1400 printer? Should I use the same ICM for both?
Do I embed the ICM I choose into the new files I create?
Do I view all files in the CS5 workspace in this default ICM?
Do I set my monitor setting to the same ICM?
If new file opens in CS5 workspace and it has a different embedded profile than my workspace, do I convert it?
Do I set my printer, Monitor and PS CS5 color settings to the same ICM?
Is using the same ICM for all devices what is called a consistent workflow?
I appreciate any and all advice that can be sent my way on this complicated issue. Thank you in advance for your time and kind help.It may be possible to figure out by watching a Dr.Brown video on the subject of color printing. Adobe tv
I hope this may help............... -
File missing (file\BCD error code 0Xc0000034 help need for work!
file missing (file\BCD error code 0Xc0000034 help need for work! what can i do?
have an p 2000 notebook pcHi bobkunkle, welcome to the HP Forums. I understand you cannot boot passed the error you are receiving.
What is the model or product number of your notebook? What version of Windows is installed?
Guide to finding your product number
Which Windows operating system am I running?
TwoPointOh
I work on behalf of HP
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 bottom to say “Thanks” for helping! -
What type of modem do i need for time capsule. I can't get it to pick up the net
what type of modem do i need for time capsule. I can't get it to pick up the net
Simply bridge the TC..
With DSL you need to either bridge the modem and use PPPoE client which can be difficult to setup.. especially as some modems do not bridge readily..
Or bridge the TC which is simple.. go to the airport utility and select internet page, on v5 utility or network page on v6 utility and select off-bridged mode for the mode of connection. -
Help need for force to signout All session ! how...
hi
help need for force to signout All session ! how ??
Solved!
Go to Solution.Hi and welcome to the Skype Community,
To force a signout of all instances your Skype is signed into please change your password: https://support.skype.com/en/faq/FA95/how-do-i-change-my-password
Follow the latest Skype Community News
↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓ -
Help for compiling first Java script
Friends,
I am a begginer java programmer. Iam trying to compile a java script using .bat file which contains
c:\j2sdk\bin\javac -classpath <c:\j2sdk\lib\dt.jar> . ReadOnlyMaker.java
But it comes back with error as below
>c:\j2sdk\bin\javac -classpath ReadOnlyMaker.java 0<c:\j2sdk\lib\dt.jar 1>.
Access is denied.
I have admin rights on this machine but the directory j2sdk , where java is installed, is always staying readonly even after changing permissions in properties tab.
Not sure what is going wrong , Any one can Pl. help ?
Thanks,First of all you don't need to be in the ..\..\bin directory to execute the javac.exe, java.exe, etc pgms as commands. If not already set up correctly, you can just add this to your System PATH.
Next, start by executing from the directory your .java PGM is in.
Then, what is that <...> stuff?
Lastly, if it's a .java file, it's a pgm file and not a javascript. Javascript goes is only for web work, embedded in html.
~Bill -
Books & Tools: Help needed for Begining Java....
Hi,
I am a Computer science Graduate & working. I am new to Java but not Programming. I have some knowledge on OOPS concepts, .Net, Java, C# & web development.
I need Help To pick the Best Book/Books that can make me comfortable in programming Java & Understanding whole Java concept.
I followed many books but found they are not following the Right approach.
I would appreciate if someone can suggest me a Complete Book/Books, which you think have helped.
Thanks.This is the starter set:
Sun's basic Java tutorial
Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
http://javaalmanac.com . A couple dozen code examples that supplement The Java Developers Almanac.
jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
Bruce Eckel's Thinking in Java (Available online.)
Joshua Bloch's Effective Java
Bert Bates and Kathy Sierra's Head First Java.
James Gosling's The Java Programming Language. Gosling is
the creator of Java. It doesn't get much more authoritative than this. -
KeyListener Help Needed for Tetris Game!
* Tetris - Java Enhacned
* By: Kunnel Zachariah, Johnathan Smith, Johnathan Adkins
import javax.swing.JFrame;
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.Timer;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.KeyListener;
import java.awt.event.KeyEvent;
import static java.lang.Character.*;
import java.awt.*;
import java.awt.image.*;
import java.applet.*;
import java.lang.Math;
import java.lang.System;
import java.awt.event.*;
import javax.swing.*;
import java.util.Random;
import java.awt.event.KeyAdapter;
public class TetrisMain extends JFrame implements KeyListener
int s;
int p;
int xPos;
int yPos;
int level = 1;
int lines = 0;
int score = 0;
int switchPiece;
private boolean[] keys;
private int SLEEP = 50; //bigger # = slower animation
private Timer timer;
int bologna = 11;
int posX[], posY[];
Color color;
boolean isSquare = false;
public TetrisMain()
setSize(550,710);
setBackground(Color.black);
setVisible(true);
getContentPane();
public static void main( String args[] )
TetrisMain pongLab = new TetrisMain();
public void paint (Graphics g)
s=0;
keys = new boolean[4];
this.addKeyListener(this);
g.setColor(Color.blue);
g.fillRect(0,0,550,710);
g.setColor(Color.black);
g.fillRect(0,0,460,600);
g.setColor(Color.blue);
g.setColor (Color.black);
g.setFont(new Font("Helvetica",Font.BOLD,14));
g.drawString ("Level: " + level, 485, 40);
g.drawString ("Lines: " + lines, 485, 80);
g.drawString ("Score: " + score, 485, 120);
ActionListener paintCaller = new ActionListener(){
public void actionPerformed(ActionEvent event)
repaint(); //recalls paint every SLEEP milliseconds
timer = new Timer(SLEEP, paintCaller);
timer.start();
while (bologna <= 30)
if ( keys[0] == true )
//move left paddle up and draw it on the window
s+=3;
if ( keys[1] == true )
//move left paddle down and draw it on the window
p+=3;
if ( keys[2] == true )
s-=3;
if ( keys[3] == true )
p-=3;
displayRandomPiece(g);
bologna++;
public void drawGridVertical(Graphics g)
for(xPos = 0; xPos <=460; xPos+=23)
for(yPos=0; yPos <=600; yPos+=23)
g.drawLine(xPos,yPos,xPos,yPos);
public void drawBlock(Graphics g)
ImageIcon animatedIcon1 = new ImageIcon("untitled.gif");
for(p =0; p <=530; p+=2)
animatedIcon1.paintIcon(this,g,s,p);
delay(100000);
public void drawTpiece(Graphics g)
ImageIcon animatedIcon = new ImageIcon("tpiece.gif");
for(p =0; p <=530; p+=2)
animatedIcon.paintIcon(this,g,s,p);
delay(100000);
public void drawZigZagpiece(Graphics g)
ImageIcon animatedIcon2 = new ImageIcon("zigzagpiece.gif");
for(p =0; p <=530; p+=2)
animatedIcon2.paintIcon(this,g,s,p);
delay(100000);
public void Rectanglepiece(Graphics g)
ImageIcon animatedIcon3 = new ImageIcon("rectangle.gif");
for(p =0; p <=530; p+=2)
animatedIcon3.paintIcon(this,g,s,p);
delay(100000);
public void Unknownpiece(Graphics g)
ImageIcon animatedIcon4 = new ImageIcon("unknownpiece.gif");
for(p =0; p <=530; p+=2)
animatedIcon4.paintIcon(this,g,s,p);
delay(100000);
public void otherZigZagpiece(Graphics g)
ImageIcon animatedIcon5 = new ImageIcon("otherzigzagpiece.gif");
for(p =0; p <=530; p+=2)
animatedIcon5.paintIcon(this,g,s,p);
delay(100000);
public void otherUnknownpiece(Graphics g)
ImageIcon animatedIcon6 = new ImageIcon("otherunknownpiece.gif");
for(p =0; p <=530; p+=2)
animatedIcon6.paintIcon(this,g,s,p);
delay(100000);
public static void delay(double n)
for (double x = 0; x <= n; x += .01);
public boolean keyPressed(Event e, int key)
if (key == Event.LEFT)
s=-1;
else if (key == Event.RIGHT)
s+=1;
else if (key == Event.UP)
p-=1;
else if (key == Event.DOWN)
// fast=true;
else if (key == Event.ESCAPE)
// ingame=false;
return true;
public void keyPressed(KeyEvent e)
System.out.println("keypressed");
switch(toUpperCase(e.getKeyChar()))
case 'W' : keys[0]=true;System.out.println("W keypressed"); break;
case 'Z' : keys[1]=true; System.out.println("z keypressed");break;
case 'I' : keys[2]=true; System.out.println("i keypressed");break;
case 'M' : keys[3]=true; System.out.println("m keypressed");break;
public void keyReleased(KeyEvent e)
System.out.println("released");
switch(toUpperCase(e.getKeyChar()))
case 'W' : keys[0]=true; System.out.println("W realeased");break;
case 'Z' : keys[1]=true; System.out.println("Z realeased");break;
case 'I' : keys[2]=true; System.out.println("i realeased");break;
case 'M' : keys[3]=true; System.out.println("m realeased");break;
public void keyTyped(KeyEvent e)
//no code needed here
public void displayRandomPiece(Graphics g)
Random rand = new Random();
int c = rand.nextInt((7)+1);
switch(c)
case 1:
drawBlock(g);
break;
case 2:
drawTpiece(g);
break;
case 3:
drawZigZagpiece(g);
break;
case 4:
Rectanglepiece(g);
break;
case 5:
Unknownpiece(g);
break;
case 6:
otherZigZagpiece(g);
break;
case 7:
otherUnknownpiece(g);
break;
}This is my code so far for Tetris. I am having issues with my keylisteners! I keep pressing the specified keys and the println statements wont show up or the piece wont move! i really need major help. can anyone give me some advice
Much Thanks,
Chris!http://forum.java.sun.com/thread.jspa?threadID=5175447
Don't double post! No help for you! -
Query help needed for querybuilder to use with lcm cli
Hi,
I had set up several queries to run with the lcm cli in order to back up personal folders, inboxes, etc. to lcmbiar files to use as backups. I have seen a few posts that are similar, but I have a specific question/concern.
I just recently had to reference one of these back ups only to find it was incomplete. Does the query used by the lcm cli also only pull the first 1000 rows? Is there a way to change this limit somwhere?
Also, since when importing this lcmbiar file for something 'generic' like 'all personal folders', pulls in WAY too much stuff, is there a better way to limit this? I am open to suggestions, but it would almost be better if I could create individual lcmbiar output files on a per user basis. This way, when/if I need to restore someone's personal folder contents, for example, I could find them by username and import just that lcmbiar file, as opposed to all 3000 of our users. I am not quite sure how to accomplish this...
Currently, with my limited windows scripting knowledge, I have set up a bat script to run each morning, that creates a 'runtime' properties file from a template, such that the lcmbiar file gets named uniquely for that day and its content. Then I call the lcm_cli using the proper command. The query within the properties file is currently very straightforward - select * from CI_INFOOBJECTS WHERE SI_ANCESTOR = 18.
To do what I want to do...
1) I'd first need a current list of usernames in a text file, that could be read (?) in and parsed to single out each user (remember we are talking about 3000) - not sure the best way to get this.
2) Then instead of just updating the the lcmbiar file name with a unique name as I do currently, I would also update the query (which would be different altogether): SELECT * from CI_INFOOBJECTS where SI_OWNER = '<username>' AND SI_ANCESTOR = 18.
In theory, that would grab everything owned by that user in their personal folder - right? and write it to its own lcmbiar file to a location I specify.
I just think chunking something like this is more effective and BO has no built in back up capability that already does this. We are on BO 4.0 SP7 right now, move to 4.1 SP4 over the summer.
Any thoughts on this would be much appreciated.
thanks,
MissyJust wanted to pass along that SAP Support pointed me to KBA 1969259 which had some good example queries in it (they were helping me with a concern I had over the lcmbiar file output, not with query design). I was able to tweak one of the sample queries in this KBA to give me more of what I was after...
SELECT TOP 10000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE (DESCENDENTS ("si_name='Folder Hierarchy'","si_name='<username>'"))
This exports inboxes, personal folders, categories, and roles, which is more than I was after, but still necessary to back up.. so in a way, it is actually better because I have one lcmbiar file per user - contains all their 'personal' objects.
So between narrowing down my set of users to only those who actually have saved things to their personal folder and now having a query that actually returns what I expect it to return, along with the help below for a job to clean up these excessive amounts of promotion jobs I am now creating... I am all set!
Hopefully this can help someone else too!
Thanks,
missy -
Help needed for using BASIC authentication through JDBCRealm
Help needed.
Hello,
I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
Thank you very much.You can set this up for your context using META-INF/context.xml instead of working with server.xml.
Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myApp" reloadable="true">
<Realm
className="org.apache.catalina.realm.JDBCRealm"
driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
connectionName="username" connectionPassword="password"
digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
userRoleTable="user_roles" roleNameCol="rolename"
/>
</Context>Hope this helps.
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
---------------------------------------------------------------- -
Hi,
I am currently using "Visible bounds" (java script)to add 1 inch to the width and to the Length of my Art board, but when i make a clipping mask it actually reads the hidden content from the Clipping mask and makes conforms my art board to that particular shape. Am using Adobe illustrator cs6 Here is My Code:
var myDocs = app.documents;
var i = 0;
for (i = myDocs.length-1 ; i >= 0; i--)
var doc = myDocs[i];
app.activeDocument= doc;
var myVisibleBounds = doc.visibleBounds; //Rect, which is an array;
myVisibleBounds[0] -= 36;
myVisibleBounds[1] += 36;
myVisibleBounds[2] += 36;
myVisibleBounds[3] -= 36;
doc.artboards[0].artboardRect = myVisibleBounds;
All i Want is to add 1 inch to my width and length and this does it but if i have a clipping mask it will pick up the bounding box i guess? and it will conform it to the shape... any help please... Try my code and you will see that it does add 1 inch but now make you artboard lest say 12" x 12" and make a shape bigger than the art board and you will see how it adds 1 inch to the art board based on that shape... now if you make a clipping mask to fit that shape in the 12" x 12" art board you will still get 1 inch bigger than the shape thats being clipped ...yes, visible bounds is reading the non-visible masked objects too.
you're going to have to do it the hard way, loop through all your objects to get your bounds manually, and while you're at it, test for clipping masks and use the masking path instead. -
Please help, 3D animation play button Java Script
The U3D file embedded into the PDF contains 3 procedure animations
I would like to add a play button for each procedure.
But I do not see the Animation Objects in the model tree of the pdf and I do not know how to connect to these animations
with JavaScript.
I have tried with no luck:
var _anim = scene.animations.getByIndex(0);
scene.activateAnimation(_anim);
_anim.currentTime = 0;
runtime.play();
Please show me how this is done with Java Script on a button.
Thank youIf you're controlling the 3D animation from a button on the PDF page you need to talk to the correct API.
The easiest way to do it is to embed a function into the 3D annotation (using a .js text file) then call that function from your button.
e.g. in the 3D script, use this:
function playAnimation(i) {
var _anim = scene.animations.getByIndex(i);
scene.activateAnimation(_anim);
_anim.currentTime = 0;
runtime.play();
Then on your button, use this:
getAnnots3D(pageNum)[0].context3D.playAnimation(0);
then the same for (1) and (2) on your other buttons.
Maybe you are looking for
-
I have CC for work and my PC to do work at home. At home I switched from PC to Mac this weekend. I want to redownload my apps for the iMac but it's telling my I'm using a 30 day free trial. I need to discontinue the PC apps and download to the new co
-
Can I mix PowerPC & Intel on my external hard drive?
I have a PowerPC iMac G4 using Tiger, and a MacBook Pro Intel using Snow Leopard. I have a single large external drive. I want to partition the drive so that I can back up from both computers on the drive. I would like to use SuperDuper to clone thos
-
Problem with CFStringCreateWithBytes on iOS5
I have a strange problem with CFStringCreateWithBytes when migrating my app to iOS5. When I build my application with iOS4.3, I can get the return string normally from this following code. CFStringRef encodedData = CFStringCreateWithBytes(kCFAllocato
-
Using %DIM_SET% in default logic
I have the following logic: *SELECT(%TIMESTART%,"CURRENT_PERIOD","SCENARIO","ID='%SCENARIO_SET%'") *SELECT(%TIMEROLLING%,"ID","TIME","ID in(select top 6 ID from mbrtime where timeid>=(Select timeid from mbrTime where id='%TIMESTART%') order by timeid
-
Why won't my bookmarks side menu automatically pop up when I start firefox
Most times when I start Firefox the Bookmarks side menu does not automatically pop up, and I must start it almost every time.