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
// Press ctrl+space for code completion | |
export default function transformer(file, api) { | |
const j = api.jscodeshift; | |
return j(file.source) | |
.find(j.CallExpression) | |
.filter(x => x.node.callee.object && x.node.callee.object.name === "assert") | |
.filter(x => x.node.callee.property && x.node.callee.property.name === "isFalse") | |
.filter(x => x.node.arguments.length > 0 && x.node.arguments[0].property && x.node.arguments[0].property.name === "called") | |
.forEach(path => { |
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
'use strict'; | |
function buildExpectStatement(expectStatement) { | |
const properties = expectStatement.split('.').reverse(); | |
const expectCall = { | |
type: 'CallExpression', | |
callee: { | |
type: 'Identifier', | |
name: 'expect' |
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
background: rgb(255,255,255); /* Old browsers */ | |
/* IE9 SVG, needs conditional override of 'filter' to 'none' */ | |
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNTYlIiBzdG9wLWNvbG9yPSIjZTVlNWVhIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNTYlIiBzdG9wLWNvbG9yPSIjZTVlNWVhIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNzElIiBzdG9wLWNvbG9yPSIjYzljN2QxIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); | |
background: -moz-radial-gradient(center, ellipse cover, rgba(255, |
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
public class JerseyConfig extends ResourceConfig { | |
public JerseyConfig() { | |
register(ValidationConfigurationContextResolver.class); | |
} | |
} |
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
class HelloWorld | |
def initialize(name) | |
@name = name.capitalize | |
end | |
def sayHi | |
puts "Hello #{@name}!" | |
end | |
end | |
hello = HelloWorld.new("Github and Octopress!") |
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
</Proxy *> | |
AddDefaultCharset off | |
Order deny,allow | |
Deny from all | |
Allow from localhost | |
</Proxy> |
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
final Button button6 = (Button) findViewById(R.id.btn_addRAddress); | |
button6.setOnClickListener(new View.OnClickListener() { | |
public void onClick(View v) | |
{ | |
Context mContext = v.getContext(); | |
final Dialog dialog = new Dialog(mContext); | |
dialog.setContentView(R.layout.add_address); | |
dialog.setTitle("Add Address"); |
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
namespace Pong | |
{ | |
using System; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Content; | |
public class AIBat : Bat | |
{ | |
public AIBat(ContentManager content, Vector2 screenSize, bool side) : base(content, screenSize, side) | |
{ |
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
screenWidth = 800; | |
screenHeight = 600; | |
graphics.PreferredBackBufferWidth = screenWidth; | |
graphics.PreferredBackBufferHeight = screenHeight; | |
graphics.ApplyChanges(); |
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
GraphicsDevice.Clear(Color.CornflowerBlue); |
NewerOlder