在as3.x上 实现module的时候出现这种错误怎么解决? 5C

报错内容

Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform file 'RecyclerViewHelper-release.aar' to match attributes {artifactType=processed-aar} using transform IdentityTransform

module的build.gradle

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
pytorch 中 写入class ConvNet(nn.Module): 语句之后 出现错误NameError: name 'ConvNet' is not defined 这是怎么回事?

```import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import torch.nn.functional as F import torchvision.datasets as dsets import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np #%matplotlib inline image_size=28 num_classes=10 num_epochs=20 batch_size=64 train_dataset=dsets.MNIST(root='./data', train=True, transform=transforms.ToTensor(), download=True) test_dataset=dsets.MNIST(root='./data', train=False, transform=transforms.ToTensor()) train_loader=torch.utils.data.DataLoader(dataset=train_dataset, batch_size=batch_size, shuffle=True) indices=range(len(test_dataset)) indices_val=indices[:5000] indices_test=indices[5000:] sampler_val=torch.utils.data.sampler.SubsetRandomSampler(indices_val) sampler_test=torch.utils.data.sampler.SubsetRandomSampler(indices_test) validation_loader=torch.utils.data.DataLoader(dataset=test_dataset, batch_size=batch_size, shuffle=False, sampler=sampler_val ) test_loader=torch.utils.data.DataLoader(dataset=test_dataset, batch_size=batch_size, shuffle=False, sampler=sampler_test ) idx=110 #随机选取的 muteimg=train_dataset[idx][0].numpy() plt.imshow(muteimg[0,...]) plt.show() print('标签是:',train_dataset[idx][1]) depth=[4,8] class ConvNet(nn.Module): def __init__(self): super(ConvNet,self).__init__() self.conv1=nn.Conv2d(1,4,5,padding=2) self.pool=nn.MaxPool2d(2,2) self.conv2=nn.Conv2d(depth[0],depth[1],5,padding=2) self.fc1=nn.Linear(image_size//4*image_size//4*depth[1],512) self.fc2=nn.Linear(512,num_classes) def forward(self, x): x=self.conv1(x) x=F.relu(x) x=self.pool(x) x=self.conv2(x) x=F.relu(x) x=self.pool(x) x=x.view(-1,image_size//4*image_size//4*depth[1]) x=F.relu(self.fc1(x)) x=F.dropout(x,training=self.training) x=self.fc2(x) x=F.log_softmax(x,dim=1) return x def retrieve_features(self,x): feature_map1=F.relu(self.conv1(x)) x=self.pool(feature_map1) feature_map2=F.relu(self.conv2(x)) return (feature_map1,feature_map2) net=ConvNet() criterion=nn.CrossEntropyLoss() optimizer=optim.SGD(net.parameters(),lr=0.001,momentum=0.9) record=[] weights=[] for epoch in range(num_epochs): train_rights=[] for batch_idx,(data,target) in enumerate (train_loader): data,target=Variable(data),Variable(target) net.train() output=net(data) loss=criterion(output,target) optimizer.zero_grad() optimizer.step() right=rightness(output,target) train_rights.append(right) if batch_idx % 100 ==0: net.eval() val_rights=[] for(data,target) in validation_loader: data,target=Variable(data),Variable(target) output=net(data) right=rightness(output,target) val_rights.append(right) train_r=(sum([tup[o] for tup in train_rights]),sum([tup[1] for tup in train_rights])) val_r=(sum([tup[0] for tup in val_rights]),sum([tup[1] for tup in val_rights])) record.append((100 - 100.*train_r[0]/train_r[1],100-100.*val_r[0]/val_r[1])) weights.append([net.conv1.weight.data.clone(),net.conv1.bias.data.clone(), net.conv2.weight.data.clone(),net.conv2.bias.data.clone()]) net.eval() vals=[] for dara,target in test_loader: data,targrt=Variable(data,volatile=True),Variable(target) output = net(data) val=rightness(output,target) vals.append(val) rights=(sum([tup[0] for tup in vals]),sum([tup[1] for tup in vals])) rights_rate=1.0*rights[0]/rights[1] right_rate plt.figure(figsize=(10,7)) plt.plot(record) plt.xlabel('Steps') plt.ylabel('Error rate') ``` ```pytorch 中 写入class ConvNet(nn.Module): 语句之后 出现错误NameError: name 'ConvNet' is not defined 这是怎么回事

python3.5错误'module' object is not callable

(1) import urllib.request from cons import headers def getUrlList(): req=urllib.request('https://mm.taobao.com/tstar/search/tstar_model.do?_input_charset=utf-8') req.add_header('user-agent',headers()) # print (headers()) html=urllib.urlopen(req, data='q&viewFlag=A&sortType=default&searchStyle=&searchRegion=city%3A&searchFansNum=&currentPage=1&pageSize=100').read() print (html) getUrlList() (2) import random headerstr='''Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)''' def headers(): header=headerstr.split('\n') length=len(header) return header[random.randint(0,length-1)] 运行(1) 产生错误如下: D:\programmingtools\anaconda\python.exe D:/programmingtools/pycharmpro/files/201711112013/taobeauty.py Traceback (most recent call last): File "D:/programmingtools/pycharmpro/files/201711112013/taobeauty.py", line 13, in <module> getUrlList() File "D:/programmingtools/pycharmpro/files/201711112013/taobeauty.py", line 6, in getUrlList req=urllib.request('https://mm.taobao.com/tstar/search/tstar_model.do?_input_charset=utf-8') TypeError: 'module' object is not callable Process finished with exit code 1

为什么x.shape[1]会显示错误,为什么这个列向量只有一个参数

最近用python编写一个线性回归的算法,在使用pandas读取列数据后无法得到列数据的完整索引,使用x.shape[1](显示列数)时代码报错,恳求大神指导 ``` import matplotlib.pyplot as plt import numpy as np import pandas as pd plt.rcParams['font.sans-serif']=['SimHei'] plt.rcParams['axes.unicode_minus']=False data=pd.read_csv('E:\machine learning datasets\Salary_Data.csv') x=data['YearsExperience'] print(x.shape[1]) ``` ``` runfile('C:/Users/Administrator/untitled3.py', wdir='C:/Users/Administrator') Traceback (most recent call last): File "<ipython-input-55-5248b051639a>", line 1, in <module> runfile('C:/Users/Administrator/untitled3.py', wdir='C:/Users/Administrator') File "D:\anaconda1\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile execfile(filename, namespace) File "D:\anaconda1\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "C:/Users/Administrator/untitled3.py", line 18, in <module> print(x.shape[1]) IndexError: tuple index out of range ```

运行ipython时出现如下错误

C:\Users\DiamondSherry>ipython Traceback (most recent call last): File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "c:\python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Python27\Scripts\ipython.exe\__main__.py", line 5, in <module> File "c:\python27\lib\site-packages\IPython\__init__.py", line 48, in <module> from .core.application import Application File "c:\python27\lib\site-packages\IPython\core\application.py", line 25, in <module> from IPython.core import release, crashhandler File "c:\python27\lib\site-packages\IPython\core\crashhandler.py", line 28, in <module> from IPython.core import ultratb File "c:\python27\lib\site-packages\IPython\core\ultratb.py", line 128, in <module> from IPython.utils.terminal import get_terminal_size File "c:\python27\lib\site-packages\IPython\utils\terminal.py", line 22, in <module> from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size ImportError: No module named shutil_get_terminal_size

keras 训练网络时出现ValueError

rt 使用keras中的model.fit函数进行训练时出现错误:ValueError: None values not supported. 错误信息如下: ``` File "C:/Users/Desktop/MNISTpractice/mnist.py", line 93, in <module> model.fit(x_train,y_train, epochs=2, callbacks=callback_list,validation_data=(x_val,y_val)) File "C:\Anaconda3\lib\site-packages\keras\engine\training.py", line 1575, in fit self._make_train_function() File "C:\Anaconda3\lib\site-packages\keras\engine\training.py", line 960, in _make_train_function loss=self.total_loss) File "C:\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper return func(*args, **kwargs) File "C:\Anaconda3\lib\site-packages\keras\optimizers.py", line 432, in get_updates m_t = (self.beta_1 * m) + (1. - self.beta_1) * g File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 820, in binary_op_wrapper y = ops.convert_to_tensor(y, dtype=x.dtype.base_dtype, name="y") File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 639, in convert_to_tensor as_ref=False) File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 704, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 113, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 102, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 360, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported. ```

AddType application / x-httpd-php .php不呈现PHP

<div class="post-text" itemprop="text"> <p>Adding this code:</p> <p><code>AddType application/x-httpd-php .php</code> after</p> <pre><code>... #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </code></pre> <p>to <code>C:\Apache24\bin\httpd.conf</code> downloads all PHP pages on my system rather than render it.</p> <p>Before then, the PHP pages were parsed as raw text.</p> <p>Help needed!</p> </div>

错误消息“禁止您在另一台PC上没有访问/在此服务器上的权限”

<div class="post-text" itemprop="text"> <p>I have configured Apache server on my laptop. But when I try to access a file <code>trial.html</code> on the server from another computer on the same network, I get the error </p> <p><strong>Forbidden</strong> You don't have the permission to access /trial.html on this server</p> <hr> <p><em>Apache/2.4.9 (Win64) PHP/5.5.12 Server</em></p> <p>My httpd.conf file is</p> <pre><code># This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See &lt;URL:http://httpd.apache.org/docs/2.4/&gt; for detailed information. # In particular, see # &lt;URL:http://httpd.apache.org/docs/2.4/mod/directives.html&gt; # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., "c:/apache" instead of "c:\apache"). # If a drive letter is omitted, the drive on which httpd.exe is located # will be used by default. It is recommended that you always supply # an explicit drive letter in absolute paths to avoid confusion. ServerSignature On ServerTokens Full # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "c:/wamp/bin/apache/apache2.4.9" Define APACHE24 Apache2.4 # # Mutex: Allows you to set the mutex mechanism and mutex file directory # for individual mutexes, or change the global defaults # # Uncomment and change the directory if mutexes are file-based and the default # mutex file directory is not on a local disk or is not appropriate for some # other reason. # # Mutex default:logs # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the &lt;VirtualHost&gt; # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 0.0.0.0:80 Listen [::0]:80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule access_compat_module modules/mod_access_compat.so LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule allowmethods_module modules/mod_allowmethods.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule authn_anon_module modules/mod_authn_anon.so LoadModule authn_core_module modules/mod_authn_core.so #LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authn_socache_module modules/mod_authn_socache.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so LoadModule authz_core_module modules/mod_authz_core.so #LoadModule authz_dbd_module modules/mod_authz_dbd.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so #LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule buffer_module modules/mod_buffer.so LoadModule cache_module modules/mod_cache.so LoadModule cache_disk_module modules/mod_cache_disk.so #LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule cgi_module modules/mod_cgi.so #LoadModule charset_lite_module modules/mod_charset_lite.so #LoadModule data_module modules/mod_data.so #LoadModule dav_module modules/mod_dav.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_lock_module modules/mod_dav_lock.so #LoadModule dbd_module modules/mod_dbd.so LoadModule deflate_module modules/mod_deflate.so LoadModule dir_module modules/mod_dir.so #LoadModule dumpio_module modules/mod_dumpio.so LoadModule env_module modules/mod_env.so #LoadModule expires_module modules/mod_expires.so #LoadModule ext_filter_module modules/mod_ext_filter.so LoadModule file_cache_module modules/mod_file_cache.so #LoadModule filter_module modules/mod_filter.so #LoadModule headers_module modules/mod_headers.so #LoadModule heartbeat_module modules/mod_heartbeat.so #LoadModule heartmonitor_module modules/mod_heartmonitor.so #LoadModule ident_module modules/mod_ident.so #LoadModule imagemap_module modules/mod_imagemap.so LoadModule include_module modules/mod_include.so #LoadModule info_module modules/mod_info.so LoadModule isapi_module modules/mod_isapi.so #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so #LoadModule ldap_module modules/mod_ldap.so #LoadModule logio_module modules/mod_logio.so LoadModule log_config_module modules/mod_log_config.so #LoadModule log_debug_module modules/mod_log_debug.so #LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule lua_module modules/mod_lua.so LoadModule mime_module modules/mod_mime.so #LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule negotiation_module modules/mod_negotiation.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_express_module modules/mod_proxy_express.so #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_html_module modules/mod_proxy_html.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so #LoadModule ratelimit_module modules/mod_ratelimit.so #LoadModule reflector_module modules/mod_reflector.so #LoadModule remoteip_module modules/mod_remoteip.so #LoadModule request_module modules/mod_request.so #LoadModule reqtimeout_module modules/mod_reqtimeout.so #LoadModule rewrite_module modules/mod_rewrite.so #LoadModule sed_module modules/mod_sed.so #LoadModule session_module modules/mod_session.so #LoadModule session_cookie_module modules/mod_session_cookie.so #LoadModule session_crypto_module modules/mod_session_crypto.so #LoadModule session_dbd_module modules/mod_session_dbd.so LoadModule setenvif_module modules/mod_setenvif.so #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so #LoadModule socache_dbm_module modules/mod_socache_dbm.so #LoadModule socache_memcache_module modules/mod_socache_memcache.so #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so #LoadModule speling_module modules/mod_speling.so #LoadModule ssl_module modules/mod_ssl.so #LoadModule status_module modules/mod_status.so #LoadModule substitute_module modules/mod_substitute.so #LoadModule unique_id_module modules/mod_unique_id.so #LoadModule userdir_module modules/mod_userdir.so #LoadModule usertrack_module modules/mod_usertrack.so #LoadModule version_module modules/mod_version.so LoadModule vhost_alias_module modules/mod_vhost_alias.so #LoadModule watchdog_module modules/mod_watchdog.so #LoadModule xml2enc_module modules/mod_xml2enc.so LoadModule php5_module "c:/wamp/bin/php/php5.5.12/php5apache2_4.dll" #PHPIniDir c:/wamp/bin/php/php5.5.12 &lt;IfModule unixd_module&gt; # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User daemon Group daemon &lt;/IfModule&gt; # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # &lt;VirtualHost&gt; definition. These values also provide defaults for # any &lt;VirtualHost&gt; containers you may define later in the file. # # All of these directives may appear inside &lt;VirtualHost&gt; containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin admin@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # ServerName localhost:80 HostnameLookups Off # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "c:/wamp/www/" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # &lt;Directory /&gt; AllowOverride none Require all denied &lt;/Directory&gt; # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # &lt;Directory "c:/wamp/www/"&gt; # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove Require local &lt;/Directory&gt; # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # &lt;IfModule dir_module&gt; DirectoryIndex index.php index.php3 index.html index.htm &lt;/IfModule&gt; # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # &lt;Files ".ht*"&gt; Require all denied &lt;/Files&gt; # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a &lt;VirtualHost&gt; # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a &lt;VirtualHost&gt; # container, that host's errors will be logged there and not here. # #ErrorLog "logs/error.log" ErrorLog "c:/wamp/logs/apache_error.log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn &lt;IfModule log_config_module&gt; # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common &lt;IfModule logio_module&gt; # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio &lt;/IfModule&gt; # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a &lt;VirtualHost&gt; # container, they will be logged here. Contrariwise, if you *do* # define per-&lt;VirtualHost&gt; access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "c:/wamp/logs/access.log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "logs/access.log" combined &lt;/IfModule&gt; &lt;IfModule alias_module&gt; # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a &lt;Directory&gt; section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "c:/wamp/bin/apache/apache2.4.9/cgi-bin/" &lt;/IfModule&gt; &lt;IfModule cgid_module&gt; # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock cgisock &lt;/IfModule&gt; # # "c:/wamp/bin/apache/apache2.4.9/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # &lt;Directory "c:/wamp/bin/apache/apache2.4.9/cgi-bin"&gt; AllowOverride None Options None Require all granted &lt;/Directory&gt; &lt;IfModule mime_module&gt; # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # AddEncoding x-compress .Z AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml &lt;/IfModule&gt; # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile conf/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # MaxRanges: Maximum number of Ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # Default setting is to accept 200 Ranges. #MaxRanges unlimited # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off EnableSendfile off # AcceptFilter: On Windows, none uses accept() rather than AcceptEx() and # will not recycle sockets between connections. This is useful for network # adapters with broken driver support, as well as some virtual network # providers such as vpn drivers, or spam, virus or spyware filters. AcceptFilter http none AcceptFilter https none # Supplemental configuration # # The configuration files in the conf/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) #Include conf/extra/httpd-mpm.conf # Multi-language error messages #Include conf/extra/httpd-multilang-errordoc.conf # Fancy directory listings Include conf/extra/httpd-autoindex.conf # Language settings #Include conf/extra/httpd-languages.conf # User home directories #Include conf/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include conf/extra/httpd-info.conf # Virtual hosts #Include conf/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include conf/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include conf/extra/httpd-dav.conf # Various default settings #Include conf/extra/httpd-default.conf # Configure mod_proxy_html to understand HTML4/XHTML1 &lt;IfModule proxy_html_module&gt; Include conf/extra/proxy-html.conf &lt;/IfModule&gt; # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # &lt;IfModule ssl_module&gt; SSLRandomSeed startup builtin SSLRandomSeed connect builtin &lt;/IfModule&gt; # # uncomment out the below to deal with user agents that deliberately # violate open standards by misusing DNT (DNT *must* be a specific # end-user choice) # #&lt;IfModule setenvif_module&gt; #BrowserMatch "MSIE 10.0;" bad_DNT #&lt;/IfModule&gt; #&lt;IfModule headers_module&gt; #RequestHeader unset DNT env=bad_DNT #&lt;/IfModule&gt; #IncludeOptional "c:/wamp/vhosts/*" Include "c:/wamp/alias/*" </code></pre> <p>How do I go about solving this issue?</p> </div>

AttributeError: 'module' object has no attribute 'to_rgba'

I met a strange problem when i using matplotlib with python 2.7, ubuntu 16.04 and jupyter web. The code is very simple, like: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 10, 100) y = np.sin(x) plt.plot(x,y) plt.show() [<matplotlib.lines.Line2D at 0x7f9fef0410d0>] --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /home/******/.local/lib/python2.7/site-packages/ipykernel/pylab/backend_inline.pyc in show(close, block) 37 display( 38 figure_manager.canvas.figure, ---> 39 metadata=_fetch_figure_metadata(figure_manager.canvas.figure) 40 ) 41 finally: /home/******/.local/lib/python2.7/site-packages/ipykernel/pylab/backend_inline.pyc in _fetch_figure_metadata(fig) 172 """Get some metadata to help with displaying a figure.""" 173 # determine if a background is needed for legibility --> 174 if _is_transparent(fig.get_facecolor()): 175 # the background is transparent 176 ticksLight = _is_light([label.get_color() /home/******/.local/lib/python2.7/site-packages/ipykernel/pylab/backend_inline.pyc in _is_transparent(color) 193 def _is_transparent(color): 194 """Determine transparency from alpha.""" --> 195 rgba = colors.to_rgba(color) 196 return rgba[3] < .5 AttributeError: 'module' object has no attribute 'to_rgba' 国外的一个朋友问我的,我也不知道为什么,matplotlib在终端用的好好地,在jupyter notebook中就报错了....... 很奇怪的一个错误, 哪位大佬帮解决一下。 错误指向colors没有to_rgba属性。 谢谢大佬

tensorflow报错 缺少模块问题

AttributeError: module 'tensorflow.contrib.layers' has no attribute 'group_norm' 求解决

Python实现PLA算法,出现判断错误

import numpy as np ITERATION = 100 # 迭代次数为100 W = 0 f = open("C:\\Users\\Administrator\\PycharmProjects\\PLA算法实现\\PLA_train.txt") f.readline() # skip the header data = np.loadtxt(f) X = data[:, :4] # select columns 1 through end y = data[:, 4] # select column 0, the stock price def sign(W, i): # 符号函数 sum = W * X[i] if sum > 0: return 1 else: return -1 def trainw(W,i): #更新W multiply = sign(W, i) if multiply == y[i]: return W else: W = W + X[i] * y[i] return W for i in range(ITERATION): W = trainw(W,i) print(W) # 只写到求出 Wpla 为止 错误: Traceback (most recent call last): File "C:/Users/Administrator/PycharmProjects/PLA算法实现/test.py", line 33, in <module> W = trainw(W,i) File "C:/Users/Administrator/PycharmProjects/PLA算法实现/test.py", line 25, in trainw multiply = sign(W, i) File "C:/Users/Administrator/PycharmProjects/PLA算法实现/test.py", line 19, in sign if sum > 0: return 1 ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

binding.node is not a valid Win32 application

最近用electron-packager打包应用,打包64位exe运行一点毛病没有,打包32位exe可以成功,但是运行之后console报错如下: (window10 64位系统) Uncaught Error: \\?\C:\Users\Administrator\Desktop\electron-9caibox\presenterTool\9caibox-win32-ia32\resources\app\node_modules\ref\build\Release\binding.node is not a valid Win32 application\\?\C:\Users\Administrator\Desktop\electron-9caibox\presenterTool\9caibox-win32-ia32\resources\app\node_modules\ref\build\Release\binding.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20) at Object.Module._extensions..node (module.js:671:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:172:20) at Module.load (module.js:561:32) at tryModuleLoad (module.js:504:12) at Function.Module._load (module.js:496:3) at Module.require (module.js:586:17) at require (internal/module.js:11:18) at bindings (C:\Users\Administrator\Desktop\electron-9caibox\presenterTool\9caibox-win32-ia32\resources\app\node_modules\bindings\bindings.js:81:44) at Object.<anonymous> (C:\Users\Administrator\Desktop\electron-9caibox\presenterTool\9caibox-win32-ia32\resources\app\node_modules\ref\lib\ref.js:5:47) 因为这个问题我以为是我node的问题,把64位node换成32位仍然是这个错误,能试过的各种方法都试过了没招了,求大佬们支招,可以远程,跪谢,解决有红包!!!

paddle训练出现这样的错误,怎么解决?

PaddlePaddle 1.1.0, compiled with 代码: ``` import paddle.v2 as paddle paddle.init(use_gpu=False, trainer_count=1) x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13)) y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear()) probs = paddle.infer( output_layer=y_predict, parameters=paddle.dataset.uci_housing.model(), input=[item for item in paddle.dataset.uci_housing.test()()]) for i in xrange(len(probs)): print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000) ``` 结果: ``` I1122 20:00:13.175132 6741 Util.cpp:166] commandline: --use_gpu=False --trainer_count=1 Thread [140215415105344] Forwarding __fc_layer_0__, *** Aborted at 1542888013 (unix time) try "date -d @1542888013" if you are using GNU date *** PC: @ 0x0 (unknown) *** SIGILL (@0x7f864f3c368b) received by PID 6741 (TID 0x7f8672026740) from PID 1329346187; stack trace: *** @ 0x7f8671a68f20 (unknown) @ 0x7f864f3c368b paddle::CpuMatrix::addBias() @ 0x7f864f1df7b8 paddle::FullyConnectedLayer::forward() @ 0x7f864f1394ad paddle::NeuralNetwork::forward() @ 0x7f864f0bccfd _wrap_GradientMachine_forward @ 0x55e5af878389 (unknown) @ 0x55e5af86f8ca (unknown) @ 0x55e5af8777d3 (unknown) @ 0x55e5af86f8ca (unknown) @ 0x55e5af8777d3 (unknown) @ 0x55e5af88a888 (unknown) @ 0x55e5af872591 (unknown) @ 0x55e5af88a888 (unknown) @ 0x55e5af872591 (unknown) @ 0x55e5af86f8ca (unknown) @ 0x55e5af87724e (unknown) @ 0x55e5af86f8ca (unknown) @ 0x55e5af87724e (unknown) @ 0x55e5af86f8ca (unknown) @ 0x55e5af86f1e9 (unknown) @ 0x55e5af89fbdf (unknown) @ 0x55e5af89a952 (unknown) @ 0x55e5af899dcd (unknown) @ 0x55e5af84958b (unknown) @ 0x7f8671a4bb97 __libc_start_main @ 0x55e5af848e0a (unknown) @ 0x0 (unknown) Process finished with exit code 132 (interrupted by signal 4: SIGILL) ```

小白python爬网页错误:'gbk' codec can't decode byte 0x91 in position 1298: illegal multibyte sequence

跟着视频学爬了一下网页。网页编码是gb2312,代码如下: ``` import requests base_url = "https://search.sina.com.cn/?" headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36', } params = { 'q': '新型冠状病毒', 'c': 'news', 'from': 'channel', 'ie': 'utf-8' } response = requests.get(base_url, headers=headers, params=params) response_str = response.content.decode('gbk') print(response.text) with open('sina_news.html', 'w', encoding='gbk') as fp: fp.write(response_str) ``` 然后就出现了这个错误:line 20, in <module> response_str = response.content.decode('gbk') UnicodeDecodeError: 'gbk' codec can't decode byte 0x91 in position 1298: illegal multibyte sequence 查了很多方法都不太明白,用utf-8会乱码,用tryexcept和error ignore也是乱码。求助大佬们QAQ

公司GPU服务器两块nvidia 1080ti显卡,centos系统,无法startx

显卡驱动已经安装 按照网上教程装各种图形界面 startx都报错 相关错误日志和错误提示 ———————————— /var/log/Xorg.0.log日志如下 [ 883.706] X.Org X Server 1.19.5 Release Date: 2017-10-12 [ 883.707] X Protocol Version 11, Revision 0 [ 883.707] Build Operating System: 3.10.0-693.17.1.el7.x86_64 [ 883.708] Current Operating System: Linux yikumed-GPU 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 [ 883.708] Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-862.14.4.el7.x86_64 root=/dev/mapper/centos_yikumed--gpu-root ro crashkernel=auto rd.lvm.lv=centos_yikumed-gpu/root rd.lvm.lv=centos_yikumed-gpu/swap rhgb quiet LANG=zh_CN.UTF-8 [ 883.709] Build Date: 29 October 2018 03:33:19PM [ 883.709] Build ID: xorg-x11-server 1.19.5-5.1.el7_5.0.1 [ 883.710] Current version of pixman: 0.34.0 [ 883.710] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 883.710] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 883.712] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Nov 3 14:31:06 2018 [ 883.713] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 883.713] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 883.714] (==) No Layout section. Using the first Screen section. [ 883.714] (==) No screen section available. Using defaults. [ 883.714] (**) |-->Screen "Default Screen Section" (0) [ 883.714] (**) | |-->Monitor "<default monitor>" [ 883.714] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 883.714] (==) Automatically adding devices [ 883.714] (==) Automatically enabling devices [ 883.714] (==) Automatically adding GPU devices [ 883.714] (==) Automatically binding GPU devices [ 883.714] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 883.714] (==) FontPath set to: catalogue:/etc/X11/fontpath.d, built-ins [ 883.714] (==) ModulePath set to "/usr/lib64/xorg/modules" [ 883.714] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 883.714] (II) Loader magic: 0x557fe15eb020 [ 883.714] (II) Module ABI versions: [ 883.714] X.Org ANSI C Emulation: 0.4 [ 883.714] X.Org Video Driver: 23.0 [ 883.714] X.Org XInput driver : 24.1 [ 883.714] X.Org Server Extension : 10.0 [ 883.714] (II) xfree86: Adding drm device (/dev/dri/card0) [ 883.715] (II) xfree86: Adding drm device (/dev/dri/card1) [ 883.743] (--) PCI: (0:23:0:0) 10de:1b06:1028:3600 rev 161, Mem @ 0x91000000/16777216, 0x380060000000/268435456, 0x380070000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/524288 [ 883.743] (--) PCI:*(0:115:0:0) 10de:1b06:1028:3600 rev 161, Mem @ 0xc4000000/16777216, 0xb0000000/268435456, 0xc0000000/33554432, I/O @ 0x00009000/128, BIOS @ 0x????????/524288 [ 883.743] (II) LoadModule: "glx" [ 883.744] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so [ 883.745] (II) Module glx: vendor="X.Org Foundation" [ 883.745] compiled for 1.19.5, module version = 1.0.0 [ 883.745] ABI class: X.Org Server Extension, version 10.0 [ 884.113] (==) Matched nouveau as autoconfigured driver 0 [ 884.113] (==) Matched nouveau as autoconfigured driver 1 [ 884.113] (==) Matched nouveau as autoconfigured driver 2 [ 884.113] (==) Matched modesetting as autoconfigured driver 3 [ 884.113] (==) Matched fbdev as autoconfigured driver 4 [ 884.113] (==) Matched vesa as autoconfigured driver 5 [ 884.113] (==) Assigned the driver to the xf86ConfigLayout [ 884.113] (II) LoadModule: "nouveau" [ 884.113] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so [ 884.114] (II) Module nouveau: vendor="X.Org Foundation" [ 884.114] compiled for 1.19.3, module version = 1.0.13 [ 884.114] Module class: X.Org Video Driver [ 884.114] ABI class: X.Org Video Driver, version 23.0 [ 884.114] (II) LoadModule: "modesetting" [ 884.115] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so [ 884.115] (II) Module modesetting: vendor="X.Org Foundation" [ 884.115] compiled for 1.19.5, module version = 1.19.5 [ 884.115] Module class: X.Org Video Driver [ 884.115] ABI class: X.Org Video Driver, version 23.0 [ 884.115] (II) LoadModule: "fbdev" [ 884.115] (II) Loading /usr/lib64/xorg/modules/drivers/fbdev_drv.so [ 884.115] (II) Module fbdev: vendor="X.Org Foundation" [ 884.115] compiled for 1.19.3, module version = 0.4.3 [ 884.115] Module class: X.Org Video Driver [ 884.115] ABI class: X.Org Video Driver, version 23.0 [ 884.115] (II) LoadModule: "vesa" [ 884.116] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so [ 884.116] (II) Module vesa: vendor="X.Org Foundation" [ 884.116] compiled for 1.19.3, module version = 2.3.2 [ 884.116] Module class: X.Org Video Driver [ 884.116] ABI class: X.Org Video Driver, version 23.0 [ 884.116] (II) NOUVEAU driver [ 884.116] (II) NOUVEAU driver for NVIDIA chipset families : [ 884.116] RIVA TNT (NV04) [ 884.116] RIVA TNT2 (NV05) [ 884.116] GeForce 256 (NV10) [ 884.116] GeForce 2 (NV11, NV15) [ 884.116] GeForce 4MX (NV17, NV18) [ 884.116] GeForce 3 (NV20) [ 884.116] GeForce 4Ti (NV25, NV28) [ 884.116] GeForce FX (NV3x) [ 884.116] GeForce 6 (NV4x) [ 884.116] GeForce 7 (G7x) [ 884.116] GeForce 8 (G8x) [ 884.116] GeForce GTX 200 (NVA0) [ 884.117] GeForce GTX 400 (NVC0) [ 884.117] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 884.117] (II) FBDEV: driver for framebuffer: fbdev [ 884.117] (II) VESA: driver for VESA chipsets: vesa [ 884.117] (++) using VT number 2 [ 884.120] (EE) [drm] Failed to open DRM device for (null): -2 [ 884.120] (EE) [drm] Failed to open DRM device for (null): -2 [ 884.120] (EE) [drm] Failed to open DRM device for (null): -2 [ 884.120] (EE) [drm] Failed to open DRM device for (null): -2 [ 884.120] (EE) [drm] Failed to open DRM device for (null): -2 [ 884.120] (EE) [drm] Failed to open DRM device for pci:0000:73:00.0: -2 [ 884.120] (EE) [drm] Failed to open DRM device for pci:0000:73:00.0: -2 [ 884.120] (EE) [drm] Failed to open DRM device for pci:0000:73:00.0: -2 [ 884.121] (WW) Falling back to old probe method for modesetting [ 884.121] (II) Loading sub module "fbdevhw" [ 884.121] (II) LoadModule: "fbdevhw" [ 884.121] (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so [ 884.121] (II) Module fbdevhw: vendor="X.Org Foundation" [ 884.121] compiled for 1.19.5, module version = 0.0.2 [ 884.121] ABI class: X.Org Video Driver, version 23.0 [ 884.121] (EE) open /dev/fb0: No such file or directory [ 884.121] (WW) Falling back to old probe method for fbdev [ 884.121] (II) Loading sub module "fbdevhw" [ 884.121] (II) LoadModule: "fbdevhw" [ 884.122] (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so [ 884.122] (II) Module fbdevhw: vendor="X.Org Foundation" [ 884.122] compiled for 1.19.5, module version = 0.0.2 [ 884.122] ABI class: X.Org Video Driver, version 23.0 [ 884.122] (EE) open /dev/fb0: No such file or directory [ 884.122] vesa: Ignoring device with a bound kernel driver [ 884.122] (WW) Falling back to old probe method for vesa [ 884.122] (EE) Screen 0 deleted because of no matching config section. [ 884.122] (II) UnloadModule: "modesetting" [ 884.122] (EE) Screen 0 deleted because of no matching config section. [ 884.122] (II) UnloadModule: "fbdev" [ 884.122] (II) UnloadSubModule: "fbdevhw" [ 884.122] (EE) Screen 0 deleted because of no matching config section. [ 884.122] (II) UnloadModule: "vesa" [ 884.122] (EE) Device(s) detected, but none match those in the config file. [ 884.122] (EE) Fatal server error: [ 884.122] (EE) no screens found(EE) [ 884.122] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 884.122] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 884.122] (EE) [ 884.124] (EE) Server terminated with error (1). Closing log file. —————————————————————————— 运行startx错误提示 xauth: file /root/.serverauth.3246 does not exist xauth: (stdin):2: unknown command "8236e144403225f38c522dc0f25435bd" xauth: (stdin):3: unknown command "8236e144403225f38c522dc0f25435bd" X.Org X Server 1.19.5 Release Date: 2017-10-12 X Protocol Version 11, Revision 0 Build Operating System: 3.10.0-693.17.1.el7.x86_64 Current Operating System: Linux yikumed-GPU 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-862.14.4.el7.x86_64 root=/dev/mapper/centos_yikumed--gpu-root ro crashkernel=auto rd.lvm.lv=centos_yikumed-gpu/root rd.lvm.lv=centos_yikumed-gpu/swap rhgb quiet LANG=zh_CN.UTF-8 Build Date: 29 October 2018 03:33:19PM Build ID: xorg-x11-server 1.19.5-5.1.el7_5.0.1 Current version of pixman: 0.34.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Sat Nov 3 12:39:52 2018 (==) Using config directory: "/etc/X11/xorg.conf.d" (==) Using system config directory "/usr/share/X11/xorg.conf.d" vesa: Ignoring device with a bound kernel driver (EE) Fatal server error: (EE) no screens found(EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error

python 使用with con:连接数据库时 报错AttributeError: __enter__怎么解决呢?

# python 使用with con:连接数据库代码如下 import MySQLdb as mdb import sys con=mdb.connect('localhost', 'root', 'mysql', 'test'); with con: cur = con.cursor() # 执行一个查询 cur.execute("SELECT VERSION()") # 取得上个查询的结果,是单个结果 data = cur.fetchone() print("Database version : %s " % data) 运行上面的 程序会报下面的错误: Traceback (most recent call last): File "C:/Users/x'x'x/PycharmProjects/test01/python_mysql/test_mysql.py", line 8, in <module> with con: AttributeError: __enter__ 怎么解决呢?

在python 2.7shell中出现如下错误

>>> import matplotlib >>> import matplotlib.pyplot as plt Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> import matplotlib.pyplot as plt File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 29, in <module> from matplotlib.figure import Figure, figaspect File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 36, in <module> from matplotlib.axes import Axes, SubplotBase, subplot_class_factory File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 20, in <module> import matplotlib.dates as _ # <-registers a date unit converter File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 119, in <module> from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, File "C:\Python27\lib\dateutil\rrule.py", line 16, in <module> from six.moves import _thread ImportError: cannot import name _thread >>>

pycharm使用时,出现模块调用失败,怎么解决?

Traceback (most recent call last): File "C:/Temp/lassos/first.py", line 4, in <module> from sklearn.preprocessing import Imputer File "C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\__init__.py", line 134, in <module> from .base import clone File "C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\base.py", line 13, in <module> from .utils.fixes import signature File "C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\utils\__init__.py", line 10, in <module> from .validation import (as_float_array, File "C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\utils\validation.py", line 18, in <module> from ..utils.fixes import signature File "C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\utils\fixes.py", line 144, in <module> from scipy.sparse.linalg import lsqr as sparse_lsqr # noqa File "C:\Users\Dell\Anaconda3\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module> from .isolve import * File "C:\Users\Dell\Anaconda3\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 8, in <module> from .lgmres import lgmres File "C:\Users\Dell\Anaconda3\lib\site-packages\scipy\sparse\linalg\isolve\lgmres.py", line 10, in <module> from scipy.linalg import get_blas_funcs, get_lapack_funcs File "C:\Users\Dell\Anaconda3\lib\site-packages\scipy\linalg\__init__.py", line 190, in <module> from .misc import * File "C:\Users\Dell\Anaconda3\lib\site-packages\scipy\linalg\misc.py", line 5, in <module> from .blas import get_blas_funcs File "C:\Users\Dell\Anaconda3\lib\site-packages\scipy\linalg\blas.py", line 214, in <module> from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

pyinstaller出现错误,不能生成exe文件

错误如下:AttributeError: 'str' object has no attribute 'items' 代码如下: import numpy as np import matplotlib.pyplot as plt import xlrd import math path = r'C:\Users\chuchao\Desktop\test\math\data.xls' sheetname = 'Sheet1' workbook = xlrd.open_workbook(path) sheet = workbook.sheet_by_name(sheetname) #print(sheet.nrows, ' ', sheet.ncols) data = [] for i in range(sheet.nrows): data.append(sheet.row_values(i)) print(data) x = np.linspace(0, math.ceil(sheet.ncols), sheet.ncols) y = np.linspace(0, math.ceil(sheet.nrows), sheet.nrows) X, Y = np.meshgrid(x, y) Height = data fig = plt.figure() ax = fig.add_subplot(1, 1, 1) cir1 = plt.Circle((30.3 * 1000 / 38.2, 89.8 * 1000 / 38.2), radius = 10000 / 38.2) #第一个参数为圆心坐标,第二个为半径 #第三个为透明度(0-1) cir2 = plt.Circle((66.0 * 1000 / 38.2, 84.7 * 1000 / 38.2), radius = 10000 / 38.2) cir3 = plt.Circle((98.4 * 1000 / 38.2, 76.7 * 1000 / 38.2), radius = 10000 / 38.2) cir4 = plt.Circle((73.7 * 1000 / 38.2, 61.0 * 1000 / 38.2), radius = 10000 / 38.2) cir5 = plt.Circle((57.9 * 1000 / 38.2, 47.6 * 1000 / 38.2), radius = 10000 / 38.2) cir6 = plt.Circle((86.8 * 1000 / 38.2, 22.0 * 1000 / 38.2), radius = 10000 / 38.2) cir7 = plt.Circle((93.6 * 1000 / 38.2, 48.8 * 1000 / 38.2), radius = 10000 / 38.2) plt.contourf(X, Y, Height, 10, alpha = 0.6, cmap = plt.cm.hot) plt.contour(X, Y, Height, 10, colors = 'black', linewidth = 0.5) plt.clabel(plt.contour(X, Y, Height, 10, colors = 'black', linewidth = 0.5), inline = True, fontsize = 10) ax.add_patch(cir1) ax.add_patch(cir2) ax.add_patch(cir3) ax.add_patch(cir4) ax.add_patch(cir5) ax.add_patch(cir6) ax.add_patch(cir7) plt.axis('scaled') plt.axis('equal') plt.show()

HTTP 错误 500.19 - Internal Server Error

web.config 文件的 system.webServer/httpErrors 节中不允许绝对物理路径“C:\inetpub\custerr”。请改用相对路径。 详细错误信息 模块 CustomErrorModule 通知 SendResponse 处理程序 AboMapperCustom-33028 错误代码 0x8007000d 请求的 URL XXXXXX 物理路径 D:\user\XXXX\index.php 登录方法 匿名 登录用户 匿名 最可能的原因: •工作进程无法读取 applicationhost.config 或 web.config 文件。 •applicationhost.config 或 web.config 文件中存在格式错误的 XML。 •由于 NTFS 权限不正确,服务器无法访问 applicationhost.config 或 web.config 文件。 可尝试的操作: •查询事件日志中有关配置文件不可读的原因的信息。 •确保为应用程序池指定的用户标识或通过身份验证的用户具有访问 web.config 文件的必需权限。 CSDN现有的方法 都测试过了,无法修复,求大神指导

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Intellij IDEA 实用插件安利

1. 前言从2020 年 JVM 生态报告解读 可以看出Intellij IDEA 目前已经稳坐 Java IDE 头把交椅。而且统计得出付费用户已经超过了八成(国外统计)。IDEA 的...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

魂迁光刻,梦绕芯片,中芯国际终获ASML大型光刻机

据羊城晚报报道,近日中芯国际从荷兰进口的一台大型光刻机,顺利通过深圳出口加工区场站两道闸口进入厂区,中芯国际发表公告称该光刻机并非此前盛传的EUV光刻机,主要用于企业复工复产后的生产线扩容。 我们知道EUV主要用于7nm及以下制程的芯片制造,光刻机作为集成电路制造中最关键的设备,对芯片制作工艺有着决定性的影响,被誉为“超精密制造技术皇冠上的明珠”,根据之前中芯国际的公报,目...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

百度工程师,获利10万,判刑3年!

所有一夜暴富的方法都写在刑法中,但总有人心存侥幸。这些年互联网犯罪高发,一些工程师高技术犯罪更是引发关注。这两天,一个百度运维工程师的案例传遍朋友圈。1...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

实时更新:计算机编程语言排行榜—TIOBE世界编程语言排行榜(2020年6月份最新版)

内容导航: 1、TIOBE排行榜 2、总榜(2020年6月份) 3、本月前三名 3.1、C 3.2、Java 3.3、Python 4、学习路线图 5、参考地址 1、TIOBE排行榜 TIOBE排行榜是根据全世界互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!)以及Wikipedia、Amazon、YouTube统计出排名数据。

立即提问
相关内容推荐