我有一个名单,其中一些是完整的,一些是截断的.我想在Outlook地址列表中搜索这些名称的匹配项.
我最接近的是这个来自ActiveState Code的 Python代码,但是它不搜索全局地址,只搜索我的(本地?)列表,其中有3个地址,这显然是不对的.应该有成千上万的记录.
任何提示欢迎.我用Google搜索并阅读了几十页,但没有结论.我宁愿不直接连接到LDAP,我认为这是我的组织中的政策违规,除此之外我不确定是否可能.如果可能,希望通过Outlook API执行此操作.
DEBUG=1
class MSOutlook:
def __init__(self):
self.outlookFound = 0
try:
self.oOutlookApp = \
win32com.client.gencache.EnsureDispatch("Outlook.Application")
self.outlookFound = 1
except:
print("MSOutlook: unable to load Outlook")
self.records = []
def loadContacts(self, keys=None):
if not self.outlookFound:
return
# this should use more try/except blocks or nested blocks
onMAPI = self.oOutlookApp.GetNamespace("MAPI")
ofContacts = \
onMAPI.GetDefaultFolder(win32com.client.constants.olFolderContacts)
if DEBUG:
print("number of contacts:", len(ofContacts.Items))
for oc in range(len(ofContacts.Items)):
contact = ofContacts.Items.Item(oc + 1)
if contact.Class == win32com.client.constants.olContact:
if keys is None:
# …Run Code Online (Sandbox Code Playgroud) 如何从C程序中读取驱动器的硬件信息?(即确定驱动器是SSD还是机械磁盘.)
在本教程http://www.codeproject.com/KB/IP/ThinVnc.aspx中它说:
ThinVNC不是传统的VNC,因为它没有实现AT&T RFB协议.相反,它建立在当今的Web标准之上:AJAX,JSON和HTML5.
但是在查看代码时,对我来说似乎是Delphi,所以有人可以解释上面的句子真正意味着什么:HTML 5是否真的能够调用OS?
TWin = class(TObject)
private
Wnd : Hwnd;
Rect : TRect;
Pid : Cardinal;
public
constructor Create(AWnd:HWND;ARect:TRect;APid:Cardinal);
end;
function EnumWindowsProc(Wnd: HWnd; const obj:TList<TWin>): Bool; export; stdcall;
var ProcessId : Cardinal;
R,R1 : TRect;
Win : TWin;
begin
Result:=True;
GetWindowThreadProcessId(Wnd,ProcessId);
if IsWindowVisible(Wnd) and not IsIconic(wnd)then begin
GetWindowRect(Wnd,R);
IntersectRect(R1,R,Screen.DesktopRect);
if not IsRectEmpty(R1) then begin
win := TWin.Create(Wnd,R,ProcessId);
obj.Add(win);
end;
end;
end;
procedure GetProcessWindowList(WinList:TList<TWin>);
begin
WinList.Clear;
EnumWindows(@EnumWindowsProc, Longint(WinList));
end;
Run Code Online (Sandbox Code Playgroud) 我有一个运行另一个python脚本的python脚本."其他脚本"(正在运行的脚本)需要大约45 [min]才能完成.
当'执行'脚本从Ubuntu的shell运行时,它完全正常.
我在cron中添加了一个条目来运行'execution'python脚本.它似乎首先运行,但程序在几秒后终止:
user@internet:~/REMOTE_CONTROL$ ps aux | grep python
user 1603 0.0 1.4 31504 15184 ? S 22:50 0:00 python /usr/share/system-config-printer/applet.py
root 1714 0.0 0.7 13672 8012 ? S 22:51 0:00 /usr/bin/python /usr/lib/system-service/system-service-d
**user 7956 109 1.0 14380 10692 ? R 23:48 0:01 python /media/READ_ONLY/DEVELOPER/COMPOSITE/CURRENT/DataLoader.py**
user 8029 0.0 0.0 3320 788 pts/1 S+ 23:48 0:00 grep --color=auto python
user@internet:~/REMOTE_CONTROL$ ps aux | grep python
user 1603 0.0 1.4 31504 15184 ? S 22:50 0:00 python /usr/share/system-config-printer/applet.py
root 1714 0.0 …Run Code Online (Sandbox Code Playgroud) 我试图理解为什么是指令:
pushl 0x4013ea
Run Code Online (Sandbox Code Playgroud)
没有推动预期的价值,而是我把它放在堆栈上:
(gdb) x/wx $esp
0x22ff18: 0xc3899090
Run Code Online (Sandbox Code Playgroud)
我在Windows上使用gdb,如果这可以帮助
谢谢
NSFileManager* fileManager = [NSFileManager defaultManager];
NSURL* url = [[fileManager URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject];
NSLog(@"%@",url);
NSString* directory = [url absoluteString];
NSLog(@"%@",directory);
if (![fileManager fileExistsAtPath:directory]) NSLog(@"error!!!");
Run Code Online (Sandbox Code Playgroud)
这是上面代码生成的日志:
2012-04-03 15:45:02.298 TopPlaces[805:13303] file://localhost/Users/yzyoyosir/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/2D6EC144-CF85-4994-8904-8FF5F8407FED/Library/Caches/
2012-04-03 15:45:02.300 TopPlaces[805:13303] file://localhost/Users/yzyoyosir/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/2D6EC144-CF85-4994-8904-8FF5F8407FED/Library/Caches/
2012-04-03 15:45:02.301 TopPlaces[805:13303] error!!!
Run Code Online (Sandbox Code Playgroud)
为什么我在这里收到错误.我的意思是为什么目录不存在?
是否有某种替代工具链或Android语言,可以生成独立的APK文件?
理想情况下,应该不依赖于庞大的,不断变化,不断升级官方Android SDK.
尽管微软一直在发布新的Visual Studios,但我正在寻找一个与PowerBASIC和Mingw如何针对普通Windows完全正常的粗略对等.
如果此语言或工具链本身是Android程序,则奖励积分......
我正在使用brew安装一些软件,当我尝试安装软件时,我得到了这个:
localhost:~ timger$ brew install autoconf
Error: No available formula for autoconf
localhost:~ timger$ brew install automake
Error: No available formula for automake
localhost:~ timger$ brew install libtool
Error: No available formula for libtool
localhost:~ timger$ brew install pkg-con
Run Code Online (Sandbox Code Playgroud) blackberry ×2
c ×2
linux ×2
python ×2
android ×1
apk ×1
assembly ×1
cpython ×1
cron ×1
dalvik ×1
delphi ×1
gdb ×1
homebrew ×1
html5 ×1
ide ×1
ios ×1
iphone ×1
java-me ×1
libtool ×1
macos ×1
objective-c ×1
outlook ×1
outlook-2010 ×1
perl ×1
push ×1
toolchain ×1
ubuntu ×1
vba ×1
winapi ×1
windows ×1