2016年9月5日 星期一



補充「利用WORD打印小冊子的說明」(圖示)


看了昨天的「利用WORD打印小冊子的說明」,我想做一些補充,方便同修打印。用WORD打印小冊子,最麻煩的是頁數的計算。若小冊子總共的頁數改變了,我們打印的時候就要全部重新計算了。這裏是已經計算好的頁碼排列,希望有便於大家製作材料:
第一種:騎馬訂方式

小冊子的大小:A5 (A4的一半)
WORD文件頁面設置:A5 (A4的一半)
打印方法:雙面
裁剪:不需要。在A4紙上雙面打印之後,按頁碼順序排好,從中線直接裝訂再對折成冊。
注意:因為一面A4紙是打2頁(又是正反兩面,合起來一張A4紙上打4頁),所以排版時最好是4的倍數,便於處理,如實在不夠,要在文件的末尾增加空白頁來湊足。
總頁數
打印頁碼
4
4,1,2,3
8
8,1,2,7,6,3,4,5
12
12,1,2,11,10,3,4,9,8,5,6,7
16
16,1,2,15,14,3,4,13,12,5,6,11,10,7,8,9
20
20,1,2,19,18,3,4,17,16,5,6,15,14,7,8,13,12,9,10,11
24
24,1,2,23,22,3,4,21,20,5,6,19,18,7,8,17,16,9,10,15,14,11,12,13
28
28,1,2,27,26,3,4,25,24,5,6,23,22,7,8,21,20,9,10,19,18,11,12,17,
16,13,14,15
32
32,1,2,31,30,3,4,29,28,5,6,27,26,7,8,25,24,9,10,23,22,11,12,21,
20,13,14,19,18,15,16,17
36
36,1,2,35,34,3,4,33,32,5,6,31,30,7,8,29,28,9,10,27,26,11,12,25,
24,13,14,23,22,15,16,21,20,17,18,19
40
40,1,2,39,38,3,4,37,36,5,6,35,34,7,8,33,32,9,10,31,30,11,12,29,
28,13,14,27,26,15,16,25,24,17,18,23,22,19,20,21
小冊子的大小:A6 (A4的四分之一)
WORD文件頁面設置:A6 (A4的四分之一)
打印方法:雙面
裁剪:在A4紙上雙面打印之後,從長邊的中間橫著裁成兩份,將各份按頁碼順序排好後,從中線裝訂再對折即可。
注意:因為一面A4紙是打4頁(又是正反兩面,合起來一張A4紙打8頁),所以排版時最好是8的倍數,如實在不夠,要在文件的末尾增加空白頁來湊足。
總頁數
打印頁碼
8
8,1,6,3,2,7,4,5
16
16,1,14,3,2,15,4,13,12,5,10,7,6,11,8,9
24
24,1,22,3,2,23,4,21,20,5,18,7,6,19,8,17,16,9,14,11,10,15,12,13
32
32,1,2,31,30,3,4,29,28,5,6,27,26,7,8,25,24,9,10,23,22,11,12,21,
20,13,14,19,18,15,16,17
40
40,1,2,39,38,3,4,37,36,5,6,35,34,7,8,33,32,9,10,31,30,11,12,29,
28,13,14,27,26,15,16,25,24,17,18,23,22,19,20,21
48
48,1,46,3,2,47,4,45,44,5,42,7,6,43,8,41,40,9,38,11,10,39,12,37, 36,13,34,15,14,35,16,33,32,17,30,19,18,31,20,29,28,21,26,23,22, 27,24,25
56
56,1,54,3,2,55,4,53,52,5,50,7,6,51,8,49,48,9,46,11,10,47,12,45, 44,13,42,15,14,43,16,41,40,17,38,19,18,39,20,37,36,21,34,23,22, 35,24,33,32,25,30,27,26,31,28,29
64
64,1,62,3,2,63,4,61,60,5,58,7,6,59,8,57,56,9,54,11,10,55,12,53, 52,13,50,15,14,51,16,49,48,17,46,19,18,47,20,45,44,21,42,23,22, 43,24,41,40,25,38,27,26,39,28,37,36,29,34,31,30,35,32,33
72
72,1,70,3,2,71,4,69,68,5,66,7,6,67,8,65,64,9,62,11,10,63,12,61, 60,13,58,15,14,59,16,57,56,17,54,19,18,55,20,53,52,21,50,23,22, 51,24,49,48,25,46,27,26,47,28,45,44,29,42,31,30,43,32,41,40,33, 38,35,34,39,36,37

第二種:邊上裝訂

小冊子的大小:A6 (A4的4分1)
WORD文件頁面設置:A6 (A4的四分之一)
打印方法:雙面
裁剪:把A4紙一開四 (雙面打印之後再裁)
注意:因為一面A4紙是打4頁(又是正反兩面,合起來一張A4紙打8頁),所以排版時最好是8的倍數,便於處理,如實在不夠,要在文件的末尾增加空白頁來湊足。
打印方式1:一次打印兩個小冊子
用此方法打印一次必須同時打印兩個小冊子,優點是A6文件的頁碼順序無需計算、更改,按順序打印即可。用A4紙打印,一頁A4紙是打4頁,正反兩面打印相同內容。由於打印反面時左右會對調,所以第一頁的背面會打印出第二頁。打印完成後,用切紙刀裁成A4的四分之一大,從邊上裝訂成冊。
打印方式2:一次打印一個小冊子
總頁數
打印頁碼
8
1,3,5,7,4,2,8,6
16
1,3,5,7,4,2,8,6,9,11,13,15,12,10,16,14
24
1,3,5,7,4,2,8,6,9,11,13,15,12,10,16,14,17,19,21,23,20,18,24,22
32
1,3,5,7,4,2,8,6,9,11,13,15,12,10,16,14, 17,19,21,23,20,18,24,22,25,27,29,31,28,26,32,30
40
1,3,5,7,4,2,8,6,9,11,13,15,12,10,16,14,17,19,21,23,20,18,24, 22,25,27,29,31,28,26,32,30,33,35,37,39,36,34,40,38
from:
 http://big5.minghui.org/mh/articles/2002/9/13/36487.html 

2016年9月2日 星期五

GIT版本控制

GIT版本控制


Your login attempt was not successful. Please try again.



http://forums.asp.net/t/959371.aspx?Your+login+attempt+was+not+successful+Please+try+again+




1. In Windows Explorer, right-click on your App_Data folder (I'm supposing you're using MDF files in App_Data folder) and go toProperties>Security tab. (If you're using WXPPro and can't see this one, just go Tools > Folder Options > View tab and disable "Simple Sharing" option - the last one. This option is not available in WXPHome)
2. Add user **YOURMACHINENAME**\ASPNET.
3. Grant to this user the Modify/Write permission.
4. Apply to all subsequent files in folder.
* Maybe you must need to check also the ASPNET user hasn't denied the write permission.
This worked fine for me, hope this helps.
----------------------------------------------------------------
i bought the book Microsoft Visual C# 2008 step by step $39.99 (Amazon) and i was having the same problems as everyone else
while reading the book i came acrross this code in chapter 29
just open your web config file and insert the following code as it is written at the header authentication mode
<authentication mode="Forms">
<forms loginUrl="LoginForm.aspx" timeout="5"
cookieless="AutoDetect" protection="All" />
</authentication>
the top line will look like this  <authentication mode="Forms" />           remove the /
the url that is inserted is the name of my login page obviously if your login page is named something different
then insert your login url also if you are using visual studio use the built in web pages to set up ASP .NET configuration
you will find this in your solution explorer just click the last icon on the right
-----------------------------------------------------------------------

Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005

One question I’ve seen asked a few times by people over the last few weeks is “how do I setup the new ASP.NET Membership, Role Management, and Personalization services to use a regular SQL Server instead of SQL Express?” This blog entry walks you though a few simple steps on how to-do this.

Quick Review: What are the new ASP.NET 2.0 Application Services?

ASP.NET 2.0 includes a number of built-in “building block” application services.  We call them “building blocks” because they are useful core frameworks for enabling super-common scenarios with web applications today – and as a result can provide significant productivity wins and time-savings for developers.

They include: a membership API for managing usernames/passwords and secure credential management, a roles API that supports mapping users into logical groups, a profile API for storing arbitrary properties about both authenticated and anonymous users visiting a web site (for example: their zipcode, gender, theme preference, etc), a personalization API for storing control customization preferences (this is most often used with the WebPart features in ASP.NET 2.0), a health monitoring API that can track and collect information about the running state and any errors that occur within a web application, and a site navigation API for defining hierarchy within an application and constructing navigation UI (menus, treeviews, bread-crumbs) that can be context specific based on where the current incoming user is in the site.

The ASP.NET Application Service APIs are designed to be pluggable and implementation agnostic, which means that the APIs do not hardcode the details of where data is stored with them.  Instead, the APIs call into “providers”, which are classes that implement a specific “provider contract” – which is defined as an abstract class with a defined set of methods/properties that the API expects to be implemented.

ASP.NET 2.0 ships with a number of built-in providers including: a SQL Express provider for going against local SQL Express Databases, SQL 2000/2005 providers that work against full-blown SQL Servers, an Active Directory Provider that can go against AD or ADAM implementations, and in the case of site navigation an XML provider that can bind against XML files on the file-system.

The beauty of the model is that if you don’t like the existing providers that ship in the box, or want to integrate these APIs against existing data-stores you are already using, then you can just implement a provider and plug it in.  For example: you might already have an existing database storing usernames/passwords, or an existing LDAP system you need to integrate with.  Just implement the MembershipProvider contract as a class and register it in your application’s web.config file (details below), and all calls to the Membership API in ASP.NET will delegate to your code.

Default SQL Express Providers

Out of the box, most of the ASP.NET 2.0 application services are configured to use the built-in SQL Express provider.  This provider will automatically create and provision a new database for you the first time you use one of these application services, and provides a pretty easy way to get started without a lot of setup hassles (just have SQL Express on the box and you are good to go).  Note that SQL Express databases can also be upgraded to run in the context of full-blown SQL Server instances – so apps built using SQL Express for development can easily be upgraded into a high-volume, clustered, fail-over secure 8P SQL box when your app becomes wildly successful.

How do I change the providers to use SQL Server Instead of SQL Express?

If you want to use a full-blown SQL Server 2000 or SQL Server 2005 database instance instead of SQL Express, you can follow the below steps:

Step 1: Create or obtain a blank SQL database instance

In this step you’ll want to create or obtain a connection string to a standard SQL database instance that is empty.

Step 2: Provision your SQL database with the ASP.NET schemas

Open a command-line window on your system and run the aspnet_regsql.exe utility that is installed with ASP.NET 2.0 in under your C:\WINDOWS\Microsoft.NET\Framework\v2.0.xyz directory. 

Note that this utility can be run in either a GUI based mode or with command-line switches (just add a -? flag to see all switch options).

Using this wizard you can walkthrough creating the schema, tables and sprocs for the built-in SQL providers that come with ASP.NET 2.0.  The below screens show the step-by-step walkthrough of this:

 

 

 

 

 

Once you have finished walking through the wizard, all the database schema + sprocs to support the application services will have been installed and configured (note: if your DBA wants to see exactly what is going on behind the covers, we also ship the raw .sql files underneath the above framework directory, and your DBA can walkthrough them and/or run them manually to install the DB).

Step 3: Point your web.config file at the new SQL Database

ASP.NET 2.0 now supports a new section in your web.config file called “” which (not too surprisingly) are used to store connection strings.  One nice thing from an administration perspective is that the new ASP.NET Admin MMC Snap-in now provides a GUI based way to configure and manage these:


 
ASP.NET 2.0 also now supports encrypting any section stored in web.config files -- so you can also now securely store private data like connectionstrings without having to write any encryption code of your own. 

ASP.NET 2.0 ships with a built-in connection string called “LocalSqlServer” which by default is configured to use a SQL Express database, and which by default the Membership, Roles, Personalization, Profile and Health Monitoring services are configured to use.

The easiest way to have your application automatically take advantage of your newly created SQL database is to just replace the connectionstring value of this “LocalSqlServer” setting in your app’s local web.config.

For example, if I created my database on the local machine in an “appservicesdb” database instance and was connecting using Windows Integrated security, I would change my local web.config file to specify this:


    
        
        Data Source=localhost;Initial Catalog=appservicesdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
    


Hit save, and all of the built-in application services are now using your newly created and defined SQL Server database.

Note: The one downside with the above approach is that I’m re-using the “LocalSqlServer” connection string name – which will feel weird if/when I deploy my database on another machine.  If I wanted to name it with my own connection string name, I could do this simply by adding a completely new connection-string, and then pointing the existing providers to use the new connection-string name in place of the default LocalSqlServer one. 

Hope this helps,

Scott

P.S. In some future blog post I’ll walkthrough actually using some of the above new APIs.