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
/**************************************************************************************/ | |
/**************************************************************************************/ | |
/**************************************************************************************/ | |
var cnst_city_selected_zoom_level = 17; | |
function Cacher(url, icon) { | |
var cnst_dictionary = { | |
dict_cmd_choose_city:{bg:"Моля изберете град", en:"Please choose city"}, | |
}; | |
var self = this; |
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 legislation; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import java.io.Writer; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
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 bg.elections.pv; | |
import java.io.File; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.stream.Collectors; |
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 foo; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
import org.xbill.DNS.AAAARecord; |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
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
domain,ttl,aaaa-ttl,cname-ttl,miltiple-ttls,ns-root,ns-ttl,a-count,aaaa-count,a-records,aaaa-records,ns-records,cname | |
facebook.com,300,300,,false,facebook.com,128517,1,1,"31.13.66.36","2a03:2880:f113:83:face:b00c:0:25de","a.ns.facebook.com.,b.ns.facebook.com.", | |
twitter.com,300,,,false,dynect.net,42239,4,0,"199.16.156.102,199.16.156.198,199.16.156.70,199.16.156.230","","ns1.p34.dynect.net.,ns3.p34.dynect.net.,ns4.p34.dynect.net.,ns2.p34.dynect.net.", | |
google.com,300,300,,false,google.com,128501,1,1,"216.58.209.14","2a00:1450:4017:803:0:0:0:200e","ns3.google.com.,ns4.google.com.,ns1.google.com.,ns2.google.com.", | |
youtube.com,300,300,,false,google.com,128505,1,1,"216.58.209.206","2a00:1450:4017:803:0:0:0:200e","ns3.google.com.,ns4.google.com.,ns1.google.com.,ns2.google.com.", | |
wordpress.org,600,,,false,wordpress.org,54943,2,0,"66.155.40.249,66.155.40.250","","ns4.wordpress.org.,ns3.wordpress.org.,ns1.wordpress.org.,ns2.wordpress.org.", | |
linkedin.com,300,300,,false,dynect.net,47775,1,1,"108.174.10.10","2620:109:c002: |
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
Площад | Вид | Вид (2) | Вид (3) | |
---|---|---|---|---|
Атанас Буров | площад | |||
Баба Неделя | широк тротоар | |||
Бански | градинка | |||
Бойко | градинка | |||
Братя Прошек | кръстовище | |||
България | градинка | площад | ||
Васил Левски | кръстовище | кръгово | паметник | |
Велчова завера | кръстовище | паркинг | ||
Възраждане | градинка |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function sign(input, password) { | |
// salt should be Uint8Array or ArrayBuffer | |
var saltBuffer = str2ab('e85c53e7f119d41fd7895cdc9d7bb9dd'); | |
// don't use naive approaches for converting text, otherwise international | |
// characters won't have the correct byte sequences. Use TextEncoder when | |
// available or otherwise use relevant polyfills |
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
private RateLimiter createGuavaRateLimiter() { | |
double permitsPerSecond = ((double) hourlyLimit) / (60d * 60); // hourlyLimit / seconds-per-hour | |
logger.info("Creating rate limiter with {} permits per seconds", permitsPerSecond); | |
RateLimiter rateLimiter = RateLimiter.create(permitsPerSecond); | |
// initialize with a full number of permits. Use refleciton, as guava does not expose that functionality | |
try { | |
Class<?> limiterClass = Class.forName("com.google.common.util.concurrent.SmoothRateLimiter"); | |
Field field = ReflectionUtils.findField(limiterClass, "storedPermits"); | |
ReflectionUtils.makeAccessible(field); | |
ReflectionUtils.setField(field, rateLimiter, hourlyLimit); |
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
public class SimpleRateLimiter { | |
private Semaphore semaphore; | |
private int maxPermits; | |
private TimeUnit timePeriod; | |
private ScheduledExecutorService scheduler; | |
public static SimpleRateLimiter create(int permits, TimeUnit timePeriod) { | |
SimpleRateLimiter limiter = new SimpleRateLimiter(permits, timePeriod); | |
limiter.schedulePermitReplenishment(); | |
return limiter; |
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 test; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.List; |
OlderNewer