General purpose class (Need some Help)
I have a situation where Id like to have getText() and setText() methods in various components, some of which dont define the method, ie JComboBox, JRadioButton ect.....
Now I know I could subclass the components Id like to add this functionality to but Im trying to make my code as easy to use as possible an really would hat to do this in this case...
Id much rather have a single class which could handle each component through constructors; This too though has some issues which Im not sure I want to deal with. (if youd like more info on my issues with this technique just request) ..
The problem stems from the various ways with wich text would be extracted from the component, JComboBox, getSelected()
JRadioButton
You could define an interface that has these methods. Then you create subclasses that implement this interface for the components JLabel, JRadioButton etc. This way you can refer to every component in the same way; eg. you can have an array of them and call getText() on each of them independent of what components they realy are. Instantiating can be made easier with reflection: you canhave a new class that has a static method that takes the class name and the constructor's parameter list as parametetrs and returns a new obect. A bit like JComponent comp = (JComponent) Class.forName("javax.swing.JLabel").newInstance();
Another possibility is writing a new class that extends JComponent and has a JComponent as a member. In the constructor you define the underlaying component's actual class and then act accordingly in the get/set methods. Like having a general wrapper for any JComponent.
Similar Messages
-
Complete Java n00b...need some help
I'm very new to Java and I need some help writing a basic program.
I need to write a program that lets the user add up an infinite amount of floating point numbers. The program should compute the sum of all the numbers entered thus far. So for example if the user enters 2 and 3, it should give a number of 5. If the user then enters 4, I should give me 9 etc.
I'm not really sure how to get started on writing that. I can add up two numbers but I don't know how to tell the program to keep adding additional numbers to that sum. Can someone please help me out? thanksIt's ok... it can be hard to understand even the simplest concepts with only text and no help.
There needs to be an int variable outside (before) the loop initialized to 0.
float num = 0;Next, you need to have an infinite loop that requests floats to add onto the number.
Scanner input = new Scanner(System.in);
while (true) {
float toAdd = input.nextFloat();
num += toAdd;
System.out.println("Current sum " + num);
}Putting all this together and putting it into a main method will work, but we have a bit of an issue. The program won't stop! For that reason, we need to specify a number which can exit the program. I like to use 0 for this purpose.
Scanner input = new Scanner(System.in);
while (true) {
float toAdd = input.nextFloat();
if (toAdd == 0) { //test if toAdd is 0 so the program can break;
break;
num += toAdd;
System.out.println("Current sum " + num);
}So, this code will work:
import java.util.Scanner;
class AddNumbers {
public static void main(String[] args) {
float num = 0;
Scanner input = new Scanner(System.in);
while (true) {
float toAdd = input.nextFloat();
if (toAdd == 0) { //test if toAdd is 0 so the program can break;
break;
num += toAdd;
System.out.println("Current sum: " + num);
}Edited by: Arricherekk on May 18, 2008 3:19 PM -
Please I need some help with a table
Hi All
I need some help with a table.
My table needs to hold prices that the user can update.
Also has a total of the column.
my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
I have tried using but as I need to set the toal with something like total
totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
Can any one please advise on some way I can get this to work ?
Thanks for reading
CraigHi there camickr
thanks for the help the other day
this is my full code....
package printing;
import java.awt.*;
import java.awt.event.*;
import java.awt.print.*;
import javax.swing.*;
import javax.swing.table.*;
import java.text.DecimalFormat;
public class tablePanel
extends JDialog implements Printable {
BorderLayout borderLayout1 = new BorderLayout();
private boolean printing = false;
private Dialog1 dialog;
JPanel jPanel = new JPanel();
JTable table;
JScrollPane scrollPane1 = new JScrollPane();
DefaultTableModel model;
private String[] columnNames = {
private Object[][] data;
private String selectTotal;
private double total;
public tablePanel(Dialog1 dp) {
dp = dialog;
try {
jbInit();
catch (Exception exception) {
exception.printStackTrace();
public tablePanel() {
try {
jbInit();
catch (Exception exception) {
exception.printStackTrace();
private void jbInit() throws Exception {
jPanel.setLayout(borderLayout1);
scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
this.add(jPanel);
jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
scrollPane1.getViewport().add(table);
jPanel.setOpaque(true);
newTable();
addToModel();
addRows();
setTotal();
public static void main(String[] args) {
tablePanel tablePanel = new tablePanel();
tablePanel.pack();
tablePanel.setVisible(true);
public void setTotal() {
total = 0;
int i = table.getRowCount();
for (i = 0; i < table.getRowCount(); i++) {
String name = (String) table.getValueAt(i, 1);
if (!"".equals(name)) {
if (i != table.getRowCount() - 1) {
double dt = Double.parseDouble(name);
total = total + dt;
String str = Double.toString(total);
table.setValueAt(str, table.getRowCount() - 1, 1);
super.repaint();
public void newTable() {
model = new DefaultTableModel(data, columnNames) {
table = new JTable() {
public Component prepareRenderer(TableCellRenderer renderer,
int row, int col) {
Component c = super.prepareRenderer(renderer, row, col);
if (printing) {
c.setBackground(getBackground());
else {
if (row % 2 == 1 && !isCellSelected(row, col)) {
c.setBackground(getBackground());
else {
c.setBackground(new Color(227, 239, 250));
if (isCellSelected(row, col)) {
c.setBackground(new Color(190, 220, 250));
return c;
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
if (e.getClickCount() == 1) {
if (table.getSelectedColumn() == 1) {
table.setTableHeader(null);
table.setModel(model);
scrollPane1.getViewport().add(table);
table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
public void addToModel() {
Object[] data = {
"Price", "5800"};
model.addRow(data);
public void addRows() {
int rows = 20;
for (int i = 0; i < rows; i++) {
Object[] data = {
model.addRow(data);
public void printOut() {
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintable(tablePanel.this);
pj.printDialog();
try {
pj.print();
catch (Exception PrintException) {}
public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.black);
int fontHeight = g2.getFontMetrics().getHeight();
int fontDesent = g2.getFontMetrics().getDescent();
//leave room for page number
double pageHeight = pageFormat.getImageableHeight() - fontHeight;
double pageWidth = pageFormat.getImageableWidth();
double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
double scale = 1;
if (tableWidth >= pageWidth) {
scale = pageWidth / tableWidth;
double headerHeightOnPage = 16.0;
//double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
//System.out.println("this is the hedder heigth " + headerHeightOnPage);
double tableWidthOnPage = tableWidth * scale;
double oneRowHeight = (table.getRowHeight() + table.getRowMargin()) * scale;
int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
double pageHeightForTable = oneRowHeight *numRowsOnAPage;
int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
if (pageIndex >= totalNumPages) {
return NO_SUCH_PAGE;
g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
//bottom center
g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages), (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
g2.translate(0f, headerHeightOnPage);
g2.translate(0f, -pageIndex * pageHeightForTable);
//If this piece of the table is smaller
//than the size available,
//clip to the appropriate bounds.
if (pageIndex + 1 == totalNumPages) {
int lastRowPrinted =
numRowsOnAPage * pageIndex;
int numRowsLeft =
table.getRowCount()
- lastRowPrinted;
g2.setClip(0,
(int) (pageHeightForTable * pageIndex),
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(oneRowHeight *
numRowsLeft));
//else clip to the entire area available.
else {
g2.setClip(0,
(int) (pageHeightForTable * pageIndex),
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(pageHeightForTable));
g2.scale(scale, scale);
printing = true;
try {
table.paint(g2);
finally {
printing = false;
//tableView.paint(g2);
g2.scale(1 / scale, 1 / scale);
g2.translate(0f, pageIndex * pageHeightForTable);
g2.translate(0f, -headerHeightOnPage);
g2.setClip(0, 0,
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(headerHeightOnPage));
g2.scale(scale, scale);
//table.getTableHeader().paint(g2);
//paint header at top
return Printable.PAGE_EXISTS;
class TableRenderDollar extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean isFocused,
int row, int column) {
setHorizontalAlignment(SwingConstants.RIGHT);
Component component = super.getTableCellRendererComponent(
table,
value,
isSelected,
isFocused,
row,
column);
if( value == null || value .equals("")){
( (JLabel) component).setText("");
}else{
double number = 0.0;
number = new Double(value.toString()).doubleValue();
DecimalFormat df = new DecimalFormat(",##0.00");
( (JLabel) component).setText(df.format(number));
return component;
} -
My airport problem has returned big time --Need some Help!!
Aloha once again:
I though that this was fixed by simply changing channels on my airport router, but that fix only lasted for a few days, but now it's back and even worse. Let me give you some background on this problem. Here's my original message concerning the problem:
I have my Airport Router connected to the Internet via DSLcable. I then tie my two computers into the internet via their airport cards. For about 6 months this system has been working just fine. Recently my desktop computer quit listening to the router and can no longer connect to the internet. It shows no signal strength and the name of the network on the Airport is not seen in the "connect to internet" panel. The same Airport works just fine on my LapTop and I am using it right now to get this message off to the internet.
I have fixed permissions, removed the airport card and cleaned the connector, the antenna plug and removed the system configuration folder from library preferences all to no avail!
This problem has been hounding me, intermittently, for over a year now What can I do to remedy this??? HELP!!!!
Dan Page
Maui, Hawaii
The suggestion to change channels, that came from this original request, worked but just for a very short time. Now I have to shut down my computer overnight to get connected and then it only lasts for several hours and the connection quits.
I thought maybe heat was a problem, but the last time it happened I opened the computer and played a large fan right on the card. This did not help. I shut it down for the night and it was fine the next morning for about 2 hours.
One new data point; if I turn off just the airport on my laptop computer overnight, that will fix the problem for a short time also.
Still need some help!!!
DanFirst, power off both the Time Capsule and AirPort Express.
Wait a few minutes, then power up the Time Capsule first, and let it run for a few minutes.
Temporarily, move the AirPort Express to the same room or close proximity to the AirPort Express and power it up.
If the Express powers up correctly, power it off again and move it approximately half the distance between the Time Capsule and the general area that needs more wireless coverage. Try to minimize obstructions like walls, ceiling, heavy furniture, etc as much as possible.
Please report on your results. -
Need some help with a remove function
Design and code a program that will maintain a list of product names. Use a String type to represent the product name and an array of strings to implement the list. Your program must implement the following methods:
Add a product to the list
Remove a product from the list
Display then entire list
Find out if a particular product is on the list.
You need to create a command command loop with a menu() function. The program must continue asking for input until the user stops.
This is the assignment and this is what I have so far. I need some help writing the remove function.
Thanks
* Title: SimpleSearchableList.java
* Description: this example will show a reasonably efficient and
* simple algorithm for rearranging the value in an array
* in ascending order.
public class SimpleSearchableList {
private static String[] List = new String[25]; //These variables (field variables)
private static int Size; //are common to the entire class, but unavailable
//except to the methods of the class...
public static void main(String[] args)
String Cmd;
for(;;) {
Menu();
System.out.print("Command: ");
Cmd = SimpleIO.inputString();
if(Cmd.equals("Quit"))
break;
else if(Cmd.equals("Fill"))
FillList();
else if(Cmd.equals("Search"))
SearchList();
else if(Cmd.equals("Show"))
ShowList();
else if(Cmd.equals("Remove"))
Remove();
//Tells you what you can do...
public static void Menu()
System.out.println("Choices..................................");
System.out.println("\tFill to Enter Product");
System.out.println("\tShow to Show Products");
System.out.println("\tSearch to Search for Product");
System.out.println("\tRemove a Product");
System.out.println("\tQuit");
System.out.println(".........................................");
//This method will allow the user to fill an array with values...
public static void FillList()
int Count;
System.out.println("Type Stop to Stop");
for(Count = 0 ; Count < List.length ; Count++)
System.out.print("Enter Product: ");
List[Count] = SimpleIO.inputString();
if(List[Count].equals("Stop"))
break;
Size = Count;
//This method will rearrange the values in the array so that
// go from smallest to largest (ascending) order...
public static void SearchList()
String KeyValue;
boolean NotFoundFlag;
int Z;
System.out.println("Enter Product Names Below, Stop To Quit");
while(true)
System.out.print("Enter: ");
KeyValue = SimpleIO.inputString();
if(KeyValue.equals("Stop")) //Note the use of a method for testing
break; // for equality...
NotFoundFlag = true; //We'll assume the negative
for(Z = 0 ; Z < Size ; Z++)
if(List[Z].equals(KeyValue)) {
NotFoundFlag = false; //If we fine the name, we'll reset the flag
System.out.println(List[Z] + " was found");
if(NotFoundFlag)
System.out.println(KeyValue + " was not found");
//This method will display the contents of the array...
public static void ShowList()
int Z;
for(Z = 0 ; Z < Size ; Z++)
System.out.println("Product " + (Z+1) + " = " + List[Z]);
public static void Remove()
}I need help removing a product from the arrayYes. So what's your problem?
"Doctor, I need help."
"What's wrong?"
"I need help!"
Great.
By the way, you can't remove anything from an array. You'll have to copy the remaining stuff into a new one, or maybe maintain a list of "empty" slots. Or null the slots and handle that. The first way will be the easiest though. -
Need some help with threads...
Hello all,
I am working on a project at work, and I am not the best programmer in the world. I have been trying to get my head around this for a couple of days and just cannot get it to work.
I am writing an instrumentation control program that will have three threads. One is the GUI, one will receive control information and set up the hardware, and one will check the hardware status and report it to the GUI periodically. I plan on using the invokeLater() method to communicate the status to the GUI and change the status display in the GUI. Communication from the GUI to the controller thread and from the status thread to the controller thread I had planned on being piped input/output stream as appropriate. I have a control class and a status class that need to be communicated over these piped streams. In some trial code I have been unable to wrap the piped input/output streams with object input/output streams. I really need some help with this. Here is the main thread code:
package playingwiththreads1;
import java.io.*;*
*public class PlayingWithThreads1 {*
public static void main(String[] args) {*
* PipedOutputStream outputPipe = new PipedOutputStream();*
* ObjectOutputStream oos = null;*
* ReceiverThread rt = new ReceiverThread(outputPipe);*
// Start the thread -- First try*
* Thread t = new Thread(rt);*
t.start();*
// Wrap the output pipe with an ObjectOutputStream*
try*
oos = new ObjectOutputStream(outputPipe);*
catch (IOException e)*
System.out.println(e);*
// Start the thread -- Second try*
//Thread t = new Thread(rt);*
//t.start();*
/** Send an object over the pipe. In reality this object will be a
class that contains control or status information */
try
if (!oos.equals(null))
oos.writeObject(new String ("Test"));
catch (IOException e)
try
Thread.sleep(5000);
catch (InterruptedException e)
I read somewhere that it matters where you start the thread relative to where you wrap piped streams with the object streams. So, I tried the two places I felt were obvious to start the thread. These are noted in the comments. Here is the code for the thread.
package playingwiththreads1;
import java.io.*;
public class ReceiverThread implements Runnable {
private PipedInputStream inputPipe = new PipedInputStream();
private ObjectInputStream inputObject;
ReceiverThread (PipedOutputStream outputPipe)
System.out.println("Thread initialization - start");
try
inputPipe.connect(outputPipe);
inputObject = new ObjectInputStream(inputPipe);
catch (IOException e)
System.out.println(e);
System.out.println("Thread initialization - complete");
public void run()
System.out.println("Thread started");
try
if (inputObject.available() > 0)
System.out.println(inputObject.read());
catch (IOException e)
System.out.println(e);
Through testing I have determined that no matter where I start the thread, the thread never gets past the "inputObject = new ObjectInputStream(inputPipe);" assignment.
Could someone please help me with this? There are other ways for me to write this program, but this is the one that I would like to make work.
Many thanks in advance,
Rob Hix
Edited by: RobertHix on Oct 6, 2009 3:54 AMThanks for the help, but that did not work. I tried flushing the ObjectOutputStream and it is still hanging when initializing the thread.
Here is a better look at the code since I was helped to figure out how to insert it:
The main method:
package playingwiththreads1;
import java.io.*;
public class PlayingWithThreads1 {
public static void main(String[] args) {
PipedOutputStream outputPipe = new PipedOutputStream();
ObjectOutputStream oos = null;
ReceiverThread rt = new ReceiverThread(outputPipe);
// Start the thread -- First try
//Thread t = new Thread(rt);
//t.start();
// Wrap the output pipe with an ObjectOutputStream
try
oos = new ObjectOutputStream(outputPipe);
oos.flush();
catch (IOException e)
System.out.println(e);
// Start the thread -- Second try
Thread t = new Thread(rt);
t.start();
/* Send an object over the pipe. In reality this object will be a
* class that contains control or status information */
try
if (!oos.equals(null))
oos.writeObject(new String ("Test"));
oos.flush();
catch (IOException e)
System.out.pringln(e);
try
Thread.sleep(5000);
catch (InterruptedException e)
}The thread code:
package playingwiththreads1;
import java.io.*;
public class ReceiverThread implements Runnable {
private PipedInputStream inputPipe = new PipedInputStream();
private ObjectInputStream inputObject;
ReceiverThread (PipedOutputStream outputPipe)
System.out.println("Thread initialization - start");
try
inputPipe.connect(outputPipe);
inputObject = new ObjectInputStream(inputPipe);
catch (IOException e)
System.out.println(e);
System.out.println("Thread initialization - complete");
public void run()
System.out.println("Thread started");
try
if (inputObject.available() > 0)
System.out.println(inputObject.read());
catch (IOException e)
System.out.println(e);
}Does anyone else have and ideas? -
I NEED SOME HELP WITH UPDATING MY IPOD TOUCH PLEASE
i need some help with my ipod the version is 3.1.3 and every time I'm trying to update it says it can not be restored then it says unknown error so i need some help updating my ipod to version 4.2
If you mean you're trying to update your ios go to settings/general/software update. then you should see the latest ios just tap it and it will automatically update your ipod. If you're trying to restore your ipod (as it's not quite clear in your query) try doing it through itunes instead of on the device itself
-
I need some help for an explanation. Loop for 1 minute.
int minute=1;
long currentTime=System.currentTimeMillis();
long stoppingTime = currentTime + (minute * 60 * 1000);
while (currentTime<stoppingTime) {
// do x;
currentTime=System.currentTimeMillis();
}I want to have the loop to run for 1 minute. It does not seem to work.
What did I miss? I need some help for an explanation.Ran:
class PrintTimeAsProcess {
public static void main(String[] argv) throws Exception {
int minute=1;
long currentTime=System.currentTimeMillis();
long stoppingTime = currentTime + (minute * 15 * 1000);
System.out.println("START Time: "+currentTime);
while (currentTime<stoppingTime) {
currentTime=System.currentTimeMillis();
System.out.println("END Time: "+currentTime);
}Got:
START Time: 1149278202718
END Time: 1149278217718
1149278217718
-1149278202718
15000 -
Need some Help configuring sip
Hi all ! ,
Im kind off new to sip calling and cisco telephony , but here goes ,: i have a 2821 router with CME installed
IOS : C2800NM-IPVOICEK9-M
Sofware version : 15.1(4)M4 / CME 8.6
Attached to GE0/0 is a CISCO 3750 switch
GEO - consisfts of 3 VLANS , the native
172.22.1.X
172.22.100.X VOICE
172.22.101.X DATA
my tftpserver = 172.22.1.150
i need some help configuring a sip trunk , i have 10 testing phonenumbers from vodafone , but i do not know where to start to get this working
i have tried
http://www.cisco.com/en/US/products/sw/voicesw/ps4625/products_configuration_example09186a00808f9666.shtml
but im getting stuck with what to fill in where .. is there anyone form NL whom has the same setup ? or similar ? or can give me some guidance on how to make the test callsok.. here goes
Building configuration...
Current configuration : 9721 bytes
! Last configuration change at 15:26:14 CET Thu Jan 2 2014
! NVRAM config last updated at 15:26:14 CET Thu Jan 2 2014
! NVRAM config last updated at 15:26:14 CET Thu Jan 2 2014
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname Router
boot-start-marker
boot-end-marker
no aaa new-model
clock timezone CET 1 0
network-clock-participate wic 0
network-clock-participate wic 1
network-clock-select 1 E1 0/0/0
network-clock-select 2 E1 0/0/1
dot11 syslog
ip source-route
ip cef
ip dhcp pool VOICE
network 172.22.100.0 255.255.255.0
option 150 ip 172.22.1.150
default-router 172.22.100.1
ip dhcp pool DATA
network 172.22.101.0 255.255.255.0
default-router 172.22.101.1
no ip domain lookup
no ipv6 cef
multilink bundle-name authenticated
isdn switch-type primary-net5
voice service voip
ip address trusted list
ipv4 172.22.1.50
ipv4 172.22.1.51
ipv4 172.22.100.1
ipv4 172.22.101.1
ipv4 62.140.159.225
callmonitor
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
sip
registrar server expires max 3600 min 3600
voice class codec 1
codec preference 1 g711ulaw
codec preference 2 g711alaw
codec preference 3 g729r8
codec preference 4 g729br8
voice register global
voice translation-rule 1
rule 1 /5123781291/ /601/
rule 2 /5123781290/ /600/
voice translation-rule 2
rule 1 /^112$/ /112/
voice translation-rule 3
rule 1 /^.*/ /0262610290/
voice translation-rule 4
rule 2 /600/ /5123788000/
rule 3 /601/ /5123788001/
rule 4 /^2(..)$/ /51237812\1/
voice translation-profile CUE_Voicemail/AutoAttendant
translate called 1
voice translation-profile PSTN_CallForwarding
translate redirect-target 4
translate redirect-called 4
voice translation-profile PSTN_Outgoing
translate calling 3
translate called 2
translate redirect-target 4
translate redirect-called 4
voice-card 0
crypto pki token default removal timeout 0
controller E1 0/0/0
framing NO-CRC4
pri-group timeslots 1-31
controller E1 0/0/1
framing NO-CRC4
pri-group timeslots 1-31
ip ftp username cisco
ip ftp password cisco123
ip tftp source-interface GigabitEthernet0/0.1
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
no keepalive
interface GigabitEthernet0/0.1
encapsulation dot1Q 1 native
ip address 172.22.1.51 255.255.255.0
interface GigabitEthernet0/0.20
encapsulation dot1Q 20
ip address 172.22.101.1 255.255.255.0
interface GigabitEthernet0/0.100
encapsulation dot1Q 100
ip address 172.22.100.1 255.255.255.0
interface GigabitEthernet0/1
no ip address
shutdown
duplex full
speed 100
interface Serial0/0/0:15
no ip address
encapsulation hdlc
isdn switch-type primary-net5
isdn incoming-voice voice
no cdp enable
interface Serial0/0/1:15
no ip address
encapsulation hdlc
isdn switch-type primary-net5
isdn incoming-voice voice
no cdp enable
interface BRI0/1/0
no ip address
isdn switch-type basic-net3
isdn point-to-point-setup
interface BRI0/1/1
no ip address
isdn switch-type basic-net3
isdn point-to-point-setup
ip forward-protocol nd
ip http server
ip http authentication local
no ip http secure-server
ip http max-connections 16
ip http path flash:gui
ip route 0.0.0.0 0.0.0.0 172.22.1.50
tftp-server flash:7941/apps41.8-4-1-23.sbn alias apps41.8-4-1-23.sbn
tftp-server flash:7941/cnu41.8-4-1-23.sbn alias cnu41.8-4-1-23.sbn
tftp-server flash:7941/dsp41.8-4-1-23.sbn alias dsp41.8-4-1-23.sbn
tftp-server flash:7941/jar41sccp.8-4-1-23.sbn alias jar41sccp.8-4-1-23.sbn
tftp-server flash:7941/cvm41sccp.8-4-1-23.sbn alias cvm41sccp.8-4-1-23.sbn
tftp-server flash:7941/SCCP41.8-4-2S.loads alias SCCP41.8-4-2S.loads
tftp-server flash:7941/term41.default.loads alias term41.default.loads
tftp-server debug
control-plane
voice-port 0/0/0:15
voice-port 0/1/0
voice-port 0/1/1
voice-port 0/0/1:15
voice-port 2/0/0
voice-port 2/0/1
voice-port 2/0/2
voice-port 2/0/3
voice-port 2/0/4
voice-port 2/0/5
voice-port 2/0/6
voice-port 2/0/7
voice-port 2/0/8
voice-port 2/0/9
voice-port 2/0/10
voice-port 2/0/11
voice-port 2/0/12
voice-port 2/0/13
voice-port 2/0/14
voice-port 2/0/15
voice-port 2/0/16
voice-port 2/0/17
voice-port 2/0/18
voice-port 2/0/19
voice-port 2/0/20
voice-port 2/0/21
voice-port 2/0/22
voice-port 2/0/23
mgcp profile default
dial-peer voice 1 voip
description **Incomming Call from SIP Trunk**
translation-profile incoming CUE_Voicemail/AutoAttendant
session protocol sipv2
session target ipv4:172.22.1.50
incoming called-number .%
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 2 voip
description **Outgoing Call to SIP Trunk**
translation-profile outgoing PSTN_Outgoing
destination-pattern 9........
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 3 voip
description **Outgoing Call to SIP Trunk **
translation-profile outgoing PSTN_Outgoing
destination-pattern 9[2-9]..[2-9]......
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 4 voip
description **Outgoing Call to SIP Trunk**
translation-profile outgoing PSTN_Outgoing
destination-pattern 9[0-1][2-9]..[2-9]......
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 5 voip
description **911 Outgoing Call to SIP trunk**
translation-profile outgoing PSTN_Outgoing
destination-pattern 911
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 6 voip
description **Emergency Outgoing Call to SIP Trunk**
translation-profile outgoing PSTN_Outgoing
destination-pattern 9911
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 7 voip
description **911/411 Outgoing Call to SIP Trunk**
translation-profile outgoing PSTN_Outgoing
destination-pattern 9[2-9]11
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 8 voip
description **International Outgoing Call to SIP Trunk**
translation-profile outgoing PSTN_Outgoing
destination-pattern 9011T
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 9 voip
description **Star Code to SIP Trunk**
destination-pattern *..
session protocol sipv2
session target ipv4:172.22.1.50
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad
dial-peer voice 10 voip
description **CUE Voicemail**
translation-profile outgoing PSTN_CallForwarding
destination-pattern 600
b2bua
session protocol sipv2
session target ipv4:172.22.1.155
dtmf-relay sip-notify
codec g711ulaw
no vad
dial-peer voice 11 voip
description **CUE Auto Attendant**
translation-profile outgoing PSTN_CallForwarding
destination-pattern 601
b2bua
session protocol sipv2
session target ipv4:172.22.1.155
dtmf-relay sip-notify
codec g711ulaw
no vad
sip-ua
authentication username 0262610290 password 7 15020A1F173D24362C realm 62.140.1
59.225
authentication username 0262610290 password 7 021605481811003348
no remote-party-id
retry invite 2
retry register 10
timers connect 100
registrar ipv4:62.140.159.225 expires 3600
sip-server ipv4:62.140.159.224
host-registrar
telephony-service
max-ephones 58
max-dn 192
ip source-address 172.22.100.1 port 2000
calling-number initiator
system message testing
cnf-file location TFTP tftp://172.22.1.150/
load 7960-7940 P00307020200.loads
load 7941 SCCP41.8-4-2S.loads
load 7941GE SCCP41.8-4-2S
time-format 24
dialplan-pattern 1 26261029.. extension-length 3 extension-pattern 9..
voicemail 600
max-conferences 12 gain -6
call-forward pattern 9.T
moh music-on-hold.au
web admin system name admin password password
dn-webedit
time-webedit
transfer-system full-consult
secondary-dialtone 9
directory entry 1 101 name 101
create cnf-files version-stamp 7960 Jan 02 2014 08:40:49
ephone-dn 1
number 290 secondary 0262610290
name Phone 1
hold-alert 30 originator
ephone-dn 2
number 291 secondary 0262610291
name phone 2
hold-alert 30 originator
ephone-dn 3
number 292 secondary 0262610292
name Phone 3
hold-alert 30 originator
ephone-dn 4
number 293 secondary 0262610293
name Phone 4
hold-alert 30 originator
ephone-dn 5
number 294 secondary 0262610294
label Phone 5
hold-alert 30 originator
ephone 1
mac-address 0019.E88F.3BDD
button 1:1
ephone 2
mac-address 001E.4A92.0A27
type 7961
button 1:2
ephone 3
mac-address 0012.43F5.03AF
button 1:3
ephone 4
mac-address 000F.F7AC.502A
button 1:4
ephone 5
mac-address 0019.E851.090A
button 1:5
line con 0
line aux 0
line vty 0 4
login
transport input all
scheduler allocate 20000 1000
ntp master
end -
I am currently using an ipod touch 3. When i record in voice memos with the apple earphones(with an inbuilt mic) i can see on the screen that its recording;
but when i hear it, its just a long beep. Need some help!Does the mic work for other apps like Voice Control?
Does the mic work OK in other devices?
Have you tried it with another mic?
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
- Make an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar -
Error 1603: Need some help with this one
When installing iTunes I first get an error box saying
"Error 1406: Could not write value to key \Software\classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that key, or contact your support personnel."
The second one (after I click on Ignore on the last box) I get it this one:
"Error: -1603 Fatal error during installation.
Consult Windows Installer Help (Msi.chm) or MSDN for more information"
Strange thing is that I do have full access to my computer (or atleast in all other cases I have had since I am the only one with an account on it).
I have done my best in trying to solve it myself but I'm running out of ideas. I have downloaded latest versions from the website and tried installing Quicktime separately. I have also tried removing Quicktime using add/or remove programs though I just I didn't dare to take full removal because it said something about system files.
Anyway I really need some help with this, anyone got any ideas?
Greets,
Sixten
Windows XP ProDo you know how to count backwards? Do you know how to construct a loop? Do you know what an autodecrementor is? Do you know how to use String length? Do you know Java arrays start with index 0 and run to length-1? Do you know you use length on arrays too? Do you know what System.out.println does?
Show us what you have, there isn't anything here that isn't easily done the same as it would be on paper. -
Remote App on iPad connects but drops after about 20 mins. Need to turn off wait about 1 minute, then turn on wifi on iMac before it can reconnect. Need some help please.
Already gone through troubleshooting guide a zillion times. Thanks.This worked for me... A little time consuming but once you get rolling it goes GREAT... Thanks....
I got my artwork and saved it to my Desktop
Opened up Microsoft Paint and clicked on "File" and "Open" and found it to get it on the screen to resize it
Clicked "resize" and a box for changing it opened up
Checked the box "Pixels" and "Unchecked maintain aspect ratio"
Set Horizontal for 640 and Vertical for 480
Clicked on "OK" and went back to "File" and did a "Save As" and chose JPEG Picture
It came up "File Already Existed" and clicked "OK" (really did not care about the original artwork I found because wrong size)
Went to iTunes and on the movie right clicked on "Get Info", clicked on "Details", then "Artwork"
Go to the little box on the top left that shows your old artwork and click on it to get the little blue border to appear around it and hit "Delete" to make it gone
Click on "Add Artwork" and find it where you put the one from above on your Desktop and hit "Open" and OK and your new artwork is now there and all good.
Sounds like a lot of steps to follow but after around 5 or so you will fly through it. This worked perfect on my iPhone 6 Plus and I have artwork on my Home Videos now. -
TS1702 I need some help the apps were downloading slowly
The apps downloaded but it didn't cause it's stuck in downloading mode what should I do?
The iOS 6 update didn't work.
Please I need some help.
The apps didn't download.
Talking Angela and Ginger didn't download.
Talking Santa didn't update.Try moving the existing backup file to a safe location so that iTunes has to create an entire new file. The backup file is located here. You can delete that backup once you get a successfull backup.
iTunes places the backup files in the following places:
Mac: ~/Library/Application Support/MobileSync/Backup/
Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
Note: If you do not see the AppData or Application Data folders, you may need to show hidden files (Windows XP, Windows Vista and Windows 7), or iTunes may not be installed in the default location. Show hidden files and then search the hard drive for the Backup directory. -
Need some help: my itunes won't sync with my iphone anymore. Both softwares are up to date and I've reinstalled itunes. After I reinstall, it syncs. But then when I reboot my computer, it no longer syncs anymore and I have to keep reinstalling itunes. Thoughts???
thought that it was possible to have the same iTunes library on any machine that was authorised, a kind of cloud-iTunes I guess.
That would convenient, but sadly it is not the case. Sorry!
Either way your welcome and best of luck!
B-rock -
Need some help in creating Search Help for standard screen/field
I need some help in adding a search-help to a standard screen-field.
Transaction Code - PP01,
Plan Version - Current Plan (PLVAR = '01'),
Object Type - Position ( OTYPE = 'S'),
Click on Infotype Name - Object ( Infotype 1000) and Create.
I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
I specify again, I have to add a new search help to standard screen/field and not to enhance it.
This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
It's urgent.
Thanks in advace. Suitable answers will be rewardedHi Pradeep,
Please have a look into the below site which might be useful
Enhancing a Standard Search Help
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
edc983384237
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
timepoints
The following timepoints are defined:
1. SELONE
Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
2. PRESEL1
After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
3. PRESEL
Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
4. SELECT
Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
5. DISP
Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
6. RETURN (usually as return value for the next timepoint)
The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
7. RETTOP
You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
8. EXIT (only for return as next timepoint)
The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
9. CREATE
The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
10. APP1, APP2, APP3
If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
F4IF_SHLP_EXIT_EXAMPLE
This module has been created as an example for the interface and design of Search help exits in Search help.
All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
A search help exit is called repeatedly in connection with several
events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
Hope this info will help you.
***Reward points if found useful
Regards,
Naresh
Maybe you are looking for
-
How to create a second partition on the harddisk?
Hello To All Members! I recently got some viruses on my laptop. So I had to use my recovery cd to recover my system. Now the problem is that I asked me for the partition where are the files which are being extracted. I marked it to 30GB. So, windows
-
Enterprise or Standalone CA for Windows and linux computers
Hi i plan to deploy a certificate architecture mainly for our internal web server and no more receive the certificate warning pop up So first i will install an offline Root CA Then i will setup a subordinate CA My question is about the type : standal
-
Cannot connect to the iTunes Store from my home network since I upgraded to ios 6
I own an iPad 2 and recently upgraded to ios 6. Since then, I cannot connect to the iTunes store from my home network. I can navigate any other site and access any other application. I can even reach the iTunes store through My Personal Hotspot and
-
Any reason I shouldn´t be able to use fulscreen playback with this rig?
Specs are: Model: MacBookPro5,2, BootROM MBP52.008E.B00, 2 processors, Intel Core 2 Duo, 2.93 GHz, 4 GB Graphics: kHW_NVidiaGeForce9600MGTItem, NVIDIA GeForce 9600M GT, spdisplayspciedevice, 512 MB Graphics: kHW_NVidiaGeForce9400MItem, NVIDIA GeForce
-
ITunes Won't Display (or Play) my Music
I just booted up iTunes on a brand new MacBook running Yosemite 10.10, with iTunes 12.0.0.140. When I change the "Advanced" Preferences to point to the folder on my external drive, it has no effect whatsoever - Apple iTunes does not display my playli