save_and_open_page
have_button(locator)| class WidgetsController < ApplicationController | |
| class TestDocument < Prawn::Document | |
| def to_pdf | |
| text "Hello World!" | |
| render | |
| end | |
| end | |
| def index | |
| output = TestDocument.new.to_pdf |
| class A | |
| def a | |
| "a" | |
| end | |
| end | |
| module M | |
| def a | |
| "m" | |
| end |
| <?php | |
| function to_str($prefix) { | |
| $parent_str = $prefix . $this->text . PHP_EOL | |
| if(empty($this->children)) { | |
| return $parent_str; | |
| } else { | |
| return $parent_str . array_map(function($node) use ($prefix) { | |
| return $node->to_str($prefix . ' '); | |
| }, this->children).join(); |
| class C | |
| def method_missing(name, *args) | |
| name.to_s.end_with?('=') ? instance_variable_set("@#{ name[0..-2] }", args[0]) : instance_variable_get("@#{ name }") | |
| end | |
| end |
| function benchmark(times, fun) { | |
| var accumulatedTime = 0; | |
| var meanTime = 0; | |
| (function measureOnce(i) { | |
| var startTime, endTime; | |
| if(i <= 0) { | |
| meanTime = accumulatedTime / times; | |
| } else { |
| curryN = (f, n) -> | |
| if n <=1 | |
| f | |
| else | |
| (firstArg) -> | |
| curryN( | |
| -> | |
| f.apply null, [firstArg].concat Array.prototype.slice.call(arguments), | |
| n-1 | |
| ) |
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration." | |
| (setq-default | |
| ;; List of additional paths where to look for configuration layers. | |
| ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') | |
| dotspacemacs-configuration-layer-path '() |