text:
Plastic resin pellet pollution
A handful of nurdles, spilled from a train in Pineville, Louisiana, in the United States
Plastic resin pellet pollution is a type of marine debris originating from plastic particles utilized in manufacturing large-scale plastics. These pre-production plastic pellets are created separately from the user plastics they are melted down to form, and pellet loss is incurred during both the manufacturing and transport stages.[1] Commonly referred to as nurdles, these plastics are released into the open environment, creating pollution in the oceans and on beaches.[2]
2 Environmental impact
4 Current progress and solutions
5 Actions for creating awareness
Plastic resin pellets are classified as primary source microplastics, meaning that they were intentionally produced at the size ranging from 1–5 mm in diameter.[3] Approximately 60 billion pounds (27 million tonnes) of nurdles are manufactured annually in the United States.[4] One pound of pelletized HDPE contains approximately 25,000 nurdles (approximately 20 mg per nurdle). They are typically under 5 mm (0.20 in) in diameter.[5]
Environmental impact[edit]
Nurdles on a beach in southwest France, 2011.
Nurdles are a major contributor to marine debris. During a three-month study of Orange County beaches researchers found them to be the most common beach contaminant.[6] Bathing beaches in East Lothian, Scotland have been shown to have covered with E. coli and Vibrio biofilms, according to a 2019 study.[7][8]
Waterborne nurdles may either be a raw material of plastic production, or from larger chunks of plastics.[9] A major concentration of plastic may be the Great Pacific garbage patch, a growing collection of marine debris known for its high concentrations of plastic litter.
Nurdles that escape from the plastic production process into waterways or oceans have become a significant source of ocean and beach plastic pollution. Plastic pellet pollution that has been monitored in studies is mainly found in the sediments and beach areas and is usually polyethylene or polypropylene, the two main plastic polymers found in microplastic pollution.[10] Marine life is severely threatened by these small pieces of plastic; the creatures that make up the base of the marine food chain, such as krill, are prematurely dying by choking on nurdles.[11]
Nurdles have frequently been found in the digestive tracts of various marine creatures, causing physiological damage by leaching plasticizers such as phthalates. Nurdles can carry two types of micropollutants in the marine environment: native plastic additives and hydrophobic pollutants absorbed from seawater. For example, concentrations of PCBs and DDE on nurdles collected from Japanese coastal waters were found to be up to 1 million times higher than the levels detected in surrounding seawater.[12]
Plastic microbeads used in cosmetic exfoliating products are also found in water.
Incidents[edit]
USA - Pennsylvania - Semi-truck crash leading to release of bright blue colored nurdles into Pocono Creek, and the waterways of the Lehigh Valley.[13]
South Africa - Durban - Nurdle spill of about 2 billion nurdles (49 tons), from a shipping container in Durban Harbor, requiring extended cleanup efforts.[14] "The South African Association for Marine Biological Research (SAAMBR) has sent out an urgent appeal for beach users along the entire South African coast to try and assist in collecting as many of these nurdles as possible." These nurdles have also been spotted washing up on the shore in Western Australia.[15]
UK - "The Great Nurdle Hunt" occurring from June 2-5th, 2017 - across the United Kingdom drew attention to the issue of plastic pellet pollution. A program started by Fidra, a Scottish environmental charity, sourced information on nurdles from citizens across the region using shared photos to better understand the makeup of pollution across beaches in the UK.[16] The nurdle hunts occurring earlier in 2017 determined that 73% of UK beaches had nurdle pollution.[17]
USA - San Francisco Bay Coastal Cleanup from multiple nurdle spills.[18]
In Hong Kong, after being blown by Typhoon Vicente on 24 July 2012, some containers belonging to Chinese oil giant Sinopec which were carrying over 150 tonnes of plastic pellets were blown into the sea, washing up on southern Hong Kong coasts, such as Shek O, Cheung Chau, Ma Wan and Lamma Island. The spill disrupted marine life and is being credited with killing stocks of fish on fish farms.[19]
Current progress and solutions[edit]
The plastic industry has responded to the increased interest and concern for plastic pellet loss and pollution sources. Operation Clean Sweep was created by SPI: The Plastics Industry Trade Association in 2001 and joined by the American Chemistry Council with the goal of zero pellet loss for plastic manufacturers.[20] This voluntary stewardship program provides its members with a manual which guides them through ways in which they can reduce pellet loss within their own facilities and provides the necessary training.[21][22]
In 2008, California passed a "nurdle law," which "specifically names pre-production plastic pellets (nurdles) as a pollutant".[23]
Actions for creating awareness[edit]
On April 11, 2013 in order to create awareness, artist Maria Cristina Finucci founded The Garbage Patch State at UNESCO[24] –Paris in front of Director General Irina Bokova. It is the first of a series of events under the patronage of UNESCO and of Italian Ministry of the Environment.[25]
Microbead
^ "What's resin pellet? :: International Pellet Watch". www.pelletwatch.org. Retrieved 2017-11-30.
^ Hammer, Jort; Kraak, Michiel H. S.; Parsons, John R. (2012). Reviews of Environmental Contamination and Toxicology. Reviews of Environmental Contamination and Toxicology. 220. Springer, New York, NY. pp. 1–44. doi:10.1007/978-1-4614-3414-6_1. ISBN 9781461434139. PMID 22610295.
^ GESAMP (2015). "Sources, fate and effects of microplastics in the marine environment: a global assessment" (Kershaw, P. J., ed.). (IMO/FAO/UNESCO-IOC/UNIDO/WMO/IAEA/UN/UNEP/UNDP Joint Group of Experts on the Scientific Aspects of Marine Environmental Protection). Rep. Stud. GESAMP No. 90, 96 p.
^ "Heal the Bay - The Pacific Protection Initiative - AB 258: Nurdles". 20 April 2008. Archived from the original on 20 April 2008. CS1 maint: BOT: original-url status unknown (link)
^ "What's a nurdle?". 7 November 2006. Archived from the original on 2009-12-21. Retrieved 2009-12-21.
^ Moore, Charles (2002). "A comparison of neustonic plastic and zooplankton abundance in southern California's coastal waters and elsewhere in the North Pacific". Algalita Marine Research Foundation.
^ Gwinnett, Claire (2019-02-17). "The major source of plastic pollution you've probably never heard of". Fast Company. Retrieved 2019-02-18.
^ Rodrigues, Alyssa; et al. (2019). "Colonisation of plastic pellets (nurdles) by E. coli at public bathing beaches". Marine Pollution Bulletin. 139: 376–380. doi:10.1016/j.marpolbul.2019.01.011. PMID 30686440.
^ Ayre, Maggie (7 December 2006). "Plastics 'poisoning world's seas'". BBC Online. BBC News.
^ Weisman, Alan (July 10, 2007). "9". The World Without Us. Thomas Dunne Books. ISBN 978-0-312-34729-1.
^ Mato Y: "Plastic resin pellets as a transport medium for toxic chemicals in the marine environment", "Environmental Science & Technology" 35(2), pages 318–324, 2001
^ Thompson, Carol. "Thousands of plastic pellets have spilled into waterways in Poconos: 'This is going to be extremely challenging'". The Morning Call. Retrieved 2019-02-18.
^ "Nurdles KZN, SA. Project Duration: Long Term". Coast KZN. Retrieved 2019-02-18.
^ "The Great Nurdle Disaster: What to do if you find nurdles". Two Oceans Aquarium Cape Town, South Africa. 2 November 2018. Retrieved 2019-02-18.
^ "The Great European Nurdle Hunt" (PDF). Nurdle Free Oceans. Retrieved 2017-11-30.
^ Association, Press (2017-02-17). "Tiny plastic pellets found on 73% of UK beaches". The Guardian. ISSN 0261-3077. Retrieved 2017-11-30.
^ Freese, Alicia. "Nurdles a big problem in coastal cleanup". Bay Nature. Retrieved 2019-02-18.
^ "Sinopec pledges help to clear Hong Kong plastic spill". 9 August 2012. Retrieved 2012-08-24.
^ "Operation Clean Sweep Celebrates 25 Years | In The Hopper: SPI's Business Blog". In The Hopper: SPI's Business Blog. Retrieved 2017-11-30.
^ "OCS Program Manual - Operation Clean Sweep". Operation Clean Sweep. Retrieved 2017-11-30.
^ Entwistle, Abigail (April 11, 2018). "Why the fuss about nurdles?". phys.org. Retrieved 2019-02-18.
^ Westervelt, Amy (2015-03-27). "It's taken seven years, but California is finally cleaning up microbead pollution". The Guardian. ISSN 0261-3077. Retrieved 2019-02-18.
^ "The garbage patch territory turns into a new state - United Nations Educational, Scientific and Cultural Organization". unesco.org.
Moore, C; S Moore; M Leecaster; S Weisberg (2001). "A Comparison of Plastic and Plankton in the North Pacific Central Gyre" (PDF). Marine Pollution Bulletin. 42 (12): 1297–1300. doi:10.1016/S0025-326X(01)00114-X. ISSN 0025-326X. PMID 11827116.
Michelle Allsopp; Adam Walters; David Santillo & Paul Johnston (2006). "Plastic Debris in the World's Oceans" (PDF). Netherlands: Greenpeace.
Algal bloom
Anoxic event
Anoxic waters
Aquatic toxicology
Cultural eutrophication
Cyanotoxin
Environmental impact of shipping
Eutrophication
Fish diseases and parasites
Fish kill
Friendly Floatees
Marine debris
Marine garbage patches:
Great Pacific
Mercury in fish
Nonpoint source pollution
Nutrient pollution
Ocean deoxygenation
Plastic particle water pollution
Point source pollution
Shutdown of thermohaline circulation
Silver nanoparticles
Surface runoff
Urban runoff
Retrieved from "https://en.wikipedia.org/w/index.php?title=Plastic_resin_pellet_pollution&oldid=891483653"
Plastics and the environment
CS1 maint: BOT: original-url status unknown


OK thanks Been using a standalone version - time will tell its usefullness. Now all is good.
Re: Need to renew MC - with symphony option - is there an addtional charge?
Please check this thread on symphony option??


text:
-ent
(Latin: adjective suffix signifying action or being; performing a particular acion)
mellifluent
mordent
1. A melodic ornament in which a principal tone is rapidly alternated with the tone a half or full step below.
2. Etymology: From German, from Italian mordente, from mordere, "to bite", from Latin mordere, from Latin mordre.
opulent (adjective), more opulent, most opulent
1. Characterized by an obvious lavish display of wealth, rich abundance, or affluence.
2. Possessing or exhibiting great wealth; being affluent; being ample; as, in richly abundant supply.
1. Bearing pains or trials calmly or without complaint; steadfast despite opposition, difficulty, or adversity.
2. Calmly tolerating delay, confusion, inefficiency, etc. [Originally, patient, which comes from the Latin pati (to suffer), was applied to anyone who was under a doctor's care because he was sick or injured; however, patient has long since come to mean anyone who is under a doctor's care whether healthy or ill.
penitent (adjective), more penitent, most penitent
1. A reference to the expression of a person's feeling or showing sorrow, remorse, and regret because of having done something wrong: Luke had a penitent attitude with his parents when he accidentally broke a window in the house as he was throwing a baseball back and forth with a friend.
2. Etymology: from Latin paenitentem, referring to "a cause or a feeling of regret." © ALL rights are reserved.
portent (s) (noun), portents (pl)
1. An omen that indicates that an event is about to occur; especially, an unfortunate one: When Kate slipped on the floor of the store, after coming in from the rain, she had the portent of severe injury to her right wrist that would result in pain for a long time while it was healing.
2. A sign or a warning that something which is usually bad or unpleasant is going to take place: The dark clouds and thunder and lightning were portents that it would soon be raining very hard.
3. Etymology: from Latin portentum, "a sign or an omen" from portemdere, "to foretell or to predict." © ALL rights are reserved.
1. Powerful; mighty: "A potent fighting force."
2. Cogent; persuasive: "Several potent arguments were in his favor."
3. Producing powerful physical or chemical effects: "He used a potent drug."
4. Having or exercising great power or influence: "The higher interest rate was a potent factor in the economy."
5. Possessing inner or physical strength; powerful.
prescient (adjective), more prescient, most prescient
1. Pertaining to showing an ability to know what will happen before actually it does: Those who are prescient people claim to have the gifts of foresight, clairvoyance, premonition, or prophecy.
The police gave the bank a prescient warning that they heard that a robbery was being planned by criminals.
2. Etymology: from Latin praescient-, "knowing beforehand", from the verb praescire, from prae, "before" + scire "to know".
profulgent (adjective), more profulgent, most profulgent
Shining forth; brilliant.
prudent (adjective), more prudent, most prudent
1. A reference to having good sense in dealing with issues.
2. Relating to using good judgment in order to consider the possible consequences of doing something and to act accordingly.
3. Pertaining to managing resources so as to provide for the future.
4. Etymology: directly or via French from Latin prudent-, a contraction of provident-; present participle of providere, "to prepare in advance, to supply"; literally, "to see ahead", from videre, "to see".
pungent (adjective), more pungent, most pungent
1. Descriptive of the powerful and intense smell or taste of something: The spaghetti sauce had a very pungent taste because of the amount of cumin and ginger which was added to it!
2. Pertaining to a vivid impression on the mind due to being bright and straightforward: Jane had very pungent memories of being on the farm in her childhood. The most moving recollection was being chased down the driveway by a cow when she was only three years old! © ALL rights are reserved.
purulent (adjective)
1. Suppurative; forming or containing pus.
2. Relating to, containing, or consisting of pus.
3. Containing, discharging, or causing the production of pus.
recipient (s) (noun), recipients (pl)

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: comparing two same string hashing in bcrypt returns undefined I'm trying to hashing two same string and compare them to validate whether the password is correct or not. I've used bcrypt package in nodeJS.
When I use bcrypt.compare method, it returns undefined!
Here is my code:
var akbar, akbar2;
  bcrypt.hash('salam', saltRounds, (err, hash) => {
    akbar = hash;
    console.log(akbar);
  });

  bcrypt.hash('salam', saltRounds, (err, hash) => {
    akbar = hash;
  });

  bcrypt.compare(akbar, akbar2, (err, res) => {
    console.log(akbar, akbar2, res);
  });

here is the console result:

undefined undefined undefined
  $2b$10$6dxYYYc2Ud3dVVeWU9GcOe6v9l8FT7GR5gNC6Pt0Xc1N.Si1R.EIC

A: Because bcrypt.hash is the async function, when you compare it both bcrypt.hash may not finish yet, therefore it prints undefined for akbar and akbar2. You also cannot compare akbar and akbar2 since it will always return false. You should only compare either 'salam' with akbar or 'salam' with akbar2.
bcrypt.hash('salam', 10, (err, hash) => {
    const akbar = hash;

    bcrypt.compare('salam', akbar, (err, isMatch) => {
        console.log(isMatch);
    });
});

A: hash and compare functions work asynchronously.
There are sync counterparts of hash and compare:
var bcrypt = require('bcrypt');
const saltRounds = 10;
const myPlaintextPassword = 's0/\/\P4$$w0rD';
const someOtherPlaintextPassword = 'not_bacon';
var salt = bcrypt.genSaltSync(saltRounds);
var hash = bcrypt.hashSync(myPlaintextPassword, salt);
bcrypt.compareSync(myPlaintextPassword, hash); // true

Async is always recommended.
Hope this helps

A: Use the synchronous version of it, it's working:
userSchema.methods.correctPassword = function(candidatePassword, userPassword) {
  const res = bcrypt.compareSync(candidatePassword, userPassword);
  return res;
};

redpajama_set_name: RedPajamaStackExchange


text:
Олекса́ндр Анато́лійович Архі́пов — молодший сержант Збройних сил України, учасник російсько-української війни.

Станом на лютий 2019 року — військовослужбовець, Генеральний штаб Збройних сил України.

Нагороди
За особисту мужність, сумлінне та бездоганне служіння Українському народові, зразкове виконання військового обов'язку відзначений — нагороджений
 орденом «За мужність» III ступеня (3.11.2015).

Джерела

 Декларації

Службовці Генерального штабу ЗСУ

redpajama_set_name: RedPajamaWikipedia


text:
Winfield Scott (1786–1866) – amerykański generał, farmer i polityk, kandydat na prezydenta
 Winfield Townley Scott (1910–1968) – amerykański poeta i krytyk literacki
 Winfield Scott (1920–2015) – amerykański tekściarz, autor piosenek
 Winfield W. Scott Jr. (ur. 1927) – amerykański generał
 Winfield W. Scott III (ur. ok. 1952) – amerykański generał

Zobacz też
 SS Winfield Scott
 Winfield Scott Hancock
 Winfield Scott Schley


Like the story of Martha and Mary, this section is found only in Luke's Gospel. It is made up of two parts, a teaching on avarice and a parable to illustrate the point of the teaching.
Firstly, the teaching. A man in the crowd asks Jesus to solve a family dispute about an inheritance. This has echoes of the family dispute between Martha and Mary. Jesus' answer is in different words, but to the same effect. "Who appointed me your judge, or the arbitrator of your claims?" As mentioned before, it is obvious that Jesus doesn't wish to relay second hand messages, especially in a dispute.
Then to the parable. It is a parable about making ourselves rich in the sight of God. This is a constant theme in Luke. It is one of his favourite themes. It is at odds with the world of advertising and Storage Centres for excess possessions. It is against the culture of having plenty of good things laid by for many years to come, the culture of eat, drink and be merry and have a good time. "Fool" is the comment of the story teller.
Do we need to reassess our priorities? We need to be good stewards of God's gifts. We need to be good providers for our families. We need to be insured and superannuated and have a nest egg for an emergency. Where do I stand on the scale of being avaricious?
That is the point of the story. Materialism and consumerism are all around us.
As a Pastor it is not always easy to explain to people the exact meaning of Jesus' teaching. Of course we have to provide for the future within reason. Some of us are blest with more than others. I like to put it this way. We can all grasp what it means to be 'rich in spirit' or to be avarice in spirit. It means that our whole life is dedicated to making more money and even when we have enough we build bigger barns. The rich man in the gospel story was 'rich in spirit'. He is building bigger barns.
To be 'poor in spirit' is precisely the opposite. Money is the means to the end, not the end. At the end of our life our Balance Sheet will need to show the Fruits of the Holy Spirit, not Cash. The Fruits of the Holy Spirit are peace and joy and love, characteristics of God.


Saving for a down payment for a home purchase can be one of the biggest obstacles for many in the home buying process. There are many factors that can determine which way of saving may be appropriate for you. If you have a longer time horizon for saving, perhaps getting into the markets may be a very viable option for example. It is always best discuss your savings and financial portfolio with a certified financial planner, however, there are many, easy way to save that you can implement in your daily routine to get you started on the path to home ownership. We aren't saying these methods will give you a $50,000 down payment overnight, but, if implemented, can certainly chip away at it over time.
1. Reduce Your Rent: If you are currently renting, review what you are currently paying and see what options you may have. If you have been a good tenant, use this as leverage to negotiate with your landlord for a better rate or no increase in rate. If it is feasible, have you considered living with parents or friends while you are trying to save?
2. Track Your Spending: In a so-called "cashless economy" it is easy to lose sight of how much you are spending, when most transactions are done on credit cards and Apple Pay. Consider making a spreadsheet to track expenses or using a tool such as Mint to keep track of your spending. You might be surprised at how much you are spending on Taxis or Ubers in a month's time. It is a great way to find areas to cut down on spending.
3. Make It Automatic: Take advantage of automatic savings that may be offered by your bank. Look into options such an auto transfer of X amount of dollar each month to savings or programs that round up each purchase to the nearest dollar and transfer that to your savings. Additionally, utilize your employer's direct deposit option and add your savings account as one of the accounts to receive the pay. You can specify the dollar amount to be deposited to your savings from each paycheck. This aligns perfectly with the old saying, "Out of Sight Out of Mind"
4. Tap Your IRA: If you have been saving for years in an IRA account, you may consider taking a withdrawal as part of your down payment. The IRS has an exception which allows first-time homebuyers to withdrawal up to $10,000 without facing the normal early withdrawal penalty for people under age 59 1/2. Your withdrawal from a Traditional IRA will be subject to income tax while a withdrawal from a Roth IRA will come out tax free (assuming the account has been established for 5 years). If you are considering an IRA withdrawal, speak to a qualified tax professional for your unique situation.
5. Use Work Bonuses: If you receive an annual bonus at work, consider putting that into your down payment savings account each year. While it is important to have fun and celebrate your success, the wealth that owning a home generates will pay off more than that night out at the club.
6. Reduce Happy Hours: Everyone loves a good happy hour to help get through a tough week. If you are making it a habit 2 times a week it is costing you. Consider the average happy hour drink costing $7 with tax and tip. At twice a week, thats $728 a year on happy hour....assuming you only get one drink at each of those happy hours!
7. Check Monthly Bills: What monthly bills are you paying that might have areas to reduce the cost? Cable and cell phone bills are great places to dig deeper at the features you are paying for. Do you really need HBO at $12 a month PLUS Netflix for another $10 month in addition to the hundreds of cable channels you are getting?
8. Don't Forget Family & Friends: Discussing money with anyone is always a sour subject, especially with family and friends. However, they can be an excellent source for help with your down payment. Consider asking parents for help as an early inheritance or as your wedding gift now in exchange for not receiving a a gift at the time of marriage. Instead of dinners from friends for your birthday or gift cards, let them know you are working towards purchasing a home and cash would be the best thing you could receive right now! True friends will understand.
9. Gym Membership: Your gym membership is a great opportunity to cut down on monthly expenses. With so many fitness apps such as ClassPass, YouTube Videos, and equipment, exercising at home has never been easier. If you are an avid gym user, this option is probably not for you, but if you use your gym occasionally, it is something worth considering. Your $250/month Equinox membership is costing you $3,000 a year...that is a lot of money! If you cannot give up your memberships, look into options such as corporate discounts or special incentives that your gym or workout venue of choice offers.
10. Get Your Caffeine Dose at Home: Sometimes a morning cup of coffee (or 3) feels like it is the only thing that will get you moving...trust us we know! However, your daily trip to Starbucks during the week for a grande nonfat latte at $4.78 is costing you $1,243. Save that money and drink your coffee at home and imagine how good coffee will taste in your new home!
When you make the decision to start saving for a home, speak to a real estate agent about what you are considering purchasing. They will be able to connect you with a mortgage broker so you have a full understanding of what you can afford, and, thus, how much you have to save.
So you decided to move from your quaint suburban home to the hustle and bustle of a large city. Perhaps its for that dream job or it has always simply been a dream to experience life in a big city, either way the move is highly stressful for many. What can you expect and what should you know to make your move a little easier?
Life in a big city is more crammed, from your actual living space to the packed subway cars. When searching for your apartment, do not be shocked by the size of what your broker shows you. Unless you have a very high budget that affords you a spacious apartment with multiple beds, baths, and closets, space will be at a premium.
Closets can be hard to come by, even some of the largest apartments in NYC have smaller closets than you might currently have.
Go through your belongings before the move- this is a great opportunity to declutter and get rid of things that you no longer need or use.
Consider placing items in storage that will not fit into your new space.
Interested in moving to New York City? Contact Us and we can created a customized offering list tailored to your unique needs.
After you officially secured your apartment, visit the building before the move to get acquainted with the location of freight elevators, loading docks, etc. This is also a great time to find out about building cable and internet options.
Introduce yourself to doormen, supers, and maintenance staff before the move. A smile can go a long way, and you will come to find that these individuals can be very helpful!
The friendlier you are to building staff, the more likely they will be give you "inside information" about move-ins in regards to elevator reservations, fees, etc. Knowledge is king in big cities!
Find out what cable companies your buildings support as well as if these companies offer preferred rates for building residents. Once you have made a selection, schedule an installation as soon as you know your move-in date as many companies are booked afew weeks out.
Big cities and luxury condo buildings seem to have a fee associated with everything. Try to understand what fees you may run into during your move so you can be better prepared.
If you are renting, ensure you have enough money in your checking account before you start your apartment search to cover things such as 1st month's rent, security deposit, and broker's fee. Do not be scrambling at the last minute to transfer money and get certified bank checks….you will need these!
Buildings have different requirements for moving in as well as logistics for move-ins. Be sure to review all this information so you can pass it along to your movers. Additionally, make your move less stressful by having an inventory system in place for your belongings and your valuables.
Check your building's elevator schedule and schedule a move with them based on available timeslots. As soon as you have your date and time, pass this along to your movers so they can schedule their route accordingly to ensure timely arrival.
Verify if your building requires a Certificate of Insurance (COI) from the moving company as well as the amount. If required, ensure your moving company can provide this document. Insurance amounts vary from building to building.
Consider using a box numbering system for your belongings, so you can easily take inventory once your items arrive to the apartment.
Take caution with valuables! Keep all jewelry, watches, etc. on your person. Ladies- consider using your expensive bags rather than packing them and leaving them with the movers.
Want to know our 5th and final tip for your move to the city? Submit your email address to find out!
This is, perhaps, the most important part of the entire process as they are the ones handling your valuables and can make the experience more pleasant or a complete disaster.
This is where your broker is very valuable as they can refer you to a good moving company that has a positive history of success. Do not trust Yelp reviews, etc. as many moving companies have people write false reviews on their profiles. Too many people fall victim to selecting movers based on these false reviews.


text:
Q: How to debug Lua remotely? I'm searching for the best way to debug Lua remotely, ( like from a web browser ).
I saw RemDebug, but the last project update was done on 2006. It works with Lua 5.0 and 5.1, but Lua 5.2 is quite close, and I don't see RemDebug to get an update anytime soon.
I could mount a small embedded web-server on my debug host, and use something like RemDebug to communicate with it, and perform remote debugging via HTTP.
Suggestions are appreciated.

A: I found Hillin's Remote Lua Debugger 1.2.0.218

A: I have developed a new debugger based on RemDebug (MobDebug) with new commands, new features, bugfixes, and integration with IDEs.
MobDebug is based on TCP interaction between the client (debugee) and the server (controller). This is also the case for RemDebug and most other remote debuggers. You might be able to run on top of something else (like WebSockets or HTTP), but you still need to be able to run coroutines and debug hook to control the application being debugged.
The architecture of the debugging process is quite simple:

*

*You have an application you want to debug

*You also have your debugger with a controller

*The application loads the client components of the debugger, which opens a connection to the controller

*The controller accepts commands from a command line or an IDE (MobDebug provides both; it integrates with ZeroBraneStudio and also provides a scriptable way to run it)

*When the application is loaded, the debugger installs a debug hook, which is run on every line/call/return. From this debug hook a resume call is made to the debugger, which can then execute commands from the controller (like install a breakpoint, evaluate an expression and so on). When the next executable command is send (like run or step), the debugger yields back to the hook, which then returns back to the app allowing it to proceed.

It may be possible to mimic the existing socket interface (as it's only using connect/send/receive and select/timeout to abort the application) and reuse most of the library. I'm still not sure why you'd want to run this in a browser though as you can run the application on anything that supports TCP already (I have a working prototype debugging an application running on a mobile device from my desktop).

A: I was not sure if you need to debug lua remotely or ask about doing so over HTTP; I'm answering about the former and am not aware of a way to do so over HTTP.
Both LuaEdit and Decoda allow you to connect remotely to a running lua script (both on a different process on the same machine and on a remote machine).
Decoda can do magic and do so for a lua VM without requiring any change to the VM; with LuaEdit you need to create the VM in a specific way, using a provided DLL or library.

A: I'm not sure if this is right. Hope it helps though:
Source: http://www.keplerproject.org/remdebug/example.html
This is an example of a debugging session of the following script (test.lua):
 1    require"remdebug.engine"
 2
 3    remdebug.engine.start()
 4
 5    local tab = {
 6      foo = 1,
 7      bar = 2
 8    }
 9
10    print("Start")
11
12    function bar()
13      print("In bar 1")
14      print("In bar 2")
15    end
16
17    for i = 1, 10 do
18      print("Loop")
19      bar()
20      tab.foo = tab.foo * 2
21    end
22
23    print("End")

First run the RemDebug controller:
% lua50 controller.lua
Lua Remote Debugger
Run the program you wish to debug
At this moment you can run your target program (in another window):
% lua50 test.lua
Now go back to the window where you ran controller.lua (this assumes you are running test.lua inside C:\development\kepler on a Windows system):
Paused at file C:/development/kepler/test.lua
Type 'help' for commands

basedir C:/development/kepler/
  New base directory is C:/development/kepler/
  basedir
  C:/development/kepler/
  step
  Paused at file C:/development/kepler/test.lua line 6
  over
  Paused at file C:/development/kepler/test.lua line 7
  over
  Paused at file C:/development/kepler/test.lua line 10
  over
  Paused at file C:/development/kepler/test.lua line 15
  setb test.lua 19
  run
  You can change to the application window anytime to see its output. Back to the debugger session:

Paused at file C:/development/kepler/test.lua line 19

run
  Paused at file C:/development/kepler/test.lua line 19
  eval tab.foo
  2
  eval tab.bar
  2
  exec old_tab = tab
  nil
  exec tab = 2
  nil
  eval tab
  2
  exec tab = old_tab
  nil
  eval tab.foo
  2
  run
  Paused at file C:/development/kepler/test.lua line 19
  eval tab.foo
  4
  delb test.lua 19
  setw tab.foo == 32
  Inserted watch exp no. 1
  run
  Paused at file C:/development/kepler/test.lua line 17
    (watch expression 1: [tab.foo = 32])
  eval tab.foo
  32
  delw 1
  run
  Program finished

A: Don't know for web-browser debugging (the idea seems weird to me, maybe you can detail why you would need a web-browser debugger ?)
For a standalone debugger however, I've written a remote debugger with GUI : http://cushy-code.com/grld
It communicates with the debugged program with the socket API, so any network connection will do, no need for HTTP.
Hope this helps.


text:
Adaptation, Wetland protection / management, combat desertification, digital mapping, disaster-prone areas, gender, regional assessment, sustainable land management
(-) sustainable land management (81)
(-) gender (25)
(-) combat desertification (15)
(-) disaster-prone areas (9)
(-) Wetland protection / management (1)
(-) Adaptation (1)
Sustainable land management plays decisive role in battling climate change
On February 12th, 2018, EcoAgriculture Partners and the FAO Liaison Office for North America held the inaugural event of a new High-Level Speaker Series, Toward Sustainable Landscapes. Paula Caballero, Global Director of the Climate Program at World Resource Institute, opened the series with a brief…
WOCATpedia.net - the wiki based knowledge platform related to WOCAT now launches its first call for articles
WOCATpedia.net is a wiki based knowledge platform related to the WOCAT (World Overview of Conservation Technologies and Approaches) network. This wiki focuses, similar as the WOCAT network, on issues related to Sustainable Land Management (SLM), as e.g. Food Security, Economics of Sustainable Land…
Soil carbon sink? It depends also on nitrogen
A study just published by the Joint Research Centre (JRC) in Nature Climate Change shows that soils can be a net sink of greenhouse gases through increased storage of organic carbon.
Links between Climate Change Mitigation, Adaptation and Development in Land Policy and Ecosystem Restoration Projects: Lessons from South Africa (open access)
Links between climate change adaptation, mitigation and development co-benefits in land policy and ecosystem restoration projects are hampered by limited understanding of how multi-faceted policy, institutions and projects interact. This paper explores perceptions of co-benefits produced by two…
RECARE have collated novels, movies, maps, children's books and more - all with a 'soily' theme
Preventing and Remediating degradation of soils in Europe through Land Care (RECARE) have collated novels, movies, maps, children's books and more - all with a 'soily' theme
Land Use and Spatial Planning
Competition for land is increasing as demand for multiple land uses and ecosystem services rises. Food security issues, renewable energy and emerging carbon markets are creating pressures for the conversion of agricultural land to other uses such as reforestation and biofuels. At the same time…
Building BRIDGES between Turkey and Africa's Great Green Wall
Publication to present project BRIDGES under the FAO-Turkish Forestry Partnership programme in support of efforts to combat land degradation and desertification in Eritrea, Mauritania and Sudan, contributing to Africa's Great Green Wall initiative.
Can Strategic Spatial Planning Contribute to Land Degradation Reduction in Urban Regions? State of the Art and Future Research
Land degradation is becoming a serious environmental issue threatening fertile agricultural soils and other natural resources. There are many driving forces behind land degradation. The expansion of artificial surfaces due to various economic activities, such as housing, industry, and transport…
Conference on Climate Change, Migration and Resilience from 5th – 9th September 2018 in Bonn
Climate change is already influencing migration and population movements – and will do so in future. Two perspectives on the nexus of migration and climate change have emerged: On the one hand, much policy and research attention is directed to climate change as a cause for migration, and for…
The geography of future water challenges
Where in the world will people's lives be affected by water issues by the year 2050? What is the impact of the growing global population, further urbanisation and climate change on these water risks, the food supply and migration? This new report by the PBL Netherlands Environmental Assessment…
Responsible investment to combat land degradation emerges from Dragons' Den
Restoring degraded land could inject $84 billion a year to the global economy, according to researchers, but public resources fall short of unlocking this potential.
Climate Change, Agriculture and Migration: A Survey
This paper proposes a selective review of the classical economics-based literature on climate change and migration, focusing on the extent to which agriculture might be considered a key mediating channel linking climate change to migration. Overall, climate change is expected to have large and…
Europeans' Strategic Research Agenda for Integrated Spatial Planning, Land Use and Soil Management
Land is a limited resource. There are different – synergistic or competing – options how land can be used. Any use does impact our soil, sediment and water system to which the land is linked. A good understanding of these complex linkages is essential in order to steward land to a more sustainable…


text:
#include "MemTracker.h"

#ifdef PX_WINDOWS // only compile this source code for windows!

#define USE_HASH_MAP 1

// VC10 hash maps are abominably slow with iterator debug level == 0
//   Note: All STL containers are used internally, so their should not be any resultant conflict
#if defined(PX_VC10) && USE_HASH_MAP
#define OVERRIDE_ITERATOR_DEBUG_LEVEL 1
#else
#define OVERRIDE_ITERATOR_DEBUG_LEVEL 0
#endif

#if OVERRIDE_ITERATOR_DEBUG_LEVEL
#define _ITERATOR_DEBUG_LEVEL 0
#define _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH 1
#endif

#include "htmltable.h"
#include "foundation/PxSimpleTypes.h"
#include "foundation/PxAssert.h"
#include <stdio.h>
#include <string>
#include <string.h>
#include <assert.h>
#include <time.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <map>
#include <vector>
#include <windows.h>

#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
#include <hash_map>

#pragma warning(disable:4100 4996 4267 4239)

namespace MEM_TRACKER
{

class ContextType
{
public:
	ContextType(void)
	{
		mContext = NULL;
		mType = NULL;
		mAllocCount = 0;
		mAllocSize = 0;
	}
	ContextType(const char *context,const char *type,size_t size)
	{
		mContext = context;
		mType	= type;
		char scratch[512];
		sprintf_s(scratch,512,"PlatformAnalyzer/ContextType/%s/%s/Count(AllocCount)", mContext, mType );
		mAllocCountSpec = scratch;
		sprintf_s(scratch,512,"PlatformAnalyzer/ContextType/%s/%s/Size(AllocSize)", mContext, mType );
		mAllocSizeSpec = scratch;
		mAllocCount = 1;
		mAllocSize = size;
	}

	const	char	*mContext;
	const	char	*mType;
	physx::PxU32	mAllocCount;
	size_t			mAllocSize;
	std::string		mAllocCountSpec;
	std::string		mAllocSizeSpec;
};

class ByContextIndex
{
public:
	ByContextIndex(const char *context,const char *type)
	{
		mContext = context;
		mType = type;
	}

	const	char	*mContext;
	const	char	*mType;
};

class ByContextHasher
{
public:
	static const size_t bucket_size = 4;
	static const size_t min_buckets = 8;

	size_t operator()(const ByContextIndex &index) const
	{
		size_t hash1 = (size_t)index.mContext;
		size_t hash2 = (size_t)index.mType;
		size_t hash = hash1 ^ hash2;
		return hash;
	}

	bool operator()(const ByContextIndex &s1,const ByContextIndex &s2) const
	{
		if ( s1.mContext < s2.mContext ) return true;
		if ( s1.mContext > s2.mContext ) return false;
		return s1.mType < s2.mType;
	}
};

#if USE_HASH_MAP
typedef stdext::hash_map< ByContextIndex, ContextType, ByContextHasher > ByContextTypeHash;
#else
typedef std::map< ByContextIndex, ContextType, ByContextHasher > ByContextTypeHash;
#endif

static void getDateTime(char *date_time)
{
	time_t ltime;
	struct tm *today;
	_tzset();
	time( &ltime );
	today = localtime( &ltime );
	strftime( date_time, 128,"%A-%B-%d-%Y-%I-%M-%S-%p", today );
}

size_t getPow2(size_t s,size_t &p)
{
	size_t ret = 0;
	while ( s > p )
	{
		p = p<<1;
		ret++;
	}
	return ret;
}

class MemTrack
{
public:
  MemoryType  mType;
  size_t       mSize;
  size_t       mThreadId;
  const char *mContext;
  const char *mClassName;
  const char *mFileName;
  physx::PxU32       mLineNo;
  size_t       mAllocCount;
};

class ByType
{
public:
	ByType(size_t size)
	{
		mSize = size;
		mCount = 1;
	}
	ByType(void) { };
	size_t mSize;
	size_t mCount;
};

class BySource
{
public:
  BySource(void) { };

  BySource(const MemTrack &t)
  {
	mClassName = t.mClassName;
	mFileName  = t.mFileName;
	mLineNo    = t.mLineNo;
	mSize      = t.mSize;
	mLineNo    = t.mLineNo;
	mCount = 0;
  }

  const char *mClassName;
  const char *mFileName;
  size_t       mLineNo;
  size_t       mSize;
  size_t       mCount;
};

#if USE_HASH_MAP
typedef stdext::hash_map< size_t, ByType > ByTypeHash;
#else
typedef std::map< size_t, ByType > ByTypeHash;
#endif

class BySourceIndex
{
public:
	BySourceIndex(const char *fileName,physx::PxU32 lineno)
	{
		mFileName = fileName;
		mLineNo = lineno;
	}

	const	char	*mFileName;
	physx::PxU32			mLineNo;
};

class BySourceHasher
{
public:
	static const size_t bucket_size = 4;
	static const size_t min_buckets = 8;

	size_t operator()(const BySourceIndex &index) const
	{
		size_t hash = (size_t)index.mFileName;
		hash = hash^index.mLineNo;
		return hash;
	}

	bool operator()(const BySourceIndex &s1,const BySourceIndex &s2) const
	{
		if ( s1.mFileName < s2.mFileName ) return true;
		if ( s1.mFileName > s2.mFileName ) return false;
		return s1.mLineNo < s2.mLineNo;
	}
};

#if USE_HASH_MAP
typedef stdext::hash_map< BySourceIndex, BySource, BySourceHasher > BySourceHash;
typedef stdext::hash_map< size_t , MemTrack > MemTrackHash;
#else
typedef std::map< BySourceIndex, BySource, BySourceHasher > BySourceHash;
typedef std::map< size_t , MemTrack > MemTrackHash;
#endif

typedef std::vector< MemTrack > MemTrackVector;

class ReportContext
{
public:
  ReportContext(const char *context)
  {
	mContext = context;
  }
  void add(const MemTrack &t)
  {
	  assert(t.mAllocCount > 0 );
	mMemTracks.push_back(t);
  }

  const char * getContext(void) const { return mContext; };

  // first we generate a report based on type.
  void generateReport(physx::HtmlDocument *document,physx::HtmlTable *contextTable)
  {
	  unsigned int totalMemory = 0;
	  unsigned int totalAllocations = 0;
	  unsigned int typeCount = 0;
	  unsigned int sourceCount = 0;

	  {

		ByTypeHash bt;
		MemTrackVector::iterator i;
		for (i=mMemTracks.begin(); i!=mMemTracks.end(); i++)
		{
		  const MemTrack &t = (*i);
		  size_t hash = (size_t)t.mClassName;
		  ByTypeHash::iterator found = bt.find(hash);
		  if ( found == bt.end() )
		  {
			  ByType b(t.mSize);
			  bt[hash] = b;
		  }
		  else
		  {
			  ByType &b = (ByType &)(*found).second;
			  b.mSize+=t.mSize;
			  b.mCount++;
		  }
		}

		{
			typeCount = bt.size();

		  char scratch[512];
		  char date_time[512];
		  getDateTime(date_time);
		  sprintf(scratch,"Memory Usage by Class Name or Memory Type for Context: %s : %s", mContext, date_time );
		  physx::HtmlTable *table = document->createHtmlTable(scratch);
		  //                    1           2            3
		  table->addHeader("Memory/Type,Memory/Size,Allocation/Count");
		  table->addSort("Sorted By Memory Size",2,false,3,false);
		  for (ByTypeHash::iterator iter = bt.begin(); iter !=bt.end(); ++iter)
		  {
			ByType b = (*iter).second;
			table->addColumn( (const char *)(*iter).first );
			table->addColumn( (physx::PxU32)b.mSize );
			table->addColumn( (physx::PxU32)b.mCount );
			table->nextRow();
		  }
		  table->computeTotals();
		}
	  }

	  {

		BySourceHash bt;
		MemTrackVector::iterator i;
		for (i=mMemTracks.begin(); i!=mMemTracks.end(); i++)
		{
		  const MemTrack &t = (*i);
		  BySource b(t);
		  BySourceIndex index(b.mFileName,b.mLineNo);
		  BySourceHash::iterator found = bt.find(index);
		  if ( found == bt.end() )
		  {
			  b.mCount = 1;
			  bt[index] = b;
		  }
		  else
		  {
			  BySource &bs = (BySource &)(*found).second;
			  bs.mSize+=t.mSize;
			  bs.mCount++;
		  }
		}

		{
			sourceCount = bt.size();

		  char scratch[512];
		  char date_time[512];
		  getDateTime(date_time);
		  sprintf(scratch,"Memory Usage by Source File and Line Number for Context: %s : %s", mContext, date_time );
		  physx::HtmlTable *table = document->createHtmlTable(scratch);
		  //                    1           2            3           4            5
		  table->addHeader("Source/File,Line/Number,Memory/Type,Memory/Size,Allocation/Count");
		  table->addSort("Sorted By Memory Size",4,false,5,false);
		  table->excludeTotals(2);
		  for (BySourceHash::iterator i=bt.begin(); i!=bt.end(); ++i)
		  {
			BySource b = (*i).second;
			table->addColumn( b.mFileName );
			table->addColumn( (physx::PxU32)b.mLineNo );
			table->addColumn( b.mClassName );
			table->addColumn( (physx::PxU32)b.mSize );
			assert( b.mCount > 0 );
			table->addColumn( (physx::PxU32)b.mCount );
			table->nextRow();
			totalMemory+=b.mSize;
			totalAllocations+=b.mCount;
		  }
		  table->computeTotals();
		}
	  }

	  // Power of two, sizes 1-256
	{
		char scratch[512];
		char date_time[512];
		getDateTime(date_time);
		sprintf(scratch,"Power of Two Memory 1 to 256 bytes for Context: %s : %s", mContext, date_time );
		physx::HtmlTable *table = document->createHtmlTable(scratch);
		//                    1         2            3           4
		table->addHeader("Mem/Size,Total/Alloc,Alloc/Count,Fragment/Amount");
		table->addSort("Sorted By Memory Size",2,false,3,false);
		table->excludeTotals(1);

		// 0   1   2   3   4    5
		// 8, 16, 32, 64, 128, 256
		struct Power2
		{
			Power2(void)
			{
				memSize = 0;
				memTotal = 0;
				memCount = 0;
				fragmentTotal = 0;
			}
			unsigned int memSize;
			unsigned int memTotal;
			unsigned int memCount;
			unsigned int fragmentTotal;
		};

		Power2 p[6];

		MemTrackVector::iterator i;
		for (i=mMemTracks.begin(); i!=mMemTracks.end(); i++)
		{
			const MemTrack &t = (*i);
			if ( t.mSize <= 256 )
			{
				size_t p2=8;
				size_t index = getPow2(t.mSize,p2);
				p[index].memSize = p2;
				p[index].memTotal+=t.mSize;
				p[index].memCount++;
				p[index].fragmentTotal+=(p2-t.mSize);
			}
		}
		for (size_t i=0; i<6; i++)
		{
			Power2 &t = p[i];
			if ( t.memCount > 0 )
			{
				table->addColumn(t.memSize);
				table->addColumn(t.memTotal);
				table->addColumn(t.memCount);
				table->addColumn(t.fragmentTotal);
				table->nextRow();
			}
		}
		table->computeTotals();
	}

	// power of two allocations > 256 bytes
	{
		char scratch[512];
		char date_time[512];
		getDateTime(date_time);
		sprintf(scratch,"Power of Two Memory Greater than 256 bytes for Context: %s : %s", mContext, date_time );
		physx::HtmlTable *table = document->createHtmlTable(scratch);
		//                    1         2            3           4
		table->addHeader("Mem/Size,Total/Alloc,Alloc/Count,Fragment/Amount");
		table->addSort("Sorted By Memory Size",2,false,3,false);
		table->excludeTotals(1);

		struct Power2
		{
			Power2(void)
			{
				memSize = 0;
				memTotal = 0;
				memCount = 0;
				fragmentTotal = 0;
			}
			unsigned int memSize;
			unsigned int memTotal;
			unsigned int memCount;
			unsigned int fragmentTotal;
		};

		Power2 p[32];

		MemTrackVector::iterator i;
		for (i=mMemTracks.begin(); i!=mMemTracks.end(); i++)
		{
			const MemTrack &t = (*i);
			if ( t.mSize > 256 )
			{
				size_t p2=512;
				size_t index = getPow2(t.mSize,p2);
				p[index].memSize = p2;
				p[index].memTotal+=t.mSize;
				p[index].memCount++;
				p[index].fragmentTotal+=(p2-t.mSize);
			}
		}
		for (size_t i=0; i<32; i++)
		{
			Power2 &t = p[i];
			if ( t.memCount > 0 )
			{
				table->addColumn(t.memSize);
				table->addColumn(t.memTotal);
				table->addColumn(t.memCount);
				table->addColumn(t.fragmentTotal);
				table->nextRow();
			}
		}
		table->computeTotals();
	}

	// context summary..
	if ( contextTable )
	{
		contextTable->addColumn( mContext );
		contextTable->addColumn( totalMemory );
		contextTable->addColumn( totalAllocations );
		contextTable->addColumn( typeCount );
		contextTable->addColumn(sourceCount );
		contextTable->nextRow();
	}

  }

private:
  const char       *mContext;
  MemTrackVector    mMemTracks;
};

#if USE_HASH_MAP
typedef stdext::hash_map< size_t , ReportContext * > ReportContextHash;
#else
typedef std::map< size_t , ReportContext * > ReportContextHash;
#endif

class MyMemTracker : public MemTracker
{
public:

	MyMemTracker(void)
	{
		mSingleThreaded = false;
	  mFrameNo = 1;
	  mAllocCount = 0;
	  mAllocSize = 0;
	  mAllocFrameCount = 0;
	  mFreeFrameCount = 0;
	  mAllocFrameSize = 0;
	  mFreeFrameSize = 0;
	  mDocument = 0;
	  mFrameSummary = 0;
	  mDetailed = 0;
	  physx::HtmlTableInterface *h = physx::getHtmlTableInterface();
	  if ( h )
	  {
		mDocument = h->createHtmlDocument("MemTracker");
	  }

	}

	virtual ~MyMemTracker(void)
	{
	  if ( mDocument )
	  {
		physx::HtmlTableInterface *h = physx::getHtmlTableInterface();
		h->releaseHtmlDocument(mDocument);
	  }
	}

  virtual void trackAlloc(size_t threadId,void *mem,size_t size,MemoryType type,const char *context,const char *className,const char *fileName,physx::PxU32 lineno)
  {
	if ( mem )
	{
		addContextType(context,className,size);

	  mAllocCount++;
	  mAllocSize+=size;

	  mAllocFrameCount++;
	  mAllocFrameSize+=size;

	  size_t hash = (size_t) mem;
	  MemTrack t;
	  t.mType = type;
	  t.mSize = size;
	  t.mThreadId  = threadId;
	  t.mContext   = context;
	  t.mClassName = className;
	  t.mFileName  = fileName;
	  t.mLineNo    = lineno;
	  t.mAllocCount = 1;
	  MemTrackHash::iterator found = mMemory.find(hash);
	  if ( found != mMemory.end()  )
	  {
		  PX_ALWAYS_ASSERT();
		  const MemTrack &previous = (*found).second;
		  printf("Prev: %s\r\n", previous.mClassName );
		  PX_UNUSED(previous);
	  }
	  // track which allocation number this one was.
	  {
		BySource b(t);
		b.mCount = 1;
		BySourceIndex index(b.mFileName,b.mLineNo);
		BySourceHash::iterator found = mSourceHash.find(index);
		if ( found == mSourceHash.end() )
		{
			mSourceHash[index] = b;
		}
		else
		{
			BySource bs = (*found).second;
			bs.mCount++;
			t.mAllocCount = bs.mCount;
			mSourceHash[index] = bs;
		}
	  }
	  if ( mDetailed )
	  {
		mDetailed->addColumnHex( (size_t)mem );
		switch ( type )
		{
		  case MT_NEW:
			  mDetailed->addColumn("NEW");
			  break;
		  case MT_NEW_ARRAY:
			  mDetailed->addColumn("NEW_ARRAY");
			  break;
		  case MT_MALLOC:
			  mDetailed->addColumn("MALLOC");
			  break;
		  case MT_GLOBAL_NEW:
			  mDetailed->addColumn("GLOBAL_NEW");
			  break;
		  case MT_GLOBAL_NEW_ARRAY:
			  mDetailed->addColumn("GLOBAL_NEW_ARRAY");
			  break;
		  default:
			  PX_ALWAYS_ASSERT();
			  mDetailed->addColumn("ERROR");
			  break;
		}
		mDetailed->addColumn((physx::PxU32)size);
		mDetailed->addColumn((physx::PxU32)t.mAllocCount);
		mDetailed->addColumnHex(threadId);
		mDetailed->addColumn(context);
		mDetailed->addColumn(className);
		mDetailed->addColumn(fileName);
		mDetailed->addColumn((physx::PxU32)lineno);
		mDetailed->nextRow();
	  }

	  mMemory[hash] = t;

	  PX_ASSERT( mAllocCount == mMemory.size() );
	}
  }

  virtual void trackRealloc(size_t threadId,
	  void *oldMem,
	  void *newMem,
	  size_t newSize,
	  const char *context,
	  const char *className,
	  const char *fileName,
	  physx::PxU32 lineno)
  {
	  TrackInfo info;
	  bool found = trackInfo(oldMem,info);
	  PX_ASSERT(found);
	  if ( found )
	  {
		PX_ASSERT( info.mType == MT_MALLOC );
		trackFree(threadId,oldMem,MT_FREE,context,fileName,lineno);
		trackAlloc(threadId,newMem,newSize,info.mType,context,className,fileName,lineno);
	  }
  }

  virtual const char * typeString(MemoryType type)
  {
	  const char *ret = "unknown";
	  switch ( type )
	  {
	  case MT_NEW:
		  ret = "new operator";
		  break;
	  case MT_NEW_ARRAY:
		  ret = "new[] array operator";
		  break;
	  case MT_MALLOC:
		  ret = "malloc";
		  break;
	  case MT_FREE:
		  ret = "free";
		  break;
	  case MT_DELETE:
		  ret = "delete operator";
		  break;
	  case MT_DELETE_ARRAY:
		  ret = "delete[] array operator";
		  break;
	  case MT_GLOBAL_NEW:
		  ret = "global new";
		  break;
	  case MT_GLOBAL_NEW_ARRAY:
		  ret = "global new[] array";
		  break;
	  case MT_GLOBAL_DELETE:
		  ret = "global delete";
		  break;
	  case MT_GLOBAL_DELETE_ARRAY:
		  ret = "global delete array";
		  break;
	  }
	  return ret;
  }

  virtual const char * trackValidateFree(size_t threadId,void *mem,MemoryType type,const char *context,const char *fileName,physx::PxU32 lineno)
  {
	  const char *ret = NULL;
	  if ( mem )
	  {
		  char scratch[1024];
		  scratch[0] = 0;

		  size_t hash = (size_t) mem;
		  MemTrackHash::iterator found = mMemory.find(hash);
		  if ( found == mMemory.end() )
		  {
			  sprintf_s(scratch,1024,"Error! Tried to free memory never tracked.  Source: %s : Line: %d\r\n", fileName, lineno);
			  PX_ALWAYS_ASSERT();
		  }
		  else
		  {
			  MemTrack &t = (MemTrack &)(*found).second;

			  switch ( type )
			  {
			  case MT_DELETE:
				  if ( t.mType != MT_NEW )
				  {
					  sprintf_s(scratch,1024,"Error: Allocated with %s but deallocated with the delete operator\r\n", typeString(t.mType));
				  }
				  break;
			  case MT_DELETE_ARRAY:
				  if ( t.mType != MT_NEW_ARRAY )
				  {
					  sprintf_s(scratch,1024,"Error: Allocated with %s but deallocated with the delete array operator.\r\n", typeString(t.mType));
				  }
				  break;
			  case MT_FREE:
				  if ( t.mType != MT_MALLOC )
				  {
					sprintf_s(scratch,1024,"Error: Allocated with %s but deallocated with malloc.\r\n", typeString(t.mType));
				  }
				  break;
			  case MT_GLOBAL_DELETE:
				  if ( t.mType != MT_GLOBAL_NEW )
				  {
					sprintf_s(scratch,1024,"Error: Allocated with %s but deallocated with global delete.\r\n", typeString(t.mType));
				  }
				  break;
			  case MT_GLOBAL_DELETE_ARRAY:
				  if ( t.mType != MT_GLOBAL_NEW_ARRAY )
				  {
					sprintf_s(scratch,1024,"Error: Allocated with %s but deallocated with global delete array.\r\n", typeString(t.mType));
				  }
				  break;
			  default:
				  sprintf_s(scratch,1024,"Invalid memory type encountered.  Data corrupted!?\r\n");
				  break;
			  }
			  if ( t.mThreadId != threadId && mSingleThreaded )
			  {
				  sprintf_s(scratch,1024,"Memory de-allocated from a different thread than it was allocated from!\r\n");
			  }
			  if ( !context )
			  {
				  sprintf_s(scratch,1024,"Null context!\r\n");
			  }
			  if ( !t.mContext )
			  {
				  sprintf_s(scratch,1024,"Original memory block allocated with a null context, or the data is corrupted!\r\n");
			  }
			  if ( context != t.mContext )
			  {
				  sprintf_s(scratch,1024,"Memory is de-allocated from a different context.  Allocated from (%s) deallocated from (%s)\r\n", context, t.mContext );
			  }
		  }
		  if ( scratch[0] )
		  {
			  mErrorMessage = scratch;
			  ret = mErrorMessage.c_str();
		  }
	  }
	  return ret;
  }

  void addContextType(const char *context,const char *type,size_t size)
  {
	  ByContextIndex index(context,type);
	  ByContextTypeHash::iterator found = mContextType.find(index);
	  if ( found != mContextType.end() )
	  {
		  ContextType &c = (ContextType &)(*found).second;
		  PX_ASSERT( c.mContext == context );
		  PX_ASSERT( c.mType == type );
		  c.mAllocCount++;
		  c.mAllocSize+=size;
	  }
	  else
	  {
		  ContextType c(context,type,size);
		  mContextType[index] = c;
	  }
#if 0
	  int foundCount=0;
	  {
		  for (ByContextTypeHash::iterator i=mContextType.begin(); i!=mContextType.end(); ++i)
		  {
			  const ByContextIndex &index = (*i).first;
			  if ( index.mContext == context && index.mType == type )
			  {
				  foundCount++;
			  }
		  }
	  }
	  PX_ASSERT( foundCount == 1 );
#endif
  }

  void removeContextType(const char *context,const char *type,size_t size)
  {
	  ByContextIndex index(context,type);
	  ByContextTypeHash::iterator found = mContextType.find(index);
	  if ( found  != mContextType.end() )
	  {
		  ContextType &c = (ContextType &)(*found).second;
		  c.mAllocCount--;
		  c.mAllocSize-=size;
	  }
	  else
	  {
		  PX_ALWAYS_ASSERT();
	  }

  }

  virtual void trackFree(size_t threadId,void *mem,MemoryType type,const char *context,const char *fileName,physx::PxU32 lineno)
  {
	if ( mem )
	{
	  size_t hash = (size_t) mem;
	  MemTrackHash::iterator found = mMemory.find(hash);
	  if ( found == mMemory.end() )
	  {
		  PX_ALWAYS_ASSERT();
	  }
	  else
	  {
		  const MemTrack &t = (*found).second;
		  removeContextType(t.mContext,t.mClassName,t.mSize);
		  if ( mDetailed )
		  {
			mDetailed->addColumnHex( (size_t) mem );
			switch ( type )
			{
			  case MT_FREE:
				  mDetailed->addColumn("FREE");
				  break;
			  case MT_DELETE:
				  mDetailed->addColumn("DELETE");
				  break;
			  case MT_DELETE_ARRAY:
				  mDetailed->addColumn("DELETE_ARRAY");
				  break;
			  case MT_GLOBAL_DELETE:
				  mDetailed->addColumn("GLOBAL_DELETE");
				  break;
			  case MT_GLOBAL_DELETE_ARRAY:
				  mDetailed->addColumn("GLOBAL_DELETE_ARRAY");
				  break;
			  default:
				  printf("Invalid memory allocation type! %s : %d\r\n", fileName, lineno );
				  mDetailed->addColumn("INVALID ALLOC TYPE");
				  break;
			}
			mDetailed->addColumn((physx::PxU32)t.mSize);
			mDetailed->addColumn((physx::PxU32)t.mAllocCount);
			mDetailed->addColumnHex(threadId);
			mDetailed->addColumn(context);
			mDetailed->addColumn(t.mClassName);
			mDetailed->addColumn(fileName);
			mDetailed->addColumn((physx::PxU32)lineno);
			mDetailed->nextRow();
		  }

		  mAllocCount--;
		  mAllocSize-=t.mSize;

		  mFreeFrameCount++;
		  mFreeFrameSize+=t.mSize;

		  mMemory.erase(hash);

		  PX_ASSERT( mAllocCount == mMemory.size() );
	  }
	}
  }

  void trackFrame(void)
  {
	mFrameNo++;
	if ( mAllocFrameCount || mFreeFrameCount )
	{
	  if ( mFrameSummary )
	  {
		mFrameSummary->addColumn((physx::PxU32)mFrameNo);
		mFrameSummary->addColumn((physx::PxU32)mAllocCount);
		mFrameSummary->addColumn((physx::PxU32)mAllocSize);
		mFrameSummary->addColumn((physx::PxU32)mAllocFrameCount);
		mFrameSummary->addColumn((physx::PxU32)mAllocFrameSize);
		mFrameSummary->addColumn((physx::PxU32)mFreeFrameCount);
		mFrameSummary->addColumn((physx::PxU32)mFreeFrameSize);
		mFrameSummary->addColumn((physx::PxU32)(mAllocFrameCount-mFreeFrameCount));
		mFrameSummary->addColumn((physx::PxU32)(mAllocFrameSize-mFreeFrameSize));
		mFrameSummary->nextRow();
	  }

	  mAllocFrameCount = 0;
	  mAllocFrameSize  = 0;
	  mFreeFrameCount = 0;
	  mFreeFrameSize = 0;

	  if ( mDetailed )
	  {
		char scratch[512];
		sprintf(scratch,"New Frame %d", mFrameNo );
		mDetailed->addColumn(scratch);
		mDetailed->addColumn((physx::PxU32)mAllocSize);
		mDetailed->nextRow();
	  }

	}
  }

  virtual void releaseReportMemory(void *mem)
  {
	  ::free(mem);
  }

  void *generateReport(MemoryReportFormat format,const char *fname,physx::PxU32 &saveLen,bool reportAllLeaks)
  {
	  void *ret = NULL;
	  saveLen = 0;

	//
	physx::HtmlTable *contextTable = NULL;
	{
		char scratch[512];
		char date_time[512];
		getDateTime(date_time);
		sprintf(scratch,"Summary Report for All Contexts : %s", date_time);
		contextTable = mDocument->createHtmlTable(scratch);
		//                    1              2           3
		contextTable->addHeader("Memory/Context,Total/Memory,Alloc/Count,Type/Count,Source/Count");
		contextTable->addSort("Sorted By Total Memory",2,true,3,true);

	}
	ReportContextHash rchash;
	{
	ReportContext *current = 0;

	  for (MemTrackHash::iterator i=mMemory.begin(); i!=mMemory.end(); ++i)
	  {
		  MemTrack t = (*i).second;
		  if ( (current == 0) || current->getContext() != t.mContext )
		  {
			  size_t hash = (size_t)t.mContext;
			  ReportContextHash::iterator found = rchash.find(hash);
			  if ( found == rchash.end() )
			  {
				  current = new ReportContext(t.mContext);
				  rchash[hash] = current;
			  }
			  else
			  {
				  current = (*found).second;
			  }
		  }
		  current->add(t);
	  }
	  //
	  if ( reportAllLeaks )
	  {
		char scratch[512];
		char date_time[512];
		getDateTime(date_time);
		sprintf(scratch,"Memory Leaks in order of allocation : %s", date_time);

		physx::HtmlTable *table = mDocument->createHtmlTable(scratch);
		//                    1              2           3          4       5      6            7         8
		table->addHeader("Memory/Address,Alloc/Count,Alloc/Size,ThreadId,Context,Class/Type,Source/File,Lineno");
		table->addSort("Sorted By Source File and Line Number",7,true,8,true);

		table->excludeTotals(2);
		table->excludeTotals(8);

		for (MemTrackHash::iterator i=mMemory.begin();  i!=mMemory.end(); ++i)
		{
			MemTrack t = (*i).second;
			table->addColumnHex( (size_t)(*i).first ); // memory address
			table->addColumn((physx::PxU32) t.mAllocCount ); // allocation count.
			table->addColumn((physx::PxU32) t.mSize );       // size of allocation.
			table->addColumnHex( t.mThreadId ); // thread id
			table->addColumn( t.mContext );    // context
			table->addColumn( t.mClassName );  //
			table->addColumn( t.mFileName );
			table->addColumn((physx::PxU32) t.mLineNo );
			table->nextRow();
		  }
		  table->computeTotals();
		}
	  }
	  //
	  {

		  for (ReportContextHash::iterator i=rchash.begin(); i!=rchash.end(); ++i)
		  {
			  ReportContext *rc = (*i).second;
			  rc->generateReport(mDocument,contextTable);
			  delete rc;
		  }
	  }
	//
	if ( mFrameSummary )
	{
	  mFrameSummary->excludeTotals(1);
	  mFrameSummary->excludeTotals(2);
	  mFrameSummary->excludeTotals(3);
	  mFrameSummary->excludeTotals(8);
	  mFrameSummary->excludeTotals(9);
	  mFrameSummary->computeTotals();
	}

	contextTable->computeTotals();

	physx::HtmlSaveType saveType = physx::HST_SIMPLE_HTML;
	switch ( format )
	{
		case MRF_SIMPLE_HTML:       // just a very simple HTML document containing the tables.
			saveType = physx::HST_SIMPLE_HTML;
			break;
		case MRF_CSV:               // Saves the Tables out as comma seperated value text
			saveType = physx::HST_CSV;
			break;
		case MRF_TEXT:              // Saves the tables out in human readable text format.
			saveType = physx::HST_TEXT;
			break;
		case MRF_TEXT_EXTENDED:     // Saves the tables out in human readable text format, but uses the MS-DOS style extended ASCII character set for the borders.
			saveType = physx::HST_TEXT_EXTENDED;
			break;
	}

	size_t len;
	const char *data = mDocument->saveDocument(len,saveType);
	if ( data )
	{
		ret = ::malloc(len);
		memcpy(ret,data,len);
		saveLen = len;
		mDocument->releaseDocumentMemory(data);
	}
	return ret;
  }

	virtual void usage(void)
	{
		printf("On Frame Number: %d has performed %d memory allocations for a total %d bytes of memory.\r\n", mFrameNo,mAllocCount,mAllocSize );
	}

	virtual size_t detectLeaks(size_t &acount)
	{
		acount = mAllocCount;
		return mAllocSize;
	}

  virtual void setLogLevel(bool logEveryAllocation,bool logEveryFrame,bool verifySingleThreaded)
  {
	  mSingleThreaded = verifySingleThreaded;
	mLogEveryAllocation = logEveryAllocation;
	mLogEveryFrame      = logEveryFrame;
	if ( mDocument )
	{
	  if ( mLogEveryFrame && mFrameSummary == 0 )
	  {
		  char date_time[512];
		  getDateTime(date_time);
		  char scratch[1024];
		  sprintf(scratch,"Per Frame Memory Usage Summary : %s ", date_time);

		  mFrameSummary = mDocument->createHtmlTable(scratch);
		//                             1           2                  3               4                  5               6               7             8               9
		mFrameSummary->addHeader("Frame/Number,Total/Alloc Count,Total/Alloc Mem,Frame/Alloc Count,Frame/Alloc Mem,Frame/Free Count,Frame/Free Mem,Frame/Delta Count,Frame/Deleta Mem");
	  }
	  if ( mLogEveryAllocation && mDetailed == 0 )
	  {
		  char date_time[512];
		  getDateTime(date_time);
		  char scratch[2048];
		  sprintf(scratch,"Detailed Memory Usage Report : %s ",date_time);
		  mDetailed = mDocument->createHtmlTable(scratch);
		//                      1      2     3      4           5     6             7         8
		mDetailed->addHeader("Memory,Event,Size,Alloc Count,ThreadId,Context,Class or Type,Source File,Line Number");
		mDetailed->setOrder(1000); // make sure it displays this last!
	  }
	}
  }

  virtual bool trackInfo(const void *mem,TrackInfo &info)
	{
		bool ret = false;

		if ( mem )
		{
		  size_t hash = (size_t) mem;
		  MemTrackHash::iterator found = mMemory.find(hash);
		  if ( found == mMemory.end() )
		  {
			  printf("Error! Tried to get information for memory never tracked.\r\n");
		  }
		  else
		  {
			  MemTrack &t = (MemTrack &)(*found).second;
			  info.mMemory 		= mem;
			  info.mType		= t.mType;
			  info.mSize   		= t.mSize;
			  info.mContext 	= t.mContext;
			  info.mClassName 	= t.mClassName;
			  info.mFileName 	= t.mFileName;
			  info.mLineNo 		= t.mLineNo;
			  info.mAllocCount 	= t.mAllocCount;
			  ret = true;
		  }
		}
		return ret;
	}

private:

  bool           mLogEveryAllocation;
  bool           mLogEveryFrame;

  size_t         mFrameNo;
  MemTrackHash  mMemory;

  size_t         mAllocFrameCount;
  size_t         mFreeFrameCount;

  size_t         mAllocFrameSize;
  size_t         mFreeFrameSize;

  size_t         mAllocCount;
  size_t         mAllocSize;
  bool	mSingleThreaded;

  physx::HtmlTable    *mFrameSummary;
  physx::HtmlTable    *mDetailed;
  physx::HtmlDocument *mDocument;
  BySourceHash           mSourceHash;
  ByContextTypeHash		mContextType;

  std::string	mErrorMessage;
};

MemTracker *createMemTracker(void)
{
	MyMemTracker *m = new MyMemTracker;
	return static_cast< MemTracker *>(m);
}

void        releaseMemTracker(MemTracker *mt)
{
	MyMemTracker *m = static_cast< MyMemTracker *>(mt);
	delete m;
}
};

#endif

redpajama_set_name: RedPajamaGithub


text:
Q: Unicode REGEX in Sql Server CLR function I have a REGEX SQL CLR function:
var rule1 = new Regex("شماره\\s?\\d{1,10}")

Calling it on SQL Server 2016, however, returns this error:

System.ArgumentException: parsing "?????\s?\d{1,10}" - Quantifier {x,y} following nothing.
  at System.Text.RegularExpressions.Regex..ctor(String pattern)

It seems that my unicode characters are changed to question marks, which makes the whole Regex wrong.

A: This issue has nothing to do with datatypes, whether for input parameters or return values, as the code provided, while sparse on detail, does show enough to see that:

*

*there is no input parameter being used (the string is hard-coded).

*the error is being thrown by System.Text.RegularExpressions.Regex, so has nothing to do with T-SQL or return values / types.

Also, while the error message does mention "Quantifier {x,y}", and there is indeed a {1,10} quantifier being used in the Regular Expression, it is a false correlation (albeit a rather understandable one) that the error message is referring to that specific quantifier. If you shorten the Regular Expression down to just "شماره", you will get the same error, except it will report the Regular Expression as being just "?????". Hence, "Quantifier {x,y}" actually refers to the first "?" in the expression shown in the error message (you will get the same error even if the Regular Expression is nothing more than "ش"). I figure that "Quantifier {x,y}" is the generalized way of looking at the ?, +, and * quantifiers as they can also be expressed as {0,1}, {1,}, and {0,}, respectively (or at least they should be).
This issue has nothing to do with SQL Server, or even Regular Expressions. This is an encoding issue, and RegEx is reporting the problem because it is being given ????? instead of شماره.
<TL;DR> Check your source code file's encoding. You might need to go to "Save As...", click on the down-arrow to the right of the word "Save" on the "Save" button, select "Save with Encoding...", and then select "Unicode (UTF-8 with signature) - Codepage 65001".

There is a problem with the project configuration and/or the compiler. I placed the following string in both a Console Application and a Database Project:
"--ŏ-א---\U0001F608-\u014F-\u05D0-"
(The second half of that test string, after the ---, is merely the escape sequences for the same three characters as appear in the first half, and in the same order.)
I compiled both and inspected the compiled output (meaning: it hasn't been deployed to SQL Server yet). That string appears in the EXE file (Console App) as:
2D003DD808DE2D004F012D00D0052D002D002D003DD808DE2D004F012D00D0052D00
which is the UTF-16 LE encoding for: --ŏ-א----ŏ-א-

Yet, it appears in the DLL file (SQLCLR Assembly) as:
2D003F003F002D003F002D003F002D002D002D003DD808DE2D004F012D00D0052D00
which is the UTF-16 LE encoding for: -??-?-?----ŏ-א-
I even changed the output type of the Console App project to be "Class Library" and the string still got embedded correctly in that DLL file. So, for some reason the literal characters are being turned into literal question marks when compiled into a SQLCLR Assembly. I haven't yet figured out what is causing this as a quick look at the config settings and command-line flags for csc.exe seems to show them being effectively the same.
In either case, it should be clear that specifying the Arabic characters via escape sequences, while cumbersome, will at least work, hence providing a (hopefully short-term) work-around so that you can move forward on this. I will continue looking to see what could be causing this difference in behavior.
UPDATE
In order to determine if the string was being converted to an 8-bit encoding or something else, I added two characters to the test string (one in both Windows-1252 and ISO-8859-1, and one only in Windows-1252):

*

*§ = 0xA7 in CP-1252, 0xA7 in ISO-8859-1, and 0x00A7 in UTF-16

*œ = 0x9C in CP-1252, not in ISO-8859-1, and 0x0153 in UTF-16

The new test string is:
"--ŏ-א-§-œ---\U0001F608-\u014F-\u05D0-\x00A7-\x0153-"
That string appears in the EXE file (Console App) as:
2D003DD808DE2D004F012D00D0052D00A7002D0053012D002D002D003DD808DE2D004F012D00D0052D00A7002D0053012D00
which is the UTF-16 LE encoding for: --ŏ-א-§-œ----ŏ-א-§-œ-

Yet, it appears in the DLL file (SQLCLR Assembly) as:
2D003F003F002D003F002D003F002D00A7002D0053012D002D002D003DD808DE2D004F012D00D0052D00A7002D0053012D00
which is the UTF-16 LE encoding for: -??-?-?-§-œ----ŏ-א-§-œ-
So, because both § and œ came through correctly in the SQLCLR Assembly, it is clearly not ISO-8859-1. And, it is either Code Page Windows-1252 or some other that supports both of those characters (CP-1252 being the most likely given that my system is using it).
Still investigating the root cause...
UPDATE 2
Ok, I feel kinda silly. Sometimes it helps to close a file (or the entire solution sometimes) and reopen it. Doing so I noticed that my test string now appeared as:
"-??-?-?-?-?---\U0001F608-\u014F-\u05D0-\x00A7-\x0153-"
Funny, I don't remember pasting that in ;-). So, I checked the file encoding that Visual Studio was saving it as and sure enough it was "Western European (Windows) - Codepage 1252". And just to be extra special certain, I checked the file for the Console App and it was correctly set to "Unicode (UTF-8 with signature) - Codepage 65001". D'oh! Changing the file encoding under "Save As..." to "Unicode (UTF-8 with signature) - Codepage 65001", I then replaced both the test string and the O.P.'s Regular Expression. Both came through perfectly, no errors or question marks.


text:
Maintain the wage rage
By Godfrey Moase and Carina Garland
Last week, the Full Bench of the Fair Work Commission handed down its decision on the Penalty rates case. The Full Bench determined that from 1 July 2017 it would introduce a 25% cut in the minimum payable loadings for workers across the hospitality and retail sectors on Sundays and public holidays. This news has been met with anger from workers, unions and a number of politicians, but where anger should be directed and what should happen next is far from settled.
The penalty rates decision can't be seen in isolation: it is a symptom of an economy and society in flux, and the product of a system that has valued parliamentary and institutional power at the expense of organised labour.
The Full Bench's decision will impact the lives of hundreds of thousands of workers. For example, a worker who works regular Sunday shifts in retail will take home between $29.16 and $86.78 less each week, even though they'll work the same hours. This is a concrete loss that is unevenly distributed across the Australian community. It is women who will bear the greatest burden of these cuts, with an estimated 54% of the affected workforce being women, many of whom work low-paid retail and hospitality jobs on the weekend to support their families, because weekend work offers flexibility in childcare options that may not be possible on weekdays.
As we know, women already experience inequality across Australian workplaces, earning an estimated 20% less than men; this latest decision entrenches inequality further. Indeed, the ACTU has stated that Indigenous women will be the workers most affected by the penalty rates cuts. In a broader socio-political context, where welfare support and parental leave are under attack, the penalty rates decision is bewildering: women trying to support their families cannot manage without work, but that work is now not valued enough to allow them to properly support their families.
Our economy is not some abstract proposition – it is simply the sum total of all of us trying to live our lives the best we can. The economic impact of the Full Bench's decision, therefore, lies in the interaction between how retail and hospitality workers are likely to cope with earning less per hour on Sundays and public holidays, and how employers are likely to make business decisions based on the wage cut.
To make up for the 25% in lost wages, workers are either going to have to find ways to reduce their spending or work more hours to make up for the gap. But with landlords, banks, private utility companies and other actors using monopoly to extract as much money as they can, workers have relatively little space to reduce spending. Moreover, the social safety net is unravelling, contributing to the anxiety many now experience due to rising costs and precarious incomes.
So the Full Bench's decision will drive retail and hospitality workers to seek more hours of work for the same pay. In effect, this expands the total supply of labour available to employers and thus further tilts the balance of power towards employers at a moment when wage growth is at an all-time low. Indirectly, this decision has made the lives of everyone of us who rely on a wage unnecessarily harder.
The consequences of this decision go beyond the stress experienced by workers, which in itself is a significant problem. We are at a point in time where the challenges we face in reaching a secure and sustainable future – climate change, for instance – demand a shorter working week, one which reduces working hours without compromising incomes or income security. The FWC's decision, however, has taken us backwards, and given that trickle-down economics has never worked, there is no reason to expect it'll suddenly stimulate spending and create jobs now.
Sometimes in the midst of all the rage and noise we can miss some otherwise obvious points, but we cannot map our way out of our present precarious position without some understanding of how we got here. This decision was made as part of a regular four-year review of industry minimum rights and conditions mandated under the Fair Work Act 2009, as instituted by the previous Labor government.
Of the five commissioners who made up the Full Bench, four were appointed by the last Labor government; the Coalition appointment was promoted to the position of deputy president by the then-Minister for Employment and Workplace Relations Bill Shorten. Shorten also appointed the most senior member of the Full Bench, current FWC President Justice Iain Ross in 2012. At the time the Australian Council of Trade Unions released a statement on the appointment singling out Judge Ross as 'someone Australian workers can trust'.
This is not to make a partisan point against Labor, because none of the parties have the answer here. The Greens' proposal to legislate on the matter of penalty rates does not, in and of itself, give power back to workers; rather, it potentially places the future pay and conditions of millions of Award-reliant workers in the hands of cross-bench senators like Pauline Hanson, Malcolm Roberts and David Leyonhjelm.
We mention it, however, to make a point against parliamentary and electoral politics in general being positioned as the solution.
After all, the broad legal architecture in which Sunday, public holidays and weekend loadings were first introduced in Australian industrial law and then extended from 1919 through to 1947 is the same as their rollback in 2017. An industrial relations commission made a ruling based on submissions and hearings from unions, employer groups, workers, businesses and all sorts of experts.
The key difference between the two contexts is neither political nor legal. Rather, what has changed is the rate of social struggle and the relative balance of power between workers and employers. Industrial action remains at near-record lows, and workers are less likely to organise into unions.
The Full Bench decision takes place in a context of unions and workers engaging in concession bargains with employers where penalty rates and other hard-won rights are traded for increasingly small wage rises. Furthermore, some employers such as Caltex, 7-11 and those in our food supply-chain feel so confident as to make systematic wage-theft part of their business model. Therefore, we should see the Full Bench decision as giving legal recognition to a pre-existing social reality.
Herein lies the key to a future where every worker earns a decent living and is treated with respect, thereby changing our social reality. Politicians and elections have a supporting role to play in such struggle – but it is predominantly a struggle to be waged at work and in the streets.
We need to consider where we situate power. To locate power only at the level of government, of parliament and of employers means stripping those who are outside of these institutions of power. We need to find our power through organising, and the rights we can win in our workplaces and communities. To beg politicians such as Malcolm Turnbull to intervene in this decision or to tweak the institutional rules is to undermine the power workers have to demand big change and to organise to build a fairer future.
We need to retake control of our lives – and we can only do that through collective action. Such action has to go beyond electoral activity or providing free viral advertising to the odd benevolent employer who will refuse to cut staff wages. It has to go beyond clutching at a past that keeps slipping through our fingers.
Instead, we need to inspire people with a transformative vision of a future, one where we have the freedom to fully live our lives (in our workplaces, families and in our various communities), instead of being forced to take on extra hours of work each week to make the same amount that just gets us by. We need to organise big across workplaces, industries and communities. This is the only way we have ever won meaningful changes through history that have transformed our societies for the better. The first step is recognising that power is not hierarchical, but something we already have when we stand together.
A better future is within reach if we have the courage to take collective action in the face of failure and ruin. We can do this if we commit to it. The fight for fair wages is just one part of building a better future; let us grasp this moment as our opportunity to stand together and create a collective vision for the Australia we want to live in. Let's not beg for the minimum, but demand a fair share.
When it comes to Full Bench's decision to cut wages, don't mourn, organise!
Image: 'Barista' / Jeremy Keith
Godfrey Moase is Executive Director, United Workers Union. He's previously written for the Guardian, Overland, Jacobin and New Matilda.
Carina Garland is a feminist writer and communications officer at the NUW.
More by Godfrey Moase and Carina Garland
From Ju e Walker on 28 February 2017 at 8.42 am
My comment that I am disgusted pure and simple !!! This is only the beginning of what this government wants !! 🙁
From Rutegar on 28 February 2017 at 10.50 am
One thing is damn certain.
A relentless eye is going to be kept on any spectacular financial endowments (most likely in an offshore account), education, and employment opportunities the members and families of the Fair Work Commission will accrue in the next twenty to thirty years.
Quid pro quo, baby. One way or the other.
From Rutegar on 10 March 2017 at 10.35 am
BTW : some have naively been advocating the old bombard your local member with letters routine.
The only strategy that will have any tangible effect is for customers to boycott any business which drops its Sunday wages.
From Rutegar on 3 April 2017 at 2.58 pm
… sigh …
"Ten former Fair Work Commission members, including outspoken critic Graeme Watson, retired early within months of qualifying for a full pension at the age of 60, a parliamentary committee has heard."
http://www.canberratimes.com.au/business/workplace-relations/former-fair-work-officers-retire-on-full-pensions-well-before-they-reach-65-20170330-gvaa4v.html
240 Spring 2020 out now


text:
class Product < ActiveRecord::Base

  self.primary_key = :id_product

  def self.insert(name)
    find_or_initialize_by_name(name).tap{ |el| el.save }
  end

end


CAIRO, Egypt — Libyans voted for the first time in more than 40 years on Saturday. Egyptians watched their first democratically elected president, Mohammed Morsi, take power less than two weeks ago. And Tunisians? They'll return to the polls for their first full post-revolution parliament within the year. The dream of representative government is coming true across North Africa.
However, true representative government is only possible when there's a way for one to freely describe how he or she wants to be represented. Elections, while important, are only one way for people to make their voices heard, and that fleeting moment with the ballot paper is only a snapshot of opinions on the day of voting. Ask any political pollster – minds change by the minute, as do the individual needs and desires of the voters.
Instead, what's important to remember is that these elections are a product of the popular movements we collectively call the Arab Spring, not the means by which Gaddafi, Mubarak, and Ben Ali were ousted. Rather, it was the widespread and proactive dissent on the part of each country's people that drove these revolutions – and that ability to dissent and protest has yet to be enshrined in law in these countries.
Dissent is protected in democratic societies by the freedoms of speech and expression. These freedoms are recognized in the Universal Declaration of Human Rights, and in particular Article 19 of the International Convention on Civil and Political Rights. And, for most of the democratic world, they're also incorporated into constitutions, where the rights of all citizens are clearly stated and codified into laws.
Here in Egypt, explicitly protecting these freedoms isn't on the immediate political agenda; in fact, President Morsi's 100-day to-do list includes addressing bread shortages and the capital's monstrous traffic, but not drafting a constitution. The problem is that there is no transparent plan for what happens if his administration cannot keep their promises and people react with protests, rallies and other forms of activism.
Egyptians, like Tunisians and Libyans, are keenly aware that their voices matter. The challenge for each of these "Arab Spring governments" is to define the line at which speech and expression is acceptable – even when it isn't favorable to those in power – and when it constitutes a threat to public order. It is a difficult line to find for even the oldest and most seasoned of democracies, but one that is all the more important here.
In an open-air art exhibition in mid-June, several works of contemporary art provided commentary on the relationship between Islam and society. One painting depicted shadowy, bearded male figures surrounding a bare-chested woman with a bowl of couscous at her groin. In another piece, the phrase "Subhan'Allah," or loosely translated "Glory be to God," was written in dead insects, a sardonic critique analogous to deriding those who believe the Virgin Mary has appeared in a piece of toast. A small group of protesters came during the day to complain that the works were morally offensive, and later a larger group returned at night with swords. Several works were destroyed, and small riots erupted across the capital city of Tunis, leading to three nights of government-enforced curfew.
Here in Cairo as I write, two rallies – one supporting the Muslim Brotherhood, the other opposing it – are gathering across the city. On July 9, President Morsi ordered Members of Parliament back to work less than a month after the Supreme Constitutional Court – the vestiges of Egypt's long history of military rule – declared the earlier parliamentary election invalid. Regardless of how this supposed showdown plays out, one of these rallies will not like what they hear. For now, the larger demonstrations seem to be in support of Morsi and the Brotherhood. How will the administration respond in six months time if those crowds are no longer in their camp?
Law isn't everything, but enumerating and protecting the freedoms that make elections worth their while is crucial to laying the foundation of a stable, representative government. The true test of the Arab Spring then is not the ability to have elections, but rather what laws, protections, and processes flow from them.
Jennifer studies security and international humanitarian law at The Fletcher School of Law and Diplomacy. Previously, she interned for the Campaign for Innocent Victims in Conflict, a unique organization advocating for recognition and remedy for civilians harmed in armed conflict. Additionally, Jennifer has taught in Rwanda, worked as a field organizer for the 2008 campaigns of Senator Mark Warner and President Barack Obama, and interned for US Senator Patrick Leahy and UK Member of Parliament Bob Blizzard. Jennifer holds a BA in Government from the College of William and Mary.


Every neighborhood has a house where all the local kids end up.
In the 1960s and 70s, Jane McGough's home on Bayard Place in Shadyside, where she and her husband raised their four children, was that place.
"Everything happened at our house," said her son, attorney W. Thomas McGough. "It was teeming with children. Our house was the house where everyone flowed to."
That openness reflected Mrs. McGough's spirit. The wife of a prominent lawyer, Walter McGough, she was an admirer of Eleanor Roosevelt who stayed strong in her Catholic faith, and she believed in helping those in need, her family said.
Once, in the 1960s, she came across a student from Sweden who was attending the University of Pittsburgh. She saw him on the street, lost and confused, and did what came naturally: She brought him home. He became a regular at the house, coming often for dinner, and their families remained friends long after he returned to Sweden.
"She and my father took him under their wing," Mr. McGough said. "She was always picking up strays."
Publication information: Article title: Jane Mcgough Feb. 7, 1921 - Oct. 27, 2014 Her Doors Were Always Open. Contributors: Ove, Torsten - Author. Newspaper title: Pittsburgh Post-Gazette (Pittsburgh, PA). Publication date: October 31, 2014. Page number: C-5. © McClatchy-Tribune Information Services. Provided by ProQuest LLC. All Rights Reserved.


Last year I was ranked first on their waitlist for the inaugural Bread Load Bakeless Camargo Residency in Cassis, France, and I'm pleased to be accepted as a resident this year!
This comes at the end of my Roth Residency at Bucknell, so I have so many wonderful months of writing to look forward to in the first half of 2015.
I'm grateful for these generous gifts!


text:
import tensorflow as tf
import numpy as np

import json
import pickle

from sklearn.utils import shuffle
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
from tensorflow.contrib.layers import flatten

class Maxpool:
    def __init__(self, size, strides):
        self.size = size
        self.strides = strides

    def get_tensor(self, inputs):
        return tf.layers.max_pooling2d(inputs, self.size, self.strides)

    def __str__(self):
        return "Maxpool: (%s) -> (%s)" % (self.size, self.strides)

    __repr__ = __str__

class CNN:
    def __init__(self, name, filters, kernel_size, strides, padding, activation_func):
        self.name = name
        self.filters = filters
        self.kernel_size = kernel_size
        self.strides = strides
        self.padding = padding
        self.activation_func = activation_func
        self.maxpool = None
        self.next = None

    def _activation_func(self):
        if self.activation_func == "relu":
            return tf.nn.relu

        return None

    def get_tensor(self, inputs):
        tensor = tf.layers.conv2d(
            inputs=inputs,
            filters=self.filters,
            kernel_size=self.kernel_size,
            strides=self.strides,
            padding=self.padding,
            activation=self._activation_func()
        )

        if self.maxpool is not None:
            tensor = self.maxpool.get_tensor(tensor)

        return tensor

    def __str__(self):
        return self.name + " (CNN)"

    __repr__ = __str__

class Dense:
    def __init__(self, name, units, dropout=None):
        self.name = name
        self.units = units
        self.dropout = dropout
        self.next = None

    def get_tensor(self, inputs):
        tensor = tf.layers.dense(inputs=inputs, units=self.units)
        return tensor

    def __str__(self):
        return self.name + " (Dense)"

    __repr__ = __str__

class Flatten:
    def __init__(self, name):
        self.name = name
        self.next = None

    def get_tensor(self, inputs):
        tensor = flatten(inputs)
        return tensor

    def __str__(self):
        return self.name + " (Flatten)"

class Architecture:
    def __init__(self, filename):
        fp = open(filename, 'r')
        s = fp.read()
        arch_str = json.loads(s)

        node_map = {}

        self.nodes = []

        # Create the nodes first.
        for key in arch_str:
            k = arch_str[key]
            node = None
            if k['type'] == 'cnn':
                node = CNN(key, k['filters'], k['kernel_size'], k['strides'], k['padding'], k['activation_func'])
                # Setup the Maxpool Node
                node.maxpool = Maxpool(k['maxpool']['size'], k['maxpool']['strides'])
            elif k['type'] == 'flatten':
                node = Flatten(key)
            elif k['type'] == 'dense':
                dropout = k.get('dropout')
                node = Dense(key, k['units'], dropout)

            assert(node is not None)
            node_map[key] = node
            self.nodes.append(node)

        # Create the connections from the node
        for key in arch_str:
            k = arch_str[key]
            src_node = node_map[key]
            if k['connects_to'] is not None:
                target_node = node_map[k['connects_to']]
                src_node.next = target_node

        self._topological_sort()

    def _get_entry_node(self):
        return self.nodes[0]

    def _topological_sort(self):
        # Do a topological sort to find out the first node we need
        pass

    def generate_graph(self, features):
        entry_node = self._get_entry_node()

        # Now at this point we can recursively go through and find the tensor
        input = features
        node = entry_node
        tensor = None
        self.logits = None
        while node is not None:
            tensor = node.get_tensor(input)
            input = tensor
            node = node.next
            self.logits = tensor

    def get_logits(self):
        return self.logits

class Data:
    def __init__(self):
        training_file = 'data/train.p'
        validation_file= 'data/valid.p'
        testing_file = 'data/test.p'

        with open(training_file, mode='rb') as f:
            train = pickle.load(f)
        with open(validation_file, mode='rb') as f:
            valid = pickle.load(f)
        with open(testing_file, mode='rb') as f:
            test = pickle.load(f)

        self.X_train, self.y_train = train['features'], train['labels']
        self.X_valid, self.y_valid = valid['features'], valid['labels']
        self.X_test, self.y_test = test['features'], test['labels']

    def render_data(self):
        image_with_label = zip(self.X_train, self.y_train)
        seen_labels = set()

        fig = plt.figure(figsize=(200, 200))
        total_unique_labels = len(set(self.y_train))
        unique_rows = total_unique_labels // 5 + 1

        grid = ImageGrid(fig, 151,  # similar to subplot(141)
                        nrows_ncols=(unique_rows, 5),
                        axes_pad=0.05,
                        label_mode="1",
                        )

        i = 0
        for i_l in image_with_label:
            img, label = i_l
            if label not in seen_labels:
                im = grid[i].imshow(img)
                seen_labels.add(label)
                i += 1

        plt.show()

def main():
    EPOCHS = 10
    BATCH_SIZE = 128

    x = tf.placeholder(tf.float32, (None, 32, 32, 3))
    y = tf.placeholder(tf.int32, (None))

    # Load the data first and split it into training and testing sets
    data = Data()

    # For One hot encoding lets make the depth the maximum value of y so that way we have the right
    # encoding for now. However, this is inefficient since this is a sparse matrix.
    # TODO: Re-normalize the labels so that the min value in the label becomes 1 and the rest of the
    # values are represented with the differences.
    one_hot_y = tf.one_hot(y, max(data.y_train))

    # Load the architecture file and see what we can figure out from it.
    arch = Architecture("lenet.json")
    arch.generate_graph(x)

    logits = arch.get_logits()
    cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=one_hot_y)
    loss_operation = tf.reduce_mean(cross_entropy)
    optimizer = tf.train.AdamOptimizer(learning_rate=0.001)
    training_operation = optimizer.minimize(loss_operation)

    with tf.Session() as sess:
        sess.run(tf.global_variables_initializer())
        num_examples = len(data.X_train)

        print("Training...")
        print()
        for i in range(EPOCHS):
            x_train, y_train = shuffle(data.X_train, data.y_train)
            for offset in range(0, num_examples, BATCH_SIZE):
                end = offset + BATCH_SIZE
                batch_x, batch_y = x_train[offset:end], y_train[offset:end]
                sess.run(training_operation, feed_dict={x: batch_x, y: batch_y})

if __name__ == "__main__":
    main()


BRIDGEPORT — Don't have a working smoke alarm? Call the Bridgeport Fire Department to have one installed. It might just save your life.
"Don't wait until it's too late," the department cautioned in a post on Facebook on Thursday.
To get a free smoke alarm installed, call the fire department at 203-335-8835.


It's Skechers LA Marathon time again, time to experience the spectacle when more than 24,000 racers from all 50 states and more than 63 countries on Sunday, March 24.
Or maybe you promised to catch a glimpse of family or friends pounding the pavement somewhere along the course from Dodger Stadium all the way to Santa Monica.
Wherever you're starting from, you probably don't want to drive. Freeway ramps and streets surrounding the 26.2-mile course will be closed early. And during the race, parking spots may be frustrating to find.
So, it can be best to ride the Metro — the Red Line from the San Fernando Valley, or the Gold Line from the Pasadena area.
If you've never ridden the Metro, this is the time to study the schedules and plan where you want to be — and when.
Remember that the marathon begins at 6:30 a.m. beginning with wheelchairs, followed by handcycles at 6:42. Elite women runners begin at 6:45, followed at 6:55 a.m. by the elite men and the full field.
Also, the elite runners are fast, so you might want to calculate your street position by the 2018 winners finish times. Wilson Kirui, from Kenya, was the men's winner at 2 hours, 11 minutes and 47 seconds. Sule Gedo, from Ethiopia, also flew down the course with her women's winning time of 2 hours, 33 minutes and 52 seconds.
The maximum net race day finish time of 6 hours and 30 minutes is calculated by the time the last on-time runner crosses the start line. The half-way point, around mile 13 of the course, is on the Sunset Strip, the eastbound gateway to the City of West Hollywood.
And just like for the runners, timing and preparation is everything when you take public transportation to view the marathon.
Check Metro's Saturday, Sunday and holiday schedule section online to see what time you want to arrive at a few easy-to-get-to areas. Make sure you scroll to the end of timetables for the weekend hours section, and also the schedule for the direction in which you want to go.
The three closest station stops to get to the marathon route from North Hollywood station are Metro's Hollywood/Highland, Hollywood/Vine and Hollywood/Western stations.