Moved to https://github.com/bootstraponline/ruby_console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2010 Google Inc. All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: | |
* | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* * Redistributions in binary form must reproduce the above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code inserted into GLDemo.java (playn-gldemo-core) | |
final int[] tex = new int[16]; | |
gl.glGetIntegerv(GL20.GL_MAX_TEXTURE_SIZE, tex, 0); | |
System.out.println(tex[0]); | |
// Code from JavaGL20.java (playn-java) | |
@Override | |
public void glGetIntegerv(int pname, int[] params, int offset) { | |
final int length = params.length - offset; | |
resizeIntBuffer(length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sizeNew is never used. | |
private static char[] getArray(final int size) { | |
char[] array = arrayTL.get(); | |
if ( array.length < size ) { | |
int sizeNew = array.length << 1; | |
while ( sizeNew < size ) | |
sizeNew <<= 1; | |
array = new char[size]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Bootstrap Online LLC. Released under the Apache license. | |
https://www.apache.org/licenses/LICENSE-2.0 | |
Print CSS selector for the provided element. | |
Example using the currently selected item in Chrome Dev Tools: | |
c( $0 ); | |
*/ | |
function c( element ) { | |
var result = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $$ = document.querySelectorAll | |
// Chrome Dev Tools | |
Array.prototype.forEach.call($$('.red .log p a'), function(line) {line.parentNode.removeChild(line)}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile.dryice.js b/Makefile.dryice.js | |
index 3109f84..4bb5fe6 100755 | |
--- a/Makefile.dryice.js | |
+++ b/Makefile.dryice.js | |
@@ -308,7 +308,7 @@ var buildAce = function(options) { | |
if (!options.requires) | |
options.requires = [options.exportModule]; | |
- var targetDir = options.targetDir + options.suffix; | |
+ var targetDir = options.targetDir + options.suffix + "/ace"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Implement is focused app using dumpsys window windows | |
def is_focused_app app | |
output = `#{adb_command} shell dumpsys window windows` | |
return false if output.nil? | |
target = nil | |
output.each_line do |line| | |
if line.include? 'mFocusedApp' | |
target = line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'calabash-android/management/app_installation' | |
AfterConfiguration do |config| | |
FeatureNameMemory.feature_name = nil | |
end | |
$first_run = true | |
Before do |scenario| | |
@scenario_is_outline = (scenario.class == Cucumber::Ast::OutlineTable::ExampleRow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[9] pry(main)> @driver.execute_script 'mobile: tap', :tapCount => 1, :touchCount => 1, :duration => 0.1, :x => 0.8, :y => 0.4 | |
:post | |
"session/6279234c-cd7c-40cb-8549-69c294c66147/execute" | |
{:script=>"mobile: tap", :args=>[{:tapCount=>1, :touchCount=>1, :duration=>0.1, :x=>0.8, :y=>0.4}]} | |
Selenium::WebDriver::Error::WebDriverError: unexpected response, code=400, content-type="text/html" | |
Parameters for mobile method did not match the definition. Required params must be sent as script args in this order: ["tapCount","touchCount","duration","x","y"] | |
from /selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/http/common.rb:66:in 'create_response' | |
[10] pry(main)> a = {:script=>"mobile: tap", :args=>[{:tapCount=>1, :touchCount=>1, :duration=>0.1, :x=>0.8, :y=>0.4}]}.to_json; puts a |
OlderNewer