tensorboard提示错误cannot import name 'dump_age'

最开始使用tensorboard的时候是没有问题的,但是不知道为什么,用了几次之后就变成了这样,每次都是提示cannot import name 'dump age',之前没有遇到过这种错误,希望有大佬可以帮忙解答一下。非常感谢
代码是没有问题的,我用最开始用过的代码提示也是这样,想在相当于整个tensorboard不能用了。
图片我就不上传了,截的图一直没办法上传,有点蛋疼!

CMD中执行的命令如下:

C:\Users\Lenovo>e:

E:>cd E:\Python\Jupyter notebook\Tensorflow-study\inception_log

E:\Python\Jupyter notebook\Tensorflow-study\inception_log>tensorboard --host=127.0.0.1
Traceback (most recent call last):
File "e:\anaconda3\envs\tensorflow-gpu\lib\runpy.py", line 193, in run_module_as_main
"
_main__", mod_spec)
File "e:\anaconda3\envs\tensorflow-gpu\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "E:\Anaconda3\envs\tensorflow-gpu\Scripts\tensorboard.exe\
_main__.py", line 5, in
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorboard\main.py", line 45, in
from tensorboard import default
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorboard\default.py", line 37, in
from tensorboard.plugins.audio import audio_plugin
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorboard\plugins\audio\audio_plugin.py", line 23, in
from werkzeug import wrappers
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\werkzeug__init__.py", line 151, in
import('werkzeug.exceptions')
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\werkzeug\exceptions.py", line 71, in
from werkzeug.wrappers import Response
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\werkzeug\wrappers__init__.py", line 26, in
from .common_descriptors import CommonRequestDescriptorsMixin
File "e:\anaconda3\envs\tensorflow-gpu\lib\site-packages\werkzeug\wrappers\common_descriptors.py", line 6, in
from ..http import dump_age
ImportError: cannot import name 'dump_age'

E:\Python\Jupyter notebook\Tensorflow-study\inception_log>

4个回答

同样问题,把这个模块werkzeug卸了重装下解决的。

qq_41116287
Glamber_Kanser 回复shannon__w: conda remove ***和conda install ***
10 个月之前 回复
qq_31260485
shannon__w 回复: 好了~~~谢谢
大约一年之前 回复
qq_31260485
shannon__w 回复玩火的小人: 请问怎么卸载和重装哈,就是具体命令,一样的问题,感谢
大约一年之前 回复
qq_18864405
玩火的小人 非常感谢,我试了一下,确实是werkzeug的问题。应该是因为装了两个版本的werkzeug的问题,所以导致这个问题。非常感谢!!!
大约一年之前 回复

解决了没,可能是升级导致的

heart002
heart002 回复玩火的小人: 应该是安装的某些库有重复,最简单的做法是重新用Anaconda Prompt新建一个环境,CPU版本的也好,GPU也好,总之重新安装一下tensorflow,亲测
大约一年之前 回复
qq_18864405
玩火的小人 没有,我现在完全没有找到具体是哪里的问题,我把tensorboard卸载了然后重新安装也不行
大约一年之前 回复

你好,我用的pycharm编辑器,最近打算学tensorflow结果运行时也出现这个问题,向你们前面说的卸了werkzeug再安装还是报错:ImportError: cannot import name 'dump_age',求指教

qq_40377941
qq_40377941 回复玩火的小人: 我从命令符号窗口删了,然后又安装还是那样,好烦哦
大约一年之前 回复
qq_18864405
玩火的小人 建议你试一下,看看是不是装了多个版本的werkzeug,可能会存在werkzeug没有卸载干净。我是用的conda,pycharm没有用过,所以不太清楚。
大约一年之前 回复

卸载后,会将你的tensorflow 一块卸载,这时候你再安装可能会不出现问题,但是tensorflow 模块丢失。建议安装的时候在Anaconda Prompt 重新安装一下tensorflow.

conda install tensorflow

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
怎么样再linux下查看dump_stack()函数打印出来的信息?

本人Linux小白,刚学没多久,最近我想要研究下linux中打开文件操作的流程,于是我就在内核的filp open()函数的源代码中插入了dump_stack_()函数。 我重新编译内核之后,直接在终端调用cd 命令行,然后想在系统日志里面看看有没有 函数调用打印出来,但是翻来翻去好像什么都没有的样子。 但是我自己写一个简单的模块,里面有dump_stack_函数,在编译模块,再运行这个模块, 这样的话又可以在日志里面看到函数调用栈的信息。 试了好几次确实没辙了。求大神啊~~~!!!!!

关于pcap_dump_close出现Segmentation fault

最近在维护上届学长的一个应用协议识别毕业设计项目。很大一部分内容使用C++写的。其中有个协议的过滤,之前一直使用挺好的,但是数据只要超过30M就出现Segmentation fault(core dump)错误。 使用gdb查看的信息如下:![gdb信息提示](https://img-ask.csdn.net/upload/201503/30/1427685308_21689.png) 其中main.cpp内容如下: 这个方法的主要作用就是从一个流文件(pcap格式,经过协议识别处理后,每一条流记录都由一个特殊的数据报文头表示,其中32字节代表一种应用协议的编号)读取某种应用协议的数据报文然后再写入到一个pcap中去。这样子就将某种协议的数据报文给过滤出来了。 由于之前一直都只在做java和php的东西,C++这些可以看得懂,但是很少能写。周边的同学也基本上都不怎么会C++, 恳请有会的给出个大致解决思路。谢谢了。 ``` //读取流文件并处理 void readFile(string &flowDir, string &confDir, string &rstDir, string &application) { //定义类Compute Fliter *fliter = new Fliter(flowDir, confDir, rstDir, application); //将目录下的所有文件名存放到文件ls.txt中 string cmd = "ls " + flowDir + " >ls.txt"; system(cmd.c_str()); ifstream files("ls.txt"); assert(files); string pcapdir = rstDir + "pcap/"; string creatdir_cmd = "mkdir " + rstDir + "pcap"; system(creatdir_cmd.c_str()); pcap_dumper_t *pp_write = NULL; char pcapFile[256]; sprintf(pcapFile, "%s%s.pcap", pcapdir.c_str(), application.c_str()); cout <<"pcap file:" <<pcapFile <<endl; //依次读取文件 u_llong fileNum = 0; while(!files.eof()) { //获取文件名 string filename; getline(files, filename); if(filename.empty()) break; string inFile = flowDir + filename; cout <<"read file:" <<inFile <<endl; fileNum++; //打开pcap文件 char errbuf[128]; pcap_t *pp_read_flow = pcap_open_offline(inFile.c_str(), errbuf); assert(pp_read_flow); pcap_t *pp_read_pack = pcap_open_offline(inFile.c_str(), errbuf); assert(pp_read_pack); //读pcap文件 struct pcap_pkthdr ppHdr; //pcap数据包头,16字节 const u_char *pkt; while((pkt = pcap_next(pp_read_flow, &ppHdr)) != NULL) { if(0 == ppHdr.ts.tv_sec) //此条数据为流记录 { // 对应协议与提交任务一致 // pkt[31]处存放的协议号 if((*(u_short*)&pkt[31]) == fliter->convert_application(application)) { if(pp_write == NULL) pp_write = pcap_dump_open(pp_read_flow, pcapFile); assert(pp_write); pcap_dump((u_char*)pp_write, &ppHdr, pkt); while((pkt = pcap_next(pp_read_pack, &ppHdr)) != NULL) { if(ppHdr.ts.tv_sec != 0) { pcap_dump((u_char*)pp_write, &ppHdr, pkt); } else // 到达了下一条流记录 break; } } } } pcap_close(pp_read_flow); pcap_close(pp_read_pack); } ** pcap_dump_close(pp_write);** // 第94行 files.close(); cout <<"\ntotal files:" <<fileNum <<endl; } ```

pdftk dump_data_fields不包含复选框标签

<div class="post-text" itemprop="text"> <p>I am using <code>pdftk</code> to dump the datafields from my editable PDF. I want to get checkbox field names, or you can say labels for the checkboxes. The problem is that the file generated by <code>dump_data_fields</code> doesn't return the exact checkbox labels; instead it shows the checkbox description.</p> <p>For example:</p> <pre><code>FieldType: Button FieldName: ResidentialStructure_Basement_FoundationFinishedIndicator_A FieldNameAlt: Check the box (if applicable): Indicates the basement/recreation room is finished. FieldFlags: 8388608 FieldJustification: Left FieldStateOption: 1 FieldStateOption: Off --- FieldType: Button FieldName: ResidentialStructure_Basement_FoundationWalkOutIndicator_A FieldNameAlt: Check the box (if applicable): Indicates the basement/recreation room is a walk out. FieldFlags: 8388608 FieldJustification: Left FieldStateOption: 1 FieldStateOption: Off </code></pre> <p>The real labels of these 2 checkboxes in the PDF document are <code>finished</code> and <code>walk out</code>, but we only get descriptions of these checkboxes as shown above in <code>FieldName</code> and <code>FieldNameAlt</code>.</p> <p>Is there any way to get exact checkbox labels using <code>dump_data_fields</code> or any other property of <code>pdftk</code>?</p> </div>

学习c++中遇到的问题,求大佬解答

``` #include <iostream> class Singleton{ private: static Singleton* s_Instance; public: static Singleton& Get(){ return *s_Instance; } void Hello() { std::cout << "Hello" << std::endl; } }; Singleton* Singleton::s_Instance = nullptr; int main(){ Singleton::Get().Hello(); std::cin.get(); } ``` 首先将Singleton类中的静态指针s_Instance设置为空指针,然后在main函数中直接调用Singleton::Get()用来这个指针指向内存的引用。**我的问题是:** 1. 已经被设置为空指针的内存单元应该是不存在的,那么也就无法获取到这个内存单元的引用,但是这段代码居然能够顺利被编译运行,求大佬讲解内部原理 2. 我在调试时发现这个运行从始至终s_Instance的值都是0,也就是空指针,这又是怎么回事呢。

var_dump返回的空数组($ _ POST); 虽然不是var_dump($ _ GET);

<div class="post-text" itemprop="text"> <p>I am running PHP 7.0.22 on two ubuntu 16.04.1 LTS servers: a web server and an app server. They are both instances of AWS EC2.</p> <p>When I have the following code on the app server</p> <pre><code>&lt;form action="http://example.com/uploadFiles.php" method="get" enctype="multipart/form-data"&gt; &lt;label for="file" style="font-size:5mm; font-family:times-new-roman"&gt;Select up to 20 filenames:&lt;/label&gt; &lt;input type="file" name="file[]" id="file" multiple="multiple"/&gt;&lt;/br&gt; &lt;input type="submit" name="submit[]" value="submit" /&gt; &lt;input type="hidden" id="LoggedIn" name="LoggedIn" value="&lt;?php echo $_SESSION['LoggedIn'] ?&gt;"&gt; &lt;input type="hidden" id="setName" name="setName" value="&lt;?php echo $setName ?&gt;"&gt; &lt;input type="hidden" id="UserName" name="UserName" value="&lt;?php echo $_SESSION['UserName'] ?&gt;"&gt; &lt;/form&gt; </code></pre> <p>and the following code in uploadFiles.php on the web server</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;?php require("menu.php"); ?&gt; &lt;?php var_dump($_GET); ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I get</p> <pre><code>array(5) { ["file"]=&gt; array(1) { [0]=&gt; string(32) "file.name" } ["submit"]=&gt; array(1) { [0]=&gt; string(6) "submit" } ["LoggedIn"]=&gt; string(1) "1" ["setName"]=&gt; string(4) "test" ["UserName"]=&gt; string(12) "OtagoHarbour" } </code></pre> <p>However, if I have the following code on the app server</p> <pre><code>&lt;form action="http://example.com/uploadFiles.php" method="post" enctype="multipart/form-data"&gt; &lt;label for="file" style="font-size:5mm; font-family:times-new-roman"&gt;Select up to 20 filenames:&lt;/label&gt; &lt;input type="file" name="file[]" id="file" multiple="multiple"/&gt;&lt;/br&gt; &lt;input type="submit" name="submit[]" value="submit" /&gt; &lt;input type="hidden" id="LoggedIn" name="LoggedIn" value="&lt;?php echo $_SESSION['LoggedIn'] ?&gt;"&gt; &lt;input type="hidden" id="setName" name="setName" value="&lt;?php echo $setName ?&gt;"&gt; &lt;input type="hidden" id="UserName" name="UserName" value="&lt;?php echo $_SESSION['UserName'] ?&gt;"&gt; &lt;/form&gt; </code></pre> <p>and the following code in uploadFiles.php on the web server</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;?php require("menu.php"); ?&gt; &lt;?php var_dump($_POST); ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I get</p> <pre><code>array(0) { } </code></pre> <p>Is there a way to get what I am getting with GET using POST?</p> <p>I do not know of this is relevant but I did not have this problem before I set SSL up on my website.</p> </div>

fastdfs报错undefined reference to `g_exe_name'

make: Nothing to be done for `all'. cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -o fdfs_storaged fdfs_storaged.c ../common/fdfs_global.o ../tracker/fdfs_shared_func.o ../tracker/tracker_proto.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o storage_nio.o storage_dio.o storage_ip_changed_dealer.o storage_param_getter.o storage_disk_recovery.o trunk_mgr/trunk_mem.o trunk_mgr/trunk_shared.o trunk_mgr/trunk_sync.o trunk_mgr/trunk_client.o trunk_mgr/trunk_free_block_checker.o ../client/client_global.o ../client/tracker_client.o ../client/storage_client.o ../client/client_func.o fdht_client/fdht_proto.o fdht_client/fdht_client.o fdht_client/fdht_func.o fdht_client/fdht_global.o storage_dump.o -L/usr/lib64 -lpthread -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon /tmp/ccWmwyMo.o: In function `main': /home/centos/fastdfs-5.10/storage/fdfs_storaged.c:130: undefined reference to `g_exe_name' storage_dump.o: In function `fdfs_dump_global_vars': /home/centos/fastdfs-5.10/storage/storage_dump.c:36: undefined reference to `g_exe_name' collect2: error: ld returned 1 exit status make: *** [fdfs_storaged] Error 1 make: Nothing to be done for `all'.

使用Symfony显示PHP的错误,var_dump等

<div class="post-text" itemprop="text"> <p>I'm developing with Symfony 2. The thing is that not always I can see the errors or <code>var_dumps</code> that I use to debug. I can see them if I go to inspector-&gt;network and select the proper file. The thing is that it is very annoying to see it. </p> <p>How could I see it directly to the browser?</p> <p>I use Xdebug.</p> <p>I have in my php.ini:</p> <pre><code>display_errors = On </code></pre> <p>And I tried with: </p> <pre><code>xdebug.force_display_errors = 1; xdebug.force_error_reporting = -1; </code></pre> <p>but that doesn't work.</p> <p>Any idea?</p> <p>------- Editing ------</p> <p>This is an example of how i have to debug.</p> <p><a href="https://i.stack.imgur.com/w8azI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w8azI.png" alt="enter image description here"></a></p> <p>I have to go to inspector -&gt; network and select the proper file. Apart of being very annoying, it is not efficient. Problem to see the full result as I cant scroll down or scroll right.</p> <p>----- End Editing -----</p> <p>I'd like to avoid to write any <code>init_set</code> or others options in my code if possible.</p> <p>Another question... if a <code>var_dump</code> have more than 120k character or it is protected property how can I display it? So far I was changing it to public to dig in.</p> </div>

如何设置通过var_dump生成的数组的显示样式

<div class="post-text" itemprop="text"> <p>I've a code to search files in a directory. I'm using the code <code>var_dump($search-&gt;foundFiles)</code> to display the results in a webpage, but I can't figure out how to find te correct code for proper display and the the results are URL.</p> <p>The result of <code>var_dump($search-&gt;foundFiles)</code> is:</p> <blockquote> <p>Array ( [0] =&gt; archivednews/2016-01-08 22h30 Zika Virus archived news.html [1] =&gt; archivednews/2016-01-07 22h30 Zika Virus archived news.html ) </p> </blockquote> <p>But I would like to have it displayed in a list with clickable links to the found files like this: </p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;a href="archivednews/2016-01-05 22h30 Zika Virus archived news.html"&gt;2016-01-05 22h30 Zika Virus archived news.html&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="archivednews/2016-01-04 22h30 Zika Virus archived news.html"&gt;2016-01-04 22h30 Zika Virus archived news.html&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="archivednews/2016-01-08 22h30 Zika Virus archived news.html"&gt;2016-01-08 22h30 Zika Virus archived news.html&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>This is the complete code:</p> <pre><code>class searchFileContents{ var $dir_name = '';//The directory to search var $search_phrase = '';//The phrase to search in the file contents var $allowed_file_types = array('php','phps');//The file types that are searched var $foundFiles;//Files that contain the search phrase will be stored here var $myfiles; function search($directory, $search_phrase){ $this-&gt;dir_name = $directory; $this-&gt;search_phrase = $search_phrase; $this-&gt;myfiles = $this-&gt;GetDirContents($this-&gt;dir_name); $this-&gt;foundFiles = array(); if ( empty($this-&gt;search_phrase) ) die('Empty search phrase'); if ( empty($this-&gt;dir_name) ) die('You must select a directory to search'); foreach ( $this-&gt;myfiles as $f ){ if ( in_array(array_pop(explode ( '.', $f )), $this-&gt;allowed_file_types) ){ $contents = file_get_contents($f); if ( strpos($contents, $this-&gt;search_phrase) !== false ) $this-&gt;foundFiles [] = $f; } } return $this-&gt;foundFiles; } function GetDirContents($dir){ if (!is_dir($dir)){die ("Function GetDirContents: Problem reading : $dir!");} if ($root=@opendir($dir)){ while ($file=readdir($root)){ if($file=="." || $file==".."){continue;} if(is_dir($dir."/".$file)){ $files=array_merge($files,$this-&gt;GetDirContents($dir."/".$file)); }else{ $files[]=$dir."/".$file; } } } return $files; } } //Example : $search = new searchFileContents; $search-&gt;search('E:/htdocs/AccessClass', 'class'); var_dump($search-&gt;foundFiles); </code></pre> </div>

Dump $_SERVER $_SERVER['REQUEST_METHOD'] is undefined

xdebug调试过程中报如下的错误:Dump $_SERVER $_SERVER['REQUEST_METHOD'] is undefined $_SERVER['REQUEST_URI'] is undefined $_SERVER['HTTP_USER_AGENT'] is undefined Dump $_REQUEST Variables in local scope (#2),而我的程序中要用到$_REQUEST方法,如何解决?

使用var_dump()在php中显示null

<div class="post-text" itemprop="text"> <p>I trying to print array value in php.Here i share my codes</p> <p><code>upload.php</code></p> <pre><code>$postdata = file_get_contents("php://input"); if(isset($postdata)){ $request = json_decode($postdata, true); var_dump($request); $artist_name = $request['testname']; if($artist_name != ""){ $con = mysqli_connect("localhost", "root", "upload", "ampache"); // Check connection if(mysqli_connect_errno()){ // echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else{ $sql = "INSERT INTO album_details(artist_name) VALUES('$artist_name')"; $stmt = mysqli_query($con, $sql) or die ("MySQL Error:".mysqli_error($con)); } } } </code></pre> <p>when I tried this, I got <code>null</code> in view page,at the same time in console network(Response) it shows :</p> <pre><code>array(1) { ["testname"]=&gt; string(7) "vignesh" } </code></pre> <p>How to print <code>testname</code> in view page</p> <p>Full Code of <code>upload.php</code> file</p> <pre><code>&lt;?php header("Access-Control-Allow-Origin: *"); $connection = mysqli_connect("localhost", "root", "upload", "ampache"); // Establishing $postdata = file_get_contents("php://input"); if(isset($postdata)){ $request = json_decode($postdata, true); echo $postdata; $artist_name = $request['testname']; if($artist_name != ""){ $con = mysqli_connect("localhost", "root", "upload", "ampache"); // Check connection if(mysqli_connect_errno()){ // echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else{ $sql = "INSERT INTO album_details(artist_name) VALUES('$artist_name')"; $stmt = mysqli_query($con, $sql) or die ("MySQL Error:".mysqli_error($con)); } } } $catalog = 1; $enabled = 1; $channels = 2; $update_time = 0; $user_upload = 1; $bitrate = 192000; $rate = 44100; $mode = "cbr"; echo $postdata; $use = 12; if(isset($_POST['submit'])){ // Fetching variables of the form which travels in URL $name = $_POST['name']; $query1 = mysqli_query($connection, "insert into album(name) values ('$name')"); $lastid = mysqli_insert_id($connection); $album_id = $lastid; } if(isset($_FILES['files'])){ $i = 0; foreach($_FILES['files']['tmp_name'] as $key =&gt; $tmp_name){ $i++; $a = 'C:\\\xampp\\\htdocs\\\ampache-3.8.6_all\\\songs\\\admin\\\ '; $b = $name; $mp3 = $_FILES['files']['name'][$key]; $path = "C:/xampp/htdocs/ampache-3.8.6_all/songs/"."/".$name."/"; $song = $path.$mp3; mkdir($path); if(move_uploaded_file($tmp_name, "$path/{$_FILES['files']['name'][$key]}")){ echo "file moved"; } else{ echo "file not moved"; } $filename = $song; $size = filesize($filename); $c = "\\\ ".$mp3; $file = $a.$b.$c; $query = mysqli_query($connection, "insert into song(title, catalog, enabled, channels, update_time, user_upload, mode, bitrate, rate, file, album, size) values ('$mp3', '$catalog', '$enabled', '$channels', '$update_time', '$user_upload', '$mode', '$bitrate', '$rate', '$file', '$album_id', '$size')"); } } mysqli_close($connection); // Closing Connection with Server ?&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;div class="signup-form" style="text-align:center;"&gt; &lt;form method="post" enctype="multipart/form-data"&gt; &lt;h2&gt;Upload Songs&lt;/h2&gt; &lt;p class="hint-text"&gt;Please upload your album&lt;/p&gt; &lt;div class="form-group"&gt; &lt;label for='name' class="color"&gt;Album Name&lt;/label&gt; &lt;input type="text" name="name" class="form-control"&gt; &lt;/div&gt; &lt;label for='file' class="color"&gt;upload&lt;/label&gt; &lt;input type="file" name="files[]" multiple="multiple"&gt; &lt;input type="submit" name="submit" value="submit" style="color: black;position: relative;left: 137px;bottom: 24px;"&gt; &lt;/form&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> </div>

使PHP var_dump()值显示每个值一行

<div class="post-text" itemprop="text"> <p>When I echo var_dump($_variable), I get one long, wrapping line with all varable's and values like</p> <pre><code>["kt_login_user"]=&gt; string(8) "teacher1" ["kt_login_id"]=&gt; string(3) "973" ["kt_campusID"]=&gt; string(4) "9088" ["kt_positionID"]=&gt; string(1) "5" </code></pre> <p>Is there a way I can make each value display on its own line for ease of reading? Something like this:</p> <pre><code>["kt_login_user"]=&gt; string(8) "teacher1" ["kt_login_id"]=&gt; string(3) "973" ["kt_campusID"]=&gt; string(4) "9088" ["kt_positionID"]=&gt; string(1) "5" </code></pre> </div>

应用部署到weblogic 10.3上+jdk版本 1.6,如何设置可产生heap dump文件?

我在weblogic的配置文件setDomainEvn.sh文件中,已经配置:-XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnCtrlBreak,并且在该文件中新增: export IBM_HEAPDUMP=true export IBM_HEAP_DUMP=true export IBM_HEAPDUMP_OUTOFMEMORY=true export IBM_JAVADUMP_OUTOFMEMORY=true export IBM_JAVACORE_OUTOFMEMORY=true export IBM_HEAPDUMPDIR=/weblogic/domain/ 但是,当内存溢出时,仍旧没有.hprof文件生成! 求大神赐教

jquery ajax文件上传不工作var_dump($ _ FILES)给出空数组

<div class="post-text" itemprop="text"> <p>i have tried to find a solution to my question in this website but i couldn't solve my problem. it is html part: </p> <pre><code>&lt;form action="" method="post" enctype="multipart/form-data" id="edit_profile_form" &gt; &lt;input type="file" name="new_profile_photo" id="new_profile_photo" value="Choose Photo" &gt; &lt;button class="button11" name="save_changes" id="button11" &gt;SAVE &lt;/button&gt; &lt;/form&gt; </code></pre> <p>this is ajax code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).on('click', '#button11', function(){ event.preventDefault(); var file_data = $("#new_profile_photo").prop('files')[0]; var form_data = new FormData(); form_data.append('file', file_data); $.ajax({ url:"ajax/editprofile.php", method:"POST", async: false, cache: false, contentType: false, processData: false, data: form_data, success:function(data){ $("#error_messages").html(data); } }); }); &lt;/script&gt; </code></pre> <p>when i write var_dump($_FILES) it gives me empty array. if anyone knows ho to solve it please help. thanks</p> </div>

File_Get_Contents()有效,但automattic / woocommerce客户端没有。 [woocommerce_rest_cannot_view]

<div class="post-text" itemprop="text"> <p>I am able to pull orders, from my shop, with a simple file_get_contents(), but I cant get the automattic/woocommerce php library to work. And by 'work' I mean that it does connect and try to pull the orders, but the store not allowing it. (error: [woocommerce_rest_cannot_view] ). I have been successful pulling orders, with the library, on a different woo install.</p> <p>Here's my code: (i've played with the options a bit, no luck)</p> <pre><code>function d($var){var_dump($var);} $woocommerce = new Client( "https://{$domain}.com/", $ckey, $csec, array( 'wp_api' =&gt; true ,'version' =&gt; 'wc/v2' ,'verify_ssl' =&gt; false ,'queryStringAuth' =&gt; false ) ); try { $results = $woocommerce-&gt;get('orders'); } catch (HttpClientException $e) { d( $e-&gt;getMessage() ); // Error: Sorry, you cannot list resources. [woocommerce_rest_cannot_view] d( $e-&gt;getRequest()-&gt;getUrl() ); // https://example.com/wp-json/wc/v2/orders d( $e-&gt;getRequest()-&gt;getparameters() ); // empty array } $res = json_decode(file_get_contents("https://{$domain}.com/wp-json/wc/v2/orders?consumer_key={$ckey}&amp;consumer_secret={$csec}&amp;per_page=99")); d($res ); // works, full list of orders. </code></pre> </div>

SQL数组var_dump什么都没显示

<div class="post-text" itemprop="text"> <p>I have some code for load business-hours. My databas looks like</p> <pre><code>id - int(11) day - varchar(255) starttime - (time) endtime - (time) date - (date) type - int(1) </code></pre> <p>I try to get the data with: </p><pre><code>if ($conn-&gt;connect_error) { die("Connection failed: " . $conn-&gt;connect_error); } echo "Connected successfully"; function get_all_records($sql){ global $conn; $result = $conn-&gt;query($sql); $result = []; while($row = $result-&gt;fetch_assoc()) $result[array_shift($row)] = $row; return $result; } $sql = "SELECT day, starttime, endtime FROM schedule WHERE type = "; $shop_hours = array_merge( get_all_records($sql . "0 ORDER BY id"), get_all_records($sql . "1 and YEARWEEK('DATE') = '201915'") ); var_dump ($shop_hours); ?&gt; </code></pre> <p>Only what is displayed is Connected successfully</p> <p>I can't see the issue :(</p> </div>

为什么我的pyecharts柱形图表部署在flask后,横坐标由原来的文字标签变成数字了?

求助各位大佬!我是一个pyecharts小白,下面是我用flask部署pyecharts的代码。 ``` import pandas as pd from flask import Flask, render_template from pyecharts import options as opts from pyecharts.charts import Bar from pyecharts.charts import Timeline from pyecharts.charts import Pie app = Flask(__name__, static_folder="templates") data总=pd.read_csv('datazong.csv',encoding='utf-8') zuojia = pd.read_csv('zuojia.csv',encoding='gbk') X轴=[str(x) for x in zuojia.loc[:,'网络作家']] Y轴=[str(x) for x in zuojia.loc[:,'版税收入(万元)']] def bar_datazoom_inside() -> Timeline: tl = Timeline() for i in range(2014, 2020): c = ( Bar() .add_xaxis(list(zip(list(data总.index)))) .add_yaxis("显示",list(data总["{}".format(i)])) .set_global_opts( title_opts=opts.TitleOpts(title="纵横小说月票榜"), datazoom_opts=opts.DataZoomOpts(type_="inside"), visualmap_opts=opts.VisualMapOpts(type_="color", max_=250000, min_=200,pos_right='20',pos_top='middle'), toolbox_opts=opts.ToolboxOpts(), ) .set_series_opts( label_opts=opts.LabelOpts(is_show=False), markpoint_opts=opts.MarkPointOpts( data=[ opts.MarkPointItem(type_="max", name="最大值"), opts.MarkPointItem(type_="min", name="最小值"), ] ), ) ) tl.add(c, "{}年".format(i)) return tl def pie_rosetype() -> Pie: c = ( Pie() .add( "", [list(z) for z in zip(X轴, Y轴)], radius=["30%", "60%"], center=["50%", "60%"], rosetype="area", ) .set_global_opts(title_opts=opts.TitleOpts(title="2018作家版税收入榜单",pos_top = 'middle')) .set_series_opts( label_opts=opts.TextStyleOpts(font_style='oblique') ) ) return c @app.route("/") def index(): return render_template("index.html") @app.route("/barChart") def get_bar_chart(): tl = bar_datazoom_inside() return tl.dump_options_with_quotes() @app.route("/2") def index2(): return render_template("index2.html") @app.route("/barChart2") def get_bar_chart2(): c = pie_rosetype() return c.dump_options_with_quotes() if __name__ == "__main__": app.run() ``` 代码没问题,也能够将网站部署出来,如下图: ![flask](https://img-ask.csdn.net/upload/201912/29/1577606001_509738.png) 但是!我的横坐标变成数字了,原来在jupyter简单的render后产生的可视化横坐标是正常的如: ![图片说明](https://img-ask.csdn.net/upload/201912/29/1577606183_550451.png) 请各位大佬帮帮忙,我实在搞不明白哪里出错了。 下面是我的index.html代码。 ``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Awesome-pyecharts</title> <script src="https://cdn.bootcss.com/jquery/3.0.0/jquery.min.js"></script> <script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script> </head> <body> <div id="bar" style="width:1000px; height:600px;"></div> <script> $( function () { var chart = echarts.init(document.getElementById('bar'), 'white', {renderer: 'canvas'}); $.ajax({ type: "GET", url: "http://127.0.0.1:5000/barChart", dataType: 'json', success: function (result) { chart.setOption(result); } }); } ) </script> </body> </html> ```

使用magic_quotes()会影响mysql_real_escape_string()的使用吗?

<div class="post-text" itemprop="text"> <p>If I have <code>magic_quotes</code> switched on and I use <code>mysql_real_escape_string</code>, will the string be double escaped? Will it cause problems?</p> <p>I assume so based on the <code>get_magic_quotes()</code> function but just seeking confirmation. </p> <p>(P.S. It's easier to ask this question than test it in my office with all the security we have in place - It takes me 10-15 to configure everything to get a usable environment)</p> </div>

使用Twig 1和Codeigniter 2时出现未知的“转储”功能错误

<div class="post-text" itemprop="text"> <p>I added Twig template engine to CodeIgniter 2 using this library:</p> <p><a href="https://github.com/dilantha/codeigniter-twig" rel="nofollow noreferrer">https://github.com/dilantha/codeigniter-twig</a></p> <p>Everything works except dum() function. Using dump troughs this error:</p> <blockquote> <p>Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unknown "dump" function. Did you mean "var_dump", "debug_zval_dump", "xdebug_var_dump", "mysqli_dump_debug_info", "xdebug_dump_superglobals", "xdebug_dump_aggr_profiling_data"?</p> </blockquote> <p>This is my Twig Template:</p> <pre><code>{{ dump() }} </code></pre> <p>And this is my controller:</p> <pre><code>public function index() { $data = ['title' =&gt; 'Title' ]; $this-&gt;twig-&gt;display('dump.twig', $data); } </code></pre> <p>CodeIgniter Version: 2.2.0</p> <p>Twig Version: 1.35.4</p> </div>

为什么var_dump在访问具有数组值的键时显示NULL?

<div class="post-text" itemprop="text"> <p>I'm trying to loop through the Wordpress themes I have installed to pull out a piece of data. I need to get access to $value-&gt;headers["TextDomain"] but when I try to access $value-&gt;headers I get a <code>NULL</code> response.</p> <p>Here is the Wordpress Theme Object array that I am trying to pull data from: </p> <pre><code>object(WP_Theme)#795 (12) { ["update"]=&gt; bool(false) ["theme_root":"WP_Theme":private]=&gt; string(56) "/Users/tygoss/Projects/QuickPress/prod/wp-content/themes" ["headers":"WP_Theme":private]=&gt; array(11) { ["Name"]=&gt; string(10) "Black Jane" ["ThemeURI"]=&gt; string(0) "" ["Description"]=&gt; string(187) "Black Jane is a clean SuevaFree child theme with an optional slideshow on homepage, a new header layout in addition to the five header layouts available on SuevaFree and new Google Fonts." ["Author"]=&gt; string(16) "ThemeinProgress." ["AuthorURI"]=&gt; string(31) "https://www.themeinprogress.com" ["Version"]=&gt; string(5) "1.0.4" ["Template"]=&gt; string(9) "suevafree" ["Status"]=&gt; string(0) "" ["Tags"]=&gt; string(302) "blog, e-commerce, photography, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, flexible-header, footer-widgets, post-formats, right-sidebar, sticky-post, theme-options, threaded-comments, translation-ready, one-column, two-columns, three-columns, grid-layout" ["TextDomain"]=&gt; string(10) "black-jane" ["DomainPath"]=&gt; string(10) "/languages" } ["name_translated":"WP_Theme":private]=&gt; NULL ["errors":"WP_Theme":private]=&gt; NULL ["stylesheet":"WP_Theme":private]=&gt; string(10) "black-jane" ["template":"WP_Theme":private]=&gt; string(9) "suevafree" } </code></pre> <p>If I var_dump( $value-&gt;stylesheet ) I get <code>string(10) "black-jane"</code></p> <p>But if I var_dump ( $value-&gt;headers ) I get <code>NULL</code></p> <p>Here is my loop:</p> <pre><code> $all_themes = wp_get_themes(); foreach ($all_themes as $key =&gt; $value) { echo '&lt;pre&gt;'; var_dump($value-&gt;headers); echo '&lt;/pre&gt;'; } </code></pre> <p>Shouldn't $value-&gt;headers dump out an array of 11 items? Why is it returning <code>NULL</code> and why does $value-&gt;stylesheet work but not $value-headers?</p> </div>

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

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

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

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

和黑客斗争的 6 天!

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

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

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

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

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

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

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

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

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

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

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

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

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

优雅的替换if-else语句

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

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

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

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

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

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

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

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

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

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中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多个条件是什么逻辑关系?条件判断在什么时候执...

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

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

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

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

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

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

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

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

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

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

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

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

轻松等回家通知

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

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

阿里面试官让我用Zk(Zookeeper)实现分布式锁

他可能没想到,我当场手写出来了

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

立即提问
相关内容推荐