2013年11月5日 星期二

Install Solr-4.5.1 on Tomcat 6.0

Here’s the steps

1. Get your Tomcat installed and TOMCAT_HOME system variable defined

2. Modify server.xml  from TOMCAT_HOME\conf\ as below

    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
      redirectPort="8443" URIEncoding="UTF-8" />

3. Add solr.xml into TOMCAT_HOME\conf\Catalina\localhost with content

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="D:/dev/apache/tomcat60/webapps/solr.war" debug="0" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="D:/dev/apache/solr/example/solr" override="true"/>
</Context>

4. Extract solr4.5.1.zip into D:/dev/apache/solr

5. Copy jars under D:\dev\apache\solr\example\lib\ext into TOMCAT_HOME\lib

6. Copy  D:\dev\apache\solr\example\resources\log4j.properties into TOMCAT_HOME\lib

7. Start the tomcat service

Exception:

if you get to see error message below, check the apache wiki for a solution  http://wiki.apache.org/solr/SolrLogging

SEVERE: Error filterStart

2013年10月15日 星期二

mysql update inner join

 

update pollexsurvey.pls_answer a inner join pollexsurvey.pls_respondent r
on a.respondent_uid=r.uid set a.respondent_id=r.respondent_id

2013年9月6日 星期五

HOWTO: Setup SQL Server Linked Server to MySQL

http://www.ideaexcursion.com/2009/02/25/howto-setup-sql-server-linked-server-to-mysql/

Different Options for Importing Data into SQL Server

http://www.mssqltips.com/sqlservertip/1207/different-options-for-importing-data-into-sql-server/

Sample : 
Create LinkedServer:
EXEC master.dbo.sp_addlinkedserver @server='MYSQL', @srvproduct='MySQL',
@provider='MSDASQL', @provstr='DRIVER={MySQL ODBC 5.2 Unicode Driver};SERVER=192.168.0.10;Port=3306;USER=root;PASSWORD=pollex123;OPTION=3;DATABASE=pollexsurvey';
Reseed:
DBCC CHECKIDENT ( pls_respondentdetail_extsat
, RESEED, 830);
DBCC CHECKIDENT ( pls_respondentdetail_extsat
, NORESEED);
Select Query:
SELECT * FROM OPENQUERY(pollexsurvey,
'SELECT * FROM pls_question')
Select INTO:
SELECT * INTO internalSat.dbo.pls_question FROM OPENQUERY(MYSQL,
'SELECT * FROM pls_question')
Insert Query:
INSERT OPENQUERY(MYSQL,'SELECT * FROM contact') SELECT * FROM contact

Update query:
UPDATE OPENQUERY(MYSQL,'select fax from contact where id=482') SET fax='123456'
Delete Query
DELETE OPENQUERY(mysql,'select fax from contact where id=482') 

2013年6月4日 星期二

房東筆記

 

宅 安 修   a034510151@yahoo.com.tw    0925-218703
桃園縣中壢市福州二街

騰祥家電 服務電話:0931-123-323,03-434-2831
服務住址:中壢市福州二街71號

2013年3月9日 星期六

Windows自動關機指令shutdown與 at指令

 

系統內建 shutdown.exe 這個程式
立即關機:
shutdown -s -t 0
登出:
shutdown -l
立即重新啟動 :
shutdown -r -t 0
windows XP 快速關機指令
shutdown -s -f -t 0
* 電腦將在30秒後電腦.並跳出警告視窗
SHUTDOWN -S -T 30 -C "你的電腦將在30秒後電腦"
* 取消關機
SHUTDOWN -A
* 每個禮拜一的上午九點這個關機程式就會自動執行
at 9:00 /EVERY:MONDAY "SHUTDOWN -S -T 30 -C "電腦將在30秒後電腦" "
* 每個月的第 1 與 15 天上午九點執行重新開機
at 9:00 /every:1,15 "SHUTDOWN -r -T 30 -C "電腦將在30秒後重新開機" "
* 在每週(一二三)的八點三十分.執行auto.bat
at 08:30 /every:M,T,W "c:auto.bat"
Windows XP 自身就具備定時關機的功能。
Windows XP的關機是由Shutdown.exe程序來控制的,位於Windows\System32文件夾中。
Windows 2000安裝時並沒有附加這個檔案,從WindowsXP的電腦把Shutdown.exe複製到windows2000系統目錄下也就是
%System Driver% %System Directory%
一般來說 是位於 C:WinntSystem32 底下
這樣windows2000就也可以執行 shutdown.exe了
使用方式: shutdown [-i | -l | -s | -r | -a] [-f] [-m computername] [-t xx] [-c "comment"] [-d up:xx:yy]
沒有引數顯示這個訊息 (和 -? 相同)
-i顯示 GUI 介面,必須是第一個選項
-l登出 (不能和 -m 選項一起使用) -s電腦關機
-r關機並重新啟動電腦
-a中止系統關機?
-m computername從遠端進行關機/重新啟動/中止
-t xx將關機等候時間設定成 xx 秒
-c "comment"關機註解 (最多 127 個字元)
-f強制關閉執行中的應用程式,不顯示警告
-d [u][p]:xx:yy關機原因代碼
u 是使用者代碼
p 是預先計劃的關機代碼
xx 是主要原因代碼 (小於 256 的正整數)
yy 是次要原因代碼 (小於 65536 的正整數)
Microsoft Windows 命令介紹 : at.exe 與工作排程
at.exe 的用途是控制工作排程,相對應的圖形化介面是控制台裡面的「排定的工作」,指令為
> control schedtasks
使用 at.exe 新增加的工作都會在「排定的工作」裡面顯示出來。
要讓 at.exe 排出來的工作正常啟動運作的話,必要條件是 Task Scheduler 這個服務有被啟動。
使用方式
語法如下:
at [computername] [ [id] [/delete] | /delete [/yes]]
at [computername] time [/interactive] [ /every:date[,…] | /next:date[,…]] "command"
要注意的是參數的順序不能對調,例如 id 一定要在 /delete 之前。詳細參數說明如下:
computername
在指定的遠端電腦上排定工作。
id
工作的識別碼。每一個排定的工作都會有一個唯一的數字,也就是這個工作的 id ,用來代表整個工作。
/delete
刪除工作。
/yes
在刪除全部工作時,自動回答 yes 。
time
指定工作執行的時間,時間的格式為:
hh:mm
其中 hh 表示小時, mm 表示分鐘,使用的是 24 小時的格式。例如下面這個代表晚上七點三十分:
19:30
/interactive
讓工作在執行時與當時登入的使用者互動,如果沒有使用這個參數的話,工作會在背景執行。
/every:date[,…]
在每月的指定日期執行工作。
/next:date[,…]
在下次的指定日期執行指令。
date[,…]
date 的格式為 dd 或 ww ,要指定多個日期時可以 , 隔開。其中 dd 是一個數字,代表一個月的第幾天。例如
/every:15,30
表示每月的第 15 與 30 天執行工作。另一種格式 ww 則是代表星期,中文的星期用一、二、三、四、五、六、日來表示。
英文則以 […]

2013年3月7日 星期四

在html裡~開啟網路磁碟機的資料夾

 

如何在html裡~開啟網路磁碟機的資料夾!!

標籤:網頁設計

  • 目前在寫一個企業內部的網站~~server設有各部門專用的資料夾~~平常都是設好路徑,例\\192.168.0.1\mis$~就可以開啟資料夾~~想請問可以在html(iis server架設)中一樣設好路徑~~按下超連結就可以像平常開資料夾一樣打開嗎?

發佈

最佳解答(發問者自選)

5

回答:wiseguy ( iT邦超人10級 )

時間:2012-06-15 22:22:57

加上一個 IE 專用的 css 試試看 (只有 IE 能用喔)

檢視原始檔複製到剪貼簿列印關於

  1. <HTML>  
  2. <HEAD>  
  3. <STYLE>  
  4. A {behavior: url(#default#AnchorClick);}  
  5. </STYLE>  
  6. </HEAD>  
  7. <BODY>  
  8. <A HREF="\\192.168.0.1\mis$" FOLDER="\\192.168.0.1\mis$">共享資料夾</A>  
  9. </BODY>  
  10. </HTML> 

[-隱藏]

回應

1

hothotithome 說:

wiseguy~~我還是不能用耶~~請問有for firefox的語法嗎~~公司打算都用火狐!!

2012-06-18 09:31:41

2

wiseguy 說:

如果是 IE,至少在 local 開啟網頁裡的
<a htrf="file:////192.168.0.1/mis$">共享資料夾</a>
是 OK 的。但其它瀏覽器則一概因為安全性問題,file:// 都是沒有作用的。
假如要讓 filefox 可以用 file://,你得去每一台電腦放一個設定檔,改變 filefox 的檔案存取原則才行。方法在此:
http://www.techlifeweb.com/firefox/2006/07/how-to-open-file-links-in-firefox-15.html
相信你不想這麼累。不過另外有個解法可以提供你參考,就是讓共享目錄直接變 http 檔案瀏覽模式。請參考另一位邦友問的問題:
http://ithelp.ithome.com.tw/question/10093747

2012-06-21 00:13:51

如何在html裡~開啟網路磁碟機的資料夾!!

ninja( iT邦初學者7級 )
2012-06-17 01:08:07

以前用過 a href 測過,網芳似乎只能用IE開,其它瀏覽器應該都開不起來

檢舉

回應

ccutmis( iT邦初學者6級 )
2012-06-18 10:49:13

您的需求或許可以用WEBDAV來解決~自己上google搜尋看看:
http://technet.microsoft.com/zh-tw/library/cc781730(WS.10).aspx
http://www1.cpshs.hcc.edu.tw/leson/win2003/new_page_1.htm

2013年2月22日 星期五

@JoinColumn is part of the composite primary keys

 

http://dwuysan.wordpress.com/2012/02/22/joincolumn-is-part-of-the-composite-primary-keys/

Hibernate Named Query Examples

 

http://www.mkyong.com/hibernate/hibernate-named-query-examples/

Hibernate: Use a Base Class to Map Common Fields

 

http://ocpsoft.org/java/hibernate-use-a-base-class-to-map-common-fields/

Spring Data JPA Tutorial Part Three: Custom Queries with Query Methods

 

http://www.petrikainulainen.net/programming/spring-framework/spring-data-jpa-tutorial-three-custom-queries-with-query-methods/

Configure hibernate with Spring XML

 

http://camelcode.org/tutorial/Configure-hibernate-with-Spring-XML.htm

how to return Map<Key,Value> with HQL

http://stackoverflow.com/questions/7876724/how-to-return-mapkey-value-with-hql

what is a good pattern for converting between hibernate entities and data transfer objects?

http://stackoverflow.com/questions/4558233/what-is-a-good-pattern-for-converting-between-hibernate-entities-and-data-transf

Avoiding secondary selects or joins with Hibernate Criteria or HQL query

 

http://stackoverflow.com/questions/2934753/avoiding-secondary-selects-or-joins-with-hibernate-criteria-or-hql-query

2013年2月18日 星期一

OpenKM: Open Source Doc Management, AJAX Style

 

By Brice Dunwoodie (@cmswire)   Dec 22, 2006   

OpenKM.pngAs every other application under the sun goes AJAX, its about time Document and Knowledge Management had its share of Web 2.0 spin. There's some meat to this message however. The Spain-based OpenKM project is delivering real and open source Document Management and Knowledge Management functionality for the small, medium enterprise.

While still fairly basic, OpenKM is making some waves in Open Source Document Management channels with its dual merits of being 100% open source and sporting some nice AJAX interface behaviors.

OpenKM's primary function is as a centralized storage system for unstructured data. For comparison, think Oracle Drive, Xythos On Demand (SaaS document management),Windows SharePoint Services (WSS), O3Spaces (open source), and quite a few others.

Key product functionalities include:

  • Centralized document storage
  • Document check-in/check-out, and locking.
  • Document versioning
  • User specific document wastebaskets with retrieval
  • Document indexing (for search) — Text, Office, OpenOffice, PDF, and others
  • Event notifications via email
  • Role based security with LDAP integration
  • Remote Access via the Web Client
  • Multi-lingual, skinnable interface
  • Open programming API for integration and workflow
  • Optional Hosted Configuration — Multiple companies or departments hosted on a single instance.

OpenKM Document Context Menu
openkm-menu.jpg

From the start the OpenKM project's mission included the requirement of utilizing only free software products and technologies. The resulting package is based on J2EE technology and runs on the JBoss application server. As such, the software can be deployed on just about any server platform.

The OpenKM architecture is based on the following technologies:

  • Google Web Toolkit (GWT)
  • Java J2EE with Enterprise Java Beans
  • JBoss 4.0.3 app server from Red Hat
  • Apache Jackrabbit — The open source Java Content Repository (JSR-170/JSR-283)
  • SGBD (Oracle, PostgreSQL, Mysql, etc..)

OpenKM Architecture
openkm-arch.gif

The OpenKM project has been a joint collaboration between the Spanish government and private consulting firm GIT Consultors. The software is freely downloadable and conveniently there is a semi-functional demonstration site here.

As we say, the project is yet a bit simple, but it shows some promise and if a community develops around it, it could prove to be a viable option for tech savvy small, medium enterprises looking for an open source document management solution.

2013年2月16日 星期六

Agile Development

 

Disadvantages of Agile Development

http://www.planbox.com/resources/agile-project-management

Agile Software-Development Benefits

https://www.ibm.com/developerworks/mydeveloperworks/blogs/invisiblethread/entry/five_benefits_of_agile_practices?lang=en

http://gunnertech.com/2011/12/what-are-the-agile-development-advantages/

continuous integration agile development

http://www.quora.com/Murray-Robinson/Posts/The-benefits-of-agile-for-a-web-design-and-development-agency

http://www.pentalog.com/approach/agile-scrum-methodology.htm

Tomcat tips

 

Best Practices for Securing Apache Tomcat 7

Factors to consider in determining number of concurrent instances for your hardware

Allocating more RAM to Apache Tomcat on Windows

Differences Between tc Server and Apache Tomcat

JBoss vs Tomcat and Spring: the never ending battle

详解Tomcat 7的七大新特性和新增功能(1)

http://wiki.apache.org/tomcat/PoweredBy

18 Java Tomcat Application Optimization Tips

Performance Tuning in Apache Tomcat 6

Tomcat Performance Tuning Tips

Performance Tuning the JVM for Running Apache Tomcat

Tomcat Production Server – Performance Tuning

Dojo v.s. jQuery

 

http://blog.csdn.net/dojotoolkit/article/details/7682978

HTML5

 

http://www.inside.com.tw/2011/07/31/html5-tutorial-for-beginners

http://i.see-design.com.tw/2012/05/30-html5.html

http://introducinghtml5.com/

http://diveintohtml5.info/

Dojo Mobile

 

http://www.ibm.com/developerworks/cn/mobile/mo-dojo-mobile-performance/index.html

http://www.ibm.com/developerworks/cn/web/wa-getstarteddojo/

http://www.ibm.com/developerworks/mobile/library/mo-dojo-mobile-new-18-2/index.html

https://www.ibm.com/developerworks/mydeveloperworks/blogs/mobileblog/entry/dojo_mobile_the_best_choice_for_mobile_enterprise_apps1?lang=en

http://www.ibm.com/developerworks/websphere/techjournal/1209_hao/1209_hao.html

http://www.technicaladvices.com/2012/05/31/developing-weather-application-using-dojo-mobile/

http://stackoverflow.com/questions/9845761/starting-point-for-dojo-based-offline-storage-mobile-app

jQuery mobile

 

Top 10 Mobile Web Development JavaScript Frameworks

http://www.jquerymobilein24.com/blog/

Integrating the mobile web into enterprise apps: html5, Dojo mobile, jQuery and more

個人比較了幾個 mobile web framework

http://www.gbin1.com/technology/jquerymobile/20120814-dojo-mobile/

http://blog.amadeusconsulting.com/jquery-dojo-and-ext-js-comparing-ui-technologies/

2013年1月23日 星期三

Subversion Best Practices: Repository Structure

Published by jthornsby on October 24, 2011 in Subversion and WANdisco. 4CommentsTags: best practices, open source, oss, subversion, wandisco, wdfront.

Maintaining a Subversion repository can become a complex task, and implementing the right project layout from the very beginning is crucial. As Subversion doesn’t impose a strict file structure, users are free to tailor Subversion repositories to their project’s needs. Users can organize Subversion on a ‘one project per repository’ basis or create multiple projects within the same repository; and have considerable freedom when it comes to how they use Subversion’s trunk and branches. In this post, we’ll look at some guidelines and best practices on how to keep Subversion files, for users who are embarking on a new project in Subversion.

Multiple Projects: Single Repository vs. Multiple Repositories

In modern software development, it’s normal for teams to be working on multiple projects simultaneously. If this sounds like your organization, the first question you’ll need to answer is: should I set up a single repository for multiple projects, or create one repository per project? Although the experience will be slightly different for each project, there are some general benefits and drawbacks to each approach.

Single Repository

Single repositories are typically suited to organizations managing multiple, small projects that require cross references, cross tracking, etc.

Positives:

  • there is a single location where all the code is stored, even for projects you aren’t directly involved in.
  • ability to reuse common libraries.
  • lack of duplicated maintenance (e.g only one repository needs to be backed up.)
  • the ability to move data between projects more easily, and without losing any versioning information.
  • all projects share the same repository history.
  • typically less administration – new projects can be created without creating a new repository, and without the help of sysadmin.
  • you can delete entire projects without losing the record from Subversion.

Negatives:

  • Subversion uses repository-global revision numbers which apply to entire trees, not to individual files. The revision number for projects will increase in accordance with the rest of the repository, even if no changes have been made to that particular project.
  • unable to use unified logging (svn log command).
  • branching can be complex when many folders and files are involved.
  • dumping/loading one huge repository can be time-consuming.

Multiple repositories

These are typically suited to multiple large unrelated projects.

Positives

  • the ability to define different access permissions, for different users.
  • each project repository will have its own revision sequence.
  • the version number is meaningful for all projects.
  • projects have a tendency to increase in size, and numerous large projects on a single repository can become difficult to maintain. It is typically easier to manage large projects with a ‘one repository per project’ approach.
  • can tailor each repository’s structure to suit a project’s unique needs. This can include branching, tagging, naming conventions, etc.

Negatives:

  • Subversion does not support merging code between projects in different repositories, and the transplanted code will appear in the new repository with no history. This also means you cannot perform merges if you need to temporarily maintain two versions of related code.
  • different projects have different mailing lists, which can be a problem if there’s cross-over between two related, but separate, projects.

There is also the potential to have more than one repository, and to group related projects within the same repository. This allows related projects to share data, and when new revisions are added to a repository, they are more likely to be relevant to everyone who uses the repository.

Project Layout

Once you’ve decided whether to organize your projects in a single or multiple repository structure, it’s time to plan your project layout. Putting some thought into your layout in the beginning, can help you avoid having to move files around later.


An illustration of how a Subversion Repository evolves using branching, tagging and a code trunk.

Here are some best practices for getting the most out of your project layout:

  • Project root – This is the anchoring point for a project. A repository may contain one project root, or multiple roots, but each project root contains three subdirectories: /trunk, /branches, and /tags. The use of a project root is officially recommended by the Apache Subversion project.
  • Trunk - This is where you should store current release code – only! Don’t muddy the trunk directory with revisions or release names.
  • Branches – Use these to work on significant changes, variations of code etc, without disrupting the current release code.
  • Bug fixing on a branch – Branches should be created to fix major bugs; this allows bug changes to be immediately worked on without disrupting whatever work is currently underway in the trunk/development branches.
  • “Toe in the water” branches – Branches can be used as a code “sandbox” where new technology can be tested without risking the working code. If things go right, the new code can always be merged back into the trunk.
  • Tags – Should be used as “code milestones” providing a snapshot of the code at specific points in its history.
  • Tagging bug fix / development branches – when creating a code or bug fix branch, it’s useful to create a “pre” tag, and a “post” tag after the bug fix or code change has been completed:

http://10.2.5.2:9880/encom/tags/PRE_authchange_bug9343

http://10.2.5.2:9880/encom/tags/POST_authchange_bug9343


Ready to start a new project with Apache Subversion? Certified open source Apache Subversion binaries can be downloaded from the WANdisco website.

avatar

About jthornsby

4 Responses to “Subversion Best Practices: Repository Structure”
  • avatarJulio Aguilar

    October 29, 2011 at 4:39 pm

    In my company we use three big repositories and the big size and maintenance points are spot on.

    Yet, I differ in two smaller points:
    - Revision numbers have become completely irrelevant for us. Using the proper tools (in our case, mainly, TortoiseSVN, Netbeans and sventon) we use dates, comments and diffs to find previous versions and nobody even flinches about numbers not being consecutive in a particular project.
    - SVN through apache allows to set permissions to users in particular paths in one repository.

  • avatarSeanJA

    October 30, 2011 at 5:27 am

    “the ability to define different access permissions, for different users.”

    You can still do this with one repo though… you can define per folder access permissions.

    Here is an example:

    http://www.thinkplexx.com/learn/howto/svn/advanced/enabling-per-directory-permissions-in-subversion-with-apache-svn-access-file-ldap-tutorial#highlighter_828646

  • avatarDaniel

    October 8, 2012 at 1:40 pm

    Hi

    in the case of cloud based subversion it may be more attractive to have fewer repositories in order to keep the costs down. Each repository may have more than one .NET solution dir structure. Is there anyway to apply separate versioning to each dir structure; with each held under the branch structure?

  • avatarjthornsby

    October 10, 2012 at 10:49 am

    Hi Daniel,

    Thanks for your comment! With Apache Subversion, it’s not possible to have branches with different revision numbers in the same repository. Whenever you perform a commit, the revision number will increase across all of your repository’s files and folders, regardless of whether they’ve actually changed. If revision numbers changing based on other branches is a problem, you should create separate repositories.

« Branching Options for Development

Getting Started with Jenkins in uberSVN »

2013年1月22日 星期二

屋屋租賃房客戶籍遷入會造成的影響

(轉載自591租屋交流討論區 無聊房東 大作)

房客其實只要僅憑著租賃契約書就可以將戶籍遷入承租的房屋中(這也是房客的權利).但因為房客要遷戶籍到租屋處會增加房東某些負擔與風險.
1.出租之房子無法享有自用住宅稅率,地價稅、土地增值稅也會提高.
每年要繳的地價稅稅率會從原來自用0.2%變成1%、增加5倍.
房屋稅如果房客仍供住家使用者,稅額不變。但是如果變成營業用,
a. 水電費會變成營業用。
b. 房屋稅會從住宅用(1.2%)變成營業用(3%)
c. 承租人每年會開立你個人的房屋租賃所得扣繳憑單,會增加個人的綜合所得額。
如果房屋一部分當辦公室,一部分當住家用,則可向稅捐處申請部份當自用住宅、部分當營業的使用情形來分別課稅,稅捐處會派員前往查看實際使用情形後。
土地增值稅問題:將來如果要出售,同樣因為出租他人,而不得享用自用土地增值稅優惠稅率(規定出售前1年不得出租、營業)。也就是說如果房客退租,房東想要把房子賣掉,那房東就不能用自用的土地增值稅.這一個影響很大,從幾千到甚至幾百萬,都是有可能的!!
2.若房客把租金拿去報稅,租金將併入房東的綜合所得裡面,年度所得稅可能會增加.
租賃所得計算方式
租賃所得應就租金收入減除必要費用後的餘額申報。至於減除之必要費用,可採以下方式計算,並擇較高者申報,以達節稅之目的:
(一)列舉扣除租賃合理而必要的損耗及費用:如折舊、修理費、地價稅、房屋稅及其附加捐、以該房屋為保險標的物所投保的保險費、向金融機構貸款購屋而出租所支付利息等之憑證。
(二)不列舉必要的損耗及費用者:依財政部頒定之必要損耗及費用標準(97年度為43%)。
例如月租金10000元,10000x12(月)=120000元(租金總收入)
如果不列舉費用,可扣除43%之(法定)必要費用,所以申報租金收入為120000x(1-43%)=68400元
將租金總收入併入房東綜合所得,再依房東應繳綜合所得稅率計算所得稅,例如級距為6%,依上例,稅金68400x6%=4104元;級距為13%,依上例,稅金為68400x13%=8892元。
納稅是國民應盡的義務,所以合約上租金有沒有包含稅金必須寫清楚.
3.房客將戶籍遷入後,發生卡債欠繳、官司纏身.....等問題.房客逃離卻沒將戶籍遷出.之後所有法院的傳票、甚至"財務管理"公司都會到他的戶籍地址進行一些"必要"的動作,對於房東來說,會是很煩的一件事。
4.房客租約到期搬離,但是戶籍卻沒遷出.
房東可以帶所有權狀(稅單)、身分證、印章、已到期合約書,到戶政事務所請求將房客的戶籍遷離.此後房東不會再有此房客戶籍上的困擾。將來該房客要遷戶籍時,可在遷入地辦理遷入,與房東無關!!
房客必須具備以下資格,才能申報租金支出列舉扣除:1、所租自用的房子,必須在中華民國境內,且不能當營利事業使用或執行業務(如醫師、律師、會計師、代書)使用的房屋;2、租屋人必須是納稅人本人、配偶或受扶養直系親屬,其他受扶養親屬名義租的房子不可認列;3、房客應以實際的房租支出申報,最高以12萬為上限;4、不能同時列報購屋自住貸款利息支出。

2013年1月4日 星期五

公寓變套房,房東裝修前須提申請

 

發表日期: 2010-07-26 11:22


「包租公」、「包租婆」必須注意了!為避免改裝的公寓有損害公共安全的狀況發生,內政部在96年發布了新的解釋,規定房東不得擅自變更房屋格局,如要變更,必須先提出申請,否則視同違建,將處六萬到三十萬罰緩,甚至強制拆除。

96年二月開始 公寓裝修有新規定
以目前一般住宅產品的投資報酬率在3~5%左右、商用產品4~6%、學區套房約5~8%來看,投資房地產坐收租金,在通膨時代裡,特別讓人心動。不過有一個案例是,一位住在板橋的張先生,因看好木柵政大附近的套房市場,在附近社區買了間30坪舊公寓,打算將原本三房二廳的格局改建成幾間小套房,沒想到剛裝修好,就收到建設局發文要補申請,否則就視同違建,這讓他非常煩惱,也感到疑惑,為什麼以前這樣做都沒事、現在卻有問題?

在以前,房子裝修,尤其是公寓改裝成套房,依照建築法相關法令規定,五樓以下非供公眾使用的建築物室內裝修,是不必申請許可的。這是由於六層樓以上的集合住宅因為逃生動線較為複雜,公共安全的危險度較高,因此被歸類為「供公眾使用」建築物的範圍之一,所以,以往六樓以上的大樓住戶如果要變更原有的室內格局,包括分間牆及天花板,不管是敲除或是增加,都必須委託開業建築師針對建築物使用材料加以檢討、申請室內裝修執照並簽證負責,以確保整棟大樓的公共安全。

但近幾年有愈來愈多的公寓改建成套房出租的案例,為了避免改裝的公寓有損害公共安全的情形,96年2月26日內政部發布了新的解釋。依據建築法第七十七條之二第一項、第二項規定,指定非供公眾使用建築物之集合住宅及辦公室等,除建築物地面層至最上層屬同一所有權人外,其任一戶有下列情形之一者,應申請建築物室內裝修審查許可:
一、增設廁所或浴室;
二、增設兩間以上之居室造成隔間牆之變更。

也就是說,除了建築物上下樓層都是同一所有權人者外,只要裝修室內,有增設廁所或浴室、或增設兩間以上之居室造成隔間牆之變更,都必須向縣市政府建管處提出申請。

擅自變更 一經檢舉就開罰
在民眾提出申請時,也須依建築物室內裝修管理辦法規定,委請建築師或已向主管機關立案的室內裝修業者提出室內裝修申請,可別以為自己找熟識的裝潢師傅就可以自行變更格局。

如果在沒有建築師、土木技師或結構技師等專業技師的確認下,就擅自敲敲打打,很有可能破壞原本經過精密計算的建築物結構系統及耐震強度。例如幾年前,台南市五名女生因房東違法變更房屋格局,將熱水器安裝在密封陽台,導致一氧化碳中毒死亡,可見隨意變更不僅威脅民眾的生命財產安全,意外發生時可能還要負起刑責。

同時,室內裝修還必須符合法令規定,包括:
一、裝修材料應合於建築技術規則之規定;
二、不得妨害或破壞防火避難設施、消防設備、防火區劃及主要構造;
三、不得妨害或破壞保護民眾隱私權設施。所以,如果像張先生一樣事前未申請,裝修後應趕快補辦申請,以取得主管機關核發的許可證明,否則,一旦有別人檢舉時,就會被處以六萬元以上三十萬元以下的罰鍰。

裝修前先弄清楚相關法規
‧建築法第七十七條之二
建築物室內裝修應遵守左列規定:                                 
一、供公眾使用建築物之室內裝修應申請審查許可,非供公眾使用建築物
    ,經內政部認有必要時,亦同。但中央主管機關得授權建築師公會或
    其他相關專業技術團體審查。                                 
二、裝修材料應合於建築技術規則之規定。                         
三、不得妨害或破壞防火避難設施、消防設備、防火區劃及主要構造。 
四、不得妨害或破壞保護民眾隱私權設施。                         
前項建築物室內裝修應由經內政部登記許可之室內裝修從業者辦理。   
室內裝修從業者應經內政部登記許可,並依其業務範圍及責任執行業務。
前三項室內裝修申請審查許可程序、室內裝修從業者資格、申請登記許可
程序、業務範圍及責任,由內政部定之。

‧建築法第九十五條之一
違反第七十七條之二第一項或第二項規定者,處建築物所有權人、使用人
或室內裝修從業者新臺幣六萬元以上三十萬元以下罰鍰,並限期改善或補
辦,逾期仍未改善或補辦者得連續處罰;必要時強制拆除其室內裝修違規
部分。
室內裝修從業者違反第七十七條之二第三項規定者,處新臺幣六萬元以上
三十萬元以下罰鍰,並得勒令其停止業務,必要時並撤銷其登記;其為公
司組織者,通知該管主管機關撤銷其登記。
經依前項規定勒令停止業務,不遵從而繼續執業者,處一年以下有期徒刑
、拘役或科或併科新臺幣三十萬元以下罰金;其為公司組織者,處罰其負
責人及行為人。

出處來源:永慶房仲網