V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  alaysh  ›  全部回复第 3 页 / 共 4 页
回复总数  66
1  2  3  4  
2023-05-19 12:15:39 +08:00
回复了 eightsheep 创建的主题 OpenWrt 群晖 916+ 虚拟机 openwrt 千兆跑不满
玄学,我也遇到同样的问题
2023-03-30 11:59:38 +08:00
回复了 hhhhhh123 创建的主题 程序员 aws 服务器 git 如何拉去本地内网的 git ?
g clone ssh://[email protected]:test.git 这样?
2023-03-30 11:58:13 +08:00
回复了 hhhhhh123 创建的主题 程序员 aws 服务器 git 如何拉去本地内网的 git ?
服务器内网的 git ?
2020-11-27 17:29:47 +08:00
回复了 Jooooooooo 创建的主题 问与答 有办法能拿到 Mac 自带 preview 打开的 pdf 的进度吗?
~/Library//Containers/com.apple.Preview/Data/Library/Preferences/com.apple.Preview.ViewState.plist
找到文件对应 Key 的 Data,用 plist 格式解开,elementIndex 就是所需的值。

#import <Foundation/Foundation.h>
#include <sys/stat.h>

NSString *persistentIdForFileURL(NSURL *url) {
NSString *persistentId;

id value;
NSError *error;
BOOL res = [url getResourceValue:&value forKey:NSURLVolumeUUIDStringKey error:&error];
if (res) {
struct stat statBuf;
int res = stat(url.fileSystemRepresentation, &statBuf);
if (res == 0) {
persistentId = [NSString stringWithFormat:@"%@.%llu", value, statBuf.st_ino];
}
else {
NSLog(@"stat error: %d", res);
}
}
else {
NSLog(@"getResourceValue error:%@", error);
}
return persistentId;
}

int main(int argc, const char * argv[]) {
@autoreleasepool {
NSURL *url = [NSURL URLWithString:@"file:///tmp/1.pdf"];
NSString *persistentId = persistentIdForFileURL(url);

NSString *path = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, true)[0];
path = [path stringByAppendingString:@"/Containers/com.apple.Preview/Data/Library/Preferences/com.apple.Preview.ViewState.plist"];
NSData *data = [NSData dataWithContentsOfFile:path];

NSError *error;
NSDictionary *propertyList = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListMutableContainers format:0 error:&error];
propertyList = propertyList[persistentId];
if (propertyList) {
data = propertyList[@"Data"];
propertyList = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListMutableContainers format:0 error:&error];
if (propertyList) {
NSLog(@"propertyList: %@", propertyList);
}
else {
NSLog(@"propertyListWithData error:%@", error);
}
}
else {
if (error) {
NSLog(@"propertyListWithData error:%@", error);
}
NSLog(@"propertyList for %@ is null", url);
}
}
return 0;
}
2020-09-02 18:31:08 +08:00
回复了 iksapor 创建的主题 Apple iPhone 太旧,如何更新特定版本的 app?
iPhone 5s 以下型号最高只能 7.0.2 版本了
是这样的,当时刚出,我也发现了有爱奇艺的流量,马上卸载了
2019-07-10 10:55:17 +08:00
回复了 howtodie 创建的主题 问与答 暑假想去一个城市住到开学,不想回家
首先要保证自身安全
@jzphx apple 店好像只会换对应版本的硬件,我的是港版,他说要等港版配件到才能换
我不是针对谁,我是说在座的各位都是灰友
@Livid 真理,我已经用坏了 3 块 tf 卡,一块 u 盘了
2019-07-05 11:33:24 +08:00
回复了 TaurusXin 创建的主题 macOS “微信”中断了关机
微信:关什么机?继续工作!
1  2  3  4  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   3285 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 40ms · UTC 10:53 · PVG 18:53 · LAX 02:53 · JFK 05:53
♥ Do have faith in what you're doing.