def parrot(voltage, state='a stiff', action='voom', type='Norwegian Blue'):
print "-- This parrot wouldn’t", action
print "if you put", voltage, "volts through it."
print "-- Lovely plumage, the", type
print "-- It’s", state, "!"
Run Code Online (Sandbox Code Playgroud)
我开始学习python.我可以使用parrot(5,'dead')和parrot(电压= 5)调用此函数.但是为什么我不能用parrot调用相同的函数(电压= 5,'死')?
我正在尝试为上述问题编写代码.我试着寻找解决方案.这就是我现在拥有的.
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var drawColorLine = function(start, end, color) {
var deltaX, deltaY, i = 0,
currLength = 0,
isHor, isVert;
deltaX = end[0] - start[0];
deltaY = end[1] - start[1];
context.strokeStyle = color;
isHor = deltaX === 0 ? 0 : 1;
isVert = deltaY === 0 ? 0 : 1;
function draw() {
context.beginPath();
context.moveTo(start[0] + currLength * isHor, start[1] + currLength * isVert);
currLength = currLength + 0.5 * i;
context.lineTo(start[0] …Run Code Online (Sandbox Code Playgroud)我正在尝试创建一个facebook应用程序,这是我第一次.我阅读了几篇关于如何创建一篇文章的文章,我从这个页面https://developers.facebook.com/apps创建了一个应用程序.我创建它后立即点击Facebook上的Go to App.它显示此错误

我试图在Heroku开发中心寻找相同类型的问题来解决我自己的问题我找不到任何解决方案.当我这样做curl -v https://tranquil-oasis-2533.herokuapp.com 时说HTTP/1.1 500内部服务器错误.这是heroku日志http://pastebin.com/0qdueiZE的输出.有人请帮帮我.