text:
Q: send binary response in node from phantomjs child process I have created a node endpoint to create rasterised version for my svg charts.
app.post('/dxexport', function(req, res){
    node2Phantom.createPhantomProcess(req,res);
});

My node to phantom function uses spawn to run phantomjs
var spawn = require('child_process').spawn;
exports.createPhantomProcess = function(req,res){

    var userRequest = JSON.stringify(req.body);
    var bin = "node_modules/.bin/phantomjs"
    var args = ['./dxexport/exporter-server.js', userRequest, res];
    var cspr = spawn(bin, args);

    cspr.stdout.on('data', function (data) {
        var buff = new Buffer(data);
        res.send(data);
    });

    cspr.stderr.on('data', function (data) {
        data += '';
        console.log(data.replace("\n", "\nstderr: "));
    });

    cspr.on('exit', function (code) {
        console.log('child process exited with code ' + code);
        process.exit(code);
    });

};

when rendering is completed and file is successfully created I call the renderCompleted function inside phantomjs:
var renderCompleted = function (parameters) {
    var exportFile = fileSystem.open(parameters.exportFileName, "rb"),
        exportFileContent = exportFile.read();
    parameters.response.statusCode = 200;
    parameters.response.headers = {
        "Access-Control-Allow-Origin": parameters.url,
        "Content-Type": contentTypes[parameters.format],
        "Content-Disposition": "attachment; fileName=" + parameters.fileName + "." + parameters.format,
        "Content-Length": exportFileContent.length
    };
    parameters.response.setEncoding("binary");
    parameters.response.write(exportFileContent);

    /////// somehow send exportFileContent as node res object for download \\\\\\\\
    exportFile.close();
    parameters.format !== "svg" && fileSystem.remove(parameters.exportFileName);
    for (var i = 0; i < parameters.filesPath.length; i++)
        fileSystem.remove(parameters.filesPath[i]);
    parameters.filesPath = [];
    parameters.response.close()
};

this response is passed from nodejs however apparently this code is calling phantomjs methods so I get errors like

TypeError: 'undefined' is not a function (evaluating 'parameters.response.setEncoding("binary")')

How can I send the binary file response somehow to the node function so it can be sent with my node server to the user?
Any help is appreciated.

A: Ok after some struggle here is the working solution if someone stumbles on this post.
As Artjom B. mentioned I found that the easiest way was delegate the rendering and file creation of the visualisation to phantomjs. Then send all the parameters related to those operations once done through the console.

Also updated the answer based on @ArtjomB.'s advice to wrap the console message sent in a unique beginning and end string so the risk of the other possible future outputs being mistaken for the intended rendered file object is mitigated.

var renderCompleted = function (parameters) {
    console.log("STRTORNDRD" + JSON.stringify(parameters) + "ENDORNDRD");
};

This then gets picked up by stdout and usable like this:
exports.exportVisual = function (req, res) {

    var userRequest = JSON.stringify(req.body);
    var bin = "node_modules/.bin/phantomjs"
    var args = ['./dxexport/exporter-server.js', userRequest, res];
    var cspr = spawn(bin, args);
    var contentTypes = {
        pdf: "application/pdf",
        svg: "image/svg+xml",
        png: "image/png"
    };

    cspr.stdout.on('data', function (data) {

        var buff = new Buffer(data).toString('utf8');
        var strData = buff.match(new RegExp("STRTORNDRD" + "(.*)" + "ENDORNDRD"));

        if (strData) {

            var parameters = JSON.parse(strData[1]);

            var img = fs.readFileSync(parameters.exportFileName);
            var headers = {
                "Access-Control-Allow-Origin": parameters.url,
                "Content-Type": contentTypes[parameters.format],
                "Content-Disposition": "attachment; fileName=" + parameters.fileName + "." + parameters.format,
                "Content-Length": img.length
            };

            res.writeHead(200, headers);
            res.end(img, 'binary');

            // delete files after done
            if (parameters.format != "svg") {
                fs.unlink(parameters.exportFileName);
            }

            for (var i = 0; i < parameters.filesPath.length; i++)
                fs.unlink(parameters.filesPath[i]);

            // done. kill it
            cspr.kill('SIGINT');

        }

    });

    cspr.stderr.on('data', function (data) {
        data += '';
        console.log(data.replace("\n", "\nstderr: "));
    });

    cspr.on('exit', function (code) {
        console.log('child process exited with code ' + code);
        process.exit(code);
    });

};

redpajama_set_name: RedPajamaStackExchange


The Myrtle Beach Sports Center, a 100,000 square foot state-of-the-art indoor sports facility, is the latest addition to Myrtle Beach's impressive sports venue roster. Opened in March 2015, the facility features 8 basketball courts and 16 volleyball courts spread over 72,000 square feet of column-free hardwood space. The venue has been designed to host court sports, wrestling, gymnastics, table tennis, pickle ball, and other sports events as well as trade shows. To service the event space, there are seven team rooms, telescopic bleachers, a private mezzanine for elevated viewing, and a café with indoor/outdoor seating.


text:
Published On: Mon, Nov 25th, 2013
Outbreak News / World News | By Robert Herriman
Guelph General Hospital declares C diff outbreak
Due to an increase in the numbers of Clostridium difficile cases during September and October, in consultation with Wellington-Dufferin-Guelph Public Health, officials at Guelph General Hospital (GGH) have declared an outbreak of C. difficile.
According to a news release Friday, GGH typically experiences one or two cases of hospital-acquired C. difficile a month. Currently, four patients have C. difficile and as a result, an outbreak was declared.
Hospital officials are reminding all visitors to clean their hands using the supplied hand sanitizing gel both entering and leaving all areas of the building. In addition, the hospital has increased its commitment to a safety culture by increasing its emphasis on hand hygiene education and auditing of the staff and physicians.
In addition, GGH has increased infection prevention education and information to front line staff, enhanced its cleaning protocols and reviewed all cases of unexplained diarrhea by patients.
Clostridium difficile is a bacterium found throughout nature; soil, water and the intestines of humans and various animals. It has been isolated in the feces of 3% of healthy adults according to one study. It is however more prevalent in hospitalized adults with colonization rates of up to 30 percent seen.
It is implicated as a causative bacterium of antibiotic-associated diarrhea (AAD) and pseudomembranous colitis (PMC). The problem is when there is a decrease of normal intestinal flora typically due to the use of antibiotics (the list of antibiotics is quite long). This allows the C. difficile that is normally in check, to flourish and produce some potent toxins that results in diarrhea or the potentially life-threatening PMC.
For more infectious disease news and information, visit and "like" the Infectious Disease News Facebook page
Looking for a job in health care? Check here to see what's available
Robert Herriman - Writer, Co-Founder and Executive Editor of The Global Dispatch. Robert has been covering news in the areas of health, world news and politics for a variety of online news sources. He is also the Editor-in-Chief of the website, Outbreak News Today and hosts the podcast, Outbreak News Interviews on iTunes, Stitcher and Spotify Robert is politically Independent and a born again Christian Follow @bactiman63
antibiotic-associated diarrheaC diff outbreakCanadaClostridium difficileGuelphGuelph General HospitalGuelph General Hospital C diffPseudomembranous colitis
Speed Bumps Damaging Cars a Sign of Bigger Problems

redpajama_set_name: RedPajamaCommonCrawl


Kit includes a power tailgate handle and manual BOLT lock that codes to your ignition key to protect your tailgate and cargo. Powered lock wires into the existing power door locks, so when you lock your truck, you lock your tailgate. Lowest Prices for the best vehicle locks from Pop and Lock. Pop & Lock Custom Tailgate Lock with Handle - Power Lock and Manual BOLT Lock - Black part number PAL8540 can be ordered online at etrailer.com or call 800-298-8924 for expert service.
Kit includes a power tailgate handle and manual BOLT lock that codes to your ignition key to protect your tailgate and cargo. Powered lock wires into the existing power door locks, so when you lock your truck, you lock your tailgate.
Note: BOLT locks permanently code to only 1 vehicle. They cannot be re-coded or re-keyed.
Replace your existing factory tailgate handle with this ABS plastic tailgate handle that has a built-in manual lock that can be wired to your power door locks. And you won't have to carry any extra keys. The lock cylinder for this tailgate lock can be keyed to match your truck key using patented BOLT codeable technology.
Are you tired of carrying a bulky ring of keys - for your hitch lock and coupler lock, your pickup cover or trailer door, and all the various padlocks securing your equipment?
BOLT (Breakthrough One-key Lock Technology) has solved that problem by designing a line of locks that can operate with a key you already have handy - your vehicle ignition key.
When you insert your own key into the cylinder, spring-loaded plate tumblers move up and down until they are matched exactly to that key. The first time the key is rotated, the cylinder is uniquely coded to that key. When the key is removed, the cylinder moves into the locked position. When the key is turned again, it will rotate to the unlocked position.
This sturdy, stainless steel lock resists corrosion and is custom fit to your vehicle. The lock is installed using basic tools - no welding or drilling is necessary. And the tailgate lock wires directly into your powered lock system using quick splice connectors. You can activate the Pop & Lock using your keyless remote - lock your truck doors, and you lock your tailgate. Just hit your door-lock button and your tailgate is secure.
A new tailgate can cost hundreds - this powered lock saves you the cost and aggravation of replacing a stolen tailgate.
Today we're going to be reviewing part number PAL8540. This is the pop and lock custom tailgate lock. The power and manual lock head 00:09 are included. This is designed to fit Toyota Tacoma's beginning with year 2005. The power tailgate lock and manual lock are going to help prevent theft of your cargo and your tailgate. It's going to create a nice secure lockable area to keep your valuables when you use, especially with a tonneau 00:25 cover or a camper shell.	Now the power lock system is this right here.
This is designed to work with your factory power lock system. It's going to lock and unlock using the remote keyless entry with your vehicle. The manual lock is going to have a key to unlock your tailgate in case your vehicle's battery fails. Now the manual lock cylinder is going to use bolt codeable technology, so that way it can be keyed to match your OEM truck key. This is going to be made of corrosion resistant stainless steel when it comes to the locking mechanism.
That is going to be customized to fit your vehicle and integrate into your tailgate handle.	Another great feature is that it mounts inside the existing factory handle mechanism so it is designed to resist tampering. It's going 01:06 to install pretty easily. It simply wires into your power lock system using the quick splice connectors, these two red things here, those are included. You're going to get all of the wiring. This does not require any drilling or welding, requires only basic tools.
As you can see, everything here on the table is what your going to get. You're going to get the wiring, the quick splices, all the hardware that's necessary as well as some zip ties to help secure the wiring up and out of the way to make sure it doesn't interfere with any other components.	This slot right here is designed to allow the system to work with a factory back up camera, if your vehicle is equipped with that. A kit that we offer, and it's sold separately is part number PAL9520, that's going to be the switch kit and that's available for trucks without existing power locks. That's going to do it for our review of part number PAL8540. This is the pop and lock custom tailgate lock.
Order: RelevanceNewestRating - High to LowRating - Low to High Kit includes a power tailgate handle and manual BOLT lock that codes to your ignition key to protect your tailgate and cargo. Powered lock wires into the existing power door locks, so when you lock your truck, you lock your tailgate.
Great! With keyed lock also makes it nice.
Working great no problems with product since its installation. Still load when it locks but works as detailed.
The lock handle broke about 4 months later. Your company replaced it under warranty. I have not had any issues since.
Do you have a question about this Vehicle Lock?
The two blue wires (one with red stripe and one with black stripe) will be found just inside the driver side door under the bottom plastic panel. The panel will need to be pulled up and the needed factory wires will be inside a black loom. I have attached an installation video on the 2015 Tacoma that you can use for reference. The process should be identical on your truck. Please let me know if you still cannot locate the correct wires and I will be happy to look into this further.
Both of the Pop and Lock Tailgate locks you mentioned part # PAL8540 and # PAL8550 are a fit for your 2007 Toyota Tacoma and both come with the ability to manually lock and power lock the handle. The difference is that the part # PAL8540 comes with a lock cylinder that can be programmed to your truck key so you would only need one key to operate the setup. The part # PAL8550 comes with a separate key.
The Pop & Lock Custom Tailgate Lock with Handle # PAL8540 that you referenced is the most current version of the lock. Our inventory turns over quickly so if you ordered this you'd be getting the most recent and updated version.
The Pop & Lock locking tailgate handle and power conversion kit is part # PAL8540. The kit is a confirmed fit for your 2014 Tacoma. You can see current pricing by clicking the provided product link.
Pop & Lock Custom Locking Tailgate Handle # PAL5500 is a confirmed fit for your 2014 Toyota Tacoma and you can convert this to a power locking tailgate lock by adding Conversion Kit # PAL8525. You may prefer to simply get the Power and Manual Lock Kit # PAL8540 which will save you a few dollars.
Yes, the Pop and Lock tailgate lock # PAL8540 will fit all models of the 2014 Toyota Tacoma including models that have the backup camera. I have included a link to all of the tailgate locks we offer for you truck.
The Pop & Lock Custom Tailgate Lock, part # PAL8540, is confirmed as a fit for a 2014 Toyota Tacoma. This is not been confirmed as a fit for the 2015. This system works with the factory power lock system on the truck, so it can be locked and unlocked with a keyless remote. This system also features a manual lock just in case the battery should fail on the Tacoma. This mounts inside the tailgate handle, so it makes difficult for thieves, and will even work with factory backup cameras.
If your 2014 Toyota Tacoma has power locks already then the Pop & Lock Custom BOLT Lock Tailgate Handle # PAL8540 will simply wire into that power lock circuit. If the truck does NOT have power locks already then you will need to provide 12V power and use Switch Kit # PAL9520.
I have an option for your, but the part # PAL8540 that you referenced is not confirmed to fit your 2007 Dodge Ram 1500. The closest thing we offer to that would be the Pop and Lock Tailgate Lock part # PAL8340. This will operate with the key FOB you currently have for you truck to lock and unlock the tailgate. I attached an install video for you to check out as well.
The Pop & Lock Custom Tailgate Handle # PAL8540 is tied directly to your OEM power lock system so if your aftermarket remote controls the locks on your vehicle then yes, it will operate the Pop & Lock system as well. I noticed that you input a 2018 Toyota Tacoma in the vehicle list. If that is what you will be installing the lock on then you would need part # PAL8535 instead of part # PAL8540. This will work in the same fashion as the part mentioned above.
Yes, the Pop & Lock Custom Tailgate Lock, # PAL8540, will fit your 2014 Toyota Tacoma with the backup camera. I verified this with my contact at Pop & Lock. There is a small cap next to the handle on this tailgate lock that would be removed if you have the camera.
The Pop & Lock Custom Tailgate Lock # PAL8540 uses the same codeable lock core as the BOLT hitch locks. All you have to do is insert your vehicle's key in the core and turn it as far as you can clockwise. Once this has been done the lock will be keyed to your vehicle. Check out the review video for more info that I attached.
We do carry a manual tailgate lock, part # PAL5400 that is a fit for your 2014 Tacoma. The lock can be keyed alike with your ignition key, simply by inserting your ignition key and turning the key in the cylinder. The PAL5100 you referred to isn't compatible with your Tacoma. If you'd prefer a power lock, you can use part # PAL8540. You can see other accessories available for your truck by clicking the provided link.
Only the key fob will lock and unlock both the doors and the tailgate on your 2015 Toyota Tacoma. The BOLT key for the Pop & Lock Custom Tailgate Handle - Power Lock and Manual BOLT Lock # PAL8540 is for the tailgate but it is not going to have any effect on your doors.
Highest quality vehicle locks for the best price.
Most detailed, accurate vehicle lock information available.


Many thanks for joining us on board MSC Magnifica on 29th May 2014. We were delighted to be able to host this event and on such a magnificent ship. Thank you for making it such a great day and we hope you had an enjoyable and memorable experience.


On Monday the children took part in a fun and exciting challenge. They had to design an aeronautical device that could travel into space. It had to have a pilot, carry cargo and be able to reach space.
The children had a great afternoon and enjoyed the challenge.


text:
Q: installing fuse-python on windows I'm getting this error egg:info error
Collecting fuse-python
  Using cached fuse-python-1.0.5.tar.gz (49 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      The system cannot find the path specified.
      The system cannot find the path specified.
      pkg-config unavailable, build terminated
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

I did try to make this install from Pypi site.
after a closer look i've found that egg_info file is almost empty no version info.
how to solve it......Thanks for your time.


text:
Artist turned environmentalist makes HP home
Painter Chapman Kelley now calls Hyde Park his home after living in Dallas for the past nine years. His roots in Chicago go deeper than his successful art career, and he has returned to get back to the "nature" of things in finishing what he started years ago.
Kelley's house overflows with his work; there isn't enough wall space for the multitude of pieces he has created. However, Kelley's greatest life work is not on a canvas, but has been his passion for the environment, which culminated in 1984 in his famous "Wildflower Works" in Chicago's Grant Park.
Kelley's "Wildflower Works" brought beautiful color and vibrant life to Grant Park during its 20 year run, all using native plants to the area.
"It made everything really showy and blazing in color…it was like a real life painting," Kelley said.
The project took over 1.5 acres of Grant Park and transformed the area into public artwork. Volunteers and Kelley himself maintained the landscape, and no chemical fertilizers or insecticides were ever used on the plants.
In "Wildflower Works," Kelley soon discovered the importance and benefits that native plants bring to its surrounding environment. He said that his project saved the Chicago Park District an estimated $6.6 million over the years it thrived in the park.
Flowering plants that are native to the area include the Rough Blazing Star, the New England Aster, the Black-Eyed Susan, the Prairie Violet and the Wild Petunia. These plants offer benefits to insects and birds and are rain garden plants, which help prevent pollutants from entering storm drains and nearby waters.
Now, Kelley is concerned with informing the public on the benefits of native plants and educating on how to maintain the plants that are essential to an urban ecosystem.
"It's a whole different way of growing things," he said. "You have to learn how to prevent and get rid of non-native plants and learn how to keep up the native plants."
Late last year, Kelley formed the non-profit education organization, Wildflower Works Foundation. Through the foundation, he has been able to form a group of people as passionate as him about the environmentalist movement and the native plants cause he has pushed for since the '70s.
Every Sunday afternoon, Kelley holds what he refers to as a "salon" at his Kenwood home, where a diverse mix of people meet to discuss ways to carry out the Wildflower Works Foundation's goals.
One of the goals is to incorporate wildflowers and native plants in future developments in Chicago. In all three concepts for the Obama Presidential Library, native plants are included as part of the plans.
Kelley hopes to have scientists back the foundation with research to help educate and create change in what he hopes to turn into a progressive movement of environmentalism.
Despite his renowned success in the art world, this foundation has become Kelley's best masterpiece, and he has no regrets.
"My whole life has been serendipity," he said. "Some things are more gratifying than just getting rich."
[Via: Hyde Park Herald]
About Allison Matyus
4th Ward residents still have questions for Ald. King
New app for free curbside parking designed with Hyde Parkers in mind


Myrouter.local is the web utility that is use to make login access for Linksys advance routers at local level. That means, if you want to make login for your Linksys wireless router configuration from a local computer system that is connected within your home network; you will need to access myrouter.local address in the web browser's address bar. Remember, myrouter.local sign in will make it possible accessing your Linksys setup page for local level only. That means, you can't access your Linksys routers from any remote location. If you need to make configurations for your Linksys router from any remote location you will need Linksys Smart WiFi account. Using Linksys Smart WiFi account you can easily access your Linksys routers from any remote location. Default address for accessing Linksys routers from remote location is linksyssmartwifi.com and login details for this web utility.
Why we Need to Access myrouter.local Web Utility?
Another question that will come to your mind is, why we need to access myrouter.local utility? Answer is simple, you will need to make login for http://myrouter.local if you need to change or modify any kind of configurations for your Linksys router. Here is the list of advance settings that are manageable using Linksys myrouter.local address.
Login access for Linksys setup page us possible using myrouter.local address.
Admin user name and password for Linksys router can be changed using myrouter.local address.
MTU size for your myrouter.local 192.168.1.1 can be changed using myrouter local address.
If need to configure a separate guest account for your family members and friends, you will need to make login for myrouter.local web utility.
Using http://myrouter.local address you will able to access device list and network list for your home network.
FTP or File Transfer Protocol is one of the advance networking protocols that is used to manage the data transfer between your network devices. If you are using USB storage access for your home network, you will need to configure FTP protocol smartly only then you can easily make access for your USB storage from outside. That means, you will able to access USB storage from outside of your home network. Linksys setup for FTP protocol is very easy. You will need to follow some simple steps and all these advance steps are explained in following step.
First of all, you will need to make login access http //linksyssmartwifi.com setup page using the web browser you are using at your personal computer.
Once you get successful login access for Linksys cloud account you will need to choose "Smart WiFi Tools" and there you will find "USB Storage" option.
Now, you will need to click on "FTP Server" under "USB Storage".
You are now ready to access USB storage media and enjoy all media files stored on USB media.
You can use this IP address for accessing the USB storage from any remote location.
These are the simple steps you will need to follow so that you can enjoy your USB storage access from any remote location. You will need a valid and working myrouter.local 192.168.1.1 account. Setting up an account for Linksys Smart WiFi is also very easy. Using Linksys Smart Wifi account you can easily connect your Linksys router with your account and access that router login page from any remote location.
How to change password for wireless network access?
A strong password is always required so that you can make sure that your network access is fully secure from any kind of access. All networking routers and WiFi extenders also comes with a default password but this default password will be same for all devices. You must change this default password as soon as possible because default password for your Linksys router anyone can make login access for your device very easily.
Open web browser at your computer system and access Linksys router login page. myrouter.local 192.168.1.1 is the local address that is used to make login access for Linksys setup page.
You will get redirect for the Linksys router login page. Using this login page, you can easily enjoy smart setup page for your Linksys wireless routers. You will need to fill user name and password for your Linksys routers. If you have not changed the login details yet, you can fill default login details for your Linksys router.
You can find the password for your WPA/WPA2 mode from the "passphrase" option. You can view your current password in the field or you can also change the password if required.
Make sure to fill a secure password for your Linksys router setup page. After filling the password, you will need to click on "Generate" option.
Click on "Save" button and all saving you have made regarding your Linksys wireless router.
These are the steps for changing default password for your Linksys router. You can now make sure that your router is fully secure for any kind of unauthorized access.
Linksys Setup is possible using an active internet connection. You will need to insert setup CD in the CD drive of your laptop and follow the online instructions. Using these simple and easy to follow online instructions you will able to setup your Linksys router and create a WiFi network for your location. We are going to explain the steps for setting up your Linksys wireless router using DSL internet services.
If you advance router have capabilities of PPPoE dialer set you can easily make these kinds of configurations for your Linksys router. Here are the steps you will need to follow.
First, you will need to make login access for your Linksys advance router using myrouter.local address. myrouter.local is the default address for accessing Linksys router login page.
After filling the login details for your Linksys router login, you will go for "setup" tab.
Under "Internet Connection Type", select "PPPoE" option.
You will need to enter login user name and password for PPPoE access.
Click on "Save Settings" option so that you can save all the settings you have made.
Go for the "Status" option.
These are the steps you will need to follow if you want to setup Linksys router using PPPoE configurations. From the blog session you can receive more information regarding http //myrouter.local, Linksys router login, http //linksyssmartwifi.com setup, myrouterlogin, Cisco Linksys router login and my Linksys router login.
Second option you can go for is, DHCP settings that are also know as automatic configurations. Here are the steps you will need to follow for DHCP configurations. Such kind of configurations are ideal your network modem and Linksys router both are working with same IP configurations.
Make login access for Linksys Router Login page using myrouter.local address. myrouter.local sign is the registered address for making login access for Linksys advance routers. You can also use 192.168.1.1 IP address if you are getting issues with myrouter.local web utility.
After making login access for your Linksys WiFi router login page, you will need to go for "Internet setup" section.
From the drop down menu, you will need to select type of internet connection you are using.
You will need to change the value of IP address that is by default configured for the given list.
Subnet Mask also need to changed in the given lists.
After making these changes you will need to click on option "save Settings".
You can cross check the configurations by opening the command prompt and access command "ipconfig/renew". Before you all above given steps, you will need to make sure that you have connected your network modem with your router using Ethernet cable. You can get more information regarding Linksys router login page, http myrouter local signin, myrouterlogin, Linksys setup, myrouter.local, Linksys router login, myrouter.local 192.168.1.1 from the blog session.
You must make sure that your Linksys advance router is updated for the latest firmware files available. Updating the Firmware for your Linksys router hardly require few minutes so you must make sure that you have reflected the latest firmware file for your Linksys router. Updating the latest firmware for your Linksys router will not need any kind of charges any other additional cost. We are going to explain the steps you will need to follow if you want to update latest firmware for your Linksys router.
First, you will need to download firmware for your Linksys router from the official site. You can find the Firmware for your Linksys router using the model number of your Linksys advance router.
After that, you will need to access Linksys router login window for Linksys setup. Default address for Linksys router login page is myrouter.local so you can fill this web address in web browser's address bar and hit the enter key.
You will need to fill login details and after making successful login for your Linksys router, you will need to go for "Firmware Upgrade" option under "Administration".
Click on "Browse" button and select the Firmware file you have just downloaded.
After selecting the Firmware file, click on "open" button and select the Firmware file you have downloaded for your router.
You can now start the Firmware Updation process.
Make sure not to disturb the Firmware Updation process so that complete firmware file can get reflected for your device.
These are the simple steps you will need to follow so that you can easily update firmware for your Linksys router. You get complete information regarding router login Linksys, linksys smart router login, http //linksyssmartwifi.com setup, myrouter.local, http //myrouter.local and myrouter.local 192.168.1.1 from our website.


Working across Birmingham including Stafford, Wolverhampton, Coventry, Warwick and Oxford; we have a dedicated, fully trained team supporting our customers within this area. Our team consists of Sales Consultants that will visit your business to determine the current level of hygiene and provide you with their expert opinion on a suitable solution that Initial Washrooms can offer. Our Customer Delivery Representatives ensure your service is delivered in a timely and professional manner.
I have been with Initial since June 2015 in what has been a very fast paced development within the company.
Starting in a Graduate Management Sales Consultant I graduated within the first year and was promoted to my current role of Service Manager, Birmingham shortly after.
I was attracted to Initial based on the potential career opportunities available and their keen interest in graduate development.
I'm a big fan of sports and try to play as much as I can. I also love to travel and aim to tick a country off every year.
The Birmingham team had a very successful 2016, coming 3rd Place Branch of the Year , Issy Ghafoor 1st Place Rookie of the Year and Mindy Jagpal coming 2nd Sales Consultant of the Year .
Initial provide high quality washroom products partnered with a range of service plans to maintain a high level of hygiene. Not only do your customers expect a high level hygiene and a pleasant experience within the washroom, your staff also does. Our array of products is a part of two different ranges - Signature and Reflection. With the Signature range, we have Sanitary Waste Bins, Air Fresheners and Soap Dispensers available in a white finish, while the Reflection Range offers the same products with a Stainless Steel finish.
Not only do we provide products to improve washroom hygiene, we can also offer a vending solution for your washroom visitors. Offering a range of vending machines, our service provides your business with the opportunity to offer a variety of well known, trusted washroom products to your visitors.
For a FREE hygiene survey, arrange a time and date now with one of our operatives via Email or calling us direct on 0800 313 4972. With a date and time to suit you, a hygiene expert will visit your business and determine the best solution to improve your hygiene.


text:
Q: How to make an image fold smoothly? I want to put an image of stars (of the milky way to be precise) on my website. But the image is small and is repeated over the page. Therefore, I want the image to fold smoothly. This way if a visitor scrolls down the page he/she shouldn't be able to tell where the image ends - that is the tiling of the same image should be indiscernible.
Any ideas?
-sgsawant

A: Open the image in GIMP, then select Filters => Map => Make Seamless.


chorus (or two soloists) and piano. Winner of the 1979 Music Teachers Association of California "Composers Today" Competition.
The white owl in the belfry sits.
Its note was clear and dulcet.
"Keep all your gold and all your silk!
"Come fly to me, out from this vale.
And they loved one another well.
To the charms of their daily food.
For they never came back again.
There wend we our way.
How far leads the path that beckons?
Whither flows the wine dark sea?
Where can the end be?
What lies far beyond the starlight?
Whither blows the eastern wind?
How shall the play end?
Cuckoo, cuckoo, calling I hear.
Listen, listen, Springtime is near!
Listen, listen, Springtime is nigh.
Winter, winter quickly must yield.


ENGLEWOOD, Colo. – Today, the Arapahoe County Public Airport Authority announced Centennial Airport will celebrate its 50th anniversary, this year, with a year-long commemoration of the airport's rich history in the Denver Technological Center, its half-century of aviation excellence, and the Centennial Airport Foundation's contributions to local aviation and aerospace education.
Named one of 2009's 100 most influential people in the world by TIME magazine, Sullenberger became an international hero on Jan. 15, 2009, when he and his crew safely guided US Airways Flight 1549 to an emergency water landing in New York City's icy Hudson River. The event became the inspiration for the Oscar®-nominated motion picture Sully, directed by Clint Eastwood, with Academy Award®-winning actor Tom Hanks in the lead role as Sullenberger.
The gala luncheon will be held Friday, May 25, 2018, 11 a.m. to 2 p.m. at the Denver Marriott Tech Center, 4900 S. Syracuse St., Denver, CO.
Since 2005, Centennial Airport Foundation, a 501(c)3 has generated more than $140,000 to support local scholarships to Colorado aviation and aerospace programs and students.
Tickets to attend the 50th anniversary gala are available at www.centennialairport.com. All proceeds from ticket sales will go fund future Centennial Airport Foundation aviation and aerospace scholarships.
Centennial Airport offers sponsors unique brand exposure and the opportunity to join our high-value audience composed of general aviation and aerospace leaders, such as: our 50th Anniversary presenting "Flight Deck" sponsor, Jeppesen, our "First Class" sponsor, TAC Air; our "Business Class" sponsors: Signature Flight Support, Denver International Airport; our "Coach XL" sponsors: Denver jetCenter, Citywide Bank, and our "Coach Class" sponsors: Park Meadows, South Metro Fire Rescue, Ridge Gate, International Jet, Roger Mangan State Farm, Denver South East Business Partnership, Gulfstream, Robinson Waters & O'Dorisio, Front Range Airport, and the City of Centennial.
To learn more about tickets or table sponsorship, visit www.centennialairport.com or contact Robin Loughran, at 720-985-8580 or at events@centennialairport.com.
Located in the heart of the prestigious Denver Tech Center, Centennial Airport (KAPA) connects people, places, and product—at the speed of flight. With more than 340,000 operations per year, it ranks among the busiest general aviation airports in the nation, generating approximately $1.4 billion in economic impact. Under the direction of the Arapahoe County Public Airport Authority, the airport is home to four award-winning FBOs, seven flight schools and around-the-clock FAA air traffic control.
Founded in 2005, the Centennial Airport Foundation is a 501(c)3 tax exempt organization that supports local STEM education and programs—particularly those with an emphasis on aviation and aerospace. Since its inception, the Foundation has provided more than $140,000 in grant and scholarship funds to local schools, colleges, universities, and industry-related charities.
For more information about the foundation, visit www.centennialairportfoundation.org.


text:
Q: CSV from UTF8 to ISO-8859-1 i am trying to modify my CSV export.
But it wont convert / save my CSV from UTF-8 to ISO-8859-1
Any Ideas what i have made wrong, please?
Actually since modifying this, i get a empty CSV File...
(php 7.0.x)
function my_GenerateCSV($prefix, $csvarray, $getMonth){
    ### Generate CSV File from CSVArray
    if ($prefix == 'sepa'){
        $date = '-'.getTodaysDate();
    }
    $month = $getMonth;
    $filename = 'private/'.$prefix.'-'.$month.$date.'.csv';
    $fp = fopen(ROOTDIR . '/'.$filename, 'w');
    foreach ($csvarray as $key => $value) {
        //fputcsv($fp, $value, ';');
        fputcsv($fp, convertToISOCharset($value), ';');
    }
    fclose($fp);
    return $filename;
}

function convertToISOCharset($string) {

  $string =  mb_convert_encoding($string, "ISO-8859-1", "UFT-8");
  return $string;
}

SOLUTION:
function convertToISOCharset($array)
{
    foreach($array as $key => $value)
    {
        if(is_array($value))
        {
            $array[$key] = convertToISOCharset($value);
        }
        else
        {
            $array[$key] = mb_convert_encoding($value, 'ISO-8859-1', 'UTF-8');
        }
    }

    return $array;
}

A: The Solution as answer, as requested:
function convertToISOCharset($array)
{
    foreach($array as $key => $value)
    {
        if(is_array($value))
        {
            $array[$key] = convertToISOCharset($value);
        }
        else
        {
            $array[$key] = mb_convert_encoding($value, 'ISO-8859-1', 'UTF-8');
        }
    }

    return $array;
}


My taxes? Filed. Whew! You?
More about Zune HD. Maybe.
eBay: we're spinning off Skype.
Net neutrality? Now now, please!
Amazon.com: a third of e-commerce.
AT&T wants more iPhone exclusivity.
Microsoft patches up Office holes.
Philips: Two dimensions are enough.
I'm afraid to use ATMs.
Miss Circuit City? Just wait.


A Chartis subject-matter expert (SME) will participate in a range of speaking opportunities, from webinars to panel discussions at events. You can also commission our SMEs to present the findings of any proprietary research Chartis has conducted.
These are a great way to position yourself as a thought-leader face-to-face with senior executives at both current and prospective clients. These events can range from intimate breakfast briefings to full-day events. Opportunities include networking with senior executives attending the event and demonstrating thought leadership and expertise through a speaking opportunity on a panel and in presentations.
Chartis' project-managed webinars feature a panel discussion moderated by an industry expert, and include a senior Chartis research director. They can be based on a topic or research report of your choosing, and are designed to position you as a thought leader.
Co-sponsored reports can be hosted on www.RiskLibrary.net and www.RiskTechForum.com, from where they will be syndicated to relevant users who have either expressed an interest in the content or match the specific criteria set by you.


With its rugged all-polycarbonate construction, this Uncle Si duck call uses a single reed for easy blowing—and an authentic call that's impossible to resist.
Body made of tough polycarbonate.
Easy-to-blow design is ideal for beginners and experienced callers.
Raspy sound entices even the shrewdest teal to decoys.
Durable polycarbonate construction is ideal for wet conditions.


text:
This Is Why Grand Burglary Automobile San Andreas Is So Famous!
No Comments on This Is Why Grand Burglary Automobile San Andreas Is So Famous!
Grand Theft Car: San Andreas is a 2004 action-adventure game that was created by Superstar North as well as published by Rockstar Gamings. It is the fifth major access in the Grand Burglary Vehicle collection and also was launched after the 2002 release of Grand Theft Auto: Vice City. It is the 7th installment in the series on the whole. In this write-up, we'll take a better check out what makes the video game so excellent.
The video game's globe is based on the 1988 movie Colors, which features a law enforcement agent taking care of gangs up in arms. This video game likewise features a C.R.A.S.H. unit of the LAPD that is responsible for managing bloods and gangs. Shades was likewise the inspiration for numerous objectives in Grand Burglary Auto: San Andreas. For example, the video game's protagonist, Carl Johnson, can change his body mass. Later on video games eliminated these capabilities, and also currently they call for recurring upkeep and completion of antiques.
In Grand Theft Auto: San Andreas, you have the choice of owning a number of cars. Each course of car has its own distinct advantages and also negative aspects. Off-road cars carry out much better in rough terrain, while racing cars are much better on smooth surfaces. Helicopters are much more versatile and also simpler to manage in the air than jets. There are eleven various type of fixed-wing aircraft and nine helicopters. You can also skydive from particular high-rise buildings.
CJ Johnson is an expert participant of the Grove Street Families street gang. He left his hometown 5 years ago to sign up with the gang in Freedom City, yet after the fatality of his mommy, CJ returns home to hide his dead mother. His estranged sibling, Sean, is the leader of the gang, and also he is joined by youth pals Melvin "Large Smoke" Harris, Lance "Ryder" Wilson, as well as Jeffery "OG Loc" Cross.
While there are no set locations in Grand Burglary Vehicle IV, there are lots of locations that can be visited. The video game's open world makes it very easy to discover and also complete goals. While you're in Los Santos, you can also see surrounding towns and also cities by finishing missions. Yet beware. Traveling to locations that are secured is dangerous as you may draw in cops and also SWAT teams. If you're captured, you'll be penalized.
GTA San Andreas features a gang-war setting that's influenced by the 1992 hood flick Menace II Society. Each district has a set variety of regions that produce money. You can catch an area, however the opposing gang can attempt to retake it at any moment. Your Respect degree affects the number of gang members you'll have to eradicate. If you look amusing, they'll attack you, as well as sometimes they'll even pirate your vehicle.
The video game's money system has actually been fine-tuned to get rid of some aspects of the game's gameplay. Too much betting is still a major problem, but killing civilians will result in an additional celebrity on the desired checklist. Additionally, extreme amounts of money will make you a needed criminal, as well as you'll be provided a red celebrity if you eliminate them. Thankfully, there are still some methods to generate income, including residence intrusion.
Grand Burglary Auto: San Andreas is an action-adventure video game developed by Rockstar North and also released by Rockstar Games. The video game is the fifth primary access in the Grand Burglary Automobile collection and was released after the 2002 launch of Vice City. Overall, the game is the 7th in the collection. If you have not played the collection before, you're missing out! Get started by downloading and install and also playing the demonstration variation.
While there are no online multiplayer settings in Grand Burglary Car: San Andreas, there are a number of features you can take pleasure in as well as make the most of. Getting rich in the video game needs you to collect adequate money to buy the important things you desire. You can likewise wager to advance with the video game quicker. As soon as you've accumulated enough money to get a few of the items you require, head to the Inside Track to place a wager. A good choice is one with a 12/1 chance of winning.
The video game's storyline is greatly affected by the 1993 hood film "The Menace II Culture". The video game's Los Santos is modeled after Los Angeles during the Hazard II Culture motion picture, and also Grove Road is the flick's version of Hollywood Blvd. In the game, some lines are also taken straight from the film, such as the Environment-friendly Sabre drive-by shooting, as well as the environment-friendly flannel t shirt with pigtails.
In GTA V, the gamer is constrained to Los Santos for a lot of the first act. Whenever the player takes a trip beyond Los Santos, the gamer obtains a needed degree of six, and the law enforcement as well as armed force are continuously harassing them. This seems like the player has been in Los Santos for the entire video game. Therefore, GTA V has the same problem, just a lot even more to provide.
Grand Theft Vehicle: San Andreas was an advancement video game when it concerned multi-player. Its multiplayer system was the very first in the series, and it introduced the principle of swimming, climbing on wall surfaces, as well as two-player co-op. While there were limitations, the feature was enjoyable and permitted two gamers to cause chaos. However, this function was reduced from GTA: San Andreas Clear-cut Version.
Besides the main project, the game has a number of optional side missions that assist gamers boost their personality attributes and also earn added earnings. The traditional side missions include delivering passengers, producing fires, and also driving damaged individuals to the health center. Brand-new side missions are pimping, break-in, and also truck as well as train driving. You can also skydive from particular structures. As well as, when you're tired of strolling the streets, attempt to check out the driving college to earn even more cash. try this out
In addition to killing competing gang members, you can additionally recruit homies, who will certainly attack you. The amount of homies you hire depends on your level of respect, and also the quantity of money you make. You can recruit approximately seven homies, however it's finest to maintain a low number of gang members. You can take control of an area by taking control of it. The gang members will certainly often pirate your automobile.
← You Will Certainly Never Ever Thought That Knowing Real Estate Could Be So Beneficial! → Below's What Nobody Tells You About Property.


text:
CROSSING THE WHITEWASH by NICK RIPPINGTON #Football Hooligans #Gangs #thriller #The Boxer Boys @nickripp
March 13, 2017 booksfromdusktilldawn
Well this is a bit of a blast from the past. I first came across Nick Rippington's book Crossing the Whitewash on Netgalley in August 2015 and this is some awesome kick ass story and still remains one of my all time favourite books! So the review below is my original Netgalley review. The thing is Nick is publishing the second book in the series round about July 2017 so I thought this would be a great opportunity for some of you folks to get in front and ready for it's launch.
So come on, come and meet THE BOXER BOYS, you won't ever forget them!
"evocative, original, unfailingly precise and often humorous. Arnold is terrifying" -Writer's Digest Ebook award judges
"Flows and rages like a Welsh mountain river" – 5-star review
Football prodigy Gary Marshall and best mate Arnie Dolan spend their teen years battling adversity together on the rundown London estate where they live. Then a series of life-shattering events intervene to split them apart.
Eight years later Arnie sets out to track down his old sparring partner with the intention of imparting a shocking secret he has harboured all his life.
But where is Gary? And why is he so keen the past stays in the past? The mysteries are about to unravel…
When I got this book I thought it was going to be a lot of rugby with a bit of a thriller thrown in, how wrong I was.
Gary Marshall, at 13, is a typical lad and very bright for his age. He loves his bike, his family and football, especially West Ham, but when he is going home after doing his paper round a group of lads decide they would like to relieve him of his bike. Petrified, but not wanting to give it up, he really doesn't know what to do. Arnie Doles steps in. He goes to the same school as Gary and is the same age but they don't hang around together, though Gary has seen him watching him at school. The only thing Arnie loves is his dog Stevo. Arnie's family aren't without money but it is well known it hasn't been earned legally. His dad is always in and out of prison and at the moment he is serving time for armed robbery. Arnie and his dog wipe the floor with the lads and from then on Gary and Arnie are best mates. Something that Gary will regret more than once. The Boxer Boys have arrived.
This novel is an absolute gem. It has everything that anyone could ever want in a book. The story begins in 1996 to 2015 and follows the life of Gary. There is violence in the book that makes you read with just one eye open. A love story. Drugs, tragedy, murder, rape and football hooligans but there is also comedy that makes you laugh so much.
When the story moves to Wales it moves to rugby too. Gary needs a new start and changes his name to Gareth. It is in Wales that he discovers what real friends are. The character of The Legend is totally legend, he is brilliant. The author Nick Rippington can certainly tell one hell of a story. The book flows and rages like a Welsh mountain river to an end I never saw coming. Absolutely loved it.
AWARD-WINNING author Nick Rippington wrote his debut novel, the Urban gangland thriller Crossing The Whitewash, in response to becoming a silent victim of the News of the World phone-hacking scandal. As the paper's Welsh Sports Editor he was informed at 48-hours notice that it was closing, and had to collect the contents of his desk from a colleague in a Wapping car park. Publishing the book in August 2015, it was recently given an honourable mention in an EBook Awards competition run by prestigious American magazine Writer's Digest. The judges described it as "evocative, unique, unfailingly precise and often humorous". Nick lives with wife Liz in London and has two daughters, Olivia and Jemma. (to find a full video blog review of Crossing The Whitewash check out Allie Morgan's on her YouTube channel https://www.youtube.com/watch?v=Uq2ETgVzGtQ)
http://www.theripperfile.com/
https://imgoingtopublish.com/
Twitter @nickripp
Previous postGUSTAVE FLAUBERT the Ambiguity of Imagination by GIUSEPPE CAFIERO @Authoright @AuthorightUKPR
Next postEVIE'S YEAR OF TAKING CHANCES by CHRISTIE BARLOW #Blog Tour #New Release #Romantic Comedy @ChristieJBarlow @Bookouture


text:
Aleksandr Románovich Beliáyev (ruso: Александр Романович Беляев; Smolensk,  - Pushkin, 6 de enero de 1942) fue un escritor ruso de ciencia ficción.

Su trabajo durante los años 1920 y 1930 le valió muchos premios y la crítica lo llama aún hoy, el Julio Verne ruso. Este escritor soviético abarcó sin embargo una mayor variedad de temas, incluso aquellos que Verne no consideraba científicos, como la telepatía y la levitación.

De niño se lastimó la columna vertebral al caer después de haber trepado a un tejado. En su veintena, a menudo convaleciente, leía a Julio Verne, H. G. Wells o Konstantín Tsiolkovski y empezó a escribir novelas.

Estudió derecho y música, fue director de un orfanato, músico de orquesta, escenógrafo, periodista, inspector de policía, bibliotecario, jefe del departamento jurídico de un ministerio. Y en 1925, decidió dedicarse enteramente a escribir. Toda la obra de Beliáyev es un ejemplo de seriedad y minuciosidad científicas, aunque de cuando en cuando asoma en él un notable poeta lírico.

A la edad de 32 años contrajo tuberculosis ósea, y tuvo que pasar seis años en cama. La enfermedad se agravó varias veces, y Beliáyev, al fin, no pudo sobrevivir a las penurias de la guerra, murió cerca de Leningrado durante el cerco nazi. Su esposa y su hija fueron llevadas por los nazis a Polonia.

Obras seleccionadas

 La cabeza del profesor Dowell (Голова профессора Доуэля, 1925)
 El anfibio (Человек-амфибия, 1928)
 Ictiandro (1928)
 La estrella Ketz (1938)
 El ojo mágico (1938)
 Ariel (Ариэль, 1941)

Bibliografía
 Alexandr BELIAEV, El ojo mágico, Edhasa, Nebulae 1.ª época, n.º128, 1967. Páginas: 273.
 Alexandr BELIAEV, Ariel, Ed. Ráduga. Moscú, 1990.
 Alexandr BELIAEV, Ictiandro, Ed. Ráduga. Moscú, 1989.
 Alexandr BELIAEV, La estrella Ketz, Edhasa, Nebulae 1.ª época, n.º113, 1965. Páginas: 239.
 Alexandr BELIAEV, "Míster Risus", en Polux. Seis relatos de ciencia ficción rusa, Editorial El Nadir, 2006.
 Alexandr BELIAEV, "La gravedad ha desaparecido", en SANTOS, Lo mejor...
 Alexandr BELIAEV,"El laboratorio W", en El ojo mágico.
 Beliaev, Alexander - Hoity-Toity en Un huésped del cosmos, Ediciones en lenguas extranjeras, 1965.
 Beliaev, Alexander - Sobre el abismo en Antología de novelas de anticipación XV, Editorial Acervo, 1972.
 Beliaev, Alexander - ¡Ambo! en Seis fósforos, Ediciones Cosmos, 1970.

Adaptaciones cinematográficas
El hombre anfibio (URSS, 1962). Chelovek-Amfibiya / Человек-Амфибия.
DIRECTOR: Vladimir Chebotaryov, Gennadi Kazansky.
GUIÓN: Akiba Golburt, Alekséi Kápler y Aleksandr Ksenofontov.
MÚSICA: Andrei Petrov.
FOTOGRAFÍA: Eduard Rozovsky.
PRODUCTORA: Goskino / Lenfilm Studio.
ACTORES: Vladimir Korenev, Anastasiya Vertinskaya, Mikhail Kozakov, Vladen Davydov, Anatoli Ivanov.

 El legado del profesor Dowell (URSS, 1984). Zaveshchaniye professora Douelya / Завещание профессора Доуэля.
DIRECTOR: Leonid Menaker.
GUIÓN: Igor Vinogradsky y Leonid Menaker
ACTORES: Olgert Kroders, Igor Vasilyev, Natalya Sayko, Nikolai Lavrov y Valentina Titova

Enlaces externos

 Beliáyev en español. El enlace remite a la letra B, y hay que usar el desplegable.
 Beliáyev en español
 Beliáyev en español

Escritores de ciencia ficción de Rusia
Escritores de Rusia del siglo XX
Escritores en ruso
Víctimas de la Segunda Guerra Mundial
Fallecidos por inanición
Personas de Smolensk

redpajama_set_name: RedPajamaWikipedia


What is a Home Improvement Loan?
A Home Improvement Loan is simply an addition or increase to a current home loan for the purpose of carrying out extensions, renovations and/or improvements to an existing dwelling either Owner Occupied or Investment. The uniqueness of a home improvement loan is that you are able to borrow against the estimated on completion value of the dwelling.
How does a Home Improvement Loan work?
Jock and Mary's existing home is 40 years old and in need of some plumbing and electrical repairs. They have decided that while attending to those repairs they would also like to further improve their home with a makeover involving a complete repaint and renovation of the kitchen & bathroom. he quotation for these repairs and home improvements was $46000.
Increasing their existing homeloan will leave them short $16,000 meaning they will need to either borrow the extra funds via a Personal Loan or cut back on some of the improvements?
The Home Improvement Loan allows Jock and Mary to borrow the complete $46,000 needed for the repairs & improvements and also presents them with other lifestyle options. Provided it suited their budget, they may borrow up to an extra $38,000 for other worthwhile purposes or set up a Home Equity Credit Limit which will allow them access to funds at a later date.
The Home Improvement Loan gives them the opportunity to borrow up to $378,000 as compared to increasing their current Home Loan which restricts them to $324,000.
As you can see, a Home Improvement Loan can prove to be very beneficial when borrowing funds for repairs or improvements to your home and if structured correctly can also provide further financial benefit by allowing you access to any newly created equity.
At Community BEST our Homeloans Consultants are fully conversant with the pro's and con's of borrowing for home improvements and will guide you through the whole Home Improvement Loan process, from Home Improvement Loan application and set up right through to the completion of the home improvements.
To speak with a Community BEST Home Improvement Loan Consultant, phone our Finance Centre on 1300 448 91, email us or make an enquiry now by completing our 10 min Online Application.
* Loans subject to application and approval. Terms, conditions and eligibility criteria apply. Fees and charges may be payable.
Extra conditions may apply to the loan, until the repairs and/or improvements (works) have been completed satisfactorily. On satisfactory completion of the works, the extra conditions are removed as the 'Home Improvement Loan' converts to the home loan of your choice.
We will work with you, to get you the result you want!
Copyright © 2016 Communitybest.com.au. All Rights Reserved.


text:
Gen. Milley: The XM17 is altogether different than the P320
The Army is conducting an Initial Operational Test of a variant of the Sig Sauer P320 as the new XM17 Modular Handgun System this month at Fort Bragg, N.C. in preparation for issuing the pistol to troops later this year. (Photo: Lewis Perkins/U.S. Army)
Army Chief of Staff Gen. Mark Milley went on record vouching for the service's new Modular Handgun System and downplayed controversy over its civilian base model.
In an interview with Army Times, Milley detailed the MHS contract winner, a variant of Sig Sauer's P320 pistol adopted as the XM17 earlier this year, is not the same animal as its civilian predecessor.
"But I can tell you with certainty, the guts and the internals of the military version of that weapon are different than what you're going to buy in the gun store or what police are going to be fielded," Milley said.
Sig bested a wide field of competitors including FN, Smith & Wesson and Glock — the latter by more than $100 million — on the Army handgun bid, the largest contract of its kind since the 1980s.
After initial tests on the weapon, Milley said the Army requested modifications on the pistol and were pleased with the resulting handgun that Sig submitted.
"We took the modified version and put it through the test, and it passed with flying colors," Milley said.
Addressing safety concerns over the P320 series, the company last month said they have, "full confidence in the reliability, durability, and safety of its striker-fired handgun platform," and that the design did not encompass the model submitted to the armed forces.
The XM17 is set to be issued first to troops of the Fort Campbell-based 101st Airborne Division in November as part of a 190,000-pistol initial buy. The modified P320 will then be fielded to a new installation each month until September 2018, except for next March and April.
Meanwhile, Sig has issued a voluntary upgrade for standard P320 users.


Choose from a selection of uniquely designed gift box covers, especially suited to the occasion. The design options can be viewed in the Gallery below. You can choose 2 different fudge varieties (one for each box). Choose from the options in the drop-down box below.
SLIPCOVER DESIGNS. Please select two options from the designs available below.
Click on thumbnails to view in large size.
Be the first to review "Easter Gift Box" Click here to cancel reply.
© 2019 The Fudgery. All Rights Reserved.


text:
Home Toronto Blog Team Jobs
How to design a city for waste
(Image: Closed Loops)
A Sidewalk Talk Q&A with historian and recycling guru Benjamin Miller on New York City's "wasteful" past — and potential future.
Vanessa Quirk November 16, 2018
At its peak in 1986, the Fresh Kills Landfill received 29,000 tons of New York's residential waste a day. But in 2001, facing community pressure, the city decided to shut the landfill down, reroute its garbage to other states, and up its recycling game.
"I predicted that it would be very bad, but it's so much worse," says Benjamin Miller, who was director of policy planning for the New York City Department of Sanitation at the time. "And I'd like to vent about that."
Miller is in a good position to vent. An expert on the urban logistics of waste, Miller literally wrote the book on New York City's history of waste, Fat of the Land — and he's currently working on a new edition, which will include a new section on the city's future.
Miller spoke with Sidewalk Talk about New York City's recycling history (including the biggest mistake he made during his tenure at the NYC Department of Sanitation); his company, Closed Loops, which is hoping to install pneumatic tubes along the High Line; and what he believes is the future of urban waste.
How do you approach planning cities effectively for waste?
The planning has to be based on three fundamentals.
One, garbage is not a pile of something you see on the street. It's something that moves. And movement, as we know from physics, has a cost. Each step of the way has significant consequences in terms of truck trips, and diesel emissions, and public health, and so on. So, there are lots of costs, lots of frictions, and we need to plan for that movement, so we can minimize the overall economic and environmental costs.
The second fundamental is that every piece of the system is connected to the next. You can't think about any one component without thinking about how it all fits together. How waste leaves the building, how it's stored, how it's sorted, what categories, what it's put into, when it's moved to the street, how often it's moved to the street, what collects it. All of these things fit together.
And the third fundamental is integration. Garbage collection has two parts that are very different. The front end and the back end. The front end is not rocket science, it's people. And we have to design for how people interact with this stuff. We want to make it simple and we want to make it convenient. We want to make the rules unchanging, whether you're at work or at home, so that you can just develop habits.
The back end [the facilities where waste and recycling are processed] is the part that has to change — because the materials in our waste stream change, the technology for handling them changes, and the commodity prices for recyclables fluctuate enormously. We didn't anticipate that newspapers would disappear as material and we didn't anticipate [the rise of] cardboard. You cannot anticipate the material changes. That's all you know for sure, that you won't be able to predict them. So that's why you have to design a back end that's pretty responsive, and that does involve mechanization and automation. And that's where the rocket science, if you can call it that, comes in. The technology. We need to change our collection methods to maximize efficiency and minimize all sorts of costs.
The front end cannot change and must be as simple as possible, as convenient as possible. And the back end must change and we have to apply technological solutions there.
I would agree that the back end must change, but shouldn't the front end change too? Isn't there room for improvement on the front end?
Well, back in the beginning of time in New York, for hundreds of years, there was no planning. And so, there was no separation [of waste and recycling] at the front end. Everything was thrown away. There was actually a fair amount of diversion from landfills or incineration because we had humans running over these piles of waste, pulling out valuables. And then that stopped, because the economics changed, and our laws changed, and it was highly undesirable work. But we just continued to dump this heterogeneous mass of garbage in the ocean or incinerators.
Source separation really didn't start until the '70s. Of course, there was some in World War II, because the War Production Board was in desperate need of certain materials. It was an emergency, right? We really needed metal, paper, fats. But Mayor La Guardia stopped that program in New York City the instant the board said it was okay, because it was so much more expensive to run these recycling trucks. So, there was never any separation of waste in this country on any reasonable scale until Earth Day of 1970. And we didn't have separation as a mandatory thing, citywide, until 1989. And that's where this plan that I was involved in developing came in.
I was director of policy planning for the New York City Department of Sanitation and project manager and co-author of the city's first solid waste management plan. We had a large computer model that we used to try to play with every variable there was. Different sorts, different market prices, different numbers of trucks. So what materials could we recycle most cost effectively, and with the least environmental impacts?
We also had to figure out how to sort things. What materials in which piles. And we had to balance lots of factors. Wellesley, Massachusetts, separated glass by color, because glass could be put in a truck that didn't have compaction. In New York, we cannot collect anything without compaction because it takes too much space. It would take too many trucks. So, we needed to figure out a way to compact everything and still have enough value to sell it.
So, we developed a sort, which was metal, glass, plastic in one. Paper in another. The paper was the valuable thing. We didn't want to hurt it by having shards of glass in it.
We were trying to make things as simple as possible on the front end. And the largest mistake we made was to say, "Let's do this all in plastic bags." We tried it, and they worked well — the sanitation union loved them. Fewer injuries, much more efficiency.
So why was it a mistake?
They break open. They attract rats, and our streets have become a complete mess. We have an an enormous pile of bags that need to be sorted out, put in different trucks.
Now, we've added another sort for organics. This requires another truck and it is wildly expensive. It costs well over $1,000 a ton to collect these organics as opposed to a couple of hundred dollars a ton for the other materials. It's incredibly expensive from an environmental perspective as well because you're using a lot of fuel. And then you have to drive this truck, in many cases, many miles out of the city to a processing plant and pay for that.
Now, the City is talking about a change in the current sort: combining the current two "recyclables" fractions — metal/glass/plastic and paper/cardboard — into a single stream. And that is in part a reflection of advances in processing technology. It's easier now to pull those combined materials apart, using automation. But what might happen at some future point, because the processing technology evolves, is that we'd make another change in the sorts. Instead of having a single recycling stream plus an organics stream plus a refuse stream, we could go to just two fractions — "wet" and "dry." The "wet" would contain all the organics and the "dry" would contain all the recyclables. That may be the best overall answer, weighing the cost of the truck emissions.
(Image: Zero Waste Design Guidelines)
But we may well, at that point, have other things that we separate that we're not separating now on a citywide basis. Such as e-waste or textiles. Things that don't need to be picked up from buildings on a day-to-day basis. They could be picked up at the block or a drop-off kiosk where you have more aggregated collection. So that when you're doing your normal daily walk with your dog to the corner, or to the subway stop, you would just drop it off. A lot of European cities do that sort of thing.
But you need to design the front end to be as simple as possible.
How would you design our buildings to be easier on the front end, for the user?
We've done a reasonably good job with our bio waste. We don't have chamber pots under every bed or desk! We have a room that's nicely designed, centrally located in every unit or every floor. You know immediately where to deposit your liquids or your solids. And I'm imagining that in the future, we'll move in that direction for our waste.
That is to say, we'll design spaces where you will walk to this room, which is designed as a waste room, and you'll have however many sorts as the system asks for. And it may well be metal, glass, plastic, paper, textiles, and so on. All of these things will have similar colors wherever you are. They'll be very easy to recognize. When we're walking past one of these waste stations, you'll know within two seconds where to put it. So, the designer has to make it conveniently located, with very good signage, and visual cues. And it has to be the same in any kind of place, and it shouldn't change over time. And that's the way we'll make habits and make this happen in an efficient way.
And why is sorting, separating so important?
You want the highest value commodities you can get. And the ideal way to do that is to separate. The more separations, the better. The less contamination, the better.
There are ways of achieving that. Partly through the design mechanisms I talked about. Partly by incentivizing people. The city is talking about developing a save-as-you-throw system, where you'd be charged on a unit basis for the refuse that you throw away and charged a lesser rate for recyclables or, perhaps, no rate. So, you would have an economic incentive to do the right thing. We have financial incentives for water use and electricity use. We really should be charging for our waste. And certainly conscientious people would save money. The city would also save money. It would be a win-win.
So what does it mean to design a city for waste?
It means designing our interior buildings for waste. Architects can plan for waste, just as they plan for bathrooms, and understand that this material doesn't just sit in a pile, it's always moving. You want to minimize the number of times it's handled. You need to design corridors, the location of your elevators, and your waste spaces, so that they're all rationally laid out to minimize the number of footsteps, because it's going out to the street. And reducing these points of friction is really important, because truck trips kill people. The diesel particulates kill people. They're dangerous. Public health is very much involved, as well as the quality of our lives.
It also means designing our public spaces with the equivalent, with underground submerged containers or drop-off kiosks, so we can avoid sending trucks to every building on every block. We could very easily redesign our parking rules. We have alternate-side-of-the street parking, right now in New York in most places. So, we could have our collection coincide with that. We can use some of the parking spaces that we have on the street for residents to drop off their recyclables. We need to redesign our public space for the movement of waste.
We could use the kind of rollout bins that can be collected with a mechanical arm. Or we could use mechanized collection of containers. All freight these days is moved in containers of one sort or another that can be automatically handled, or semi-automatically. We'd certainly have fewer injuries, and we'd certainly get higher production. And we would have less aesthetically displeasing streets. Moving toward containerization should be a goal of the city.
A submerged refuse container in Kissimmee, FL (Image: Zero Waste Design Guidelines)
There are lots of ways we could densify, so we could reduce the number of collection trips. We could reduce the number of buildings that are stopped at. Battery Park City is a great example. Four of the 17 towers have loading docks with compactors in them. The other buildings roll their waste over every day and tilt them into this compactor. So all of the waste from these 17 buildings is in four compactors, and the sanitation department just rolls up with a roll-on, roll-off truck and takes it away. No bags on the street. No traffic accidents due to the collection trucks. That's the direction we need to move in.
What are some of the exciting projects your company, Closed Loops, is working on?
One of the projects is to develop pneumatic tubes under the High Line that would take waste directly by rail to different types of facilities. Organics, recycling, disposal. Also a separate pneumatic tube just for high quality kitchen waste from the restaurants along the area, which would go straight to an anaerobic digester where it would be digested into biogas that could be used to produce local electricity. So the value of that energy stays right in the neighborhood.
What do you see as the future of waste in cities?
In the ideal future, there would be tubes underground. You won't see anything but inlets. Like in Barcelona — you have the magic of pneumatic tubes running through the streets down under the Santa Caterina Market, and then it goes outside town to an anaerobic digestion facility. Someday, I believe, just as we have subways, and just as we have sewers, we will have more and more tubes gradually extending around the States. That's the ideal.
Vanessa Quirk is Editorial Manager at Sidewalk Labs.
From building raincoats to condo manifestos, Partisans is on a mission
The Toronto-based design studio will misbehave — and leave its hometown a better place in the process.
Vanessa Quirk
The macro impact of micro-climates
A Sidewalk Talk Q&A with Goncalo Pedro about shaping our buildings and public spaces to make a more comfortable public realm.
Outside the box truck: Innovations in delivery that could change our cities
In this Sidewalk Talk Q&A, researcher Anne Goodchild explains how simple ideas like lockers and cargo bikes could make our neighborhoods more "lovely, green, quiet, and livable."
Something to talk about: Why playful public spaces inspire serious connection
A Sidewalk Talk Q&A with designers Mouna Andraos, Rebecca Taylor, and Pierre Thirion of Daily tous les jours.
Tackling the Opioid Crisis, One Sewage Sample at a Time
A Sidewalk Talk Q&A with Newsha Ghaeli of the wastewater epidemiology startup Biobot Analytics.
Eric Jaffe
Why Europe's parks and playgrounds are so much more active than America's
A Sidewalk Talk Q&A with Meghan Talarowski of Studio Ludo on the keys to more playable cities.
urban data
The real benefits of real-time transit data
A Sidewalk Talk Q&A with researcher Candace Brakewood on all the ways it improves our lives — and its role in a potential car-free urban future.
A vision of city transportation, circa 2043
A Sidewalk Talk Q&A with forward-looking transport scholar David Levinson.
The power of 'networked governance' to solve city problems
A Sidewalk Talk Q&A with Bruce Katz and Jeremy Nowak, authors of The New Localism: How Cities Can Thrive in the Age of Populism, on the new era of public, private, and civic collaboration.
Building the Energy-Efficient Neighborhoods of Tomorrow
We held a Sidewalk Talk Idea Tour to explore five emerging technologies and design innovations that can lead to more sustainable cities.
15 Innovations That Shaped the City
Street Grids: A City's Indelible Footprint
Far from a static layout, the grid creates the conditions for new travel modes, adaptable infrastructure, and sustainable growth.
Steam Engines: Giving Cities Industrial Might
Steam power brought industry, electricity, and opportunity into cities, but it also paved the way for fossil fuels to damage the planet.
Electric Lighting: Dawn of Urban Nightlife
Edison's incandescent bulb gave rise to profound new possibilities for work and play in cities.
Sanitation Systems: The Original Clean Tech
The Ancient Romans first tackled sewage systems, but it took a cholera outbreak for 19th-century London to master them.
We held a one-week design sprint to build a smart trash chute. Here's what we learned
The path to a more sustainable city goes right through the multi-family waste room.
Jesse Shapins and Matt Breuer
The future of urban sustainability is renewable district energy
New design innovations can dramatically reduce the need for fossil fuels to help heat or cool a building.
Rohit T. Aggarwala and Jim Kapsis
Open-Source Tool
A first step toward creating a digital planning laboratory is populating it
Introducing Doppelgänger, Model Lab's open-source population synthesizer.
David Ory
A key to democratizing urban solutions is building better models
By relying on sharper data, new approaches to modeling can lead to faster policies and greater consensus.
Nick Chim and David Ory
The First Principles of Urbanism: Part II
Digital technology can be good or bad for cities. Which way it goes depends on how well technologists and urbanists work together.
Rohit T. Aggarwala
Follow what we're thinking, doing, and reading about the future of cities. You can unsubscribe at any time.
hello@sidewalklabs.com
10 Hudson Yards, 26th Floor
Press & Speaking Inquiries
press@sidewalklabs.com
Careers at Sidewalk Labs
Exploreouropenpositionshere
Business & Investment Inquiries
partnerships@sidewalklabs.com
© 2019 Sidewalk Labs | Privacy Policy


text:
Opinion: TVA is blowing earth's 50-50 chance to slow climate disaster
May 10, 2022 at 7:00 p.m. | Updated May 10, 2022 at 8:13 p.m.
by Pam Sohn
Time's a-wasting. "Earth given 50-50 chance of hitting key temperature mark by 2026," screams Tuesday's headline at the top of Page A5 in the Chattanooga Times Free Press.
In case you've lost your calendar, that's three years and eight months away.
Below that headline, the story is more muted. It states the world is "creeping" closer to the warming threshold international agreements are trying to prevent - a yearly average of 2.7 degrees Fahrenheit above pre-industrial levels of the late 1800s.
That average would be - will be - "a bright red signal in climate change" that a team of 11 different forecast centers predicted for the World Meteorological Organization late Monday.
"Bright red signal" also would seem to be something of an understatement.
Cornell University climate scientist Natalie Mahowald, who wasn't part of the forecast teams, was more direct when she told The Associated Press: "This is a warning of what will be just average in a few years."
What does it mean for Chattanooga, for Tennessee and for Georgia? The same thing it means worldwide - hotter will mean more extremes and higher prices for food and fuel and you name it.
As we have noted many times, all politics - and all things climate - are local.
Georgetown Law professor David Super wrote in The Hill on Monday that the way to fight inflation is to focus on climate change.
"Largely ignored as an inflationary driver, however, has been climate change," he wrote, noting that shifting weather patterns and extreme events have pushed up costs of sugar, coffee, wheat and soy while wood and other building materials no longer grow well in many places, jacking up home costs. Meanwhile floods, fires and tornadoes are driving up insurance costs.
"Like the pandemic, climate change is a global problem manifesting itself in countless ways, many well-hidden. Unlike the pandemic, it will get worse, not better, for the foreseeable future," Super wrote. "If we wish to control inflation, we must address climate change now."
Just last week we questioned why TVA, as the economy and power demand rebounded from pandemic levels, turned more to the burning fossil fuels rather than embracing alternative fuels - especially solar power - using either the construction of solar farms or by helping all of us outfit our homes with solar panels to help power our sunny, Southern towns and cities.
The answer isn't just a lack of technical imagination and determination. It's also money. And we don't just mean TVA's construction money.
Here's an example from Vermont that we could easily transplant to Tennessee or Georgia - if our lawmakers had the political willpower.
Last week, Vermont Gov. Phil Scott, a Republican, vetoed a major climate bill passed by that state's lawmakers - The Clean Heat Standard, which aims to disincentivize fossil fuels for home heating because those fossil fuels make up between 30% and 40% of our greenhouse gasses.
Why would he veto this? Follow the fossil fuel money. On Monday, in an annual meeting of more than 200 Vermont businesses specializing in gas, propane and home heating fuels, industry insiders talked about what the state's climate bill could mean for their bottom lines and their customers'.
"It's a performance standard in which heating oil and propane companies and their customers will pay more [than] other companies that do things the government wants them to do - weatherization, wood pellets, biodiesel," said Matt Cota of the Vermont Fuel Dealers Association.
Well, yeah. Don't let government tell you what to heat with by making it cheaper for you to use greener fuels. And by all means, don't weatherize; because if you do propane companies can't sell you as much of their more expensive fuel.
Gov. Scott's reasoning for the veto was that the new law "gives the regulatory Public Utility Commission too much rulemaking authority."
Vermont's lawmakers are looking to override the veto because many of its members think we are no longer in a world where we get to choose between climate action and the status quo.
Here's the thing: Yes, there will be winners and losers. Some fuel dealers and utilities will be big enough to change to more eco-friendly forms of home heating, while smaller ones may be forced out of business.
This is true with any change. When Henry Ford began moving the Model T's off the assembly line, he was a winner. Buggy whip manufacturers were the losers - unless they adapted and began making fan belts or the like.
The Tennessee Valley Authority, which serves customers in an 80,000-square-mile spread in Tennessee and seven other Southern states, needs to get a clue. Climate change is going to make COVID-19 look like a walk in the park.
During 2020 when COVID-19 limited economic activity and power demand shrank, TVA's carbon output was down 63% from the levels in 2005 when the Paris Climate Agreement was negotiated. But last year as power demand rebounded, TVA's return to fossil fuels grew its carbon output 57%. The country's largest government-owned electricity provider is going in the wrong direction.
And the really sad fact is that it's a planned error. TVA is aiming only for an 80% reduction in its use of fossil fuels by 2035.
That's a lot longer than three years and 8 months from now - 2026.
TVA is running out of time. And so are we.


Butler [née Reid], Lois (1897–1970), aviator and skier ?
Callaway [née Roberts], Betty Daphne (1928–2011), figure skating coach ?
Colledge, (Magdalena) Cecilia (1920–2008), figure skater ?
Colledge, (Magdalena) Cecilia (1920–2008) ?
Curry, John Anthony (1949–1994), ice skater ?
Curry, John Anthony (1949–1994) ?
Erhardt, Carl Alfred (1897–1988), ice hockey player ?
Lunn, Peter Northcote (1914–2011), skier and intelligence officer ?
Syers [née Cave], Florence Madeline [Madge] (1881–1917), ice-skater ?
Taylor, (Olwen) Megan (1920–1993), figure skater ?
Taylor, (Olwen) Megan (1920–1993) ?


Generation II stompers are still Schaper stompers, but they underwent a redesign, as did the packaging, for the the 1983 toy year. They had 3 settings: off, low (for climbing), and high (for speed) (see pic, notice the sliding bar in the middle that controls the speed). Gen II had rubber tires that were about 1/2" wide. The bumpers were moved to the cover instead of the base. ( see pics of misc stompers ).
Some Gen IIs came with stunt wheels which was a fifth wheel that attached to the bottom of the stomper so it could drive on only two other wheels. Click here for a Gen II with stunt wheel attached, and here is a stunt wheel closeup.
Work x 4's came back for Gen II, but now they are on the new modified platform. Both Generations included a dump truck and a cement mixer, I'm not sure if the others are in both sets.
Wilderness Campers came out in 1983, each of the 3 models could come with an optional small trailer. In 1984, it was expanded to 5 models, each with two different colors. A real working winch was added and the trailers became standard, so the name was changed to Workhorses.
The Road Rods of 1983 included a Porsche, a VW Bug, a Subaru Brat, a Bronco, a truck, and a chevy van. In 1984, Schaper took it up a notch and created the Custom Kit and the Deluxe Custom Kit. The kit includes one base, 2 bodies, and 3 sets of tires (deluxe is basically doubled this, except one motor is standard and the other motor is high powered). Both the van and the truck disappeared in this 1984 release.
Don't forget the mobile force which was introduced in 1983. There was also a set of mini stompers that were about half as long and took a single AAA battery.
1983 also saw the introduction of the Heavy Haulers. They are based on the Semi platform, so that means they are 10 wheel drive stompers that required 2 AAs. Stomper Semis became Stomper "Road Kings" Semis.
We even saw the introduction of Water Demons! in 1983. This was a set of six amphibious vehicles.
1984 brought us the Dragsters. Like the rip cord powered SSC Super Cycles, the dragsters had little in common with their Stomper brothers.
The stompers were slightly modified for a series called Speedsters in 1985. The tires were flat and a steering mechanism was added so that they could follow "Twistrack".


Skip to main content! Skip to main navigation!
The Fifth Global Forum of the United Nations Alliance of Civilizations (UNAOC) took place in Vienna from 26 to 28 February 2013 under the main title "Promoting Responsible Leadership in Diversity and Dialogue" (www.vienna5unaoc.at). Apart from thematic priorities (freedom of religion or belief / education of religious pluralism; media freedom / media diversity; migration / integration) the Vienna Forum set a regional focus on the Danube and Black Sea region, the Southern Caucasus and Central Asia. Furthermore, the Vienna Declaration which was adopted by consensus at the Global Forum "acknowledges the unique opportunity created by the Vienna Forum … to open new avenues for cooperation in the Danube and Black Sea Region, the Southern Caucasus and Central Asia" and "supports … the launch of a regional debate on the Danube and Black Sea Region, the Southern Caucasus and Central Asia". A session was dedicated to this region comprising speakers from Hungary, Austria, Azerbaijan and Kazakhstan as well as from the Organization for Security and Cooperation in Europe (OSCE), the Council of Europe (CoE) and the Black Sea Economic Cooperation (BSEC). One of the conclusions of the session was to further develop this initiative. As the EU has an interest in stability in the regions neighbouring the Danube countries EUSDR projects can be identified as good practice examples for the new UNAOC Regional Initiative.
In order to download the invitation please click here.


text:
{-# LANGUAGE CPP #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PolyKinds #-}

#ifdef USE_REFLEX_OPTIMIZER
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
#endif

-- There are two expected orphan instances in this module:
--   * MonadSample (Pure t) ((->) t)
--   * MonadHold (Pure t) ((->) t)
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
-- Module: Reflex.Pure
-- Description:
--   This module provides a pure implementation of Reflex, which is intended to
--   serve as a reference for the semantics of the Reflex class.  All
--   implementations of Reflex should produce the same results as this
--   implementation, although performance and laziness/strictness may differ.
module Reflex.Pure
  ( Pure
  , Behavior (..)
  , Event (..)
  , Dynamic (..)
  , Incremental (..)
  ) where

import Control.Monad
import Data.Dependent.Map (DMap, GCompare)
import qualified Data.Dependent.Map as DMap
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import Data.Maybe
import Data.MemoTrie
import Data.Monoid
import Data.Type.Coercion
import Reflex.Class
import Data.Kind (Type)

-- | A completely pure-functional 'Reflex' timeline, identifying moments in time
-- with the type @/t/@.
data Pure (t :: Type)

-- | The 'Enum' instance of @/t/@ must be dense: for all @/x :: t/@, there must not exist
-- any @/y :: t/@ such that @/'pred' x < y < x/@. The 'HasTrie' instance will be used
-- exclusively to memoize functions of @/t/@, not for any of its other capabilities.
instance (Enum t, HasTrie t, Ord t) => Reflex (Pure t) where

  newtype Behavior (Pure t) a = Behavior { unBehavior :: t -> a }
  newtype Event (Pure t) a = Event { unEvent :: t -> Maybe a }
  newtype Dynamic (Pure t) a = Dynamic { unDynamic :: t -> (a, Maybe a) }
  newtype Incremental (Pure t) p = Incremental { unIncremental :: t -> (PatchTarget p, Maybe p) }

  type PushM (Pure t) = (->) t
  type PullM (Pure t) = (->) t

  never :: Event (Pure t) a
  never = Event $ \_ -> Nothing

  constant :: a -> Behavior (Pure t) a
  constant x = Behavior $ \_ -> x

  push :: (a -> PushM (Pure t) (Maybe b)) -> Event (Pure t) a -> Event (Pure t) b
  push f e = Event $ memo $ \t -> unEvent e t >>= \o -> f o t

  pushCheap :: (a -> PushM (Pure t) (Maybe b)) -> Event (Pure t) a -> Event (Pure t) b
  pushCheap = push

  pull :: PullM (Pure t) a -> Behavior (Pure t) a
  pull = Behavior . memo

  -- [UNUSED_CONSTRAINT]: The following type signature for merge will produce a
  -- warning because the GCompare instance is not used; however, removing the
  -- GCompare instance produces a different warning, due to that constraint
  -- being present in the original class definition.

  --mergeG :: GCompare k => (forall a. q a -> Event (Pure t) (v a))
  --   -> DMap k q -> Event (Pure t) (DMap k v)
  mergeG nt events = Event $ memo $ \t ->
    let currentOccurrences = DMap.mapMaybeWithKey (\_ q -> case nt q of Event a -> a t) events
    in if DMap.null currentOccurrences
       then Nothing
       else Just currentOccurrences

--  The instance signature doeesn't compile, leave commented for documentation
--  fanG :: GCompare k => Event (Pure t) (DMap k v) -> EventSelectorG (Pure t) k v
  fanG e = EventSelectorG $ \k -> Event $ \t -> unEvent e t >>= DMap.lookup k

  switch :: Behavior (Pure t) (Event (Pure t) a) -> Event (Pure t) a
  switch b = Event $ memo $ \t -> unEvent (unBehavior b t) t

  coincidence :: Event (Pure t) (Event (Pure t) a) -> Event (Pure t) a
  coincidence e = Event $ memo $ \t -> unEvent e t >>= \o -> unEvent o t

  current :: Dynamic (Pure t) a -> Behavior (Pure t) a
  current d = Behavior $ \t -> fst $ unDynamic d t

  updated :: Dynamic (Pure t) a -> Event (Pure t) a
  updated d = Event $ \t -> snd $ unDynamic d t

  unsafeBuildDynamic :: PullM (Pure t) a -> Event (Pure t) a -> Dynamic (Pure t) a
  unsafeBuildDynamic readV0 v' = Dynamic $ \t -> (readV0 t, unEvent v' t)

  -- See UNUSED_CONSTRAINT, above.

  --unsafeBuildIncremental :: Patch p => PullM (Pure t) a -> Event (Pure t) (p
  --a) -> Incremental (Pure t) p a
  unsafeBuildIncremental readV0 p = Incremental $ \t -> (readV0 t, unEvent p t)

  mergeIncrementalG = mergeIncrementalImpl
  mergeIncrementalWithMoveG = mergeIncrementalImpl

  currentIncremental i = Behavior $ \t -> fst $ unIncremental i t

  updatedIncremental i = Event $ \t -> snd $ unIncremental i t

  incrementalToDynamic i = Dynamic $ \t ->
    let (old, mPatch) = unIncremental i t
        e = case mPatch of
          Nothing -> Nothing
          Just patch -> apply patch old
    in (old, e)
  behaviorCoercion Coercion = Coercion
  eventCoercion Coercion = Coercion
  dynamicCoercion Coercion = Coercion
  incrementalCoercion Coercion Coercion = Coercion

  fanInt e = EventSelectorInt $ \k -> Event $ \t -> unEvent e t >>= IntMap.lookup k

  mergeIntIncremental = mergeIntIncrementalImpl

mergeIncrementalImpl :: (PatchTarget p ~ DMap k q, GCompare k)
  => (forall a. q a -> Event (Pure t) (v a))
  -> Incremental (Pure t) p -> Event (Pure t) (DMap k v)
mergeIncrementalImpl nt i = Event $ \t ->
  let results = DMap.mapMaybeWithKey (\_ q -> case nt q of Event e -> e t) $ fst $ unIncremental i t
  in if DMap.null results
     then Nothing
     else Just results

mergeIntIncrementalImpl :: (PatchTarget p ~ IntMap (Event (Pure t) a)) => Incremental (Pure t) p -> Event (Pure t) (IntMap a)
mergeIntIncrementalImpl i = Event $ \t ->
  let results = IntMap.mapMaybeWithKey (\_ (Event e) -> e t) $ fst $ unIncremental i t
  in if IntMap.null results
     then Nothing
     else Just results

instance Functor (Dynamic (Pure t)) where
  fmap f d = Dynamic $ \t -> let (cur, upd) = unDynamic d t
                             in (f cur, fmap f upd)

instance Applicative (Dynamic (Pure t)) where
  pure a = Dynamic $ \_ -> (a, Nothing)
  (<*>) = ap

instance Monad (Dynamic (Pure t)) where
  return = pure
  (x :: Dynamic (Pure t) a) >>= (f :: a -> Dynamic (Pure t) b) = Dynamic $ \t ->
    let (curX :: a, updX :: Maybe a) = unDynamic x t
        (cur :: b, updOuter :: Maybe b) = unDynamic (f curX) t
        (updInner :: Maybe b, updBoth :: Maybe b) = case updX of
          Nothing -> (Nothing, Nothing)
          Just nextX -> let (c, u) = unDynamic (f nextX) t
                        in (Just c, u)
    in (cur, getFirst $ mconcat $ map First [updBoth, updOuter, updInner])

instance MonadSample (Pure t) ((->) t) where

  sample :: Behavior (Pure t) a -> (t -> a)
  sample = unBehavior

instance (Enum t, HasTrie t, Ord t) => MonadHold (Pure t) ((->) t) where

  hold :: a -> Event (Pure t) a -> t -> Behavior (Pure t) a
  hold initialValue e initialTime = Behavior f
    where f = memo $ \sampleTime ->
            -- Really, the sampleTime should never be prior to the initialTime,
            -- because that would mean the Behavior is being sampled before
            -- being created.
            if sampleTime <= initialTime
            then initialValue
            else let lastTime = pred sampleTime
                 in fromMaybe (f lastTime) $ unEvent e lastTime

  holdDyn v0 = buildDynamic (return v0)

  buildDynamic :: (t -> a) -> Event (Pure t) a -> t -> Dynamic (Pure t) a
  buildDynamic initialValue e initialTime =
    let Behavior f = hold (initialValue initialTime) e initialTime
    in Dynamic $ \t -> (f t, unEvent e t)

  holdIncremental :: Patch p => PatchTarget p -> Event (Pure t) p -> t -> Incremental (Pure t) p
  holdIncremental initialValue e initialTime = Incremental $ \t -> (f t, unEvent e t)
    where f = memo $ \sampleTime ->
            -- Really, the sampleTime should never be prior to the initialTime,
            -- because that would mean the Behavior is being sampled before
            -- being created.
            if sampleTime <= initialTime
            then initialValue
            else let lastTime = pred sampleTime
                     lastValue = f lastTime
                 in case unEvent e lastTime of
                   Nothing -> lastValue
                   Just x -> fromMaybe lastValue $ apply x lastValue

  headE = slowHeadE

redpajama_set_name: RedPajamaGithub