假設A商品有以下幾次進貨
日期 數量 進貨價格
2014/01/01 5 10
2014/01/05 10 9
2014/01/30 1 11
平均成本為
((5*10)+(10*9)+(1*11))/(5+10+1)=151/16=9.4375
arp -d
for /L %i in (1,1,254) do ping 192.168.1.%i -n 1 -w 200 > NUL
arp -a
#include <stdio.h>
int main()
{
int a = 9, b = 0, c = 7;
a = (a = b) && (c = b);
printf("%d\t%d\t%d",a,b,c);
return 0;
}
#include <stdio.h>
int main()
{
int a = 9, b = 0, c = 7;
a = (a = b);
printf("%d\t%d\t%d",a,b,c);
return 0;
}
#include <stdio.h>
int main()
{
int a = 9, b = 1, c = 7;
a = (a = b) && (c=b);
printf("%d\t%d\t%d",a,b,c);
return 0;
}
import requests res = requests.post("http://pwbgis.kcg.gov.tw/construction/construction.aspx?id=63") print res.text.encode('big5')
import requests res = requests.post("http://pwbgis.kcg.gov.tw/construction/construction.aspx?id=63") print res.text
import sys print sys.getdefaultencoding()
package test; public class Test { public static void main(String[] args) { double start=System.currentTimeMillis(); String str=""; for (int i=0;i<10000;i++) { str+= String.valueOf(i); } double end=System.currentTimeMillis(); System.out.println((end-start)+"ms"); start=System.currentTimeMillis(); StringBuilder sb=new StringBuilder(); for (int i=0;i<10000;i++) { sb.append(String.valueOf(i)); } end=System.currentTimeMillis(); System.out.println((end-start)+"ms"); } }
select dblink_connect('hostaddr=127.0.0.1 port=5432 dbname=store_b user=postgres password=mypwd');
SELECT id,name,year
FROM dblink('hostaddr=127.0.0.1 port=5432 dbname=store_b user=postgres password=mypwd', 'SELECT id,name,year
FROM user_basic;')
AS t1(id integer ,name character varying(10) ,year integer) ;
SELECT user_basci.name,user_basci.year
FROM user_basci LEFT JOIN dblink('hostaddr=127.0.0.1 port=5432 dbname=store_b user=postgres password=mypwd', 'SELECT name,year
FROM user_basic;')
AS t1(name character varying(10) ,year integer) on user_basci.name=t1.name where length(t1.name)>0;