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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
// cesar encrypt | |
var msg = "quisieraquelaclaseseatemprano"; | |
var letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","ñ","o","p","q","r","s","t","u","v","w","x","y","z" ]; | |
var a = 3; | |
var b = 5; | |
var result = [] | |
for (var i = 0; i < msg.length ; i ++){ | |
for(var j = 0; j < letters.length ; j ++) { | |
if(msg[i] == letters[j]) { var p=((j*a+b) % 27 ); result.push(letters[p]); } |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Redactor</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" type="text/css" href="css/style.css" /> |
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
$(window).on('scroll', function(){ if( $(window).height() < $(window).scrollTop() ){ console.log($(window).scrollTop() ) } }); |
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
Show hidden characters
{ | |
"cmd": ["javac", "$file_name"], | |
"cmd": ["java", "$file_base_name"], | |
"working_dir": "${project_path:${folder}}", | |
"selector": "source.java" | |
} |
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 'rubygems' | |
gem 'active_merchant', '~> 1.3.1' | |
# Send requests to the gateway's test servers | |
ActiveMerchant::Billing::Base.mode = :test | |
Create a new credit card object | |
credit_card = ActiveMerchant::Billing::CreditCard.new( | |
:number => '4111111111111111', | |
:month => '8', |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace hadigari | |
{ | |
class Calculator | |
{ | |
double last_element; |
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
FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`)) ENGINE=InnoDB |
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
FOREIGN KEY (`plan_id`) REFERENCES `panel_plans` (`id`)) ENGINE=InnoDB |
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
### route | |
get "/gateways/update-default-gateway/:id/:action", :to => "panel/gateways#update_default_gateway" ,\ | |
:as => 'update_default_gateway' | |
### path in views | |
<a href="<%= update_default_gateway_path :id => panel_gateway.id, :action => 'disable' %>" class="">Disable</a> |
OlderNewer