I'm trying to use egrep_replace to scan a series of string and replace certain words in certain contexts. However, regex isn't my strong point and I can't get it to work.
If my the word I want to replace is 'cat' with 'mouse' but preserving some of the surrounding characters if they are...
I have a db with the following tables:
Products
Products_to_categories
Categories
Accessories
I am trying to make a query which will list all the products in a specific cateory and for each product list the model number of each accessory and the importance_level.
The table setups are as...
I have an application that uses the Graphics2D API and draws out an invoice. This is then printed on the local printer.
When I run the application from within NetBeans the invoice prints full scale. When I execute the application from the command line the invoice prints out at 2/3 scale!
I've...
I've just about finished coding my application and want to deploy it in a JAR file.
The app using the javamail API which is supplied in a JAR file of it's own. At the moment I'm running my app from within the NetBeans IDE and I have the javaMail and Validation class JAR's mounted in the...
I have a button group containing several toggle buttons.
How do I unselect a button? I've tried togglebutton.setSelected(false) and togglebutton.doClick() but the button remains selected.
Ok, solved the original problem but now have a new one thats totally got me.
The story so far: A jFrame containing two jPanels. Panel one has a button labeled 'print'. Panel two has a nice picture of a square and a circle.
When the print button is pressed the printer springs to life and out...
I've written a simple test script, It has a jFrame containing two jPanels, one with control buttons and the other with some graphics. I cannot work out how to print the jPanel containing my graphical content. The best I have achieved so far is to print a grey square the same size as the jPanel...
I have a jPanel (that contains amoungst other things a jScrollPane and JTable). I'm trying to get input from a barcode reader to display in the table.
Since this GUI will run on a touch screen I don't want to have to forch the use to set the focus on the table or any sort of textfield. I just...
I have a jPanel (that contains amoungst other things a jScrollPane and JTable). I'm trying to get input from a barcode reader to display in the table.
Since this GUI will run on a touch screen I don't want to have to forch the use to set the focus on the table or any sort of textfield. I just...
If I have a remotly hosted database and I'm using either the ODBC or JConnectors to access it, how secure are those connections? Can I setup a SSL link? How would I do that?
i'm using:
public void makeConnection (String url, String userName, String passWord) throws DbException{
if...
If I have my PHP script running on one machine and the database hosted on a remote machine so the communication has to travel the web, how secure is the connection? Is there a way of encrypting it at all?
Hi,
My site is exclusivly coded in PHP but I have one perl script I'd like top be able to call.
What is the best way of calling this perl script from within my PHP script?
Thanks in advance.
I'm trying to set the printService for a printerJob but keep getting a null pointer excpetion and I can see what the error is...
Here is the constuctor which does the setup...
public DocumentRenderer() {
pFormat = new PageFormat();
//pJob = PrinterJob.getPrinterJob();
PrintService...
How can this code be modified so that it prints the document without displaying the user dialog? i.e. for an automated print.
/* Copyright 2002
Kei G. Gauthier
Suite 301
77 Winsor Street
Ludlow, MA 01056
*/
import java.awt.Graphics;
import java.awt.Graphics2D;
import...
Hi,
how do I go about printing ascii text to a network printer (and a local printer)?
I know this is going to involve an API, but I've not had much luch working out how to start this.
Can anyone give me some example code to get me started?
Thanks in advance.
I'm trying to write a script to validate VAT numbers by making use of the EU VAT validation web site (http://europa.eu.int/comm/taxation_customs/vies/en/vieshome.htm). Is it possible to get a php script to fill in the form and then read the response to test whether a VAT number is valid or not?
I have a table with three fields - stockLevel, backOorder and allocated (there are other fields but these are the inportant ones here).
Is it possible to create a SQL update query that will deduct a qty from the stockLevel if there is sufficient stock and if not deduct as much as possible and...
I've got a db with 3 tables - products, products_description and accessories.
The accessories table contains 2 columns:
main_product_id
acc_product_id
If a product has accessories these can be found by performing a right join on the accessories table:
select
p.products_id...
Is it possible to move the cursor back one position when using println in a simple console window? The idea is to replace text as the program progresses - like the old doc install xx% done...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.