小编Ben*_*Sam的帖子

tf.Session()上的分段错误(核心转储)

我是TensorFlow的新手.

我刚刚安装了TensorFlow并测试安装,我尝试了以下代码,一旦启动TF会话,我就会收到Segmentation fault(core dumped)错误.

bafhf@remote-server:~$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
/home/bafhf/anaconda3/envs/ismll/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
>>> tf.Session()
2018-05-15 12:04:15.461361: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1349] Found device 0 with properties: 
name: Tesla K80 …
Run Code Online (Sandbox Code Playgroud)

installation segmentation-fault tensorflow

9
推荐指数
1
解决办法
4172
查看次数

防止Winform最大化?

我想阻止我的桌面应用程序最大化.它不应该通过任何方式最大化 - 通过双击标题栏,或通过单击键盘上的Windows +向上箭头等

- >我禁用MaximizeBoxMinimizeBox.
- >我还为我的WinForm 设置了MaximumSizeMinimumSize

当我按下Windows +向上箭头时,我的获胜形式移动到屏幕的左上角,我的意思是它最大化了.所以请告诉我任何方法来防止这件事发生......

.net c# windows winforms

7
推荐指数
3
解决办法
2万
查看次数

Java:HashMap.getOrDefault 返回空值

我对来自PythonC#背景的Java相当陌生。我不知道为什么我会从我的理解中得到一个值,这个方法首先是为了避免 NullPointer 异常而构建的。该对象不是null,也不是。nullHashMap.getOrDefault()peopleidKey

截屏

java nullpointerexception java-8

6
推荐指数
1
解决办法
716
查看次数

如何管理应用程序关闭的方式?

我需要以相同的方式关闭我的应用程序,无论是直接关闭还是从任务栏或任务管理器关闭.每次关闭应用程序之前,我都需要进行一些预设置并自动生成日志文件...

例如,我每次退出时都会对我的申请表格给出以下效果,但是当我从任务栏或任务管理器关闭我的应用程序时,不会显示此效果...

    System.Windows.Forms.Timer closeTimer = new System.Windows.Forms.Timer();

    void lblClose_Click(object sender, System.EventArgs e)
    {
        closeTimer.Tick += new EventHandler(closeTimer_Tick);
        closeTimer.Interval = 10;
        closeTimer.Start();            
    }

    void closeTimer_Tick(object sender, EventArgs e)
    {
        int a = (int)(this.Opacity * 100);
        a--;
        this.Opacity = ((double)a / 100);
        if ((this.Opacity*100) == 0)
            this.Close();
    }
Run Code Online (Sandbox Code Playgroud)

c# c#-4.0

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

网站没有ping,但是由Web浏览器打开

朋友们,我觉得这很奇怪(至少对我来说).因为我了解到互联网上的每个域名都有自己相应的IP地址.它存储在DNS上的某个位置.

现在,这是我从命令行ping google.com时得到的结果.

C:\Windows\system32>ping google.com

Pinging google.com [74.125.236.135] with 32 bytes of data:
Reply from 74.125.236.135: bytes=32 time=10ms TTL=55
Reply from 74.125.236.135: bytes=32 time=11ms TTL=55
Reply from 74.125.236.135: bytes=32 time=11ms TTL=55
Reply from 74.125.236.135: bytes=32 time=10ms TTL=55

Ping statistics for 74.125.236.135:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 11ms, Average = 10ms
Run Code Online (Sandbox Code Playgroud)

但当我ping www.cloudbees.net时,我得到以下内容:

C:\Windows\system32>ping www.cloudbees.net

Pinging www.cloudbees.net [75.101.143.131] with 32 bytes …
Run Code Online (Sandbox Code Playgroud)

ip networking ping web

2
推荐指数
1
解决办法
7594
查看次数