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
.particle*400 |
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
/[^\.*+product_id=][0-9*].*/ | |
Чтоб достать id из строки '/index.php?route=product/product&product_id=1643' // Результат - '1643' |
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
class Something { | |
private things: Thing[][]; | |
constructor() { | |
things = []; | |
for(var i: number = 0; i < 10; i++) { | |
this.things[i] = []; | |
for(var j: number = 0; j< 10; j++) { | |
this.things[i][j] = new Thing(); |
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
<!-- Redirect --> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Redirect" stopProcessing="true"> | |
<match url=".*" /> | |
<action type="Redirect" url="http://not-found.com/" redirectType="Permanent" /> | |
</rule> | |
</rules> | |
</rewrite> |
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
<label class="file_upload"> | |
<span class="button">Choose</span> | |
<mark>The file is not selected</mark> | |
<input type="file"/> | |
</label> | |
<style> | |
// File upload inputs styles | |
.file_upload{ | |
background: #fff; |
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
<select class="required day" name="profileInputId_29412"> | |
<option value="0">Выберите день *</option> | |
<option value="1">Пятница 19-22</option> | |
<option value="2">Суббота 19-22</option> | |
</select> | |
<script> | |
document.addEventListener("DOMContentLoaded", function(){ | |
$("#sub_form").validate({ |
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
$(".date-of-birth").on("blur", function () { | |
var str = $(".date-of-birth").val(); | |
$(".date-of-birth").val(str.replace(/[^\/0-9]/g,'')); | |
}); |
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
input[type="text"]:not(:placeholder-shown) { | |
border-color: #4F4F4F; | |
} |
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
<header> | |
<h1>Scroll Indicator</h1> | |
</header> | |
<main> | |
<h2>I was interested to see if I could make a scroll indicator <a href="http://codepen.io/derekjp/pen/pJzpxB" target="_blank">like this</a> with just CSS.</h2> | |
<p>You can! But maybe you shouldn't. This is an interesting consequence of a bunch of hacks held together with duct tape. It uses z-index hacks, gradient hacks and tricks with calc and viewport units.</p> | |
<p>Having said that, hacks are not always bad. I love hacks and many of us have made quite a good living selling floats and clearfixes.</p> | |
<p>The techniques used here are well supported, if not conventional. If you can read the CSS, understand how it works, and how to change it, and you think this works better for you than JavaScript, feel free to implement it. Just be aware of the z-index behaviour and possible conflict with other CSS using negative z-index.</p> | |
<hr> | |
<p>Cras mattis consectetur purus sit amet fermentum. Donec id elit non mi porta gravida at eget metus. Donec id elit non mi po |
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
$.fn.touchScrolling = function(){ | |
var startPos = 0, | |
self = $(this); | |
self.bind('touchstart', function(event) { | |
console.info("touchstart, target: ", event.target); | |
var e = event.originalEvent; | |
startPos = self.scrollTop() + e.touches[0].pageY; | |
e.preventDefault(); | |
}); |