标签: simulator

如何使用高斯分布打乱列表

我想模拟一条消息的错误(例如:1000010011 => 1010000011)。有没有办法在 Python 中实现它?我尝试了以下方法,该方法有效:

import random
a = "1011101101"
b = [el for el in a] # b = ['1', '0', '1', '1', '1', '0', '1', '1', '0', '1']
random.shuffle(b)
print b # b = ['0', '1', '1', '1', '0', '1', '1', '1', '1', '0']
random.shuffle(b, random.random)
print b # b = ['1', '1', '0', '1', '1', '0', '1', '0', '1', '1']
Run Code Online (Sandbox Code Playgroud)

我希望我的重新排序是正态/高斯分布的。例如:

import random
a = "1011101101"
b = [el for el in a] # b = ['1', …
Run Code Online (Sandbox Code Playgroud)

python random simulator gaussian fault

3
推荐指数
1
解决办法
915
查看次数

使用 shell 或 python 检测 Mac 上连接/运行的 iOS 设备/模拟器?

我正在开发一个用于越狱iOS 设备的工具。该工具将在 Mac OS 10.8 上运行。

这是我想要实现的目标:

  • 当我运行该工具(最好是shpy某些脚本)时,它应该能够检测模拟器是否正在运行,或者
  • 如果连接了 iPhone/iPad,并且
  • 列出所有此类设备(真实/虚拟)。

iphone macos simulator ipad ios

3
推荐指数
1
解决办法
3708
查看次数

如何从 TCL 控制台在 ModelSim/QuestaSim 中执行“Zoom Fit”?

我在 GUI 模式下从命令行使用 ModelSim / Questa-SIM。如果 ModelSim 在 GUI 模式下运行,我想从导入的“wave.do”文件中执行“Zoom Fit”。

我通过 将此文件传递给 vsim -do wave.do。这是脚本:

add wave *
run -all
Run Code Online (Sandbox Code Playgroud)

我启动了 vsim 并将波形窗口保存为test.do. 该文件包含如下语句:

WaveRestoreZoom {0 fs} {2724750 ps}
Run Code Online (Sandbox Code Playgroud)

TCL中可以计算上限吗?

我还找到了一条simtime语句,但是使用simtime作为第二个参数会报错:

VSIM1> simtime
       # {5,195 ns} {1       } /arith_counter_gray_tb 0 0
VSIM1> WaveRestoreZoom {0 fs} {simetime}
       # zoomrange: invalid range "0 fs simetime"
Run Code Online (Sandbox Code Playgroud)

simulator tcl vhdl modelsim

3
推荐指数
1
解决办法
4637
查看次数

删除/private/tmp后无法启动iOS模拟器

这周我无法启动我的模拟器,我尝试了一些文章中的几种解决方案,但它不起作用。我的MacOS版本是OS X 10.10.5 (14F27),我的模拟器是iOS 8.4。

我从~/Library/Logs/CoreSimulator/CoreSimulator.log中获取了日志

8月27日11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务com.apple.SystemConfiguration.PPPController:launch_sim_register_endpoint:0xfffffecc 8月27日11:29:14 LL-MBP.local CoreSimulatorService[8316]:可以不注册服务 com.apple.audio.audiohald:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 com.apple.coreservices.lsuseractivity.simulatorsupport:launch_sim_register_endpoint:0x44e 8 月 27 日11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 com.apple.FSEvents:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 com .apple.SystemConfiguration.configd:launch_sim_register_endpoint:0x44e 8月27日11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务IndigoHIDRegistrationPort:launch_sim_register_endpoint:0x44e 8月27日11:29:14 LL-MBP.local CoreSimulatorService[ 8316]:无法注册服务 PurpleFBTVOutServer:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 PurpleFBServer:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误域=NSPOSIXErrorDomain代码=60“无法启动iOS模拟器。” UserInfo=0x7fbb204683f0 {NSLocalizedDescription=无法启动 iOS 模拟器。, NSLocalizedFailureReason=launchd 未能响应。} 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316] :错误域=NSPOSIXErrorDomain 代码=60“无法启动iOS 模拟器。” UserInfo=0x7fbb204683f0 {NSLocalizedDescription=无法启动 iOS …

xcode simulator ios ios-simulator

3
推荐指数
1
解决办法
5325
查看次数

如何将iOS模拟器放大到100%以上?

我正在开发我的项目并使用 Xcode iOS 模拟器。我想将 iPhone 5/5s 屏幕尺寸放大到 100% 以上,但最大仅为 100%。我使用视网膜显示屏 13 英寸 Macbook,因此我无法看到屏幕上发生的所有细节。有什么办法可以解决这个问题吗?

xcode simulator ios

3
推荐指数
1
解决办法
4655
查看次数

PushNotificationIOS 是否适用于模拟器?

我正在尝试使用react-native-push-notifications基于React Native 附带的PushNotificationsIOS 的react-native 应用程序显示通知。问题是什么都没有发生,没有错误,没有通知,什么也没有。

我不确定是否在编写通知时出错,或者它在模拟器上不起作用。

谢谢!

notifications simulator push-notification react-native

3
推荐指数
1
解决办法
3330
查看次数

用于编译所有的 modelsim 脚本

我有一个 modelsim 项目文件 (*.mpf),其中列出了所有 HDL 文件,并为每个文件提供了“compile_order”。因此,当我加载 (.mpf) 文件时,我可以看到每个 HDL 文件旁边都有一个 compoile_order 编号。到目前为止,一切都很好。

现在,在 GUI 上,我可以运行“compile all”,它将按正确的顺序编译我的所有文件,因为顺序已经预先确定。

我想知道相当于GUI中“编译全部”的tcl命令行是什么?

换句话说,我希望能够键入命令并编译所有文件,而不是通过 GUI“编译所有”。

simulation simulator vhdl modelsim

3
推荐指数
1
解决办法
4078
查看次数

Mac Simulator (Xcode) 等待启动命令

在Android中我可以运行它来启动模拟器

emulator @NAME
Run Code Online (Sandbox Code Playgroud)

这是等待它完全加载并准备好使用

adb wait-for-device
Run Code Online (Sandbox Code Playgroud)

Mac 上是否有等效的 iOS 模拟器?我使用默认的 Xcode 模拟器。所以模拟器开始

xcrun simctl boot deviceID
Run Code Online (Sandbox Code Playgroud)

并等待它完全加载(只是我在想的一个例子

xcrun simctl wait deviceId
Run Code Online (Sandbox Code Playgroud)

macos xcode simulator ios

3
推荐指数
1
解决办法
835
查看次数

当我使用 UIDocumentPickerViewController 从 iCloud 中选取 zip 文件时,无法与辅助应用程序通信

每当我从我的应用程序中使用 UIDocumentPickerviewcontroller 从 iCloud 中选择文件时,它都会在iPhone模拟器上显示此警报。

在此处输入图片说明

NSArray *types = @[(NSString*)kUTTypeArchive];
UIDocumentPickerViewController *docPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:types inMode:UIDocumentPickerModeImport];
docPicker.delegate = self;
docPicker.modalPresentationStyle = UIModalPresentationPopover;
[self presentViewController:docPicker animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)

simulator objective-c ios icloud uidocumentpickerviewcontroller

3
推荐指数
1
解决办法
2670
查看次数

模拟器中的推送通知 - Xcode 11.4beta 不工作

最近苹果也在模拟器中添加了推送通知。模拟器中未收到我现有的应用程序通知。

如何在模拟器中模拟推送通知?

模拟器支持模拟远程推送通知,包括后台内容获取通知。

参考:https ://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_release_notes

simulator apple-push-notifications ios ios-simulator

3
推荐指数
3
解决办法
5292
查看次数