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
#include <iostream> | |
#include <ctime> | |
#include <stdlib.h> | |
using namespace std; | |
//определяем характеристику строки | |
int haract(int* row, int length) { | |
int i, result = 0; |
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
$(function () { | |
$('#answers-scroll').scroll(function () { | |
var scrollTop = $(this).scrollTop(); | |
var docScrollTop = $(this).prop('scrollHeight') - $(this).prop('clientHeight'); | |
if (!page_loaded && page < last_page && scrollTop >= docScrollTop) { | |
page_loaded = true; | |
page++; | |
$.get(next_url.replace(/\d+$/, page), function (data) { |
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
#include <iostream> | |
#include <stdlib.h> | |
using namespace std; | |
int main() { | |
int i, length; | |
string s, r; | |
cout << "string: "; |
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
cat access.log | python -c "import csv,sys;f=csv.reader(sys.stdin, delimiter=' '); print '\n'.join([r[9] for r in f])" | sort | uniq -c | sort -rn |
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
#include <iostream> | |
#include <ctime> | |
#include <stdlib.h> | |
using namespace std; | |
int main() { | |
int s[12]; | |
srand(time(NULL)); |
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
package main | |
import "fmt" | |
func euc(m, n uint32) uint32 { | |
var res uint32 | |
r := m % n | |
if r == 0 { |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"time" | |
) | |
func div(x uint64) (uint64, bool) { | |
var ( |
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
<?php | |
$qb = $this->createQueryBuilder('c'); | |
$qb->update('CltMessageBundle:Conversation', 'c') | |
->set('c.statusFrom', $status) | |
->set('c.updatedAt', 'CURRENT_TIMESTAMP()') | |
->where($qb->expr()->in('c.id', ':ids')) | |
->andWhere($qb->expr()->eq('c.contactFrom', ':contactId')) | |
->setParameter('ids', $conversationIds) | |
->setParameter('contactId', $contactId) |
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
#app/config/routing.yml | |
frontend_de: | |
resource: "@FrontendBundle/Resources/config/routing_de.yml" | |
host: %domain_de% | |
defaults: { _locale: de } | |
requirements: | |
_locale: de | |
prefix: / |
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
$(function () { | |
$('#attachment-field').change(function () { | |
var file = this.files[0]; | |
//image file only | |
if (file.type.match(/^image\//)) { | |
var request = new XMLHttpRequest(); | |
request.open('POST', '/upload/path'); | |
request.send(new FormData(document.getElementById('form-xyz'))); | |
} |