Thursday, October 29, 2015

Exporting Access Data to MySQL

source: http://dev.mysql.com/doc/


http://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-walkthrough.html

On system ALPHA (the MySQL server) follow these steps:
  1. Start the MySQL server.
  2. Use GRANT to set up an account with a user name of myuser that can connect from system BETA using a password of myuser to the database test:
    GRANT ALL ON test.* to 'myuser'@'BETA' IDENTIFIED BY 'mypassword';
    
    For more information about MySQL privileges, refer to MySQL User Account Management.
On system BETA (the Connector/ODBC client), follow these steps:
  1. Configure a Connector/ODBC DSN using parameters that match the server, database and authentication information that you have just configured on system ALPHA.
    ParameterValueComment
    DSNremote_testA name to identify the connection.
    SERVERALPHAThe address of the remote server.
    DATABASEtestThe name of the default database.
    USERmyuserThe user name configured for access to this database.
    PASSWORDmypasswordThe password for myuser.
  2. Using an ODBC-capable application, such as Microsoft Office, connect to the MySQL server using the DSN you have just created. If the connection fails, use tracing to examine the connection process. See Section 5.8, “Getting an ODBC Trace File”, for more information.

/////////////////////

6.4.1 Exporting Access Data to MySQL

To export a table of data from an Access database to MySQL, follow these instructions:
  1. When you open an Access database or an Access project, a Database window appears. It displays shortcuts for creating new database objects and opening existing objects.
    Access Database
  2. Click the name of the table or query to export, and then in the File menu, select Export.
  3. In the Export Object Type Object name To dialog box, in the Save As Type box, select ODBC Databases () as shown here:
    Selecting an ODBC Database
  4. In the Export dialog box, enter a name for the file (or use the suggested name), and then select OK.
  5. The Select Data Source dialog box is displayed; it lists the defined data sources for any ODBC drivers installed on your computer. Click either the File Data Source or Machine Data Source tab, and then double-click the Connector/ODBC or Connector/ODBC 3.51 data source to export to. To define a new data source for Connector/ODBC, please Section 5.3, “Configuring a Connector/ODBC DSN on Windows”.
Note
Ensure that the information that you are exporting to the MySQL table is valid for the corresponding MySQL data types. Values that are outside of the supported range of the MySQL data type but valid within Access may trigger an overflow error during the export.
Microsoft Access connects to the MySQL Server through this data source and exports new tables and or data.

MDB Tools

source: http://mdbtools.sourceforge.net/

key MDB Tools

What is MDB Tools?
The MDB Tools project is a effort to document the MDB file format used in Microsoft's Access database package, and to provide a set of tools and applications to make that data available on other platforms.
Specifically, MDB Tools includes programs to export schema and data to other databases such as MySQL, Oracle, Sybase, PostgreSQL, and others.
Also included is a SQL engine for performing simple SQL queries. The 0.5 release includes an updated GUI interface (screenshot is available here). A sparse but functional ODBC driver is included as well.
MDB Tools currently has read-only support for Access 97 (Jet 3) and Access 2000/2002 (Jet 4) formats. Write support is currently being worked on and the first cut is expected to be included in the 0.6 release.
For more information check our FAQ and our Installation Guide. Also see our SourceForge Page for forums, bugtracking, CVS, et al.
Getting MDB Tools?
Source code for MDB Tools is available from CVS at sourceforge. To anon cvs it, do like this (there is no password, so just hit Enter when asked):
cvs -d:pserver:anonymous@mdbtools.cvs.sourceforge.net:/cvsroot/mdbtools login
cvs -z3 -d:pserver:anonymous@mdbtools.cvs.sourceforge.net:/cvsroot/mdbtools co mdbtools

Alternatively, you can obtain the 0.5 release or the 0.6pre1 release. And 0.5 RPMs for i386 Linux are available here.
Mailing List
There is a mailing list for those having trouble or who are interested in helping or tracking MDB Tools progress. To subscribe go to http://lists.sourceforge.net/mailman/listinfo/mdbtools-dev
Resources
Here are some resources that may be useful with MDB Tools (Note: Microsoft reorganized and removed some of these, so they are left as an aid to tracking down the new locations, if any).
MSDN

when this page opens, on the left side, click on books, then microsoft jet database engine programmers guide. There are 13 chapters & 5 appendices.

Here's a couple of links that talk about the size of some of the objects:


sudo apt-get install mdbtools

ODBC

In order to use ODBC you must place an entry in the odbc.ini file.
Example 6-1. odbc.ini file
[Northwind]
Description = Northwind Sample Database
Driver = /usr/local/lib/libmdbodbc.so
Database = /data/mdbfiles/Northwind.mdb
Consult the unixODBC documentation for full details.

   

Thursday, October 15, 2015

원목마루, 온돌마루, 강마루, 강화마루

source : http://clien.net/cs2/bbs/board.php?bo_table=kin&wr_id=3285129

건축용 마루는 원목마루, 온돌마루, 강마루, 강화마루 4종류로 구분됩니다.
원목마루가 가장 비싸고 온돌마루와 강마루가 가격이 비슷하며 강화마루가 가장 쌉니다.

강화마루는 아래에 톱밥을 채우고 나무 무늬 필름지를 붙인 이름만 마루고 실제 나무라고 볼 수 없습니다.
그리고 시공방법도 원목마루, 온돌마루, 강마루와는 달리 접착식이 아닌 조립식입니다.

원목마루, 온돌마루, 강마루는 모두 합판위에 무늬목을 붙인 마루로 제조방법이 비슷합니다.

하지만 강마루는 합판 위에 강화마루처럼 나무 무늬 필름지를 붙인 것으로
무늬목이 천연나무가 아닌 합성필름지입니다.

온돌마루와 원목마루는 합판위에 천연나무 무늬목을 붙인 것으로 거의 같다고 보시면 됩니다.
차이점은 원목마루는 무늬목이 두껍고 온돌마루는 원목마루보다 무늬목이 좀 얇다는 것입니다.
즉 같은 마루에 무늬목이 두꺼우면 원목마루, 무늬목이 좀 얇으면 온돌마루라고 하는 것 입니다.

즉 진정한 천연나무로 만든 마루는 원목마루와 온돌마루입니다.
강마루와 강화마루는 나무 무늬 흉내를 낸 목재 비슷한 장판이나 마찬가지라는 거죠.
하지만 강마루와 강화마루도 장점이 있습니다. 바로 찍힘이나 스크래치 같은 하자에 강하다는거죠.
무늬목이 천연나무가 아니기때문에 손상에 강합니다.
대신 마루의 질감이 원목마루나 온돌마루처럼 진짜 나무의 느낌이 아니라
나무 무늬 장판 같은 플라스틱 느낌이라는게 단점이죠.

그리고 마루가 목재이다보니 여름에 습기를 빨아들이고 겨울에 습기를 내뿜는 작용을 합니다.
그걸 마루가 숨을 쉰다고 표현하는데
그 작용이 천연나무인 원목마루나 온돌마루가 뛰어나고 강마루가 그 다음이고....
강화마루는 그 작용 자체가 아예 없습니다. 강화마루는 사실상 목재가 아닙니다.

시공방법은 원목마루, 온돌마루, 강마루는 친환경접착제를 이용하여
방통바닥(시멘트 몰탈)에 접착하는 방식이고
강화마루는 바닥에 접착없이 조립하는 방식입니다. 그래서 바닥에 붙어 있는게 아니라 붕 떠있습니다.
따라서 보일러 난방이 99%인 한국에선
조립식인 강화마루는 바닥난방 효과가 떨어집니다. 접착식인 원목, 온돌, 강마루가 난방이 잘 되죠.
그 중에서도 보일러 바닥난방의 효과가 가장 좋은게 온돌마루입니다.
그래서 원래 정식명칭인 합판마루 대신 온돌마루라고 부르는 것이구요.

포스코더샾, GS자이, 롯데캐슬, 현대힐스테이트, 삼성래미안, 대우푸르지오 등의
국내 1군건설사 아파트는 99%이상 온돌마루를 시공합니다.
물론 원목마루가 가장 고급스럽고 좋지만 가격이 온돌마루의 3배 이상으로 비싸기 때문에
원목마루는 강남의 고급 주택 단지 등에 개인적으로나 시공되는 편입니다.
무늬목의 고급스러움을 유지하면서 가격대비 가장 만족도가 높은게 온돌마루이기때문에
국내 1군건설사 브랜드아파트는 99%이상 온돌마루를 시공합니다.
온돌마루나 원목마루는 다른건 같은데 두께만 다른 것이기때문에 시공해놓으면 겉보기엔 같거든요.

강마루와 강화마루는 하자관리가 용이하고 가격이 싸기때문에
고급스러움이 좀 떨어져도 괜찮은 다세대빌라나 중저가브랜드 아파트에 주로 시공됩니다.

동네 인테리어샵이나 마루대리점 같은 소매점들은
강마루나 강화마루가 좋다며 강마루 강화마루를 많이 권합니다.
그 이유는 건설사의 브랜드아파트에는 마루를 직접 제조하는 마루제조회사들이
직접 입찰을 들어가서 낙찰받은 회사가 납품하고 시공하기때문에
소매점 대리점들은 건설사는 상대를 못하기때문에 온돌마루 취급을 많이 안합니다.
그래서 자기들이 많이 취급하는 강마루나 강화마루를 많이 권할수 밖에 없죠.
강마루가 잘 안찍혀서 좋다는 장점만 말하면서요ㅎ
강마루나 강화마루는 무늬목이 천연나무가 아니고 나무무늬 합성필름지라는 얘기는 안하죠.
그냥 간단히 상식적으로 생각해보면 됩니다.
유명한 대기업건설사들의 고급브랜드아파트는 99% 온돌마루 씁니다.
그것만봐도 뭐가 가장 가격대비성능이 제일 좋은지 알수있죠.
강마루나 강화마루는 필름지라 표면 질감이 떨어지고
나무의 숨쉬는 작용을 못해서 습도조절 능력이 없으며
미관상 고급스럽지않아서 고급브랜드아파트엔 안쓰고 저가빌라, 다세대주택에서 많이 쓰죠.
물론 위에 썼다시피 가장 좋은건 원목마루지만 원목마루는 가격이 3배이상이라
가격대 효율이 떨어져서 대기업건설사의 고급브랜드아파트는 99% 온돌마루 씁니다.
국내 굴지의 건설사들이 많은 실험과 조사를 통해 최적의 바닥재로 선택해서
자신들의 브랜드 아파트에 시공하는게 온돌마루입니다.
그것만 보면 무엇이 가장 합리적인 선택인지 판단이 되실 것입니다.

Transform a CSV file into a JSON file with Python


source: http://jaranto.blogspot.kr/2012/12/transform-csv-file-to-json-file-with.html

Transform a CSV file into a JSON file with Python

 Thursday, December 13, 2012  Antonio Pintus  2 Comments
UPDATE: now on GitHub.



Here's the code. Create a file (for example) named csv2json.py with content:



import csv
import sys
import json

#EDIT THIS LIST WITH YOUR REQUIRED JSON KEY NAMES
fieldnames=["firstname","secondname","age"]

def convert(filename):
csv_filename = filename[0]
print "Opening CSV file: ",csv_filename
f=open(csv_filename, 'r')
csv_reader = csv.DictReader(f,fieldnames)
json_filename = csv_filename.split(".")[0]+".json"
print "Saving JSON to file: ",json_filename
jsonf = open(json_filename,'w')
data = json.dumps([r for r in csv_reader])
jsonf.write(data)
f.close()
jsonf.close()

if __name__=="__main__":
convert(sys.argv[1:])

USAGE:

python csv2json.py myCSVfile.txt

Wednesday, October 7, 2015

무상지분 계산법

재건축시 무상지분율 계산법 출처 : 네이버 블로그 | 약속의땅공인중개사사무소 http://me2.do/GNA5l22C