Tutorial by Examples: dump

The json module contains functions for both reading and writing to and from unicode strings, and reading and writing to and from files. These are differentiated by a trailing s in the function name. In these examples we use a StringIO object, but the same functions would apply for any file-like obje...
use Data::Dumper; my $data_structure = { foo => 'bar' }; print Dumper $data_structure; Using Data::Dumper is an easy way to look at data structures or variable content at run time. It ships with Perl and you can load it easily. The Dumper function returns the data structure serialized in a...
Sometimes Data::Dumper is not enough. Got a Moose object you want to inspect? Huge numbers of the same structure? Want stuff sorted? Colored? Data::Printer is your friend. use Data::Printer; p $data_structure; Data::Printer writes to STDERR, like warn. That makes it easier to find the outpu...
Follow previous example of creating a seed. This example uses a MySQL Dump to seed a table in the project database. The table must be created before seeding. <?php use Illuminate\Database\Seeder; class UserTableSeeder extends Seeder { /** * Run the database seeds. * ...
The var_dump function allows you to dump the contents of a variable (type and value) for debugging. Example: $array = [3.7, "string", 10, ["hello" => "world"], false, new DateTime()]; var_dump($array); Output: array(6) { [0]=> float(3.7) [1]=> ...
The analog to the meteordump command is meteorrestore. You can do a partial import by selecting the specific collection to import. Particularly useful after running a drop command. # make sure your app is running meteor # then import your data mongorestore --port 3001 --db meteor /path/to/dump...
This option causes a dump file to be generated and allows you to specify the relative size of that file (that is, small, medium, or large). Usage: -XXdumpsize:<size> <size>DescriptionnoneDoes not generate a dump file.smallOn Windows, a small dump file is generated (on Linux a full c...
Note: This example is based on the Oracle JVM implementation. Built-in tools like jmap, jconsole, and jvisualvm are available in a JDK and can be used to generate and analyze heap memory dumps taken from a running JVM application. However, one option to generate a heap dump without using JDK tools ...
dump prints the contents of an object via reflection (mirroring). Detailed view of an array: let names = ["Joe", "Jane", "Jim", "Joyce"] dump(names) Prints: ▿ 4 elements - [0]: Joe - [1]: Jane - [2]: Jim - [3]: Joyce For a dictionary: let attr...
/** * we reuse a class written in example: * http://stackoverflow.com/documentation/sockets/2876/introduction-to-sockets#t=201607262114505531351 * pleas to familiar with it first to continue with this one **/ public class WriteToSocketExample extends ConnectSocketExample { private ...
In order to use compression over the wire for a faster transfer, pass the --compress option to mysqldump. Example: mysqldump -h db.example.com -u username -p --compress dbname > dbname.sql Important: If you don't want to lock up the source db, you should also include --lock-tables=false. But ...
gunzip -c dbname.sql.gz | mysql dbname -u username -p Note: -c means write output to stdout.
my @data_array = (123, 456, 789, 'poi', 'uyt', "rew", "qas"); print Dumper @data_array; Using Data::Dumper gives an easy access to fetch list values. The Dumper returns the list values serialized in a way that looks like Perl code. Output: $VAR1 = 123; $VAR2 = 456; $VAR3 ...
mongodump --db mydb --gzip --out "mydb.dump.$(date +%F_%R)" This command will dump a bson gzipped archive of your local mongod 'mydb' database to the 'mydb.dump.{timestamp}' directory
mongorestore --db mydb mydb.dump.2016-08-27_12:44/mydb --drop --gzip This command will first drop your current 'mydb' database and then restore your gzipped bson dump from the 'mydb mydb.dump.2016-08-27_12:44/mydb' archive dump file.
/* SD card file dump This example shows how to read a file from the SD card using the SD library and send it over the serial port. The circuit: * SD card attached to SPI bus as follows: ** MOSI - pin 11 ** MISO - pin 12 ** CLK - pin 13 ** CS - pin 4 created 22 December 20...
Many of us start debugging with simple print(). Let's say we have such a class: class Abc { let a = "aa" let b = "bb" } and we have an instance of Abc as so: let abc = Abc() When we run the print() on the variable, the output is App.Abc while dump() output...
Cargo.toml: [package] name = "customderive" version = "0.1.1" [lib] proc-macro=true [dependencies] quote="^0.3.12" syn="^0.11.4" src/lib.rs: #![crate_type = "proc-macro"] extern crate proc_macro; use proc_macro::TokenStream; exte...
cf logs AppName --recent Note, depending on who is hosting your CF app, the size of this log may be limited.

Page 1 of 1