Flickr
You can fetch, store and display data about all your Photos and Photosets (Albums) for one or more Flickr Accounts. By default the included models and templates will link to the photo files on flickr.com, but you can also download the original files to store locally. These can then be used to generate images in all other sizes, to be served locally. See the Fetch Files management command below.
Set-up
In the Django admin, create a new Account
in the Flickr app, and add your Flickr API key and secret from https://www.flickr.com/services/apps/create/apply/ (you can ignore the User for the moment).
By default this will only allow the fetching of fully public photos. To fetch all photos your Flickr account can access, you’ll need to do this:
Enter your API key and secret in the indicated place in the file
ditto/scripts/flickr_authorize.py
. (If you’ve installed Ditto using pip, it might be easier to download the script from GitHub.)Run the script on the command line (if you downloaded the file, change the path to wherever the script is):
$ python ditto/scripts/flickr_authorize.py
Follow the instructions. You should get a URL to paste into a web browser, in order to authorize your Flickr account. You’ll then get a code to paste into your Terminal.
Finally, back in the Django Admin note the ID of the Account
you created. e.g. if the Django Admin’s URL is something like /admin/flickr/account/1/change/
then the ID is 1
. Run the following management command to fetch information about the Account
’s associated Flickr User
(replacing 1
with your Account
’s Django ID, if different):
$ ./manage.py fetch_flickr_account_user --id=1
Now you can download your photos’ data and, optionally, their original image/video files. See Management commands.
Models
The models available in ditto.flickr.models
are:
Account
Representing a Flickr account that has API credentials and that we fetch Photos for. It has a one-to-one relationship with a
User
model.TaggedPhoto
The through model relating Photos to tags.
Photo
A photo (or video) on Flickr. The
media_type
property of'photo'
or'video'
indicates which type this is.Photoset
A photoset (album) containing Photos.
User
A single user on Flickr. There could be lots of Users but only one (or a few) will have associated Account objects – these are the Users we fetch Photos for.
Managers
Photos
There are several managers available for Photos. There are two main differentiators we want to restrict things by:
Public vs private: Whether a Photo is public or private (which includes those marked as for Friends and/or Family on Flickr.com).
Posted Photo vs Favorited Photo: In the future we may fetch Photos that have been favorited, rather than posted, by our Users that have Accounts. In this case we’d want to be able to differentiate between Photos that we posted, and Photos that we favorited.
On public-facing web pages you should only use the mangaers starting Photo.public_
as these will filter out all Photos that are not public.
Photo.objects.all()
The default manager fetches all Photos in the system. Public, private, posted by you or (in the future) only favorited by you.
Photo.public_objects.all()
Gets all public Photos in the system, no matter who posted them to Flickr.
Photo.photo_objects.all()
Gets all Photos, public or private, that were posted by one of the Users associated with an API-credentialled Account.
Photo.public_photo_objects.all()
Gets public Photos that were posted by one of the Users associated with an API-credentialled Account.
Of course, these can all be filtered as usual. So, if you wanted to get all the public Photos posted by a particular User
:
from ditto.flickr.models import User, Photo
user = User.objects.get(nsid='35034346050@N01')
photos = Photo.public_photo_objects.filter(user=user)
NOTE: You can find a user’s NSID (the ID used by Flickr) at http://idgettr.com
Users
User.objects.all()
The default manager fetches all Users in the system.
User.objects_with_accounts.all()
This only gets Users that are associated with Accounts.
Management commands
Fetch Account User
This is only used when setting up a new Account
object with API credentials. It fetches data about the Flickr User associated with this Account
.
Once the Account
has been created in the Django admin, and its API credentials entered, run this (using the Django ID for the object instead of 1
):
$ ./manage.py fetch_flickr_account_user --id=1
Fetch Photos
Fetches data about Photos (including videos). The data fetched can be restricted by setting:
--days
- fetch data from that many most recent days--start
- fetch from that date onward--end
- fetch from that date and earlier--account
- only fetch for a single Flickr account
The start
and end
arguments can be combined to fetch data from within a range of dates.
If no –account argument is supplied, data is fecthed for ALL Accounts.
So, this will fetch data for ALL Photos for ALL Accounts:
$ ./manage.py fetch_flickr_photos --days=all
NOTE 1: This took about 75 minutes to fetch data for 3,000 photos on my MacBook.
NOTE 2: Trying to run the same thing on a 512MB Digital Ocean machine resulted in the process being killed after fetching about 1,500 photos. See this bug.
This will only fetch Photos uploaded in the past 3 days:
$ ./manage.py fetch_flickr_photos --days=3
This will fetch Photos uploaded since midnight at the start of 31 December 2021:
$ ./manage.py fetch_flickr_photos --start=2021-12-31
This will fetch Photos uploaded before the end of the day (23:59:59) on 1 February 2022:
$ ./manage.py fetch_flickr_photos --end=2022-02-01
And this will fetch Photos uploaded from the start of 31 December 2021 and the end of 1 February 2022:
$ ./manage.py fetch_flickr_photos --start=2021-12-31 --end=2022-02-01
All time-related options can be restricted to only fetch for a single Account by adding the NSID of the Account’s User, eg:
$ ./manage.py fetch_flickr_photos --account=35034346050@N01 --days=3
Whenever a Photo is fetched, data about its User will also be fetched, if it hasn’t been fetched on this occasion.
Profile photos of Users are downloaded and stored in your project’s MEDIA_ROOT
directory. You can optionally set the DITTO_FLICKR_DIR_BASE
setting to change the location. The default is:
DITTO_FLICKR_DIR_BASE = 'flickr'
If your MEDIA_ROOT
was set to /var/www/example.com/media/
then the above setting would save the profile image for the user with NSID<PHONE_NUMBER>0@N01
to something like this:
/var/www/example.com/media/flickr/46/05/35034346050N01/avatars/35034346050N01.jpg
Fetch originals
The fetch_flickr_photos
management command only fetches data about the photos (title, locations, EXIF, tags, etc). To download the original photo and video files themselves, use the fetch_flickr_originals
command, after fetching the photos’ data:
$ ./manage.py fetch_flickr_originals
This took over 90 minutes for about 3,000 photos (and very few videos) for me.
By default this command will fetch all the original files that haven’t yet been downloaded (so the first time, it will fetch all of them). To force it to download all the files again (if you’ve deleted them locally, but they’re still on Flickr) then:
$ ./manage.py fetch_flickr_originals --all
Both variants can be restricted to fetching files for a single account:
$ ./manage.py fetch_flickr_originals --account=35034346050@N01
Files will be saved within your project’s MEDIA_ROOT
directory, as defined in settings.py
. There are two optional settings to customise the directories in which the files are saved. Their default values are as shown here:
DITTO_FLICKR_DIR_BASE = 'flickr'
DITTO_FLICKR_DIR_PHOTOS_FORMAT = '%Y/%m/%d'
These values are used if you don’t specify your own settings.
If your MEDIA_ROOT
was set to /var/www/example.com/media/
then the above settings would save the Flickr photo 1234567_987654_o.jpg
to something like this, depending on the Flickr user’s NSID and the date the photo was taken (not uploaded):
/var/www/example.com/media/flickr/35034346050N01/photos/2016/08/31/1234567_987654_o.jpg
Note that videos will have two “original” files downloaded: the video itself and a JPG image that Flickr created for it.
Once you’ve downloaded the original image files, you can use these to generate all the different sizes of image required for your site, instead of linking direct to the image files on flickr.com. To do this, ensure imagekit
is in your INSTALLED_APPS
setting:
INSTALLED_APPS = (
# ...
'imagekit',
# ...
)
And add this to your settings.py (its default value is False
):
DITTO_FLICKR_USE_LOCAL_MEDIA = True
Any requests in your templates for the URLs of photo files of any size will now use resized versions of your downloaded original files, generated by Imagekit. The first time you load a page (especially if it lists many Flickr images) it will be slow, but the images are cached (in a CACHE
directory in your media folder).
For example, before changing this setting, the URL of small image (Photo.small_url
) would be something like this:
https://farm8.static.flickr.com/7442/27289611500_d0debff24e_m.jpg
After choosing to use local photos, it would be something like this:
/media/CACHE/images/flickr/35034346050N01/photos/2016/06/09/27289611500_d21f6f47a0_o/0ee894a3438233848e6e9d85e1985260.jpg
If you change your mind you can switch back to using the images hosted on flickr.com by removing the DITTO_FLICKR_USE_LOCAL_MEDIA
setting or changing it to False
.
Note that Ditto currently can’t do the same for videos, even if the original video file has been downloaded. No matter what the value of DITTO_FLICKR_USE_LOCAL_MEDIA
the flickr.com URL for videos is always used.
Fetch Photosets
You can fetch data about your Photosets any time, but it doesn’t fetch detailed data about Photos within them.
So, for best results, only run this after getting running fetch_flickr_photos
.
To fetch Photosets for all Accounts:
$ ./manage.py fetch_flickr_photosets
Or fetch for only one Account:
$ ./manage.py fetch_flickr_photosets --account=35034346050@N01


To be honest, my long term goal is to find a job I can rely on, in a job industry that is secure and well-paid. Learning the skills from this industry will allow me to be more creative with technical projects as well, to be able to combine technical learning and design. I chose this career path because this industry also has the opportinuity for a flexible working environment - and this course will hopefully give me skills that I can use to work from anywhere in the world.
I would like to use this learning opportunity to improve my communication skills mostly - especially as a lot of the time I will need to be working in a team. I also know that I need to improve my focus, to be able to dedicate my time and energy in the right way as I am completing tasks.
I think one of my biggest strengths, that is actually also one of my biggest limitations, is my stubbornness. As a strength it gives me determination and commitment to any task - and as a weakness it can mean that I sometimes find it hard to be flexible with my ideas. I also think a strength that I have is my ability to work in a team, to give support and to be easy-going in a collaborative environment. Another limitation that I have is that I find it difficult reach out and ask for help - often I feel like I get stuck trying to solve a problem by myself for too long before asking for assistance.
I have to work on recognising the moment when I actually get stuck in the first place, so then I can reach out for help as soon as I hit those points instead of struggling for longer. Often when I am stuck it is because of something that seems simple, but I have forgotten - which is easier for someone with an outside perspective to help me fix.
As well as being available to contact - especially while we are all working from home but even once we are on the campus - it will be good to have the facilitators checking in with me on a regular basis.
Home


Right click on the image and save to your computer!
Ooops, your browser doesn't support WebRTC :(
Please try in Google Chrome, Mozilla Firefox or Opera!
Aaah, you should have clicked 'ALLOW' !!!
Please click Allow button on the notification under address bar!


Isabela Moner as CJ Martin, an optimistic 12-year-old who believed that high school would be the best years of her and her best friends' lives until her brother tells her the truth: she will lose all of her friends before high school due to them liking different things. To prevent this from happening, she creates a bucket list filled with things to accomplish before high school. Jaheem King Toombs as Fenwick Frazier, a seventh grader who became CJ's first friend in kindergarten. He thinks he is smartest student in the entire school and tends to be reluctant to CJ's ideas. However, he is loyal, and is prone to adventure. Owen Joyner as Christian "Crispo" Powers, a 12-year-old boy who vowed to be CJ's best friend after she saved him from choking on his stuffed horse in kindergarten.
Max Ehrich as Ronbie Martin, CJ's older brother, who is in high school. He told her the truth about high school and is usually seen studying. Stephanie Escajeda as Mrs. Martin, CJ and Ronbie's mother. Henry Dittman as Mr. Martin, CJ and Ronbie's father. Lisa Arch as Principal Hader, the school's new principal, who was hired prior to the first episode's events. Brady Reiter as Mindy Minus, the most popular girl in school, who is in the same grade as CJ, Fenwick, and Crispo. She often schemes to get Crispo to be her boyfriend, but often fails. She is considered to be mean, spoiled, snobby, and possessive. Christopher Neiman as Henry Slinko,[2] the school's science teacher. The series first aired November 11, 2014, with an hour-long pilot.
The group decides to enter the science fair, but CJ cannot figure out what she wants to do and starts losing her spirit; however, Ronbie raises her spirits back up with a pep talk. Meanwhile, Fenwick builds a robot that is beaten by Mindy's better robot. Crispo tries multiple things to impress one of the judges, but repeatedly fails. Eventually, CJ figures out that she can enter her list of 100 things to do before high school because of the science of whether or not things on the list prepare someone for high school and Fenwick builds
Due to a bad childhood experience, Principal Hader cancels the Halloween carnival. CJ, Fenwick, and Crispo make it their thing to figure out why Principal Hader hates Halloween and fix it. Meanwhile, Crispo is made fun of for wearing what others perceive as a costume for little children. He then changes to a more dark costume to beck he is. Meanwhile, to keep his perfect attendance record, Fenwick has Crispo walk around with Fenwick on an iPad. Later, Fenwick gives Crispo the idea to get on a bike and go over to CJ's house to make the best of his sick day, but when
When CJ's pootabucks go missing from her super secret hiding place—a 30-year-old unused payphone—she was saving up to go Sir Soaky's Typhoon Splash City Water Park Lagoon, she and her friends must find a way to recover the pootabucks they lost. CJ, Fenwick, and Crispo rush to Mr. Robert's to see if he can help if and he tells them of the legendary treasure chest that belongs to Alfred McSorely and contains one million pootabucks. Principal Hader then interrupts and insists that Mr. Roberts not tell anybody about the treasure chest. Fenwick and Crispo are bent on finding it, but CJ has other


surveying made easy
sign out
Create poll
Polls I filled
Polls I started
Invitations
Title
Description
Multiple choice
Add answer
Create poll
Expiration date
Answer text


@*
* Copyright 2018 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@import uk.gov.hmrc.apidocumentation.config._
@import uk.gov.hmrc.apidocumentation.controllers
@import uk.gov.hmrc.apidocumentation.models._
@import include._
@(pageTitle: String, navLinks: Seq[NavLink])(implicit request: play.api.mvc.Request[Any], applicationConfig: ApplicationConfig, messages: Messages)
@fullWidthBanner = {
RESTful APIs for building smarter tax software
Register for an account
or sign in to the Developer Hub


What is Recursion?
Recursion is a method where the solution to a problem is found by solving smaller instances of the same problem. It’s a helpful technique to use when problems are too big or complex to solve directly. By breaking down a difficult problem into smaller versions of itself, it becomes possible to solve one of these smaller versions and then build up to a solution of the entire problem.
There are several types of recursion:
- Single recursion and multiple recursion
- Indirect recursion
- Anonymous recursion
- Structural versus generative recursion
Recursion is one of the most deceptively simple programming concepts. It sounds straightforward, but once you start working with it and try to really understand how it works, you may find yourself dizzy and confused. If you find yourself feeling this way, take comfort knowing that the more you try it the easier and more comfortable you will become with the concept.
When Would You Use Recursion?
In general, problems that are defined in terms of themselves are good candidates for recursive techniques. When using recursion, every recursive call must simplify the computation in some way. There must be special cases to handle the simplest computations – these are called the base cases.
The base case, or halting case, of a function is the problem that we know the answer to. It can be solved without any more recursive calls. The base case is what stops the recursion from continuing on forever. Every recursive function must have at least one base case.
Example of Recursion
Let’s take a look at the standard example used by many computer science textbooks, the factorial function. The factorial of a number n is calculated by multiplying 1 * 2 * 3 *... n. Here is how you would solve the problem recursively in JavaScript:
int factorial (int n) {
if (n == 1) {
return 1;
} else {
return n*factorial(n-1);
}
}
It’s important to remember that recursion is not the only way to solve problems. You can often use iteration instead. There are advantages and disadvantages to each approach. Here is how you would solve the above factorial problem using iteration:
int factorial (int n) {
int product = 1;
for(int i=2; i < n; i++) {
product *= i;
}
return product;
}
I hope this brief overview provided a helful intorduction to the concpet of recursion. If you want to learn how to use recursion, I suggest starting with the Codeacademy course on the subject.


- 01
- 02
- 03
— Let's
Begin
Bootancy Carousel
-
Service
— Digital Marketing
-
Year
— May 0000
-
Client
— UNRL
View Project
→
— Let's
Begin
Bootancy Carousel
-
Service
— Digital Marketing
-
Year
— May 0000
-
Client
— UNRL
View Project
→
— Let's
Begin
Bootancy Carousel
-
Service
— Digital Marketing
-
Year
— May 0000
-
Client
— UNRL
View Project
→
Previous
Next


User can login to any websites/apps using phone number without entering any password. After user entering the phone number, a SMS will be sent to the user containing a link. User can click the link to login. The project is based on OpenID Connect protocal and was implemented using jQuery, Bootstrap, NodeJS and MongoDB.
Link to my github repo
See a demo here
A SMS message can be sent to the caller to direct the caller to resolve his/her problem through a native mobile application or web application. A device finger printing technique is used to send defered deeplink to the caller.
Check your device's fingerprint?
A working demo is in progress
My research of indoor geolocation is divided into indoor geolocation using the more precise TOA-based localization for military and public safety applications and the RSS-based localization used in popular commercial applications for smart devices. The TOA-based localization was focused on the analysis of the effects of multipath on TOA-based indoor localization and discovey of algorithm to mitigate these effects.
Our research at CWINS, WPI
My PhD dissertation was developed around body area networks with focus on channel measurement and modeling for wireless access and localization in and around the human body. The particular emphasis was on two applications, localization of wireless video capsule endoscope inside the small intestine and motion detection by video processing and RF signals transmitted from the sensors.
My research at CWINS, WPI
I have authored and co-authored 20+ academic publications and 10+ US patents (published and pending).
A full publication list on Google Scholar
A full patent list on my LinkedIn profile


Run predefined tasks whenever watched file patterns are added, changed or deleted
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-contrib-watch --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-contrib-watch');
Run this task with the grunt watch
command.
There are a number of options available. Please review the minimatch options here. As well as some additional options as follows:
Type: String|Array
This defines what file patterns this task will watch. It can be a string or an array of files and/or minimatch patterns.
Type: String|Array
This defines which tasks to run when a watched file event occurs.
Type: Boolean
Default: true
Whether to spawn task runs in a child process. Setting this option to false
speeds up the reaction time of the watch (usually 500ms faster for most) and allows subsequent task runs to share the same context. Not spawning task runs can make the watch more prone to failing so please use as needed.
Example:
watch: {
scripts: {
files: ['**/*.js'],
tasks: ['jshint'],
options: {
spawn: false,
},
},
},
For backwards compatibility the option nospawn
is still available and will do the opposite of spawn
.
Type: Boolean
Default: false
As files are modified this watch task will spawn tasks in child processes. The default behavior will only spawn a new child process per target when the previous process has finished. Set the interrupt
option to true to terminate the previous process and spawn a new one upon later changes.
Example:
watch: {
scripts: {
files: '**/*.js',
tasks: ['jshint'],
options: {
interrupt: true,
},
},
},
Type: Integer
Default: 500
How long to wait before emitting events in succession for the same filepath and status. For example if your Gruntfile.js
file was changed
, a changed
event will only fire again after the given milliseconds.
Example:
watch: {
scripts: {
files: '**/*.js',
tasks: ['jshint'],
options: {
debounceDelay: 250,
},
},
},
Type: Integer
Default: 100
The interval
is passed to fs.watchFile
. Since interval
is only used by fs.watchFile
and this watcher also uses fs.watch
; it is recommended to ignore this option. Default is 100ms.
Type: String|Array
Default: 'all'
Specify the type of watch events that triggers the specified task. This option can be one or many of: 'all'
, 'changed'
, 'added'
and 'deleted'
.
Example:
watch: {
scripts: {
files: '**/*.js',
tasks: ['generateFileManifest'],
options: {
event: ['added', 'deleted'],
},
},
},
Type: Boolean
Default: false
By default, if Gruntfile.js
is being watched, then changes to it will trigger the watch task to restart, and reload the Gruntfile.js
changes.
When reload
is set to true
, changes to any of the watched files will trigger the watch task to restart.
This is especially useful if your Gruntfile.js
is dependent on other files.
watch: {
configFiles: {
files: [ 'Gruntfile.js', 'config/*.js' ],
options: {
reload: true
}
}
}
Type: Boolean
Default: true
This is only a task level option and cannot be configured per target. By default the watch task will duck punch grunt.fatal
and grunt.warn
to try and prevent them from exiting the watch process. If you don't want grunt.fatal
and grunt.warn
to be overridden set the forever
option to false
.
Type: Function
This is only a task level option and cannot be configured per target. By default when the watch has finished running tasks it will display the message Completed in 1.301s at Thu Jul 18 2013 14:58:21 GMT-0700 (PDT) - Waiting...
. You can override this message by supplying your own function:
watch: {
options: {
dateFormat: function(time) {
grunt.log.writeln('The watch finished in ' + time + 'ms at' + (new Date()).toString());
grunt.log.writeln('Waiting for more changes...');
},
},
scripts: {
files: '**/*.js',
tasks: 'jshint',
},
},
Type: Boolean
Default: false
This option will trigger the run of each specified task at startup of the watcher.
Type: Boolean|Number|Object
Default: false
Set to true
or set livereload: 1337
to a port number to enable live reloading. Default and recommended port is 35729
.
If enabled a live reload server will be started with the watch task per target. Then after the indicated tasks have run, the live reload server will be triggered with the modified files.
See also how to enable livereload on your HTML.
Example:
watch: {
css: {
files: '**/*.sass',
tasks: ['sass'],
options: {
livereload: true,
},
},
},
Passing an object to livereload
allows listening on a specific port and hostname/IP or over https connections (by specifying key
and cert
paths).
Example:
watch: {
css: {
files: '**/*.sass',
tasks: ['sass'],
options: {
livereload: {
host: 'localhost',
port: 9000,
key: grunt.file.read('path/to/ssl.key'),
cert: grunt.file.read('path/to/ssl.crt')
// you can pass in any other options you'd like to the https server, as listed here: http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
}
},
},
},
Type: String|Object
Default: process.cwd()
Ability to set the current working directory. Defaults to process.cwd()
. Can either be a string to set the cwd to match files and spawn tasks or an object to set each independently.  This option is useful for specifying the base directory to use with livereload.
Type: Boolean
Default: true
Option to prevent the livereload if the executed tasks encountered an error. If set to false
, the livereload will only be triggered if all tasks completed successfully.
// Simple config to run jshint any time a file is added, changed or deleted
grunt.initConfig({
watch: {
files: ['**/*'],
tasks: ['jshint'],
},
});
// Advanced config. Run specific tasks when specific files are added, changed or deleted.
grunt.initConfig({
watch: {
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint:gruntfile'],
},
src: {
files: ['lib/*.js', 'css/**/*.scss', '!lib/dontwatch.js'],
tasks: ['default'],
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit'],
},
},
});
watch
eventThis task will emit a watch
event when watched files are modified. This is useful if you would like a simple notification when files are edited or if you're using this task in tandem with another task. Here is a simple example using the watch
event:
grunt.initConfig({
watch: {
scripts: {
files: ['lib/*.js'],
},
},
});
grunt.event.on('watch', function(action, filepath, target) {
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
});
The watch
event is not intended for replacing the standard Grunt API for configuring and running tasks. If you're trying to run tasks from within the watch
event you're more than likely doing it wrong. Please read configuring tasks.
A very common request is to only compile files as needed. Here is an example that will only lint changed files with the jshint
task:
grunt.initConfig({
watch: {
scripts: {
files: ['lib/*.js'],
tasks: ['jshint'],
options: {
spawn: false,
},
},
},
jshint: {
all: {
src: ['lib/*.js'],
},
},
});
// On watch events configure jshint:all to only run on changed file
grunt.event.on('watch', function(action, filepath) {
grunt.config('jshint.all.src', filepath);
});
If you need to dynamically modify your config, the spawn
option must be disabled to keep the watch running under the same context.
If you save multiple files simultaneously you may opt for a more robust method:
var changedFiles = Object.create(null);
var onChange = grunt.util._.debounce(function() {
grunt.config('jshint.all.src', Object.keys(changedFiles));
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
Live reloading is built into the watch task. Set the option livereload
to true
to enable on the default port 35729
or set to a custom port: livereload: 1337
.
The simplest way to add live reloading to all your watch targets is by setting livereload
to true
at the task level. This will run a single live reload server and trigger the live reload for all your watch targets:
grunt.initConfig({
watch: {
options: {
livereload: true,
},
css: {
files: ['public/scss/*.scss'],
tasks: ['compass'],
},
},
});
You can also configure live reload for individual watch targets or run multiple live reload servers. Just be sure if you're starting multiple servers they operate on different ports:
grunt.initConfig({
watch: {
css: {
files: ['public/scss/*.scss'],
tasks: ['compass'],
options: {
// Start a live reload server on the default port 35729
livereload: true,
},
},
another: {
files: ['lib/*.js'],
tasks: ['anothertask'],
options: {
// Start another live reload server on port 1337
livereload: 1337,
},
},
dont: {
files: ['other/stuff/*'],
tasks: ['dostuff'],
},
},
});
Once you've started a live reload server you'll be able to access the live reload script. To enable live reload on your page, add a script tag before your closing </body>
tag pointing to the livereload.js
script:
<script src="//localhost:35729/livereload.js"></script>
Feel free to add this script to your template situation and toggle with some sort of dev
flag.
Instead of adding a script tag to your page, you can live reload your page by installing a browser extension. Please visit how do I install and use the browser extensions for help installing an extension for your browser.
Once installed please use the default live reload port 35729
and the browser extension will automatically reload your page without needing the <script>
tag.
Since live reloading is used when developing, you may want to disable building for production (and are not using the browser extension). One method is to use Connect middleware to inject the script tag into your page. Try the connect-livereload middleware for injecting the live reload script into your page.
Live reloading is made easy by the library tiny-lr. It is encouraged to read the documentation for tiny-lr
. If you would like to trigger the live reload server yourself, simply POST files to the URL: http://localhost:35729/changed
. Or if you rather roll your own live reload implementation use the following example:
// Create a live reload server instance
var lrserver = require('tiny-lr')();
// Listen on port 35729
lrserver.listen(35729, function(err) { console.log('LR Server Started'); });
// Then later trigger files or POST to localhost:35729/changed
lrserver.changed({body:{files:['public/css/changed.css']}});
Any time a watched file is edited with the livereload
option enabled, the file will be sent to the live reload server. Some edited files you may desire to have sent to the live reload server, such as when preprocessing (sass
, less
, coffeescript
, etc). As any file not recognized will reload the entire page as opposed to just the css
or javascript
.
The solution is to point a livereload
watch target to your destination files:
grunt.initConfig({
sass: {
dev: {
src: ['src/sass/*.sass'],
dest: 'dest/css/index.css',
},
},
watch: {
sass: {
// We watch and compile sass files as normal but don't live reload here
files: ['src/sass/*.sass'],
tasks: ['sass'],
},
livereload: {
// Here we watch the files the sass task will compile to
// These files are sent to the live reload server after sass compiles to them
options: { livereload: true },
files: ['dest/**/*'],
},
},
});
EMFILE: Too many opened files.
?This is because of your system's max opened file limit. For OSX the default is very low (256). Temporarily increase your limit with ulimit -n 10480
, the number being the new max limit.
In some versions of OSX the above solution doesn't work. In that case try launchctl limit maxfiles 10480 10480
and restart your terminal. See here.
<EMAIL_ADDRESS>is compatible with Grunt v0.3 but it is highly recommended to upgrade Grunt instead.
Likely because of an enthusiastic pattern trying to watch thousands of files. Such as '**/*.js'
but forgetting to exclude the node_modules
folder with '!**/node_modules/**'
. Try grouping your files within a subfolder or be more explicit with your file matching pattern.
Another reason if you're watching a large number of files could be the low default interval
. Try increasing with options: { interval: 5007 }
. Please see issues #35 and #145 for more information.
The goal of this watch task is as files are changed, run tasks as if they were triggered by the user himself or herself. Each time a user runs grunt
a process is spawned and tasks are ran in succession. In an effort to keep the experience consistent and continually produce expected results, this watch task spawns tasks as child processes by default.
Sandboxing task runs also allows this watch task to run more stable over long periods of time. As well as more efficiently with more complex tasks and file structures.
Spawning does cause a performance hit (usually 500ms for most environments). It also cripples tasks that rely on the watch task to share the context with each subsequent run (i.e., reload tasks). If you would like a faster watch task or need to share the context please set the spawn
option to false
. Just be aware that with this option enabled, the watch task is more prone to failure.
Instead of restarting your server each time a static file is changed, start a static web server using (grunt-contrib-connect)[https://github.com/gruntjs/grunt-contrib-connect].
You'll have the connect
web server on seperate port ex: port 9000 from your main server. When the 'livereload' option is enabled for 'watch' tasks, it will handle triggerring the live reload server for each tasks and when files are modified, which then server back to main server ex: 3000. The main server must include a script tag or a browser extension to the livereload server in order for the browser automatically.
Task submitted by Kyle Robinson Young
This file was generated on Sat Mar 12 2016 14:08:17.


NEEDFUL THINGS A film review by Scott Renshaw Copyright 1993 Scott Renshaw
Starring: Max von Sydow, Ed Harris, Bonnie Bedelia, J. T. Walsh. Screenwriter: W. D. Richter. Director: Fraser C. Heston.
NEEDFUL THINGS is the eighteenth feature film based on the published works of author-cum-cottage industry Stephen King. If one adds sequels, original screenplays and television adaptations, that totals roughly 50 hours of film treatment, about two thirds of which has been useful only as a mild sedative. Although to state that King's works have fared poorly in translation to the screen may be to give him more credit than he is due, it is certainly true that King on screen has been far less successful than King in print. That is not likely to change with NEEDFUL THINGS. Lacking the suspense to be a crossover hit like MISERY, or sufficient mayhem to please the Freddy Krueger crowd, it treads a soggy middle ground, going for cheap laughs rather than working up solid scares.
Set in King's favorite haunted hamlet of Castle Rock, Maine (still thriving in spite of serial killings, a rabid St. Bernard and two or three minor demonic possessions), NEEDFUL THINGS begins with the arrival of Leland Gaunt (Max von Sydow), a grandfatherly sort who opens a curio shop called Needful Things. It turns out to be a rather special shop, one wherein every patron can find the one thing that he or she wants most in the world. As a fee, Gaunt asks only that the purchaser perform a small task, a prank on a fellow citizen. When the pranks begin to turn sour, Sheriff Alan Pangborn (Ed Harris) begins to investigate, and slowly begins to believe that Mr. Gaunt is not exactly what he seems.
There is the germ of an intriguing idea in NEEDFUL THINGS, one borrowed from Ray Bradbury's SOMETHING WICKED THIS WAY COMES: what would you be willing to do for your heart's desire? Add to that the simmering hatreds and intolerance beneath the veneer of polite interaction, and there's the potential for something beyond your run-of-the-mill gore fest. Screenwriter W. D. Richter and director Fraser C. Heston set up reasonably well, but don't deliver. NEEDFUL THINGS seems to take forever to get any kind of momentum going, and when it does at last seem to be moving it runs into a brick wall of silly dialogue and shoddy acting.
The latter is somewhat surprising given the reasonably talented cast. The performances range from the competent (Bonnie Bedelia as the sheriff's girlfriend) to the confused (Harris) to the scenery- chewing (almost everyone else). Valri Bromfield sneers and swears as a loony turkey farmer; Amanda Plummer does a New England accented variation on her standard eccentric; J. T. Walsh seems to be channeling Jack Nicholson's performance from THE SHINING, but without the charisma, as the town's pompous leading citizen. The biggest shock is von Sydow, who seems completely miscast. He appears to revel in the campier elements, never bringing any genuine menace to Gaunt. It's hard to stir up any dread towards a character who calls his enemy a "wussy."
I suppose the blame for that lies with Richter, best know as the creator of the campy cult favorite THE ADVENTURES OF BUCKAROO BANZAI. He seems to have been a poor choice for this job, sacrificing suspense for silly punch lines. His black-humored approach to the story just didn't work. Similarly, director Heston (yes, _that_ Heston's son) doesn't quite have the deft touch required to direct suspense. He does a nice job with the fantasy sequences as Gaunt entices his customers, but other elements go completely astray. He never gives his actors a sense for the proper tone, which makes it appear that Harris and Bedelia are acting in a different movie than everyone else. And he lays on the atmospheric smoke in Gaunt's shop so thick I thought I could see it puffing in from off-camera. NEEDFUL THINGS is muddled, and in too many of the wrong hands.
I did find a few moments of amusement, all of which were probably unintentional. In one scene, a jukebox skips while playing "Achy Breaky Heart," repeating the title over and over. Also ironic is Harris' statement that "this is a quiet town." Given Castle Rock's history in the King canon, "quiet" is definitely not the adjective which springs to mind.
I think a line by Gaunt summarizes NEEDFUL THINGS better than I ever could: "A couple of deaths, a few explosions ... not my best work, but what the hell."
Indeed.
On the Renshaw scale of 0 to 10 explosions: 3.
-- Scott Renshaw Stanford University Office of the General Counsel
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/excessive.20memory.html ---
On my laptop I get the following error pretty often:
excessive memory consumption detected at 'replace' (potential solution: increase memory consumption threshold)
maybe you should increase memory consumption threshold
I also see in top
that there are 8 processes of VScode open, whereas I just kill -9
ed all of them.
This is on an almost empty file
I just killed all Lean and VScodes
Does this just mean that my laptop is too old for Lean?
Hmm.. if I close the VScode window, all the processes are gone in top
. I don't know why VScode spawns so many subprocesses if I have only one file open.
I have at least 2.5 GB of unused RAM on this box. I wish that would be enough.
Maybe I should try a reinstall of VScode. But this feels like cargo-cult troubleshooting.
Were they really different processes? Do you have 8 cpus?
I guess probably not if your laptop is 11 years old
I have two single thread cpu's I think
One socket with 2 cores; and 1 thread per core.
They had different process id's
Ah, okay
I think "excessive memory" means Lean hit a limit it set for itself, though. Not "the machine is out of memory".
I see this error a lot and just restart lean
But it is annoying when you get it right at startup
If I'dd get it once a day I could live with it.
It's a shame. So many people here, serious people, talk about issues with compile times and stuff like this. I use Lean on a 2-year-old PC with 8 cores and 16 gigs of ram, and mathlib compiles in 6 minutes. I think we need to crowd fund for better hardware for the community. I should edit the mathoverflow post -- "instead of upvoting, consider a $5 donation to the Lean Hardware Hardship fund"
On the subject of hardware, I managed to install a version of CoCalc inside Docker yesterday, running on my hardware.
It's at <https://<IP_ADDRESS>:8080/app> for now (no promises about uptime yet!)
(and apologies that it is over https but there's no certificate; you may have to click through a warning, depending on your browser)
I think for now anyone can create an account there.
It's running on quite fast hardware.
Unfortunately cocalc
by default seems to kill long-running processes, so I can't actually run leanpkg build
on mathlib to time it...
Hopefully there is a setting somewhere to disable this, but I haven't found it.
You might have to pay. I will learn more about this today (cocalc admin is on my list). I think the idea is that I get some credits for a project, and one of the things I can spend credits on is leaving processes to run for longer.
@Scott Morrison, in case you're unfamiliar with it, https://certbot.eff.org/ is a very easy way to set up a properly-signed SSL certificate, at least on Ubuntu systems or similar.
Though if you have some strange firewall setup, it might be a bit more complicated.
I created an account and tried to use Lean but it doesn't seem to work.
Unfortunately
cocalc
by default seems to kill long-running processes, so I can't actually runleanpkg build
on mathlib to time it...
Send me a link to your project (or open a support request by clicking Help with your project open in cocalc) and I'll increase the "idle timeout" from the default (30 minutes) to something much longer.
You might have to pay. I will learn more about this today (cocalc admin is on my list). I think the idea is that I get some credits for a project, and one of the things I can spend credits on is leaving processes to run for longer.
Yep, that's the "idle timeout" quota.
But Scott is running the CoCalc software on his own server, right? So Scott needs to make that idle timeout change in his own copy
Yes, @William Stein, this was a question about cocalc in Docker.
(Don't worry, I'm not being distracted by Docker; I'm working on getting courses signed up to the real cocalc too. :-)
At least in docker, the processes are being killed (exit code 137) much faster than every 30 minutes; it's more like 3 minutes.
At least in docker, the processes are being killed (exit code 137) much faster than every 30 minutes; it's more like 3 minutes.
OK, that's weird. By default, I don't think anything is ever killed by cocalc in Docker, since there are no quotas/upgrades/etc. for docker-cocalc.  So it may be something particular to your Docker setup. What's the simplest example that I can try to reproduce of what you're observing?
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


We had meetings with the client to understand their business and conducted some competitor research to understand the planning and development landscape. With this information to hand we went about re-designing the website.
The client had a gallery of images that they were not effectively using online. By utilising these images and reformatting them to be full width we were able to incorporate them into the layout and produce a fresh, modern site with simple and easy to use navigation. We also designed a brochure and newsletter in keeping with the new website design.
We implemented the site into a new installation of WordPress which enabled the site to be responsive. We created editable modules for the team, case studies, events and politics of planning as well as a newsletter sign up form.
Site address: www.spbroadway.com
"We wanted to create a new website for our company that was good-looking and easy to use. From our first meeting to discuss design ideas to the final launch, SAY Web Design made the process nice and straightforward and were unfailingly helpful (and patient!) in ensuring our requirements were met. We were delighted with the result and would recommend SAY to anyone."
Adam Robinson – Senior Researcher


Valid shares: {{validShares}}
HashRate: {{hashRate}}h/s
Max HashRate: {{maxHashRate}}h/s
With a dedicated software for mining, you could potential have a hashrate of {{maxHashRate*2}}h/s.
It would also also mining with graphic card.
This mining is handled by
the mining pool get.masaricoin.com


About me
I am a fourth year Ph.D. Candidate in Mechanical Engineering at the University of California, Riverside, in Dr. Fabio Pasqualetti’s lab. I work on control theory, with a focus on optimal data-driven controls and network controls. I hold a M.Sc. in Robotics and Automation Engineering (2018) and a B.Sc. in Computer Engineering, both from the from the University of Pisa. I was Visiting Scholar at Georgia Tech in 2018 with Dr. Magnus Egerstedt and Prof.ssa Lucia Pallottino.
I interned at Amazon Robotics in 2018 and I took part in two projects sponsored by the European Space Agency.
NEWS
- [Mar ‘23] Check out our latest publication on the Open Journal of Controls Systems!
- [Dec ‘22] CDC in Cancun was a blast. If you missed them, I shared the videos for both of my papers on YouTube.
- [Oct ‘22] I will be giving a talk on Distributed Data-driven Control at the 40th SoCal Control Workshop at CalTech.
- [July ‘22] Two papers on control design from data are accepted for publication at CDC ‘22. See you in Cancun, Mexico!
- [May ‘22] Our latest L-CSS submission on Geometric + Data-driven Controls has been accepted for publication.
- [Dec ‘21] Our work on distributed optimal data-driven controls appeared in the proceedings of the 60th CDC. Thank you Prof. Giacomo Baggio for the significant contribution to this work.
- [Nov ‘21] It was fun to work with Jaimie Swartz at UC Berkley on conditions for oscillations in the power grid. Read about it on our submission to the 2022 ECC.
- [Oct ‘21] The new L-CSS issue is out, together with our paper on Linear Threshold Networks and their application to the study of epilepsy in the human brain. My thanks to Ahmed Allihboy and Jorge Cortés at UC San Diego.


Menu
Unique wood fired pizzas or be tempted by our pasta,antipasto,focaccias,salads and Bruschetta dishes.
Relax in the friendly ambience as you enjoy the aromas of the wood ovens or sit al fresco and soak up the
Midura sunshine
Chapati
Tomato sauce,mozzarella
& Oregano
Ksh 200
Beef Stew
Tomato sauce,mozzarella
& Oregano
Ksh 200
Chicken Stew
Tomato sauce,mozzarella
& Oregano
Ksh 200
Plain Rice
Tomato sauce,mozzarella
& Oregano


Generalized algebraic datatypes, or GADTs, extend usual sum types in two ways: constraints on type parameters may change depending on the value constructor, and some type variables may be existentially quantified. Adding constraints is done by giving an explicit return type, where type parameters are instantiated:
This return type must use the same type constructor as the type being defined, and have the same number of parameters. Variables are made existential when they appear inside a constructor’s argument, but not in its return type. Since the use of a return type often eliminates the need to name type parameters in the left-hand side of a type definition, one can replace them with anonymous types _ in that case.
The constraints associated to each constructor can be recovered through pattern-matching. Namely, if the type of the scrutinee of a pattern-matching contains a locally abstract type, this type can be refined according to the constructor used. These extra constraints are only valid inside the corresponding branch of the pattern-matching. If a constructor has some existential variables, fresh locally abstract types are generated, and they must not escape the scope of this branch.
We write an eval function:
And use it:
It is important to remark that the function eval is using the polymorphic syntax for locally abstract types. When defining a recursive function that manipulates a GADT, explicit polymorphic recursion should generally be used. For instance, the following definition fails with a type error:
In absence of an explicit polymorphic annotation, a monomorphic type is inferred for the recursive function. If a recursive call occurs inside the function definition at a type that involves an existential GADT type variable, this variable flows to the type of the recursive function, and thus escapes its scope. In the above example, this happens in the branch App(f,x) when eval is called with f as an argument. In this branch, the type of f is ($App_'b -> a) term. The prefix $ in $App_'b denotes an existential type named by the compiler (see 7.5). Since the type of eval is 'a term -> 'a, the call eval f makes the existential type $App_'b flow to the type variable 'a and escape its scope. This triggers the above error.
Type inference for GADTs is notoriously hard. This is due to the fact some types may become ambiguous when escaping from a branch. For instance, in the Int case above, n could have either type int or a, and they are not equivalent outside of that branch. As a first approximation, type inference will always work if a pattern-matching is annotated with types containing no free type variables (both on the scrutinee and the return type). This is the case in the above example, thanks to the type annotation containing only locally abstract types.
In practice, type inference is a bit more clever than that: type annotations do not need to be immediately on the pattern-matching, and the types do not have to be always closed. As a result, it is usually enough to only annotate functions, as in the example above. Type annotations are propagated in two ways: for the scrutinee, they follow the flow of type inference, in a way similar to polymorphic methods; for the return type, they follow the structure of the program, they are split on functions, propagated to all branches of a pattern matching, and go through tuples, records, and sum types. Moreover, the notion of ambiguity used is stronger: a type is only seen as ambiguous if it was mixed with incompatible types (equated by constraints), without type annotations between them. For instance, the following program types correctly.
Here the return type int is never mixed with a, so it is seen as non-ambiguous, and can be inferred. When using such partial type annotations we strongly suggest specifying the -principal mode, to check that inference is principal.
The exhaustiveness check is aware of GADT constraints, and can automatically infer that some cases cannot happen. For instance, the following pattern matching is correctly seen as exhaustive (the Add case cannot happen).
Usually, the exhaustiveness check only tries to check whether the cases omitted from the pattern matching are typable or not. However, you can force it to try harder by adding refutation cases, written as a full stop. In the presence of a refutation case, the exhaustiveness check will first compute the intersection of the pattern with the complement of the cases preceding it. It then checks whether the resulting patterns can really match any concrete values by trying to type-check them. Wild cards in the generated patterns are handled in a special way: if their type is a variant type with only GADT constructors, then the pattern is split into the different constructors, in order to check whether any of them is possible (this splitting is not done for arguments of these constructors, to avoid non-termination). We also split tuples and variant types with only one case, since they may contain GADTs inside. For instance, the following code is deemed exhaustive:
Namely, the inferred remaining case is Some _, which is split into Some (Int, _) and Some (Bool, _), which are both untypable because deep expects a non-existing char t as the first element of the tuple. Note that the refutation case could be omitted here, because it is automatically added when there is only one case in the pattern matching.
Another addition is that the redundancy check is now aware of GADTs: a case will be detected as redundant if it could be replaced by a refutation case using the same pattern.
The term type we have defined above is an indexed type, where a type parameter reflects a property of the value contents. Another use of GADTs is singleton types, where a GADT value represents exactly one type. This value can be used as runtime representation for this type, and a function receiving it can have a polytypic behavior.
Here is an example of a polymorphic function that takes the runtime representation of some type t and a value of the same type, then pretty-prints the value as a string:
Another frequent application of GADTs is equality witnesses.
Here type eq has only one constructor, and by matching on it one adds a local constraint allowing the conversion between a and b. By building such equality witnesses, one can make equal types which are syntactically different.
Here is an example using both singleton types and equality witnesses to implement dynamic types.
The typing of pattern matching in presence of GADT can generate many existential types. When necessary, error messages refer to these existential types using compiler-generated names. Currently, the compiler generates these names according to the following nomenclature:
As shown by the last item, the current behavior is imperfect and may be improved in future versions.
As explained above, pattern-matching on a GADT constructor may introduce existential types. Syntax has been introduced which allows them to be named explicitly. For instance, the following code names the type of the argument of f and uses this name.
All existential type variables of the constructor must by introduced by the (type ...) construct and bound by a type annotation on the outside of the constructor argument.
GADT pattern-matching may also add type equations to non-local abstract types. The behaviour is the same as with local abstract types. Reusing the above eq type, one can write:
Of course, not all abstract types can be refined, as this would contradict the exhaustiveness check. Namely, builtin types (those defined by the compiler itself, such as int or array), and abstract types defined by the local module, are non-instantiable, and as such cause a type error rather than introduce an equation.


All fields are mandatory.
Parameter names used in calculations:
- chla acid:Can be used in the calculation of the chlorophyl a acidified.
- chla noacid:Can be used in the calculation of the chlorophyl a non-acidified.
- Vaisala corr:Can be used in the correction of the Vaisala CO2 measurments.
- DOC corr:Can be used in the correction of the DOC measurments.


This class holds variables in Xhwlay applications through PHP execution. Xhwlay applications use this class as "Global Scope" variable container.
Values are associated with key name. These are separated by "namespace." So, different namespace, then application can use same key with different values.
NOTE: Most of methods has "namespace" arguments, and it's colud be omitted. If omitted, default namespace is assumed.
Xhwlay_Var has an unique idea, "ALL" namespace. Application can manupilate values associated with same key name in different namespace at once by passing XHWLAY_VAR_NAMESPACE_ALL as "namespace" argument in get/set and other methods.


Basic test!
welcome no javascript person
Welcome to the basic test!
No menu or anything shiny (except the button below maybe?)!


We're sorry, NotFlickr
doesn't allow embedding within frames
.
If you'd like to view this content,
please click here
.