text:
Dumb questions
skaller December 9, 2021, 2:31am #1
I hope you people don't mind but to shortcut some decisions I thought to pick some brains instead of slogging through documents and trial and error stuff. Apologies in advance.
First, I have a tool named flx which was originally designed to invoke the Felix compiler flxg which produces C++, then compile the generated C++, then find all the required libraries automatically, and link the final product (which could be an executable, shared library or archive), and run it. But it can also do native C and C++ (no Felix involved), and some Ocaml, and vague attempts have been made to integrate golang and other languages.
The tool has a few core features: first, you can write commands that are identical on Linux, Mac, and Windows and which do exactly the same thing on these platforms.
Secondly, the C++ compiler to be used is selected by selecting a plugin toolchain controller. Toolchains are not allowed to have semantic options. If you want different options, you have to use a different toolchain. As a result, toolchains have a fixed set of capabilities, no ifs/buts/configuration nightmares. A toolchain can compile to static object file, dynamic object file, build an archive library, link a shared library, link an executable, and check for compilation dependencies (header files) and that's all you're allowed to do.
Third, you do not specify search paths for either header files or for libraries to link with, nor are you allowed to specify the names of libraries. Instead, the language itself specifies abstract resources, and the tool uses another tool, flx_pkgconfig to query the configuration database of meta-data to find out what is required (it's similar to pkconfig but is a fully general database) So when you say to "run" a Felix program, it just runs. No arguments other than the file to run.
The tool does automatic dependency checking. No makefiles are required.
Also, the tool never writes anything into any place unless you tell it, except for a special cache directory. So when you run a program by specifying the source file all the binary crud is put in the cache. Unless you look there you will not find the executable.
So .. I want to add Chapel to the tools capabilities. For dependency specification I can program the Chapel toolchain to scan source code for special comments which specify requirements. This is built-in to Felix language. I use these special comments to allow autolinkage for C++.
Q1: what can/does the compiler generate? Is it only an executable?
Q2: Chapel has a way to lift C types and function. Does this work for C++ types and functions? Does it work, and if so how, if the LLVM backend is used?
Is there an in-languague way to specify abstract dependencies?
Just to explain here in Felix:
type intvector = "::std::vector<int>"
requires header "#include <vector>";
fun f(x:intvector)=> ...;
Now, if the function f is called, you must have an intvector value, so the intvector type is used, and so when Felix emits C++, it also emits the required #include directive. If it is not used, the #include is not emitted. You can also write:
.. requires package "metadata" ..
and now, this causes the toolchain to look for metadata.fpc in the configuration database. That may contains specification to link some library. In C++ the requires clause is put in a comment
//@requires package "metadata"
Unless Chapel has a similar feature, I need to do as for C++ and put the specs in a comment. It's not optimal because in Felix, only resources actually required are included when building. The toolchain actually has to scan the C++ file to find these special comments to establish the abstract resource name so as to find the resource meta-data definition in the configuration database. This should work for Chapel too I hope.
Q3: The tool also gets rid of the need to specify environment variables to run the compilers and/or the executables under its control. It uses the meta-data database to find what is required, and sets it all up for you. Of course, if you run an executable standalone and it needs, say, a Chapel related resource such as a shared library with run time support, it can't help you. If the default is not to your liking you can specify a build control package on the command line. For example:
flx --chapel=chplsetup helloworld.chpl
will find the chplsetup.fpc file and set environment variables, command line switches, etc to run the chapel compiler, and then run the program. I have to program flx to support this. So I need to know what is required.
bradcray December 9, 2021, 4:04am #2
skaller:
I hope you people don't mind
Not at all, that's what we're here for (well, up to a point).
By default it simply generates an executable (or two, if you are compiling for distributed memory—one to launch the program, and one that is the per-node program). If you are using the C-based back-end, you can use --savec [directory-name] to capture the intermediate C code that we use as our portable assembly and a Makefile to build it. As of Chapel 1.25.0, the LLVM back-end has become the default, and I believe that the (now dated, name-wise) --savec flag has the effect of saving some sort of LLVM byte-code into the specified directory, but I haven't had much of a chance to kick that around, so am less familiar with it.
Q2: Chapel has a way to lift C types and function.
By "lift," do you mean call out to them / wrap them / make them available to Chapel programmers? If so, yes. One technique is to manually use extern declarations that use Chapel syntax to describe the C type, routine, or variable, where some white lies are permitted as long as they tell Chapel what it needs to know and the details can be resolved by the C-time compilation of the file. A second is to use our c2chapel tool which will take in a C header file and generate those extern declarations for you. The third is to embed the C declarations within the Chapel code itself using an extern { ... /* C declarations go here */ ... } block which utilizes clang to parse the C code and make the symbols available to the user. More can be learned about these options in the tech notes and language specification (where these sections are overdue to be merged, I believe).
Does this work for C++ types and functions?
No, though it would be nice if it did. Currently, we rely on wrapping any C++ code in C wrappers and calling to that.
Does it work, and if so how, if the LLVM backend is used?
Yes, what we have works and we rely on it heavily, both for bootstrapping the language and growing our set of libraries by wrapping existing ones to avoid reinventing the wheel. These features are fairly independent of the back-end, and are more about the front-end and IR. Though, as noted, clang is used for the third ("embed C code into my Chapel code") approach.
There is a require statement that permits the code to say "I rely on this C header file" or "I rely on this library." Essentially, to provide the real definition of the external code in the approaches above (well, the ones that don't directly embed the code into Chapel anyway), you can specify .h, .c, .o, .a, ... files on the Chapel compiler's command-line, and when it comes time, it will compile and/or link those files into the generated program. The require statement is a means to move those requirements off of the command-line and into the code.
So transcribing your Felix example, and moving it away from C++ towards something more C-like, you might do something like:
require "vector.h";
extern type intvector = opaque;
extern proc f(x:intvector);
var iv: intvector;
f(iv);
where intvector would need to be the C identifier for the type and opaque says "I can't really describe this to you, Chapel, in a way that would be useful." (where other options are to declare an extern record that mimicked the C struct being described by specifying some or all of its fields and their types).
I should also mention that we have a separate tool mason that's a package manager whose design was heavily influenced by Rust. So another way to talk about dependencies and requirements and how source code fits together is through mason.
Q3: The tool also gets rid of the need to specify environment variables to run the compilers and/or the executables under its control.
Chapel has a lot of environment variables that govern its compilation (which can also be set or overridden using command-line flags), largely because supercomputers have a lot of variation and options for how they're deployed. These can be embedded in a chplconfig file to avoid having to establish them in each session, or to associate defaults with a particular Chapel installation.
Hope this is helpful,
-Brad
I couldn't find the require statement in the docs. Is it documented?
I don't understand how C types are used if you don't send them together with the definition from an include file to a C compiler. If you're using LLVM, you're bypassing the C compiler, aren't you? Or are you using clang to generate some IR the same as Chapel makes then merging it or what?
If you are using a C compiler somehow, it's trivial to change the compiler to c++. It should still process all the C stuff. The reason is clear, C++ can do lots of stuff that is hard in C. It can probably generate better code than LLVM.
When I looked at the compiler briefly I saw some calls to LLVM but I didn't do any extensive inspection. I understand you can easily tell LLVM about C function calls but types are another story. Values of types have to be copied, assigned, moved and destroyed and C++ handles all that. OTOH a C struct can include variables of other struct types you don't know the size of so you would need to recursively describe every C struct needed to Chapel (which still can't calculate the sizes).
Yes, though I seem to have mis-pasted the hyperlink in my previous response. I've edited the post on Discourse, but here's the correct one: C Interoperability — Chapel Documentation 1.25
I don't understand how C types are used if you don't send them together with the definition from an include file to a C compiler.
For the C back-end, any .h file from a require statement or the command line gets added as an #include in the back-end code. For the LLVM back-end, as I understand it, we use clang to read the header file in order to give the compiler the C definitions as IR alongside the Chapel-generated IR.
If you are using a C compiler somehow, it's trivial to change the compiler to c++.
I think ingesting C++ and generating it are the easier parts. Teaching the Chapel compiler enough about C++ semantics to make it be able to use C++ and understand it well enough feel like the harder parts to me. We did a thought experiment about this once when I had convinced myself that it shouldn't be that bad, and I left feeling the opposite. I'm not finding my notes quickly, but will look again tomorrow, or else have others remind me of what I'm forgetting.
so you would need to recursively describe every C struct needed to Chapel
Generally speaking, Chapel doesn't need to know details of the memory layout of the C struct, which is one of the types of "white lies" I mentioned earlier. If a C struct S has fields x, y, and z of types int, double, and char*, respectively, and you only care about y in Chapel, you can tell Chapel:
extern record S {
var y: real;  // real in Chapel is like double in C
and within the Chapel code, you will only be able to access the y field. But the other fields are still there and will be filled in by the C compiler and linker (for the C back-end) or clang parsing the header files (for the LLVM back-end) such that everything will be fine in terms of the memory layout and such. Chapel doesn't support a compile-time sizeof() for record types since we defer that to the back-end, so any such queries generate execution-time values (implemented using C-style sizeof()).
Signing off for the day,
OK, thanks, found the require statement. Cool. [Discourse web interface on the other hand is extremely annoying. It keeps popping up stupid messages and forcing me to reload whilst editing]
The interaction of the require with params is nice. However the Felix machinery is better because it specifies an abstract resource. This is platform independent and also handles linking. The platform dependencies go into the meta-data data base which is used to translate them. I wonder if Chapel can be modified to allow an abstract specification?
Basically Chapel allows you to put command line switches in the program, like -lname or -Lpath and maybe -Ipath for header file searches, which are passed onto the compiler. This removes the need for specifying that stuff on the command line which is good, but it also means on every platform you have to edit the program, unless you used params, in which case you're back to the command line again.
The requirement is to autobuild code without any switches on the command line. What Felix does is, the compiler emits a list of abstract package names, and the build tool, grabs them and looks them up to find platform specific information like search paths, actual libraries to link, etc. This information is then passed on to the C++ compiler. So the model is: translate Felix to C++ and package list, lookup package list, call C++ compiler/linker etc using the relevant information from the package database. When building C or C++, the tool scans the files for the magic comments containing the requirements first.
I wonder how to make this work in Chapel? If it was only generating C, and the front end C generator was split from the C compilation step, it would be easy, I could do it externally. But if Chapel is going straight through the front end to the backend in a single uninterrupted process, it would have to be done by Chapel itself. Hmm. Or, if the language was modified to allow
require package "name";
which Chapel itself ignored, I could scan the source files for that statement, and get the abstract names that way.
I note, typically, the hassles are usually with Windows. However there are other issues, for example, my system always uses distinct names for static link and dynamic link object files and libraries due to design faults in unix tool command line switches like -lname which can find the wrong kind of file. So if you can both static and dynamic link, an embedded -lname switch cannot work because it cannot cover both cases. Using a param fixes that of course but then we're back to the command line again.
Discourse web interface
Ok, that makes sense.
On C++ semantics, what Felix does is simple: It mandates all C++ types are semi-regular, that is, they must have default constructors, copy initialisation, copy assignment, and destructors. In other words they're required to be first class types like an int. In particular, Felix never initialises variables, it always assigns them, like C, so assignment of a default initialised variable is required to be the same as initialising the variable with the same value, end of story.
If your C++ type does not meet these requirements, and a lot of useful types do not, then you must use a pointer instead. Pointers are first class so meet the requirements. You can hide the fact it's a pointer, which I do all the time. For example I use Google RE2 for regular expressions, and it is not a mobile object, so I just use C++ shared_ptr<RE2> instead. That's default initialised to point to nothing. It also automatically handles deletion.
The thing is you don't have to directly interface to all possible C++ object types. If you just require the type to be "like a C type" as I did, then you can do almost everything you need to. [I actually find this a better method than using say LLVM but I'll have to live with the status quo on that I guess :]
mppf December 9, 2021, 3:11pm #8
Yeah this is more in the realm of what mason does - have a look at Mason — Chapel Documentation 1.25 . One of the things we are wrestling with is that we might want to allow non-mason programs to depend on mason packages. In particular, we would like to describe some of the standard library as mason packages (in large part to handle dependencies on C libraries), but we would still like programs compiled with chpl to be able to use these.
bradcray December 9, 2021, 5:37pm #9
The thing is you don't have to directly interface to all possible C++ object types.
I think when our user community expresses wishes for C++ interoperability, they are asking for full interoperability, say to class hierarchies that are dynamically dispatched and the like. But point taken that there are baby steps that could be taken which would avoid the need to manually wrap C++ code in C.
skaller December 9, 2021, 5:42pm #10
Thanks for link. Yes, even your TOML file is almost the same idea as my flx_pkgconfig files except it uses field=string whereas I'm using field:string. I also use meta-data to build the whole of my run time (which is C++), and all my tools (except the compiler). However my system does less than Mason it seems: it isn't a package manager. If the user wants to use a third party library, they create the meta-data after manually installing it.
I also use a literate programming tool which extracts files from a document and installs them. Since Felix autobuilds Felix programs, installing Felix code is just a matter of dumping the Felix files in the right directories (there's nothing to compile, Felix executes script directly like Python does, all the compilation and linkage is entirely transparent and fully automated).
Interestingly, instead of using a document generator like chpldoc, I have written a webserver which displays the literate package files directly, so there's nothing to generate .. more precisely the web server does it on the fly. I have some Read-The-Docs files hand written as well but my system has extra demands, including the requirement to display LaTeX symbols correctly, and to display includes as hyperlinks, show mouseovers for the LaTeX symbols, etc.
Mason seems pretty nice though.
I think you should forgive the ignorance of your user community wanting to get full C++ interoperability
Object orientation is crap, so there's no need to interface to it. It suffices to use a C like interface to use the C++ class stuff if you find anything actually useful using it. Modern C++ doesn't use OO, it is heavily based on templates. You also do not want to interface entirely to that because it is also crap. Just use the good bits!
Chapel already has pretty much the same as Felix does in terms of interfacing to C++: you need to lift types and functions from C++ into your language which you can already do, you just aren't calling a C++ compiler. Chapel also has a requires clause which has exactly the same intent as Felix. The Felix system is a bit more advanced because it can specify abstract resources, and, it triggers dependences based on actual usage i.e. if you used a C/C++ type or function which you lifted, it will include the header files and link the library required based on the meta-data without command line instructions. If you didn't use it, no #includes or library is linked.
There's a challenge to get Chapel to do what Felix can with C++, for example this is trivial in Felix:
type vector[T] = "::std::vector<?1>"
requires Cxx89_header::vector;
because Felix generates C++. The ?1 annotation means "the first type parameter". Doing this level of integration in Chapel is much harder because it either generates C, or LLVM directly: Felix is C++ ABI compliant, it was designed from the ground up as a C++ code generator precisely so as to leverage existing C++ code. So unlike other languages with FFIs (Foreign Function Interfaces) including Chapel, there is no "mapping" required for data types: the only mapping is translating the C++ type into Felix types which is compile time only. Actually Felix also has ways to specify external C structs, just like Chapel. So the designs there are pretty close.
By comparison, mapping C libraries into Ocaml is possible but it's a lot of work.
But for C++ classes, you just use a C like interface binding. It's good enough to use the classes written in C++, the C++ is providing any dynamic dispatch. In Felix if you want dynamic dispatch you do it the same way as in C, using function pointers (well actually Felix has first class functions, meaning, closures, so it's a lot more capable than a C function pointer).
If you really want to integrate better to C++, use C++ compiler instead of C, and, drop LLVM. There's a price .. C++ can take a LONG time to compile. In Felix, the Felix compiler is about 3 orders of magnitude more sophisticated than C++, but only takes 1/3 of the total compile time: the C++ compilation step is heavily optimised to only use things that are actually required but it still takes 2/3 of the total compile time (unless you specify -O0 in which case the run time is 10 times slower).
Anyhow, I think Chapel is already doing a pretty good job binding to C and a command line option could be tested where it just uses C++ compiler (i.e. clang++ instead of clang). In fact they're the same compiler anyhow, just a few switches different. All modern C/C++ compilers are just that: they do C++ with a few tweaks to handle C as well. Heck, i had a look at an 8 bit microcontroller (Arduino) and you program that in C++ with GNU toolchain.
New dumb question. I am confused about references. Are references actually types?
For classes, Chapel uses a pointer it calls a reference. So passing a class around is just a pointer, that's fine and I don't think that's an issue.
Also the manual says you can have reference variables. If the two variables are in the same scope, there is no run time or semantics involved: it's just two names for the same variable. However, if you're referring to a component of some data structure, then its actually a pointer pretending to be a reference, and that may introduce some serious problems whilst simultaneously trying to solve others.
My concern stems from the observation that whilst lvalue/rvalue idea works, just barely, in C, because it is purely syntactic, in C++ reference types completely destroy the type system. I would not like the same problem to occur in Chapel.
References types destroy the type system when you try to introduce parametric polymorphism. Type constructors must be parametric. For example, T* in C is parametric for data types, if T is a type, T* is also a type, and a distinct type. For tuples, if A, B are types, A * B is also a type, and a distinct type. In C++, if T is a type, T& may or may not be a distinct type, therefore, polymorphism cannot work.
mppf December 9, 2021, 9:34pm #13
The intention isn't to have reference types but rather that some variables/formal arguments are references. This is reflected in the syntax: we write ref x = f() to set up a variable that is a reference but var y: int to set up a variable while specifying its type. The type system does sometimes use the kind of intent/variable kind information but it's nowhere like the situation in C++.
skaller December 10, 2021, 12:01am #14
Yes, it seems carefully considered to avoid the C++ blunder. But I'm not totally convinced it works yet. Can you have a reference member in a class object that refers to something outside the class (other than a class object I mean)?
I want to present a type system calculus which is heavily tested (meaning I've already implemented it) and based on the kinds of algebras used in research papers (so it's based on category theory). However there are some novel extensions which power up "homogenous tuples" enormously. It could maybe also apply to your arrays. The origins are in Barry Jay's FISh which supports polyadic (rank independent) array programming.
For me the interesting part is then to add some new operations to the calculus which probably "partition" index sets to support parallel computations. I note Chapel already does some of this, for example "promoting" a function from an element to apply to array is precisely what a an array functor is required to do. In other languages this is called "map". In Haskell, the typeclass Functor is defined to have a member "fmap". I'll need a new topic. The idea extends to all functors but for Chapel array is the important one because arrays have random access and so map can be done in parallel.
Reduce is related but heavier. You only have a fixed set of reductor functions but any suitable function T * T -> T which is associative and symmetric should work. however you actually want a chain of functions T1 * T2 -> T2 for first level accumulation and T2 * T3 -> T3 for the second level, etc to aggregate the results up a tree.
I also did some work recently on a system where could do some operations like "select" on a database. Now, you can do the full select, or you can do a partial select, send the results upstream, and the rest of the filtering upstream. The problem now becomes, given a calculus which allows a calculation to be partitioned like this, to add costing annotations, say, money, for processing on various stages of platform, and network transmission costs, and figure out the optimal place to put the splits, based on the cost. [The cost could be real time or even some kind of polynomial function] The key market there was gene sequencing. Chapel could do that too.
bradcray December 10, 2021, 1:45am #15
Can you have a reference member in a class object that refers to something outside the class (other than a class object I mean)?
Not today, though there are frequent requests for this. For example "I have a huge array, and I want to have an object refer to it, but I don't want to literally copy it into the object as a field; can't I just have a ref field that refers to it?" The answer today is "no", but this seems like an obviously attractive feature. The workaround people use today is to create a class to wrap such arrays, but this seems like a hassle and the fact that so many people have written the pattern feels unsettling.
There's some discussion of this here: Timeline for ref Fields in Classes/Records? · Issue #8481 · chapel-lang/chapel · GitHub, though I feel as though there's been additional discussion about it since then that I'm not finding at the moment because I know that Michael has warmed up to it more than he was in that issue (primarily because of the introduction of lifetime analysis into the compiler to help with owned/borrowed).
I want to present a type system calculus
I want to warn that I'm personally not likely to pay much attention to this because I'm not particularly good at formal PL systems and am generally very short on time. Don't take that as a judgement of the idea or a negative review, just the facts of my work-life these days.
skaller December 10, 2021, 4:07am #16
Thanks for link. The calculus doesn't require any type theory, only high school maths. The only tricky bit is most people don't know what a variant type is. But it's just a discriminated union. Every C programmers know how to make a union with tag value to say which component is stored, that's a manually built variant, where chosing the right union component is a matter of discipline rather than having the compiler enforce it.


text:
COVID-19 Is Causing Chaos In F1, IMSA, Super Formula Paddocks
Elizabeth Blackstock
Photo: Brian Cleary (Getty Images)
While many disciplines of motorsport have done a solid job with their COVID-19 safety protocols, nothing has been foolproof. Drivers and team personnel have contracted the illness, but this weekend sees the impact of the virus on a much wider scale. Whether it be IMSA drivers or Formula One presenters, this weekend serves as a stark reminder that life still hasn't gone back to normal.
The most drastic situation comes courtesy of Porsche's WeatherTech SportsCar Championship teams. The GT Le Mans class will feature neither of the two teams scheduled to join the grid at Mid-Ohio after there were three positive COVID-19 rest results after the 24 Hours of Le Mans.
In response, Porsche has decided to isolate the entire program, including all drivers and employees. Frederic Makowiecki, Nick Tandy, and Laurens Vanthoor, who were scheduled to fly to America to compete in the IMSA event, have been ordered instead to isolate. The team will also avoid contesting the Nurburgring 24 Hours.
It's especially frustrating for the team because Porsche is scheduled to leave IMSA when the 2020 season wraps up. Missing Mid-Ohio will serve a serious blow to its GTLM championship standings, but the marque still intends to contest the final events of the season.
Over in the Formula One world, presenter Will Buxton has contracted COVID-19 and will not attend the Russian Grand Prix—a race that up to 30,000 fans are expected to attend.
F1 has established a fairly rigorous testing routine, ensuring that anyone entering the paddock has been tested. The series has also been transparent in releasing the numbers of positive cases, though only higher-profile folks like drivers and presenters have been identified as virus carriers. Names of team personnel are withheld for privacy.
This weekend, Formula 2 driver Tatiana Calderon was supposed to contest a race in at Okayama in the Super Formula series. While she has not contracted the virus, she has been unable to travel with enough time to spend a government-mandated two weeks in self-isolation.
Calderon contested last weekend's 24 Hours of Le Mans, which means that she has been unable to complete the two-week quarantine period. While the government has the ability to give people permission to isolate for a shorter period of time, Calderon has not secured it.
In her case, she can afford to miss a race or two. Japan's strict travel rules has encouraged Super Formula to allow drivers an opportunity to drop their lowest points score when calculating championship standings. That way, anyone who is unable to travel to Japan in time to isolate before the race will be not be penalized.
Finally, Robin Frijns has withdrawn from the Nurburgring 24 Hours this weekend due to a flu-like illness, although he has tested negative for COVID-19. But any illness in 2020 is a terrifying affair. It is likely Frijns will undergo further testing to ensure that he did not receive a false negative.
Stories of drivers or mechanics contracting COVID-19 have been frequent, but the varying impact of the virus has not been quite as apparent as it is this weekend.

redpajama_set_name: RedPajamaCommonCrawl


text:
namespace base {
class SequencedTaskRunner;
}

namespace policy {

class CloudPolicyClient;
class DeviceStatusCollector;

// Class responsible for periodically uploading device status from the
// passed DeviceStatusCollector.
class StatusUploader {
 public:
  // Refresh constants.
  static const int64 kDefaultUploadDelayMs;

  // Constructor. |client| must be registered and must stay
  // valid and registered through the lifetime of this StatusUploader
  // object.
  StatusUploader(
      CloudPolicyClient* client,
      scoped_ptr<DeviceStatusCollector> collector,
      const scoped_refptr<base::SequencedTaskRunner>& task_runner);

  ~StatusUploader();

  // Returns the time of the last successful upload, or Time(0) if no upload
  // has ever happened.
  base::Time last_upload() const { return last_upload_; }

 private:
  // Callback invoked periodically to upload the device status from the
  // DeviceStatusCollector.
  void UploadStatus();

  // Invoked once a status upload has completed.
  void OnUploadCompleted(bool success);

  // Helper method that figures out when the next status upload should
  // be scheduled.
  void ScheduleNextStatusUpload();

  // Updates the upload frequency from settings and schedules a new upload
  // if appropriate.
  void RefreshUploadFrequency();

  // CloudPolicyClient used to issue requests to the server.
  CloudPolicyClient* client_;

  // DeviceStatusCollector that provides status for uploading.
  scoped_ptr<DeviceStatusCollector> collector_;

  // TaskRunner used for scheduling upload tasks.
  const scoped_refptr<base::SequencedTaskRunner> task_runner_;

  // How long to wait between status uploads.
  base::TimeDelta upload_frequency_;

  // Observer to changes in the upload frequency.
  scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
      upload_frequency_observer_;

  // The time the last upload was performed.
  base::Time last_upload_;

  // Callback invoked via a delay to upload device status.
  base::CancelableClosure upload_callback_;

  // Note: This should remain the last member so it'll be destroyed and
  // invalidate the weak pointers before any other members are destroyed.
  base::WeakPtrFactory<StatusUploader> weak_factory_;

  DISALLOW_COPY_AND_ASSIGN(StatusUploader);
};

}  // namespace policy

#endif  // CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_

redpajama_set_name: RedPajamaGithub


text:
1History of the tennis shirt
2Application to polo
3Golf
Not to be confused with Polo neck.
Type of shirt
Polo shirt outline
A polo shirt, tennis shirt, golf shirt, or chukker shirt[1] is a form of shirt with a collar. Polo shirts are usually short sleeved but can be long; they were used by polo players originally in India in 1859 and in Great Britain during the 1920s.[2]
Polo shirts are usually made of knitted cotton (rather than woven cloth), usually a piqué knit, or less commonly an interlock knit (the latter used frequently, though not exclusively, with pima cotton polos), or using other fibers such as silk, wool, synthetic fibers, or blends of natural and synthetic fibers. A dress-length version of the shirt is called a polo dress.[3]
History of the tennis shirt[edit]
A Lacoste tennis shirt
In the 19th and early 20th centuries, tennis players ordinarily wore "tennis whites" consisting of long-sleeved white button-up shirts (worn with the sleeves rolled up), flannel trousers, and ties.[4][5][6] This attire presented problems for ease of play and comfort.[5]
René Lacoste, the French seven-time Grand Slam tennis champion, felt that the stiff tennis attire was too cumbersome and uncomfortable.[5] He designed a white, short-sleeved, loosely-knit piqué cotton (he called the cotton weave jersey petit piqué) shirt with an unstarched, flat, protruding collar, a buttoned placket, and a shirt-tail longer in back than in front (known today as a "tennis tail"; see below), which he first wore at the 1926 U.S. Open championship.[4][5][6][7]
Beginning in 1927, Lacoste placed a crocodile emblem on the left breast of his shirts, as the American press had begun to refer to him as "The Crocodile",[8][9] a nickname which he embraced.[4][5][6]
Lacoste's design mitigated the problems that traditional tennis attire created:[4][6][7][10]
the short, cuffed sleeves solved the tendency of long sleeves to roll down
the shirt should be buttoned to the top
the piqué collar could be worn upturned to protect the neck skin from the sun
the jersey knit piqué cotton breathed and was more durable
the "tennis tail" prevented the shirt from pulling out of the wearer's trousers or shorts
In 1933, after retiring from professional tennis, Lacoste teamed up with André Gillier, a friend who was a clothing merchandiser, to market that shirt in Europe and North America.[4][5][7] Together, they formed the company Chemise Lacoste, and began selling their shirts, which included the small embroidered crocodile logo on the left breast.[4][5]
Application to polo[edit]
Polo players Paul Barr, Vichai Srivaddhanaprabha, Adolfo Cambiaso, Martin Valent with fellow player Prince William (center), wearing polo shirts as part of their uniform.
Until the beginning of 20th century polo players wore thick, long-sleeved shirts made of Oxford-cloth cotton.[11][12] This shirt was the first to have a buttoned-down collar, which polo players invented in the late 19th century to keep their collars from flapping in the wind (Brooks Brothers' early president, John Brooks, noticed this while at a polo match in England and began producing such a shirt in 1896).[11][13]
Brooks Brothers still produces this style of button-down "polo shirt".[11] Still, like early tennis clothing, those clothes presented a discomfort on the field.
In 1920, Lewis Lacey, a Canadian (born of English parents in Montreal, Quebec in 1887) haberdasher and polo player, began producing a shirt that was embroidered with an emblem of a polo player, a design originating at the Hurlingham Polo Club near Buenos Aires.[14] The definition of the uniform of polo players – the polo shirt and a pair of white trousers – is actually a fairly recent addition to the sport. Until the 1940s shirts were generally very plain, with no numbers, writing or logos. When necessary, numbers (ranging from 1 – 4) were simply pinned on to the back of the player's shirts a few minutes before the start of a match. To differentiate the polo teams from one another, some polo shirts had horizontal stripes, others bore diagonal coloured stripes.
In 1972, Ralph Lauren marketed a tennis shirt as a "polo shirt" as a prominent part of his original line Polo, thereby helping further its already widespread popularity.[15] While not specifically designed for use by polo players, Lauren's shirt imitated what by that time had become the normal attire for polo players. As he desired to exude a certain "WASPishness" in his clothes, initially adopting the style of clothiers like Brooks Brothers, J. Press, and "Savile Row"-style English clothing, he prominently included this attire from the "sport of kings" in his line, replete with a logo reminiscent of Lacoste's crocodile emblem, depicting a polo player and pony.
Golf[edit]
Over the latter half of the 20th century, as standard clothing in golf became more casual, the tennis shirt was adopted nearly universally as standard golf attire.[4] Many golf courses and country clubs require players to wear golf shirts as a part of their dress code.[16][17] Moreover, producing Lacoste's "tennis shirt" in various golf cuts has resulted in specific designs of the tennis shirt for golf, resulting in the moniker golf shirt.
Golf shirts are commonly made out of polyester, cotton-polyester blends, or mercerized cotton. The placket typically holds three or four buttons, and consequently extends lower than the typical polo neckline. The collar is typically fabricated using a stitched double-layer of the same fabric used to make the shirt, in contrast to a polo shirt collar, which is usually one-ply ribbed knit cotton. Golf shirts often have a pocket on the left side, to hold a scorepad and pencil, and may not bear a logo there.
Wikimedia Commons has media related to Polo shirts.
Sportswear (activewear)
^ Mary Brooks Picken (24 July 2013). A Dictionary of Costume and Fashion: Historic and Modern. Courier Corporation. p. 62. ISBN 9780486141602. chukker shirt. Polo shirt, with short sleeves and open neck.
^ Charlotte Mankey Calasibetta – Phyllis Tortora, The Fairchild Dictionary of Fashion – 2003 Fairchild Publications, inc. New York – ISBN 1-56367-235-9
^ McKean, Erin (2013). The Hundred Dresses: The Most Iconic Styles of Our Time. USA: A & C Black. p. 71. ISBN 978-1-4725-3585-6.
^ a b c d e f g "Lacoste Sportswear – Fashion Designer Encyclopedia".
^ a b c d e f g The Story of Lacoste. Retrieved from "Archived copy" (PDF). Archived from the original (PDF) on 26 January 2006. Retrieved 5 May 2011. {{cite web}}: CS1 maint: archived copy as title (link).
^ a b c d Style & Design: Lacoste Time Magazine, Winter 2004.
^ a b c The Brand Channel, Lacoste profile Archived 26 September 2012 at the Wayback Machine.
^ The Crocodile
^ The Birth of the Crocodile
^ Butterworth, Helen. "The History of the Polo Shirt". Polo T-Shirts. Archived from the original on 20 October 2020. Retrieved 8 May 2021.
^ a b c "Brooks Brothers – About Us".
^ Vittoria De Buzzaccarini, L'eleganza dello stile – Duecent'anni di vestir maschile. 1992, Edizioni Lupetti & co
^ Fashion Encyclopedia, "Brooks Brothers".
^ "A Popular Shirt Tale". TIME. 1 September 1986. Archived from the original on 8 December 2008. Retrieved 9 July 2012.
^ Official Ralph Lauren history website: "1972".
^ "Dress Code", BURLEIGH HEADS GOLF CLUB
^ "Dress Code: Proper Golf Attire", Long Island National Golf Club
Kerchief
Clerical collar
Lavallière
Cache-cœur
Halterneck
Polo neck
Sweater vest
Bell-bottoms
Lowrise
Pedal pushers
Slim-fit
Windpants
Suits and
Ceremonial dress
Pantsuit
Vestment
Boilersuit
and gowns
Formal, semi-
formal, informal
Bouffant gown
Coatdress
Little black
Princess line
Romper suit
Shirtdress
Rah-rah
and lingerie
Plastic pants
Bodysuit, adult
Bodysuit, infant
Greatcoat
British Warm
Guards Coat
Over-frock
Shadbelly
Paletot
Suit coats
Frock coat
Bekishe
Rekel
Mess jacket
Tailcoat
Ferraiolo
Mantle, Monastic
Mantle, Royal
Pellegrina
Coatee
Mackinaw
Jerkin
Sleeved blanket
Babygrow
Nightshirt
Dry suit
Square leg suit
Court shoe
Dress boot
Dress shoe
Pocket protector
Morning dress
Semi-formal
Black lounge suit
Clothing fetish
List of individual dresses
Clothing portal
Retrieved from "https://en.wikipedia.org/w/index.php?title=Polo_shirt&oldid=1135889212"
1926 clothing
French inventions
Tops (clothing)
Use dmy dates from August 2019


As part of his forthcoming memoir, Zayn Malik wrote transparently about several personal struggles he's faced over the length of his career thus far, touching on his ongoing battle with anxiety and his frustration with the musical aspect of being in a tightly controlled boyband. But he also revealed something new, admitting he struggled with an eating disorder during his last few months with One Direction.
Zayn said he didn't eat for days at a time, citing his hectic work schedule as a contributing factor to his illness.
"It wasn't as though I had any concerns about my weight or anything like that, I'd just go for days – sometimes two or three days straight – without eating anything at all," he wrote. "It got quite serious, although at the time I didn't recognize it for what it was.
"I think it was about control," he continued. "I didn't feel like I had control over anything else in my life, but food was something I could control, so I did."
Zayn said the lack of sustenance combined with the hectic life of being one-fifth of the biggest boyband on the planet negatively affected his health.
Zayn later addressed the passage in an interview with the Associated Press, though he downplayed his own claim that he was suffering from an eating disorder at the time.
"It was just more down to losing track of, you know, actually eating and being super busy and getting caught up with other things that 17 or 18-year-olds do, which normally entails them going out, drinking or partying, so it was a mixture of everything," he told the publication on Friday (October 28).
The "Pillowtalk" singer also touched on his own crippling anxiety in Zayn, recalling the time he was forced to pull out of the Capital Summertime Ball earlier this year.
He continued, saying that while his team offered to put out a statement claiming he was sick, Zayn ultimately decided to be honest about his anxiety in hopes of helping others cope with their own mental health struggles.
"When I was in One Direction, my anxiety issues were huge but, within the safety net of the band, they were at least manageable," he wrote. "As a solo performer, I felt much more exposed, and the psychological stress of performing had just gotten to be too much for me to handle—at that moment, at least. Rather than hiding away, sugar-coating it, I knew I had to put it all out there."
Zayn says the reaction was overwhelmingly positive.
"But what I found in the wake of my cancellation at Wembley wasn't hate but a massive amount of support from fans," he said. "Guys on Twitter were telling me how anxiety had affected their lives and saying that they were glad I had spoken up. It felt as though some good had come from the situation."
Zayn is set for a November 1 release.


text:
Q: How to read data from a zipfile on a website without locally downloading zipfile I am using the following piece of code:
import zipfile
import urllib

link = "http://www.dummypage.com/dummyfile.zip"
file_handle = urllib.urlopen(link)
zip_file_object = zipfile.ZipFile(file_handle, 'r')

I get the following error on execution. Please help.
Traceback (most recent call last):
  File "fcc.py", line 34, in <module>
    zip_file_object = zipfile.ZipFile(file_handle)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 770, in __init__
    self._RealGetContents()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 807, in _RealGetContents
    endrec = _EndRecData(fp)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 208, in _EndRecData
    fpin.seek(0, 2)
AttributeError: addinfourl instance has no attribute 'seek'

A: You need a streaming handler interface to handle data in memory. For text data, the most common lib used is StringIO. To binary data, the right lib is io.
import io
import urllib
import zipfile

link = "http://www.dummypage.com/dummyfile.zip"
file_handle = io.BytesIO(urllib.urlopen(link).read())
zip_file_object = zipfile.ZipFile(file_handle, 'r')

The point is, the download of the file is done indeed, but it will be in a temp folder. And you don't need to care about it

A: Can you use external tools? @ruario 's answer to Bash - how to unzip a piped zip file (from "wget -qO-") is very interesting. Basically, zip stores its directory at the end of the file and zip tools tend to need the entire file to get to the directory. However, the zip also includes inline headers and some tools can use those. If you don't mind calling out to bsdtar (or other tools), you can do this:
import urllib
import shutil
import subprocess as subp

url_handle = urllib.urlopen("test.zip")
proc = subp.Popen(['bsdtar', '-xf-'], stdin=subp.PIPE)
shutil.copyfileobj(url_handle, proc.stdin)
proc.stdin.close()
proc.wait()

redpajama_set_name: RedPajamaStackExchange


Employee benefits need to be purchased at least monthly. To avoid attracting interest for late payment the details and appropriate payment needs to reach the Council no later than the 7th day of the month following that for which the benefits are due.
We need to know what benefits are required and for whom they are required. Having determined what benefit codes are applicable to each employee this information is submitted via the Detail benefit return form. This reflects the employees' holiday fund numbers, names, dates of birth, benefit codes and the number of benefits due for each week.
The Contribution requisition is a summary of the above Detail benefit return. In addition it makes provision for the payment of levies to the Master Builders Associations if applicable. The total value reflected on the Contribution requisition should agree with the total of your payment.
There are various ways in which these details can be returned to the Council. The requisitions are available under the Wage Schedule tab.
If you wish to submit your returns electronically choose the Detail benefit return (electronic) form, copy the result to an Excel file on your system and use it as a template to be completed and e-mailed to the Council monthly. Deal in a similar way with the Contribution requisition form applicable to you. Your payment to us should then take place via electronic transfer to our account at First National Bank (see bank account details below). Please use your employer number that has been allocated to you by the Council as the beneficiary reference. This is the preferred method of submitting your returns.
If you wish to submit your returns by fax, post or delivery choose the Detail benefit return (fax/post) form, print a copy and enter the appropriate detail manually. In a similar way print the applicable Contribution requisition and complete this manually. These forms are then to be faxed or posted to us. Your payment can be made via electronic transfer or by cheque (see our bank details below). Please use your employer number that has been allocated to you by the Council as the beneficiary reference.
Please note that with immediate affect all cheques made out to us must be made out to: BIBC (Cape). This is our chosen trading name as per our Bank Mandates and the bank will not accept any cheques that are not made out to BIBC (Cape).
The documents below contain information regarding benefits paid to employees by the BIBC or to the BIBC by the employer that must be included in your employee's taxable income. You will receive a daily report regarding the amounts paid to your employees for sick pay benefits, please bear in mind that they also receive credits towards their Holiday and Bonus Fund when sick fund is paid, this must also be included in the employee's taxable income. You will also receive a weekly report for tax purposes, this will be emailed to you if we have your email address or faxed or posted, if we do not have a fax number or email we will post the advice to yourselves.
The Holiday Fund and Bonus Fund amounts (the benefits paid for by you and the credits from the Sick Fund) can either be included in the employee's taxable income on a weekly basis or when it is paid by the BIBC to the employee.


It is the sound of the new born, of suffering, of profound celebration, such as a drama of telluric dimension. Nature in its volcanic manifestation. She sings, as if revolted by such passion, banishing his fantasy of being the hero of her emancipation.
between what is and what is to be.


I LOVE this one! Did you use raw umber? Your creative ideas have really inspired me.
Thanks for organizing the 30 in 30 challenge. I look forward to doing it every year! 2X! One of my local arts councils has asked me to come in and talk about my experience doing this challenge. I also listen to the Artists Helping Artists Blog Talk radio show every week. GREAT TIPS! I have a folder devoted to the TO DO lists I start after listening to your show.


When targeting Teams with CA policies we have had issues with targeting both the browser and desktop /mobile app condition. Desktop client auth gets blocked and then the client reverts to web auth within the app and lets users in.
Work around is specific, additional policies. MS support explained this and asked us to log something here.
The lack of support might be due to the missing support in Microsoft Graph for Conditional Access, which is need for some parts of Microsoft Teams.


text:
Alyssa Milano Promotes Abstinence? Not Really.
By John Baldwin
Recently Georgia passed a new pro-life bill called the Living Infants Fairness and Equality (LIFE) Act. It bans abortion after six weeks, the time a baby's heartbeat can be detected. Now, with a bill that has the words fairness and equality in the title you would think liberals would be happy. But you would be wrong. Because fairness and equality are trumped (no pun intended) where the right to an abortion is concerned.
As you may know, Georgia has become a favored state to make movies due to the tax incentives provided. Wait. You mean the left actually likes lower taxes? You betcha, especially for the rich companies that make and produce these movies. So as you can imagine they are highly upset over this pro-life law. Anything that gets in the way of the radical left's ability to terminate life in the womb is just not going to be tolerated. Front and center of this is Alyssa Milano who is calling for a "sex" strike for the following reasons:
Our reproductive rights are being erased.
Until women have legal control over our own bodies we just cannot risk pregnancy.
JOIN ME by not having sex until we get bodily autonomy back.
I'm calling for a #SexStrike. Pass it on.
When I first heard this, lyrics from an old song just popped into my head. I couldn't help it:
All the boys and girls
Joy to the fishes in the deep blue sea
Joy to you and me!"
Kidding aside, it's sad to observe what radical liberalism does to the mind. It completely bends and distorts truth and reality. Notice how her so-called "reproductive rights" apparently overrides the life of the baby in the womb. Not risking pregnancy? Say, what a novel idea. This is only something the pro-life crowd has been saying for decades. It's called ABSTINENCE! Glad to see Alyssa is finally on board with it.
Legal control over our own bodies? This is rich coming from an ideology that is hell bent on controlling EVERY aspect of everyone else' lives. And just how much control do you want? Billions of babies have been killed worldwide in the last 40 years. I'd say you already have all the control you need. You've killed with impunity. Not even the Nazi's could have imagined such power in the name of reproductive freedom.
And the focal point of the boycott is this: JOIN ME by not having sex.
Isn't that an oxymoron? Although it would be wonderful to see liberal Hollywood actually employ some morals.
Milano doubled down and demonstrated more of her intellectual fire-power (or lack thereof) with this:
If Roe is overturned this will be catastrophic for the women most at risk.
Government is never bigger than when it's in our uteruses.
We must take a stand against the @GOP legislating our bodies. That means you too, men! Fight with us. We need you. #SexStrike
First of all, overturning Roe would not stop abortion. This procedure is a sacrament in the religion of liberalism so it would continue. But it would drastically reduce the numbers making the womb a much safer place. The arrogance and presumption of the left is staggering.
Second, I thought the feminists defined their lives and careers without men. Now they want help? Make up your minds! And btw, I suspect a LOT of liberal men (especially in Hollywood) are not driven by liberal ideology to support these causes, if you get my drift.
She wasn't through.
So f*** on! Yes! We've earned our right to sexual pleasure.
Whoa. Wait just a minute. I thought the point of this boycott was to abstain from sex. And then a statement like that? Call me crazy but I don't think Alyssa Milano is going to be enforcing this boycott very long.
But even after all this, she doesn't appear quite ready to actually follow her own advice. Remember, this was/is about Georgia.
Milano remains filming Netflix's second season of Insatiable in Georgia because she says she is "currently contractually obligated to be there for another month."
"But I will do everything in my power to get as many productions as possible – including Insatiable– to move out of this state which continues to put forth oppressive, hurtful policy that contradicts everything the entertainment industry stands for," she said, reported by CNN. "And if Insatiable doesn't move to another state, I will not be able to return to the show if we are blessed with a third season."
Translation: if that mean old state of Georgia doesn't stop this I am gonna hold my breath and stamp my feet!
On the plus side, at least the producers of the show won't have to worry about any "hanky panky" on the set from Milano if, and it's a big IF, she follows through on all of it.
I think the best by-line I saw on this was over at Townhall:
Liberal sex strike fails to score.
Isn't that sort of the whole point of the boycott?
John Baldwin is a native of Roanoke, Va located in the Blue Ridge Mountains of SW VA. He is a husband and father of three children. He has been a devout Christian since he surrendered his life to the Lord Jesus Christ and accepted the free gift of salvation in 1988. Politically John is a conservative who's political views were formed during the administration of Ronald Reagan. John's fulltime job is as an Applications Analyst (Software programming). John is also the host of two online radio shows on Victory Radio - "The Front Porch Gospel Music Show" and "Victory Talk Radio" (interview show). He is also an avid "oldies" music fan and is the DJ of the weekly "J-Bal Oldies Show" on the Doo Wop Cove.
Daniel Greenfield: Should Cory Booker Pay Slavery Reparations to Himself?
Former PolitiChick to Join Trump Administration
Guest Writer Tamara Colbert: The Joyful Sacrifice of Independence
, By PolitiChicks
Democrats Demonstrate Radical Agenda as Primary Debates Begin
, By John Baldwin


text:
Q: Group a dictionary based on keys and create a separate list from each group to do an insert_many() in MongoDB My input is as following. I do a GET request using the following and store the result.json() in a shared asyncio.Queue()
requests.request((method=method,url=url,params=params,headers=header,verify=False))
# result.json() has the content shown below
queue.put_nowait({
    events: [
        {"domain": 1, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 3, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 6, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 7, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 5, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 4, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 3, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
        {"domain": 1, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"}
    ]
})

My code. I could only achieve this much.
for key, logs in itertools.groupby(sorted(await queue.get(), key = operator.itemgetter('domain'))):
    for log in logs:
        print(log)

Output:
{"domain": 1, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 1, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 3, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 3, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 4, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 5, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 6, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
{"domain": 7, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},

Expected output:
For each domain a new list is created so that I can bulk insert into client specific database and query specific collection
domain_1_logs = [
    {"domain": 1, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
    {"domain": 1, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
]
if len(domain_1_logs) >= 500:
    mongoclient.get_database("domain_1").get_collection(queryname).insert_many(domain_1_logs)

domain_2_logs = [
    {"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
    {"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
    {"domain": 2, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
]
if len(domain_2_logs) >= 500:
    mongoclient.get_database("domain_2").get_collection(queryname).insert_many(domain_2_logs)

domain_3_logs = [
    {"domain": 3, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
    {"domain": 3, "eventName": "Some damn event", "eventCnt": 1, "lowLevelCategory": "very useful", "highLevelCategory": "less useful"},
]
if len(domain_3_logs) >= 500:
    mongoclient.get_database("domain_3").get_collection(queryname).insert_many(domain_3_logs)


Family membership at MTVAC offers you a full year of purposeful play for your entire family…plus you'll get it at a discount! Part of our fitness club mission is to provide an accessible and positive fitness and sports environment for children and families. It's also why we've been Alexandria's favorite place for fitness, tennis and fun for over 40 years!!
A Fitness Club for the Whole Family!
As a member, you will receive unlimited access to fitness programs designed to fuel a love of activity. Parents can feel great about keeping their family fit and healthy. Add a spouse or child and save 25% off their monthly membership!
While children must be 12 years of age or older to work out in the fitness facility, we do provide FREE childcare for younger children. Your young ones will keep busy in our childcare room that has child friendly computer games, books, games, movies and more! If you're looking for something active and fun to do together, our upstairs lounge has a ping-pong table and couches and tables for homework! There is even a computer for family use and access to free wi-fi.
We even offer programs specifically geared towards children like our Kidz Move program. This class is a personal training fitness program for kids centralized around "fun functional movement." It gets them up and moving, all while having fun!
Want to try us out before you buy a membership? We will provide you with a FREE 7-Day Trial Membership pass!
Why is Health and Fitness for the Family so Important?
Regular exercise improves your health in a number of ways. When performed on most days of the week, regular physical activity reduces the risk of developing such things as high blood pressure and diabetes and reduces your risk of dying from heart disease. Not only does regular exercise help control weight and obesity in children, it also helps build and maintain healthy bones, joints and muscles as well as promotes psychological well-being.
At MTVAC we pride ourselves for providing a fun, social, friendly environment fit for families and singles alike. It's also why we've been a community leader in the health and fitness industry for over 40 years. Becoming members you'll also enjoy our special members-only events and discounts for our pro shop. There are also monthly specials and even the ability to book kids birthday parties!
Start your family fitness journey today and join with our special pricing packages for families! You can also Give a gift of membership! It's the gift that won't get broken or forgotten—AND it's so EASY!


This oval mirror has a white-lacquered metal frame with crystal glass flowers. The base is wooden, and the mirror illuminates with eight E14 bulbs. The mirror has been restored and may be oriented either portrait or landscape.


Republican U.S. Sens. Mark Kirk of Illinois, Marco Rubio of Florida, Lindsey Graham of South Carolina, and John McCain of Arizona, in Libya.
Fresh off a visit to the newly liberated Libyan capital of Tripoli, Sen. Marco Rubio, R-Fla., said the new government in the North African nation needs international help with its police force, its prisons and its fledgling democracy.
Rubio, who sits on the Senate Foreign Relations Committee, traveled Thursday to Libya with fellow Republican Sens. Mark Kirk of Illinois, Lindsey Graham of South Carolina and John McCain of Arizona.
Rubio said he told those he met in Tripoli that people who are oppressed in other parts of the world have looked to the Libyan revolution as inspiration. He also said the American role in aiding the transition is vital for the region.
"All in all, we're pleased with the progress they've made," Rubio said. "We're very happy to see the pro-American enthusiasm that we encountered. And we have hope for Libya's future. Five years from now, three years from now, we could have a nation in the northern part of Africa that is Islamic and Arab, and yet pro-American and a democracy. And our ally in confronting the problems of the region and the world. That's the opportunity before us."
Last week at the United Nations, President Barack Obama urged Libyans to continue pressing for democracy. He told them that "the journey ahead may be fraught with difficulty," but "everything you need to build the future you seek already beats in the heart of your nation..."
Obama met privately at the U.N. with Mustafa Abdel Jalil, the chairman of Libya's new government, the National Transitional Council. The four Republican senators also met with Jalil on Thursday, Rubio said, as well as the transitional prime minister.
The new government is very concerned about its own orderly transition, Rubio said. That includes avoiding crimes of retribution and human rights abuses, "the kind of things that happen after an armed conflict in any country," he said, particularly one emerging out of the four-decade rule of Moammar Gadhafi.
"They recognize that nothing would set back the legitimacy of the Council more, and the ultimate revolution more, than stories about how people are now seeking retribution and taking vigilante justice."
Libyan rebel leaders said they'd like to see the country's assets partially unfrozen, so that there's money for basic services such as a police force, garbage patrol, and improved medical services. Once a formal government is in place, they told the senators they'd like to see the country's assets fully unfrozen by the international community.


At Gold Stream Mining Pty Ltd we are an agency that is predominately referral and invitation only. Reputation and expertise is welcomed and will be accepted and dealt with in the most professional manner. If we do not have a current role for you today there will be one tomorrow.
Our philosophy with our candidates is similar to that we have with our clients you are not just a transaction to us. Every time Gold Stream Mining places a candidate we also place our name next to yours.
Feel free to make contact by uploading your resume with a note. It might just be the best decision you make.


text:
Q: CakePHP remember me with Auth I have successfully used Auth, but unfortunately, it seems that it does work only with Session. I want that if user checks "Remember Me" checkbox, I would use Cookie and he would be logged in for 2 weeks. I can't find anything in official book and in Google I found just few and not great blog posts. Is there any way to implement this without rewriting the core?

A: See this URL i think it is very help full to you.
http://lecterror.com/articles/view/cakephp-and-the-infamous-remember-me-cookie
Or Try this
function login() {
    if ($this->Auth->user()) {
        if (!empty($this->data) && $this->data['User']['remember_me']) {
            $cookie = array();
            $cookie['username'] = $this->data['User']['username'];
            $cookie['password'] = $this->data['User']['password'];
            $this->Cookie->write('Auth.User', $cookie, true, COOKIE_EXPIRE);
            unset($this->data['User']['remember_me']);
        }

        $this->LogDetail->Write('activity','has logged IN');
        $this->redirect($this->Auth->redirect());
    }

    if (empty($this->data)) {
        $cookie = $this->Cookie->read('Auth.User');
        if (!is_null($cookie)) {
            if ($this->Auth->login($cookie)) {
                $this->Session->destroy('Message.Auth'); # clear auth message, just in case we use it.
                $this->LogDetail->Write('activity','has been authenticated via cookie and is now logged IN');

                $this->redirect($this->Auth->redirect());
            } else {
                $this->LogDetail->Write('activity','attempted to gain access with an invalid cookie');
                $this->Cookie->destroy('Auth.User'); # delete invalid cookie

                $this->Session->setFlash('Invalid cookie');
                $this->redirect('login');
            }
        }
    }
}

A: use CookeAuthenticate adapter:
https://github.com/ceeram/Authenticate/blob/master/Controller/Component/Auth/CookieAuthenticate.php
here more info:
https://github.com/ceeram/Authenticate/wiki/Set-Cookie

A: In your user controller:
public function beforeFilter() {
    $this->Auth->allow(array('login', 'register'));
    parent::beforeFilter();
}

public function login() {
    if ($this->request->is('post')) {

        if ($this->Auth->login()) {

            // did they select the remember me checkbox?
            if ($this->request->data['User']['remember_me'] == 1) {
                // remove "remember me checkbox"
                unset($this->request->data['User']['remember_me']);

                // hash the user's password
                $this->request->data['User']['password'] = $this->Auth->password($this->request->data['User']['password']);

                // write the cookie
                $this->Cookie->write('remember_me_cookie', $this->request->data['User'], true, '2 weeks');
            }

            return $this->redirect($this->Auth->redirect());

        } else {
            $this->Session->setFlash(__('Username or password is incorrect.'));
        }
    }

    $this->set(array(
        'title_for_layout' => 'Login'
    ));
}

public function logout() {
    // clear the cookie (if it exists) when logging out
    $this->Cookie->delete('remember_me_cookie');

    return $this->redirect($this->Auth->logout());
}

In the login view:

Login

<?php echo $this->Form->create('User'); ?>
    <?php echo $this->Form->input('username'); ?>
    <?php echo $this->Form->input('password'); ?>
    <?php echo $this->Form->checkbox('remember_me'); ?> Remember Me
<?php echo $this->Form->end('Login'); ?>

In your AppController:
public $components = array(
    'Session',
    'Auth',
    'Cookie'
);

public $uses = array('User');

public function beforeFilter() {
    // set cookie options
    $this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#HKis~#^';
    $this->Cookie->httpOnly = true;

    if (!$this->Auth->loggedIn() && $this->Cookie->read('remember_me_cookie')) {
        $cookie = $this->Cookie->read('remember_me_cookie');

        $user = $this->User->find('first', array(
            'conditions' => array(
                'User.username' => $cookie['username'],
                'User.password' => $cookie['password']
            )
        ));

        if ($user && !$this->Auth->login($user['User'])) {
            $this->redirect('/users/logout'); // destroy session & cookie
        }
    }
}

A: Remember me is nothing else but session identified with a cookie, but cookie lifetime set to infinity. Look at Config/core.php for session cookie lifetime.

A: I think you need to know about CakePHP Security levels. Try to lower the security of your cakePHP. CakePHP's Config variables documentation. I had written a blog about it also a long ago.

A: you can try this
if ($this->Auth->login())
        {
            if (!empty($this->data['User']['remember']))
            {
                $cookie = array();
                $cookie['login'] = $this->data['User']['login'];
                $cookie['password'] = $this->data['User']['password'];
                                    $cookie['language'] =$this->data['User']['language'];
                $this->Cookie->write('Auth.projectname', $cookie, true, '+1 years');
                unset($this->data['User']['remember']);

A:  public function admin_login() {
        $this->layout = 'admin_login';
        if (count($this->Session->read("Auth.User"))) {
            $usr = $this->Session->read("Auth.User");
            if ($usr['role'] == 'A' || $usr['role'] == 'RA' || $usr['role'] == 'MAfA' || $usr['role'] == 'Af' || $usr['role'] == 'FAA')
                return $this->redirect(array('controller' => 'dashboard', 'action' => 'view'));
        }
        if ($this->request->is('post')) {

            if ($this->request->data['User']['remember_me']=="1") {
//                pr($this->request->data);
//                die('sdd');

                $this->Cookie->write('username', $this->request->data['User']['username'], true, '1 year');
                $this->Cookie->write('password', $this->request->data['User']['password'], true, '1 year');
            } else {
                $this->Cookie->destroy();
            }
            /*
             * Check if email or username is passed in form
             */
            $uname = $this->request->data['User']['username'];
            //login via email
            if (filter_var($uname, FILTER_VALIDATE_EMAIL)) {
                $u = $this->User->findByemail($uname);
            } else { //login via username
                $u = $this->User->findByusername($uname);
            }
            if ($u) {
                $this->request->data['User']['username'] = $u['User']['username'];
                /*                 * *
                 * Error if user is not active
                 */
                if ($u['User']['user_status'] != 'active') {
                    $this->Session->setFlash(__('Sorry! Your account is not active.'), 'default', array('class' => 'alert alert-danger'));
                } elseif ($this->Auth->login()) { //if logged in
                    $user_caps = $this->fetchCapabilitiesByRole($u['User']['role']);
                    $this->Session->write("Auth.User.privileges", array('capabilities' => $user_caps['capabilities'], 'geo_areas' => array()));
                    if ($u['User']['role'] == 'A' || $u['User']['role'] == 'RA' || $u['User']['role'] == 'Af' || $u['User']['role'] == 'MAfA' || $u['User']['role'] == 'FAA')
                        return $this->redirect(array('controller' => 'dashboard', 'action' => 'view'));
                    return $this->redirect($this->Auth->redirect());
                }else { //if invalid
                    $this->Session->setFlash(__('Invalid username or password.'), 'default', array('class' => 'alert alert-danger'));
                }
            } else {//if user does not exists
                $this->Session->setFlash(__('User does not exists.'), 'default', array('class' => 'alert alert-danger'));
            }
        }
    }

A: It's been a while since the question was answered but hopefully this can help to ones that come after me.
I've written short walkthrough on how to setup 'remember me' functionality using Auhenticate Plugin from Ceeram
More info here: http://mirkoborivojevic.com/posts/2013/08/10/setup-remember-me-functionality-in-cakephp/


Tired of "Callbacks and Curtain Calls" After Lights Out? Try Bedtime Tickets!
Bedtime tickets are a quick and easy way to manage those "callbacks and curtain calls" that all kids like to make after the bedtime routine is over. Bedtime tickets are small cards good for one or two more callbacks or curtain calls. These tickets are a great way to set limits at bedtime in a way that still lets kids feel like they have some control but that keeps you from granting dozens of requests (and pulling your hair out).
Callbacks are the requests your children make when they call you back to their room after the bedtime routine is over for "just one more thing." They might want one more story or one more water refill or one more escorted trip to the bathroom. These are not a problem, of course, unless there are waaaay too many!
Curtain calls refer to the trips your children make out of their room to find you again when you were sure they were finally asleep.
You can make simple bedtime tickets by taking 3×5 cards and decorating them with your child during the day. Feel free to go crazy with the glitter and stickers!
Be sure your bedtime routine addresses all of the usual things your children need (final bathroom trip, cup of water on the bedside table, lovey found and tucked in, some reading time to wind down, and a final hug and kiss). Then, when the bedtime routine is over, give your child two tickets along with a reminder that a ticket will be needed for any more requests.
If your child calls you back to the bedroom or makes a curtain call out of the room to find you, ask for a ticket and quickly grant the request. (These requests should be ones that only take a minute or two. I worked with one family whose child was clever enough to use ticket to order a pizza!) The tickets expire in ten minutes and unused or expired tickets can be traded for a small reward in the morning. A timer can be useful to make sure that there's no confusion about when they have expired.
If your child's request is vague ("I don't like my bed"), let him or her know that you'll do "any one thing" to fix it (as long as it doesn't involve your child leaving the bedroom, of course).
Sleep Paralysis: What is it, what causes it and what can I do about it?


A new isolated-pentagon-rule (IPR) C100(417)Cl28 has been captured, but its formation mechanism is still unclear. Herein we have used density functional theory (DFT) to study the possible reaction pathways, including Stone-Wales (SW) transformation, direct chlorination, and skeletal transformation for C100(417). The calculated results show that the major source of C100(417) is the skeletal transformation of C102(603), including chloride formation, C2 elimination, and SW transformation. The results satisfactorily explained the experimental observations, and provide useful guidance for the synthesis of fullerene chlorides.
Fanhua YIN,Kai TAN. Density Functional Theory Study on the Formation Mechanism of Isolated-Pentagon-Rule C100(417)Cl28[J].Acta Phys. -Chim. Sin., 2018, 34(3): 256-262.
1 Xie S. Y. ; Gao F. ; Lu X. ; Huang R. B. ; Wang C. R. ; Zhang X. ; Liu M. L. ; Deng S. L. ; Zheng L. S. Science 2004, 304, 699.
2 Tan Y. Z. ; Xie S. Y. ; Huang R. B. ; Zheng L. S. Nat. Chem. 2009, 1, 450.
3 Wang S. ; Yang S. ; Kemnitz E. ; Troyanov S. I. Inorg. Chem. 2016, 55, 5741.
4 Troyanov S. I. ; Yang S. ; Chen C. ; Kemnitz E. Chem. Eur. J. 2011, 17, 10662.
5 Yang S. ; Wei T. ; Kemnitz E. ; Troyanov S. I. Angew. Chem. Int. Ed. 2012, 124, 8364.
6 Stone A. ; Wales D. Chem. Phys. Lett. 1986, 128, 501.
7 Ioffe I. N. ; Mazaleva O. N. ; Chen C. ; Yang S. ; Kemnitz E. ; Troyanov S. I. Dalton. Trans. 2011, 40, 11005.
8 Ioffe I. N. ; Goryunkov A. A. ; Tamm N. B. ; Sidorov L. N. ; Kemnitz E. ; Troyanov S. I. Angew. Chem. Int. Ed. 2009, 48, 5904.
9 Ioffe I. N. ; Mazaleva O. N. ; Sidorov L. N. ; Yang S. ; Wei T. ; Kemnitz E. ; Troyanov S. I. Inorg. Chem. 2012, 51, 11226.
10 Yang S. ; Wei T. ; Wang S. ; Ignat'eva D. V. ; Kemnitz E. ; Troyanov S. I. Chem. Commun. 2013, 49, 7944.
11 Ioffe I. N. ; Mazaleva O. N. ; Sidorov L. N. ; Yang S. ; Wei T. ; Kemnitz E. ; Troyanov S. I. Inorg. Chem. 2013, 52, 13821.
12 Wang S. ; Yang S. ; Kemnitz E. ; Troyanov S. I. Angew. Chem. Int. Ed. 2016, 55, 3235.
13 Zhao X. ; Goto H. ; Slanina Z. Chem. Phys. 2004, 306, 93.
14 Cai W. ; Xu L. ; Shao N. ; Shao X. ; Guo Q. J. Chem. Phys. 2005, 122, 184318.
15 Hao Y. ; Tang Q. ; Li X. ; Zhang M. ; Wan Y. ; Feng L. ; Chen N. ; Slanina Z. K. ; Adamowicz L. ; Uhlík F. Inorg. Chem. 2016, 55, 11354.
16 Chen C. H. ; Abella L. ; Cerón M. R. ; Guerrero-Ayala M. A. ; Rodríguez-Fortea A. ; Olmstead M. M. ; Powers X. B. ; Balch A. L. ; Poblet J. M. ; Echegoyen L. J. Am. Chem. Soc. 2016, 138, 13030.
17 Cai W. ; Li F. F. ; Bao L. ; Xie Y. ; Lu X. J. Am. Chem. Soc. 2016, 138, 6670.
18 Yang S. ; Wang S. ; Kemnitz E. ; Troyanov S. I. Angew. Chem. Int. Ed. 2014, 53, 2460.
19 Yang S. ; Wei T. ; Scheurell K. ; Kemnitz E. ; Troyanov S. I. Chem. Eur. J. 2015, 21, 15138.
20 Jin F. ; Yang S. ; Kemnitz E. ; Trojanov S. I. J. Am. Chem. Soc. 2017, 139, 4651.
21 Fowler P. DE Manolopoulos An atlas of Fullerenes Oxford, UK: Oxford University Press, 1995.
22 Becke A. D. J. Chem. Phys. 1993, 98, 5648.
23 Gonzalez C. Schlegel H. B. J. Chem. Phys. 1989, 90, 2154.
24 FrischM.;TrucksG.;SchlegelH.et al.Gaussian 09, Revision A. 1.;Gaussian, Inc:Wallingford, CT,2009.
25 Yoshida M. ; Gotō H. ; Hirose Y. ; Zhao X. ; ōsawa E. J. Theo. Chem. 1996, 1, 163.
26 Shao N. ; Gao Y. ; Yoo S. ; An W. ; Zeng X. C. J. Phys. Chem. C 2006, 110, 7672.
27 Slanina Z. ; Lee S. L. ; Uhlík F. ; Adamowicz L. ; Nagase S. Theor. Chem. Acc. 2007, 117, 315.
28 Bettinger H. F. ; Yakobson B. I. ; Scuseria G. E. J. Am. Chem. Soc. 2003, 125, 5572.
 Ai-Xi CHEN,Hong WANG,Sai DUAN,Hai-Ming ZHANG,Xin XU,Li-Feng CHI. Potential-Induced Phase Transition of N-Isobutyryl-L-cysteine Monolayers on Au (111) Surfaces [J]. Acta Phys. -Chim. Sin., 2017, 33(5): 1010-1016.
 GÜR Aycan. Dissolution Kinetics of Calcined Ulexite in Ammonium Chloride Solutions at High Solid-to-Liquid Ratios[J]. Acta Phys. -Chim. Sin., 2006, 22(10): 1287 -1290 .
 Bian Guo-Zhu; Jiang Ming; Fu Yi-Lu; Ji Ming-Rong. Chemical States and Composition of the Surface Species of K-MoO3/γ-Al2O3 Catalysts[J]. Acta Phys. -Chim. Sin., 1993, 9(05): 650 -656 .
 Wang Yu;He Feng-Rong;Liu Guan-Kun;Chen Liu-Ping;Tong Ye-Xiang. Electrical Conductivity of Four Neodymium Salts in Dimethylformamide[J]. Acta Phys. -Chim. Sin., 2002, 18(09): 850 -854 .


text:
Why Is Most Of Humanity Concentrated In India And China?
John Staughton 24 Dec 2016 (Updated: 3 Dec 2019)
The ratio of human survival and occupation of the planet has always been similar, but modern advancements have allowed those numbers to increase exponentially, so the difference is more obvious.
According to our best estimates, 10,000 years ago, after the end of the last Ice Age, there were only a few million people living on this planet. 9,000 years later, that number had not exceeded 500 million. Yet now, only 1,000 years after that, the population continues to skyrocket around the globe. For most people alive today, saying that the global population is around 6 or 7 billion seems normal, but by 2050, there may be 10 billion people crowded on this pale, blue dot.
Shockingly enough, despite there being 196 countries in the world, a huge amount of the world's population lives in just two of them – India and China. In fact, 36% of human beings live in one of those two countries. But WHY?
The Spread of Humanity
As mentioned above, human beings weren't always particularly good at surviving, and the planet wasn't the most hospitable place. Following the last Ice Age, is took roughly 9,000 years for the population to go from a few million up 300 million. At that time, the Americas were relatively empty, Africa and Europe had roughly 100 million, and the remaining people were in the Asian continent.
Following the initial spread of humanity from Africa, China and India had proven to be two of the most hospitable places for hunting, gathering, agriculture and survival, primarily due to the climate conditions and crop choices. With more availability for farming and healthy living, survival rates were higher, and more space and food meant that more babies could be born. There were definitely more people living in Asia 1,000 years ago, but there were only a hundred million or so more than were living in the rest of the world.
All over the world, babies were born and people died at relatively similar rates. Many people didn't even survive until childbearing age, which kept the world's population in relatively check. The inability to mass-produce food also made larger populations less feasible. It is also important to consider that wars and plagues would have had much longer and more impact in the past, as the number of people was so much smaller, life was so much shorter, and the conditions for birth so narrowly successful in many parts of the world.
Environmental conditions and the geography of the world also was a major factor in this population breakdown on the planet. There are huge swaths of land that cannot be inhabited, such as Antarctica and the Arctic Circle, as well as harsh deserts on every continent where agriculture cannot grow. You must also factor in large mountain ranges, tropical rainforests, tundra, and areas with high salt content, where plants cannot grow and consistent living is simply not an option. When you eliminate those regions, that leaves the large landmass of the Indo-China plateau as one of the most uninterrupted, and viable areas on the planet to grow crops.
The choice of agriculture was also a huge decision; rice-growing and -consuming nations tend to have larger populations, as there are far more calories produced in a rice paddy than a wheat or cornfield. However, growing rice is a hard business, so larger families meant a built-in workforce to ensure they had a good harvest each year. This naturally led to more children and a society with a calorie capacity to support more people.
The Leap to a Billion
In the past 1,000 years, human medicine didn't make too any huge improvements, at least not until the 1800s or so. At that point, the global population hit 1 billion for the very first time, and we haven't looked back since. With ongoing advancements in science and medicine, as well as agricultural practices that have revolutionized the way we feed the world, people began to live longer. More and more children survived into childbearing age and had families of their own, and the population grew – all over the world.
The rise of industry and large-scale agriculture meant that families could be much bigger than they had been in the past, and the social effects of the rural-urban divide led to more complex societies, more cities, and many more people. Today, the advantage that Asia had enjoyed for the past 10,000 years has not disappeared.
If 1/3 of the world's population was centered in Asia (namely China and India) 1,000 years ago, it makes sense that roughly 1/3 would also be located there now! The population growth dynamics and the factors that allowed for larger families and a more abundant food supply are still present in China and India.
Obviously, there are other social, cultural, religious and political factors that play into this ultimately one-sided population, but the fact is that populations increase exponentially. That means, with a higher base level to begin with in China and India, the population explosion of the past 200 years is more prominently seen there. As a prime example of our increasingly imbalanced planet, more than 51.5% of the world's population exists in an Asian bubble that contains only 19 countries.
If the experts are right, and we level off at 10 billion people by 2050, I wouldn't suggest moving to India or China. If you thought taking the train was hard before, just wait until 2.5 billion people live in each of those countries!
Asia Leadership Program
The short URL of the present article is: http://sciabc.us/PoUXb
John Staughton is a traveling writer, editor, publisher and photographer who earned his English and Integrative Biology degrees from the University of Illinois. He is the co-founder of a literary journal, Sheriff Nottingham, and the Content Director for Stain'd Arts, an arts nonprofit based in Denver. On a perpetual journey towards the idea of home, he uses words to educate, inspire, uplift and evolve.
Why Doesn't Rain Wash Away Fog?
John Staughton January 18, 2016
How Did World War Two Change Rocket Technology?
Raag Trivedi August 5, 2019
Why Do Your Lips Get Chapped More In Winter?
Ashish February 25, 2016
Why Does Squinting At A Light Make A Plus Sign Shape?
John Staughton October 10, 2019
Why Does Alcohol Consumption Cause Blurred Vision?
Mahak Jalan July 13, 2018
Why Does A Fold In Paper Become Permanent?
John Staughton December 21, 2019
What's The Difference Between Various Types Of Soaps, Shampoo And Detergents?
Ashish February 8, 2018
Can Fat Cells Help Prevent Obesity?
Mahak Jalan August 29, 2018
Why Do Speakers Make A Weird Noise Near A Ringing Phone?
John Staughton March 10, 2016
Why Different Countries Have Different Standard Voltages?
Ashish April 20, 2016
How And Why Are Vortex Rings Created?
Can Bacteria Go Extinct?
John Staughton April 4, 2019
Tags: Psychology
What Are The Three Waves Of Feminism?
How Do Our Cells Produce Sound?
What Is Bioremediation?


Fair Trade Fiesta involves people of all ages, cultures and backgrounds to raise more awareness of World Fair Trade Day and Scotlands recent renewal of Fair Trade Nation status and of the Fair Trade Movement through a vivid Carnival Parade and engaging FREE five hour Concert with Red Hot Chilli Pipers headlining the event and over 200 performers on board.
The event delighted to welcome Fair Trade Ambassador, broadcaster & journalist Gail Porter as well President of the World Fair Trade Organisation, Rudi Dalvai, attending from Italy.
With a fantastic Carnival Parade from The City Chambers in the heart of The Royal Mile, going down to Princes Street Gardens and at 2pm, the start of FREE five hour world music concert with amazing performers: Got Soul, Cantara, Red Hot Chilli Pipers, Zuba, Kyle and the Radix, Daniel Allinson, Nadia Alkoc, Davidson Mains Pipe Band and Pulse of the Place, over 200 performers and speakers including Minister for Europe and International Development Dr. Alasdair Allan, President Dalvai.
What makes Fair Trade helps farmers and producers all around the world to obtain fair prices for their goods while also supporting better working conditions. We believe in fairer more sustainable practises that Fair Trade aspires to and therefore feel strongly that platforming such an engaging event as Fair Trade Fiesta will not only provide people with positive and uplifting experience but also educate and inspire consumers to keep buying and supporting the Fair Trade and Fairtrade products.
Fair Trade Fiesta is proud to celebrate Scotland's Fair Trade Nation recent renewal status, this celebration event engaging young people, schools and universities, interfaith groups, community groups, disability groups, Fair Trade organisations/businesses and individuals.


The Library of Congress > Chronicling America > The Dessert to the true American.
Vol. 1, no. 3 (July 28, 1798)-v. 2, no. 7 (Aug. 19, 1799).
Film incomplete: v. 2, no. 6 wanting.
On film: Some pages are missing.
Supplement to the True American. Cf. Evans. American bibliography.