Friday, September 23, 2016
remote monitor and dump the java process
remote monitor and dump the java process:
1) in the machine that java process is running. create following filw with content:
file name:jstatd.all.policy
content:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
do not change the above content, event in windows, the path even looks not reflect right path.
2) start jstatd with following way with exactly copy
jstatd -J-Djava.security.policy=jstatd.all.policy
3) in remnote monitoring machine, start jvisualVM add remote machine name or IP, the java process will be fecthed, you can monitor and profile now.
Thursday, August 18, 2016
build a jdk rt.jar with debug option
1)download the src.zip for your jdk
2)unzip src.zip into a tmp/src folder:unzip src.zip -d /src
3)get list of all java class into a file: find -name "*.java* > files.txt
4)compile all java files:javac -verbose -g -d ..\out -J-Xmx2048m -cp c:\jdk7u80\jre\lib\rt.jar;c:\jdk7u80\lib\tools.jar @files.txt
5)create jar file:cd tmp\out; jar cvf rt.jar *
6)copy the rt.jar into jdk\jre\lib\endorsed
Wednesday, August 17, 2016
Log4J appender format
here is the best log4J appender ConversionPattern value "%d{MM/dd/yyyy hh:mm:ss aa} [%-5p] [%c{1}] - %m%n", it approved working
it print out the date time, log type and class name and message
remember put it in the appender you expected, because we might have mutiple appender, one for file, one for console, etc.
Thursday, July 28, 2016
chrome trouble shooting
chrome has many chrome://commands that will help you tuning and trouble shooting your chrome. chrome://about will list all commands and its links.
Wednesday, July 13, 2016
Using R studio to find the set intersect and difference
1) make data into a one column text file with a title, or two dimension data matrix
2) use read.csv read file into a data frame
3) use column index in data frame to read one column into a array(set)
a <- data[,1]
4) use intersect to get common set between set
5) use setdiff to find set diffence->
2) use read.csv read file into a data frame
3) use column index in data frame to read one column into a array(set)
a <- data[,1]
4) use intersect to get common set between set
5) use setdiff to find set diffence->
Tuesday, June 21, 2016
filter subversion log to specific period of time and from specific user
svn log http://olsvn.autc.com/repos/DataServicesCore -qv -r {2016-06-01}:{2016-06-20} |sed -n '/bd/,/-----$/ p'
Friday, May 20, 2016
apache commons-email SimpleEmail sent out email missed subject line
following code is simple and use to send out email, but in my case, received email miss subject line, the problem is the class path include som libraries that cause java-mail to fail
public class Test{
public static void main(String[] args){
try{
SimpleEmail email = new SimpleEmail();
email.setDebug(true);
email.setHostName("xx.xxx.xxx.xxx");
email.setSmtpPort(25);
email.setSSLOnConnect(false);
email.setFrom("noreply@openlane.com");
email.setSubject("THIS IS SUBJECT LINE");
email.setMsg("This is a test mail from command line");
email.addTo("my.email@openlane.com");
email.send();
}catch(Exception e){
e.printStackTrace();
}
}
}
the problam library is geronimo.specs:geronimo.specs and geronimo-activation_1.1_spec:
org.apache.geronimo.specs
exclude them from pom file(or classpath will solve the problem)
public class Test{
public static void main(String[] args){
try{
SimpleEmail email = new SimpleEmail();
email.setDebug(true);
email.setHostName("xx.xxx.xxx.xxx");
email.setSmtpPort(25);
email.setSSLOnConnect(false);
email.setFrom("noreply@openlane.com");
email.setSubject("THIS IS SUBJECT LINE");
email.setMsg("This is a test mail from command line");
email.addTo("my.email@openlane.com");
email.send();
}catch(Exception e){
e.printStackTrace();
}
}
}
the problam library is geronimo.specs:geronimo.specs and geronimo-activation_1.1_spec:
org.apache.geronimo.specs
exclude them from pom file(or classpath will solve the problem)
Tuesday, April 12, 2016
fiscal year variant explanation in SAP
The fiscal year represents the accounting year or annual accounting period. A fiscal year variant defines your company's accounting posting periods. A proper business accounting transaction normally covers a 12-month period. The normal rule is that business transactions are assigned to the period during which the transaction took place. The fiscal year variant is customized to match your company's fiscal year, which does not necessarily have to be the same as the normal calendar year (that is, January to December). SAP ERP is dynamic enough to fit into your company's calendar or fiscal year.
Fiscal year variant is defined with posting periods. Posting periods are technical terms used to refer to months. In SAP ERP, the fiscal year is made up of 12 posting periods. Besides the normal 12 posting periods, you can define up to four special posting periods, which are used for posting year-end adjustments to closed periods. For example, if the normal fiscal period is closed, adjustments can still be posted in one of the four special periods.
With year independent, the accounting periods of a company remain the same each year (that is, the financial reporting year is constant). For example, an enterprise fiscal year is January to December of each year. There are two types of year independent fiscal year variants in SAP:
Calendar year: The posting period is the same as the calendar year, usually 12 months. The posting period runs 12 months each year. For example, the U.S. financial year starts in January and ends in December. Non-calendar year: These are time periods that start and end any month of the year, except January and December. In the UK, for example, the fiscal year starts in April and ends in March. Since the non-calendar year did not start in January 1st, you use indicator -1 or + 1 for the period of the year that belongs to the former or latter fiscal year.
Note |
February is counted as 29 days irrespective of actual number of days in February in order for the system to take leap year into consideration.
The SAP system comes with standard fiscal year variants. We recommend that you use the standard fiscal year variants supplied by the system. As examples, the fiscal year variant for the United States (January to December) is K4 and the fiscal year variant for the UK (April to March) is V3.
|
You can copy and modify the standard fiscal year variant.
If you decide to define your own fiscal year variant, use a two-digit alphanumeric identifier of your choice as your variant and maintain your fiscal year variant as appropriate.
segment explanation in SAP
A segment is used to highlight items disclosed in financial reporting by segment. This is opposed to a business area, which forms part of an organizational unit for which a financial statement is drawn for internal purposes. Accounting principles and standards (U.S. GAAP, IFRS, IAS, and so on) mandate that companies produce segmental reporting in certain situations for external purposes. A segment may be a department, product, or geographic location. Segmental reporting is purely for transparency purposes when reporting the profit and risk situations of segments within an enterprise. The underlying reason behind this requirement is to assist users of the financial information to make better judgments about an entity's involvement in different activities. Segment accounting allows a company to report the performance of their segment's activities individually. The importance of segment reporting is that it places more emphasis on segment performance.
Business Area explanation in SAP
A business area is an organizational unit that represents a specific business segment in SAP that defines a functional area of operation, a plant, or an area of responsibility. For example, business areas can be a product the company sells, a geographical location, and so on. Business area is optional and is intended purely for internal financial reporting. They can be used across company codes for reporting. They are also viewed as balancing entities that can produce their own set of financial statements.
You define a business area in SAP ERP using four characters. A business area can be assigned to a company code or several company codes. Likewise, it is also possible to assign a company code to a business area or several business areas. The advantage of using a business area is that it allows management to generate internal financial reports on a business function or a combination of business functions. These reports aid management in decision-making, because they make it easy to tell how well a business area is performing.
client explanation in SAP
The client is an independent unit in the SAP ERP with its own master records and sets of tables. Data entered at this level is valid for all company codes (defined in the next section) and organizational units in the client. In other words, all the company codes in the client will have access to data created at this level. For that reason, the client is said to be the highest level in a SAP system hierarchy. The benefit of the client is that data is entered only once, thus eliminating duplication, reducing redundancies, and saving resources like storage space. As all company codes in the client can have access to the same data created at this level, the need to create individual data for each company code is eliminated.
Each client has its own unique log-on key, which must be entered by the user in order to access the client and perform business processes.
In a client, you can define one or more company codes. Likewise, one or more business areas can be assigned to one or multiple company codes
company_code explanation in SAP
A company code is a separate independent and legal entity that allows you to model and remodel your business organization based on financial reporting requirements (such as the profit and loss statements and balance sheets). Every company code in SAP ERP is represented with a unique four-character code. The code allows you to identify a company in a client. This is the case in an environment where you have more than one company code in a client
Friday, April 1, 2016
CREATE AND PRINT DB ERD diagram from sqldeveloper
form menu File-->Data Modeler-->import-->data dictionary, the you will see a Data Dictionary Import Wizard, following the wizard,select your connection,tables, ERD diagram will be created.
for print, select menu file-->Data Modeler-->print Diagram--> to PDF File(or other options)
for print, select menu file-->Data Modeler-->print Diagram--> to PDF File(or other options)
Wednesday, March 30, 2016
Tuesday, February 23, 2016
radio for foobar2000
1)chfi: folder name:Folder name : http://tor981.akacast.akamaistream.net/7/550/80872/v1/rogers.akacast.akamaistream.net
file path:http://tor981.akacast.akamaistream.net/7/550/80872/v1/rogers.akacast.akamaistream.net/tor981?.mp3
CHBM:folder name:Folder name : http://3153.live.streamtheworld.com
file path:http://3153.live.streamtheworld.com/CHBMFM_SC
CBC:http://6093.live.streamtheworld.com
http://6093.live.streamtheworld.com/CBC_R1_TOR_H_SC
file path:http://tor981.akacast.akamaistream.net/7/550/80872/v1/rogers.akacast.akamaistream.net/tor981?.mp3
CHBM:folder name:Folder name : http://3153.live.streamtheworld.com
file path:http://3153.live.streamtheworld.com/CHBMFM_SC
CBC:http://6093.live.streamtheworld.com
http://6093.live.streamtheworld.com/CBC_R1_TOR_H_SC
Subscribe to:
Posts (Atom)