KISS PACKAGE SYSTEM
________________________________________________________________________________
Packages are comprised of a directory and the series of files contained within.
The name of the package is derived from its directory name. The files which
comprise the system are as follows.
+------------------+----------+------------+----------+-------------+----------+
| File | Language | Executable | Comments | Blank lines | Required |
+------------------+----------+------------+----------+-------------+----------+
| | | | | | |
| build | Any | Yes [2] | N/A | N/A | Yes |
| checksums | DSL [3] | No | No | No | No [1] |
| depends | DSL [3] | No | Yes | Yes | No |
| sources | DSL [3] | No | Yes | Yes | No |
| version | DSL [3] | No | [4] | [4] | Yes |
| | | | | | |
| pre-remove | Any | Yes [2] | N/A | N/A | No |
| post-install | Any | Yes [2] | N/A | N/A | No |
| | | | | | |
+------------------+----------+------------+----------+-------------+----------+
Unless stated otherwise, all files marked DSL are a grid of cells split into
rows by newline and columns by whitespace.
[1] The checksums file is only required if the sources file contains sources
which exist as files on disk (directories, git repositories need not apply).
[2] The only requirement is that the file be executable. The file itself can be
written in any programming language.
[3] The file's format is a domain specific language with its own rules.
https://en.wikipedia.org/wiki/Domain-specific_language
[4] Tooling should only read the first line of the version file. Any lines
following should be ignored (allowing one to store arbitrary information).
[0.0] Index
________________________________________________________________________________
* build [1.0]
* checksums [2.0]
* depends [3.0]
* sources [4.0]
* version [5.0]
* pre-remove [6.0]
* post-install [7.0]
* Further reading [8.0]
[1.0] build
________________________________________________________________________________
The build file is executed in the directory containing the package's extracted
sources. Unlike other distributions, a 'cd' is not needed as sources have their
top-level directory components stripped away.
The build file is given two arguments. The destination directory (where
artifacts should be installed) and the first field of the package's version
file (verbatim).
The build file is given a modified environment containing DESTDIR, KISS_ROOT,
GOPATH and generic defaults for toolchain variables (if unset by the user). The
toolchain defaults are as follows: AR=ar, CC=cc, CXX=c++, NM=nm, RANLIB=ranlib
+------------------------------------------------------------------------------+
| Example shell-based build file |
+------------------------------------------------------------------------------+
| |
| 1 #!/bin/sh -e |
| 2 |
| 3 # Disable stripping (use if needed). |
| 4 :> nostrip |
| 5 |
| 6 ./configure \ |
| 7 --prefix=/usr |
| 8 |
| 9 make |
| 10 make install |
| |
+------------------------------------------------------------------------------+
[2.0] checksums
________________________________________________________________________________
The checksums file is generated by the package manager (kiss c pkg) and is
derived from files listed in the package's sources file. Directories and Git
repositories are excluded.
Checksum verification can be disabled for a source by replacing its checksum
with 'SKIP' in the checksums file. The package manager will notify you when
this occurs.
+------------------------------------------------------------------------------+
| |
| 1 892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5 |
| 2 8a5b38a76b778da8d6f4236f1ea89e680daea971be6ee3a57e4e7ae99a883aa2 |
| 3 SKIP |
| |
+------------------------------------------------------------------------------+
[3.0] depends
________________________________________________________________________________
The depends file contains the package's dependencies listed one per line in
alphabetical order. Duplicate entries are not supported. The second optional
field denotes the dependency type (unset for runtime, 'make' for compile-time).
+------------------------------------------------------------------------------+
| |
| 1 alsa-lib |
| 2 meson make |
| 3 |
| 4 # This is a comment. |
| 5 wayland |
| 6 wayland-protocols make |
| |
+------------------------------------------------------------------------------+
[4.0] sources
________________________________________________________________________________
The sources file contains the package's sources one per line. A valid source is
a URL to a file, relative path, absolute path or Git repository. The optional
second field denotes the relative destination directory.
Git repositories must be prefixed with git+. An optional suffix is supported to
checkout a specific branch (@BRANCH) or commit (#COMMIT). All clones are shallow
where supported by the remote server. If no suffix is used, master is cloned.
+------------------------------------------------------------------------------+
| |
| 1 # This is a comment. |
| 2 https://www.openssl.org/source/openssl-VERSION.tar.gz |
| 3 https://causal.agency/libretls/libretls-3.3.3p1.tar.gz libretls |
| 4 |
| 5 files/update-certdata.sh |
| 6 git+https://github.com/kisslinux/kiss@dev |
| |
+------------------------------------------------------------------------------+
The following MARKERS can be used to substitute version information. These are
replaced at runtime with their respective values. Literal MARKERS can be escaped
by prepending a backslash.
+------------------------------------------------------------------------------+
| |
| VERSION The first field of the version file verbatim. |
| RELEASE The second field of the version file verbatim. |
| MAJOR The first component of VERSION split on .-_+ |
| MINOR The second component of VERSION split on .-_+ |
| PATCH The third component of VERSION split on .-_+ |
| IDENT All other components. |
| PACKAGE The name of the package. |
| |
+------------------------------------------------------------------------------+
[5.0] version
________________________________________________________________________________
The version file is a single line split into two mandatory fields. The first
field is the package's version and the second field the version of the
repository files themselves.
If the package follows its upstream release schedule, the first field should
match the upstream version number. If the source is a Git repository, the
version should be set to 'git'. If a specific git commit is used, the version
number should match accordingly.
+------------------------------------------------------------------------------+
| |
| 1 1.2.11 1 |
| |
+------------------------------------------------------------------------------+
[6.0] pre-remove
________________________________________________________________________________
The pre-remove file is executed before removal of the package. This file should
be used to perform any required pre-removal steps or to display notices.
+------------------------------------------------------------------------------+
| Example shell-based pre-remove file |
+------------------------------------------------------------------------------+
| |
| TODO: Example |
| |
+------------------------------------------------------------------------------+
[7.0] post-install
________________________________________________________________________________
The post-install file is executed after installation of the package. This file
should be used to perform any required post-install steps or to display notices.
+------------------------------------------------------------------------------+
| Example shell-based post-install file |
+------------------------------------------------------------------------------+
| |
| 1 #!/bin/sh -e |
| 2 |
| 3 cat <<EOF |
| 4 |
| 5 The commands zcat, unpigz and gunzip were merely symbolic |
| 6 links to the pigz binary. They have been removed. To gain |
| 7 them back, create the symlinks (or use an alias or shell |
| 8 function). |
| 9 |
| 10 EOF |
| |
+------------------------------------------------------------------------------+
[8.0] Further reading
________________________________________________________________________________
- @/package-manager
- $/kisslinux/kiss
________________________________________________________________________________
Dylan Araps (C) 2019-2021
The registered trademark Linux(R) is used pursuant to a sublicense from the
Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark
on a worldwide basis.


Warehouse Keeper Sorint:
Go and meet with the
Hunters Guild President Bernard
. Take this drawing with you. It is a picture of the Kaldis's Gold Dragon coin that I told you about. Find it and bring it to me. You will be amply rewarded!


 Textbooks typically give definitions, two standard examples (multinomial and multivariate normal) and then proceed to proving theorems and propositions. True, one dimensional distributions can be combined, but here as well the source of examples is also sparse, e.g. products of distributions or copulas (typically Gaussian or t-copulas) applied to these 1-d examples.
For machine learning experimentation, it is useful to have an unlimited supply of interesting fake data, where by interesting I mean that we know certain properties of the data and want to test if the algorithm can pick this up. A great potential source of such data is graphical models.
In the current release, we generate fake data with discrete Bayesian networks (also known as directed graphical models).
Installation¶
Install from pypi: pip install fake-data-for-learning
Note that the methods of utils.ProbabilityPolytope that use polytope calculatations to generate conditional probability tables subject to constraints on expectation value uses the non-pure-python library pypoman. See the installation instructions for external dependencies.
Links¶
Website: https://munichpavel.github.io/fake-data-for-learning
GitHub Repository: https://github.com/munichpavel/fake-data-for-learning


Stop!
Who would cross the bridge of death must answer me these questions three!
Ere the other side he see!
What is your name?
Previous Users
What is your quest?
What is the password to this room?


I'm A Celebrity's Vanessa White says she 'lost feeling in her legs' from hunger
Former I’m A Celebrity…Get Me Out Of Here star Vanessa White reportedly begged TV bosses for food after she lost the feeling in her legs from being so hungry.
Speaking at the Amazon’s Home of Black Friday launch event, the former Saturday’s singer revealed that she mainly struggled with hunger during her time in the jungle.
‘When I was on the show I lost the feeling in my legs because I was just so hungry,’ she began.
‘I begged the producers for food so they ended up giving me a Jelly Bean.’
Vanessa appeared on the show in 2017, and was the fourth celeb to be evicted from the jungle.
The former pop star’s most famous moment was during a Bushtucker trial with Corrie star Jenny McAlpine.
The duo took part in the task titled Car Cruel Karaoke, where they had to hold live critters in their mouths while humming a song that the other camper had to guess.
Advertisement Advertisement
Although shockingly, Vanessa wasn’t very good at it as she failed to guess a song by the Spice Girls.
The show also came under fire from viewers after they branded the trial cruel.
On this year’s I’m A Celeb the topic of conversation among the campmates has been centred around food – or the lack of it.
To be fair they haven’t faired too badly with the trials and they seem to be keeping their bellies relatively full.
Got a showbiz story?
If you've got a celebrity story, video or pictures get in touch with the Metro.co.uk entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


|
Guild Wars 2 - Elite Insights
2.25+
JSON doc
|
Base class for Players and NPCs More...
Properties | |
| string | Name [get] |
| Name of the actor More... | |
| uint | Condition [get] |
| Condition damage score More... | |
| uint | Concentration [get] |
| Concentration score More... | |
| uint | Healing [get] |
| Healing Power score More... | |
| uint | Toughness [get] |
| Toughness score More... | |
| uint | HitboxHeight [get] |
| Height of the hitbox More... | |
| uint | HitboxWidth [get] |
| Width of the hitbox More... | |
| ushort | InstanceID [get] |
| ID of the actor in the instance More... | |
| List< JsonMinions > | Minions [get] |
| List of minions More... | |
| JsonStatistics.JsonDPS [] | DpsAll [get] |
| Array of Total DPS stats Length == # of phases More... | |
| JsonStatistics.JsonGameplayStatsAll [] | StatsAll [get] |
| Stats against all Length == # of phases More... | |
| JsonStatistics.JsonDefensesAll [] | Defenses [get] |
| Defensive stats Length == # of phases More... | |
| List< JsonDamageDist > [] | TotalDamageDist [get] |
| Total Damage distribution array Length == # of phases More... | |
| List< JsonDamageDist > [] | TotalDamageTaken [get] |
| Damage taken array Length == # of phases More... | |
| List< JsonRotation > | Rotation [get] |
| Rotation data More... | |
| List< int > [] | Damage1S [get] |
| Array of int representing 1S damage points Length == # of phases More... | |
| List< int[]> | ConditionsStates [get] |
| Array of int[2] that represents the number of conditions status Value[i][0] will be the time, value[i][1] will be the number of conditions present from value[i][0] to value[i+1][0] If i corresponds to the last element that means the status did not change for the remainder of the fight More... | |
| List< int[]> | BoonsStates [get] |
| Array of int[2] that represents the number of boons status Value[i][0] will be the time, value[i][1] will be the number of boons present from value[i][0] to value[i+1][0] If i corresponds to the last element that means the status did not change for the remainder of the fight More... | |
| List< double[]> | HealthPercents [get] |
| Array of double[2] that represents the health status of the actor Value[i][0] will be the time, value[i][1] will be health % If i corresponds to the last element that means the health did not change for the remainder of the fight More... | |
Base class for Players and NPCs
Definition at line 14 of file JsonActor.cs.
|
get |
Array of int[2] that represents the number of boons status
Value[i][0] will be the time, value[i][1] will be the number of boons present from value[i][0] to value[i+1][0]
If i corresponds to the last element that means the status did not change for the remainder of the fight
Definition at line 110 of file JsonActor.cs.
|
get |
Concentration score
Definition at line 28 of file JsonActor.cs.
|
get |
Condition damage score
Definition at line 24 of file JsonActor.cs.
|
get |
Array of int[2] that represents the number of conditions status
Value[i][0] will be the time, value[i][1] will be the number of conditions present from value[i][0] to value[i+1][0]
If i corresponds to the last element that means the status did not change for the remainder of the fight
Definition at line 104 of file JsonActor.cs.
|
get |
Array of int representing 1S damage points
Length == # of phases
If the duration of the phase in seconds is non integer, the last point of this array will correspond to the last point
ex: duration === 15250ms, the array will have 17 elements [0, 1000,...,15000,15250]
Definition at line 98 of file JsonActor.cs.
|
get |
Defensive stats
Length == # of phases
Definition at line 72 of file JsonActor.cs.
|
get |
Array of Total DPS stats
Length == # of phases
Definition at line 60 of file JsonActor.cs.
|
get |
Healing Power score
Definition at line 32 of file JsonActor.cs.
|
get |
Array of double[2] that represents the health status of the actor
Value[i][0] will be the time, value[i][1] will be health %
If i corresponds to the last element that means the health did not change for the remainder of the fight
Definition at line 116 of file JsonActor.cs.
|
get |
Height of the hitbox
Definition at line 40 of file JsonActor.cs.
|
get |
Width of the hitbox
Definition at line 44 of file JsonActor.cs.
|
get |
ID of the actor in the instance
Definition at line 48 of file JsonActor.cs.
|
get |
|
get |
Name of the actor
Definition at line 20 of file JsonActor.cs.
|
get |
|
get |
Stats against all
Length == # of phases
Definition at line 66 of file JsonActor.cs.
|
get |
Total Damage distribution array
Length == # of phases
Definition at line 78 of file JsonActor.cs.
|
get |
Damage taken array Length == # of phases
Definition at line 84 of file JsonActor.cs.
|
get |
Toughness score
Definition at line 36 of file JsonActor.cs.


Cancel
WasMachine
Washing Cycle Name:
Load Washing Cycle
Washing Cycle Name:
Add Fase
Remove Fase
Save Washing Cycle
Delete Washing Cycle


Installation of the Material Dashboard Bundle is a one step procedure. You just require the package in you composer.json file and you are done.
composer require webbamboo/material-dashboard-symfony
Table of contents:


/* (Re-) Implementing A Syntax- Highlighting Editor in JavaScript */
Topic: JavaScript, code editor implementation
Author: Marijn Haverbeke
Date: March 2nd 2011
This is a followup to my Brutal Odyssey to the Dark Side of the DOM Tree story. That one describes the mind-bending process of implementing (what would become) CodeMirror 1. This one describes the internals of CodeMirror 2, a complete rewrite and rethink of the old code base. I wanted to give this piece another Hunter Thompson copycat subtitle, but somehow that would be out of place—the process this time around was one of straightforward engineering, requiring no serious mind-bending whatsoever.
So, what is wrong with CodeMirror 1? I'd estimate, by mailing list activity and general search-engine presence, that it has been integrated into about a thousand systems by now. The most prominent one, since a few weeks, being Google code's project hosting. It works, and it's being used widely.
Still, I did not start replacing it because I was bored. CodeMirror
1 was heavily reliant on designMode
or contentEditable
(depending on the browser). Neither of
these are well specified (HTML5 tries
to specify
their basics), and, more importantly, they tend to be one of the more
obscure and buggy areas of browser functionality—CodeMirror, by using
this functionality in a non-typical way, was constantly running up
against browser bugs. WebKit wouldn't show an empty line at the end of
the document, and in some releases would suddenly get unbearably slow.
Firefox would show the cursor in the wrong place. Internet Explorer
would insist on linkifying everything that looked like a URL or email
address, a behaviour that can't be turned off. Some bugs I managed to
work around (which was often a frustrating, painful process), others,
such as the Firefox cursor placement, I gave up on, and had to tell
user after user that they were known problems, but not something I
could help.
Also, there is the fact that designMode
(which seemed
to be less buggy than contentEditable
in Webkit and
Firefox, and was thus used by CodeMirror 1 in those browsers) requires
a frame. Frames are another tricky area. It takes some effort to
prevent getting tripped up by domain restrictions, they don't
initialize synchronously, behave strangely in response to the back
button, and, on several browsers, can't be moved around the DOM
without having them re-initialize. They did provide a very nice way to
namespace the library, though—CodeMirror 1 could freely pollute the
namespace inside the frame.
Finally, working with an editable document means working with
selection in arbitrary DOM structures. Internet Explorer (8 and
before) has an utterly different (and awkward) selection API than all
of the other browsers, and even among the different implementations of
document.selection
, details about how exactly a selection
is represented vary quite a bit. Add to that the fact that Opera's
selection support tended to be very buggy until recently, and you can
imagine why CodeMirror 1 contains 700 lines of selection-handling
code.
And that brings us to the main issue with the CodeMirror 1 code base: The proportion of browser-bug-workarounds to real application code was getting dangerously high. By building on top of a few dodgy features, I put the system in a vulnerable position—any incompatibility and bugginess in these features, I had to paper over with my own code. Not only did I have to do some serious stunt-work to get it to work on older browsers (as detailed in the previous story), things also kept breaking in newly released versions, requiring me to come up with new scary hacks in order to keep up. This was starting to lose its appeal.
What CodeMirror 2 does is try to sidestep most of the hairy hacks that came up in version 1. I owe a lot to the ACE editor for inspiration on how to approach this.
I absolutely did not want to be completely reliant on key events to generate my input. Every JavaScript programmer knows that key event information is horrible and incomplete. Some people (most awesomely Mihai Bazon with Ymacs) have been able to build more or less functioning editors by directly reading key events, but it takes a lot of work (the kind of never-ending, fragile work I described earlier), and will never be able to properly support things like multi-keystoke international character input.
So what I do is focus a hidden textarea, and let the browser believe that the user is typing into that. What we show to the user is a DOM structure we built to represent his document. If this is updated quickly enough, and shows some kind of believable cursor, it feels like a real text-input control.
Another big win is that this DOM representation does not have to
span the whole document. Some CodeMirror 1 users insisted that they
needed to put a 30 thousand line XML document into CodeMirror. Putting
all that into the DOM takes a while, especially since, for some
reason, an editable DOM tree is slower than a normal one on most
browsers. If we have full control over what we show, we must only
ensure that the visible part of the document has been added, and can
do the rest only when needed. (Fortunately, the onscroll
event works almost the same on all browsers, and lends itself well to
displaying things only as they are scrolled into view.)
ACE uses its hidden textarea only as a text input shim, and does all cursor movement and things like text deletion itself by directly handling key events. CodeMirror's way is to let the browser do its thing as much as possible, and not, for example, define its own set of key bindings. One way to do this would have been to have the whole document inside the hidden textarea, and after each key event update the display DOM to reflect what's in that textarea.
That'd be simple, but it is not realistic. For even medium-sized document the editor would be constantly munging huge strings, and get terribly slow. What CodeMirror 2 does is put the current selection, along with an extra line on the top and on the bottom, into the textarea.
This means that the arrow keys (and their ctrl-variations), home, end, etcetera, do not have to be handled specially. We just read the cursor position in the textarea, and update our cursor to match it. Also, copy and paste work pretty much for free, and people get their native key bindings, without any special work on my part. For example, I have emacs key bindings configured for Chrome and Firefox. There is no way for a script to detect this.
Of course, since only a small part of the document sits in the textarea, keys like page up and ctrl-end won't do the right thing. CodeMirror is catching those events and handling them itself.
Getting and setting the selection range of a textarea in modern
browsers is trivial—you just use the selectionStart
and selectionEnd
properties. On IE you have to do some
insane stuff with temporary ranges and compensating for the fact that
moving the selection by a 'character' will treat \r\n as a single
character, but even there it is possible to build functions that
reliably set and get the selection range.
But consider this typical case: When I'm somewhere in my document, press shift, and press the up arrow, something gets selected. Then, if I, still holding shift, press the up arrow again, the top of my selection is adjusted. The selection remembers where its head and its anchor are, and moves the head when we shift-move. This is a generally accepted property of selections, and done right by every editing component built in the past twenty years.
But not something that the browser selection APIs expose.
Great. So when someone creates an 'upside-down' selection, the next time CodeMirror has to update the textarea, it'll re-create the selection as an 'upside-up' selection, with the anchor at the top, and the next cursor motion will behave in an unexpected way—our second up-arrow press in the example above will not do anything, since it is interpreted in exactly the same way as the first.
No problem. We'll just, ehm, detect that the selection is upside-down (you can tell by the way it was created), and then, when an upside-down selection is present, and a cursor-moving key is pressed in combination with shift, we quickly collapse the selection in the textarea to its start, allow the key to take effect, and then combine its new head with its old anchor to get the real selection.
In short, scary hacks could not be avoided entirely in CodeMirror 2.
And, the observant reader might ask, how do you even know that a key combo is a cursor-moving combo, if you claim you support any native key bindings? Well, we don't, but we can learn. The editor keeps a set known cursor-movement combos (initialized to the predictable defaults), and updates this set when it observes that pressing a certain key had (only) the effect of moving the cursor. This, of course, doesn't work if the first time the key is used was for extending an inverted selection, but it works most of the time.
One thing that always comes up when you have a complicated internal state that's reflected in some user-visible external representation (in this case, the displayed code and the textarea's content) is keeping the two in sync. The naive way is to just update the display every time you change your state, but this is not only error prone (you'll forget), it also easily leads to duplicate work on big, composite operations. Then you start passing around flags indicating whether the display should be updated in an attempt to be efficient again and, well, at that point you might as well give up completely.
I did go down that road, but then switched to a much simpler model: simply keep track of all the things that have been changed during an action, and then, only at the end, use this information to update the user-visible display.
CodeMirror uses a concept of operations, which start by
calling a specific set-up function that clears the state and end by
calling another function that reads this state and does the required
updating. Most event handlers, and all the user-visible methods that
change state are wrapped like this. There's a method
called operation
that accepts a function, and returns
another function that wraps the given function as an operation.
It's trivial to extend this (as CodeMirror does) to detect nesting, and, when an operation is started inside an operation, simply increment the nesting count, and only do the updating when this count reaches zero again.
If we have a set of changed ranges and know the currently shown range, we can (with some awkward code to deal with the fact that changes can add and remove lines, so we're dealing with a changing coordinate system) construct a map of the ranges that were left intact. We can then compare this map with the part of the document that's currently visible (based on scroll offset and editor height) to determine whether something needs to be updated.
CodeMirror uses two update algorithms—a full refresh, where it just discards the whole part of the DOM that contains the edited text and rebuilds it, and a patch algorithm, where it uses the information about changed and intact ranges to update only the out-of-date parts of the DOM. When more than 30 percent (which is the current heuristic, might change) of the lines need to be updated, the full refresh is chosen (since it's faster to do than painstakingly finding and updating all the changed lines), in the other case it does the patching (so that, if you scroll a line or select another character, the whole screen doesn't have to be re-rendered).
All updating uses innerHTML
rather than direct DOM
manipulation, since that still seems to be by far the fastest way to
build documents. There's a per-line function that combines the
highlighting, marking, and
selection info for that line into a snippet of HTML. The patch updater
uses this to reset individual lines, the refresh updater builds an
HTML chunk for the whole visible document at once, and then uses a
single innerHTML
update to do the refresh.
When I wrote CodeMirror 1, I thought interruptable parsers were a hugely scary and complicated thing, and I used a bunch of heavyweight abstractions to keep this supposed complexity under control: parsers were iterators that consumed input from another iterator, and used funny closure-resetting tricks to copy and resume themselves.
This made for a rather nice system, in that parsers formed strictly separate modules, and could be composed in predictable ways. Unfortunately, it was quite slow (stacking three or four iterators on top of each other), and extremely intimidating to people not used to a functional programming style.
With a few small changes, however, we can keep all those advantages, but simplify the API and make the whole thing less indirect and inefficient. CodeMirror 2's mode API uses explicit state objects, and makes the parser/tokenizer a function that simply takes a state and a character stream abstraction, advances the stream one token, and returns the way the token should be styled. This state may be copied, optionally in a mode-defined way, in order to be able to continue a parse at a given point. Even someone who's never touched a lambda in his life can understand this approach. Additionally, far fewer objects are allocated in the course of parsing now.
The biggest speedup comes from the fact that the parsing no longer has to touch the DOM though. In CodeMirror 1, on an older browser, you could see the parser work its way through the document, managing some twenty lines in each 50-millisecond time slice it got. It was reading its input from the DOM, and updating the DOM as it went along, which any experienced JavaScript programmer will immediately spot as a recipe for slowness. In CodeMirror 2, the parser usually finishes the whole document in a single 100-millisecond time slice—it manages some 1500 lines during that time on Chrome. All it has to do is munge strings, so there is no real reason for it to be slow anymore.
Given all this, what can you expect from CodeMirror 2? First, the good:
iframe
nodes aren't
really known for respecting document flow. Now that an editor instance
is a plain div
element, it is much easier to size it to
fit the surrounding elements. You don't even have to make it scroll if
you do not want to.Then, the bad:


Contains core components and utilities for Jmix frontend clients based on React and React Native.
Documentation and API reference can be found here.
Generated using TypeDoc


PureBasic - Cipher
概要
The cipher library is a set of functions useful to cipher or encode data. For example the MD5 (Message Digest 5) is a very popular fingerprint routine, used in many areas due to its strong resistance to attacks: Linux, BSD and Unix uses it as alternative way to store password on the disk.
命令索引
AESDecoder
AESEncoder
AddCipherBuffer
AddFingerprintBuffer
Base64Decoder
Base64Encoder
CloseCryptRandom
CryptRandom
CryptRandomData
DESFingerprint
FileFingerprint
Fingerprint
FinishCipher
FinishFingerprint
IsFingerprint
OpenCryptRandom
StartAESCipher
StartFingerprint
StringFingerprint
UseCRC32Fingerprint
UseMD5Fingerprint
UseSHA1Fingerprint
UseSHA2Fingerprint
UseSHA3Fingerprint
示例
Cipher.pb
已支持操作系统
所有


BITS Pilani’s Mission is to provide the community with a fully functional and user interactive online tool which can help the needy with their basic needs like food, clothes. Our noble thought is to provide food, clothing, education to the needy. Any organization which wants to help relieve hunger in their community is welcome to use our website
Team
An overview of the founding team and core contributors


As RxWeb follows the practices of Clean Architecture, Based upon this the project structure is divided into several layers of Models, domain services, Application core and API which adds the practices of seperation of concerns for simplification and maintanable code.
The project solution contains six projects. They are :
1. Models
2. BoundedContext
3. UnitOfWork
4. Infrastructure
5. Domain
6. Api
Models
The primary purpose of this project is to define POCO models/Enums/Interfaces which can be used in application wide. Some of the files/folders are already defined. Some of these folders and files are defined when you create the project. Let's see how many folders/files are available initially.
|
Folder Name
|
Description
|
|---|---|
|
DbEntities
|
All Database tables are transformed into the POCO models.
|
|
ExtendedModels
|
You can extend your POCO models, for example : User model contains the property of Password, but you want compare password property as well. The ComparePassword property you can define in the extended model of User' with the [NotMapped] annotation otherwise entity framework core throws an error as the ComparePassword property is not in the table of User.
|
|
ViewModels
|
In this folder you can define your custom model, which you want to use that model application wide.
|
|
Enums
|
You can define enums based upon your need and some of the enums are automatically generated which are defined in the table of ApplicationObjectTypes and the respective respective reference values are stored in the ApplicationObjects. for more information about these table you can refer the 'Database Information' page.
|
BoundedContext
This project contains BoundedContexts which are made based upon the defined modules. Each context can work independently based upon its
concept. It has MainSqlDbContext which is used to resolve the database connection based upon the configuration of the app setting through the GetConnection method of BaseDbContext. For performing multitenancy and connection resilency BaseBoundedDbContext is used. The Bounded context will inherit from BaseBoundedDbContext for resolving database configurations.
Unit Of Work
This project contains Uow class for its respective BoundedContext to follow repository pattern which provides methods through which the data can be manipulated. It has BaseUow which uses the IRepositoryProvider and the IDbContext to provide the CoreUnitOfWork methods to the particular domain. Each domain contains a folder having Uow classes which are used in the controllers.
Infrastructure
This project covers methods of necessary actions and implementation which are used application wide like determining user access and access permission, email and sms provider, authorize token etc
It contains default generated files which include:
* Proving application token using ApplicationTokenProvider.
* Get UserClaim of logged user with AccessPermissionHandler.
* Authorizing token using TokenAuthorizer.
* Module wise access of a user using UserAccessConfigInfo.
Domain
Domain project contains Domain services which are made whenever high complexity APIs are made. This means that whenever a domain controller is made, it will make a domain class for adding custom business logic of the domain which will be generated in the Domain project under its module's folder and its reference will be given in the controller.
Api
The Api project is the .Net core based web application which is the start of the project. It contains application settings, Controllers, necessery injected services like security, performance etc.
* app.settings.json is the json configuration of the application in which database connection string, connection resilency configuration, MultiTenant details, security and other details are stored.
* Controllers folder contains rest APIs.
It has Core folder having
1) Authentication Controller : Used for login(Verifying user), token generation.
2) Authorize Controller : Used for get access modules(acess permissions, logout and refresh token)
* Bootstrap contains implementations of ConfigurationOptions, Performance, Security, Validations etc


--- layout: post title: 'Future of Mobile: What makes smartphones smart?' date: 2008-11-17 00:00:00 categories: business mobile ---
What makes smartphones smart? Panel discussion with Simon Rockman
David Wood, Research, Symbian
Olivier Bartholiot, Purple Labs
Andy Bush, LiMo Foundation
Rich Miner, Google
James McCarthy, Microsoft
DW: We'll look back on phones of today as being rubbish in future. Very happy to see Google services running well on Symbian phones. Looking forward to collaboration; whilst competition stops us going stale, there's too much variety in the market and it's slowed us down. Symbian is a combination of old (some code is 14 years old) and new (continually renewing). Innovation is going to speed up: Symbian are removing some fragmentation from their platform (i.e. UIQ), and embracing open source.
OB: Recently recalibrated themselves as a software business. Today, the specialists in Linux on low-end devices.
AB: LiMo, a young organisation (<2yo), meant to consolidate a lot of fragmentation that was happening. First release of the platform was shown at MWC this year, second release this year. Model is that member organisations (LiMo are non-profit) contribute: about 1000 engineers working on the platform. Not a standards organisation, they're about producing real code. Use the best of open source (e.g. GTK). Their members half half a billion subscribers on their networks. They're a governance organisation: one member, one vote.
RM: Hardware OEMs and carriers don't understand software very well. This is why Apple could embarrass the industry with the release of a first-generation handset. They understand software, developers, frameworks and platform design. They built not just a handset but an ecosystem. Google fundamentally believes mobile is an important platform, and we need to get our applications out on mobile. We struggled to build MIDP apps that wouldn't require changes, app signing.
JM: To be an OS provider, you need to achieve some scale. We have over 100 mobile operator partners across the world today. All major operators sell Windows Mobile devices. MS licenses software to OEMs: the core OS is valuable.
RM: Google has no business model as regards Android: it's all open source. The aim is long-term: over time, we think that mobile is important. Our mission is to reach everyone, and we need mobile to this. Our business model is advertising, and it's important that no one entity control the mobile phone platform. Once we can deliver value to the consumer (as we did with search), we'll figure out how to deliver advertising. Android is "designed to go downmarket quickly". A lot of economies "aren't two-screen economies, these are the only devices they have".
SR: Olivier, could you talk about your business model.
... stuff about Purple Labs revenues for 2009 ...
DW: Last year we generated $300m from licensing. Symbian Foundation will be about 1/10 size of the current Symbian.
JM: HTC have been a great partner for Microsoft over the years. Samsung are grabbing UK market share in Windows Mobile terms. All our OEMs serve different markets, they all do different things.
SR: Motorola are stopping doing Symbian phones and starting to do Android phones, what do you think David?
DW: It's understandable that handset vendors don't want to rely on a single OS. In a few years there'll be less hedging of bets and some consolidation.
... panel agree that runtimes grow in importance ...
DW: Emergence of runtimes doesn't remove the need to solve fragmentation at the operating system level.
Q: What makes a smartphone smart?
DW: The ability to add features.
RM: Smartphones haven't been very smart. You could barely make calls on them when I launched them at Orange.
Q: Why is there no Apple representative on the panel?
SR: They declined to send anyone. They prefer to keep to themselves.


Group Transport
For larger group transfers and transport services, we have our 28-seater fully air conditioned transfer Bus.Family Transport
For smaller groups and families,we have the mini bus, the 4WD Safari Vans and the Safari Land Cruisers 4x4.Personal
For individuals who need personal cars, we have Volvo saloon cars for use when not on safari.Car Hire Service
GREY HORIZONS has 15 vehicles all in good condition.
Our safari vehicles are all fitted with:
• GPS tracking
• HF or VHF Radio Connection
• Pop-up Roof
• First Aid Kit
• Cooler Box
• Fire Extinguisher
• Tool Kit and spare tyres
• Sliding windows
• passenger window seats guaranteeing an unrestricted panoramic view
The vehicles types include;
Minibuses
Safari Vans (4WD)
Safari Land Cruisers (4x4)
Group Cars
For larger group transfers and transport services, we have our 28-seater fully air conditioned transfer Bus.
Well maintained, each vehicle is routinely subjected to an overhaul service after every safari and checked again before the next safari by our very own team of competent mechanics and workshop staff.


Deep Blue Sea (R) ** 1/2 Starring LL Cool J, Saffron Burrows Directed by Renny Harlin A Review by Frankie Paiva
Hot on the heels of Lake Placid, which was more of a campy horror comedy than deadly animal horror movie, Deep Blue Sea comes to sweep us away with yet another gory creature feature.
Dr.  She works at the huge Aquatica, an above and underground research lab that houses three testing sharks. One day when Carter (Thomas Jane) is out feeding the sharp-toothed animals they try to hunt him down, but swim backwards when they can't. This is met with shocking discovery as sharks can't swim backwards, the only way they could is if something slipped them something, but of course, that's against company policy.
A storm blows out all communications on the island and the group (along with Samuel L. Jackson) is caught inside the ship. Susan is up to foul play by giving the sharks more protein than they need, thus making them smarter. The sharks begin to chase and chomp everyone around, and it's an exciting rush.
LL Cool J appears as a cook, he's quite good and he steals most of the scenes he's in. It proves that there could be room for him in Hollywood as an actor. Finally there is someone in one of these movies that never gives up, and comes up with creative ways of getting away from the bad guy. Burrows also makes a good female lead and this should get her more star attention. Since there are no big actors, the film is more suspenseful than the standard horror/sci-fi flick, whereas in other movies ("OK, everyone except Jamie Lee Curtis or Sigourney Weaver get killed, etc.) where it's predictable who will live and who will die, it's all a mystery here.
People that liked Lake Placid that come to this one expecting the same laughs won't get what they are looking for. On the other hand, those expecting Lake Placid to be scary will find what they were looking for here.
In other words, if you want a thriller that doesn't require a lot of thinking, go see Deep Blue Sea, it gets my ** 1/2 stars of choice.
A Review by Frankie Paiva The 12 Year-Old Movie Reviewer E-Mail me at<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Check which ratio you want to use:
This example shows how to let this plugin to keep the axes scale ratio.
You specify a fixed ratio value of the X-Y axes, for example:
var options = { coordinate: { type: "auto", ratioXY: 1 } };
Check which ratio you want to use:
This example shows how to let this plugin to keep the axes scale ratio.
You specify a fixed ratio value of the X-Y axes, for example:
var options = { coordinate: { type: "auto", ratioXY: 1 } };


Index
A B C D E F G H I K L M N O P Q R S T U V W
All Classes|All Packages
All Classes|All Packages
All Classes|All Packages
L
- leaveTable() - Method in class Student
-
Method to leave the table If student has already reserved a table calls LibrarySystem approveLeaveTable method Otherwise denies request
- left - Variable in class BinaryTree.Node
-
Reference to the left child
- LEFT_HEAVY - Static variable in class AVLTree.AVLNode
-
Constant to indicate left-heavy
- Librarian - Class in <Unnamed>
- Librarian(String, String, String, String) - Constructor for class Librarian
-
Constructor Initializes librarian name, surname, ID and password
- librarianBookOption(Librarian) - Method in class LibrarySystem
-
There are 5 operations you can do in the librarian book menu.
- librarianMenu(String, Librarian) - Method in class LibrarySystem
-
The librarian menu has 3 options.
- librarians - Static variable in class LibrarySystem
-
librarians also registers those who are registered as students.
- librarianTableOption(Librarian) - Method in class LibrarySystem
-
There are 3 transactions in the Librarian table option menu.
- LibrarySystem - Class in <Unnamed>
- LibrarySystem() - Constructor for class LibrarySystem
-
Default constructor of LibrarySystem
- links - Variable in class SkipList.SLNode
-
The Links.
- ListGraph - Class in <Unnamed>
- ListGraph(int, boolean) - Constructor for class ListGraph
-
Construct a graph with the specified number of vertices and directionality
- LOG2 - Static variable in class SkipList
-
constant for math calculate
- logIn(String) - Method in class LibrarySystem
-
In accordance with the information received, the user object to be processed is returned.
- logRandom() - Method in class SkipList
-
generating random level for the new node to be inserted
All Classes|All Packages


Look: Rich The Kid + Lil Pump Turn A Gas Station Into Epic Modeling Shoot
by Team SOHHRap artists Rich The Kid and Lil Pump don’t need a closed off set to pose. The hip-hop pair went online this weekend to share a bromance moment to the masses. Look and comment below!


Problem solving is such an integral part of coding and in life in general too. I had considered myself pretty decent at problem solving. I love solving riddles, puzzles and playing problem solving games. But the past 2 weeks have really pushed me. Maybe because of the time constraints and the added pressure of this being a course that will determine the rest of my life or because the problems faced here are just more difficult than I have faced before. But either way, I was really challenged and sometimes I felt frustrated.
The problem solving techniques and processes were really helpful.
- Pseudocode helped in breaking down what I wanted to do. I didn't use it too much but when the code was a bit too complex it was really useful.
- Trying something was interesting because it was just random. I have used this method before in solving puzzles and tried to use it a few times here. I think it only worked once.
- Rubber ducky method I had never used before and was keen to try as soon as I read about it. Honestly it felt weird the first few times but now i'm slowly starting to get used to it.
- Reading error messages gave me an idea of what was wrong and where I needed to look. Sometimes it was helpful and sometimes it got me more confused than I was before.
- Console logging was something I never really did much of. Maybe a few times towards the end but now I feel like I should do more of it.
- Googling is definitely the first thing I do and my favourite of all the techniques.
- Asking your peers for help> saved me twice when I was stuck. It's a great way to see how other people are tackling the same problem you are.
- Reflection is really important after you have solved the problem. Especially if you asked for help with that problem. It is important to look back at the solution and fully understand how it works so if you face a similar situation again, it won't be too bad.
It is important to visit these techniques when facing a problem but also important to not get too frustrated when they don't work. Sometimes a problem that seems simple can baffle us and it takes stepping away from it for a while to solve it. When I was doing the Fizzbuzz kata, in the first part for the function where I wrote an if/else if argument, I had mistakenly used commas instead of semicolon. And this is something that I struggle with anyway. But for a long time I just couldn't find what was wrong with the code. I really had to leave it, go for a walk, come back and then it clicked.
For the second half of the same kata, again I was stuck and didn't know what was wrong with the code. I went on slack and asked some peers for help. And even though I didn't get the answer straight from them, just discussing the problem with them helped me in finding the issue and solving it quickly.


My girlfriend and I love to camp, the image in the background was our quest for ruby reserve in Montana. We believe we found it but didn't know what a raw ruby looked like at the time! When we aren't travelling we enjoy spending time at our homebase in Swannanoa, NC or on our small live-aboard in Vancouver, BC.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Floating.20point.html ---
Does Lean have any support for floating point? Just for computation, not necessarily reasoning?
there's a preliminary floating point implementation in mathlib, but as i'm sure you know, there's way less to reason about with that vs the rational numbers
you'll want to ask @Mario Carneiro more about that
Oh, neat: https://github.com/leanprover/mathlib/blob/master/data/fp/basic.lean
Thanks for pointing that out to me!
Unfortunately, I was looking for something that just reduced to underlying floating point computation, so I'd have things like log
there. Maybe I can somehow use the FFI?
uh, there's an FFI? the API in lean/src/api
is for external C++ programs to call
unfortunately in this case if you really need floats in a theorem prover Coq is the best bet for now...
Well, actually, in Coq, I'd just write the program on reals and then extract the code to floating point
I'm hoping Lean 4 really improves in that regard. I can't use Lean for a lot of math-type things because it doesn't have a fast float/rational
even if proving correctness with IEEE floats is a gigantic pain, handwaving and going from real to float is good enough, as you said
but one of the bigger goals for the next version of Lean is better support for program extraction and a C++ FFI (I think), so I'm optimistic
This is a compilation issue. Lean would need native support for floating point numbers. I think this is coming with the Lean 4 compiler.
By the way there's nothing in principle stopping us from having log
available on floats, in fact once the rounding is done right pretty much all the functions have the same definition in terms of their real counterparts - apply function, round, special behavior at inf and nan.
(Although I recall hearing that some IEEE functions are impossible to round correctly, i.e. the spec requires solving an undecidable problem.)
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Toggle navigation
Blooper Remote
Dashboard
Sync
Dashboard
Call the following URL
http://
Go!
Connected Devices
Browser
Engine
OS
Device


| Package | Description |
|---|---|
| io.papermc.paper.event.world | |
| org.bukkit |
The root package of the Bukkit API, contains generalized API classes.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull StructureType |
StructureLocateEvent.getType()
Gets the
StructureType that is to be located. |
| Modifier and Type | Method and Description |
|---|---|
void |
StructureLocateEvent.setType(@NotNull StructureType type)
Sets the
StructureType that is to be located. |
| Constructor and Description |
|---|
StructureLocateEvent(@NotNull World world,
@NotNull Location origin,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored) |
| Modifier and Type | Field and Description |
|---|---|
static StructureType |
StructureType.BASTION_REMNANT
Bastion remnant.
|
static StructureType |
StructureType.BURIED_TREASURE
Buried treasure consists of a single chest buried in the beach sand or
gravel, with random loot in it.
|
static StructureType |
StructureType.DESERT_PYRAMID
Desert pyramids (also known as desert temples) are found in deserts.
|
static StructureType |
StructureType.END_CITY
End Cities are tall castle-like structures that generate in the outer
island of the End dimension.
|
static StructureType |
StructureType.IGLOO
Igloos are structures that generate in snowy biomes.
|
static StructureType |
StructureType.JUNGLE_PYRAMID
Jungle pyramids (also known as jungle temples) are found in jungles.
|
static StructureType |
StructureType.MINESHAFT
Mineshafts are underground structures which consist of branching mining
tunnels with wooden supports and broken rails.
|
static StructureType |
StructureType.NETHER_FORTRESS
Nether fortresses are very large complexes that mainly consist of
netherbricks.
|
static StructureType |
StructureType.NETHER_FOSSIL
Nether fossils.
|
static StructureType |
StructureType.OCEAN_MONUMENT
Ocean monuments are underwater structures.
|
static StructureType |
StructureType.OCEAN_RUIN
Ocean ruins are clusters of many different blocks that generate
underwater in ocean biomes (as well as on the surface of beaches).
|
static StructureType |
StructureType.PILLAGER_OUTPOST
Pillager outposts may contain crossbows.
|
static StructureType |
StructureType.RUINED_PORTAL
Ruined portal.
|
static StructureType |
StructureType.SHIPWRECK
Shipwrecks are structures that generate on the floor of oceans or
beaches.
|
static StructureType |
StructureType.STRONGHOLD
Strongholds are underground structures that consist of many rooms,
libraries, and an end portal room.
|
static StructureType |
StructureType.SWAMP_HUT
Swamp huts (also known as witch huts) generate in swamp biomes and have
the ability to spawn witches.
|
static StructureType |
StructureType.VILLAGE
Villages are naturally generating structures that form above ground.
|
static StructureType |
StructureType.WOODLAND_MANSION
Mansions (also known as woodland mansions) are massive house structures
that generate in dark forests, containing a wide variety of rooms.
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull ItemStack |
Bukkit.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
@NotNull ItemStack |
Server.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
static @NotNull ItemStack |
Bukkit.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
@NotNull ItemStack |
Server.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
@Nullable Location |
World.locateNearestStructure(@NotNull Location origin,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Find the closest nearby structure of a given
StructureType . |
Copyright © 2021. All rights reserved.


1 When the Nile is in flood, it overflows not only the Delta but also the lands called Libyan and Arabian, as far as two days' journey from either bank in places, and sometimes more than this, sometimes less. Concerning its nature, I could not learn anything either from the priests or from any others.
2 Yet I was anxious to learn from them why the Nile comes down with a rising flood for a hundred days from the summer solstice; and when this number of days is passed, sinks again with a diminishing stream, so that the river is low for the whole winter until the summer solstice again.
3 I was not able to get any information from any of the Egyptians regarding this, when I asked them what power the Nile has to be contrary in nature to all other rivers. I wished to know this, and asked; also, why no breezes blew from it as from every other river.


--- layout: post title: Worn Look tags: [] status: publish type: post published: true meta: {} ---
Zeldman pointed this one out: Cameron Moll has started putting together a series of how-tos covering the worn look. Very nice indeed!


With Titanic, writer/editor/producer/director James Cameron has hit his peak; nothing he can come up with next will be able to match the adrenaline rush and emotional wallop one receives after seeing this masterpiece.
Cameron has always been that rare filmmaker, one who can make a big-budget special effects feast with an emotional core, and he doesn't disappoint here. While it definately is a visual spectacle in the last half, the entire film is dominated by the rivetting romance between the two central characters, Jack Dawson and Rose DeWitt Bukater. Titanic is definately a film that has something for almost everyone.
Brock Lovett (Bill Paxton), while on an expedition through the wreckage of the eponymous ocean liner, discovers a drawing of a young woman wearing what he has been searching three years for, an extremely rare and fabled diamond, the Heart of the Ocean. Upon seeing Lovett on a news report one day, Rose Calvert (Gloria Stuart) contacts Lovett, telling him that she is the woman in the picture. He has her flown to his ship, where she tells her version of what happened on the fateful night of April 14, 1912.
The younger Rose (Kate Winslet) is travelling across the Atlantic back to America with her mother (Frances Fisher) and fiance Cal (Billy Zane) to an impending marriage she'd rather do without. Feeling trapped in her lifestyle among the high society and unable to see an escape route from a loveless marriage with Cal, she tries to leap to an icy death from the back of the ship when she is rescued by Jack Dawson (Leonardo DiCaprio), a poor drifter who won his third-class ticket in a lucky hand of poker. They strike up a friendship and soon discover that they are both lost souls who belong to each other. Fate has other plans, however.
Titanic is as close to being a perfect Hollywood film there has been in fifty years. Visually, the film is stunning; the production design is among the most authentic I have ever seen. It may seem cliched, but it is easy to believe that Cameron & Co. really filmed on the decks of the ship. The special effects, while iffy in places, are nonetheless amazing. There is no doubt that the $US200 million budget was money well spent.
The film would be nothing, however, if it didn't have a story one could care about, and in this department Cameron does not disappoint. DiCaprio and Winslet are perfect in their roles, generating an onscreen chemistry that brings the film a heart and soul unseen in recent Hollywood films. Both actors are terrific; DiCaprio brings youthful charm early on, but in the later scenes dominates with the determination and maturity required.
Winslet, however, is extraordinary. Whether casually flirting with DiCaprio, standing up to her mother or floating helplessly in the middle of the Atlantic, she is absolutely rivetting. Another Oscar nomination (her first being for Sense & Sensibility) will not be a surprise in the least. She could very well become my favourite actress in the near future.
Gloria Stuart, as the older Rose, is fine in her return to film. I was completely unfamiliar with her before the release of Titanic, but now I am very tempted to check out some of her earlier work. Even though she is very subdued and without any phony theatrics, she keeps you glued to the screen whenever she appears. An Oscar nomination is only a formality.
Most people know about Titanic because of it's budget and, realistically, Paramount and Fox may never see all of their money back. It's a testament to both studios, however, that they were willing to put so much money into such an emotionally involving film. Titanic is the best film of the year, despite its minor flaws, and I doubt I'll see a better example of how to make a great movie for a long, long time.
--- Nigel Bridgeman<EMAIL_ADDRESS>The Movie Pages - a movie page: http://www.powerup.com.au/~nigelb/movies
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Home
|
News
|
Events
|
Photos
|
Join Us
|
Scholarship
|
Finances
|
Housing
|
About Us
Delta Sigma Phi Fraternity
Alpha Alpha Chapter
{% block content %} {% endblock %}
Content copyright ©1999-2008
Delta Sigma Phi Alpha Alpha


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cetus.analysis.LoopTools
public class LoopTools
Provides tools for querying information related to For Loop objects
| Method Summary | |
|---|---|
static void |
addLoopName(Program program)
Adds a unique loop name to each for loop. |
static java.util.LinkedList<Loop> |
calculateInnerLoopNest(Loop enclosing_loop)
Calculate the nest of loops enclosed within the given loop |
static java.util.LinkedList<Loop> |
calculateLoopNest(Loop loop)
Calculate the loop nest of this loop |
static boolean |
checkDataDependenceEligibility(Loop loop)
Checks the eligibility of a certain loop for data dependence testing Eligibility checks can be added or removed to increase the scope of dependence testing |
static boolean |
containsBreakStatement(Loop loop)
Check if the loop contains only a break statement modifier |
static boolean |
containsControlFlowModifier(Loop loop)
Check whether the loop contains control constructs that cause it to terminate before the loop condition is reached Check only at one nesting level, no need to check for control flow constructs in nested loops |
static boolean |
containsControlFlowModifierOtherThanBreakStmt(Loop loop)
|
static boolean |
containsFunctionCall(Loop loop)
Checks if loop body contains a function call |
static boolean |
containsLoop(Loop loop)
Check if loop body contains another loop |
static boolean |
containsOnlyParallelizableCall(Loop loop)
Check if the loop contains a function call that can be tested for data dependences/that can be eventually parallelized |
static java.util.List<Loop> |
extractOutermostDependenceTestEligibleLoops(Traversable t)
|
static java.util.LinkedList<Loop> |
getCommonNest(Loop loop1,
Loop loop2)
Get common enclosing loops for loop1 and loop2 |
static Expression |
getIncrementExpression(Loop loop)
Get the expression that represents the actual increment value for the loop. |
static Expression |
getIndexVariable(Loop loop)
Get loop index variable, if loop is canonical |
static Symbol |
getLoopIndexSymbol(Loop loop)
Get symbol of loop index, index variable is identified from step expression for loop |
static java.lang.String |
getLoopName(Statement loop)
Returns the loop name inserted by Cetus. |
static Expression |
getLowerBoundExpression(Loop loop)
Returns a simplified lower bound expression for the loop |
static Loop |
getOutermostLoop(Loop loop)
Get the outermost loop for the nest that surrounds the input loop |
static long |
getReuseDistance(Loop loop,
ArrayAccess e1,
ArrayAccess e2)
A simple implementation based on the Euclidean GCD algorithm to calculate the distance in terms of loop iterations between subscripts of dependent arrays. |
static Expression |
getUpperBoundExpression(Loop loop)
Returns a simplified upper bound expression for the loop |
static boolean |
isCanonical(Loop loop)
Check if loop is canonical, FORTRAN DO Loop format |
static boolean |
isIncrementConstant(Loop loop)
Get loop increment expression and check if it is an integer constant |
static boolean |
isIncrementEligible(Loop loop)
Returns true if the loop increment is an integer constant value. |
static boolean |
isIndexInvariant(Loop loop,
Identifier id)
Check if the index variable is defined within the loop body |
static boolean |
isInnermostLoop(Loop loop)
Checks whether this loop contains any inner loops |
static boolean |
isLoopInvariant(Loop loop,
Expression e)
Check if the given expression is loop invariant |
static boolean |
isLowerBoundConstant(Loop loop)
Check if the lower bound expression is an integer constant |
static boolean |
isOutermostLoop(Loop loop)
Checks whether this loop is enclosed by any outer loops |
static boolean |
isPerfectNest(Loop loop)
Check if this loop and inner loops form a perfect nest |
static boolean |
isPrivate(Symbol s,
Loop l)
Check if the input symbol is marked as private to the loop by the Privatization pass. |
static boolean |
isReduction(Symbol s,
Loop l)
Check if the input symbol is marked as reduction for the loop by the Reduction pass. |
static boolean |
isUpperBoundConstant(Loop loop)
Check if loop upper bound is an integer constant |
static Expression |
replaceSymbolicLowerBound(Loop loop)
Replaces symbolic values in loop lower bound with information obtained from range analysis. |
static Expression |
replaceSymbolicLowerBound(Loop loop,
RangeDomain loop_rd)
Replaces symbolic values in loop lower bound with information obtained from range analysis. |
static Expression |
replaceSymbolicUpperBound(Loop loop)
Replaces symbolic values in loop upper bound with information obtained from range analysis. |
static Expression |
replaceSymbolicUpperBound(Loop loop,
RangeDomain loop_rd)
Replaces symbolic values in loop upper bound with information obtained from range analysis. |
static boolean |
scalarDependencePossible(Loop l)
Check for scalars that are not privatizable or reduction variables |
static java.lang.String |
toControlString(Loop loop)
Returns the control structure of the specified loop in string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Expression getIncrementExpression(Loop loop)
public static boolean isIncrementConstant(Loop loop)
public static Expression getIndexVariable(Loop loop)
public static Expression getLowerBoundExpression(Loop loop)
public static boolean isLowerBoundConstant(Loop loop)
loop
-
public static Expression getUpperBoundExpression(Loop loop)
loop
-
public static boolean isUpperBoundConstant(Loop loop)
public static java.util.LinkedList<Loop> calculateLoopNest(Loop loop)
public static java.util.LinkedList<Loop> getCommonNest(Loop loop1, Loop loop2)
public static boolean isCanonical(Loop loop)
public static boolean containsFunctionCall(Loop loop)
public static boolean containsOnlyParallelizableCall(Loop loop)
public static boolean isPerfectNest(Loop loop)
public static boolean containsLoop(Loop loop)
public static boolean isIndexInvariant(Loop loop, Identifier id)
public static boolean isLoopInvariant(Loop loop, Expression e)
public static boolean scalarDependencePossible(Loop l)
public static boolean isInnermostLoop(Loop loop)
public static boolean isOutermostLoop(Loop loop)
public static Loop getOutermostLoop(Loop loop)
public static boolean containsControlFlowModifier(Loop loop)
public static boolean containsBreakStatement(Loop loop)
public static boolean containsControlFlowModifierOtherThanBreakStmt(Loop loop)
public static java.util.LinkedList<Loop> calculateInnerLoopNest(Loop enclosing_loop)
public static java.lang.String getLoopName(Statement loop)
loop
- the loop.
public static void addLoopName(Program program)
program
- the input program.public static boolean isPrivate(Symbol s, Loop l)
s
- the symbol which needs to be checked as private to loop or notl
- the loop with respect to which private property needs to be checked
public static boolean isReduction(Symbol s, Loop l)
s
- the symbol which needs to be checked as reduction variable or notl
- the loop with respect to which reduction property needs to be checked
public static boolean checkDataDependenceEligibility(Loop loop)
loop
-
public static boolean isIncrementEligible(Loop loop)
loop
- the loop whose increment needs to be checked
public static Symbol getLoopIndexSymbol(Loop loop)
public static Expression replaceSymbolicLowerBound(Loop loop, RangeDomain loop_rd)
loop
- the loop whose symbolic lower bound is to be replacedloop_rd
- the range domain representing ranges for all vars in the loop statement
public static Expression replaceSymbolicLowerBound(Loop loop)
loop
- the loop whose symbolic lower bound is to be replaced
public static Expression replaceSymbolicUpperBound(Loop loop, RangeDomain loop_rd)
loop
- the loop whose symbolic upper bound is to be replacedloop_rd
- the range domain representing ranges for all vars in the loop statement
public static Expression replaceSymbolicUpperBound(Loop loop)
loop
- the loop whose symbolic upper bound is to be replaced
public static java.util.List<Loop> extractOutermostDependenceTestEligibleLoops(Traversable t)
public static long getReuseDistance(Loop loop, ArrayAccess e1, ArrayAccess e2)
loop
- the loop w.r.t which distance needs to be calculatede1
- array access that is one end of the dependencee2
- array access that is at the other end of the dependencepublic static java.lang.String toControlString(Loop loop)
loop
- the given loop.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


When I'm not working, taking care of my son, or walking my dog, I'm either watching sci-fi movies or coding one of my projects.
When I'm not working, taking care of my son, or walking my dog, I'm either watching sci-fi movies or coding one of my projects.


Update Parking Details
Parking Number :
Parking Number is required
Parking Number must be Number
Parking Type :
{{isType}}
Select Flat
Unit Details :
{{ occupancy.wingBuilding }}-{{ occupancy.flatNumber }}
Select Flat
Parking Area :
Parking Area is required
Parking Area must be at least 6 characters
Parking Area must be Number
Save
Cancel
Show List


In this example you must type at least a char in password field, and at least 4 char in username to enable the submit button.


Said the night wind to the little lamb,
"Do you see what I see?
Way up in the sky, little lamb,
Do you see what I see?

Said the little lamb to the shepherd boy,
"Do you hear what I hear?
Ringing through the sky, shepherd boy,
Do you hear what I hear?
A song, a song high above the trees
With a voice as big as the the sea,
With a voice as big as the the sea."
Said the shepherd boy to the mighty king,
"Do you know what I know?

A Child, a Child shivers in the cold
Let us bring him silver and gold,
Let us bring him silver and gold."
Said the king to the people everywhere,
"Listen to what I say!
Pray for peace, people, everywhere,
Listen to what I say!
The Child, the Child sleeping in the night
He will bring us goodness and light,
He will bring us goodness and light."
Silent night, holy night.
All is calm, All is bright
Round yon Virgin Mother and Child
Holy Infant so Tender and mild,
Sleep in heavenly peace,
Sleep in heavenly peace.
Silent night, holy night.
Shepherds quake at the sight.
Glories stream from heaven afar;
Heavenly hosts sing Al-le-lu-ja.
Christ the Savior is born.
Christ the Savior is born.
Silent night, holy night.
Wondrous star, lend thy light.
With the angels let us sing
Alleluia to our King.
Christ the Savior is here,
Jesus the Savior is here.
Silent night, Holy night.
Son of God, love's pure light
Radiant beams from Thy holy face,
With the dawn of redeeming grace,
Jesus Lord at thy birth;
Jesus Lord at thy birth.
We three kings of Orient are
Bearing gifts we traverse afar.
Field and fountain, moor and mountain,
Following yonder star.

Born a king on Bethlehem's plain,
Gold I bring to crown Him again,
King forever, ceasing never
Over us all to reign.
We three kings of Orient are
Bearing gifts we traverse afar.
Field and fountain, moor and mountain,
Following yonder star.
Frankincense to offer have I.
Incense owns a Deity nigh.
Prayer and praising all men raising,
Worship Him, God on high.
We three kings of Orient are
Bearing gifts we traverse afar.
Field and fountain, moor and mountain,
Following yonder star.
Myrrh is mine: Its bitter perfume
Breaths a life of gathering gloom.
Sorrowing, sighing, bleeding dying,
Sealed in the stone-cold tomb.
We three kings of Orient are
Bearing gifts we traverse afar.
Field and fountain, moor and mountain,
Following yonder star.
Glorious now behold Him arise,
King and God and Sacrifice.
Alleluia, alleluia!
Sounds through the earth and skies.
We three kings of Orient are
Bearing gifts we traverse afar.
Field and fountain, moor and mountain,
Following yonder star.
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.
Come and behold Him, born the King of angels;
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.

True God of true God, Light from Light Eternal,
Lo, he shuns not the Virgin's womb;
Son of the Father, begotten, not created;
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.
Come and behold Him, born the King of angels;
Sing, choirs of angels, sing in exultation;
Sing, all ye citizens of heaven above!
Glory to God, all glory in the highest;
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.
Come and behold Him, born the King of angels;
See how the shepherds, summoned to His cradle,
Leaving their flocks, draw nigh to gaze;
We too will thither bend our joyful footsteps;
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.
Come and behold Him, born the King of angels;
Child, for us sinners poor and in the manger,
We would embrace Thee, with love and awe;
Who would not love Thee, loving us so dearly?
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.
Come and behold Him, born the King of angels;
Yea, Lord, we greet Thee, born this happy morning;
Jesus, to Thee be glory given;
Word of the Father, now in flesh appearing.
O come, all ye faithful, joyful and triumphant,
Come ye, O come ye, to Bethlehem.
Come and behold Him, born the King of angels;
Joy to the world! The Lord is come.
Let earth receive her King
Let every heart
Prepare Him room
And Saints and angels sing
And Saints and angels sing
And Saints and Saints and angels sing
Joy to the world, the Saviour reigns
Let Saints their songs employ
While fields and floods
Rocks, hills and plains
Repeat the sounding joy
Repeat the sounding joy
Repeat, Repeat, the sounding joy
Joy to the world with truth and grace
And makes the nations prove
The glories of His righteousness
And wonders of His love
And wonders of His love
And wonders and wonders of His love
No more will sin and sorrow grow,
Nor thorns infest the ground;
He'll come and make the blessings flow
Far as the curse was found,
Far as the curse was found,
Far as, far as the curse was found.
He rules the world with truth and grace,
And gives to nations proof
The glories of His righteousness,
And wonders of His love;
And wonders of His love;
And wonders, wonders of His love.
Rejoice! Rejoice in the Most High,
While Israel spreads abroad
Like stars that glitter in the sky,
And ever worship God,
And ever worship God,
And ever, and ever worship God.
We wish you a merry Christmas
We wish you a merry Christmas
We wish you a merry Christmas
And a happy New Year.
Glad tidings we bring
To you and your kin;
Glad tidings for Christmas
And a happy New Year!
We want some figgy pudding
We want some figgy pudding
We want some figgy pudding
Please bring it right here!
Glad tidings we bring
To you and your kin;
Glad tidings for Christmas
And a happy New Year!

Glad tidings we bring
To you and your kin;
Glad tidings for Christmas
And a happy New Year!
We wish you a Merry Christmas
We wish you a Merry Christmas
We wish you a Merry Christmas
And a happy New Year.
Glad tidings we bring
To you and your kin;
Glad tidings for Christmas
And a happy New Year!
Rudolph, the red-nosed reindeer
had a very shiny nose.
And if you ever saw him,
you would even say it glows.
All of the other reindeer
used to laugh and call him names.
They never let poor Rudolph
play in any reindeer games.
Then one foggy Christmas eve
Santa came to say:
"Rudolph with your nose so bright,
won't you guide my sleigh tonight?"
Then all the reindeer loved him
as they shouted out with glee:
"Rudolph the red-nosed reindeer,
you'll go down in history!"
Dashing through the snow, in a one-horse open sleigh
Over the fields we go, laughing all the way;
Bells on bob-tail ring, making spirits bright
What fun it is to ride and sing a sleighing song tonight
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
A day or two ago, I thought I'd take a ride
And soon Miss Fanny Bright, was seated by my side;
The horse was lean and lank, misfortune seemed his lot;
He got into a drifted bank and we got upsot
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
A day or two ago, the story I must tell
I went out on the snow, and on my back I fell;
A gent was riding by, in a one-horse open sleigh
He laughed as there I sprawling lie but quickly drove away
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
Now the ground is white, go it while you're young
Take the girls tonight, and sing this sleighing song;
Just get a bob-tailed bay, two-forty as his speed
Hitch him to an open sleigh and crack! you'll take the lead
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh
Jingle bells, jingle bells, jingle all the way!
O what fun it is to ride in a one-horse open sleigh


Home
About
Contact
The classic way to find a soda
Since 1897
Our signature sandwiches
We are open everyday! Mon-Sat 9am-6pm Sun 9am-4pm


--- title: Latest training run type: docs repo: https://github.com/rstudio/tfruns menu: main: name: Latest training run - tfruns parent: tfruns-reference aliases: - /reference/tfruns/latest_run.html - /tfruns/reference/latest_run.html - /guide/tfruns/reference/latest_run.html - /tools/tools/tfruns/reference/latest_run.html - /installation/tfruns/reference/latest_run.html - /tutorials/tfruns/reference/latest_run.html - /guide/tools/tfruns/reference/latest_run.html - /deploy/tfruns/reference/latest_run.html - /tools/tfruns/reference/latest_run.html - /tutorials/tools/tfruns/reference/latest_run.html ---
Latest training run
latest_run(runs_dir = getOption("tfruns.runs_dir", "runs"))
| runs_dir | Directory containing runs. Defaults to "runs" beneath the
current working directory (or to the value of the |
Named list with run attributes (or NULL
if no runs found)


12 July 2006 | | categories: inventory control, orms, projects, school, software | blog archive
-[ background ]-
In the Spring of 2003, I took a course in stochastic processes. The second exam was take home and required some coding, which I did in Turbo Pascal, as in the case of my tic tac toe program one year later (the posting of which reminded me of the code from my stochastic processes class).
-[ assignment and notes ]-
A local store uses an (s, S) inventory policy for a particular product. Every Friday evening after the store closes, the inventory level is checked. If the stock level for the product is greater than s, no action is taken. Otherwise, if the stock on hand is less than or equal to s, an amount S-s is procured over the weekend and is available when the store re-opens on Monday morning.
Let {Xn, n = 1, 2, …} be the stock on hand when the inventory is checked on Friday evening of week n and let {Zn, n = 1, 2, …} be the demand for product during week n.
Then for any ω ∈ Ω,
Xn+1(ω) = Xn(ω) - Zn+1(ω) if s < Xn(ω), Zn+1(ω) ≤ Xn(ω)
Xn+1(ω) = S - Zn+1(ω) if Xn(ω) ≤ Zn(ω) ≤ S
Xn+1(ω) = 0 otherwise.
Let s = 3, S = 5, X0 = 0 and assume customers arrive at the store according to a Poisson process with rate λ = 4 per week. (Each customer wants one unit of product.)
Phase I of the exam required the proof that {Xn, n = 1, 2, …} is a Markov chain and writing its transition matrix. These are intuitive (or you’re looking for the answers to your exam, assuming the prof. still uses this exam), so I won’t include them here.
Phases II and III of the exam required some coding.
Phase II
A) Write a program to generate (i.e., fill in) the one-step transition matrix for a passed value of S. Print the one-step matrices for S = 4.
B) Let π[0] = (1, 0, …, 0). Write a program to compute the equilibrium probabilities of the Markov chain using Jacobi iteration. Also, plot πj[0] as a function of n, i.e., the number of Jacobi iterations.
…
Jacobi Iteration.
Jacobi Iteration is a simple computational technique for obtaining the equilibrium probabilities of a Markov chain using a series of matrix multiplies rather than solving a system of linear equations.
Let π[n] be the probability row vector representing the probability of occupying a given state after n transitions. That is, πj[n] = P{in state j after n transitions}.
By conditioning on the state occupied at transition n we have
π[n+1] = π[n]P (Eqn 1)
where P is the one-step transition matrix for the Markov chain. In the limit as n goes to ∞, π[n] goes to π, the vector of equilibrium probabilities. Depending on the system and the desired accuracy, convergence can be quite rapid.
To compute the equilibrium probabilities, start with π[0], then compute π[1], then π[2] and so on using Equation 1 until π[n+1] is “close” to π[n]. For this problem, stop iterating when
Max{ πj[n+1] - πj[n] , all j in State Space} = 0.0001. Computational note: Due to round-off error by the computer, it may be necessary to “re-normalize” π[n] every few iterations so that its elements sum to one. To do this, add up the first m-1 elements of the vector π[n] (assuming the chain has m states) then set the mth element equal to one minus the sum. The elements now sum to one.
The source code and binaries for the solutions to these Phase II questions are linked below. I’m not including Phase III’s code because, unlike Phase II’s, it does not have many possible uses outside the context of this exam. Phase II’s code is relevant because somewhere, someone might want to write a simple program to perform Jacobi iterations or to write one-step transition matrices. This code could easily be extended for other (non-Poisson) arrival distributions and/or for generation of the n-step transition matrix.
-[ license ]-
-[ downloads ]-


Welcome to Simon Keyboard!


Displaying user
's info:
Username:
Full name:
Change full name
Password:
Change password
Email:
Change email
Address:
Change address
userType:


class FramesTest
Public Instance Methods
test_ask_measurement_ap()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 240 def test_ask_measurement_ap mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect() mqtt_client.installation_id = "INSTALLATION" result = mqtt_client.ask_measurement_ap(["CMC111111"],) assert_equal result[0], {:topic => "INSTALLATION/CMC/ACT/CMC111111", :message => "1;"} result = mqtt_client.ask_measurement_ap(["CMC111111", "CMC222222"]) assert_equal result[0], {:topic => "INSTALLATION/CMC/ACT/CMC111111", :message => "1;"} assert_equal result[1], {:topic => "INSTALLATION/CMC/ACT/CMC222222", :message => "1;"} mqtt_client.disconnect() end
test_ask_measurement_ap_fails()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 256 def test_ask_measurement_ap_fails mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) begin mqtt_client.ask_measurement_ap(["CMC111111"]) rescue Exception => ex assert_equal ex.message, "The client is disconnected from the broker" mqtt_client.connect() end begin mqtt_client.ask_measurement_ap(["CMC111111"]) rescue Exception => ex assert_equal ex.message, "The ID of the installation can not be empty" mqtt_client.installation_id = "INSTALLATION" end begin mqtt_client.ask_measurement_ap([]) rescue Exception => ex assert_equal ex.message, "It should be provided at least one AP" end result = mqtt_client.ask_measurement_ap(["CMC111111"]) assert_equal result[0], {:topic => "INSTALLATION/CMC/ACT/CMC111111", :message => "1;"} mqtt_client.disconnect() end
test_ask_measurement_epd()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 115 def test_ask_measurement_epd mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect() mqtt_client.installation_id = "INSTALLATION" result = mqtt_client.ask_measurement_epd(["111111"], "CMC111112") assert_equal result[0], {:topic => "INSTALLATION/CMC111112/ACT/111111", :message => "1;"} result = mqtt_client.ask_measurement_epd(["111111", "222222"], "CMC111112" ) assert_equal result[0], {:topic => "INSTALLATION/CMC111112/ACT/111111", :message => "1;"} assert_equal result[1], {:topic => "INSTALLATION/CMC111112/ACT/222222", :message => "1;"} result = mqtt_client.ask_measurement_epd(["111111"]) assert_equal result[0], {:topic => "INSTALLATION/APID/ACT/111111", :message => "1;"} mqtt_client.disconnect() end
test_ask_measurement_epd_fails()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 135 def test_ask_measurement_epd_fails mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) begin mqtt_client.ask_measurement_epd(["111111"], "CMC111112") rescue Exception => ex assert_equal ex.message, "The client is disconnected from the broker" mqtt_client.connect() end begin mqtt_client.ask_measurement_epd(["111111"], "CMC111112") rescue Exception => ex assert_equal ex.message, "The ID of the installation can not be empty" mqtt_client.installation_id = "INSTALLATION" end begin mqtt_client.ask_measurement_epd([], "CMC111112") rescue Exception => ex assert_equal ex.message, "It should be provided at least one EPD" end result = mqtt_client.ask_measurement_epd(["111111"], "CMC111112") assert_equal result[0], {:topic => "INSTALLATION/CMC111112/ACT/111111", :message => "1;"} mqtt_client.disconnect() end
test_change_relay_status_ap()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 291 def test_change_relay_status_ap mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect() mqtt_client.installation_id = "INSTALLATION" result = mqtt_client.change_relay_status_ap(["CMC111111"], ["0","1", "X","X","X","X","X"]) assert_equal result[0], {:topic => "INSTALLATION/CMC/ACT/CMC111111", :message => "ACT0;ACT1;ACTX;ACTX;ACTX;ACTX;ACTX;"} result = mqtt_client.change_relay_status_ap(["CMC111111", "CMC222222"], ["0","1", "X","X","X","1","X"]) assert_equal result[0], {:topic => "INSTALLATION/CMC/ACT/CMC111111", :message => "ACT0;ACT1;ACTX;ACTX;ACTX;ACT1;ACTX;" } assert_equal result[1], {:topic => "INSTALLATION/CMC/ACT/CMC222222", :message => "ACT0;ACT1;ACTX;ACTX;ACTX;ACT1;ACTX;" } mqtt_client.disconnect() end
test_on_demand_act_epd()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 170 def test_on_demand_act_epd mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect() mqtt_client.installation_id = "INSTALLATION" result = mqtt_client.on_demand_act_epd(["111111"], 100,"CMC111112") assert_equal result[0], {:topic => "INSTALLATION/CMC111112/ACT/111111", :message => "3;100;"} result = mqtt_client.on_demand_act_epd(["111111", "222222"], 0, "CMC111112" ) assert_equal result[0], {:topic => "INSTALLATION/CMC111112/ACT/111111", :message => "3;0;"} assert_equal result[1], {:topic => "INSTALLATION/CMC111112/ACT/222222", :message => "3;0;"} result = mqtt_client.on_demand_act_epd(["111111"], 50) assert_equal result[0], {:topic => "INSTALLATION/APID/ACT/111111", :message => "3;50;"} mqtt_client.disconnect() end
test_on_demand_act_epd_fails()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 189 def test_on_demand_act_epd_fails mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) begin mqtt_client.on_demand_act_epd(["111111"], 100 ,"CMC111112") rescue Exception => ex assert_equal ex.message, "The client is disconnected from the broker" mqtt_client.connect() end begin mqtt_client.on_demand_act_epd(["111111"], 100,"CMC111112") rescue Exception => ex assert_equal ex.message, "The ID of the installation can not be empty" mqtt_client.installation_id = "INSTALLATION" end begin mqtt_client.on_demand_act_epd([], 100 , "CMC111112") rescue Exception => ex assert_equal ex.message, "It should be provided at least one EPD" end begin mqtt_client.on_demand_act_epd(["111111"], 105 , "CMC111112") rescue Exception => ex assert_equal ex.message, "Dimming value is not in the correct range: 0 to 100" end begin mqtt_client.on_demand_act_epd(["111111"]) rescue Exception => ex end result = mqtt_client.on_demand_act_epd(["111111"], 30, "CMC111112") assert_equal result[0], {:topic => "INSTALLATION/CMC111112/ACT/111111", :message => "3;30;"} mqtt_client.disconnect() end
test_send_and_receive_messages()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 65 def test_send_and_receive_messages mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) #mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.connect(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect() mqtt_client.subscribe("/installation1/APID/ACT/Device1") # TODO RAE: To improve the following part # This part of the test is not working well. Maybe it is due the creation of a new Thread in order to receive the messages #mqtt_client.receive_messages_from_subscribed_topics do |topic, message| # assert_equal message, "test_message" # assert_not_equal topic, "/installation1/APID/ACT/Device3" #end mqtt_client.publish("/installation1/APID/ACT/Device1", "test_message") mqtt_client.publish("/installation1/APID/ACT/Device2", "test_message") mqtt_client.publish("/installation1/APID/ACT/Device3", "test_message") # This message is not got in the subscription topic, message = mqtt_client.receive_messages_from_subscribed_topics assert_equal message, "test_message" assert_equal topic, "/installation1/APID/ACT/Device1" end
test_sinapse_mqtt_client_connect_fails()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 34 def test_sinapse_mqtt_client_connect_fails mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :ssl => true ,:username => $MQTT_user, :password => $MQTT_password) begin mqtt_client.connect() rescue Exception => ex assert_equal OpenSSL::SSL::SSLError, ex.class end assert_equal mqtt_client.connected?, true #TODO RAE: The result should be false mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => 'fake') begin mqtt_client.connect() rescue Exception => ex assert_equal MQTT::ProtocolException, ex.class end assert_equal mqtt_client.connected?, false end
test_sinapse_mqtt_client_connects_default()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 18 def test_sinapse_mqtt_client_connects_default mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) # Creating the object through the method connect does not return the correct object #mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.connect(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect(); assert_equal mqtt_client.connected?, true mqtt_client.disconnect() end
test_sinapse_mqtt_client_connects_ssl()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 27 def test_sinapse_mqtt_client_connects_ssl mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $ssl_port, :ssl => true ,:username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect(); assert_equal mqtt_client.connected?, true mqtt_client.disconnect() end
test_sinapse_mqtt_client_disconnects()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 56 def test_sinapse_mqtt_client_disconnects mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect(); assert_equal mqtt_client.connected?, true mqtt_client.disconnect() assert_equal mqtt_client.connected?, false end
test_sinapse_mqtt_client_exists()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 14 def test_sinapse_mqtt_client_exists assert SinapseMQTTClientWrapper::SinapseMQTTClient end
test_subscribe_to_empty_topics()
click to toggle source
# File test/sinapse_mqtt_client/sinapse_mqtt_client_test.rb, line 91 def test_subscribe_to_empty_topics mqtt_client = SinapseMQTTClientWrapper::SinapseMQTTClient.new(:host => $MQTT_broker, :port => $normal_port, :username => $MQTT_user, :password => $MQTT_password) mqtt_client.connect() begin mqtt_client.subscribe() puts "after subscribe" rescue Exception => ex assert_equal ex.message, "no topics given when serialising packet" assert_equal ex.class, RuntimeError end assert_equal true, mqtt_client.connected? begin mqtt_client.subscribe() rescue Exception => ex assert_equal ex.message, "no topics given when serialising packet" assert_equal ex.class, RuntimeError end assert_equal true, mqtt_client.connected? end