language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
C# | UTF-8 | 414 | 2.6875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace JsonParseLib.Data
{
public class JsonData<T>
{
public string GetJsonFile(string url)
{
var result = "";
using (StreamReader sr = new StreamReader(url))
{
result = sr.ReadToEnd();
}
return result;
}
}
}
|
Python | UTF-8 | 17,000 | 2.6875 | 3 | [
"MIT"
] | permissive | '''
Created on Feb 13, 2016
@author: hanhanwu
Using sqlite3 as database
Download sqlite here: http://www.sqlite.org/download.html
Opern your terminal, cd to the sqlite folder, type "sqlite3"
'''
from sqlite3 import dbapi2 as sqlite
import urllib2
from bs4 import BeautifulSoup
from sets import Set
import re
from nltk.stem.porter import *
import neural_network as nn
class PageConnection:
def __init__(self, page_from, page_to):
self.page_from = page_from
self.page_to = page_to
class PageRecord:
def __init__(self, page_url, page_text):
self.page_url = page_url
self.page_text = page_text
class crawler_and_searcher:
def __init__(self, dbname):
self.con = sqlite.connect(dbname)
def __del__(self):
self.con.close()
def dbcommit(self):
self.con.commit()
# Get table row id of an item, if not exist, insert it into table and return the relative row id
def get_row_id(self, table, field, value):
rid = self.con.execute("select rowid from %s where %s='%s'" % (table, field, value)).fetchone()
if rid == None:
new_insert = self.con.execute("insert into %s (%s) values ('%s')" % (table, field, value))
return new_insert.lastrowid
return rid[0]
# add this page urlid, wordid of each word in this page into wordlocation table
def add_to_index(self, url, page_text, ignore_wrods):
if self.is_indexed(url): return
print 'indexing ', url
uid = self.get_row_id('urllist', 'url', url)
for i in range(len(page_text)):
w = page_text[i]
if w in ignore_wrods: continue
wid = self.get_row_id('wordlist', 'word', w)
self.con.execute('insert into wordlocation (urlid, wordid, location) values (%d,%d,%d)' % (uid, wid, i))
self.con.commit()
# insert the link connections into link table
def insert_connections(self, page_connections):
for pc in page_connections:
page_from = pc.page_from
page_to = pc.page_to
fromid = self.get_row_id('urllist', 'url', page_from)
toid = self.get_row_id('urllist', 'url', page_to)
self.con.execute('insert into link (fromid, toid) values (%d, %d)' % (fromid, toid))
self.con.commit()
def insert_linkwords(self):
self.con.execute("""
insert into linkwords (wordid, linkid)
select wl.wordid, link.rowid from
link join wordlocation wl
on link.toid = wl.urlid
""")
self.con.commit()
# check whether this page url has been indexed in urllist table and wordlocation table
def is_indexed(self, url):
u = self.con.execute("select rowid from urllist where url='%s'" % url).fetchone()
if u != None:
w = self.con.execute("select * from wordlocation where urlid=%d" % u[0]).fetchone()
if w != None: return True
return False
def url_editor(self, hrf):
wiki_prefix1 = 'https://en.wikipedia.org'
wiki_prefix2 = 'https:'
foreign_filter = ['ca', 'cs', 'de', 'es', 'fa', 'fr', 'ko', 'he', 'hu', 'ja', 'pt', 'ru', 'sr', 'fi', 'sv', 'uk', 'zh']
if 'wikimedia' in hrf or 'mediawiki' in hrf or 'wikidata' in hrf or 'index.php?' in hrf:
return None
if hrf == '/wiki/Main_Page': return None
if hrf.startswith('#') or hrf.startswith('/w/index.php'):
return None
m1 = re.search('[\w\W]*/wiki/\w+:[\w\W]*', hrf)
if m1 != None: return None
m2 = re.search('//(\w+)\.wikipedia\.org.*?', hrf)
if m2 != None:
if m2.group(1) in foreign_filter: return None
if hrf.startswith('/wiki/'):
hrf = wiki_prefix1+hrf
elif hrf.startswith('//dx.doi.org'):
hrf = wiki_prefix2+hrf
if 'http' not in hrf and 'https' not in hrf: return None
return hrf
def get_textonly(self, sp):
all_text = sp.text
splitter = re.compile('\\W*')
stemmer = PorterStemmer()
text_lst = [stemmer.stem(s.lower()) for s in splitter.split(all_text) if s!='']
return text_lst
# start from a list of pages, do BFS (breath first search) to the given depth; collect direct sources along the way
def crawl(self, pages, depth=2):
all_pages = Set()
direct_sources = Set()
page_connections = []
page_records = []
for d in range(depth):
crawled_links = Set()
all_pages.update(pages)
for p in pages:
try:
page = urllib2.urlopen(p)
except:
print 'Cannot open: ',p
continue
contents = page.read()
soup = BeautifulSoup(contents, 'lxml')
links = soup('a')
page_text = self.get_textonly(soup)
page_records.append(PageRecord(p, page_text))
for link in links:
if 'href' in dict(link.attrs):
hrf = link['href']
edited_url = self.url_editor(hrf)
if edited_url != None:
if 'wiki' in edited_url and edited_url not in all_pages:
page_connections.append(PageConnection(p, edited_url))
crawled_links.add(edited_url)
else: direct_sources.add(edited_url)
for new_link in crawled_links:
print new_link
pages = crawled_links
return direct_sources, page_connections, page_records
# search for the words appear in the query, and return all the urls that contain these words on the same page
def multi_words_query(self, qry):
field_list = 't0.urlid'
table_list = ''
where_clause_list = ''
query_words = qry.split()
query_words = [q.lower() for q in query_words]
table_num = 0
wordids = []
for qw in query_words:
wr = self.con.execute("select rowid from wordlist where word='%s'" % qw).fetchone()
if wr != None:
wid = wr[0]
wordids.append(wid)
if table_num > 0:
table_list += ', '
where_clause_list += ' and t%d.urlid=t%d.urlid and ' % (table_num-1, table_num)
field_list += ', t%d.location' % table_num
table_list += 'wordlocation t%d' % table_num
where_clause_list += 't%d.wordid=%d' % (table_num, wid)
table_num += 1
sql_qry = 'select %s from %s where %s' % (field_list, table_list, where_clause_list)
print sql_qry
cur = self.con.execute(sql_qry)
rows = [r for r in cur]
return rows, wordids
def get_full_url(self, urlid):
return self.con.execute('select url from urllist where rowid=%d' % urlid).fetchone()[0]
# re-scale scores to the range of [0,1] and show represent how close to the better score (1),
# since some small values maybe better while some higher values maybe better
def rescale_scores(self, scores, small_is_better=0):
v = 0.00001 # avoid to be divided by 0
if small_is_better:
min_score = float(min(scores.values()))
new_scores = dict([(u, min_score/max(v,s)) for (u, s) in scores.items()])
else:
max_score = max(scores.values())
if max_score == 0: max_score = v
new_scores = dict([(u, float(s)/max_score) for (u, s) in scores.items()])
return new_scores
# count how often the words in the query appear on each same page
def word_frequency_score(self, rows):
word_freq_dct = dict([(row[0], 0) for row in rows])
for row in rows:
word_freq_dct[row[0]] += 1
return self.rescale_scores(word_freq_dct)
# major topics always appear near the top of the pages, so score higher if the query words appear earlier in a page
def words_location_scores(self, rows):
words_location_dct = dict([(row[0], 1000000) for row in rows])
for row in rows:
loc_score = sum(row[1:])
if loc_score < words_location_dct[row[0]]:
words_location_dct[row[0]] = loc_score
return self.rescale_scores(words_location_dct, small_is_better=1)
# if the query words are closer to each other in a page, score the page higher, here I am tolerating the words order
def words_distance_scores(self, rows):
# each row has the same length, of the row has just no more than 1 word, return the score as 1.0
if len(rows[0]) <= 2: return dict([(row[0], 1.0) for row in rows])
words_dist_dct = dict([(row[0], 1000000) for row in rows])
for row in rows:
dist_score = sum(abs(row[i] - row[i-1]) for i in range(2,len(row)))
if dist_score < words_dist_dct[row[0]]:
words_dist_dct[row[0]] = dist_score
return self.rescale_scores(words_dist_dct, small_is_better=1)
# when there is more inbound links, the higher score for the page
def inbound_links_scores(self, rows):
# the urls in all the rows are unique since I have used sets in the crawler
inbound_links_dct = dict([(row[0],
self.con.execute('select count(*) from link where toid=%d' % row[0]).fetchone()[0]) for row in rows])
return self.rescale_scores(inbound_links_dct)
# PageRank
def page_rank(self, itr=10):
# create a new table and initialize the score for each url as 1.0
self.con.execute('drop table if exists pagerank')
self.con.execute('create table pagerank(urlid primary key, score)')
self.con.execute('insert into pagerank select rowid, 1.0 from urllist')
self.con.commit()
for i in range(itr):
print 'iteration ', str(i)
for (urlid,) in self.con.execute('select rowid from urllist'):
pr = 0.15
for (fromid,) in self.con.execute('select fromid from link where toid=%d' % urlid):
inbound_links_count = self.con.execute('select count(*) from link where toid=%d' % fromid).fetchone()[0]
if inbound_links_count == 0: inbound_links_count = 99999
page_score = self.con.execute('select score from pagerank where urlid=%d' % fromid).fetchone()[0]
pr += 0.85*page_score/inbound_links_count
self.con.execute('update pagerank set score=%f where urlid=%d' % (pr, urlid))
cur = self.con.execute('select * from pagerank order by score desc')
for i in range(5):
urlid, score = cur.next()
print self.get_full_url(urlid), score
def pagerank_scores(self, rows):
self.page_rank()
pagerank_dct = dict([(row[0],
self.con.execute('select score from pagerank where urlid=%d' % row[0]).fetchone()[0]) for row in rows])
return self.rescale_scores(pagerank_dct)
# find pages that contain the query words and get PageRank scores from its from_page, calculate the score
def link_text_scores(self, rows, wordids):
self.insert_linkwords()
link_text_dct = dict([(row[0], 0) for row in rows])
for wid in wordids:
cur = self.con.execute("""
select link.fromid, link.toid from link, linkwords
where linkwords.wordid=%d
and link.rowid=linkwords.linkid
""" % wid)
self.con.commit()
for (fromid, toid) in cur:
if toid in link_text_dct.keys():
pr = self.con.execute("""
select score from pagerank
where urlid=%d
""" % fromid).fetchone()[0]
link_text_dct[toid] += pr
return self.rescale_scores(link_text_dct)
# get total score for each returned url
def get_url_scores(self, rows, wordids):
url_totalscore_dct = dict([(row[0], 0) for row in rows])
weights = [(1.0, self.word_frequency_score(rows)), (2.0, self.words_location_scores(rows)),
(3.0, self.words_distance_scores(rows)), (2.5, self.inbound_links_scores(rows)),
(4.0, self.pagerank_scores(rows)), (4.0, self.link_text_scores(rows, wordids))]
for (weight, scores) in weights:
for url in url_totalscore_dct.keys():
url_totalscore_dct[url] += weight*scores[url]
return url_totalscore_dct
def get_ranked_urls(self, qry):
rows, wordids = self.multi_words_query(qry)
url_scores = self.get_url_scores(rows, wordids)
ranked_urls = sorted([(score, url) for (url, score) in url_scores.items()], reverse=1)
for (score, url) in ranked_urls[0:10]:
print '%f\t%s' % (score, self.get_full_url(url))
return [r[1] for r in ranked_urls[0:10]]
# create database tables and indexes
def create_index_tables(self):
self.con.execute('drop table if exists urllist')
self.con.execute('drop table if exists wordlist')
self.con.execute('drop table if exists wordlocation')
self.con.execute('drop table if exists link')
self.con.execute('drop table if exists linkwords')
self.con.execute('create table urllist(url)')
self.con.execute('create table wordlist(word)')
self.con.execute('create table wordlocation(urlid, wordid, location)')
self.con.execute('create table link(fromid integer, toid integer)')
self.con.execute('create table linkwords(wordid, linkid)')
self.con.execute('create index if not exists wordidx on wordlist(word)')
self.con.execute('create index if not exists urlidx on urllist(url)')
self.con.execute('create index if not exists wordurlidx on wordlocation(wordid)')
self.con.execute('create index if not exists urltoidx on link(toid)')
self.con.execute('create index if not exists urlfromidx on link(fromid)')
self.dbcommit()
def main():
ignorewords = Set(['the', 'of', 'to', 'and', 'a', 'in', 'is', 'it'])
# create tables and the indexes
dbname = 'searchindex.db'
mycrawler_searcher = crawler_and_searcher(dbname)
mycrawler_searcher.create_index_tables()
# crawl the pages using a set of seed pages
seed_pages = ['https://en.wikipedia.org/wiki/Recommender_system']
direct_sources, page_connections, page_records = mycrawler_searcher.crawl(seed_pages)
print '***********direct sources***********'
for ds in direct_sources:
print ds
print '***********page connections***********'
for pc in page_connections:
print pc.page_from,', ', pc.page_to
mycrawler_searcher.insert_connections(page_connections)
print '***********page records***********'
for pr in page_records:
print pr.page_url,', ', str(len(pr.page_text))
# add page url and the page text into wordlocation table, the urllist, wordlist tables will be inserted along the way
for pr in page_records:
mycrawler_searcher.add_to_index(pr.page_url, pr.page_text, ignorewords)
insertion_results = [r for r in mycrawler_searcher.con.execute('select rowid from wordlocation where wordid=1')]
print insertion_results
# multiple words query
qry = 'Recommendation System'
rows, wordids = mycrawler_searcher.multi_words_query(qry)
print rows
print wordids
# show ranked urls
ranked_urls = mycrawler_searcher.get_ranked_urls(qry)
nn_dbname = 'neural_network.db'
my_nn = nn.onehidden_nn(dbname)
my_nn.create_tables()
print '********create hidden nodes********'
rows = [r[0] for r in rows]
my_nn.create_hidden_node(wordids, rows)
print 'input_hidden:'
for cont in my_nn.con.execute('select * from input_hidden'):
print cont
print 'hidden_output:'
for cont in my_nn.con.execute('select * from hidden_output'):
print cont
print '********setup NN********'
my_nn.setup_nn(wordids, rows)
for selected_url in ranked_urls:
my_nn.train_nn(wordids, rows, selected_url)
print '\n'
if __name__ == '__main__':
main()
|
C++ | UTF-8 | 5,068 | 2.859375 | 3 | [] | no_license |
#include "application.h"
#include "HttpClient/HttpClient.h"
unsigned int nextTime = 0; // Next time to contact the server
HttpClient http;
// Headers currently need to be set at init, useful for API keys etc.
http_header_t headers[] = {
// { "Content-Type", "application/json" },
// { "Accept" , "application/json" },
{ "Accept" , "*/*"},
{ NULL, NULL } // NOTE: Always terminate headers will NULL
};
const String host = "207.154.197.158";
const String path = "/product";
const int port = 80;
http_request_t request;
http_response_t response;
#define enablePin D7 // Connects to the RFID's ENABLE pin
#define rxPin RX // Serial input (connects to the RFID's SOUT pin)
#define txPin 11 // Serial output (unused)
#define BUFSIZE 11 // Size of receive buffer (in bytes) (10-byte unique ID + null character)
#define RFID_START 0x0A // RFID Reader Start and Stop bytes
#define RFID_STOP 0x0D
int motorPin = D1;
bool badproduct = false;
// Wait for a response from the RFID Reader
// See Arduino readBytesUntil() as an alternative solution to read data from the reader
char rfidData[BUFSIZE]; // Buffer for incoming data
char offset = 0; // Offset into buffer
void setup() // Set up code called once on start-up
{
// define pin modes
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, HIGH); // disable RFID Reader
// set the baud rate for the SoftwareSerial port
Serial.begin(2400);
Serial1.begin(2400);
//set pinmode for the motor
pinMode(motorPin, OUTPUT);
digitalWrite(enablePin, LOW); // enable the RFID Reader
rfidData[0] = 0; // Clear the buffer
}
void loop() // Main code, to run repeatedly
{
/*
When the RFID Reader is active and a valid RFID tag is placed with range of the reader,
the tag's unique ID will be transmitted as a 12-byte printable ASCII string to the host
(start byte + ID + stop byte)
For example, for a tag with a valid ID of 0F0184F07A, the following bytes would be sent:
0x0A, 0x30, 0x46, 0x30, 0x31, 0x38, 0x34, 0x46, 0x30, 0x37, 0x41, 0x0D
We'll receive the ID and convert it to a null-terminated string with no start or stop byte.
*/
if (Serial1.available() > 0) // If there are any bytes available to read, then the RFID Reader has probably seen a valid tag
{
rfidData[offset] = Serial1.read(); // Get the byte and store it in our buffer
if (rfidData[offset] == RFID_START) // If we receive the start byte from the RFID Reader, then get ready to receive the tag's unique ID
{
offset = -1; // Clear offset (will be incremented back to 0 at the end of the loop)
}
else if (rfidData[offset] == RFID_STOP) // If we receive the stop byte from the RFID Reader, then the tag's entire unique ID has been sent
{
rfidData[offset] = 0; // Null terminate the string of bytes we just received
return; // Break out of the loop
}
offset++; // Increment offset into array
if (offset >= BUFSIZE)
{
offset = 0;
} // If the incoming data string is longer than our buffer, wrap around to avoid going out-of-bounds
String tagString = rfidData;
bool test_food = check_rfid(tagString); // see below - because we dont use the rfid-string-rewrite to use rfidData as a String when we get "real" data
Serial.println(test_food);
if (test_food == true){
GodNoDontEatThis();
clearBuffer();
}
//Serial.println(rfidData); // The rfidData string should now contain the tag's unique ID with a null termination, so display it on the Serial Monitor
}
//Serial.println(rfidData);
//test and return a bool dependent on whether the rfid is triggered
}
//tries to send a sensual OH YES PLEASE signal to the servo, clearly distinguishable from the two short hard bursts used by GodNoDontEatThis()
void iWouldLoveThisFood(){
digitalWrite(motorPin, HIGH);
delay(1000);
digitalWrite(motorPin, LOW);
}
//angrily throws two short bursts of spins on the servo - note that the spindown time of the servo means that
//the delays needs to be quite short
void GodNoDontEatThis(){
digitalWrite(motorPin, HIGH);
delay(500);
digitalWrite(motorPin, LOW);
}
void clearBuffer() {
for (int i=0; i<BUFSIZE; i++) {
rfidData[i] = 0;
}
}
bool check_rfid(String rfid_id) {
if (rfid_id.startsWith("01068DDEE2")) {
return true;
}
else {
return false;
}
// Request path and body can be set at runtime or at setup.
/* request.hostname = host;
request.port = port;
request.path = path+"/"+rfid_string;
// The library also supports sending a body with your request:
//request.body = "{\"key\":\"value\"}";
// Get request
http.get(request, response, headers);
String body = response.body;
String strippedBody = body.replace("\"", "");
return strippedBody.startsWith("true");
*/
} |
Java | UTF-8 | 2,606 | 2.0625 | 2 | [] | no_license | package com.netoperation.model;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.doubleclick.PublisherAdView;
import com.google.gson.annotations.Expose;
import com.taboola.android.api.TBRecommendationItem;
public class AdData {
@Expose
private String type;
@Expose
private int index;
@Expose
private String secId;
private String adDataUiqueId;
private boolean reloadOnScroll;
private String adId;
private AdSize adSize;
private PublisherAdView adView;
private TBRecommendationItem taboolaNativeAdItem;
public AdData(int index, String adId) {
this.index = index;
this.adId = adId;
}
public void setIndex(int index) {
this.index = index;
}
public void setReloadOnScroll(boolean reloadOnScroll) {
this.reloadOnScroll = reloadOnScroll;
}
public TBRecommendationItem getTaboolaNativeAdItem() {
return taboolaNativeAdItem;
}
public void setTaboolaNativeAdItem(TBRecommendationItem taboolaNativeAdItem) {
this.taboolaNativeAdItem = taboolaNativeAdItem;
}
public String getSecId() {
return secId;
}
public void setSecId(String secId) {
this.secId = secId;
}
public void setAdSize(AdSize adSize) {
this.adSize = adSize;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isReloadOnScroll() {
return reloadOnScroll;
}
public void setAdDataUiqueId(String adDataUiqueId) {
this.adDataUiqueId = adDataUiqueId;
}
public String getAdDataUiqueId() {
return adDataUiqueId;
}
public int getIndex() {
return index;
}
public AdSize getAdSize() {
return adSize;
}
public String getAdId() {
return adId;
}
public PublisherAdView getAdView() {
return adView;
}
public void setAdView(PublisherAdView adView) {
this.adView = adView;
}
/*@Override
public String toString() {
super.toString();
return createAdDataUiqueId(getIndex(), getAdId());
}*/
@Override
public boolean equals( Object obj) {
super.equals(obj);
if(obj != null && obj instanceof AdData) {
AdData adData = (AdData) obj;
return adData.adDataUiqueId.equals(adDataUiqueId);
}
return false;
}
@Override
public int hashCode() {
super.hashCode();
return adDataUiqueId.hashCode();
}
}
|
SQL | UTF-8 | 3,870 | 3.34375 | 3 | [] | no_license | Generate AWR – Automatic Workload Repository (AWR) in oracle 11g
https://dbatricksworld.com/generate-awr-automatic-workload-repository-awr-in-oracle-11g/
Published 2 years ago by Jignesh Jethwa
Oracle 11g Logo
Many times DBA need to monitor specific loaded/heavy database related activity in order to fix database performance, for that generating AWR report is perfect solution and he will get all necessary information he needed to tune the database. This article is step by step approach to generate AWR report.
Step-I:
Before loaded activity, issue following command to take snapshot of database as start point of AWR report.
SQL> EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;
Step-II: Perform your activity.
Perform your activity.
Step-III: Right after the activity, issue
Right after the activity, issue following command to take again snapshot of database as end point of AWR report.
EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;
Note: Snapshot information can be queried from the DBA_HIST_SNAPSHOT view.
Step-IV:
Generate AWR report: (Follow the instructions and provide input acrrodingly)
SQL> @$ORACLE_HOME/rdbms/admin/awrrpti.sql
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: html
Type Specified: html
Select the appropriate instance:
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
4119037639 1 PRODDB ifsprod localhost.lo
caldomain
4119037639 1 UATDB ifsuat localhost.lo
caldomain
* 4119037639 1 PRODDB ifsprod PR
Enter value for dbid: 4119037639
Enter value for inst_num: 1
Using 1 for instance number
Specify the number of days of snapshots to choose from:
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
ifsprod IFSPROD 66276 26 Nov 2016 00:00 1
66277 26 Nov 2016 00:30 1
66278 26 Nov 2016 01:01 1
66279 26 Nov 2016 01:30 1
66280 26 Nov 2016 02:00 1
66281 26 Nov 2016 02:30 1
66282 26 Nov 2016 03:00 1
66283 26 Nov 2016 03:30 1
66284 26 Nov 2016 04:00 1
66285 26 Nov 2016 04:30 1
66286 26 Nov 2016 05:00 1
66287 26 Nov 2016 05:30 1
66288 26 Nov 2016 06:00 1
66289 26 Nov 2016 06:31 1
66290 26 Nov 2016 07:00 1
66291 26 Nov 2016 07:30 1
66292 26 Nov 2016 08:00 1
66293 26 Nov 2016 08:30 1
66294 26 Nov 2016 09:00 1
66295 26 Nov 2016 09:30 1
66296 26 Nov 2016 10:00 1
66297 26 Nov 2016 10:30 1
66298 26 Nov 2016 11:00 1
66299 26 Nov 2016 11:30 1
66300 26 Nov 2016 12:00 1
66301 26 Nov 2016 12:30 1
66302 26 Nov 2016 13:00 1
66303 26 Nov 2016 13:30 1
66304 26 Nov 2016 14:00 1
66305 26 Nov 2016 14:30 1
66306 26 Nov 2016 14:41 1
66307 26 Nov 2016 14:45 1
Specify the Start point and end point for the snapshot, input from above:
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 66306
Begin Snapshot Id specified: 66306
Enter value for end_snap: 66307
End Snapshot Id specified: 66307
Name the report:
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_66306_66307.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: AWR_between_2_manual_snapshot
.
..
...
Report written to AWR_between_2_manual_snapshot
SQL> exit
search for html format snapshot in current directory. |
C++ | UTF-8 | 1,222 | 2.859375 | 3 | [] | no_license | #include "MouseButtonsDetector.h"
#include "DeviceLogger.h"
#include "MouseAction.h"
namespace Detector
{
bool MouseButtonsDetector::checkAction(const ButtonState &buttonState, IAction *action)
{
LOG_DEBUG(String("MouseButtonsDetector::checkAction() button1Pressed: ") + String(buttonState.button1Pressed) + String(", button 2: ") + String(buttonState.button2Pressed));
bool actionDetected{false};
// Read the value of button 1
if (button1Pressed_ != buttonState.button1Pressed)
{
LOG_DEBUG("MouseButtonsDetector::checkAction() Button 1 changed");
button1Pressed_ = buttonState.button1Pressed;
static_cast<MouseAction *>(action)->leftClick(button1Pressed_);
actionDetected = true;
}
// Read the value of button 2
if (button2Pressed_ != buttonState.button2Pressed)
{
LOG_DEBUG("MouseButtonsDetector::checkAction() Button 2 changed");
button2Pressed_ = buttonState.button2Pressed;
static_cast<MouseAction *>(action)->rightClick(button2Pressed_);
actionDetected = true;
}
return actionDetected;
}
} // namespace Detector
|
Python | UTF-8 | 616 | 3.09375 | 3 | [] | no_license | import mysql.connector
mydb = mysql.connector.connect(user='root', password='',
host='127.0.0.1',
database='mycustomers')
cursor = mydb.cursor()
sql = "select * from customers"
cursor.execute(sql)
data = cursor.fetchall()
records = cursor.rowcount
print("\r\n You have " + str(records) + " records in your customer table. \r\n")
for i in data:
print("\r\n customer id: " + str(i[0]) + "\r\n")
print("\r\n customer name: " + i[1] + "\r\n")
print("\r\n customer age: " + i[2] + "\r\n")
print("\r\n customer gender: " + i[3] + "\r\n")
|
C++ | UTF-8 | 538 | 2.765625 | 3 | [] | no_license | #include "stdafx.h"
#include "CDrawableObject.h"
CDrawableObject::CDrawableObject()
{
// Default settings for objects
lightingEnabled = 1;
setColour(0.5f, 0.5f, 0.5f);
setScale(1.0f, 1.0f, 1.0f);
}
CDrawableObject::~CDrawableObject()
{
}
GLfloat * CDrawableObject::getColour()
{
return colour;
}
void CDrawableObject::setColour(GLfloat r, GLfloat g, GLfloat b)
{
colour[0] = r;
colour[1] = g;
colour[2] = b;
}
void CDrawableObject::setScale(float xS, float yS, float zS)
{
scale[0] = xS;
scale[1] = yS;
scale[2] = zS;
}
|
Python | UTF-8 | 18,364 | 3.5625 | 4 | [] | no_license | # AI Homework 3 - Sudoku Solver
# Dylan Jones
import re
import copy
# Function to read in sudoku puzzles from file
def file_read(flag):
puzzles = []
# The read in puzzle consists of a difficulty and a puzzle
sudoku_puzzle = [[],[]]
# Open test file with only two puzzles vs full puzzle list
if flag == 0:
f = open('test.txt')
else:
f = open('puzzles.txt')
num_lines = 0
# Loop through the file and extract the information
for line in f:
if re.match('\d{3}\s\d{3}\s\d{3}',line):
line = line.replace(' ','')
line = line.replace('\n','')
line = line.replace('\t','')
num_lines += 1
row = []
for i in range(len(line)):
row.append(int(line[i]))
sudoku_puzzle[1].append(row)
if num_lines == 9:
puzzles.append(copy.deepcopy(sudoku_puzzle))
sudoku_puzzle = [[],[]]
num_lines = 0
elif re.match('\d{1,2}\s',line):
line = re.split('\d{1,2}\s',line)[1]
line = line.replace('\n','')
sudoku_puzzle[0] = line
return puzzles
# Function to print a pattern in a visually pleasing way
def print_pattern(pattern):
col_count = 0
print pattern[0]
print ' 0 1 2 3 4 5 6 7 8'
print ' ----------------------'
for item in pattern[1]:
row_count = 0
print col_count, '|',
for char in item:
if char == 0:
print '*',
else:
print char,
row_count += 1
if row_count % 3 == 0:
print '|',
print
col_count += 1
if col_count % 3 == 0:
print " ----------------------"
# Function to print out a puzzle in a visually pleasing way
def print_puzzle(puzzle):
col_count = 0
print puzzle[0]
print ' 0 1 2 3 4 5 6 7 8'
print ' ----------------------'
for row in puzzle[1]:
row_count = 0
print col_count, '|',
for box in row:
if not(box[0]):
print '*',
else:
print box[0],
row_count += 1
if row_count % 3 == 0:
print '|',
print
col_count += 1
if col_count % 3 == 0:
print " ----------------------"
# Function to build a puzzle from a given pattern - a pattern stores only the
# square information while a puzzle must also store the domains
def build_puzzle(pattern):
puzzle = [[],[]]
puzzle[0] = pattern[0]
for item in pattern[1]:
row = []
for c in item:
box = [[],[]]
if c != 0:
box[0] = c
else:
box[1] = range(1,10)
row.append(copy.deepcopy(box))
puzzle[1].append(row)
return puzzle
# Function to infer about what are possible for a box - it removes all numbers
# from the domain that are already filled in in the row / col / 3x3 box
def inference_rule_1(puzzle):
row = 0
for row_l in puzzle[1]:
col = 0
for box in row_l:
if not(box[0]):
to_remove = []
# Search through the row
for boxes in row_l:
if boxes[0]:
to_remove.append(boxes[0])
# Search through the column
for i in range(len(puzzle[1])):
if puzzle[1][i][col][0]:
to_remove.append(puzzle[1][i][col][0])
# Search through the 3x3 box
for i in range(int(row/3)*3,int(row/3)*3+3):
for j in range(int(col/3)*3,int(col/3)*3+3):
if puzzle[1][i][j][0]:
to_remove.append(puzzle[1][i][j][0])
for item in to_remove:
try:
box[1].remove(item)
except ValueError:
pass
col += 1
row += 1
return puzzle
# Function to infer about the domain of the square. If it is the only square in
# either its row / col / box that can take on a value it is that value
def inference_rule_2(puzzle):
row = 0
for row_l in puzzle[1]:
col = 0
for box in row_l:
if not(box[0]):
# Checking for every guess if it is the only one in that r/c/b
for guess in box[1]:
count_r = 0
count_c = 0
count_b = 0
# Checking the row
for item in row_l:
if not(item[0]):
if item[1].count(guess) > 0:
count_r += 1
#Checking the column
for i in range(len(puzzle[1])):
if not(puzzle[1][i][col][0]):
if puzzle[1][i][col][1].count(guess) > 0:
count_c += 1
#Checking the box
for i in range(int(row/3)*3,int(row/3)*3+3):
for j in range(int(col/3)*3,int(col/3)*3+3):
if not(puzzle[1][i][j][0]):
if puzzle[1][i][j][1].count(guess) > 0:
count_b += 1
if count_r == 1 or count_c == 1 or count_b == 1:
# Update everyone else
for item in row_l:
if not(item[0]):
if item[1].count(guess) > 0:
item[1].remove(guess)
for i in range(len(puzzle[1])):
if not(puzzle[1][i][col][0]):
if puzzle[1][i][col][1].count(guess) > 0:
puzzle[1][i][col][1].remove(guess)
for i in range(int(row/3)*3,int(row/3)*3+3):
for j in range(int(col/3)*3,int(col/3)*3+3):
if not(puzzle[1][i][j][0]):
if puzzle[1][i][j][1].count(guess) > 0:
puzzle[1][i][j][1].remove(guess)
box[1] = [guess]
break
col += 1
row += 1
return puzzle
# Function to implement the naked double rule
def naked_double(puzzle):
row = 0
for row_l in puzzle[1]:
col = 0
for box in row_l:
if not(box[0]):
if len(box[1]) == 2:
# Looking through the row
col_count = 0
for item in row_l:
#print row, col, col_count
if col_count != col:
if not(item[0]):
if (len(set(box[1]+item[1])) == 2) and (len(box[1]) > 1) and (len(item[1]) > 1):
double = list(set(box[1]+item[1]))
for thing in row_l:
if not(thing[0]):
for guess in set(box[1]+item[1]):
if thing[1].count(guess) > 0:
thing[1].remove(guess)
box[1] = copy.deepcopy(double)
item[1] = copy.deepcopy(double)
col_count += 1
# Looking through the column
for i in range(len(puzzle[1])):
if i != row:
if not(puzzle[1][i][col][0]):
if (len(set(box[1]+puzzle[1][i][col][1])) == 2) and (len(box[1]) > 1) and (len(puzzle[1][i][col][1]) > 1):
double = list(set(box[1]+puzzle[1][i][col][1]))
for j in range(len(puzzle[1])):
if not(puzzle[1][j][col][0]):
for guess in set(box[1]+puzzle[1][i][col][1]):
if puzzle[1][j][col][1].count(guess) > 0:
puzzle[1][j][col][1].remove(guess)
box[1] = copy.deepcopy(double)
puzzle[1][i][col][1] = copy.deepcopy(double)
# Looking through the box
for i in range(int(row/3)*3,int(row/3)*3+3):
for j in range(int(col/3)*3,int(col/3)*3+3):
if (i != row) and (j != col):
if not(puzzle[1][i][j][0]):
if (len(set(box[1]+puzzle[1][i][j][1])) == 2) and (len(box[1]) > 1) and (len(puzzle[1][i][j][1]) > 1):
double = list(set(box[1]+puzzle[1][i][j][1]))
for u in range(int(row/3)*3,int(row/3)*3+3):
for v in range(int(col/3)*3,int(col/3)*3+3):
if not(puzzle[1][u][v][0]):
for guess in set(box[1]+puzzle[1][i][j][1]):
if puzzle[1][u][v][1].count(guess) > 0:
puzzle[1][u][v][1].remove(guess)
box[1] = copy.deepcopy(double)
puzzle[1][i][j][1] = copy.deepcopy(double)
col += 1
row += 1
return puzzle
# Function to implement the naked triple rule
def naked_triple(puzzle):
row = 0
for row_l in puzzle[1]:
col = 0
for box in row_l:
if not(box[0]) and (len(box[0]) != 1) and (len(box[0]) <= 3):
# Looking at the row for second box
col_2 = 0
for second_box in row_l:
if not(second_box[0]) and (len(second_box[1]) != 1) and (len(second_box[1]) <= 3) and (col_2 != col) and (len(set(box[1]+second_box[1])) <= 3):
col_3 = 0
for third_box in row_l:
if not(third_box[0]) and (len(third_box[0]) != 1) and (len(third_box[0]) <= 3) and (col_2 != col_3) and (col != col_3) and (len(set(box[0]+second_box[0]+third_box[0])) == 3):
three = list(set(box[0]+second_box[0]+third_box[0]))
guess_col = 0
for guess_box in row_l:
if not(guess_box[0]) and (guess_col != col) and (guess_col != col_2) and (guess_col != col_3):
for guess in three:
if guess_box[1].count(guess) > 0:
guess_box[1].remove(guess)
guess_col += 1
col_3 += 1
# Looking for 3rd box in the row
col_2 += 1
# Looking at the col for second box
row_2 = 0
for i in range(len(puzzle[1])):
if not(puzzle[1][i][col][0]) and (len(puzzle[1][i][col][1]) != 1) and (len(puzzle[1][i][col][1]) <= 3) and (row_2 != row) and (len(set(box[1]+puzzle[1][i][col][1])) <= 3):
row_3 = 0
for j in range(len(puzzle[1])):
if not(puzzle[1][j][col][0]) and (len(puzzle[1][j][col][1]) != 1) and (len(puzzle[1][j][col][1]) <= 3) and (row_3 != row_2) and (row_3 != row) and (len(set(box[1]+puzzle[1][i][col][1]+puzzle[1][j][col][1])) == 3):
three = list(set(box[1]+puzzle[1][i][col][1]+puzzle[1][j][col][1]))
guess_row = 0
for k in range(len(puzzle[1])):
if not(puzzle[1][k][col][0]) and (guess_row != row) and (guess_row != row_2) and (guess_row != row_3):
for guess in three:
if puzzle[1][k][col][1].count(guess) > 0:
puzzle[1][k][col][1].remove(guess)
guess_row += 1
row_3 += 1
row_2 += 1
# Looking at the box for second box
for i in range(int(row/3)*3,int(row/3)*3+3):
for j in range(int(col/3)*3,int(col/3)*3+3):
if (i != row) and (j != col):
if not(puzzle[1][i][j][0]) and (len(puzzle[1][i][j][1]) != 1) and (len(puzzle[1][i][j][1]) <= 3) and (len(set(box[1]+puzzle[1][i][j][1])) <= 3):
for m in range(int(row/3)*3,int(row/3)*3+3):
for n in range(int(col/3)*3,int(col/3)*3+3):
if (m != row) and (n != col) and (m != i) and (n != j):
if not(puzzle[1][m][n][0]) and (len(puzzle[1][m][n][1]) != 1) and (len(puzzle[1][m][n][1]) <= 3) and (len(set(box[1]+puzzle[1][i][j][1]+puzzle[1][m][n][1])) <= 3):
three = list(set(box[1]+puzzle[1][i][j][1]+puzzle[1][m][n][1]))
for x in range(int(row/3)*3,int(row/3)*3+3):
for y in range(int(col/3)*3,int(col/3)*3+3):
if (x != row) and (y != col) and (x != i) and (y != j) and (x != m) and (y != n):
if not(puzzle[1][x][y][0]):
for guess in three:
if puzzle[1][x][y][1].count(guess) > 0:
puzzle[1][x][y][1].remove(guess)
col += 1
row += 1
return puzzle
# Main loop to solve the puzzle
def solve_puzzle(puzzle, depth):
global num_backtracks
# Doing the simple inference until no new information is gained
puzzle = inference_rule_1(copy.deepcopy(puzzle))
puzzle = inference_rule_2(copy.deepcopy(puzzle))
puzzle = naked_double(copy.deepcopy(puzzle))
puzzle = naked_triple(copy.deepcopy(puzzle))
while (simple_add(puzzle) > 0):
puzzle = inference_rule_1(copy.deepcopy(puzzle))
puzzle = inference_rule_2(copy.deepcopy(puzzle))
puzzle = naked_double(copy.deepcopy(puzzle))
puzzle = naked_triple(copy.deepcopy(puzzle))
# recurse here on all possible values of some square
if check_puzzle_done(puzzle):
return puzzle
else:
square = get_next_square(puzzle, 1)
for guess in puzzle[1][square[0]][square[1]][1]:
rec_puzzle = copy.deepcopy(puzzle)
rec_puzzle[1][square[0]][square[1]][0] = guess
rec_puzzle[1][square[0]][square[1]][1] = []
rec_puzzle = solve_puzzle(rec_puzzle,depth+1)
if check_puzzle_done(rec_puzzle):
return rec_puzzle
else:
num_backtracks += 1
return puzzle
# Function to get the next square with the strategy based upon the flag given
def get_next_square(puzzle, flag):
spot = [0,0]
# Select the most constrained slot
if flag == 0:
min_amount = 10;
row_c = 0
for row in puzzle[1]:
col_c = 0
for box in row:
if len(box[1]) < min_amount and not(box[0]):
spot[0] = row_c
spot[1] = col_c
min_amount = len(box[1])
col_c += 1
row_c += 1
return spot
# Just select the first empty slot found
else:
row_c = 0
for row in puzzle[1]:
col_c = 0
for box in row:
if not(box[0]):
spot[0] = row_c
spot[1] = col_c
return spot
col_c += 1
row_c += 1
# Function to go thruogh the puzzle and update any square with only one possiblity
def simple_add(puzzle):
num_change = 0
#print puzzle
for row in puzzle[1]:
for box in row:
if len(box[1]) == 1:
box[0] = box[1][0]
box[1] = []
num_change += 1
return num_change
# Function to check if the ouzzle can still be solved
def check_puzzle(puzzle):
for row in puzzle[1]:
for box in row:
if not(box[0]) and len(box[1]) == 0:
return False
return puzzle
# Function to check if all squares have been filled in
def check_puzzle_done(puzzle):
for row in puzzle[1]:
for box in row:
if not(box[0]):
return False
return True
# main function to run which tracks results
def main():
global num_backtracks
problems = file_read(1)
result_tracker = [['Easy',0,0,0],['Medium',0,0,0],['Hard',0,0,0],['Evil',0,0,0]]
for puzzle in problems:
num_backtracks = 0
p = solve_puzzle(build_puzzle(puzzle),0)
for item in result_tracker:
if item[0] == puzzle[0]:
item[1] += 1
if check_puzzle_done(p):
item[2] += 1
else:
print_pattern(puzzle)
print "====================================="
print_puzzle(p)
print "====================================="
print "====================================="
item[3] += num_backtracks
print result_tracker
num_backtracks = 0
print "Starting"
main()
|
Java | UTF-8 | 1,344 | 2.390625 | 2 | [
"Apache-2.0"
] | permissive | package nl.jqno.equalsverifier.internal.architecture;
import static org.junit.jupiter.api.Assertions.assertTrue;
import nl.jqno.equalsverifier.internal.reflection.Util;
import org.junit.jupiter.api.Test;
public final class TestPresenceTest {
@Test
public void javafxTestsArePresentOnJdk11() {
assertTrue(
isTestAvailableOnJdk(
11,
"nl.jqno.equalsverifier.integration.extended_contract.JavaFxClassesTest"
)
);
}
@Test
public void recordTestsArePresentOnJdk16() {
assertTrue(
isTestAvailableOnJdk(
16,
"nl.jqno.equalsverifier.integration.extended_contract.RecordsTest"
)
);
}
private boolean isTestAvailableOnJdk(int jdkVersion, String className) {
boolean isJdk = isAtLeastJdk(jdkVersion);
boolean available = isClassAvailable(className);
return isJdk == available;
}
private boolean isClassAvailable(String className) {
return Util.classForName(className) != null;
}
private boolean isAtLeastJdk(int requiredVersion) {
String jdkVersion = System.getProperty("java.version");
int actualVersion = Integer.parseInt(jdkVersion.split("\\.|-")[0]);
return requiredVersion <= actualVersion;
}
}
|
Markdown | UTF-8 | 2,174 | 2.875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "One-lined Python"
date: 2015-01-30
categories: projects
hieroglyph: "𓆙"
---
[**One-liner**](https://github.com/csvoss/oneliner) is a "compiler" that converts any Python file into a single line of code with the same functionality. Really, just one line! No newlines or semicolons allowed!
Take a look at the [**interactive demo**](http://onelinepy.herokuapp.com/) to learn more about how it works.
**Before:**
{% highlight python %}
def guess_my_number(n):
while True:
user_input = raw_input("Enter a positive integer to guess: ")
if len(user_input)==0 or not user_input.isdigit():
print "Not a positive integer!"
else:
user_input = int(user_input)
if user_input > n:
print "Too big! Try again!"
elif user_input < n:
print "Too small! Try again!"
else:
print "You win!"
return True
guess_my_number(42)
{% endhighlight %}
**After:**
{% highlight python %}
(lambda __builtin__: (lambda __print, __y, d: [(lambda ___: None)(d.guess_my_number(42)) for d.guess_my_number in [(lambda n:[(__y(lambda __this: (lambda d: (lambda __after: [(lambda __after: (lambda ___: __after(d))(__print('Not a positive integer!')) if (d.len(d.user_input)==0 or (not d.user_input.isdigit())) else [(lambda __after: (lambda ___: __after(d))(__print('Too big! Try again!')) if d.user_input>d.n else (lambda __after: (lambda ___: __after(d))(__print('Too small! Try again!')) if d.user_input<d.n else (lambda ___: d.True)(__print('You win!')))(lambda d: __after(d)))(lambda d: __after(d)) for d.user_input in [(d.int(d.user_input))]][0])(lambda d: __this(d)) for d.user_input in [(d.raw_input('Enter a positive integer to guess: '))]][0] if d.True else __after(d))(lambda d: None))))(d) for d.n in [(n)]][0])]][0])(__builtin__.__dict__['print'],(lambda f: (lambda x: x(x))(lambda y: f(lambda *args: y(y)(*args)))),type('StateDict',(),__builtin__.__dict__)()))(__import__('__builtin__'))
{% endhighlight %}
See the code on [GitHub](https://github.com/csvoss/oneliner).
|
JavaScript | UTF-8 | 2,340 | 2.921875 | 3 | [] | no_license | $(document).ready(function () {
let sizeChanging = false;
let weatherShowing = false;
// let currentTemp, feelingTemp, humidity;
$('.headline').on('click', function () {
if (sizeChanging)
return;
sizeChanging = true;
const details = $(this).next();
const expandIcon = $(this).find('.expand');
const collapseIcon = $(this).find('.collapse');
if (details.is(':visible')) {
details.slideUp(300, () => {
sizeChanging = false;
});
collapseIcon.fadeOut(140, () => {
expandIcon.fadeIn(140);
});
}
else {
details.slideDown(300, () => {
sizeChanging = false;
});
expandIcon.fadeOut(140, () => {
collapseIcon.fadeIn(140);
});
}
});
getWeatherData();
$('#location').on('click', (e) => {
e.preventDefault();
if (weatherShowing)
return;
// if (currentTemp == undefined || feelingTemp == undefined || humidity == undefined)
// getWeatherData;
weatherShowing = true;
$('#weather').fadeIn(300).delay(4400).fadeOut(300, () => {
weatherShowing = false;
});
});
function updateWeatherUI(currentTemp, feelingTemp, humidity) {
$('#current_temp').text(currentTemp + '℃');
$('#feeling_temp').text(feelingTemp + '℃');
$('#humidity').text(humidity + '%');
}
function getWeatherData() {
const weatherURL = 'https://api.openweathermap.org/data/2.5/weather?q=sylhet&appid=e0748595c399119a34571cab65adec9a';
axios.get(weatherURL).then(function ({data: {main: weatherData}}) {
// const weatherData = response['data']['main'];
// currentTemp = (weatherData['temp'] - 273).toFixed(2);
// feelingTemp = (weatherData['feels_like'] - 273).toFixed(2);
// humidity = (weatherData['humidity']);
let {temp, feels_like, humidity} = weatherData;
temp = (temp - 273).toFixed(2);
feels_like = (feels_like - 273).toFixed(2);
console.log(temp, feels_like, humidity);
updateWeatherUI(temp, feels_like, humidity);
})
}
}); |
C# | UTF-8 | 1,150 | 2.734375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Halloumi.BassEngine
{
public class ExtendedMix
{
/// <summary>
/// Gets or sets the track description of the track to mix in to.
/// </summary>
public string TrackDescription { get; set; }
/// <summary>
/// Gets the length of the fade-out section in seconds
/// </summary>
public double FadeLength { get; set; }
/// <summary>
/// Gets or sets the fade end sample.
/// </summary>
internal long FadeEnd { get; set; }
/// <summary>
/// Gets or sets the fade end sample.
/// </summary>
internal long FadeEndLoop { get; set; }
/// <summary>
/// Gets or sets the final volume level at the end of the fade section as a percentage (0 - 1)
/// </summary>
public float FadeEndVolume { get; set; }
/// <summary>
/// If true, a 'power-down' noise will be played at the end of the fade
/// </summary>
public bool PowerDownOnEnd { get; set; }
}
}
|
Java | UTF-8 | 5,627 | 3.9375 | 4 | [
"MIT"
] | permissive | package com.utilib.data_structures;
import java.util.NoSuchElementException;
public class List<K, V>
{
private Node<K, V> _head;
private Node<K, V> _tail;
private int _numNodes = 0;
private boolean _allowDuplicates = true;
public List(final boolean allowDuplicates)
{
_allowDuplicates = allowDuplicates;
_head = null;
_tail = null;
}
public List(final K key, final V value, final boolean allowDuplicates)
{
Node<K, V> node = new Node<K,V>(key, value);
_allowDuplicates = allowDuplicates;
_head = node;
_tail = node;
_numNodes++;
}
/**
* Adds a node with a key-value pair to the list.
*
* @param key
* @param value
* @return boolean
*/
public boolean add(final K key, final V value)
{
// If the list is empty, initialize the head and tail nodes.
if (isEmpty())
{
Node<K, V> node = new Node<K, V>(key, value);
_head = node;
_tail = node;
_numNodes++;
return true;
}
if(!_allowDuplicates)
{
if(searchDuplicates(key))
{
System.err.println("Duplicate key[" + key + "] detected.");
return false;
}
}
Node<K, V> node = new Node<K, V>(key, value);
_tail.setNext(node);
_tail = node;
_numNodes++;
return true;
}
/**
* Searches and returns a node by the key given.
*
* @param key
* @return V
*/
public V getByKey(final K key)
{
// If the list is empty, throw exception.
if (isEmpty())
throw new NoSuchElementException("List is empty.");
// Iterate through the list to find the node with the key given.
Node<K, V> curr = _head;
while (curr != null)
{
if (curr.getKey() != key)
curr = curr.getNext();
else
return curr.getValue();
}
return null;
}
/**
* Searches and returns a node by the value given.
*
* @param value
* @return K
*/
public K getByValue(final V value)
{
// If the list is empty, throw exception.
if (isEmpty())
throw new NoSuchElementException("List is empty.");
// Iterate through the list to find the node with the value given.
Node<K, V> curr = _head;
while (curr != null)
{
if (curr.getValue() != value)
curr = curr.getNext();
else
return curr.getKey();
}
return null;
}
/**
* Removes the first node of the list.
*
* @return
*/
public V removeFirst()
{
// If the list is empty, throw exception.
if (isEmpty())
throw new NoSuchElementException("List is empty.");
// If the head is the tail, there is only one node left, remove it.
if (_head == _tail)
{
Node<K, V> tmpNode = _tail;
_head = null;
_tail = null;
_numNodes--;
return tmpNode.getValue();
}
Node<K, V> tmpNode = _head;
_head = _head.getNext();
_numNodes--;
return tmpNode.getValue();
}
/**
* Removes last node of the list.
*
* @return Node
*/
public V removeLast()
{
// If the list is empty, throw exception.
if (isEmpty())
throw new NoSuchElementException("List is empty.");
// If the head is the tail, there is only one node left, remove it.
if (_head == _tail)
{
Node<K, V> tmpNode = _tail;
_head = null;
_tail = null;
_numNodes--;
return tmpNode.getValue();
}
Node<K, V> tmpNode = _tail;
// Get the node before the tail.
Node<K, V> currNode = _head;
while (currNode.getNext() != _tail)
{
currNode = currNode.getNext();
}
// Update the tail node and set next pointer to null.
_tail = currNode;
_tail.setNext(null);
_numNodes--;
return tmpNode.getValue();
}
/**
* Searches for duplicate keys in the list.
*
* @param key
* @return boolean
*/
public boolean searchDuplicates(final K key)
{
Node<K,V> currNode = _head;
while(currNode != null)
{
if(currNode.getKey() != key)
currNode = currNode.getNext();
else
return true;
}
return false;
}
/**
* Prints the list.
*/
public void print()
{
Node<K, V> currNode = _head;
while (currNode != null)
{
System.out.println(currNode);
currNode = currNode.getNext();
}
}
/**
* Clears the list.
*/
public void clear()
{
while(_numNodes > 0)
removeLast();
}
/**
* Checks if the list is empty.
*
* @return boolean
*/
public boolean isEmpty()
{
return (_numNodes == 0);
}
/**
* Returns the size of the list.
*
* @return int
*/
public int size()
{
return _numNodes;
}
private class Node<Key,Value>
{
private Node<Key, Value> _next;
private Key _key;
private Value _value;
public Node(final Key key, final Value value)
{
setKey(key);
setValue(value);
_next = null;
}
public Value getValue()
{
return _value;
}
public void setValue(Value value)
{
_value = value;
}
public Key getKey()
{
return _key;
}
public void setKey(Key _key)
{
this._key = _key;
}
public void setNext(final Node<Key, Value> node)
{
_next = node;
}
public Node<Key, Value> getNext()
{
return _next;
}
@Override
public String toString()
{
return "Key " + _key + " Value: " + _value + " Next: " + System.identityHashCode(_next);
}
}
public static void main(String[] args)
{
List<Integer, Integer> list = new List<Integer, Integer>(true);
// Insertion usage
list.add(0, 00);
list.add(1, 10);
list.add(2, 20);
// Printing the list
list.print();
// Deletion usage
System.out.println("Removing first node: " + list.removeFirst());
System.out.println("Removing last node : " + list.removeLast());
// Clear list
//list.clear();
System.out.println("List size: " + list.size());
}
}
|
Python | UTF-8 | 602 | 3.046875 | 3 | [] | no_license | data = open("data", "r").read().splitlines()
my_timestamp = int(data[0])
busses_list = data[1].split(',')
closest_times = []
bus_dict = {}
def get_closest_bus(busses):
closest_time = 9999999999999999
closest_bus = 0
for bus in busses.items():
if bus[1] < closest_time:
closest_time = bus[1]
closest_bus = bus[0]
print('closest', closest_time, closest_bus, (closest_time - my_timestamp) * closest_bus)
for bus in [int(bus) for bus in busses_list if bus != 'x']:
bus_dict[bus] = bus
while bus_dict[bus] < my_timestamp:
bus_dict[bus] += bus
get_closest_bus(bus_dict) |
Java | UTF-8 | 276 | 2.234375 | 2 | [] | no_license | package Opg9_8;
public class Fan {
final int SLOW = 1;
final int MEDIUM = 2;
final int FAST = 3;
private int speed = SLOW;
private boolean on = false;
private double radius = 5;
String color = "blue";
public Fan() {
new Fan();
}
}
|
Python | UTF-8 | 1,495 | 2.59375 | 3 | [] | no_license |
pessoa_juridica = {'nome': 'Pessoa juridica teste', 'cnpj': '592915340001'}
def test_status_code_200_ao_listar_pessoas_juridicas(client):
assert client.get('/pessoas_juridicas').status_code == 200
def test_lista_de_pessoas_juridicas_vazia(client):
assert client.get('/pessoas_juridicas').json == []
def test_cadastro_pessoa_juridica(client):
response = client.post('/pessoa_juridica', json=pessoa_juridica)
assert response.status_code == 201
assert response.json.get('nome') == pessoa_juridica['nome']
assert response.json.get('cnpj') == pessoa_juridica['cnpj']
def test_mostra_pessoa_juridica(client):
client.post('/pessoa_juridica', json=pessoa_juridica)
response = client.get('/pessoa_juridica/1')
assert response.status_code == 200
assert response.json.get('nome') == pessoa_juridica['nome']
assert response.json.get('cnpj') == pessoa_juridica['cnpj']
def test_altera_pessoa_juridica(client):
novos_dados = {'nome': 'novo nome', 'cnpj': '40028922999'}
client.post('/pessoa_juridica', json=pessoa_juridica)
response = client.put(f'/pessoa_juridica/1', json=novos_dados).get_json()
assert response['nome'] == novos_dados['nome']
assert response['cnpj'] == novos_dados['cnpj']
def test_deleta_pessoa_juridica(client):
client.post('/pessoa_juridica', json=pessoa_juridica)
delete_request = client.delete('/pessoa_juridica/1')
assert delete_request.status_code == 200
assert not client.get(f'/pessoas_juridicas').get_json()
|
JavaScript | UTF-8 | 5,636 | 4.0625 | 4 | [] | no_license | function bubbleSort(array) {
/* your code here */
/* loop over elements
swap anything out of order
repeat until no swaps */
var swapCount=1;
var result = array;
var left, right;
if (array.length===0 || array.length === 1){
return result;
}
while (swapCount>0){
for (var i=0; i<result.length-1; i++){
left = result[i];
right = result[i+1];
if (right < left){
result[i] = right;
result[i+1] = left;
swapCount++;
}
}
if (swapCount===1)
swapCount=0;
else
swapCount=1;
}
return result;
}
/* solution & comments
function swap (arr, indexA, indexB){ // create own function and then spy on it in the test, to tell how many times it was called.
var oldElem = arr[indexA];
arr[indexA] = arr[indexB];
arr[indexB] = oldElem;
};
function bubbleSort (arr){
//var sorted = [];
var swapHappenedLastTime = true;
while (swapHappenedLastTime){
wapHappenedLastTime = false;
for (var i = 0; i<arr.length-1; i++){
if (arr[i]>arr[i+1]){
swap(arr, i, i+1);
swapHappenedLastTime = true;
}
}
}
return arr;
}
*/
function merge (array1, array2){
var result = [];
var lengthy;
while(array1.length>0 && array2.length>0){
if (array1[0]<array2[0]){
result.push(array1[0]);
array1.shift();
}
else{
result.push(array2[0]);
array2.shift();
}
}
if (array1.length>0){
result = result.concat(array1);
} else if (array2.length>0){
result = result.concat(array2);
}
//console.log(result);
return result;
}
/*
function merge (left, right){
var merged = [];
//for (var i =0; i<left.length; i++){
// if (left[i]<right[i])
// merged.push(left[i], right[i]);
// else
// merged.push(right[i], left[i]);
//}
var leftIndex = 0;
var rightIndex = 0;
while (leftIndex<left.length || rightIndex < right.length){
if (left[leftIndex]<right[rightIndex] || right[rightIndex] === undefined){
merged.push(left[leftIndex]);
leftIndex++;
} else{
merged.push(right[rightIndex]);
rightIndex++;
}
}
return merged;
}
OR:
var merged = [];
while (left.length && right.length){
if (left[0]<right[0])
merged.push(left.shift());
else
merged.push(right.shift());
}
return merged.concat(left).concat(right);
*/
function split(wholeArray) {
/* your code here to define the firstHalf and secondHalf arrays */
if (wholeArray.length == 1){
return wholeArray;
}
if (wholeArray === undefined){
return 0;
}
var midPoint = (wholeArray.length)/2; // what about odd numbers? if there is a value when you mod, check which one is larger and add to it
var firstHalf = wholeArray.slice(0, midPoint);
var secondHalf = wholeArray.slice(midPoint); // should take the remaining odd number?
/*console.log("left " + firstHalf);
console.log("right " + secondHalf);
console.log([firstHalf, secondHalf]);*/
return [firstHalf, secondHalf];
}
/*
function halve (arr){
var left = [], right = [];
//for (var i = 0; i<arr.length/2; i++){
// left.push(arr[i]);
//}
//for (var =arr.length/2; i<arr.length; i++){
// right.push(arr[i]);
//}
var middle = arr.length/2;
left = arr.slice(0, middle);
right = arr.slice(middle);
return [left, right];
}
*/
function mergeSort(array) {
if (array.length == 1 || array.length == 0)
return array;
if (array === undefined)
return [];
//var a = split([1,2]);
//console.log(a[0][0]);
//console.log(a[0].length);
/*console.log("input array " + array);
var result = split(array);
console.log("Result after first split: " + result);
console.log("Result 0: " + result[0]);
console.log("Result 1: " + result[1]);
var a = split(result[0])
var b = split(result[1])
console.log("split a 0: " + a[0]);
console.log("split a 1: " + a[1]);
console.log("split b 0: " + b[0]);
console.log("split b 1: " + b[1]);
result.push(a);
result.shift();
console.log("new result: " + result);*/
var tempArray = split(array);
var finalArray = [];
if (tempArray[0].length===1){
for (var i=1; i<tempArray.length; i++){
var temp = merge(tempArray[i-1], tempArray[i]);
finalArray[i-1] = temp[0];
finalArray[i] = temp[1];
}
} else if (tempArray[0].length===2){
// split until single digits
// then run merge
var newArray = split(tempArray[0]);
newArray = newArray.concat(split(tempArray[1]));
console.log("newArray: " + newArray);
for (var i=1; i<newArray.length; i++){
console.log("i-1 " + tempArray[i-1]);
console.log("i " + tempArray[i]);
var temp = merge(tempArray[i-1], tempArray[i]);
finalArray[i-1] = temp[0];
finalArray[i] = temp[1];
}
/*
for (var i=1; i<tempArray.length; i++){
console.log("i-1 " + tempArray[i-1]);
console.log("i " + tempArray[i]);
var temp = merge(tempArray[i-1], tempArray[i]);
finalArray[i-1] = temp[0];
finalArray[i] = temp[1];
}*/
}
/* while (result[0].length>1){
for (var i=0; i<result.length; i++){
result.push(split(result[i]));
result.shift;
}
} */
return finalArray;
}
/*
function mergeSort(unsorted){
if (unsorted.length<2){
return unsorted;
}
var halves = halve(unsorted); // split into two halves
var left = halves[0];
var right = halves[1];
var sortedLeft = mergeSort(left); // run mergeSort on each
var sortedRight = mergeSort(right);
return merge(sortedLeft, sortedRight); // return the merged halves
}
*/
|
Java | UTF-8 | 1,524 | 2.46875 | 2 | [] | no_license | package com.flybutter.consumer.model.vo;
public class Consumer {
private int user_No;
private String new_Address;
private String rec_Pno;
private String user_Cel;
private int money;
private int sum_Price;
public Consumer() {
}
public Consumer(int user_No, String new_Address, String rec_Pno, String user_Cel, int money, int sum_Price) {
super();
this.user_No = user_No;
this.new_Address = new_Address;
this.rec_Pno = rec_Pno;
this.user_Cel = user_Cel;
this.money = money;
this.sum_Price = sum_Price;
}
public int getUser_No() {
return user_No;
}
public void setUser_No(int user_No) {
this.user_No = user_No;
}
public String getNew_Address() {
return new_Address;
}
public void setNew_Address(String new_Address) {
this.new_Address = new_Address;
}
public String getRec_Pno() {
return rec_Pno;
}
public void setRec_Pno(String rec_Pno) {
this.rec_Pno = rec_Pno;
}
public String getUser_Cel() {
return user_Cel;
}
public void setUser_Cel(String user_Cel) {
this.user_Cel = user_Cel;
}
public int getMoney() {
return money;
}
public void setMoney(int money) {
this.money = money;
}
public int getSum_Price() {
return sum_Price;
}
public void setSum_Price(int sum_Price) {
this.sum_Price = sum_Price;
}
@Override
public String toString() {
return "Consumer [user_No=" + user_No + ", new_Address=" + new_Address + ", rec_Pno=" + rec_Pno + ", user_Cel="
+ user_Cel + ", money=" + money + ", sum_Price=" + sum_Price + "]";
}
}
|
Java | UTF-8 | 1,818 | 3.453125 | 3 | [] | no_license | package com.example.myapplication.bonuslevel;
import java.util.Random;
/** class Bonus Level Interactor */
class BonusLevelInteractor {
/** interface onValidateNumberListener */
interface OnValidateNumberListener {
/** method when number is too high */
void onNumberToHigh();
/** method when number is too low */
void onNumberToLow();
/**
* method when game ended
*
* @param isWon boolean indicating if the bonus game is won or not.
* @param bonusScore the bonus score earned.
*/
void onGameEnd(boolean isWon, int bonusScore);
}
/** attribute that saves the target number to be guessed */
private int targetNum;
/** attribute that saves the number of tries left */
private int triesLeft = 5;
/**
* method that return the number of tries left
*
* @return number of tries left
*/
int getTriesLeft() {
return triesLeft;
}
/** Constructor method of BonusLevelInteractor */
BonusLevelInteractor() {
createRanNum();
}
/** Method that creates a random number between 1 and 20 that needs to be */
private void createRanNum() {
final int min = 1;
final int max = 20;
targetNum = new Random().nextInt((max - min) + 1) + min;
}
/**
* Method to validate whether the number is correct or not
*
* @param guessedNumber: the guessed number
* @param listener: The bonus level presenter
*/
void validateNumberInteractor(int guessedNumber, OnValidateNumberListener listener) {
if (guessedNumber == targetNum) {
listener.onGameEnd(true, 100);
} else if (guessedNumber > targetNum) {
triesLeft--;
listener.onNumberToHigh();
} else {
triesLeft--;
listener.onNumberToLow();
}
if (triesLeft == 0) {
listener.onGameEnd(false, 0);
}
}
}
|
C++ | UTF-8 | 373 | 3.375 | 3 | [] | no_license | #include <iostream>
using namespace std;
class unar{
int x,y;
public:
void set_value()
{
cin>>x>>y;
}
void display()
{
cout<<x<<endl<<y<<endl;
}
void operator -()
{
x--;
y--;
}
};
int main()
{
unar link;
link.set_value();
link.display();
-link;
link.display();
return 0;
}
|
Java | UTF-8 | 622 | 1.976563 | 2 | [] | no_license | package com.ba.mapper;
import com.ba.dto.TableCategoryDTO;
import com.ba.entity.TableCategory;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper(componentModel = "spring")
public interface TableCategoryMapper {
// TableCategoryMapper INSTANCE = Mappers.getMapper(TableCategoryMapper.class);
TableCategory toEntity(TableCategoryDTO tableCategoryDTO);
TableCategoryDTO toDTO(TableCategory tableCategory);
List<TableCategory> toList(List<TableCategoryDTO> tableCategoryDTOList);
List<TableCategoryDTO> toDTOList(List<TableCategory> tableCategoryList);
}
|
Java | UTF-8 | 771 | 3.203125 | 3 | [] | no_license | /**
*
*/
package com.ocajp8.ch2.types;
/**
* @author Yashwanth
*
*/
public class DataTypes {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
char character ='1';
byte byteValue=1;
short integer =1;
int intValue =1;
long longValue =1L;
float floatValue =1;
double doubelValue = 1;
boolean boolValue = false;
long x = 10;
int y=2;
System.out.println(" Character ="+character+
"\n ByeValue = "+byteValue+
"\n Short Value="+integer+
"\n Interger Value ="+intValue+
"\n Long Value ="+longValue+
"\n Float Value ="+floatValue+
"\n Double Value ="+doubelValue+
"\n Boolean Value ="+boolValue);
y*=x;
boolean z=x==10;
System.out.println(y+"\n"+z);
}
}
|
C++ | UTF-8 | 4,218 | 3.015625 | 3 | [
"BSD-3-Clause"
] | permissive | #ifndef DOUBLE_INTEGRATOR_MINIMUM_TIME_H_
#define DOUBLE_INTEGRATOR_MINIMUM_TIME_H_
// Standard libarary
#include <iostream>
#include <utility> // std::pair
#include <limits> // std::numeric_limits::infinity()
#include <algorithm> // std::max and std::min
#include <vector> // std::vector
#include <chrono>
#include <memory>
#include <Eigen/Dense>
#include "Dimt/Params.h"
#include <ompl/base/spaces/RealVectorStateSpace.h>
class DoubleIntegratorImpl
{
public:
virtual double getMinTime(const ompl::base::State* x1, const ompl::base::State* x2) = 0;
virtual std::tuple<double, double, double>
getMinTimeAndIntervals1Dof(const double x1, const double v1,
const double x2, const double v2,
int dof_index = 0) = 0;
virtual void interpolate(const ompl::base::State* x1, const ompl::base::State* x2,
double t, ompl::base::State* x) = 0;
virtual double getMinTimeIfSmallerThan(const ompl::base::State* x1, const ompl::base::State* x2,
double timeThreshold) = 0;
virtual double getMinTime(const Eigen::VectorXd & x1, const Eigen::VectorXd & x2) = 0;
virtual Eigen::VectorXd interpolate(const Eigen::VectorXd & x1, const Eigen::VectorXd & x2,
double t) = 0;
virtual std::vector<Eigen::VectorXd> discretize(const ompl::base::State* x1, const ompl::base::State* x2, double step_t) = 0;
virtual std::vector<Eigen::VectorXd> discretize(const Eigen::VectorXd & x1, const Eigen::VectorXd & x2, double step_t) = 0;
};
class DoubleIntegratorMinimumTime
{
private:
std::shared_ptr<DoubleIntegratorImpl> doubleIntegratorImpl_;
public:
///
/// Constructor
///
/// @param maxAccelerations Max accelerations of all DOFs
/// @param maxVelocities Velocity limits of all DOFs
///
DoubleIntegratorMinimumTime(std::vector<double>& maxAccelerations,
std::vector<double>& maxVelocities);
/// This function calculates the maximum time given a set number of joints
/// x = [x_1, x_1_dot,...,x_n,x_n_dot]
/// @param x1 Initial state
/// @param x2 Final state
/// @return T Maximum time
double getMinTime(const ompl::base::State* x1, const ompl::base::State* x2) const
{
return doubleIntegratorImpl_->getMinTime(x1, x2);
}
std::tuple<double, double, double>
getMinTimeAndIntervals1Dof(const double x1, const double v1,
const double x2, const double v2,
int dof_index = 0) const
{
return doubleIntegratorImpl_->getMinTimeAndIntervals1Dof(x1,v1,
x2,v2,
dof_index);
}
double getMinTimeIfSmallerThan(const ompl::base::State* x1, const ompl::base::State* x2, double timeThreshold) const
{
return doubleIntegratorImpl_->getMinTimeIfSmallerThan(x1, x2, timeThreshold);
}
void interpolate(const ompl::base::State* x1, const ompl::base::State* x2,
double t, ompl::base::State* x) const
{
return doubleIntegratorImpl_->interpolate(x1, x2, t, x);
}
std::vector<Eigen::VectorXd> discretize(const ompl::base::State* x1, const ompl::base::State* x2, double step_t)
{
return doubleIntegratorImpl_->discretize(x1, x2, step_t);
}
double getMinTime(const Eigen::VectorXd & x1, const Eigen::VectorXd & x2)
{
return doubleIntegratorImpl_->getMinTime(x1, x2);
}
Eigen::VectorXd interpolate(const Eigen::VectorXd & x1, const Eigen::VectorXd & x2,
double t)
{
return doubleIntegratorImpl_->interpolate(x1, x2, t);
}
std::vector<Eigen::VectorXd> discretize(const Eigen::VectorXd & x1, const Eigen::VectorXd & x2, double step_t)
{
return doubleIntegratorImpl_->discretize(x1, x2, step_t);
}
};
using DIMT = DoubleIntegratorMinimumTime;
using DIMTPtr = std::shared_ptr<DoubleIntegratorMinimumTime>;
#endif // DOUBLE_INTEGRATOR_MINIMUM_TIME_H_
|
Java | UTF-8 | 562 | 1.75 | 2 | [] | no_license | package com.itcast.test;
import javax.annotation.Resource;
import org.hibernate.SessionFactory;
import org.hibernate.classic.Session;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("testService")
public class testService1 {
@Resource
private SessionFactory sessionFactory;
@Transactional
public void saveTwoUsers()
{
Session session = sessionFactory.getCurrentSession();
session.save(new User());
// int a=1/0;
session.save(new User());
}
}
|
Java | UTF-8 | 998 | 1.90625 | 2 | [] | no_license | package com.litesite.dal;
import org.springframework.jdbc.core.RowMapper;
import javax.sql.DataSource;
import io.github.huherto.springyRecords.BaseRecord;
import io.github.huherto.springyRecords.BaseTable;
import io.github.huherto.springyRecords.RecordMapper;
/**
* BaseBlcOrderAdjustmentTable –
* Automatically generated. Do not modify or your changes might be lost.
*/
public class BaseBlcOrderAdjustmentTable extends BaseTable<BlcOrderAdjustmentRecord> {
private RowMapper<BlcOrderAdjustmentRecord> rm = RecordMapper.newInstance(BlcOrderAdjustmentRecord.class);
public BaseBlcOrderAdjustmentTable(DataSource dataSource) {
super(dataSource);
}
@Override
protected RowMapper<BlcOrderAdjustmentRecord> rowMapper() {
return rm;
}
@Override
public String tableName() {
return "BLC_ORDER_ADJUSTMENT";
}
@Override
public Class<? extends BaseRecord> recordClass() {
return BlcOrderAdjustmentRecord.class;
}
}
|
Java | UTF-8 | 622 | 2.125 | 2 | [] | no_license | package ua.dp.renessans.model.manager;
import java.util.List;
import ua.dp.renessans.model.entity.Album;
public interface AlbumManager {
void addAlbum(Album galleryAlbum) throws ManagerException;
void deleteAlbum(int albumId) throws ManagerException;
void setCoverImage(int albumId, String coverName) throws ManagerException;
List<Album> getAllAlbums() throws ManagerException;
Album getAlbumById(int id) throws ManagerException;
void updateAlbumDescription(int albumId, String newDescription) throws ManagerException;
void updateAlbumCoverName(int albumId, String newCoverName) throws ManagerException;
}
|
Python | UTF-8 | 4,646 | 3.46875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/python3
"""
Module for class Base
"""
import json
import csv
class Base:
"""
Class Base
"""
""" Private class attribute """
__nb_objects = 0
def __init__(self, id=None):
"""
Class constructor method
Args:
id (int): The id for the Base class
"""
if id is None:
Base.__nb_objects += 1
self.id = Base.__nb_objects
else:
self.id = id
@staticmethod
def to_json_string(list_dictionaries):
"""
Return the JSON serialization of a list of dicts.
Args:
list_dictionaries (list): A list of dictionaries.
"""
if list_dictionaries is None or list_dictionaries == []:
return "[]"
return json.dumps(list_dictionaries)
@classmethod
def save_to_file(cls, list_objs):
"""
Write the JSON serialization of a list of objects to a file.
Args:
list_objs (list): A list of inherited Base instances.
"""
filename = cls.__name__ + ".json"
with open(filename, "w") as jsonfile:
if list_objs is None:
jsonfile.write("[]")
else:
list_dicts = [o.to_dictionary() for o in list_objs]
jsonfile.write(Base.to_json_string(list_dicts))
@staticmethod
def from_json_string(json_string):
"""
Return the deserialization of a JSON string.
Args:
json_string (str): A JSON str representation of a list of dicts.
Returns:
If json_string is None or empty - an empty list.
Otherwise - the Python list represented by json_string.
"""
if json_string is None or json_string == "[]":
return []
return json.loads(json_string)
@classmethod
def create(cls, **dictionary):
"""
Return a class instantied from a dictionary of attributes.
Args:
**dictionary (dict): Key/value pairs of attributes to initialize.
"""
if dictionary and dictionary != {}:
if cls.__name__ == "Rectangle":
new = cls(1, 1)
else:
new = cls(1)
new.update(**dictionary)
return new
@classmethod
def load_from_file(cls):
"""
Return a list of classes instantiated from a file of JSON strings.
Reads from `<cls.__name__>.json`.
Returns:
If the file does not exist - an empty list.
Otherwise - a list of instantiated classes.
"""
filename = str(cls.__name__) + ".json"
try:
with open(filename, "r") as jsonfile:
list_dicts = Base.from_json_string(jsonfile.read())
return [cls.create(**d) for d in list_dicts]
except IOError:
return []
@classmethod
def save_to_file_csv(cls, list_objs):
"""
Write the CSV serialization of a list of objects to a file.
Args:
list_objs (list): A list of inherited Base instances.
"""
filename = cls.__name__ + ".csv"
with open(filename, "w", newline="") as csvfile:
if list_objs is None or list_objs == []:
csvfile.write("[]")
else:
if cls.__name__ == "Rectangle":
fieldnames = ["id", "width", "height", "x", "y"]
else:
fieldnames = ["id", "size", "x", "y"]
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
for obj in list_objs:
writer.writerow(obj.to_dictionary())
@classmethod
def load_from_file_csv(cls):
"""
Return a list of classes instantiated from a CSV file.
Reads from `<cls.__name__>.csv`.
Returns:
If the file does not exist - an empty list.
Otherwise - a list of instantiated classes.
"""
filename = cls.__name__ + ".csv"
try:
with open(filename, "r", newline="") as csvfile:
if cls.__name__ == "Rectangle":
fieldnames = ["id", "width", "height", "x", "y"]
else:
fieldnames = ["id", "size", "x", "y"]
list_dicts = csv.DictReader(csvfile, fieldnames=fieldnames)
list_dicts = [dict([k, int(v)] for k, v in d.items())
for d in list_dicts]
return [cls.create(**d) for d in list_dicts]
except IOError:
return []
|
JavaScript | UTF-8 | 2,837 | 2.8125 | 3 | [] | no_license | import React from 'react';
import logo from './logo.svg';
import './App.css';
import User from './User'
const movies = [
{ title: "The Godfather", director: "Francis Coppola" },
{ title: "Star Wars", director: "Rian Johnson" },
{ title: "The Shawshank Redemption", director: "Frank Darabont" }
]
class App extends React.Component {
state = {
counter:0,
loggedIn: false,
color: null,
movies: movies,
filteredMovies: movies
};
iClickedThisButton = (e) => {
console.log("CLICKED", this)
let color = "#"+((1<<24)*Math.random()|0).toString(16);
///document.querySelector('button').click = function(e){}
this.setState({
counter : this.state.counter+1,
loggedIn : !this.state.loggedIn,
color
}, function(){
console.log('call back when state is done updating', this.state.color) //setState is asynchronous
})
console.log(this.state.color) //dont reference state after immediately setting it.
}
deleteMovie = (j) => {
let moviesCopy = [ ... this.state.movies ]
moviesCopy.splice(j,1)
this.setState( {
movies: moviesCopy
} )
}
loopThroughMovies = () => {
let moviesCopy = this.state.filteredMovies.map((film, i)=>{
return (
<li key={i} style={{color:this.state.color, transform:`scale(1.0${this.state.counter})`}}>
{film.title}
<button onClick={ () => { this.deleteMovie(i) } } >
Delete
</button>
</li>
)
})
return moviesCopy
}
filterMovies = (e) => {
let filteredMovies = this.state.movies.filter((film)=>{
return film.title.includes(e.target.value)
})
this.setState({
filteredMovies
})
}
render() {
// ...
return (
<div className="App">
Show me a list of movies:
<input name="movies" onChange={this.filterMovies} type="text"></input> {/** To search the movies **/}
{ this.state.loggedIn ? this.loopThroughMovies() : 'sorry please log in' /**Loops through filtered movies and shows them */}
<p></p>
<button style={{backgroundColor:this.state.color}} onClick={this.iClickedThisButton} >Click me Do Something</button>
<p>{this.state.counter} </p>
<p> { Date.now() } </p>
</div>
);
}
}
export default App;
// userA: {
// firstName: "Harper",
// lastName: "Perez",
// avatarUrl:
// "https://www.refreshmiami.com/wp-content/uploads/2018/07/55085_logo-ironhack.png"
// },
// userB: {
// firstName: "Ana",
// lastName: "Hello",
// avatarUrl:
// "https://s3.amazonaws.com/owler-image/logo/ironhack_owler_20180828_221413_original.png"
// }
// {/* <User firstName={this.state.userA.firstName} pic={this.state.userA.avatarUrl}/> */}
// {/* <User firstName={this.state.userB.firstName} /> */} |
Java | UTF-8 | 975 | 2.09375 | 2 | [] | no_license | package controller.admin;
import bean.info.OrganizationBean;
import utils.JsonUtils;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet(value = {"/OrgaPaneInit"})
public class OrgaPaneInitServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
OrganizationBean orgaInfo = (OrganizationBean)request.getSession().getAttribute("orgaInfo");
if (orgaInfo == null){
response.sendError(403);
}else {
JsonUtils.returnJson(response, orgaInfo);
}
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
}
}
|
JavaScript | UTF-8 | 2,828 | 2.828125 | 3 | [] | no_license | import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
selectAdjacent,
selectReserveNumber,
selectSeats,
setProposedSeats,
toggleProposed,
} from '../../Redux/seatsSlice';
const useSeatsProposer = () => {
// Redux state ref
const adjacentSeats = useSelector(selectAdjacent);
const reserveNumber = useSelector(selectReserveNumber);
const seats = useSelector(selectSeats);
const dispatch = useDispatch();
// Local State
const [result, setResult] = useState(null);
const [message, setMessage] = useState(null);
const freeSeats = seats.filter((seat) => !seat.reserved);
const updateStates = (resultValue, messageValue) => {
setResult(resultValue);
setMessage(messageValue);
};
const proposeEmptySeats = () => {
let seatsNumber = reserveNumber;
const selectedSeats = [];
if (reserveNumber > freeSeats.length) {
seatsNumber = freeSeats.length;
updateStates(
'warning',
'Brak wystarczającej ilości wolnych miejsc, wybrano maksymalną ilość'
);
}
for (let i = 0; i < seatsNumber; i += 1) {
selectedSeats.push(freeSeats[i]);
}
return selectedSeats;
};
const proposeAdjacentSeats = () => {
// Set initial values
const selectedSeats = [];
let selectedIndex = 0;
let firstElement = true;
// Iterate over all free seats to obtain array with adjacent seats
for (let i = 0; i < freeSeats.length; i += 1) {
if (selectedSeats.length >= reserveNumber) break;
// If there are no elements in array, push first element to compare it with next element
if (firstElement) {
selectedSeats.push(freeSeats[i]);
firstElement = false;
continue;
}
if (freeSeats[i].cords.y - selectedSeats[selectedIndex].cords.y === 1) {
selectedSeats.push(freeSeats[i]);
selectedIndex += 1;
} else {
selectedSeats.length = 0;
firstElement = true;
selectedIndex = 0;
i -= 1;
}
}
return selectedSeats;
};
const applyProposedSeats = (proposedSeats) => {
proposedSeats.forEach((seat) => {
dispatch(toggleProposed(seat.id));
});
dispatch(setProposedSeats());
};
useEffect(() => {
updateStates('success', 'Wybrano wolne miejsca');
let proposedSeats = null;
if (adjacentSeats) {
proposedSeats = proposeAdjacentSeats();
if (proposedSeats.length < reserveNumber) {
updateStates(
'error',
`Nie znaleziono ${reserveNumber} wolnych miejsc obok siebie`
);
return;
}
} else {
proposedSeats = proposeEmptySeats();
}
applyProposedSeats(proposedSeats);
}, []);
return {
result,
message,
};
};
export default useSeatsProposer;
|
SQL | UHC | 343 | 3.09375 | 3 | [] | no_license | --
CREATE USER khlove1
IDENTIFIED BY khlove1;
-- ο
GRANT connect TO khlove1;
-- khlove1 kh ִ
-- COFFEE ̺ ˻(SELECT) ִ
-- ο
GRANT SELECT ON kh.COFFEE TO khlove1;
GRANT INSERT ON kh.COFFEE TO khlove1;
REVOKE SELECT,INSERT ON kh.COFFEE FROM khlove1; |
SQL | UTF-8 | 136,610 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive |
--
-- TOC entry 2172 (class 0 OID 78993)
-- Dependencies: 163
-- Data for Name: culture_keyword; Type: TABLE DATA; Schema: public; Owner: tdar
--
COPY culture_keyword (id, definition, label, approved, index, selectable, parent_id) FROM stdin;
42 4201 Jewish f 4.2 t 4
43 Peoples of the Sudan f 4.3 t 4
49 Other North African and Middle Eastern f 4.4 t 4
51 Mainland South-East Asian f 5.1 t 5
52 Maritimme South-East Asian f 5.2 t 5
61 Chinese Asian f 6.1 t 6
2103 Affiliation with British people born or raised in Wales (ASCCEG 2103) Welsh t 2.1.3 t 21
69 Other North-East Asian f 6.2 t 6
71 Southern Asian f 7.1 t 7
72 Central Asian f 7.2 t 7
91 Central and West African f 9.1 t 9
92 Southern and East African f 9.2 t 9
23 Austrian, Dutch, Flemish, French, German, SwissBelgian and other groups (ASCCEG 23) Western European t 2.3 t 2
24 Danish, Finnish, Icelandic, Norwegian, Swedish (ASCCEG 24) Northern European t 2.4 t 2
31 Italian, Portuguese, Spanish among others (ASCCEG 31) Southern European t 3.1 t 3
32 Albanian, Bosnian, Greek and other groups (ASCCEG 32) South Eastern European t 3.2 t 3
33 Czechoslovakian, Polish, Russian and other groups (ASCCEG 33) Eastern European t 3.3 t 3
4 Includes Arab ethnic groups (Algerian, Egyptian, Iraqi among others), Jewish, Peoples of the Sudan, Turkish, Coptic, Assyrian and other groups (ASCCEG 4) North African and Middle Eastern t 4 t \N
5 Burmese, Thai, Cambodian, Indonesian and others (ASCCEG 5) South-East Asian t 5 t \N
6 Chinese, Taiwanese, Japanese, Korean and others(ASCCEG 6) North-East Asian t 6 t \N
7 Indian, Sri Lankan, Pakistani, Afghani and others (ASCCEG 7) Southern and Central Asian t 7 t \N
1 Oceania t 1 t \N
2 North-West European t 2 t \N
3 Southern and Eastern European t 3 t \N
8 People of the Americas t 8 t \N
11 Australian Peoples t 1.1 t 1
12 New Zealand Peoples t 1.2 t 1
13 Melanesian and Papuan f 1.3 t 1
14 Micronesian f 1.4 t 1
15 Polynesian f 1.5 t 1
21 British t 2.1 t 2
1101 Includes affiliation with present day and colonial (pre-1901) Australian culture (ASCCEG 1101, as adapted by AHAD) Australian t 1.1.1 t 11
1102 Includes affiliation with Aboriginal peoples throughout Australia (ASCCEG 1102) Australian Aboriginal t 1.1.2 t 11
1103 Includes affiliation with South Sea Islander people throughout Australia (ASCCEG 1103) South Sea Islanderr t 1.1.3 t 11
1104 Includes affiliation with Torres Strait Islander people (ASCCEG 1104) Torres Strait Islander t 1.1.4 t 11
1201 Includes affiliation with all Maori people through New Zealand (ASCCEG 1201) Maori t 1.2.1 t 12
1202 Includes affiliation with present day and colonial (pre-1907) New Zealand culture (ASCCEG 1202, as adapted by AHAD) New Zealander t 1.2.2 t 12
81 American, Canadian, French Canadian, African American, Hispanic (North American), Native North American Indian, Bermudan (ASCCEG 81) North America t 8.1 t 8
9 Includes Central, West, South and East African ethnic groups (ASCCEG 9) Sub-Saharan African t 9 t \N
2101 Affiliation with British people born or raised in England (ASCCEG 2101) English t 2.1.1 t 21
2102 Affiliation with British people born or raised in Scotland (ASCCEG 2102) Scottish t 2.1.2 t 21
22 Affiliation with British people born or raised in Ireland (ASCCEG 22, as adapted by AHAD) Irish t 2.2 t 2
82 Argentinian, Bolivian, Brazilian, Chilean, Colombian, Ecuadorian, Peruvian, Uruguayan, Venezuelan and other groups (ASCCEG 82) South American t 8.2 t 8
83 Mexican, Nicaraguan, Salvadorian, Costa Rican, Guatemalan, Mayan, and other groups (ASCCEG 83) Central American t 8.3 t 8
41 Arab f 4.1 t 4
84 Cuban, Jamaican, Tobagonian, Puerto Rican and other groups (ASCCEG 84) Carribean Islander t 8.4 t 8
\.
--
-- TOC entry 2173 (class 0 OID 79050)
-- Dependencies: 176
-- Data for Name: geographic_keyword; Type: TABLE DATA; Schema: public; Owner: tdar
--
COPY geographic_keyword (id, definition, label, level) FROM stdin;
1 \N Andes \N
2 \N Arizona \N
3 \N Basin of Mexico \N
4 \N Bolivia \N
5 \N Cape Cod \N
6 \N Central Mexico, Otumba \N
7 \N Central Mexico, Teotihuacan Valley \N
8 \N Cibola \N
9 \N Eastern Mimbres \N
10 \N Eastham \N
11 \N El Morro Valley \N
12 \N G1 \N
13 \N G2 \N
14 \N Green County, Illinois \N
15 \N Hohokam \N
16 \N Kalahari Desert \N
17 \N Lake Titicaca \N
18 \N Lyman Lake State Park \N
19 \N Mesoamerican Northern Periphery \N
20 \N Mimbres Valley \N
21 \N New Mexico \N
22 \N North America \N
23 \N North Truro \N
24 \N North West Mexico \N
25 \N Norway \N
26 \N Outer Cape Cod \N
27 \N Phoenix Basin \N
28 \N Provincelands \N
29 \N Provincetown \N
30 \N Rio Grande \N
31 \N Salinas \N
32 \N Section 21, T 9 N, R 13 W Greene County in the lower Illinois Valley \N
33 \N South America \N
34 \N South-Central Andes \N
35 \N Southeastern Massachusetts \N
36 \N Southern New England \N
37 \N Taraco Peninsula \N
38 \N The United States \N
39 \N Titicaca Basin \N
40 \N Truro \N
41 \N Upper Gila \N
42 \N U.S. Midwest \N
43 \N U.S. Southwest \N
44 \N Valley of Mexico \N
45 \N Wellfleet \N
46 \N Zuni Indian Reservation \N
47 \N \N
48 \N New England \N
49 \N Eastern Canada \N
50 \N Cape Cod National Seashore \N
51 \N Barnstable County \N
52 \N Nauset Marsh \N
53 \N Zuni \N
54 \N Upper Little Colorado River \N
55 \N Eats Yorkshire \N
56 \N East Yorkshire \N
57 \N Alexandria, Virginia \N
58 \N New Philadelphia, Pike County, Illinois \N
59 \N Tierra Firma \N
60 \N Castilla de Oro \N
61 \N Mesoamerica \N
62 \N Chiriquí \N
63 \N Panama \N
64 \N Barú volcano \N
65 \N Talamanca Cordillera \N
66 \N Bay of Chiriquí \N
67 \N Pacific Ocean \N
68 \N New World \N
69 \N New York City Port \N
70 \N Isthmus of Panamá \N
71 \N California \N
72 \N Terraba \N
73 \N Boruca \N
74 \N Santiago de Veraguas \N
75 \N Panamá City \N
76 \N City of David \N
77 \N City of Gold \N
78 \N twentieth century \N
79 \N Boquete \N
80 \N Barú region \N
81 \N Chiriquí Province \N
82 \N Rincon Mountains \N
83 \N Pima County \N
84 \N Chiricahua Mountains \N
85 \N Sulphur Springs Valley \N
86 \N Wawona Valley \N
87 \N Meso America \N
88 \N Death Valley \N
89 \N Nevada \N
90 \N Molokai \N
91 \N Hawaii \N
92 \N Tonto Basin \N
93 \N Mohave Desert \N
94 \N Big Island \N
95 \N Upper Gila River \N
96 \N Walnut Canyon \N
97 \N Coconino County \N
98 \N Verde Valley \N
99 \N Yavapai County \N
100 \N Lake Mead \N
101 \N Mariana Islands \N
102 \N Commonwealth of the Northern Marianas \N
103 \N Micronesia \N
104 \N Pacific \N
105 \N Commonwealth of the Northern Mariana Islands \N
106 \N Snake Valley \N
107 \N Northern Belize \N
108 \N Shivwits Plateau \N
109 \N Inyo County \N
110 \N Owens Valley \N
111 \N Black Canyon \N
112 \N Montrose County \N
113 \N Colorado \N
114 \N Tucson Mountains \N
115 \N Eureka Valley \N
116 \N Idaho \N
117 \N Glen Canyon \N
118 \N Black Kettle National Grassland \N
119 \N Roger Mills County \N
120 \N Oklahoma \N
121 \N Scotty's Castle \N
122 \N Tie Canyon \N
123 \N Johnson Canyon \N
124 \N Grand Canyon \N
125 \N Lower Salt River \N
126 \N Phoenix \N
127 \N Salt River \N
128 \N Mesa Verde \N
129 \N New World \N
130 \N Greene County \N
131 \N Calhoun County \N
132 \N Illinois \N
133 \N Massachusetts \N
134 \N Mexico \N
135 \N Central Mexico \N
136 \N West Mexico \N
137 \N US Southwest \N
138 \N Eastern North America \N
139 \N Eastern Woodlands \N
140 \N US Plains \N
141 \N US Southeast \N
142 \N US Midwest \N
143 \N Yucatan Peninsula \N
144 \N Greater Southwest \N
145 \N Southern Maya Lowlands \N
146 \N Mogollon \N
147 \N Anasazi \N
148 \N Northern Mexico \N
149 \N American Southwest \N
150 \N American Southeast \N
151 \N US Eastern Woodlands \N
152 \N US Great Plains \N
153 \N Gulf Coast \N
154 \N Teotihuacan Valley \N
155 \N Chiapas \N
156 \N Soconusco region \N
157 \N Pacific coast of Guatemala \N
158 \N Pacific coast of Chiapas \N
159 \N Southern Gulf Lowlands \N
160 \N Puebla \N
161 \N Tuxcala \N
162 \N Mohawk Valley \N
163 \N Northeastern North America \N
164 \N Tlaxcala \N
165 \N Arkansas \N
166 \N Wisconsin \N
167 \N Minnesota \N
168 \N Missouri \N
169 \N Tennessee \N
170 \N Spiro \N
171 \N Cahokia \N
172 \N Georgia \N
173 \N Etowah \N
174 \N New York \N
175 \N Manhattan \N
176 \N Greenland \N
177 \N Iceland \N
178 \N Shetland Islands \N
179 \N Alabama \N
180 \N Mussel Shoals \N
181 \N Southeast \N
182 \N Aztalan \N
183 \N St. Louis \N
184 \N Florida \N
185 \N Jacksonville \N
186 \N Iowa County \N
187 \N St. Clair County \N
188 \N Pike County \N
189 \N Fulton County \N
190 \N Midwest \N
191 \N Iowa \N
192 \N De Soto Parish \N
193 \N Louisiana \N
194 \N Pierce County \N
195 \N Middle Mississippian \N
196 \N southeast \N
197 \N midwest \N
198 \N Union County \N
199 \N Southwest Wisconsin \N
200 \N Illlinois \N
201 \N Picture Cave \N
202 \N Teotihuacan \N
203 \N Dunklin County \N
204 \N Mississippi River \N
205 \N Muscatine Slough \N
214 \N bolivia \N
215 \N andes \N
216 \N titicaca basin \N
217 \N altiplano \N
218 \N taraco peninsula \N
219 \N lower Verde River \N
220 \N central Arizona \N
221 \N southern Arizona \N
222 \N Verde River \N
223 \N Tonto National Forest \N
224 \N Agua Fria River \N
225 \N Prescott area \N
226 \N Payson area \N
227 \N Perry Mesa \N
229 \N Middle Verde Valley, Arizona \N
230 \N middle Verde Valley, Arizona \N
231 \N northern Southwest \N
232 \N Agua Fria National Monument \N
233 \N Fort Apache Reservation \N
234 \N San Carlos Reservation \N
235 \N Fort McDowell Reservation \N
236 \N Yavapai Apache Reservation \N
237 \N Yavapai Prescott Reservation \N
238 \N Tonto Apache Reservation \N
239 \N Horseshoe Basin \N
240 \N Ister Flat \N
241 \N Mullen Mesa \N
242 \N Lime Creek area \N
243 \N McCoy Mesa \N
244 \N Davenport Wash area \N
245 \N Gila County (County) COUNTY
246 \N Midland County (County) COUNTY
247 \N Cibola County (County) COUNTY
248 \N Menard County (County) COUNTY
249 \N Tamaulipas (State / Territory) STATE
250 \N El Paso County (County) COUNTY
251 \N Eddy County (County) COUNTY
252 \N Eastland County (County) COUNTY
253 \N Socorro County (County) COUNTY
254 \N King County (County) COUNTY
255 \N McKinley County (County) COUNTY
256 \N Upton County (County) COUNTY
257 \N Nolan County (County) COUNTY
258 \N Comal County (County) COUNTY
259 \N MX (ISO Country Code) ISO_COUNTRY
260 \N Coahuila (State / Territory) STATE
261 \N Mason County (County) COUNTY
262 \N Archer County (County) COUNTY
263 \N Beckham County (County) COUNTY
264 \N Hidalgo (State / Territory) STATE
265 \N Winkler County (County) COUNTY
266 \N Haskell County (County) COUNTY
267 \N Brewster County (County) COUNTY
268 \N Kimble County (County) COUNTY
269 \N Cochran County (County) COUNTY
270 \N Dawson County (County) COUNTY
271 \N Runnels County (County) COUNTY
272 \N Lubbock County (County) COUNTY
273 \N Swisher County (County) COUNTY
274 \N Shackelford County (County) COUNTY
275 \N Jim Hogg County (County) COUNTY
276 \N US (ISO Country Code) ISO_COUNTRY
277 \N Medina County (County) COUNTY
278 \N Martin County (County) COUNTY
279 \N Baja California Sur (State / Territory) STATE
280 \N Castro County (County) COUNTY
281 \N Gray County (County) COUNTY
282 \N Bandera County (County) COUNTY
283 \N Motley County (County) COUNTY
284 \N Maverick County (County) COUNTY
285 \N Pima County (County) COUNTY
286 \N Bexar County (County) COUNTY
287 \N Andrews County (County) COUNTY
288 \N Colima (State / Territory) STATE
289 \N Knox County (County) COUNTY
290 \N Hale County (County) COUNTY
291 \N Mitchell County (County) COUNTY
292 \N Dickens County (County) COUNTY
293 \N Navajo County (County) COUNTY
294 \N Roger Mills County (County) COUNTY
295 \N Grant County (County) COUNTY
296 \N Wilbarger County (County) COUNTY
297 \N Harding County (County) COUNTY
298 \N Wheeler County (County) COUNTY
299 \N New Mexico (State / Territory) STATE
300 \N Callahan County (County) COUNTY
301 \N Caddo County (County) COUNTY
302 \N Randall County (County) COUNTY
303 \N Foard County (County) COUNTY
304 \N Stephens County (County) COUNTY
305 \N Taylor County (County) COUNTY
306 \N Fisher County (County) COUNTY
307 \N Crockett County (County) COUNTY
308 \N Santa Fe County (County) COUNTY
309 \N Queretaro (State / Territory) STATE
310 \N Presidio County (County) COUNTY
311 \N Roosevelt County (County) COUNTY
312 \N Otero County (County) COUNTY
313 \N Coconino County (County) COUNTY
314 \N Lynn County (County) COUNTY
315 \N Hardeman County (County) COUNTY
316 \N Jones County (County) COUNTY
317 \N Tillman County (County) COUNTY
318 \N Curry County (County) COUNTY
319 \N Reeves County (County) COUNTY
320 \N Hockley County (County) COUNTY
321 \N Gillespie County (County) COUNTY
322 \N Michoacan (State / Territory) STATE
323 \N Throckmorton County (County) COUNTY
324 \N Stonewall County (County) COUNTY
325 \N Borden County (County) COUNTY
326 \N Mexico (State / Territory) STATE
327 \N Yavapai County (County) COUNTY
328 \N Kendall County (County) COUNTY
329 \N Zavala County (County) COUNTY
330 \N Oklahoma (State / Territory) STATE
331 \N McMullen County (County) COUNTY
332 \N Kerr County (County) COUNTY
333 \N Jackson County (County) COUNTY
334 \N Bailey County (County) COUNTY
335 \N Arizona (State / Territory) STATE
336 \N Ward County (County) COUNTY
337 \N Bernalillo County (County) COUNTY
338 \N Washita County (County) COUNTY
339 \N Young County (County) COUNTY
340 \N Starr County (County) COUNTY
341 \N Cochise County (County) COUNTY
342 \N Pecos County (County) COUNTY
343 \N Brown County (County) COUNTY
344 \N Frio County (County) COUNTY
345 \N Culberson County (County) COUNTY
346 \N Sinaloa (State / Territory) STATE
347 \N Crane County (County) COUNTY
348 \N Texas (State / Territory) STATE
349 \N San Luis Potosi (State / Territory) STATE
350 \N Comanche County (County) COUNTY
351 \N Parmer County (County) COUNTY
352 \N Sonora (State / Territory) STATE
353 \N Morelos (State / Territory) STATE
354 \N Valencia County (County) COUNTY
355 \N Irion County (County) COUNTY
356 \N Crosby County (County) COUNTY
357 \N Jalisco (State / Territory) STATE
358 \N Dimmit County (County) COUNTY
359 \N Real County (County) COUNTY
360 \N Mills County (County) COUNTY
361 \N Baylor County (County) COUNTY
362 \N Luna County (County) COUNTY
363 \N Hudspeth County (County) COUNTY
364 \N Kinney County (County) COUNTY
365 \N Guerrero (State / Territory) STATE
366 \N Zacatecas (State / Territory) STATE
367 \N Armstrong County (County) COUNTY
368 \N Sierra County (County) COUNTY
369 \N Quay County (County) COUNTY
370 \N Edwards County (County) COUNTY
371 \N Greer County (County) COUNTY
372 \N Glasscock County (County) COUNTY
373 \N Reagan County (County) COUNTY
374 \N Deaf Smith County (County) COUNTY
375 \N Duval County (County) COUNTY
376 \N Oldham County (County) COUNTY
377 \N Nayarit (State / Territory) STATE
378 \N Aguascalientes (State / Territory) STATE
379 \N Donley County (County) COUNTY
380 \N Guanajuato (State / Territory) STATE
381 \N Puebla (State / Territory) STATE
382 \N Childress County (County) COUNTY
383 \N Sandoval County (County) COUNTY
384 \N United States of America (Country) COUNTRY
385 \N Hall County (County) COUNTY
386 \N Sterling County (County) COUNTY
387 \N Hidalgo County (County) COUNTY
388 \N Tom Green County (County) COUNTY
389 \N Doña Ana County (County) COUNTY
390 \N Tlaxcala (State / Territory) STATE
391 \N Gaines County (County) COUNTY
392 \N Lea County (County) COUNTY
393 \N Jeff Davis County (County) COUNTY
394 \N Santa Cruz County (County) COUNTY
395 \N Schleicher County (County) COUNTY
396 \N Graham County (County) COUNTY
397 \N Garza County (County) COUNTY
398 \N Uvalde County (County) COUNTY
399 \N Guadalupe County (County) COUNTY
400 \N Coke County (County) COUNTY
401 \N Concho County (County) COUNTY
402 \N De Baca County (County) COUNTY
403 \N Kent County (County) COUNTY
404 \N Chaves County (County) COUNTY
405 \N Webb County (County) COUNTY
406 \N Chihuahua (State / Territory) STATE
407 \N Sutton County (County) COUNTY
408 \N Apache County (County) COUNTY
409 \N Durango (State / Territory) STATE
410 \N Loving County (County) COUNTY
411 \N San Miguel County (County) COUNTY
412 \N Coleman County (County) COUNTY
413 \N Briscoe County (County) COUNTY
414 \N Atascosa County (County) COUNTY
415 \N Wichita County (County) COUNTY
416 \N Catron County (County) COUNTY
417 \N Cotton County (County) COUNTY
418 \N Terry County (County) COUNTY
419 \N Yoakum County (County) COUNTY
420 \N Cottle County (County) COUNTY
421 \N Howard County (County) COUNTY
422 \N Distrito Federal (State / Territory) STATE
423 \N Torrance County (County) COUNTY
424 \N Pinal County (County) COUNTY
425 \N San Saba County (County) COUNTY
426 \N Collingsworth County (County) COUNTY
427 \N Carson County (County) COUNTY
428 \N Lincoln County (County) COUNTY
429 \N Val Verde County (County) COUNTY
430 \N Nuevo Leon (State / Territory) STATE
431 \N Zapata County (County) COUNTY
432 \N Veracruz (State / Territory) STATE
433 \N Floyd County (County) COUNTY
434 \N Llano County (County) COUNTY
435 \N McCulloch County (County) COUNTY
436 \N Potter County (County) COUNTY
437 \N Kiowa County (County) COUNTY
438 \N United Mexican States (Country) COUNTRY
439 \N Maricopa County (County) COUNTY
440 \N Greenlee County (County) COUNTY
441 \N Lamb County (County) COUNTY
442 \N Harmon County (County) COUNTY
443 \N Scurry County (County) COUNTY
444 \N La Salle County (County) COUNTY
445 \N Ector County (County) COUNTY
446 \N Terrell County (County) COUNTY
447 \N Hart County (County) COUNTY
448 \N Pottawatomie County (County) COUNTY
449 \N Gonzales County (County) COUNTY
450 \N Beauregard Parish (County) COUNTY
451 \N Antelope County (County) COUNTY
452 \N Dyer County (County) COUNTY
453 \N Cape Girardeau County (County) COUNTY
454 \N Hansford County (County) COUNTY
455 \N Roberts County (County) COUNTY
456 \N Leake County (County) COUNTY
457 \N Orangeburg County (County) COUNTY
458 \N Saint Catherine (State / Territory) STATE
459 \N Windsor County (County) COUNTY
460 \N Palm Beach County (County) COUNTY
461 \N Morris County (County) COUNTY
462 \N Tama County (County) COUNTY
463 \N Giles County (County) COUNTY
464 \N Des Moines County (County) COUNTY
465 \N Lackawanna County (County) COUNTY
466 \N Morrill County (County) COUNTY
467 \N Cayman Is. (State / Territory) STATE
468 \N Inyo County (County) COUNTY
469 \N Rawlins County (County) COUNTY
470 \N San Augustine County (County) COUNTY
471 \N Guayanilla Municipio (County) COUNTY
472 \N Pittsylvania County (County) COUNTY
473 \N Redwood County (County) COUNTY
474 \N Colquitt County (County) COUNTY
475 \N Fergus County (County) COUNTY
476 \N Baja Verapaz (State / Territory) STATE
477 \N Lucas County (County) COUNTY
478 \N Ontario County (County) COUNTY
479 \N Maury County (County) COUNTY
480 \N Passaic County (County) COUNTY
481 \N Saratoga County (County) COUNTY
482 \N Lares Municipio (County) COUNTY
483 \N Costilla County (County) COUNTY
484 \N Hawaii County (County) COUNTY
485 \N Pasquotank County (County) COUNTY
486 \N Mobile County (County) COUNTY
487 \N Missoula County (County) COUNTY
488 \N Bonner County (County) COUNTY
489 \N Pointe Coupee Parish (County) COUNTY
490 \N Grant Parish (County) COUNTY
491 \N Augusta County (County) COUNTY
492 \N Alberta (State / Territory) STATE
493 \N Kittitas County (County) COUNTY
494 \N Bossier Parish (County) COUNTY
495 \N Stanley County (County) COUNTY
496 \N San Sebastián Municipio (County) COUNTY
497 \N Morehouse Parish (County) COUNTY
498 \N Juneau City and Borough (County) COUNTY
499 \N Williamsburg County (County) COUNTY
500 \N Sacatepequez (State / Territory) STATE
501 \N Jefferson County (County) COUNTY
502 \N Le Sueur County (County) COUNTY
503 \N Delaware (State / Territory) STATE
504 \N Baltimore city (County) COUNTY
505 \N Brooke County (County) COUNTY
506 \N Aguada Municipio (County) COUNTY
507 \N Sandusky County (County) COUNTY
508 \N Artibonite (State / Territory) STATE
509 \N Connecticut (State / Territory) STATE
510 \N East Baton Rouge Parish (County) COUNTY
511 \N Garrard County (County) COUNTY
512 \N Siskiyou County (County) COUNTY
513 \N Georgia (State / Territory) STATE
514 \N Kimball County (County) COUNTY
515 \N Buncombe County (County) COUNTY
516 \N Grenada County (County) COUNTY
517 \N Parke County (County) COUNTY
518 \N Lycoming County (County) COUNTY
519 \N Arecibo Municipio (County) COUNTY
520 \N Clarion County (County) COUNTY
521 \N Culebra Municipio (County) COUNTY
522 \N Cayey Municipio (County) COUNTY
523 \N West Carroll Parish (County) COUNTY
524 \N Hendry County (County) COUNTY
525 \N Cattaraugus County (County) COUNTY
526 \N Colorado (State / Territory) STATE
527 \N Tioga County (County) COUNTY
528 \N Nord-Ouest (State / Territory) STATE
529 \N Warrick County (County) COUNTY
530 \N Warren County (County) COUNTY
531 \N Seward County (County) COUNTY
532 \N Santa Isabel Municipio (County) COUNTY
533 \N Nunavut (State / Territory) STATE
534 \N Massachusetts (State / Territory) STATE
535 \N Haywood County (County) COUNTY
536 \N Highland County (County) COUNTY
537 \N Converse County (County) COUNTY
538 \N Gooding County (County) COUNTY
539 \N Roscommon County (County) COUNTY
540 \N Champaign County (County) COUNTY
541 \N Loup County (County) COUNTY
542 \N Lowndes County (County) COUNTY
543 \N Colusa County (County) COUNTY
544 \N Honolulu County (County) COUNTY
545 \N La Crosse County (County) COUNTY
546 \N Defiance County (County) COUNTY
547 \N Mississippi (State / Territory) STATE
548 \N Geneva County (County) COUNTY
549 \N Indian River County (County) COUNTY
550 \N Litchfield County (County) COUNTY
551 \N Penobscot County (County) COUNTY
552 \N Southampton County (County) COUNTY
553 \N Pondera County (County) COUNTY
554 \N Ciales Municipio (County) COUNTY
555 \N Anchorage Municipality (County) COUNTY
556 \N Maries County (County) COUNTY
557 \N Boise County (County) COUNTY
558 \N Lyon County (County) COUNTY
559 \N Garvin County (County) COUNTY
560 \N Allamakee County (County) COUNTY
561 \N Manchester (State / Territory) STATE
562 \N Cimarron County (County) COUNTY
563 \N Gates County (County) COUNTY
564 \N Juana Díaz Municipio (County) COUNTY
565 \N Sequatchie County (County) COUNTY
566 \N Garden County (County) COUNTY
567 \N Marathon County (County) COUNTY
568 \N Braxton County (County) COUNTY
569 \N Washoe County (County) COUNTY
570 \N Pleasants County (County) COUNTY
571 \N Cabanas (State / Territory) STATE
572 \N Posey County (County) COUNTY
573 \N Addison County (County) COUNTY
574 \N Islas de la Bahia (State / Territory) STATE
575 \N Stokes County (County) COUNTY
576 \N Habersham County (County) COUNTY
577 \N Bristol County (County) COUNTY
578 \N Petroleum County (County) COUNTY
579 \N Coamo Municipio (County) COUNTY
580 \N Logan County (County) COUNTY
581 \N Merrick County (County) COUNTY
582 \N NI (ISO Country Code) ISO_COUNTRY
583 \N Bland County (County) COUNTY
584 \N Alexander County (County) COUNTY
585 \N Guadeloupe (State / Territory) STATE
586 \N Catawba County (County) COUNTY
587 \N Matanuska-Susitna Borough (County) COUNTY
588 \N Stanly County (County) COUNTY
589 \N MQ (ISO Country Code) ISO_COUNTRY
590 \N Whiteside County (County) COUNTY
591 \N Tucker County (County) COUNTY
592 \N St. Charles Parish (County) COUNTY
593 \N Boone County (County) COUNTY
594 \N Sequoyah County (County) COUNTY
595 \N El Paraiso (State / Territory) STATE
596 \N Routt County (County) COUNTY
597 \N New York (State / Territory) STATE
598 \N Clarendon (State / Territory) STATE
599 \N Queens County (County) COUNTY
600 \N Pickett County (County) COUNTY
601 \N Swift County (County) COUNTY
602 \N Cataño Municipio (County) COUNTY
603 \N Gosper County (County) COUNTY
604 \N Uinta County (County) COUNTY
605 \N Wasco County (County) COUNTY
606 \N Dorchester County (County) COUNTY
607 \N Wallace County (County) COUNTY
608 \N Anson County (County) COUNTY
609 \N Humacao Municipio (County) COUNTY
610 \N Auglaize County (County) COUNTY
611 \N Bon Homme County (County) COUNTY
612 \N Josephine County (County) COUNTY
613 \N Portsmouth city (County) COUNTY
614 \N Jay County (County) COUNTY
615 \N Allendale County (County) COUNTY
616 \N Samana (State / Territory) STATE
617 \N Hodgeman County (County) COUNTY
618 \N Johnston County (County) COUNTY
619 \N Kanawha County (County) COUNTY
620 \N Kalkaska County (County) COUNTY
621 \N Baker County (County) COUNTY
622 \N Dougherty County (County) COUNTY
623 \N Elko County (County) COUNTY
624 \N Moody County (County) COUNTY
625 \N Meigs County (County) COUNTY
626 \N Early County (County) COUNTY
627 \N Breathitt County (County) COUNTY
628 \N Gunnison County (County) COUNTY
629 \N Northumberland County (County) COUNTY
630 \N Banner County (County) COUNTY
631 \N Monmouth County (County) COUNTY
632 \N Branch County (County) COUNTY
633 \N Camaguey (State / Territory) STATE
634 \N Alleghany County (County) COUNTY
635 \N Bertie County (County) COUNTY
636 \N Thurston County (County) COUNTY
637 \N Dickson County (County) COUNTY
638 \N Lawrence County (County) COUNTY
639 \N Worcester County (County) COUNTY
640 \N Lyman County (County) COUNTY
641 \N Guernsey County (County) COUNTY
642 \N Casey County (County) COUNTY
643 \N McCreary County (County) COUNTY
644 \N Tehama County (County) COUNTY
645 \N Harney County (County) COUNTY
646 \N Calumet County (County) COUNTY
647 \N Manitowoc County (County) COUNTY
648 \N Ohio County (County) COUNTY
649 \N Texas County (County) COUNTY
650 \N Crow Wing County (County) COUNTY
651 \N Madera County (County) COUNTY
652 \N Troup County (County) COUNTY
653 \N Bayfield County (County) COUNTY
654 \N Bureau County (County) COUNTY
655 \N Spartanburg County (County) COUNTY
656 \N Hatillo Municipio (County) COUNTY
657 \N Montague County (County) COUNTY
658 \N Del Norte County (County) COUNTY
659 \N Independence County (County) COUNTY
660 \N St. James Parish (County) COUNTY
661 \N Raleigh County (County) COUNTY
662 \N Lincoln Parish (County) COUNTY
663 \N Okmulgee County (County) COUNTY
664 \N Bethel Census Area (County) COUNTY
665 \N Juab County (County) COUNTY
666 \N Toombs County (County) COUNTY
667 \N Department of Martinique (Country) COUNTRY
668 \N Tate County (County) COUNTY
669 \N Dukes County (County) COUNTY
670 \N Kershaw County (County) COUNTY
671 \N Cross County (County) COUNTY
672 \N Tallapoosa County (County) COUNTY
673 \N Rockdale County (County) COUNTY
674 \N Peten (State / Territory) STATE
675 \N Louisa County (County) COUNTY
676 \N Haralson County (County) COUNTY
677 \N Tulsa County (County) COUNTY
678 \N KY (ISO Country Code) ISO_COUNTRY
679 \N Jewell County (County) COUNTY
680 \N Maricao Municipio (County) COUNTY
681 \N Lunenburg County (County) COUNTY
682 \N Kalawao County (County) COUNTY
683 \N Pittsburg County (County) COUNTY
684 \N Chesterfield County (County) COUNTY
685 \N Yukon Territory (State / Territory) STATE
686 \N Missouri (State / Territory) STATE
687 \N Monona County (County) COUNTY
688 \N Vigo County (County) COUNTY
689 \N Barren County (County) COUNTY
690 \N Magoffin County (County) COUNTY
691 \N Mohave County (County) COUNTY
692 \N Deer Lodge County (County) COUNTY
693 \N Klickitat County (County) COUNTY
694 \N Pawnee County (County) COUNTY
695 \N Surry County (County) COUNTY
696 \N Lamoille County (County) COUNTY
697 \N Norton city (County) COUNTY
698 \N Taos County (County) COUNTY
699 \N Stephenson County (County) COUNTY
700 \N Lafayette County (County) COUNTY
701 \N Jutiapa (State / Territory) STATE
702 \N Tennessee (State / Territory) STATE
703 \N Manassas city (County) COUNTY
704 \N New Hampshire (State / Territory) STATE
705 \N Ford County (County) COUNTY
706 \N Ziebach County (County) COUNTY
707 \N McPherson County (County) COUNTY
708 \N Etowah County (County) COUNTY
709 \N Leavenworth County (County) COUNTY
710 \N Blair County (County) COUNTY
711 \N Republic of El Salvador (Country) COUNTRY
712 \N Muskogee County (County) COUNTY
713 \N JM (ISO Country Code) ISO_COUNTRY
714 \N Upson County (County) COUNTY
715 \N Conway County (County) COUNTY
716 \N Emery County (County) COUNTY
717 \N Department of Guadeloupe (Country) COUNTRY
718 \N Camuy Municipio (County) COUNTY
719 \N Wythe County (County) COUNTY
720 \N Adams County (County) COUNTY
721 \N Bent County (County) COUNTY
722 \N North Carolina (State / Territory) STATE
723 \N Quiche (State / Territory) STATE
724 \N Canóvanas Municipio (County) COUNTY
725 \N Letcher County (County) COUNTY
726 \N Avoyelles Parish (County) COUNTY
727 \N Wise County (County) COUNTY
728 \N Reno County (County) COUNTY
729 \N Mississippi County (County) COUNTY
730 \N Hocking County (County) COUNTY
731 \N Leslie County (County) COUNTY
732 \N Bennett County (County) COUNTY
733 \N Millard County (County) COUNTY
734 \N Neshoba County (County) COUNTY
735 \N Queen Anne's County (County) COUNTY
736 \N Daniels County (County) COUNTY
737 \N Webster County (County) COUNTY
738 \N Jersey County (County) COUNTY
739 \N Holmes County (County) COUNTY
740 \N Tallahatchie County (County) COUNTY
741 \N Mille Lacs County (County) COUNTY
742 \N Clarendon County (County) COUNTY
743 \N Colon (State / Territory) STATE
744 \N Guantanamo (State / Territory) STATE
745 \N Shenandoah County (County) COUNTY
746 \N Mariposa County (County) COUNTY
747 \N Prince Edward County (County) COUNTY
748 \N Whitley County (County) COUNTY
749 \N Missaukee County (County) COUNTY
750 \N Muhlenberg County (County) COUNTY
751 \N Buchanan County (County) COUNTY
752 \N Emporia city (County) COUNTY
753 \N Cortland County (County) COUNTY
754 \N Cayman Islands (Country) COUNTRY
755 \N Lamar County (County) COUNTY
756 \N Suffolk County (County) COUNTY
757 \N Twiggs County (County) COUNTY
758 \N Petersburg city (County) COUNTY
759 \N Glenn County (County) COUNTY
760 \N Alcona County (County) COUNTY
761 \N Sherburne County (County) COUNTY
762 \N Yucatan (State / Territory) STATE
763 \N Forrest County (County) COUNTY
764 \N Valley County (County) COUNTY
765 \N Herkimer County (County) COUNTY
766 \N Kenton County (County) COUNTY
767 \N St. Thomas Island (County) COUNTY
768 \N Victoria County (County) COUNTY
769 \N Bristol city (County) COUNTY
770 \N Galax city (County) COUNTY
771 \N Pushmataha County (County) COUNTY
772 \N Sacramento County (County) COUNTY
773 \N Renville County (County) COUNTY
774 \N Blaine County (County) COUNTY
775 \N Dauphin County (County) COUNTY
776 \N St. Lawrence County (County) COUNTY
777 \N Manatee County (County) COUNTY
778 \N Lake of the Woods County (County) COUNTY
779 \N Fond du Lac County (County) COUNTY
780 \N Bullitt County (County) COUNTY
781 \N Belknap County (County) COUNTY
782 \N Kearny County (County) COUNTY
783 \N Turner County (County) COUNTY
784 \N Montour County (County) COUNTY
785 \N DuPage County (County) COUNTY
786 \N Idaho (State / Territory) STATE
787 \N Woodford County (County) COUNTY
788 \N Custer County (County) COUNTY
789 \N Minnehaha County (County) COUNTY
790 \N Beaverhead County (County) COUNTY
791 \N Grundy County (County) COUNTY
792 \N Utah (State / Territory) STATE
793 \N Bee County (County) COUNTY
794 \N Jessamine County (County) COUNTY
795 \N Rio Blanco County (County) COUNTY
796 \N San Lorenzo Municipio (County) COUNTY
797 \N Hot Spring County (County) COUNTY
798 \N Screven County (County) COUNTY
799 \N Appling County (County) COUNTY
800 \N Dundy County (County) COUNTY
801 \N Ross County (County) COUNTY
802 \N Aguas Buenas Municipio (County) COUNTY
803 \N Hickory County (County) COUNTY
804 \N Atkinson County (County) COUNTY
805 \N Monterey County (County) COUNTY
806 \N Washtenaw County (County) COUNTY
807 \N Amelia County (County) COUNTY
808 \N Blue Earth County (County) COUNTY
809 \N Bates County (County) COUNTY
810 \N Dickinson County (County) COUNTY
811 \N Pine County (County) COUNTY
812 \N Yabucoa Municipio (County) COUNTY
813 \N Wabasha County (County) COUNTY
814 \N Chaffee County (County) COUNTY
815 \N Pasco County (County) COUNTY
816 \N Hardy County (County) COUNTY
817 \N Caldwell County (County) COUNTY
818 \N Trempealeau County (County) COUNTY
819 \N Mathews County (County) COUNTY
820 \N Bergen County (County) COUNTY
821 \N Loudoun County (County) COUNTY
822 \N Delaware County (County) COUNTY
823 \N Kenai Peninsula Borough (County) COUNTY
824 \N Appomattox County (County) COUNTY
825 \N Wakulla County (County) COUNTY
826 \N Cook County (County) COUNTY
827 \N Maine (State / Territory) STATE
828 \N Corson County (County) COUNTY
829 \N Cheshire County (County) COUNTY
830 \N Charles County (County) COUNTY
831 \N Chiapas (State / Territory) STATE
832 \N La Romana (State / Territory) STATE
833 \N Box Elder County (County) COUNTY
834 \N Douglas County (County) COUNTY
835 \N Hancock County (County) COUNTY
836 \N Grayson County (County) COUNTY
837 \N Nord-Est (State / Territory) STATE
838 \N Duarte (State / Territory) STATE
839 \N Matanzas (State / Territory) STATE
840 \N Hutchinson County (County) COUNTY
841 \N San Diego County (County) COUNTY
842 \N Pontotoc County (County) COUNTY
843 \N Ashley County (County) COUNTY
844 \N Greenland (Country) COUNTRY
845 \N British Columbia (State / Territory) STATE
846 \N Fairbanks North Star Borough (County) COUNTY
847 \N Benewah County (County) COUNTY
848 \N Hawkins County (County) COUNTY
849 \N San Pedro de Macor¡s (State / Territory) STATE
850 \N Page County (County) COUNTY
851 \N Antigua and Barbuda (Country) COUNTRY
852 \N Saint Andrew (State / Territory) STATE
853 \N Kankakee County (County) COUNTY
854 \N Carter County (County) COUNTY
855 \N Naguabo Municipio (County) COUNTY
856 \N Solano County (County) COUNTY
857 \N Furnas County (County) COUNTY
858 \N Doniphan County (County) COUNTY
859 \N Paulding County (County) COUNTY
860 \N Lancaster County (County) COUNTY
861 \N Island County (County) COUNTY
862 \N White Pine County (County) COUNTY
863 \N Hardin County (County) COUNTY
864 \N Turks and Caicos Islands (Country) COUNTRY
865 \N Tippecanoe County (County) COUNTY
866 \N Laclede County (County) COUNTY
867 \N Newton County (County) COUNTY
868 \N Churchill County (County) COUNTY
869 \N Barahona (State / Territory) STATE
870 \N Massac County (County) COUNTY
871 \N Russell County (County) COUNTY
872 \N Tripp County (County) COUNTY
873 \N Cavalier County (County) COUNTY
874 \N Sitka City and Borough (County) COUNTY
875 \N Lauderdale County (County) COUNTY
876 \N Payne County (County) COUNTY
877 \N Wasatch County (County) COUNTY
878 \N Barrow County (County) COUNTY
879 \N Nueces County (County) COUNTY
880 \N Francisco Morazan (State / Territory) STATE
881 \N McDonough County (County) COUNTY
882 \N Cheatham County (County) COUNTY
883 \N Audrain County (County) COUNTY
884 \N Stillwater County (County) COUNTY
885 \N Pembina County (County) COUNTY
886 \N Upshur County (County) COUNTY
887 \N Barber County (County) COUNTY
888 \N Stanton County (County) COUNTY
889 \N Bartholomew County (County) COUNTY
890 \N Hernando County (County) COUNTY
891 \N Chiquimula (State / Territory) STATE
892 \N Cortes (State / Territory) STATE
893 \N Bell County (County) COUNTY
894 \N Eau Claire County (County) COUNTY
895 \N Rock Island County (County) COUNTY
896 \N Boulder County (County) COUNTY
897 \N Mayes County (County) COUNTY
898 \N Montserrat (State / Territory) STATE
899 \N DO (ISO Country Code) ISO_COUNTRY
900 \N Benson County (County) COUNTY
901 \N Wyandot County (County) COUNTY
902 \N Lenoir County (County) COUNTY
903 \N Catahoula Parish (County) COUNTY
904 \N Harris County (County) COUNTY
905 \N Burt County (County) COUNTY
906 \N Brookings County (County) COUNTY
907 \N Kentucky (State / Territory) STATE
908 \N Grand Traverse County (County) COUNTY
909 \N Yamhill County (County) COUNTY
910 \N Gove County (County) COUNTY
911 \N Iredell County (County) COUNTY
912 \N Dade County (County) COUNTY
913 \N Pocahontas County (County) COUNTY
914 \N La Paz (State / Territory) STATE
915 \N Alamosa County (County) COUNTY
916 \N Transylvania County (County) COUNTY
917 \N Barnstable County (County) COUNTY
918 \N McCormick County (County) COUNTY
919 \N Nevada (State / Territory) STATE
920 \N Karnes County (County) COUNTY
921 \N Walker County (County) COUNTY
922 \N Trigg County (County) COUNTY
923 \N Baxter County (County) COUNTY
924 \N Fredericksburg city (County) COUNTY
925 \N Choluteca (State / Territory) STATE
926 \N Fulton County (County) COUNTY
927 \N Illinois (State / Territory) STATE
928 \N Ozaukee County (County) COUNTY
929 \N AG (ISO Country Code) ISO_COUNTRY
930 \N Salinas Municipio (County) COUNTY
931 \N Marengo County (County) COUNTY
932 \N Clackamas County (County) COUNTY
933 \N Bollinger County (County) COUNTY
934 \N Caswell County (County) COUNTY
935 \N Major County (County) COUNTY
936 \N Perkins County (County) COUNTY
937 \N Barry County (County) COUNTY
938 \N Rincón Municipio (County) COUNTY
939 \N Anguilla (State / Territory) STATE
940 \N Coryell County (County) COUNTY
941 \N Salem County (County) COUNTY
942 \N Bond County (County) COUNTY
943 \N Harrison County (County) COUNTY
944 \N Valdez-Cordova Census Area (County) COUNTY
945 \N Towner County (County) COUNTY
946 \N Androscoggin County (County) COUNTY
947 \N Boyle County (County) COUNTY
948 \N Cullman County (County) COUNTY
949 \N Sebastian County (County) COUNTY
950 \N Clark County (County) COUNTY
951 \N Storey County (County) COUNTY
952 \N Austin County (County) COUNTY
953 \N Carlton County (County) COUNTY
954 \N Baldwin County (County) COUNTY
955 \N Hertford County (County) COUNTY
956 \N Kane County (County) COUNTY
957 \N La Vega (State / Territory) STATE
958 \N Kewaunee County (County) COUNTY
959 \N Grainger County (County) COUNTY
960 \N Sampson County (County) COUNTY
961 \N Gage County (County) COUNTY
962 \N Kosciusko County (County) COUNTY
963 \N San Vicente (State / Territory) STATE
964 \N Cocke County (County) COUNTY
965 \N Wisconsin (State / Territory) STATE
966 \N Chambers County (County) COUNTY
967 \N Manistee County (County) COUNTY
968 \N Bowie County (County) COUNTY
969 \N York County (County) COUNTY
970 \N McLeod County (County) COUNTY
971 \N LaPorte County (County) COUNTY
972 \N LaMoure County (County) COUNTY
973 \N Talladega County (County) COUNTY
974 \N Espaillat (State / Territory) STATE
975 \N West Virginia (State / Territory) STATE
976 \N Autauga County (County) COUNTY
977 \N Chase County (County) COUNTY
978 \N Grand County (County) COUNTY
979 \N Matagorda County (County) COUNTY
980 \N Comayagua (State / Territory) STATE
981 \N Mercer County (County) COUNTY
982 \N Price County (County) COUNTY
983 \N Creek County (County) COUNTY
984 \N Spink County (County) COUNTY
985 \N Scotland County (County) COUNTY
986 \N Ogemaw County (County) COUNTY
987 \N Buffalo County (County) COUNTY
988 \N Uintah County (County) COUNTY
989 \N Scioto County (County) COUNTY
990 \N Cherry County (County) COUNTY
991 \N Larue County (County) COUNTY
992 \N St. Croix Island (County) COUNTY
993 \N Otsego County (County) COUNTY
994 \N Edgar County (County) COUNTY
995 \N Clearfield County (County) COUNTY
996 \N Bradford County (County) COUNTY
997 \N Florida Municipio (County) COUNTY
998 \N Eaton County (County) COUNTY
999 \N Travis County (County) COUNTY
1000 \N Hood County (County) COUNTY
1001 \N Fillmore County (County) COUNTY
1002 \N Chowan County (County) COUNTY
1003 \N Rockcastle County (County) COUNTY
1004 \N Grady County (County) COUNTY
1005 \N Lewis County (County) COUNTY
1006 \N San Cristobal (State / Territory) STATE
1007 \N Wilkinson County (County) COUNTY
1008 \N Sarasota County (County) COUNTY
1009 \N Ponce Municipio (County) COUNTY
1010 \N Granite County (County) COUNTY
1011 \N Flathead County (County) COUNTY
1012 \N Gasconade County (County) COUNTY
1013 \N Atoka County (County) COUNTY
1014 \N Moca Municipio (County) COUNTY
1015 \N Manatí Municipio (County) COUNTY
1016 \N Walton County (County) COUNTY
1017 \N Story County (County) COUNTY
1018 \N Izard County (County) COUNTY
1019 \N Lemhi County (County) COUNTY
1020 \N Ness County (County) COUNTY
1021 \N Genesee County (County) COUNTY
1022 \N Schoolcraft County (County) COUNTY
1023 \N Gilchrist County (County) COUNTY
1024 \N Bermuda (Country) COUNTRY
1025 \N Lehigh County (County) COUNTY
1026 \N Winona County (County) COUNTY
1027 \N Nord (State / Territory) STATE
1028 \N Huerfano County (County) COUNTY
1029 \N Ralls County (County) COUNTY
1030 \N SV (ISO Country Code) ISO_COUNTRY
1031 \N McKean County (County) COUNTY
1032 \N Lavaca County (County) COUNTY
1033 \N Utuado Municipio (County) COUNTY
1034 \N Chester County (County) COUNTY
1035 \N Mecosta County (County) COUNTY
1036 \N Peach County (County) COUNTY
1037 \N Coos County (County) COUNTY
1038 \N Calvert County (County) COUNTY
1039 \N Cole County (County) COUNTY
1040 \N Merced County (County) COUNTY
1041 \N Kearney County (County) COUNTY
1042 \N Ballard County (County) COUNTY
1043 \N Plaquemines Parish (County) COUNTY
1044 \N Ashe County (County) COUNTY
1045 \N Coweta County (County) COUNTY
1046 \N Iberia Parish (County) COUNTY
1047 \N Decatur County (County) COUNTY
1048 \N Silver Bow County (County) COUNTY
1049 \N Nottoway County (County) COUNTY
1050 \N Clay County (County) COUNTY
1051 \N Grimes County (County) COUNTY
1052 \N Red River County (County) COUNTY
1053 \N Itawamba County (County) COUNTY
1054 \N Horry County (County) COUNTY
1055 \N Venango County (County) COUNTY
1056 \N Lapeer County (County) COUNTY
1057 \N Belize (Country) COUNTRY
1058 \N Oscoda County (County) COUNTY
1059 \N Hopewell city (County) COUNTY
1060 \N Chisago County (County) COUNTY
1061 \N TC (ISO Country Code) ISO_COUNTRY
1062 \N Nobles County (County) COUNTY
1063 \N Canyon County (County) COUNTY
1064 \N Azua (State / Territory) STATE
1065 \N Long County (County) COUNTY
1066 \N Bayamon (State / Territory) STATE
1067 \N BZ (ISO Country Code) ISO_COUNTRY
1068 \N Candler County (County) COUNTY
1069 \N Richland Parish (County) COUNTY
1070 \N Yancey County (County) COUNTY
1071 \N GT (ISO Country Code) ISO_COUNTRY
1072 \N Oregon County (County) COUNTY
1073 \N Crook County (County) COUNTY
1074 \N Caddo Parish (County) COUNTY
1075 \N Morton County (County) COUNTY
1076 \N Blanco County (County) COUNTY
1077 \N Lexington city (County) COUNTY
1078 \N San Francisco County (County) COUNTY
1079 \N Covington County (County) COUNTY
1080 \N PR (ISO Country Code) ISO_COUNTRY
1081 \N Chatham County (County) COUNTY
1082 \N Wayne County (County) COUNTY
1083 \N Bayamón Municipio (County) COUNTY
1084 \N Irwin County (County) COUNTY
1085 \N BS (ISO Country Code) ISO_COUNTRY
1086 \N DM (ISO Country Code) ISO_COUNTRY
1087 \N Falls County (County) COUNTY
1088 \N Pacific County (County) COUNTY
1089 \N Nuckolls County (County) COUNTY
1090 \N Blount County (County) COUNTY
1091 \N Arkansas County (County) COUNTY
1092 \N Huntington County (County) COUNTY
1093 \N Monongalia County (County) COUNTY
1094 \N Amherst County (County) COUNTY
1095 \N Ouachita Parish (County) COUNTY
1096 \N Pamlico County (County) COUNTY
1097 \N Loíza Municipio (County) COUNTY
1098 \N East Feliciana Parish (County) COUNTY
1099 \N Crittenden County (County) COUNTY
1100 \N Spokane County (County) COUNTY
1101 \N Goodhue County (County) COUNTY
1102 \N Norman County (County) COUNTY
1103 \N Gracias a Dios (State / Territory) STATE
1104 \N Escuintla (State / Territory) STATE
1105 \N Anguilla (Country) COUNTRY
1106 \N Robeson County (County) COUNTY
1107 \N Weld County (County) COUNTY
1108 \N Monsenor Novel (State / Territory) STATE
1109 \N Burnet County (County) COUNTY
1110 \N Effingham County (County) COUNTY
1111 \N Chariton County (County) COUNTY
1112 \N Republic of Guatemala (Country) COUNTRY
1113 \N McDonald County (County) COUNTY
1114 \N Tipton County (County) COUNTY
1115 \N Albany County (County) COUNTY
1116 \N Florence County (County) COUNTY
1117 \N Greenville County (County) COUNTY
1118 \N Westchester County (County) COUNTY
1119 \N Ottawa County (County) COUNTY
1120 \N Bracken County (County) COUNTY
1121 \N Wibaux County (County) COUNTY
1122 \N Todd County (County) COUNTY
1123 \N St. Helena Parish (County) COUNTY
1124 \N Prince William County (County) COUNTY
1125 \N Hempstead County (County) COUNTY
1126 \N Nome Census Area (County) COUNTY
1127 \N Indiana (State / Territory) STATE
1128 \N Orleans County (County) COUNTY
1129 \N Brevard County (County) COUNTY
1130 \N Orange Walk (State / Territory) STATE
1131 \N Perquimans County (County) COUNTY
1132 \N Stone County (County) COUNTY
1133 \N Daviess County (County) COUNTY
1134 \N Michigan (State / Territory) STATE
1135 \N Pipestone County (County) COUNTY
1136 \N Clatsop County (County) COUNTY
1137 \N Greensville County (County) COUNTY
1138 \N Saluda County (County) COUNTY
1139 \N Stanislaus County (County) COUNTY
1140 \N Colonial Heights city (County) COUNTY
1141 \N Colleton County (County) COUNTY
1142 \N Puerto Plata (State / Territory) STATE
1143 \N Bonneville County (County) COUNTY
1144 \N St. Bernard Parish (County) COUNTY
1145 \N Pitt County (County) COUNTY
1146 \N Cheboygan County (County) COUNTY
1147 \N Brooks County (County) COUNTY
1148 \N Guthrie County (County) COUNTY
1149 \N Vilas County (County) COUNTY
1150 \N Shelby County (County) COUNTY
1151 \N Mendocino County (County) COUNTY
1152 \N Kanabec County (County) COUNTY
1153 \N Twin Falls County (County) COUNTY
1154 \N Marion County (County) COUNTY
1155 \N Hampton County (County) COUNTY
1156 \N Obion County (County) COUNTY
1157 \N Wabash County (County) COUNTY
1158 \N Mayagüez Municipio (County) COUNTY
1159 \N Sherman County (County) COUNTY
1160 \N Aiken County (County) COUNTY
1161 \N Oswego County (County) COUNTY
1162 \N Will County (County) COUNTY
1163 \N Benzie County (County) COUNTY
1164 \N Edmonson County (County) COUNTY
1165 \N Sanilac County (County) COUNTY
1166 \N Beaver County (County) COUNTY
1167 \N El Progreso (State / Territory) STATE
1168 \N Alachua County (County) COUNTY
1169 \N Waynesboro city (County) COUNTY
1170 \N Pottawattamie County (County) COUNTY
1171 \N Idaho County (County) COUNTY
1172 \N Los Angeles County (County) COUNTY
1173 \N New Brunswick (State / Territory) STATE
1174 \N Waldo County (County) COUNTY
1175 \N Tarrant County (County) COUNTY
1176 \N Alaska (State / Territory) STATE
1177 \N Nacogdoches County (County) COUNTY
1178 \N Dinwiddie County (County) COUNTY
1179 \N Geary County (County) COUNTY
1180 \N Henrico County (County) COUNTY
1181 \N Vestgronland (State / Territory) STATE
1182 \N Schuyler County (County) COUNTY
1183 \N Traverse County (County) COUNTY
1184 \N Rio Grande County (County) COUNTY
1185 \N Ritchie County (County) COUNTY
1186 \N Republic of Honduras (Country) COUNTRY
1187 \N Dawes County (County) COUNTY
1188 \N Hudson County (County) COUNTY
1189 \N Providence County (County) COUNTY
1190 \N Wapello County (County) COUNTY
1191 \N Miami County (County) COUNTY
1192 \N Spalding County (County) COUNTY
1193 \N Hubbard County (County) COUNTY
1194 \N Dane County (County) COUNTY
1195 \N Hamlin County (County) COUNTY
1196 \N Cape May County (County) COUNTY
1197 \N Crowley County (County) COUNTY
1198 \N Peravia (State / Territory) STATE
1199 \N Cumberland County (County) COUNTY
1200 \N Albemarle County (County) COUNTY
1201 \N Turks & Caicos Is. (State / Territory) STATE
1202 \N Sumter County (County) COUNTY
1203 \N Pratt County (County) COUNTY
1204 \N Okanogan County (County) COUNTY
1205 \N Cambria County (County) COUNTY
1206 \N Wyoming County (County) COUNTY
1207 \N Colorado County (County) COUNTY
1208 \N Dallas County (County) COUNTY
1209 \N Arecibo (State / Territory) STATE
1210 \N La Libertad (State / Territory) STATE
1211 \N Dent County (County) COUNTY
1212 \N Middlesex County (County) COUNTY
1213 \N Shannon County (County) COUNTY
1214 \N Covington city (County) COUNTY
1215 \N Charles City County (County) COUNTY
1216 \N Ahuachapan (State / Territory) STATE
1217 \N Dixie County (County) COUNTY
1218 \N Hampton city (County) COUNTY
1219 \N Usulutan (State / Territory) STATE
1220 \N Bryan County (County) COUNTY
1221 \N King and Queen County (County) COUNTY
1222 \N Lac qui Parle County (County) COUNTY
1223 \N Sweetwater County (County) COUNTY
1224 \N Arapahoe County (County) COUNTY
1225 \N Green County (County) COUNTY
1226 \N Lumpkin County (County) COUNTY
1227 \N Fort Bend County (County) COUNTY
1228 \N Coles County (County) COUNTY
1229 \N Judith Basin County (County) COUNTY
1230 \N Huron County (County) COUNTY
1231 \N Philadelphia County (County) COUNTY
1232 \N Walla Walla County (County) COUNTY
1233 \N Nelson County (County) COUNTY
1234 \N Orleans Parish (County) COUNTY
1235 \N Ellis County (County) COUNTY
1236 \N Woodson County (County) COUNTY
1237 \N Imperial County (County) COUNTY
1238 \N Powhatan County (County) COUNTY
1239 \N Monte Plata (State / Territory) STATE
1240 \N Delta County (County) COUNTY
1241 \N Gaston County (County) COUNTY
1242 \N Columbiana County (County) COUNTY
1243 \N Petersburg Census Area (County) COUNTY
1244 \N Newberry County (County) COUNTY
1245 \N Jim Wells County (County) COUNTY
1246 \N Centre (State / Territory) STATE
1247 \N Huntingdon County (County) COUNTY
1248 \N Bulloch County (County) COUNTY
1249 \N Winchester city (County) COUNTY
1250 \N Carteret County (County) COUNTY
1251 \N Kennebec County (County) COUNTY
1252 \N Fremont County (County) COUNTY
1253 \N Ontonagon County (County) COUNTY
1254 \N Yuba County (County) COUNTY
1255 \N Santiago Rodrigu (State / Territory) STATE
1256 \N Schoharie County (County) COUNTY
1257 \N McIntosh County (County) COUNTY
1258 \N Carson City (County) COUNTY
1259 \N Buckingham County (County) COUNTY
1260 \N Allen County (County) COUNTY
1261 \N Chickasaw County (County) COUNTY
1262 \N St. Mary's County (County) COUNTY
1263 \N Vanderburgh County (County) COUNTY
1264 \N McCurtain County (County) COUNTY
1265 \N Dewey County (County) COUNTY
1266 \N Camp County (County) COUNTY
1267 \N Davis County (County) COUNTY
1268 \N Abbeville County (County) COUNTY
1269 \N Elliott County (County) COUNTY
1270 \N Van Wert County (County) COUNTY
1271 \N Hunterdon County (County) COUNTY
1272 \N Polk County (County) COUNTY
1273 \N Waller County (County) COUNTY
1274 \N Sharp County (County) COUNTY
1275 \N Pennington County (County) COUNTY
1276 \N Hanover (State / Territory) STATE
1277 \N Durham County (County) COUNTY
1278 \N Clear Creek County (County) COUNTY
1279 \N Woods County (County) COUNTY
1280 \N Beltrami County (County) COUNTY
1281 \N Houghton County (County) COUNTY
1282 \N Sheridan County (County) COUNTY
1283 \N Crisp County (County) COUNTY
1284 \N Watauga County (County) COUNTY
1285 \N Concordia Parish (County) COUNTY
1286 \N Burnett County (County) COUNTY
1287 \N Walthall County (County) COUNTY
1288 \N Republic of Haiti (Country) COUNTRY
1289 \N Teller County (County) COUNTY
1290 \N Villa Clara (State / Territory) STATE
1291 \N Carolina Municipio (County) COUNTY
1292 \N Coshocton County (County) COUNTY
1293 \N Anoka County (County) COUNTY
1294 \N Tippah County (County) COUNTY
1295 \N Benton County (County) COUNTY
1296 \N Wallowa County (County) COUNTY
1297 \N Mesa County (County) COUNTY
1298 \N HT (ISO Country Code) ISO_COUNTRY
1299 \N Tishomingo County (County) COUNTY
1300 \N Yalobusha County (County) COUNTY
1301 \N Oglethorpe County (County) COUNTY
1302 \N Sully County (County) COUNTY
1303 \N Gibson County (County) COUNTY
1304 \N Clermont County (County) COUNTY
1305 \N San Marcos (State / Territory) STATE
1306 \N Calcasieu Parish (County) COUNTY
1307 \N Bastrop County (County) COUNTY
1308 \N Juneau County (County) COUNTY
1309 \N Osceola County (County) COUNTY
1310 \N Cienfuegos (State / Territory) STATE
1311 \N Berkshire County (County) COUNTY
1312 \N Trujillo Alto Municipio (County) COUNTY
1313 \N Washington (State / Territory) STATE
1314 \N Fayette County (County) COUNTY
1315 \N Terrebonne Parish (County) COUNTY
1316 \N Alpena County (County) COUNTY
1317 \N Carlisle County (County) COUNTY
1318 \N St. Francois County (County) COUNTY
1319 \N Gurabo Municipio (County) COUNTY
1320 \N Latah County (County) COUNTY
1321 \N Andrew County (County) COUNTY
1322 \N Roanoke County (County) COUNTY
1323 \N Santo Domingo (State / Territory) STATE
1324 \N Gloucester County (County) COUNTY
1325 \N Rappahannock County (County) COUNTY
1326 \N Choctaw County (County) COUNTY
1327 \N Northwest Arctic Borough (County) COUNTY
1328 \N Alpine County (County) COUNTY
1329 \N Humboldt County (County) COUNTY
1330 \N Lewis and Clark County (County) COUNTY
1331 \N Rooks County (County) COUNTY
1332 \N St. Lucia (Country) COUNTRY
1333 \N Dajabon (State / Territory) STATE
1334 \N Barron County (County) COUNTY
1335 \N Kandiyohi County (County) COUNTY
1336 \N Kingsbury County (County) COUNTY
1337 \N Perry County (County) COUNTY
1338 \N Miami-Dade County (County) COUNTY
1339 \N Hill County (County) COUNTY
1340 \N Hartley County (County) COUNTY
1341 \N O'Brien County (County) COUNTY
1342 \N Ramsey County (County) COUNTY
1343 \N Caledonia County (County) COUNTY
1344 \N Skagway Municipality (County) COUNTY
1345 \N Vernon County (County) COUNTY
1346 \N Vinton County (County) COUNTY
1347 \N Geauga County (County) COUNTY
1348 \N Fairfax city (County) COUNTY
1349 \N Tolland County (County) COUNTY
1350 \N Allen Parish (County) COUNTY
1351 \N Wilkin County (County) COUNTY
1352 \N Mahoning County (County) COUNTY
1353 \N Clare County (County) COUNTY
1354 \N Racine County (County) COUNTY
1355 \N Malheur County (County) COUNTY
1356 \N Keweenaw County (County) COUNTY
1357 \N Calloway County (County) COUNTY
1358 \N Atchison County (County) COUNTY
1359 \N Saskatchewan (State / Territory) STATE
1360 \N Quebec (State / Territory) STATE
1361 \N Chemung County (County) COUNTY
1362 \N Finney County (County) COUNTY
1363 \N Iron County (County) COUNTY
1364 \N Ashtabula County (County) COUNTY
1365 \N Morazan (State / Territory) STATE
1366 \N Baja California (State / Territory) STATE
1367 \N New Jersey (State / Territory) STATE
1368 \N Windham County (County) COUNTY
1369 \N Sauk County (County) COUNTY
1370 \N Marshall County (County) COUNTY
1371 \N Ouest (State / Territory) STATE
1372 \N Burleigh County (County) COUNTY
1373 \N Black Hawk County (County) COUNTY
1374 \N Dubuque County (County) COUNTY
1375 \N Miner County (County) COUNTY
1376 \N Harlan County (County) COUNTY
1377 \N Thomas County (County) COUNTY
1378 \N CA (ISO Country Code) ISO_COUNTRY
1379 \N Henry County (County) COUNTY
1380 \N Canadian County (County) COUNTY
1381 \N Fleming County (County) COUNTY
1382 \N Minidoka County (County) COUNTY
1383 \N Bosque County (County) COUNTY
1384 \N Tuscola County (County) COUNTY
1385 \N Las Piedras Municipio (County) COUNTY
1386 \N Glades County (County) COUNTY
1387 \N Baoruco (State / Territory) STATE
1388 \N Sanders County (County) COUNTY
1389 \N Las Tunas (State / Territory) STATE
1390 \N Piute County (County) COUNTY
1391 \N Ray County (County) COUNTY
1392 \N Napa County (County) COUNTY
1393 \N Caguas Municipio (County) COUNTY
1394 \N Ransom County (County) COUNTY
1395 \N Eagle County (County) COUNTY
1396 \N Licking County (County) COUNTY
1397 \N Simpson County (County) COUNTY
1398 \N San Miguel (State / Territory) STATE
1399 \N Pinellas County (County) COUNTY
1400 \N Goochland County (County) COUNTY
1401 \N Ida County (County) COUNTY
1402 \N Ferry County (County) COUNTY
1403 \N Halifax County (County) COUNTY
1404 \N Craighead County (County) COUNTY
1405 \N Lenawee County (County) COUNTY
1406 \N Crawford County (County) COUNTY
1407 \N Humacao (State / Territory) STATE
1408 \N Zelaya (State / Territory) STATE
1409 \N Pendleton County (County) COUNTY
1410 \N Saint Mary (State / Territory) STATE
1411 \N Darke County (County) COUNTY
1412 \N Lampasas County (County) COUNTY
1413 \N Cayo (State / Territory) STATE
1414 \N Panola County (County) COUNTY
1415 \N Kleberg County (County) COUNTY
1416 \N Prince of Wales-Hyder Census Area (County) COUNTY
1417 \N Wahkiakum County (County) COUNTY
1418 \N George County (County) COUNTY
1419 \N Sabana Grande Municipio (County) COUNTY
1420 \N Norton County (County) COUNTY
1421 \N Hormigueros Municipio (County) COUNTY
1422 \N Kaufman County (County) COUNTY
1423 \N Davison County (County) COUNTY
1424 \N Stewart County (County) COUNTY
1425 \N St. Kitts & Nevis (State / Territory) STATE
1426 \N Retalhuleu (State / Territory) STATE
1427 \N Kings County (County) COUNTY
1428 \N Garland County (County) COUNTY
1429 \N Moffat County (County) COUNTY
1430 \N Aguadilla Municipio (County) COUNTY
1431 \N Winneshiek County (County) COUNTY
1432 \N Neosho County (County) COUNTY
1433 \N Hemphill County (County) COUNTY
1434 \N Lafayette Parish (County) COUNTY
1435 \N Añasco Municipio (County) COUNTY
1436 \N Isanti County (County) COUNTY
1437 \N Gem County (County) COUNTY
1438 \N Dodge County (County) COUNTY
1439 \N Okfuskee County (County) COUNTY
1440 \N Wirt County (County) COUNTY
1441 \N Sangamon County (County) COUNTY
1442 \N Watonwan County (County) COUNTY
1443 \N Snyder County (County) COUNTY
1444 \N Washburn County (County) COUNTY
1445 \N DeKalb County (County) COUNTY
1446 \N McLean County (County) COUNTY
1447 \N Garrett County (County) COUNTY
1448 \N Bennington County (County) COUNTY
1449 \N Multnomah County (County) COUNTY
1450 \N Henderson County (County) COUNTY
1451 \N Montserrat (Country) COUNTRY
1452 \N Hamilton County (County) COUNTY
1453 \N Luquillo Municipio (County) COUNTY
1454 \N Territorial Collectivity of Saint Pierre (Country) COUNTRY
1455 \N Bartow County (County) COUNTY
1456 \N Dickey County (County) COUNTY
1457 \N Mellette County (County) COUNTY
1458 \N Iowa County (County) COUNTY
1459 \N Salt Lake County (County) COUNTY
1460 \N Manitoba (State / Territory) STATE
1461 \N Chelan County (County) COUNTY
1462 \N Kay County (County) COUNTY
1463 \N Noxubee County (County) COUNTY
1464 \N Martinique (State / Territory) STATE
1465 \N Oxford County (County) COUNTY
1466 \N Muscogee County (County) COUNTY
1467 \N Okaloosa County (County) COUNTY
1468 \N Metcalfe County (County) COUNTY
1469 \N Pemiscot County (County) COUNTY
1470 \N Pepin County (County) COUNTY
1471 \N Fauquier County (County) COUNTY
1472 \N BM (ISO Country Code) ISO_COUNTRY
1473 \N MS (ISO Country Code) ISO_COUNTRY
1474 \N Virginia (State / Territory) STATE
1475 \N East Carroll Parish (County) COUNTY
1476 \N Sunflower County (County) COUNTY
1477 \N Ravalli County (County) COUNTY
1478 \N Rockwall County (County) COUNTY
1479 \N Nebraska (State / Territory) STATE
1480 \N Quebradillas Municipio (County) COUNTY
1481 \N Montezuma County (County) COUNTY
1482 \N Kansas (State / Territory) STATE
1483 \N Lane County (County) COUNTY
1484 \N California (State / Territory) STATE
1485 \N Republic of Cuba (Country) COUNTRY
1486 \N Ogle County (County) COUNTY
1487 \N San Germán Municipio (County) COUNTY
1488 \N Hoonah-Angoon Census Area (County) COUNTY
1489 \N Dominica (State / Territory) STATE
1490 \N Las Marías Municipio (County) COUNTY
1491 \N Harnett County (County) COUNTY
1492 \N Wolfe County (County) COUNTY
1493 \N HN (ISO Country Code) ISO_COUNTRY
1494 \N Trousdale County (County) COUNTY
1495 \N Highlands County (County) COUNTY
1496 \N Citrus County (County) COUNTY
1497 \N Hampshire County (County) COUNTY
1498 \N Wabaunsee County (County) COUNTY
1499 \N Vermilion County (County) COUNTY
1500 \N Burleson County (County) COUNTY
1501 \N Waukesha County (County) COUNTY
1502 \N Moultrie County (County) COUNTY
1503 \N Chenango County (County) COUNTY
1504 \N Webster Parish (County) COUNTY
1505 \N Aransas County (County) COUNTY
1506 \N Langlade County (County) COUNTY
1507 \N Volusia County (County) COUNTY
1508 \N Davie County (County) COUNTY
1509 \N Brantley County (County) COUNTY
1510 \N Avery County (County) COUNTY
1511 \N Coahoma County (County) COUNTY
1512 \N Ingham County (County) COUNTY
1513 \N Berrien County (County) COUNTY
1514 \N Martinsville city (County) COUNTY
1515 \N VI (ISO Country Code) ISO_COUNTRY
1516 \N Portland (State / Territory) STATE
1517 \N Stevens County (County) COUNTY
1518 \N Bay County (County) COUNTY
1519 \N Rice County (County) COUNTY
1520 \N Williams County (County) COUNTY
1521 \N Cherokee County (County) COUNTY
1522 \N Cowlitz County (County) COUNTY
1523 \N St. Clair County (County) COUNTY
1524 \N Richland County (County) COUNTY
1525 \N Iowa (State / Territory) STATE
1526 \N Oktibbeha County (County) COUNTY
1527 \N South Carolina (State / Territory) STATE
1528 \N Atlantic County (County) COUNTY
1529 \N Gentry County (County) COUNTY
1530 \N St. John Island (County) COUNTY
1531 \N Grand Isle County (County) COUNTY
1532 \N Greenup County (County) COUNTY
1533 \N Morovis Municipio (County) COUNTY
1534 \N Olancho (State / Territory) STATE
1535 \N Faulk County (County) COUNTY
1536 \N Cottonwood County (County) COUNTY
1537 \N Waseca County (County) COUNTY
1538 \N Gilpin County (County) COUNTY
1539 \N Pike County (County) COUNTY
1540 \N Edmunds County (County) COUNTY
1541 \N Guánica Municipio (County) COUNTY
1542 \N Gadsden County (County) COUNTY
1543 \N Stutsman County (County) COUNTY
1544 \N Rock County (County) COUNTY
1545 \N Knott County (County) COUNTY
1546 \N Tuscarawas County (County) COUNTY
1547 \N Onondaga County (County) COUNTY
1548 \N Walsh County (County) COUNTY
1549 \N Niagara County (County) COUNTY
1550 \N Person County (County) COUNTY
1551 \N Teton County (County) COUNTY
1552 \N Jamaica (Country) COUNTRY
1553 \N Milwaukee County (County) COUNTY
1554 \N Amador County (County) COUNTY
1555 \N Morgan County (County) COUNTY
1556 \N McCook County (County) COUNTY
1557 \N Cannon County (County) COUNTY
1558 \N Drew County (County) COUNTY
1559 \N Switzerland County (County) COUNTY
1560 \N Falls Church city (County) COUNTY
1561 \N Putnam County (County) COUNTY
1562 \N Titus County (County) COUNTY
1563 \N Sullivan County (County) COUNTY
1564 \N Trumbull County (County) COUNTY
1565 \N La Habana (State / Territory) STATE
1566 \N Bremer County (County) COUNTY
1567 \N Morrison County (County) COUNTY
1568 \N Stoddard County (County) COUNTY
1569 \N Alabama (State / Territory) STATE
1570 \N Cheyenne County (County) COUNTY
1571 \N Macomb County (County) COUNTY
1572 \N St. Landry Parish (County) COUNTY
1573 \N Sheboygan County (County) COUNTY
1574 \N Aurora County (County) COUNTY
1575 \N Holguin (State / Territory) STATE
1576 \N New London County (County) COUNTY
1577 \N Antrim County (County) COUNTY
1578 \N Vermilion Parish (County) COUNTY
1579 \N Isle of Wight County (County) COUNTY
1580 \N St. Francis County (County) COUNTY
1581 \N Atlantida (State / Territory) STATE
1582 \N New Castle County (County) COUNTY
1583 \N Federation of Saint Kitts and Nevis (Country) COUNTRY
1584 \N Tunica County (County) COUNTY
1585 \N Attala County (County) COUNTY
1586 \N Accomack County (County) COUNTY
1587 \N Elkhart County (County) COUNTY
1588 \N Jack County (County) COUNTY
1589 \N Lempira (State / Territory) STATE
1590 \N Day County (County) COUNTY
1591 \N Lebanon County (County) COUNTY
1592 \N Yoro (State / Territory) STATE
1593 \N Prowers County (County) COUNTY
1594 \N Niobrara County (County) COUNTY
1595 \N Jasper County (County) COUNTY
1596 \N Deschutes County (County) COUNTY
1597 \N Orange County (County) COUNTY
1598 \N Madriz (State / Territory) STATE
1599 \N Otter Tail County (County) COUNTY
1600 \N District of Columbia (State / Territory) STATE
1601 \N Little River County (County) COUNTY
1602 \N Spencer County (County) COUNTY
1603 \N Monroe County (County) COUNTY
1604 \N Sutter County (County) COUNTY
1605 \N Richmond County (County) COUNTY
1606 \N Nassau County (County) COUNTY
1607 \N Dale County (County) COUNTY
1608 \N Luce County (County) COUNTY
1609 \N McKenzie County (County) COUNTY
1610 \N Cooper County (County) COUNTY
1611 \N New Kent County (County) COUNTY
1612 \N West Baton Rouge Parish (County) COUNTY
1613 \N Overton County (County) COUNTY
1614 \N Mecklenburg County (County) COUNTY
1615 \N North Slope Borough (County) COUNTY
1616 \N Dallam County (County) COUNTY
1617 \N Independencia (State / Territory) STATE
1618 \N Aitkin County (County) COUNTY
1619 \N Faribault County (County) COUNTY
1620 \N Comerío Municipio (County) COUNTY
1621 \N Edgefield County (County) COUNTY
1622 \N Fluvanna County (County) COUNTY
1623 \N Republic County (County) COUNTY
1624 \N Duplin County (County) COUNTY
1625 \N Hinds County (County) COUNTY
1626 \N Jo Daviess County (County) COUNTY
1627 \N Keith County (County) COUNTY
1628 \N Franklin Parish (County) COUNTY
1629 \N Trinity County (County) COUNTY
1630 \N Madison Parish (County) COUNTY
1631 \N Mountrail County (County) COUNTY
1632 \N Issaquena County (County) COUNTY
1633 \N Quitman County (County) COUNTY
1634 \N St. Tammany Parish (County) COUNTY
1635 \N Rolette County (County) COUNTY
1636 \N Klamath County (County) COUNTY
1637 \N Rhode Island (State / Territory) STATE
1638 \N Howell County (County) COUNTY
1639 \N Poinsett County (County) COUNTY
1640 \N Pulaski County (County) COUNTY
1641 \N Eureka County (County) COUNTY
1642 \N Poquoson city (County) COUNTY
1643 \N Norfolk County (County) COUNTY
1644 \N Galveston County (County) COUNTY
1645 \N Clearwater County (County) COUNTY
1646 \N Cascade County (County) COUNTY
1647 \N Laurel County (County) COUNTY
1648 \N Tyler County (County) COUNTY
1649 \N Dillon County (County) COUNTY
1650 \N Granma (State / Territory) STATE
1651 \N Dooly County (County) COUNTY
1652 \N Jerauld County (County) COUNTY
1653 \N Intibuca (State / Territory) STATE
1654 \N Harford County (County) COUNTY
1655 \N Wilson County (County) COUNTY
1656 \N Carroll County (County) COUNTY
1657 \N Chesapeake city (County) COUNTY
1658 \N Linn County (County) COUNTY
1659 \N Piatt County (County) COUNTY
1660 \N Fall River County (County) COUNTY
1661 \N Camden County (County) COUNTY
1662 \N Hamblen County (County) COUNTY
1663 \N Yauco Municipio (County) COUNTY
1664 \N Palo Pinto County (County) COUNTY
1665 \N Kalamazoo County (County) COUNTY
1666 \N Toa Alta Municipio (County) COUNTY
1667 \N Johnson County (County) COUNTY
1668 \N Hopkins County (County) COUNTY
1669 \N Carbon County (County) COUNTY
1670 \N Miller County (County) COUNTY
1671 \N Adair County (County) COUNTY
1672 \N Daggett County (County) COUNTY
1673 \N St. Joseph County (County) COUNTY
1674 \N Patillas Municipio (County) COUNTY
1675 \N Ashland County (County) COUNTY
1676 \N King William County (County) COUNTY
1677 \N Whatcom County (County) COUNTY
1678 \N Tyrrell County (County) COUNTY
1679 \N Corozal (State / Territory) STATE
1680 \N Ben Hill County (County) COUNTY
1681 \N Codington County (County) COUNTY
1682 \N Pueblo County (County) COUNTY
1683 \N District of Columbia (County) COUNTY
1684 \N Guayama (State / Territory) STATE
1685 \N Hoke County (County) COUNTY
1686 \N Wells County (County) COUNTY
1687 \N Cooke County (County) COUNTY
1688 \N Scott County (County) COUNTY
1689 \N Minnesota (State / Territory) STATE
1690 \N Alcorn County (County) COUNTY
1691 \N Gordon County (County) COUNTY
1692 \N Laramie County (County) COUNTY
1693 \N Ciudad de la Habana (State / Territory) STATE
1694 \N Gilmer County (County) COUNTY
1695 \N St. Johns County (County) COUNTY
1696 \N Breckinridge County (County) COUNTY
1697 \N Jenkins County (County) COUNTY
1698 \N Isabela Municipio (County) COUNTY
1699 \N Vernon Parish (County) COUNTY
1700 \N Chimaltenango (State / Territory) STATE
1701 \N Banks County (County) COUNTY
1702 \N Ceiba Municipio (County) COUNTY
1703 \N Cabarrus County (County) COUNTY
1704 \N San Juan County (County) COUNTY
1705 \N Sanborn County (County) COUNTY
1706 \N Hyde County (County) COUNTY
1707 \N Vega Alta Municipio (County) COUNTY
1708 \N Escambia County (County) COUNTY
1709 \N Lanier County (County) COUNTY
1710 \N Huehuetenango (State / Territory) STATE
1711 \N Bottineau County (County) COUNTY
1712 \N Meagher County (County) COUNTY
1713 \N Guantanamo Bay (State / Territory) STATE
1714 \N Aibonito Municipio (County) COUNTY
1715 \N Hanson County (County) COUNTY
1716 \N Trimble County (County) COUNTY
1717 \N Athens County (County) COUNTY
1718 \N Yakima County (County) COUNTY
1719 \N Grand Anse (State / Territory) STATE
1720 \N Kidder County (County) COUNTY
1721 \N Bronx County (County) COUNTY
1722 \N Becker County (County) COUNTY
1723 \N McMinn County (County) COUNTY
1724 \N Kingfisher County (County) COUNTY
1725 \N Mono County (County) COUNTY
1726 \N Ventura County (County) COUNTY
1727 \N Prairie County (County) COUNTY
1728 \N Powell County (County) COUNTY
1729 \N Campbell County (County) COUNTY
1730 \N King George County (County) COUNTY
1731 \N Hooker County (County) COUNTY
1732 \N Bolivar County (County) COUNTY
1733 \N Divide County (County) COUNTY
1734 \N Palo Alto County (County) COUNTY
1735 \N Christian County (County) COUNTY
1736 \N Camas County (County) COUNTY
1737 \N Conecuh County (County) COUNTY
1738 \N Granville County (County) COUNTY
1739 \N Treutlen County (County) COUNTY
1740 \N Treasure County (County) COUNTY
1741 \N St. Croix County (County) COUNTY
1742 \N LC (ISO Country Code) ISO_COUNTRY
1743 \N Weakley County (County) COUNTY
1744 \N Rusk County (County) COUNTY
1745 \N Rosebud County (County) COUNTY
1746 \N Reynolds County (County) COUNTY
1747 \N Outagamie County (County) COUNTY
1748 \N Meade County (County) COUNTY
1749 \N Montmorency County (County) COUNTY
1750 \N St. Lucie County (County) COUNTY
1751 \N Chicot County (County) COUNTY
1752 \N Cloud County (County) COUNTY
1753 \N Phelps County (County) COUNTY
1754 \N McLennan County (County) COUNTY
1755 \N Brazos County (County) COUNTY
1756 \N Lander County (County) COUNTY
1757 \N Cameron County (County) COUNTY
1758 \N Belize (State / Territory) STATE
1759 \N Guatemala (State / Territory) STATE
1760 \N Stann Creek (State / Territory) STATE
1761 \N Yakutat City and Borough (County) COUNTY
1762 \N Culpeper County (County) COUNTY
1763 \N Ciego de Avila (State / Territory) STATE
1764 \N LaGrange County (County) COUNTY
1765 \N Saguache County (County) COUNTY
1766 \N Schenectady County (County) COUNTY
1767 \N Iberville Parish (County) COUNTY
1768 \N Sumner County (County) COUNTY
1769 \N Conejos County (County) COUNTY
1770 \N Centre County (County) COUNTY
1771 \N Yates County (County) COUNTY
1772 \N Canada (Country) COUNTRY
1773 \N Lassen County (County) COUNTY
1774 \N El Dorado County (County) COUNTY
1775 \N Wicomico County (County) COUNTY
1776 \N Cecil County (County) COUNTY
1777 \N Freeborn County (County) COUNTY
1778 \N Pitkin County (County) COUNTY
1779 \N Guilford County (County) COUNTY
1780 \N Weston County (County) COUNTY
1781 \N Barceloneta Municipio (County) COUNTY
1782 \N Harvey County (County) COUNTY
1783 \N Manassas Park city (County) COUNTY
2011 \N Moore County (County) COUNTY
1784 \N Marquette County (County) COUNTY
1785 \N Pearl River County (County) COUNTY
1786 \N Owyhee County (County) COUNTY
1787 \N Preble County (County) COUNTY
1788 \N Shoshone County (County) COUNTY
1789 \N Somervell County (County) COUNTY
1790 \N Kodiak Island Borough (County) COUNTY
1791 \N Heard County (County) COUNTY
1792 \N Cidra Municipio (County) COUNTY
1793 \N Muskingum County (County) COUNTY
1794 \N Muskegon County (County) COUNTY
1795 \N Big Stone County (County) COUNTY
1796 \N Emanuel County (County) COUNTY
1797 \N Sublette County (County) COUNTY
1798 \N Echols County (County) COUNTY
1799 \N Marinette County (County) COUNTY
1800 \N Big Horn County (County) COUNTY
1801 \N Greene County (County) COUNTY
1802 \N Union County (County) COUNTY
1803 \N Houston County (County) COUNTY
1804 \N Barton County (County) COUNTY
1805 \N St. Louis city (County) COUNTY
1806 \N Vermont (State / Territory) STATE
1807 \N Commonwealth of The Bahamas (Country) COUNTRY
1808 \N Jefferson Parish (County) COUNTY
1809 \N Maria Trinidad S (State / Territory) STATE
1810 \N Caribou County (County) COUNTY
1811 \N Searcy County (County) COUNTY
1812 \N Hays County (County) COUNTY
1813 \N Sonsonate (State / Territory) STATE
1814 \N Saint Thomas (State / Territory) STATE
1815 \N Nicollet County (County) COUNTY
1816 \N Denton County (County) COUNTY
1817 \N Wadena County (County) COUNTY
1818 \N Barnes County (County) COUNTY
1819 \N Sharkey County (County) COUNTY
1820 \N Van Buren County (County) COUNTY
1821 \N Cuming County (County) COUNTY
1822 \N Salem city (County) COUNTY
1823 \N Mora County (County) COUNTY
1824 \N Muscatine County (County) COUNTY
1825 \N Arkansas (State / Territory) STATE
1826 \N Winston County (County) COUNTY
1827 \N Fresno County (County) COUNTY
1828 \N Staunton city (County) COUNTY
1829 \N Pettis County (County) COUNTY
1830 \N Columbia County (County) COUNTY
1831 \N Sanchez Ramirez (State / Territory) STATE
1832 \N Pedernales (State / Territory) STATE
1833 \N Norfolk city (County) COUNTY
1834 \N Wright County (County) COUNTY
1835 \N Trego County (County) COUNTY
1836 \N Stearns County (County) COUNTY
1837 \N Broadwater County (County) COUNTY
1838 \N Maunabo Municipio (County) COUNTY
1839 \N Charleston County (County) COUNTY
1840 \N Hartford County (County) COUNTY
1841 \N Strafford County (County) COUNTY
1842 \N Pierce County (County) COUNTY
1843 \N Guaynabo Municipio (County) COUNTY
1844 \N Wheatland County (County) COUNTY
1845 \N Roseau County (County) COUNTY
1846 \N Foster County (County) COUNTY
1847 \N Clinton County (County) COUNTY
1848 \N Marin County (County) COUNTY
1849 \N Oklahoma County (County) COUNTY
1850 \N Sioux County (County) COUNTY
1851 \N Sibley County (County) COUNTY
1852 \N Rensselaer County (County) COUNTY
1853 \N San Patricio County (County) COUNTY
1854 \N Cobb County (County) COUNTY
1855 \N El Seibo (State / Territory) STATE
1856 \N Pickens County (County) COUNTY
1857 \N Erath County (County) COUNTY
1858 \N Baca County (County) COUNTY
1859 \N Antigua & Barbuda (State / Territory) STATE
1860 \N Tattnall County (County) COUNTY
1861 \N Poweshiek County (County) COUNTY
1862 \N Oakland County (County) COUNTY
1863 \N Montgomery County (County) COUNTY
1864 \N Quintana Roo (State / Territory) STATE
1865 \N Currituck County (County) COUNTY
1866 \N Gladwin County (County) COUNTY
1867 \N Roane County (County) COUNTY
1868 \N Door County (County) COUNTY
1869 \N Brazoria County (County) COUNTY
1870 \N Allegany County (County) COUNTY
1871 \N Grays Harbor County (County) COUNTY
1872 \N Brunswick County (County) COUNTY
1873 \N Radford city (County) COUNTY
1874 \N Anderson County (County) COUNTY
1875 \N Ochiltree County (County) COUNTY
1876 \N Belmont County (County) COUNTY
1877 \N Green Lake County (County) COUNTY
1878 \N Toa Baja Municipio (County) COUNTY
1879 \N Okeechobee County (County) COUNTY
1880 \N Clallam County (County) COUNTY
1881 \N Dakota County (County) COUNTY
1882 \N Nicholas County (County) COUNTY
1883 \N Schuylkill County (County) COUNTY
1884 \N Modoc County (County) COUNTY
1885 \N Shawano County (County) COUNTY
1886 \N Asotin County (County) COUNTY
1887 \N Oconto County (County) COUNTY
1888 \N Colbert County (County) COUNTY
1889 \N Broome County (County) COUNTY
1890 \N Los Alamos County (County) COUNTY
1891 \N La Salle Parish (County) COUNTY
1892 \N Grafton County (County) COUNTY
1893 \N Shiawassee County (County) COUNTY
1894 \N Valverde (State / Territory) STATE
1895 \N Crenshaw County (County) COUNTY
1896 \N Bourbon County (County) COUNTY
1897 \N McDuffie County (County) COUNTY
1898 \N Ellsworth County (County) COUNTY
1899 \N De Soto Parish (County) COUNTY
1900 \N Sud (State / Territory) STATE
1901 \N Musselshell County (County) COUNTY
1902 \N Butte County (County) COUNTY
1903 \N Sevier County (County) COUNTY
1904 \N Kauai County (County) COUNTY
1905 \N Bath County (County) COUNTY
1906 \N Prince George's County (County) COUNTY
1907 \N Charlevoix County (County) COUNTY
1908 \N Toledo (State / Territory) STATE
1909 \N Chittenden County (County) COUNTY
1910 \N Cerro Gordo County (County) COUNTY
1911 \N Campeche (State / Territory) STATE
1912 \N South Dakota (State / Territory) STATE
1913 \N Guayama Municipio (County) COUNTY
1914 \N Georgetown County (County) COUNTY
1915 \N Zacapa (State / Territory) STATE
1916 \N Labette County (County) COUNTY
1917 \N Acadia Parish (County) COUNTY
1918 \N Lorain County (County) COUNTY
1919 \N Santa Rosa (State / Territory) STATE
1920 \N Juniata County (County) COUNTY
1921 \N La Altagracia (State / Territory) STATE
1922 \N Villalba Municipio (County) COUNTY
1923 \N Arlington County (County) COUNTY
1924 \N Morrow County (County) COUNTY
1925 \N Evangeline Parish (County) COUNTY
1926 \N Power County (County) COUNTY
1927 \N Garfield County (County) COUNTY
1928 \N Bannock County (County) COUNTY
1929 \N Navarro County (County) COUNTY
1930 \N Macon County (County) COUNTY
1931 \N Alameda County (County) COUNTY
1932 \N Newaygo County (County) COUNTY
1933 \N Calaveras County (County) COUNTY
1934 \N Buena Vista County (County) COUNTY
1935 \N Ulster County (County) COUNTY
1936 \N New Madrid County (County) COUNTY
1937 \N Northwest Territories (State / Territory) STATE
1938 \N Waupaca County (County) COUNTY
1939 \N Hand County (County) COUNTY
1940 \N CU (ISO Country Code) ISO_COUNTRY
1941 \N Fairfield County (County) COUNTY
1942 \N Meeker County (County) COUNTY
1943 \N Chalatenango (State / Territory) STATE
1944 \N Ketchikan Gateway Borough (County) COUNTY
1945 \N Porter County (County) COUNTY
1946 \N Dare County (County) COUNTY
1947 \N Arroyo Municipio (County) COUNTY
1948 \N Menifee County (County) COUNTY
1949 \N GP (ISO Country Code) ISO_COUNTRY
1950 \N Dickenson County (County) COUNTY
1951 \N Live Oak County (County) COUNTY
1952 \N Cuyahoga County (County) COUNTY
1953 \N Bucks County (County) COUNTY
1954 \N Saline County (County) COUNTY
1955 \N Rockland County (County) COUNTY
1956 \N Placer County (County) COUNTY
1957 \N Sancti Spiritus (State / Territory) STATE
1958 \N Evans County (County) COUNTY
1959 \N Bladen County (County) COUNTY
1960 \N Chouteau County (County) COUNTY
1961 \N McCracken County (County) COUNTY
1962 \N Bullock County (County) COUNTY
1963 \N Copan (State / Territory) STATE
1964 \N Yellowstone County (County) COUNTY
1965 \N Gallatin County (County) COUNTY
1966 \N Willacy County (County) COUNTY
1967 \N DeWitt County (County) COUNTY
1968 \N Ponce (State / Territory) STATE
1969 \N Unicoi County (County) COUNTY
1970 \N Sabine County (County) COUNTY
1971 \N Rutherford County (County) COUNTY
1972 \N Haakon County (County) COUNTY
1973 \N Franklin city (County) COUNTY
1974 \N Roanoke city (County) COUNTY
1975 \N Coal County (County) COUNTY
1976 \N Levy County (County) COUNTY
1977 \N Amite County (County) COUNTY
1978 \N Newfoundland (State / Territory) STATE
1979 \N Whitfield County (County) COUNTY
1980 \N Hardee County (County) COUNTY
1981 \N Tulare County (County) COUNTY
1982 \N St. John the Baptist Parish (County) COUNTY
1983 \N Latimer County (County) COUNTY
1984 \N Park County (County) COUNTY
1985 \N Nance County (County) COUNTY
1986 \N Wharton County (County) COUNTY
1987 \N Orocovis Municipio (County) COUNTY
1988 \N Worth County (County) COUNTY
1989 \N Owsley County (County) COUNTY
1990 \N Hitchcock County (County) COUNTY
1991 \N Bahamas (State / Territory) STATE
1992 \N Santiago de Cuba (State / Territory) STATE
1993 \N Schley County (County) COUNTY
1994 \N Denver County (County) COUNTY
1995 \N Fajardo Municipio (County) COUNTY
1996 \N Prince Edward Island (State / Territory) STATE
1997 \N Ringgold County (County) COUNTY
1998 \N Koochiching County (County) COUNTY
1999 \N Santa Rosa County (County) COUNTY
2000 \N Harrisonburg city (County) COUNTY
2001 \N Burlington County (County) COUNTY
2002 \N Botetourt County (County) COUNTY
2003 \N Lonoke County (County) COUNTY
2004 \N Ontario (State / Territory) STATE
2005 \N San Bernardino County (County) COUNTY
2006 \N Mifflin County (County) COUNTY
2007 \N Solola (State / Territory) STATE
2008 \N Dunn County (County) COUNTY
2009 \N Kenosha County (County) COUNTY
2010 \N Mayag?ez (State / Territory) STATE
2012 \N Yellow Medicine County (County) COUNTY
2013 \N Griggs County (County) COUNTY
2014 \N Prentiss County (County) COUNTY
2015 \N Saint Elizabeth (State / Territory) STATE
2016 \N Rutland County (County) COUNTY
2017 \N Hunt County (County) COUNTY
2018 \N Isabella County (County) COUNTY
2019 \N Yazoo County (County) COUNTY
2020 \N Salcedo (State / Territory) STATE
2021 \N Río Grande Municipio (County) COUNTY
2022 \N Laurens County (County) COUNTY
2023 \N Madison County (County) COUNTY
2024 \N Woodbury County (County) COUNTY
2025 \N Bowman County (County) COUNTY
2026 \N Bedford city (County) COUNTY
2027 \N Hawaii (State / Territory) STATE
2028 \N Appanoose County (County) COUNTY
2029 \N Santiago (State / Territory) STATE
2030 \N Leelanau County (County) COUNTY
2031 \N Glacier County (County) COUNTY
2032 \N Peñuelas Municipio (County) COUNTY
2033 \N Arthur County (County) COUNTY
2034 \N Shawnee County (County) COUNTY
2035 \N De Witt County (County) COUNTY
2036 \N Cassia County (County) COUNTY
2037 \N Suchitepequez (State / Territory) STATE
2038 \N St. Lucia (State / Territory) STATE
2039 \N Blackford County (County) COUNTY
2040 \N Fairfax County (County) COUNTY
2041 \N Coffey County (County) COUNTY
2042 \N St. Mary Parish (County) COUNTY
2043 \N Pickaway County (County) COUNTY
2044 \N Hampden County (County) COUNTY
2045 \N Susquehanna County (County) COUNTY
2046 \N Carver County (County) COUNTY
2047 \N Yuma County (County) COUNTY
2048 \N Weber County (County) COUNTY
2049 \N Sonoma County (County) COUNTY
2050 \N Newport News city (County) COUNTY
2051 \N Saunders County (County) COUNTY
2052 \N Buena Vista city (County) COUNTY
2053 \N Graves County (County) COUNTY
2054 \N Presque Isle County (County) COUNTY
2055 \N Van Zandt County (County) COUNTY
2056 \N Commonwealth of Puerto Rico (Country) COUNTRY
2057 \N San Salvador (State / Territory) STATE
2058 \N Virginia Beach city (County) COUNTY
2059 \N Woodruff County (County) COUNTY
2060 \N Washington Parish (County) COUNTY
2061 \N Ocotepeque (State / Territory) STATE
2062 \N Oregon (State / Territory) STATE
2063 \N Kit Carson County (County) COUNTY
2064 \N Caldwell Parish (County) COUNTY
2065 \N Parker County (County) COUNTY
2066 \N Whitman County (County) COUNTY
2067 \N Portage County (County) COUNTY
2068 \N Greeley County (County) COUNTY
2069 \N Jinotega (State / Territory) STATE
2070 \N Marlboro County (County) COUNTY
2071 \N Oaxaca (State / Territory) STATE
2072 \N Rio Arriba County (County) COUNTY
2073 \N Deuel County (County) COUNTY
2074 \N Thayer County (County) COUNTY
2075 \N San Luis Obispo County (County) COUNTY
2076 \N Starke County (County) COUNTY
2077 \N DeSoto County (County) COUNTY
2078 \N Summit County (County) COUNTY
2079 \N Dorado Municipio (County) COUNTY
2080 \N St. Charles County (County) COUNTY
2081 \N Denali Borough (County) COUNTY
2082 \N Wade Hampton Census Area (County) COUNTY
2083 \N Freestone County (County) COUNTY
2084 \N Summers County (County) COUNTY
2085 \N Coffee County (County) COUNTY
2086 \N Wilkes County (County) COUNTY
2087 \N Iosco County (County) COUNTY
2088 \N New York County (County) COUNTY
2089 \N British Virgin Is. (State / Territory) STATE
2090 \N Nash County (County) COUNTY
2091 \N Charlottesville city (County) COUNTY
2092 \N Alexandria city (County) COUNTY
2093 \N Jerome County (County) COUNTY
2094 \N Sweet Grass County (County) COUNTY
2095 \N Caroline County (County) COUNTY
2096 \N Plymouth County (County) COUNTY
2097 \N Ripley County (County) COUNTY
2098 \N Red River Parish (County) COUNTY
2099 \N Skamania County (County) COUNTY
2100 \N Spotsylvania County (County) COUNTY
2101 \N Larimer County (County) COUNTY
2102 \N Luzerne County (County) COUNTY
2103 \N Colfax County (County) COUNTY
2104 \N Kingman County (County) COUNTY
2105 \N Claiborne Parish (County) COUNTY
2106 \N Kootenai County (County) COUNTY
2107 \N Columbus County (County) COUNTY
2108 \N Keokuk County (County) COUNTY
2109 \N Oceana County (County) COUNTY
2110 \N Haines Borough (County) COUNTY
2111 \N Sagadahoc County (County) COUNTY
2112 \N Lexington County (County) COUNTY
2113 \N Erie County (County) COUNTY
2114 \N Yankton County (County) COUNTY
2115 \N Bingham County (County) COUNTY
2116 \N Nowata County (County) COUNTY
2117 \N Swain County (County) COUNTY
2118 \N Cayuga County (County) COUNTY
2119 \N Ouachita County (County) COUNTY
2120 \N Ohio (State / Territory) STATE
2121 \N Louisiana (State / Territory) STATE
2122 \N Craig County (County) COUNTY
2123 \N Saint James (State / Territory) STATE
2124 \N Olmsted County (County) COUNTY
2125 \N Woodward County (County) COUNTY
2126 \N Waushara County (County) COUNTY
2127 \N Oconee County (County) COUNTY
2128 \N Winnebago County (County) COUNTY
2129 \N Rockbridge County (County) COUNTY
2130 \N Franklin County (County) COUNTY
2131 \N Itasca County (County) COUNTY
2132 \N Gregg County (County) COUNTY
2133 \N Grand Forks County (County) COUNTY
2134 \N Ware County (County) COUNTY
2135 \N Tompkins County (County) COUNTY
2136 \N Umatilla County (County) COUNTY
2137 \N Jefferson Davis Parish (County) COUNTY
2138 \N Cowley County (County) COUNTY
2139 \N Monte Cristi (State / Territory) STATE
2140 \N Frederick County (County) COUNTY
2141 \N Angelina County (County) COUNTY
2142 \N Stafford County (County) COUNTY
2143 \N Hanover County (County) COUNTY
2144 \N Leon County (County) COUNTY
2145 \N Danville city (County) COUNTY
2146 \N Platte County (County) COUNTY
2147 \N Berkeley County (County) COUNTY
2148 \N Wyandotte County (County) COUNTY
2149 \N Collin County (County) COUNTY
2150 \N Kingston (State / Territory) STATE
2151 \N Greenwood County (County) COUNTY
2152 \N Riverside County (County) COUNTY
2153 \N Catoosa County (County) COUNTY
2154 \N Gogebic County (County) COUNTY
2155 \N Yadkin County (County) COUNTY
2156 \N Piscataquis County (County) COUNTY
2157 \N Dillingham Census Area (County) COUNTY
2158 \N Wyoming (State / Territory) STATE
2159 \N San Juan (State / Territory) STATE
2160 \N Elmore County (County) COUNTY
2161 \N Snohomish County (County) COUNTY
2162 \N San Benito County (County) COUNTY
2163 \N Tabasco (State / Territory) STATE
2164 \N St. Martin Parish (County) COUNTY
2165 \N Vance County (County) COUNTY
2166 \N Dolores County (County) COUNTY
2167 \N Gilliam County (County) COUNTY
2168 \N Sargent County (County) COUNTY
2169 \N Liberty County (County) COUNTY
2170 \N Bleckley County (County) COUNTY
2171 \N Union Parish (County) COUNTY
2172 \N Bledsoe County (County) COUNTY
2173 \N Clarke County (County) COUNTY
2174 \N Clinch County (County) COUNTY
2175 \N Adjuntas Municipio (County) COUNTY
2176 \N Cleveland County (County) COUNTY
2177 \N Hughes County (County) COUNTY
2178 \N Lipscomb County (County) COUNTY
2179 \N Sac County (County) COUNTY
2180 \N Peoria County (County) COUNTY
2181 \N Riley County (County) COUNTY
2182 \N Kern County (County) COUNTY
2183 \N Pend Oreille County (County) COUNTY
2184 \N Maryland (State / Territory) STATE
2185 \N Quezaltenango (State / Territory) STATE
2186 \N Hinsdale County (County) COUNTY
2187 \N Smith County (County) COUNTY
2188 \N Rains County (County) COUNTY
2189 \N Vega Baja Municipio (County) COUNTY
2190 \N Yell County (County) COUNTY
2191 \N Wetzel County (County) COUNTY
2192 \N Santa Clara County (County) COUNTY
2193 \N Nodaway County (County) COUNTY
2194 \N Billings County (County) COUNTY
2195 \N Richmond city (County) COUNTY
2196 \N Dutchess County (County) COUNTY
2197 \N LaSalle County (County) COUNTY
2198 \N Fallon County (County) COUNTY
2199 \N Bear Lake County (County) COUNTY
2200 \N Seneca County (County) COUNTY
2201 \N Tuolumne County (County) COUNTY
2202 \N Hettinger County (County) COUNTY
2203 \N Arenac County (County) COUNTY
2204 \N Sussex County (County) COUNTY
2205 \N Hato Major (State / Territory) STATE
2206 \N Richardson County (County) COUNTY
2207 \N Sawyer County (County) COUNTY
2208 \N Yukon-Koyukuk Census Area (County) COUNTY
2209 \N Alger County (County) COUNTY
2210 \N Ada County (County) COUNTY
2211 \N McCone County (County) COUNTY
2212 \N Boundary County (County) COUNTY
2213 \N Aleutians East Borough (County) COUNTY
2214 \N Steele County (County) COUNTY
2215 \N Juncos Municipio (County) COUNTY
2216 \N San Joaquin County (County) COUNTY
2217 \N Mineral County (County) COUNTY
2218 \N Vermillion County (County) COUNTY
2219 \N Darlington County (County) COUNTY
2220 \N Hennepin County (County) COUNTY
2221 \N Suffolk city (County) COUNTY
2222 \N Pinar del Rio (State / Territory) STATE
2223 \N Hillsborough County (County) COUNTY
2224 \N White County (County) COUNTY
2225 \N Nueva Segovia (State / Territory) STATE
2226 \N Red Lake County (County) COUNTY
2227 \N Smyth County (County) COUNTY
2228 \N Refugio County (County) COUNTY
2229 \N Wrangell City and Borough (County) COUNTY
2230 \N Yolo County (County) COUNTY
2459 \N Valle (State / Territory) STATE
2231 \N Limestone County (County) COUNTY
2232 \N Glynn County (County) COUNTY
2233 \N Kitsap County (County) COUNTY
2234 \N Tooele County (County) COUNTY
2235 \N Commonwealth of Dominica (Country) COUNTRY
2236 \N Murray County (County) COUNTY
2237 \N Osage County (County) COUNTY
2238 \N PM (ISO Country Code) ISO_COUNTRY
2239 \N Noble County (County) COUNTY
2240 \N Onslow County (County) COUNTY
2241 \N Alamance County (County) COUNTY
2242 \N Charles Mix County (County) COUNTY
2243 \N Anne Arundel County (County) COUNTY
2244 \N Fannin County (County) COUNTY
2245 \N Natrona County (County) COUNTY
2246 \N Skagit County (County) COUNTY
2247 \N Cabell County (County) COUNTY
2248 \N Taliaferro County (County) COUNTY
2249 \N Stark County (County) COUNTY
2250 \N Golden Valley County (County) COUNTY
2251 \N Wagoner County (County) COUNTY
2252 \N Mahaska County (County) COUNTY
2253 \N Nantucket County (County) COUNTY
2254 \N Meriwether County (County) COUNTY
2255 \N Oneida County (County) COUNTY
2256 \N Patrick County (County) COUNTY
2257 \N Hillsdale County (County) COUNTY
2258 \N Pope County (County) COUNTY
2259 \N Kossuth County (County) COUNTY
2260 \N Desha County (County) COUNTY
2261 \N Gregory County (County) COUNTY
2262 \N Lafourche Parish (County) COUNTY
2263 \N Utah County (County) COUNTY
2264 \N Cass County (County) COUNTY
2265 \N Suwannee County (County) COUNTY
2266 \N Corozal Municipio (County) COUNTY
2267 \N Toole County (County) COUNTY
2268 \N Somerset County (County) COUNTY
2269 \N Prince George County (County) COUNTY
2270 \N Forsyth County (County) COUNTY
2271 \N Estill County (County) COUNTY
2272 \N Cabo Rojo Municipio (County) COUNTY
2273 \N Florida (State / Territory) STATE
2274 \N St. Louis County (County) COUNTY
2275 \N Leflore County (County) COUNTY
2276 \N Taney County (County) COUNTY
2277 \N McNairy County (County) COUNTY
2278 \N Hendricks County (County) COUNTY
2279 \N Northampton County (County) COUNTY
2280 \N McClain County (County) COUNTY
2281 \N Claiborne County (County) COUNTY
2282 \N Rich County (County) COUNTY
2283 \N Distrito Nacional (State / Territory) STATE
2284 \N Mower County (County) COUNTY
2285 \N Moniteau County (County) COUNTY
2286 \N Ocean County (County) COUNTY
2287 \N Sanpete County (County) COUNTY
2288 \N Pershing County (County) COUNTY
2289 \N Merrimack County (County) COUNTY
2290 \N Le Flore County (County) COUNTY
2291 \N Bristol Bay Borough (County) COUNTY
2292 \N Washakie County (County) COUNTY
2293 \N Lee County (County) COUNTY
2294 \N Mahnomen County (County) COUNTY
2295 \N Robertson County (County) COUNTY
2296 \N Nevada County (County) COUNTY
2297 \N Frontier County (County) COUNTY
2298 \N Elbert County (County) COUNTY
2299 \N West Feliciana Parish (County) COUNTY
2300 \N Montcalm County (County) COUNTY
2301 \N Southeast Fairbanks Census Area (County) COUNTY
2302 \N Allegan County (County) COUNTY
2303 \N New Haven County (County) COUNTY
2304 \N Wood County (County) COUNTY
2305 \N Bamberg County (County) COUNTY
2306 \N James City County (County) COUNTY
2307 \N La Union (State / Territory) STATE
2308 \N Emmons County (County) COUNTY
2309 \N Saint Ann (State / Territory) STATE
2310 \N Duchesne County (County) COUNTY
2311 \N Montana (State / Territory) STATE
2312 \N Republic of Nicaragua (Country) COUNTRY
2313 \N Copiah County (County) COUNTY
2314 \N Aleutians West Census Area (County) COUNTY
2315 \N Mackinac County (County) COUNTY
2316 \N Plumas County (County) COUNTY
2317 \N Keya Paha County (County) COUNTY
2318 \N Bienville Parish (County) COUNTY
2319 \N Rankin County (County) COUNTY
2320 \N Jalapa (State / Territory) STATE
2321 \N Cuscatlan (State / Territory) STATE
2322 \N Walworth County (County) COUNTY
2323 \N Emmet County (County) COUNTY
2324 \N Cache County (County) COUNTY
2325 \N Allegheny County (County) COUNTY
2326 \N Charlotte County (County) COUNTY
2327 \N Charlton County (County) COUNTY
2328 \N Coosa County (County) COUNTY
2329 \N Greenbrier County (County) COUNTY
2330 \N Tift County (County) COUNTY
2331 \N Nez Perce County (County) COUNTY
2332 \N Dixon County (County) COUNTY
2333 \N Audubon County (County) COUNTY
2334 \N Loudon County (County) COUNTY
2335 \N Barbour County (County) COUNTY
2336 \N Rockingham County (County) COUNTY
2337 \N Glascock County (County) COUNTY
2338 \N Dubois County (County) COUNTY
2339 \N Barnwell County (County) COUNTY
2340 \N North Dakota (State / Territory) STATE
2341 \N Sud-Est (State / Territory) STATE
2342 \N Davidson County (County) COUNTY
2343 \N San Mateo County (County) COUNTY
2344 \N Westmoreland (State / Territory) STATE
2345 \N Totonicapan (State / Territory) STATE
2346 \N Collier County (County) COUNTY
2347 \N Izabal (State / Territory) STATE
2348 \N San Juan Municipio (County) COUNTY
2349 \N McDowell County (County) COUNTY
2350 \N Telfair County (County) COUNTY
2351 \N Maui County (County) COUNTY
2352 \N Clayton County (County) COUNTY
2353 \N Macoupin County (County) COUNTY
2354 \N Alta Verapaz (State / Territory) STATE
2355 \N Tazewell County (County) COUNTY
2356 \N Pender County (County) COUNTY
2357 \N Naranjito Municipio (County) COUNTY
2358 \N Lake and Peninsula Borough (County) COUNTY
2359 \N Ozark County (County) COUNTY
2360 \N Assumption Parish (County) COUNTY
2361 \N Dearborn County (County) COUNTY
2362 \N Vieques Municipio (County) COUNTY
2363 \N Wake County (County) COUNTY
2364 \N Jennings County (County) COUNTY
2365 \N Menominee County (County) COUNTY
2366 \N Ouray County (County) COUNTY
2367 \N Oliver County (County) COUNTY
2368 \N Chattooga County (County) COUNTY
2369 \N Humphreys County (County) COUNTY
2370 \N Elk County (County) COUNTY
2371 \N Gwinnett County (County) COUNTY
2372 \N Rogers County (County) COUNTY
2373 \N Rush County (County) COUNTY
2374 \N Iroquois County (County) COUNTY
2375 \N Love County (County) COUNTY
2376 \N Santa Barbara County (County) COUNTY
2377 \N Slope County (County) COUNTY
2378 \N Berks County (County) COUNTY
2379 \N Jackson Parish (County) COUNTY
2380 \N Livingston County (County) COUNTY
2381 \N Broward County (County) COUNTY
2382 \N Steuben County (County) COUNTY
2383 \N Las Animas County (County) COUNTY
2384 \N Chilton County (County) COUNTY
2385 \N Payette County (County) COUNTY
2386 \N Isla de la Juventud (State / Territory) STATE
2387 \N Santa Ana (State / Territory) STATE
2388 \N Cameron Parish (County) COUNTY
2389 \N Beaufort County (County) COUNTY
2390 \N Craven County (County) COUNTY
2391 \N Contra Costa County (County) COUNTY
2392 \N Tillamook County (County) COUNTY
2393 \N Jayuya Municipio (County) COUNTY
2394 \N Bibb County (County) COUNTY
2395 \N La Plata County (County) COUNTY
2396 \N Nemaha County (County) COUNTY
2397 \N Cleburne County (County) COUNTY
2398 \N Esmeralda County (County) COUNTY
2399 \N Talbot County (County) COUNTY
2400 \N Doddridge County (County) COUNTY
2401 \N Ste. Genevieve County (County) COUNTY
2402 \N Holt County (County) COUNTY
2403 \N Bedford County (County) COUNTY
2404 \N Forest County (County) COUNTY
2405 \N Sarpy County (County) COUNTY
2406 \N Tensas Parish (County) COUNTY
2407 \N La Estrelleta (State / Territory) STATE
2408 \N Callaway County (County) COUNTY
2409 \N GL (ISO Country Code) ISO_COUNTRY
2410 \N New Hanover County (County) COUNTY
2411 \N Nye County (County) COUNTY
2412 \N Seminole County (County) COUNTY
2413 \N Chattahoochee County (County) COUNTY
2414 \N Broomfield County (County) COUNTY
2415 \N Red Willow County (County) COUNTY
2416 \N Hickman County (County) COUNTY
2417 \N Faulkner County (County) COUNTY
2418 \N Butts County (County) COUNTY
2419 \N AI (ISO Country Code) ISO_COUNTRY
2420 \N Hot Springs County (County) COUNTY
2421 \N McHenry County (County) COUNTY
2422 \N Kenedy County (County) COUNTY
2423 \N Towns County (County) COUNTY
2424 \N Powder River County (County) COUNTY
2425 \N Scotts Bluff County (County) COUNTY
2426 \N Rowan County (County) COUNTY
2427 \N Tuscaloosa County (County) COUNTY
2428 \N Preston County (County) COUNTY
2429 \N Aroostook County (County) COUNTY
2430 \N Owen County (County) COUNTY
2431 \N Edgecombe County (County) COUNTY
2432 \N Montrose County (County) COUNTY
2433 \N Gratiot County (County) COUNTY
2434 \N Milam County (County) COUNTY
2435 \N Hood River County (County) COUNTY
2436 \N Wexford County (County) COUNTY
2437 \N Calhoun County (County) COUNTY
2438 \N Rabun County (County) COUNTY
2439 \N Boyd County (County) COUNTY
2440 \N Tangipahoa Parish (County) COUNTY
2441 \N Brule County (County) COUNTY
2442 \N Rhea County (County) COUNTY
2443 \N British Virgin Islands (Country) COUNTRY
2444 \N Rapides Parish (County) COUNTY
2445 \N St. Pierre & Miquelon (State / Territory) STATE
2446 \N Nova Scotia (State / Territory) STATE
2447 \N Bradley County (County) COUNTY
2448 \N Archuleta County (County) COUNTY
2449 \N Burke County (County) COUNTY
2450 \N Aguadilla (State / Territory) STATE
2451 \N Dominican Republic (Country) COUNTRY
2452 \N Washington County (County) COUNTY
2453 \N Dunklin County (County) COUNTY
2454 \N Livingston Parish (County) COUNTY
2455 \N Bermuda (State / Territory) STATE
2456 \N Saginaw County (County) COUNTY
2457 \N Otoe County (County) COUNTY
2458 \N Chippewa County (County) COUNTY
2460 \N Gallia County (County) COUNTY
2461 \N Virgin Is. (State / Territory) STATE
2462 \N Osborne County (County) COUNTY
2463 \N Traill County (County) COUNTY
2464 \N Phillips County (County) COUNTY
2465 \N Ascension Parish (County) COUNTY
2466 \N La Paz County (County) COUNTY
2467 \N Lajas Municipio (County) COUNTY
2468 \N Newport County (County) COUNTY
2469 \N Randolph County (County) COUNTY
2470 \N San Jacinto County (County) COUNTY
2471 \N Hayes County (County) COUNTY
2472 \N Lake County (County) COUNTY
2473 \N Natchitoches Parish (County) COUNTY
2474 \N Fountain County (County) COUNTY
2475 \N Bacon County (County) COUNTY
2476 \N Beadle County (County) COUNTY
2477 \N Goshen County (County) COUNTY
2478 \N Indiana County (County) COUNTY
2479 \N Alfalfa County (County) COUNTY
2480 \N Winn Parish (County) COUNTY
2481 \N Santa Barbara (State / Territory) STATE
2482 \N Goliad County (County) COUNTY
2483 \N Wilcox County (County) COUNTY
2484 \N Williamsburg city (County) COUNTY
2485 \N Butler County (County) COUNTY
2486 \N Mingo County (County) COUNTY
2487 \N Baraga County (County) COUNTY
2488 \N Kemper County (County) COUNTY
2489 \N Trelawny (State / Territory) STATE
2490 \N Pennsylvania (State / Territory) STATE
2491 \N Williamson County (County) COUNTY
2492 \N Chautauqua County (County) COUNTY
2493 \N KN (ISO Country Code) ISO_COUNTRY
2494 \N Jefferson Davis County (County) COUNTY
2495 \N Westmoreland County (County) COUNTY
2496 \N Lynchburg city (County) COUNTY
2497 \N Box Butte County (County) COUNTY
2498 \N United States Virgin Islands (Country) COUNTRY
2499 \N Kittson County (County) COUNTY
2500 \N Barranquitas Municipio (County) COUNTY
2501 \N Sedgwick County (County) COUNTY
2502 \N Ionia County (County) COUNTY
2503 \N Cedar County (County) COUNTY
2504 \N Essex County (County) COUNTY
2505 \N Flagler County (County) COUNTY
2506 \N Fentress County (County) COUNTY
2507 \N Baltimore County (County) COUNTY
2508 \N Sabine Parish (County) COUNTY
2509 \N Shasta County (County) COUNTY
2510 \N Harper County (County) COUNTY
2511 \N VG (ISO Country Code) ISO_COUNTRY
2512 \N Gulf County (County) COUNTY
2513 \N BO (ISO Country Code) ISO_COUNTRY
2514 \N Republic of Bolivia (Country) COUNTRY
2515 \N Puno (State / Territory) STATE
2516 \N Republic of Peru (Country) COUNTRY
2517 \N PE (ISO Country Code) ISO_COUNTRY
2518 \N RU (ISO Country Code) ISO_COUNTRY
2519 \N Chukotskiy avtonomnyy okrug (State / Territory) STATE
2520 \N Russian Federation (Country) COUNTRY
2521 \N Hedmark (State / Territory) STATE
2522 \N SE (ISO Country Code) ISO_COUNTRY
2523 \N Vest-Agder (State / Territory) STATE
2524 \N Sogn Og Fjordane (State / Territory) STATE
2525 \N Ostfold (State / Territory) STATE
2526 \N Vestfold (State / Territory) STATE
2527 \N Aust-Agder (State / Territory) STATE
2528 \N Telemark (State / Territory) STATE
2529 \N Goteborgs Och Bohus (State / Territory) STATE
2530 \N Alvsborgs (State / Territory) STATE
2531 \N Kingdom of Sweden (Country) COUNTRY
2532 \N Kingdom of Norway (Country) COUNTRY
2533 \N Buskerud (State / Territory) STATE
2534 \N NO (ISO Country Code) ISO_COUNTRY
2535 \N Varmlands (State / Territory) STATE
2536 \N Oslo (State / Territory) STATE
2537 \N Oppland (State / Territory) STATE
2538 \N Akershus (State / Territory) STATE
2539 \N Ngamiland (State / Territory) STATE
2540 \N BW (ISO Country Code) ISO_COUNTRY
2541 \N Boesmanland (State / Territory) STATE
2542 \N Republic of Botswana (Country) COUNTRY
2543 \N Republic of Namibia (Country) COUNTRY
2544 \N NA (ISO Country Code) ISO_COUNTRY
2545 \N French Republic (Country) COUNTRY
2546 \N Basse-Normandie (State / Territory) STATE
2547 \N Picardie (State / Territory) STATE
2548 \N GB (ISO Country Code) ISO_COUNTRY
2549 \N Isle of Man (State / Territory) STATE
2550 \N England (State / Territory) STATE
2551 \N Nord-Pas-de-Calais (State / Territory) STATE
2552 \N FR (ISO Country Code) ISO_COUNTRY
2553 \N Wales (State / Territory) STATE
2554 \N United Kingdom of Great Britain and Nort (Country) COUNTRY
2555 \N Scotland (State / Territory) STATE
2556 \N Haute-Normandie (State / Territory) STATE
2557 \N Northern Ireland (State / Territory) STATE
2558 \N Ireland (Country) COUNTRY
2559 \N Ulster (State / Territory) STATE
2560 \N IE (ISO Country Code) ISO_COUNTRY
2561 \N Leinster (State / Territory) STATE
2562 \N Munster (State / Territory) STATE
2563 \N Isle of Man (Country) COUNTRY
2564 \N Connacht (State / Territory) STATE
2565 \N Hainaut (State / Territory) STATE
2566 \N Guernsey (State / Territory) STATE
2567 \N Kingdom of Belgium (Country) COUNTRY
2568 \N Bailiwick of Guernsey (Country) COUNTRY
2569 \N BE (ISO Country Code) ISO_COUNTRY
2570 \N West-Vlaanderen (State / Territory) STATE
2571 \N Nordgronland (State / Territory) STATE
2572 \N Vesturland (State / Territory) STATE
2573 \N Vestfirdhir (State / Territory) STATE
2574 \N Reykjavik (State / Territory) STATE
2575 \N Sudhurland (State / Territory) STATE
2576 \N Republic of Iceland (Country) COUNTRY
2577 \N Nordhurland Eystra (State / Territory) STATE
2578 \N IS (ISO Country Code) ISO_COUNTRY
2579 \N Austurland (State / Territory) STATE
2580 \N Nordhurland Vestra (State / Territory) STATE
2581 \N Gaziantep (State / Territory) STATE
2582 \N TR (ISO Country Code) ISO_COUNTRY
2583 \N Malatya (State / Territory) STATE
2584 \N Adana (State / Territory) STATE
2585 \N Adiyaman (State / Territory) STATE
2586 \N Republic of Turkey (Country) COUNTRY
2587 \N Kahraman Maras (State / Territory) STATE
2588 \N Ostgronland (State / Territory) STATE
2589 \N Nord-Trondelag (State / Territory) STATE
2590 \N Rogaland (State / Territory) STATE
2591 \N Faroe Islands (Country) COUNTRY
2592 \N Sor-Trondelag (State / Territory) STATE
2593 \N FO (ISO Country Code) ISO_COUNTRY
2594 \N Faeroe Islands (State / Territory) STATE
2595 \N Jamtlands (State / Territory) STATE
2596 \N Hordaland (State / Territory) STATE
2597 \N Nordland (State / Territory) STATE
2598 \N More Og Romsdal (State / Territory) STATE
2599 \N Chiriqui (State / Territory) STATE
2600 \N PA (ISO Country Code) ISO_COUNTRY
2601 \N Republic of Panama (Country) COUNTRY
2602 \N Bocas del Toro (State / Territory) STATE
2603 \N Rota Municipality (County) COUNTY
2604 \N Darien (State / Territory) STATE
2605 \N Panama (State / Territory) STATE
2606 \N Los Santos (State / Territory) STATE
2607 \N Choco (State / Territory) STATE
2608 \N Antioquia (State / Territory) STATE
2609 \N Veraguas (State / Territory) STATE
2610 \N Republic of Colombia (Country) COUNTRY
2611 \N San Blas (State / Territory) STATE
2612 \N Herrera (State / Territory) STATE
2613 \N CO (ISO Country Code) ISO_COUNTRY
2614 \N Cocle (State / Territory) STATE
2615 \N Republic of Costa Rica (Country) COUNTRY
2616 \N CR (ISO Country Code) ISO_COUNTRY
2617 \N Puntarenas (State / Territory) STATE
2618 \N Limon (State / Territory) STATE
2619 \N Caldas (State / Territory) STATE
2620 \N Huila (State / Territory) STATE
2621 \N Chontales (State / Territory) STATE
2622 \N Chinandega (State / Territory) STATE
2623 \N Valle del Cauca (State / Territory) STATE
2624 \N Tolima (State / Territory) STATE
2625 \N Guanacaste (State / Territory) STATE
2626 \N Sucre (State / Territory) STATE
2627 \N Matagalpa (State / Territory) STATE
2628 \N Cartago (State / Territory) STATE
2629 \N San Andres y Providencia (State / Territory) STATE
2630 \N Masaya (State / Territory) STATE
2631 \N Heredia (State / Territory) STATE
2632 \N Cordoba (State / Territory) STATE
2633 \N Bolivar (State / Territory) STATE
2634 \N Risaralda (State / Territory) STATE
2635 \N Quindio (State / Territory) STATE
2636 \N Alajuela (State / Territory) STATE
2637 \N Cauca (State / Territory) STATE
2638 \N Leon (State / Territory) STATE
2639 \N Boaco (State / Territory) STATE
2640 \N Carazo (State / Territory) STATE
2641 \N San Jose (State / Territory) STATE
2642 \N Atlantico (State / Territory) STATE
2643 \N Rivas (State / Territory) STATE
2644 \N Managua (State / Territory) STATE
2645 \N Granada (State / Territory) STATE
2646 \N Esteli (State / Territory) STATE
2647 \N Rio San Juan (State / Territory) STATE
2648 \N East Berbice-Corentyne (State / Territory) STATE
2649 \N Guainia (State / Territory) STATE
2650 \N TT (ISO Country Code) ISO_COUNTRY
2651 \N BR (ISO Country Code) ISO_COUNTRY
2652 \N Loja (State / Territory) STATE
2653 \N St. Vincent & the Grenadines (State / Territory) STATE
2654 \N Guarico (State / Territory) STATE
2655 \N Casanare (State / Territory) STATE
2656 \N Yaracuy (State / Territory) STATE
2657 \N Canar (State / Territory) STATE
2658 \N Neuva Esparta (State / Territory) STATE
2659 \N Aragua (State / Territory) STATE
2660 \N Para (State / Territory) STATE
2661 \N Portuguesa (State / Territory) STATE
2662 \N Guayas (State / Territory) STATE
2663 \N Miranda (State / Territory) STATE
2664 \N Imbabura (State / Territory) STATE
2665 \N Sucumbios (State / Territory) STATE
2666 \N Bolivarian Republic of Venezuela (Country) COUNTRY
2667 \N Piura (State / Territory) STATE
2668 \N Falcon (State / Territory) STATE
2669 \N Carchi (State / Territory) STATE
2670 \N SR (ISO Country Code) ISO_COUNTRY
2671 \N Republic of Trinidad and Tobago (Country) COUNTRY
2672 \N Tungurahua (State / Territory) STATE
2673 \N EC (ISO Country Code) ISO_COUNTRY
2674 \N Pastaza (State / Territory) STATE
2675 \N Sipaliwini (State / Territory) STATE
2790 \N Formative \N
2676 \N AW (ISO Country Code) ISO_COUNTRY
2677 \N Cesar (State / Territory) STATE
2678 \N Napo (State / Territory) STATE
2679 \N Barbados (Country) COUNTRY
2680 \N Monagas (State / Territory) STATE
2681 \N Litigated Zone (State / Territory) STATE
2682 \N Chimborazo (State / Territory) STATE
2683 \N Tumbes (State / Territory) STATE
2684 \N Upper Demerara-Berbice (State / Territory) STATE
2685 \N Essequibo Islands-West Demerara (State / Territory) STATE
2686 \N Cundinamarca (State / Territory) STATE
2687 \N Potaro-Siparuni (State / Territory) STATE
2688 \N Los Rios (State / Territory) STATE
2689 \N Merida (State / Territory) STATE
2690 \N VC (ISO Country Code) ISO_COUNTRY
2691 \N Grenada (State / Territory) STATE
2692 \N Amazonas (State / Territory) STATE
2693 \N Zamora-Chinchipe (State / Territory) STATE
2694 \N Anzoategui (State / Territory) STATE
2695 \N Dependencias Federales (State / Territory) STATE
2696 \N Lara (State / Territory) STATE
2697 \N Co-operative Republic of Guyana (Country) COUNTRY
2698 \N Netherlands Antilles (Country) COUNTRY
2699 \N Trujillo (State / Territory) STATE
2700 \N Trinidad & Tobago (State / Territory) STATE
2701 \N Netherlands Antilles (State / Territory) STATE
2702 \N Santander (State / Territory) STATE
2703 \N Meta (State / Territory) STATE
2704 \N GY (ISO Country Code) ISO_COUNTRY
2705 \N Grenada (Country) COUNTRY
2706 \N St. Vincent and the Grenadines (Country) COUNTRY
2707 \N Magdalena (State / Territory) STATE
2708 \N Cojedes (State / Territory) STATE
2709 \N Galapagos (State / Territory) STATE
2710 \N Upper Takutu-Upper Essequibo (State / Territory) STATE
2711 \N Republic of Suriname (Country) COUNTRY
2712 \N Zulia (State / Territory) STATE
2713 \N Norde de Santander (State / Territory) STATE
2714 \N Cotopaxi (State / Territory) STATE
2715 \N Coronie (State / Territory) STATE
2716 \N Delta Amacuro (State / Territory) STATE
2717 \N Distrito Especial (State / Territory) STATE
2718 \N Aruba (State / Territory) STATE
2719 \N Aruba (Country) COUNTRY
2720 \N Loreto (State / Territory) STATE
2721 \N Morona-Santiago (State / Territory) STATE
2722 \N El Oro (State / Territory) STATE
2723 \N Manabi (State / Territory) STATE
2724 \N AN (ISO Country Code) ISO_COUNTRY
2725 \N Barbados (State / Territory) STATE
2726 \N Republic of Ecuador (Country) COUNTRY
2727 \N Vaupes (State / Territory) STATE
2728 \N Mahaica-Berbice (State / Territory) STATE
2729 \N Esmeraldas (State / Territory) STATE
2730 \N Barinas (State / Territory) STATE
2731 \N Vichada (State / Territory) STATE
2732 \N BB (ISO Country Code) ISO_COUNTRY
2733 \N VE (ISO Country Code) ISO_COUNTRY
2734 \N Caqueta (State / Territory) STATE
2735 \N Demerara-Mahaica (State / Territory) STATE
2736 \N GD (ISO Country Code) ISO_COUNTRY
2737 \N Pomeroon-Supenaam (State / Territory) STATE
2738 \N Carabobo (State / Territory) STATE
2739 \N Tachira (State / Territory) STATE
2740 \N Boyaca (State / Territory) STATE
2741 \N Azuay (State / Territory) STATE
2742 \N Cuyuni-Mazaruni (State / Territory) STATE
2743 \N Guaviare (State / Territory) STATE
2744 \N Nickerie (State / Territory) STATE
2745 \N Narino (State / Territory) STATE
2746 \N Arauca (State / Territory) STATE
2747 \N Barima-Waini (State / Territory) STATE
2748 \N Roraima (State / Territory) STATE
2749 \N Federative Republic of Brazil (Country) COUNTRY
2750 \N Pichincha (State / Territory) STATE
2751 \N Putumayo (State / Territory) STATE
2752 \N La Guajira (State / Territory) STATE
2753 \N Apure (State / Territory) STATE
2754 \N Agua Fria \N
2755 \N JO (ISO Country Code) ISO_COUNTRY
2756 \N Ma'an (State / Territory) STATE
2757 \N Hashemite Kingdom of Jordan (Country) COUNTRY
2758 \N Tucson Basin \N
2759 \N Agua Fria drainage \N
2760 \N New River drainage \N
2761 \N east-cental Arizona \N
2762 \N Northern Sinagua \N
2763 \N Pueblo of Zuni \N
2764 \N Northern Rio Grande \N
2765 \N southwestern Colorado \N
2766 \N Animas \N
2767 \N La Plata \N
2768 \N Ridges Basin \N
2769 \N MImbres \N
2770 \N southwestern New Mexico \N
2771 \N Mimbres River \N
2772 \N Sonoran Desert \N
2773 \N northern Sonora \N
2774 \N southeastern Arizona \N
2775 \N Cienaga Creek \N
2776 \N Mammoth Cave \N
2777 \N Flagstaff \N
2778 \N Prescott \N
2779 \N Sunset Crater \N
2780 \N Deadman Wash \N
2781 \N Rio de Flag \N
2782 \N San Francisco Peaks \N
2783 \N Elden Mountain \N
2784 \N Salt River Valley \N
2785 \N VU (ISO Country Code) ISO_COUNTRY
2786 \N Republic of Vanuatu (Country) COUNTRY
2787 \N Vanuatu (State / Territory) STATE
2788 \N Southern Africa \N
2789 \N Kalahari \N
2791 \N Classic \N
2792 \N Post-Classic \N
2793 \N Oaxaca \N
2794 \N Iran \N
2795 \N Al Jahrah (State / Territory) STATE
2796 \N Chahar Mahall va Bakhtiari (State / Territory) STATE
2797 \N Esfahan (State / Territory) STATE
2798 \N Maysan (State / Territory) STATE
2799 \N Ilam (State / Territory) STATE
2800 \N IQ (ISO Country Code) ISO_COUNTRY
2801 \N Al Basrah (State / Territory) STATE
2802 \N Republic of Iraq (Country) COUNTRY
2803 \N Kohkiluyeh va buyer Ahmadi (State / Territory) STATE
2804 \N IR (ISO Country Code) ISO_COUNTRY
2805 \N Dhi Qar (State / Territory) STATE
2806 \N Lorestan (State / Territory) STATE
2807 \N Islamic Republic of Iran (Country) COUNTRY
2808 \N Khuzestan (State / Territory) STATE
2809 \N Dolores River Valley \N
2810 \N Southwestern Colorado \N
2811 \N IT (ISO Country Code) ISO_COUNTRY
2812 \N Italian Republic (Country) COUNTRY
2813 \N Lazio (State / Territory) STATE
2814 \N Not limited to any particular region \N
2815 \N New York State \N
2816 \N Western New York \N
2817 \N Northern Transversal Strip \N
2818 \N Maya highland-lowland transition \N
2819 \N Coban, Alta Verapaz \N
2820 \N Ixcan, El Quiche \N
2821 \N Southwestern Wisconsin \N
2822 \N Driftless Area \N
2823 \N Chesapeake \N
2824 \N Tidewater \N
2825 \N state of utah \N
2826 \N Hadarom (State / Territory) STATE
2827 \N IL (ISO Country Code) ISO_COUNTRY
2828 \N State of Israel (Country) COUNTRY
2829 \N Coronado National Forest \N
2830 \N Meadow Valley \N
2831 \N Cordes Junction \N
2832 \N Marble Canyon \N
2833 \N Palmetto Bend Reservoir \N
2834 \N Abiquiu Reservoir \N
2835 \N Navidad River \N
2836 \N Mustang Creek \N
2837 \N Rhone-Alpes (State / Territory) STATE
2838 \N Marsden-Saddleworth \N
2839 \N Tatton Mere \N
2840 \N Tatton Park \N
2841 \N Republic of South Africa (Country) COUNTRY
2842 \N Northern (State / Territory) STATE
2843 \N ZA (ISO Country Code) ISO_COUNTRY
2844 \N Lebanese Republic (Country) COUNTRY
2845 \N Dimashq (State / Territory) STATE
2846 \N An Nabatiyah (State / Territory) STATE
2847 \N Sayda (State / Territory) STATE
2848 \N Syrian Arab Republic (Country) COUNTRY
2849 \N Jabal Lubnan (State / Territory) STATE
2850 \N Al Qunaytirah (State / Territory) STATE
2851 \N LB (ISO Country Code) ISO_COUNTRY
2852 \N Dar'a (State / Territory) STATE
2853 \N Al Mafraq (State / Territory) STATE
2854 \N Hazafon (State / Territory) STATE
2855 \N West Bank (Country) COUNTRY
2856 \N Hefa (State / Territory) STATE
2857 \N Bayrut (State / Territory) STATE
2858 \N Al Biqa' (State / Territory) STATE
2859 \N SY (ISO Country Code) ISO_COUNTRY
2860 \N West Bank (State / Territory) STATE
2861 \N Irbid (State / Territory) STATE
2862 \N Llano Grande Mexico \N
2863 \N Jalisco Mexico \N
2864 \N Highlands Lake District Mexico \N
2865 \N Northeast Arkansas \N
2866 \N Kennewick \N
2867 \N Columbia River \N
2868 \N Pacific Northwest \N
2869 \N Sapelo Island \N
2870 \N San Juan Basin \N
2871 \N Machu Picchu, Peru \N
2872 \N Cusco (State / Territory) STATE
2873 \N Nyanza Province, Kenya \N
2874 \N Nyanza (State / Territory) STATE
2875 \N Rift Valley (State / Territory) STATE
2876 \N KE (ISO Country Code) ISO_COUNTRY
2877 \N Republic of Kenya (Country) COUNTRY
2878 \N Western (State / Territory) STATE
2879 \N Busoga (State / Territory) STATE
2880 \N Arusha (State / Territory) STATE
2881 \N United Republic of Tanzania (Country) COUNTRY
2882 \N TZ (ISO Country Code) ISO_COUNTRY
2883 \N central New York \N
2884 \N Finger Lakes \N
2885 \N Ithaca, New York \N
2886 \N Lake Cayuga \N
2887 \N Sydney NSW Australia \N
2888 \N Sydney, New South Wales, Australia \N
2889 \N London, England \N
2890 \N Stoke-on-Trent, England \N
2891 \N The Rocks, Sydney, NSW, Australia \N
2892 \N Sydney, NSW, Australia \N
2893 \N 17 Test Street, Test City NSW \N
2894 \N Victoria (State / Territory) STATE
2895 \N Australia (Continent) CONTINENT
2896 \N Commonwealth of Australia (Country) COUNTRY
2897 \N AU (ISO Country Code) ISO_COUNTRY
2898 \N New South Wales (State / Territory) STATE
2899 \N Europe (Continent) CONTINENT
2900 \N Burslem, England \N
2901 \N The Rocks \N
2902 \N NSW \N
2903 \N Australia \N
2904 \N Sydney \N
2905 \N South Australia (State / Territory) STATE
2906 \N Western Australia (State / Territory) STATE
2907 \N Australian Capital Territory (State / Territory) STATE
2908 \N Northern Territory (State / Territory) STATE
2909 \N Queensland (State / Territory) STATE
2910 \N Tasmania (State / Territory) STATE
2911 \N Camperdown, Sydney, NSW, Australia \N
2912 \N Haymarket, Sydney, NSW, Australia \N
2913 \N Hobart \N
2914 \N Tasmania \N
2915 \N Ballarat \N
2916 \N Manly \N
2917 \N Parramatta \N
2918 \N Kanahooka \N
2919 \N Illawarra (Region) \N
2920 \N Chippendale \N
2921 \N Castlereagh \N
2922 \N Sydney \N
2923 \N Penrith Lakes \N
2924 \N London \N
2925 \N Lambeth \N
2926 \N England \N
2927 \N Melbourne \N
2928 \N Chicago \N
2929 \N CC (ISO Country Code) ISO_COUNTRY
2930 \N ER (ISO Country Code) ISO_COUNTRY
2931 \N MR (ISO Country Code) ISO_COUNTRY
2932 \N ID (ISO Country Code) ISO_COUNTRY
2933 \N Republic of Djibouti (Country) COUNTRY
2934 \N Territory of Christmas Island (Country) COUNTRY
2935 \N Argentine Republic (Country) COUNTRY
2936 \N BI (ISO Country Code) ISO_COUNTRY
2937 \N Kingdom of Cambodia (Country) COUNTRY
2938 \N Republic of the Philippines (Country) COUNTRY
2939 \N FI (ISO Country Code) ISO_COUNTRY
2940 \N DJ (ISO Country Code) ISO_COUNTRY
2941 \N VN (ISO Country Code) ISO_COUNTRY
2942 \N KI (ISO Country Code) ISO_COUNTRY
2943 \N CM (ISO Country Code) ISO_COUNTRY
2944 \N Kingdom of Spain (Country) COUNTRY
2945 \N Solomon Islands (Country) COUNTRY
2946 \N AM (ISO Country Code) ISO_COUNTRY
2947 \N Republic of Cape Verde (Country) COUNTRY
2948 \N Principality of Monaco (Country) COUNTRY
2949 \N UM (ISO Country Code) ISO_COUNTRY
2950 \N Territorial Collectivity of Mayotte (Country) COUNTRY
2951 \N Oriental Republic of Uruguay (Country) COUNTRY
2952 \N Republic of Latvia (Country) COUNTRY
2953 \N BG (ISO Country Code) ISO_COUNTRY
2954 \N CN (ISO Country Code) ISO_COUNTRY
2955 \N GN (ISO Country Code) ISO_COUNTRY
2956 \N Gibraltar (Country) COUNTRY
2957 \N YT (ISO Country Code) ISO_COUNTRY
2958 \N Kingdom of Nepal (Country) COUNTRY
2959 \N Republic of Ghana (Country) COUNTRY
2960 \N Republic of Austria (Country) COUNTRY
2961 \N BF (ISO Country Code) ISO_COUNTRY
2962 \N DE (ISO Country Code) ISO_COUNTRY
2963 \N FM (ISO Country Code) ISO_COUNTRY
2964 \N CV (ISO Country Code) ISO_COUNTRY
2965 \N Republic of Uzbekistan (Country) COUNTRY
2966 \N KP (ISO Country Code) ISO_COUNTRY
2967 \N Kingdom of Swaziland (Country) COUNTRY
2968 \N People's Republic of Bangladesh (Country) COUNTRY
2969 \N Republic of Serbia (Country) COUNTRY
2970 \N MW (ISO Country Code) ISO_COUNTRY
2971 \N Republic of Maldives (Country) COUNTRY
2972 \N GA (ISO Country Code) ISO_COUNTRY
2973 \N SB (ISO Country Code) ISO_COUNTRY
2974 \N GR (ISO Country Code) ISO_COUNTRY
2975 \N Republic of Bulgaria (Country) COUNTRY
2976 \N RE (ISO Country Code) ISO_COUNTRY
2977 \N Republic of Palau (Country) COUNTRY
2978 \N Gaza Strip (Country) COUNTRY
2979 \N CH (ISO Country Code) ISO_COUNTRY
2980 \N ET (ISO Country Code) ISO_COUNTRY
2981 \N NU (ISO Country Code) ISO_COUNTRY
2982 \N Republic of Rwanda (Country) COUNTRY
2983 \N MG (ISO Country Code) ISO_COUNTRY
2984 \N Sao Tome and Principe (Country) COUNTRY
2985 \N PL (ISO Country Code) ISO_COUNTRY
2986 \N KW (ISO Country Code) ISO_COUNTRY
2987 \N Kingdom of Morocco (Country) COUNTRY
2988 \N CF (ISO Country Code) ISO_COUNTRY
2989 \N Togolese Republic (Country) COUNTRY
2990 \N South America (Continent) CONTINENT
2991 \N Mongolia (Country) COUNTRY
2992 \N GM (ISO Country Code) ISO_COUNTRY
2993 \N TM (ISO Country Code) ISO_COUNTRY
2994 \N Republic of Hungary (Country) COUNTRY
2995 \N State of Eritrea (Country) COUNTRY
2996 \N Japan (Country) COUNTRY
2997 \N ML (ISO Country Code) ISO_COUNTRY
2998 \N ST (ISO Country Code) ISO_COUNTRY
2999 \N Czech Republic (Country) COUNTRY
3000 \N MP (ISO Country Code) ISO_COUNTRY
3001 \N Cook Islands (Country) COUNTRY
3002 \N Republic of Uganda (Country) COUNTRY
3003 \N Republic of Niger (Country) COUNTRY
3004 \N LK (ISO Country Code) ISO_COUNTRY
3005 \N KG (ISO Country Code) ISO_COUNTRY
3006 \N Democratic Socialist Republic of Sri Lan (Country) COUNTRY
3007 \N Arab Republic of Egypt (Country) COUNTRY
3008 \N Republic of Singapore (Country) COUNTRY
3009 \N Republic of the Congo (Country) COUNTRY
3010 \N State of Qatar (Country) COUNTRY
3011 \N GW (ISO Country Code) ISO_COUNTRY
3012 \N Commonwealth of the Northern Mariana Isl (Country) COUNTRY
3013 \N Republic of Mauritius (Country) COUNTRY
3014 \N BY (ISO Country Code) ISO_COUNTRY
3015 \N Malaysia (Country) COUNTRY
3016 \N Jarvis Island (Country) COUNTRY
3017 \N BA (ISO Country Code) ISO_COUNTRY
3018 \N Central African Republic (Country) COUNTRY
3019 \N Pitcairn, Henderson, Ducie, and Oeno Isl (Country) COUNTRY
3020 \N Kingdom of the Netherlands (Country) COUNTRY
3021 \N RW (ISO Country Code) ISO_COUNTRY
3022 \N Union of Myanmar (Country) COUNTRY
3023 \N HU (ISO Country Code) ISO_COUNTRY
3024 \N TJ (ISO Country Code) ISO_COUNTRY
3025 \N United Arab Emirates (Country) COUNTRY
3026 \N Islamic Republic of Mauritania (Country) COUNTRY
3027 \N DZ (ISO Country Code) ISO_COUNTRY
3028 \N TF (ISO Country Code) ISO_COUNTRY
3029 \N Republic of San Marino (Country) COUNTRY
3030 \N Jan Mayen (Country) COUNTRY
3031 \N Republic of Malawi (Country) COUNTRY
3032 \N NL (ISO Country Code) ISO_COUNTRY
3033 \N LY (ISO Country Code) ISO_COUNTRY
3034 \N CK (ISO Country Code) ISO_COUNTRY
3035 \N Federal Republic of Nigeria (Country) COUNTRY
3036 \N Republic of Paraguay (Country) COUNTRY
3037 \N Republic of Burundi (Country) COUNTRY
3038 \N SA (ISO Country Code) ISO_COUNTRY
3039 \N SJ (ISO Country Code) ISO_COUNTRY
3040 \N KZ (ISO Country Code) ISO_COUNTRY
3041 \N AZ (ISO Country Code) ISO_COUNTRY
3042 \N BJ (ISO Country Code) ISO_COUNTRY
3043 \N Falkland Islands (Islas Malvinas) (Country) COUNTRY
3044 \N Federal Democratic Republic of Ethiopia (Country) COUNTRY
3045 \N PY (ISO Country Code) ISO_COUNTRY
3046 \N Oceania (Continent) CONTINENT
3047 \N SK (ISO Country Code) ISO_COUNTRY
3048 \N Republic of Seychelles (Country) COUNTRY
3049 \N HR (ISO Country Code) ISO_COUNTRY
3050 \N Republic of Armenia (Country) COUNTRY
3051 \N UZ (ISO Country Code) ISO_COUNTRY
3052 \N AR (ISO Country Code) ISO_COUNTRY
3053 \N SI (ISO Country Code) ISO_COUNTRY
3054 \N LV (ISO Country Code) ISO_COUNTRY
3055 \N IN (ISO Country Code) ISO_COUNTRY
3056 \N LR (ISO Country Code) ISO_COUNTRY
3057 \N KM (ISO Country Code) ISO_COUNTRY
3058 \N Republic of Cote d'Ivoire (Country) COUNTRY
3059 \N Territory of French Polynesia (Country) COUNTRY
3060 \N NE (ISO Country Code) ISO_COUNTRY
3061 \N LI (ISO Country Code) ISO_COUNTRY
3062 \N LT (ISO Country Code) ISO_COUNTRY
3063 \N CX (ISO Country Code) ISO_COUNTRY
3064 \N Republic of Equatorial Guinea (Country) COUNTRY
3065 \N SC (ISO Country Code) ISO_COUNTRY
3066 \N Republic of Poland (Country) COUNTRY
3067 \N Principality of Andorra (Country) COUNTRY
3068 \N YE (ISO Country Code) ISO_COUNTRY
3069 \N SL (ISO Country Code) ISO_COUNTRY
3070 \N AO (ISO Country Code) ISO_COUNTRY
3071 \N Republic of Cyprus (Country) COUNTRY
3072 \N Republic of Albania (Country) COUNTRY
3073 \N GQ (ISO Country Code) ISO_COUNTRY
3074 \N Islamic Republic of Afghanistan (Country) COUNTRY
3075 \N ZW (ISO Country Code) ISO_COUNTRY
3076 \N People's Democratic Republic of Algeria (Country) COUNTRY
3077 \N SD (ISO Country Code) ISO_COUNTRY
3078 \N Republic of Zimbabwe (Country) COUNTRY
3079 \N Republic of Guinea (Country) COUNTRY
3080 \N Negara Brunei Darussalam (Country) COUNTRY
3081 \N PG (ISO Country Code) ISO_COUNTRY
3082 \N Republic of Madagascar (Country) COUNTRY
3083 \N Africa (Continent) CONTINENT
3084 \N Gabonese Republic (Country) COUNTRY
3085 \N Romania (Country) COUNTRY
3086 \N PN (ISO Country Code) ISO_COUNTRY
3087 \N RO (ISO Country Code) ISO_COUNTRY
3088 \N Republic of India (Country) COUNTRY
3089 \N Department of Guiana (Country) COUNTRY
3090 \N HM (ISO Country Code) ISO_COUNTRY
3091 \N MU (ISO Country Code) ISO_COUNTRY
3092 \N Territory of the French Southern and Ant (Country) COUNTRY
3093 \N Republic of Liberia (Country) COUNTRY
3094 \N State of Kuwait (Country) COUNTRY
3095 \N Republic of Belarus (Country) COUNTRY
3096 \N BN (ISO Country Code) ISO_COUNTRY
3097 \N Republic of Azerbaijan (Country) COUNTRY
3098 \N St. Helena (Country) COUNTRY
3099 \N CG (ISO Country Code) ISO_COUNTRY
3100 \N GS (ISO Country Code) ISO_COUNTRY
3101 \N Republic of Benin (Country) COUNTRY
3102 \N PF (ISO Country Code) ISO_COUNTRY
3103 \N Kyrgyz Republic (Country) COUNTRY
3104 \N Union of the Comoros (Country) COUNTRY
3105 \N Ukraine (Country) COUNTRY
3106 \N JP (ISO Country Code) ISO_COUNTRY
3107 \N Republic of Chile (Country) COUNTRY
3108 \N Georgia (Country) COUNTRY
3109 \N Democratic Republic of the Congo (Country) COUNTRY
3110 \N Democratic People's Republic of Korea (Country) COUNTRY
3111 \N QA (ISO Country Code) ISO_COUNTRY
3112 \N MK (ISO Country Code) ISO_COUNTRY
3113 \N Republic of Indonesia (Country) COUNTRY
3114 \N CD (ISO Country Code) ISO_COUNTRY
3115 \N Department of Reunion (Country) COUNTRY
3116 \N ES (ISO Country Code) ISO_COUNTRY
3117 \N Swiss Confederation (Country) COUNTRY
3118 \N Great Socialist People's Libyan Arab Jam (Country) COUNTRY
3119 \N MY (ISO Country Code) ISO_COUNTRY
3120 \N GI (ISO Country Code) ISO_COUNTRY
3121 \N Republic of Cameroon (Country) COUNTRY
3122 \N Kingdom of Thailand (Country) COUNTRY
3123 \N MN (ISO Country Code) ISO_COUNTRY
3124 \N Kingdom of Lesotho (Country) COUNTRY
3125 \N LU (ISO Country Code) ISO_COUNTRY
3126 \N RS (ISO Country Code) ISO_COUNTRY
3127 \N BH (ISO Country Code) ISO_COUNTRY
3128 \N MV (ISO Country Code) ISO_COUNTRY
3129 \N AL (ISO Country Code) ISO_COUNTRY
3130 \N Republic of Montenegro (Country) COUNTRY
3131 \N Juan De Nova Island (Country) COUNTRY
3132 \N CZ (ISO Country Code) ISO_COUNTRY
3133 \N GF (ISO Country Code) ISO_COUNTRY
3134 \N CI (ISO Country Code) ISO_COUNTRY
3135 \N OM (ISO Country Code) ISO_COUNTRY
3136 \N Bosnia and Herzegovina (Country) COUNTRY
3137 \N Republic of Lithuania (Country) COUNTRY
3138 \N TH (ISO Country Code) ISO_COUNTRY
3139 \N Republic of Chad (Country) COUNTRY
3140 \N KH (ISO Country Code) ISO_COUNTRY
3141 \N LS (ISO Country Code) ISO_COUNTRY
3142 \N Republic of Finland (Country) COUNTRY
3143 \N Kingdom of Saudi Arabia (Country) COUNTRY
3144 \N Lao People's Democratic Republic (Country) COUNTRY
3145 \N Independent State of Papua New Guinea (Country) COUNTRY
3146 \N UG (ISO Country Code) ISO_COUNTRY
3147 \N UA (ISO Country Code) ISO_COUNTRY
3148 \N TG (ISO Country Code) ISO_COUNTRY
3149 \N Kingdom of Bhutan (Country) COUNTRY
3150 \N MD (ISO Country Code) ISO_COUNTRY
3151 \N The Former Yugoslav Republic of Macedoni (Country) COUNTRY
3152 \N Republic of Kazakhstan (Country) COUNTRY
3153 \N Islamic Republic of Pakistan (Country) COUNTRY
3154 \N KR (ISO Country Code) ISO_COUNTRY
3155 \N Republic of Angola (Country) COUNTRY
3156 \N CL (ISO Country Code) ISO_COUNTRY
3157 \N Slovak Republic (Country) COUNTRY
3158 \N Somalia (Country) COUNTRY
3159 \N Republic of the Sudan (Country) COUNTRY
3160 \N TN (ISO Country Code) ISO_COUNTRY
3161 \N GU (ISO Country Code) ISO_COUNTRY
3162 \N Territory of Heard Island and McDonald I (Country) COUNTRY
3163 \N Federal Republic of Germany (Country) COUNTRY
3164 \N PS (ISO Country Code) ISO_COUNTRY
3165 \N Republic of Zambia (Country) COUNTRY
3166 \N South Georgia and the South Sandwich Is (Country) COUNTRY
3167 \N Republic of Guinea-Bissau (Country) COUNTRY
3168 \N British Indian Ocean Territory (Country) COUNTRY
3169 \N Niue (Country) COUNTRY
3170 \N Territory of Guam (Country) COUNTRY
3171 \N Bouvet Island (Country) COUNTRY
3172 \N TL (ISO Country Code) ISO_COUNTRY
3173 \N Republic of Mali (Country) COUNTRY
3174 \N SM (ISO Country Code) ISO_COUNTRY
3175 \N LA (ISO Country Code) ISO_COUNTRY
3176 \N MT (ISO Country Code) ISO_COUNTRY
3177 \N UY (ISO Country Code) ISO_COUNTRY
3178 \N Socialist Republic of Vietnam (Country) COUNTRY
3179 \N Republic of Malta (Country) COUNTRY
3180 \N EH (ISO Country Code) ISO_COUNTRY
3181 \N MA (ISO Country Code) ISO_COUNTRY
3182 \N Republic of Moldova (Country) COUNTRY
3183 \N Territory of Cocos (Keeling) Islands (Country) COUNTRY
3184 \N SN (ISO Country Code) ISO_COUNTRY
3185 \N Western Sahara (Country) COUNTRY
3186 \N Asia (Continent) CONTINENT
3187 \N Republic of Korea (Country) COUNTRY
3188 \N Hellenic Republic (Country) COUNTRY
3189 \N Bailiwick of Jersey (Country) COUNTRY
3190 \N PT (ISO Country Code) ISO_COUNTRY
3191 \N Republic of Estonia (Country) COUNTRY
3192 \N GH (ISO Country Code) ISO_COUNTRY
3193 \N SH (ISO Country Code) ISO_COUNTRY
3194 \N GE (ISO Country Code) ISO_COUNTRY
3195 \N Democratic Republic of Timor-Leste (Country) COUNTRY
3196 \N PW (ISO Country Code) ISO_COUNTRY
3197 \N ME (ISO Country Code) ISO_COUNTRY
3198 \N EG (ISO Country Code) ISO_COUNTRY
3199 \N Republic of Sierra Leone (Country) COUNTRY
3200 \N ZM (ISO Country Code) ISO_COUNTRY
3201 \N Federated States of Micronesia (Country) COUNTRY
3202 \N BD (ISO Country Code) ISO_COUNTRY
3203 \N FK (ISO Country Code) ISO_COUNTRY
3204 \N Principality of Liechtenstein (Country) COUNTRY
3205 \N NG (ISO Country Code) ISO_COUNTRY
3206 \N EE (ISO Country Code) ISO_COUNTRY
3207 \N PK (ISO Country Code) ISO_COUNTRY
3208 \N Republic of Senegal (Country) COUNTRY
3209 \N Tunisian Republic (Country) COUNTRY
3210 \N Portuguese Republic (Country) COUNTRY
3211 \N Republic of Yemen (Country) COUNTRY
3212 \N NP (ISO Country Code) ISO_COUNTRY
3213 \N Turkmenistan (Country) COUNTRY
3214 \N IO (ISO Country Code) ISO_COUNTRY
3215 \N MZ (ISO Country Code) ISO_COUNTRY
3216 \N CY (ISO Country Code) ISO_COUNTRY
3217 \N Burkina Faso (Country) COUNTRY
3218 \N AD (ISO Country Code) ISO_COUNTRY
3219 \N The Holy See (State of the Vatican City) (Country) COUNTRY
3220 \N Kingdom of Denmark (Country) COUNTRY
3221 \N Grand Duchy of Luxembourg (Country) COUNTRY
3222 \N SO (ISO Country Code) ISO_COUNTRY
3223 \N BT (ISO Country Code) ISO_COUNTRY
3224 \N AF (ISO Country Code) ISO_COUNTRY
3225 \N AE (ISO Country Code) ISO_COUNTRY
3226 \N Republic of Kiribati (Country) COUNTRY
3227 \N SG (ISO Country Code) ISO_COUNTRY
3228 \N MC (ISO Country Code) ISO_COUNTRY
3229 \N Johnston Atoll (Country) COUNTRY
3230 \N PH (ISO Country Code) ISO_COUNTRY
3231 \N Republic of Mozambique (Country) COUNTRY
3232 \N SZ (ISO Country Code) ISO_COUNTRY
3233 \N People's Republic of China (Country) COUNTRY
3234 \N Kingdom of Bahrain (Country) COUNTRY
3235 \N AT (ISO Country Code) ISO_COUNTRY
3236 \N BV (ISO Country Code) ISO_COUNTRY
3237 \N North America (Continent) CONTINENT
3238 \N Sultanate of Oman (Country) COUNTRY
3239 \N Republic of Slovenia (Country) COUNTRY
3240 \N Republic of Tajikistan (Country) COUNTRY
3241 \N Republic of Croatia (Country) COUNTRY
3242 \N DK (ISO Country Code) ISO_COUNTRY
3243 \N Glorioso Islands (Country) COUNTRY
3244 \N MM (ISO Country Code) ISO_COUNTRY
3245 \N Republic of The Gambia (Country) COUNTRY
3246 \N TD (ISO Country Code) ISO_COUNTRY
3247 \N Viewbank \N
3248 \N Banyule City \N
3249 \N Little Lon Precinct \N
\.
--
-- TOC entry 2174 (class 0 OID 79106)
-- Dependencies: 190
-- Data for Name: investigation_type; Type: TABLE DATA; Schema: public; Owner: tdar
--
COPY investigation_type (id, definition, label) FROM stdin;
12 A project which assesses the potential for archaeological heritage. Associated documents may include an Archaeological Assessment, Archaeological Management Plan or Archaeological Zoning Plan. Archaeological assessment
13 A project which outlines a comprehensive proposal for the excavation of an archaeological site, including major research questions. In some states, a Research Design is required prior to the issue of an excavation permit. Archaeological research design
14 A project which involves systematic, physical investigation and recording of subsurface features on an archaeological site, including test-trenching and open-area excavation. Archaeological excavation
15 A project which involves systematic, physical investigation and recording of aboveground features of an archaeological site. Archaeological survey
16 A project which identifies and catalogues artefacts recovered from an archaeological site. Artefact catalogue
17 A project which undertakes numerical comparison of artefact catalogue data. Assemblage analysis
18 A project which undertakes chemical or microscopic analysis of pollen samples recovered from archaeological sites. Palynological analysis
19 A project which carries out any other kind of investigation or assessment of archaeological sites or relics, or associated documentation, not identified above. Other contract research
20 A project completed in fulfilment of a Doctorate of Philosophy. PhD Research
21 A project completed in fulfilment of an honours or masters degree in archaeology or associated fields. Honours/Masters Research
22 A project completed by a postgraduate fellow or associate undertaking publicly funded research. Postgraduate Research
23 A project undertaking publicly funded research administered by a university which is not identified above. Other Academic Research
24 A project undertaken to guide or support the management of an archaeological collection held by a museum or associated repository. Collections Management
25 A project undertaken to enhance research about an archaeological collection held by a museum or associated repository. Collections Research
26 A project undertaking privately funded research, not administered by a university or undertaken in compliance with legislation. Other Research
\.
--
-- TOC entry 2175 (class 0 OID 79120)
-- Dependencies: 194
-- Data for Name: material_keyword; Type: TABLE DATA; Schema: public; Owner: tdar
--
COPY material_keyword (id, definition, label) FROM stdin;
16 Refined earthenware, stoneware, porcelain and porcellaneous and other domestic-grade ceramics. Typically excludes ceramic building materials (brick, pipe etc), clay pipes, ceramic dolls, marbles and other ‘miscellaneous’ items. Ceramic
17 Clear and coloured glass from bottles, tablewares, lamps, windows and other domestic-grade glass. Typically excludes glass buttons, beads and other ‘miscellaneous’ items. Glass
18 Robust remains of alloy metal domestic objects including nails, furnishing pins & tacks, cans and unidentified fragments. Typically excludes small fragile items such as jewellery elements. Metal
20 Unworked bone, shell, stone, mineral or other ‘ecofact’ Organic
21 Large, coarse fragments of building materials or architectural elements including brick, sewerage pipes, roof tiles, door jambs, plaster & mortar. Typically excludes nails and window glass. Building Materials
19 Fragile or ‘small finds’ (e.g. buttons, beads, jewellery elements, pins & needles) from a range of miscellaneous material types including worked bone and shell, worked stone, leather, synthetics, and composite items. Typically includes clay pipes, children’s toys and coins. Typically excludes robust or heavy items. Miscellaneous
22 Any other material class not listed above. Other
\.
--
-- TOC entry 2176 (class 0 OID 79304)
-- Dependencies: 238
-- Data for Name: site_type_keyword; Type: TABLE DATA; Schema: public; Owner: tdar
--
COPY site_type_keyword (id, definition, label, approved, index, selectable, parent_id) FROM stdin;
403 \N Camp t 1.2.3 t 399
404 \N Industrial t 2 t \N
429 \N Recreational f \N f \N
409 \N Mining t 2.2 t 404
395 \N Domestic t 1 t \N
396 \N Urban t 1.1 t 395
410 \N Pastoral t 2.3 t 404
411 \N Infrastructure t 2.4 t 404
412 \N Commercial t 3 t \N
413 \N Shop t 3.1 t 412
414 \N Office t 3.2 t 412
415 \N Warehouse t 3.3 t 412
416 \N Shipwreck t 3.4 t 412
399 \N Rural t 1.2 t 395
400 \N Homestead t 1.2.1 t 399
401 \N Staff Quarters t 1.2.2 t 399
397 \N Cottage t 1.1.2 t 396
398 \N House t 1.1.3 t 396
402 \N Terrace t 1.1.1 t 396
422 \N Military t 5 t \N
423 \N Defence t 5.1 t 422
424 \N Accomodation t 5.2 t 422
425 \N Ceremonial t 6 t \N
426 \N Church t 6.1 t 425
427 \N Burial Ground t 6.2 t 425
417 \N Institution t 4 t \N
418 \N Hospital t 4.1 t 417
419 \N Asylum t 4.2 t 417
420 \N Gaol t 4.3 t 417
421 \N Municipal t 4.4 t 417
405 \N Manufacturing t 2.1 t 404
406 \N Metal Craft trades t 2.1.1 t 405
407 \N Pottery t 2.1.2 t 405
408 \N Food t 2.1.3 t 405
\.
--
-- TOC entry 2177 (class 0 OID 79328)
-- Dependencies: 244
-- Data for Name: temporal_keyword; Type: TABLE DATA; Schema: public; Owner: tdar
--
COPY temporal_keyword (id, definition, label) FROM stdin;
237 \N late-18th century
238 \N 19th century
239 \N 20th century
240 \N 18th century
241 \N Victorian era
242 \N early-20th century
243 \N Convict era
\.
|
C++ | UTF-8 | 637 | 3.171875 | 3 | [] | no_license | #pragma once
#include <random>
class Random {
public:
static int get_int(int min, int max)
{
static std::random_device rd; // only used once to initialise (seed) engine
static std::mt19937 rng(rd()); // random-number engine used (Mersenne-Twister in this case)
static std::uniform_int_distribution<int> uni(min, max); // guaranteed unbiased
return uni(rng);
}
static float get_float(float min, float max)
{
static std::tr1::mt19937 eng; // a core engine class
static std::tr1::normal_distribution<float> dist(min, max);
return dist(eng);
}
}; |
Java | UTF-8 | 318 | 2.234375 | 2 | [] | no_license | package com.luxoft.servlettest.entity;
import java.util.List;
public final class TodoUtils {
public static Todo getTodoById(List<Todo> todoList, int id) {
for(Todo todo : todoList) {
if (todo.getId() == id) {
return todo;
}
}
return null;
}
}
|
Shell | UTF-8 | 679 | 3.703125 | 4 | [] | no_license | #!/bin/bash
#
# execute the given sql command
#
dosql() {
local l_sql="$1"
local l_db="$2"
echo "$l_sql" | mysql -u root -p="$rootpass" $l_db
}
# get root password from the command line
rootpass="$1"
# start the mysql daemon
mysqld_safe --skip-grant-tables&
sleep 3
mysql_upgrade --password="$rootpass"
for table in $(dosql "show tables" mysql)
do
for try in 1 2 3
do
sql="select count(*) from $table"
echo "try #$try for $sql"
dosql "$sql" mysql
done
done
mysql_upgrade --password="$rootpass"
# kill daemon
echo "killing mysql daemon"
pkill -f mysqld
sleep 3
echo "starting mysql daemon via service"
service mysql start
grep ERROR error.log
exit 0
|
C | UTF-8 | 1,432 | 2.921875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include<errno.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#define Buffer_Len 256
int main(int argc,char* argv[]){
int s;
int a;
int n;
int maxLen;
char* servName;
int servPort;
char* string;
int len;
char buffer[Buffer_Len+1];
char* ptr=buffer;
struct sockaddr_in serverAddr;
if(argc!=4){
printf("%d %s %s %s \n",argc,argv[1],argv[2],argv[3]);
printf("Error:three arguments are needed!");
exit(1);
}
servName=argv[1];
servPort=atoi(argv[2]);
string=argv[3];
memset(&serverAddr, 0, sizeof(serverAddr));
serverAddr.sin_family=AF_INET;
inet_pton(AF_INET,servName,&serverAddr.sin_addr);
serverAddr.sin_port=htons(servPort);
if((s=socket(PF_INET,SOCK_STREAM,0))<0){
perror("Error:socket creation failed!");
exit(1);
}
if(connect(s,(struct sockaddr*)&serverAddr,sizeof(serverAddr))<0){
perror("Error:connection failed!");
exit(1);
}
send(s,string,strlen(string),0);
char Buffer[Buffer_Len];
while((n=recv(s,ptr,maxLen,0))>0){
ptr+=n;
maxLen-=n;
len+=n;
Buffer[n]='\0';
}
//char Buffer[Buffer_Len];
//int m=read(s, buffer, Buffer_Len);
printf("%d bytes read\n", n);
//Buffer[n]='\0';
//printf("Echoed string received:");
fputs(Buffer,stdout);
fflush(stdout);
close(s);
exit(0);
}
|
Java | UTF-8 | 699 | 2.765625 | 3 | [] | no_license | package luokka4;
/* Tehdään luokka Kieli, johon voi tallentaa kielen nimiä, sekä
* niistä käytettäviä koodeja.'
* On olemassa myös maa ja sillä omat standardit kielet sekä kielikoodit
* nimi iso639-1 iso639-2
* Finnish fi fin
* Swedish sv swe
* French fr fra
*/
public class Kieli {
private String nimi;
private String koodi1; //ISO639-1
private String koodi2; //ISO639-2/T
public Kieli() {
}
public Kieli(String nimi, String koodi1, String koodi2) {
this.nimi = nimi;
this.koodi1 = koodi1;
this.koodi2 = koodi2;
}
public String toString() {
return "Nimi: " + nimi + " iso639-1: " + koodi1 + " iso639-2: " + koodi2;
}
}
|
Shell | UTF-8 | 234 | 3.140625 | 3 | [
"MIT"
] | permissive | #!/bin/bash
END=$1
for i in $(seq 1 $END)
do
git checkout -b feature-$i
echo "# Feature-$i requirements" > README.md
git commit -am "Updated feature-$i README.md"
git push origin feature-$i
done
git checkout master |
JavaScript | UTF-8 | 395 | 2.515625 | 3 | [] | no_license | import { useState } from 'react';
const Input = ({ addTodo }) => {
const [inputText, setInputText] = useState('');
const onSub = () => {
addTodo(inputText);
setInputText('');
}
return <div>
<input type='text' value={inputText} onChange={(event) => setInputText(event.target.value)} />
<button onClick={() => onSub()}>Add todo</button>
</div>
};
export default Input;
|
Java | UTF-8 | 612 | 1.945313 | 2 | [] | no_license | package tests;
import static asserts.HardWebElementAsserts.assertThat;
import static pageobjects.LogInPage.invalidErrorLogin;
import org.testng.annotations.Test;
import util.DataProvider;
import util.TestRunner;
public class InvalidUserLogInTest extends TestRunner {
@Test(dataProvider = "testInvalidDataLogIn", dataProviderClass = DataProvider.class)
public final void testInValidUserLogin (final String invalidEmail, final String invalidPass) {
loginPage
.setInvalidEmail(invalidEmail)
.setInvalidPass(invalidPass)
.doAuthorization();
assertThat(invalidErrorLogin).isNotLogIn();
}
}
|
Java | UTF-8 | 293 | 2.09375 | 2 | [] | no_license | package com.mytechtip.example.springjpatest;
import java.util.List;
public abstract class AbstractUserDao {
protected static final int ONE_YEAR = 1000 * 60 * 60 * 24 * 365;
public abstract List<User> getNameStartsWith(String namePrefix);
public abstract User save(User u);
} |
Java | UHC | 3,718 | 2.53125 | 3 | [] | no_license | package somo.framework.lib;
import java.util.*;
import java.rmi.RemoteException;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import javax.sql.*;
import somo.framework.prop.*;
import somo.framework.expt.*;
import somo.framework.log.*;
/**
*
* <p>Copyright: Copyright by softonmobile (c) 2003</p>
* <p>Company: ()Ʈ¸</p>
* <p>@version 1.0</p>
* <p>@author SI </p>
* JNDI Interface NamingService ϵ ڿ(DataSource, EJB ) lookup Ѵ.<BR>
*
*/
public class ResinJNDIManager{
/**
* Singleton
*/
private static ResinJNDIManager m_instance;
/**
* JNDI NamingService URL
*/
private String m_PROVIDER_URL;
/**
* JNDI NamingService SPI Ŭ
*/
private String m_INITIAL_CONTEXT_FACTORY;
/**
* JNDI Context
*/
private Context m_ctx;
private Context envCtx;
/**
* default <BR>
* PropertyManager κ JNDI , JNDI NamingService InitialContext ´.
*/
private ResinJNDIManager(){
PropertyManager prop = PropertyManager.getInstance();
try{
m_ctx = new InitialContext();
envCtx = (Context) m_ctx.lookup("java:/comp/env");
System.out.println("envctx : " + envCtx);
} catch(NamingException e){
FWLogManager.getInstance().log("ResinJNDIManager.java", "InitialContext()", e,
"NamingServer reference ߽ϴ.",
"ʱȭ Ͽ JNDI PROVIDER.URL, INITIAL.CONTEXT.FACTORY Ӽ ȮϽʽÿ.", true);
throw new SysException(e);
}
}
/**
* JDNIManager ü Singleton Ѵ.
* @return JDNIManager ü
*/
public static ResinJNDIManager getInstance(){
if(m_instance == null){
m_instance = new ResinJNDIManager();
}
return m_instance;
}
/**
* Weblogic JNDI API Ͽ EJBHome̽ ´. . <br>
* JNDI aaaa.bbbb Ѵ. LOG ʿ.
* @param jndiName EJB JNDI Alias name
* @return EJBHome ü
*/
public synchronized Object getHome(String jndiName){
Object obj = null;
try{
obj = envCtx.lookup(jndiName);
} catch(NamingException e){
SysException se = new SysException(e);
FWLogManager.getInstance().log("ResinJNDIManager.java","getHome()", e, "ResinJNDIManager ̿Ͽ EJBHome ü ܰ ߽ϴ.", "JNDI úκ ȮϽʽÿ.", false);
throw se;
}
return PortableRemoteObject.narrow(obj, obj.getClass());
}
public synchronized DataSource getDataSource(String jndiName){
DataSource obj = null;
try{
System.out.println("jndiName "+jndiName);
System.out.println("jdbc/"+jndiName);
//jndiName = "jdbc/" + jndiName;
obj = (DataSource)envCtx.lookup(jndiName);
} catch(NamingException e){
SysException se = new SysException(e);
FWLogManager.getInstance().log("ResinJNDIManager.java","getDataSource()", e, "ResinJNDIManager ̿Ͽ DataSource ü ܰ ߽ϴ.", "JNDI úκ ȮϽʽÿ.", false);
throw se;
}
return obj;
}
/**
* Initial Context Ѵ.
* @return InitialContext ü
*/
private Context getInitialContext(){
if(m_instance == null){
m_instance = new ResinJNDIManager();
}
return m_ctx;
}
}
|
C# | UTF-8 | 334 | 2.75 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab_7
{
public class Addition
{
public float Add(float firstNumber, float secondNumber)
{
float a = firstNumber + secondNumber;
return a;
}
}
}
|
Ruby | UTF-8 | 1,669 | 2.59375 | 3 | [] | no_license | require "tencent_cloud_sms/version"
require "tencent_cloud_sms/configuration"
require "tencent_cloud_sms/http_client"
module TencentCloudSms
URL = 'sms.tencentcloudapi.com'
class Error < StandardError; end
class << self
attr_accessor :phone_number, :msg, :time_now, :nonce
def send_msg(phone_number, msg)
assign_attributes(phone_number, msg)
res = HttpClient.get("https://#{URL}/", params_with_sign)
result = JSON.load(res.body)
result_code = result["Response"]["SendStatusSet"].first["Code"]
return 'success' if result_code == 'Ok'
result_code #LimitExceeded.PhoneNumberDailyLimit 单手机超出每日限制
end
private
def assign_attributes(phone_number, msg)
self.phone_number = phone_number
self.msg = msg
self.time_now = Time.now.to_i
self.nonce = create_nonce
end
def params_with_sign
params.merge('Signature' => signature)
end
def signature
sign_str = "GET#{URL}/?" + params.sort.map { |param| param.join('=') }.join('&')
Base64.encode64(OpenSSL::HMAC.digest('sha1', Configuration.secret_key, sign_str)).strip
end
def params
{
'Action'=> 'SendSms',
'Version'=> '2019-07-11',
'SmsSdkAppid'=> Configuration.sms_sdk_appid,
'PhoneNumberSet.0'=> "+86" + phone_number,
'TemplateID'=> Configuration.template_id,
'TemplateParamSet.0'=> msg,
'Timestamp'=> time_now,
'Nonce'=> nonce,
'SecretId'=> Configuration.secret_id,
'Sign'=> Configuration.sign
}
end
def create_nonce
Random.new.rand(100000..999999).to_s
end
end
end
|
PHP | UTF-8 | 3,350 | 3.421875 | 3 | [] | no_license | <?php
namespace Gof\Datos\Errores\Mensajes;
use Gof\Interfaz\Errores\Mensajes\Error as IError;
/**
* Dato de tipo error que almacena mensajes y un código
*
* Clase de tipo error que puede almacenar una lista de mensajes y un código de error.
*
* @package Gof\Datos\Errores\Mensajes
*/
class Error implements IError
{
/**
* @var int Código de error.
*/
private int $codigo;
/**
* @var array Lista de mensajes de errores.
*/
private array $errores;
/**
* Constructor
*
* @param int $codigoDeError Código de error (Opcional).
* @param array $erroresPrevios Array con mensajes de errores previos (Opcional).
*/
public function __construct(int $codigoDeError = 0, array $erroresPrevios = [])
{
$this->codigo = $codigoDeError;
$this->errores = $erroresPrevios;
}
/**
* Indica si existen errores
*
* Devuelve **true** si hay mensjes de errores en la pila o si el código de
* error es diferente de cero.
*
* @return bool Devuelve **true** si hay errores o **false** de lo contrario.
*/
public function hay(): bool
{
return !empty($this->errores) || $this->codigo !== 0;
}
/**
* Obtiene el código de error
*
* @param ?int $codigo Nuevo código de error o **null** para obtener el actual.
*
* @return int Devuelve el código de error actual.
*/
public function codigo(?int $codigo = null): int
{
return $codigo === null ? $this->codigo : $this->codigo = $codigo;
}
/**
* Alias de codigo()
*
* @return int
*
* @see Error::codigo()
*/
public function error(): int
{
return $this->codigo();
}
/**
* Obtiene último mensaje o define uno nuevo
*
* Si se pasa un mensaje como argumento se agregará un nuevo mensaje a la
* lista de errores. Si no se pasa nada por parámetro se obtendrá el último
* mensaje agregado.
*
* Si no hay mensajes almacenados en la pila de errores se devolverá un string vacío.
*
* @param ?string $mensaje Nuevo mensaje de error o **null** para obtener el último.
*
* @return string Devuelve el último mensaje de la pila de errores.
*/
public function mensaje(?string $mensaje = null): string
{
if( $mensaje === null ) {
$tope = count($this->errores) - 1;
return $tope < 0 ? '' : $this->errores[$tope];
}
return $this->errores[] = $mensaje;
}
/**
* Quita el último mensaje de la pila de errores
*
* Obtiene el mensaje del tope de la pila de errores y luego lo remueve.
*
* **NOTA**: Esto no afecta al código de errores.
*
* @return string Devuelve un mensaje de error
*/
public function quitar(): string
{
return array_pop($this->errores) ?? '';
}
/**
* Limpia los errores almacenados
*
* Limpia la pila de errores y establece el código de error a 0.
*/
public function limpiar()
{
$this->codigo = 0;
$this->errores = [];
}
/**
* Lista de errores
*
* @return array Devuelve la pila de errores.
*/
public function lista(): array
{
return $this->errores;
}
}
|
Java | UTF-8 | 1,857 | 2.140625 | 2 | [] | no_license | package br.com.api.tiagoverde.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
@Entity
@Table(name = "usuarios")
public class Usuario implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(unique = true, name = "CPF")
private String cpf;
@Column(unique = true, name = "EMAIL")
private String email;
@Column(name = "NOME")
private String nome;
@Column(name = "DATANASCIMENTO")
private String dataNascimento;
@OneToMany(mappedBy = "usuario")
private List<Endereco> enderecos;
public Usuario() {
}
public Usuario(String cpf, String email, String nome, String dataNascimento) {
this.cpf = cpf;
this.email = email;
this.nome = nome;
this.dataNascimento = dataNascimento;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCpf() {
return cpf;
}
public void setCpf(String cpf) {
this.cpf = cpf;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getDataNascimento() {
return dataNascimento;
}
public void setDataNascimento(String dataNascimento) {
this.dataNascimento = dataNascimento;
}
public List<Endereco> getEnderecos() {
return enderecos;
}
public void setEnderecos(List<Endereco> enderecos) {
this.enderecos = enderecos;
}
}
|
Markdown | UTF-8 | 192 | 2.890625 | 3 | [] | no_license | ## Selection sort
**Type**: in-place
**Average performance**: n^2
Algorithm:
1. Find min element in the array and place swap it with first element.
2. Move cursor to 1 index and proceed.
|
Java | UTF-8 | 349 | 2.890625 | 3 | [] | no_license | package JavaJoe;
public class joe32 {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
class joe321{
void m1() {
System.out.println("joe321 m1()");
}
}
class joe322 extends joe321{
void m1() { //override 是用來延伸用法
super.m1();
System.out.println("joe322 m1()");
}
} |
C++ | UTF-8 | 947 | 2.765625 | 3 | [] | no_license |
//
// MPI_CountPoweredElementsVisitor.h
//
// Description:
// Count the number of MPI_PoweredElement objects (and subclasses) visited.
// Visit all of the elments you want to count, and then call
// getPoweredElementCount() to get the total number seen.
//
#ifndef __MPI_COUNTPOWEREDELEMENTSVISITOR_H__
#define __MPI_COUNTPOWEREDELEMENTSVISITOR_H__
#include "MPI_ElementConstVisitor.h"
class MPI_CountPoweredElementsVisitor : public MPI_ElementConstVisitor
{
public:
MPI_CountPoweredElementsVisitor( void );
unsigned int getPoweredElementCount( void ) const;
void visitOneSpaceElement( MPI_OneSpaceElement const& element );
void visitIntersectionElement( MPI_IntersectionElement const& element );
void visitPoweredElement( MPI_PoweredElement const& element );
void visitTrainElement( MPI_TrainElement const& element );
private:
unsigned int numpoweredelements_;
};
#endif
// vim:sw=4:et:cindent:
|
JavaScript | UTF-8 | 1,944 | 3.03125 | 3 | [] | no_license | import { render, screen, fireEvent } from "@testing-library/react";
import App, { replaceCamelwithSpaces } from "./App";
test("button has correct initial color", () => {
render(<App />);
const colorButton = screen.getByRole("button", { name: "Change to Midnight Blue" });
//expect the button text to be "Change to red"
expect(colorButton).toHaveStyle({ backgroundColor: "MediumVioletRed" });
//click button
fireEvent.click(colorButton);
//expect the button text to be "Change to blue"
expect(colorButton).toHaveStyle({ backgroundColor: "MidnightBlue" });
//expect the button text to be "Change to red"
expect(colorButton.textContent).toBe("Change to Medium Violet Red");
});
test("initial conditions", () => {
render(<App />);
//check that the button starts out enabled
const colorButton = screen.getByRole("button", { name: "Change to Midnight Blue" });
expect(colorButton).toBeEnabled();
// check that the cehckbox starts out unchecked
const checkbox = screen.getByRole("checkbox");
expect(checkbox).not.toBeChecked();
});
test("Checkbox functionality", () => {
render(<App />);
const checkbox = screen.getByRole("checkbox", { name: "Disable button" });
const button = screen.getByRole("button", { name: "Change to Midnight Blue" });
fireEvent.click(checkbox);
expect(button).toBeDisabled();
expect(button).toHaveStyle({ backgroundColor: "gray" });
fireEvent.click(checkbox);
expect(button).toBeEnabled();
});
describe("spaces before camel-case capital letters", () => {
test("Works for no inner capital letters", () => {
expect(replaceCamelwithSpaces("Red")).toBe("Red");
});
test("Works for one inner capital letter", () => {
expect(replaceCamelwithSpaces("MidnightBlue")).toBe("Midnight Blue");
});
test("Works for multiple inner capital letters", () => {
expect(replaceCamelwithSpaces("MidnightVioletRed")).toBe("Midnight Violet Red");
});
});
|
Java | UTF-8 | 4,625 | 2.3125 | 2 | [
"W3C-20150513",
"W3C"
] | permissive | // $Id$
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
// Rewritten 2010 Yves Lafon <ylafon@w3.org>
// (c) COPYRIGHT MIT, ERCIM and Keio, 1997-2010.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css;
import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.Css1Style;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssValue;
/**
* @since CSS1
*/
public class CssBorder extends CssProperty {
// @since CSS1
public CssBorderColor borderColor;
public CssBorderStyle borderStyle;
public CssBorderWidth borderWidth;
public CssBorderRight borderRight;
public CssBorderTop borderTop;
public CssBorderBottom borderBottom;
public CssBorderLeft borderLeft;
// @since CSS3
public CssBorderRadius borderRadius;
public CssBorderImage borderImage;
public boolean shorthand = false;
/**
* Create a new CssBorder
*/
public CssBorder() {
}
// a small init for the holder in Style
public CssBorder(boolean holder) {
if (holder) {
// those are holding stuff...
borderColor = new CssBorderColor();
borderStyle = new CssBorderStyle();
borderWidth = new CssBorderWidth();
// we are not generating border-(sides)
// css3 holders
borderRadius = new CssBorderRadius();
borderImage = new CssBorderImage();
}
}
/**
* Set the value of the property<br/>
* Does not check the number of values
*
* @param expression The expression for this property
* @throws org.w3c.css.util.InvalidParamException
* The expression is incorrect
*/
public CssBorder(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}
/**
* Set the value of the property
*
* @param expression The expression for this property
* @param check set it to true to check the number of values
* @throws org.w3c.css.util.InvalidParamException
* The expression is incorrect
*/
public CssBorder(ApplContext ac, CssExpression expression,
boolean check) throws InvalidParamException {
throw new InvalidParamException("unrecognize", ac);
}
/**
* Returns the value of this property
*/
public Object get() {
return value;
}
/**
* Returns the color
*/
public CssValue getColor() {
if (borderColor == null) {
return null;
} else {
return borderColor.getColor();
}
}
/**
* Returns the name of this property
*/
public final String getPropertyName() {
return "border";
}
/**
* Returns a string representation of the object.
*/
public String toString() {
return value.toString();
}
/**
* Add this property to the CssStyle
*
* @param style The CssStyle
*/
public void addToStyle(ApplContext ac, CssStyle style) {
CssBorder cssBorder = ((Css1Style) style).cssBorder;
cssBorder.byUser = byUser;
if (cssBorder.borderColor.shorthand) {
style.addRedefinitionWarning(ac, this);
} else {
if (borderColor != null) {
borderColor.addToStyle(ac, style);
}
if (borderStyle != null) {
borderStyle.addToStyle(ac, style);
}
if (borderWidth != null) {
borderWidth.addToStyle(ac, style);
}
}
cssBorder.shorthand = shorthand;
}
/**
* Get this property in the style.
*
* @param style The style where the property is
* @param resolve if true, resolve the style to find this property
*/
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
if (resolve) {
return ((Css1Style) style).getBorder();
} else {
return ((Css1Style) style).cssBorder;
}
}
/**
* Compares two properties for equality.
*
* @param property The other property.
*/
public boolean equals(CssProperty property) {
try {
CssBorder other = (CssBorder) property;
return (value != null && value.equals(other.value)) || (value == null && other.value == null);
} catch (ClassCastException cce) {
return false; // FIXME
}
}
}
|
Ruby | UTF-8 | 155 | 3.34375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | def reverse_each_word(in_the_sentence)
new_reverse = in_the_sentence.split(" ").collect do |word|
word.reverse
end
new_reverse.join(" ")
end |
C# | UTF-8 | 1,781 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | using Microsoft.Xna.Framework.Input;
namespace OpenKh.Game.Infrastructure.Input
{
class RepeatableKeyboard
{
public bool IsKeyPressed(Keys key) => GetKey(key).IsPressed;
public void PressKey(Keys key) => KeyStatePool[(int)key] = new KeyState { IsPressed = true, KeyDownFirstChance = true };
public void ReleaseKey(Keys key) => KeyStatePool[(int)key] = new KeyState { IsPressed = false };
public void UpdateKey(Keys key, float seconds)
{
var state = KeyStatePool[(int)key];
state.Timer += seconds;
state.KeyDownFirstChance = false;
KeyStatePool[(int)key] = state;
}
public bool IsKeyRepeat(Keys key)
{
var state = KeyStatePool[(int)key];
if (!state.IsPressed)
return false;
if (state.KeyDownFirstChance)
return true;
var timer = state.Timer;
if (timer < MinimumRepeatTime)
return false;
timer -= MinimumRepeatTime;
if (timer < state.PressCount * ContinuousRepeatTime)
return false;
state.PressCount++;
KeyStatePool[(int)key] = state;
return true;
}
const float MinimumRepeatTime = 1.0f; // seconds
const float ContinuousRepeatTime = 0.05f; // every 50ms
private const int MaxKeyCount = 256;
private KeyState[] KeyStatePool = new KeyState[MaxKeyCount];
private KeyState GetKey(Keys key) => KeyStatePool[(int)key];
private struct KeyState
{
public bool IsPressed;
public bool KeyDownFirstChance;
public float Timer;
public int PressCount;
}
}
}
|
Markdown | UTF-8 | 1,058 | 3.140625 | 3 | [] | no_license | # Project - Bayesian Coin Flip (Using Shiny App)
## Contents
* [Background](#background)
* [Dataset](#dataset)
* [Application](#application)
## Background
Shiny is a package created by [Rstudio](https://rstudio.com/). Users can easily use this package to build interactive web apps straight from R. Motivated by this, I tried to employ this package to create a web application about simulating flipping coin. You can access my web app on [shiny.io](https://fuchun.shinyapps.io/bayesian_coin/).
## Dataset
If we have a coin that we claim it is fair, but we are less certain. In order to prove fairness, we simulate the scenario.
We consider the prior distribution are Beta or Truncated Normal and utilize approximate bayesian computation to get the results.
## Application
Users can select the number of trials, prior distribtion and parameters to visualize the results. After choicing the variables, they can see prior, likelihood and posterior distribution.
<img src="/image/shinyApp_bayesian_app.JPG" width="800"/>
<em>Figure 1: The shiny app.</em>
|
Rust | UTF-8 | 1,718 | 2.84375 | 3 | [
"MIT"
] | permissive | use reqwest::Client;
use futures::{stream, StreamExt};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
/// HTTP request method for scanning
pub enum RequestMethod {
Get,
Post,
Head,
}
pub async fn scan_uri(base_uri: &String, word_list: &Vec<String>, req_method: &RequestMethod, accept_invalid_certs: bool) -> HashMap<String, String> {
let mut result = HashMap::new();
let scan_results: Arc<Mutex<HashMap<String, String>>> = Arc::new(Mutex::new(HashMap::new()));
let client = if accept_invalid_certs {
Client::builder().danger_accept_invalid_certs(true).build().unwrap()
}else {
Client::new()
};
let mut target_uris: Vec<String> = Vec::new();
for w in word_list{
target_uris.push(format!("{}{}", base_uri, w));
}
let results = stream::iter(target_uris).map(|uri| {
let client = &client;
async move {
let resp = match req_method {
RequestMethod::Head => client.head(&uri).send().await.unwrap(),
RequestMethod::Post => client.post(&uri).send().await.unwrap(),
RequestMethod::Get => client.get(&uri).send().await.unwrap(),
};
let stat = resp.status();
(uri, stat.to_string())
}
}).buffer_unordered(100);
results.for_each(|r| async {
match r {
(uri, status) => {
if status != "404 Not Found" {
scan_results.lock().unwrap().insert(uri, status);
}
},
}
}).await;
for (uri, status) in scan_results.lock().unwrap().iter() {
result.insert(uri.to_string(), status.to_string());
}
return result;
}
|
C | UTF-8 | 3,077 | 3.484375 | 3 | [] | no_license | #include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include "matrix.h"
static const char* skipSpaces(const char*);
size_t rowTableSize(const size_t count) {
return sizeof(VECTOR*) * count;
}
size_t matrixMemorySize(const int rowSize, const int count) {
return sizeof(MATRIX) + vectorMemorySize(rowSize) * count + rowTableSize(count);
}
void setupRows(const size_t rowSize, MATRIX* result) {
void* p = (void*)result + rowTableSize(result->count);
for(int i = 0; i < result->count; i++){
result->rows[i] = (VECTOR*)p;
setupVectorItemsSize(rowSize, result->rows[i]);
p += vectorMemorySize(rowSize);
}
}
MATRIX* initializeMatrix(const int rowSize, const int count) {
if( rowSize > 0 && count > 0) {
MATRIX* result = (MATRIX*)malloc(matrixMemorySize(rowSize, count));
if(result != NULL) {
result->count = count;
result->rows = (VECTOR**)(result + sizeof(MATRIX));
setupRows(rowSize, result);
}
return result;
}
return NULL;
}
void checkThenFree(void** a) {
if(a != NULL && *a != NULL) {
free(*a);
}
}
void freeMatrix(MATRIX** m) {
if(m != NULL && *m != NULL){
free(*m);
*m = NULL;
}
}
// void initializeMatrix()
double inputNumber(const char* number) { //dostnwork
double result = 0.0;
int n = 0;
if (number != NULL && *number != '\0') {
n = sscanf(number, "%lg", &result);
//printf("result: %g\n", result);
return result;
}
return 0;
}
void inputValues(MATRIX* m) {
if(m != NULL) {
for(int i = 0; i < m -> count; i++) {
printf("inputting row %d\n", i + 1);
inputRow(i, m -> rows[i]);
}
}
}
void freeBuffer(char** line) {
if(*line != NULL && *line != NULL) {
free(*line);
*line = NULL;
}
}
void inputRow(int i, VECTOR* v) {
char* line = NULL;
size_t count = 0;
if(getline(&line, &count, stdin) > 0) {
printf("line: %s\n", line);
char* token = line;
char* value = NULL;
for(int j = 0; j < v -> size && (value = strtok(token, " \t\n")) != NULL; token = NULL) {
v -> items[j] = inputNumber(value);
printf("value: %g\n", v -> items[j]);
}
}
freeBuffer(&line);
}
bool setMatrixValue(const int index, const double value, MATRIX* m){
if(m->rows != NULL && m->count > 0){
printf("index = %d\n", index);
div_t rowColumn = div(index, m->rows[0]->size);
if(rowColumn.quot < m->count) {
m->rows[rowColumn.quot]->items[rowColumn.rem] = value;
return true;
}
}
return false;
}
bool setMatrixValues(double* values, size_t count, MATRIX* matrix) {
if(matrix != NULL) {
int i = 0;
for(; i < count && setMatrixValue(i, values[i], matrix); i++);
return i >= count;
}
return false;
}
void printMatrixRow(MATRIX* m, int row) {
VECTOR* r = m->rows[row];
for(int i = 0; i < r->size; i++) {
printf("%g\t", r->items[i]);
}
printf("\n");
}
// segmentation fault in here, be scared
void printMatrix(MATRIX* m) {
if(m != NULL) {
for(int i = 0; i < m->count; i++) {
printMatrixRow(m, i);
}
}
} |
Ruby | UTF-8 | 4,453 | 2.890625 | 3 | [
"MIT"
] | permissive | require "base64"
require "time"
module Keap
module REST
# Object used for managing OAuth2 tokens for the Keap REST API.
#
class Token
# @attribute [r] access_token
# @return [String] The access token returned by the API.
# @attribute [r] refresh_token
# @return [String] The refresh token needed to request a new access token.
# @attribute [r] expires_in
# @return [Integer] Number of seconds from when the access token was
# issued before it expires.
# @attribute [r] expires_at
# @return [Time] Date and time when the access token expires.
#
attr_reader :access_token, :refresh_token, :expires_in, :expires_at
class << self
# Generate a URL for initiating an authorization request.
#
# @param redirect_uri [String] The callback URL Keap will redirect to
# after authorization.
#
# @return [String] A fully-configured authorization URL.
#
def auth_url(redirect_uri: Keap::REST.redirect_uri)
params = {
client_id: Keap::REST.client_id,
redirect_uri: redirect_uri,
response_type: "code",
scope: "full"
}
uri = URI(Keap::REST.authorize_url)
uri = URI::HTTPS.build(host: uri.host, path: uri.path, query: URI.encode_www_form(params))
uri.to_s
end
# Request a new access token.
#
# @param code [String] An authorization code received from a successful
# authorization request.
# @param redirect_uri [String] The redirect_uri used in the initial
# authorization request.
#
# @return [Token] A new instance of a token object.
#
def request(code:, redirect_uri: Keap::REST.redirect_uri)
body = {
client_id: Keap::REST.client_id,
client_secret: Keap::REST.client_secret,
code: code,
grant_type: "authorization_code",
redirect_uri: redirect_uri
}
response = connection.post do |req|
req.body = body
end
new(response.body)
end
# Refresh the current access token.
#
# @param refresh_token [String] The refresh token provided when the most
# recent `access_token` was granted.
#
# @return [Token] A new instance of a token object.
#
def refresh(refresh_token:)
body = {
grant_type: "refresh_token",
refresh_token: refresh_token
}
response = connection.post do |req|
req.headers["Authorization"] = "Basic " + Base64.strict_encode64(Keap::REST.client_id + ":" + Keap::REST.client_secret)
req.body = body
end
new(response.body)
end
private
def connection
@connection ||= Faraday.new(Keap::REST.token_url) do |http|
http.headers[:user_agent] = Keap::REST.user_agent
http.request :url_encoded
http.response :json
http.response :logger, nil, {headers: true, body: true}
http.adapter Keap::REST.adapter
end
end
end
def initialize(options = {})
[:access_token, :refresh_token, :expires_in, :expires_at].each do |arg|
instance_variable_set("@#{arg}", options.delete(arg) || options.delete(arg.to_s))
end
@expires_at &&= convert_expires_at(@expires_at)
@expires_at ||= Time.now + expires_in if expires_in
end
# Indicate if the access token expires.
#
# @return [Boolean]
#
def expires?
!!@expires_at
end
# Indicate if the access token is still valid.
#
# @return [Boolean]
#
def expired?
expires? && (Time.now > expires_at)
end
# Convert token into a hash which can be used to create a new instance
# with `Token.new`.
#
# @return [Hash] A hash of Token property values.
#
def to_hash
{
access_token: access_token,
refresh_token: refresh_token,
expires_in: expires_in,
expires_at: expires_at.iso8601
}
end
private
def convert_expires_at(str)
Time.iso8601(str)
rescue ArgumentError
str
end
end
end
end
|
JavaScript | UTF-8 | 1,783 | 4.875 | 5 | [] | no_license | /*
Description
Let's have some more practice with arrays! In this exercise we expect you to become more
acquainted with arrays, and what we can do with them.
So we start with an array of last names, and from there you're going to perform a bunch
of operations in it!
Instructions
- Create an array with the following names: Mason, Marcora, Rico, Neves, Ivanov
- Have a prompt that adds your last name to the array
- Have an output that has the names sorted alphabetically
- Have an output that tells you what is the position of your name in the sorted array
- Have an output that Uppercase's all names in the array
Tips
- Try to keep track of your data, and when it is being changed
- Remember to google docs if you don't know or remember certain details
Challenge
Let's take it a step further and group each sorted name with its upper-cased
one in a sub-array, which in its turn will go inside another array to group
it all together.
Output the result into the console.
*/
const names = ["Mason", "Marcora", "Rico", "Neves", "Ivanov"];
const yourLastName = prompt("What is your last name?");
names.push(yourLastName);
console.log(names);
console.log(names.sort());
console.log(names.indexOf(yourLastName));
const upperCaseNames = [];
for (const name of names) {
console.log(name.toUpperCase());
upperCaseNames.push(name.toUpperCase());
}
// Challenge;
// Version 1
const upperAndLowerCaseNames = [];
for (let i = 0; i < names.length; i++) {
const tempArray = [];
tempArray.push(names[i]);
tempArray.push(upperCaseNames[i]);
upperAndLowerCaseNames.push(tempArray);
}
console.log(upperAndLowerCaseNames);
// Version 2
const finalArray = [];
for (const name of names) {
const temp = [name, name.toUpperCase()];
finalArray.push(temp);
}
console.log(finalArray);
|
C++ | UTF-8 | 7,237 | 3.765625 | 4 | [] | no_license | #ifndef BTree_h
#define BTree_h
#include <iostream>
#include <stdio.h>
using namespace std;
template <int M>
class BTreeNode {
public:
const static int m = M;
int numKeys;
bool isLeaf;
string keys[M];
BTreeNode* children[M+1];
BTreeNode();
};
template <int M>
class BTree {
private:
void splitChildBTree(BTreeNode<M>* parent, BTreeNode<M>* child, int i);
void insertNonFull(BTreeNode<M>* nonFullNode, string data);
public:
int m = M;
BTree();
~BTree();
BTreeNode<M>* root;
bool search(BTreeNode<M>* root, string data);
void insert(BTreeNode<M>* root, string data);
void remove(BTreeNode<M>*, string data);
void printTreeOrdered(BTreeNode<M>* root);
};
// **************** BTreeNode Implementation **************
template <int M>
BTreeNode<M>::BTreeNode() {
numKeys = 0;
}
// ********* End BTreeNode Implementation *****************
// ****************** BTree Implementation ****************
template <int M>
BTree<M>::BTree() {
root = NULL;
}
template <int M>
BTree<M>::~BTree() {
delete this->root;
}
// Searches a BTree for a given string
// Returns true if found, returns false if not found
template <int M>
bool BTree<M>::search(BTreeNode<M>* root, string data) {
int i = 0;
// Locate key index where data is located or child where data should be found
while (i < root->numKeys && data > root->keys[i]) {
i++;
}
// If key of this node is equal to data, data has been found
if (i < root->numKeys && data == root->keys[i]) {
return true;
} else { //If data is not in this node
if (root->isLeaf) { // If this node is a leaf, data is not in this BTree
return false;
} else { // Recursively call search with root = child at found index
return search(root->children[i], data);
}
}
}
// Inserts a data value into the BTree as a new BTreeNode
// Inserts the value into the correct location alphabetically
template <int M>
void BTree<M>::insert(BTreeNode<M>* root, string data) {
int m = this->m;
BTreeNode<M>* oldRoot = this->root;
// If the current root is empty, create a new root
// and insert data as the first key
if (oldRoot == NULL) {
BTreeNode<M>* newRoot = new BTreeNode<M>();
newRoot->keys[0] = data;
newRoot->numKeys = 1;
newRoot->isLeaf = true;
this->root = newRoot;
} else if (oldRoot->numKeys == m) { // Root node is full, need to split and create new root
BTreeNode<M>* newRoot = new BTreeNode<M>();
newRoot->children[0] = oldRoot;
newRoot->isLeaf = false;
this->root = newRoot;
splitChildBTree(newRoot, oldRoot, 0);
insertNonFull(newRoot, data);
} else { // Root node is not full or null
insertNonFull(oldRoot, data);
}
}
// Helper method of insert
// Adds data to a non-full node
template <int M>
void BTree<M>::insertNonFull(BTreeNode<M>* node, string data) {
//Find location where new node should be added
// ****add node if not full -- if full, split tree
if (node->isLeaf) { // If current node is a leaf, try add to this node
int i = node->numKeys;
// Find index to insert data into node
while (i >=0 && data < node->keys[i]) {
node->keys[i+1] = node->keys[i];
i--;
}
node->keys[i] = data;
node->numKeys++;
} else { // If node is not a leaf
int i = node->numKeys;
// Find index to insert data into node
while (i >=0 && data < node->keys[i]) {
i--;
}
if (node->children[i]->numKeys == m) { // If the current node is full, needs to be split
splitChildBTree(node, node->children[i], i);
// Finds index where data should now be inserted
if (data > node->keys[i]) {
i++;
}
}
// Insert data into determined child of current node
insertNonFull(node->children[i], data);
}
}
// Helper method of insert
// Splits a node (child) and inserts the new child into parent's child at index i
// Preconditions: parent is not full, child is full,
// i is less than parent's numKeys and is an index of parent
template <int M>
void BTree<M>::splitChildBTree(BTreeNode<M>* parent, BTreeNode<M>* child, int i) {
// Allocates a new node to store the second half of child's keys and children
BTreeNode<M>* newNode = new BTreeNode<M>();
int m = this->m;
newNode->numKeys = m/2;
newNode->isLeaf = child->isLeaf;
// Data that will be inserted into parent
string medianKey = child->keys[m/2];
// Copy second half of child's keys into first indicies of newNode
int y = 0;
for (int x = m/2 + 1; x < m; x++) {
newNode->keys[y] = child->keys[x];
y++;
}
// Remove second half of child's keys
for (int x = m/2; x < m; x++) {
child->keys[x] = "";
}
// If child is not a leaf, copy second half of child's children into first indicies of newNode
if (!(child->isLeaf)) {
int z = 0;
for (int x = m/2 + 1; x <= m; x++) {
newNode->children[z] = child->children[x];
z++;
}
// Delete second half of child's children
for (int x = m/2 + 1; x <= m; x++) {
child->children[x] = NULL;
}
child->numKeys = m/2;
}
// Move keys of parent to make room for data of child being promoted
for (int x = parent->numKeys - 1; x >= i; x--) {
parent->keys[x+1] = parent->keys[x];
}
// Move children of parent to make room for newNode to be added
for (int x = parent->numKeys; x > i; x--) {
parent->children[x+1] = parent->children[x];
}
parent->children[i+1] = newNode;
parent->keys[i] = medianKey;
parent->numKeys++;
}
// Removes a key with specified data from the BTree rooted at node
template <int M>
void BTree<M>::remove(BTreeNode<M>* node, string data) {
int i = 0;
while (i < node->numKeys && data > node->keys[i]) {
i++;
}
if (node->isLeaf) {
if (data == node->keys[i]) {
node->keys[i] = "";
for (int j = node->numKeys - 1; j > i; j--) {
node->keys[j-1] = node->keys[j];
}
node->numKeys--;
}
} else {
remove(node->children[i], data);
}
}
// Prints all non-empty keys in the BTree rooted at node in order
template <int M>
void BTree<M>::printTreeOrdered(BTreeNode<M>* node) {
int m = this->root->m;
if (node == NULL) {
return;
} else if (node->isLeaf) {
for (int i = 0; i < m; i++) {
string toPrint = node->keys[i];
if (toPrint != "") {
cout << toPrint << endl;
}
}
} else {
for (int i = 0; i <= m; i++) {
printTreeOrdered(node->children[i]);
if (i < m) {
string toPrint = node->keys[i];
if (toPrint != "") {
cout << toPrint << endl;
}
}
}
}
}
// ************ End BTree Implementation ***************
#endif /* BTree_h */ |
JavaScript | UTF-8 | 870 | 3.046875 | 3 | [
"MIT"
] | permissive | class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
ToString() {
return `(${this.x},${this.y})`;
}
}
class Converter {
static ToBattleshipCoord(str) { // forced for battlefield size of 10x10
if (str.length === 2) {
var first = str.charCodeAt(0);
var second = str.charAt(1);
if (((first >= 65) && (first < 75)) || ((first >= 97) && (first < 107))) {
var nr = parseInt(second + '');
if (nr != null) {
if (nr >= 0 && nr < 10) {
return new Point(first >= 97 ? first - 97 + 1 : first - 65 + 1, nr + 1);
}
}
}
}
return null;
}
static ToDisplayCoord(point) { // forced for battlefield size of 10x10
if (point !== null) {
var toLetter = point.x;
var toNumber = point.y;
return String.fromCharCode((toLetter - 1) + 65) + "" + (toNumber - 1);
}
return null;
}
}
export {Point, Converter}; |
C++ | UTF-8 | 489 | 3.578125 | 4 | [] | no_license | #include<iostream>
#include<cmath>
using namespace std;
bool isPrime(int);
int main()
{
long int limit = 0;
long int count = 1;
cout << "Enter the limit:";
cin >> limit;
for(int i = 2; i < limit; i++)
{
if(isPrime(i)){
count++;
}
}
cout << "There are " << count << " no of primes in the range" << endl;
return 0;
}
bool isPrime(int n)
{
int lim = sqrt(n);
int i = 2;
for(i <= lim; i++)
{
if(n % i == 0){
return 0;
}
}
if(lim == i-1){
return 1;
}
}
|
Python | UTF-8 | 306 | 3.90625 | 4 | [] | no_license |
#input 입력을 받아서 저장을 하는 개념
print("Enter your name:")
somebody = input()
print("hi", somebody)
#문자를 찍으면 한 칸 뛰어서 됨.
print("Hello World", "Hello Again")
temperator = float(input("온도를 입력하세요 :"))
print(temperator)
print(type((temperator)))
|
Java | UTF-8 | 18,155 | 1.992188 | 2 | [] | no_license | package logic;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import javax.swing.*;
import static javax.swing.WindowConstants.EXIT_ON_CLOSE;
import static logic.CreateObject.*;
import java.awt.Font;
public class World extends JPanel implements ActionListener {
static Port P1I, P2I, P3I, P4I, P5I, P6I, P7I, P8I, P9I, P10I, P11I, P12I, P13I, P14I, P15I, P16I, P17I, P18I, P19I;
static Port P1O, P2O, P3O, P4O, P5O, P6O, P7O, P8O, P9O, P10O, P11O, P12O, P13O, P14O, P15O, P16O, P17O, P18O, P19O;
static Road Road1, Road2, Road3, Road4, Road5, Road6, Road7, Road8, Road9, Road10, Road11, Road12, Road13, Road14, Road15, Road16, Road17, Road18, Road19;
static Road Road2_1, Road2_6, Road2_9, Road4_1, Road4_3, Road5_2, Road5_9, Road6_13, Road6_16, Road7_17, Road7_19, Road8_3, Road8_7, Road8_12, Road10_7, Road10_9, Road11_6, Road11_3, Road14_4, Road14_13, Road15_5, Road15_19, Road18_5, Road18_13, Road18_17;
static Semaphore semaphore1, semaphore2, semaphore3, semaphore4, semaphore6, semaphore7, semaphore8, semaphoreP1_1, semaphoreP1_2, semaphoreP2_1, semaphoreP2_2, semaphoreP3_1, semaphoreP3_2, semaphoreP4_1, semaphoreP4_2, semaphoreP5_1, semaphoreP5_2;
static List <Road> roads = new ArrayList <>();
static List <Road> roadsIntersection = new ArrayList<>();
static List<Color> carColors = new ArrayList<>();
private static Thread thread;
static Random random = new Random();
private Timer timer = new Timer(1000,this);
static int numar_masini ;
static int numar_actual_masini = 0;
static int timp_semafoare;
static int timerSemafoarePrincipaleVerde, timerSemafoarePrincipaleRosu ,timerSemafoareSecundareVerde, timerSemafoareSecundareRosu;
static int ts;
static JLabel timerSP, timerSP2, timerSP3, timerSP4, timerSS, timerSS2, timerSS3, numarMasiniText;
static JTextArea textArea;
private JButton btnScenariu3, btnScenariu4, btnTimer;
static int timp_timer = 200;
static int verde_pietoni_principal, verde_pietoni_secundar;
private World() {
setLayout(null);
//Thread semafoare Albu Adela
thread = new Thread (() -> {
for(int i=0; i<1000; i++) {
//2 secunde inainte de a incepe semafoarele se isi schimbe starea
try{
Thread.sleep(2000);
}catch (Exception e){
}
//semafoarele principale devin verde
roads.get(0).compartimente[0].pietoni = false;
roads.get(9).compartimente[0].pietoni = false;
roads.get(10).compartimente[0].pietoni = false;
roads.get(11).compartimente[0].pietoni = false;
roads.get(13).compartimente[0].pietoni = false;
roads.get(14).compartimente[0].pietoni = false;
roads.get(15).compartimente[0].pietoni = false;
roads.get(16).compartimente[0].pietoni = false;
roads.get(1).compartimente[0].pietoni = true;
roads.get(2).compartimente[0].pietoni = true;
roads.get(7).compartimente[0].pietoni = true;
roads.get(8).compartimente[0].pietoni = true;
roads.get(17).compartimente[0].pietoni = true;
roads.get(18).compartimente[0].pietoni = true;
roads.get(9).semaphore.isGreen = true;
roads.get(6).semaphore.isGreen = true;
roads.get(13).semaphore.isGreen = true;
roads.get(3).semaphore.isGreen = true;
roads.get(7).semaphore.isGreen = false;
roads.get(17).semaphore.isGreen = false;
roads.get(1).semaphore.isGreen = false;
try {
ts = timerSemafoarePrincipaleVerde;
timerSP.setText("" + ts);
timerSP2.setText("" + ts);
timerSP3.setText("" + ts);
timerSP4.setText("" + ts);
timerSS.setText("" + ts);
timerSS2.setText("" + ts);
timerSS3.setText("" + ts);
roads.get(8).compartimente[0].pietoni = true;
for(int k=0; k<timerSemafoarePrincipaleVerde; k++){
timerSP.setText("" + ts);
timerSP2.setText("" + ts);
timerSP3.setText("" + ts);
timerSP4.setText("" + ts);
timerSS.setText("" + ts);
timerSS2.setText("" + ts);
timerSS3.setText("" + ts);
ts--;
Thread.sleep(1000);
if(k==verde_pietoni_secundar-1){
roads.get(0).compartimente[0].pietoni = false;
roads.get(9).compartimente[0].pietoni = false;
roads.get(10).compartimente[0].pietoni = false;
roads.get(11).compartimente[0].pietoni = false;
roads.get(13).compartimente[0].pietoni = false;
roads.get(14).compartimente[0].pietoni = false;
roads.get(15).compartimente[0].pietoni = false;
roads.get(16).compartimente[0].pietoni = false;
roads.get(1).compartimente[0].pietoni = false;
roads.get(2).compartimente[0].pietoni = false;
roads.get(7).compartimente[0].pietoni = false;
roads.get(8).compartimente[0].pietoni = false;
roads.get(17).compartimente[0].pietoni = false;
roads.get(18).compartimente[0].pietoni = false;
}
}
timerSP.setText("" + ts);
timerSP2.setText("" + ts);
timerSP3.setText("" + ts);
timerSP4.setText("" + ts);
timerSS.setText("" + ts);
timerSS2.setText("" + ts);
timerSS3.setText("" + ts);
} catch (InterruptedException e) {
}
//toate semafoarele devin rosii pt 2 secunde
roads.get(9).semaphore.isGreen = false;
roads.get(6).semaphore.isGreen = false;
roads.get(13).semaphore.isGreen = false;
roads.get(3).semaphore.isGreen = false;
roads.get(7).semaphore.isGreen = false;
roads.get(17).semaphore.isGreen = false;
roads.get(1).semaphore.isGreen = false;
try{
Thread.sleep(2000);
}catch (Exception e){
}
//semafoarele secundare devin verzi
roads.get(0).compartimente[0].pietoni = true;
roads.get(9).compartimente[0].pietoni = true;
roads.get(10).compartimente[0].pietoni = true;
roads.get(11).compartimente[0].pietoni = true;
roads.get(13).compartimente[0].pietoni = true;
roads.get(14).compartimente[0].pietoni = true;
roads.get(15).compartimente[0].pietoni = true;
roads.get(16).compartimente[0].pietoni = true;
roads.get(1).compartimente[0].pietoni = false;
roads.get(2).compartimente[0].pietoni = false;
roads.get(7).compartimente[0].pietoni = false;
roads.get(8).compartimente[0].pietoni = false;
roads.get(17).compartimente[0].pietoni = false;
roads.get(18).compartimente[0].pietoni = false;
roads.get(9).semaphore.isGreen = false;
roads.get(6).semaphore.isGreen = false;
roads.get(13).semaphore.isGreen = false;
roads.get(3).semaphore.isGreen = false;
roads.get(7).semaphore.isGreen = true;
roads.get(17).semaphore.isGreen = true;
roads.get(1).semaphore.isGreen = true;
try {
ts = timerSemafoarePrincipaleRosu;
timerSP.setText("" + ts);
timerSP2.setText("" + ts);
timerSP3.setText("" + ts);
timerSP4.setText("" + ts);
timerSS.setText("" + ts);
timerSS2.setText("" + ts);
timerSS3.setText("" + ts);
for(int k=0; k<timerSemafoarePrincipaleRosu; k++){
timerSP.setText("" + ts);
timerSP2.setText("" + ts);
timerSP3.setText("" + ts);
timerSP4.setText("" + ts);
timerSS.setText("" + ts);
timerSS2.setText("" + ts);
timerSS3.setText("" + ts);
ts--;
Thread.sleep(1000);
if(k==verde_pietoni_principal-1){
roads.get(0).compartimente[0].pietoni = false;
roads.get(9).compartimente[0].pietoni = false;
roads.get(10).compartimente[0].pietoni = false;
roads.get(11).compartimente[0].pietoni = false;
roads.get(13).compartimente[0].pietoni = false;
roads.get(14).compartimente[0].pietoni = false;
roads.get(15).compartimente[0].pietoni = false;
roads.get(16).compartimente[0].pietoni = false;
roads.get(1).compartimente[0].pietoni = false;
roads.get(2).compartimente[0].pietoni = false;
roads.get(7).compartimente[0].pietoni = false;
roads.get(8).compartimente[0].pietoni = false;
roads.get(17).compartimente[0].pietoni = false;
roads.get(18).compartimente[0].pietoni = false;
}
}
timerSP.setText("" + ts);
timerSP2.setText("" + ts);
timerSP3.setText("" + ts);
timerSP4.setText("" + ts);
timerSS.setText("" + ts);
timerSS2.setText("" + ts);
timerSS3.setText("" + ts);
} catch (InterruptedException e) {
}
//toate semafoarele rosii din nou
roads.get(9).semaphore.isGreen = false;
roads.get(6).semaphore.isGreen = false;
roads.get(13).semaphore.isGreen = false;
roads.get(3).semaphore.isGreen = false;
roads.get(7).semaphore.isGreen = false;
roads.get(17).semaphore.isGreen = false;
roads.get(1).semaphore.isGreen = false;
}
});
JButton btnScenariu1 = new JButton("SCENARIU 1");
btnScenariu1.setBounds(750,46,115,20);
btnScenariu1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(!timer.isRunning()) {
timer.start();
}
if(thread.isAlive()){
thread.interrupt();
}
numar_masini = 50;
timerSemafoarePrincipaleVerde = 20;
timerSemafoarePrincipaleRosu = 15;
verde_pietoni_principal = 6;
verde_pietoni_secundar = 4;
textArea.setText(null);
textArea.append("\n");
textArea.append("####################################################\n\n");
textArea.append("#INTERVAL_ORAR : " + " 07:00 - 09:00 | 17:00 - 19:00\n");
textArea.append("#NUMAR_MASINI : " + numar_masini + "\n");
textArea.append("#SEMAFOARE_PRINCIPALE_VERDE : " + timerSemafoarePrincipaleVerde + "\n");
textArea.append("#SEMAFOARE_SECUNDARE_VERDE : " + timerSemafoarePrincipaleRosu + "\n");
textArea.append("#SEMAFOARE_PIETONI_PRINCIPAL : " + verde_pietoni_principal + "\n");
textArea.append("#SEMAFOARE_PIETONI_SECUNDAR : " + verde_pietoni_secundar + "\n");
textArea.append("\n");
textArea.append("\n");
textArea.append("####################################################\n");
if(!thread.isAlive()){
thread.start();
}
}
});
add(btnScenariu1);
JButton btnScenariu2 = new JButton("SCENARIU 2");
btnScenariu2.setBounds(875,46,115,20);
btnScenariu2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(!timer.isRunning()) {
timer.start();
}
if(thread.isAlive()){
thread.interrupt();
}
numar_masini = 35;
timerSemafoarePrincipaleVerde = 16;
timerSemafoarePrincipaleRosu = 12;
verde_pietoni_principal = 8;
verde_pietoni_secundar = 6;
textArea.setText(null);
textArea.append("\n");
textArea.append("####################################################\n\n");
textArea.append("#INTERVAL_ORAR : " + " 09:00 - 12:00 | 15:00 - 16:00 | 20:00 - 22:00\n");
textArea.append("#NUMAR_MASINI : " + numar_masini + "\n");
textArea.append("#SEMAFOARE_PRINCIPALE_VERDE : " + timerSemafoarePrincipaleVerde + "\n");
textArea.append("#SEMAFOARE_SECUNDARE_VERDE : " + timerSemafoarePrincipaleRosu + "\n");
textArea.append("#SEMAFOARE_PIETONI_PRINCIPAL : " + verde_pietoni_principal + "\n");
textArea.append("#SEMAFOARE_PIETONI_SECUNDAR : " + verde_pietoni_secundar + "\n");
textArea.append("\n");
textArea.append("\n");
textArea.append("####################################################\n");
if(!thread.isAlive()){
thread.start();
}
} });
add(btnScenariu2);
btnScenariu3 = new JButton("SCENARIU 3");
btnScenariu3.setBounds(1001, 46, 115, 20);
btnScenariu3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(!timer.isRunning()) {
timer.start();
}
if(thread.isAlive()){
thread.interrupt();
}
numar_masini = 28;
timerSemafoarePrincipaleVerde = 14;
timerSemafoarePrincipaleRosu = 11;
verde_pietoni_principal = 10;
verde_pietoni_secundar = 8;
textArea.setText(null);
textArea.append("\n");
textArea.append("####################################################\n\n");
textArea.append("#INTERVAL_ORAR : " + " 12:00 - 15:00 \n");
textArea.append("#NUMAR_MASINI : " + numar_masini + "\n");
textArea.append("#SEMAFOARE_PRINCIPALE_VERDE : " + timerSemafoarePrincipaleVerde + "\n");
textArea.append("#SEMAFOARE_SECUNDARE_VERDE : " + timerSemafoarePrincipaleRosu + "\n");
textArea.append("#SEMAFOARE_PIETONI_PRINCIPAL : " + verde_pietoni_principal + "\n");
textArea.append("#SEMAFOARE_PIETONI_SECUNDAR : " + verde_pietoni_secundar + "\n");
textArea.append("\n");
textArea.append("\n");
textArea.append("####################################################\n");
if(!thread.isAlive()){
thread.start();
}
}
});
add(btnScenariu3);
btnScenariu4 = new JButton("SCENARIU 4");
btnScenariu4.setBounds(1122, 46, 115, 20);
btnScenariu4.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(!timer.isRunning()) {
timer.start();
}
if(thread.isAlive()){
thread.interrupt();
}
numar_masini = 10;
timerSemafoarePrincipaleVerde = 10;
timerSemafoarePrincipaleRosu = 7;
verde_pietoni_principal = 5;
verde_pietoni_secundar = 4;
textArea.setText(null);
textArea.append("\n");
textArea.append("####################################################\n\n");
textArea.append("#INTERVAL_ORAR : " + " 22:00 - 07:00 \n");
textArea.append("#NUMAR_MASINI : " + numar_masini + "\n");
textArea.append("#SEMAFOARE_PRINCIPALE_VERDE : " + timerSemafoarePrincipaleVerde + "\n");
textArea.append("#SEMAFOARE_SECUNDARE_VERDE : " + timerSemafoarePrincipaleRosu + "\n");
textArea.append("#SEMAFOARE_PIETONI_PRINCIPAL : " + verde_pietoni_principal + "\n");
textArea.append("#SEMAFOARE_PIETONI_SECUNDAR : " + verde_pietoni_secundar + "\n");
textArea.append("\n");
textArea.append("\n");
textArea.append("####################################################\n");
if(!thread.isAlive()){
thread.start();
}
}
});
add(btnScenariu4);
btnTimer = new JButton("100");
btnTimer.setBounds(798, 329, 115, 20);
btnTimer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
timp_timer = 100;
timer.setDelay(timp_timer);
}
});
add(btnTimer);
//POZA CU SCOALA - ALBU ADELA
JLabel poza_sc = new JLabel("");
URL scoala = getClass().getResource("/scoala2.jpg");
Icon imagine_scoala = new ImageIcon (scoala);
//POZA SENS UNIC - ALBU ADELA
JLabel sens_unic = new JLabel("");
URL sensunic = getClass().getResource("/imagine.jpg");
Icon sens = new ImageIcon (sensunic);
sens_unic.setIcon(sens);
sens_unic.setBounds(1315, 280, 55, 55);
add(sens_unic);
textArea = new JTextArea();
textArea.setBounds(798, 99, 366, 200);
textArea.setEditable(false);
add(textArea);
poza_sc.setIcon(imagine_scoala);
poza_sc.setBounds(70, 30, 300, 450);
add(poza_sc);
//TIMERE SEMAFOARE - BAR IOAN
timerSP = new JLabel("");
timerSP.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSP.setBounds(738, 348, 46, 14);
add(timerSP);
timerSP2 = new JLabel("");
timerSP2.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSP2.setBounds(549, 638, 46, 14);
add(timerSP2);
timerSP3 = new JLabel("");
timerSP3.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSP3.setBounds(1338, 355, 46, 14);
add(timerSP3);
timerSP4 = new JLabel("");
timerSP4.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSP4.setBounds(1153, 640, 46, 14);
add(timerSP4);
timerSS = new JLabel("");
timerSS.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSS.setBounds(545, 348, 46, 14);
add(timerSS);
timerSS2 = new JLabel("");
timerSS2.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSS2.setBounds(735, 638, 46, 14);
add(timerSS2);
timerSS3 = new JLabel("");
timerSS3.setFont(new Font("Tahoma", Font.PLAIN, 15));
timerSS3.setBounds(1337, 638, 46, 14);
add(timerSS3);
JButton btnTimer2 = new JButton("400");
btnTimer2.setBounds(923, 329, 115, 20);
btnTimer2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
timp_timer = 400;
timer.setDelay(timp_timer);
}
});
add(btnTimer2);
JButton btnTimer3 = new JButton("700");
btnTimer3.setBounds(1049, 329, 115, 20);
btnTimer3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
timp_timer = 700;
timer.setDelay(timp_timer);
}
});
add(btnTimer3);
}
public static void main() {
World w = new World();
JFrame frame = new JFrame();
frame.setTitle("World - Traffic Simulation");
frame.setSize(1900, 1000);
frame.setVisible(true);
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame.getContentPane().add(w);
createObjects();
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
paintObjects(g);
}
@Override
public void actionPerformed(ActionEvent arg0) {
doSimulation();
repaint();
}
}
|
Python | UTF-8 | 1,895 | 4.40625 | 4 | [] | no_license | # 5. Программа запрашивает у пользователя строку чисел, разделенных пробелом. При нажатии Enter должна выводиться
# сумма чисел. Пользователь может продолжить ввод чисел, разделенных пробелом и снова нажать Enter. Сумма вновь
# введенных чисел будет добавляться к уже подсчитанной сумме. Но если вместо числа вводится специальный символ,
# выполнение программы завершается. Если специальный символ введен после нескольких чисел, то вначале нужно
# добавить сумму этих чисел к полученной ранее сумме и после этого завершить программу.
res_sum = 0
def sum_func(*numbers):
"""
Рассчитывает сумму введённых пользователем чисел
:param numbers: список, введённых пользователем чисел
:return: сумма сложения
"""
global res_sum
for i in numbers:
try: # Если i число, прибавляет его
i = int(i)
res_sum = res_sum + i
except ValueError:
print(f"Результат сложения {res_sum}") # Если ошибка выводит сумму и выходит
exit()
return res_sum
while True:
num_list = [i for i in input("Введите целые числа через пробел").split()]
print("Результат сложения ", sum_func(*num_list))
|
C++ | UTF-8 | 5,214 | 2.734375 | 3 | [] | no_license | #pragma once
#include "DataTypes.h"
enum class t_design_type {
t_totalConstr = 0,
t_canonical,
t_simple,
t_transitive,
t_simpleTrans,
t_design_type_total
};
class CNumbInfo
{
public:
CC CNumbInfo() { resetNumbInfo(); }
CC ~CNumbInfo() {}
CK inline ulonglong numMatrOfType(t_design_type t) const { return m_nCounter[+t]; }
inline void setNumMatrOfType(ulonglong val, t_design_type t){ m_nCounter[+t] = val; }
CC inline CNumbInfo *addMatrix(ulonglong numb, ulonglong nSimple) {
addMatrOfType(numb, t_design_type::t_canonical);
if (nSimple)
addMatrOfType(nSimple, t_design_type::t_simple);
return this;
}
CC void addMatrixTrans(ulonglong numb, ulonglong nSimple) {
addMatrOfType(numb, t_design_type::t_transitive);
addMatrOfType(nSimple, t_design_type::t_simpleTrans);
}
void addMatrices(const CNumbInfo *pNumbInfo);
void outNumbInfo(char *buffer, const size_t lenBuf, size_t poz) const;
CC inline void resetNumbInfo() { memset(m_nCounter, 0, sizeof(m_nCounter)); }
protected:
CC inline void addMatrOfType(ulonglong v, t_design_type t) { m_nCounter[+t] += v; }
private:
ulonglong m_nCounter[(int)t_design_type::t_design_type_total];
};
class COrderNumb : public CNumbInfo
{
public:
COrderNumb(size_t groupOrder=1) : m_groupOrder(groupOrder) {}
CC inline auto groupOrder() const { return m_groupOrder; }
private:
const size_t m_groupOrder;
};
#define NUMB_INFO_TYPE COrderNumb *
#define NUMB_INFO_ACCESS_TYPE NUMB_INFO_TYPE
typedef CArray<NUMB_INFO_TYPE, NUMB_INFO_ACCESS_TYPE> COrderNumbArray;
class COrderInfo
{
public:
CC COrderInfo() { m_cNumbInfo.Add(new COrderNumb()); }
CC COrderInfo(size_t order, size_t extraOrder, ulonglong num, ulonglong numSimple=0) : m_groupOrder(order) {
m_cNumbInfo.Add(new COrderNumb(extraOrder));
// Only one (just added) element of array exists, so no need to do search by extraOrder
m_cNumbInfo[0]->addMatrix(num, numSimple);
}
CC ~COrderInfo() {
for (auto i = m_cNumbInfo.GetSize(); i--;)
delete m_cNumbInfo[i];
}
CC inline auto groupOrder() const { return m_groupOrder; }
CC inline CNumbInfo *addMatrix(size_t extraGroupOrder, ulonglong num, ulonglong nSimple) {
return GetByKey(extraGroupOrder)->addMatrix(num, nSimple);
}
CC inline void resetNumbInfo() {
for (auto i = m_cNumbInfo.GetSize(); i--;)
m_cNumbInfo[i]->resetNumbInfo();
}
CC inline auto nonEmptyInfo() const {
return m_cNumbInfo.GetSize() > 1 || numMatrOfType(t_design_type::t_canonical);
}
CK inline ulonglong numMatrOfType(t_design_type t) const { return m_cNumbInfo[0]->numMatrOfType(t); }
CC inline void addMatrixTrans(ulonglong n, ulonglong nS) { m_cNumbInfo[0]->addMatrixTrans(n, nS); }
#if CANON_ON_GPU
// Andrei (10/25/2021) Following function was NOT tested after COrderInfo refactoring
inline void addMatrix(const COrderInfo *pOrderInfo) {
m_cNumbInfo[0]->addMatrices(pOrderInfo->getNumInfoPtr());
}
inline CNumbInfo *getNumInfoPtr() const { return m_cNumbInfo[0]; }
#endif
COrderNumb *GetByKey(size_t extraOrder);
inline size_t numOrderNumbers() const { return m_cNumbInfo.GetSize(); }
inline COrderNumb *getOrderNumbers(size_t idx=0) const { return m_cNumbInfo[idx]; }
inline CNumbInfo *getCombinedNumbInfo() const { return m_cNumbInfo[0]; }
private:
size_t m_groupOrder = 0;
COrderNumbArray m_cNumbInfo;
};
#define GROUP_INFO_TYPE COrderInfo *
#define GROUP_INFO_ACCESS_TYPE GROUP_INFO_TYPE
typedef CArray<GROUP_INFO_TYPE, GROUP_INFO_ACCESS_TYPE> CArrayGroupInfo;
class CGroupsInfo : public CArrayGroupInfo
{
public:
CC CGroupsInfo() {
// Since most of the matrices of the big sets will have trivial
// automorphism group, it makes sence to deal with them separately.
// Add the group of order 1 with 0 counter
Add(new COrderInfo(1, 1, 0));
}
CC ~CGroupsInfo() {
for (auto i = GetSize(); i--;)
delete GetAt(i);
}
CC CNumbInfo *addGroupOrder(size_t groupOrder, size_t extraGroupOrder = 1, ulonglong numb = 1, ulonglong numSimple = 0) {
if (groupOrder == 1)
return GetAt(0)->addMatrix(extraGroupOrder, numb, numSimple);
size_t left = 1; // Starting at 1 because groups of order 1 are processed separately
size_t right = GetSize() - 1;
while (left <= right) {
const auto i = (right + left) >> 1;
const auto grOrder = GetAt(i)->groupOrder();
if (grOrder == groupOrder)
return GetAt(i)->addMatrix(extraGroupOrder, numb, numSimple);
if (grOrder < groupOrder)
left = i + 1;
else
right = i - 1;
}
auto *pOrderInfo = new COrderInfo(groupOrder, extraGroupOrder, numb, numSimple);
InsertAt(left, pOrderInfo);
return pOrderInfo->getOrderNumbers(0);
}
CC void resetGroupsInfo() {
for (auto i = GetSize(); i--;) // Loop over all group numbers
GetAt(i)->resetNumbInfo();
}
void printGroupInfo(FILE *file, COrderInfo& total) const;
void calcCountersTotal(COrderInfo *pTotal);
CK void updateGroupInfo(const CGroupsInfo *pGroupInfo);
inline size_t GetStartIdx() const { return GetAt(0)->nonEmptyInfo()? 0 : 1; }
protected:
CK void updateGroupInfo(const COrderInfo *pOrderInfoBase, size_t nElem);
private:
void addGroupOrders(const COrderInfo* pOrderInfo);
};
|
C# | UTF-8 | 704 | 3.046875 | 3 | [] | no_license | using System;
namespace FireXamarin.Resources
{
public static class Extensions
{
public static string ToUnicode(this string code)
{
var errorCode = "\uf00d";
try
{
if (code.Length != 4)
return errorCode;
if (int.TryParse(code, System.Globalization.NumberStyles.HexNumber, null, out var codeInt))
return char.ConvertFromUtf32(codeInt);
else
return errorCode;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return errorCode;
}
}
}
}
|
Java | UTF-8 | 544 | 1.835938 | 2 | [] | no_license | package com.jsoft.ems.dao;
import java.util.List;
import com.jsoft.ems.model.CourseMaster;
import com.jsoft.ems.model.EmpInOutTime;
import com.jsoft.ems.model.WorkRemark;
public interface LoginInOutDao {
List<EmpInOutTime> getTimeDetails(Long empId);
EmpInOutTime checkLoginDetails(Long empId, String curDate);
void saveInTimeDetails(EmpInOutTime empInOutTime);
void saveWorkRemark(WorkRemark workRemark);
List<WorkRemark> getRemarkList(Long empId);
public List<CourseMaster> getCourseList();
WorkRemark getWorkRemark(Long workId);
}
|
Java | UTF-8 | 1,357 | 3.15625 | 3 | [] | no_license | package br.com.confidencecambio.javabasico.segundodesafio.model;
import org.springframework.util.StringUtils;
public class Cliente {
private String nome = " João Soares Silva ";
public String getNome() {
return validaNome(nome);
}
public String primeiroNome() {
String[] lista = validaNome(nome).split(" ");
return lista[0];
}
public String ultimoNome() {
String[] lista = validaNome(nome).split(" ");
String ultimoNome = lista[lista.length - 1];
return ultimoNome;
}
public String nomeAbreviado() {
String[] lista = validaNome(nome).split(" ");
String nomeDoMeio = lista[lista.length - 2];
String nomeNovo = nome;
String abreviado = nomeDoMeio.substring(0, nomeDoMeio.length() - nomeDoMeio.length() + 1) + ".";
nomeNovo = lista[0] + " " + abreviado + " " + lista[lista.length -1];
return nomeNovo;
}
public String validaNome(String nome) {
if (StringUtils.isEmpty(nome)) {
return "Erro, nome vazio";
}
String nomeNovo = tiraEspaco(nome);
return nomeNovo;
}
public String tiraEspaco(String nome) {
boolean inicio = nome.startsWith(" ");
boolean fim = nome.endsWith(" ");
String nomeNovo = nome;
if (inicio) {
nomeNovo = nome.substring(1, nome.length());
}
if (fim) {
nomeNovo = nomeNovo.substring(0, nomeNovo.length() - 1);
}
return nomeNovo.toUpperCase();
}
}
|
Shell | UTF-8 | 951 | 3.828125 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | #!/usr/bin/bash
path_cur=$(dirname $0)
function check_env()
{
# set ASCEND_VERSION to ascend-toolkit/latest when it was not specified by user
if [ ! "${ASCEND_VERSION}" ]; then
export ASCEND_VERSION=ascend-toolkit/latest
echo "Set ASCEND_VERSION to the default value: ${ASCEND_VERSION}"
else
echo "ASCEND_VERSION is set to ${ASCEND_VERSION} by user"
fi
if [ ! "${ARCH_PATTERN}" ]; then
# set ARCH_PATTERN to ./ when it was not specified by user
export ARCH_PATTERN=./
echo "ARCH_PATTERN is set to the default value: ${ARCH_PATTERN}"
else
echo "ARCH_PATTERN is set to ${ARCH_PATTERN} by user"
fi
}
function build_vgg19()
{
cd $path_cur
rm -rf build
mkdir -p build
cd build
cmake ..
make
ret=$?
if [ ${ret} -ne 0 ]; then
echo "Failed to build vgg19."
exit ${ret}
fi
make install
}
check_env
build_vgg19
exit 0 |
Python | UTF-8 | 171 | 2.96875 | 3 | [
"MIT"
] | permissive | class Solution:
def singleNumber(self, N: List[int]) -> int:
L, d = len(N), set()
for n in N:
if n in d: d.remove(n)
else: d.add(n)
return d |
PHP | UTF-8 | 1,657 | 2.640625 | 3 | [] | no_license | <?php
class Admin_Form_CreatePage extends Zend_Form
{
private $templates = array();
public function __construct(array $templates)
{
$this->templates = $templates;
parent::__construct();
}
public function init()
{
$this->setMethod('post');
$this->setAttrib('id', 'create-page-form');
$this->setAttrib('accept-charset', 'UTF-8');
$name = new Zend_Form_Element_Text('name');
$name
->setAttrib('placeholder', 'New webpage')
->setLabel('Webpage name')
->setRequired(true)
->addValidators(
array(
new Zend_Validate_StringLength(array('min' => 1, 'max' => 255)),
new Zend_Validate_Alnum(),
)
)
;
$template = new Zend_Form_Element_Select('template');
$template
->setLabel('Select template')
->setRequired(true)
->addMultiOption('', 'Please select a template')
;
foreach($this->templates as $t)
{
$template->addMultiOption($t->getId(), $t->getName());
}
$submit = new Zend_Form_Element_Submit('submit');
$submit
->setLabel('')
->setValue('Create webpage')
;
$this->addElements(array($name, $template, $submit));
$this->addElementPrefixPath('EasyCMS_Form_Decorator','EasyCMS/Form/Decorator','decorator');
$this->addDisplayGroupPrefixPath('EasyCMS_Form_Decorator', 'EasyCMS/Form/Decorator');
$this->setElementDecorators(array('Composite'));
}
}
|
Python | UTF-8 | 774 | 4.6875 | 5 | [] | no_license | # -*- coding: utf-8 -*-
#Escribir un programa que lea un año indicar si es bisiesto.
#Nota: un año es bisiesto si es un número divisible por 4, pero no si
#es divisible por 100, excepto que también sea divisible por 400.
#1.almacenar año (entero)
#2.comprobar que es divisible por 4
#3.comprobar si es divisible por 100
#4.si lo es no es bisiesto
#5.comprobar si es divisible por 400
#6.si lo es, es bisiesto
print("--->Comprobar si un año es bisiesto<---")
anno = int(input("Introduce el año> "))
bisiesto = False
if(anno%4==0):
if(anno%100==0):
bisiesto = False
if(anno%400==0):
bisiesto = True
if(bisiesto==True):
print(f"El año {anno} es bisiesto")
else:
print(f"El año {anno} no es bisiesto")
|
Shell | UTF-8 | 661 | 3.203125 | 3 | [
"MIT"
] | permissive | #!/bin/bash
# First argument is absolute file path to container start sh
# Second argument is name of remote conatainer
# Third argument is name of remote registry
if [ "$1" == "" ]
then
echo "First argument should be remote image name (e.g., firmware)."
exit
fi
if [ "$2" == "" ]
then
echo "Second argument should be remote registry name (e.g., ip:5000)."
exit
fi
# Process is this container launches the other one, with certain environment variables set
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
--device $(python3 -m gritsbot.utils.detect_serial):/dev/ttyACM0 \
--name=updater \
--restart=always \
robotarium:auto_update
|
Python | UTF-8 | 1,516 | 3.09375 | 3 | [] | no_license | import pandas as pd
import numpy as np
from sklearn import svm, datasets
import matplotlib.pyplot as plt
iris = datasets.load_iris()
X = iris.data[:, :2] # we only take the first two features.
y = iris.target
# Plot resulting Support Vector boundaries with original data
# Create fake input data for prediction that we will use for plotting
# create a mesh to plot in
x_min, x_max = X[:, 0].min() - 1, X[:, 0].max() + 1
y_min, y_max = X[:, 1].min() - 1, X[:, 1].max() + 1
h = (x_max / x_min)/100
xx, yy = np.meshgrid(np.arange(x_min, x_max, h),
np.arange(y_min, y_max, h))
X_plot = np.c_[xx.ravel(), yy.ravel()]
# Create the SVC model object
C = 1.0 # SVM regularization parameter
svc = svm.SVC(kernel='linear', C=C).fit(X, y)
Z = svc.predict(X_plot)
Z = Z.reshape(xx.shape)
plt.figure(figsize=(15, 5))
plt.subplot(121)
plt.contourf(xx, yy, Z, cmap=plt.cm.tab10, alpha=0.3)
plt.scatter(X[:, 0], X[:, 1], c=y, cmap=plt.cm.Set1)
plt.xlabel('Sepal length')
plt.ylabel('Sepal width')
plt.xlim(xx.min(), xx.max())
plt.title('SVC with linear kernel')
# Create the SVC model object
C = 1.0 # SVM regularization parameter
svc = svm.SVC(kernel='rbf', C=C).fit(X, y)
Z = svc.predict(X_plot)
Z = Z.reshape(xx.shape)
plt.subplot(122)
plt.contourf(xx, yy, Z, cmap=plt.cm.tab10, alpha=0.3)
plt.scatter(X[:, 0], X[:, 1], c=y, cmap=plt.cm.Set1)
plt.xlabel('Sepal length')
plt.ylabel('Sepal width')
plt.xlim(xx.min(), xx.max())
plt.title('SVC with RBF kernel')
plt.show()
|
SQL | UTF-8 | 154 | 2.71875 | 3 | [] | no_license | --Query 2
--Give the name and address of every customer who lives on Park Lane
SELECT cname, caddr address
FROM customer
WHERE caddr LIKE '%Park Lane%';
|
JavaScript | UTF-8 | 498 | 2.5625 | 3 | [] | no_license | import actionTypes from '../actionTypes';
const initialState = {
chefLoading: true,
chef: {}
}
export default function (state = initialState, action) {
switch (action.type) {
case actionTypes.GET_CHEF_BY_ID: {
return {
...state,
chefLoading: true,
chef: {}
}
}
case actionTypes.GET_CHEF_BY_ID_SUCCESS: {
return {
...state,
chefLoading: false,
chef: action.chef
}
}
default:
return state
}
} |
Python | UTF-8 | 386 | 3.703125 | 4 | [] | no_license |
'''IMPORTANT'''
'''101 ---- 2^2 + 2^0
[ 1,0,1 ]'''
a = list(input(" Enter Binary String "))
val =0
for i in range(len(a)):
binary = a.pop()
if binary=="1":
val+=2**i
print(val)
# a = list((input("enter binarry number")))
# val = 0
# for i in range(len(a)):
# binary = a.pop()
# if binary=='1':
# val+=2**i
# print(val)
|
C# | UTF-8 | 419 | 3.25 | 3 | [] | no_license | using System;
class tableaux{
static void Main(){
int[,] tab = new int [3,3];
for(int i=0;i<tab.GetLength(0);i++){
for(int i2=0;i2<tab.GetLength(1);i2++){
tab[i,i2]=i2;
}
}
for(int i3=0;i3<tab.GetLength(0);i3++){
for(int i4=0;i4<tab.GetLength(1);i4++){
Console.WriteLine(tab[i3,i4]);
}
}
}
} |
Java | UTF-8 | 1,223 | 2.578125 | 3 | [] | no_license | package ponyvet.utilities;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import ponyvet.gui.articulo.JDFormularioArticulo;
public class ImageUtilities {
public static byte[] getBytesImage(File file) {
byte[] fileContent = new byte[(int) file.length()];
FileInputStream inputStream = null;
try {
inputStream = new FileInputStream(file);
inputStream.read(fileContent);
} catch (FileNotFoundException ex) {
Logger.getLogger(JDFormularioArticulo.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(JDFormularioArticulo.class.getName()).log(Level.SEVERE, null, ex);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
Logger.getLogger(JDFormularioArticulo.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
return fileContent;
}
}
|
Python | UTF-8 | 26,770 | 2.703125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# Name: sphinxtools/utilities.py
# Author: Andrea Gavana
#
# Created: 30-Nov-2010
# Copyright: (c) 2010-2020 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
# Standard library imports
import sys
import os
import codecs
import shutil
import re
if sys.version_info < (3,):
import cPickle as pickle
from UserDict import UserDict
string_base = basestring
else:
import pickle
from collections import UserDict
string_base = str
# Phoenix-specific imports
from .templates import TEMPLATE_CONTRIB
from .constants import IGNORE, PUNCTUATION, MODULENAME_REPLACE
from .constants import CPP_ITEMS, VERSION, VALUE_MAP
from .constants import RE_KEEP_SPACES, EXTERN_INHERITANCE
from .constants import DOXYROOT, SPHINXROOT, WIDGETS_IMAGES_ROOT
# ----------------------------------------------------------------------- #
class ODict(UserDict):
"""
An ordered dict (odict). This is a dict which maintains an order to its items;
the order is rather like that of a list, in that new items are, by default,
added to the end, but items can be rearranged.
.. note:: Note that updating an item (setting a value where the key is already
in the dict) is not considered to create a new item, and does not affect the
position of that key in the order. However, if an item is deleted, then a
new item with the same key is added, this is considered a new item.
"""
def __init__(self, dict = None):
self._keys = []
UserDict.__init__(self, dict)
def __delitem__(self, key):
UserDict.__delitem__(self, key)
self._keys.remove(key)
def __setitem__(self, key, item):
UserDict.__setitem__(self, key, item)
if key not in self._keys: self._keys.append(key)
def clear(self):
UserDict.clear(self)
self._keys = []
def copy(self):
dict = UserDict.copy(self)
dict._keys = self._keys[:]
return dict
def items(self):
return list(zip(self._keys, list(self.values())))
def keys(self):
return self._keys
def popitem(self):
try:
key = self._keys[-1]
except IndexError:
raise KeyError('dictionary is empty')
val = self[key]
del self[key]
return (key, val)
def setdefault(self, key, failobj = None):
UserDict.setdefault(self, key, failobj)
if key not in self._keys: self._keys.append(key)
def update(self, dict):
UserDict.update(self, dict)
for key in dict:
if key not in self._keys: self._keys.append(key)
def values(self):
return list(map(self.get, self._keys))
# ----------------------------------------------------------------------- #
def isNumeric(input_string):
"""
Checks if the string `input_string` actually represents a number.
:param string `input_string`: any string.
:rtype: `bool`
:returns: ``True`` if the `input_string` can be converted to a number (any number),
``False`` otherwise.
"""
try:
float(input_string)
return True
except ValueError:
return False
# ----------------------------------------------------------------------- #
def countSpaces(text):
"""
Counts the number of spaces before and after a string.
:param string `text`: any string.
:rtype: `tuple`
:returns: a tuple representing the number of spaces before and after the text.
"""
space_before = ' '*(len(text) - len(text.lstrip(' ')))
space_after = ' '*(len(text) - len(text.rstrip(' ')))
return space_before, space_after
# ----------------------------------------------------------------------- #
def underscore2Capitals(string):
"""
Replaces the underscore letter in a string with the following letter capitalized.
:param string `string`: the string to be analyzed.
:rtype: `string`
"""
items = string.split('_')[1:]
newstr = ''
for item in items:
newstr += item.capitalize()
return newstr
# ----------------------------------------------------------------------- #
def replaceCppItems(line):
"""
Replaces various C++ specific stuff with more Pythonized version of them.
:param string `line`: any string.
:rtype: `string`
"""
items = RE_KEEP_SPACES.split(line)
# This should get rid of substitutions like "float buffered"...
no_conversion = ['click', 'buffer', 'precision']
newstr = []
for n, item in enumerate(items):
if item in CPP_ITEMS:
continue
if 'wxString' == item:
item = 'string'
elif 'wxCoord' == item:
item = 'int'
elif 'time_t' == item:
item = 'int'
elif item == 'char':
item = 'int'
elif item == 'double':
if len(items) > n+2:
target = items[n+2].lower()
replace = True
for excluded in no_conversion:
if target.startswith(excluded):
replace = False
break
if replace:
item = 'float'
if len(item.replace('``', '')) > 2:
if '*' in item:
try:
eval(item)
item = item.replace('*', 'x')
except:
# Avoid replacing standalone '&&' and similar
for cpp in CPP_ITEMS[0:2]:
item = item.replace(cpp, '')
newstr.append(item)
newstr = ''.join(newstr)
newstr = newstr.replace(' *)', ' )')
return newstr
# ----------------------------------------------------------------------- #
def pythonizeType(ptype, is_param):
"""
Replaces various C++ specific stuff with more Pythonized version of them,
for parameter lists and return types (i.e., the `:param:` and `:rtype:`
ReST roles).
:param string `ptype`: any string;
:param bool `is_param`: ``True`` if this is a parameter description, ``False``
if it is a return type.
:rtype: `string`
"""
from etgtools.tweaker_tools import removeWxPrefix
if 'size_t' in ptype:
ptype = 'int'
elif 'wx.' in ptype:
ptype = ptype[3:] # ***
else:
ptype = wx2Sphinx(replaceCppItems(ptype))[1]
ptype = ptype.replace('::', '.').replace('*&', '')
ptype = ptype.replace('int const', 'int')
ptype = ptype.replace('Uint32', 'int').replace('**', '').replace('Int32', 'int')
ptype = ptype.replace('FILE', 'file')
ptype = ptype.replace('boolean', 'bool')
for item in ['unsignedchar', 'unsignedint', 'unsignedlong', 'unsigned']:
ptype = ptype.replace(item, 'int')
ptype = ptype.strip()
ptype = removeWxPrefix(ptype)
if '. wx' in ptype: #***
ptype = ptype.replace('. wx', '.')
plower = ptype.lower()
if plower == 'double':
ptype = 'float'
if plower in ['string', 'char', 'artid', 'artclient']:
ptype = 'string'
if plower in ['coord', 'byte', 'fileoffset', 'short', 'time_t', 'intptr', 'uintptr', 'windowid']:
ptype = 'int'
if plower in ['longlong']:
ptype = 'long'
cpp = ['ArrayString', 'ArrayInt', 'ArrayDouble']
python = ['list of strings', 'list of integers', 'list of floats']
for c, p in zip(cpp, python):
ptype = ptype.replace(c, p)
if 'Image.' in ptype:
ptype = ptype.split('.')[-1]
if 'FileName' in ptype:
ptype = 'string'
if ptype.endswith('&'):
ptype = ptype[0:-1]
if ' ' not in ptype:
ptype = ':class:`%s`'%ptype
else:
if is_param and '.' in ptype:
modules = list(MODULENAME_REPLACE.values())
modules.sort()
modules = modules[1:]
if ptype.split('.')[0] + '.' in modules:
ptype = ':ref:`%s`'%ptype
return ptype
# ----------------------------------------------------------------------- #
def convertToPython(text):
"""
Converts the input `text` into a more ReSTified version of it.
This involves the following steps:
1. Any C++ specific declaration (like ``unsigned``, ``size_t`` and so on
is removed.
2. Lines starting with "Include file" or "#include" are ignored.
3. Uppercase constants (i.e., like ID_ANY, HORIZONTAL and so on) are converted
into inline literals (i.e., ``ID_ANY``, ``HORIZONTAL``).
4. The "wx" prefix is removed from all the words in the input `text`. #***
:param string `text`: any string.
:rtype: `string`
"""
from etgtools.tweaker_tools import removeWxPrefix
from etgtools.item_module_map import ItemModuleMap
newlines = []
unwanted = ['Include file', '#include']
for line in text.splitlines():
newline = []
for remove in unwanted:
if remove in line:
line = line[0:line.index(remove)]
break
spacer = ' '*(len(line) - len(line.lstrip()))
line = replaceCppItems(line)
for word in RE_KEEP_SPACES.split(line):
if word == VERSION:
newline.append(word)
continue
newword = word
for s in PUNCTUATION:
newword = newword.replace(s, "")
if newword in VALUE_MAP:
word = word.replace(newword, VALUE_MAP[newword])
newline.append(word)
continue
if newword not in IGNORE and not newword.startswith('wx.'):
word = removeWxPrefix(word)
newword = removeWxPrefix(newword)
if "::" in word and not word.endswith("::"):
# Bloody SetCursorEvent...
word = word.replace("::wx", ".") # ***
word = word.replace("::", ".")
word = "`%s`" % word
newline.append(word)
continue
if (newword.upper() == newword and newword not in PUNCTUATION and
newword not in IGNORE and len(newword.strip()) > 1 and
not isNumeric(newword) and newword not in ['DC', 'GCDC']):
if '``' not in newword and '()' not in word and '**' not in word:
word = word.replace(newword, "``%s``" %
ItemModuleMap().get_fullname(newword))
word = word.replace('->', '.')
newline.append(word)
newline = spacer + ''.join(newline)
newline = newline.replace(':see:', '.. seealso::')
newline = newline.replace(':note:', '.. note::')
newlines.append(newline)
formatted = "\n".join(newlines)
formatted = formatted.replace('\\', '\\\\')
return formatted
# ----------------------------------------------------------------------- #
def findDescendants(element, tag, descendants=None):
"""
Finds and returns all descendants of a specific `xml.etree.ElementTree.Element`
whose tag matches the input `tag`.
:param xml.etree.ElementTree.Element `element`: the XML element we want to examine.
:param string `tag`: the target tag we are looking for.
:param list `descendants`: a list of already-found descendants or ``None`` if this
is the first call to the function.
:rtype: `list`
.. note:: This is a recursive function, and it is only used in the `etgtools.extractors.py`
script.
"""
if descendants is None:
descendants = []
for childElement in element:
if childElement.tag == tag:
descendants.append(childElement)
descendants = findDescendants(childElement, tag, descendants)
return descendants
# ----------------------------------------------------------------------- #
def findControlImages(elementOrString):
"""
Given the input `element` (an instance of `xml.etree.ElementTree.Element`
or a plain string)
representing a Phoenix class description, this function will scan the
doxygen image folder ``DOXYROOT`` to look for a widget screenshot.
If this class indeed represents a widget and a screenshot is found, it is
then copied to the appropriate Sphinx input folder ``WIDGETS_IMAGES_ROOT``
in one of its sub-folders (``wxmsw``, ``wxgtk``, ``wxmac``) depending on
which platform the screenshot was taken.
:param `elementOrString`: the XML element we want to examine (an instance of
xml.etree.ElementTree.Element) or a plain string (usually for wx.lib).
:rtype: `list`
:returns: A list of image paths, every element of it representing a screenshot on
a different platform. An empty list if returned if no screenshots have been found.
.. note:: If a screenshot doesn't exist for one (or more) platform but it
exists for others, the missing images will be replaced by the "no_appearance.png"
file (you can find it inside the ``WIDGETS_IMAGES_ROOT`` folder.
"""
from etgtools.tweaker_tools import removeWxPrefix
if isinstance(elementOrString, string_base):
class_name = py_class_name = elementOrString.lower()
else:
element = elementOrString
class_name = element.pyName if element.pyName else removeWxPrefix(element.name)
py_class_name = wx2Sphinx(class_name)[1]
class_name = class_name.lower()
py_class_name = py_class_name.lower()
image_folder = os.path.join(DOXYROOT, 'images')
appearance = ODict()
for sub_folder in ['wxmsw', 'wxmac', 'wxgtk']:
png_file = class_name + '.png'
appearance[sub_folder] = ''
possible_image = os.path.join(image_folder, sub_folder, png_file)
new_path = os.path.join(WIDGETS_IMAGES_ROOT, sub_folder)
py_png_file = py_class_name + '.png'
new_file = os.path.join(new_path, py_png_file)
if os.path.isfile(new_file):
appearance[sub_folder] = py_png_file
elif os.path.isfile(possible_image):
if not os.path.isdir(new_path):
os.makedirs(new_path)
if not os.path.isfile(new_file):
shutil.copyfile(possible_image, new_file)
appearance[sub_folder] = py_png_file
if not any(list(appearance.values())):
return []
for sub_folder, image in list(appearance.items()):
if not image:
appearance[sub_folder] = '../no_appearance.png'
return list(appearance.values())
# ----------------------------------------------------------------------- #
def makeSummary(class_name, item_list, template, kind, add_tilde=True):
"""
This function generates a table containing a method/property name
and a shortened version of its docstrings.
:param string `class_name`: the class name containing the method/property lists;
:param list `item_list`: a list of tuples like `(method/property name, short docstrings)`;
:param string `template`: the template to use (from `sphinxtools/templates.py`, can
be the ``TEMPLATE_METHOD_SUMMARY`` or the ``TEMPLATE_PROPERTY_SUMMARY``;
:param string `kind`: can be ``:meth:`` or ``:attr:`` or ``:ref:`` or ``:mod:``;
:param bool `add_tilde`: ``True`` to add the ``~`` character in front of the first
summary table column, ``False`` otherwise.
:rtype: `string`
"""
maxlen = 0
for method, simple_docs in item_list:
substr = ':%s:`~%s`'%(kind, method)
maxlen = max(maxlen, len(substr))
maxlen = max(80, maxlen)
summary = '='*maxlen + ' ' + '='*80 + "\n"
format = '%-' + str(maxlen) + 's %s'
for method, simple_docs in item_list:
if add_tilde:
substr = ':%s:`~%s`'%(kind, method)
else:
substr = ':%s:`%s`'%(kind, method)
new_docs = simple_docs
if kind == 'meth':
regex = re.findall(r':meth:\S+', simple_docs)
for regs in regex:
if '.' in regs:
continue
meth_name = regs[regs.index('`')+1:regs.rindex('`')]
newstr = ':meth:`~%s.%s`'%(class_name, meth_name)
new_docs = new_docs.replace(regs, newstr, 1)
if '===' in new_docs:
new_docs = ''
elif new_docs.rstrip().endswith(':'):
# Avoid Sphinx warnings
new_docs = new_docs.rstrip(':')
summary += format%(substr, new_docs) + '\n'
summary += '='*maxlen + ' ' + '='*80 + "\n"
return template % summary
# ----------------------------------------------------------------------- #
header = """\
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
"""
def writeSphinxOutput(stream, filename, append=False):
"""
Writes the text contained in the `stream` to the `filename` output file.
:param StringIO.StringIO `stream`: the stream where the text lives.
:param string `filename`: the output file we want to write the text in;
:param bool `append`: ``True`` to append to the file, ``False`` to simply
write to it.
"""
text_file = os.path.join(SPHINXROOT, filename)
text = stream.getvalue()
mode = 'a' if append else 'w'
with codecs.open(text_file, mode, encoding='utf-8') as fid:
if mode == 'w':
fid.write(header)
fid.write('.. include:: headings.inc\n\n')
fid.write(text)
# ----------------------------------------------------------------------- #
def chopDescription(text):
"""
Given the (possibly multiline) input text, this function will get the
first non-blank line up to the next newline character.
:param string `text`: any string.
:rtype: `string`
"""
description = ''
for line in text.splitlines():
line = line.strip()
if not line or line.startswith('..') or line.startswith('|'):
continue
description = line
break
return description
# ----------------------------------------------------------------------- #
class PickleFile(object):
"""
A class to help simplify loading and saving data to pickle files.
"""
def __init__(self, fileName):
self.fileName = fileName
def __enter__(self):
self.read()
return self
def __exit__(self, exc_type, exc_val, exc_tb):
self.write(self.items)
def read(self):
if os.path.isfile(self.fileName):
with open(self.fileName, 'rb') as fid:
items = pickle.load(fid)
else:
items = {}
self.items = items
return items
def write(self, items):
with open(self.fileName, 'wb') as fid:
pickle.dump(items, fid)
# ----------------------------------------------------------------------- #
def pickleItem(description, current_module, name, kind):
"""
This function pickles/unpickles a dictionary containing class names as keys
and class brief description (chopped docstrings) as values to build the
main class index for Sphinx **or** the Phoenix standalone function names
as keys and their full description as values to build the function page.
This step is necessary as the function names/description do not come out
in alphabetical order from the ``etg`` process.
:param string `description`: the function/class description.
:param string `current_module`: the harmonized module name for this class
or function (see ``MODULENAME_REPLACE`` in `sphinxtools/constants.py`).
:param string `name`: the function/class name.
:param string `kind`: can be `function` or `class`.
"""
if kind == 'function':
pickle_file = os.path.join(SPHINXROOT, current_module + 'functions.pkl')
else:
pickle_file = os.path.join(SPHINXROOT, current_module + '1moduleindex.pkl')
with PickleFile(pickle_file) as pf:
pf.items[name] = description
# ----------------------------------------------------------------------- #
def pickleClassInfo(class_name, element, short_description):
"""
Saves some information about a class in a pickle-compatible file., i.e. the
list of methods in that class and its super-classes.
:param string `class_name`: the name of the class we want to pickle;
:param xml.etree.ElementTree.Element `element`: the XML element we want to examine;
:param string `short_description`: the class short description (if any).
"""
method_list, bases = [], []
for method, description in element.method_list:
method_list.append(method)
for base in element.bases:
bases.append(wx2Sphinx(base)[1])
pickle_file = os.path.join(SPHINXROOT, 'class_summary.pkl')
with PickleFile(pickle_file) as pf:
pf.items[class_name] = (method_list, bases, short_description)
# ----------------------------------------------------------------------- #
def pickleFunctionInfo(fullname, short_description):
"""
Saves the short description for each function, used for generating the
summary pages later.
"""
pickle_file = os.path.join(SPHINXROOT, 'function_summary.pkl')
with PickleFile(pickle_file) as pf:
pf.items[fullname] = short_description
# ----------------------------------------------------------------------- #
def wx2Sphinx(name):
"""
Converts a wxWidgets specific string into a Phoenix-ReST-ready string.
:param string `name`: any string.
"""
from etgtools.tweaker_tools import removeWxPrefix
if '<' in name:
name = name[0:name.index('<')]
name = name.strip()
newname = fullname = removeWxPrefix(name)
if '.' in newname and len(newname) > 3:
lookup, remainder = newname.split('.')
remainder = '.%s' % remainder
else:
lookup = newname
remainder = ''
from etgtools.item_module_map import ItemModuleMap
imm = ItemModuleMap()
if lookup in imm:
fullname = imm[lookup] + lookup + remainder
return newname, fullname
# ----------------------------------------------------------------------- #
RAW_1 = """
%s.. raw:: html
%s <div class="codeexpander">
"""
RAW_2 = """
%s.. raw:: html
%s </div>
"""
def formatContributedSnippets(kind, contrib_snippets):
"""
This method will include and properly ReST-ify contributed snippets
of wxPython code (at the moment only 2 snippets are available), by
including the Python code into the ReST files and allowing the user to
show/hide the snippets using a JavaScript "Accordion" script thanks to
the ``.. raw::`` directive (default for snippets is to be hidden).
:param string `kind`: can be "method", "function" or "class" depending on the
current item being scanned by the `sphinxgenerator.py` tool;
:param list `contrib_snippets`: a list of file names (with the ``*.py`` extension)
containing the contributed snippets of code. Normally these snippets live
in the ``SPHINXROOT/rest_substitutions/snippets/python/contrib`` folder.
"""
spacer = ''
if kind == 'function':
spacer = 3*' '
elif kind == 'method':
spacer = 6*' '
if kind == 'class':
text = TEMPLATE_CONTRIB
else:
text = '\n' + spacer + '|contributed| **Contributed Examples:**\n\n'
for indx, snippet in enumerate(contrib_snippets):
with open(snippet, 'rt') as fid:
lines = fid.readlines()
user = lines[0].replace('##', '').strip()
onlyfile = os.path.split(snippet)[1]
download = os.path.join(SPHINXROOT, '_downloads', onlyfile)
if not os.path.isfile(download):
shutil.copyfile(snippet, download)
text += RAW_1%(spacer, spacer)
text += '\n' + spacer + 'Example %d - %s (:download:`download <_downloads/%s>`):\n\n'%(indx+1, user, onlyfile)
text += spacer + '.. literalinclude:: _downloads/%s\n'%onlyfile
text += spacer + ' :lines: 2-\n\n'
text += RAW_2%(spacer, spacer)
text += '\n\n%s|\n\n'%spacer
return text
def formatExternalLink(fullname, inheritance=False):
"""
Analyzes the input `fullname` string to check whether a class description
is actually coming from an external documentation tool
(like http://docs.python.org/library/ or http://docs.scipy.org/doc/numpy/reference/generated/).
If the method finds such an external link, the associated inheritance
diagram (if `inheritance` is ``True``) or the ``:ref:`` directive are
modified accordingly to link it to the correct external documentation.
:param string `fullname`: the fully qualified name for a class, method or function,
i.e. `exceptions.Exception` or `threading.Thread`;
:param bool `inheritance`: ``True`` if the call is coming from :mod:`inheritance`,
``False`` otherwise.
"""
if fullname.count('.') == 0:
if not inheritance:
return ':class:`%s`'%fullname
return ''
parts = fullname.split('.')
possible_external = parts[-2] + '.'
real_name = '.'.join(parts[-2:])
if possible_external.startswith('_'):
# funny ctypes...
possible_external = possible_external[1:]
real_name = real_name[1:]
if possible_external not in EXTERN_INHERITANCE:
if not inheritance:
return ':class:`%s`'%fullname
return ''
base_address = EXTERN_INHERITANCE[possible_external]
if 'numpy' in real_name:
htmlpage = '%s.html#%s'%(real_name.lower(), real_name)
else:
htmlpage = '%shtml#%s'%(possible_external.lower(), real_name)
if inheritance:
full_page = '"%s"'%(base_address + htmlpage)
else:
full_page = '`%s <%s>`_'%(fullname, base_address + htmlpage)
return full_page
def isPython3():
""" Returns ``True`` if we are using Python 3.x. """
return sys.version_info >= (3, )
def textfile_open(filename, mode='rt'):
"""
Simple wrapper around open() that will use codecs.open on Python2 and
on Python3 will add the encoding parameter to the normal open(). The
mode parameter must include the 't' to put the stream into text mode.
"""
assert 't' in mode
if sys.version_info < (3,):
import codecs
mode = mode.replace('t', '')
return codecs.open(filename, mode, encoding='utf-8')
else:
return open(filename, mode, encoding='utf-8')
|
Java | UTF-8 | 2,305 | 2.90625 | 3 | [] | no_license | package library;
import java.text.NumberFormat;
import java.time.LocalDate;
public class Cd implements Item {
public String title;
public String authName;
public String publisher;
public int isbn;
public LocalDate dueDate = LocalDate.now();
public double lateFine = 0.50;
public Cd(String title1, String authName1, String publisher1, int isbn1) {
this.title = title1;
this.authName = authName1;
this.publisher = publisher1;
this.isbn = isbn1; }
public String getPriceFormatted(double lateFine) {
String formattedPrice = NumberFormat.getCurrencyInstance().format(lateFine);
return formattedPrice;
}
@Override
public String toString() {
return "We hope you enjoyed " + title +
"\nBy: " + authName +
"\nPublisher: " + publisher +
"\nISBN: " + isbn +
"\nDue 10 days from: " + dueDate +
"\nIf this item is returned late, the fee is " + getPriceFormatted(lateFine) + " per day." +
"\n\n\n";
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthName() {
return authName;
}
public void setAuthName(String authName) {
this.authName = authName;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public int getIsbn() {
return isbn;
}
public void setIsbn(int isbn) {
this.isbn = isbn;
}
public double getLateFine() {
return lateFine;
}
public void setLateFine(double lateFine) {
this.lateFine = lateFine;
}
@Override
public String title() {
// TODO Auto-generated method stub
return null;
}
@Override
public String authName() {
// TODO Auto-generated method stub
return null;
}
@Override
public String publisher() {
// TODO Auto-generated method stub
return null;
}
@Override
public int isbn() {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean reserved() {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean checkedIn() {
// TODO Auto-generated method stub
return false;
}
@Override
public double finesAccrued() {
// TODO Auto-generated method stub
return 0;
}
@Override
public LocalDate dueDate() {
// TODO Auto-generated method stub
return null;
}
}
|
Python | UTF-8 | 411 | 2.671875 | 3 | [] | no_license | name = input("enter file: ")
if len(name) < 1:
name = 'mbox-short.txt'
handle = open(name)
counts = dict()
for line in handle:
if line.startswith('From '):
line.split()
counts[line[1]] = counts.get[line[1], 0] + 1
bigword = none
bigcount = 0
for key, val in counts.items():
if bigcount == 0 or val > bigcount:
bigcount = val
bigword = key
print(bigword, bigcount)
|
Java | UTF-8 | 147 | 1.765625 | 2 | [] | no_license | package proxy.statical;
/**
* Create by lixinglin on 2018/9/21.
* At 8:56
*/
public interface IUserService {
Integer getAge(String name);
}
|
Swift | UTF-8 | 4,075 | 2.875 | 3 | [] | no_license | //
// UIButton+Layout.swift
// TumblrMenu
//
// Created by TT on 2020/5/16.
// Copyright © 2020 tTao. All rights reserved.
//
import UIKit
enum ButtonImageStyle: Int {
case imageTop
case imageLeft
case imageRight
case imageBottom
}
extension UIButton {
/// 布局按钮
func layoutButton(with style: ButtonImageStyle, space: CGFloat = 4) {
let imageWidth = imageView!.frame.width
let imageHeight = imageView!.frame.height
let titleWidth = titleLabel!.frame.width
let titleHeight = titleLabel!.frame.height
// 初始化内边距
var imageInsets = UIEdgeInsets.zero
var titleInsets = UIEdgeInsets.zero
switch style {
case .imageTop:
imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: titleHeight + space / 2, right: -titleWidth)
titleInsets = UIEdgeInsets(top: imageHeight + space / 2, left: -imageWidth, bottom: 0, right: 0)
case .imageLeft:
imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: space / 2)
titleInsets = UIEdgeInsets(top: 0, left: space / 2, bottom: 0, right: 0)
case .imageRight:
imageInsets = UIEdgeInsets(top: 0, left: titleWidth + space / 2, bottom: 0, right: -titleWidth)
titleInsets = UIEdgeInsets(top: 0, left: -imageWidth - space / 2, bottom: 0, right: imageWidth)
case .imageBottom:
imageInsets = UIEdgeInsets(top: titleHeight + space / 2, left: 0, bottom: 0, right: -titleWidth)
titleInsets = UIEdgeInsets(top: 0, left: -imageWidth, bottom: imageHeight + space / 2, right: 0)
}
self.imageEdgeInsets = imageInsets
self.titleEdgeInsets = titleInsets
}
}
// MARK: - 按钮重复点击处理
extension UIButton {
private struct AssociatedKeys {
static var eventInterval = "eventInterval"
static var eventUnavailable = "eventUnavailable"
}
/// 重复点击的时间 属性设置
var eventInterval: TimeInterval {
set {
objc_setAssociatedObject(self, &AssociatedKeys.eventInterval, newValue as TimeInterval, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
get {
if let interval = objc_getAssociatedObject(self, &AssociatedKeys.eventInterval) as? TimeInterval {
return interval
}
return 0.5
}
}
/// 按钮不可点 属性设置
private var eventUnavailable: Bool {
set {
objc_setAssociatedObject(self, &AssociatedKeys.eventUnavailable, newValue as Bool, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
get {
if let unavailable = objc_getAssociatedObject(self, &AssociatedKeys.eventUnavailable) as? Bool {
return unavailable
}
return false
}
}
/// 新建初始化方法,在这个方法中实现在运行时方法替换
class func initializeMethod() {
let selector = #selector(UIButton.sendAction(_:to:for:))
let newSelector = #selector(new_sendAction(_:to:for:))
let method = class_getInstanceMethod(self, selector)!
let newMethod = class_getInstanceMethod(self, newSelector)!
if class_addMethod(self, selector, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)) {
class_replaceMethod(self, newSelector, method_getImplementation(method), method_getTypeEncoding(method))
} else {
method_exchangeImplementations(method, newMethod)
}
}
/// 在这个方法中
@objc private func new_sendAction(_ action: Selector, to target: Any?, for event: UIEvent?) {
if eventUnavailable == false {
eventUnavailable = true
new_sendAction(action, to: target, for: event)
// 延时
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + eventInterval, execute: {
self.eventUnavailable = false
})
}
}
}
|
Java | UTF-8 | 2,118 | 2.34375 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.epam.andrii_loievets.haircutsystem.dao;
import com.epam.andrii_loievets.haircutsystem.entity.ClientStatistics;
import java.util.List;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
/**
*
* @author Tourist
*/
@Stateless
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class ClientStatisticsDAOImpl implements ClientStatisticsDAO {
@PersistenceContext(unitName = "mainunit")
private EntityManager em;
public void setEm(EntityManager em) {
this.em = em;
}
@Override
public ClientStatistics findById(int id) {
return em.find(ClientStatistics.class, id);
}
@Override
public List<ClientStatistics> findAll() {
TypedQuery<ClientStatistics> query = em.createNamedQuery("ClientStatistics.findAll",
ClientStatistics.class);
return query.getResultList();
}
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@Override
public ClientStatistics insert(ClientStatistics clientStat) {
clientStat.setClientId(clientStat.getClient().getUserId());
em.persist(clientStat);
return clientStat;
}
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@Override
public boolean deleteById(int id) {
ClientStatistics clientStat = em.find(ClientStatistics.class, id);
if (clientStat != null) {
em.remove(clientStat);
return true;
}
return false;
}
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@Override
public ClientStatistics update(ClientStatistics clientStat) {
return em.merge(clientStat);
}
} |
Markdown | UTF-8 | 2,376 | 2.671875 | 3 | [] | no_license | # Angular Learning
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.3.
## Install
```sh
# 授予被访问目录可读写权限,避免出现
# Error: EACCES: permission denied, access '/usr/local/node-v14.15.0/lib/node_modules' 的错误
sudo chmod -R 777 /usr/local/node-v14.15.0
# 配置 NPM 国内淘宝镜像源
npm config set registry https://registry.npm.taobao.org
# 全局安装 angular CLI 工具
npm install -g @angular/cli
# 将 ng 命令设为全局命令
sudo ln -s /usr/local/node-v14.15.0/bin/ng /usr/local/bin/ng
```
## Create a project
```sh
# 在当前目录下新建一个名为 my-angular-project 的 Angular 项目
ng new my-angular-project
```
### Create a component
```sh
ng generate component components/demo/test-component
# 或者使用缩写形式
ng g c components/demo/test-component
```
向文件`src/app/app.component.html`中添加以下内容:
```html
<h1>My Angular Project</h1>
<app-test-component></app-test-component>
```
```sh
# 启动 Node 服务器
ng serve
# 访问 http://localhost:4200/
# 即可看到 src/app/app.component.html 的内容
```
## Demo List
1. [生成一个组件](./docs/1-generate-a-component.md)
2. [自定义组件标签名](docs/2-customize-the-component-name.md)
3. [服务与依赖注入](docs/3-service-and-dependency-injection.md)
4. [关于表单](docs/4-about-form-element.md)
5. [更新服务数据](docs/5-update-service-data.md)
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
C++ | UTF-8 | 660 | 3.46875 | 3 | [] | no_license | #include<iostream>
#include<string>
#include<cmath>
using namespace std;
bool prime(int);
int main()
{
string n;
int sum=0;
//cin>>n;
while(cin>>n)
{
sum=0;
for(unsigned int i=0;i<n.size();++i)
{
if(n[i]>96)
{
sum+=static_cast<int>(n[i]-96);
}
else
{
sum+=static_cast<int>(n[i]-38);
}
}
if(prime(sum))
{
cout<<"It is a prime word."<<endl;
}
else
{
cout<<"It is not a prime word."<<endl;
}
}
}
bool prime(int a)
{
int m=sqrt(static_cast<double>(a));
int quotient;
for(int i=1;i<=m;++i)
{
quotient=a/i;
if(quotient*i==a&&i!=1&&i!=a)
{
return false;
}
}
return true;
} |
Java | UTF-8 | 2,480 | 1.804688 | 2 | [] | no_license | package com.example.yebonkim.etawett;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.Toast;
import com.facebook.AccessToken;
import com.facebook.CallbackManager;
import com.facebook.FacebookCallback;
import com.facebook.FacebookException;
import com.facebook.Profile;
import com.facebook.ProfileTracker;
import com.facebook.login.LoginManager;
import com.facebook.login.LoginResult;
import com.facebook.login.widget.LoginButton;
import java.util.Arrays;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class LoginActivity extends AppCompatActivity {
@Bind(R.id.facebook_login)
LoginButton loginButton;
CallbackManager callbackManager;
AccessToken token;
ProfileTracker profileTracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
ButterKnife.bind(this);
callbackManager = CallbackManager.Factory.create();
profileTracker = new ProfileTracker() {
@Override
protected void onCurrentProfileChanged(
Profile oldProfile,
Profile currentProfile) {
Toast.makeText(LoginActivity.this, oldProfile.getFirstName(), Toast.LENGTH_SHORT).show();
}
};
profileTracker.startTracking();
loginButton.setReadPermissions("email");
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
token = loginResult.getAccessToken();
}
@Override
public void onCancel() {
}
@Override
public void onError(FacebookException error) {
}
});
}
@OnClick(R.id.facebook_login)
public void login() {
LoginManager.getInstance().logInWithReadPermissions(this, Arrays.asList("public_profile"));
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
callbackManager.onActivityResult(requestCode, resultCode, data);
}
}
|
Python | UTF-8 | 1,703 | 3.90625 | 4 | [] | no_license | # This code is to learn Python by Andre Gonzaga
# This code is the simulator for Rock, Paper, Scissor
import random
def print_options():
print('Lets play this... ')
print('')
print(' Rock ')
print(' Paper ')
print(' Scissor ')
print('')
def ask_option():
user_option=input('Your option now is: ')
return user_option.lower()
def robot():
options=['rock','paper','scissor']
robot_option=random.choice(options)
print('The computer chooses {}' .format(robot_option))
return robot_option
def user_rock(user_option,robot_option):
if robot_option == 'paper':
print('The computer wins!')
else:
print('You win!!')
def user_paper(user_option,robot_option):
if robot_option == 'rock':
print('You win!!')
else:
print('The computer wins!')
def user_scissor(user_option,robot_option):
if robot_option == 'rock':
print('The computer wins!')
else:
print('You win!!')
def check_win(user_option,robot_option):
if user_option == robot_option:
print('The game draw')
else:
if user_option == 'rock':
user_rock(user_option,robot_option)
elif user_option == 'paper':
user_paper(user_option,robot_option)
elif user_option == 'scissor':
user_scissor(user_option,robot_option)
else:
print('User choose wrong option')
def check_continue():
import os
play=input('Do you wish to play again: ')
os.system('clear')
return play
play = 'y'
while play != 'n':
print_options()
user_option=ask_option()
robot_option=robot()
check_win(user_option,robot_option)
play=check_continue()
|
Java | UTF-8 | 3,159 | 2.296875 | 2 | [] | no_license | package com.gmail.a2vplugin.plugins.soapui.api.tool;
import com.gmail.a2vplugin.api.common.messages.Parent;
import com.gmail.a2vplugin.api.tools.extensiontools.messages.ExtensionToolsRequest;
import com.gmail.a2vplugin.api.tools.extensiontools.messages.ExtensionToolsResponse;
import com.gmail.a2vplugin.api.tools.extensiontools.messages.Method;
import com.gmail.a2vplugin.api.tools.extensiontools.messages.ObjectFactory;
import com.gmail.a2vplugin.api.tools.extensiontools.messages.ToolSettings;
import com.gmail.a2vplugin.api.tools.extensiontools.messages.Value;
import com.gmail.a2vplugin.plugins.soapui.api.LogUtil;
public class ExtensionTool extends AbstractTool {
private final String path = "/parasoftapi/v1/tools/extensionTools";
public ExtensionTool(AbstractTool parent) {
super(parent);
}
@Override
public String getPostPath() {
return getUrl() + path;
}
public void createByScript(String name, String value) throws Exception {
ObjectFactory factory = new ObjectFactory();
ExtensionToolsRequest request = new ExtensionToolsRequest();
request.setDataSource(getDatasource());
ToolSettings toolSettings = factory.createToolSettings();
request.setToolSettings(toolSettings);
{
Value v = factory.createValue();
toolSettings.setValue(v);
{
v.setText(getScript(value));
}
Method method = factory.createMethod();
toolSettings.setMethod(method);
{
method.setName("getValue");
}
toolSettings.setLanguage("Groovy");
toolSettings.setUseDataSource(false);
toolSettings.setExitCodeIndicatesSuccess(false);
}
request.setName("Prop " + name);
Parent parent = new Parent();
request.setParent(parent);
{
parent.setId(getParentId());
}
ExtensionToolsResponse response = getResponse(request, ExtensionToolsResponse.class);
setId(response.getId());
LogUtil.info(response.getId() + " << Extension Tool Created");
}
private String getScript(String s) {
StringBuffer sb = new StringBuffer();
sb.append("String getValue(){\r\n");
sb.append("\treturn \"<value>\"");
while (s.contains("${=")) {
int start = s.indexOf("${=");
if (start != 0) {
String pre = s.substring(0, start);
sb.append(" + \"");
sb.append(pre);
sb.append("\"");
s = s.substring(start);
} else {
int end = s.indexOf("}", start);
String expresion = s.substring(start + 3, end);
sb.append(" + ");
sb.append(expresion);
s = s.substring(end + 1);
}
}
if (s.length() > 0) {
sb.append(" + \"");
sb.append(s);
sb.append("\"");
}
sb.append(" + \"");
sb.append("</value>\"\r\n");
sb.append("}");
return sb.toString();
}
}
|
TypeScript | UTF-8 | 1,039 | 3.546875 | 4 | [] | no_license | export class TickerUtil {
/** 开始时刻 */
public static startTick: number = 0;
/** 上次时刻 */
public static lastTick: number = 0;
/** 当前时刻 */
public static currentTick: number = 0;
/** 次数 */
public static count: number = 0;
/** 间隔 */
public static interval: number = 0;
/** 当前间隔 */
public static currentInterval: number = 0;
/** 间隔限制 */
public static limit: number = 50;
/**
* 获得当前时间长度。
*
* @return 时间长度
*/
public get length(): number {
return TickerUtil.lastTick - TickerUtil.startTick;
}
/**
* 更新处理。
*/
public static update(tick: number) {
if (TickerUtil.count == 0) {
TickerUtil.startTick = tick;
}
TickerUtil.currentTick = tick;
TickerUtil.currentInterval = tick - TickerUtil.lastTick;
TickerUtil.interval = Math.min(tick - TickerUtil.lastTick, TickerUtil.limit);
TickerUtil.lastTick = tick;
TickerUtil.count++;
}
} |
Java | UTF-8 | 4,399 | 3.09375 | 3 | [] | no_license | package com.zcj.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* 文件操作工具类
*/
public abstract class FileUtils {
private static final Logger logger = LoggerFactory.getLogger(FileUtils.class);
/**
* 创建文件
*/
public static boolean createFile(String filePath) throws IOException {
File file = new File(filePath);
if (file.exists()) {
logger.info("创建文件 {} 失败,目标文件已存在", filePath);
return false;
}
File dir = file.getParentFile();
if (!dir.exists() && !dir.mkdirs()) {
logger.info("文件目录不存在,创建目录 {} 失败", dir);
return false;
}
return file.createNewFile();
}
/**
* 创建目录
*/
public static boolean createDir(String dirPath) {
File dir = new File(dirPath);
if (dir.exists()) {
logger.info("创建目录 {} 失败,目标目录已经存在", dirPath);
return false;
}
//创建目录
if (dir.mkdirs()) {
logger.info("创建目录 {} 成功", dirPath);
return true;
} else {
logger.info("创建目录 {} 失败", dirPath);
return false;
}
}
/**
* 得到指定文件路径下的所有文件
*
* @param path 目录路径
* @return
*/
public static List<File> getFiles(String path) {
return getFiles(new File(path));
}
/**
* 递归得到目录下所有文件
*
* @param root 根目录
* @return
*/
public static List<File> getFiles(File root) {
List<File> files = new ArrayList<>();
if (!root.isDirectory()) {
files.add(root);
} else {
File[] subFiles = root.listFiles();
for (File subFile : subFiles) {
files.addAll(getFiles(subFile));
}
}
return files;
}
/**
* 删除目录下所有文件
*/
public static boolean deleteDir(File root) {
if (root.isDirectory()) {
File[] children = root.listFiles();
for (File child : children) {
if (!deleteDir(child)) {
return false;
}
}
}
return root.delete();
}
/** 获得文件的扩展名 */
public static String getExtension(String fileName) {
return fileName.substring(fileName.lastIndexOf(".") + 1);
}
/** 判断文件名是否是图片格式 */
public static boolean isImage(String fileName) {
String ext = getExtension(fileName);
return ext.equalsIgnoreCase("jpg")
|| ext.equalsIgnoreCase("png")
|| ext.equalsIgnoreCase("jpeg");
}
/**
* 从网络Url中下载文件
*
* @param urlStr URL地址
* @param fileName 文件名
* @param destPath 目标目录路径
* @throws IOException
*/
public static void downLoadFromUrl(String urlStr, String fileName, String destPath) throws IOException {
URL url = new URL(urlStr);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
//设置超时间为3秒
conn.setConnectTimeout(3 * 1000);
//防止屏蔽程序抓取而返回403错误
conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
//文件保存位置
File destDir = new File(destPath);
if (!destDir.exists()) {
destDir.mkdir();
}
File file = new File(destPath + File.separator + fileName);
//得到URL输入流和文件输出流
try (InputStream inputStream = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(inputStream);
OutputStream fos = new FileOutputStream(file)) {
//读取输入流写入输出流
byte[] buffer = new byte[1024];
int len;
while ((len = bis.read(buffer)) != -1) {
fos.write(buffer, 0, len);
}
fos.flush();
}
logger.info("{} download success", urlStr);
}
}
|
Java | GB18030 | 968 | 2 | 2 | [] | no_license | package com.smart.platform.gui.control;
import java.awt.HeadlessException;
import java.io.File;
import javax.swing.table.TableModel;
import org.apache.log4j.Category;
import com.smart.platform.gui.ste.Querycond;
public class CHovbaseGeneral extends CHovBase {
Category logger = Category.getInstance(CHovbaseGeneral.class);
public CHovbaseGeneral(File configfile) throws HeadlessException {
super();
this.configfile = configfile;
// configfileҪ
try {
readDesc();
readViewname();
readDefaultsql();
readQuerycond();
readColumns();
} catch (Exception e) {
logger.error("error", e);
throw new HeadlessException(e.getMessage());
}
}
@Override
protected TableModel createTablemodel() {
return tablemodel;
}
@Override
public String getDefaultsql() {
return defaultsql;
}
@Override
public Querycond getQuerycond() {
return querycond;
}
public String getDesc(){
return hovdesc;
}
}
|
Python | UTF-8 | 2,206 | 3.15625 | 3 | [
"MIT"
] | permissive | #!/usr/local/bin/python3
import os, sys, getopt, hashlib
import requests
class SubtitlesDownloader():
"""Used to download subtitles from SubDB"""
def __init__(self, inputfile, outputfile=None):
self.inputfile = inputfile
self.outputfile = outputfile
if self.outputfile is None:
self.outputfile = f"{os.path.splitext(inputfile)[0]}.srt"
def __save_srt_file(self, r):
with open(self.outputfile, 'wb') as fd:
for chunk in r.iter_content(chunk_size=128):
fd.write(chunk)
def __call_sub_db_api(self, hash):
url = 'http://api.thesubdb.com/'
payload = {'action': 'download', 'hash': hash, 'language': 'es'}
headers = {'user-agent': 'SubDB/1.0 (subDownoader/0.1; https://github.com/antar88/subDownoader)'}
return requests.get(url, params=payload, headers=headers)
def __get_hash(self):
readsize = 64 * 1024
name = self.inputfile
with open(name, 'rb') as f:
size = os.path.getsize(name)
data = f.read(readsize)
f.seek(-readsize, os.SEEK_END)
data += f.read(readsize)
return hashlib.md5(data).hexdigest()
def download(self):
print("Downloading...")
hash = self.__get_hash()
response = self.__call_sub_db_api(hash)
self.__save_srt_file(response)
print("Download finished!")
def main(argv):
inputfile = None
outputfile = None
try:
opts, args = getopt.getopt(argv,'i:o',['input=','output='])
except getopt.GetoptError:
print('Error. You should use the command sub_downloader.py -i <inputfile> [-o <outputfile>]')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print('sub_downloader.py -i <inputfile> [-o <outputfile>]')
sys.exit()
elif opt in ["-i", "--ifile"]:
inputfile = arg
elif opt in ("-o", "--ofile"):
outputfile = arg
print(inputfile)
if inputfile is None:
print('You need to specify input file')
sys.exit(1)
else:
subs_downloader = SubtitlesDownloader(inputfile, outputfile)
subs_downloader.download()
main(sys.argv[1:])
|
Ruby | UTF-8 | 879 | 2.84375 | 3 | [] | no_license | class Main
def self.licz(moje_dane)
wynik = 0
moje_dane.each do |jeden_zbior|
if jeden_zbior.is_a?(Hash)
jeden_zbior.each do |nazwa_klucza, jeden_podzbior|
#p jeden_podzbior
if jeden_podzbior.is_a?(Hash)
jeden_podzbior.each do |klucz, wart|
#p wart
if wart.is_a?(Array)
wynik = wart.inject(:+)
elsif wart.is_a?(Fixnum)
wynik += wart
end
end
elsif jeden_podzbior.is_a?(Array)
wynik = jeden_podzbior.inject(:+)
elsif jeden_podzbior.is_a?(Fixnum)
wynik += jeden_podzbior
end
end
elsif jeden_zbior.is_a?(Array)
wynik = jeden_zbior.inject(:+)
elsif jeden_zbior.is_a?(Fixnum)
wynik += jeden_zbior
end
end
p wynik
end
end
|
C++ | UTF-8 | 692 | 2.84375 | 3 | [] | no_license | //
// SortedList.hpp
// Lists
//
// Created by Randy McLain on 7/5/17.
// Copyright © 2017 RM. All rights reserved.
//
#ifndef SortedList_hpp
#define SortedList_hpp
#include <stdio.h>
const int MAX_SORTED_LENGTH=100;
class SortedList
{
public: SortedList();
bool isEmpty();
bool isFull();
void emptyList();
int getLength();
int listContains(float item);
void insertItem(float item);
void deleteItem(float item);
float getNextItem();
float getPreviousItem();
float getItemAt(int position);
void printList();
protected:
private:
int length;
int currentPos;
float data[MAX_SORTED_LENGTH];
};
#endif /* SortedList_hpp */
|
Java | UTF-8 | 3,063 | 2.359375 | 2 | [] | no_license | package sg.edu.np.madassignment;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonArrayRequest;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class SplashScreenActivity extends Activity {
private final static String TAG = "SplashScreen Activity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
int secondsDelayed = 3;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
startActivity(new Intent(SplashScreenActivity.this, LoginActivity.class));
finish();
}
}, secondsDelayed * 1000);
// Instantiate the RequestQueue.
RequestQueue queue = Volley.newRequestQueue(this);
String url = "https://uselessfacts.jsph.pl/random.json?language=en";
TextView factsOfTheDay = findViewById(R.id.quoteSplash);
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, response -> {
String facts = "";
try {
facts = response.getString("text");
}
catch (JSONException e) {
e.printStackTrace();
}
// Display facts
Log.v(TAG, "FACTS: " + facts);
factsOfTheDay.setText(facts);
}, error -> Toast.makeText(SplashScreenActivity.this, "Something went wrong...", Toast.LENGTH_SHORT).show());
queue.add(request);
}
@Override
public void onBackPressed() {
// Do Here what ever you want do on back press;
}
@Override
protected void onStart() {
super.onStart();
Log.d("Debug", "starting");
}
@Override
protected void onStop() {
super.onStop();
Log.d("Debug", "stop");
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.d("Debug", "destroy");
SharedPreferences.Editor editor = getSharedPreferences("Gameinfo", MODE_PRIVATE).edit();
editor.clear();
editor.apply();
}
@Override
protected void onPause() {
super.onPause();
Log.d("Debug", "pause");
}
@Override
protected void onResume() {
super.onResume();
Log.d("Debug", "resume");
}
@Override
protected void onRestart() {
super.onRestart();
Log.d("Debug", "restart");
}
} |
Java | UTF-8 | 1,266 | 1.914063 | 2 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package com.reactnativenavigation;
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import static org.assertj.core.api.Java6Assertions.assertThat;
@RunWith(RobolectricTestRunner.class)
@Config(sdk = 25, constants = BuildConfig.class, manifest = "/../../../../../src/test/AndroidManifest.xml")
public abstract class BaseTest {
@Before
public void beforeEach() {
//
}
@After
public void afterEach() {
//
}
public Activity newActivity() {
return Robolectric.setupActivity(Activity.class);
}
public void assertIsChildById(ViewGroup parent, View child) {
assertThat(parent).isNotNull();
assertThat(child).isNotNull();
assertThat(child.getId()).isNotZero().isPositive();
assertThat(parent.findViewById(child.getId())).isNotNull().isEqualTo(child);
}
public void assertNotChildOf(ViewGroup parent, View child) {
assertThat(parent).isNotNull();
assertThat(child).isNotNull();
assertThat(child.getId()).isNotZero().isPositive();
assertThat(parent.findViewById(child.getId())).isNull();
}
}
|
Java | UTF-8 | 9,614 | 2.296875 | 2 | [] | no_license | package com.storemanagement.controllers;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.storemanagement.entities.Item;
import com.storemanagement.entities.MainGroup;
import com.storemanagement.entities.Privilege;
import com.storemanagement.entities.SubGroup;
import com.storemanagement.entities.User;
import com.storemanagement.services.EntityService;
import com.storemanagement.services.GroupService;
import com.storemanagement.services.ItemService;
@WebServlet("/items")
public class ItemsController extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
List<Privilege> privileges = (List<Privilege>) request.getSession().getAttribute("privileges");
if(!privileges.get(5).isView()) response.sendRedirect("error");
else{
List<MainGroup> mainGroups = EntityService.getAllObjects(MainGroup.class);
List<Item> items = EntityService.getAllObjects(Item.class);
request.setAttribute("mainGroups", mainGroups);
request.setAttribute("items", items);
request.setAttribute("title", "الأصناف");
request.getRequestDispatcher("items/index.jsp").forward(request, response);
}
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(request.getParameter("action").equals("1"))
getSubGroups(request, response);
else if(request.getParameter("action").equals("2"))
getItemsFromSubGroup(request, response);
else if(request.getParameter("action").equals("barcode"))
printBarCode(request, response);
else {
if(request.getParameter("action").equals("add"))
add(request, response);
else if(request.getParameter("action").equals("edit"))
edit(request, response);
else if(request.getParameter("action").equals("delete"))
delete(request, response);
response.sendRedirect("items");
}
}
//add new item
protected void add(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(!request.getParameter("item_name").equals("") && !request.getParameter("item_code").equals("")) {
SubGroup subGroup = new SubGroup();
subGroup.setId(Integer.parseInt(request.getParameter("subGroups")));
Item item = new Item();
item.setSubGroup(subGroup);
item.setCode(request.getParameter("item_code"));
item.setName(request.getParameter("item_name"));
item.setPurchasePrice(Double.parseDouble(request.getParameter("item_purchase_price")));
item.setSalePrice(Double.parseDouble(request.getParameter("item_sale_price")));
item.setHome(request.getParameter("item_home"));
item.setMinLimit(Integer.parseInt(request.getParameter("item_minLimit")));
item.setMaxLimit(Integer.parseInt(request.getParameter("item_maxLimit")));
item.setDescription(request.getParameter("description"));
try {
if(!request.getParameter("item_productionDate").equals(""))
item.setProductionDate((Date) new SimpleDateFormat("yyyy-MM-dd").parse(request.getParameter("item_productionDate")));
else item.setProductionDate(null);
if(!request.getParameter("item_expirationDate").equals(""))
item.setExpirationDate((Date) new SimpleDateFormat("yyyy-MM-dd").parse(request.getParameter("item_expirationDate")));
else item.setExpirationDate(null);
} catch (ParseException e) {
e.printStackTrace();
}
User createdBy = (User) request.getSession().getAttribute("user");
item.setCreatedDate(new Date());
item.setLastUpdatedDate(new Date());
item.setCreatedBy(createdBy);
item.setLastUpdatedBy(createdBy);
EntityService.addObject(item);
}
}
//edit existing item
protected void edit(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(!request.getParameter("item_name").equals("") && !request.getParameter("item_code").equals("")) {
User lastUpdatedBy = (User) request.getSession().getAttribute("user");
int id = Integer.parseInt(request.getParameter("id"));
SubGroup subGroup = new SubGroup();
subGroup.setId(Integer.parseInt(request.getParameter("subGroups")));
Item item = new Item();
item.setId(id);
item.setSubGroup(subGroup);
item.setCode(request.getParameter("item_code"));
item.setName(request.getParameter("item_name"));
item.setPurchasePrice(Double.parseDouble(request.getParameter("item_purchase_price")));
item.setSalePrice(Double.parseDouble(request.getParameter("item_sale_price")));
item.setHome(request.getParameter("item_home"));
item.setMinLimit(Integer.parseInt(request.getParameter("item_minLimit")));
item.setMaxLimit(Integer.parseInt(request.getParameter("item_maxLimit")));
item.setDescription(request.getParameter("description"));
try {
if(!request.getParameter("item_productionDate").equals(""))
item.setProductionDate((Date) new SimpleDateFormat("yyyy-MM-dd").parse(request.getParameter("item_productionDate")));
else item.setProductionDate(null);
if(!request.getParameter("item_expirationDate").equals(""))
item.setExpirationDate((Date) new SimpleDateFormat("yyyy-MM-dd").parse(request.getParameter("item_expirationDate")));
else item.setExpirationDate(null);
} catch (ParseException e) {
e.printStackTrace();
}
item.setLastUpdatedDate(new Date());
item.setLastUpdatedBy(lastUpdatedBy);
EntityService.updateObject(item);
}
}
//delete existing item
protected void delete(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(!request.getParameter("id").equals("")) {
int id = Integer.parseInt(request.getParameter("id"));
Item item = new Item();
item.setId(id);
EntityService.removeObject(item);
}
}
//get subGroups from mainGroup
protected void getSubGroups(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(!request.getParameter("mainGroup_id").equals("")) {
int id = Integer.parseInt(request.getParameter("mainGroup_id"));
MainGroup mainGroup = new MainGroup();
mainGroup.setId(id);
List<SubGroup> subGroups = GroupService.getSubGroupsFromMainGroup(mainGroup);
StringBuilder out = new StringBuilder("");
out.append("<option value=\"\">اختر المجموعة الفرعية</option>");
if(subGroups.size() > 0) {
for(SubGroup subGroup : subGroups) {
out.append("<option value=\"" + subGroup.getId() + "\">" + subGroup.getName() + "</option>");
}
}else
out.append("<option value=\"\" disabled>لا توجد مجموعات فرعية لهذه المجموعة الرئيسية</option>");
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
response.getWriter().print(out.toString());
}
}
//get items from subGroup
protected void getItemsFromSubGroup(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(!request.getParameter("subGroupId").equals("")) {
int id = Integer.parseInt(request.getParameter("subGroupId"));
SubGroup subGroup = new SubGroup();
subGroup.setId(id);
List<Item> items = ItemService.getItemsFromSubGroup(subGroup);
StringBuilder out = new StringBuilder("");
out.append("<table class=\"table table-striped table-bordered table-hover\" id=\"dataTables-example\"><thead>" +
" <tr><th>المجموعة الرئيسية</th>" +
" <th>المجموعة الفرعية</th>" +
" <th>المجموعة الكود</th>" +
" <th>الأسم</th>" +
" <th>مشاهدة</th>" +
" <th>تعديل</th>" +
" <th>حذف</th></tr>" +
" </thead><tbody>");
if(items.size() == 0)
out.append("<tr><td colspan=\"7\"><p class=\"lead text-center text-danger\">عفوا لا يوجد أصناف تندرج تحت هذه المجموعة الفرعية</p></td></tr>");
else {
for(Item item : items) {
out.append("<tr><td>" + item.getSubGroup().getMainGroup().getName() + "</td>");
out.append("<td>" + item.getSubGroup().getName() + "</td>");
out.append("<td>" + item.getCode() + "</td>");
out.append("<td>" + item.getName() + "</td>");
out.append("<td><a href=\"items/view.jsp?id=" + item.getId() + "\"><button class=\"btn btn-default\"><i class=\"fa fa-eye\"></i></button></a></td>");
out.append("<td><a href=\"items/edit.jsp?id=" + item.getId() + "\"><button class=\"btn btn-success\"><i class=\"fa fa-edit\"></i></button></a></td>");
out.append("<td><a href=\"items/delete.jsp?id=" + item.getId() + "\"><button class=\"btn btn-danger\"><i class=\"fa fa-close\"></i></button></a></td></tr>");
}
}
out.append("</tbody></table>");
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
response.getWriter().print(out.toString());
}
}
//get items from subGroup
protected void printBarCode(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(!request.getParameter("barCodeNumber").equals("")) {
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
response.getWriter().print("تم طباعة الباركود بنجاح");
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.