ivanzhou-uber commited on
Commit
dbe8248
1 Parent(s): 185a06b

Create RedPajama tiny

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ sample.py
README.md CHANGED
@@ -1,3 +1,81 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ task_categories:
3
+ - text-generation
4
+ language:
5
+ - en
6
+ pretty_name: RedPajama Tiny
7
  ---
8
+ # Dataset Card for Dataset Name
9
+
10
+ ### Dataset Summary
11
+
12
+ This is a tiny version of the RedPajama dataset, which is a clean-room, fully open-source implementation of the LLaMa dataset.
13
+
14
+ This dataset contains 10 samples from each of the 7 sources.
15
+
16
+ The full dataset has the following token counts and is available for [download]( https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T):
17
+
18
+ | Dataset | Token Count |
19
+ |---------------|-------------|
20
+ | Commoncrawl | 878 Billion |
21
+ | C4 | 175 Billion |
22
+ | GitHub | 59 Billion |
23
+ | Books | 26 Billion |
24
+ | ArXiv | 28 Billion |
25
+ | Wikipedia | 24 Billion |
26
+ | StackExchange | 20 Billion |
27
+ | Total | 1.2 Trillion |
28
+
29
+ ### Languages
30
+
31
+ Primarily English, though the Wikipedia slice contains multiple languages.
32
+
33
+ ## Dataset Structure
34
+
35
+ The dataset structure is as follows:
36
+
37
+ ```
38
+ {
39
+ "text": ...,
40
+ "meta": {"url": "...", "timestamp": "...", "source": "...", "language": "...", ...}
41
+ }
42
+ ```
43
+
44
+ ## Dataset Creation
45
+
46
+ This dataset was created to follow the LLaMa paper as closely as possible to try to reproduce its recipe.
47
+
48
+ ### Source Data
49
+
50
+ #### Commoncrawl
51
+
52
+ We download five dumps from Commoncrawl, and run the dumps through the official `cc_net` pipeline.
53
+ We then deduplicate on the paragraph level, and filter out low quality text using a linear classifier trained to
54
+ classify paragraphs as Wikipedia references or random Commoncrawl samples.
55
+
56
+ #### C4
57
+
58
+ C4 is downloaded from Huggingface. The only preprocessing step is to bring the data into our own format.
59
+
60
+ #### GitHub
61
+
62
+ The raw GitHub data is downloaded from Google BigQuery. We deduplicate on the file level and filter out low quality
63
+ files and only keep projects that are distributed under the MIT, BSD, or Apache license.
64
+
65
+ #### Wikipedia
66
+ We use the Wikipedia dataset available on Huggingface, which is based on the Wikipedia dump from 2023-03-20 and contains
67
+ text in 20 different languages. The dataset comes in preprocessed format, so that hyperlinks, comments and other
68
+ formatting boilerplate has been removed.
69
+
70
+ #### Gutenberg and Books3
71
+ The PG19 subset of the Gutenberg Project and Books3 datasets are downloaded from Huggingface. After downloading, we use
72
+ simhash to remove near duplicates.
73
+
74
+ #### ArXiv
75
+ ArXiv data is downloaded from Amazon S3 in the `arxiv` requester pays bucket. We only keep latex source files and
76
+ remove preambles, comments, macros and bibliographies.
77
+
78
+ #### Stackexchange
79
+ The Stack Exchange split of the dataset is download from the
80
+ [Internet Archive](https://archive.org/download/stackexchange). Here we only keep the posts from the 28 largest sites,
81
+ remove html tags, group the posts into question-answer pairs, and order answers by their score.
RedPajama-Tiny.py ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2023 Together Computer
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Lint as: python3
16
+ """RedPajama: An Open-Source, Clean-Room 1.2 Trillion Token Dataset."""
17
+
18
+
19
+ import json
20
+
21
+ import datasets
22
+
23
+
24
+ logger = datasets.logging.get_logger(__name__)
25
+
26
+
27
+ _DESCRIPTION = """\
28
+ RedPajama is a clean-room, fully open-source implementation of the LLaMa dataset. This is a 1B-token sample of the full dataset.
29
+ """
30
+
31
+ _URLS = [
32
+ "arxiv_sample.jsonl",
33
+ "book_sample.jsonl",
34
+ "c4_sample.jsonl",
35
+ "cc_2023-06_sample.jsonl",
36
+ "github_sample.jsonl",
37
+ "stackexchange_sample.jsonl",
38
+ "wikipedia_sample.jsonl",
39
+ ]
40
+
41
+
42
+ class RedPajama1TSampleConfig(datasets.BuilderConfig):
43
+ """BuilderConfig for RedPajama sample."""
44
+
45
+ def __init__(self, **kwargs):
46
+ """BuilderConfig for RedPajama sample.
47
+ Args:
48
+ **kwargs: keyword arguments forwarded to super.
49
+ """
50
+ super(RedPajama1TSampleConfig, self).__init__(**kwargs)
51
+
52
+
53
+ class RedPajama1TSample(datasets.GeneratorBasedBuilder):
54
+ """RedPajama 1T Sample: version 1.0.0."""
55
+
56
+ BUILDER_CONFIGS = [
57
+ RedPajama1TSampleConfig(
58
+ name="plain_text",
59
+ version=datasets.Version("1.0.0", ""),
60
+ description="Plain text",
61
+ ),
62
+ ]
63
+
64
+ def _info(self):
65
+ return datasets.DatasetInfo(
66
+ description=_DESCRIPTION,
67
+ features=datasets.Features(
68
+ {
69
+ "text": datasets.Value("string"),
70
+ "meta": datasets.Value("string"),
71
+ }
72
+ ),
73
+ supervised_keys=None,
74
+ )
75
+
76
+ def _split_generators(self, dl_manager):
77
+ downloaded_files = dl_manager.download_and_extract(_URLS)
78
+
79
+ return [
80
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files})
81
+ ]
82
+
83
+ def _generate_examples(self, filepaths):
84
+ """This function returns the examples in the raw (text) form."""
85
+ logger.info("generating examples from = %s", filepaths)
86
+ key = 0
87
+ for filepath in filepaths:
88
+ with open(filepath, encoding="utf-8") as f:
89
+ for row in f:
90
+ data = json.loads(row)
91
+ if "meta" not in data:
92
+ text = data["text"]
93
+ del data["text"]
94
+ yield key, {
95
+ "text": text,
96
+ "meta": json.dumps(data),
97
+ }
98
+ else:
99
+ yield key, {
100
+ "text": data["text"],
101
+ "meta": data["meta"],
102
+ }
103
+ key += 1
arxiv_sample.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
book_sample.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
c4_sample.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"text": "Are you a resident of Pinnacle who owns a small business and operates from your home?\nCan you provide a service to your fellow residents of Pinnacle? If you've answered yes to both of these questions, supply your details below and we will list your business on our site.\nResidents of Pinnacle, support your local community by checking here first and seeing whether one of your neighbours can assist.", "meta": {"timestamp": "2019-04-20T11:17:15Z", "url": "https://www.pinnacleballarat.com.au/residents/service-directory", "language": "en", "source": "c4"}}
2
+ {"text": "On October 27, 2016 GreenWorks led a tour for the College of Architecture and Landscape Architecture of Beijing University and staff of Landscape Architecture Frontiers publication. This tour group was particularly interested in technical issues related to: soil/vegetation approaches for water quality treatment; the ultra- violet finishing treatment that allows for human contact with the treated water; and soil capping issues for a former brownfield site. GreenWorks typically leads 4-6 tours per year since Tanner Springs Park opened in 2005. Tour groups have included national and international professional and environmental organizations and academic institutions. Visitors are interested in a variety of issues, including design inspiration, public involvement and outreach, and technical challenges.\nCouch Park comment forms for the playground and plaza improvements are due Thursday December 10th.\nGreenWorks was been hired by Portland Parks & Recreation to design the new playground, address accessibility issues in the plaza and install a new Portland Loo at Couch Park as part of the Parks Replacement Bond. We presented the three options below for the playground at an Open House on December 3rd . Online comments are due Thursday December 10th and can be found here: http://www.portlandoregon.gov/parks/68915. One of the top priorities for the playground is for it to be inclusive, which mean that it should be designed for children of all ages and abilities. We have been working closely with Mara Kaplan from Let Kids Play http://www.letkidsplay.com/ who is a national expert and advocate for inclusive playground design. Mara was brought on to the design team to help us design a playground that provides exceptional play opportunities for all children.\nGreenWorks met with the city of Astoria to present the Downtown Astoria Pedestrian Wayfinding Concept Plan. Those in attendance were city officials, focus group members, and Astoria community members. The presentation focused on distinct sign typologies that direct and inform pedestrians getting around downtown Astoria. Following the presentation was an interactive group discussion about sign locations, aesthetic preferences interpretive sign opportunities.", "meta": {"timestamp": "2019-04-21T07:14:19Z", "url": "https://greenworkspc.com/blog/category/Public+Outreach", "language": "en", "source": "c4"}}
3
+ {"text": "For the rider who\u2019s ready to learn it all, our value bundles offer you the benefit of all the DVDs for your Harley-Davidson\u00ae Touring model at our best prices. You\u2019ll get the Maintenance DVDs Part 1 & 2, the Bolt-On Performance Edition, the Touring Rear Belt Replacement and Touring Oil Cooler Install DVD sets. That\u2019s over 15 Hours of detailed procedures!\nThis educational do-it-yourself Touring maintenance DVD covers all brands of Harley-Davidson\u00ae Touring motorcycles. From late 1984 \u2013 2016 (Evo\u00ae, Twin Cam\u00ae 88, 96, 103, 110) we have your Road Kings, Ultras, Electras, and Road/Street Glides covered.\nThis DVD will pay for itself with just one oil change.\nWhen we released the original Fix My Hog\u00ae maintenance DVDs, we couldn\u2019t have anticipated the reaction from critics and customers alike-it went so far beyond our wildest expectations. Since then, letters, calls and e-mails have poured in from around the world suggesting additional topics we should cover, so that\u2019s what we did. These follow up DVDs cover new procedures and technological advances (Twin Cam\u00ae 88, 96, 103, 110) and are a great complement to the original versions. A great way to Fix My Hog and save money in today\u2019s economy. *Note we do not cover the Rushmore changes on this DVD set.\nThis DVD series is designed to show riders how to enhance the look and performance of their Touring model motorcycles. Taped in a professional motorcycle repair shop, the trained mechanics perform and explain each procedure in detail. The Bolt-On Performance and Accessory DVDs feature footage of installations applicable to Evo\u00ae, Twin Cam\u00ae 88, 96, 103 & 110 motorcycles. This three-DVD set is crammed with more than six hours of valuable instruction, interviews and insider tips.\nThe Form-A-Funnel easily molds, then holds its shape so you get every last drop of oil every time, no matter how obstructed the filter or plug.\nMolds into and holds any shape to create a leakproof channel for draining oil or fluid.\nPrecise, reliable sealing from Loctite.\nFormulated to work like Loctite Hi-Tack Liquids, these wax-like sticks are less messy, have a low odor, and are solvent-free. Loctite Hi-Tack sticks set up quickly to a very tacky film, to seal and hold the heaviest gaskets in place. They resist gasoline, oil, and common shop fluids. Suggested applications include valve covers, fuel pumps, carburetors, and manifold gaskets.", "meta": {"timestamp": "2019-04-24T20:32:27Z", "url": "https://www.fixmyhog.com/product/touring-edition-maintenance-performance-8-dvd-set-2-free-gifts/", "language": "en", "source": "c4"}}
4
+ {"text": "France Music Charts List of all local music charts served by Popnable.\nMost viewed music videos from France, ranked on daily basis.\nMost viewed music videos from France, ranked on weekly, monthly and yearly basis.\nMost viewed artists from France, ranked on monthly and yearly basis.\nMost liked songs from France, ranked on weekly basis.", "meta": {"timestamp": "2019-04-22T22:26:14Z", "url": "https://popnable.com/france/charts?page=6", "language": "en", "source": "c4"}}
5
+ {"text": "I am a conservation biologist and molecular ecologist, interested in understanding the ecological and evolutionary processes that generate and maintain diversity within and among populations. The primary motivation for my work is to apply this fundamental understanding of biology to solve pressing problems in conservation and management.\nOutreach: Dr. Meek is a member of the IUCN North American Conservation Genetics Specialist Group, Vice President of the Society for Conservation Biology Conservation Genetics Working Group, and a member of the Interagency Ecological Program Salmonid Genetics Project Work Team.\nDr. Meek is on the editorial board of Conservation Science and Practice.\nMy research focuses on the use of genetic tools to study population- and species-level relationships in marine and freshwater fishes. The primary motivation for this work is to improve our understanding of evolutionary processes in aquatic environments, and to provide practical information for management and conservation. Find out more about my work on my website.\nI am interested in conservation biology and the effects of climate change on populations. I completed my M.A. in Biology at Buffalo State College studying the metagenomic diversity of fungal communities in and outside of ant nests, and I am excited to study conservation genomics and diversity in the Meek lab.\nMy research interests center around the population dynamics and genetics of aquatic species, as well as overall species diversity in aquatic environments. Specifically, I am interested in the mechanisms of population divergence and the barriers to gene flow. I am primarily concerned with how these patterns and processes are relevant for conservation and management.\nI study conservation genetics and am interested in small population conservation. My research centers around discovering impacts on populations from fragmentation, especially due to anthropogenic change. I hope to use my research to help inform future management actions and to create public outreach programs.\nI am an Integrative Biology master\u2019s student at Michigan State University. I recently graduated from the University of Arizona, receiving a B.S. in Organismal Biology. While at the University of Arizona, I was involved in several projects working with human and plant pathogens, and was president of the Criminal Justice Association. I am a Department of Defense SMART Scholar, and will work for the U.S. Army Defense Forensic Science Center upon graduation. I am interested in the next generation sequencing applications to forensic science.\nSierra is co-advised by Dr. Benbow in the Department of Entomology: https://ericbenbow.wixsite.com/website.\nDo not hesitate to contact Sierra with any questions: kaszubin[at]msu.edu.\nI\u2019m a senior undergraduate at Michigan State University, majoring in zoology with a concentration in ecology, evolution, and organismal biology. My research interests are in the genetics and evolution of behavior, and my goal is to attend graduate school to pursue a PhD in evolutionary biology.\nEllery studies the diversity of tastes in her environment and is on a quest to identify the most crinkly material in the world. She is also researching the ecology and behavior of the Giant Schnauzer.\nChai\u2019s research interests are in the behavioral ecology of small mammals, with a particular focus on trying to understand the adaptations that allow squirrels to successfully avoid canine predation.", "meta": {"timestamp": "2019-04-18T23:07:39Z", "url": "https://meeklab.com/people/", "language": "en", "source": "c4"}}
6
+ {"text": "Dr Wiffen is a graduate of University of Queensland Medical School and trained in ophthalmology in Western Australia before undertaking two-year fellowships in cornea and refractive surgery at both the Corneo-Plastic Unit, East Grinstead, UK, and the Mayo Clinic, Rochester, Minnesota, USA. He was Director of the Corneo-Plastic Unit and Eye Bank in East Grinstead from 1993-1994. He has been a Consultant Ophthalmologist at Fremantle Hospital since 1997 and was Associate Professor in the Centre for Ophthalmology and Visual Science, UWA, from 1997-2014. He has been Director of the Lions Eye Bank of Western Australia since 1997. Dr Wiffen has held numerous other positions, including Head of Department of Ophthalmology Fremantle Hospital, Chair of the Qualifications and Education Committee of the WA Branch of RANZCO, Chair of Eye Banks Australia and New Zealand and Chair of the Cornea Standing Committee of the Transplantation Society of Australia and New Zealand. He has special expertise in corneal transplantation, pterygium and cataract surgery as well as refractive surgery.\nFellowships at the Corneo-Plastic Unit, East Grinstead, UK, and at the Mayo Clinic, Rochester, Minnesota, USA.\nOcular surface disorders, corneal and refractive surgery, anterior segment disorders & surgery.", "meta": {"timestamp": "2019-04-22T11:14:25Z", "url": "https://www.lei.org.au/about/our-people/staff/dr-steven-wiffen/?our_people=ophthalmologists", "language": "en", "source": "c4"}}
7
+ {"text": "Contact us by filling out the form below and we will contact you back shortly.\nHOW DID YOU FIND US ONLINE?\nMiami, FL 33222 USA Ana Jim\u00e9nez Dermocosm\u00e9tica, SL.", "meta": {"timestamp": "2019-04-21T00:12:06Z", "url": "http://rejuvesse.es/EN/contact.asp", "language": "en", "source": "c4"}}
8
+ {"text": "Learn how to create a proactive infection prevention (IP) plan based on a comprehensive infection control (IC) risk assessment\u2014a perpetual document that serves as the foundation of your program. Look at techniques for evaluating the actual risk factors for your population, the services you provide and geographic and community-based trends in your region. Return home with the know-how you need to conduct an IC risk analysis that can help you improve the effectiveness of your IP plan by better prioritizing your prevention strategies.", "meta": {"timestamp": "2019-04-25T20:35:54Z", "url": "https://www.ascaconnect.org/events/event-description?CalendarEventKey=118faa18-948b-4d2f-90db-841a64989875&Home=%2Fevents%2Fcalendar", "language": "en", "source": "c4"}}
9
+ {"text": "1. Falken Tyre Fuel Promotion (the \"Promotion\") is open to all consumers who are UK residents aged 18 and over, except ALLCARZ (the \"Promoter\") employees, its agencies or anyone else connected with the creation and administration of this Promotion, or trade customers, including tyre dealer's employees. This offer is open to retail customers only making a qualifying purchase online.\n5. This offer applies to the online purchase of 2 \u2013 4 Falken Tyres between 06.02.19 and 31.03.19 online on www.oswestrytyrescentre.co.uk using the valid discount code FALKENFUEL.\n13. ALLCARZ reserve the right to vary or amend these terms and conditions or to withdraw the promotion at any time.", "meta": {"timestamp": "2019-04-22T10:07:13Z", "url": "https://www.oswestrytyrescentre.co.uk/Content/Promotional/69690/Fuel+promotion+Terms+and+Conditions", "language": "en", "source": "c4"}}
10
+ {"text": "How to Take Meeting Minutes General Overview of Meeting Minutes Generally, minutes begin with the name of the body (e.g. a committee) holding the meeting, place, date, list of people present, and the time that the chair called the meeting to order.... Structured vs. Informal. If your PTA follows Robert's Rules of Order-- a process of proposing, discussing and voting on motions -- you should find it much easier to take meeting minutes, as all major actions will be organized by motions and the resulting votes.\nDownload our Meeting Minute Checklist for Associations and Nonprofits with sample minutes taken at a meeting and learn how to take better minutes. 3. The Minutes Writing Process... Taking minutes is important for virtually any meeting. Despite the importance of this task, it is not easy especially if you are not well prepared for it. Fortunately, with the following tips, anyone can effectively take minutes.\nStructured vs. Informal. If your PTA follows Robert's Rules of Order-- a process of proposing, discussing and voting on motions -- you should find it much easier to take meeting minutes, as all major actions will be organized by motions and the resulting votes.... How to Take Meeting Minutes General Overview of Meeting Minutes Generally, minutes begin with the name of the body (e.g. a committee) holding the meeting, place, date, list of people present, and the time that the chair called the meeting to order.\nTaking minutes is important for virtually any meeting. Despite the importance of this task, it is not easy especially if you are not well prepared for it. Fortunately, with the following tips, anyone can effectively take minutes.", "meta": {"timestamp": "2019-04-23T08:53:18Z", "url": "http://mleb.net/manitoba/how-to-take-minutes-sample.php", "language": "en", "source": "c4"}}
cc_2023-06_sample.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.73360675573349, "wiki_prob": 0.73360675573349, "text": "July Was Earth's Hottest Month on Record, European Scientists Conclude\nBy Bob Henson\nJuly 2019 was the planet's warmest month on record, according to an initial analysis.\nThe hottest regions on Earth relative to normal included western Europe and Alaska.\nThe warmth occurred despite the absence of a strong El Ni\u00f1o event.\nIn the wake of a massive heat wave across western and northern Europe, researchers at the Copernicus Climate Change Service have estimated that July 2019 was the planet\u2019s warmest month on record, narrowly topping July 2016.\nThe Copernicus group found the global temperature in July was about 0.04 degrees Celsius (0.07 degrees Fahrenheit) warmer than July 2016. July is typically the warmest month of the year globally, running about 3 to 4 degrees Celsius (5 to 7 degrees Fahrenheit) warmer than January.\nThis is because most of the planet\u2019s land area \u2013 which warms faster than oceans \u2013 is located in the Northern Hemisphere, so the northern summer coincides with the warmest global average.\nThe Copernicus analyses extend back to 1979. Because of long-term global warming, this July\u2019s record is effectively a record for at least the past century of global observation.\nOther groups that monitor monthly temperature, including NASA and NOAA, will be releasing their findings later in August.\nJuly 2019 was the planet's warmest month on record, according to the Copernicus Climate Change Service. Among the hottest spots relative to the 1981-2010 average were western Europe, central Asia, Alaska and most of Africa and Australia.\n(Copernicus/WMO)\nMost global heat records are set during or just after El Ni\u00f1o events, which bring warm undersea water to the surface across much of the tropical Pacific, thus warming the atmosphere above.\nThis July\u2019s record is especially striking because it occurred during a weak to marginal El Ni\u00f1o event. In contrast, the July 2016 record occurred at the tail end of one of the strongest El Ni\u00f1o events on record.\nWhile El Ni\u00f1o and La Ni\u00f1a tend to warm and cool the atmosphere for a year or two each, these events are happening on top of longer-term warming related to human-produced greenhouse gases, so the global warm spikes are getting warmer and the cool spikes less cool.\n\u201cWe have always lived through hot summers. But this is not the summer of our youth. This is not your grandfather\u2019s summer,\u201d said UN Secretary-General Ant\u00f3nio Guterres, commenting last Thursday in New York on the likelihood of a new temperature record from Copernicus.\n\u201cPreventing irreversible climate disruption is the race of our lives, and for our lives. It is a race that we can and must win,\u201d he added.\nThe Copernicus analyses are carried out by the European Center for Medium-Range Weather Forecasts (ECMWF), which operates weather forecast models and climate prediction models used around the world.\nDifferent analyses of monthly global temperature (such as those from NASA, NOAA and the Japan Meteorological Agency) can result in slightly different rankings, based on how groups account for data-sparse areas.\nThe Copernicus analyses combine global temperature data from surface weather stations with background information from a forecast model that incorporates satellite and other data. The model analysis plays a larger role in regions with few weather stations.\nGlobal Hot Spots in July\nDozens of European cities set new all-time high-temperature records in July, including Paris, France (108.7 degrees); Amsterdam, Netherlands (97.3 degrees); and Helsinki, Finland (91.8 degrees). Five nations saw their hottest temperatures ever recorded:\nBelgium: 107.2 degrees at Begijnendijk, July 25\nGermany: 108.7 degrees at Lingen, July 25\nLuxembourg: 105.4 degrees at Steinsel, July 25\nNetherlands: 105.3 degrees at Gilze Rijen, July 25\nUnited Kingdom: 101.7 degrees at Cambridge, July 25\nAnother part of the world with extreme warmth relative to July norms was Alaska. At least 13 Alaska locations chalked up their hottest month on record, and the state very likely hit such a mark as well, according to climatologist Dr. Brian Brettschneider. The Anchorage airport hit 90 degrees on July 4, breaking its all-time record by 5 degrees, and the city had its warmest month on record by far.\nThe Alaskan heat has coincided with record-low sea-ice extent in the Chukchi Sea to the north, as well as across the entire Arctic.\nJuly was considerably cooler than average over parts of eastern Europe and western Russia. Much of eastern Canada and parts of the south-central U.S. were also cooler than average for July, with a dramatic cool spell in late July setting daily record lows across the South.\nHowever, several cities in New England \u2013 including Boston \u2013 had their hottest month on record.\nAll-time high-temperature records have been broken this year in 13 of the world\u2019s nations and territories, and tied in another. In contrast, no all-time national cold records have been broken thus far in 2019.\nThe largest number of all-time national/territorial heat records set or tied in a single year was the 22 heat records that occurred in 2016, according to international records researcher Maximiliano Herrera.\nThe runners-up are 2019 and 2017, each with 14 heat records.", "source": "cc/2023-06/en_head_0000.json.gz/line401859"}
2
+ {"pred_label": "__label__cc", "pred_label_prob": 0.5491981506347656, "wiki_prob": 0.4508018493652344, "text": "Bahrain comprises of more than 30 islands situated in the Persian Gulf. It\u2019s a country that is steeped in history and Bahrain was once the centre of trade in ancient times. With rich heritage, including archaeological sites, royal tombs and temples, Bahrain is a country of mystery. But be warned, a large proportion of these islands consist of sandy desert and naturally the temperature during the day is hot and rather arid. For western visitors, Bahrain represents a gentle introduction to the Arabian Gulf and many Formula 1 enthusiasts flock here for the annual Bahrain Grand Prix.\nOnly rich Middle Eastern countries can afford to build conventional grass golf courses, which naturally require significant quantities of water to survive in the desert heat. Bahrain is a small country with declining oil reserves but it does have one golf course that is not only sown with grass, but it\u2019s also floodlit. Karl Litten knows a thing or two about desert golf and he was the original architect behind Bahrain\u2019s only grass course \u2013 then known as Riffa Golf Club \u2013 but in 2007 the course closed and was redeveloped by European Golf Design with Colin Montgomerie, emerging in 2009 as the Royal Golf Club.\nOur Middle East rankings were last updated in March 2021. Click the link to read the story.\nRoyal Golf Club (Montgomerie)\nAl Mazrowiah, Al-Mu\u1e25\u0101fa\u1e93at al-Jan\u016bb\u012byah\nBahrain Top 100 Leaderboard", "source": "cc/2023-06/en_head_0000.json.gz/line1335850"}
3
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.6806969046592712, "wiki_prob": 0.6806969046592712, "text": "HomeViral Video\nHelene Boudreau\u2019s photos and videos were leaked on Twitter, Reddit, and social media.\nHelene Boudreau\u2019s photos and videos were leaked on Twitter, Reddit, and social media. H\u00e9l\u00e8ne Boudreau went back to her old place of employment in order to finish the requirements for her Bachelor of Fine Arts and Media degree. When Boudreaux\u2019s famed UQAM graduation photo was blown up in 2021, it catapulted him to the forefront of the public eye. Follow For More Updates at Rapiddnews.com\nIt appears that in spite of all the attention and recognition she has received, she did not actually graduate from high school.\nThe OnlyFans tycoon broke the news on her Instagram account, where she also provided an explanation for why, despite having taken her graduation photo, she did not receive the required number of credits to earn her degree. However, that is going to change.\nHelene Boudreau\u2019s photos and videos\nH\u00e9l\u00e8ne recently announced her plans to return to school in an Instagram post, writing, \u201cToday I found out I\u2019m restarting my courses at UQAM to finally complete my bachelor\u2019s degree.\u201d \u201cI began taking photographs in the year 2021, but the year 2022 was the one in which I finally received my diploma. After everything that has happened with UQAM, I am prepared to\u2026 oh yes.\u201d\nBoudreau did not disclose whether or not she intended to attend classes in person or via the internet, but it is safe to say that people are looking forward to her coming back.\nOne of your followers said that they were \u201clooking forward to seeing you.\u201d Another person remarked, \u201cYou are one of the few people who can declare that your studies have been worthwhile.\u201d\nBoudreau also revealed her decision to return to school via Instagram Stories, adding that she had reached the point in her life when she wanted to finish what she had started.\nLeaked Video Ruby Salvo Viral on Twitter and TikTok, Link Full Video\nCCTV Film of Z-Ro and Trae Tha Truth Fighting Goes Viral On Twitter And YouTube\nA Toronto Couple Caught Engaging in S**ual Activity During a Blue Jays Game Goes Viral On Twitter, YouTube, and Reddit!\nWho is Kiera Hogan? Full Link to the Leaked and Viral Video on Twitter and Reddit!", "source": "cc/2023-06/en_head_0000.json.gz/line666320"}
4
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.9775970578193665, "wiki_prob": 0.9775970578193665, "text": "Lee Brice at NYCB Theatre at Westbury\nLee Brice Tickets\nNYCB Theatre at Westbury | Westbury, NY\nTime will stop as you indulge in the gorgeous voice of the rising star of country music, Lee Brice on July 11, 2013, 08:00 PM at the Westbury Music Fair in New York. You\u2019ll be showered by his emotion-filled songs, stunning stage presence and ornately resonant, incredibly masculine vocals, could there be anything better than that?\nThe man with a golden knack in song writing and singing, Lee Brice was a four-time nominee of the Academy of Country Music Award, nominated as the New Artist of the Year in 2012 CMA Awards and Top New Male Artist in 2013 ACM Awards. This American country music singer began writing songs for Jason Aldean, Cowboy Crush and Keith Gattis in 2007. He co-wrote Garth Brook\u2019s single \u201cMore Than a Memory\u201d which became the first single to debut at no. 1 in the history of Billboard Hot Country Songs chart. Lee emerged in the music scene as his major-label first studio album \u201cLove Like Crazy\u201d released on June 2010 and debuted at no. 9 on the US Billboard Top Country Albums chart. It charted three singles, \u201cShe Ain\u2019t Right\u201d, \u201cHappy Endings\u201d and \u201cUpper Middle Class White Trash\u201d. In October 2011, his sixth single \u201cA Woman Like You\u201d from the second album \u201cHard 2 Love\u201d was released. The song stayed at no. 3 on the Hot Country Songs chart for 56 weeks making it the song with the longest run in chart\u2019s history. The album spawned another two no. 1 singles, \u201cHard to Love\u201d and \u201cI Drive Your Truck\u201d. His cohesive musical style has gained him a lot of praises from critics.\nThis is something you should never miss. Ticket sales are going crazy, so you must secure yours ASAP!", "source": "cc/2023-06/en_head_0000.json.gz/line163104"}
5
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.8942691683769226, "wiki_prob": 0.8942691683769226, "text": "Chelsea look set to be one of the busiest Premier League clubs in the January transfer window. The Blues spent over \u00a3250million in the summer with the likes of Raheem Sterling, Wesley Fofana, Marc Cucurella and Kalidou Koulibaly all moving to Stamford Bridge.\nSterling has struggled to have the same impact as he did at Manchester City since signing for Chelsea, whilst there is still a need for a capable back-up option for Reece James. James did not make the England World Cup squad after picking up a knee injury in the Blues\u2019 match against AC Milan in October, forcing Cesar Azpilicueta and Ruben Loftus-Cheek having to fill in at right wing- back.\nPotter will be hoping to add players that fit into his style of play in January after inheriting Thomas Tuchel\u2019s squad in September. Denzel Dumfries and Memphis Depay are two players that have been linked with a move to west London and both players have impressed at the World Cup.\nChelsea opted to sign Pierre-Emerick Aubameyang ahead from Barcelona on Deadline Day in the summer instead of Depay, but continue to be linked with the Dutch forward. The 28-year-old wanted to fight for his place at Camp Nou despite their new signings, but with his contract set to expire next summer, he could be available for as little as \u00a35million as per various reports . Dumfries was linked with a move to Stamford Bridge in the summer when Romelu Lukaku sealed a return to Inter Milan on loan, but a deal never materialised for the Dutch defender.\nChelsea may look to go back in for the Netherlands international who is valued at \u20ac50million (\u00a342million) by CIES Football Observatory . The 26-year-old plays at right wing-back for both club and country and has registered five goal contributions in 24 appearances so far this season.\nJames\u2019 injury came as a huge blow for the Blues with Potter not having a suitable option to replace him with, meaning a move for Dumfries could strengthen his squad\u2019s depth and quality moving forward and not result in him changing formations when a key player is absent.\nDumfries grabbed the assist for Depay\u2019s goal which saw the Netherlands take the lead against the USA in their World Cup round of 16 tie. The Dutch defender burst down the right wing before cutting it back to Depay in the penalty box, with the Barca striker firing the ball past Matt Turner into the back of the net.\nNetherlands stars Denzel Dumfries and Matthijs de Ligt speak out on Chelsea interest", "source": "cc/2023-06/en_head_0000.json.gz/line304938"}
6
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.6106107234954834, "wiki_prob": 0.6106107234954834, "text": "In a world where blockbusters are about more than just movies, we proudly bring you our First Annual Summer Movie Blockbuster Trademark Extravaganza! Come for the fun trademark facts, stay for the trailers.\nIn 2014, the Summer box office grossed over $4 billion. The top five grossing movies were:\nX-Men: Days of Future Past\nWhat do all of those movies have in common? Other than digital (and other \u2013 ahem) enhancements?\nTrademarks! And lots of them. You see, today\u2019s tentpole movies are as much about brand-building as they are about entertaining. Sure, $100 million at the domestic box office is great, but it is nothing compared to the multipliers big Summer movie\u2019s can experience via merchandising. That is where trademarks play an important role \u2013 a fact that is not lost on movie studios. As you will see, attorneys for the major studios have been hard at work pursuing trademark protection for this Summer\u2019s potential blockbusters.\nHere are our top five to keep an eye on:\n1. Avengers: Age of Ultron\nStudio: Marvel (a subsidiary of the Walt Disney Company)\nMarvel had two of its movies make it into the top five for the Summer movie box office in 2014. With Avengers: Age of Ultron, it is likely to continue the winning streak. To date, The Avengers is the third highest grossing move of all-time (not adjusting for inflation) with over $1.5 billion on box office receipts. Reports indicate that Marvel (and Disney) stacked up another $1 billion plus in receipts from selling merch related to The Avengers.\nMarvel and Disney, knowing where their bread is buttered, have 11 pending federal trademark applications for AVENGERS AGE OF ULTRON. Check out this Variety article if you want a longer read about Marvel\u2019s plans for merchandising Avengers: Age of Ultron.\nMost Viewed Trailer: 70.7 Million views\n2. Tomorrowland\nStudio: Walt Disney Pictures\nThis movie is not about a future where George Clooney is no longer a bachelor. At least, we think.\nEven so, with Clooney involved, you know Disney has high expectations for this film. Disney has had federal protection for the mark TOMORROWLAND since 1970. Who doesn\u2019t remember their first ride on Space Mountain? I didn\u2019t scream once. I swear (Kevin wrote, as he trembled at his computer).\nIn any event, with seven pending applications for the mark MILES FROM TOMORROWLAND, Disney appears prepared in the event Mr. Alamuddin\u2019s movie captures the hearts and minds public.\nMost Viewed Trailer: 9.2 Million views\n3. Jurassic World\nStudio: Ambling Entertainment and Legendary Pictures (in association with) Universal Pictures\nI loved Jurassic Park. It was the highest grossing film of 1993. I say, \u201cClever girl,\u201d at least once a week. I love Chris Pratt. Last Summer, he led Guardians of the Galaxy to the top of the box office. This movie has the makings of a box office and merchandise juggernaut (Kevin said, pretending certain sequels do not exist). With eight pending federal trademark applications, everyone involved seems to believe that dinosaur-sized dollars are in the future.\nMost Viewed Trailer: 55 Million views\n4. Inside Out\nStudio: Pixar Animation and Walt Disney Studios\nLast Summer, for the first time since 2005, we were deprived of a Pixar release. The last Pixar movie to top the Summer box office was 2010\u2019s Toy Story 3. I am a sucker for Pixar movies and hope that Inside Out is a return to form. Even if it is not, Disney and Pixar certainly have reason to believe that their five pending federal trademark applications are certainly worth their weight in gold. Reports indicate that Disney has made over $10 billion from merchandise based on the Pixar franchise Cars despite the lukewarm reviews both Cars films received.\n5. Minions\nStudio: Illumination Entertainment (Universal)\nThis headline from USA Today, \u201cAt Universal, Minions \u2018have become our Mickey Mouse,'\u201d says it all. The popular characters from the highly successful Despicable Me franchise are taking center stage this summer, and they have big plans. Despicable Me was the fifth biggest movie of Summer 2010. Despicable Me 2 jumped up two spots to be the third biggest movie of Summer 2013. Minions looks to repeat that feat and become the biggest movie this Summer. If you have learned anything from this post, you already know how valuable the Minions are as a brand. Therefore, it should come as no surprise that there are six pending trademark applications for MINIONS.\nEvery good movie has a moral. The moral of this blog post: Be like a studio executive and protect your trademarks. You never know when one could be worth billions of dollars!\nWritten by Kevin Hartley", "source": "cc/2023-06/en_head_0000.json.gz/line1856816"}
7
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.5731999278068542, "wiki_prob": 0.5731999278068542, "text": "Video: CNN Clown Sparks OUTRAGE For \"Bully\" Tweet On Trump...\nby Kurt\nBREAKING: The NFL's Monday Night Football Ratings Are Officially TANKING...\nBOMBSHELL: FBI Now Believes Bill And Hillary Clinton Accepted Multi-Million $ Bribe From Russia Crime Syndicate!\nBreaking News, Clinton Cash, Featured, Hillary Clinton, Media, News, Politics, Popular, Scandal, Trending\nby Kurt 5 years ago 5 months ago\nThe documentary \u201cClinton Cash\u201d was panned as \u201cFake News\u201d by the mainstream media, and ignored by most Americans.\nNow, it appears that the film has been vindicated\u2026in the most chilling possible way.\nREAD MORE: Colin Kaepernick Files Grievance Against NFL, Claims It\u2019s Trump\u2019s Fault He\u2019s Not Playing!\nThe FBI has found shocking eye-witness evidence that Russian nuclear officials routed millions of dollars to the U.S. in 2010, obtained through a racketeering scheme designed to benefit the Clinton Foundation and sway the Clintons into cooperating with the Russian atomic-energy program.\nPayment occurred around the time Secretary of State Hillary Clinton provided a favorable decision to Moscow regarding Vladimir Putin\u2019s nuclear privileges, sources say.\nLaw-enforcement officials believe that Russian nuclear kingpins were engaged in bribery, kickbacks, extortion and money laundering with which they gathered the funds to send to the Clintons.\nMore from The Hill:\nBefore the Obama administration approved a controversial deal in 2010 giving Moscow control of a large swath of American uranium, the FBI had gathered substantial evidence that Russian nuclear industry officials were engaged in bribery, kickbacks, extortion and money laundering designed to grow Vladimir Putin\u2019s atomic energy business inside the United States, according to government documents and interviews.\nFederal agents used a confidential U.S. witness working inside the Russian nuclear industry to gather extensive financial records, make secret recordings and intercept emails as early as 2009 that showed Moscow had compromised an American uranium trucking firm with bribes and kickbacks in violation of the Foreign Corrupt Practices Act, FBI and court documents show.\nThey also obtained an eyewitness account \u2014 backed by documents \u2014 indicating Russian nuclear officials had routed millions of dollars to the U.S. designed to benefit former President Bill Clinton\u2019s charitable foundation during the time Secretary of State Hillary Clinton served on a government body that provided a favorable decision to Moscow, sources told The Hill.\nThe racketeering scheme was conducted \u201cwith the consent of higher level officials\u201d in Russia who \u201cshared the proceeds\u201d from the kickbacks, one agent declared in an affidavit years later.\nRather than bring immediate charges in 2010, however, the Department of Justice (DOJ) continued investigating the matter for nearly four more years, essentially leaving the American public and Congress in the dark about Russian nuclear corruption on U.S. soil during a period when the Obama administration made two major decisions benefiting Putin\u2019s commercial nuclear ambitions.\nThe first decision occurred in October 2010, when the State Department and government agencies on the Committee on Foreign Investment in the United States unanimously approved the partial sale of Canadian mining company Uranium One to the Russian nuclear giant Rosatom, giving Moscow control of more than 20 percent of America\u2019s uranium supply.\nWhen this sale was used by Trump on the campaign trail last year, Hillary Clinton\u2019s spokesman said she was not involved in the committee review and noted the State Department official who handled it said she \u201cnever intervened \u2026 on any [Committee on Foreign Investment in the United States] matter.\u201d\nWow. Just\u2026wow.\nStay connected with Trump News Email \u2026 FREE!\nSuccess! Great things coming your way soon...", "source": "cc/2023-06/en_head_0000.json.gz/line1818638"}
8
+ {"pred_label": "__label__cc", "pred_label_prob": 0.6800937652587891, "wiki_prob": 0.31990623474121094, "text": "Geography of Paris squares or plazas\nIn a complex urban environment, each square will tend to be specialized toward a function rather another one: Square are not in competition but compliment each other. Hereafter is an essay on the geography of the Parisian squares:\nIdentifying\nLe Louvre (Cour Napoleon)\nThis place is not a people place, it doesn\u2019t mean to be. This square is the heart of the French DNA. a 1000 years mille-feuille of History in the making. The headquarter of the old regime, transformed into a monument to the culture, is supposed to represent what French are or at least think they are, and it does quite well:\nCour napoleon, where the Louvre\u2019 s Pyramid sits \u2013 credit (11)\nPlace de l\u2019\u00c9toile\nLike for the Louvre, this place is designed to have you overwhelmed by the \u201cgrandeur\u201d of the State. The Arc de triomphe built by Napoleon is a monument crowning 500 year of planning of the Royal axis, originating from the Louvre. The hill where it sit on has been leveled, giving it a concave slope, enhancing the overwhelming presence of the Arc, sitting in the middle of a 240 meter diameter round place:\nPlace de l\u2019\u00c9toile is a very large traffic circle. Going to the middle is usually done thru underpass \u2013 credit (2)\n\u00c9toile-Concorde: Champs-Elys\u00e9es\nEn route from The Louvre (old regime) to the Arc (new regime), it happens to be the Concorde, where the last french king, Louis the XVI has been guillotined. Where French celebrates is on The Champs-Elys\u00e9es, between the Concorde and \u00c9toile, a vast public space able to contain one million people, with huge plazas, Etoile and the Concorde providing very comfortable overflow, and entry/exit point.\nThe Champs-Elys\u00e9es on New year Eve (here 2006) looking toward The Concorde \u2013 credit (5)\nThe size and topography of the Champs-Elys\u00e9es help people to appreciate the size of the crowd. The celebration like above suppose to close the 10 lanes of traffic the avenue is normally supporting: A celebration on the Champs-Elys\u00e9es means not \u201cbusiness as usual\u201d.\nDemonstrating\nR\u00e9publique-Bastille-Nation\nDemonstrating is also part of the french DNA, and demonstrating supposes to walk, from one point to another:\nThose points are usually R\u00e9publique-Bastille-Nation, in that order!\nDemonstration at Republique \u2013 credit (3)\nPlace de la R\u00e9publique one of the largest Parisian square is 283x119m is well suited to accommodate large crowds. Beside it, it is not a necessarily inviting place. It is currently under renovation: respecting its history, its current use as a place to vent social message, while making it a more inviting space, especially outside demonstration time, was one of the challenge the contestant had to address. A water mirror, is part of the answer:\nA water Mirror, as seen in Bordeaux, can \u201cactivate\u201d large esplanade, while still leave it clear of encumbrance when needed \u2013 credit (1)\nPlace de l\u2019H\u00f4tel-de-Ville\nIt is a \u201cpeople place\u201d per design, and the PPS editors like it [7], but this 155x82meter square is not a self-sufficient one, where people will intuitively go. they will go there only knowing the square is hosting some events, usually sponsored by the City:\nParis- H\u00f4tel-de-Ville is a place for programing; ice rink in winter, beach volley in summer, all sort of fair in between \u2013 credit (4)\nA plaza in word, a park in theory, this almost perfect square, is a hit with many urbanistas for good reasons.. like Rome\u2019s Piazza Navona, reaching Place des Vosges requires journeying along minor, often hidden streets. Then away of the crowd and noise of the surrounding city, you find an intimate, secluded, and still comfortable place. The square dimension, 127\u00d7140 meters,as well as the building lining help it, contribute to it. It is surrounded by a street allowing a light amount of traffic contributing to a safety feeling at any time any season.\nParis Place des Vosges, the oldest suqare of the city is requiring some effort to be found\nPlace Dauphine dating of the same era work a bit differently- may be too small and carry an oppressive feeling. Place Vend\u00f4me, has been designed along the Place des Vosges model (same size), but again it is a colder place. In Paris, Palais Royal, offers almost a similar setting\nPlace George Pompidou\nBetter known as Place Beaubourg, or simply the Piazza, it has been created ex-nihilo by architect Renzo Piano and Richard Rogers and opened in 1977. In despite of its relatively novelty and use of modern architecture in a city full of heritage building, this square works very well at the difference of many other one created in the same period. Due to this, it makes it a very interesting case study:\nIt is facing a Modern art museum known as Beaubourg built at the same time by the same architects. Like Sienna\u2019s Piazza del Campo, the 170x65m square has a slight declivity along its narrow edge, which allow people to appropriate the space like it was a beach: it is not uncommon to see people sitting on the pavement, facing the museum, which happen to have corridors and stairs on its outside facades, offering continuous movement of people to watch from the square.\nLike Place des Vosges, this square is not obvious to find, and offers some respite, step away, of the capharnaum, the Halles can be:\nParis Place George Pompidou, is a successful square created ex nihilo\nAt the difference of Place Des Vosges, this square is fully pedestrian, and is surrounded by cafes and other shops.\nFontaine des Innocents\nPlace Joachim du Bellay is a name very few locals know, but no Parisian ignores its fountain:\nWhen they need to meet, Fontaine(fountain) des Innocents is the natural rendezvous.\nIt is easy to understand why: It is strategically located [10]\nIt is at the cross road of the main Parisian arteries.\nToday, it sits midway between the Parisian subway hub (Ch\u00e2telet ) and the Regional Express Rail network hub (Les Halles)\nHowever, it is not directly on the way, rather on a \u201ccorner\u201d of the intersection, so that the traffic doesn\u2019t pass here. but, more important:\nthe square\u2019s size, 53x80m, is big enough to accommodate a substantiate activity making a good hangout, but small enough to be able to recognize a person in it (see the notion of social field of vision in [9])\nand the square design is perfectly appropriate:\nFontaine des Innocents IS the meeting point in Paris \u2013 credit (6)\nThis square is also surrounded by Cafes.\nConcluding\nParis\u2019s Place Stravinsky, a \u201csecondary\u201d but still lovely place \u2013 credit (11)\nThis geography is far to be exhaustive, Paris has many other squares, of various size, various features, some more interesting than other\u2026 what we have presented are what we see as the \u201cstaple\u201d squares of Paris, and we can see some features emerging, noticeably regarding the size of the square:\nDifferent square size are needed in a big city, to accomodate the different function\nAnd still, the square where people feel comfortable to stay, will tend to be in the 120x120meter\nThis size could be not purely arbitrary, and could have to do with our field of vision- we tend to not recognize people beyond this distance and from smaller distance, we tend to be able to describe people facial characteristic \u2013 the ~100 meter range lie in between [9].\n[1] flickr user hisgett\n[2] flickr user ar56\n[3] flickr user tofz4u\n[4] flickr user babicka2\n[5] Franck prevel via Le Monde\n[6] Projet Les Halles\n[7] PPS page: Paris\u2019Hotel de Ville (City Hall)\n[8] See for example: Squaring public space with human needs, Lisa Rochon, Globe and mail, Nov 25, 2011. Curiously enough Vancouver bloggers like Lewis n Villegas and Stephen Rees, will use this square to illustrate Vancouver specific problematic. For the record, architect Ricardo Boffil had a project to built a place inspired by Place des Vosges at Paris The Halles: Parisian didn\u2019t like the idea, and their mayor, then Jacques Chirac, basically \u201cchased\u201d the architect\u2026\n[9] Cities for people, Jan Gehl, 2010\n[10] Paris, les Halles :introduction to its anatomy\nFiled in Paris, urbanism\nTags: beaubourg, Fontaine des innocents, Place Charles-de-Gaulle, Place de l'H\u00f4tel-de-Ville, Place de la R\u00e9publique, place de l\u2019\u00c9toile, place des vosges, place Joachim du Bellay, Place Starvinsky\nParis \u2013 Les halles \u2013 Introduction to its anatomy\nIt is the center of Paris and was the site of the largest known wholesale market of its time. Since the market has moved away in 1969, the site, having received an underground shopping mall and a subway station seeing close to 1 million passengers a day, has become arguably the biggest urban conundrum of Paris. We gonna study it a bit- This first post layout some general context (at a level allowing me to classified my notes on the topic, so a bit heavier than necessary on the level of historic detail)\nThe geographic context\nThe very center of Paris\nParis with its successive city walls. Les Halles are where the Montmartre road (blue line) meets the Paris \"great cross\" (red lines, the fine lines are the historic route, the thick ones have been layout circa 1850)\nThe centre of Paris is at the center of the \u201cgreat cross\u201d:\nHistorically, it was defined by rue St Honor\u00e9 for the west branch, and rue St Denis (doubled by rus St Martin) for the North Branch.\nMostly to resolve traffic issue, This cross will be doubled by the rue de Rivoli (West branch), and Boulevard de S\u00e9bastopol (north branch) [8].\nIn 1900 the cross will be doubled by the subway: line 1 for the East West axis, while the line 4 will roughly follow the North-South axis \u2013 they are respectively the first and second most used subway lines of the network.\nIn 1977, the opening of the first lines, A and B, of the regional express subway (RER) will also follow this cross\u2026\nThe Montmartre road is coming from of the Montmartre hill following the terrain topography. A historically important road, but not necessarily for commercial reason, at the difference of the great cross roads: the meeting of Montmartre road with the great cross defines Les Halles \u2013 historically a triangular shape (between W and NW roads), as most of the medevial square sitting at the crossing of roads, used to be. It is important to note that the Halles has developed exclusively in the NW quadrant of the \u201cactive\u201d great cross, basically almost never impeding the traffic on it. It was not the case of Montmartre street, since outside the market activities blocking the street, it was also the site of various celebration, and the pillory was here too:\nLeft: Execution of Aymerigot Marcel, from Froissart's Chronical, Vol.IV, part 1, 1470 - Right: A \"celebration\" at the Halles by Philibert Louis Debucourt - It was to celebrate the birth of the French heir on January 21, 1782. The tower seen in the middle is the pillory\nDetail of the Halles district and market across the age, 1300, 1600, 1790 and 1830 - red line refer to the W and N branches of the historic great cross (rue St Honore and St Denis), and the blue line to the Montmartre road- credit (16)\nThought a market was officially existing since Louis VI the fat, circa 1117 \u2013 which in fact was instituating a function already occurring on a necropolis site [5]\u2013 Les Halles history starts in 1183, when the King Philippe II Augustus decided to move a trade-fair on the site called the Champeaux. A history version suggests it was a Jew ghetto \u2013 Philippe II Augustus will have expelled them and seized their goods and houses in 1182 [2]-then build two covered market in 1183. They are thought to have been massive enough-100metres long and 10 height, with a vaulted ceiling, all in stones [5]\u2013 to have impressed their contemporaries: they will be called \u201cHala\u201d (halles in french, the English term \u201chall\u201d is poor translation, and we will keep the french term) and it is the beginning of the story.\nLeft: Halles Champeaux (circa 1183) - right: Halla interior\nAt first the market food trading is marginal. The market will start to flourish then will decline in the 14th and 15th centuries and the halles will fall in ruins. A Francis I reformation ordinance in 1543 will try to correct that. New halles will be erected to extend and replace the old ones circa 1551, that along market organization changes. The emergence of new trading usage (shop\u2026) will make the market focusing increasingly on food trading. Soon enough it will be known as the largest market in Occident.\nHalle a la saline \u2013 circa 1784\nLot of things will change around, except 2 landmarks which today are still structuring the site- St Eustache Church and the Innocents Fountain-marked with a \u201cred target\u201d on all the maps to help the reader to contextualize the site:\nLes halles neighborhood, The halles today site and original site. St Eustache church and the Innocents Fountain landmarks highligted\nSt Eustache Church\nIt is a relatively unassuming Gothic style church, with an unfinished and at odd neoclassic frontage [9] \u2013 the kind of you can expect in many french cities. Its recognized best profile-highlighting its gothics features slighlty enhanced by some renaissance style details- is seen from its South East side, basically from the Innocents fountain.\nIt is the obvious landmark of the neighborhood. Most of the photographs and paintings of the district include it whenever possible: When you see St Eustache, you know where you are.\nSt Eustache church (in front the \"Prouvaires\" market): 24 barracks built between 1813-1818- circa 1850 (Photo Marville)\nThe Innocents fountain\nEasy to find. On the way, more exactly on the historic Montmartre road axis- between the Halles and the \u201cgreat cross\u201d intersection- and dominating the middle of an unencumbered and well defined ~80mx60m square: a size big enough to accommodate a substantiate activity making a good hangout, but small enough to be able to recognize a person in it (see the notion of social field of vision in [7]): this unassuming structure is a landmark: it is \u201cTHE\u201d meeting spot of the Halles.\nNotice the today square\u2019s name, place Joachim du Bellay, is virtually unknown, overwhelmed it is by the \u201cInnocents\u201d fountain name everyone know.\nSt Innocent fountain, and market. Notice the umbrellas in the forefront, they will play an important role in the Halles history- Photo Marville circa 1855\nA bit of historic background for the Innocents fountain\nInnocents cemetery during the Middle ages\nThe fountain- thought have been existing since 1274 [5][10]\u2013 has been a bit peripatetic. Originally this site was a cemetery, the St Innocents cemetery, and the fountain was sitting at the NE corner of it. A cenotaph was sitting in the middle of the cemetery.\nOdours\nThe cemetery- an \u201coverflowing\u201d mass grave-the level was 2meters above natural level [5]\u2013 surrounded by an ossuary, has been closed circa 1785 under hygienist concern of the time and pressure of the neighborhood complaining about its \u201cmephitic\u201d odours [6] (the cemetery has been transferred into the catacombs) . The fountain has then replaced the cenotaph. Though merchants was conducting business in the cemetery before its closure, it became the regular market we see in the photo above in 1789-as planned by a 1750s plan.\nProject of conversion of the \"Innocents\" cemetery in a new market dated 1747 or 1767 (notice North is downward)\nbefore be surrounded by shelter for merchant, circa 1811-1813 [2], the Innocent market will receive 400 red parasols in 1800 [5], an anecdote which will eventually have a huge influence on the future of the site. The Innocents market will last up to 1858 when it will be relocated in the Halles Baltard, and give room partially to a park, an opportunity to relocate the fountain for the last time so far.\n\"Innocents\" market by Thomas Naudet circa 1800: 400 parasol had been installed to shelter the merchants (credit wikigallery)\nSome other building of interests\nThe Halle au Bl\u00e9\nThe Halle au bl\u00e9 with the M\u00e9dicis Column as it looks today from the Halles (credit wikipedia)\nIn its today form, this building could have eventually been a landmark in a provincial city, but in the Parisian landscape, it looks like another official Parisian building\u2026 Its circular and repetitive from makes it a poor orientation helper. The lately added main entrance on its west side, make the building turning its back to the Halles site.\nIt was a building to trade grain and flour. It has been built by Nicolas Le Camus de M\u00e9zi\u00e8res between 1763 and 1767, and was part of a larger neighborhood development following a circus layout. This building has been considerably altered in its history to the point it bears little relationship with its original design:\nJacques-Guillaume Legrand and Jacques Molinos added a wooden framed dome in 1782, it will be destroyed by a fire in 1802\nFran\u00e7ois-Joseph_B\u00e9langer will rebuilt the dome with an iron frame and copper surfacing in 1806-1811\nAfter another fire in 1854, the building will be closed in 1873, and radically transformed by Henri Blondel in 1885, to give its today appearance, and to host a commodity trade market.\nNowadays, it is used by the Paris Chamber of commerce\nOriginal Halle au bl\u00e9, as designed by Le Camus de M\u00e9zi\u00e8res (top). it will receive a wooden roof by Jacques Molinos and Legrand (middle) and will get a dramatic transformation by Blondel giving its today appearance(bottom)\nThe surrounding buildings have followed a similar track.\nrue de Viarmes, circa 1885, left (photo Godefroy)- and now, right (credit wikipedia)\nThe M\u00e9dicis column\nIt is the column seen next to the Halle au bl\u00e9 building. Commissioned by Catherine de\u2019 Medici in 1574, it predates the building itself, but has always stand still there a bit at odd. Blondel was planning to demolish it in the context of its renovation work: Jean Charles Alphand, to whose Paris owns most of its most celebrated parks, will have intervened against such a fate.\nThe Halle au Draps\nWe mention this building because it was probably the traditional shape of the non food related Halles, and it relates to what have once been one of the most important and flagship trade activities of the medieval halles of Paris: drapery.\nThe illustrated Halles, a 50x400foot building, has been built by Legrand and Molinos in 1786, it will lost its vaulted, wooden framed roof in a fire in 1855. following that, the then almost moribund drapery market, will be transferred to the Halle au ble. The building will be demolished in 1868. The advent of the department stores surrounding the halles, like Le Bon March\u00e9, Samaritaine, the BHV or the Grands magasins du Louvre, will make them the place of choice to buy drapery\nThe \"halle aux draps\" by Nicolle Victor Jean (circa 1830)- Probably a very traditional shape for the non-food \"mortar\" built Halle, it has been demolished in 1868\nThe market in 1850\u2019s\nThe Halles, for the food related market, are largely very medieval in their typology, and the last addition like the Prouvaires market built by Jean-Jacques-Marie Huv\u00e9 between 1813-1818 (see photo above) or the halles for the fish and butter market, built in 1822 by Hubert Rohault de Fleury, don\u2019t revisit this style, thought they are almost contemporary of the Covent garden market in London.\nIn former time and in addition to Les Halles, Parisian houses in commercial districts had an open ground floor, where market activities was held. this form used to be called \u201cPiliers\u201d (from the building foundation pillars)-they form a 4meters wide gallery on the east side, and a 2meters wide one elsewhere [5], but in fact the market was sprawling in all the surrounding area. The Giuseppe Canella\u2019s canvas below illustrates it:\n\"les halles\" circa 1830 and the Tonnellerie's \"Piliers\" - notice the roof shape of the covered market\nthe market is the largest known central market of its time and live mostly at night: people, including 7162 counted sellers, start to come around 11pm, to serve an estimated 40,000+ customers, and are supposed by bylaw to have freed the street by 9am or 10am (in winter).\nThe market roughly occupies 3.6 hectares -2.2hectares for flower, fruit and vegetable only- partitioned as following:\n1 hectares of Halles (covered market)\n0.6 hectares on open space\n2 hectares on public street\nTraffic is a huge issue- there are counted 4,000 carts occupying an additional 2 hectares. handcart, basket storage, and livestock occupy an additional 0.5 hectares (number above from [11], [12] provides similar numbers, 5.5 hectares for the whole market).\nThe area is a fertile ground for endemic prostitution and other activities associated with more or less shady nightlife [15]. The retail market is functioning all the day, making the area active 24hr a day.\nAdding to the picture the smell of the rotten food (odours have always been a strong marker of the site [15]), it doesn\u2019t necessarily make a desirable place to live, and in fact the neighborhood, \u201cunhealthy, badly built and crowded, is of a repulsive appearance\u201d [14]: It is the \u201cworst\u201d slump of Paris where the living population density level has been reported at up to 100,000 people/km2 [1][15]. Diseases are widespread and the neighborood will be a nest of the 1832 cholera pandemic [13]\nThought there were many men, for packing work- called fort des halles\u2013 many of the merchants were women, and the market was associated with a high level of gossiping and obscene language by the moral bourgeoisie of the time [13]. Eventually due to the market sprawl and ensuing disorganization, the government had little control on its activities, market stall allocation, tax collection..etc\u2026. The government will try to get better control on it\u2026 It will be the object of another post:\nIn this Marville photo (circa 1855), all the structuring edifices mentioned in this post are appearing. but what is the focus of the photo is the Halles Baltard: it will deserves a post of its own\n[1]The autumn of Central Paris, Anthony Sutcliffe, mc Gill Quueens Univeristy Press, 1970\n[2] M\u00e9moires de la Soci\u00e9t\u00e9 de l\u2019histoire de Paris et de l\u2019\u00cele-de-France, Volume 3, Paris, 1876\n[3]it was kind of an European tradition when the government was in need of money. We refers to the June 24, 1182 expelling ordinance. It was called la \u201cJuiverie des Champeaux\u201d. This version doesn\u2019t appear- neither is dismissed- in the recent literature (like [5]), but up to recently the literature was frequently referring to [2] to support this version.\n[4] Paris, ses organes, ses fonctions et sa vie dans la seconde moitie du XIXe siecle, Paris, 1874 (as translated in [13])\n[5] Les halles de Paris et leur quartier (1137-1969), Anne Lombard Jourdan, 2010\n[6] Histoire physique, civile et morale de Paris, Vol.6, Jacques Antoine Dulaure, 1837\n[8] The Rue de Rivoli (street) has been opened in different stage between 1806 and 1835, for the Western part, and the last section completed in 1855 [1].\n[9] It used to be chapel, St Agn\u00e8s, built in the 13th century. The construction of the current church began in 1532, the work not being finally completed until 1637. Jean Hardouin-Mansart de Jouy has started to had a new neoclassic style frontage in 1754. The work will be continued but not finished by Pierre-Louis Moreau-Desproux up to 1772.\n[10] The original fountain with only 3 exposed faces- has been redone in its current style by Jean Goujon (sculptor) and Pierre Lescot (design)- 1546-1549. The fourth face has been added by Auguste pajou in 1788, when the fountain has been relocated in the middle of the place.\n[11] La politique Nouvelle, Juin, Juillet Aout 1851, Paris\n[12] Revue g\u00e9n\u00e9rale de l\u2019architecture et des travaux publics: Volume 8, edited by C\u00e9sar Daly, 1849, Paris\n[13] Urban Renovation, Moral Regeneration: Domesticating the Halles in Second-Empire Paris, Victoria E. Thompson, French Historical Studies, Vol. 20, No. 1, 1997.\n[14] \u201cQuestion du d\u00e9placement de Paris,\u201d Lanquetin, Prefecture de la Seine, Commission de Halles, April 1840 (as cited by [13].\n[15] Les Halles: images d\u2019un quartier, Jean-Louis Robert,Martine Tabeaud, 2004\n[16] http://www.paris-atlas-historique.fr/\nFiled in History, Les Halles, Paris, urbanism\nTags: Aymerigot Marcel, Champeaux., Charles Marville, Fontaine des innocents, Fort des halles, Fran\u00e7ois-Joseph_B\u00e9langer, Giuseppe Canella, halle au bl\u00e9, halle aux draps, Halles, Haussmann, Henri Blondel, Hubert Rohault de Fleury, Innocents, Jacques Molinos, Jacques-Guillaume Legrand, Jean-Jacques-Marie Huv\u00e9, Les halles, Louis VI, march\u00e9 au beurre, march\u00e9 des Prouvaires, Montmartre, Nicolas Le Camus de M\u00e9zi\u00e8res, Philibert Louis Debucourt, Philippe II Augustus, Piliers des halles, place Joachim du Bellay, rue de Rivoli, Saints Innocents Cemetery, St Eustache, Thomas Naudet", "source": "cc/2023-06/en_head_0000.json.gz/line826218"}
9
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.7993101477622986, "wiki_prob": 0.7993101477622986, "text": "France\u2019s far-right leader Le Pen still hopes to unsettle Macron in legislative elections\nby athleticinsider May 8, 2022 0\nFrench far-right politician Marine Le Pen returned to the electoral fray on Sunday, announcing herself as a candidate in the parliamentary elections in June after weeks of silence since she lost the presidential vote to Emmanuel Macron last month.\n\u201cI hope that we will have a strong presence in parliament to lead, once again, the fight against the social policies that Emmanuel Macron wants to put in place,\u201d she said, adding she would run for re-election in her northern constituency of Pas-de-Calais.\nLe Pen was speaking on a visit to the town of Henin-Beaumont marking Victory Day \u2014 the anniversary of the Allies\u2019 victory in 1945 over Nazi Germany in World War II.\nLe Pen, defeated by Macron in the April 24 runoff election, pitched herself as the centrist president\u2019s main opponent and took aim at hard-left politician Jean-Luc Melenchon.\nMelenchon, who came third in the first round of the presidential election, is leading a coalition of left-wing parties that hope to deprive Macron of a majority in parliament. That alliance launched its campaign on Saturday.\n\u201cThe reality is that Jean-Luc Melenchon helped get Emmanuel Macron elected, so that completely discredits his ability to position himself as an opponent,\u201d Le Pen said, highlighting her disagreement with the left-wing politician on immigration and law and order issues.\nLe Pen\u2019s party, the National Rally (RN), currently holds only seven seats in the National Assembly, or lower house of parliament. The party, which has sought in recent years to soften its image, will not form an alliance with far-right pundit-turned-presidential candidate Eric Zemmour and his party Reconquete.\nMacron, sworn in for a second term on Saturday, will preside over Sunday\u2019s main Victory Day event at the Place de L\u2019Etoile in Paris.\nI'm glad Britney Spears publicly broke this pregnancy taboo\nIn new audio, McCarthy worried comments by certain GOP lawmakers could incite violence after Jan. 6\nTwitter bans promotion of other social media sites including Facebook, Instagram and Truth Social\nathleticinsider December 19, 2022", "source": "cc/2023-06/en_head_0000.json.gz/line1447070"}
10
+ {"pred_label": "__label__wiki", "pred_label_prob": 0.6298087239265442, "wiki_prob": 0.6298087239265442, "text": "Main Section While the \u201cMagyar Telekom\u201d case finishes in the US, it still remains...\nWhile the \u201cMagyar Telekom\u201d case finishes in the US, it still remains stuck in the judiciary system in Macedonia\nAt the moment, two cases have been opened against \u201cMagyar Telekom\u201d, even though they started a long time ago, and whether intentionally or not, have not moved since they hit a dead end.\nYesterday, former directors of \u201cMagyar Telekom\u201d Elek Straub and Andras Balogh, who were accused of having secret agreements with the Prime Minister at the time and other people from Macedonia to prevent competition in the market, agreed to pay fines up to 250.000 dollars and 150.000 dollars, stated the US Investigation Commission on Securities and Exchange.\nThe outcome of the \u201cMagyar Telekom\u201d case in the US comes at a time during a severe political crisis in Macedonia and institutional blockade. At the same time, the SPO is attempting to inspect the computer systems of \u201cMacedonian Telekom\u201d in connection with the investigation in the \u201cTarget\u201d case, which should determine who was part of the illegal wiretapping affair in the country.\nAlso yesterday, prosecutors from the SPO held \u201ca meeting of a higher level\u201d with representatives from \u201cMacedonian Telecom\u201d in connection with the investigation regarding the mass wiretapping.\nIn late September, 2015, Bogoevski was called for questioning and gave four hours of testimony to the prosecutors.\nSpecial Public Prosecutor, Katica Janeva, in February last year asked Public Prosecutor Marko Zvlevski if her office could takeover the case, however he refused and passed on the case to the Council of Public Prosecutors. He decides what cases are passed on to the SPO and which cases are not.\nIn Macedonia, charges have been filed against former directors of \u201cMacedonian Telekom\u201d, Attila Szendrei, Rolf Plath and Zoltan Kisjuh\u00e1sz. They are being charged for organizing fictitious consultancy contracts with the Cypriot Consulting Company \u201cChavtex holdings Limited\u201d, and ended up costing \u201cMacedonian Telekom\u201d 4 million euros, and damaging the state budget for approximately 2 million euros, because the at the time, the Government owned 47% in shares of the company.\nThe investigation of this case began in 2008, and 3 years later, in 2011 charges were eventually filed. However, the actual trial has still not begun, even after 6 years, as the court hearings are constantly being postponed. The defendants have never appeared in front of a Macedonian court, even with international arrest warrants and a court ruling for their detainment.\nMagyar Telekom\nSlobodan Bogoevski\nTruthmeter.mk: Public Prosecutor\u2019s Office operates with only a third of the planned staff\nPublic Prosecution: Short circuit in defibrillator cord started the deadly blaze in COVID hospital in Tetovo\nNorth Macedonia: The Operative Technical Agency last year interposed in 853 cases of communications wiretapping", "source": "cc/2023-06/en_head_0000.json.gz/line682942"}
github_sample.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"text": "var videoState={\n\n \n create: function(){\n var video;\n var sprite;\n \n video = game.add.video('storyvideo');\n video.play(false);\n sprite = video.addToWorld(game.world.centerX, game.world.centerY, 0.5, 0.5, 2, 2);\n//pause\n var picLabel= game.add.image(game.width/2, game.height-30, 'skip');\n picLabel.anchor.setTo(-1,1);\n picLabel.inputEnabled = true;\n picLabel.events.onInputDown.add(this.start, this);\n\n//skip video\n// var picLabel= game.add.image(game.width/2, game.height-30, 'skip');\n// picLabel.anchor.setTo(-2,1);\n// picLabel.inputEnabled = true;\n// picLabel.events.onInputDown.add(this.startgame, this);\n\n\n\n\n\n\n // game.time.events.add(Phaser.Timer.SECOND * 10, this.fadeState, this);\n\n // game.stage.backgroundColor= '#ffffff';\n\n game.physics.startSystem(Phaser.Physics. ARCADE);\n game.renderer.renderSession.roundPixels=true;\n \n },\n \n // fadeState: function(){\n // game.state.start('play');\n\n // },\n start: function(){\n game.paused = (game.paused) ? false : true;\n game.state.start('play');\n \n },\n // startgame: function(){\n // game.state.start('play');\n \n // },\n\n};", "meta": {"content_hash": "1c932c7359417cc3e05f3380eabb7fac", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 89, "avg_line_length": 25.41176470588235, "alnum_prop": 0.5601851851851852, "repo_name": "nickchulani99/ITE-445", "id": "d9d5cb9bb5e54f95b73df6a87d4bcecebdc40318", "size": "1296", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "final/alien copy 4/js/video.js", "mode": "33188", "license": "mit", "language": [{"name": "HTML", "bytes": "16832"}, {"name": "JavaScript", "bytes": "451272"}]}}
2
+ {"text": "package mts\n\n//Licensed under the Apache License, Version 2.0 (the \"License\");\n//you may not use this file except in compliance with the License.\n//You may obtain a copy of the License at\n//\n//http://www.apache.org/licenses/LICENSE-2.0\n//\n//Unless required by applicable law or agreed to in writing, software\n//distributed under the License is distributed on an \"AS IS\" BASIS,\n//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//See the License for the specific language governing permissions and\n//limitations under the License.\n//\n// Code generated by Alibaba Cloud SDK Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\nimport (\n\t\"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests\"\n\t\"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses\"\n)\n\n// SearchMedia invokes the mts.SearchMedia API synchronously\nfunc (client *Client) SearchMedia(request *SearchMediaRequest) (response *SearchMediaResponse, err error) {\n\tresponse = CreateSearchMediaResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}\n\n// SearchMediaWithChan invokes the mts.SearchMedia API asynchronously\nfunc (client *Client) SearchMediaWithChan(request *SearchMediaRequest) (<-chan *SearchMediaResponse, <-chan error) {\n\tresponseChan := make(chan *SearchMediaResponse, 1)\n\terrChan := make(chan error, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tdefer close(responseChan)\n\t\tdefer close(errChan)\n\t\tresponse, err := client.SearchMedia(request)\n\t\tif err != nil {\n\t\t\terrChan <- err\n\t\t} else {\n\t\t\tresponseChan <- response\n\t\t}\n\t})\n\tif err != nil {\n\t\terrChan <- err\n\t\tclose(responseChan)\n\t\tclose(errChan)\n\t}\n\treturn responseChan, errChan\n}\n\n// SearchMediaWithCallback invokes the mts.SearchMedia API asynchronously\nfunc (client *Client) SearchMediaWithCallback(request *SearchMediaRequest, callback func(response *SearchMediaResponse, err error)) <-chan int {\n\tresult := make(chan int, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tvar response *SearchMediaResponse\n\t\tvar err error\n\t\tdefer close(result)\n\t\tresponse, err = client.SearchMedia(request)\n\t\tcallback(response, err)\n\t\tresult <- 1\n\t})\n\tif err != nil {\n\t\tdefer close(result)\n\t\tcallback(nil, err)\n\t\tresult <- 0\n\t}\n\treturn result\n}\n\n// SearchMediaRequest is the request struct for api SearchMedia\ntype SearchMediaRequest struct {\n\t*requests.RpcRequest\n\tResourceOwnerId requests.Integer `position:\"Query\" name:\"ResourceOwnerId\"`\n\tDescription string `position:\"Query\" name:\"Description\"`\n\tTitle string `position:\"Query\" name:\"Title\"`\n\tPageNumber requests.Integer `position:\"Query\" name:\"PageNumber\"`\n\tCateId string `position:\"Query\" name:\"CateId\"`\n\tPageSize requests.Integer `position:\"Query\" name:\"PageSize\"`\n\tFrom string `position:\"Query\" name:\"From\"`\n\tTag string `position:\"Query\" name:\"Tag\"`\n\tKeyWord string `position:\"Query\" name:\"KeyWord\"`\n\tResourceOwnerAccount string `position:\"Query\" name:\"ResourceOwnerAccount\"`\n\tOwnerAccount string `position:\"Query\" name:\"OwnerAccount\"`\n\tOwnerId requests.Integer `position:\"Query\" name:\"OwnerId\"`\n\tSortBy string `position:\"Query\" name:\"SortBy\"`\n\tTo string `position:\"Query\" name:\"To\"`\n}\n\n// SearchMediaResponse is the response struct for api SearchMedia\ntype SearchMediaResponse struct {\n\t*responses.BaseResponse\n\tTotalNum int64 `json:\"TotalNum\" xml:\"TotalNum\"`\n\tPageSize int64 `json:\"PageSize\" xml:\"PageSize\"`\n\tRequestId string `json:\"RequestId\" xml:\"RequestId\"`\n\tPageNumber int64 `json:\"PageNumber\" xml:\"PageNumber\"`\n\tMediaList MediaListInSearchMedia `json:\"MediaList\" xml:\"MediaList\"`\n}\n\n// CreateSearchMediaRequest creates a request to invoke SearchMedia API\nfunc CreateSearchMediaRequest() (request *SearchMediaRequest) {\n\trequest = &SearchMediaRequest{\n\t\tRpcRequest: &requests.RpcRequest{},\n\t}\n\trequest.InitWithApiInfo(\"Mts\", \"2014-06-18\", \"SearchMedia\", \"mts\", \"openAPI\")\n\trequest.Method = requests.POST\n\treturn\n}\n\n// CreateSearchMediaResponse creates a response to parse from SearchMedia response\nfunc CreateSearchMediaResponse() (response *SearchMediaResponse) {\n\tresponse = &SearchMediaResponse{\n\t\tBaseResponse: &responses.BaseResponse{},\n\t}\n\treturn\n}\n", "meta": {"content_hash": "4765aae0af2406ea691fb001ea5a83df", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 144, "avg_line_length": 38.23275862068966, "alnum_prop": 0.7019165727170237, "repo_name": "aliyun/alibaba-cloud-sdk-go", "id": "e23386a31fa5de227e10f19984b8f3e7eb736f22", "size": "4435", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "services/mts/search_media.go", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Go", "bytes": "734307"}, {"name": "Makefile", "bytes": "183"}]}}
3
+ {"text": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <title>Invitation to calendar</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n</head>\n<body>\n<h2>You was invited to calendar.</h2>\n\n<p>You can login and set password procceed by link:</p>\n\n<a href=\"<?php echo $link?>\"><?php echo $link?></a>\n</body>\n</html>", "meta": {"content_hash": "324efbc1ad28fdfe902cd1e51f7e095e", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 76, "avg_line_length": 23.733333333333334, "alnum_prop": 0.6432584269662921, "repo_name": "vchukhalyonock/calendar", "id": "5ca5e852381e8a65c1d2612696445e148aa8677b", "size": "356", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/views/email/invite.php", "mode": "33188", "license": "mit", "language": [{"name": "ApacheConf", "bytes": "366"}, {"name": "CSS", "bytes": "39144"}, {"name": "HTML", "bytes": "5502"}, {"name": "JavaScript", "bytes": "460150"}, {"name": "PHP", "bytes": "1807984"}]}}
4
+ {"text": "import os\nfrom flask import Flask,render_template,url_for,request,session,redirect\nfrom flask_login import LoginManager\nfrom flask_bootstrap import Bootstrap\nfrom flask_script import Manager,Shell\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_mail import Mail\nfrom flask_moment import Moment\nfrom flask_socketio import SocketIO\nfrom flask_gravatar import Gravatar\n\napp = Flask(__name__)\nbasedir = os.path.abspath(os.path.dirname(__file__))\napp.config['SQLALCHEMY_DATABASE_URI'] =\\\n 'sqlite:///' + os.path.join(basedir, 'data.sqlite')\n#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://sql6140009:Y1912zwYwC@sql6.freemysqlhosting.net/sql6140009'\napp.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False\napp.config['SECRET_KEY'] = 'hard to guess string'\n\napp.config['MAIL_SERVER'] = 'smtp.googlemail.com'\napp.config['MAIL_PORT'] = 587\napp.config['MAIL_USE_TLS'] = True\napp.config['MAIL_USERNAME'] = os.environ.get('MAIL_USERNAME')\napp.config['MAIL_PASSWORD'] = os.environ.get('MAIL_PASSWORD')\n\nmanager = Manager(app)\nbootstrap = Bootstrap()\ndb = SQLAlchemy(app)\nmail = Mail(app)\nmoment = Moment(app)\nsocketio = SocketIO(app)\ngravatar = Gravatar(app)\n\nlogin_manager = LoginManager()\nlogin_manager.session_protection = 'strong'\nlogin_manager.login_view = 'auth.login'\n# app.config['SECRET_KEY'] = 'hard to guess string'\n# app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True\n#app = create_app('DEVELOPMENT')\n\nbootstrap.init_app(app)\n#db.init_app(app)\nlogin_manager.init_app(app)\n\nfrom app import models\n\n@app.route('/')\ndef index():\n return render_template('index.html')\n\nfrom app.auth.views import admin\napp.register_blueprint(auth.views.admin,url_prefix = '/authentication')\n\nfrom app.main.views import welcome\napp.register_blueprint(main.views.welcome,url_prefix = '/welcome')\n\nfrom app.twitterAPI.views import api\napp.register_blueprint(twitterAPI.views.api,url_prefix = '/api')\n", "meta": {"content_hash": "a9735eefc6ff4807441825a5f2811599", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 117, "avg_line_length": 32.62068965517241, "alnum_prop": 0.7563424947145877, "repo_name": "sumedh123/debatify", "id": "89d78b1a48e585a5353b33fa5344659ba9f8770a", "size": "1892", "binary": false, "copies": "1", "ref": "refs/heads/UI", "path": "app/__init__.py", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "5939"}, {"name": "CSS", "bytes": "347155"}, {"name": "HTML", "bytes": "102503"}, {"name": "JavaScript", "bytes": "608373"}, {"name": "Python", "bytes": "8393673"}, {"name": "Shell", "bytes": "3298"}]}}
5
+ {"text": "/*\n * String hash computation (interning).\n */\n\n#include \"duk_internal.h\"\n\n/* constants for duk_hashstring() */\n#define STRING_HASH_SHORTSTRING 4096\n#define STRING_HASH_MEDIUMSTRING (256 * 1024)\n#define STRING_HASH_BLOCKSIZE 256\n\nduk_uint32_t duk_heap_hashstring(duk_heap *heap, duk_uint8_t *str, duk_size_t len) {\n\t/*\n\t * Sampling long strings by byte skipping (like Lua does) is potentially\n\t * a cache problem. Here we do 'block skipping' instead for long strings:\n\t * hash an initial part, and then sample the rest of the string with\n\t * reasonably sized chunks.\n\t *\n\t * Skip should depend on length and bound the total time to roughly\n\t * logarithmic.\n\t *\n\t * With current values:\n\t *\n\t * 1M string => 256 * 241 = 61696 bytes (0.06M) of hashing\n\t * 1G string => 256 * 16321 = 4178176 bytes (3.98M) of hashing\n\t *\n\t * After an initial part has been hashed, an offset is applied before\n\t * starting the sampling. The initial offset is computed from the\n\t * hash of the initial part of the string. The idea is to avoid the\n\t * case that all long strings have certain offset ranges that are never\n\t * sampled.\n\t */\n\t\n\t/* note: mixing len into seed improves hashing when skipping */\n\tduk_uint32_t str_seed = heap->hash_seed ^ len;\n\n\tif (len <= STRING_HASH_SHORTSTRING) {\n\t\treturn duk_util_hashbytes(str, len, str_seed);\n\t} else {\n\t\tduk_uint32_t hash;\n\t\tduk_size_t off;\n\t\tduk_size_t skip;\n\n\t\tif (len <= STRING_HASH_MEDIUMSTRING) {\n\t\t\tskip = (duk_size_t) (16 * STRING_HASH_BLOCKSIZE + STRING_HASH_BLOCKSIZE);\n\t\t} else {\n\t\t\tskip = (duk_size_t) (256 * STRING_HASH_BLOCKSIZE + STRING_HASH_BLOCKSIZE);\n\t\t}\n\n\t\thash = duk_util_hashbytes(str, (duk_size_t) STRING_HASH_SHORTSTRING, str_seed);\n\t\toff = STRING_HASH_SHORTSTRING + (skip * (hash % 256)) / 256;\n\n\t\t/* FIXME: inefficient loop */\n\t\twhile (off < len) {\n\t\t\tduk_size_t left = len - off;\n\t\t\tduk_size_t now = (duk_size_t) (left > STRING_HASH_BLOCKSIZE ? STRING_HASH_BLOCKSIZE : left);\n\t\t\thash ^= duk_util_hashbytes(str + off, now, str_seed);\n\t\t\toff += skip;\n\t\t}\n\n\t\treturn hash;\n\t}\n}\n\n", "meta": {"content_hash": "bab3317c67f40063ff7a69f3bcc74bb0", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 95, "avg_line_length": 32.140625, "alnum_prop": 0.6684491978609626, "repo_name": "JoshEngebretson/duktape", "id": "29411796cbb56b7d91920771a24db254493ccfc8", "size": "2057", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/duk_heap_hashstring.c", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "1972812"}, {"name": "C++", "bytes": "20922"}, {"name": "CoffeeScript", "bytes": "895"}, {"name": "JavaScript", "bytes": "15926045"}, {"name": "Objective-C", "bytes": "6054"}, {"name": "Python", "bytes": "136104"}, {"name": "Shell", "bytes": "12610"}]}}
6
+ {"text": "--TEST--\nRunkit_Sandbox_Parent Class -- Echo\n--SKIPIF--\n<?php if(!extension_loaded(\"runkit\") || !RUNKIT_FEATURE_SANDBOX) print \"skip\"; \n /* May not be available due to lack of TSRM interpreter support */\n if(!function_exists(\"runkit_sandbox_output_handler\")) print \"skip\"; ?>\n--FILE--\n<?php\n$php = new Runkit_Sandbox();\n$php['output_handler'] = 'test_handler';\n$php['parent_access'] = true;\n$php->ini_set('display_errors', true);\n$php->ini_set('html_errors', false);\n$php->eval('$PARENT = new Runkit_Sandbox_Parent;\n\t\t\techo \"Foo\\n\";\n\t\t\t$PARENT->echo(\"BarBar\\n\");');\n\nfunction test_handler($str) {\n if (strlen($str) == 0) return NULL; /* flush() */\n /* Echoing and returning have the same effect here, both go to parent's output chain */\n echo 'Received string from sandbox: ' . strlen($str) . \" bytes long.\\n\";\n\n return strtoupper($str);\n}\n--EXPECT--\nReceived string from sandbox: 4 bytes long.\nFOO\nReceived string from sandbox: 149 bytes long.\n\nWARNING: RUNKIT_SANDBOX_PARENT::ECHO(): ACCESS TO ECHO DATA IN THE PARENT CONTEXT IS NOT ENABLED IN UNKNOWN(0) : RUNKIT_SANDBOX EVAL CODE ON LINE 3\n", "meta": {"content_hash": "009fcdd5cf234bb851939760b7bb2bec", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 147, "avg_line_length": 36.93333333333333, "alnum_prop": 0.6796028880866426, "repo_name": "lzpfmh/runkit", "id": "44237969acec682b89517ba99d074aa575d5c09a", "size": "1108", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "tests/Runkit_Sandbox_Parent__.echo.access.phpt", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "C", "bytes": "263129"}, {"name": "C++", "bytes": "372"}, {"name": "PHP", "bytes": "141611"}, {"name": "SourcePawn", "bytes": "193"}]}}
7
+ {"text": "\npackage org.codehaus.groovy.grails.scaffolding;\n\nimport grails.build.logging.GrailsConsole;\nimport groovy.text.SimpleTemplateEngine;\nimport groovy.text.Template;\n\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.Writer;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\n\nimport org.apache.commons.logging.Log;\nimport org.apache.commons.logging.LogFactory;\nimport org.codehaus.groovy.grails.commons.GrailsApplication;\nimport org.codehaus.groovy.grails.commons.GrailsDomainClass;\nimport org.codehaus.groovy.grails.commons.GrailsDomainClassProperty;\nimport org.codehaus.groovy.grails.plugins.GrailsPluginInfo;\nimport org.codehaus.groovy.grails.plugins.GrailsPluginManager;\nimport org.codehaus.groovy.grails.plugins.GrailsPluginUtils;\nimport org.codehaus.groovy.grails.plugins.PluginManagerAware;\nimport org.codehaus.groovy.runtime.IOGroovyMethods;\nimport org.codehaus.groovy.runtime.StringGroovyMethods;\nimport org.springframework.context.ResourceLoaderAware;\nimport org.springframework.core.io.AbstractResource;\nimport org.springframework.core.io.FileSystemResource;\nimport org.springframework.core.io.Resource;\nimport org.springframework.core.io.ResourceLoader;\nimport org.springframework.core.io.support.PathMatchingResourcePatternResolver;\nimport org.springframework.util.Assert;\nimport org.springframework.util.StringUtils;\n\npublic abstract class AbstractGrailsTemplateGenerator implements GrailsTemplateGenerator, ResourceLoaderAware, PluginManagerAware {\n\n\tprotected static final Log log = LogFactory.getLog(AbstractGrailsTemplateGenerator.class);\n\n\tprotected String basedir = \".\";\n\tprotected boolean overwrite = false;\n\tprotected SimpleTemplateEngine engine = new SimpleTemplateEngine();\n\tprotected ResourceLoader resourceLoader;\n\tprotected Template renderEditorTemplate;\n\tprotected String domainSuffix = \"\";\n\tprotected GrailsPluginManager pluginManager;\n\tprotected GrailsApplication grailsApplication;\n\n\tprotected AbstractGrailsTemplateGenerator(ClassLoader classLoader) {\n\t\tengine = new SimpleTemplateEngine(classLoader);\n\t}\n\n\tpublic void generateViews(GrailsDomainClass domainClass, String destDir) throws IOException {\n\t\tAssert.hasText(destDir, \"Argument [destdir] not specified\");\n\n\t\tFile viewsDir = new File(destDir, \"grails-app/views/\" + domainClass.getPropertyName());\n\t\tif (!viewsDir.exists()) {\n\t\t\tviewsDir.mkdirs();\n\t\t}\n\n\t\tfor (String name : getTemplateNames()) {\n if(log.isInfoEnabled())\n\t\t\t log.info(\"Generating [\"+name+\"] view for domain class [\"+domainClass.getFullName()+\"]\");\n\t\t\tgenerateView(domainClass, name, viewsDir.getAbsolutePath());\n\t\t}\n\t}\n\n\tpublic void generateController(GrailsDomainClass domainClass, String destDir) throws IOException {\n\t\tAssert.hasText(destDir, \"Argument [destdir] not specified\");\n\n\t\tif (domainClass == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString fullName = domainClass.getFullName();\n\t\tString pkg = \"\";\n\t\tint pos = fullName.lastIndexOf('.');\n\t\tif (pos != -1) {\n\t\t\t// Package name with trailing '.'\n\t\t\tpkg = fullName.substring(0, pos + 1);\n\t\t}\n\n\t\tFile destFile = new File(destDir, \"grails-app/controllers/\" + pkg.replace('.', '/') + domainClass.getShortName() + \"Controller.groovy\");\n\t\tif (canWrite(destFile)) {\n\t\t\tdestFile.getParentFile().mkdirs();\n\n\t\t\tBufferedWriter writer = null;\n\t\t\ttry {\n\t\t\t\twriter = new BufferedWriter(new FileWriter(destFile));\n\t\t\t\tgenerateController(domainClass, writer);\n\t\t\t\ttry {\n\t\t\t\t\twriter.flush();\n\t\t\t\t}\n\t\t\t\tcatch (IOException ignored) {}\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tIOGroovyMethods.closeQuietly(writer);\n\t\t\t}\n\n\t\t\tlog.info(\"Controller generated at [\"+destFile+\"]\");\n\t\t}\n\t}\n\n @Override\n public void generateAsyncController(GrailsDomainClass domainClass, String destDir) throws IOException {\n Assert.hasText(destDir, \"Argument [destdir] not specified\");\n\n if (domainClass == null) {\n return;\n }\n\n String fullName = domainClass.getFullName();\n String pkg = \"\";\n int pos = fullName.lastIndexOf('.');\n if (pos != -1) {\n // Package name with trailing '.'\n pkg = fullName.substring(0, pos + 1);\n }\n\n File destFile = new File(destDir, \"grails-app/controllers/\" + pkg.replace('.', '/') + domainClass.getShortName() + \"Controller.groovy\");\n if (canWrite(destFile)) {\n destFile.getParentFile().mkdirs();\n\n BufferedWriter writer = null;\n try {\n writer = new BufferedWriter(new FileWriter(destFile));\n generateAsyncController(domainClass, writer);\n try {\n writer.flush();\n }\n catch (IOException ignored) {}\n }\n finally {\n IOGroovyMethods.closeQuietly(writer);\n }\n\n log.info(\"Controller generated at [\"+destFile+\"]\");\n }\n }\n\n public void generateView(GrailsDomainClass domainClass, String viewName, Writer out) throws IOException {\n\t\tString templateText = getTemplateText(viewName + \".gsp\");\n\n\t\tif (!StringUtils.hasLength(templateText)) {\n\t\t\treturn;\n\t\t}\n\n\t\tGrailsDomainClassProperty multiPart = null;\n\t\tfor (GrailsDomainClassProperty property : domainClass.getProperties()) {\n\t\t\tif (property.getType() == Byte[].class || property.getType() == byte[].class) {\n\t\t\t\tmultiPart = property;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tString packageName = StringUtils.hasLength(domainClass.getPackageName()) ? \"<%@ page import=\\\"\" + domainClass.getFullName() + \"\\\" %>\" : \"\";\n\t\tMap<String, Object> binding = createBinding(domainClass);\n\t\tbinding.put(\"packageName\", packageName);\n\t\tbinding.put(\"multiPart\", multiPart);\n\t\tbinding.put(\"propertyName\", getPropertyName(domainClass));\n\n\t\tgenerate(templateText, binding, out);\n\t}\n\n\tprotected abstract Object getRenderEditor();\n\n\tpublic void generateView(GrailsDomainClass domainClass, String viewName, String destDir) throws IOException {\n\t\tFile destFile = new File(destDir, viewName + \".gsp\");\n\t\tif (!canWrite(destFile)) {\n\t\t\treturn;\n\t\t}\n\n\t\tBufferedWriter writer = null;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(destFile));\n\t\t\tgenerateView(domainClass, viewName, writer);\n\t\t\ttry {\n\t\t\t\twriter.flush();\n\t\t\t}\n\t\t\tcatch (IOException ignored) {}\n\t\t}\n\t\tfinally {\n\t\t\tIOGroovyMethods.closeQuietly(writer);\n\t\t}\n\t}\n\n\tpublic void generateController(GrailsDomainClass domainClass, Writer out) throws IOException {\n\t\tString templateText = getTemplateText(\"Controller.groovy\");\n\n\t\tMap<String, Object> binding = createBinding(domainClass);\n\t\tbinding.put(\"packageName\", domainClass.getPackageName());\n\t\tbinding.put(\"propertyName\", getPropertyName(domainClass));\n\n\t\tgenerate(templateText, binding, out);\n\t}\n\n public void generateAsyncController(GrailsDomainClass domainClass, Writer out) throws IOException {\n String templateText = getTemplateText(\"AsyncController.groovy\");\n\n Map<String, Object> binding = createBinding(domainClass);\n binding.put(\"packageName\", domainClass.getPackageName());\n binding.put(\"propertyName\", getPropertyName(domainClass));\n\n generate(templateText, binding, out);\n }\n\n @Override\n public void generateAsyncTest(GrailsDomainClass domainClass, String destDir) throws IOException {\n generateTest(domainClass, destDir, \"AsyncSpec.groovy\");\n }\n\n\tpublic void generateTest(GrailsDomainClass domainClass, String destDir) throws IOException {\n generateTest(domainClass, destDir, \"Spec.groovy\");\n\t}\n\n private void generateTest(GrailsDomainClass domainClass, String destDir, String templateName) throws IOException {\n File destFile = new File(destDir, domainClass.getPackageName().replace('.', '/') + '/' + domainClass.getShortName() + \"ControllerSpec.groovy\");\n if (!canWrite(destFile)) {\n return;\n }\n\n String templateText = getTemplateText(templateName);\n\n Map<String, Object> binding = createBinding(domainClass);\n binding.put(\"packageName\", domainClass.getPackageName());\n binding.put(\"propertyName\", domainClass.getLogicalPropertyName());\n binding.put(\"modelName\", getPropertyName(domainClass));\n\n destFile.getParentFile().mkdirs();\n BufferedWriter writer = null;\n try {\n writer = new BufferedWriter(new FileWriter(destFile));\n generate(templateText, binding, writer);\n try {\n writer.flush();\n }\n catch (IOException ignored) {}\n }\n finally {\n IOGroovyMethods.closeQuietly(writer);\n }\n }\n\n\n @SuppressWarnings(\"deprecation\")\n protected Map<String, Object> createBinding(GrailsDomainClass domainClass) {\n\t\tboolean hasHibernate = pluginManager.hasGrailsPlugin(\"hibernate\") || pluginManager.hasGrailsPlugin(\"hibernate4\");\n\n\t\tMap<String, Object> binding = new HashMap<String, Object>();\n\t\tbinding.put(\"pluginManager\", pluginManager);\n\t\tbinding.put(\"domainClass\", domainClass);\n\t\tbinding.put(\"className\", domainClass.getShortName());\n\t\tbinding.put(\"renderEditor\", getRenderEditor());\n\t\tbinding.put(\"comparator\", hasHibernate ? DomainClassPropertyComparator.class : SimpleDomainClassPropertyComparator.class);\n\t\treturn binding;\n\t}\n\n\tprotected void generate(String templateText, Map<String, Object> binding, Writer out) {\n\t\ttry {\n\t\t\tengine.createTemplate(templateText).make(binding).writeTo(out);\n\t\t}\n\t\tcatch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}\n\n\tprotected String getPropertyName(GrailsDomainClass domainClass) {\n\t\treturn domainClass.getPropertyName() + domainSuffix;\n\t}\n\n\tprotected String getTemplateText(String template) throws IOException {\n\t\tInputStream inputStream = null;\n\t\tif (resourceLoader != null && grailsApplication.isWarDeployed()) {\n\t\t\tinputStream = resourceLoader.getResource(\"/WEB-INF/templates/scaffolding/\" + template).getInputStream();\n\t\t}\n\t\telse {\n\t\t\tAbstractResource templateFile = getTemplateResource(template);\n\t\t\tif (templateFile.exists()) {\n\t\t\t\tinputStream = templateFile.getInputStream();\n\t\t\t}\n\t\t}\n\n\t\treturn inputStream == null ? null : IOGroovyMethods.getText(inputStream);\n\t}\n\n\tprotected AbstractResource getTemplateResource(String template) throws IOException {\n\t\tString name = \"src/templates/scaffolding/\" + template;\n\t\tAbstractResource templateFile = new FileSystemResource(new File(basedir, name).getAbsoluteFile());\n\t\tif (!templateFile.exists()) {\n\t\t\ttemplateFile = new FileSystemResource(new File(getPluginDir(), name).getAbsoluteFile());\n\t\t}\n\n\t\treturn templateFile;\n\t}\n\n\tprotected File getPluginDir() throws IOException {\n\t\tGrailsPluginInfo info = GrailsPluginUtils.getPluginBuildSettings().getPluginInfoForName(\"scaffolding\");\n\t\treturn info.getDescriptor().getFile().getParentFile();\n\t}\n\n\tprotected boolean canWrite(File testFile) {\n\t\tif (overwrite || !testFile.exists()) {\n\t\t\treturn true;\n\t\t}\n\n\t\ttry {\n\t\t\tString relative = makeRelativeIfPossible(testFile.getAbsolutePath(), basedir);\n\t\t\tString response = GrailsConsole.getInstance().userInput(\n\t\t\t\t\t\"File \" + relative + \" already exists. Overwrite?\", new String[] { \"y\", \"n\", \"a\" });\n\t\t\toverwrite = overwrite || \"a\".equals(response);\n\t\t\treturn overwrite || \"y\".equals(response);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// failure to read from standard in means we're probably running from an automation tool like a build server\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tprotected String makeRelativeIfPossible(String fileName, String base) throws IOException {\n\t\tif (StringUtils.hasLength(base)) {\n\t\t\tfileName = StringGroovyMethods.minus(fileName, new File(base).getCanonicalPath());\n\t\t}\n\t\treturn fileName;\n\t}\n\n\tprotected Set<String> getTemplateNames() throws IOException {\n\n\t\tif (resourceLoader != null && grailsApplication.isWarDeployed()) {\n\t\t\ttry {\n\t\t\t\tPathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(resourceLoader);\n\t\t\t\treturn extractNames(resolver.getResources(\"/WEB-INF/templates/scaffolding/*.gsp\"));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\treturn Collections.emptySet();\n\t\t\t}\n\t\t}\n\n\t\tPathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();\n\t\tSet<String> resources = new HashSet<String>();\n\n\t\tString templatesDirPath = basedir + \"/src/templates/scaffolding\";\n\t\tResource templatesDir = new FileSystemResource(templatesDirPath);\n\t\tif (templatesDir.exists()) {\n\t\t\ttry {\n\t\t\t\tresources.addAll(extractNames(resolver.getResources(\"file:\" + templatesDirPath + \"/*.gsp\")));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tlog.error(\"Error while loading views from \" + basedir, e);\n\t\t\t}\n\t\t}\n\n\t\tFile pluginDir = getPluginDir();\n\t\ttry {\n\t\t\tresources.addAll(extractNames(resolver.getResources(\"file:\" + pluginDir + \"/src/templates/scaffolding/*.gsp\")));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// ignore\n\t\t\tlog.error(\"Error locating templates from \" + pluginDir + \": \" + e.getMessage(), e);\n\t\t}\n\n\t\treturn resources;\n\t}\n\n\tprotected Set<String> extractNames(Resource[] resources) {\n\t\tSet<String> names = new HashSet<String>();\n\t\tfor (Resource resource : resources) {\n\t\t\tString name = resource.getFilename();\n\t\t\tnames.add(name.substring(0, name.length() - 4));\n\t\t}\n\t\treturn names;\n\t}\n\n\tpublic void setGrailsApplication(GrailsApplication ga) {\n\t\tgrailsApplication = ga;\n\t\tObject suffix = ga.getFlatConfig().get(\"grails.scaffolding.templates.domainSuffix\");\n\t\tif (suffix instanceof CharSequence) {\n\t\t\tdomainSuffix = suffix.toString();\n\t\t}\n\t}\n\n\tpublic void setResourceLoader(ResourceLoader rl) {\n if(log.isInfoEnabled())\n\t\t log.info(\"Scaffolding template generator set to use resource loader [\"+rl+\"]\");\n\t\tresourceLoader = rl;\n\t}\n\n\tpublic void setPluginManager(GrailsPluginManager gpm) {\n\t\tpluginManager = gpm;\n\t}\n\n\tpublic void setOverwrite(boolean shouldOverwrite) {\n\t\toverwrite = shouldOverwrite;\n\t}\n}\n", "meta": {"content_hash": "8970b7709bd54fcfed5f3a9952916ba2", "timestamp": "", "source": "github", "line_count": 401, "max_line_length": 151, "avg_line_length": 34.53366583541147, "alnum_prop": 0.7154823801270942, "repo_name": "eptresmo/dbMigrationTest", "id": "e723c197e0218138ec76d778e67165fef6866c91", "size": "14445", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "dbMigrationTest/target/work/plugins/scaffolding-2.0.1/src/java/org/codehaus/groovy/grails/scaffolding/AbstractGrailsTemplateGenerator.java", "mode": "33188", "license": "apache-2.0", "language": []}}
8
+ {"text": "\ufeff// --------------------------------------------------------------------------------------------\r\n// <copyright file=\"EffortProviderFactory.cs\" company=\"Effort Team\">\r\n// Copyright (C) 2011-2014 Effort Team\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n// of this software and associated documentation files (the \"Software\"), to deal\r\n// in the Software without restriction, including without limitation the rights\r\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n// copies of the Software, and to permit persons to whom the Software is\r\n// furnished to do so, subject to the following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included in\r\n// all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n// THE SOFTWARE.\r\n// </copyright>\r\n// --------------------------------------------------------------------------------------------\r\n\r\nnamespace Effort.Provider\r\n{\r\n using System;\r\n using System.Data;\r\n using System.Data.Common;\r\n#if !EFOLD\r\n using System.Data.Entity.Core.Common;\r\n#endif\r\n\r\n /// <summary>\r\n /// Represents a set of methods for creating instances of the \r\n /// <see cref=\"N:Effort.Provider\"/> provider's implementation of the data source classes.\r\n /// </summary>\r\n public class EffortProviderFactory : DbProviderFactory, IServiceProvider\r\n {\r\n /// <summary>\r\n /// Provides a singleton instance of the <see cref=\"EffortProviderFactory\"/> class.\r\n /// </summary>\r\n public static readonly EffortProviderFactory Instance = new EffortProviderFactory();\r\n\r\n /// <summary>\r\n /// Prevents a default instance of the <see cref=\"EffortProviderFactory\" /> class\r\n /// from being created.\r\n /// </summary>\r\n private EffortProviderFactory()\r\n {\r\n }\r\n\r\n /// <summary>\r\n /// Returns a new instance of the <see cref=\"T:EffortConnection\" /> class.\r\n /// </summary>\r\n /// <returns>\r\n /// A new instance of <see cref=\"T:EffortConnection\" />.\r\n /// </returns>\r\n public override DbConnection CreateConnection()\r\n {\r\n return new EffortConnection();\r\n }\r\n\r\n /// <summary>\r\n /// Gets the service object of the specified type.\r\n /// </summary>\r\n /// <param name=\"serviceType\">\r\n /// An object that specifies the type of service object to get.\r\n /// </param>\r\n /// <returns>\r\n /// A service object of type <paramref name=\"serviceType\" />.-or- null if there is\r\n /// no service object of type <paramref name=\"serviceType\" />.\r\n /// </returns>\r\n public object GetService(Type serviceType)\r\n {\r\n if (serviceType == typeof(DbProviderServices))\r\n {\r\n return EffortProviderServices.Instance;\r\n }\r\n\r\n return null;\r\n }\r\n }\r\n}\r\n", "meta": {"content_hash": "767841cdd80110458b083c02f09c4e70", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 96, "avg_line_length": 42.023809523809526, "alnum_prop": 0.5781869688385269, "repo_name": "wertzui/effort", "id": "62bcbbc5cb1dad86155bd8a97196855269b6d236", "size": "3532", "binary": false, "copies": "3", "ref": "refs/heads/develop", "path": "Main/Source/Effort/Provider/EffortProviderFactory.cs", "mode": "33188", "license": "mit", "language": [{"name": "Batchfile", "bytes": "1104"}, {"name": "C#", "bytes": "2446943"}]}}
9
+ {"text": "import { VGrid } from '../v-grid';\nimport { BindingContextInterface, OverrideContextInterface } from '../../interfaces';\nexport declare class VGridAttributesImageFix {\n private vGrid;\n private element;\n private value;\n private bindingContext;\n private overrideContext;\n constructor(element: HTMLImageElement, vGrid: VGrid);\n valueChanged(newValue: string): void;\n bind(bindingContext: BindingContextInterface, overrideContext: OverrideContextInterface): void;\n}\n", "meta": {"content_hash": "288050943bddd389f02d6c1488f7c9da", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 99, "avg_line_length": 40.5, "alnum_prop": 0.7551440329218106, "repo_name": "vegarringdal/vGrid", "id": "7a892151b3f517aeff4464ab7de2c01ac475f8d0", "size": "486", "binary": false, "copies": "4", "ref": "refs/heads/dev-rebuild", "path": "dist/es2015/grid/attributes/v-image.d.ts", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "24447"}, {"name": "HTML", "bytes": "19771"}, {"name": "JavaScript", "bytes": "7057"}, {"name": "TypeScript", "bytes": "1639454"}]}}
10
+ {"text": "layout: page\ntitle: Cliffs Tech Executive Retreat\ndate: 2016-05-24\nauthor: Beverly Snyder\ntags: weekly links, java\nstatus: published\nsummary: Vivamus sed ligula quis mi cursus venenatis sed sed nunc.\nbanner: images/banner/people.jpg\nbooking:\n startDate: 05/29/2018\n endDate: 05/31/2018\n ctyhocn: HSTFLHX\n groupCode: CTER\npublished: true\n---\nMauris id odio eget libero fermentum egestas vel vitae ligula. Suspendisse vestibulum ipsum sem, vel ornare ex lacinia ac. Etiam a sem auctor, dignissim tellus vitae, consequat arcu. Cras rutrum lorem metus, sed lacinia nunc sollicitudin non. Praesent quam mi, aliquet ut lorem at, dictum faucibus ante. Vivamus sit amet ligula vulputate, sollicitudin arcu at, ullamcorper elit. Aenean aliquet molestie tincidunt. Nulla sed lectus diam. Donec gravida enim ut lorem blandit, sed ultricies arcu auctor. Donec odio ante, fringilla id lacus vel, sagittis dignissim elit. Duis mattis turpis tellus, at pulvinar leo commodo at. Etiam in lectus odio. Curabitur ipsum nisi, tincidunt eu ligula ac, cursus pellentesque lacus. Quisque enim sem, tempor non convallis maximus, semper id nisl. Donec eu sapien vel sapien posuere semper. Cras nisi justo, rhoncus ac urna at, cursus scelerisque libero.\n\n1 Proin bibendum tortor at ipsum commodo, vel gravida elit pretium\n1 Phasellus tincidunt lorem vitae elit ultrices, id volutpat mi fermentum\n1 Nunc interdum orci vel lobortis sodales.\n\nPraesent at risus ipsum. Morbi mattis blandit mauris, in fermentum nibh condimentum ut. In mattis risus et diam sagittis euismod. Sed vel dolor id dui dapibus viverra. Praesent efficitur ut quam et auctor. Sed venenatis convallis ex, nec vulputate est tincidunt vitae. In pulvinar faucibus odio, eu viverra tortor pharetra iaculis. Nunc cursus sagittis mauris, at blandit nisi auctor eget. Sed mollis diam eu volutpat pulvinar. In a luctus felis. Integer lobortis purus id lacus porta rutrum. Etiam sit amet lobortis magna. Nulla id libero convallis, luctus lorem ac, fermentum orci. Integer vel maximus sapien, non blandit sapien. Vivamus a tempus purus.\n", "meta": {"content_hash": "43f9f6179677a71fbbce864c5125cf6a", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 887, "avg_line_length": 94.31818181818181, "alnum_prop": 0.8043373493975904, "repo_name": "KlishGroup/prose-pogs", "id": "6f3c04ea1edb8b269359b353872dd5964911f4eb", "size": "2079", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "pogs/H/HSTFLHX/CTER/index.md", "mode": "33188", "license": "mit", "language": []}}
stackexchange_sample.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"text": "Q: How to modify non-configurable, non-writable properties in Javascript? I'm writing a simple EventEmitter is ES5.\nThe objective is to ensure that all properties on EventEmitter instances are\nnon-writable and non-configurable.\"\nAfter 6 hours of racking my brain I still can't figure out how to, increase the listenerCount, for example if the configurable descriptor is set to false.\nHere's an example of what I have:\nvar eventEmitter = function(){\n var listeners = listeners || 0;\n var events = events || {};\n\n Object.defineProperties(this, {\n listeners: {\n value : 0,\n configurable: false,\n writable: false\n },\n events: {\n value: {},\n configurable : false,\n writable: false\n }\n });\n return this;\n};\n\n\neventEmmitter.prototype.on = function(ev, cb) {\n if (typeof ev !== 'string') throw new TypeError(\"Event should be type string\", \"index.js\", 6);\n if (typeof cb !== 'function' || cb === null || cb === undefined) throw new TypeError(\"callback should be type function\", \"index.js\", 7);\n\n if (this.events[ev]){\n this.events[ev].push(cb);\n } else {\n this.events[ev] = [cb];\n }\n\n this.listeners ++;\n return this;\n};\n\n\nA: I would recommend the use of an IIFE (immediatly invoked function expression):\nvar coolObj=(function(){\nvar public={};\nvar nonpublic={};\nnonpublic.a=0;\npublic.getA=function(){nonpublic.a++;return nonpublic.a;};\n\nreturn public;\n})();\n\nNow you can do:\ncoolObj.getA();//1\ncoolObj.getA();//2\ncoolObj.a;//undefined\ncoolObj.nonpublic;//undefined\ncoolObj.nonpublic.a;//undefined\n\nI know this is not the answer youve expected, but i think its the easiest way of doing sth like that.\n\nA: You can use a proxy which requires a key in order to define properties:\n\n\nfunction createObject() {\r\n var key = {configurable: true};\r\n return [new Proxy({}, {\r\n defineProperty(target, prop, desc) {\r\n if (desc.value === key) {\r\n return Reflect.defineProperty(target, prop, key);\r\n }\r\n }\r\n }), key];\r\n}\r\nfunction func() {\r\n var [obj, key] = createObject();\r\n key.value = 0;\r\n Reflect.defineProperty(obj, \"value\", {value: key});\r\n key.value = function() {\r\n key.value = obj.value + 1;\r\n Reflect.defineProperty(obj, \"value\", {value: key});\r\n };\r\n Reflect.defineProperty(obj, \"increase\", {value: key});\r\n return obj;\r\n}\r\nvar obj = func();\r\nconsole.log(obj.value); // 0\r\ntry { obj.value = 123; } catch(err) {}\r\ntry { Object.defineProperty(obj, \"value\", {value: 123}); } catch(err) {}\r\nconsole.log(obj.value); // 0\r\nobj.increase();\r\nconsole.log(obj.value); // 1\n\n\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/41069927", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "2"}}
2
+ {"text": "Q: Image hiding under button android Image view is hiding under the button what changes I can do so that the image view can be above the button view pager also have bottom padding so that button can properly accommodate. The image is showing on the other parts but not above the button.\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <androidx.constraintlayout.widget.ConstraintLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n android:orientation=\"vertical\"\n tools:context=\".McqActivity\"\n android:id=\"@+id/fragment\"\n >\n \n <RelativeLayout\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n app:layout_constraintBottom_toBottomOf=\"parent\"\n app:layout_constraintEnd_toEndOf=\"parent\"\n app:layout_constraintStart_toStartOf=\"parent\">\n \n \n <ImageView\n android:id=\"@+id/starFirst\"\n android:layout_width=\"50dp\"\n android:layout_height=\"50dp\"\n android:src=\"@drawable/ic_baseline_star_24\"\n /> \n \n \n <com.google.android.material.button.MaterialButton\n android:id=\"@+id/right\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n />\n \n </RelativeLayout>\n \n <androidx.viewpager2.widget.ViewPager2\n android:id=\"@+id/questions_view_frag\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"0dp\"\n app:layout_constraintBottom_toBottomOf=\"parent\"\n app:layout_constraintEnd_toEndOf=\"parent\"\n app:layout_constraintHorizontal_bias=\"0.0\"\n app:layout_constraintStart_toStartOf=\"parent\"\n app:layout_constraintTop_toTopOf=\"parent\"\n app:layout_constraintVertical_bias=\"0.0\"\n android:orientation=\"horizontal\"\n android:paddingBottom=\"20dp\"\n android:paddingTop=\"50dp\"\n >\n \n </androidx.viewpager2.widget.ViewPager2>\n \n \n </androidx.constraintlayout.widget.ConstraintLayout>\n\n\nA: layout_constraintBottom_toBottomOf and other layout_constraint... won't work inside RelativeLayout, these are desired to work with ConstraintLayout as strict parent. if you want to align two Views next to/below/above inside RelativeLayoyut you have to use other attributes, e.g.\nandroid:layout_below=\"@+id/starFirst\"\nandroid:layout_above=\"@+id/starFirst\"\nandroid:layout_toRightOf=\"@id/starFirst\"\nandroid:layout_toLeftOf=\"@id/starFirst\"\n\nnote that every attr which starts with layout_ is desired to be read by strict parent, not by View which have such attrs set. every ViewGroup have own set of such\nedit: turned out that this is an elevation case/issue (Z axis), so useful attributes are\nandroid:translationZ=\"100dp\"\nandroid:elevation=\"100dp\"\n\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/70017985", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "0"}}
3
+ {"text": "Q: Handling multiple exceptions I have written a class which loads configuration objects of my application and keeps track of them so that I can easily write out changes or reload the whole configuration at once with a single method call. However, each configuration object might potentially throw an exception when doing IO, yet I do not want those errors to cancel the overall process in order to give the other objects still a chance to reload/write. Therefore I collect all exceptions which are thrown while iterating over the objects and store them in a super-exception, which is thrown after the loop, since each exception must still be handled and someone has to be notified of what exactly went wrong. However, that approach looks a bit odd to me. Someone out there with a cleaner solution? \nHere is some code of the mentioned class:\npublic synchronized void store() throws MultipleCauseException\n {\n MultipleCauseException me = new MultipleCauseException(\"unable to store some resources\");\n for(Resource resource : this.resources.values())\n {\n try\n {\n resource.store();\n }\n catch(StoreException e)\n {\n me.addCause(e);\n }\n }\n if(me.hasCauses())\n throw me;\n }\n\n\nA: If you want to keep the results of the operations, which it seems you do as you purposely carry on, then throwing an exception is the wrong thing to do. Generally you should aim not to disturb anything if you throw an exception.\nWhat I suggest is passing the exceptions, or data derived from them, to an error handling callback as you go along.\npublic interface StoreExceptionHandler {\n void handle(StoreException exc);\n}\n\npublic synchronized void store(StoreExceptionHandler excHandler) {\n for (Resource resource : this.resources.values()) {\n try {\n resource.store();\n } catch (StoreException exc) {\n excHandler.handle(exc);\n }\n }\n /* ... return normally ... */\n]\n\n\nA: There are guiding principles in designing what and when exceptions should be thrown, and the two relevant ones for this scenario are:\n\n\n*\n\n*Throw exceptions appropriate to the abstraction (i.e. the exception translation paradigm)\n\n*Throw exceptions early if possible\n\n\nThe way you translate StoreException to MultipleCauseException seems reasonable to me, although lumping different types of exception into one may not be the best idea. Unfortunately Java doesn't support generic Throwables, so perhaps the only alternative is to create a separate MultipleStoreException subclass instead.\nWith regards to throwing exceptions as early as possible (which you're NOT doing), I will say that it's okay to bend the rule in certain cases. I feel like the danger of delaying a throw is when exceptional situations nest into a chain reaction unnecessarily. Whenever possible, you want to avoid this and localize the exception to the smallest scope possible.\nIn your case, if it makes sense to conceptually think of storing of resources as multiple independent tasks, then it may be okay to \"batch process\" the exception the way you did. In other situations where the tasks has more complicated interdependency relationship, however, lumping it all together will make the task of analyzing the exceptions harder.\nIn a more abstract sense, in graph theory terms, I think it's okay to merge a node with multiple childless children into one. It's probably not okay to merge a whole big subtree, or even worse, a cyclic graph, into one node.\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/2444580", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "8"}}
4
+ {"text": "Q: What is the meaning of Duration in Amazon RDS Backup window What does Duration specify?\nDoes it mean that the backup will start between 01:00 to 01:30 and keep running until it has completed? Or does it have a different meaning?\n\n\nA: The duration window indicates the time in which the backup will start. I can start anywhere between the time specified and could last longer than the window.\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/58445170", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "-1"}}
5
+ {"text": "Q: Uncontrolled input of type text to be controlled warning I'm trying to create a multi step registration form using React and Redux.\nThe main component is as follows : \nimport React, {PropTypes} from 'react';\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux';\nimport * as actionCreators from '../../actions/actionCreators';\nimport countries from '../../data/countries';\n\nimport RegistrationFormStepOne from './registrationFormStepOne';\nimport RegistrationFormStepTwo from './registrationFormStepTwo';\nimport RegistrationFormStepThree from './registrationFormStepThree';\nimport RegistrationFormStepFour from './registrationFormStepFour';\n\nclass RegistrationPage extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n user: Object.assign({}, this.props.userData),\n fileNames: {},\n selectedFile: {},\n icons: {\n idCard: 'upload',\n statuten: 'upload',\n blankLetterhead: 'upload',\n companyPhoto: 'upload'\n },\n step: 1,\n errors: {}\n };\n\n this.setUser = this.setUser.bind(this);\n this.onButtonClick = this.onButtonClick.bind(this);\n this.onButtonPreviousClick = this.onButtonPreviousClick.bind(this);\n this.changeCheckboxState = this.changeCheckboxState.bind(this);\n this.onFileChange = this.onFileChange.bind(this);\n this.routerWillLeave = this.routerWillLeave.bind(this);\n }\n\n componentDidMount() {\n this.context.router.setRouteLeaveHook(this.props.route, this.routerWillLeave);\n }\n\n routerWillLeave(nextLocation) {\n if (this.state.step > 1) {\n this.setState({step: this.state.step - 1});\n return false;\n }\n }\n\n getCountries(){\n return countries;\n }\n\n\n setUser(event) {\n const field = event.target.name;\n const value = event.target.value;\n\n let user = this.state.user;\n user[field] = value;\n this.setState({user: user});\n\n }\n\n validation(){\n const user = this.state.user;\n const languageReg = this.props.currentLanguage.default.registrationPage;\n let formIsValid = true;\n let errors = {};\n\n if(!user.companyName){\n formIsValid = false;\n errors.companyName = languageReg.companyNameEmpty;\n }\n\n if(!user.btwNumber){\n formIsValid = false;\n errors.btwNumber = languageReg.btwNumberEmpty;\n }\n\n if(!user.address){\n formIsValid = false;\n errors.address = languageReg.addressEmpty;\n }\n\n if(!user.country){\n formIsValid = false;\n errors.country = languageReg.countryEmpty;\n }\n\n if(!user.zipcode){\n formIsValid = false;\n errors.zipcode = languageReg.zipcodeEmpty;\n }\n\n if(!user.place){\n formIsValid = false;\n errors.place = languageReg.placeEmpty;\n }\n\n\n if(!user.firstName){\n formIsValid = false;\n errors.firstName = languageReg.firstnameEmpty;\n }\n\n\n\n this.setState({errors: errors});\n return formIsValid;\n }\n\n onFileChange(name, event) {\n event.preventDefault();\n let file = event.target.value;\n\n let filename = file.split('\\\\').pop(); //We get only the name of the file\n let filenameWithoutExtension = filename.replace(/\\.[^/.]+$/, \"\"); //We get the name of the file without extension\n\n let user = this.state.user;\n let fileNames = this.state.fileNames;\n let selectedFile = this.state.selectedFile;\n let icons = this.state.icons;\n\n switch (name.btnName) {\n case \"idCard\" :\n fileNames[name.btnName] = filenameWithoutExtension;\n //Check if file is selected\n if(file){\n selectedFile[name.btnName] = \"fileSelected\";\n user[\"idCardFile\"] = true;\n icons[\"idCard\"] = \"check\";\n }else{\n selectedFile[name.btnName] = \"\";\n user[\"idCardFile\"] = false;\n icons[\"idCard\"] = \"upload\";\n }\n break;\n case \"statuten\" :\n fileNames[name.btnName] = filenameWithoutExtension;\n\n //Check if file is selected\n if(file){\n selectedFile[name.btnName] = \"fileSelected\";\n user[\"statutenFile\"] = true;\n icons[\"statuten\"] = \"check\";\n }else{\n selectedFile[name.btnName] = \"\";\n user[\"statutenFile\"] = false;\n icons[\"statuten\"] = \"upload\";\n }\n break;\n case \"blankLetterhead\" :\n fileNames[name.btnName] = filenameWithoutExtension;\n\n //Check if file is selected\n if(file){\n selectedFile[name.btnName] = \"fileSelected\";\n user[\"blankLetterheadFile\"] = true;\n icons[\"blankLetterhead\"] = \"check\";\n }else{\n selectedFile[name.btnName] = \"\";\n user[\"blankLetterheadFile\"] = false;\n icons[\"blankLetterhead\"] = \"upload\";\n }\n break;\n default:\n fileNames[name.btnName] = filenameWithoutExtension;\n //Check if file is selected\n if(file){\n selectedFile[name.btnName] = \"fileSelected\";\n user[\"companyPhotoFile\"] = true;\n icons[\"companyPhoto\"] = \"check\";\n }else{\n selectedFile[name.btnName] = \"\";\n user[\"companyPhotoFile\"] = false;\n icons[\"companyPhoto\"] = \"upload\";\n }\n }\n\n this.setState({user: user, fileNames: fileNames, selectedFile: selectedFile, icons: icons});\n }\n\n changeCheckboxState(event) {\n let chcName = event.target.name;\n let user = this.state.user;\n\n switch (chcName) {\n case \"chcEmailNotificationsYes\":\n user[\"emailNotifications\"] = event.target.checked;\n break;\n case \"chcEmailNotificationsNo\":\n user[\"emailNotifications\"] = !event.target.checked;\n break;\n case \"chcTerms\":\n if(typeof this.state.user.terms === \"undefined\"){\n user[\"terms\"] = false;\n }else{\n user[\"terms\"] = !this.state.user.terms;\n }\n\n break;\n case \"chcSmsYes\":\n user[\"smsNotifications\"] = event.target.checked;\n break;\n default:\n user[\"smsNotifications\"] = !event.target.checked;\n }\n this.setState({user: user});\n this.props.actions.userRegistration(this.state.user);\n }\n\n onButtonClick(name, event) {\n event.preventDefault();\n this.props.actions.userRegistration(this.state.user);\n switch (name) {\n case \"stepFourConfirmation\":\n this.setState({step: 1});\n break;\n case \"stepTwoNext\":\n this.setState({step: 3});\n break;\n case \"stepThreeFinish\":\n this.setState({step: 4});\n break;\n default:\n if(this.validation()) {\n this.setState({step: 2});\n }\n }\n }\n\n\n onButtonPreviousClick(){\n this.setState({step: this.state.step - 1});\n }\n\n render() {\n const languageReg = this.props.currentLanguage.default.registrationPage;\n\n console.log(this.state.user);\n let formStep = '';\n let step = this.state.step;\n switch (step) {\n case 1:\n formStep = (<RegistrationFormStepOne user={this.props.userData}\n onChange={this.setUser}\n onButtonClick={this.onButtonClick}\n countries={this.getCountries(countries)}\n errors={this.state.errors}\n step={step}/>);\n break;\n case 2:\n formStep = (<RegistrationFormStepTwo user={this.props.userData}\n onChange={this.setUser}\n onButtonClick={this.onButtonClick}\n onButtonPreviousClick={this.onButtonPreviousClick}\n errors={this.state.errors}/>);\n break;\n case 3:\n formStep = (<RegistrationFormStepThree user={this.props.userData}\n onFileChange={this.onFileChange}\n onButtonClick={this.onButtonClick}\n onButtonPreviousClick={this.onButtonPreviousClick}\n errors={this.state.errors}\n fileNames={this.state.fileNames}\n icons={this.state.icons}\n fileChosen={this.state.selectedFile}/>);\n break;\n\n default:\n formStep = (<RegistrationFormStepFour user={this.props.userData}\n onChange={this.setUser}\n onChangeCheckboxState={this.changeCheckboxState}\n onButtonClick={this.onButtonClick}\n onButtonPreviousClick={this.onButtonPreviousClick}\n errors={this.state.errors}/>);\n }\n\n return (\n <div className=\"sidebar-menu-container\" id=\"sidebar-menu-container\">\n\n <div className=\"sidebar-menu-push\">\n\n <div className=\"sidebar-menu-overlay\"></div>\n\n <div className=\"sidebar-menu-inner\">\n <div className=\"contact-form\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-10 col-md-offset-1 col-md-offset-right-1\">\n {React.cloneElement(formStep, {currentLanguage: languageReg})}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nRegistrationPage.contextTypes = {\n router: PropTypes.object\n};\n\nfunction mapStateToProps(state, ownProps) {\n return {\n userData: state.userRegistrationReducer\n };\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actionCreators, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(RegistrationPage);\n\nThe first step component is as follows\n import React from 'react';\nimport Button from '../../common/formElements/button';\nimport RegistrationFormHeader from './registrationFormHeader';\nimport TextInput from '../../common/formElements/textInput';\nimport SelectInput from '../../common/formElements/selectInput';\n\nconst RegistrationFormStepOne = ({user, onChange, onButtonClick, errors, currentLanguage, countries}) => {\n\n const language = currentLanguage;\n\n return (\n <div className=\"contact_form\">\n <form role=\"form\" action=\"\" method=\"post\" id=\"contact_form\">\n <div className=\"row\">\n <RegistrationFormHeader activeTab={0} currentLanguage={language}/>\n <div className=\"hideOnBigScreens descBox\">\n <div className=\"headerTitle\">{language.businessInfoConfig}</div>\n <div className=\"titleDesc\">{language.businessBoxDesc}</div>\n </div>\n <div className=\"col-lg-12\">\n <h6 className=\"registrationFormDesc col-lg-10 col-lg-offset-1 col-lg-offset-right-2 col-xs-12\">\n {language.businessDesc}\n </h6>\n <div className=\"clearfix\"></div>\n <div className=\"col-sm-6\">\n <TextInput\n type=\"text\"\n name=\"companyName\"\n label={language.companyNameLabel}\n labelClass=\"control-label\"\n placeholder={language.companyNameLabel}\n className=\"templateInput\"\n id=\"company\"\n onChange={onChange}\n value={user.companyName}\n errors={errors.companyName}\n />\n </div>\n <div className=\"col-sm-6\">\n <TextInput\n type=\"text\"\n name=\"btwNumber\"\n label={language.vatNumberLabel}\n placeholder={language.vatNumberLabel}\n className=\"templateInput\"\n id=\"btwNumber\"\n onChange={onChange}\n value={user.btwNumber}\n errors={errors.btwNumber}\n />\n </div>\n\n <div className=\"col-sm-12\" style={{marginBottom: 25}}>\n <TextInput\n type=\"text\"\n name=\"address\"\n label={language.addressLabel}\n placeholder={language.address1Placeholder}\n className=\"templateInput\"\n id=\"address\"\n onChange={onChange}\n value={user.address}\n errors={errors.address}\n />\n </div>\n\n <div className=\"col-sm-12\" style={{marginBottom: 25}}>\n <TextInput\n type=\"text\"\n name=\"address1\"\n placeholder={language.address2Placeholder}\n className=\"templateInput\"\n id=\"address\"\n onChange={onChange}\n value={user.address1}\n errors=\"\"\n />\n </div>\n\n <div className=\"col-sm-12\">\n <TextInput\n type=\"text\"\n name=\"address2\"\n placeholder={language.address3Placeholder}\n className=\"templateInput\"\n id=\"address\"\n onChange={onChange}\n value={user.address2}\n errors=\"\"\n />\n </div>\n\n <div className=\"col-sm-3\">\n <SelectInput name=\"country\"\n label={language.selectCountryLabel}\n onChange={onChange}\n options={countries}\n className=\"templateInput selectField\"\n defaultOption={language.selectCountry}\n value={user.country}\n errors={errors.country}\n />\n </div>\n\n <div className=\"col-sm-3\">\n\n <TextInput\n type=\"text\"\n name=\"zipcode\"\n label={language.zipcodeLabel}\n placeholder={language.zipcodeLabel}\n className=\"templateInput\"\n id=\"zipcode\"\n onChange={onChange}\n value={user.zipcode}\n errors={errors.zipcode}\n />\n </div>\n <div className=\"col-sm-6\">\n <TextInput\n type=\"text\"\n name=\"place\"\n label={language.placeLabel}\n placeholder={language.placeLabel}\n className=\"templateInput\"\n id=\"place\"\n onChange={onChange}\n value={user.place}\n errors={errors.place}\n />\n </div>\n </div>\n <div className=\"clearfix\"></div>\n <div className=\"col-lg-12\" style={{marginLeft: 15, marginTop: 30}}>\n <Button onClick={onButtonClick.bind(this)}\n name=\"stepOneNext\"\n value={language.btnNext}\n icon=\"arrow-circle-right\"\n style={{margin: '0 auto 60px'}}/>\n </div>\n </div>\n </form>\n </div>\n );\n};\n\nexport default RegistrationFormStepOne;\n\nI try to add some simple validation and I've added validation function in my main component and then I check on button click if the returned value true or false is. If it's true, than I set step state to a appropriate value. And it works if I validate only the form fields of the first step, but when I try to also validate one or more form fields of the next step (now I'm trying to validate also the first field of the second step)\nif(!user.firstName){\n formIsValid = false;\n errors.firstName = languageReg.firstnameEmpty;\n }\n\nI get than \nWarning: TextInput is changing an uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component.\nWithout the validation function works everything perfect.\nAny advice?\nEDIT\n import React, {propTypes} from 'react';\nimport _ from 'lodash';\n\nconst TextInput = ({errors, style, name, labelClass, label, className, placeholder, id, value, onChange, type}) => {\n let wrapperClass = \"form-group\";\n\n if (errors) {\n wrapperClass += \" \" + \"inputHasError\";\n }\n\n return (\n <div className={wrapperClass} style={style}>\n <label htmlFor={name} className={labelClass}>{label}</label>\n <input type={type}\n className={className}\n placeholder={placeholder}\n name={name}\n id={id}\n value={value}\n style={{}}\n onChange={onChange}\n />\n <div className=\"errorBox\">{errors}</div>\n </div>\n );\n};\n\nTextInput.propTypes = {\n name: React.PropTypes.string.isRequired,\n label: React.PropTypes.string,\n onChange: React.PropTypes.func.isRequired,\n type: React.PropTypes.string.isRequired,\n id: React.PropTypes.string,\n style: React.PropTypes.object,\n placeholder: React.PropTypes.string,\n className: React.PropTypes.string,\n labelClass: React.PropTypes.string,\n value: React.PropTypes.string,\n errors: React.PropTypes.string\n};\n\nexport default TextInput;\n\nThis is second step component : \nimport React from 'react';\nimport Button from '../../common/formElements/button';\nimport RegistrationFormHeader from './registrationFormHeader';\nimport TextInput from '../../common/formElements/textInput';\n\n\nconst RegistrationFormStepTwo = ({user, onChange, onButtonClick, onButtonPreviousClick, errors, currentLanguage}) => {\n const language = currentLanguage;\n\n return (\n <div className=\"contact_form\">\n <form role=\"form\" action=\"\" method=\"post\" id=\"contact_form\">\n <div className=\"row\">\n <RegistrationFormHeader activeTab={1} currentLanguage={language}/>\n <div className=\"hideOnBigScreens descBox\">\n <div className=\"headerTitle\">{language.personalInfoConfig}</div>\n <div className=\"titleDesc\">{language.personalBoxDesc}</div>\n </div>\n <div className=\"col-lg-12\">\n <h6 className=\"registrationFormDesc col-lg-10 col-lg-offset-1 col-lg-offset-right-2 col-xs-12\">\n {language.personalDesc}\n </h6>\n <div className=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <TextInput\n type=\"text\"\n name=\"firstName\"\n label={language.firsnameLabel}\n placeholder={language.firsnameLabel}\n className=\"templateInput\"\n id=\"name\"\n onChange={onChange}\n value={user.firstName}\n errors={errors.firstName}\n />\n </div>\n <div className=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <TextInput\n type=\"text\"\n name=\"lastName\"\n label={language.lastnameLabel}\n placeholder={language.lastnameLabel}\n className=\"templateInput\"\n id=\"name\"\n onChange={onChange}\n value={user.lastName}\n errors={errors.lastName}\n />\n </div>\n\n <div className=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <TextInput\n type=\"text\"\n name=\"phone\"\n label={language.phoneLabel}\n placeholder={language.phoneLabel}\n className=\"templateInput\"\n id=\"phone\"\n onChange={onChange}\n value={user.phone}\n errors={errors.phone}\n\n />\n </div>\n\n <div className=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <TextInput\n type=\"text\"\n name=\"mobilePhone\"\n label={language.mobileLabel}\n placeholder={language.mobileLabel}\n className=\"templateInput\"\n id=\"phone\"\n style={{}}\n onChange={onChange}\n value={user.mobilePhone}\n errors={errors.mobilePhone}\n />\n </div>\n <div className=\"clearfix\"></div>\n\n <div className=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <TextInput\n type=\"text\"\n name=\"email\"\n id=\"email\"\n label={language.emailLabel}\n placeholder={language.emailLabel}\n className=\"templateInput\"\n style={{}}\n onChange={onChange}\n value={user.email}\n errors={errors.email}\n />\n </div>\n\n <div className=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <TextInput\n type=\"text\"\n name=\"userName\"\n label={language.usernameLabel}\n placeholder={language.usernameLabel}\n className=\"templateInput\"\n id=\"name\"\n onChange={onChange}\n value={user.userName}\n errors={errors.userName}\n />\n </div>\n\n <div className=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <TextInput\n type=\"password\"\n name=\"password\"\n label={language.passwordLabel}\n placeholder={language.passwordLabel}\n className=\"templateInput\"\n id=\"password\"\n onChange={onChange}\n value={user.password}\n errors={errors.password}\n />\n </div>\n <div className=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <TextInput\n type=\"password\"\n name=\"confirmPassword\"\n label={language.passwordConfirmLabel}\n placeholder={language.passwordConfirmLabel}\n className=\"templateInput\"\n id=\"password\"\n onChange={onChange}\n value={user.confirmPassword}\n errors={errors.confirmPassword}\n />\n </div>\n\n </div>\n <div className=\"clearfix\"></div>\n <div className=\"col-lg-6 col-xs-6\" style={{marginTop: 30}}>\n <Button onClick={onButtonPreviousClick}\n name=\"btnPrevious\"\n value={language.btnPrevious}\n icon=\"arrow-circle-left\"\n style={{marginRight: 10, float: 'right'}}/>\n </div>\n <div className=\"col-lg-6 col-xs-6\" style={{marginTop: 30}}>\n <Button onClick={onButtonClick} name=\"stepTwoNext\" value={language.btnNext}\n icon=\"arrow-circle-right\" style={{marginLeft: 10, float: 'left'}}/>\n </div>\n </div>\n </form>\n </div>\n\n );\n};\n\nexport default RegistrationFormStepTwo;\n\n\nA: This is why the warning exists: When the value is specified as undefined, React has no way of knowing if you intended to render a component with an empty value or if you intended for the component to be uncontrolled. It is a source of bugs. \nYou could do a null/undefined check, before passing the value to the input.\na source\n\nA: @Kokovin Vladislav is right. To put this in code, you can do this in all your input values:\n<TextInput\n // your other code\n value={user.firstName || ''}\n/>\n\nThat is, if you don't find the value of first name, then give it an empty value.\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/38014397", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "6"}}
6
+ {"text": "Q: Interleaving the rows of two different SQL tables, group by one row My Sql query is like this\n$view = mysql_query (\"SELECT domain,count(distinct session_id) as \n views FROM `statistik` left join statistik_strippeddomains on \n statistik_strippeddomains.id = statistik.strippeddomain WHERE\n `angebote_id` = '\".(int)$_GET['id'].\"' and strippeddomain!=1 \n group by domain having count (distinct session_id) >\n \".(int)($film_daten['angebote_views']/100).\" order \n count(distinct session_id$vladd) desc limit 25\");\n\nHow can I write its Codeigniter Model I appreciate any Help\n\nA: try this\n$this->db->select('statistik.domain,statistik.count(DISTINCT(session_id)) as views');\n$this->db->from('statistik');\n$this->db->join('statistik_strippeddomains', 'statistik_strippeddomains.id = statistik.strippeddomain', 'left'); \n$this->db->where('angebote_id',$_GET['id']);\n$this->db->where('strippeddomain !=',1);\n$this->db->group_by('domain');\n$this->db->having('count > '.$film_daten['angebote_views']/100, NULL, FALSE);\n$this->db->order_by('count','desc');\n$this->db->limit('25');\n$query = $this->db->get();\n\nComment me If you have any query.\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/39852573", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "0"}}
7
+ {"text": "Q: Query conditions to insert data from a form What I'm trying to do is: \nIf the age input in my form = 28, 30, 25 or 21 then I want to auto insert value 8 in the column (VE), else keep it empty. Is this the right way to do that?\nif($form_data->action == 'Insert')\n {\n\n $age=array(28, 30, 25, 21);\n $age_str=implode(\"','\", $age);\n\n if($form_data->age == $age_str){\n\n $query=\"INSERT INTO tbl\n (VE) VALUE ('8') WHERE id= '\".$form_data->id.\"'\n \";\n $statement = $connect->prepare($query);\n $statement->execute();\n }\n $data = array(\n ':date' => $date,\n ':first_name' => $first_name,\n ':last_name' => $last_name,\n ':age' => $age\n );\n $query = \"\n INSERT INTO tbl\n (date, first_name, last_name, age) VALUES \n (:date, :first_name, :last_name, :age)\n \";\n $statement = $connect->prepare($query);\n\n\n if($statement->execute($data))\n {\n $message = 'Data Inserted';\n }\n }\n\n\n\nAlso, how do I insert the new row with the row id from the other form data going into tbl?\n\nA: Use php's in_array instead of trying to compare a string. To get the id of the query where you insert the form data, you can return the id of the insert row from your prepared statement.\nif ($form_data->action == 'Insert') {\n\n // assuming $age, $date, $first_name, $last_name\n // already declared prior to this block\n $data = array(\n ':date' => $date,\n ':first_name' => $first_name,\n ':last_name' => $last_name,\n ':age' => $age\n );\n\n $query = \"\n INSERT INTO tbl\n (date, first_name, last_name, age) VALUES \n (:date, :first_name, :last_name, :age)\n \";\n $statement = $connect->prepare($query);\n\n if ($statement->execute($data)) {\n $message = 'Data Inserted';\n\n // $id is the last inserted id for (tbl)\n $id = $connect->lastInsertID();\n\n // NOW you can insert your child row in the other table\n $ages_to_insert = array(28, 30, 25, 21);\n\n // in_array uses your array...so you don't need\n // if($form_data->age == $age_str){\n\n if (in_array($form_data->age, $ages_to_insert)) {\n\n $query=\"UPDATE tbl SER VE = '8' WHERE id= '\".$id.\"'\";\n $statement2 = $connect->prepare($query);\n $statement2->execute();\n }\n }\n}\n\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/58903757", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "1"}}
8
+ {"text": "Q: Is the function $\\ln(ax + b)$ increasing/decreasing, concave/convex? $h(x) = \\ln(ax + b)$ \nNB. Examine your results acccording to values of $(a,b)$\nI've differentiated twice in order to get the following:\n$$\nh''(x) = -\\frac{a^2}{(ax+b)^2}\n$$\nI think this proves that $h(x)$ is concave for all value of $a$ and $b$ since $h''(x)\\le0$. Is this correct?\nI don't know how to prove whether it's increasing/decreasing or what the NB really means so any help with that would be great.\n\nA: we now that the domain of the function is:\n$$ax+b\\gt 0\\Rightarrow x\\gt\\frac{-b}{a}\\text{so the domain is:}(\\frac{-b}{a},+\\infty)$$\n$$f'(x)=\\frac{a}{ax+b}$$\nin the domain of the function since we have $x\\gt\\frac{-b}{a}\\Rightarrow ax+b>0 $ the sign of $f'(x)=\\frac{a}{ax+b}$ will be dependent to the sign of $a$ so:\nif $a\\gt 0\\Rightarrow f'(x)\\gt 0$ and $f(x)$ will be increasing in its domain\nif $a\\lt 0\\Rightarrow f'(x)\\lt 0$ and $f(x)$ will be decreasing in its domain\nNote the phrases in its domain in the above expression, we always study the behaviors of functions in their domain\n$$f''(x)=\\frac{-a^2}{(ax+b)^2}$$\nas you said without we always have $f''(x)<0$ so without considering the sign of $a$, $f(x)$ will be a convex function\nThe value of $b$ doesnot influence the first and second derivation and so will not affect concavity, convexity, increase or decrease of the function \nhere is the diagram for $f(x)=\\ln(2x+1)$ as you see $a=2\\gt 0$ and $f(x)$ is increasing and convex\n \nhere is the diagram for $f(x)=\\ln(-2x+1)$ as you see $a=-2\\lt 0$ and $f(x)$ is decreasing and convex\n\n\nA: $$h^{ \\prime }\\left( x \\right) =\\frac { a }{ ax+b } >0$$\n$1$.if $a>0$ $ax+b>0$ $\\Rightarrow $ $ax>-b$ $\\Rightarrow $ $x>-\\frac { b }{ a } $ function is increasing\n$2$.if $a<0 $ $x<-\\frac { b }{ a } $ function is decreasing\nAnd about concavity you are right,find second derivative and check intervals\n", "meta": {"language": "en", "url": "https://math.stackexchange.com/questions/1400530", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "1"}}
9
+ {"text": "Q: Accessing array value is null Hello I have decoded a json string that I sent to my server and Im trying to get the values from him.\nMy problem is that I cant get the values from the inner arrays.\nThis is my code:\n<?php\n\n $post = file_get_contents('php://input');\n\n $arrayBig = json_decode($post, true);\n\n foreach ($arrayBig as $array)\n {\n\n\n $exercise = $array['exercise'];\n\n $response[\"exercise\"] = $exercise;\n $response[\"array\"] = $array;\n\n echo json_encode($response);\n\n\n }\n\n?>\n\nWhen I get the answer from my $response I get this values:\n{\"exercise\":null,\"array\":[{\"exercise\":\"foo\",\"reps\":\"foo\"}]}\n\nWhy is $array['exercise'] null if I can see that is not null in the array\nThanks.\n\nA: Because of the [{...}] you are getting an array in an array when you decode your array key.\nSo:\n$exercise = $array['exercise'];\n\nShould be:\n$exercise = $array[0]['exercise'];\n\nSee the example here.\n\nA: From looking at the result of $response['array'], it looks like $array is actually this\n[['exercise' => 'foo', 'reps' => 'foo']]\n\nthat is, an associative array nested within a numeric one. You should probably do some value checking before blindly assigning values but in the interest of brevity...\n$exercise = $array[0]['exercise'];\n\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/21893968", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "1"}}
10
+ {"text": "Q: Composer update show this error: VirtualAlloc() failed: [0x00000008] Composer worked find yesterday, but today after I trying install:\ncomposer require --prefer-dist \"himiklab/yii2-recaptcha-widget\" \"*\"\nWhile run composer update command it show me error:\n\nVirtualAlloc() failed: [0x00000008] VirtualAlloc() failed:\n[0x00000008] PHP Fatal error: Out of memory (allocated 956301312)\n(tried to allocate 201326600 bytes) in\nphar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php\non line 84\nFatal error: Out of memory (allocated 956301312) (tried to allocate\n201326600 bytes) in\nphar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php\non line 84\n\nI try update composer on my other projects, it is worked fine. After some researching I increased memory_limit: 4096M(also -1) in php.ini file. Then I tried to increase virtual memory in Computer->Properties, but still show error.\nI try to run next command:\ncomposer update -vvv --profile, result in attached image\nComposer error\nAny help would be greatly appreciated.\n\nA: You are probably using 32bit PHP. This version cannot allocate enough memory for composer even if you change the memory_limit to -1 (unlimited).\nPlease use 64 bit PHP with the Composer to get rid of these memory problems.\n", "meta": {"language": "en", "url": "https://stackoverflow.com/questions/49994946", "timestamp": "2023-03-29", "source": "stackexchange", "question_score": "2"}}
wikipedia_sample.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"text": "\u041b\u0443\u0435\u0301\u0440\u0440 ()\u00a0\u2014 \u043a\u043e\u043b\u0438\u0448\u043d\u0456\u0439 \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442 \u0443 \u0424\u0440\u0430\u043d\u0446\u0456\u0457, \u0443 \u0440\u0435\u0433\u0456\u043e\u043d\u0456 \u041f\u0435\u0457-\u0434\u0435-\u043b\u0430-\u041b\u0443\u0430\u0440, \u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442 \u041c\u0435\u043d \u0456 \u041b\u0443\u0430\u0440\u0430. \u041d\u0430\u0441\u0435\u043b\u0435\u043d\u043d\u044f\u00a0\u2014 \u043e\u0441\u0456\u0431 (2011).\n\n\u041c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442 \u0431\u0443\u0432 \u0440\u043e\u0437\u0442\u0430\u0448\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 \u0432\u0456\u0434\u0441\u0442\u0430\u043d\u0456 \u0431\u043b\u0438\u0437\u044c\u043a\u043e 270 \u043a\u043c \u043d\u0430 \u043f\u0456\u0432\u0434\u0435\u043d\u043d\u0438\u0439 \u0437\u0430\u0445\u0456\u0434 \u0432\u0456\u0434 \u041f\u0430\u0440\u0438\u0436\u0430, 95 \u043a\u043c \u043d\u0430 \u0441\u0445\u0456\u0434 \u0432\u0456\u0434 \u041d\u0430\u043d\u0442\u0430, 27 \u043a\u043c \u043d\u0430 \u043f\u0456\u0432\u0434\u0435\u043d\u043d\u0438\u0439 \u0441\u0445\u0456\u0434 \u0432\u0456\u0434 \u0410\u043d\u0436\u0435.\n\n\u0406\u0441\u0442\u043e\u0440\u0456\u044f \n\n1 \u0441\u0456\u0447\u043d\u044f 2016 \u0440\u043e\u043a\u0443 \u041b\u0443\u0435\u0440\u0440, \u0410\u043c\u0431\u0456\u044e-\u0428\u0430\u0442\u043e i \u041d\u0443\u0430\u044f\u043d-\u043b\u0430-\u041f\u043b\u0435\u043d \u0431\u0443\u043b\u043e \u043e\u0431'\u0454\u0434\u043d\u0430\u043d\u043e \u0432 \u043d\u043e\u0432\u0438\u0439 \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442 \u0422\u044e\u0444\u0444\u0430\u043b\u0435\u043d.\n\n\u0414\u0435\u043c\u043e\u0433\u0440\u0430\u0444\u0456\u044f \n\n\u0420\u043e\u0437\u043f\u043e\u0434\u0456\u043b \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u043d\u044f \u0437\u0430 \u0432\u0456\u043a\u043e\u043c \u0442\u0430 \u0441\u0442\u0430\u0442\u0442\u044e (2006):\n\n\u0415\u043a\u043e\u043d\u043e\u043c\u0456\u043a\u0430 \n\n\u0423 2010 \u0440\u043e\u0446\u0456 \u0432 \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442\u0456 \u0447\u0438\u0441\u043b\u0438\u043b\u043e\u0441\u044c 182 \u043e\u043f\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0430\u043d\u0456 \u0434\u043e\u043c\u043e\u0433\u043e\u0441\u043f\u043e\u0434\u0430\u0440\u0441\u0442\u0432\u0430, \u0443 \u044f\u043a\u0438\u0445 \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u043b\u0438 464,0 \u043e\u0441\u043e\u0431\u0438, \u043c\u0435\u0434\u0456\u0430\u043d\u0430 \u0434\u043e\u0445\u043e\u0434\u0456\u0432 \u0432\u0438\u043d\u043e\u0441\u0438\u043b\u0430 \u0454\u0432\u0440\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0441\u043e\u0431\u043e\u0441\u043f\u043e\u0436\u0438\u0432\u0430\u0447\u0430\n\n\u0413\u0430\u043b\u0435\u0440\u0435\u044f \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c\n\n\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \n\n [ \u0420\u043e\u0437\u0442\u0430\u0448\u0443\u0432\u0430\u043d\u043d\u044f \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442\u0443 \u041b\u0443\u0435\u0440\u0440 \u043d\u0430 \u043c\u0430\u043f\u0456 \u0424\u0440\u0430\u043d\u0446\u0456\u0457 \u0442\u0430 \u0441\u0443\u0441\u0456\u0434\u043d\u0456 \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442\u0438]\n\n\u0414\u0438\u0432. \u0442\u0430\u043a\u043e\u0436 \n \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442\u0456\u0432 \u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u0443 \u041c\u0435\u043d \u0456 \u041b\u0443\u0430\u0440\u0430\n\n\u041f\u0440\u0438\u043c\u0456\u0442\u043a\u0438 \n\n\u041a\u043e\u043b\u0438\u0448\u043d\u0456 \u043c\u0443\u043d\u0456\u0446\u0438\u043f\u0430\u043b\u0456\u0442\u0435\u0442\u0438 \u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u0443 \u041c\u0435\u043d \u0456 \u041b\u0443\u0430\u0440\u0430", "meta": {"title": "\u041b\u0443\u0435\u0440\u0440", "url": "https://uk.wikipedia.org/wiki/%D0%9B%D1%83%D0%B5%D1%80%D1%80", "language": "uk", "timestamp": "20230320"}}
2
+ {"text": "Coat-M\u00e9al (en bret\u00f3 Koz-Meal) \u00e9s un municipi franc\u00e8s, situat a la regi\u00f3 de Bretanya, al departament de Finisterre. L'any 2006 tenia 934\u00a0habitants. El consell municipal ha aprovat la carta Ya d'ar brezhoneg.\n\nDemografia\n\nAdministraci\u00f3\n\nRefer\u00e8ncies \n\nMunicipis del districte de Brest", "meta": {"title": "Coat-M\u00e9al", "url": "https://ca.wikipedia.org/wiki/Coat-M%C3%A9al", "language": "ca", "timestamp": "20230320"}}
3
+ {"text": "Tenzin Tsundue is een Tibetaans dichter, schrijver en activist. In 2001 won hij de eerste Outlook-Picador Award voor non-fictie. Hij publiceerde drie boeken die werden vertaald in andere talen.\n\nAchtergrond\nZijn ouders ontvluchtten Tibet tijdens de Tibetaanse diaspora. Bij aankomst in India in 1959 werkten ze eerst in de wegenbouw van bergwegen in Masumari, Bir, Kullu en Manali. Honderden Tibetanen die naar India vluchtten kwamen in de eerste tijd om, omdat ze de hitte van de zomer en de vochtigheid van de moesson niet konden verdragen. Het kamp van de wegenbouw trok verder en ergens onderweg werd Tenzin Tsundue langs de kant van de weg geboren in een noodtent. Zijn geboortedatum is niet bevestigd en er bestaan drie verschillende registraties van. Hij ging naar school in Dharamsala en ging naar de universiteiten van Chennai en Mumbai.\n\nWerk\nZijn eerste boek, Crossing the Border, gaf hij uit met behulp van geld dat hij van medestudenten gekregen en geleend had, terwijl hij zijn voor zijn master studeerde aan de Universiteit van Mumbai. In 2001 won hij de eerste Outlook-Picador Award voor non-fictie. Zijn tweede boek Kora werd vertaald naar het Frans en Malayalam. Zijn derde boek, Semshook, is een compilatie van essays over de Tibetaanse vrijheidsbeweging. In 2005 vertegenwoordigde hij Tibet in New Delhi tijdens de tweede Zuid-Aziatische literatuurconferentie.\n\nMedia\nTenzin Tsundue wordt vaak gezien als een opinieleider binnen de Tibetaanse gemeenschap in ballingschap. Geschriften van Tenzin Tsundue verschijnen geregeld in Indiase en internationale tijdschriften en andere media. Hij schreef onder ander voor The International PEN, The Indian PEN, Sahitya Akademi\u2019s Indian Literature, The Little Magazine, Outlook, The Times of India, The Indian Express, Hindustan Times, Better Photography, The Economic Times, Tehelka, The Daily Star (Bangladesh), Today (Singapore), Tibetan Review en Gandhi Marg. In 2002 noemde de Indiase editie van het modeblad Elle hem een van de 50 best geklede mannen van India. Hij is onder meer te zien in de documentaire Tibet: 50 Years After the Fall uit 2009 van het regisseursduo Ritu Sarin en Tenzin S\u00f6nam.\n\nActivisme\n\nVanaf zijn studietijd was Tenzin Tsundue een voorvechter van de onafhankelijkheid van Tibet. Januari 2002 kreeg hij internationale aandacht van de media, omdat hij een banier uitrolde op de veertiende verdieping van het vijfsterrenhotel in Mumbai, toen de Chinese premier Zhu Rongji binnen was. April 2005 herhaalde hij dezelfde stunt, toen premier Wen Jiabao Bangalore bezocht. Hier ontrolde hij een grote rode banier met de tekst Free Tibet terwijl hij riep: \"Wen Jiaboa, you cannot silence us.\"\n\nTenzin Tsundue bracht Indiase bestuurders in verlegenheid en de Indiase politie gelastte hem Dharamsala niet te verlaten tijdens het bezoek van de Chinese president Hu Jintao aan India in november 2006. Sinds 2000 draagt hij een rode band om zijn hoofd waarmee hij wil uitdrukken dat hij werkt aan de vrijheid van zijn land en die hij niet eerder af wil doen dan Tibet vrij is.\n\nUitspraken\nIk ben een verknocht gelover in geweldloosheid.\nWe zijn bereid om te sterven, maar niet bereid om te doden.\nVrijheidsstrijd is mijn leven\n\nBibliografie\nTsundue, Tenzin & Woeser & Jampa & Bhuchung D Sonam & Jane Perkins (2006) Nyima Tsering's Tears\n?: Crossing the Border\n2007: Semshook\n2008: Kora\n\nTibetaans activist\nTibetaans schrijver", "meta": {"title": "Tenzin Tsundue", "url": "https://nl.wikipedia.org/wiki/Tenzin%20Tsundue", "language": "nl", "timestamp": "20230320"}}
4
+ {"text": "Kristian Hovde (6 December 1903 \u2013 19 August 1969) was a Norwegian cross-country skier who competed in the late 1920s in the early 1930s.\n\nHe was born in Vikersund.\n\nHovde won a silver in the 18\u00a0km event at the 1931 FIS Nordic World Ski Championships.\n\nAt the 1932 Winter Olympics he finished 13th in the 18 km cross-country skiing event.\n\nCross-country skiing results\nAll results are sourced from the International Ski Federation (FIS).\n\nOlympic Games\n\nWorld Championships\n 1 medal \u2013 (1 silver)\n\nReferences\n\nExternal links\n\n1903 births\nNorwegian male cross-country skiers\nOlympic cross-country skiers of Norway\nCross-country skiers at the 1932 Winter Olympics\n1969 deaths\nFIS Nordic World Ski Championships medalists in cross-country skiing\nPeople from Modum\nSportspeople from Viken (county)\n20th-century Norwegian people", "meta": {"title": "Kristian Hovde", "url": "https://en.wikipedia.org/wiki/Kristian%20Hovde", "language": "en", "timestamp": "20230320"}}
5
+ {"text": "\u041f\u043e\u043b \u041a\u0430\u0433\u0430\u043c\u0435 () \u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u043e\u0442 \u0420\u0443\u0430\u043d\u0434\u0430 \u0438 \u0431\u0438\u0432\u0448 \u0432\u043e\u0435\u043d\u0435\u043d \u043b\u0438\u0434\u0435\u0440. \u0422\u043e\u0439 \u0435 \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442 \u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430, \u0441\u043b\u0435\u0434 \u043a\u0430\u0442\u043e \u043f\u043e\u0435 \u043f\u043e\u0441\u0442\u0430 \u0441\u0438 \u043f\u0440\u0435\u0437 2000 \u0433., \u043a\u043e\u0433\u0430\u0442\u043e \u043d\u0435\u0433\u043e\u0432\u0438\u044f\u0442 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u0438\u043a \u041f\u0430\u0441\u0442\u044c\u043e\u0440 \u0411\u0438\u0437\u0438\u043c\u0443\u043d\u0433\u0443 \u043f\u043e\u0434\u0430\u0434\u0435 \u043e\u0441\u0442\u0430\u0432\u043a\u0430. \u041a\u0430\u0433\u0430\u043c\u0435 \u043f\u0440\u0435\u0434\u0438 \u0442\u043e\u0432\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0432\u0430 \u0431\u0443\u043d\u0442\u043e\u0432\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0442\u0435 \u0441\u0438\u043b\u0438, \u043a\u043e\u0438\u0442\u043e \u0441\u043b\u0430\u0433\u0430\u0442 \u043a\u0440\u0430\u0439 \u043d\u0430 \u0433\u0435\u043d\u043e\u0446\u0438\u0434\u0430 \u0432 \u0420\u0443\u0430\u043d\u0434\u0430 \u043f\u0440\u0435\u0437 1994 \u0433\u043e\u0434\u0438\u043d\u0430. \u0422\u043e\u0439 \u0435 \u0441\u0447\u0438\u0442\u0430\u043d \u0437\u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0438\u0434\u0435\u0440 \u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430, \u043a\u043e\u0433\u0430\u0442\u043e \u0435 \u0431\u0438\u043b \u0432\u0438\u0446\u0435\u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442 \u0438 \u043c\u0438\u043d\u0438\u0441\u0442\u044a\u0440 \u043d\u0430 \u043e\u0442\u0431\u0440\u0430\u043d\u0430\u0442\u0430 \u043e\u0442 1994 \u0434\u043e 2000 \u0433. \u0422\u043e\u0439 \u0435 \u043f\u0440\u0435\u0438\u0437\u0431\u0440\u0430\u043d \u043f\u0440\u0435\u0437 \u0430\u0432\u0433\u0443\u0441\u0442 2017 \u0433. \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u0435\u043d \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442 \u043e\u0442 \u043f\u043e\u0447\u0442\u0438 99% \u043d\u0430 \u0438\u0437\u0431\u043e\u0440\u0438\u0442\u0435, \u043a\u0440\u0438\u0442\u0438\u043a\u0443\u0432\u0430\u043d\u0438 \u0437\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u0438. \u0422\u043e\u0439 \u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043a\u0430\u0442\u043e \u201e\u043d\u0430\u0439-\u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0432\u0430\u0449\u201c \u0438 \u201e\u0441\u0440\u0435\u0434 \u043d\u0430\u0439-\u0440\u0435\u043f\u0440\u0435\u0441\u0438\u0432\u043d\u0438\u0442\u0435\u201c \u0430\u0444\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438 \u043b\u0438\u0434\u0435\u0440\u0438.\n\n\u0411\u0438\u043e\u0433\u0440\u0430\u0444\u0438\u044f \n\u041a\u0430\u0433\u0430\u043c\u0435 \u0435 \u0440\u043e\u0434\u0435\u043d \u0432 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0442\u0443\u0442\u0441\u0438 \u0432 \u042e\u0436\u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430. \u041a\u043e\u0433\u0430\u0442\u043e \u0435 \u043d\u0430 \u0434\u0432\u0435 \u0433\u043e\u0434\u0438\u043d\u0438, \u0420\u0443\u0430\u043d\u0434\u0438\u0439\u0441\u043a\u0430\u0442\u0430 \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0437\u0430\u0432\u044a\u0440\u0448\u0432\u0430 \u0432\u0435\u043a\u043e\u0432\u0435\u0442\u0435 \u043d\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e \u0433\u043e\u0441\u043f\u043e\u0434\u0441\u0442\u0432\u043e \u043d\u0430 \u0442\u0443\u0442\u0441\u0438; \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043c\u0443 \u0431\u044f\u0433\u0430 \u0432 \u0423\u0433\u0430\u043d\u0434\u0430, \u043a\u044a\u0434\u0435\u0442\u043e \u043f\u0440\u0435\u043a\u0430\u0440\u0430 \u043e\u0441\u0442\u0430\u0442\u044a\u043a\u0430 \u043e\u0442 \u0434\u0435\u0442\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438. \u041f\u0440\u0435\u0437 80-\u0442\u0435 \u0433\u043e\u0434\u0438\u043d\u0438 \u041a\u0430\u0433\u0430\u043c\u0435 \u0441\u0435 \u0431\u0438\u0435 \u0432 \u0431\u0443\u043d\u0442\u043e\u0432\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u0442\u0430 \u0430\u0440\u043c\u0438\u044f \u043d\u0430 \u0419\u043e\u0432\u0435\u0440\u0438 \u041c\u0443\u0441\u0435\u0432\u0435\u043d\u0438, \u0441\u0442\u0430\u0432\u0430\u0439\u043a\u0438 \u0441\u0442\u0430\u0440\u0448\u0438 \u043e\u0444\u0438\u0446\u0435\u0440 \u043e\u0442 \u0430\u0440\u043c\u0438\u044f\u0442\u0430 \u043d\u0430 \u0423\u0433\u0430\u043d\u0434\u0430, \u0441\u043b\u0435\u0434 \u043a\u0430\u0442\u043e \u0432\u043e\u0435\u043d\u043d\u0438\u0442\u0435 \u043f\u043e\u0431\u0435\u0434\u0438 \u043d\u0430 \u041c\u0443\u0441\u0435\u0432\u0435\u043d\u0438 \u0433\u043e \u0434\u043e\u0432\u0435\u0436\u0434\u0430\u0442 \u0434\u043e \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0430 \u0423\u0433\u0430\u043d\u0434\u0430. \u041a\u0430\u0433\u0430\u043c\u0435 \u0441\u0435 \u043f\u0440\u0438\u0441\u044a\u0435\u0434\u0438\u043d\u044f\u0432\u0430 \u043a\u044a\u043c \u041f\u0430\u0442\u0440\u0438\u043e\u0442\u0438\u0447\u043d\u0438\u044f \u0444\u0440\u043e\u043d\u0442 \u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430 (RPF), \u043a\u043e\u0439\u0442\u043e \u043d\u0430\u0445\u043b\u0443\u0432\u0430 \u0432 \u0420\u0443\u0430\u043d\u0434\u0430 \u043f\u0440\u0435\u0437 1990 \u0433\u043e\u0434\u0438\u043d\u0430. \u041a\u0430\u0433\u0430\u043c\u0435 \u0435 \u0436\u0435\u043d\u0435\u043d \u0438 \u0438\u043c\u0430 \u0447\u0435\u0442\u0438\u0440\u0438 \u0434\u0435\u0446\u0430.\n\n\u041f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430 \u043a\u0430\u0440\u0438\u0435\u0440\u0430 \n\u0411\u0438\u043b \u0435 \u043c\u0438\u043d\u0438\u0441\u0442\u044a\u0440 \u043d\u0430 \u043e\u0442\u0431\u0440\u0430\u043d\u0430\u0442\u0430 \u043e\u0442 1994 \u0434\u043e 2000 \u0433. \u041f\u0440\u0435\u0437 \u0442\u043e\u0437\u0438 \u043f\u0435\u0440\u0438\u043e\u0434 \u0435 \u0431\u0438\u043b \u0441\u044a\u0449\u043e \u0432\u0438\u0446\u0435\u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442 \u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430. \u041e\u0442 2018 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u043e\u0442\u043e \u043d\u0430 2019 \u0435 \u043f\u0440\u0435\u0434\u0441\u0435\u0434\u0430\u0442\u0435\u043b \u043d\u0430 \u0410\u0444\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u044f \u0441\u044a\u044e\u0437. \u041e\u0442 2000 \u0434\u043e \u0434\u043d\u0435\u0441 \u0435 \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442 \u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430.\n\n\u041d\u0430\u0433\u0440\u0430\u0434\u0438 \n \u041e\u0440\u0434\u0435\u043d \u041c\u0443\u0445\u0430\u043c\u0430\u0434\u0438\u044f (\u041c\u0430\u0440\u043e\u043a\u043e, 21.06.2016)\n\n\u0418\u0437\u0442\u043e\u0447\u043d\u0438\u0446\u0438 \n\n\u041f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0438\n\u0420\u0443\u0430\u043d\u0434\u0438\u0439\u0446\u0438\n\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043d\u0430 \u0420\u0443\u0430\u043d\u0434\u0430", "meta": {"title": "\u041f\u043e\u043b \u041a\u0430\u0433\u0430\u043c\u0435", "url": "https://bg.wikipedia.org/wiki/%D0%9F%D0%BE%D0%BB%20%D0%9A%D0%B0%D0%B3%D0%B0%D0%BC%D0%B5", "language": "bg", "timestamp": "20230320"}}
6
+ {"text": "Cochliomyia macellaria, also known as the secondary screwworm, is a species of blow fly in the family Calliphoridae. These screwworms are referred to as \"secondary\" because they typically infest wounds after invasion by primary myiasis-causing flies. While blow flies may be found in every terrestrial habitat, C. macellaria is primarily found in the United States, American tropics, and sometimes southern Canada. They are most common in the southeastern United States in states like Florida. C. macellaria have a metallic greenish-blue thorax and a red-orange head and eyes. These adult blowflies range from 5\u20138\u00a0mm in size. \n\nSince the fly larvae infect the wounds and dead tissue of animals, these flies pose a grave medical and economic risk to humans and livestock. C. macellaria are attracted to carrion and garbage and are often found in slaughterhouses and outdoor markets in the tropics. While these flies carry many various types of Salmonella and viruses like the swine influenza, C. macellaria can also serve as important decomposers in our ecosystem.\n\nDescription\nCochliomyia macellaria are classified as intermediate sized flies with a dull or bright metallic, blue-green coloration. On their thorax, there are three black longitudinal stripes that interrupt the blue-green color. The eye and head of these flies are orange-red in color. C. macellaria also has pale setae on the fronto-orbital plate outside of the frontal bristles. On C. macellaria the frontal row of bristles extend anteriorly to the base of the first antennal segment and consist of 12-14 bristles. The legs of the fly are orange brown to dark brown, and the coxae are orange brown to black with a green metallic luster. C. macellaria possess a dark reddish brown anterior femur and an orange-red anterior tibia. The anterior tibia also has four short bristles that are placed on the dorsal side. The color of the wings of the fly is orange brown tint towards the base. On these wings, the veins in the fly are orange brown to dark brown. The costal sessions 2 to 6 are in the proportions 78:56:96:30:6:6. The first genital section is black with a metallic green luster. On the fly, the scattered setae and a defined marginal row of bristles; the second segment is smaller with a dark brown to black tint with scattered setae.\n\nDistinguishing features\nCochliomyia macellaria is closely related to C. hominivorax but can be distinguished from C. hominivorax in three primarily ways: two of which are seen in adults and one which is seen in the larvae. In adults, the hairs on the fronto-orbital plate are black in C. hominivorax, but are pale in C. macellaria. Additionally, the central black stripe on the thorax extends only slightly in front of the mesonotal suture in C. hominivorax and well in front of the suture in C. macellaria. C. macellaria larvae, unlike like C. hominivorax larvae, do not have pigmented tracheal trunks but instead have V-shaped spines on the anal protuberance. C. macellaria also does not have an oral sclerite.\n\nDistribution and territory\nCochliomyia macellaria is most often found in the southeastern part of the United States, in states like Florida, Louisiana, and Georgia. Despite the high concentration in these states, these flies have been found as far north as Southern Canada and as south as the Neotropics, with the exclusion of countries like Chile and Argentina. While they have been found in this large expanse of areas, they have been shown to thrive most in warm and humid areas like the Southern United States, Caribbean Islands, Central America, and northern South America. In these areas, the population size typically increases during periods of extended rainfall.\n\nThe territories of these blowflies are relatively small, especially during the time of mating. In this period, these flies will stay within a couple meters of one another.\n\nLife cycle and history\n\nThe average life span of an adult C. macellaria is 2\u20136 weeks. In this time period, the females try to increase the chances of producing as many surviving offspring as possible. In a lifetime, C. macellaria may lay up to 1000 or more eggs. These eggs are typically laid in groups of 40 to 250. Females may also lay their eggs with other females, leading to an accumulation of thousands of eggs.\n\nEggs\nThe eggs of C. macellaria are laid in large groups (40\u2013250 eggs at one time) and typically hatch in about 24 hours. The time taken for eggs to hatch often depends on moisture, temperature, and precipitation. In favorable conditions, the eggs may hatch in just four hours. These eggs are about 1\u00a0mm long and appear white to pearl white in color.\n\nLarvae\nThe larval stage of C. macellaria is referred to by the common name of secondary screwworms; this is due to the presence of small spines on each body segment that resemble parts of a screw. The larval stage of C. macellaria immediately follows the egg stage and is typically broken down into three substages or instars. Upon hatching, the larve appear a cream color, have cylindrical bodies with 10 or more spines around the spiracular area, possess incomplete peritremes (an indistinct or absent button), and have bands of small spines on each segment. C. macellaria, unlike like C. hominivorax, do not have pigmented tracheal trunks; instead, they have V-shaped spines on the anal protuberance. C. macellaria also does not have an oral sclerite.\n\nCochliomyia macellaria larvae will feed on the decaying flesh of the animal that they have been laid on until they reach maturity. This stage of maturity is during the third instar and by this time point, the larvae may be as long as 17\u00a0mm. The entire larval stage is about four to seven days long, and afterwards, the larvae fall off the food source to pupate in the top layer of the soil.\n\nPupae\nThe C. macellaria larvae will typically burrow underneath the top layer of soil, leaves, garbage and begin to pupate there. During this stage, the outer layer begins to turn brown from the cream white that it used to be. The outer skin will begin to shrink and harden while the pupa develops entirely in the hardened shell. Based on the temperature, the length of this stage will vary greatly. In warmer temperatures, the stage may last as short as seven days, but in colder temperatures, it may last as long as two months.\n\nAdults\nAdult C. macellaria are considered to be medium-sized flies because they are about 6 to 9\u00a0mm in size and appear bright metallic blue-green to blueish purple in color. These adults typically spend one to two days maturing after leaving the pupae stage. Within four days of emerging from the pupa stage, the adult C. macellaria become sexually mature and start looking for mates. The males will typically mate rapidly and will spend most of their time eating nearby vegetation and nectar from flowers. The females, on the other hand, will feed on the fluids of live wounds from animals. Contrary to the males, the females will travel long distances to find mates.\n\nFood resources\n\nDepending on the gender and stage in their development, C. macellaria will utilize different resources for energy and nutrients. During the larval stage, the C. macellaria will dig deeper into the necrotic wounds of their host animal and feed on the dead tissue. Both males and females will feast through this method. This time period is extremely crucial to the flies, as they must gather enough nutrients in order to last through the pupal stage without any food sources. This is one reason why the larvae are much larger than the size of the adult C. macellaria.\n\nAs adults, the food specifications of the flies change. Female flies will continue to feed on tissues of animals; however, now they preferentially feed off of live tissue and tissue plasma. Males, at this point, will no longer consume tissue, but instead will eat nearby vegetation and intake nutrients from the nectar of flowers.\n\nMating\nAlthough there are few studies on the mating patterns of C. macellaria, there is some information on the interactions between the males and females. Adult female C. macellaria have been observed to will release pheromones that will stimulate the males copulatory attempts on contact. Even though depriving the C. macellaria adults of dietary proteins did not impact the potency of the female extracts, there was a reduced response in males for the pheromones.\n\nParental care\n\nMale C. macellaria do not provide parental care. The males will typically mate quickly and have the females bear the young. Since the females lay so many eggs, there is little care provided by the actual mothers after laying the eggs. The females do strategically lay the eggs in dead skin flesh so that once the eggs hatch into larvae, nutrition will be readily available.\n\nSocial behavior\nTraditional social behavior like lekking has not been observed in C. macellaria; however, other social behaviors have been observed.\n\nEgg laying\n\nIt is common for female C. macellaria to lay eggs with other females. Since females may lay up to 250 eggs, it is common for aggregations of thousands of eggs to infest entire animal carcasses.\n\nPheromone selectivity\nWhile C. hominivorax is closely related to C. macellaria, there are evolutionary developed methods that lead to reproductive isolation. One of these mechanisms is the interspecies response to the C. macellaria female pheromone. Studies on newly colonized C. hoinivorax males have demonstrated that the males do not response to the C. macellaria pheromone.\n\nEnemies\n\nLarval predation\nWhen studying the larval dispersal and predation for C. macellaria, studies have shown that there is interspecies competition and predation. It has been demonstrated that C. albiceps larvae attack C. macellaria larvae during their dispersal process. Additionally, C. macellaria showed higher aggregation level in single than in double species. This may be explained by an evolutionary mechanism used to conserve and protect C. macellaria from predation.\n\nHuman depredation\nDue to the medical and economic impact of the C. macellaria and other blowflies, an array of pesticides have been developed to reduce the C. macellaria population, including pyrethrin aerosol.\n\nMimicry and protective coloration\n\nWhile there are theories for protective coloration, there is no clear mimicry done by C. macellaria or by other insects specifically mimicking C. macellaria. The metallic green coloration may be a form of warding off predators, but this still in the process of being analyzed.\n\nImpact\n\nMedical\nCochliomyia macellaria has extensive medical and economic implications. When C. macellaria larvae infest the dead and decaying tissues of animals or humans, myiasis may often occur. Once infestation occurs, a dark brown discharge will start to leaking from the wound. As the infestation increases, there is more agitation and inflamed tissue, which is accompanied by unpleasant smells. After the process of clinical diagnosis begins and the myiasis is recognized, then the larvae are easier to identify. Treatment of these infestations can be time intensive and leads to increased chances of reoccurrences. The first step is manual removal of the larvae followed by an antibiotic smear.\n\nEconomic\nThe livestock industry considers the secondary screwworm an important pest because of the enormous economic losses caused by cases of myiasis and disease transmission. The medical and pesticide treatment costs the United States millions of dollars annually.\n\nForensic importance\n\nCochliomyia macellaria is the most common species of blow flies found on carrion in the southern United States. C. macellaria has recently gained recognition in forensic entomology because of its occurrence on decomposing remains. Since the analysis of the succession and occurrence has been well defined, it is possible to create postmortem interval estimations, which are crucial for forensic entomology. Adult C. macellaria in the southeastern United States are only attracted to the dead tissue on animals minutes after the death. In other regions of the United States, the adult flies are attracted to the dead flesh after a 24-hour delay.\n\nReferences\n\nFurther reading\n\nExternal links\n \n\nCalliphoridae\nArticles created by Qbugbot\nInsects described in 1775\nTaxa named by Johan Christian Fabricius\nDiptera of North America\nInsects of the United States", "meta": {"title": "Cochliomyia macellaria", "url": "https://en.wikipedia.org/wiki/Cochliomyia%20macellaria", "language": "en", "timestamp": "20230320"}}
7
+ {"text": "Opalenica \u2013 dawna gromada, czyli najmniejsza jednostka podzia\u0142u terytorialnego Polskiej Rzeczypospolitej Ludowej w latach 1954\u20131972.\n\nGromady, z gromadzkimi radami narodowymi (GRN) jako organami w\u0142adzy najni\u017cszego stopnia na wsi, funkcjonowa\u0142y od reformy reorganizuj\u0105cej administracj\u0119 wiejsk\u0105 przeprowadzonej jesieni\u0105 1954 do momentu ich zniesienia z dniem 1 stycznia 1973, tym samym wypieraj\u0105c organizacj\u0119 gminn\u0105 w latach 1954\u20131972.\n\nGromad\u0119 Opalenica z siedzib\u0105 GRN w mie\u015bcie Opalenicy (nie wchodz\u0105cym w sk\u0142ad gromady) utworzono 31 grudnia 1971 w powiecie krotoszy\u0144skim w woj. pozna\u0144skim z obszar\u00f3w zniesionych gromad Opalenica-Wsch\u00f3d i Opalenica-Zach\u00f3d w tym\u017ce powiecie; r\u00f3wnocze\u015bnie do nowo utworzonej gromady Opalenica w\u0142\u0105czono miejscowo\u015bci Bukowiec Stary i Pora\u017cyn-stacja ze zniesionej gromady Bukowiec tam\u017ce.\n\n1 stycznia 1972 do gromady Opalenica w\u0142\u0105czono cz\u0119\u015b\u0107 wsi Bia\u0142awie\u015b o nazwie Pora\u017cyn-Tartak z gromady Grodzisk Wielkopolski w tym\u017ce powiecie\n\n1 stycznia 1973 w powiecie nowotomyskim reaktywowano zniesion\u0105 w 1954 roku gmin\u0119 Opalenica.\n\nPrzypisy \n\nOpalenica", "meta": {"title": "Opalenica (gromada)", "url": "https://pl.wikipedia.org/wiki/Opalenica%20%28gromada%29", "language": "pl", "timestamp": "20230320"}}
8
+ {"text": "Coleophora setipalpella \u00e9 uma esp\u00e9cie de mariposa do g\u00eanero Coleophora pertencente \u00e0 fam\u00edlia Coleophoridae.\n\nBibliografia \n Australian Biological Resources Study (ABRS) (2008): Australian Faunal Directory \u2014 Coleophoridae.\n Pitkin, Brian & Jenkins, Paul (2004): Butterflies and Moths of the World, Generic Names and their Type-species \u2014 Coleophora.\n Savela, Markku (2010): Markku Savela's Lepidoptera and some other life forms \u2014 Coleophoridae.\n Tree of Life Web Project (ToL) (2009): Coleophoridae.\n\nLiga\u00e7\u00f5es externas \n Natural History Museum Coleophoridae\n\nColeophora", "meta": {"title": "Coleophora setipalpella", "url": "https://pt.wikipedia.org/wiki/Coleophora%20setipalpella", "language": "pt", "timestamp": "20230320"}}
9
+ {"text": "Los Machucambos sind eine Band, die sich im August 1959 im Pariser Quartier Latin gr\u00fcndete und die vor allem in den 1960er Jahren in Europa und in den USA gro\u00dfen Erfolg mit ihren Boleros, Cha-Cha-Chas, Rumba- und Merengue-Liedern hatte. \n\nDas Trio nannte sich urspr\u00fcnglich Los Acapulcos. Der Name Los Machucambos entstammt dem s\u00fcdamerikanischen G\u00fcrteltier, dessen Schale zur Herstellung der Charango ben\u00f6tigt wird.\n\nVon der Originalformation mit der Costa-Ricanerin Julia Cortes, dem Spanier Rafa\u00ebl Gayoso und dem Peruaner Romano Zanotti sind noch die beiden Musiker und S\u00e4nger Gayoso und Zanotti dabei, zusammen mit zwei S\u00e4ngerinnen, die seit den 1970er Jahren dazugekommen sind: Mariana Gilbert und Maria Licata.\n\nDie Formation ver\u00f6ffentlichte bisher 19 Alben und 9 Kompilationen, zuletzt mit dem Titel Pepito im Jahre 2009.\n\nDiskografie\n\nAlben\n\nSingles\n\nWeblinks\n\nEinzelnachweise \n\nFranz\u00f6sische Band", "meta": {"title": "Los Machucambos", "url": "https://de.wikipedia.org/wiki/Los%20Machucambos", "language": "de", "timestamp": "20230320"}}
10
+ {"text": "El torillo moteado (Turnix maculosus) es una especie de ave charadriforme de la familia Turnicidae que habita en Ocean\u00eda.\n\nDistribuci\u00f3n \n\nSe extiende por las islas menores de la Sonda, C\u00e9lebes, algunas Molucas, el norte y este de Australia, Nueva Guinea, las islas Bismarck y las Salom\u00f3n.\n\nReferencias\n\nEnlaces externos \n\nmaculosus\nAves de Australasia\nAnimales descritos en 1815\nTaxones descritos por Coenraad Jacob Temminck", "meta": {"title": "Turnix maculosus", "url": "https://es.wikipedia.org/wiki/Turnix%20maculosus", "language": "es", "timestamp": "20230320"}}