dump

mysql, dump, database restore

戏子无情 提交于 2019-12-03 11:13:02
问题 I have dumped my database with the following command: mysqldump -uuser -ppassword db_name > file then I completely removed my database: drop database db_name; then I created a new database: create database db_name; and then I tried to restore the db with the following command: mysqldump -uuser -ppassword db_name < file The problem is that dump does not create tables and loads data in them and so the database remains empty however it does show a message like dump completed "date time" What

How to prevent YAML to dump long line without new line

假如想象 提交于 2019-12-03 10:31:06
Whenever my option goes beyond certain limit, pyyaml converts it into two lines. How to avoid this ? e.g. In [1]: x = "-c /home/user/test/test2/test23/tet/2s/test1/stest/longdirectory1/directory2/ --optnion12 --verbose" In [2]: import yaml In [3]: print yaml.dump([dict(ATTRIBUTES=[dict(CONFIG=x)])], default_flow_style=False) WRONG ONE - ATTRIBUTES: - CONFIG: -c /home/user/test/test2/test23/tet/2s/test1/stest/longdirectory1/directory2/ --optnion12 --verbose Which should be like - ATTRIBUTES: - CONFIG: -c /home/user/test/test2/test23/tet/2s/test1/stest/longdirectory1/directory2/ --optnion12 -

Wikipedia Category Hierarchy from dumps

谁说胖子不能爱 提交于 2019-12-03 10:20:01
问题 Using Wikipedia's dumps I want to build a hierarchy for its categories. I have downloaded the main dump (enwiki-latest-pages-articles) and the category SQL dump (enwiki-latest-category). But I can't find the hierarchy information. For example, the SQL categories' dump has entries for each category but I can't find anything about how they relate to each other. The other dump (latest-pages-articles) says the parent categories for each page but in an unordered way. It just states all the parents

How to properly save Common Lisp image using SBCL?

て烟熏妆下的殇ゞ 提交于 2019-12-03 07:58:25
If I want to create a Lisp-image of my program, how do I do it properly? Are there any prerequisites? And doesn't it play nicely with QUICKLISP? Right now, if I start SBCL (with just QUICKLISP pre-loaded) and save the image: (save-lisp-and-die "core") And then try to start SBCL again with this image sbcl --core core And then try to do: (ql:quickload :cl-yaclyaml) I get the following: To load "cl-yaclyaml": Load 1 ASDF system: cl-yaclyaml ; Loading "cl-yaclyaml" ....... debugger invoked on a SB-INT:EXTENSION-FAILURE in thread #<THREAD "main thread" RUNNING {100322C613}>: Don't know how to

Linux: How to debug a SIGSEGV? How do I trace the error source?

心已入冬 提交于 2019-12-03 07:11:32
My firefox started crashing since today. I haven't changed anything on the system or on firefox config. I use strace -ff -o dumpfile.txt firefox to trace the problem. It's not a big help. I see the segfault, in two of the generated process dumps, but how I can trace them to their cause? After running for 10 seconds and crashing, 22MB of data is generated by strace. This is a snippet of the output, where you can see actual SIGSEGV in the middle.: read(19, "\372", 1) = 1 gettimeofday({1245590019, 542231}, NULL) = 0 read(3, "\6\0[Qmy\26\0\3\1\0\0Y\0\200\2\0\0\0\0\323\3A\0\323\3(\0\20\0\1\0", 4096

dump conf from running nginx process

这一生的挚爱 提交于 2019-12-03 05:26:13
问题 Is it possible to get which conf the nginx is using only from a running nginx process? To get the conf file path. sometimes ps aux reveal it, sometimes it doesn't. It might be just something like nginx: master process /usr/sbin/nginx (same as /proc/PID/cmdline ) So is nginx -V the only solution? From this question, is it possible to dump conf data structure from nginx process directly? Or at least dump the conf file path? 回答1: As of Nginx 1.9.2 you can dump the Nginx config with the -T flag:

How to get the relative address of a field in a structure dump. [C]

无人久伴 提交于 2019-12-03 05:17:30
问题 We're working on a C program compiled with arm-eabi-gcc under Linux. We're using a dump of a large structure and we're having problems determining at which adress we should read various fields of our structure (like 50 of them), (memory alignement and padding aren't so predictable to me). Is there any way to get the memory mapping of the structure produced by a our compiler. An option in gdb? Or any tool helping us find the correspondance between fields and adress in the dump? 回答1: You can do

SOS does not support the current target architecture

我与影子孤独终老i 提交于 2019-12-03 04:15:30
问题 I am trying to use windbg to research a hang dump file created on an x64 machine for our x86 process. This is a 4.0 x86 application, so just to get an unmanaged stack, I had to do the following: .loadby sos clr .load wow64exts !sw kL However, everytime I try to get the managed stack via !clrstack I get the error in the title. What am I missing? 回答1: I believe you will have to use the 32-bit task manager, located in C:\Windows\SysWOW64\taskmgr.exe to get a 32-bit dump. More info here: http:/

Dumping contents of lost memory reported by Valgrind

喜你入骨 提交于 2019-12-03 03:24:43
When I run valgrind --leak-check=yes on a program, a few bytes of lost memory are reported. Is it possible to view the contents of this memory (i.e. dump the data that is stored in it)? You can do that with the last version of Valgrind (3.8.1): Start your executable activating the gdbserver at startup: valgrind --vgdb-error=0 ....<your program> Then in another window, connect a gdb to Valgrind (following the indications given by Valgrind). Then put a breakpoint at a relevant place (e.g. at the end of main) and use the gdb continue command till the breakpoint is reached. Then do a leak search

deciphering vtable dumps

蹲街弑〆低调 提交于 2019-12-03 03:04:32
I am "playing" with virtual inheritance in C++, and I want to know how a class object is laid out. I have those three classes: class A { private: int a; public: A() {this->a = 47;} virtual void setInt(int x) {this->a = x;} virtual int getInt() {return this->a;} ~A() {this->a = 0;} }; class B { private: int b; public: B() {b = 48;} virtual void setInt(int x) {this->b = x;} virtual int getInt() {return this->b;} ~B() {b = 0;} }; class C : public A, public B { private: int c; public: C() {c = 49;} virtual void setInt(int x) {this->c = x;} virtual int getInt() {return this->c;} ~C() {c = 0;} }; (I