Skip to content


PowerShell书籍收藏

1、PowerShell两本电子书籍

2、Professional Windows powershell Programming

image

http://www.bonashen.com/wp-content/uploads/2010/09/ProfessionalWindowsPowerShellProgramming.pdf

3、Windows powershell Cookbook,2nd

image

http://www.bonashen.com/wp-content/uploads/2010/09/Windows_PowerShell_Cookbook,2nd.pdf

4、Effective Windows powershell

image

http://www.bonashen.com/wp-content/uploads/2010/09/EffectiveWindowsPowerShell.pdf

Tags: powershell, 学习, 电子书

相关文章

Posted in 生活点滴.

Tagged with , , .


PowerShell两本电子书籍

powershell刚开始学,先前网购了一本电子工业出版社出版的《Windows powershell 2.0 应用编程最佳实践》。

后来在网上找到两本PowerShell的电子书

1.Windows PowerShell Cookbook™

image

http://www.bonashen.com/wp-content/uploads/2010/09/OReilly.Windows.PowerShell.Cookbook.Oct.2007.pdf

2.Windows PowerShell in Action

image

http://www.bonashen.com/wp-content/uploads/2010/09/Manning.Windows.PowerShell.in.Action.Feb.2007.pdf

Tags: powershell, 学习, 电子书

相关文章

Posted in 生活点滴.

Tagged with , , .


PowerShell 文件目录监视片段

摘自《Windows PowerShell 2.0应用编程最佳实践》

#pseventing 1.1
#filesystemwatcher
Add-PSSnapin pseventing 

$fsw = New-Object system.IO.FileSystemWatcher
$fsw.Path = [IO.Path]::GetTempPath()
$fsw.EnableRaisingEvents = $true 

Start-KeyHandler -CaptureCtrlC 

Connect-Event fsw changed,deleted -Verbose 

"watching $($fsw.path)"
"entering loop ... ctrl+C to exit"
$done = $false
while($events = @(Read-Event -Wait)){
   #read-event alays returns a cllection
   foreach($event in $events){
      switch($event.name){
          "ctrlc"{
            "cancelling..."
            $done = $true
            }
        "changed"{
            $event
            #$done = $true
        }
        "deleted"{
            $event
        }
      }
    }
    if($done -eq $true){
        break
    }
}    
调试结果如下图:
image 
Tags: filesystem, powershell, watcher, windows, 目录监视, 编程

相关文章

Posted in 程序.

Tagged with , , , , , .


delphi下的FileSystemWatcher,实现文件目录监控

{*******************************************************}
{                                                       }
{       FileSystemWatcher                               }
{                                                       }
{       版权所有 (C) 2007 solokey                       }
{                                                       }
{       http://blog.csdn.net/solokey                    }
{                                                       }
{*******************************************************}

unit FileSystemWatcher;

interface
uses
  Windows, Classes, SysUtils;

type
  TFileOperation = (foAdded, foRemoved, foModified, foRenamed);
  TFileDealMethod = procedure(FileOperation: TFileOperation; const FileName1,FileName2: string) of object;

  TNotifyFilter = (nfFileNameChange, nfDirNameChange, nfAttributeChange,
    nfSizeChange, nfWriteChange, nfAccessChange, nfCreationDateChange, nfSecurityChange);
  TNotifyFilters = set of TNotifyFilter;

  TNotificationBuffer =  array[0..4095] of Byte;

  PFileNotifyInformation = ^TFileNotifyInformation;
  TFileNotifyInformation = record
    NextEntryOffset: DWORD;
    Action: DWORD;
    FileNameLength: DWORD;
    FileName: array[0..0] of WideChar;
  end;

  TShellChangeThread = class(TThread)
  private
    FActived: Boolean;
    FDirectoryHandle: Cardinal;
    FCS: TRTLCriticalSection;
    FChangeEvent: TFileDealMethod;
    FDirectory: string;
    FWatchSubTree: Boolean;
    FCompletionPort: Cardinal;
    FOverlapped: TOverlapped;
    FNotifyOptionFlags: DWORD;
    FBytesWritten: DWORD;
    FNotificationBuffer: TNotificationBuffer;
  protected
    procedure Execute; override;
    procedure DoIOCompletionEvent;
    function ResetReadDirctory: Boolean;
    procedure Lock;
    procedure Unlock;
  public
    constructor Create(ChangeEvent: TFileDealMethod); virtual;
    destructor Destroy; override;
    procedure SetDirectoryOptions(Directory : String; Actived: Boolean; WatchSubTree : Boolean;
      NotifyOptionFlags : DWORD);
    property ChangeEvent : TFileDealMethod read FChangeEvent write FChangeEvent;
  end;

  TFileSystemWatcher = class(TComponent)
  private
    FActived: Boolean;
    FWatchedDir: string;
    FThread: TShellChangeThread;
    FOnChange: TFileDealMethod;
    FWatchSubTree: Boolean;
    FFilters: TNotifyFilters;
    procedure SetWatchedDir(const Value: string);
    procedure SetWatchSubTree(const Value: Boolean);
    procedure SetOnChange(const Value: TFileDealMethod);
    procedure SetFilters(const Value: TNotifyFilters);
    function  NotifyOptionFlags: DWORD;
    procedure SetActived(const Value: Boolean);
  protected
    procedure Change;
    procedure Start;
    procedure Stop;
  public
    constructor Create(AOwner : TComponent); override;
    destructor  Destroy; override;
  published
    property  Actived:Boolean  read FActived write SetActived;
    property  WatchedDir: string read FWatchedDir write SetWatchedDir;
    property  WatchSubTree: Boolean read FWatchSubTree write SetWatchSubTree;
    property  NotifyFilters: TNotifyFilters read FFilters write SetFilters;
    property  OnChange: TFileDealMethod read FOnChange write SetOnChange;
  end;

procedure  Register;

implementation

procedure  Register;
begin
  RegisterComponents('Samples', [TFileSystemWatcher]);
end;

{ TShellChangeThread }

constructor TShellChangeThread.Create(ChangeEvent: TFileDealMethod);
begin
  FreeOnTerminate := True;
  FChangeEvent := ChangeEvent;
  InitializeCriticalSection(FCS);
  FDirectoryHandle := 0;
  FCompletionPort := 0;
  inherited Create(True);
end;

destructor TShellChangeThread.Destroy;
begin
  CloseHandle(FDirectoryHandle);
  CloseHandle(FCompletionPort);
  DeleteCriticalSection(FCS);
  inherited Destroy;
end;

procedure TShellChangeThread.DoIOCompletionEvent;
var
  TempBuffer: TNotificationBuffer;
  FileOpNotification: PFileNotifyInformation;
  Offset: Longint;
  FileName1, FileName2: string;
  FileOperation: TFileOperation;
  procedure DoDirChangeEvent;
  begin
    if Assigned(ChangeEvent) and FActived then
      ChangeEvent(FileOperation, FileName1, FileName2);
  end;
  function  CompleteFileName(const FileName:string):string;
  begin
    Result := '';
    if Trim(FileName) <> '' then
      Result := FDirectory + Trim(FileName);
  end;
begin
  Lock;
  TempBuffer := FNotificationBuffer;
  FillChar(FNotificationBuffer, SizeOf(FNotificationBuffer), 0);
  Unlock;
  Pointer(FileOpNotification) := @TempBuffer[0];
  repeat
    with FileOpNotification^ do begin
      Offset := NextEntryOffset;
      FileName2 := '';
      case Action of
        FILE_ACTION_ADDED..FILE_ACTION_MODIFIED: begin
          FileName1 := CompleteFileName(WideCharToString(FileName));
          FileOperation := TFileOperation(Action - 1);
          DoDirChangeEvent;
        end;
        FILE_ACTION_RENAMED_OLD_NAME: begin
          FileName1 := CompleteFileName(WideCharToString(FileName));
          FileOperation := TFileOperation(Action - 1);
        end;
        FILE_ACTION_RENAMED_NEW_NAME: begin
          if FileOperation = foRenamed then begin
            FileName2 := CompleteFileName(WideCharToString(FileName));
            DoDirChangeEvent;
          end;
        end;
      end;
    end;
  Pointer(FileOpNotification) := Pointer(PChar(FileOpNotification) + OffSet);
  until Offset=0;
end;

procedure TShellChangeThread.Execute;
var
  numBytes: DWORD;
  CompletionKey: DWORD;
  PFOverlapped: POverlapped;
  TempDirectoryHandle: Cardinal;
  TempCompletionPort: Cardinal ;
begin

  while not Terminated do begin
    Lock;
    TempDirectoryHandle := FDirectoryHandle;
    TempCompletionPort := FCompletionPort;
    Unlock;
    if TempDirectoryHandle > 0  then begin
      PFOverlapped := @FOverlapped;
      GetQueuedCompletionStatus(TempCompletionPort, numBytes, CompletionKey, PFOverlapped, INFINITE);
      if CompletionKey = Handle then begin
        Synchronize(DoIOCompletionEvent);
        FBytesWritten := 0;
        FillChar(FNotificationBuffer, SizeOf(FNotificationBuffer), 0);
        ReadDirectoryChanges(FDirectoryHandle, @FNotificationBuffer, SizeOf(FNotificationBuffer), FWatchSubTree, FNotifyOptionFlags, @FBytesWritten, @FOverlapped, nil);
      end;
    end;
  end;
  PostQueuedCompletionStatus(TempCompletionPort, 0, 0, nil);
end;

procedure TShellChangeThread.Lock;
begin
  EnterCriticalSection(FCS);
end;

function TShellChangeThread.ResetReadDirctory: Boolean;
var
  TempHandle: Cardinal;
  TempCompletionPort: Cardinal;
begin
  Result := False;
  CloseHandle(FDirectoryHandle);
  PostQueuedCompletionStatus(FCompletionPort, 0, 0, nil);
  CloseHandle(FCompletionPort);

  TempHandle := CreateFile(PChar(FDirectory), GENERIC_READ or GENERIC_WRITE,
                            FILE_SHARE_READ or FILE_SHARE_WRITE or FILE_SHARE_DELETE,
                            nil, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS or FILE_FLAG_OVERLAPPED, 0);
  Lock;
  FDirectoryHandle := TempHandle;
  Unlock;

  if (GetLastError = ERROR_FILE_NOT_FOUND) or (GetLastError = ERROR_PATH_NOT_FOUND) then begin
    Lock;
    FDirectoryHandle := 0;
    FCompletionPort := 0;
    Unlock;
    Exit;
  end;

  TempCompletionPort := CreateIoCompletionPort(FDirectoryHandle, 0, Handle, 0);

  Lock;
  FCompletionPort := TempCompletionPort;
  Unlock;

  FBytesWritten := 0;
  FillChar(FNotificationBuffer, SizeOf(FNotificationBuffer), 0);
  Result := ReadDirectoryChanges(FDirectoryHandle, @FNotificationBuffer, SizeOf(FNotificationBuffer), FWatchSubTree, FNotifyOptionFlags, @FBytesWritten, @FOverlapped, nil);
end;

procedure TShellChangeThread.SetDirectoryOptions(Directory: String; Actived: Boolean;
  WatchSubTree: Boolean;  NotifyOptionFlags : DWORD);
begin
  FWatchSubTree := WatchSubTree;
  FNotifyOptionFlags := NotifyOptionFlags;
  FDirectory := IncludeTrailingBackslash(Directory);
  FActived := Actived;
  ResetReadDirctory;
end;

procedure TShellChangeThread.Unlock;
begin
  LeaveCriticalSection(FCS);
end;

{ TFileSystemWatcher }

procedure TFileSystemWatcher.Change;
begin
  if csDesigning in ComponentState then
    Exit;
  if Assigned(FThread) then begin
    FThread.SetDirectoryOptions(FWatchedDir, FActived, LongBool(FWatchSubTree), NotifyOptionFlags);
  end;
end;

constructor TFileSystemWatcher.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FActived := False;
  FWatchedDir := 'C:\';
  FFilters := [nfFilenameChange, nfDirNameChange];
  FWatchSubTree := True;
  FOnChange := nil;
end;

destructor TFileSystemWatcher.Destroy;
begin
  if Assigned(FThread) then
    FThread.Terminate;
  inherited Destroy;
end;

function TFileSystemWatcher.NotifyOptionFlags: DWORD;
begin
  Result := 0;
  if nfFileNameChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_FILE_NAME;
  if nfDirNameChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_DIR_NAME;
  if nfSizeChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_SIZE;
  if nfAttributeChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_ATTRIBUTES;
  if nfWriteChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_LAST_WRITE;
  if nfAccessChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_LAST_ACCESS;
  if nfCreationDateChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_CREATION;
  if nfSecurityChange in FFilters then
    Result := Result or FILE_NOTIFY_CHANGE_SECURITY;
end;

procedure TFileSystemWatcher.SetActived(const Value: Boolean);
begin
  if FActived <> Value then begin
    FActived := Value;
    Change;
    if FActived then
      Start
    else
      Stop;
  end;
end;

procedure TFileSystemWatcher.SetFilters(const Value: TNotifyFilters);
begin
  if FFilters <> Value then begin
    FFilters := Value;
    Change;
  end;
end;

procedure TFileSystemWatcher.SetOnChange(const Value: TFileDealMethod);
begin
  FOnChange := Value;
  if Assigned(FOnChange) and FActived then
    Start
  else
    Stop;
  Change;
end;

procedure TFileSystemWatcher.SetWatchedDir(const Value: string);
begin
  if not SameText(FWatchedDir, Value) then begin
    FWatchedDir := Value;
    Change;
  end;
end;

procedure TFileSystemWatcher.SetWatchSubTree(const Value: Boolean);
begin
  if FWatchSubTree <> Value then begin
    FWatchSubTree := Value;
    Change;
  end;
end;

procedure TFileSystemWatcher.Start;
begin
  if csDesigning in ComponentState then
    Exit;
  if Assigned(FOnChange) then begin
    FThread := TShellChangeThread.Create(FOnChange);
    FThread.SetDirectoryOptions(FWatchedDir, FActived, LongBool(FWatchSubTree), NotifyOptionFlags);
    FThread.Resume;
  end;
end;

procedure TFileSystemWatcher.Stop;
begin
  if csDesigning in ComponentState then
    Exit;
  if Assigned(FThread) then begin
    FThread.Terminate;
    FThread := nil;
  end;
end;

end.
Tags: delphi, filesystem, watcher, 目录监视

相关文章

Posted in 程序.

Tagged with , , , .


脱壳UPX 0.89.6 – 1.02 / 1.05 – 1.24 -> Markus & Laszlo

最近看到verydoc的一套命令行转换工具,其中有一款PDF to vec(PDF文件转矢量文件),用PEiD查看是UPX 0.89.6 – 1.02 / 1.05 – 1.24 -> Markus & Laszlo壳,准备脱了他。

工具:

     PEid

     LoadPE

     WinHex

     UPX 2.03w

参照http://teach.hanzify.org/article/15-1060099200.html

第一步    PEid检测壳结果如下图

image

第二步  修改数据段

启动LoadPE工具,加载pdf2vec.exe,Sections,修改第一、第二段的名称分别为UPX0、UPX1保存。

image

第三步 修改UPX的解压版本

启动WinHex工具,打开第二步修改后的文件,移动数据区到03E0位置。如下图:

image

当前的版本是2.00,我们用UPX的高版来解压他,修改UPX的版本为2.03w。

image

保存修改的文件。

Continued…

Tags: crack, loadpe, pdf2vec, peid, upxe, verydoc, winhex, 脱壳

相关文章

Posted in 生活点滴.

Tagged with , , , , , , , .


关于船厂技术发展的路线思考

从各大厂应用tribon系统发展来看,其技术设计人员是一个倒金字塔结构。其中线型光顺、外板展开、曲面建模是塔尖,形成船体的主要领导力量,工艺人员、设计管理人员、图纸标准制定人员是塔腰,平面建模、零件建模、出图是塔基。如下图:

clip_image002

鉴于国内某造船大厂的技术发展路线,我们可以看出其技术设计发展以tribon系统的应用为切入点,走消化吸收、自我完善、自主创新、技术扩张的道路。

  1. 其中消化吸收是打基础,多采取联合设计,尽可能让联合设计队伍驻厂开展设计工作,这样可以更多的消化吸收其设计技能、设计管理技能。
  2. 自我完善是夯实基础,以工艺标准化为切入点,对设计工作的标准化,每位设计人员的工作范围、工作目标、工作标准进行固化,从而有利于技术设计管理、技术工艺的管理。将生产设计转向工艺设计,将零件制图转向装配制图,从而降低生产现场施工的难度。
  3. 自主创新是工艺创新,在自我完善的基础上方有能力应对工艺创新,让技术设计人员更多的关注工艺创新,来领导现场工艺的变革,提高现场施工质量与效率,从而降低生产成本。
  4. 技术扩张是指核心技术(技术管理模式、技术工艺标准、技术图纸标准固化、具有线型光顺及曲面建模能力)稳定的基础上,大量外包金字塔的塔基工作量,降低技术设计成本,提高技术设计的效率,使船厂的技术设计能力得到量变,能够在短时间内高质量完成某型船的生产设计,从而具有快速影响市场的应变能力。
Tags: Tribon, 发展路线, 思考, 生产设计

相关文章

Posted in tribon, 造船.

Tagged with , , , .


玩世博太累了

世博就是数字电视大渣会,一个比一个大。
世博就是走”S”弯,一个接着一个走。
世博就是匆匆走,走完一程继续走。
世博就是人看人,你看他来我看你。
世博就是比体力,看你还能站多久。
世博就是捉迷藏,不知馆里能看啥。

Posted with wordpress for blackberry.

Tags: 世博

相关文章

Posted in 生活点滴.

Tagged with .


今天参加公司活动游世博

由旅游公司带队,走7-1号门进园。在泰国錧先合影。

image  

第一站中国船舶馆。

image

这是游完后拍的照片。
和兄弟一起吃干粮。

Posted with wordpress for blackberry.

Tags: 世博

相关文章

Posted in 生活点滴.

Tagged with .


如何使用带有SLIC 2.1的BIOS在Vmware Workstation 7中激活OEM Windows 7

Posted on 2009-11-26 by 梦想天空

警告: 本文仅供学习与参考之用.请使用合法正版的软件.梦想天空对文章内容不承担任何责任.

Warning: This article is for your study and reference only. Please use legitimate genuine software. DreamingSky will NOT be responsible for its content.

  • 文章版本: 1.0
  • 修订日期: 2009.11.25

对象

目的

使用带有SLIC 2.1的BIOS在Vmware Workstation 7中激活OEM Windows 7

工具

  • 7-zip 9.07 Beta
  • 010 Editor 3.05
  • Phoenix BIOS Editor Pro 2.2.0.1
  • Vmware Workstation 7
  • Windows 7
  • Windows 7 OEM证书文件
  • Windows 7 OEM密钥
  • 相应品牌的SLIC 2.1文件

方法

1. 提取原版BIOS

Vmware Workstation 7的安装文件夹中找到vmware-vmx.exe文件(如果宿主系统是x64系统则该文件位于安装文件夹的x64\子文件夹中),复制到临时文件夹,通过右键菜单使用7-zip释放出其中的各个区段,在.rsrc\BINRES\文件夹中的6006即是Vmware Workstation 7的BIOS.方便起见可以将6006复制一份副本并重命名为vmwbios.rom.

2. 修改BIOS

使用Phoenix BIOS Editor Pro 2.2.0.1打开vmwbios.rom并且在以下过程中该文件必须保持打开状态!

2.1 使用010 Editor打开相应品牌的SLIC 2.1文件,如LENOVO.BIN,查看文件开始第9字节起的14个字节并将其复制,如联想某个SLIC 2.1为"LENOVOTC-5M   "(最后3位为空格,不带双引号).

2.2 浏览Phoenix BIOS Editor Pro所在文件夹中的TEMP子文件夹,使用010 Editor打开BIOSCOD0.ROM,搜索rsdt,类型为ASCII字符串,会找到三处.在第一处找到的rsdt前后均有"INTEL 440BX   "(最后3位为空格,共14个字符)字符串,替换为刚才复制的14位OEM标识字符串,保存.

2.3 将相应品牌的SLIC文件复制到Phoenix BIOS Editor Pro的TEMP子文件夹中.

2.4 使用010 Editor打开TEMP子文件夹中的ROM.SCR文件. 在文件末尾添加SLIC文件信息,如"ACPI LENOVO.BIN".

2.5 回到Phoenix BIOS Editor Pro窗口,点击DMI Strings窗口,双击Motherboard Version右侧的’None’,在弹出对话框中输入相应的OEM标识字符串,例如联想则输入’LEGEND Dragon’(包括单引号),确定.

2.6 从File菜单选择Build BIOS…构建新的BIOS.

至此BIOS已经修改完毕.

3. 修改虚拟机配置

Vmware Workstation 7中全新安装Windows 7或使用现有虚拟机,复制vmwbios.rom到虚拟机所在文件夹,打开该文件夹找到*.vmx虚拟机配置文件,使用010 Editor打开并在末尾加入[bios440.filename = "vmwbios.rom"](不包含[]).

4. 完成激活

Vmware Workstation 7中启动Windows 7,将OEM证书文件(*.xrm-ms)复制入虚拟系统根文件夹.以管理员身份运行命令提示符(cmd.exe),安装证书,如"slmgr.vbs -ilc c:\lenovo.xrm-ms". 等待成功确认对话框出现后继续输入密钥激活,如"slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"(xxxxx代表相应的密钥).等待成功确认对话框出现即告激活正式完成.

Tags: bios, oem, VMWare, windows 7

相关文章

Posted in vmware, 生活点滴.

Tagged with , , , .


Finished Curved Hull model construction

Tihs is the Curved hull model limited from fr100-400 to fr130+400. The side block is named 541sdu,542sdu.The bottom block is named 541bot.

image

541sdu ( P and S)

imageimage

541bot

imageimage

shell expansion sketch.

image

 

the body plan sketch.

image

 

next ,  planar  HULL.

Tags: hull, Tihs Curved

相关文章

Posted in tribon, 造船.

Tagged with , .


Tribon shell profile generating and Unsolved problem.

 

Unsolved problem:

When generate the shell profile ,,this error encountered.

Error 20507 signalled when creating profile JAT23:
The space curve consists of more than one curve branch.!

 

Now ,the profile is generated like this. It’s used Bulb bar (230,13),

imageimage

imageimage

imageimage

Tags: shell profile, Tribon

相关文章

Posted in tribon, 造船.

Tagged with , .


Error when define the edge of shell plates and the solution

This log message show the error about there are no intersections in the edges of the shell plate  when create the shell plate.

WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
   No intersection between the edges 1 and 2
_DP2                    STRIP= X   NUMBER OF STRIPS=     8
_DP2                    GAP=      0.00 AT EDGE  1
_DP2                    GAP=      0.02 AT EDGE  2
_DP2                    GAP=      0.00 AT EDGE  3
_DP2                    GAP=      0.02 AT EDGE  4
_DP2                    GAP=      0.02 AT THE BASELINE
   No intersection between the edges 1 and 3
   No intersection between the edges 1 and 2
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
WG936D – entry        0
WG939D – entry        0
WG939D – exit        0
WG936D – exit        0
Error    11005 occurred when defining edge    3

 

 

the solution : extend your seam or butt about 50mm , it could ensure the intersections  is existent  when system calculate the edges of shell plates.

 

imageimage

 

imageimage

 

Tags: BASELINE, EDGE, GAP, STRIPS

相关文章

Posted in 未分类.

Tagged with , , , .


Tribon Curved Hull shell Seam and Butt define

This is a sample about  the Shell Seam and Butt define. The highlight part show that it’s  a shell plate , The sketch nearby is the shell plate developed sketch.In tribon the designer could check the developed sketch realtime. It help that the designer could adjust the seam and butt  arrangement to save the material and manhour.

this is the pic about it.

image

image

Tags: Shell Seam Butt, Tribon

相关文章

Posted in 未分类.

Tagged with , .


About tribon TID server log file content.

This message shows the Server is started normally.

========================================================================================================================

tribon Surface Server version 3, 0, 5, 24
Started Sat Aug 21 14:24:04 2010
Logging information will be printed below

This message shows the error when the server can’t find the DML file

—————————————————————————————————-
tribon Surface Server version 3, 0, 5, 24, started Sat Aug 21 14:24:04 2010
Current time is Sat Aug 21 14:24:52 2010
Surface : MYHULL
Folder  : C:\Tribon\M3\Projects\MY\TID\
Box     : -1000000.000      0.000 -1000000.000 1000000.000 1000000.000 1000000.000
Surface folder: C:\Tribon\M3\Projects\MY\TID\
Surface name: MYHULL
Ambiguous name MYHULL. Access (dml/dms/dm/sat) = -1/-1/-1/-1
Loading MYHULL
Opening model MYHULL
ERROR: cannot open MYHULL

This message shows the server servie the client successfully.

—————————————————————————————————-
Tribon Surface Server version 3, 0, 5, 24, started Sat Aug 21 14:39:51 2010
Current time is Sat Aug 21 14:40:25 2010
Surface : MYHULL
Folder  : C:\Tribon\M3\Projects\MY\TID\
Box     : -1000000.000      0.000 -1000000.000 1000000.000 1000000.000 1000000.000
Surface mapped to MYHULL.dml
Surface folder: C:\Tribon\M3\Projects\MY\TID\
Surface name: MYHULL.dml
Loading MYHULL.dml
Opening model MYHULL.dml
File type is DML, source 0


PLANAR INTERSECTION
Intersecting MYHULL.dml                       with plane       1.0000      0.0000      0.0000  18950.0000
Opening DML: MYHULL.dml
Raw data:  200 points across   11 curved patches.      2 points across    1 plane patches
Intersected with tol=   0.000500, Thinned with tol=   0.000500
Number of contours =    1
Contour    1
.                X             Y             Z      dX      dY      dZ
.  1     18950.000         0.000         0.000  0.000000  1.000000  0.000000
.  2     18950.000       586.064         0.000  0.000000  1.000000  0.000000
.  3     18950.000       827.355        11.998  0.000000  0.995559  0.094144
.  4     18950.000      1411.268       110.644  0.000000  0.975053  0.221970
.  5     18950.000      1620.101       161.826  0.000000  0.967241  0.253859
.  6     18950.000      2362.602       383.143  0.000000  0.958322  0.285690
.  7     18950.000      2767.010       489.338  0.000000  0.978324  0.207080
.  8     18950.000      3000.000       527.557  0.000000  0.994333  0.106314
.  9     18950.000      3000.000       527.557  0.000000  0.975510  0.219954
. 10     18950.000      3224.779       576.931  0.000000  0.976828  0.214026
. 11     18950.000      3403.990       620.286  0.000000  0.962962  0.269636
. 12     18950.000      3657.842       720.555  0.000000  0.876068  0.482188
. 13     18950.000      3996.469      1014.821  0.000000  0.632749  0.774357
. 14     18950.000      4221.738      1346.601  0.000000  0.503711  0.863872
. 15     18950.000      4457.530      1800.000  0.000000  0.431649  0.902042
. 16     18950.000      4457.530      1800.000  0.000000  0.509716  0.860343
. 17     18950.000      4560.312      1950.543  0.000000  0.590499  0.807038
. 18     18950.000      4632.418      2049.459  0.000000  0.582080  0.813131
. 19     18950.000      4840.605      2360.202  0.000000  0.546179  0.837668
. 20     18950.000      5046.285      2700.000  0.000000  0.471634  0.881794
. 21     18950.000      5046.285      2700.000  0.000000  0.448536  0.893765
. 22     18950.000      5215.380      3043.745  0.000000  0.450761  0.892645
. 23     18950.000      5480.669      3508.026  0.000000  0.540749  0.841184
. 24     18950.000      5721.855      3830.647  0.000000  0.664354  0.747418
. 25     18950.000      5785.979      3900.000  0.000000  0.694992  0.719018
. 26     18950.000      6000.000      4109.988  0.000000  0.727537  0.686068
. 27     18950.000      6354.406      4414.577  0.000000  0.791015  0.611797
. 28     18950.000      6888.679      4768.924  0.000000  0.866357  0.499425
. 29     18950.000      7380.019      5033.305  0.000000  0.891693  0.452641
. 30     18950.000      8063.873      5356.022  0.000000  0.917262  0.398284
. 31     18950.000      8451.559      5522.410  0.000000  0.915386  0.402578
. 32     18950.000      9000.000      5812.491  0.000000  0.825994  0.563679
. 33     18950.000      9000.000      5812.491  0.000000  0.855004  0.518621
. 34     18950.000      9293.611      5993.888  0.000000  0.846026  0.533142
. 35     18950.000     10126.320      6559.392  0.000000  0.803914  0.594745
. 36     18950.000     10804.766      7105.598  0.000000  0.752444  0.658657
. 37     18950.000     11324.114      7591.044  0.000000  0.708432  0.705780
. 38     18950.000     12000.000      8332.877  0.000000  0.633030  0.774127
. 39     18950.000     12605.158      9161.275  0.000000  0.551897  0.833912
. 40     18950.000     12930.607      9679.715  0.000000  0.511085  0.859530
. 41     18950.000     13406.640     10565.402  0.000000  0.432846  0.901468
. 42     18950.000     13783.842     11454.700  0.000000  0.346974  0.937875
. 43     18950.000     13992.473     12064.226  0.000000  0.305153  0.952303
. 44     18950.000     14330.000     13156.619  0.000000  0.300845  0.953673
. 45     18950.000     14510.628     13752.479  0.000000  0.282516  0.959263
. 46     18950.000     14762.328     14646.378  0.000000  0.254767  0.967002
. 47     18950.000     15000.000     15648.329  0.000000  0.208095  0.978109
. 48     18950.000     15023.984     15762.089  0.000000  0.204509  0.978865
. 49     18950.000     15244.386     16888.232  0.000000  0.181897  0.983318
. 50     18950.000     15401.588     17784.530  0.000000  0.162708  0.986674
. 51     18950.000     15559.663     18829.341  0.000000  0.135080  0.990835
. 52     18950.000     15609.118     19208.108  0.000000  0.123874  0.992298
Processing time was 0.05/0.05 seconds
Process size 29.3/29.3 Mb
Totals: Lines Ints(1), Surface Ints(0), Foreign Ints(0), Gen Cyls(0), Ext Curves(0)
----------------------------------------------------------------------------------------------------

By the way ,the TID server log file is  in   ($windows)\temp\ floder.

Tags: server, TID, Tribon

相关文章

Posted in tribon, 造船.

Tagged with , , .


SQLServer 通过使用 ADSI 执行分布式查询ActiveDirectory对象

收藏:http://www.cnblogs.com/zhou__zhou/archive/2010/05/22/1741386.html

Step 1:Creating a Linked Server.


EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
  'ADSDSOObject', 'adsdatasource'

Step 2:Creating a SQL Server Authenticated Login

  EXEC sp_addlinkedsrvlogin @rmtsrvname = N'ADSI', @locallogin = NULL ,

  @useself = N'False', @rmtuser = N'domain\Account', @rmtpassword = N'Password'

对于 SQL Server 授权登录,可以使用sp_addlinkedsrvlogin 系统存储过程配置用于连接到目录服务的适当的登录/密码.

参考这里: http://blogs.msdn.com/euanga/archive/2007/03/22/faq-how-do-i-query-active-directory-from-sql-server.aspx

如果SQLServer使用Windows 授权登录,只需自映射就足以通过使用 SQL Server 安全委托来访问AD。简单点说就是直接运行第三步语句即可.

Step 3:Querying the Directory Service.


-- Query for a list of User entries in an OU using the SQL query dialect

select convert(varchar(50), [Name]) as FullName, convert(varchar(50), Title) as Title,

  convert(varchar(50), TelephoneNumber) as PhoneNumber from

 openquery(ADSI, 'select Name, Title, TelephoneNumber from 

  ''LDAP://OU=Directors,OU=Atlanta,OU=Intellinet,DC=vizability,DC=intellinet,DC=com'

  ' where objectClass = ''User''')

-- Query for a list of Group entries in an OU using the SQL query dialect

select convert(varchar(50), [Name]) as GroupName, convert(varchar(50), [Description])

 GroupDescription from openquery(ADSI, 'select Name, Description from 

 ''LDAP://OU=VizAbility Groups,DC=vizability,DC=intellinet,DC=com'' 

  where objectClass = ''Group''')

引用:

http://msdn2.microsoft.com/en-us/library/aa772380.aspx

http://www.atlantamdf.com/presentations/AtlantaMDF_111201_examples.txt

说明:但是这样默认查询出来的是1000个对象.怎么办呢?

方法一,通过字母来循环.见以下:

CREATE TABLE #tmpADUsers
 (  employeeId varchar(10) NULL,
  SAMAccountName varchar(255) NOT NULL,
  email  varchar(255) NULL)
GO

/**//* AD is limited to send 1000 records in one batch. In an ADO interface you can define this batch size, not in OPENQUERY.
Because of this limitation, we just loop through the alphabet.
*/

DECLARE @cmdstr varchar(255)
DECLARE @nAsciiValue smallint
DECLARE @sChar char(1)

SELECT @nAsciiValue = 65

WHILE @nAsciiValue < 91
 BEGIN

  SELECT @sChar=  CHAR(@nAsciiValue)

  EXEC master..xp_sprintf @cmdstr OUTPUT, 'SELECT employeeId, SAMAccountName, Mail FROM OPENQUERY( ADSI, ''SELECT Mail, SAMAccountName, employeeID FROM ''''LDAP://dc=central,dc=mydomain,dc=int''''WHERE objectCategory = ''''Person'''' AND SAMAccountName = ''''%s*'''''' )', @sChar

  INSERT #tmpADUsers
  EXEC( @cmdstr )

  SELECT @nAsciiValue = @nAsciiValue + 1
 END

DROP TABLE #tmpADUsers

以上方法源自于:http://www.sqlservercentral.com/Forums/Topic231658-54-1.aspx#bm231954

我推荐的方法:在微软搜索到的.如何通过 NTDSUtil为服务器修改限制 maxPageSize

1.Click Start, and then click Run.

2.In the Open text box, type ntdsutil, and then press ENTER. To view help at any time, type ? at the command prompt.

Modifying policy settings

1.At the Ntdsutil.exe command prompt, type LDAP policies, and then press ENTER.

2.At the LDAP policy command prompt, type Set setting to variable, and then press ENTER. For example, type Set MaxPoolThreads to 8.

This setting changes if you add another processor to your server.

3.You can use the Show Values command to verify your changes.

To save the changes, use Commit Changes.

4.When you finish, type q, and then press ENTER.

5.To quit Ntdsutil.exe, at the command prompt, type q, and then press ENTER.

资料来源:

http://support.microsoft.com/kb/315071/en-us

http://support.microsoft.com/?scid=kb%3Bzh-cn%3B299410&x=16&y=10

如何使用SQL查询活动目录对象语法: http://www.microsoft.com/china/technet/community/columns/scripts/sg0505.mspx#EMBAC

Tags: activedirectory, ad, adsi, sqlserver

相关文章

Posted in ActiveDirectory, 生活点滴.

Tagged with , , , .