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
<script type="text/javascript"> | |
$('input[type="checkbox"]').on("click", function() { | |
var items = $(this).closest("li").find("input"); | |
if ($(this).is(':checked')) { | |
for(var i = 0; i< items.length; i ++) { | |
items[i].checked = true; | |
} | |
}else { | |
console.log("false"); | |
for(var i = 0; i< items.length; i ++) { |
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
$('#button-filter').on('click', function(bf) { | |
var stepCount = 2; | |
var currentUrl = window.location; | |
var firstAddr = currentUrl.pathname.toString().match(/^\/[a-z]*\/?/); | |
window.location = location.protocol + "//" + location.hostname + firstAddr[0] + location.search; | |
//window.history.go( - stepCount); | |
bf.stopImmediatePropagation(); | |
}); | |
//OR |
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
1) max-width: n px(%); word-wrap:break-word; text-overflow: ellipsis; white-space: none; | |
2) .hyphens { | |
-webkit-hyphens: auto; | |
-moz-hyphens: auto; | |
-ms-hyphens: auto; | |
hyphens: auto; | |
} | |
3) .word-break { |
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
using System.IO; | |
using System.Net; | |
namespace SEO_Analyzer.Helpers | |
{ | |
public class ParseHelper | |
{ | |
public static string DownloadHtml(string uri) | |
{ | |
HttpWebRequest request = WebRequest.Create(uri) as HttpWebRequest; |
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
sudo chown -R www-data /путь/к корню/сайта/ |
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
/******************** Обратный отсчет *************************/ | |
var month = new Date().getMonth() + 1; | |
if (month == 0) {month++;}; | |
console.log(month); | |
var currentDate = new Date(); | |
var futureDate = new Date(2015, month, 1); | |
var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000; | |
/*var diff = 3600 * 24 * 20.17535;*/ |
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
.element { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
transform: translateX(-50%); | |
transform: translateY(-50%); | |
} |
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 getWatchers(root) { | |
root = angular.element(root || document.documentElement); | |
var watcherCount = 0; | |
function getElemWatchers(element) { | |
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
var watchers = scopeWatchers.concat(isolateWatchers); | |
angular.forEach(element.children(), function (childElement) { | |
watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
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
<snippet> | |
<content><![CDATA[ | |
<!-- begin $1 --> | |
<div class="$1"> | |
$2 | |
</div> | |
<!-- end $1 --> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>di</tabTrigger> |