Recording in a small room need help
Hi Everyone.
I am new to the art of audio but have worked with video for a few years.
I recently filmed an interview. It was in a small room and the Audio has a touch of echo on it. Basically it just sounds like it was recorded in a small room which it was.
Having said that. If for future reference. If I'm in a situation like that again. In a small room and a bit of an echo what can I do to dampen that?
Also. Are there any effects or any filters that Soundtrack can put on this audio to help it sound better?
Thanks to all in advance. Any help is appreciated. I know there is not substitute for good original audio- just wondering what my options are.
-Fraky
hey there Fraky,
try this cheap audio trick--
take 2-3 boom stands & a couple of moving blankets, set the stands as "T" w/ height set above speakers' head & drape blankets over them, depending on your location in room you can set them in a "V" or splayed "U" in front of or behind mic head or interviewee. you can "dress" them w/ a neutral color fabric... beige, light blue, light grey, or white to bounce light if needed.
good luck.
Similar Messages
-
Small business needing help with additional license for CC for 3 months
(I was prompted to ask a question as a first time user of the forum but it seems to have disappeared which is a little frustrating. So here I go again, hope this time it works...)
I'm a small business with a single user license for Creative Cloud which I've been subscribing to for about a year now. I have a foreign student coming to do training and get experience with us for 3 months - as his area of learning is Adobe design he will need access to Adobe CC.
I can't afford to buy a year's subscription for him but I was wondering if it would be possible to buy a 3 month's student license for Adobe CC. He starts on the 3rd of March so this is quite urgent...
I couldn't find a contact number to talk to a sales person in Ireland so I hope some one can help me before the 3rd of March.
Thanks,
Niamh
(Adobe user since 1999)No pre-paid cards in Ireland it seems. And my only option for month-to-month is to create a new Adobe ID and get Adobe Apps at €25/app/month. I'd love to up-grade to the Team subscription but it seems I can't get out of my one-year subscription in time to take advantage of the offer that goes out of date by the end of Feb. My renewal happens in June which means if I cancelled I'd have to pay 50% of the remaining months on top of paying for the new team sub... Why is it so hard to just get my student covered for 3 months - Adobe doesn't like small businesses, I guess we're not worth the hassle... Frustrating.
-
Big JPGs vs small TIFFs, need help!
Hi all,
I am quite new in JAI and started working on a project dealing with large tiff images (about 100-120mb). Most basic operations are viewing, scrolling, panning.
I use simple JAI.create("fileload",...) operator to load planar image, and than paint it on the panel (is this correct approach for my problem, should I use tile computations?) for scrolling and panning I use JAI affinetransform class, up to 100mb files results are acceptable but any suggestions for improvements are welcome!
So, my problem is following, I observed that jpg files scroll and pan much smoother than tiffs, I compared 2mb tiff with 10mb jpg and the latter is superior?! I thought that there was some problem with my program and tried the same thing with Rodriguez ("Building Imaging Applications with JAVA Technology") sources, same happens there (even when he uses tiling).
What is the problem? is it something inside JAI or I am doing something wrong? Why large jpg should scroll/pan smoother than much smaller tiff?
Thanks you!
P.S. Is there any good book about JAI, I am not quite happy with above mentioned one, and the Sun JAI book is already quite old.Hi all,
I am quite new in JAI and started working on a project dealing with large tiff images (about 100-120mb). Most basic operations are viewing, scrolling, panning.
I use simple JAI.create("fileload",...) operator to load planar image, and than paint it on the panel (is this correct approach for my problem, should I use tile computations?) for scrolling and panning I use JAI affinetransform class, up to 100mb files results are acceptable but any suggestions for improvements are welcome!
So, my problem is following, I observed that jpg files scroll and pan much smoother than tiffs, I compared 2mb tiff with 10mb jpg and the latter is superior?! I thought that there was some problem with my program and tried the same thing with Rodriguez ("Building Imaging Applications with JAVA Technology") sources, same happens there (even when he uses tiling).
What is the problem? is it something inside JAI or I am doing something wrong? Why large jpg should scroll/pan smoother than much smaller tiff?
Thanks you!
P.S. Is there any good book about JAI, I am not quite happy with above mentioned one, and the Sun JAI book is already quite old. -
Need Help Recording From a PC to Final Cut Pro
Ok First forgive me for my inexperience I'm a Audio Engineer trying to help out my company, because our Video Director left. I work for a Video Game Development company and we always have to record in game video for commercials and this is really becoming a pain to me. The game plays on the PC and I have to record it in small HD segments using a program called fraps because none of the 2 Gig or larger AVI files I record can be opened on the Macs, so I have to go through this crazy conversion process to actually get them to the company that makes our TV commercials. I was Wondering if any of you knew if there was a Box that would let me play the game on the PC and then connect that output to the Mac and Record it in HD directly in Final Cut Pro, and then send that Final Cut Pro Project to the Commercial company. Like using the DVI output of the PC's Video card to a box then output to firewire on the Mac or something like this? Again sorry for my lack of experience and the long post just need some help
ThanksShort answer yes. Longer one is you'll have to look around to find a solution that works for you. There are converters/scalers that will go DVI to video (HDMI) but then you need a capture card for the FCP system. One possible way is two Intensity cards from Blackmagic Design. Put one in each computer and connect them.
TonyTony -
NEED HELP TO SET UP SMALL NETWORK - WIRELESS SIGNAL FROM NOVATEL U760 USB
Hello -
I need help setting up a small network in my new home in Florida, which has no wired broadband capability - not cable, not dsl. My options are satellite (which I'd like to avoid) or wireless broadband via Millenicom (or now Virgin Mobile) using their Novatel U760 USB stick.
Here are the network components - someone please tell me how to set this up:
PC #1 (has wireless card, but I've connected it by ethernet to the router)
PC #2 (no wireless card; connected via ethernet to router)
MACBOOK, 1 1/2 years old (2.1 GHz Intel Core 2 Duo, 4 gigs RAM), running OS 10.58, connected wirelessly to router.
AIRPORT EXTREME BASE STATION, Model A1143.
I'm not thrilled about using a wireless 3G signal as my primary one, (sprint network, claims 600 - 1400 kbps speed), but it costs 1/2 to 1/3 of what a slightly faster satellite signal would.
I have not ordered this service yet. Before I do, I'd like a clear understanding that I can, in fact, set up my simple network, which I'd probably do the same as it's now configured with cable broadband - both PC's plug via
ethernet into the Airport Extreme router, the MacBook connects wirelessly - AND,
my question is this:
Can I plug the wireless card - a Novatel U760 USB-stick device - straight into that USB slot in the Airport Extreme base station and will it automatically recognize that device?
Or, do I have to plug it into the MacBook and somehow share that wireless signal between the 2 PC's (only 1 of which has a wireless card, so I'd have to get a card for PC #2)?
And help anyone can provide will be much appreciated!
Thanks,
Emfrom the Airport FAQ #14:
"Question: Can I connect my Soundsticks or other USB speakers to AirPort Express?
Answer: No. The USB port is for connecting a printer, not for other devices."
Im assuming other devices include USB modems.
So, I would say your cheaper route would be to get a second wireless card and just share your internet connection from one of your PC. -
Need help. I am running a 27 in imac with 16 gigs of ram. Photoshop runs really fast, except when opening files. It takes 5-10 minutes to open even a small file of 1 meg. I cleaned and validated all the fonts and removed all questionable fonts. Reset preferences and still have problem. Slow to open and in force quit "Photoshop not responding" At this point should I uninstall and start over.
What are the performance Preferences?
-
Need Help With File Matching Records
I need help with my file matching program.
Here is how it suppose to work: FileMatch class should contain methods to read oldmast.txt and trans.txt. When a match occurs (i.e., records with the same account number appear in both the master file and the transaction file), add the dollar amount in the transaction record to the current balance in the master record, and write the "newmast.txt" record. (Assume that purchases are indicated by positive amounts in the transaction file and payments by negative amounts.)
When there is a master record for a particular account, but no corresponding transaction record, merely write the master record to "newmast.txt". When there is a transaction record, but no corresponding master record, print to a log file the message "Unmatched transaction record for account number ..." (fill in the account number from the transaction record). The log file should be a text file named "log.txt".
Here is my following program code:
// Exercise 14.8: CreateTextFile.java
// creates a text file
import java.io.FileNotFoundException;
import java.lang.SecurityException;
import java.util.Formatter;
import java.util.FormatterClosedException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import org.egan.AccountRecord;
import org.egan.TransactionRecord;
public class CreateTextFile
private Formatter output1; // object used to output text to file
private Formatter output2; // object used to output text to file
// enable user to open file
public void openTransFile()
try
output1 = new Formatter("trans.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openTransFile
// enable user to open file
public void openOldMastFile()
try
output2 = new Formatter("oldmast.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openOldMastFile
// add transaction records to file
public void addTransactionRecords()
// object to be written to file
TransactionRecord record1 = new TransactionRecord();
Scanner input1 = new Scanner(System.in);
System.out.printf("%s\n%s\n%s\n%s\n\n",
"To terminate input, type the end-of-file indicator",
"when you are prompted to enter input.",
"On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
"On Windows type <ctrl> z then press Enter");
System.out.printf("%s\n%s",
"Enter account number (> 0) and amount.","? ");
while (input1.hasNext()) // loop until end-of-file indicator
try // output values to file
// retrieve data to be output
record1.setAccount(input1.nextInt()); // read account number
record1.setAmount(input1.nextDouble()); // read amount
if (record1.getAccount() > 0)
// write new record
output1.format("%d %.2f\n", record1.getAccount(), record1.getAmount());
} // end if
else
System.out.println("Account number must be greater than 0.");
} // end else
} // end try
catch (FormatterClosedException formatterClosedException)
System.err.println("Error writing to file.");
return;
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input1.nextLine(); // discard input so user can try again
} // end catch
System.out.printf("%s %s\n%s", "Enter account number (> 0) ",
"and amount.","? ");
} // end while
} // end method addTransactionRecords
// add account records to file
public void addAccountRecords()
// object to be written to file
AccountRecord record2 = new AccountRecord();
Scanner input2 = new Scanner(System.in);
System.out.printf("%s\n%s\n%s\n%s\n\n",
"To terminate input, type the end-of-file indicator",
"when you are prompted to enter input.",
"On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
"On Windows type <ctrl> z then press Enter");
System.out.printf("%s\n%s",
"Enter account number (> 0), first name, last name and balance.","? ");
while (input2.hasNext()) // loop until end-of-file indicator
try // output values to file
// retrieve data to be output
record2.setAccount(input2.nextInt()); // read account number
record2.setFirstName(input2.next()); // read first name
record2.setLastName(input2.next()); // read last name
record2.setBalance(input2.nextDouble()); // read balance
if (record2.getAccount() > 0)
// write new record
output2.format("%d %s %s %.2f\n", record2.getAccount(), record2.getFirstName(),
record2.getLastName(), record2.getBalance());
} // end if
else
System.out.println("Account number must be greater than 0.");
} // end else
} // end try
catch (FormatterClosedException formatterClosedException)
System.err.println("Error writing to file.");
return;
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input2.nextLine(); // discard input so user can try again
} // end catch
System.out.printf("%s %s\n%s", "Enter account number (> 0),",
"first name, last name and balance.","? ");
} // end while
} // end method addAccountRecords
// close file
public void closeTransFile()
if (output1 != null)
output1.close();
} // end method closeTransFile
// close file
public void closeOldMastFile()
if (output2 != null)
output2.close();
} // end method closeOldMastFile
} // end class CreateTextFile--------------------------------------------------------------------------------------------------
// Exercise 14.8: CreateTextFileTest.java
// Testing class CreateTextFile
public class CreateTextFileTest
// main method begins program execution
public static void main( String args[] )
CreateTextFile application = new CreateTextFile();
application.openTransFile();
application.addTransactionRecords();
application.closeTransFile();
application.openOldMastFile();
application.addAccountRecords();
application.closeOldMastFile();
} // end main
} // end class CreateTextFileTest-------------------------------------------------------------------------------------------------
// Exercise 14.8: TransactionRecord.java
// A class that represents on record of information
package org.egan; // packaged for reuse
public class TransactionRecord
private int account;
private double amount;
// no-argument constructor calls other constructor with default values
public TransactionRecord()
this(0,0.0); // call two-argument constructor
} // end no-argument AccountRecord constructor
// initialize a record
public TransactionRecord(int acct, double amt)
setAccount(acct);
setAmount(amt);
} // end two-argument TransactionRecord constructor
// set account number
public void setAccount(int acct)
account = acct;
} // end method setAccount
// get account number
public int getAccount()
return account;
} // end method getAccount
// set amount
public void setAmount(double amt)
amount = amt;
} // end method setAmount
// get amount
public double getAmount()
return amount;
} // end method getAmount
} // end class TransactionRecord -------------------------------------------------------------------------------------------------
// Exercise 14.8: AccountRecord.java
// A class that represents on record of information
package org.egan; // packaged for reuse
import org.egan.TransactionRecord;
public class AccountRecord
private int account;
private String firstName;
private String lastName;
private double balance;
// no-argument constructor calls other constructor with default values
public AccountRecord()
this(0,"","",0.0); // call four-argument constructor
} // end no-argument AccountRecord constructor
// initialize a record
public AccountRecord(int acct, String first, String last, double bal)
setAccount(acct);
setFirstName(first);
setLastName(last);
setBalance(bal);
} // end four-argument AccountRecord constructor
// set account number
public void setAccount(int acct)
account = acct;
} // end method setAccount
// get account number
public int getAccount()
return account;
} // end method getAccount
// set first name
public void setFirstName(String first)
firstName = first;
} // end method setFirstName
// get first name
public String getFirstName()
return firstName;
} // end method getFirstName
// set last name
public void setLastName(String last)
lastName = last;
} // end method setLastName
// get last name
public String getLastName()
return lastName;
} // end method getLastName
// set balance
public void setBalance(double bal)
balance = bal;
} // end method setBalance
// get balance
public double getBalance()
return balance;
} // end method getBalance
// combine balance and amount
public void combine(TransactionRecord record)
balance = (getBalance() + record.getAmount());
} // end method combine
} // end class AccountRecord -------------------------------------------------------------------------------------------------
// Exercise 14.8: FileMatch.java
import java.io.File;
import java.io.FileNotFoundException;
import java.lang.IllegalStateException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.Formatter;
import java.util.FormatterClosedException;
import org.egan.AccountRecord;
import org.egan.TransactionRecord;
public class FileMatch
private Scanner inTransaction;
private Scanner inOldMaster;
private Formatter outNewMaster;
private Formatter theLog;
// enable user to open file
public void openTransFile()
try
inTransaction = new Scanner(new File("trans.txt"));
} // end try
catch (FileNotFoundException fileNotFoundException)
System.err.println("Error opening file.");
System.exit(1);
} // end catch
} // end method openTransFile
// enable user to open file
public void openOldMastFile()
try
inOldMaster = new Scanner(new File("oldmast.txt"));
} // end try
catch (FileNotFoundException fileNotFoundException)
System.err.println("Error opening file.");
System.exit(1);
} // end catch
} // end method openOldMastFile
// enable user to open file
public void openNewMastFile()
try
outNewMaster = new Formatter("newmast.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openNewMastFile
// enable user to open file
public void openLogFile()
try
theLog = new Formatter("log.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openLogFile
// update records
public void updateRecords()
TransactionRecord transaction = new TransactionRecord();
AccountRecord account = new AccountRecord();
try // read records from file using Scanner object
System.out.println("Start file matching.");
while (inTransaction.hasNext() && inOldMaster.hasNext())
transaction.setAccount(inTransaction.nextInt()); // read account number
transaction.setAmount(inTransaction.nextDouble()); // read amount
account.setAccount(inOldMaster.nextInt()); // read account number
account.setFirstName(inOldMaster.next()); // read first name
account.setLastName(inOldMaster.next()); // read last name
account.setBalance(inOldMaster.nextDouble()); // read balance
if (transaction.getAccount() == account.getAccount())
while (inTransaction.hasNext() && transaction.getAccount() == account.getAccount())
account.combine(transaction);
outNewMaster.format("%d %s %s %.2f\n",
account.getAccount(), account.getFirstName(), account.getLastName(),
account.getBalance());
transaction.setAccount(inTransaction.nextInt()); // read account number
transaction.setAmount(inTransaction.nextDouble()); // read amount
else if (transaction.getAccount() != account.getAccount())
outNewMaster.format("%d %s %s %.2f\n",
account.getAccount(), account.getFirstName(), account.getLastName(),
account.getBalance());
theLog.format("%s%d","Unmatched transaction record for account number ",transaction.getAccount());
} // end while
System.out.println("Finish file matching.");
} // end try
catch (NoSuchElementException elementException)
System.err.println("File improperly formed.");
inTransaction.close();
inOldMaster.close();
System.exit(1);
} // end catch
catch (IllegalStateException stateException)
System.err.println("Error reading from file.");
System.exit(1);
} // end catch
} // end method updateRecords
// close file and terminate application
public void closeTransFile()
if (inTransaction != null)
inTransaction.close();
} // end method closeTransFile
// close file and terminate application
public void closeOldMastFile()
if (inOldMaster != null)
inOldMaster.close();
} // end method closeOldMastFile
// close file
public void closeNewMastFile()
if (outNewMaster != null)
outNewMaster.close();
} // end method closeNewMastFile
// close file
public void closeLogFile()
if (theLog != null)
theLog.close();
} // end method closeLogFile
} // end class FileMatch-------------------------------------------------------------------------------------------------
// Exercise 14.8: FileMatchTest.java
// Testing class FileMatch
public class FileMatchTest
// main method begins program execution
public static void main( String args[] )
FileMatch application = new FileMatch();
application.openTransFile();
application.openOldMastFile();
application.openNewMastFile();
application.openLogFile();
application.updateRecords();
application.closeLogFile();
application.closeNewMastFile();
application.closeOldMastFile();
application.closeTransFile();
} // end main
} // end class FileMatchTest-------------------------------------------------------------------------------------------------
Sample data for master file:
Master file
Account Number Name Balance
100 Alan Jones 348.17
300 Mary Smith 27.19
500 Sam Sharp 0.00
700 Suzy Green -14.22Sample data for transaction file:
Transaction file Transaction
Account Number Amount
100 27.14
300 62.11
300 83.89
400 100.56
700 80.78
700 1.53
900 82.17 -------------------------------------------------------------------------------------------------
My FileMatch class program above has bugs in it.
The correct results for the newmast.txt:
100 Alan Jones 375.31
300 Mary Smith 173.19
500 Sam Sharp 0.00
700 Suzy Green 68.09The correct results for the log.txt:
Unmatched transaction record for account number 400Unmatched transaction record for account number 900------------------------------------------------------------------------------------------------
My results for the newmast.txt:
100 Alan Jones 375.31
300 Mary Smith 111.08
500 Sam Sharp 0.00
700 Suzy Green -12.69My results for the log.txt
Unmatched transaction record for account number 700-------------------------------------------------------------------------------------------------
I am not sure what is wrong with my code above to make my results different from the correct results.
Much help is appreciated. Please help.From the output, it looks like one problem is just formatting -- apparently you're including a newline in log entries and not using tabs for the newmast output file.
As to why the numbers are off -- just from glancing over it, it appears that the problem is when you add multiple transaction values. Since account.combine() is so simple, I suspect that you're either adding creating transaction objects incorrectly or not creating them when you should be.
Create test input data that isolates a single case of this (e.g., just the Mary Smith case), and then running your program in a debugger or adding debugging code to the add/combine method, so you can see what's happening in detail.
Also I'd recommend reconsidering your design. It's a red flag if a class has a name with "Create" in it. Classes represent bundles of independant state and transformations on that state, not things to do. -
Need Help with DVD recorder (HDMI) to record off DVR
I purchased a philips dvd recorder a few years ago and need help in setting up to record my DVR program recordings. The philips user manual is not very helpful being I'm trying to set-up with just using HDMI cables. I have a HDTV (Vizio) with a HDMI port; a DVD recorder with HDMI port and my Verizon set-top box have a HDMI port. How do i get it all to work and be able to record/copy programs from DVR to my DVD recorder? Do anyone have suggestions on how to set up wiring. Thanks.
Solved!
Go to Solution.First keep in mind that DVD is not an HD format, so you will not be able to record HD shows in HD; they will be in letterboxed 4:3.
The FiOS STB only has one HDMI (out) port. Therefore, you will need to use some other output from the STB to the DVD recorder. Component, or even composite/RCA, because it's not going to record in HD anyway to DVD, will work just fine. Then you want to set your DVD player to whatever input you used to connect from the STB; i.e. mine uses "Input 1" for my composite connection.
If you turn on your STB and DVD, this will record whatever the STB is outputting to a DVD if you press record on the DVD recorder. This includes all of the program menus and any other on-screen graphics on the STB, and this means you cannot change the channel if you are recording from your STB. You can shut your TV off, but you will not be able to watch another show while recording one to DVD.
Your DVD player might give you an HDCP message at first when the recording starts if it's getting an HD input, but that should go away after a few seconds, at least for my Panasonic DVD recorder with a composite connection. -
Need Help in Inserting first ever record
I need help in inserting my first ever record from an OAF page.
I've created an AM 'MasterAM', added 'MasterVO' to it. Created a Page CreatePG which has a submit button, id = Apply
Below is processRequest of CreateCo
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (!pageContext.isFormSubmission()) {
am.invokeMethod("createRecord", null);
and below is processFormRequest
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Apply") != null)
OAViewObject vo = (OAViewObject)am.findViewObject("MasterVO1");
am.invokeMethod("apply");
pageContext.forwardImmediately("OA.jsp?page=/abcd/oracle/apps/per/selfservice/xxdemo/webui/CreatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
Below are 'createRecord' and 'apply' in MasterAMImpl
public void createRecord(){
OAViewObject vo = (OAViewObject)getMasterVO1();
if (!vo.isPreparedForExecution()) {
vo.executeQuery();
Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
public void apply() {
getTransaction().commit();
When I run the page, it opens and I try to enter some data and press Apply. it does not insert into the table.
Could anyone help me out.
My jdeveloper version is 10.1.3.3.0.3I am facing the same issue.
rows get inserted into the tbale, but only whol columns have the data.
all the attributes are correctly mapped to view instance and view attribute.
My VO has 1 EO and , i have joined another table to get desctriptions of the field.
could that be the problem ?
ex :
select item , desc
from t , master
where t.cola=master.colb
table t is the custom table I want the data to go in. but only who columns appear after commiting.
any clues ? -
Need help with a small application
Hi all, I please need help with a small application that I need to do for a homework assignment.
Here is what I need to do:
"Write an application that creates a frame with one button.
Every time the button is clicked, the button must be changed
to a random color."
I already coded a part of the application, but I don't know what to do further.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ColourButton extends JFrame {
JButton button = new JButton("Change Colour");
public ColourButton() {
super ("Colour Button");
setSize(250, 150);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
panel.add(button);
add(panel);
setVisible(true);
public static void main(String[] args) {
ColourButton cb = new ColourButton();
}The thing is I'm not sure what Event Listener I have to implement and use as well as how to get the button to change to a random color everytime the button is clicked.
Can anyone please help me with this.
Thanks.The listener:
Read this: [http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]
The random color:
[Google this|http://www.google.com/search?q=color+random+java] -
I need help to transfer CS4 from a dead G5 to a new Macbook Pro. Can't find my program discs but purchased CS4 in 2008 and have record of it.
Sounds like you got it installed and activated. Don't forget your updates.
Adobe - Photoshop : For Macintosh
Gene -
Need help on case statements to validate records
Hi Experts ,
My table :
seq_num
col2
col3
col4
1
A
12345
P
2
B
1
123%23
3
C
1
23AB
4
D
1
20131001
5
E
1
6
A
13245
Q
7
B
1
12345
8
C
2
1234*AB
9
D
5
20140112
10
E
1
00020
my output
seq_num
col2
col3
col4
Status
Reason
1
A
12345
P
Valid
2
B
1
123%23
invalid
Special Character for col4
3
C
1
23AB
Valid
4
D
1
20131001
Valid
5
E
1
invalid
null for col4
6
A
13245
Q
invalid
Invalid character col4 || invalid number for col3
7
B
1
12345
Valid
8
C
2
1234*AB
Invalid
Special Character col4 ||invalid col3
9
D
5
20140112
invalid
Future dates col4 ||invalid col3
10
E
1
00020
Valid
Sql :
with t as
( select 1 as seq_num,'A' as col2 ,12345 as col3 ,'P' as col4 from dual
union all
select 2 ,'B',1,'123%23' from dual
union all
select 3,'C',1,'23AB' from dual
union all
select 4,'D',1,'21-02-2013' from dual
union all
select 5,'E',1,null from dual
union all
select 6,'A,13245,'Q' from dual
union all
select 7,'B',1,12345 from dual
union all
select 8,'C',2,'1234*AB' from dual
union all
select 9,'D',5,'25-01-2014' from dual
union all
select 10,'E',1,20 from dual
I am applying rules on col3 and col4 for each records row-wise.
I need case statements to populate status and reason columns after applying below rules
Rules
Col3 :
For A record ,it should be 12345 always .
For B,C,D,E , record should be always 1
col4
For A record , it should be either P or R
No null values for all A, B,C,D,E records
for B record , it dont contain special charecters
for C RECORD , it dont contain special charecters
for D record ,it should not contain future dates (dates are in yyyymmdd format and less than sysdates are valid )
I have other columns as well ,as i not included here
.It would be great if you Could help on case statements
Thanks and Regards,
SumanthI've adjusted Gregs nice example a bit. This should work:
with w_base as (
select seq_num, col2, col3, col4,
case when (col2 = 'A' AND col3 = 12345 )
OR (col2 in ('B','C','D','E') AND col3 = 1)
then '' else '||invalid col3' end ||
case when (col2 = 'A' AND col4 not IN ( 'P', 'R' ) )
then '||invalid col4' else '' end ||
case when (col2 IN ( 'B', 'C' ) AND col4 != translate(col4, 'a!@#$%^*()','a') )
then '||special character for col4' else '' end ||
case when (col2 = 'D' AND col4 >= to_char(sysdate,'yyyymmdd') )
then '||future dates col4' else '' end
reason
from ( select 1 as seq_num, 'A' as col2, 12345 as col3, 'P' as col4 from dual union all
select 2, 'B', 1, '123%23' from dual union all
select 3, 'C', 1, '23AB' from dual union all
select 4, 'D', 1, '20130212' from dual union all
select 5, 'E', 1, null from dual union all
select 6, 'A', 13245, 'Q' from dual union all
select 7, 'B', 1, '12345' from dual union all
select 8, 'C', 2, '1234*AB' from dual union all
select 9, 'D', 5, '20140125' from dual union all
select 10, 'E', 1, '20' from dual )
Select seq_num, col2, col3, col4,
case when reason is null then 'Valid' else 'Invalid' end status,
substr(reason, 3 ) reason
from w_base
It returns
SEQ_NUM
COL2
COL3
COL4
STATUS
REASON
1
A
12345
P
Valid
2
B
1
123%23
Invalid
special character for col4
3
C
1
23AB
Valid
4
D
1
20130212
Valid
5
E
1
Valid
6
A
13245
Q
Invalid
invalid col3||invalid col4
7
B
1
12345
Valid
8
C
2
1234*AB
Invalid
invalid col3||special character for col4
9
D
5
20140125
Invalid
invalid col3||future dates col4
10
E
1
20
Valid
edited some bugs :) now it should be fine! really -
Need help to fit the records of a table into a particular region
Hi All,
Need help in getting the records of table to be fitted into a particular region provided for it. But in my case as the records increases the textbox below are moving down accordingly into next page that i dont want.
As shown in the below image i have to fit 22 no. of records in that given area only not disturbing the below textbox alignments.
Thank in advance...
Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****Hello,
In SSRS, Report items within a report can be
kept together on a single page implicitly or explicitly by setting the keep with group or keep together properties.
In your case, you can try to specify the "KeepTogether" property to True on the Table properties windows.
If there are other report items under or above the Table and you want keep all items on the single page, you can try to add a Rectangle and put all items into the Rectangle.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
I have an error -5000 when I try to record in GarageBand V10,02..I urgen need help, I have an error -5000 when I try to record in GarageBand..
I just reinstal OSX 10,9,2 marveiks and downdload the GB.. but when I try to record, the error ocurr
I urgen need help
thanksThis is probably one of the files that is required by the template you are using.
These files are inside the iWeb app. Control click the iWeb app icon and select "Show package contents".
You need to dig down through the folders and files to find what you want...
Contents/Resources/da.lproj/Templates/
If the file is missing you would need to re install the iWeb app...
http://www.iwebformusicians.com/iWeb/iWeb-Tips.html -
Need help writing small program!
Hi. I'm learning Java programming, and I need help writing a small program. Please someone help me.
Directions:
Create a program called CerealCompare using an if-then-else structure that obtains the price and number of ounces in a box for two boxes of cereal. The program should then output which box costs less per ounce.class CerealCompare {
public static void main(String[] args) {
// your code goes here
}Hope that helps.
P.S. Java does not have an if-then-else statement.
Maybe you are looking for
-
How many VMs can be build using below configuration
Hi, I have ESXi 4.0 cluster with 6 ESX box.Each box has 8 CPU with 2.66GHZ speed (Total ESX cluster CPU resources is 127 GHZ (48 Processor) and memory is 328 GB. I have deoploy to VMs with configuration 4GB RAM,2VCPU. Can anyone please let me know ho
-
Im selling my factory unlocked iPhone, but how do i delete everything on it
Hi there, Im getting the new 3Gs tomorrow, and im selling my factory unlocked iphone, but i was wondering how do i go about deleting everything on it, without deleting my itunes stuff, so when i sell it, its like a brand new phone, free memory etc...
-
Oracle HRMS 11.5.10.2 Custom Alert on Leave
Hi there I have to create a Custom Alert in Oracle HRMS on Specefic Leaves. What Step need to be followed? """******Process Detai****l"""""" • Oracle Custom Alert should be created. Which will fire each time when the leave APPROVED in OTL by the auth
-
Hi Since propagation tool doesnt propagate some of the security data (like global roles etc for more details http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/prodOps/propToolAdvanced.html#wp1054464 ). We would like to use the import/export op
-
Cannot view certificate protected PDF file on Windows Phone device
I have a certificate protected PDF file that I need to view on my Windows Phone 8.1 device. I can install the certificate on it without any problem, but when trying to open the file with the official latest version of Adobe Reader app, it says someth