我在Windows CE应用程序中打开继承的表单时遇到问题.这是一个我从前雇员那里接管的项目,但是在某些移动设备上运行了编译版本,因此我认为它应该能够打开.我有正确的VS版本(2008),并尝试清理解决方案并重建解决方案.部署解决方案时,它就像一个魅力.一旦我尝试进入继承表单的设计器,我会收到以下错误:
To prevent possible data loss before loading the designer, the following errors must be resolved:
Object reference not set to an instance of an object.
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪:
at MyApp.frmBase.UpdateOnline() in C:\Users\Corne\Documents\Visual Studio 2008\Projects\Test\MyApp\MyApp\frmBase.cs:line 35
at MyApp.frmBase.frmBase_Load(Object sender, EventArgs e) in C:\Users\Corne\Documents\Visual Studio 2008\Projects\Test\MyApp\MyApp\frmBase.cs:line 30
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Design.DesignerFrame.Initialize(Control view)
at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
at System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) …Run Code Online (Sandbox Code Playgroud) 我将如何获取毫秒数和特定数据。例如,我知道如何创建日期:
var d = new Date(2014,02,22,12,0,0,0);
Run Code Online (Sandbox Code Playgroud)
并获取今天的日期:
(new Date()).getTime() + 10*24*60*60*1000;
Run Code Online (Sandbox Code Playgroud)
但现在我该如何获取该日期发生之前的总毫秒数呢?
出于兴趣,我正在玩C#附带的Random类.我试图预测未来.由于它是伪随机的,必须有一些方法来预测数字.到目前为止,我能想到的唯一方法是蛮力(获取所有可能的种子并找到其中随机数的模式),但我相信这将是太多的处理能力,因为种子可以是-2,147,483,647到2,147,483,647.
到目前为止,我已经确定:
new Random() == new Random(Environment.TickCount)
Run Code Online (Sandbox Code Playgroud)
并且这两个类将以相同的顺序提供相同的随机数.
是否有可能确定Random类实例的种子?如果你可以在实例化Random类时知道Environment.TickCount,可以预测随机数,但我不知道是否可以完成.
我的 CakePHP 网站完美运行了几个月,直到我今天尝试访问它,我收到以下错误:
Warning: include(Cake/bootstrap.php): failed to open stream: No such file or directory in /home/corneenm/public_html/app/webroot/index.php on line 82
Warning: include(Cake/bootstrap.php): failed to open stream: No such file or directory in /home/corneenm/public_html/app/webroot/index.php on line 82
Warning: include(): Failed opening 'Cake/bootstrap.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/corneenm/public_html/app/webroot/index.php on line 82
Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in …Run Code Online (Sandbox Code Playgroud) c# ×2
cakephp ×1
date ×1
datediff ×1
hosting ×1
javascript ×1
php ×1
prediction ×1
random ×1
windows-ce ×1