Writing my own methods
I'm trying to learn how to write my own methods and couldn't figure out what the problem is with the codes below.
public class methodtry {
public static int myMethod1 (int a)
a += 10;
System.out.println("*** Method1, a is : " + a);
return (a);
int b = myMethod1(3);
System.out.println(b);
}it gives identifier expected error in the last System.out.println(b); part..
Edited by: SwmeRt on Mar 26, 2009 7:27 AM
You can't have free-floating statements like System.out.println(b); just inside a class. Why not put that statement in a method:
public class MethodTry {
public static int myMethod1(int a) {
a += 10;
System.out.println("*** Method1, a is : " + a);
return a;
public static void main(String[] args) {
int b = myMethod1(3);
System.out.println(b);
}Start here: [http://java.sun.com/docs/books/tutorial/java/index.html]
Similar Messages
-
Can I add my own methods to a transformation?
I need to fill an internal table with content from a DSO before the transformation starts. Since data is loaded in parallell in several packages I have declared the table as a static (class-data). The loading and sorting of the itab takes some minutes and needs to be finnished before the transformations can begin. I thought to do the loading into a separate method setting a flag with itab is ready.
I could make a global class and call that from the start_routine method, but is it allowed/any reason not to make own methods inside lcl_transform?
Also related - Can 2nd part global be used for own local classes?Hi
In this kind of scenario you can create an instance for the class and ;ake the values to be populated in the constructor of the class
While instantiating the object just ue the following code.This can be done in the class implementation part.
If <obj name> is initial.
create object <obj name>.
ENDIF.
Prathish -
Hprof doesn't show cpu times of own methods
Hi,
I'm using hprof like this on Java 1.4.2_18: -Xrunhprof:cpu=times,file=/some/file.txt
This generates output like this:
1258 0.01% 91.01% 2899 2050 org.apache.axis.encoding.SerializationContext.startElement
1259 0.01% 91.02% 31041 1051 java.util.ArrayList.add
1260 0.01% 91.03% 31838 1349 java.lang.StringBuffer.append
1261 0.01% 91.04% 20858 3388 sun.reflect.GeneratedMethodAccessor4.invoke
1262 0.01% 91.05% 12017 3703 java.lang.System.getSecurityManager
1263 0.01% 91.06% 10964 1111 java.lang.Number.<init>
1264 0.01% 91.07% 18194 1588 org.apache.axis.encoding.TypeMappingImpl$Pair.hashCode
1265 0.01% 91.08% 31041 2353 org.apache.axis.message.SOAPHandler.<init>
1266 0.01% 91.10% 258 1886 java.lang.Throwable.printStackTrace
1267 0.01% 91.11% 9836 2613 java.lang.StringBuffer.append
1268 0.01% 91.12% 52694 3665 java.lang.Class.getName
1269 0.01% 91.13% 9475 1469 org.apache.axis.utils.NSStack.getPrefix
1270 0.01% 91.14% 22482 684 java.lang.StringBuffer.setShared
1271 0.01% 91.15% 31043 1752 java.lang.System.arraycopy
1272 0.01% 91.16% 11241 2051 org.apache.commons.logging.impl.Jdk14Logger.isDebugEnable
But none of my own methods are in there, only java.\*, sun.\*, javax.\*, org.apache.*, etc. are in it. What am I doing wrong?
Also (but this is a more optional, second question), it'd be nice if I could see them nested, i.e.:
80% my.package.MyClass.myBigMethod
20% my.package.MyClass.partOfMyBigMethod
15% my.package.MyClass.partOfPartOfMyBigMethod
5% my.package.MyClass.alsoPartOfPartOfMyBigMethod
25% my.package.MyClass.alsoPartOfMyBigMethodand so on.
Is this possible? Or should I use a different profiler for this? I'm using a headless server, so my options are rather limited, especially since because of network settings I can't really connect a remote profiler to it, like Netbeans'. It's on a GNU/Linux server, and I can't use commercial software... Any ideas?
Thanks!"Is there an alternate way to run the hardware test?"
No. The Hardware Test is on the system DVD that originally came w/your computer. You can get replacement System Install & Restore CD/DVDs from Apple's Customer Support - in the US, (800) 767-2775 - for a nominal S&H fee. You'll need to have the model and/or serial number of your Mac available.
If you're not in the US, you may need to go through the regional Apple Store that serves your location to find the contact number. Here's a list of links to all of those -
http://store.apple.com/Catalog/US/Images/intlstoreroutingpage.html -
How to deprecate my own method in java
How to deprecate my own method in java, so that my compiler gives a warning when i use a deprecated method?
Mark it as deprecated as specified in the javadoc guide, (available on this site). You deserve an RTFM but I'm feeling nice today ;->
-
Writing my own readLine() method
I am trying to write my own readLine() method. I am using the read() method from BufferedReader to read one char at a time into an array. Then when I encounter a \n chacter I convert the array to a string and return it.
The problem arrises when i reach the end of a file.
The read() method returns a -1 when the end of the file has been reached.
How can I get my readline method to read the last line and return it but also tell the user the end of the file has been reached?
Thanks.The reason I want to write my own is beacause
readLine() in BufferedReader has been deprecated.
No it isn't. Not until 1.3.1, at least.
I want to read and return lines until read() returns a
-1. But how can i still return the last line? err... with a return statement?
It may contain a string and then be the end of the file. How
can I return the string and the -1?You can't. You'll have to do it the way readLine already does or really think of something new. -
How do I go about adding my own method to the class Calendar?
I want to add a method to the class Calendar that will parse a string and set it's date and time with what it parsed from the string. I allready have the parsing code written but I want to know how I can add this to the Calendar class.
I thought I could extend the Calendar class with something like this...
public abstract class myCalendar extends Calendar{
public myCalendar() {
public int parseDaytime(String givenLine){
int flag = 1; //used to report errors
//do some parsing
return flag;
}But then in my main program I cannot use any of the Calendar methods...
myCalendar timeFromServer;
timeFromServer = timeFromServer.getInstance(); //error, it won't let me use the Calendar methods
if(timeFromServer.parseDaytime(readFromServer) == 0){
System.out.println("Error parsing time data from server.");
}Aside from my original question, I do not understand why extending Java classes is over kill. You listed the example of extending Thread as a big one. Everytime I create a worker Thread the class I create extends Threads because thats what I learned from every example I have looked at.
Okay. I should be good at writing this by now, so here goes....
You only get to inherit from a superclass once. You can implement as many interfaces as desired. As such, whenever you inherit from a class, you are limiting any other possible inheritance from another superclass. So, all things being equal, you should prefer interfaces to inheritance.
This is why java.lang.Runnable exists. There is almost never a reason to extend Thread. The normal 'is a' test is somewhat misleading in this case when determining whether to extend Thread or not. You may say, "My class is threaded, so I should extend Thread." However, while there exists an 'is a' relationship here, it is not salient. Your class undoubtedly is something else as well. The fact that it is threaded should be thought of as an aspect of feature of your class.
So, in general, you should implement Runnable and not extend Thread.
public class Foo implements Runnable {
final public void run() {
// cool asynchronous code goes here
public class FooUser {
private void someMethod() {
Thread thread = new Thread(new Foo());
thread.start();
}- Saish -
Trouble writing a blocking method when asking GUI for input
Hi,
I think this is more of a thread question than a GUI question, so that is why i posted it here...
My problem is I have a client/server application, and the client also has a GUI, which I get an input string from.
My problem is, that I don't know how to write a blocking method, which will wait for the GUI's input.
The example I provided below is very simple, and the obvious solution would be to use a JOptionPane, but that is not a viable solution. The way I am getting around this now is using a Thread.sleep call in my GUI, but I feel that this is incorrect, and there should be another way around it.
Here is my server class (w/ main method)
import java.net.*;
import java.io.*;
public class Server {
public static void main(String[] args) throws IOException {
ServerSocket serverSocket = null;
try {
serverSocket = new ServerSocket(4444);
} catch (IOException e) {
System.err.println("Could not listen on port: 4444.");
System.exit(1);
Socket clientSocket = null;
try {
clientSocket = serverSocket.accept();
} catch (IOException e) {
System.err.println("Accept failed.");
System.exit(1);
PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
String outputLine;
outputLine = "Temp String";
out.println(outputLine);
System.err.println("Client: " + in.readLine());
outputLine = "Bye";
out.println(outputLine);
out.close();
in.close();
clientSocket.close();
serverSocket.close();
}Here is my client class (w/ main method)
import java.io.*;
import java.net.*;
public class Client {
public static void main(String[] args) throws IOException {
Socket kkSocket = null;
PrintWriter out = null;
BufferedReader in = null;
try {
kkSocket = new Socket("localhost", 4444);
out = new PrintWriter(kkSocket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
} catch (UnknownHostException e) {
System.err.println("Don't know about host: localhost.");
System.exit(1);
} catch (IOException e) {
System.err.println("Couldn't get I/O for the connection to: localhost.");
System.exit(1);
ClientGUI cg = new ClientGUI();
String fromServer;
String fromUser;
while ((fromServer = in.readLine()) != null) {
System.out.println("Server: " + fromServer);
if (fromServer.equals("Bye."))
break;
fromUser = cg.getInput();
if (fromUser != null) {
System.out.println("Client: " + fromUser);
out.println(fromUser);
out.close();
in.close();
kkSocket.close();
System.exit(0);
}and here is the ClientGUI class (note: you need to resize it in order to see the textbox....
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class ClientGUI extends JFrame {
private JTextField textBox = new JTextField();
private JButton input = new JButton("Submit");
private boolean recievedInput = false;
private String inputText = "";
public ClientGUI() {
this.setupGUI();
private ActionListener buttonAction = new ActionListener() {
public void actionPerformed(ActionEvent e) {
inputText = textBox.getText();
recievedInput = true;
public String getInput() {
while(recievedInput == false) {
try {
Thread.sleep(2000); //I DONT want to do this!!
catch(InterruptedException e) {
e.printStackTrace();
recievedInput = false;
return inputText;
private void setupGUI() {
textBox.setMinimumSize(new Dimension(100, 20));
input.addActionListener(buttonAction);
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(textBox, BorderLayout.WEST);
this.getContentPane().add(input, BorderLayout.EAST);
this.pack();
this.setSize(100,300);
this.setVisible(true);
}If you have any ideas, I would greatly appreciate itwarnerja,
I tried the following, but I got an exception.
in the while loop inside Client.java, I put the following:
synchronized(cg) {
try {
cg.wait();
fromUser = cg.getInput();
catch(InterruptedException e) {
e.printStackTrace();
}and inside my ClientGUI class, I put the following:
private ActionListener buttonAction = new ActionListener() {
public void actionPerformed(ActionEvent e) {
inputText = textBox.getText();
ClientGUI.this.notify();
public String getInput() {
return inputText;
}But I got this exception:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException: current thread not owner
at java.lang.Object.notify(Native Method)
at ClientGUI$1.actionPerformed(ClientGUI.java:21)
any idea what I am doing wrong? -
Help with writing a static method in my test case class inside blue j
I have this method that I have to test. below is the method I need to test and what I have to create inside my test case file to test it Im having big time problems getting going. Any help is appreciated.
public String introduceSurprise ( String first, String last ) {
int d1 = dieOne.getFace();
Die.roll();
if (d1 %4 == 2){
return Emcee.introduce(first);
else {
return this.introduceSpy (first,last);
So how do write tests to verify that every fourth call really does give a randomized answer? Write a static method showTests which
creates an EmCee,
calls introduceSurprise three times (doing nothing with the result (!)),
and then calls it a fourth time, printing the result to the console window.
Write this code inside your test class TestEmCee, not inside EmCee!hammer wrote:
So how do write tests to verify that every fourth call really does give a randomized answer? Write a static method showTests which
creates an EmCee,
calls introduceSurprise three times (doing nothing with the result (!)),
and then calls it a fourth time, printing the result to the console window.
Write this code inside your test class TestEmCee, not inside EmCee!Those instructions couldn't be anymore straightforward. Make a class called TestEmCee. Have it create an EmCee object. Call introduceSurprise on that object 3 times. Then print the results of calling it a 4th time. -
Which type to use in own method?
Hi there,
i am not so good in abap-objects so here is my question:
i created a new method in my view in webdynpro for abap.
in this method i declared a changing-parameter. this parameter must be of the same type as an internal table declared in my context-interface.
I tried to type it like this: wd_this->elements_list
this doesnt work. Can anyone help?
best regards...you can either use;
if_viewname=>elements_nodename OR wd_this->elements_nodename.
Regards,
Radhika. -
Hi,
I am learning how to write my own droplet.
In this droplet I have to take input from user as an integer value and then in output I have to print the values from 1 to that input valuue.
Please help me regarding this.
Regards,
Prateek GIf I want to give a text box where user has to fill the value and then click on a submit button the result will show under that text box.So How can I implement this ?
>
In such type of requirement you can try like below:
[1]. write input.jsp
input.jsp:
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#name").change(function(){
var name=$("#name").val();
$.ajax({
type: "POST",
url: "callDroplet.jsp",
data: {name: name},
success:function(result){
$("#showOutput").html(result);
</script>
</head>
<body>
<input type="text" id="name">
<div id="showOutput">callDroplet.jsp's output will come here</div>
</body>
</html>[2]. Write callDroplet.jsp
<body>
<dsp:droplet name="/a/b/c/MyXYZDroplet">
<dsp:param name="input_param" param="name">
<dsp:oparam name="output">
Your output message goes here
</dsp:oparam>
</dsp:droplet>
</body>-RMishra
Edited by: RMishra on May 25, 2013 2:38 PM -
Writing a pause method in a class which extends TimerTask
I run my method using this code:
synchronized public void run() {
MainClass.myMethod();
}and I want to run my method every 10 seconds so I do like this:
public void start() {
try {
timer.scheduleAtFixedRate(getTimeOutControler(), new Date(), 10000);
} catch (Exception e) {
e.printStackTrace();
}Now I want to push 2 buttons on a frame so when I click on "start" button the scheduled task begin and when I click on "pause" button the scheduled task pauses. how I can do this?I can see two solutions to this.
1. You could add a volatile boolean paused flag which you could check in your run method (before it calls the MainClass.myMethod(). This won't actually pause the timer, but it will prevent the method from running. The major drawback I see with this is that if you un-pause then the timer could fire instantly, which may or may not be the desired behaviour.
2. You could cancel the timer, and recreate it when you un-pause. This has the benefit of allowing the full time after you un-pause it (but again, it depends on the behaviour you require). -
Need help writing a recursive method
hello, im having problems with this and its already giving me a headache!!
i have to write a recursive method that receives a parameter n that prints the following:
1
12
123
1234
how would i even begin to do this...im lostErnie_9 wrote:
ok i just got a little problem. it prints
and i needed
So its only changing the order it prints it. but where would that be changed? i tried swapping the bottom part where the parameter is modified and the print but it does not workLooks like you are first decrementing the iterator and then incrementing it ....try the other way around -
[spamassassin] failure on writing his own files
Hello,
i set up a mail server using arch, postfix, dovecot, mysql, spamassassin.
almost everything is working fine, but i got an error about spamassassin not able to create/read some files, an bayes eval failure.
here is the log :
2012-11-22T11:34:55.100773+00:00 localhost postfix/postscreen[20895]: CONNECT from [209.85.214.46]:62210 to [92.243.17.51]:25
2012-11-22T11:34:55.100996+00:00 localhost postfix/postscreen[20895]: PASS OLD [209.85.214.46]:62210
2012-11-22T11:34:55.117560+00:00 localhost postfix/smtpd[20896]: connect from mail-bk0-f46.google.com[209.85.214.46]
2012-11-22T11:34:55.506511+00:00 localhost postfix/smtpd[20896]: 7B9E3255C2: client=mail-bk0-f46.google.com[209.85.214.46]
2012-11-22T11:34:55.749004+00:00 localhost postfix/cleanup[20902]: 7B9E3255C2: message-id=<[email protected]m>
2012-11-22T11:34:55.773781+00:00 localhost postfix/qmgr[17253]: 7B9E3255C2: from=<[email protected]>, size=1506, nrcpt=1 (queue active)
2012-11-22T11:34:55.788150+00:00 localhost spamd[16751]: spamd: connection from localhost [127.0.0.1] at port 46217
2012-11-22T11:34:55.788961+00:00 localhost spamd[16751]: spamd: setuid to nobody succeeded
2012-11-22T11:34:55.789217+00:00 localhost spamd[16751]: spamd: creating default_prefs: //.spamassassin/user_prefs
2012-11-22T11:34:55.790047+00:00 localhost spamd[16751]: config: cannot create user preferences file //.spamassassin/user_prefs: No such file or directory
2012-11-22T11:34:55.790284+00:00 localhost spamd[16751]: spamd: failed to create readable default_prefs: //.spamassassin/user_prefs
2012-11-22T11:34:55.792041+00:00 localhost spamd[16751]: spamd: processing message <[email protected]m> for nobody:99
2012-11-22T11:34:58.650172+00:00 localhost spamd[16751]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create lockfile /.spamassassin/bayes.mutex: No such file or directory
2012-11-22T11:34:58.652776+00:00 localhost spamd[16751]: spamd: clean message (-0.8/5.0) for nobody:99 in 2.9 seconds, 1477 bytes.
2012-11-22T11:34:58.653071+00:00 localhost spamd[16751]: spamd: result: . 0 - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW scantime=2.9,size=1477,user=nobody,uid=99,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=46217,mid=<[email protected]m>,autolearn=unavailable
2012-11-22T11:34:58.694529+00:00 localhost postfix/pickup[18387]: A94E7255C4: uid=99 from=<[email protected]>
2012-11-22T11:34:58.696117+00:00 localhost postfix/pipe[20903]: 7B9E3255C2: to=<[email protected]>, relay=spamassassin, delay=3.3, delays=0.41/0.01/0/2.9, dsn=2.0.0, status=sent (delivered via spamassassin service)
2012-11-22T11:34:58.698830+00:00 localhost postfix/qmgr[17253]: 7B9E3255C2: removed
2012-11-22T11:34:58.699185+00:00 localhost postfix/cleanup[20902]: A94E7255C4: message-id=<[email protected]m>
2012-11-22T11:34:58.701168+00:00 localhost spamd[16750]: prefork: child states: II
2012-11-22T11:34:58.723994+00:00 localhost postfix/qmgr[17253]: A94E7255C4: from=<[email protected]>, size=1863, nrcpt=1 (queue active)
2012-11-22T11:34:58.760261+00:00 localhost dovecot: auth-worker(20909): mysql(localhost): Connected to database postfix_db
2012-11-22T11:34:58.793178+00:00 localhost dovecot: lda([email protected]): sieve: msgid=<[email protected]m>: stored mail into mailbox 'Latex.gut'
2012-11-22T11:34:58.794782+00:00 localhost postfix/pipe[20907]: A94E7255C4: to=<[email protected]>, relay=dovecot, delay=0.13, delays=0.06/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
2012-11-22T11:34:58.795047+00:00 localhost postfix/qmgr[17253]: A94E7255C4: removed
2012-11-22T11:35:26.227313+00:00 localhost postfix/smtpd[20896]: disconnect from mail-bk0-f46.google.com[209.85.214.46]
i suspect this :
2012-11-22T11:34:55.788961+00:00 localhost spamd[16751]: spamd: setuid to nobody succeeded
to be part of the problem, but i'm not sure, and maybe some guru here can help me ?
here is postconf -n :
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
body_checks = regexp:/etc/postfix/body_checks.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
dovecot_destination_recipient_limit = 1
header_checks = regexp:/etc/postfix/header_checks.cf
html_directory = no
inet_protocols = ipv4
local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mime_header_checks = regexp:/etc/postfix/mime_headers_checks.cf
newaliases_path = /usr/bin/newaliases
postscreen_dnsbl_action = enforce
postscreen_dnsbl_sites = zen.spamhaus.org*2 bl.spamcop.net*2 b.barracudacentral.org*1 bl.mailspike.net*1
postscreen_dnsbl_threshold = 2
postscreen_greet_action = enforce
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix
relay_domains = *
sample_directory = /etc/postfix/sample
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_recipient_restrictions = reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_non_fqdn_sender, reject_unknown_recipient_domain, reject_invalid_helo_hostname, reject_unlisted_recipient, reject_unlisted_sender, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/private/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_loglevel = 1
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /srv/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_domains_maps.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = dovecot:
virtual_uid_maps = static:5000
master.cf :
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
# Do not forget to execute "postfix reload" after editing this file.
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
#smtp inet n - n - - smtpd
smtp inet n - n - 1 postscreen
smtpd pass - - n - - smtpd -o content_filter=spamassassin
dnsblog unix - - n - 0 dnsblog
tlsproxy unix - - n - 0 tlsproxy
submission inet n - n - - smtpd
#smtp inet n - n - - smtpd -o content_filter=spamassassin
# -o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - n - - smtpd
# -o syslog_name=postfix/smtps
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#maildrop unix - n n - - pipe
# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
# ====================================================================
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
# ====================================================================
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
# ====================================================================
# Old example of delivery via Cyrus.
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# ====================================================================
# See the Postfix UUCP_README file for configuration details.
#uucp unix - n n - - pipe
# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
# ====================================================================
# Other external delivery methods.
#ifmail unix - n n - - pipe
# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#bsmtp unix - n n - - pipe
# flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#scalemail-backend unix - n n - 2 pipe
# flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
# ${nexthop} ${user} ${extension}
#mailman unix - n n - - pipe
# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}
spamassassin unix - n n - - pipe user=nobody argv=/usr/bin/vendor_perl/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
#using LDA with dovecot
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}i'm probably a bit stupid...
mkdir & chown spamd: did the job... -
Where can one find information on writing thier own app?
Have an idea that I would like to develop into an app. Where might one begin in writing the necessary software?
Get an iOS Developer Account...
Choosing an iOS Developer Program / Which Developer Program is for you?
...then use the resources that come with it in the iOS Dev Center.
iOS Human Interface Guidelines
iOS Starting Point
Start Developing iOS Apps Today
App Development Overview
App Store Review Guidelines for iOS Apps
Your First iOS App -
Hi everybody,
I'm pretty sure this is general enough not to be in the Swing forum, although this particular example involves Swing, if not, please let me know. :)
Anyway, I'm trying to write an adapter class that can use methods in many different listener classes, but doesn't need to implement all of them. I need certain methods from each listener class, but not all of them, and the extra methods would clutter my code up. I can't extend them all, I know.
My first attempt at this was:
public abstract class Adapter implements ActionListener, MenuListener, MouseInputListener,
WindowFocusListener, WindowListener {
}I've also tried:
public interface Adapter extends ActionListener, MenuListener, MouseInputListener,
WindowFocusListener, WindowListener {
}In both cases, I get warnings and errors saying I need to implement every method in each interface (windowClosing, actionPerformed, etc.). Does anyone know what I'm doing wrong here?
Thanks,
Jezzica85KelVarnson wrote:
Encephalopathic wrote:
The thing is though the Adapter class is by nature ugly and will have many methods declared that do nothing. If you want to create this, yours is going to be cluttered with many empty methods.Isn't that the whole point of an Adapter class? Yes. I didn't say that this is a bad thing, just that it doesn't look pretty; it's cluttered. What is bad is her desire to lump them all together into one big unholy mess.
But yes, I do agree with your points against a mega-Adapter.As we both agree on.
Maybe you are looking for
-
What about TWO different serial numbers in macOs (about this mac window) and on the foot of the mac. This mac was not purchased as a refurbished nor has been sent for servicing on any time since purchasing... The one in MacOs is answering : "This is
-
SAML assertion Identity provider - SSO for ALL users
Hi , If we have a Corp AD configured on Windows 7/ Windows 8 but SAP-EP-UME is hooked up to the Corp AD ( read only ). Can we consider the Active directory system(Windows ) to be the IDENTITY PROVIDER and configure the SAP-EP ( portal to be the
-
I should have different first page for different users. How can i redirect after login and authentication (this is custom authentication method) ? My environment is HTMLDB 6, 10G and Windows.
-
hi everybody, i bought the n95-3 the us version from Australia and it cam with some software i think its Australian company call telstra i tried to remove the info by doing the hard reset, restore to factory setting format all didn't work whenever i
-
Hello, First of all: I'm a new to Logic Pro and just want to mix my Audio from FCPX which I think I will be able to handle. I've exported an XML from FCPX and import it in Logic Pro X. Now my problem is that some audio clips are longer than the sele