Introduction to Programming Part 4
This is the final lesson in my introduction to programming series of
tutorials. If you have made it this far give yourself a pat on the
back, you deserve it. In this lesson we are going to go a little more
in depth on functions. If you recall from my description in the first
lesson, a function is a block of code that is labeled by a name so it
can be called at any point in a program. Just like variables and
arrays, functions can be either a number or string. We have been using
the VAL and INPUT$ functions repeatedly throughout the previous lessons
in this series of tutorials. By now you should be fairly comfortable
with the basic concept of functions. Lets review the INPUT$ and VAL
functions for a quick overview.
The INPUT$ function is a string
function that takes one argument, the prompt the user sees before the
user starts typing there input in. Here is the basic structure:
Input$ ( prompt$ ) - prompt$ is
the prompt the user sees. Functions return a value after they are done
executing. In the case of INPUT$, this function returns what ever the
user typed in. The value the function returns is basically what it is
equal to. So you can use functions in most places a variable can be
used. To demonstrate this, look at the following example.
A = Abs(-4)
B = Sqrt(25)
C = A + B
Print C
In the first line of the above example we are using the ABS
function to get the absolute value of -4. So ABS will return the
absolute value of -4 and the we are setting the variable A equal to
what ABS(-4) is returning which will be a positive 4. In the next line
we are using the SQRT function to get the square root of 25. SQRT(25)
will return the square root of 25 which is 5 and then we are storing
that return value in the variable B. Then we set a variable called C
equal to the value stored in A plus the value stored in B. And the Last
line just outputs the value stored in C to the console. You can view
how these functions along with all of RCBasic's other functions by
looking in the reference manual. Now that we have a clear understanding
of what is going on in this example lets see if we can shorten it. Look
at the following example.
C = Abs(-4) + Sqrt(25)
Print C
We just cut two lines out of the previous lines by just adding the
values returned by each function and storing the result in variable C.
Since ABS and SQRT are both number functions they can be used to do
math just like numbers or variables can. But if we want to, we can cut
out one more line by writing it like this.
Print Abs(-4) + Sqrt(25)
We just got the 4 lines of code we started with down to one line by
just adding the return values of ABS and SQRT and outputting them to
the console. You will want to store values in variables or arrays most
of the time but it is convenient to know that you don't have to.
So far I have covered a lot of stuff I already covered in the first
tutorial. RCBasic has a lot of built-in functions that perform
different task like getting input from the user, getting the current
time, opening files, and so on. In the future I may cover some of these
other functions in more advanced tutorials but you can look at all
these functions and how to use them in the reference manual. But now we
are going to cover how to make our own functions.
It is very useful to be able to create our your own functions within
your program. It will save you having to rewrite lots of code and also
help you error check and debug your code easier. So lets take one of
the previous challenges to demonstrate this.
This is the final code for the challenge from lesson 2 where I asked
you to write a program that takes 5 numbers from the user and outputs
the average of those numbers.
Dim numbers[5]
user_input$ = ""
Print "Please enter 5 numbers"
For index = 0 To 4
user_input$ = Input$("Enter Number" + Str$(index+1) + ": ")
numbers[index] = Val(user_input$)
Next
average = (numbers[0] + numbers[1] + numbers[2] + numbers[3] + numbers[4]) / 5
Print "The average of the numbers is " + average
Take a moment and go through each line and make sure you can understand
what each line does. Please refer to Intro to Programming III for an
explanation of this code if you are a little lost. We are to make a
function that returns the average of 5 numbers and use it in this
program to replace the variable called AVERAGE.
To make your own function you use the FUNCTION keyword to start your function and you will have a line called END FUNCTION that ends your function. Look at the following.
Function MyFunc ( arg1, arg2, arg3, ... )
...Code to Execute
Return (RETURN_VALUE)
End Function
Note that your function can have as few or as many arguments as you
want. And it is also important to mention that your function name just
like variable names and array names cannot be the same as any of
RCBasic's built-in function names or keywords. So lets make our AVERAGE
function.
Function Average( num1, num2, num3, num4, num5 )
a = (num1 + num2 + num3 + num4 + num5) / 5
Return a
End Function
The first line above is creating a function called AVERAGE that takes 5
numbers and it stores those numbers in the variables num1, num2, num3,
num4, and num5. The second line is computing the average of those
numbers and storing the result in a variable called A. The third line
is returning the value of the variable A which is going to make the
entire function equal to whatever value is in A. And the last line is
telling RCBasic that we are through making our function.
To use this function we would simply call it like we did the ABS or VAL functions.
Average(5,10,15,20,25)
Since our function is a number we can store it in a number variable or do math with it like we could any other number.
x = Average(2,5,8,3,5)
To use the function inside our program we just have to make sure we
make the function before we try to use it. After all you can use
something before it exist. So we are going to make our function at the
start of our program.
Function Average( num1, num2, num3, num4, num5 )
a = (num1 + num2 + num3 + num4 + num5) / 5
Return a
End Function
Dim numbers[5]
user_input$ = ""
Print "Please enter 5 numbers"
For index = 0 To 4
user_input$ = Input$("Enter Number" + Str$(index+1) + ": ")
numbers[index] = Val(user_input$)
Next
'HERE IS WHERE WE USE THE AVERAGE FUNCTION
'---------------------------------------------------------
Print "The average of the numbers is "; Average(numbers[0], numbers[1], numbers[2], numbers[3], numbers[4])
We used the AVERAGE function in the PRINT statement on the very last
line of this program to get the average of the numbers. I know we only
built a number function so far but a string function is made the exact
same way except just like string variables and arrays you have to put a
$ at the end of the functions name when you make it. Also WHEN MAKING A
STRING FUNCTION YOU NEED TO MAKE SURE YOU RETURN A STRING AND NOT A
NUMBER. Look at this simple string function example.
Function MyStringFunction$ ()
Return "HELLO WORLD"
End Function
Print MyStringFunction()
Before we move on I want you to take some time to play around with this code and try building some other functions.
Sometimes you may have a function that doesn't need to return anything. For example look at this function.
Function Count_To_10()
For i = 1 To 10
Print i
Next
Return 0
End Function
Count_To_10()
The function above just writes the numbers 1 to 10 to the console. We
return 0 simply for the sake of returning something. But we don't need
the return value of this function for anything. In cases where you have
a function that doesn't need to return anything you can simply make a
sub routine instead. A SUB
routine is just like a function except it doesn't return anything.
Since sub routines don't return anything they cannot be used like
numbers or strings and cannot be stored in a variable. They are made
the same way functions are except they use the SUB keyword. Here is the
structure of a sub routine.
Sub MySub ( arg1, arg2, ... )
...Code to execute
End Sub
And to use a sub routine you simply call it like a function except you
can't store it in a variable or do math with it or anything. Here is
the COUNT_TO_10 function we made earlier as a sub routine.
Sub Count_To_10()
For i = 1 To 10
Print i
Next
End Sub
Count_To_10()
In every function and sub routine I have shown so far we have passed
arguments by value. When I say BY VALUE, I mean that that if we give a
variable as an argument to the function, the function only uses the
value stored in the variable but does not change the variable itself.
For instance, look at this example.
Sub CoolBeans ( n )
n = 5
End Sub
MyVar = 20
CoolBeans ( MyVar )
Print "MyVar = "; MyVar
Even though we give MYVAR to the COOLBEANS sub routine as argument N
and COOLBEANS sets N equal to 5, when we output MYVAR it is still equal
to 20. That is because MYVAR is passed to the COOLBEANS sub routine BY
VALUE. In order to change variables passed to a function or sub
routine, we have to accept the arguments BY REFERENCE. To accept an
argument by reference to a sub routine or function we just use the
BYREF keyword before the argument name in the function definition. So
here is what the previous example looks like with the argument accepted
by reference.
'NOTICE THAT I AM USING BYREF BEFORE THE NAME OF THE ARGUMENT
Sub CoolBeans ( ByRef n )
n = 5
End Sub
MyVar = 20
CoolBeans ( MyVar )
Print "MyVar = "; MyVar
Now when we pass MYVAR to COOLBEANS, when COOLBEANS changes its
argument value inside the sub routine, it will change the variable that
is passed as an argument. So when we output MYVAR it outputs 5.
The last thing I will cover in this tutorial is scope. Scope refers to
where a variable can be accessed within your program. Look at this
example.
Sub Test()
A = 5
End Sub
Print A
If you try the run the code above you will get a compile error. You get
this compile error because you are trying to output the value of the
variable A to the console when A doesn't exist. But you create a
variable called A inside the sub routine TEST before you try to PRINT A
so why are you getting this error? It is because the variable A you
create in the sub routine is outside of the scope of the rest of your
program. VARIABLES THAT ARE CREATED IN FUNCTIONS, SUB ROUTINES, OR
LOOPS CANNOT BE ACCESSED OUTSIDE OF THEM. Since the variable A is
created inside TEST it can only be seen inside TEST.  So look at this example.
A = 55
Sub Test()
Print "Test is "; + A+5
End Sub
Print "A is "; A
Test()
Now not only are you able to output A in your program but your sub
routine can use the variable A that you create as well. You can also
change the variable A inside the sub routine as well. Look at this
example.
A = 55
Sub Test()
A = A + 1
End Sub
Print "A is "; A
Test()
Print "A is "; A
The code above first outputs 55. Then Test is called which sets A equal
to A (which is 55) plus 1. So when you output A on the last line, A is
equal to 56.
This tutorial covered a lot of information that I don't expect everyone
reading to easily understand completely right away.  Also take some time to go through the reference manual
and try out some of the built-in functions. And read the explanations
on functions and sub routines in the reference manual as well.
And now for some challenges. (YOU WILL HAVE TO LOOK UP SOME STUFF IN THE REFERENCE MANUAL AND POSSIBLY ASK FOR HELP TO COMPLETE THESE)
1. Write a text based game where the user has to guess a randomly generated number.
2. Write a program that ask the user to enter a word. Make a function that returns the number of vowels in the word. Use your function to tell the user the number of vowels in the word they entered.


|
draw3D_gnuplot_api
0.7
|
Abstract interface for drawing class Abstract class used as interface for 3D drawing class implementations. More...
#include <Draw3D_api_interface.hh>
Inherited by drawNS::APIGnuPlot3D.
Public Member Functions | |
| Draw3DAPI (int ref_time_ms=0) | |
| Constructor. More... | |
| virtual | ~Draw3DAPI () |
| virtual uint | draw_line (const Point3D &point1, const Point3D &point2, const std::string &color="black")=0 |
| draws line between 2 points More... | |
| virtual uint | draw_polygonal_chain (const std::vector< Point3D > &points, const std::string &color="black")=0 |
| draws polygonal_chain between n points More... | |
| virtual uint | draw_polyhedron (const std::vector< std::vector< Point3D > > &points_map, const std::string &color="black")=0 |
| draws polyhedron described by its apexs More... | |
| virtual uint | draw_surface (const std::vector< std::vector< Point3D > > &points_map, const std::string &color="black")=0 |
| draws surface described by its points More... | |
| virtual void | erase_shape (uint id)=0 |
| erase shape by id More... | |
| virtual void | change_shape_color (uint id, const std::string &color)=0 |
| change color of shape More... | |
| virtual void | change_ref_time_ms (int ref_time_ms)=0 |
| change mode for ploting and/or time between auto-replots More... | |
| virtual void | redraw ()=0 |
| replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode. More... | |
Protected Attributes | |
| int | refresh_rate_ms |
| mode for ploting and time between auto-replots More... | |
Abstract interface for drawing class Abstract class used as interface for 3D drawing class implementations.
Colors are pre-defined or must be on form rgb:#rrggbb.
Pre defined colors: black, white, grey, blue, light-blue, red, green, yellow, orange, purple, as it was in default palette in Matlab 2014b.
Class have 3 modes, described in refresh_rate_ms variable.
|
inline |
Constructor.
| ref_time_ms | - mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds). |
|
inlinevirtual |
|
pure virtual |
change mode for ploting and/or time between auto-replots
| ref_time_ms | - mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds). |
Implemented in drawNS::APIGnuPlot3D.
|
pure virtual |
change color of shape
| id | - id of shape |
| color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot3D.
|
pure virtual |
draws line between 2 points
| point1 | - first point |
| point2 | - second point |
| color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot3D.
|
pure virtual |
draws polygonal_chain between n points
| points | - vector of points |
| color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot3D.
|
pure virtual |
draws polyhedron described by its apexs
| points_map | - vector of points vectors. Every vector contains points describes one "layer" of polyhedron |
| color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot3D.
|
pure virtual |
draws surface described by its points
| points_map | - vector of points vectors. Every vector contains points describes one "line" in surface |
| color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot3D.
|
pure virtual |
|
pure virtual |
replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode.
Implemented in drawNS::APIGnuPlot3D.
|
protected |
mode for ploting and time between auto-replots
For negative vaules - auto-replots is off and replot can be done only by function redraw(), for 0 value - auto-replots is off and replot is done after every drawing functions, for positive values - auto-replots is on and value is time (in miliseconds) between replots, drawing functions and redraw() don't replot in this mode.


There was an error handling your request. Either the url you entered is incorrect or it was something on our end.
If you believe this is an error on our end, please do not hesitate to contact us on<EMAIL_ADDRESS>Do you have a Github account? In that case you can directly report your issue on our GitHub issues page.


Q458. Poor Pigs
There are 1000 buckets, one and only one of them is poisonous, while the rest are filled with water. They all look identical.  What is the minimum amount of pigs you need to figure out which bucket is poisonous within one hour?
Answer this question, and write an algorithm for the general case.
 There is exactly one bucket with poison.
Note:
A pig can be allowed to drink simultaneously on as many buckets as one would like, and the feeding takes no time.
 During this time, only observation is allowed and no feedings at all.
Any given bucket can be sampled an infinite number of times (by an unlimited number of pigs).
I need to point out that this question get 899 downvotes with 449 upvotes which is hanging red flag. But I still want to take some notes on this question since the idea behind the solution looks quite interesting to me.
At the very beginning, I thought this question is very similar to the “dropping egg” question and might be able to solve with DP.
But then, I was thinking about an easy case when only 15 minutes are available.
In that case, I thought that I would need as many pigs as the buckets, i.e. all buckets have a pig drinking the water. Well, this turns out to be wrong.
Anyway, following this naive routine, I came up with a solution where I repeat this routine at each round. At each round, I let one pig drink water from K buckets so that at the end of each round, I only need to work with the K buckets which poisons the pig.
With this idea, and some math to minimize the number of pigs needed at each round given the total number of round, I arrived at a solution ~ buckets ** (1 / nround)
.
This solution turns out to be wrong and I was confused about why I only need two pigs to test 4 buckets with one round of test.
OK, my initial idea is just so wrong. It is not about how to reduce the size of the problem at each round of test. All it is about is how to encode the information using as fewer pigs as possible. Let’s think about how to encode first and then examine if it is doable.
How to encode? If we do K round of tests, for each pig, it has (K+1) possible results: die at 1st round, …, die at kth round, …, not die. Then, for M pigs, they could encode (K+1)^M possibilities in total.
Is such encoding achievable? Let’s consider the pth pig. We have a list of buckets that need pth pig to have outcome k. In this case, the kth test for pth pig should contain water from and only from these buckets. This rule applies for any k. Essentially, we can see that for each pig, its outcome will partition the buckets into K+1 parts and each parts form one test with the last part being held out always (so that pig could also be alive to the end). Following this rule, we could assign the tests for each pig separately. So, the encoding is achievable.
The solution is minimum M
such that (K + 1)^M > buckets
where K = minutesToTest // minutesToDie
.
The Python submission.
class Solution:
def poorPigs(self, buckets: int, minutesToDie: int, minutesToTest: int) -> int:
nround = minutesToTest // minutesToDie + 1
res = math.log(buckets) / math.log(nround)
if res > int(res):
res = int(res) + 1
else:
res = int(res)
return res


--- layout: page --- {% include header.html %}
Ruby Lugdunum (a.k.a Rulu) is a two-day Ruby conference happening in Lyon, France.
It features great talks, plenty of time to meet people and awesome food!
RuLu 2012 will be held in the Manufacture des Tabacs: an ancient tobacco plant converted into a university in the early 90's. Talks will take place in the large Auditorium André Malraux while the south court will be reserved to Rulu attendees to have drinks, hack and socialize.
The Manufacture des Tabacs is close by Lyon Part Dieu, the main train station of Lyon.
All Rulu attendees and speakers are invited to a Dinner & Party at Le Koodeta, a Gourmet Restaurant & Pub located 15 minutes walking from the venue. Le Koodeta features a large patio with olive trees, an outdoor bar and confy sofas. The dinner is sponsored by the Lyon Ruby Brigade... check out the menu!


This is a pretty crappy table of different types of beer.  There are light stouts, there are roasty IPA's. There's a massive world of funky and sour beers that doesn't really fall under any of these descriptors. I'm not changing it though, so deal with it.
| Roasty | Malty | Hoppy | Light |
|---|---|---|---|
| Stout | Brown Ale | American IPA | Pilsner |
| Porter | Dopplebock | English Mild | Kolsch |
| Rauchbier | Barleywine | Bitter | Gose |


The quiz can have normal HTML before it, which will just be treated like normal markdown.
Anything inside a ---question---
block will be parsed into a <form>
representing the quiz question
A question may optionally have a ‘frontmatter’ section with the legend
parameter to override the default ‘Question’ string used in the form’s legend tag.


version 4.4.3 (under development)
Date: 28-Jun-2017
- (enh #1006): Update Farsi Translations.
version 4.4.2
Date: 24-Jun-2017
- (enh #1005): Update Dutch Translations.
- (enh #1004): New Krajee Explorer Font Awesome Theme.
- (bug #995): Correct and fix image load jquery event triggering for browser cache scenarios.
- (enh #991): Add Azerbaijan Translations.
- (enh #990): Ability to hide thumbnail content (
hideThumbnailContent
) and display only file name/size.
- (enh #989): Update Chinese Translations.
- (enh #987): Zoom preview arrows orientation for RTL.
- (enh #986): Image width parsing and styling enhancements.
- (enh #985): Do not reset input when upload fails (single-upload mode).
- (enh #981): Update Hungarian Translations.
- (enh #977): Add RTL capability (new property
rtl
to be set) - includes new fileinput-rtl.css
(to be loaded after fileinput.css
for RTL styling).
- (enh #973): Add SCSS image path variable and file-image alt style updates.
version 4.4.1
Date: 25-May-2017
- (enh #980): Add new method
getFrames
to get all thumbnail frames as jQuery objects.
- (enh #979): Add new method
getExif
to retrieve exif data for a selected jpeg image.
- (enh #978, #974): Implement exif restoration for resized images via
piexif
plugin.
- (enh #968): Update Turkish Translations.
- (enh #967): Correct file caption display for ajax upload mode when
showPreview
is false
.
version 4.4.0
Date: 13-May-2017
- (enh #966): Add Estonian Translations.
- (enh #965): New
required
and msgFileRequired
properties.
- (bug #958): Create
setTokens
string helper for easier replacement of tokens.
- (bug #956): Correct initial preview file thumb deletions.
- (bug #955): Remove unnecessary
sourceMappingUrl
in purify.min.js
.
- (enh #954): Add minified theme assets.
- (enh #952): Auto orientation of image based on EXIF data (new property
autoOrientImage
).
- (enh #950, #930): Add responsive support for Krajee Explorer theme for mobile devices.
- (enh #949): Sortable plugin enhancements and prevent scroll when dragging on mobile devices.
- Chronological ordering of issues for change log.
- (enh #947): Correct
showDelete
validation in fileActionSettings
.
- (enh #946): Enhance iconic preview validation to ignore extension case if possible.
- (enh #944): Publish v4.3.9 release to NPM.
- (enh #942): Enhance indicator and drag templates. New layout template
indicator
.
- (enh #941): Correct
data-fileindex
validation.
- (bug #940): Correct validation of
initialPreviewShowDelete
.
- (enh #936): Enhance custom validation when ajax abort is triggered via event manipulation.
- (enh #934): Update Russian translations.
- (enh #929): Add Norwegian translations.
- (enh #926): Add Galician translations and update Spanish translations.
- (enh #924): Update Farsi Translations.
- (enh #921): Enhance zoom preview slide-show to show loading indicator during image change.
- (enh #920): Cancel ajax abort action more correctly.
- (bug #919): Fix resize validation.
- Parse all numeric properties correctly.
- (enh #915): Update default styling for zoom preview for object.
- (enh #910): New property
resizeIfMoreThan
to control image resize conditionally.
- (bug #899): Fix multiple file selection for non-ajax scenario.
- (enh #477): Enhance and correct IE10 fileinput click misbehavior.
version 4.3.9
Date: 02-Apr-2017
- (enh #914): Update Portuguese BR translations.
- (enh #913): Better id parsing and resetting of uploaded file thumbnails.
- Enhance zoom preview styling for Krajee Explorer theme.
- More correct validation of
allowedFileTypes
to accept null values.
- (enh #909): Update German Translations.
- (enh #906): Add Swedish Translations.
- (enh #905): Prevent duplicate files to be dragged and dropped.
- (enh #902): Enhance zoom preview styling for large height images.
- (bug #900): Correct
overwriteInitial
validation for async batch uploads returning dynamic initial preview post upload.
- (enh #898): New plugin method to get files in preview and config.
- (enh #894, #895): Correct file size validation for empty files.
- (bug #893): Correct
file-success-remove
event handling.
- (bug #890): Fix doubling of images for async bulk uploads when initial preview is returned via ajax response.
- Enhance uploaded thumb frames to not reset or change the frame identifier after successful upload.
- (enh #887): New properties
msgUploadBegin
and msgUploadEnd
to display a better progress status. The layoutTemplates.progress
will support a new token {status}
.
- Enhance events like
fileclear
and filepreajax
to be aborted via event.preventDefault()
.
- (enh #886): Append zoom modal dialog to
body
element if available to avoid multiple BS modals conflict.
- (bug #885): Correct validation for
allowedFileTypes
.
- (enh #875): Reset form based events more correctly to allow multiple bootstrap file inputs within forms.
- (bug #882): Correct image resize validation.
- (enh #881): Update Spanish Translations.
- (enh #863): New plugin method
zoom
with parameter frameId
to allow custom triggering of zoomed preview for each thumbnail frame.
version 4.3.8
Date: 21-Feb-2017
- (enh #879): Update Russian Translations.
- (enh #876): Update Spanish Translations.
- (enh #874): Enhance/Standardize CSS Styles for Krajee Default Theme.
- (bug #872): Correct typo in
bootstrap.min.css
.
- (bug #870): Correct config.width parsing.
version 4.3.7
Date: 11-Feb-2017
- (enh #862): Launch a brand new Krajee theme:
explorer
.
- (enh #861): New properties within
layoutTemplates
.
- (enh #860): Initialize template defaults in a better manner.
- (enh #859): Enhance and revamp preview caching.
- (enh #858): Thumb Frame CSS class as configurable property.
- (enh #857): Default error handling for unknown ajax errors.
- (enh #854): Better file size calculation and display.
- (bug #852): Ensure
frameClass
setting in initialPreviewConfig
is considered.
- (enh #851): Create Kazakh Translations.
- (enh #847): Update German Translations.
- (enh #662, #725): Enhance preview modal to be appended to body before each zoom action (if
body
tag exists).
- (enh #844): Display zoom preview navigation buttons only when multiple files exist.
- (bug #839): Correct
initialPreview
generation and sortable behavior for async uploads.
- (enh #837): Update Czech Translations.
- (enh #835): Update Polish Translations.
- (bug #834): Correct clearing of file preview including zoom cache.
- (bug #833): Correct validation and defaults init for
allowedPreviewTypes
.
- (enh #831): Update Finnish Translations.
- (enh #828): Allow drag sort of single uploaded thumbnails with
initialPreview
config set (post upload).
- (bug #826): Extend language configuration to consider defaults.
- (bug #825): Correct
fileimagesresized
event triggering.
- (enh #824): Add Korean Translations.
- (enh #823): Correct file indices assignment during validation of images.
- (enh #822): Enhancement for preventing upload when data is empty. New property
msgUploadEmpty
has been incorporated.
- (enh #820): Prevent resize if image is smaller than allowed dimensions.
- (bug #819): Correct init preview auto replace post
uploadSingle
action in thumbnails.
- (enh #816): New property
msgFileTypes
to control descriptions/localizations of file types displayed.
- (enh #815): Enhance parsing of thumbnails that are visible in preview (will allow plugin to be
initialized in hidden containers like tabs).
- (enh #812): Update Greek Translations.
version 4.3.6
Date: 17-Dec-2016
- (enh #809): Various enhancements for preview control and iconic thumbnails.
- add ability to control and render different previews for file thumbnails and zoomed preview content
- new property
preferIconicPreview
will try to parse the previewFileIconSettings
and previewFileExtSettings
to automatically force iconic previews for file thumbnails.
- new property
preferIconicZoomPreview
will try to parse the previewFileIconSettings
and previewFileExtSettings
to automatically force iconic previews in the zoomed content.
- the above properties will be applied and parsed for
initialPreview
content as well.
- (enh #804): Add Slovenian Translations.
- (enh #803): Update Hungarian Translations.
- (enh #802): Allow MOV files preview for supported devices and browsers.
- (enh #800): Update Spanish Translations.
- (enh #799): Fix IE memory issue on image load.
- (enh #791): Auto orientation of images based on EXIF data.
- (enh #788): New validation for minimum file size:
- new property
minFileSize
which validates the minimum file size in KB for upload, else throws
a validation error using msgSizeTooSmall
. This defaults to 0
.
- if
minFileSize
is set to null
, then above validation is skipped and no minimum file size
check is performed.
- (enh #782): New validation for invalid slug file name (caption):
- if slug callback returns an empty string, then an error will be thrown using
msgInvalidFileName
.
- if slug callback returns
false
then the next file will be read and current file skipped.
- (enh #779, #789): More correct thumbnail identification post rearrange.
- (enh #769, #785, #786, #787): Better image resized event handling.
- (enh #771): Update Chinese Translations.
- (enh #764): Update Russian Translations.
- (enh #696): Better default preview zoom settings.
version 4.3.5
Date: 20-Sep-2016
- (bug #758): Correct file slug name parsing for an invalid file extension.
- (bug #753): Correct IE11 file clear bug when using without ajax.
- (enh #745): Update Russian Translations.
- (enh #741): Update Vietnamese Translations.
- (enh #736): Update Portugese Brazilian Translations.
- (bug #734): Correct right parsing of
fileuploaded
event params.
version 4.3.4
Date: 07-Aug-2016
- (enh #731): New method
getFilesCount
for returning upl + non-upl files count.
- (enh #730): Correct Romanian Translations.
- (enh #729): Implement
progressUploadThreshold
to show processing when waiting for server response.
- (enh #728): Change sortable plugin name to avoid conflict with JUI Sortable.
- (bug #722): Correctly concat ajax output in initial preview.
- (enh #721): Update Turkish Translations.
- (enh #719): Pass right
previewId
to fileuploaded
event.
- (enh #718): Update Japanese Translations.
- (enh #715): Reset caption correctly on clear.
- Add contribution templates.
- (bug #710): Fix bug for
ifSet
validation.
version 4.3.3
Date: 09-Jul-2016
- (enh #706): Remove invalid files from filestack correctly for validation errors.
- (enh #704): Add grammatically correct "No files selected" message.
- (enh #702): Add files to stack correctly for max & min preview size validation.
- (bug #700): Fix custom preview icons to be displayed and validated correctly.
- (enh #698): Re-enable drag and drop support for IE Edge.
- (enh #695): Update Spanish Translations.
- (enh #680): Populate filestack for files greater than maxFilePreviewSize.
version 4.3.2
Date: 11-Jun-2016
- (enh #674): Organize all themes in a separate
themes
folder.
- (enh #666): Update sortable draggable selector.
- (enh #655): Include sass styling configuration.
- (enh #654): Update Spanish Translations.
- (enh #650, #676): Ability to configure browse button display and file select via zone click.
- New boolean property
showBrowse
that allows you to control the display of the browse button
- New boolean property
browseOnZoneClick
that allows you to select a file:
- for ajax uploads - by clicking on the preview drag/drop zone
- for form based/non-ajax uploads - by setting
defaultPreviewContent
and that will be clickable to browse files
- New string message property
dropZoneClickTitle
that will be appended to the dragZoneTitle
for ajax uploads when browseOnZoneClick
is true
.
- New template
actionDrag
will be available within layoutTemplates
to configure your drag indicator markup.
- (enh #647): Display file size in previews and templates.
- Enhancements to file preview icons (
other
template).
- Simpler naming for files in locales and themes folders.
- (enh #643):Implement rearranging / sorting functionality for initial preview.
- Add ability to rearrange and sort thumbnails by drag & drop. This feature will use the Sortable plugin which will be included in the
js/plugins
folder.
- This feature will be available only for initial preview thumbnails for both ajax and form uploads.
- New property for drag indicator and drag behavior configurations will be included in
fileActionSettings
:
showDrag
dragIcon
dragClass
dragTitle
dragSettings
- (enh #642): Reorganize JS code into proper folders. Following folders will be added/maintained
locales
: all translation JS files will be located here
themes
: all theme JS files will be located here
plugins
: third party JS plugins that will be used to work with bootstrap-fileinput
- (enh #641): Wrap readFile(index + 1) in a function to prevent 'unsafe-eval' blocking with CSP.
- (enh #640): Ability to theme and provide font awesome theme. New property
theme
added.
- (enh #639): Add ability to just require package in nodejs
- (enh #636): File action enhancements.
- Zoom and Drag buttons will be shown as an additional file action buttons in addition to
upload
and remove
- New boolean properties
showZoom
, showDrag
, showRemove
, showUpload
are now added to fileActionSettings
to control display of these buttons
- New properties
zoomIcon
, zoomClass
, zoomTitle
are available within fileActionSettings
for controlling the zoom button styles and display.
- New properties
dragIcon
, dragClass
, dragTitle
are available within fileActionSettings
for controlling the drag indicator styles and display.
- New properties
actionZoom
and actionDrag
are available within layoutTemplates
to configure the markup of the zoom and drag buttons.
- (enh #635): Various preview enhancements. Previews will be revamped with various functionality:
- Add ability to zoom every thumbnail to a modal preview. So all types of files (images, videos, pdf, text etc) can be previewed in a larger zoom dialog window.
- Automatic slideshow like interface for zoom preview modal. One can navigate left or right to view previous or next content in the preview. In addition to button navigation, keyboard navigation (via left/right arrow keys) is also available.
- Borderless maximized mode and Full Screen mode available for preview.
- Auto disable the previous or next button when the first or last file/image is reached.
- Now
initialPreview
can be setup MORE easier without writing or returning entire markup. Thus the new functionality will enable to use built in previewTemplates
.
- A new boolean property
initialPreviewAsData
is available to control the above. If set to true
, it will allow developers to now pass just the data within initialPreview
(instead of complete markup) and the markup will be auto generated using previewTemplates
.
- New property
initialPreviewFileType
to set the default file type for initial preview. Defaults to image
. Must be on of the keys in fileTypeSettings
.
- All the other settings can be controlled via
initialPreviewConfig
. The new properties available within initialPreviewConfig
are:
type
: Override initialPreviewFileType
at global level and set a separate type for each file in the initial preview.
previewAsData
: boolean property to override the initialPreviewAsData
setting at global level
- New zoom preview control buttons:
prev
next
fullscreen
borderless
toggleheader
close
- The other new settings to control zoomed preview:
previewZoomSettings
: Will allow to set the CSS style (e.g. width, height and other CSS style settings) for each zoomed content type (i.e. image
, pdf
, video
etc.).
previewZoomButtonIcons
: Ability to set the labels for previous, next, fullscreen, borderless, and close buttons.
previewZoomButtonTitles
: Ability to set the titles for previous, next, fullscreen, borderless, and close buttons.
previewZoomButtonClasses
: Ability to set the CSS classes for previous, next, fullscreen, borderless, and close buttons.
- Modifications to all language locales JS for accomodating new translations
- (enh #634): Enhance ability for PDF and HTML preview.
- Enhanced PDF support as PDF embedding is now possible for
initialPreview
. In addition a new template for PDF is available within previewTemplates
.
- HTML Preview is enhanced with a better template. The plugin also now includes support for
DOMPurify
plugin (and available in plugins folder). This processes and cleans the HTML from XSS before previewing. This behavior can be controlled via purifyHtml
property that defaults to true
.
- (enh #633): New property
maxFilePreviewSize
to control preview of large size files.
- (enh #632): Find correct filename in IE9.
- (enh #618): Update German Translations.
- (enh #615): Correct Finnish Localizations.
- (enh #605): Fixed previewCache tags reset.
- (enh #604): Fixed unset method in deleting previewCache index.
- (enh #600): Synchronize latest package on NuGet.
- (bug #595): Correct initialization of
allowedPreviewTypes
.
version 4.3.1
Date: 28-Feb-2016
- (bug #577): Better label spacing for default browse icon.
- (bug #576): Correct previewCache initialization.
- (enh #575): Implement public method chaining and update docs for methods.
- (enh #574): Change naming convention for private / internal methods. Prepend internal plugin methods with underscore
_
.
- (enh #573): Update package.json to include
peerDependencies
.
- (enh #572): Add Finnish Translations.
- (enh #567): New properties and improved messages.
- (enh #565): Enhance progress bar display when upload is aborted or cancelled.
- (enh #560): Update French Translations.
- (enh #559): Allow custom error display styles (e.g. via bootstrap dialog) through these changes:
- added
msg
param in fileerror
, fileuploaderror
, and filefoldererror
events.
- (enh #557): Enhance default file type parsing to intelligently not render unpreviewable content.
- (enh #555): Set default value for
removeFromPreviewOnError
to false
.
- (enh #554): Update documentation and demos to include
webkitdirectory
for upload.
- (enh #514): Set default value for
removeFromPreviewOnError
to false
.
version 4.3.0
Date: 25-Jan-2016
- (enh #550): Correct Drag and drop issue with v4.2.9.
version 4.2.9
Date: 22-Jan-2016
- (enh #545): Refactor code to deep extend options correctly.
- (enh #541): Improve default slug callback to accept most characters.
- (enh #534, enh #535): Ability to remove errored file thumbnails via
removeFromPreviewOnError
.
- (enh #531): Enhance/Fix typos of Arabic translation.
- (enh #530): Error alert box and preview thumbnail styling enhancements.
- (enh #523): Add new branch
sass
for bootstrap-sass-official
support.
- (enh #521): Update Dutch Translations.
- (enh #489): Update documentation for
change
and fileselect
events.
version 4.2.8
Date: 18-Nov-2015
- (enh #494): Add Indonesian translations.
- (enh #490): Fix
zh-TW
translation browseLabel
wording.
- (enh #488): Publish to npm.
- (bug #483): Clear and reset native input after uploading each single file thumbnail.
- (enh #481): Universal Module Definition for use with CommonJS, AMD or browser globals.
- (enh #474): Upload via button within each preview thumbnail skips last file for async uploads.
- (enh #477): Fix IE10 specific styling bug for file input block button.
- (enh #465): Add Català translations.
- (enh #462): Responsive buttons and new property
buttonLabelClass
.
- (enh #460): Update CSS selectors prefix to start with
file
.
- (enh #454): Update Turkish Translations.
- (enh #449): Add Arabic Translations.
- Implement package.json.
- Update bootstrap bower version to support only 3.x variants.
version 4.2.7
Date: 13-Sep-2015
- (bug #442); Enhance the filenames parsing in the filestack and slug conversion.
- (enh #437): New property
defaultPreviewContent
to control a default preview.
- (enh #436): New property
showClose
and new layout template close
to control close icon display.
- (enh #434): Added Japanese translations.
- (enh #433): Added new events for image handling.
fileimageloaded
(fires after each image is loaded in preview) - this is an existing event
fileimagesloaded
(fires after all images are loaded in preview)
fileimageresized
(fires after each image in preview is resized)
fileimagesresized
(fires after all images in preview are resized)
fileimageresizeerror
(fires when any image resize error is faced)
- (enh #432): Send slugged file names with the file blob when uploading via ajax.
- (enh #431): Add Danish locale translations.
- (bug #429): Fix for MS Edge bug that does not support drag and drop.
- (enh #428): Enhancements to asynchronous uploads when
showPreview
is false
.
- (enh #427): Add image resizing capability before upload.
- (bug #420): Revamp file status progress and positioning updates for asynchronous upload.
version 4.2.6
Date: 26-Aug-2015
- (enh #426): Enhancements to progress bar and display thumbnail specific progress.
- (enh #413): Various updates to translations.
- (enh #412): Enhancements to file upload cancellation.
- (enh #410): Better validation for IE 10 and below.
- (enh #405): Create traditional Chinese translations.
- (enh #401): Various enhancements to preview file thumbnails and error validations.
- (bug #398): Validate
data.errorkeys
more correctly.
- (enh #393): Minor enhancements to abort events before upload.
- (enh #392): Enhancements to allow using plugin functions directly.
- (enh #391): Thumbnail styling enhancements for flash, html, and object types.
- (enh #390): Thumbnail error display enhancements.
- (enh #389): New templates and styling enhancements to caption and main buttons.
- (enh #387): Reset
initialCaption
better when preview is cleared.
- (enh #385): Updated Russian & Ukranian translations.
- (enh #382): Better implementation for parsing text in
parseError
method.
- Update translations to include
fileActionSettings
.
- (enh #380, #381): Consistent styling for thumbnails.
- (enh #379): Combine more translatable settings and update locale js files.
- (enh #378): Ability to configure different icon thumbnails for preview files.
- (enh #377): Various enhancements to text preview.
- (enh #373): Default delete ajax request type to POST (instead of DELETE).
version 4.2.5
Date: 27-Jul-2015
- (enh #372): Create new event
filepreajax
.
- (enh #371): Ability to replace files in the preview. New
autoReplace
property.
- (bug #370): Reverts #342 with better fix.
- (enh #362): Add Bulgarian translations.
version 4.2.4
Date: 22-Jul-2015
- (enh #358): Implement event namespaces and enhance event handling process.
- (enh #357): Enhanced and better
refresh
method.
- (enh #356): Implement
destroy
method.
- (enh #351): Updates to Ukranian & Russian translations.
- (enh #342): Add ability to modify extra data before ajax upload in
beforeSend
events.
- (enh #340): Receive
previewId
and index
in extra data for individual thumbnail uploads (ajax).
version 4.2.3
Date: 21-Jun-2015
- (enh #336): Fixes to reset preview via
initUploadSuccess
.
version 4.2.2
Date: 18-Jun-2015
- (enh #332): Bump nuget and bower package versions.
version 4.2.1
Date: 15-Jun-2015
- (enh #330): Minor enhancements in validating preview and progress bar display.
- (enh #329): Message translation updates.
- (bug #328): Implement image dimension validations.
- New properties added to the plugin:
minImageWidth
minImageHeight
maxImageWidth
maxImageHeight
msgImageWidthSmall
msgImageHeightSmall
msgImageWidthLarge
msgImageHeightLarge
- (bug #327): More correct clearing of preview.
- (bug #315): Fix parsing of preview settings for default (other) preview.
- (bug #310): Set missing caption icon on error.
- (enh #309): Fixes for older browsers.
- (enh #308): Better check for
data.error
being empty.
- (enh #307): Allow setting thumbnail frame css class and attributes via
initialPreviewConfig
.
- (enh #305): Implement better cleanup of memory with
revokeObjectURL
.
- (enh #303): Validate only files to be dragged and dropped.
- (enh #302): Add Greek (el) translations.
- (enh #299): Enhancements for displaying uploaded file thumbnails.
- New property
showUploadedThumbs
that will display uploaded thumbnails until the remove/clear button is explicitly pressed.
- New event
filesuccessremove
. This will be triggered on removing the uploaded thumbnail using the thumbnail delete button. The event shares the following parameters:
id
: the HTML id attribute of the thumbnail container
The event
can be set to return false
to abort the thumbnail removal.
- (enh #297): Add Romanian translations.
- (enh #296): Fixed license identifiers in bower.json and composer.json.
- (bug #295): Validate
overwriteInitial
correctly for ajax uploads.
- (enh #287): Add Brazilian Portugese (pt-BR) translations.
- (enh #279, #280): Fixed error for failed response types.
version 4.2.0
Date: 11-May-2015
- (enh #277): New
language
property to allow configuring multi lang widgets on same page.
- (enh #275): Add Czech & Slovakian translations.
version 4.1.9
Date: 02-May-2015
- (bug #273): Reset caption correctly after all initial preview is deleted.
- (enh #271): Add Dutch translations.
- (enh #270): Add Portugese translations.
- (enh #269, #272): Add Turkish translations.
- (enh #264): Validate input type of file before initializing plugin.
- (enh #263): Enhance parsing of file preview thumbnails and actions.
- (enh #259): Add Polish translations.
- (enh #258): Enhance messages to include file plural and single.
- (bug #257): Fix upload single to replace thumbs correctly.
- (bug #253): Fix initial preview delete cache initialization.
- (enh #252): Enhance async batch completion.
- (enh #251): Add Italian localizations.
- (enh #250): Change default slug routine to allow umlauts in filenames.
- (bug #249): Fix error message content display.
- (enh #248): keep chinese characters in file caption.
- (bug #247): Correct mime types validation.
- (enh #245): Allow initial caption to be set without initial preview.
- (enh #244): Add Serbian translations.
- (bug #243): Correct sending of
deleteExtraData
.
- (enh #241): Enhancements to initial preview delete to perform validations before delete.
- (bug #238): Correct initialization of plugin variables when other than maxFileCount & maxFileSize.
- (enh #237): Better styling of file caption icon.
- (enh #232): Update docs to reflect updated bootstrap CDN domain.
version 4.1.8
Date: 30-Mar-2015
- (enh #230): More correct initial preview delete reset.
- (enh #229): Created French translations.
- (enh #228): Created Thai translations.
- (enh #227): Created Ukranian translations and updated Russian translations.
- (enh #226): Create Spanish (Latin American) translations.
- (enh #225): Create Russian translations.
- (enh #222): Enhance to include dynamically replaceable thumbnail tags. Two new properties
previewThumbTags
and initialPreviewThumbTags
will be available for configuration.
- (enh #218): Do not clear preview for ajaxuploads until remove button clicked.
- (enh #217): Ensure
filebatchselected
event is triggered after FileReader completes reading files selected.
- (enh #216): Add Hungarian Translations.
- (enh #215): Set default delete method REST compliant.
- (enh #213): Code cleanup, eliminate change event on clear and properly reset preview cache after ajax deletes.
- (enh #212): Revamp preview to use a new preview caching object.
- (enh #211): Add ability to show detailed server error stack via
showAjaxErrorDetails
.
- (enh #209): Better validation for folder drag and drop and auto-skip any dropped folders. New property
msgFoldersNotAllowed
added to the plugin to allow configuring the message shown. The event filefoldererror
is triggered when a folder is dragged.
- (enh #206): Ability to add custom validation and trigger custom error to abort upload.
- This enhancement will enable you to add your additional custom validations to enhance the fileinput to be used for innumerous scenarios. It will allow an ability to return an associative object with any of the fileinput events (except the error events and the
filebatchuploadsuccess
or filebatchuploadcomplete
) e.g. change
, fileselect
, filepreupload
, filebatchpreupload
etc. The object can return the following keys:
message
: string, the validation error message to be displayed before upload. If this is set the plugin will automatically abort the upload whenever called and display this as an error message. You can use this property for example to read a file and perform your own custom validation.
data
: object, an optional associative array of additional data that you can pass for usage later.
- You can get this data by reading
abortData
in the parameters for the new filecustomerror
event. This new event will be triggered during upload, when you have triggered an abort from any of the other events.
- (enh #205): Allow to auto set initialPreview within
filebatchuploadcomplete
& filebatchuploadsuccess
.
- Allows you to auto define the
initialPreview
and initialPreviewConfig
after an ajax upload by returning these within the data object from your ajax response on fileuploaded
& filebatchuploadsuccess
.
- (enh #204): New properties
fileMinCount
and msgFilesTooLess
(useful to make file input mandatory).
- The
fileMinCount
property will allow to set the minimum file count needed before triggering upload. It will work for both ajax
uploads and normal form based submission
.
- This will enable you to set the file input to be a mandatory / required input. (e.g.
fileMinCount
= 1
). The msgFilesTooLess
will be displayed and error raised.
- If
fileMinCount
is set to 0
it will be treated as files are optional and no error will be triggered.
- (enh #203): Enhancements and revamp of all error events.
- fileerror
- fileuploaderror
- filebatchuploaderror
- filedeleteerror
- filefoldererror (new event - see #209)
- filecustomerror (new event - see #206)
- (enh #202): Ability to add Translations / Locales.
- Identify and group all messages that need to be translated configurable via
$.fn.fileinput.locales['<lang-code>']
- Set default english messages configuration
$.fn.fileinput.locales['en']
within the plugin core code
- Individual locale files need to be created as separate js files e.g.
<lang>.js
- (bug #193): Better validation for triggering
filebatchuploadcomplete
on async batch upload completion.
- (enh #192): Ability to extend and add one's own ajax settings.
- New property
ajaxDeleteSettings
to help extend and add to delete ajax settings.
ajaxSettings
to help extend and add upload ajax settings
- (enh #189): Reinitialize initial preview delete events correctly on file selection.
- (enh #188): Clear fileinput more correctly for all browsers when initialPreview is set enhancement
- (enh #187): New property
previewFileIcon
to configure file icon shown in preview for unreadable file types.
- (enh #184): Fix documentation for filedeleted event.
- (enh #183): Delete extra data enhancements.
- (enh #181): Fix change event triggered for IE 11 when file input is set to empty.
- (enh #179): Validate and cast
maxFileSize
and maxFileCount
to numeric - even if they have been setup as a string.
- (enh #178): Updated README for cancel button configuration.
- (enh #177): Trigger filebatchpreupload if showPreview is
false
.
- (enh #176): Wrong file in README installation steps fixed.
- (enh #175): Ability to override delete extra data in
initialPreviewConfig
.
- (enh #174): New
deleteUrl
property.
- (enh #167, #173): New
deleteExtraData
property for ajax deletions.
- (bug #171): Fix typo for files validation.
version 4.1.7
Date: 13-Feb-2015
- Relocate sample files from examples directory to bootstrap-fileinput-samples repo.
- Set copyright year to current.
- (enh #162): New property ajaxSettings to allow configuring ajax params.
- (bug #160): Correct documentation typo for usage.
- (bug #159): Ensure filestack is passed correctly with
outData
for events.
- (enh #157): Upload progress bar styling enhancements.
- Allow upload progress bar css class to be configurable
- Create and allow two different styles/css classes for progress bar
progressClass
: styling for progress bar when upload is in process
progressCompleteClass
: styling for progress bar when upload is complete
- (enh #156): Fix reset of file stack for various upload modes (single, batch async and batch sync).
- (enh #155): Allow display of long file names without spaces/word breaks.
- (enh #154): Code cleanup and restructure for JS lint changes (using JSHint Code cleanup library).
- (enh #153): Improve error handler for trapping FileReader security exceptions and new property
msgFileSecured
will display the security exception message.
- (enh #152): New faster
replaceAll
method instead of regexp parsing to replace tags in templates.
- (enh #151): New
filebatchselected
event triggered after every batch of files are selected.
- (enh #149): Custom tags support for layoutTemplates and previewTemplates (new properties
customLayoutTags
and customPreviewTags
included).
version 4.1.6
Date: 20-Jan-2015
- (enh #139): Reset file stack correctly on ajax upload completion.
- (enh #137): Trigger new events -
filedisabled
and fileenabled
.
- (enh #136):Create new upload method that can be called externally.
- (enh #131): Allow empty values in extra data to be submitted.
version 4.1.5
Date: 12-Jan-2015
- (enh #121): Animate progress bars by default for upload progress.
- (bug #120): Correct multiple iterations of upload for async batch uploads.
- (enh #119): Enhance caption to include ellipsis for long file names
- (enh #116): Hide remove and upload buttons until unless file(s) are selected.
- (enh #115): Autosize file caption responsively on window resize.
- (bug #114): Prevent multiple file selection when using single file configuration.
- (bug #113): Icon layout template undefined when using user template.
- (bug #112): Fix undefined filestack for individual file upload within preview.
- (enh #108): Add nuget package.
- (enh #106): Enhance events for ajax requests and enable cancelling sync uploads
- (enh #105): Expose current jqXHR object on ajax events.
- (bug #104): Fix formdata not defined.
- (bug #100, #101): Set right params for error thrown during reading of files.
version 4.1.4
Date: 26-Dec-2014
- (bug #97): Reset events correctly with plugin refresh method.
- (bug #95): Correct event off for drag & drop in plugin refresh method.
- Code cleanup with reusable methods for event raising and outData generation.
- (enh #93): Better styling of file upload icon indicators in thumbnails.
- (enh #92): Realign event triggering timing for batch uploads to ensure outData is available.
- (enh #91): Pass FileReader instance with outData in events.
- (enh #90): New event
filebatchpreupload
for both synchronous and asynchronous batch uploads.
- (enh #89): New
otherActionButtons
to allow adding customized initial preview content actions.
- (enh #88): Allow uploadExtraData to be passed as a callback.
version 4.1.3
Date: 20-Dec-2014
- (enh #87): More correct progress indicator percentage for asynchronous upload.
filepreupload
fileuploaded
fileuploaderror
filebatchuploaderror
filebatchuploadsuccess
filebatchuploadcomplete
- (enh #86): Disable thumbnail action buttons when upload is in progress.
- (enh #85): Combine output data as a single object, that is sent for various file upload events.
version 4.1.2
Date: 19-Dec-2014
- (enh #81): Add new events:
filebatchuploadsuccess
filebatchuploadcomplete
- (enh #80): Allow access to
uploadExtraData
and responseData
to following events
filepreupload
fileuploaded
fileuploaderror
filebatchuploaderror
filebatchuploadsuccess
filebatchuploadcomplete
filelock
fileunlock
version 4.1.1
Date: 18-Dec-2014
- (bug #78): Set uploadExtraData parameters to be correctly sent via POST.
- (bug #76): Update filestack when
showPreview
is false.
- (enh #58): Set a new property
textEncoding
for reading the text files with right encoding.
version 4.1.0
Date: 17-Dec-2014
- (enh #75): Better validation of browser support for drag and drop.
- (enh #74): Enhancements to file validation errors for both FORM and AJAX uploads.
- For normal Form based uploads automatically disable the Upload button
- Display a separate error styled thumbnail for the file that faced the validation error.
- Reset errors correctly to overwrite files with a new change or drag/drop
version 4.0.0
Date: 14-Dec-2014
- (bug #72): Fix bootstrap ## version constraint.
- Renamed
initialDelimiter
to initialPreviewDelimiter
- (enh #70): Version 4.0 enhancements.
Version 4.0 Features
- Add functionality for AJAX based UPLOAD using HTML5 FormData (most modern browsers support it). Will degrade to normal Form Based File submission if this is not supported.
- To use AJAX Upload, the
uploadUrl
property is MANDATORY and must be set.
- Enhance plugin to now allow files to be added, appended, removed (based on FEEDBACK from many). Thus one can append files to preview.
- New DRAG & DROP zone available in preview to drag and drop files and append.
- Delete or upload files one by one OR in batch.
- If
showPreview
is set to false, or uploadUrl is not supported plugin will degrade to normal form based upload.
- Configurable indicators for file awaiting upload, file successfully uploaded, files errored in upload.
- Ability to add extra form data with ajax based uploads.
- Upload progress bar and individual thumbnail upload indicators.
- Ability to cancel and abort ongoing AJAX uploads.
- Templates have been revamped and enhanced for each file type.
- Ensure plugin is still lean in size and optimized for performance inspite of the above features by optimally utilizing HTML5 & jquery features only.
New properties added
showCancel
: shows a cancel button for aborting ajax uploads (defaults to true
).
cancelLabel
: label for the cancel button.
cancelTitle
: title for the cancel button on hover.
cancelIcon
: icon markup for the cancel button
cancelClass
: CSS class for the cancel button.
removeTitle
: title for the remove button on hover.
uploadTitle
: title for the upload button on hover.
uploadUrl
: the url that will be used to process AJAX based uploads (using FormData XHR2).
uploadExtraData
: extra data that will be passed as data to the url/AJAX server call via POST
uploadAsync
: whether the batch upload of multiple files will be asynchronous/in parallel. Defaults to true
.
initialPreviewShowDelete
: shows a delete button for each initial preview content's thumbnail (defaults to true
).
initialPreviewConfig
: configuration for setting up each initialPreviewContent
item (associative array/object)
caption
: The caption or filename to display for each initial preview item content.
width
: The CSS width of the image/content displayed.
url
: The URL for deleting the image/content via AJAX (shown only for initialPreviewContent
).
key
: The key that will be passed to the URL via POST (shown only for initialPreviewContent
).
dropZoneEnabled
: Enable a drag and drop zone for dragging files and is available only for ajax based uploads (defaults to true
).
dropZoneTitle
: Title to be displayed in the drag & drop zone.
dropZoneTitleClass
: CSS class for the drag & drop zone title.
fileActionSettings
: configuration for setting up actions for newly selected file thumbnails in the preview (associative array/object)
removeIcon
: icon for remove button to be displayed in each file thumbnail.
removeClass
: CSS class for the remove button in each file thumbnail.
removeTitle
: title for remove button in each file thumbnail.
uploadIcon
: icon for upload button to be displayed in each file thumbnail.
uploadClass
: CSS class for the remove button in each file thumbnail.
uploadTitle
: title for remove button in each file thumbnail.
indicatorNew
: an indicator (HTML markup) for new pending upload displayed in each file thumbnail.
indicatorSuccess
: an indicator (HTML markup) for successful upload displayed in each file thumbnail.
indicatorError
: an indicator (HTML markup) for error in upload displayed in each file thumbnail.
indicatorLoading
: an indicator (HTML markup) for ongoing upload displayed in each file thumbnail.
indicatorNewTitle
: title to display on hover of indicator for new pending upload in each file thumbnail.
indicatorSuccessTitle
: title to display on hover of indicator for successful in each file thumbnail.
indicatorErrorTitle
: title to display on hover of indicator for error in upload in each file thumbnail.
indicatorLoadingTitle
: title to display on hover of indicator for ongoing upload in each file thumbnail.
version 3.0.0
Date: 08-Dec-2014
- (bug #68): Fix refresh method of the fileinput to trigger change correctly.
- (enh #67): Enhance support for IE browsers
- Add specific validations for parsing IE versions rightly
- Enhance plugin to extend styling support to IE 9 (with the limitation that IE 9 does not support HTML 5 features like multiple file upload)
- Fix clearing of file input rightly for IE 9 & IE 10
- Degrade plugin automatically to a native file input for older IE versions
- Prevent change method firing twice when file is cleared after error is encountered in IE 11.
- (enh #65): Correct validation of
refreshPreview
using updateFileDetails
.
- (enh #64): Add ability to override the slug method with a
slugCallback
property.
- (bug #61): Refresh preview to show errors correctly after each file is validated.
- (enh #60): Enhance upload button for disable/enable when used with
<a>
tag.
version 2.9.0
Date: 23-Nov-2014
- (enh #56): Trigger new events
filebrowse
and fileselectnone
.
- (enh #55): Clear the files when file browse dialog is cancelled only if the browser clears the native file input.
- (enh #53): Validations and events for right reset of files when browse button is clicked.
version 2.8.0
Date: 13-Nov-2014
- (enh #52): Raise new
fileimageloaded
event.
- (enh #51): Autosize preview images when they exceed the size of the preview container.
- (enh #50): Dynamically auto size file captions for long file names exceeding container width. New property
autoFitCaption
is added which defaults to true
. When this is true
the plugin will auto fit caption text within the container dynamically
and responsively based on window size.
version 2.7.0
Date: 11-Nov-2014
- (enh #49): Set image preview dimensions to auto fit and center
- (enh #48): Trigger
fileloaded
event when showPreview
is false
.
- Set release to stable in composer.json.
version 2.6.0
Date: 15-Oct-2014
- (bug #44): Browser IE10 hangs on file clear.
- (bug #43): Validate special characters in filename before generating caption.
- (enh #42): Enhance plugin to configure the
elErrorContainer
for displaying validation errors.
- Templatize errorContainer for display within the preview window.
- (bug #40): More correct fix for IE (ver < 11) inability to clear fileinput values.
version 2.5.0
Date: 09-Oct-2014
- (bug #40): Fix IE (ver < 11) inability to clear fileinput values.
- (bug #39): HTML encode caption hover title.
- (enh #38): Highlight error CSS in file caption on validation error.
- (bug #37): HTML encode text content for preview in modal.
- (enh #36): New feature. Validation routine for checking allowed file types and extensions.
version 2.4.0
Date: 20-Sep-2014
- (enh #33): Better text format validation and correct modal preview.
- (enh #32): Added checks for file api support.
- (enh #31): Better control and configuration of preview templates.
- (enh #30): Enhanced generic support for more preview formats (audio, video, html, flash, and other objects).
Note: There are BC Breaking Changes with release v2.4.0.
With release v2.4.0, the plugin has been revamped to support and configure a wide variety of file formats for preview. This may break some
backward compatibility (BC) for older versions that use custom templates.
The following are the major changes with release v2.4.0:
- Plugin has been revamped to build preview intelligence based on various file preview types. The inbuilt file support types are categorized as
image
, text
, html
, video
, audio
, flash
, object
, and other
.
allowedPreviewTypes
: You can now configure which all file types are allowed to be shown as a preview. This defaults to ['image', 'html', 'text', 'video', 'audio', 'flash', 'object']
.
Thus all file types are treated as an object to preview by default. For exampleTo preview only image
and video
, you can set this to ['image', 'video']
.
allowedPreviewMimeTypes
: In addition to allowedPreviewTypes
, you can also control which all mime types can be displayed for preview. This defaults to null,
meaning all mime types are supported.
layoutTemplates
: Allows you to configure all layout template settings within one property. The layout objects that can be configured are: main1
, main2
,
preview
, caption
, and modal
.
previewTemplates
: All preview templates for each preview type have been combined into one property, instead of separate templates for image, text etc.
The keys are the formats as set in allowedPreviewTypes
and values are the templates used for previewing. There are default prebuilt templates for each
preview file type (generic
, image
, text
, html
, video
, audio
, flash
, object
, and other
). The generic
template is used only for displaying
initialPreview
content using direct markup.
previewSettings
: Allows you to configure width and height for each preview image type. The plugin has default widths and heights predefined for each type i.e
image
, text
, html
, video
, audio
, flash
, and object
.
fileTypeSettings
: Allows you to configure and identify each preview file type using a callback. The plugin has default callbacks predefined to identify each type i.e
image
, text
, html
, video
, audio
, flash
, and object
.
- Replacing tags within templates has been enhanced. With this release it will automatically check for multiple occurrences of each tag to replace within a template string.
NOTE: Flash preview will require Shockwave flash to be installed and supported by the client browser. The flash preview currently works successfully with webkit browsers only. Video & Audio formats are however supported by all modern browsers
that support the HTML5 video
/audio
tags. Note that browsers have limited number of video/audio formats supported by the HTML5 video element (e.g. mp4, webm, ogg, mp3, wav). The size of video files are recommended to be small (to be controlled
through maxFileSize
property) so that it does not affect the preview performance. You can copy a few files from the examples
directory of this plugin repo, to test a few examples of flash and video files.
version 2.3.0
Date: 19-Sep-2014
- Better replacement of tags in templates. Replaces all tag occurences with this new release.
- (enh #28, #29): Added support for previewing flash and video files.
version 2.2.0
Date: 19-Aug-2014
- (enh #25): Graceful degrade to normal file input for older browsers (including previous versions of Safari).
- (enh #24): Update readAsBinaryString to readAsArrayBuffer
version 2.1.0
Date: 11-Aug-2014
- Other minor bug fixes.
- (enh #22): Enhance file caption message display for validation errors.
- (enh #21): Enhance loading progress message and message templates for multiple file uploads.
- (enh #21): Enhance multiple file upload and preview performance using setTimeout.
- (enh #20): Fix
fileloaded
event to increment previewId
and enhance to return file index.
- (enh #19): Synchronize preview with file browse dialog behavior, when cancel button is pressed in file dialog window.
- (enh #18): Better validation for older browsers (not supporting HTML5) to degrade to normal file input.
- Enhanced plugin to improve browser performance when loading and previewing multiple image files.
- New configurable error messages added:
msgFilesTooMany
, msgFileNotFound
, msgFileNotReadable
, msgFilePreviewAborted
, and msgFilePreviewError
.
- New configuration property added:
maxFilesCount
. Defaults to 0
which means unlimited.
- (enh #16, #17): Added exception handling for trapping FileReader API errors
version 2.0.0
Date: 25-Jul-2014
- Added delimiter option for
initialPreview
to pass multiple content delimited as a string.

- Correct calculation of files selected when
initPreview
is false.
- Make caption text configurable through a new parameter
msgSelected
.
- Enhanced configurable templates for previewing image, text, and other files (and a generic template).
- New plugin methods added:
disable
, enable
- New plugin events added:
fileerror
, fileloaded
, filecleared
.
- (enh #15): Enhanced validation of file size through
maxFileSize
configuration.
- (enh #12, #13, #14): Various enhancements and fixes.
version 1.9.0
Date: 21-Jul-2014
- (enh #10): Ability to display initial caption, when initialPreview is false.
- (enh #9): Enhanced caption template and styling for captions to prevent overflow of long file names out of the caption container.
version 1.8.0
Date: 15-Jul-2014
- (enh #9): Enhanced caption template and styling for captions to prevent overflow of long file names out of the caption container.
version 1.7.0
Date: 02-Jul-2014
- The plugin now offers an additional
overwriteInitial
option. This is by default set to true
, whereby, any initialPreview
content set will be overwritten, when new file is uploaded or when files are cleared. Setting it to false
will help displaying
a saved image or file from database always - useful especially when using the multiple
file upload feature.
version 1.6.0
Date: 03-Jun-2014
- The plugin now offers an additional
refresh
method. This enables you to dynamically change element attributes or plugin options
at runtime and refresh the widget.
version 1.5.0
Date: 23-May-2014
- The plugin now offers an option to display initial preview of images/text/other files. This is useful
for record update scenarios. This can be a single image/file or an array of images/files.
- Extending to the above feature, the plugin also allows you to set a preview caption for the initial preview field.
- The following element identifiers need to be passed as a string like '#id' instead of a JQuery object:
- elCaptionContainer
- elCaptionText
- elPreviewContainer
- elPreviewImage
- elPreviewStatus
version 1.0.0
Date: 01-Jan-2014
Initial release. The following features are included in this release:
- The plugin will convert a simple HTML file input to an advanced file picker control. Will help fallback to a file input for browsers not supporting JQuery or Javascript.
- The file input consists of the following three sections with options and templates to control the display:
- file caption section: to display a brief information of the file(s) selected
- file action buttons section: to browse, remove, and upload files.
- file preview section: to display the selected files on client for preview (supports images and text file types). Other file types will be displayed as normal thumbnails.
- The plugin automatically converts an input with
type = file
to an advanced file picker input if you set its class = file
. All options to the input can be passed as HTML5 data
attributes.
- Ability to select and preview multiple files. Uses HTML 5 File reader API to read and preview files. Displays the progress of files being being loaded onto the preview zone, in case many files are chosen.
- Offers predefined templates and CSS classes which can be changed to style your file-input display as per your needs.
- Option to show/hide any or all of the following:
- caption section
- preview section
- upload button
- remove button
- Customise the location of the target container elements to display the entire plugin, the caption container, the caption text, the preview container, preview image, and preview status.
- For text file previews, autowrap the text to the thumbnail width, and show a wrap indicator link to display complete text on hover. You can customize the wrap indicator (which defaults to …).
- Customise the messages for preview, progress, and files selected.
- Upload action defaults to form submit. Supports an upload route/server action parameter for custom ajax based upload.
- Triggers JQuery events for advanced development. Events currently available are
filereset
and fileclear
.
- Disabled and readonly file input support.
- Size of the entire plugin is less than 11KB (about 9KB for the minified JS and 2KB for the minified CSS).


You must discover the “mystery location” and take a picture of your bike there. Then you must bike to a new "mystery location" of your choosing and take a picture of your bike there. Submit both pictures to the TAG IT! section. NOTE: you may not "reserve" being "IT" by immediately posting a photo of your bike in the old "mystery location" before finding and posting a picture of the new "mystery location."
Mystery locations must be freely accessible to the public and by bicycle. Mystery locations should be unique/interesting/identifiable. Tags that include only nondescript features (blank walls) are not acceptable and will be removed. Mystery locations may not be mobile objects (food trucks, for example). Discovered mystery locations and new mystery locations must be tagged with the same bicycle, on the same ride. Pictures of discovered mystery locations and new mystery locations must be posted at the same time.


The Supreme Council for the Rights of Persons with Disabilities
The Supreme Council for the Rights of Persons with Disabilities The
Supreme Council for the Rights of Persons with Disabilities was
established under the Rights of Persons with Disabilities Law No. 31
of 2007 under the name (The Supreme Council for the Affairs of Persons
with Disabilities) as a public institution headed by His Highness
Prince Raad bin Zaid, and under the presidency of His Highness Prince
Mired bin Raad bin Zaid, the Rights of Persons with Disabilities Law
was issued No. 20 of 2017, according to which the name of the Council
was amended to become the Supreme Council for Rights
The Supreme Council for the Rights of Persons with Disabilities(link)
Location :
Shmeisani-Building No.26
Phone: +962 6 5538610
Fax: +962 6 5538243
Blind Academy
Blind Academy - Abdullah Ibn Umm Maktoum School The Academy of the
Blind was established in 2011 as a royal initiative, and it is the
only academy in Jordan that deals with students with visual impairment
from different regions of the Kingdom.
Blind Academy
Location
Istiklal Street -next to the Ministry of Social Development.
Phone: 064656228 - 064615665
Fax Number: P.O. Box: 7063 Amman 11118 Jordan
Saudi Center for Rehabilitation and Training of Blind Women in Jordan
Saudi Center for Rehabilitation and Training of Blind Women in Jordan
Rehabilitation and training of blind women from the Arab world to
Egypt Each training department produces, markets and sells the work of
its students. Training courses are:
- Woolknitting
- Handmade arts
- Hand loom
Application link
Location
Amman Jordan
TEL : (06) 581 7904
Diaa Charitable Association for the upbringing and education of
visually impaired children
Foundation Year: 1996 Goals: Diagnose, educate, rehabilitate, train
and care for persons with disabilities (visually). And provide
physical therapy, speech training, and occupational therapy for them,
and provide transportation and assistance, and integrate them.
Email
Location
Address: Umm Nawara-near Queen Rania Park
Telephone number: 06 5821762
Fax: 5821762 06


Alert
Import API request as JSON
Paste your API request in Svatah JSON format
Export API request as JSON
Content type
Accept all certificates
Follow redirects
| Header Key | Header Value | |
|---|---|---|
Please define/change all the headers key and value accordingly in the header table.


This is a website that allows users to post ideas for projects, products, or charitable acts, and to request funding.
Created by Yulia and Olya


|
MC_HAMR
v0.01
Monte Carlo Simulation Software for Atomistic Models of Magnetic Materials for Heat Assisted Magnetic Recording
|
#include <hamiltonian.hpp>
Public Member Functions | |
| ham_ising () | |
| ham_ising (double Hin, double Jin) | |
| ham_ising (ham_type &other) | |
| ~ham_ising () | |
| double | calc_E (field_type *lattice) |
| std::vector< double > | calc_M (field_type *lattice) |
| std::vector< double > | calc_subM (field_type *lattice, int subnumber) |
| double | dE (field_type *lattice, std::vector< int > &position) |
| double | get_J () const |
| double | get_H () const |
| ham_ising & | operator= (ham_type &other) |
| void | init_dim (field_type *field) |
| void | set_H (double Hin) |
| Public Member Functions inherited from ham_type | |
| virtual std::vector< double > | get_Js () const |
| virtual std::vector< double > | get_Hs () const |
| virtual double | get_K () const |
| virtual void | get_test (double &x, double &y, double &z) |
| virtual std::vector< double > | calc_top_charge (field_type *lattice) |
Additional Inherited Members | |
| Protected Attributes inherited from ham_type | |
| int | dim |
|
inline |
|
inline |
| ham_ising::ham_ising | ( | ham_type & | other | ) |
|
inline |
|
virtual |
Reimplemented from ham_type.
|
virtual |
Reimplemented from ham_type.
|
virtual |
Reimplemented from ham_type.
|
virtual |
Reimplemented from ham_type.
|
inlinevirtual |
Reimplemented from ham_type.
|
inlinevirtual |
Reimplemented from ham_type.
|
virtual |
Reimplemented from ham_type.
|
inlinevirtual |
Reimplemented from ham_type.


John McDonnell: Conservative manifesto of bluster shows Tories are out of ideas
Shadow Chancellor John McDonnell says the Tory manifesto showed the Conservatives are a party of no-hopers promising five more years of the same. Where is the solution for social care and Universal Credit?
by John McDonnell, https://www.mirror.co.uk/authors/jMcdonnell/You can see now why Boris Johnson pulled out of facing Jeremy Corbyn in another debate.

There can’t be any doubt now that the Conservatives have completely run out of ideas.
There’s no recognition of what they’ve put this country through for nearly a decade.
If the Conservatives win they’re now promising five more years of the same.
There’s nothing about preparing for the future, tackling the climate and environmental emergency with the urgency it needs.
No new money for care for older people, despite all the promises.
Nothing more for our schools, after years of cuts.
Nothing for the public sector workers after years of pay rises below inflation.
Nothing to stop the brutal roll-out of Universal Credit.
And – of course – a Brexit deal that would serve up our NHS as a Christmas present for American health corporations.
It couldn’t be further from Labour’s manifesto last week, which was full of ideas to turn the economy and the country round.
We’ll get big oil companies to pay for the retraining and well-paid jobs that workers in those industries will need.
We’ll deliver free personal care for everyone over 65 who needs it.
We’ll deliver justice for the women who lost out when the Tories and Liberals took their pensions.
We’ll pay £26billion into the NHS and £25billion more for schools, while the Tories will never sort out our public services or create the well-paid jobs we need because they won’t take on the super rich and tax dodgers.
They hope we’re all stupid, thinking just about Brexit, not the next five years.
The people of Britain deserve more than the Tories' negative campaigning and vacuous political slogans.
The choice couldn’t be clearer: real change with Labour, or more of the same grim Conservative cuts.


Details¶
Below are the details of author and license of the this package.
Software¶
| Author: | Anirban Roy Das |
|---|---|
| Email: |<EMAIL_ADDRESS>|
| Copyright(C): | 2016, Anirban Roy Das<EMAIL_ADDRESS>|
License¶
The MIT License (MIT)
sphinxSimDoc - Collection of simple docs created by Sphinx.
Copyright (c) 2016 Anirban Roy Das<EMAIL_ADDRESS>Permission is hereby granted, free of charge, to any person obtaining a copy ofthis software and associated documentation files (the “Software”), to deal inthe Software without restriction, including without limitation the rights touse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies ofthe Software, and to permit persons to whom the Software is furnished to do so,subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANT ABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHERIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Table of Contents
Geometry and Lin-Alg [Hyper-Planes]
-
- Minimum Distance from a point to a hyperplane/Affine-set?
- \[d = \dfrac{\| w \cdot x_0 + b \|}{\|w\|},\]
- where we have an n-dimensional hyperplane: \(w \cdot x + b = 0\) and a point \(x_0\).
Also known as, The Signed Distance.
- Proof.
- Suppose we have an affine hyperplane defined by \(w \cdot x + b\) and a point \(x_0\).
- Suppose that \(\vec{v} \in \mathbf{R}^n\) is a point satisfying \(w \cdot \vec{v} + b = 0\), i.e. it is a point on the plane.
-
We construct the vector \(x_0−\vec{v}\) which points from \(\vec{v}\) to \(x_0\), and then, project it onto the unique vector perpendicular to the plane, i.e. \(w\),
\[d=\| \text{proj}_{w} (x_0-\vec{v})\| = \left\| \frac{(x_0-\vec{v})\cdot w}{w \cdot w} w \right\| = \|x_0 \cdot w - \vec{v} \cdot w\|\frac{\|w\|}{\|w\|^2} = \frac{\|x_0 \cdot w - \vec{v} \cdot w\|}{\|w\|}.\] -
We chose \(\vec{v}\) such that \(w\cdot \vec{v}=-b\) so we get
\[d=\| \text{proj}_{w} (x_0-\vec{v})\| = \frac{\|x_0 \cdot w +b\|}{\|w\|}\]
- Every symmetric positive semi-definite matrix is a covariance matrix:
- Proof.
-
Suppose \(M\) is a \((p\times p)\) positive-semidefinite matrix.
-
From the finite-dimensional case of the spectral theorem, it follows that \(M\) has a nonnegative symmetric square root, that can be denoted by \(M^{1/2}\).
-
Let \({\displaystyle \mathbf {X} }\) be any \((p\times 1)\) column vector-valued random variable whose covariance matrix is the \((p\times p)\) identity matrix.
-
Then,
\[{\displaystyle \operatorname {var} (\mathbf {M} ^{1/2}\mathbf {X} )=\mathbf {M} ^{1/2}(\operatorname {var} (\mathbf {X} ))\mathbf {M} ^{1/2}=\mathbf {M} \,}\]
-
- Proof.
Statistics
-
Asynchronous: \
-
Every symmetric positive semi-definite matrix is a covariance matrix:
- Proof.
-
Suppose \(M\) is a \((p\times p)\) positive-semidefinite matrix.
-
From the finite-dimensional case of the spectral theorem, it follows that \(M\) has a nonnegative symmetric square root, that can be denoted by \(M^{1/2}\).
-
Let \({\displaystyle \mathbf {X} }\) be any \((p\times 1)\) column vector-valued random variable whose covariance matrix is the \((p\times p)\) identity matrix.
-
Then,
\[{\displaystyle \operatorname {var} (\mathbf {M} ^{1/2}\mathbf {X} )=\mathbf {M} ^{1/2}(\operatorname {var} (\mathbf {X} ))\mathbf {M} ^{1/2}=\mathbf {M} \,}\]
-
- Proof.
Inner Products Over Balls
-
- Extrema of inner product over a ball:
- Let \(y \in \mathbf{R}^n\) be a given non-null vector, and let \(\chi = \left\{x \in \mathbf{R}^n :\ \|x\|_2 \leq r\right\}\),
where \(r\) is some given positive number.
- Determine the optimal value \(p_1^\ast\) and the optimal set of the problem \(\min_{x \in \chi} \; |y^Tx|\):
The minimum value of \(\min_{x \in \chi} \; |y^Tx|\) is \(p_1^\ast = 0\).
This value is attained either by \(x = 0\), or by any vector \(x\in\chi_r\) orthogonal to \(y\).
The optimal set: \(\chi_{opt} = \left\{x : \ x = Vz, \|z\|_2 \leq r\right\}\) - Determine the optimal value \(p_2^\ast\) and the optimal set of the problem \(\max_{x\in \chi} \; |y^Tx|:\)
The optimal value of \(\max_{x\in \chi} \; |y^Tx|\) is attained for any \(x = \alpha y\) with \(\|x\|_2 = r\).
Thus for \(|\alpha| = \dfrac{r}{\|y\|_2}\), for which we have \(p_2^\ast∗ = r\|y\|_2.\)
The optimal set contains two points: \(\chi_{opt} = \left\{x : \ x = \alpha y, \alpha = ± \dfrac{r}{\|y\|_2} \right\}\). -
Determine the optimal value \(p_3^\ast\) and the optimal set of the problem \(\min_{x\in \chi} \; y^Tx\):
We have \(p_3^\ast = −r\|y\|_2,\) which is attained at the unique optimal poin
\(x^\ast = −\dfrac{r}{\|y\|_2} y.\) - Determine the optimal value \(p_4^\ast\) and the optimal set of the problem \(\max_{x\in\chi} \; y^Tx\):
We have \(p_4^\ast = r \|y\|_2,\) which is attained at the unique optimal point
\(x^\ast = \dfrac{r}{\|y\|_2} y.\)
Gradients and Derivatives
-
- Gradient of log-sum-exp function:
- Find the gradient at \(x\) of the function \(lse : \ \mathbf{R}^n \rightarrow \mathbf{R}\) defined as,
- \[lse(x) = \log{(\sum_{i=1}^n e^{x_i})}.\]


AUGUST 21
FIRST
A reading from the first letter of St Paul to the Thessalonians 2:2-8
Brethren: We had courage in our God to declare to you the gospel of God
in the face of great opposition. For our appeal does not spring from error or
uncleanness, nor is it made with guile; but just as we have been approved by
God to be entrusted with the gospel, so we speak, not to please men, but to
please God who tests our hearts. For we never used either words of flattery, as
you know, or a cloak for greed, as God is witness; nor did we seek glory from
men, whether from you or from others, though we might have made demands as
apostles of Christ. But we were gentle among you, like a nurse taking care of
her children. So, being affectionately desirous of you, we were ready to share
with you not only the gospel of God but also our own selves, because you had
become very dear to us.
The word of the Lord.
RESPONSORIAL PSALM Ps 89
ALLELUIA John 10:14
R. Alleluia. I
am the good shepherd, says the Lord; I know my own, and my own know me. R. Alleluia.
GOSPEL John 21:15-17
A reading from the holy Gospel according to John
When [Jesus had revealed himself to his disciples and] they had finished
breakfast, Jesus said to Simon Peter, "Simon, son of John, do you love me
more than these?" He said to him, "Yes, Lord; you know that I love
you." He said to him, "Feed my lambs." A second time he said to
him, "Simon, son of John, do you love me?" He said to him, "Yes,
Lord; you know that I love you." He said to him, "Tend my
sheep." He said to him the third time, "Simon, son of John, do you
love me?" Peter was grieved because he said to him the third time,
"Do you love me?" And he said to him, "Lord, you know
everything; you know that I love you." Jesus said to him, "Feed my
sheep.
The Gospel of the Lord.


| coord_flip {ggplot2} | R Documentation |
Flip cartesian coordinates so that horizontal becomes vertical, and vertical, horizontal. This is primarily useful for converting geoms and statistics which display y conditional on x, to x conditional on y.
coord_flip(xlim = NULL, ylim = NULL, expand = TRUE, clip = "on")
xlim |
Limits for the x and y axes. |
ylim |
Limits for the x and y axes. |
expand |
If |
clip |
Should drawing be clipped to the extent of the plot panel? A
setting of |
# Very useful for creating boxplots, and other interval # geoms in the horizontal instead of vertical position. ggplot(diamonds, aes(cut, price)) + geom_boxplot() + coord_flip() h <- ggplot(diamonds, aes(carat)) + geom_histogram() h h + coord_flip() h + coord_flip() + scale_x_reverse() # You can also use it to flip line and area plots: df <- data.frame(x = 1:5, y = (1:5) ^ 2) ggplot(df, aes(x, y)) + geom_area() last_plot() + coord_flip()


Backend web developer, DevOps Engineer
[Ongoing]
Backend web developer
[2016.Oct - 2017.Jan]
Full stack web developer
[2012.Sep - 2013.May]
LBS Android APP developer
[2009.Sep - 2010.June]


No setup costs! You don't need any hardware; just a screen and an internet connection.
We take 7% of every order placed via waitr.
No win, no fee. If your customers don't use waitr to order, we won't charge you.
Increase your Avg. Transaction Value. Customers spend more when they can place their order with just a few taps.
Reduce staff costs and free up your waiters to really look after your customers.
Turn tables faster. Customers don't need to wait for your waiters to take their orders or payment.
Personalise your outreach. Send emails to customers based on their previous orders.
Upload your menu (or call us and we'll do it for you).
Securely provide your bank account details (we use Stripe)
Open the Kitchen page, and wait for orders to arrive.
Easily accept or reject them; cook, prepare, and bring your happy customers their food!
Find your favourite restaurant.
Browse the menu, place your order and pay.
Sit back and relax. Keep an eye on your phone for real-time updates to your order's status.
Oliver Salisbury
Taking care of all things business. Get me at<EMAIL_ADDRESS>Callum Messiter
Taking care of all things tech. Get me at<EMAIL_ADDRESS>If you have any questions, or you need help with setup, just give us a call or shoot us an email. We'll be there.


%%app_date_format%%
January
February
March
April
May
June
July
August
September
October
November
December
Sun
Mon
Tue
Wed
Thu
Fri
Sat


Empirical statistical analysis, visualization and simulation of diffusion and contagion processes on networks. The package implements algorithms for calculating network diffusion statistics such as transmission rate, hazard rates, exposure models, network threshold levels, infectiousness (contagion), and susceptibility. The package is inspired by work published in Valente, et al., (2015) <doi:10.1016/j.socscimed.2015.10.001>; Valente (1995) <ISBN:<PHONE_NUMBER>213>, Myers (2000) <doi:10.1086/303110>, Iyengar and others (2011) <doi:10.1287/mksc.1100.0566>, Burt (1987) <doi:10.1086/228667>; among others.
| Version: | 1.20.0 |
| Depends: | R (≥ 3.1.1) |
| Imports: | Rcpp (≥ 0.12.1), sna, network, networkDynamic, Matrix, MASS, MatchIt, SparseM, methods, grDevices, graphics, stats, utils, boot, igraph, viridis |
| LinkingTo: | Rcpp, RcppArmadillo |
| Suggests: | covr, testthat, knitr, ape, RSiena, survival |
| Published: | 2018-06-07 |
| Author: | George Vega Yon [aut, cre] (Rewrite functions with Rcpp, plus new features), Stephanie Dyal [ctb] (Package's first version), Timothy Hayes [ctb] (Package's first version), Thomas Valente [aut, cph] (R original code) |
| Maintainer: | George Vega Yon <g.vegayon at gmail.com> |
| BugReports: | https://github.com/USCCANA/netdiffuseR/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/USCCANA/netdiffuseR |
| NeedsCompilation: | yes |
| Classification/MSC: | 90C35, 90B18, 91D30 |
| Citation: | netdiffuseR citation info |
| Materials: | NEWS ChangeLog |
| CRAN checks: | netdiffuseR results |
| Reference manual: | netdiffuseR.pdf |
| Vignettes: |
netdiffuseR showcase: Medical Innovations Simulating diffusion networks: Using the 'rdiffnet' function Not-Lost in translation: Importing and exporting graph Time Discounted Infection and Susceptibility |
| Package source: | netdiffuseR_1.20.0.tar.gz |
| Windows binaries: | r-devel: netdiffuseR_1.20.0.zip, r-release: netdiffuseR_1.20.0.zip, r-oldrel: netdiffuseR_1.20.0.zip |
| OS X binaries: | r-release: netdiffuseR_1.20.0.tgz, r-oldrel: netdiffuseR_1.20.0.tgz |
| Old sources: | netdiffuseR archive |
Please use the canonical form https://CRAN.R-project.org/package=netdiffuseR to link to this page.


ice sea Greenland Fig. changes climate core abrupt simulations temperature change events values warming {border-style salt simulated Atlantic precipitation px;} #ffffff;} North geographical stadial Appendix, cores glacial coefficients event variability coefficient paleothermometer vs. Geophys larger Res flux forcing using NGRIP O–temperature Sime model range significant used DO-type DYE equivalent global shown Clim approach circulation data events. mean modeled pattern records suite surface water Arctic GISP Kelvin central interstadial isotope px; salinity seasonality sites size stadial-type {font-family However, Ice NEEM Nature Sci Table accumulation applied font-size freshwater increase measurements negative ocean past period relationship set similar Climate Greenland, Valdes calculate compared double; impact increases isotopic large largest magnitude observed response seasonal simulation (NERC) (i.e., Antarctic Battisti Council Dansgaard-Oeschger Dansgaard–Oeschger Environment GCM Hopcroft Lett Louise Materials Methods Natural Note Peter Research Rev Sea Tindall United bold border-color border-width calculated changes. coupled different events, explained fluxes indicates individual initial interglacial isotopes key loss moisture north occur record recorded results rises run simulations. smaller solid; understanding {font-style {font-weight (or Abrupt Change, GRIP, Greenland. Here, Jouzel L.C.S. Model NGRIP, Panel Past Quat RCUK area article associated atmospheric climates collab: control courier; dependent em; general gradients imprint interpretation model, new northern oscillation oscillations patterns present pt;} rate ref. region relationships relative rest shows sites. small somewhat south spin-up stadial–interstadial strong switch temperature, warmings


view data extracted from RDFa markup
view data extracted from microdata markup
view data as JSON-LD
{{ helprequest.title }}
{{ helprequest.author.name }}
{{ helprequest.date }}
Content
{{helprequest.note_content}}
all help requests


| DOSE: |
1 hit |
smoked |
DMT |
(powder / crystals) |
At first I saw frowning faces. I saw these when I looked to the right. It was a very symetrical, fractal image. Then I would look to the left and could see smiling faces, and everything was the opposite of the right side of my vision. The faces were good...and they were bad. They looked at me and asked me to choose. They were two opposite images that met in the middle and merged. I knew that it wasn't just images, something was showing me the duality of nature. It was like there were two true things and that both were the perfect opposite of each other. They each said, 'the other is a lie', and they were both right. It was paradox. I felt that I was supposed to try to discern which was true, (later on I wondered if I was supposed to be able to accept that things were this way, that maybe nothing was true).
I got stuck in the paradox and was infinitely looking left, right, left, right. I kind of screamed inside my head that I didn't, couldn't, possibly know, and that I wanted to return to my room, to my space and time. I could vaguely hear my dog barking on the porch, so I knew that I was alive still. But something (me? the universe?) was like 'Look, back there and here are the same, things are just a lot more clear here. You have always been here; the other is just a representation of this. You will have to solve this puzzle someday. Things are reaching the end and if you aren't careful with what you choose, you'll get stuck here, in the paradox. You asked to come here, so help me answer the question.' It was like the universe itself didn't know what to make of the paradox, so it was asking me. It kept saying, 'Do you see? Do you see why life is the way it is? Do you see now why you can't know everything...because it is unknowable?'
I was terrified because it felt familiar, like it was true that I had always been there. Like maybe the life Iíve been living was just my escape from that place. The other frightening part was that it (the universe? me? god?) was pleading with me. It was flabbergasted that I still couldnít make a choice. It was like it had ended the experiment too soon and I wasnít ready yet, or maybe never would be.
(By the way, while I was 'there', it felt like I was in a small room, buried in the middle of some huge labrynth that housed everything...deep underground.  There were other beings there. They didn't seem all-wise or anything. They seemed rather mischevious...but friendly)
Then it brought me further and further away from the problem until I could see that everything, everywhere was stuck in the paradox, and that life and the universe and everything was about trying to answer the question. It told me that the dual nature of life was shown to me a million times a day (heaven/hell, rich/poor, day/night, dark/light, good/bad, yin/yang, this/that) and that the particular experiment that I was a part of was an ancient one, and that it was nearing it's end. I begged to forget, to be allowed to return to where I was lost in the details and couldn't see the big picture. I promised that I would try to discern the answer. I promised that I knew that I was lucky to have an organic life, and I was lucky that the question was presented to me in such a simple way down here on earth.
When I returned, I was scared, shaking, thankful to be alive. I looked at my hand and I could see through it. Everything I looked at had extra layers to it. I talked aloud and promised that I wouldn't forget, that I would help to decide...that I would tip the scales. The human (trained?) part of me decided that Love Would Save The Day. But the truth is that I wasn't sure...I've already forgotten half of it, and I'm not too sure what I was supposed to get out of it. Am I supposed to be able to accept that life is this way? Or am I supposed to try to help life choose one side over the other so that the eternal question is finally answered?
Maybe that's what the big bang was, maybe the universe was sick of the question of 'this or that' and it decided to introduce time, and matter and things that would blur the question so that it was easier to answer. Maybe it wanted to break things down, maybe it hoped that if everything were smashed from the crystal clear paradox view, that when things reassembled at the end of time the question would be solvable, the choice would be easier. And in the mean time, the universe was giving itself a break. It was able to break itself up into a million different conscious entities and try to answer the question without realizing that what it was doing (without being aware of the question it was trying to answer) and without having to know the big picture.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.