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
| public string PostMethod(byte[] bytes) | |
| { | |
| string postUrl = "https://asr.yandex.net/asr_xml?" + | |
| "uuid=01ae13cb744628b58fb536d496daa1e6&" + | |
| "key="+your_api_key_here+"&" + | |
| "topic=queries"; | |
| HttpWebRequest request = (HttpWebRequest)WebRequest.Create(postUrl); | |
| request.Method = "POST"; | |
| request.Host = "asr.yandex.net"; |
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
| interface ILog | |
| { | |
| IEnumerable<EventLogEntry> GetLogMessages(); | |
| } | |
| class WinLog:ILog | |
| { | |
| private EventLog _EventLog; | |
| public WinLog(String logName) |
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
| //sample only, code completely untested. | |
| template <typename Key, typename Value> | |
| QMap<Key, Value> hashToMap(const QHash<Key, Value> hash) { | |
| QMap<key, Value> result; | |
| QHashIterator<Key, Value> it(hash); | |
| while (it.hasNext()) { | |
| it.next(); | |
| result.insert(it.key(), it.value()); | |
| } | |
| return result; |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import urllib2 | |
| import os | |
| import sys | |
| import lxml.html | |
| def search_4pda(search): | |
| headers = {'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)'} | |
| req = urllib2.Request("http://4pda.ru/forum/index.php?act=Search&source=all&forums=all&query="+search+"&result=topics", None, headers) | |
| response = urllib2.urlopen(req) |
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
| QVariantMap target,temp; | |
| temp["KEY1"]=42; | |
| temp["KEY2"]=24; | |
| target["ID"]=temp; | |
NewerOlder