This file contains hidden or 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
def bubble_sort(arr): | |
# Aussenliegende Schleife um n mal zu iterieren über das array | |
for n in range(len(arr) - 1, 0, -1): | |
# Initialisieren von einem Marker der auussagt ob wir ein Paar Werte getauscht haben oder nicht | |
swapped = False | |
# Innere Schleife um benachbarte Werte miteinander zu vergleichen | |
for i in range(n): |
This file contains hidden or 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
jQuery('a.ngg-fancybox').each(function() { | |
var imageLink = jQuery(this); | |
var downloadLink = "<a style='padding: 20px; background: hotpink; color: white;' href='"+imageLink.attr('href')+"' download>Download this image</a>" | |
imageLink.parent().append(downloadLink); | |
}); |
This file contains hidden or 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
LOCK TABLES `admin_role` WRITE , `admin_user` WRITE; | |
SET @SALT = "rp"; | |
SET @PASS = CONCAT(MD5(CONCAT( @SALT , "test1234") ), CONCAT(":", @SALT )); | |
SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL; | |
INSERT INTO `admin_user` (firstname,lastname,email,username,password,created,lognum,reload_acl_flag,is_active,extra,rp_token_created_at) | |
VALUES ('Firstname','Lastname','[email protected]','admin',@PASS,NOW(),0,0,1,@EXTRA,NOW()); | |
INSERT INTO `admin_role` (parent_id,tree_level,sort_order,role_type,user_id,role_name) |
This file contains hidden or 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
<?php | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$_categories = Mage::getModel('catalog/category') | |
->getCollection() | |
->addAttributeToSelect('*'); | |
$_file = __DIR__."/categories.csv"; | |
$_export = fopen($_file, 'w') or die('Permission denied - check filesettings'); |
This file contains hidden or 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 flux=FluidTYPO3\Flux\ViewHelpers} | |
{namespace v=FluidTYPO3\Vhs\ViewHelpers} | |
<f:layout name="Content"/> | |
<f:section name="Configuration"> | |
<flux:form id="gridBuilder" options="{group: 'Layout', icon: '{f:uri.resource(path: \'Icons/ext_icon.gif\')}'}"> | |
<!-- Grid Select --> | |
<flux:field.select name="layout" items="{1: '12x1', 2: '6x2', 3: '4x3', 4: '3x4', 5: '5x5', 6: '4+8', 7: '3+9', 8: '6+6', 9: '1x12'}" default="0" /> | |
<!-- Grid-builder --> |
This file contains hidden or 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
<?php | |
require_once('../../app/Mage.php'); //Path to Magento | |
umask(0); | |
Mage::app(); | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
ini_set('max_execution_time', 3000); | |
echo '<pre>'; |
This file contains hidden or 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
function scrollToElement(element, speed) | |
{ | |
$('html, body').animate({ | |
scrollTop: element.offset().top | |
}, speed); | |
return false; | |
} |
This file contains hidden or 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
#!/bin/bash | |
clear | |
stty erase '^?' | |
echo -n "Database Name: " | |
read DBNAME | |
echo -n "Database User: " |
This file contains hidden or 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
/* ======================= Improved One Page Checkout with tabs ======================== */ | |
.checkout-onepage-index .col-main { width: 100%; padding:0; } | |
.block-progress .block-title { background:none; margin:0 0 34px; padding:0; } | |
.checkout-onepage-index .col-main { padding:0; border:0; } | |
.checkout-onepage-index .page-title { padding-right:40px; width:auto; } | |
.checkout-onepage-index .page-title h1 { background:none; padding:0; } | |
.opc { position:relative; overflow:hidden; height:970px; } | |
.opc .buttons-set { margin:15px 0 0; opacity:1!important; } |
NewerOlder