javaGrowing

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  92 随笔 :: 33 文章 :: 49 评论 :: 0 Trackbacks

#

单击“开始→运行”,在“打开”框中键入“MOUNTVOL   /E”,然后单击“确定”按钮,重新启动电脑。
posted @ 2008-11-01 15:19 javaGrowing 阅读(514) | 评论 (0)编辑 收藏

Archetype Command
JSF Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Spring MVC Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Struts 2 Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Tapestry Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-tapestry -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
JSF Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Spring MVC Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Struts 2 Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Tapestry Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-tapestry -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
Core
(backend only)
mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-core -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject

You should be able to run AppFuse immediately if you have a MySQL 5.x database installed and it's accessible to root using no password. If you'd prefer to use an embedded database, we've recently added Database Profiles for H2, HSQLDB, etc.

MySQL Security
Running MySQL using root with no password is not the most secure thing to do. Once your database is created, you can change the root password using the command below:
mysql --user=root --pass='' mysql -e "update user set password=password('newpw') where user='root'; flush privileges;"

AppFuse uses the username "root" and a blank password by default. To change these values, modify the <jdbc.username> and <jdbc.password> properties in your project's pom.xml (at the bottom).

Run your application

Running AppFuse is easy now. Once the archetype project is created, Maven will create and populate your database using the hibernate3 and dbunit plugins, respectively. All you have to do is use Maven to run the Jetty container and view your application.

  1. Check your new project into source control, unless you have a good reason not to. Google Code has free Subversion hosting, as do many others.
  2. From the command line, cd into your new project's directory and run mvn to download JARs, Tomcat and run the integration tests in your project. Now is a good time to take a coffee break or grab a beer - downloading everything and running the tests can take 5-10 minutes.
  3. To view your application run mvn jetty:run-war from your project's directory (for a modular project, you'll need to run mvn jetty:run-war from your project's web directory). Maven will start Jetty and you should be able to view your application in your browser at http://localhost:8080.
    The default username/password for an admin user is admin/admin. For a regular user, use user/user.
  4. To override files from AppFuse, run mvn war:inplace. This will extract the dependent WARs into src/main/webapp, where you can change files to your heart's content. When you have the war expanded in your source tree, you can run mvn jetty:run. This will allow you to change files on-the-fly and Jetty will reload them as needed. The only problem with this approach is you end up with an "exploded AppFuse" in your project, which won't bode well for upgrading. We recommend you check your project into source control before running mvn war:inplace. That way, it'll be easier for you to decide what needs to be checked in (over written) and what can be deleted.

If you receive OutOfMemory errors when using mvn jetty:run, see this mailing list thread.

You can change AppFuse from its "embedded mode" to full-source mode by running mvn appfuse:full-source from your project's root directory.

Bug with Ant 1.7.0
Local repositories and projects on Windows platforms are held in directories whose paths contain no spaces. To fix this issue, modify your $M2_HOME/conf/settings.xml and change your localRepository to something like the following:
<localRepository>c:\docume~1\username\.m2\repository</localRepository> 
Development Environment
See development environment for detailed instructions on how to setup your computer to develop AppFuse-based applications.
Changing database settings
To change your MySQL database settings, simply change the <jdbc.*> properties at the bottom of your pom.xml. See Database Profiles to use a database other than MySQL


set MAVEN_OPTS=-Xmx512m -Xms512m -XX:MaxPermSize=512m
posted @ 2008-09-03 18:07 javaGrowing 阅读(471) | 评论 (0)编辑 收藏

今天我在调程序时,遇到了见郁闷的事,我用ajax从前台显示页面传字符串变量给处理页面,出现了件怪事,我想传的内容是abc+,但接收以后用System.out.println()输出是abc空格。反复测试好几遍,都是这个结果,真是令人郁闷。在网上搜了搜,找到了原因。
原因:   url中有些字符被转义,比如空格被编码成加号,于是传的参数明明是加号,获取的值却成了空格。如何解决呢?如果是通过url传递参数,应该对其进行必要的编码。
解决办法:
         在javascript中加入   function URLencode(sStr)
{
    return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F');
}
对字符串进行处理.如:var str=URLencode("abc+")
posted @ 2007-12-19 09:02 javaGrowing 阅读(11295) | 评论 (5)编辑 收藏

The following processes including SD,MM,PP,FI,CO .


SD Relevant Steps:
1.Check if all delivery in due list have been processedVL06G (Could set background jobs to automatically generate the billing due list for posting)
2.Check if all picking in due list have been processedVL06P
3.Check if all goods issue in due list have been processedVL04
4.Check if all billed AR has been release to accountingVFX3

PP Relevant Steps:
1.Check if all back flash error has been solved (COGI Check every day this kind of problem and solved on time)
2.Check if all production orders that will not be followed have been finally  confirmed or technically closed. Do final confirmation even small quantity  variance exist but we consider this order has finished
3.Do technical close at month end for the orders will not be followed in the future
4.Confirmation. Do not confirm any assembly scrap when do production order conf.

MM Relevant Steps
1.Check if all goods movement has been booked in SAP
2.GR/IR clearing accounts maintenance if needed
3.Open the MM period for movement posting when new period starts MMPV

FI Relevant Steps
1.Book all accounting entries for:
- Accrued expense
- Do recurring entry (prepayment, accrued expense, amortization)
- Process G/L, vendor, customer balance & open items
- Cost allocations by FI
2.AM Fixed asset depreciation run and period postingAFAB
3.AM Periodic posting ASKB
4.G/L,AR,AP balance check & Open item clearing
5.Foreign currency revaluation for bank/cash & AR AP open items
Bank/cash revaluation: F.06
AR AP open items: F.05
6.GR/IR clearing account regrouping process F.19
7.Automatic clearing for G/L accounts, vendor and customer F.13

CO Relevant Steps
1.Release standard cost estimate
CK24Only when there are costing run to be released.
2.Cost reallocation according to activity
Distribution: CKV5
Assessment: KSU5
3.Cost splitting among activity KSS2
4.Actual activity price calculation KSII
5.Production order revaluation with actual activity price CON2
6.WIP calculationfor the production orders KKAO
7.Variance calculation for the production orders KKS1
8.Production / Costing orders settlement CO88/KO88
9.Material ledger closing > MMPV first
a.Create costing runCKRU00
b.Allow settlementCKMF_RUN
c.Allow closing entriesCKMG_RUN
d.Material selectionCKMB_RUN
e.Determine costing sequenceCKMC_RUN
f.Settle single levelCKMH_RUN
g.Settle multi levelCKMM_RUN
h.Post closingCKMI
posted @ 2007-12-18 16:03 javaGrowing 阅读(895) | 评论 (0)编辑 收藏

所谓排序,就是要整理文件中的记录,使之按关键字递增(或递减)次序排列起来。其确切定义如下:
  输入:n个记录R1,R2,…,Rn,其相应的关键字分别为K1,K2,…,Kn
  输出:Ril,Ri2,…,Rin,使得Ki1≤Ki2≤…≤Kin。(或Ki1≥Ki2≥…≥Kin)。

    这里,我们简单介绍几种排序方法,直接插入排序、希儿排序、冒泡排序、快速排序、直接选择排序,文中所提及的代码在IE6下测试通过。

直接插入排序基本思想
    假设待排序的记录存放在数组R[1..n]中。初始时,R[1]自成1个有序区,无序区为R[2..n]。从i=2起直至i=n为止,依次将R[i]插入当前的有序区R[1..i-1]中,生成含n个记录的有序区。

    算法描述

 function InsertSort(arr) { //插入排序->直接插入法排序
  var st = new Date();
  
var temp, j;
  
for(var i=1; i<arr.length; i++) {
   
if((arr[i]) < (arr[i-1])) {
    temp 
= arr[i];
    j 
= i-1;
    
do {
     arr[j
+1= arr[j];
     j
--;
    }
    
while (j>-1 && (temp) < (arr[j]));
    arr[j
+1= temp;
   }
//endif
  }
  status 
= (new Date() - st) + ' ms';
  
return arr;
 }

希尔排序基本思想
   先取一个小于n的整数d1作为第一个增量,把文件的全部记录分成d1个组。所有距离为dl的倍数的记录放在同一个组中。先在各组内进行直接插人排序;然后,取第二个增量d2<d1重复上述的分组和排序,直至所取的增量dt=1(dt<dt-l<…<d2<d1),即所有记录放在同一组中进行直接插入排序为止。
   该方法实质上是一种分组插入方法。

    算法描述

 

function ShellSort(arr) { //插入排序->希儿排序
  var st = new Date();
  
var increment = arr.length;
  
do {
   increment 
= (increment/3|0+ 1;
   arr 
= ShellPass(arr, increment);
  }
  
while (increment > 1)

  status 
= (new Date() - st) + ' ms';
  
return arr;
 }
 
function ShellPass(arr, d) { //希儿排序分段执行函数
  var temp, j;
  
for(var i=d; i<arr.length; i++) {
   
if((arr[i]) < (arr[i-d])) {
    temp 
= arr[i]; j = i-d;
    
do {
     arr[j
+d] = arr[j];
     j 
= j-d;
    }
    
while (j>-1 && (temp) < (arr[j]));
    arr[j
+d] = temp;
   }
//endif
  }
  
return arr;
 }

冒泡排序基本思想
    将被排序的记录数组R[1..n]垂直排列,每个记录R[i]看作是重量为R[i].key的气泡。根据轻气泡不能在重气泡之下的原则,从下往上扫描数组 R:凡扫描到违反本原则的轻气泡,就使其向上"飘浮"。如此反复进行,直到最后任何两个气泡都是轻者在上,重者在下为止。

    算法描述
 

function BubbleSort(arr) { //交换排序->冒泡排序
  var st = new Date();
  
var temp;
  
var exchange;
  
for(var i=0; i<arr.length; i++) {
   exchange 
= false;
   
for(var j=arr.length-2; j>=i; j--) {
    
if((arr[j+1]) < (arr[j])) {
     temp 
= arr[j+1];
     arr[j
+1= arr[j];
     arr[j] 
= temp;
     exchange 
= true;
    }
   }
   
if(!exchange) break;
  }
  status 
= (new Date() - st) + ' ms';
  
return arr;
 }

快速排序基本思想
    将原问题分解为若干个规模更小但结构与原问题相似的子问题。递归地解这些子问题,然后将这些子问题的解组合为原问题的解。
    在R[low..high]中任选一个记录作为基准(Pivot),以此基准将当前无序区划分为左、右两个较小的子区间R[low..pivotpos- 1)和R[pivotpos+1..high],并使左边子区间中所有记录的关键字均小于等于基准记录(不妨记为pivot)的关键字 pivot.key,右边的子区间中所有记录的关键字均大于等于pivot.key,而基准记录pivot则位于正确的位置(pivotpos)上,它无 须参加后续的排序。

    算法描述
 

function QuickSort(arr) { //交换排序->快速排序
  if (arguments.length>1) {
   
var low = arguments[1];
   
var high = arguments[2];
  } 
else {
   
var low = 0;
   
var high = arr.length-1;
  }
  
if(low < high){
   
// function Partition
   var i = low;
   
var j = high;
   
var pivot = arr[i];
   
while(i<j) {
    
while(i<&& arr[j]>=pivot)
     j
--;
    
if(i<j)
     arr[i
++= arr[j];
    
while(i<&& arr[i]<=pivot)
     i
++;
    
if(i<j)
     arr[j
--= arr[i];
   }
//endwhile
   arr[i] = pivot;
   
// end function
   var pivotpos = i; //Partition(arr,low,high);
   QuickSort(arr, low, pivotpos-1);
   QuickSort(arr, pivotpos
+1, high);
  } 
else
   
return;
   
return arr;
 }

直接选择排序基本思想
   n个记录的文件的直接选择排序可经过n
-1趟直接选择排序得到有序结果:
 ①初始状态:无序区为R[
1..n],有序区为空。
 ②第1趟排序
    在无序区R[
1..n]中选出关键字最小的记录R[k],将它与无序区的第1个记录R[1]交换,使R[1..1]和R[2..n]分别变为记录个数增加1个的新有序区和记录个数减少1个的新无序区。
  ……
 ③第i趟排序
  第i趟排序开始时,当前有序区和无序区分别为R[
1..i-1]和R[i..n](1≤i≤n-1)。该趟排序从当前无序区中选出关键字最小的记录R [k],将它与无序区的第1个记录R[i]交换,使R[1..i]和R[i+1..n]分别变为记录个数增加1个的新有序区和记录个数减少1个的新无序区。
    这样,n个记录的文件的直接选择排序可经过n
-1趟直接选择排序得到有序结果。

    算法描述
 
function SelectSort(arr) { //选择排序->直接选择排序
  var st = new Date();
  
var temp;
  
for(var i=0; i<arr.length; i++) {
   
var k = i;
   
for(var j=i+1; j<arr.length; j++) {
    
if((arr[j]) < (arr[k]))
     k 
= j;
   }
   
if (k != i){
    temp 
= arr[i];
    arr[i] 
= arr[k];
    arr[k] 
= temp;
   }
  }
  status 
= (new Date() - st) + ' ms';
  
return arr;
 }

posted @ 2007-07-23 16:23 javaGrowing 阅读(491) | 评论 (0)编辑 收藏

仅列出标题
共19页: 1 2 3 4 5 6 7 8 9 下一页 Last