I am an enthusiastic fresher with highly motivated and communication skills pursuing B. Tech Information Technology at Saranathan College of engineering.


In this project, we're going to learn how to make clones! And Mine for Gems! Watch out for Snakes!
1) We need a lot of sprites! Pick out some cool ones. We need rocks or dirt, and we need something fun to collect like coins or gems, and we need something scary like a snake or a robot.
2) Choose one of your sprites, and look for a block called "Create Clone" in "Control." Try it out. Hmmm, nothing is happening? Try dragging it around. Huh! There are two now! Now look for a block called "When I start as a clone." Match it with "Go to random position." Now try making clones again. Cool, they all appear in different places! Use blocks from control to make TWO HUNDRED clones of your sprite!
3) Keep going for your other sprites. Try to make a good mix. We want mostly rocks and dirt, with some gems and snakes mixed in.
...what's that? All of your gems are on top?...
Well, that's bad! That won't be any fun to dig up at all. This happens because of "layering." Think of your screen like a house. Each sprite is a floor. So all the rocks are on one floor, and snakes on another. And maybe gems are the top floor. To mix them, look for a block in looks called "Go Front 1 Layers" and adjust to send everything backwards a random number of layers when they start as clones. This will mix up the layers.
4) Give all of your sprites more costumes. When they start as clones, make them choose a random costume. Rotate them around randomly as well.
5) When you click on a rock, play a sound and "Delete the Clone." It's gone now!
6) When you click on a gem, play a sound, get a point, and then delete the clone.
7) When you click on a snake, play a sound, and... STOP THE GAME! Watch out!
8) Add a timer so players feel pressure to go fast. End the game if you run out of time.


survival bats winter species Natterer's summer Daubenton's age Myotis bat data hibernation mortality {border-style population study px;} #ffffff;} model period seasonal adult differences high individual lower different studies periods rates year difference individuals low climate conditions hibernaculum higher species, species. change dynamics pattern species‐specific time (Table based models season weather bats. juvenile used (Culina bats, estimated exceptional hibernating included period. px; sex {font-family Culina Figure able activity environmental font-size foraging importance juveniles level long‐lived patterns set showed survival. years Ecology Kerth, Research Simon, Wilkinson, adults annual class conservation double; effects global hibernaculum, long‐term observed respective seasons selected selection suggest using values years. (Fleischer Acta Macdonald, Munshi‐South, Press. Schnitzler, Siemers, Thus, University border-color border-width case consistent dead events impact individual‐based influence intercept life methods period, populations random recorded regression reproductive results smaller solid; strategy survival: sympatric unpublished variation winter, {font-style {font-weight AIC AICc Chiropterologica, Differences Ecology, Fernández‐Juricic, Fleischer Grosche However, Kerth NAO Newton, Nill, North RFID S). Winter adverse animals available binary body bold changing characteristics compared correlation courier; co‐authors daubentonii effect em; environment expected fat hibernaculum. identify including indicate indicated information investigated mammals marked monitoring potential pt;} reserves responses severity sex, small specific survival, times varied year. years,


Popular Areas in winter activities in quebec
Quebec Winter Carnival - Carnaval de Québec
Carnaval de Québec, site officiel. . Activity books · Last year's Effigies · Online games . Welcome on the brand new website of the Quebec Winter Carnival!
http://carnaval.qc.ca/en/
Winter Activities In Quebec - Travel - Wikinut
Dec 11, 2012 . Make the most of the snow with these wonderful winter activities in the Quebec area.
http://travel.wikinut.com/Winter-Activities-In-Quebec/3kv6kzkg/
Family Activities | Québec Carnival Winter
The Carnival is the place for a winter reunion with the family! Discover the games and shows. Fun for the whole family!
http://carnaval.qc.ca/en/edition-2013/family-activities/
Winter Activities in Québec City and Region
Winter Activities in Québec City and Region. 1/27/2013. We are very pleased to provide you with our best recommendations of visits and activities in Québec City .
http://www.saint-antoine.com/blog_en/view/winter-activities-in-quebec-city-and-region
Activities and Events
A unique experience awaits you in Tremblant with activities and events to keep you more . Winter. Snowmobiling, dogsledding, cross-country skiing, tubing, skating, . 1000 Chemin des Voyageurs, Mont-Tremblant, Québec, Canada, J8E 1T1 .
http://www.tremblant.ca/activities-and-events/index.aspx
Video of Winter Activities in Quebec
WINTER SPORTS IN QUÉBEC VIDEO If skiing or snowboarding get you going, Québec City is one of the top downhill destinations east of the Rockies! No fewer .
http://www.travelvideo.tv/videos/quebec/winteractivitiesinquebecvideo.html


Here you can find friends or stalk strangers.The Doge Social Network does not take any responsibility for the information found.


A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
Cryptoon24-Jul-19 06:59 PM
Ik heb 3 bedrijven en 40 man voor me werken lol
Tek24-Jul-19 06:59 PM
tuurlijk joh.
Cryptoon24-Jul-19 07:00 PM
Denk niet dat er hier veel zijn die mij iets kunnen zeggen
Tek24-Jul-19 07:00 PM
ik heb materialistische bezittingen. lekker voor je
mrtzmp324-Jul-19 07:00 PM
When trading discussion ?
 Dash is amazing! thanks for showing us all the way forward. I am honored that you have blessed me with your insight
mrtzmp324-Jul-19 07:05 PM
We probably in a longer accumulation phase for alts with alt season far away
Tek24-Jul-19 07:06 PM
last shill line : dash has instant transactions, cheap transactions and is now more secure than bitcoin.
Cryptoon24-Jul-19 07:06 PM
Ahum
mrtzmp324-Jul-19 07:06 PM
Bros just stop
Tek24-Jul-19 07:07 PM
stop what exactly? telling the truth.? no thnx
mrtzmp324-Jul-19 07:07 PM
Didn't want to start argumentation but when someone says dash sucks
It's just retarded
Cryptoon24-Jul-19 07:07 PM
I didnt say it sucks
mrtzmp324-Jul-19 07:08 PM
@bopicasso you are wrong and it's reflected in dash price thank do more research
Cryptoon24-Jul-19 07:08 PM
for the record
mrtzmp324-Jul-19 07:08 PM
Nope
Not y
Cryptoon24-Jul-19 07:08 PM
The enemy is traditional finance as a whole
Finance/monetary system
If other cryptos do good its all fine with me
mrtzmp324-Jul-19 07:09 PM
Neverless we praise all institutional investments in hope they pump our bags(edited)
Cryptoon24-Jul-19 07:09 PM
But sometimes we need to not take ourselves/our fav projects as the holy grail and see others as well
mrtzmp324-Jul-19 07:09 PM
@Cryptoonagreed
jansako24-Jul-19 07:10 PM
I did not know there was an enemy, I thought we are just providing solutions to real problems... the best marketed solution then wins the most business...
Cryptoon24-Jul-19 07:10 PM
But when people come saying in kmd discord of all places that kmd has no future etc
Consider me triggered
mrtzmp324-Jul-19 07:10 PM
Nobody says this
Tek24-Jul-19 07:10 PM
nobody has even said that
mrtzmp324-Jul-19 07:10 PM
I think we all agree kmd is our favourite shitcoin
Tek24-Jul-19 07:10 PM
Yeah.
Neko24-Jul-19 07:12 PM
far from shitcoin
it has way more tech and usecase than iota or stellar
>I love the dynamic and bustling city - "/biz/ - Business & Finance" is 4chan's imageboard for the discussion of business and finance, and cryptocurrencies such as Bitcoin and Dogecoin.
The average soy boy is ..., nonathletic, has never been in a fight, will probably marry the first girl that has sex with him...
aka - A decent human being
Tek24-Jul-19 07:45 PM
a real soy boy eats a vegan diet.
and lots of soy
at some point he'll develop manboobs, and maybe he can lactate from them too
Markus24-Jul-19 07:48 PM
KMD for sure got a bright future, altho im not so confident that it will help the coin price
tolken24-Jul-19 07:51 PM
I think it will. How much are other coins ‘used’ ? They generally aren’t, mostly just changing hands on a cex. When people use Komodo/Antara for real projects, there will be real demand and that demand will be the best form of marketing.(edited)
richardt24-Jul-19 07:53 PM
How many real projects have come on board since Antara release?
Markus24-Jul-19 07:53 PM
only demand for the coin i can see is for dpow and if price is 1$ like now then why not load up with a stash of kmd to do dpow for 10 years then ur good to go no need to buy more
thats 3k kmd
pretty cheap security for 10 years
Neko24-Jul-19 08:00 PM
things can change in days in altland
1
hyperDEX24-Jul-19 08:39 PM
@Markus Did you want to try th desktop app?
Markus24-Jul-19 08:42 PM
Sure
joe2x424-Jul-19 09:23 PM
Why keep money in bank like sucker? Buy Komodo, make 5% on your money.
If you want to live comfortably, buy mountain of kmd and live off the interest
Caglio24-Jul-19 09:28 PM
that 5% doesnt help you if you bought at 6.5$
Actually for that bs 5%
I lost 400%
Buy pile of kmd and pray to your god, or two headed cow
that it wont drop like it did
joe2x424-Jul-19 09:29 PM
Ok, XP user tell us how it's done.
Caglio24-Jul-19 09:29 PM
I am just saying ur advice is great if komodo doesnt drop
I am telling u from experience
47000 satoshies
6.5 $
at 11000 satoshies and 1.15$
good 5$
if I bought a pile of it
I would murder someone rn
joe2x424-Jul-19 09:31 PM
When Komodo is back to $10 you can easily live on the interest of 50,000 kmd in most places on the planet.
Caglio24-Jul-19 09:31 PM
IF is correct term
Not when
IF
If yes, I will be really happy
However its a gamble
And most of all probably a long term gamble
Hopefully I really think you are right, and if I havent thought like you do, I would never invest in it
But in reality, it gave losses to almost everyone, except ico price buyers... So either you are gonna trade and gamble, or hope it goes up, lately, it didnt... It grew up a bit in price, lost a lot in satoshi
joe2x424-Jul-19 09:34 PM
Drinking tertiary alcohol is a gamble, as little as 30 ml can kill you.
 Supposed to buy low sell high. Not while high.
Caglio24-Jul-19 09:37 PM
Dude
I dont want to sell, I just want my 5% right ?
When I put money in bank, I dont have to sell it and buy it


|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
| Interface Summary | |
|---|---|
| EditItemEvent | This is used by the list view to "open" an item. |
| Class Summary | |
|---|---|
| AssetBrowser | This is the category based asset browser (ie it has a category tree browser, as well as a search box). |
| AssetItemListViewer | This is a viewer for viewing a list of rules for editing/selection. |
| QuickFindWidget | This is for quickly finding an asset by name. |
| RuleListItem | A simple structure containing the an item in a list for a rule asset. |
| RuleListViewLegacy | Deprecated. |
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


KEY SKILLS
Need a simple marketing strategy and implementation plan? I'm your woman!
I'm also really good at:
- Translating complicated tech jargon into engaging content
- Product communications
- Social media management
- Internal social management e.g. Workplace by Facebook and Slack
- Video development
- Creating and implementing employee engagement programs and communications
- Change and project comms
- PR and Media Relations
- Event strategy and execution
- Working across teams and in challenging environments
CAREER HIGHLIGHTS
I've worked across telco, geospatial, insurance, energy, online fashion, AI and machine learning. Here are some recent highlights:
- Head of Marketing (Jan 18 - May 19)
- Member of senior management team, direct engagement with Board of Directors
- Marketing and Comms lead through series B investment and Concirrus Quest product launch
- Internal Communications (Mar 16 - Oct 17)
- Led Workplace (Facebook for work) pilot program and implementation
Other
RECENT WORK
Web
- Concirrus website overhaul - oversaw project and creation of product and career pages. Wrote all copy.
- Vald Performance - wrote product-focused web copy (not yet published).
Writing
Case studies
Video
- Quest Marine - worked with the product team to develop a storyboard, wrote the script, worked with an animation studio to create.

- Finding new ways to minimise my carbon footprint and sometimes blogging about it
- Running - completing my first marathon 11 months after Bella was born is a proud achievement!
- Inhaling podcasts about Leadership, Culture and Start-Ups (ok, that's sort of worky, but I love them) -
my favourites are 'How I built this' with Guy Raz and The 'Knowledge Project' by Farnham Street.
- Travelling - we just returned from two years in London where we travelled our socks off!
LET'S CHAT
If you have a challenge that could be solved with some marketing and comms expertise (most can!), and you think I'd be a good fit, I'd love to hear from you.
{% comment %}
{% for post in site.posts %}
{% unless post.next %}
{{ post.date | date: '%Y' }}
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
{{ post.date | date: '%Y' }}
{% endif %}
{% endunless %}
{{ post.date | date: "%b %d" }}
{% endfor %}
{% endcomment %}


|
Introducing Transcraft My Accountant, the
revolutionary new application which is designed to free up more time for you
and gives you back control of your financial matters. Unlike other
accounting packages, this application was designed from the ground up with
ease of use and control as the specific requirements. The following features
will hopefully influence your decision to give us a try:
- the software is free
- the software is open source
(meaning you can grab a copy of the source code to see how it is done, or
better still, modify it to suit your needs)
- the software is available on most
popular platforms, so you can run exactly the same software, with the same
features and file formats on Windows®,
Linux or even Mac®
OS X platforms. The application will blend in seamlessly with your native
environment with none of the sluggishness.
- powerful reporting suite, which is fully extendable. Reports can be
formatted in either html, PDF, or even XML
- automatic tax calculation for invoice functions and ledger entries
- Ability to open multiple books, and to transfer entries between them
using the clipboard or drag and drop
- automatic zooming between entry accounts, ledger accounts and
invoices, so you can track the postings and perform impact analysis very
quickly
- revolutionary ad hoc reporting facility. You can quickly select
entries which share common criteria, and click on either the html or PDF
button to generate a professional report for the selected entries
- built in reconciliation engine, making it easy to reconcile your
entries against external statements
- Memorised transactions with full ledger postings, so you can put in
new periodic entries with minimum key strokes
- Scheduled entries facility, for Direct Debits and Standing Orders
- Year end operation to cut to a new file with only the new year's
transactions, keeping the database small and responsive
- three separate reporting periods, namely financial tax year, VAT
quarters, and Company reporting year, keeping the tax man, the VAT man,
and your accountant happy
- Key bindings for most functions, allowing for speedy data entry
- multiple level password protection, separating between normal data
entry and other privileged functions. Your data is protected against
unauthorised access
- multi-lingual. Internationalisation is built in, allowing you to
customise the application to speak any language of your choice. Unicode is
supported, so it can even speak non Latin based languages. Regional tax
regimes can also be configured in, although the default application comes
with British tax codes
- full control of ledger postings, with ledger accounts being created
automatically on the fly as you enter your data. The whole application
revolves around the data entry screen and accounting functions will
attempt to make intelligent decisions for you on your behalf. You can
always override or fine tune these rules at any time
There are many other features, but why not give us a test drive ? It is
the best way to make up your mind. If you are interested in the technical
aspects of this application, or if you want to make feature requests, or
maybe want to report a problem, please use the
technical page on this site or use the
Sourceforge Forum. |
Home
Screen shots
Technical
Download
Online Manual
Support
Contact us
|


Uploading files to the server, handling and linking them
Description
File Upload is handled via Commons FileUpload. We don’t use the Servlet 3 API because, when we had to make a choice, we couldn’t figure out how to set the file size limit via our configuration file.
Yada offers some utility classes to more easily handle files after they have been uploaded:
-
storing files on disk
-
resizing images
-
assigning files to Entity objects
-
generating download links
-
managing the pool of uploaded files
Configuration
Maximum file size setting
You can set the maximum file size for an upload by means of the maxFileUploadSizeBytes
configuration entry:
<config>
<maxFileUploadSizeBytes>3000000</maxFileUploadSizeBytes>
The default is 50MB.
Maximum file size check
When the upload limit is reached, a message is logged with a debug severity. You can ensure to see the message with the following logback configuration:
<logger name="org.springframework.web.multipart.commons.YadaCommonsMultipartResolver" level="DEBUG"/>
A Request Attribute is also added to the Request with the name MaxUploadSizeExceededException
and
the MaxUploadSizeExceededException as a value.
All Request Parameters sent with the form are lost.
The Java method
YadaCommonsMultipartResolver.limitExceeded(request)
can be used in a @Controller to take appropriate action when the file limit is exceeded, for example by returning an error:
if (YadaCommonsMultipartResolver.limitExceeded(request)) {
yadaNotify.title("News not saved", model).error().message("File too big. Size limit is " + config.getMaxFileUploadSizeBytes()/(1024*1024) + " MB").add();
return "/cms/news";
}
|
On an ajax POST, anything returned by the @Controller is discarded and the user only sees a generic error message. |
|
The following may not be true anymore: By default, Tomcat will also drop the connection and no response will be sent to the browser. This will result in a low-level error shown by the browser.
The reason for this is explained here and can only avoided if you configure Tomcat not to drop the connection but keep uploading any excess data ( |
The best solution would be to check file size on the browser via javascript. This is not currently implemented in Yada but is something like the following:
function fileTooBig() {
var file = $('input[name=attachment]')[0].files[0];
if (file==null) {
return false;
}
var sizeMega = file.size/1024/1024;
if (sizeMega>3) {
$('#fileTooBig').show();
return true;
}
$('#fileTooBig').hide();
return false;
}
$('input[name=attachment]').on('change', function() {
fileTooBig();
});
$('#theForm').submit(function() {
if (fileTooBig()) {
event.preventDefault();
}
});
Automate javascript checking of file size
HTML
File upload starts from a "multipart/form-data"
form. This is a standard form with a input element of type "file"
:
<form method="POST" enctype="multipart/form-data" action="doUpload">
File to upload: <input type="file" name="upfile">

<button type="submit">Upload</button>
</form>
Form Fragment /yada/form/fileUpload
If you’re using a form backing bean you can include a yada fragment for the input tag. The following example also shows any error:
<form th:action="@{/profile}" th:object="${formProfile}" enctype="multipart/form-data" method="post"
th:classappend="${#fields.hasErrors('*')}? has-error" role="form">

You can display a link to the uploaded file underneath the input field by passing an instance of YadaAttachedFile
to the attachedFile
fragment attribute.
For other usage instructions see the source file for /yada/form/fileUpload
.
JAVA
After submission, the uploaded file will be processed by Commons File Upload and sent to the @Controller as a MultipartFile
object.
You would normally add a field of that type to the form backing bean, but you can also handle it independently from the other form fields if you wish,
by adding it to the @RequestMapping signature.
In the @Controller you have many options.
Just save the file
You can just save the file somewhere with YadaWebUtil.saveAttachment():
public String storeFile(MultipartFile submittedFile) {
File destination = new File("someFolder");
YadaWebUtil.saveAttachment(submittedFile, destination):
Then you will have to keep track of the file yourself somehow. The following sections show an alternative and more convenient way of dealing with file uploads.
YadaAttachedFile
Usually the uploaded file has to be associated to some Entity in the database: a user avatar or CV, the image of a product, the pdf for a trip. Use YadaAttachedFile to easily handle file attachments:
@Entity
public class Product {
@OneToOne(cascade=CascadeType.PERSIST)
protected YadaAttachedFile icon;
@OneToOne(cascade=CascadeType.PERSIST)
protected YadaAttachedFile specSheet;
After doing this you can make use of the functionality of YadaFileManager explained below.
You shouldn’t use any cascade
different from PERSIST or orphanRemoval
annotations:
-
cascade
SAVE
would generate aConcurrentModificationException
when using the upload and crop workflow (images only - see below) -
cascade
REMOVE
ororphanRemoval=true
wouldn’t delete the file on disk -
cascade
PERSIST
is needed when cloning the parent object (Product
in the example above)
The YadaAttachedFile class stores some file-related information that you might want to keep:
-
the original name of the file uploaded by the user
-
the upload time
-
localized title and description
-
the folder where the file is stored
-
the name of three versions of the file: the original one and the ones scaled for desktop and mobile
-
the sort order relative to files of the same "group"
-
a "published" flag
-
a locale if the file has to be made available only to some specific locale. This could be useful for pdf files in different languages
YadaFileManager
Introduction
The YadaFileManager @Service is the single entry to all operations on uploaded files stored as YadaAttachedFile.
Every time a file is uploaded, it is stored in a folder named "uploads" in the <basePath> configured directory. This folder is created automatically if the tomcat process has enough permissions, otherwise you have to create it manually.
Saving the file
Every file is stored using the original file name. To prevent name duplicates a number is automatically appended at the end.
public String updateProfile(MultipartFile uploadedMultipart) {
File uploadedFile = yadaFileManager.uploadFile(uploadedMultipart);
The File can then be attached to an Entity:
YadaAttachedFile newIcon = yadaFileManager.attachNew(uploadedFile, uploadedMultipart, "/userData", "icon");
if (newIcon!=null) {
user.setIcon(newIcon);
userRepository.save(user);
}
The yadaFileManager.uploadFile()
call can be skipped when passing the MultipartFile directly to attachNew()
:
YadaAttachedFile newIcon = yadaFileManager.attachNew(uploadedMultipart, "/userData", "icon");
The association between the owning Entity and the new YadaAttachedFile instance is not created automatically by yadaFileManager.attachNew() and you have to do it explicitly as shown above. When the attach method is called, the original uploaded file is copied from the "uploads" folder into the target folder. The new file will have the new prefix specified and the YadaAttachedFile id at the end of the name. The original file is by default deleted from the "uploads" folder unless a specific configuration is set to false:
<yadaFileManager>
<deleteUploads>false</deleteUploads>
</yadaFileManager>
Not deleting uploaded files allows the implementation of a filesystem-like feature where single files could be reused many times.
implement filesystem feature
In case you’re replacing a previous attachment, you only need to pass the previous YadaAttachedFile: the old files will be deleted and replaced with the new ones. No explicit database operation is needed in this case.
YadaAttachedFile previousIcon = user.getIcon();
YadaAttachedFile iconAttachedFile = yadaFileManager.attachReplace(previousIcon, uploadedFile, "icon", "jpg", null, null);
|
The difference between |
Complete Example
/**
* Uploads an "icon" image for the user
*/
public String updateProfile(MultipartFile uploadedMultipart) {
... fetch 'user' somehow ...
if (uploadedMultipart!=null && !uploadedMultipart.isEmpty()) {
YadaAttachedFile previousIcon = user.getIcon();
if (previousIcon==null) {
// Move the file to the "someFolder" directory and create a new YadaAttachedFile
YadaAttachedFile newIcon = yadaFileManager.attachNew(uploadedMultipart, "/someFolder", "myprefix");
if (newIcon!=null) {
user.setIcon(newIcon);
userRepository.save(user);
}
} else {
// Replace the existing file with the uploaded one
yadaFileManager.attachReplace(previousIcon, uploadedMultipart, "myprefix", "jpg", null, null);
}
}
Image variants
If the uploaded file is an image, it can be resized for desktop and mobile as needed by specifying the alternative dimensions:
yadaFileManager.attach(uploadedFile, "userData", "icon", "jpg", 1280, 768);
In the above example the image is converted to jpg and two additional versions are saved on disk.
The conversion is performed with the command line tool configured in config/shell/resize
(usually imagemagick).
|
To keep things simple, there are no high density versions for mobile: you should just use the desktop version. |
link to the configuration section
File URL
In order to show images and allow file download, you need to add the relevant URL to the page.
This is done by the methods YadaFileManager.getFileUrl()
, YadaFileManager.getDesktopImageUrl()
, YadaFileManager.getMobileImageUrl()
that can
either be used in the @Controller or directly in the HTML:

Download manual
If you call getMobileImageUrl()
and a mobile image is not present, it will fall back to getDesktopImageUrl()
which in turn
falls back to getFileUrl()
.
Copy Files
When you duplicate an Entity you also need to duplicate the files on the filesystem using YadaFileManager.duplicateFiles()
otherwise the
new entity will reference the old files.
ConfiguratorShape clone = configuratorDao.copy(configuratorShape);
yadaFileManager.duplicateFiles(clone.getIcon());
This is not needed if the copy is done with YadaUtil.copyEntity()
because the file on disk is also copied automatically.
Delete Files
Files can be removed from the filesystem with YadaFileManager.deleteFileAttachment()
. All database objects must then be deleted manually.
YadaAttachedFile icon = user.getIcon();
yadaFileManager.deleteFileAttachment(icon);
user.setIcon(null); // Remove relationship before deletion
user = userDao.save(user);
yadaAttachedFileDao.delete(icon);
test that the above code works
Image upload and crop
Workflow
Usually images that users upload must be of a specific size and can be in (up to) two versions, one for desktop layout and another for mobile layout. Currently there is no specific image for tablet layout (use the desktop one) of for high density mobiles.
The upload form should specify the required size and should reject any smaller image. Bigger images should be allowed regardless of their proportions and should be cropped by the user if needed. Finally, the image has to be resized (reduced) to the target dimensions.
This is implemented by storing an instance of YadaCropQueue in the session, and starting a loop that asks the user to crop all images added to the queue until there are no more left.
Prerequisites
Imagemagick must be installed on the system.
Configuration
The required image size has to be configured in the conf.webapp.prod.xml
file, as in the following example:
<config>
<dimension targetImageExtension="jpg" preserveImageExtensions="gif">
<news>
<top>
<desktop>1920,1200</desktop>
<mobile>768,610</mobile>
<pdf>3840,2400</pdf>
</top>
<thumbnail>
<desktop>800,800</desktop>
<mobile>400,400</mobile>
<pdf>2000,2000</pdf>
</thumbnail>
</news>
targetImageExtension
is the image format that all uploaded images will be converted to, unless specified
in preserveImageExtensions
which is a comma-separated list of extensions that should not be converted.
This can be useful to preserve animated gifs.
Then the desktop/mobile/PDF dimensions required for each image are specified, but all are optional.
In this example there is one "news" image in three cropped sizes, one named "top" and another named "thumbnail".
There’s no need to specify all the three dimensions (desktop/mobile/PDF), but at least one is required
to make any sense of the crop operation.
The above configuration can be read in your subclass of YadaConfiguration
:
public YadaIntDimension[] getDimensionsNewsThumbnail() {
return super.getImageDimensions("/news/thumbnail");
}
This will return an array of YadaIntDimension holding the desktop, mobile and PDF dimensions at position 0, 1 and 2, with a null value when the dimension has not been configured.
The command to crop and resize images must be specified in the configuration too. This example can crop and resize any image, preserving animated gifs if the gif extension has been included in the preserveImageExtensions attribute.
<config>
<shell>
<yadaCropAndResize timeoutseconds="20">
<executable>convert</executable>
<arg>${FILENAMEIN}</arg>
<arg>-coalesce</arg>
<arg>-repage</arg>
<arg>0x0</arg>
<arg>-crop</arg>
<arg>${w}x${h}+${x}+${y}</arg>
<arg>-resize</arg>
<arg>${resizew}x${resizeh}></arg>
<arg>+repage</arg>
<arg>${FILENAMEOUT}</arg>
</yadaCropAndResize>
This example works with any image but corrupts gif animations.
<yadaCropAndResize timeoutseconds="20">
<executable>convert</executable>
<arg>${FILENAMEIN}</arg>
<arg>-background</arg>
<arg>white</arg>
<arg>-flatten</arg>
<arg>-crop</arg>
<arg>${w}x${h}+${x}+${y}</arg>
<arg>-resize</arg>
<arg>${resizew}x${resizeh}></arg>
<arg>${FILENAMEOUT}</arg>
</yadaCropAndResize>
Be aware that the most recent version of imagemagick uses the "magick" command instead of "convert", which must become the first argument:
<executable>magick</executable>
<arg>convert</arg>
<arg>${FILENAMEIN}</arg>
For more details on shell command executions, see Shell Command Execution.
Java form bean
The easiest way to handle file uploads is to use the Entity Backing Beans technique. You need to add a @Transient
field (with getter and setter)
for each multipart file you need to receive:
@Entity
public class News implements CloneableDeep {
@OneToOne(cascade=CascadeType.PERSIST)
protected YadaAttachedFile thumbnail;
@Transient
private MultipartFile thumbnailImage;
This allows for easy validation and handling of the uploaded file. You can also use a Form Backing Bean of course.
HTML form
The upload form can be as simple as a plain file input (here with spring/bootstrap5 validation added):
<form th:action="@{/addOrUpdateNews}" th:object="${news}" enctype="multipart/form-data"
method="post" role="form" th:with="hasError=${#fields.hasErrors('myFieldName')}">
<input type="file" name="myFieldName" accept="image/*" th:classappend="${hasError}?is-invalid">

Invalid image

The form can also be implemented using the /yada/form/fileUpload
fragment:
<form th:action="@{/addOrUpdateNews}" th:object="${news}" enctype="multipart/form-data" th:classappend="${#fields.hasErrors('*')}? has-error" method="post" role="form">

These are the needed parameters:
-
fieldName: the name of the field in the backing bean that holds the multipart file
-
size: the YadaIntDimension taken from the configuration, using the biggest between desktop and mobile
-
'accept': should be used to allow the upload of image files only. If a non-image is uploaded, it wouldn’t pass validation anyway
-
required: should be false when the YadaAttachedFile is not null so that the user is not forced to upload the file when changing something else in the Entity
-
attachedFile: the YadaAttachedFile if you want to show a link to the image below the input field (optional)
Java Controller to show the form
When showing the form using the fragment example, the size
model attribute must be set:
YadaIntDimension[] dimensionsDesktopAndMobile = config.getDimensionsNewsThumbnail();
YadaIntDimension biggestNeeded = YadaIntDimension.biggest(dimensionsDesktopAndMobile);
model.addAttribute("thumbnailSize", biggestNeeded);
Java Form submission
When the Controller receives the submitted data inside an instance of the Entity, the first thing is to check for the upload file size, then issue an error when the file is too big:
@RequestMapping("/addOrUpdateNews")
public String addOrUpdateNews(News news, BindingResult newsBinding, HttpServletRequest request, Model model, Locale locale) {
if (YadaCommonsMultipartResolver.limitExceeded(request)) {
yadaNotify.title("News not saved", model).error().message("File too big. Size limit is " + config.getMaxFileUploadSizeBytes()/(1024*1024) + " MB").add();
return "/manager/news";
}
If that check passes, the multipart should be extracted from the Entity because it won’t survive a save:
MultipartFile thumbnailImage = news.getThumbnailImage(); // Can be null
Next, the image size should be validated and when not big enough, the form should be returned with an error:
boolean valid = true;
YadaManagedFile thumbnailManagedFile = null;
YadaIntDimension[] thumbnailDimensionsDesktopMobile = null;
if (thumbnailImage!=null && !thumbnailImage.isEmpty()) {
try {
thumbnailDimensionsDesktopMobile = config.getDimensionsNewsThumbnail();
YadaIntDimension biggestNeeded = YadaIntDimension.biggest(thumbnailDimensionsDesktopMobile);
thumbnailManagedFile = yadaFileManager.manageFile(thumbnailImage);
YadaIntDimension fileDimension = thumbnailManagedFile.getDimension();
if (fileDimension.isUnset()) {
newsBinding.rejectValue("thumbnailImage", "validation.value.invalidImage", "Invalid image file");
valid = false;
} else if (biggestNeeded.isAnyBiggerThan(fileDimension)) {
newsBinding.rejectValue("thumbnailImage", "validation.value.smallImage", new Object[] {fileDimension, biggestNeeded}, "Image too small");
valid = false;
}
} catch (IOException e) {
log.error("Error uploading image", e);
newsBinding.rejectValue("thumbnailImage", "dashboard.imageupload.error");
valid = false;
}
}
if (!valid) {
yadaFileManager.delete(thumbnailManagedFile);
return EDIT_VIEW;
}
The Entity should then be saved to store the new values, and the crop workflow can start. It is possible to sequentially crop as many images as there are in the form. Images to be cropped are stored in the session. It is important that, if the YadaSession object has been subclassed, it has the @Primary class annotation:
@Component
@Primary
@Scope(value="session", proxyMode=ScopedProxyMode.TARGET_CLASS)
public class ApplicationSession extends YadaSession<UserProfile> {
Back to the Controller, the validated image can be added to the crop queue:
boolean imageLoaded = false;
String cropRedirect = yadaWebUtil.redirectString("/manager/cropPage", locale);
String finalRedirect = yadaWebUtil.redirectString("/manager/journal", locale);
YadaCropQueue yadaCropQueue = applicationSession.addCropQueue(cropRedirect, finalRedirect); // Clear any previous abandoned crops and set the destination
if (thumbnailManagedFile!=null) {
YadaCropImage yadaCropImage = yadaCropQueue.addCropImage(thumbnailManagedFile, thumbnailDimensionsDesktopMobile, FOLDER_NEWS, "thumb-");
YadaAttachedFile newOrExisting = yadaCropImage.titleKey("crop.news.thumbnail").link(news.getThumbnail());
news.setThumbnail(newOrExisting);
imageLoaded=true;
}
The "/manager/cropPage"
and "/manager/journal"
strings are, respectively, the url where the crop page is located and the url where the user should land
when all images in the queue have been cropped.
If the YadaAttachedFile
is modified outside the link
method, it should be put back into the YadaCropImage
otherwise you’ll get a "ConcurrentModificationException" after crop:
newOrExisting.setTitle(news.getTitle());
newOrExisting = yadaAttachedFileDao.save(newOrExisting);
yadaCropImage.setYadaAttachedFile(newOrExisting);
The final step is to redirect to the crop page:
if (!imageLoaded) {
applicationSession.deleteCropQueue();
} else {
news = newsRepository.save(news);
log.debug("Entering crop workflow for news");
return yadaCropQueue.getCropRedirect();
}
HTML Crop page
The crop page can be easily implemented by including the jcrop library and the yada imageCropper fragment:

<link rel="stylesheet"<EMAIL_ADDRESS>


Sean Park 2017
Developer / UX Designer
Scroll
Hi! I'm Sean.
I study Information Systems at |
I am a full-stack engineer and UI/UX designer.
From identifying problems to designing and implementing solutions, I understand the steps to delivering impactful products.
Come check out my projects!
|
<< Previous Project
This Website |
×
|
Next Project >>
Poker Club Website |
|
<< Previous Project
This Website |
×
|
Next Project >>
Poker Club Website |
|
<< Previous Project
A&M Chess Store Application |
×
|
Next Project >>
Hayden's Shoes Data Platform |
|
<< Previous Project
A&M Chess Store Application |
×
|
Next Project >>
Hayden's Shoes Data Platform |
|
<< Previous Project
CMU Canvas Help Website |
×
|
Next Project >>
A&M Chess Store Application |
|
<< Previous Project
A&M Chess Store Application |
×
|
Next Project >>
Hayden's Shoes Data Platform |
|
<< Previous Project
UCC Consulting |
×
|
Next Project >>
Swapbox Database Model |
|
<< Previous Project
UCC Consulting |
×
|
Next Project >>
Swapbox Database Model |
|
<< Previous Project
Seoul 53 Hotel Website |
×
|
Next Project >>
UCC Consulting |
|
<< Previous Project
Seoul 53 Hotel Website |
×
|
Next Project >>
UCC Consulting |
|
<< Previous Project
Swapbox Database Model |
×
|
Next Project >>
This Website |
|
<< Previous Project
Swapbox Database Model |
×
|
Next Project >>
This Website |
|
<< Previous Project
Hayden's Shoes Data Platform |
×
|
Next Project >>
Soundbytes Website & Blog |
|
<< Previous Project
Hayden's Shoes Data Platform |
×
|
Next Project >>
Soundbytes Website & Blog |
|
<< Previous Project
Soundbytes Website & Blog |
×
|
Next Project >>
Prantl's Bakery Website |
|
<< Previous Project
Soundbytes Website & Blog |
×
|
Next Project >>
Prantl's Bakery Website |
|
<< Previous Project
HCI Research |
×
|
Next Project >>
Seoul 53 Hotel Website |
|
<< Previous Project
HCI Research |
×
|
Next Project >>
Seoul 53 Hotel Website |
|
<< Previous Project
Prantl's Bakery Website |
×
|
Next Project >>
TEF Scheduler |
|
<< Previous Project
Prantl's Bakery Website |
×
|
Next Project >>
TEF Scheduler |
|
<< Previous Project
TEF Scheduler |
×
|
Next Project >>
CMU Canvas Help Website |
|
<< Previous Project
TEF Scheduler |
×
|
Next Project >>
CMU Canvas Help Website |
|
<< Previous Project
CMU Poker Club Website |
×
|
Next Project >>
HCI Research |
|
<< Previous Project
CMU Poker Club Website |
×
|
Next Project >>
HCI Research |


Past Election Results
{% results_url as link_url %}
{% if link_url != request.path %}
Election Results
{% endif %}
{% results_2018_url as link_url %}
{% if link_url != request.path %}
2018 Results
{% endif %}
{% results_2017_url as link_url %}
{% if link_url != request.path %}
2017 Results
{% endif %}
{% results_2016_url as link_url %}
{% if link_url != request.path %}
2016 Results
{% endif %}
{% comment %}Wagtail places HTML tags in RichTextFields that have
been edited, even if they're empty. A RichTextField that is blank
and has not been edited will evaluate to None, but one that is blank
and has been edited will evaluate as a string. We need to strip tags
to make sure they properly evaluate as None and so we
don't put linebreaks on the page when empty, and we also need to check
if the field is None. This is fixed in Wagtail 2.2.2.
See: https://github.com/wagtail/wagtail/issues/2336
{% endcomment %}
{% if page.secondary_copy|striptags and page.secondary_copy is not None %}
{{ page.secondary_copy|richtext }}
{% if page.button_show %}
Get Started
{% endif %}
{% endif %}


map::slippy::cache - Management of a tile cache in the local filesystem
This package provides a class for managing a cache of tiles for slippy-based maps in the local filesystem.
BEWARE, Attention Version 0.4 is NOT backward compatible with version 0.3 and earlier. This is due to switching this package's internals to the use of version 0.8 of map::slippy.
Creates the cache cacheName and configures it with both the path to the directory contaiing the locally cached tiles (cachedir), and the command prefix from which it will pull tiles asked for and not yet known to the cache itself (provider).
The result of the command is cacheName.
This method checks the validity of a the given tile identifier. This is a convenience wrapper to ::map::slippy tile valid and has the same interface.
This methods tests whether the cache contains the specified tile or not. The result is a boolean value, true if the tile is known, and false otherwise. The tile is identified by a list containing three elements, zoom level, row, and column number, in this order.
This is the main method of the cache, retrieving the image for the specified tile from the cache. The tile identifier is a list containing three elements, the zoom level, row, and column number of the tile, in this order.
The command refix donecmd will be invoked when the cache either knows the image for the tile or that no image will forthcoming. It will be invoked with either 2 or 3 arguments, i.e.
The string set, the tile, and the image.
The string unset, and the tile.
These two possibilities are used to either signal the image for the tile, or that the tile has no image defined for it.
When the cache has no information about the tile it will invoke the provider command prefix specified during its construction, adding three arguments: The string get, the tile, and a callback into the cache. The latter will be invoked by the provider to either transfer the image to the cache, or signal that the tile has no image.
When multiple requests for the same tile are made only one request will be issued to the provider.


Time period, area treated, and fire return interval for each scenario
The no‐harvest scenario is not included, as no treatments were made. Total project area is 386,100 ha.


Assessment Survey results, as of Sunday evening 7/19/20
Assessment Survey results, as of Sunday evening 7/19/20
We sent out a survey last Friday to gather information on needs and demographics for caregivers within our research community, including staff, trainees, and faculty. This was advertised through graduate programs and QBI. We received 195 responses by Sunday evening, although the survey will remain open until Wednesday. Below is an initial overview of the current results. We have also included a snippet of the free-form comments to give you a sense of some of the key themes that came through. It is clear that balancing two full-time jobs of both research and caregiving has been a tremendous challenge that is not tenable, if we value research productivity, mental health, and equity. We will update this page after the final tally on Wednesday evening, and those results will be shared with the broader UCSF childcare taskforce and university leadership.
Below are listed a fraction of the short answer comments, which provides a window into the experiences and concerns of your fellow colleagues:
-
I appreciate the survey and concern, but we won’t let anyone new in our home and everything for the kids is virtual. Not sure what you can do. Extensions to deadlines would be nice.
-
Maybe ucsf could have nannies or sitters (already recommended by other collagues) that can be available for last minute meetings or experiments
-
I don’t know how I will teach with my kids at home
-
I have a one month old baby at home. My wife is a postdoc as well so it will be great if UCSF provides help/support for postdocs in order to defray the costs of daycares in SF.
-
we send our son to bright horizons at mission bay, but don’t feel comfortable sending him back, particularly given the lack of testing and the reported case of a teach testing positive and working with the kids for multiple days
-
The UCSF daycare re-opened at a reduced capacity and we lost our spots, and now public elementary school will be canceled. There are so many difficult tradeoffs to navigate in terms of providing enough social/emotional enrichment and instruction, while ensuring safety, while also needing reliable care to do our jobs well, while also considering the high costs in SF.
-
Flexible childcare options needed to accommodate work from home settings
-
Now that nearly all Bay Area schools are going to remote learning, this places enormous strain on those of us in families with 2 full time working parents, even though we have some (but not total) flexibility to work from home from time to time. Given the vast number of families that will need some type of supervision of children at home, there are little to no qualified individuals available (all care websites are oversubscribed)- UCSF will need a definitive plan and financial resources to make us able to work in these conditions.
-
Pacifica school district will be online only in the fall, we desperately need assistance with child care.
-
Like so many, I am in need of childcare while I am working remotely full-time, but safe options are limited if nonexistent due to Covid.
-
It would be great if there could be a stipend for child care
-
I hope that all UCSF staff are getting asked these questions, including food service, cleaning, etc staff members
-
Could Cole Hall or Toland Hall be big enough for kids (maybe 9-years+) to social distance while distance learning? Ideally, they could get some help or guidance with some work, or at minimum some moral support. Even with social distancing, at least they could get some in-person interaction. Kids are lonely and missing going to school.
-
this is very impotent! without support for our dependents we won’t be able to proceed with our research. thanks for thinking about this.
-
Short term solutions might be needed in case daycare or than preschool shuts down without notice
-
It is HARD. As a PI, not only that I have to keep our science going forward, but the students/postdocs are in extra need of help/support to maintain their work, many have mental health issues dealing with COVID and racial injustice crises, beinf a foreigner in this country at the present times, on top of having zero support to care for my children 24h/7.
-
safty (how do you make sure daycare is safe, last week California reported 998 cases of COVID19 from childcare) and price
-
My 15 year old daughter is interested in online tutoring or being a tutor as part of a pod
-
I am not sure it is possible for the institution to find child care to replace public education, especially given that UCSF community members do not always live in San Francisco. In addition to this, or in parallel, we could ask for non-parents to pick up additional service from parents as a way to offer immediate support, instruction to P&T committees to adjust expectations of parents and all UCSF community members, and direct financial assistance to parents to support child care or administrative roles they deem necessary in their role. Lastly, I ask that we prioritize postdocs and students for child care needs since they are more vulnerable than faculty. Thank you for doing this.
-
I was without childcare for almost 3 months, now back to childcare but who knows how long? We need assitance for potential childcare shutdowns again, we need reasonalbe response to how an already experinced lack of childcare is impacting careers, productivity, gender diversity! (it comes down to money: funds for technician support for researchers to compensate for already damaged productivity, funds for additional childcare options (nanny) for future shut downs)
-
Will gathering people in UCSF into small group (5 families per group), parents take turns of offering teaching for the kids. This schooling bubble may help to keep normal life and minimize the pandemic spreading.
-
In order to come back to work partially even my household already invested 1000’s of USD in hiring private childcare, which is both a neccessity and a HUGE financial burden on a postdoc salary at the bay area. personally my household doesn’t have any more rope and would soon go into debt or would just need to leave academia.
-
Maybe there is a way to organize small group classes - or a list of potential available teacher that might offer their services and UCSF employees in need could sign up?
-
The pandemic affects every family of every age. Stay strong!
-
My spouse is voluntarily unemployed to take care of our children at home. Daycare is so expensive, that if they went to work, the financial benefit would be negligible for our family.
-
There is no question that my work will suffer if we cannot sort out childcare. As a busy PI my job (and the job of my 15 employees) absolutely depends on me writing grants. I don’t see how that will happen with a kid in my ‘home office’ struggling with online education in the SF public schools.
-
As an incoming student, it’s difficult to find childcare, pre-covid, now it feels impossible. We have been working from home, so I have been caring for my son during the day and working at night. I wish there was a way for incoming students to have a trial period at a UCSF childcare facility, like 3 months available while we found childcare elsewhere. Additionally, as a student, I do not make anywhere near the amount that is required to afford childcare at UCSF, even with my spouse’s combined income we barley scratch a livable wage for the city. UCSF should offer a childcare center tuition option for grad students.
-
We have our elderly mother-in-law living with us, so we must balance risk of exposure to her with childcare needs. It’s a double-bind without a clear solution.
-
Some (any) help with childcare is desperately needed.


;; Currying
(##spheres-load core: functional)
;; at this point, the functions from (core: functional) are available
(define addtwo (curry + 2))
(addtwo 7)
sudo sspheres install fabric
# To install OpenGL and SDL2, you need the C libraries in the system.
# In OS X:
brew install sdl2 sdl2_image sdl2_mixer sdl2_net sdl2_ttf glew
sudo sspheres install opengl sdl2
;; Random sampling and selection (fabric: algorithm/random)
;; Loading the module automatically loads the dependency tree as well
(##spheres-load fabric: algorithm/random)
;; at this point, the functions are available
(random-pick '(a b c d e f))
(random-extract '(a b c d e f))
(random-sample 2 '(a b c d e f))
;; SDL
(##spheres-load sdl2: sdl2)
;; OpenGL
(##spheres-load opengl: gl)
(SDL_Init 0)
(SDL_CreateWindow "HELLO FROM SDL!" 0 0 500 500 SDL_WINDOW_OPENGL)
(SDL_GL_CreateContext #)
(glGetString GL_VERSION)
(*->string #)
(##spheres-include core: base-macros)
(when #t
(println "the basic")
(println "'when'")
(println "macro"))
(define varproc
(case-lambda (() (println "zero arguments"))
((a) (println a))))
(varproc)
(varproc "one argument")
(##spheres-include core: base-macros)
;; SRFI-89 variation
(define* (dabuti (red #f) (wine 3))
(when red (* wine 4)))
(dabuti #t)
(dabuti #t 2)
(define (foo a) (let ((b 0)) (+ b a)))
(define (bar a) (let ((b 0)) (+ (foo a) b)))
(bar "a")
*** ERROR IN #<EMAIL_ADDRESS>-- (Argument 2) NUMBER expected (+ 0 "a") 1> ,e %%b3 = 0 %%a2 = "a" 1> ,i # = (lambda (%%b3) (+ (foo %%a2) %%b3))
(##spheres-include core: base-macros)
;; Witout any added expansion feature
(cond-expand
(my-condition
(display "my-condition is met\n"))
(else
(display "no condition is met\n")))
;; After adding "my-condition" expansion feature
(add-cond-expand-feature! my-condition)
(cond-expand
(my-condition
(display "my-condition is met\n"))
(else
(display "no condition is met\n")))
(let (()) 'a)
*** ERROR IN<EMAIL_ADDRESS>-- Syntax expansion failure: invalid syntax '(let (()) 'a)
(define-syntax asdf (syntax-rules () ((_) 0) ((_ (m 0)))))
*** ERROR IN<EMAIL_ADDRESS>-- Syntax expansion failure: invalid syntax '(syntax-rules () ((_) 0) ((_ (m 0))))
# Display help sfusion # List available generators sfusion generators # List available target platforms for a generator sfusion targets minimal
# Run SFusion with the following parameters: sfusion new -g minimal my-project
# Run default task ssake # Run interpreted source code (and load dependencies) ssake host:run # Compile as a single executable ssake host:compile
in config.scm
| include | evals the code, used to make macros available at compile-time and the REPL |
| prelude | make the code available only at compilation-time (used for FFI headers) |
| load | loads the code (source or object file) or links it, making the procedures available at runtime. |
| cc-options | used to define C compilation flags |
| ld-options | used to define C linking flags |
| asset | copy as a project asset, used for mobile (SS v0.9) |
| ... | for new backends and extensions |
# Run SFusion with the following parameters: sfusion new -g sdl-opengl-minimal visual-project
config.scm: conditional dependencies
sakefile.scm: project building tasks
src/: Scheme sources
{platform}/: platform project, toolchain and native dependencies
tools/: scripts and tools
(let ((mode* (alloc-SDL_DisplayMode))) ; <--- allocate an SDL_DisplayMode
(when (< (SDL_Init SDL_INIT_VIDEO) 0) (fusion:error "Couldn't initialize SDL!"))
(SDL_GetDisplayMode 0 0 mode*)
(let* ((screen-width (SDL_DisplayMode-w mode*))
(screen-height (SDL_DisplayMode-h mode*))
(window (SDL_CreateWindow
"SDL/GL" SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED screen-width screen-height
(bitwise-ior SDL_WINDOW_OPENGL SDL_WINDOW_RESIZABLE))))
(let ((event (alloc-SDL_Event)) ; <--- allocate an SDL_Event
(ctx (SDL_GL_CreateContext window)))
(let recur ((iteration 0))
(SDL_PollEvent event)
(glClear (bitwise-ior GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT GL_STENCIL_BUFFER_BIT))
(SDL_GL_SwapWindow window)
(unless (= SDL_QUIT (SDL_Event-type event))
(recur (++ iteration))))))) ; <--- leave and release both
# Runs initialization ssake android:setup # Compiles the Android app ssake android:compile # Run the Android app ssake android:run # Install the Android app ssake android:install # Compile, install and run ssake android
# Run SFusion with the following parameters: sfusion new -g sdl-opengl my-game
# Run the REPL server in a terminal sense
(found in Energy sphere's path)
(let ((sense-emacs "/usr/local/Gambit-C/spheres/energy/src/remote/sense-emacs.el" ))
(message "Emacs Sense loaded")
(load-file sense-emacs))
M-x sense
(go)
in Emacs
C-c-e
;; Create a new copy of the world
(define new-world (get-world-copy))
;; Rebuild the world
(define rebuild-world
(world-update new-world 'sprites (cdr (world-sprites new-world))))
;; Inject the newly created world
(inject-world! rebuild-world)
(inspect the three components)
# Run as interpreted code + loadable objects (when available)
ssake host:run
# Compile into a single binary
ssake host:compile
(see cond-expands and sakefile)
(if #f ;; <--- #t to compile as a single app executable
;; Compile all modules within the app executable
(fusion#ios-compile-app 'app
arch: 'i386 ;; armv7 / armv7s
target: 'debug
cond-expand-features: '(debug static)
compiler-options: '(debug)
cc-options: (list "-w"
[...]
;; iOS device type Id
(ios-device)
;; iOS device string description
(ios-device-description)
(##spheres-load energy: inspect)
(thread-start!
(make-thread
(lambda ()
(define a<PHONE_NUMBER>987654321)
(let recur ((a a))
(if (= 0 a)
'bye
(recur (- a 2)))))))
(inspect-thread #2)
;; Add (energy: inspect) dependency
;; List the threads
,(s t)
;; Inspect a thread (substitute with the proper serial number from the list)
(inspect-thread {number})
;; ...
;; Once identified
,(v {number})


Before Change
// Generate the Kappa model code from the PySB model and write it to
// the Kappa file:
kappa_file.write(gen.get_content())
kappa_file.close()
p = subprocess.Popen(["KaSa"] + args,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
After Change
// Make sure the user has asked for an output!
if not influence_map and not contact_map:
raise ValueError("Either contact_map or influence_map (or both) must "
"be set to True in order to perform static analysis.")
gen = KappaGenerator(model)
if output_prefix is None:
output_prefix = "tmpKappa_%s_" % model.name


Fans fear for Andrew Maxwell’s mental health as he considers QUITTING I’m A Celeb
The comedian was feeling "overwhelmed"
by Sarah MaglioccoIrish comedian Andrew Maxwell revealed that he considered walking away from the I’m a Celeb show last night.
The funny man broke down from exhaustion, before being comforted by his fellow campers.
“I was up in the Leaders Cabin, I was chatting to James (Haskell) and Jacqueline (Jossa) and I was just so tired, I just hit a wall,” he told the Bushtucker Telegraph.
Andrew told Eastenders actress Jacqueline: “I honestly thought that I was gonna walk out, but I haven’t, when you’re tired, you just say ‘have I done the right thing’.”
Jacqueline replied: “You’d never leave, I can tell that you’re just tired.”
James also offered words of comfort to Andrew, saying: “Everyone has a bad day.”
“You’re an important part of the group and we need you.”
Andrew replied: “I’m just a little bit overwhelmed right now.”
James said: “You’re brilliant, you bring so much energy and laughter.”
James and Jacqueline advised the Irish comedian to eat more food and get some rest in the hopes that he would be able to regain some energy.
However, fans of the show and the funnyman are concerned following his emotional moment.
“Andrew crying isn’t nice to see, hope the crew keep an eye on his mental health,” one said.


Hi,
So I have emoncms setup and running (from an HDD) on my Raspberry Pi and it *seems* to be collecting data from my Current Cost Envi meter vi a modified version of the Perl script I found on the forum. However when I look in the MySQL emoncms database none of the tables seem to be growing, so where is the data going?
I have tables called feed_3 & feed_7, but they only contain 11 & 5 rows respectively.
What format is the date held in those tables? Is it Unix time format?
If I go to the Feeds page and press the eye icon I get a graph that seems to contain all the data I have collected over the last 7 hours or so. So where is it going?
My question is part curiosity and part wanting to be sure that I have it setup right and that the data is not just filling up the memory of my Pi.
Thanks,
David
Re: Where does emoncms store its data?
What version of emoncms are you running?
In later versions, only the data framework is stored in MYSQL, ie the things that do not readily change, whilst the actual feed data is contained in folders. Try;
/var/lib/phpfiwa
/var/lib/phpfina
/var/lib/phptimeseries
/var/lib/timestore
...but the location of the folders may be different - depending upon the emoncms version.
Paul
Re: Where does emoncms store its data?
Paul,
Thanks, for the information. I'm using the v8.3.2 of emoncms and I found the data in the folders you mentioned.
Why is data no longer stored in MySQL, performance with large datasets? MySQL now seems very heavyweight for the use it is being put to.
Thanks,
David
Re: Where does emoncms store its data?
Hi David
Checkout this thread http://openenergymonitor.org/emon/node/5319 for links to more info on the data engines and how they came about.
Paul
Re: Where does emoncms store its data?
Paul,
Thanks, that was worth reading.
David


March 17
Being born again, not of corruptible seed, but of incorruptible, by the word of God, which liveth and abideth for ever.
1 Peter 1:23
You won't really get excited about the Word of God until you realize that it's more than just a collection of divinely-inspired promises. It's a living force that literally carries within it the power to make those promises become a reality in your life.
Is it tough for you to believe such a thing is possible?
It shouldn't be. You see it happen in the natural world all the time.
If I were to put a tomato seed in your hand and tell you that within that tiny, dry seed lies the power to produce a stalk thousands of times bigger than the seed, to produce leaves and roots and round, red tomatoes, you wouldn't have any trouble believing that, would you? You know from experience that even though that scrawny seed doesn't look like a tomato factory, somehow, given the right environment, it will become one.
Jesus says the Word of God works by that same principle. There's miraculous power within it. It is a seed that, once planted by faith in a human heart, will produce more blessings than you can imagine.
Once you grasp that, you'll get extremely excited about the Word of God. That's what happened to me.
Over 20 years ago, I caught a glimpse of what the Word could do. I caught a glimpse of the power within it. Before long, I had a Bible in every room of my house, a Bible in my car, and a tape player going nearly all the time.
I spent every possible moment in the Word of God because I wanted the power of that Word inside me more than I wanted anything else in the world. I knew it would blow the limits off my life, limits that had held me back and kept me down for years. I knew that when I read it, I wasn't just reading, I was planting seeds. Seeds of prosperity, seeds of health, seeds of protection, and seeds of victory for every area of my life.
Don't treat the Word of God like a book. It's not! It's spiritual seed that has the supernatural power within it to produce the harvest of a lifetime. Get excited about it and start planting today!
Scripture Reading: Mark 4:23-32


"KIRJATH-SEPHER "city of books, Joshua 15:15; same as Kirjath-sannah(q.v.), now represented by the valley of ed-Dhaberiyeh, south-west of Hebron. The name of this town is an evidence that the Canaanites were acquainted with writing and books. “The town probably contained a noted school, or was the site of an oracle and the residence of some learned priest.” The “books” were probably engraved stones or bricks.
"KIRJATH-SEPHER "city of books, Joshua 15:15; same as Kirjath-sannah(q.v.), now represented by the valley of ed-Dhaberiyeh, south-west of Hebron. The name of this town is an evidence that the Canaanites were acquainted with writing and books. “The town probably contained a noted school, or was the site of an oracle and the residence of some learned priest.” The “books” were probably engraved stones or bricks.


Installation ¶
Precompiled Binaries ¶
Dependencies ¶
You need to have either PyTorch or LibTorch installed based on if you are using Python or C++ and you must have CUDA, cuDNN and TensorRT installed.
Python Package ¶
You can install the python package using
# Python 3.6
pip3 install https://github.com/NVIDIA/TRTorch/releases/download/v0.2.0/trtorch-0.2.0-cp36-cp36m-linux_x86_64.whl
# Python 3.7
pip3 install https://github.com/NVIDIA/TRTorch/releases/download/v0.2.0/trtorch-0.2.0-cp37-cp37m-linux_x86_64.whl
# Python 3.8
pip3 install https://github.com/NVIDIA/TRTorch/releases/download/v0.2.0/trtorch-0.2.0-cp38-cp38-linux_x86_64.whl
# Python 3.9
pip3 install https://github.com/NVIDIA/TRTorch/releases/download/v0.2.0/trtorch-0.2.0-cp39-cp39-linux_x86_64.whl
C++ Binary Distribution ¶
Precompiled tarballs for releases are provided here: https://github.com/NVIDIA/TRTorch/releases
Compiling From Source ¶
Dependencies for Compilation ¶
TRTorch is built with Bazel, so begin by installing it.
The easiest way is to install bazelisk using the method of you choosing https://github.com/bazelbuild/bazelisk
Otherwise you can use the following instructions to install binaries https://docs.bazel.build/versions/master/install.html
Finally if you need to compile from source (e.g. aarch64 until bazel distributes binaries for the architecture) you can use these instructions
export BAZEL_VERSION=$(cat <PATH_TO_TRTORCH_ROOT>/.bazelversion) mkdir bazel cd bazel curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-dist.zip unzip bazel-$BAZEL_VERSION-dist.zip bash ./compile.sh cp output/bazel /usr/local/bin/
You will also need to have CUDA installed on the system (or if running in a container, the system must have the CUDA driver installed and the container must have CUDA)
The correct LibTorch version will be pulled down for you by bazel.
NOTE: For best compatability with official PyTorch, use TensorRT 7.2 and cuDNN 8.0 for CUDA 11.0 however TRTorch itself supports TensorRT and cuDNN for CUDA versions other than 11.0 for usecases such as using NVIDIA compiled distributions of PyTorch that use other versions of CUDA e.g. aarch64 or custom compiled version of PyTorch.
You then have two compilation options:
Building using cuDNN & TensorRT tarball distributions ¶
This is recommended so as to build TRTorch hermetically and insures any compilation errors are not caused by version issues
Make sure when running TRTorch that these versions of the libraries are prioritized in your
$LD_LIBRARY_PATH
- You need to download the tarball distributions of TensorRT and cuDNN from the NVIDIA website.
Place these files in a directory (the directories
thrid_party/distdir/[x86_64-linux-gnu
|
aarch64-linux-gnu]
exist for this purpose)
Then compile referencing the directory with the tarballs
If you get errors regarding the packages, check their sha256 hashes and make sure they match the ones listed in
WORKSPACE
Release Build ¶
bazel build //:libtrtorch -c opt --distdir thrid_party/distdir/[x86_64-linux-gnu | aarch64-linux-gnu]
A tarball with the include files and library can then be found in
bazel-bin
Debug Build ¶
To build with debug symbols use the following command
bazel build //:libtrtorch -c dbg --distdir thrid_party/distdir/[x86_64-linux-gnu | aarch64-linux-gnu]
A tarball with the include files and library can then be found in
bazel-bin
Pre CXX11 ABI Build ¶
To build using the pre-CXX11 ABI use the
pre_cxx11_abi
config
bazel build //:libtrtorch --config pre_cxx11_abi -c [dbg/opt] --distdir thrid_party/distdir/[x86_64-linux-gnu | aarch64-linux-gnu]
A tarball with the include files and library can then be found in
bazel-bin
Building using locally installed cuDNN & TensorRT ¶
If you encounter bugs and you compiled using this method please disclose it in the issue (an ldd dump would be nice too)
Install TensorRT, CUDA and cuDNN on the system before starting to compile.
In WORKSPACE comment out:
# Downloaded distributions to use with --distdir
http_archive(
name = "cudnn",
urls = ["<URL>",],
build_file = "@//third_party/cudnn/archive:BUILD",
sha256 = "<TAR SHA256>",
strip_prefix = "cuda"
)
http_archive(
name = "tensorrt",
urls = ["<URL>",],
build_file = "@//third_party/tensorrt/archive:BUILD",
sha256 = "<TAR SHA256>",
strip_prefix = "TensorRT-<VERSION>"
)
and uncomment
# Locally installed dependencies
new_local_repository(
name = "cudnn",
path = "/usr/",
build_file = "@//third_party/cudnn/local:BUILD"
)
new_local_repository(
name = "tensorrt",
path = "/usr/",
build_file = "@//third_party/tensorrt/local:BUILD"
)
Release Build ¶
Compile using:
bazel build //:libtrtorch -c opt
A tarball with the include files and library can then be found in
bazel-bin
Debug Build ¶
To build with debug symbols use the following command
bazel build //:libtrtorch -c dbg
A tarball with the include files and library can then be found in
bazel-bin
Pre CXX11 ABI Build ¶
To build using the pre-CXX11 ABI use the
pre_cxx11_abi
config
bazel build //:libtrtorch --config pre_cxx11_abi -c [dbg/opt]
Building the Python package ¶
Begin by installing
ninja
You can build the Python package using
setup.py
(this will also build the correct version of
libtrtorch.so
)
python3 setup.py [install/bdist_wheel]
Debug Build ¶
python3 setup.py develop [--user]
This also compiles a debug build of
libtrtorch.so
Building Natively on aarch64 (Jetson) ¶
Prerequisites ¶
Install or compile a build of PyTorch/LibTorch for aarch64
NVIDIA hosts builds the latest release branch for Jetson here:
Enviorment Setup ¶
To build natively on aarch64-linux-gnu platform, configure the
WORKSPACE
with local available dependencies.
-
Disable the rules with
http_archive
for x86_64 by commenting the following rules:
#http_archive(
# name = "libtorch",
# build_file = "@//third_party/libtorch:BUILD",
# strip_prefix = "libtorch",
# urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.5.1.zip"],
# sha256 = "cf0691493d05062fe3239cf76773bae4c5124f4b039050dbdd291c652af3ab2a"
#)
#http_archive(
# name = "libtorch_pre_cxx11_abi",
# build_file = "@//third_party/libtorch:BUILD",
# strip_prefix = "libtorch",
# sha256 = "818977576572eadaf62c80434a25afe44dbaa32ebda3a0919e389dcbe74f8656",
# urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.1.zip"],
#)
# Download these tarballs manually from the NVIDIA website
# Either place them in the distdir directory in third_party and use the --distdir flag
# or modify the urls to "file:///<PATH TO TARBALL>/<TARBALL NAME>.tar.gz
#http_archive(
# name = "cudnn",
# urls = ["https://developer.nvidia.com/compute/machine-learning/cudnn/secure/<IP_ADDRESS>/10.2_20200626/cudnn-10.2-linux-x64-v<IP_ADDRESS>.tgz"],
# build_file = "@//third_party/cudnn/archive:BUILD",
# sha256 = "0c106ec84f199a0fbcf1199010166986da732f9b0907768c9ac5ea5b120772db",
# strip_prefix = "cuda"
#)
#http_archive(
# name = "tensorrt",
# urls = ["https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.1/tars/TensorRT-<IP_ADDRESS>.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz"],
# build_file = "@//third_party/tensorrt/archive:BUILD",
# sha256 = "9205bed204e2ae7aafd2e01cce0f21309e281e18d5bfd7172ef8541771539d41",
# strip_prefix = "TensorRT-<IP_ADDRESS>"
#)
-
Disable Python API testing dependencies:
#pip3_import(
# name = "trtorch_py_deps",
# requirements = "//py:requirements.txt"
#)
#load("@trtorch_py_deps//:requirements.bzl", "pip_install")
#pip_install()
#pip3_import(
# name = "py_test_deps",
# requirements = "//tests/py:requirements.txt"
#)
#load("@py_test_deps//:requirements.bzl", "pip_install")
#pip_install()
-
Configure the correct paths to directory roots containing local dependencies in the
new_local_repository
rules:NOTE: If you installed PyTorch using a pip package, the correct path is the path to the root of the python torch package. In the case that you installed with
sudo pip install
this will be/usr/local/lib/python3.6/dist-packages/torch
. In the case you installed withpip install --user
this will be$HOME/.local/lib/python3.6/site-packages/torch
.
In the case you are using NVIDIA compiled pip packages, set the path for both libtorch sources to the same path. This is because unlike
PyTorch on x86_64, NVIDIA aarch64 PyTorch uses the CXX11-ABI. If you compiled for source using the pre_cxx11_abi and only would like to
use that library, set the paths to the same path but when you compile make sure to add the flag
--config=pre_cxx11_abi
new_local_repository(
name = "libtorch",
path = "/usr/local/lib/python3.6/dist-packages/torch",
build_file = "third_party/libtorch/BUILD"
)
new_local_repository(
name = "libtorch_pre_cxx11_abi",
path = "/usr/local/lib/python3.6/dist-packages/torch",
build_file = "third_party/libtorch/BUILD"
)
new_local_repository(
name = "cudnn",
path = "/usr/",
build_file = "@//third_party/cudnn/local:BUILD"
)
new_local_repository(
name = "tensorrt",
path = "/usr/",
build_file = "@//third_party/tensorrt/local:BUILD"
)
Compile C++ Library and Compiler CLI ¶
Compile TRTorch library using bazel command:
bazel build //:libtrtorch
Compile Python API ¶
Compile the Python API using the following command from the
//py
directory:
python3 setup.py install --use-cxx11-abi
If you have a build of PyTorch that uses Pre-CXX11 ABI drop the
--use-cxx11-abi
flag


The company that owns TikTok created a smartphone for China
Source: Smartisan
What you need to know
- TikTok owner ByteDance released the Jianguo Pro 3 smartphone in China.
- The device will be released under the Smartisan brand.
- Swipe up from the lock screen to launch the Chinese version of TikTok.
Video sharing service, and enigma to older techies, TikTok is going to be featured on a new smartphone launched by its parent company, ByteDance. After an acquihire of some patents and talent from the Smartisan phone brand, ByteDance will be launching the Smartisan Jianguo Pro 3 in China for ¥2899.
The phone had apparently been in development before the deal was made with ByteDance, and the latter company's involvement led to including a shortcut for TikTok users to swipe up from the lock screen to quickly jump into TikTok, or rather Douyin, which is the version of TikTok that ByteDance offers in China. There doesn't seem to be any more meddling from the TikTok folks in this device beyond that simple shortcut.
Source: Smartisan
The phone features a litany of high-end specs, including the latest Qualcomm Snapdragon 855+ processor, a 4,000 mAh battery, and five cameras. Yes, five cameras. There are four on the back, including a primary 48MP sensor, an ultra-wide 13MP sensor, a long-range 8MP telephoto, and a 5MP shooter for macro. For selfies you get a big 20MP camera, so clearly this phone knows its photo-loving audience.
The device also features an in-display fingerprint reader. ByteDance has already said it will not be bringing its new smartphone to the U.S., but the phone is available now in China.
Google Play
TikTok
Video sharing for teens
A fun and creative app that lets you make your own sketches set to sound bites, music, and different effects. The TikTok app has "privacy and safety" settings to ensure a safe experience. Parents are encouraged to set their kid's profile to private, enable digital well being, and read and follow the apps community guidelines.


Statistical_thresholding
Estimation of the intensity from Poisson process data with statistical thresholding methods or linear estimation.
Contents
Syntax
for thresholding on user input data:
statistical_thresholding( data_mode,point_data,T,thresh_method,alpha,j0,Jmax,tvec,plot_id )
for thresholding on simulated data:
statistical_thresholding( data_mode,model,A0,thresh_method,alpha,M,j0,Jmax,n,tvec,error_measure,plot_id )
List of all possible inputs
| data_mode | 'data' for user input data |
| 'simulation' for simulated data. | |
| point_data | Point process data input. Multiple realizations of the same process must be regrouped in a cell. |
| T | Length of the process specified by user. |
| model | 'blocks', 'bumps' or 'trianglesine' intensity model for simulated data. |
| A0 | Value gives a mean intensity over [0,T] equal to 2*A0. |
| thresh_method | 'linear' for no thresholding and projection of the intensity on V_Jmax. |
| 'dm-l' for local hard thresholding (De Miranda and Morettin (2011)). | |
| 'lrt-l', 'lrt-i' or 'lrt-g' for local, intermediate or global statistical thresholding. | |
| alpha | Significance level for the statistical thresholding methods, use any value for 'linear' and 'dm-l'. |
| M | Number of i.i.d. realizations of the point process per thresholding simulation. |
| j0 | Scale at which the reconstruction of the intensity is preserved (projection on V_j0). For example j0 = 0 if we want to keep the initial father coefficient only. |
| Jmax | Maximum resolution at which the thresholding of the mother coefficients is operated. |
| n | Number of simulations to estimate the mean error. |
| tvec | Time grid over which the error measure is computed. |
| error | Error measure, 'mae' for mean absolute error or 'rmise' for root mean integrated squared error. |
| plot_id | 1 if plot desired, 0 otherwise. |
Author info
Created by Youssef Taleb
Imperial College London
2018


Express and Sass Starter - Todos Page
Home Page
Hello World!
Todo List
Buy groceries
Pick up laundry
Get haircut
Pick up mail