Day 1 Minutes to Midnight

    NSDateFormatter *formatter = [[[NSDateFormatter alloc]init]autorelease];
    NSDate *date = [NSDate date];
    [formatter setTimeStyle:NSDateFormatterMediumStyle];
    NSCalendar *calendar = [[[NSCalendar alloc]initWithCalendarIdentifier:NSGregorianCalendar]autorelease];
    NSDateComponents *comps = [[[NSDateComponents alloc]init]autorelease];
    NSInteger unitFlag = NSHourCalendarUnit|NSMinuteCalendarUnit|NSSecondCalendarUnit;
    comps = [calendar components:unitFlag fromDate:date];
    int hour = 23 - [comps hour];
    int min = 59 - [comps minute];
    int sec = 59 - [comps second];
    timeLabel.text = [NSString stringWithFormat:@"%02d:%02d:%02d",hour,min,sec];
    NSTimer *timer = [[[NSTimer alloc]init]autorelease];
    timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateTimeLabel:) userInfo:nil repeats:YES];
張貼在 Objective C | 標記 , | 發表留言

disable Network Discovery by GPO (Windows Vista or Later)

Computer Configuration > Policies > Administrative Templates > Network > Link-Layer Topology Discovery

Enable “Turn on Mapper I/O (LLTDIO) Driver" and then select one or more of the following:
i. Allow operation while in domain
ii. Allow operation while in public network
iii. Prohibit operation while in private network
Enable “Turn on Responder (RSPNDR) Driver." and then select one or more of the following:
i. Allow operation while in domain
ii. Allow operation while in public network
iii. Prohibit operation while in private network

* – Be advised that Changing a Group Policy setting does not always immediately put the changed setting into effect. To ensure that the Group Policy setting is applied, either restart the computer that you want the Network Discovery Map on, or run gpupdate /force at a command prompt.

張貼在 Windows, Windows Server | 標記 , | 發表留言

Excel 2003 Office opens workbooks slower across the network


After you install MS11-021 and the Office File Validation (OFV) Add-in for Office 2003 (KB 2501584), workbooks stored in a network location open slower over the network in Excel 2003 than they did without the OFV installed. The decrease in performance depends on the size of the workbook and bandwidth of the network and in some scenarios can seem to hang Excel.

Method 1:
To be able to have both the protection of the OFV, and typical performance over the network when opening files, upgrade to either Microsoft Excel 2007 or Microsoft Excel 2010.

Method 2:
Copy the file to the local workstation. Open and save it in Excel from the local hard drive. Copy the file back to the network location.

Note: If multiple users are accessing the same file, you must be cautious to collaborate with the other users before you copy the file back to the share so that you do not overwrite the changes that were made by another user. The Shared Workbook feature cannot be used with this workaround.

Method 3:

To use Excel 2003 and avoid the network performance issue, you can disable theMicrosoft Office File Validation Add-In for Excel by using a registry setting. This removes the additional protection of the OFV for Excel while still protecting the other Office applications.

More information about this setting is available here:

To have us apply the steps from this method to fix this problem for you, go to the “Fix it for me" section. If you prefer to follow the steps to fix this problem yourself, go to the “Let me fix it myself" section.

Fix it for me

To fix this problem automatically, click the Fix it button or link. Then click Run in the File Download dialog box, and follow the steps in the Fix it wizard.

Fix this problem
Microsoft Fix it 50741


  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.

Then, go to the “Did this fix the problem?" section.

Let me fix it myself

You can use the EnableOnLoad registry entry to configure how you want Excel to handle opening workbooks for the OFV. By default, the EnableOnLoad entry is not present in the Windows registry. To add the EnableOnLoad entry to the Windows registry, follow these steps:

  1. Exit Excel.
  2. Click Start, click Run, type regedit, and then click OK.
  3. Locate and then click to select the following registry key:
  4. After you select the key that is specified in step 3, point to New on the Edit menu, and then click Key.
  5. Type Excel, and then press ENTER.
  6. Select Excel, point to New on the Edit menu, and then click Key.
  7. Type Security, and then press ENTER.
  8. Select Security, point to New on the Edit menu, and then click Key.
  9. Type FileValidation, and then press ENTER.
  10. Select FileValidation, point to New on the Edit menu, and then click DWORD Value.
  11. Type EnableOnLoad, and then press ENTER.
    Note: The default value is 0 which disables the validation.
  12. On the File menu, click Exit to quit Registry Editor.
張貼在 Ms. Office | 標記 , , | 發表留言