I've made some progress
I've made some progress...
ereg_replace('([. ])cat([, ])', '\1mouse\2', $string);
the two [ ] contain either a dot or comma and a space
1: "a cat box" gives "a mouse box" - OK
2: "a cat, box" -> "a cat, box" - STILL NOT RIGHT
3: "a x.cat box" -> "a x.mouse box" - OK
4...
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...
for part one of your question make a windows batch file and call it something like sql.bat
in the put in the full mysql login command.
Mine has this in it
cd c:\mysql\bin
mysql -u me -pmypassword
make sure the dir where the batch file lives in in your path and you can then simple type sql...
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...
Thanks Tim, found an entry and updating the Manifest solved the problem.
Manifest-Version: 1.0
Class-Path: javamail/mail.jar jaf/jaf-1.0.2/activation.jar
Created-By: NetBeans IDE
Specified-By: JT.jarContent
Main-Class: mPOS.mpos
No to do some stress testing :)
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...
it's a difficult one. The toggle buttons form a login page on a POS system, a user selects their ID before proceeding, after the sale the login is displayed again and obviously it's better if all the buttons are deselected.
I suppose I could replace them with normal jButtons and impletment the...
ah yes, you're right there.
Well, I've implemented a bodge to get round the problem. I've created an extra button in the group and set it's size to 0 so it can't be seen. By setting this hidden button as selected it effectivly clears the rest.
A horrible solution but it gets round the problem...
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.
I've got a JPanel that implements the Prinatble interface, it's used to display an invoice. I wanted to know if it's possible to send an email that will contain the 'image' of the jPanel.
As far as I understand the JavaMail API you cannot simply set a Printable as the content of an email and I...
the solutions were as follows:
The grey background. Although the jpanel has its background set to white, the contentpane was still grey so
getContentPane().setBackground(Color.white);
solved the problem
Fram printing over the jpanel:
This was because my extended jPanel had a method...
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...
sorry sedj, I looked at both forums but couldn't decide which one this falls under. (I'll repost it in the correct place now).
What is the destinction between the two?
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.