# longest [![NPM version](https://badge.fury.io/js/longest.svg)](http://badge.fury.io/js/longest) [![Build Status](https://travis-ci.org/jonschlinkert/longest.svg)](https://travis-ci.org/jonschlinkert/longest)
> Get the longest item in an array.
## Install with [npm](npmjs.org)
`bash
npm i longest --save
`
### Install with [bower](https://github.com/bower/bower)
`bash
bower install longest --save
`
## Running tests Install dev dependencies.
`bash
npm i -d && npm test
`
## Usage
```js var longest = require(‘longest’); longest([‘a’, ‘abcde’, ‘abc’]); //=> ‘abcde’
longest([‘a’, ‘abcde’, ‘abc’]).length; //=> 5 ```
## Related projects * [longest-value](https://github.com/jonschlinkert/longest-value): Get the longest value for the given property from an array of objects. Useful for aligning values. * [right-align-values](https://github.com/jonschlinkert/right-align-values): Right align the values of a given property for each object in an array. Useful for creating text columns or tables. * [right-pad-values](https://github.com/jonschlinkert/right-pad-values): Right pad the values of a given property for each object in an array. Useful for creating text columns or tables. * [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. * [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. * [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation.
## Running tests Install dev dependencies.
`bash
npm i -d && npm test
`
## Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/longest/issues)
## Author
Jon Schlinkert
- [github/jonschlinkert](https://github.com/jonschlinkert)
- [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License Copyright (c) 2015 Jon Schlinkert Released under the MIT license
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 31, 2015._


Envtools is a command line helper for software developers.
Its primary goal is to simplify the tedious task of initializing a laptop/desktop for a developer. Many tools need to be installed, proxy and shell environments need to be configured. One mistake and hours are wasted trying to figure out what is wrong when a simple automation could have saved everybody's time.
Not only Envtools will setup a developer's environment in no time, it also comes loaded with goodies (bash aliases, git prompt and completion, fixes for the OS, nvm installer, Atom and VS Code plugins, etc.) as well as unique commands like a simple web server, a file encryptor, etc.
npm install -g envtoolsYou may need to use elevated user rights (sudo) to run this command.
envtools [command] <options>See the commands tab for detailed information.


- gapBetweenBars - Static variable in class com.team3.bra.R.attr
-
May be a dimension value, which is a floating point number appended with a
unit such as "14.5sp
".
- getCategory() - Method in class com.team3.bra.ItemOrder
-
- getCategoryID() - Method in class com.team3.bra.Item
-
Getter for the Item category id.
- getCookOrders() - Static method in class com.team3.bra.Order
-
- getCurrentPrice() - Method in class com.team3.bra.ItemOrder
-
- getDateTime() - Method in class com.team3.bra.Order
-
- getDescription() - Method in class com.team3.bra.Category
-
Getter for the description of the Category.
- getDescription() - Method in class com.team3.bra.Item
-
Getter for the Item description.
- getDescription() - Method in class com.team3.bra.ItemOrder
-
- getId() - Method in class com.team3.bra.Category
-
Getter for the Category id.
- getId() - Method in class com.team3.bra.Item
-
Getter for the Item id.
- getId() - Method in class com.team3.bra.Order
-
- getId() - Method in class com.team3.bra.User
-
- getItemID() - Method in class com.team3.bra.ItemOrder
-
- getItemOrderID() - Method in class com.team3.bra.ItemOrder
-
- getItems() - Method in class com.team3.bra.Category
-
Getter for the list of items in the category.
- getItems() - Method in class com.team3.bra.Order
-
- getName() - Method in class com.team3.bra.Category
-
Getter for the Category name.
- getName() - Method in class com.team3.bra.Item
-
Getter for the Item name.
- getName() - Method in class com.team3.bra.ItemOrder
-
- getName() - Method in class com.team3.bra.User
-
- getNewNotificationOrders() - Static method in class com.team3.bra.Order
-
- getNotes() - Method in class com.team3.bra.ItemOrder
-
- getNotificationOrders() - Static method in class com.team3.bra.Order
-
- getNotifications() - Method in class com.team3.bra.Waiter
-
This function refreshes the arrayAdapter that displays the orders that
have just been finished in the kitchen.
- getOrders() - Static method in class com.team3.bra.Order
-
- getOrders() - Method in class com.team3.bra.Waiter
-
This function refreshes the arrayAdapter that displays the orders.
- getOrdes() - Method in class com.team3.bra.ReportView
-
Get all the orders from the database
- getPassword() - Method in class com.team3.bra.User
-
- getPosition() - Method in class com.team3.bra.User
-
- getPrice() - Method in class com.team3.bra.Item
-
Getter for the Item price.
- getQuantity() - Method in class com.team3.bra.ItemOrder
-
- getResultSetFromProcedure(String, String[]) - Static method in class com.team3.bra.JDBC
-
Returns a resultSet form a stored procedure and its needed arguments.
- getState() - Method in class com.team3.bra.Order
-
- getSurname() - Method in class com.team3.bra.User
-
- getTable() - Method in class com.team3.bra.Order
-
- getUserById(int) - Static method in class com.team3.bra.User
-
Returns a user's details in a simple String.
- getUserID() - Method in class com.team3.bra.Order
-
- getUsername() - Method in class com.team3.bra.User
-
- getUsers() - Static method in class com.team3.bra.User
-
- getVat() - Method in class com.team3.bra.Category
-
Getter for the VAT of the Category.
- getVat() - Method in class com.team3.bra.ItemOrder
-
- GetVatString() - Method in class com.team3.bra.ReportView.reportTax
-
- getView() - Method in class com.team3.bra.Dialogues
-
Getter for the Dialogue view.
- getView(int, View, ViewGroup) - Method in class com.team3.bra.OrderArrayAdapter
-
- getView(int, View, ViewGroup) - Method in class com.team3.bra.UserArrayAdapter
-
- ghost_view - Static variable in class com.team3.bra.R.id
-
- goBack(View) - Method in class com.team3.bra.Cook
-
When the user confirms that he wants to go to the main menu
- goIcon - Static variable in class com.team3.bra.R.attr
-
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
- gray - Static variable in class com.team3.bra.R.color
-
- green - Static variable in class com.team3.bra.R.color
-


This package was created to analyze multi-level one-way experimental designs. It is designed to handle vectorized observation and factor data where there are unequal sample sizes and population variance homogeneity can not be assumed. To conduct the Gabriel test, create two vectors: one for your observations and one for the factor level of each observation. The function, rgabriel, conduct the test and save the output as a vector to input into the gabriel.plot function, which produces a confidence interval plot for Multiple Comparison.
| Version: | 0.7 |
| Published: | 2013-12-28 |
| Author: | Yihui XIE, Miao YU |
| Maintainer: | Miao YU <yufreecas at gmail.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://github.com/yufree/rgabriel |
| NeedsCompilation: | no |
| CRAN checks: | rgabriel results |
| Reference manual: | rgabriel.pdf |
| Package source: | rgabriel_0.7.tar.gz |
| Windows binaries: | r-devel: rgabriel_0.7.zip, r-release: rgabriel_0.7.zip, r-oldrel: rgabriel_0.7.zip |
| OS X binaries: | r-release: rgabriel_0.7.tgz, r-oldrel: rgabriel_0.7.tgz |
| Old sources: | rgabriel archive |
Please use the canonical form https://CRAN.R-project.org/package=rgabriel to link to this page.


Home
Subjects
Universities
Chat
Reviews
Profile
Log out
Applications
Manage all of your applications at once
NTNU Subject
University
Replacement Subject
Application ID
Application Status
{{app.ntnu_subject.title}}
{{app.replacing_subject?.university?.title}}
{{app.replacing_subject?.title}}
{{app.id}}
{{app.application_status}}
New application


{% extends "boxy/base.html" %} {% block extrameta %} {% endblock %} {% block download_current %}class="current"{% endblock %} {% block contents %} That did not work Can you please send me the url and preferably how to get there? That way, I can fix it. My email adress is boxy -the usual at- kbehrendt -with the- .com extension. Thank you and sorry for the inconvenience {% endblock %}
Can you please send me the url and preferably how to get there? That way, I can fix it.
My email adress is boxy -the usual at- kbehrendt -with the- .com extension.
Thank you and sorry for the inconvenience


B.S. Applied Math and Computer Science • Expected May 2019
Relevant Coursework: Distributed Systems, Software Engineering, Computer Systems, Data Structures and Algorithms, Discrete Structures and Probability, Database Management Systems, Object-Oriented Programming, User Interfaces and User Experience
GPA: 4.0
Undergrad and Head Teaching Assistant• September 2016 - Current
Genomic Privacy Research• Spring 2016 - Current
Software Engineering Intern• Summer 2017
Technical Assistant• February 2016 - May 2017
Software Engineering Intern• Summer 2016
Worked on the backend platform team to integrate Billshark services with Nerdwallet's API. Implemented with a Flask framework and SQLAlchemy.
Utilized mutexes, conditions, and cleanup functions to create a memory-safe, thread-safe multithreaded database in C capable of supporting multiple clients using TCP/IP networking.
Implementation of the UNIX shell in C. Features include processing of basic commands (cd, rm, ls, exit, ln, bg, and fg), support for I/O redirection, foreground and background job control, and signal handling (SIGINT and SIGQUIT).
Implementation of the built-in dynamic memory allocation functions malloc, realloc, and free. Utilized an explicit free list for memory management and a first-fit algorithm for allocating memory. Reduced memory fragmentation through coalescing and splitting.
Won $1000 as a second-place finisher for URI Hack-Health. Developed, designed and pitched an IOS app designed to connect caretakers to families. Implemented with Swift and Firebase, prototyped with Sketch and InVision.
Helped create a web app for Hack@Brown using Flask, HTML and Python. Runs a sentiment analysis on inputted text and media to find the best book and music suggestions corresponding to user’s current emotion.
69 Brown Street, Mail #8222
Providence, RI 02912
(650) 766-6680


M e t r i c a l
Sessions
Generate Report
Edit Students
Logout
Create a Session
Session Name
Session Date
Session From
Session To
Session ID
Session Name
Date
from
to
11111
Test # 1
March 21, 2018
10:30 AM
12:00 PM


Mule Deployments Console
Deploy Mule Application
Choose File to deploy
File Name:
File Size:
File Type:
Active Applications
Mule App
Action
Deploy Mule Domain
Choose File to deploy
File Name:
File Size:
File Type:
Active Domains
Domain App
Action
Log File
http://www.redpill-linpro.se


Python
Learn Python, one of today’s most in-demand programming languages on-the-go! Practice writing Python Code,collect points, & show off your skills now!
C++
Our C++ tutorial covers basic concepts, data types, arrays, pointers,conditional statements, loops, funtions, classes, objetcs, inheritance, and polymorphism.
Java
With our interactive java course, you’ll learn object-oriented Java programming and have the ability to write clear and valid code in almost no time at all.
35,505,436 Learners 1666 Lessons 13,908 Quizzes
Available anytime & Anywhere for FREE!
Learn on the web and on the go.
Available on all major devices and platforms
Always pick up where you left off.
More simple and enjoyable than ever!
Simeon Olabode
Python
Wow...I mean...WOW! Boys and girls, just go for it....I mean, its just so simple, so pretty and well organized. I’ve been looking for free, self learning tools all over for all kinds of stuff and this is by far,the best one. Just too good! And by the way, the community is there, always, to help.
Simeon Olabode
HTML
Appreciations! Superb application with step-by-step teaching. You are making a lot of impacts especially in Ghana, Africa. I couldn’t afford the university to learn to code. Thanks so much. Keep it up!
Simeon Olabode
Java
Become a member of our growing community!
Learn Playing. Play Learning
Probably the best way to use my phone. This is a revolutionary way to learn code. The comments on each question/section adds a real world perspective.


!Jack Sage:
Look me straight in the eyes and answer me. Haven't you already received the Gift of Vitality?
The Gift of Vitality buff reuse is 6 hours!
The Gift of Vitality buff will disappear when switching sub-classes.)
[npc_%objectId%_Link default/109.htm|Back]


Super fast lightweight and dependency free library to get closest Number / Point / Vector / VectorN from an array with caching and stuff
Move your mouse cursor to highlight one of
(it took 0 ms to find the last point)
Find the closest color-name in a set of ~26k colors/name pairs based on RGB coordinates.


Grilled Lime Salmon with Avocado-Mango Salsa and Coconut Rice
This is a restaurant-quality meal that you can make and enjoy in the comfort of your own home. It’s packed with fresh, irresistible flavors that will leave you craving more!
This is a restaurant-quality meal that you can make and enjoy in the comfort of your own home. It’s packed with fresh, irresistible flavors that will leave you craving more!
Fork-twirly noodles, an easy creamy sesame sauce, perfect browned chicken. YUM.
This delicious grilled mozzarella sandwich is perfect to make when you want something fresh and yummy but you are running short on time! Homemade walnut pesto, fresh tomatoes and melted mozzarella make every bite full of flavor.
So fast and simple, this makes for a perfect weeknight dinner in a flash! Seriously, you can be eating this in about 15-20 minutes from now.
Grilled pineapple, avocados, cilantro, and the best teriyaki vinaigrette turn this grilled teriyaki chicken salad into a hearty and tasty meal you’ll put on repeat all summer long.
Stir-Fry is one of the most popular Chinese dishes. It is loaded with delicious ingredients like chicken, noodles, bell peppers, broccoli and mushrooms. This Chinese recipe is super easy to make. All you will need is one wok or a skillet, and all of the ingredients listed below.
These shrimp, avocado, and quinoa bowls are my go to when I’m craving a flavorful filling meal but want to eat clean and keep the calories as low as possible. You can’t really go wrong with this delicious blackened Cajun shrimp. It makes a great addition to the quinoa and the creamy avocado. This nutritious meal is loaded with vitamins and will keep you full without adding to your waistline!


GOV.UK uses cookies to make the site simpler. Find out more about cookies
For a safer, faster, better experience online you should upgrade your browser. Find out more about browsers Close


Hi all,
I have a number of feeds configured to do a number of really cool things but my nemesis is :-
I want to configure a feed, based on a pulse input as follows :-
Each pulse is 0.11kWh (Gas equivalent)
I want to get a daily total gas consumption in kWh feed from this input.
Simples....NOT (for me at least)
My motivation is that I primarily use gas for heating water, I have PV and an energy diverter. I can easily get daily totals of diverted electrical energy and want to end up with a stacked bargraph showing total energy used for water heating and the split between diverted PV and bought in gas.
There is no point posting the numerous options i've tried, as I have now tied myself in knots
Any help appreciated
Keith
Re: Really struggling with just one feed configuration
What version emoncms? emoncms.org or local? Inputs page or nodes nodes module?
Or more specifically what processes do you have at your disposal?
Is the incoming data an accumulating total pulse count? or is it the number of pulses since last update? is the input data received regularly or sporadically ?
To "scale" the pulse count to kWh you will probally need to multiply by 9.09 (1/0.11kWh) at some point, unless using a processor that requires a W input rather than KW so the "kilo" scaling should be factored in to.
Many of the processes used for pulse counting do not seem to be available on emoncms.org or in nodes module so your options may be limited unless using the inputs page of a local install.
Do you have kWh to kWh/d ? if not you may need to just use an accumulating total and a bar graph as that is the current trend, as used in "MyElectric"
Paul
Re: Really struggling with just one feed configuration
Thanks for the reply
emoncms.org is where I am trying to achieve the result but I do have an emonpi gathering data from various sources before those inputs are sent to emoncms.org where i doo all my input and feed processing
I have an accumulating pulse count regularly transmitted from the emonpi to emoncms.org
Any guidance appreciated
Keith
Re: Really struggling with just one feed configuration
The easiest way is probably to just multiply the input by 110 to get a Wh value (0.11kWh = 110Wh). You can do this in the input processing or in emonhub.conf.
Currently emonhub sends "number of pulses" with a "scale" of 1 and a "Unit" of p for pulse. By setting a scale of 110 and a unit of Wh it changes the pulse count to a Wh total system wide.
If you wish to stick to the "stock" emonhub.conf settings for your device to avoid any confusion when G&T do updates on the emonPi image then you can just add the scaling in at emoncms.org as the first process. Personally I would recommend the first (in emonhub) way as that is how emonhub is designed to be used, but that seems to go against the current flow, the choice is yours.
Once in emoncms and scaled to Wh, you can use the Wh accumulator if the pulse count is subject to rollover or resets. That process is designed to record only the increase of the last post and add it to the current value. Like a ratchet effect, if your device resets and starts from zero again, this process will continue logging a total based on the pre-reset value rather than dropping.
If your "pulse count" is never reset, i.e. a numerical count is passed from a meter or inverter, rather than counting led flashes, etc then you can just log directly to a feed.
Then, for the daily totals, you can use a kWh to kWh/d process or, using the barcharts as per "myelectric", just keep an eye on "kilo" scaling. You may need to scale by x1000 or x0.001 depending on which method(s) you use.
Paul
Re: Really struggling with just one feed configuration
Thanks Paul, will try again this evening
Keith
Re: Really struggling with just one feed configuration
I have a std gas meter reading in cubic feet with a rj11 port connected to an emontx3.2 via a small circuit to stop bounce etc. I then use the following to get KW and KW/daily. accumulatex0.01X2.83X1.02264x39.3x0.2777777log-kwhKWd
So 1 pulse is 1 cubic ft x0.01 converts to 100cf x2.83 converts to m3 x1.02264 is a volume correction factor used by gas co's x39.3 is calorific value x0.2777777 converts to KW
Some new meters read in m3 so the calcs are easy. It should say on your meter what it reads.
I think that the emontx3.4 has a pulse count input built in which MAY use a software debounce. This wasn't written when I did mine.
Please note that there are possible safety issue when doing this and your gas supplier might get funny!
Re: Really struggling with just one feed configuration
Thanks both, recommendations taken on board, we'll see what happens overnight
Keith
Re: Really struggling with just one feed configuration
Just to note. If you are reading pulses using a reed switch. Some kind of debounce will be needed. I seem to remember the hardware one which I built was recommended to be most reliable.
If you are reading a flashing led then no problem.
Re: Really struggling with just one feed configuration
Thanks Webby
I suspect the pulse input on the EMONPi incorporates something similar as i do not heave a bounce issue
Keith


Premium ingredients and your pet's specific taste come together with our recipe finder to create a mealtime experience unlike any other. Use Rocko's food calculator below to estimate how much you're spending on food for your dog based in his weight, age, and lifestyle.


"After Bruce Yan contacted us in February, 2018 and told us about A2
HotSpots services, I was intrigued. Before I was a brother, I was responsible for
cleaning up after our events. Without professional help, we were hit with some
pretty big fines that ended up accumulating to over $1000 for the 2016-2017 school year. The
personal customer service A2 HotSpots has is incredible and I believe they will
help us a lot."
- Lawrence Kim
Brother at Lambda Phi Epsilon
"A2 HotSpots reached out to us in mid-February and asked if we would be
interested in their services. My brothers and I came together and realized what a
great offer it is. We got fined almost every time we had a tailgate during football
season and numerous times after big parties. We are excited to begin working with
A2 HotSpots and recommend them to every fraternity/sorority."
- Jack Valentine
Brother at Sigma Phi Epsilon


Submit | Hacker News
Hacker News
new
|
threads
|
ask
|
submit
Log in
| Log out
Title
Url
or
Text
Leave url blank to submit a question for discussion
If there is no url, the text (if any) will appear at the top of the thread


|
cds
1.5.0
|
Cuckoo hash map. More...
#include <cds/container/cuckoo_map.h>
Public Types | |
| typedef Key | key_type |
| key type | |
| typedef T | mapped_type |
| value type stored in the container | |
|
typedef std::pair< key_type const, mapped_type > | value_type |
| Key-value pair type stored in the map. | |
| typedef Traits | options |
| traits | |
| typedef options::hash | hash |
| hash functor tuple wrapped for internal use | |
| typedef base_class::hash_tuple_type | hash_tuple_type |
| hash tuple type | |
| typedef base_class::mutex_policy | mutex_policy |
| Concurrent access policy, see cuckoo::type_traits::mutex_policy. | |
| typedef base_class::stat | stat |
| internal statistics type | |
| typedef base_class::key_equal_to | key_equal_to |
| Key equality functor; used only for unordered probe-set. | |
| typedef base_class::key_comparator | key_comparator |
| key comparing functor based on opt::compare and opt::less option setter. Used only for ordered probe set | |
| typedef base_class::allocator | allocator |
| allocator type used for internal bucket table allocations | |
|
typedef std::conditional < std::is_same< typename options::node_allocator, opt::none >::value, allocator, typename options::node_allocator > ::type | node_allocator |
| Node allocator type. | |
| typedef options::item_counter | item_counter |
| item counter type | |
Public Member Functions | |
| CuckooMap () | |
| Default constructor. More... | |
| CuckooMap (size_t nInitialSize, unsigned int nProbesetSize, unsigned int nProbesetThreshold=0) | |
| Constructs an object with given probe set size and threshold. More... | |
| CuckooMap (hash_tuple_type const &h) | |
| Constructs an object with given hash functor tuple. More... | |
| CuckooMap (size_t nInitialSize, unsigned int nProbesetSize, unsigned int nProbesetThreshold, hash_tuple_type const &h) | |
| Constructs a map with given probe set properties and hash functor tuple. More... | |
| CuckooMap (hash_tuple_type &&h) | |
| Constructs a map with given hash functor tuple (move semantics) More... | |
| CuckooMap (size_t nInitialSize, unsigned int nProbesetSize, unsigned int nProbesetThreshold, hash_tuple_type &&h) | |
| Constructs a map with given probe set properties and hash functor tuple (move semantics) More... | |
| ~CuckooMap () | |
| Destructor clears the map. | |
| template<typename K > | |
| bool | insert (K const &key) |
| Inserts new node with key and default value. More... | |
| template<typename K , typename V > | |
| bool | insert (K const &key, V const &val) |
| Inserts new node. More... | |
| template<typename K , typename Func > | |
| bool | insert_key (const K &key, Func func) |
| Inserts new node and initialize it by a functor. More... | |
| template<typename K , typename... Args> | |
| bool | emplace (K &&key, Args &&...args) |
For key key inserts data of type value_type constructed with std::forward<Args>(args)... More... | |
| template<typename K , typename Func > | |
| std::pair< bool, bool > | ensure (K const &key, Func func) |
Ensures that the key exists in the map. More... | |
| template<typename K > | |
| bool | erase (K const &key) |
Delete key from the map. More... | |
| template<typename K , typename Predicate > | |
| bool | erase_with (K const &key, Predicate pred) |
Deletes the item from the list using pred predicate for searching. More... | |
| template<typename K , typename Func > | |
| bool | erase (K const &key, Func f) |
Delete key from the map. More... | |
| template<typename K , typename Predicate , typename Func > | |
| bool | erase_with (K const &key, Predicate pred, Func f) |
Deletes the item from the list using pred predicate for searching. More... | |
| template<typename K , typename Func > | |
| bool | find (K const &key, Func f) |
Find the key key . More... | |
| template<typename K , typename Predicate , typename Func > | |
| bool | find_with (K const &key, Predicate pred, Func f) |
Find the key val using pred predicate for comparing. More... | |
| template<typename K > | |
| bool | find (K const &key) |
Find the key key . More... | |
| template<typename K , typename Predicate > | |
| bool | find_with (K const &key, Predicate pred) |
Find the key val using pred predicate for comparing. More... | |
| void | clear () |
| Clears the map. | |
| bool | empty () const |
| Checks if the map is empty. More... | |
| size_t | size () const |
| Returns item count in the map. | |
| size_t | bucket_count () const |
| Returns the size of hash table. More... | |
| size_t | lock_count () const |
| Returns lock array size. More... | |
| stat const & | statistics () const |
| Returns const reference to internal statistics. | |
|
mutex_policy::statistics_type const & | mutex_policy_statistics () const |
| Returns const reference to mutex policy internal statistics. | |
Static Public Attributes | |
| static bool const | c_isSorted = base_class::c_isSorted |
| whether the probe set should be ordered | |
| static size_t const | c_nArity = base_class::c_nArity |
| the arity of cuckoo hashing: the number of hash functors provided; minimum 2. | |
| static unsigned int const | c_nDefaultProbesetSize = base_class::c_nDefaultProbesetSize |
| default probeset size | |
| static size_t const | c_nDefaultInitialSize = base_class::c_nDefaultInitialSize |
| default initial size | |
| static unsigned int const | c_nRelocateLimit = base_class::c_nRelocateLimit |
| Count of attempts to relocate before giving up. | |
Additional Inherited Members | |
| Protected Types inherited from cds::intrusive::CuckooSet< std::pair< Key const, T >, Traits > | |
| typedef std::pair< Key const, T > | value_type |
| The value type stored in the set. | |
| typedef Traits | options |
| Set traits. | |
| typedef options::hook | hook |
| hook type | |
| typedef hook::node_type | node_type |
| node type | |
|
typedef get_node_traits < value_type, node_type, hook > ::type | node_traits |
| node traits | |
| typedef options::hash | hash |
| hash functor tuple wrapped for internal use | |
| typedef hash::hash_tuple_type | hash_tuple_type |
| Type of hash tuple. | |
| typedef options::stat | stat |
| internal statistics type | |
| typedef options::mutex_policy | original_mutex_policy |
| Concurrent access policy, see cuckoo::type_traits::mutex_policy. | |
| typedef original_mutex_policy::template rebind_statistics< typename std::conditional< std::is_same < stat, cuckoo::empty_stat > ::value, typename original_mutex_policy::empty_stat, typename original_mutex_policy::real_stat > ::type >::other | mutex_policy |
| Actual mutex policy. More... | |
|
typedef opt::details::make_equal_to < value_type, options,!c_isSorted > ::type | key_equal_to |
| Key equality functor; used only for unordered probe-set. | |
|
typedef opt::details::make_comparator < value_type, options >::type | key_comparator |
| key comparing functor based on opt::compare and opt::less option setter. Used only for ordered probe set | |
| typedef options::allocator | allocator |
| allocator type | |
| typedef options::item_counter | item_counter |
| item counter type | |
| typedef options::disposer | disposer |
| node disposer | |
| Protected Member Functions inherited from cds::intrusive::CuckooSet< std::pair< Key const, T >, Traits > | |
| CuckooSet () | |
| Default constructor. More... | |
| CuckooSet (size_t nInitialSize, unsigned int nProbesetSize, unsigned int nProbesetThreshold=0) | |
| Constructs the set object with given probe set size and threshold. More... | |
| CuckooSet (hash_tuple_type const &h) | |
| Constructs the set object with given hash functor tuple. More... | |
| CuckooSet (size_t nInitialSize, unsigned int nProbesetSize, unsigned int nProbesetThreshold, hash_tuple_type const &h) | |
| Constructs the set object with given probe set properties and hash functor tuple. More... | |
| CuckooSet (hash_tuple_type &&h) | |
| Constructs the set object with given hash functor tuple (move semantics) More... | |
| CuckooSet (size_t nInitialSize, unsigned int nProbesetSize, unsigned int nProbesetThreshold, hash_tuple_type &&h) | |
| Constructs the set object with given probe set properties and hash functor tuple (move semantics) More... | |
| ~CuckooSet () | |
| Destructor. | |
| bool | insert (value_type &val) |
| Inserts new node. More... | |
| bool | insert (value_type &val, Func f) |
| Inserts new node. More... | |
| std::pair< bool, bool > | ensure (value_type &val, Func func) |
Ensures that the val exists in the set. More... | |
| bool | unlink (value_type &val) |
Unlink the item val from the set. More... | |
| value_type * | erase (Q const &val) |
| Deletes the item from the set. More... | |
| value_type * | erase (Q const &val, Func f) |
| Delete the item from the set. More... | |
| value_type * | erase_with (Q const &val, Predicate pred) |
Deletes the item from the set using pred predicate for searching. More... | |
| value_type * | erase_with (Q const &val, Predicate pred, Func f) |
Deletes the item from the set using pred predicate for searching. More... | |
| bool | find (Q &val, Func f) |
Find the key val . More... | |
| bool | find (Q const &val, Func f) |
Find the key val . More... | |
| bool | find (Q const &val) |
Find the key val . More... | |
| bool | find_with (Q &val, Predicate pred, Func f) |
Find the key val using pred predicate for comparing. More... | |
| bool | find_with (Q const &val, Predicate pred, Func f) |
Find the key val using pred predicate for comparing. More... | |
| bool | find_with (Q const &val, Predicate pred) |
Find the key val using pred predicate for comparing. More... | |
| void | clear () |
| Clears the set. More... | |
| void | clear_and_dispose (Disposer oDisposer) |
Clears the set and calls disposer for each item. More... | |
| bool | empty () const |
| Checks if the set is empty. More... | |
| size_t | size () const |
| Returns item count in the set. | |
| size_t | bucket_count () const |
| Returns the size of hash table. More... | |
| size_t | lock_count () const |
| Returns lock array size. | |
| stat const & | statistics () const |
| Returns const reference to internal statistics. | |
|
mutex_policy::statistics_type const & | mutex_policy_statistics () const |
| Returns const reference to mutex policy internal statistics. | |
| Protected Attributes inherited from cds::intrusive::CuckooSet< std::pair< Key const, T >, Traits > | |
| bucket_entry * | m_BucketTable [c_nArity] |
| Bucket tables. | |
| size_t | m_nBucketMask |
| Hash bitmask; bucket table size minus 1. | |
| unsigned int const | m_nProbesetSize |
| Probe set size. | |
| unsigned int const | m_nProbesetThreshold |
| Probe set threshold. | |
| hash | m_Hash |
| Hash functor tuple. | |
| mutex_policy | m_MutexPolicy |
| concurrent access policy | |
| item_counter | m_ItemCounter |
| item counter | |
| stat | m_Stat |
| internal statistics | |
| Static Protected Attributes inherited from cds::intrusive::CuckooSet< std::pair< Key const, T >, Traits > | |
| static bool const | c_isSorted |
| whether the probe set should be ordered | |
| static size_t const | c_nArity |
| the arity of cuckoo hashing: the number of hash functors provided; minimum 2. | |
| static unsigned int const | c_nDefaultProbesetSize |
| default probeset size | |
| static size_t const | c_nDefaultInitialSize |
| default initial size | |
| static unsigned int const | c_nRelocateLimit |
| Count of attempts to relocate before giving up. | |
Cuckoo hash map.
Source
About Cuckoo hashing
[From "The Art of Multiprocessor Programming"] Cuckoo hashing is a hashing algorithm in which a newly added item displaces any earlier item occupying the same slot. For brevity, a table is a k-entry array of items. For a hash set f size N = 2k we use a two-entry array of tables, and two independent hash functions, h0, h1: KeyRange -> 0,...,k-1
mapping the set of possible keys to entries in he array. To test whether a value x
is in the set, find(x)
tests whether either table[0][h0(x)]
or table[1][h1(x)]
is equal to x
. Similarly, erase(x)
checks whether x
is in either table[0][h0(x)]
or table[1][h1(x)]
, ad removes it if found.
The insert(x)
successively "kicks out" conflicting items until every key has a slot. To add x
, the method swaps x
with y
, the current occupant of table[0][h0(x)]
. If the prior value was NULL
, it is done. Otherwise, it swaps the newly nest-less value y
for the current occupant of table[1][h1(y)]
in the same way. As before, if the prior value was NULL
, it is done. Otherwise, the method continues swapping entries (alternating tables) until it finds an empty slot. We might not find an empty slot, either because the table is full, or because the sequence of displacement forms a cycle. We therefore need an upper limit on the number of successive displacements we are willing to undertake. When this limit is exceeded, we resize the hash table, choose new hash functions and start over.
For concurrent cuckoo hashing, rather than organizing the set as a two-dimensional table of items, we use two-dimensional table of probe sets, where a probe set is a constant-sized set of items with the same hash code. Each probe set holds at most PROBE_SIZE
items, but the algorithm tries to ensure that when the set is quiescent (i.e no method call in progress) each probe set holds no more than THRESHOLD < PROBE_SET
items. While method calls are in-flight, a probe set may temporarily hold more than THRESHOLD
but never more than PROBE_SET
items.
In current implementation, a probe set can be defined either as a (single-linked) list or as a fixed-sized vector, optionally ordered.
In description above two-table cuckoo hashing (k = 2
) has been considered. We can generalize this approach for k >= 2
when we have k
hash functions h[0], ... h[k-1]
and k
tables table[0], ... table[k-1]
.
The search in probe set is linear, the complexity is O(PROBE_SET)
. The probe set may be ordered or not. Ordered probe set can be a little better since the average search complexity is O(PROBE_SET/2)
. However, the overhead of sorting can eliminate a gain of ordered search.
The probe set is ordered if opt::compare or opt::less is specified in CuckooSet
declaration. Otherwise, the probe set is unordered and CuckooSet
must contain opt::equal_to option.
Template arguments:
Key
- key typeT
- the type stored in the map.Traits
- type traits. See cuckoo::type_traits for explanation. It is possible to declare option-based set with cuckoo::make_traits metafunction result as Traits
template argument.Template argument list Options
... of cuckoo::make_traits metafunction are:
i,j: i != j => h[i](x) != h[j](x)
. The hash functors are passed as std::tuple< H1, H2, ... Hn >
. The number of hash functors specifies the number k
- the count of hash tables in cuckoo hashing. If the compiler supports variadic templates then k is unlimited, otherwise up to 10 different hash functors are supported.std::equal_to
. If this functor is defined then the probe-set will be unordered. If opt::compare or opt::less option is specified too, then the probe-set will be ordered and opt::equal_to will be ignored.std::less<T>
. If opt::compare or opt::less option is specified, then the probe-set will be ordered.CDS_DEFAULT_ALLOCATOR
false
.cuckoo::list
or cuckoo::vector<Capacity>
, Default is cuckoo::list
.Examples
Declares cuckoo mapping from std::string
to struct foo
. For cuckoo hashing we should provide at least two hash functions:
Cuckoo-map with list-based unordered probe set and storing hash values
If we provide less
functor instead of equal_to
we get as a result a cuckoo map with ordered probe set that may improve performance. Example for ordered vector-based probe-set:
|
inline |
Default constructor.
Initial size = c_nDefaultInitialSize
Probe set size:
probeset_type
is cuckoo::list
Capacity
if probeset_type
is cuckoo::vector<Capacity>
Probe set threshold = probe set size - 1
|
inline |
Constructs an object with given probe set size and threshold.
If probe set type is cuckoo::vector<Capacity>
vector then nProbesetSize
should be equal to vector's Capacity
.
| nInitialSize | Initial map size; if 0 - use default initial size c_nDefaultInitialSize |
| nProbesetSize | probe set size |
| nProbesetThreshold | probe set threshold, nProbesetThreshold < nProbesetSize . If 0, nProbesetThreshold = nProbesetSize - 1 |
|
inline |
Constructs an object with given hash functor tuple.
The probe set size and threshold are set as default, see CuckooSet()
| h | hash functor tuple of type std::tuple<H1, H2, ... Hn> where n == c_nArity |
|
inline |
Constructs a map with given probe set properties and hash functor tuple.
If probe set type is cuckoo::vector<Capacity>
vector then nProbesetSize
should be equal to vector's Capacity
.
| nInitialSize | Initial map size; if 0 - use default initial size c_nDefaultInitialSize |
| nProbesetSize | probe set size |
| nProbesetThreshold | probe set threshold, nProbesetThreshold < nProbesetSize . If 0, nProbesetThreshold = nProbesetSize - 1 |
| h | hash functor tuple of type std::tuple<H1, H2, ... Hn> where n == c_nArity |
|
inline |
Constructs a map with given hash functor tuple (move semantics)
The probe set size and threshold are set as default, see CuckooSet()
| h | hash functor tuple of type std::tuple<H1, H2, ... Hn> where n == c_nArity |
|
inline |
Constructs a map with given probe set properties and hash functor tuple (move semantics)
If probe set type is cuckoo::vector<Capacity>
vector then nProbesetSize
should be equal to vector's Capacity
.
| nInitialSize | Initial map size; if 0 - use default initial size c_nDefaultInitialSize |
| nProbesetSize | probe set size |
| nProbesetThreshold | probe set threshold, nProbesetThreshold < nProbesetSize . If 0, nProbesetThreshold = nProbesetSize - 1 |
| h | hash functor tuple of type std::tuple<H1, H2, ... Hn> where n == c_nArity |
|
inline |
Returns the size of hash table.
The hash table size is non-constant and can be increased via resizing.
|
inline |
For key key
inserts data of type value_type constructed with std::forward<Args>(args)...
Returns true
if inserting successful, false
otherwise.
This function is available only for compiler that supports variadic template and move semantics
|
inline |
Checks if the map is empty.
Emptiness is checked by item counting: if item count is zero then the map is empty.
|
inline |
Ensures that the key
exists in the map.
The operation performs inserting or changing data with lock-free manner.
If the key
not found in the map, then the new item created from key
is inserted into the map (note that in this case the key_type should be constructible from type K
). Otherwise, the functor func
is called with item found. The functor Func
may be a function with signature:
or a functor:
with arguments:
bNew
- true
if the item has been inserted, false
otherwiseitem
- item of the listThe functor may change any fields of the item.second
that is value_type.
You may pass func
argument by reference using boost::ref
.
Returns std::pair<bool, bool>
where first
is true if operation is successfull, second
is true if new item has been added or false
if the item with key
already is in the list.
|
inline |
|
inline |
Delete key
from the map.
The function searches an item with key key
, calls f
functor and deletes the item. If key
is not found, the functor is not called.
The functor Func
interface:
The functor may be passed by reference using boost:ref
Return true
if key is found and deleted, false
otherwise
See also: erase
|
inline |
Deletes the item from the list using pred
predicate for searching.
The function is an analog of erase(Q const&) but pred
is used for key comparing. If cuckoo map is ordered, then Predicate
should have the interface and semantics like std::less
. If cuckoo map is unordered, then Predicate
should have the interface and semantics like std::equal_to
. Predicate
must imply the same element order as the comparator used for building the map.
|
inline |
Deletes the item from the list using pred
predicate for searching.
The function is an analog of erase(Q const&, Func) but pred
is used for key comparing. If cuckoo map is ordered, then Predicate
should have the interface and semantics like std::less
. If cuckoo map is unordered, then Predicate
should have the interface and semantics like std::equal_to
. Predicate
must imply the same element order as the comparator used for building the map.
|
inline |
Find the key key
.
The function searches the item with key equal to key
and calls the functor f
for item found. The interface of Func
functor is:
where item
is the item found.
You can pass f
argument by reference using boost::ref
or cds::ref.
The functor may change item.second
.
The function returns true
if key
is found, false
otherwise.
|
inline |
|
inline |
Find the key val
using pred
predicate for comparing.
The function is an analog of find(K const&, Func) but pred
is used for key comparison. If you use ordered cuckoo map, then Predicate
should have the interface and semantics like std::less
. If you use unordered cuckoo map, then Predicate
should have the interface and semantics like std::equal_to
. pred
must imply the same element order as the comparator used for building the map.
|
inline |
Find the key val
using pred
predicate for comparing.
The function is an analog of find(K const&) but pred
is used for key comparison. If you use ordered cuckoo map, then Predicate
should have the interface and semantics like std::less
. If you use unordered cuckoo map, then Predicate
should have the interface and semantics like std::equal_to
. pred
must imply the same element order as the comparator used for building the map.
|
inline |
Inserts new node with key and default value.
The function creates a node with key
and default value, and then inserts the node created into the map.
Preconditions:
K
. In trivial case, K
is equal to key_type.Returns true
if inserting successful, false
otherwise.
|
inline |
Inserts new node.
The function creates a node with copy of val
value and then inserts the node created into the map.
Preconditions:
key
of type K
.val
of type V
.Returns true
if val
is inserted into the set, false
otherwise.
|
inline |
Inserts new node and initialize it by a functor.
This function inserts new node with key key
and if inserting is successful then it calls func
functor with signature
The argument item
of user-defined functor func
is the reference to the map's item inserted:
item.first
is a const reference to item's key that cannot be changed.item.second
is a reference to item's value that may be changed.The user-defined functor can be passed by reference using boost::ref
and it is called only if inserting is successful.
The key_type should be constructible from value of type K
.
The function allows to split creating of new item into two part:
key
;func
functorThis can be useful if complete initialization of object of value_type
is heavyweight and it is preferable that the initialization should be completed only if inserting is successful.
|
inline |
Returns lock array size.
The lock array size is constant.


I'm A Celebrity's Caitlyn Jenner labelled 'insane' by Kendall over memoir 'lies'
Kendall Jenner was particularly unimpressed by I'm A Celebrity campmate Caitlyn's tell-all memoir The Secrets of My Life after it 'attacked' Kris Jenner
by James Brinsford, https://www.facebook.com/james.brinsfordI'm A Celebrity campmate Caitlyn Jenner faced a backlash from her daughter Kendall, after the publication of her tell-all memoir.
When Caitlyn revealed her inside story in 2017's The Secrets of My Life, she faced the wrath of the Kardashians after they took exception to her revelations in the book.
Her 23-year-old daughter Kendall was among the most outspoken at the time, labelling the secrets that were uncovered as "insane" and taking aim at Caitlyn for dissing the Kardashian family.
In a clip from the family's reality show, Keeping Up With The Kardashians, Kendall vents her anger at momager Kris about Caitlyn going public.
The supermodel said: "I heard about all the stuff that she was saying in [the book] and just how a lot of it’s so not true.
"The weird part is, I don’t think it’s purposeful lying. I think she really just thinks that’s what happened for some weird reason.”
Kendall's biggest frustration is over the way Caitlyn 'attacks' the Kardashians, with Kim, Kourtney and Khloe coming under fire.
She continued: "And then she goes around dissing the Kardashians, but it’s like, those are the kids that you raised! If you have a problem with them, you raised them!
"That makes no sense to me that she would go around bashing us for no reason. That’s insane!”
Kendall found a supporter in her mother Kris, who was married to Caitlyn when she was Bruce Jenner, between 1991 and 2015.
Kris agreed with her Kendall’s sentiments, saying: “It could’ve been handled in the most amazing, loving way.
"Talk about your journey and keep it to that. That I would’ve had great respect for... there’s lies that are printed in a book that lives there for the end of time, so your children are going to read this book about their grandparents and have a story that’s fabricated, that’s in print, and is a fabrication."
Later that year, Kim Kardashian appeared on the Ellen DeGeneres show and repeated the family's thoughts that Caitlyn went too far with her thoughts on the reality TV queens.
Kim said: "I don’t think it’s necessary and I just feel like it’s unfair, things aren’t truthful. I just feel like I don’t respect the character that she’s showing now.”
Caitlyn is currently Down Under in the I'm A Celebrity... Get Me Out Of Here! jungle and is one of the favourites t reach the final of the ITV series.
Do you have a story to sell? Get in touch with us at<EMAIL_ADDRESS>or call us direct 0207 29 33033.


Functions for assigning Clarke or Parkes (Consensus) error grid zones to blood glucose values, and for plotting both types of error grids in both mg/mL and mmol/L units.
| Version: | 2.0.0 |
| Depends: | R (≥ 2.14.0) |
| Imports: | ggplot2, mgcv |
| Suggests: | knitr |
| Published: | 2017-03-21 |
| Author: | Daniel Schmolze [aut, cre], Sergei Mihhailov [ctb] |
| Maintainer: | Daniel Schmolze <ega at schmolze.com> |
| License: | MIT + file LICENSE |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | ega results |
| Reference manual: | ega.pdf |
| Vignettes: |
ega Vignette |
| Package source: | ega_2.0.0.tar.gz |
| Windows binaries: | r-devel: ega_2.0.0.zip, r-release: ega_2.0.0.zip, r-oldrel: ega_2.0.0.zip |
| OS X binaries: | r-release: ega_2.0.0.tgz, r-oldrel: ega_2.0.0.tgz |
| Old sources: | ega archive |
Please use the canonical form https://CRAN.R-project.org/package=ega to link to this page.


Vagrant
Vagrant
Demo
vagrant up
What is Vagrant?
Create and configure lightweight, reproducible, and portable development environments.
Provides a single command line interface for multiple virtualization providers - usually VirtualBox.
What problem is Vagrant solving?
Serving from the local filesystem can be problematic
What problem is Vagrant solving?
Mamp\Wamp\Xampp
What problem is Vagrant solving?
Cross Platform Dev Environments - MHVLUG
(1)
(2)
What problem is Vagrant solving?
Emulate Production environments
Reproducible Dev Environments
Scripting things is awesome
Repo available
Reproducible Dev Environments
Scripted provisioning
Works with all sorts of provisioning utilities
Chef, Puppet, Ansible
Also Salt, CFEngine, Docker
Demo
vagrant init ubuntu/trusty
look at a
vagrantfile
and check on our demo dev environment.
End Section.


DataObject Class
DataObject are used to synchronize states between the connected clients. DataObjects live inside a room. Every DataObject consists of key/value pairs, where keys must be unique integers (per DataObject) and the values must be a Buffer.
Every User has his own DataObject. Additional DataObjects could be created by a client or by the server.
DataObject could be used to represent objects like e.g. bots, windows, laser shots, grenades, barrels, text blocks, cars etc.
var dataObject = user.dataObject; dataObject.getValue(DataKey.X_POS).writeInt16BE(500, 0); dataObject.getValue(DataKey.Y_POS).writeInt16BE(500, 0); dataObject.getValue(DataKey.NAME).write('John Doe Jr.'); //broadcast values to dataObject's room dataObject.broadcastValues([DataKey.X_POS, DataKey.Y_POS, DataKey.NAME]);
Methods
broadcastAllValues
()
Broadcasts all values of all keys to the users in the dataObject's room.
broadcastValues
(
-
keys
Broadcasts the values of the given keys to the users in the dataObject's room.
Parameters:
-
keys
ArrayAn array with keys.
Example:
//broadcast the values of the keys 0, 4 and 12 dataObject.broadcastValues([0, 4, 12]);


Home Page
Mifestival
Gallery
Dropdown ▼
My Mega Menu - This is just a heading
These are the indvidual catagories
One
Two
Three
Four
These are the indvidual catagories
One
Two
Three
Four
These are the indvidual catagories
One
Two
Three
Four


class Mocha::Cardinality
Constants
- INFINITY
Attributes
maximum[R]
required[R]
Public Class Methods
at_least(count)
click to toggle source
# File lib/mocha/cardinality.rb, line 13 def at_least(count) new(count, INFINITY) end
at_most(count)
click to toggle source
# File lib/mocha/cardinality.rb, line 17 def at_most(count) new(0, count) end
exactly(count)
click to toggle source
# File lib/mocha/cardinality.rb, line 9 def exactly(count) new(count, count) end
new(required, maximum)
click to toggle source
# File lib/mocha/cardinality.rb, line 30 def initialize(required, maximum) @required, @maximum = required, maximum end
times(range_or_count)
click to toggle source
# File lib/mocha/cardinality.rb, line 21 def times(range_or_count) case range_or_count when Range then new(range_or_count.first, range_or_count.last) else new(range_or_count, range_or_count) end end
Public Instance Methods
allowed_any_number_of_times?()
click to toggle source
# File lib/mocha/cardinality.rb, line 50 def allowed_any_number_of_times? required == 0 && infinite?(maximum) end
invocations_allowed?(invocation_count)
click to toggle source
# File lib/mocha/cardinality.rb, line 34 def invocations_allowed?(invocation_count) invocation_count < maximum end
mocha_inspect()
click to toggle source
# File lib/mocha/cardinality.rb, line 58 def mocha_inspect if allowed_any_number_of_times? "allowed any number of times" else if required == 0 && maximum == 0 "expected never" elsif required == maximum "expected exactly #{times(required)}" elsif infinite?(maximum) "expected at least #{times(required)}" elsif required == 0 "expected at most #{times(maximum)}" else "expected between #{required} and #{times(maximum)}" end end end
needs_verifying?()
click to toggle source
# File lib/mocha/cardinality.rb, line 42 def needs_verifying? !allowed_any_number_of_times? end
satisfied?(invocations_so_far)
click to toggle source
# File lib/mocha/cardinality.rb, line 38 def satisfied?(invocations_so_far) invocations_so_far >= required end
used?(invocation_count)
click to toggle source
# File lib/mocha/cardinality.rb, line 54 def used?(invocation_count) (invocation_count > 0) || (maximum == 0) end
verified?(invocation_count)
click to toggle source
# File lib/mocha/cardinality.rb, line 46 def verified?(invocation_count) (invocation_count >= required) && (invocation_count <= maximum) end
Protected Instance Methods
infinite?(number)
click to toggle source
# File lib/mocha/cardinality.rb, line 89 def infinite?(number) number.respond_to?(:infinite?) && number.infinite? end
times(number)
click to toggle source
# File lib/mocha/cardinality.rb, line 80 def times(number) case number when 0 then "no times" when 1 then "once" when 2 then "twice" else "#{number} times" end end


Select CBE to calculate your GPA for CBE majors, which includes all CBE grades (excluding Business Calculus and MIS 220). CBE GPA is based only on classes taken at Western.
Select MSCM to calculate your MSCM Foundation GPA. Equivalent classes taken outside Western do count toward this GPA and must be manually entered. Only the most recent attempt is used. Business Calculus is included in this GPA. MIS 220 or a graded equivalent course taken elsewhere is not included.
To add a class: complete the information in the provided fields and click Add
To remove a class: click on the next to it
To modify the grade/credits on a listed class, click on them and edit
If you have repeated a course the older attempt will be listed in gray font
To remove all modifications you have made and restore only those CBE classes listed on your Western transcript, click the Restore button
You need to be signed into MyWestern for us to access your transcript
GPA: {{(modeMSCM) ? gpaMSCM.gpa : gpaCBE.gpa}}
{{modeMSCM ? "MSCM Foundation Calculator" :
"CBE Grade Calculator"}}


Advanced skills in creating products of different topics, starting from discover the necessity of the user,to create the best solution to solve them.
Skills in the photgraphy field. Good knowledge of programs to post-product pictures and videos.
Good knowledge of graphic programs like: Adobe InDesign, Adobe Illustrator, Adobe Photoshop, Adobe XD and PowerPoint.
advanced Skills in create 3D Models and Renders. Knowledge of Rhinoceros 3D, Inventor and Fusion.
This project was created in collaboration with a working group on the topic of "co-working spaces". Our research focused on the problematic issue of co-working spaces, namely the organisation of personal desk space. We thus created M.I.O., a totally innovative organisation system, thanks to the tray that allows people to move around the space without any problems.
This idea takes shape and inspiration from the famous Post-It notes produced by 3M. The need we had was to create a reminder for older people to take their pills without having to have those big plastic boxes. So we created a product that is easy to put anywhere in the house, in particular places that serve as a reminder (fridge, toaster, bedside table, etc.).
miXie was born from the idea of creating a product that could help the user in the preparation of liquid compounds inside the pot. There are currently pot mixers on the market, but none of them allow the use of the lid. So I thought of creating a product that would cover the market gap in this field.
My name is Leonardo Silvestri, I am 22 years old and I am currently a Design student at the Politecnico di Milano. In addition to this I had an Erasmus+ experience in Aveiro (Portugal).
Download Resume


We sell mices!
- maximize one-to-one convergence
- whiteboard cross-platform e-tailers
- incubate plug-and-play platforms
- facilitate cross-media markets
- cultivate front-end markets
- envisioneer web-enabled architectures
- matrix extensible paradigms
- visualize robust experiences
- optimize wireless e-markets


Long URLs are really ugly.  On top of it, they are difficult to share and remember.
What's the solution?
Creating a service that returns a shortened URL corresponding a long URL. The short URL,
when visited must redirect to the the original long URL.
Kata does exactly the same for you, along with a few really helpful features.
Without logging in or registering, you can use Kata to generate shortened URLs with a random
alias, which will be functional 24/7 since the time of generation.
But if you register with us, you can
- Add a custom alias (OR keep it random) - View all the URLs you shortened till date - View how many times your shortened
URL has been visited
In the future, I have planned to make - A REST API for the backend - A Browser Extension (Chrome, Edge, Firefox & Brave) - A client side rendered web app - A QR Code for urls - Optimizations to the database lookup by
implementing a bloom filter - Custom Previews - URLs which can expire after certain time - Editble custom


NbDocument
.
This document describes the NetBeans Editor API, attempting to give a summary of what you need to know about it for different purposes.
The Open APIs only cover certain aspects of working with the editor. For example, you can open documents, modify them, add annotations, register editor kits you built from scratch, and so on. Some more specific capabilities that are frequently requested are not guaranteed by the Open APIs but may be possible using NetBeans modules which may have differing standards of API design, documentation, and compatibility from release to release. Here are some resources that may also be of interest:
The NetBeans editor module is the typical editor implementation. It is possible to use base classes in this module as a starting point for defining your own editor kits: syntax coloring, code completion, etc. for new languages and file formats. As of this writing, the details of how to add new editor kits from a NetBeans module are virtually undocumented, and compatibility is likely to be broken in future NetBeans releases, so do so at your own risk.
The lexer module is planned to make creation of new editor kits easier.
The Editor API may be used at a first cut for two purposes: accessing editor-related functionality from within NetBeans for use by other modules; and implementing a custom editor that can be inserted into NetBeans as a module, replacing or supplementing the NetBeans-supplied one.
JFrame
) from template - in either case, there is a
new .java
file in the user's
repository containing Java source, together with a .form
file.
.form
file associated with a
.java
file;
when it finds them, it:
.form
) file in the Form Editor.
.java
file in an editor.
.java
file was already open in some editor
window or pane, then this window/pane is reused and just given
focus (i.e. a new
JEditorPane
is created, but using the same
EditorKit
and
StyledDocument
).
If not, a new JEditorPane
is
asked
to create an editor for the Java source content type (typically
text/x-java
). Now, the Form Editor's data loader is an
extension of the Java Source data loader; the Java loader specially treats the request to load its content
into an editor: it inserts most of the text straight into the
StyledDocument
just as you would expect, but also checks
for special comments looking something like //GEN-BEGIN:
in the source code, which are the markers used to indicate guarded
areas in saved source code. When it finds one, rather than inserting
the marker into the document, it uses
NbDocument.insertGuarded(...)
to insert the enclosed text area, making it read-only to the user.
JEditorPane
now has a StyledDocument
suited to Java source code loaded into it. This document may be
implemented by the standard NetBeans Editor, or it may be a custom editor. The user may edit non-guarded
parts of the document; attempted actions (like typing) that would
affect guarded areas are prevented by the editor in use.
Note that the Form Editor directly or indirectly calls
Document.insertString(...)
(or
NbDocument.insertGuarded(...)
)
and
Document.remove(...)
to do this work, so it is itself unaffected by guard blocks.
NbDocument.WriteLockable.runAtomicAsUser(...)
to make sure that the guard blocks are properly honored.
//GEN-BEGIN:
before the text is written to file.
File f = new File("/home/me/sources/my/pkg/MyFile.java"); FileObject fo = FileUtil.fromFile(f)[0]; DataObject d = DataObject.find(fo); EditorCookie ec = (EditorCookie)d.getCookie(EditorCookie.class); ec.open(); StyledDocument doc = ec.openDocument();
if (ec.isModified()) ...Then see what the current contents of line 26 are (zero-based):
int start=NbDocument.findLineOffset(doc, 25); int end=NbDocument.findLineOffset(doc, 26); String contents=doc.getText(start, end-start);And display this line in the Editor window:
ec.getLineSet().getCurrent(25).show(Line.SHOW_TRY_SHOW);Now insert a new line here after it:
final BadLocationException[] exc = new BadLocationException[] {null}; NbDocument.runAtomicAsUser(doc, new Runnable() { public void run() { try { doc.insertString(NbDocument.findLineOffset(doc, 26), "// New text.\n", SimpleAttributeSet.EMPTY); } catch (BadLocationException e) { exc[0] = e; } } }); if (exc[0] != null) throw exc[0];All done! Prompt to save the file, and close the editor window:
ec.close();
NbDocument.markGuarded(...)
;
the guard block may subsequently be removed using
NbDocument.unmarkGuarded(...)
.
Typically you will want to remember the positions of the guard
blocks you added using a position, so that user edits in the vicinity
of the guard block will be taken into consideration. You may create
such a position using
NbDocument.createPosition(...)
,
and retrieve its current offset when needed using
Position.getOffset()
.
NbDocument.insertGuarded(...)
.
Document.insertString(...)
and
Document.remove(...)
.
You probably want to use
NbDocument.runAtomic(...)
to prevent errors in threaded code.
To do the same sort of thing while preventing yourself from
accidentally touching a guard block, i.e. if your module was not the
creator of the guard block (or you are not even sure if there any in
the document), please use
NbDocument.runAtomicAsUser(...)
instead.
In order to provide richer interactions between the editor and other modules, the APIs provide for a system of annotations which are used for things like debugger breakpoints, erroneous lines, and so on. From an API perspective, anyone can create annotations and attach them to a document; the editor implementation should attempt to display these annotations as it sees fit, taking hints from the annotation provider.
Using annotations on a document need not be difficult. Everything you need to do is to define the visual appearance of your annotation and to provide a class which will represent it programmatically. For example, if you are writing a module which interacts with an open document containing some sort of program code, and the user has made a syntax error in the code which you were able to detect and want to point out, you may want to mark the line or part of the line as "erroneous". To achieve this you must:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE type PUBLIC "-//NetBeans//DTD annotation type 1.0//EN" "http://www.netbeans.org/dtds/annotation-type-1_0.dtd"> <type name="org-nb-modules-foo-some-annotation" description_key="LBL_some-annotation" localizing_bundle="org.nb.modules.foo.Bundle" visible="true" glyph="nbresloc:/org/nb/modules/foo/some-annotation-glyph.gif" highlight="#FFFF00" type="line"/>
As you can see the definition of the annotation type consists of the highlight color; the glyph icon which could be shown in the left margin of the editing area - the glyph gutter; the localized name; and so on. For more details about each field in the DTD see below.
Annotation
abstract class and define your own annotation. You must specify the
type - which matches the code name given in the XML
description - and a short description, which can form tool-tip text for
the annotation. For example:
public final class SomeAnnotation extends Annotation { private final String error; public SomeAnnotation(String error) { this.error = error; } public String getAnnotationType() { return "org-nb-modules-foo-some-annotation"; } public String getShortDescription() { // Localize this with NbBundle: return "The error was: " + error; } }Note that you can return the tooltip text asynchronously, on demand, or dynamically: you may return
null
for no tooltip, and
you may later return a new or changed tooltip - just use:
firePropertyChange(PROP_SHORT_DESCRIPTION, null, null);to inform the editor of the change. The tooltip should be refreshed on-screen.
Annotatable
object. Normally this will be a
Line
representing a whole line of text, or a
Line.Part
representing a section of a line. For example:
// Given error output like: "pkg/Name.java:123: You made a mistake" FileObject fileWithError = fs.findResource("pkg/Name.java"); DataObject objWithError = DataObject.find(fileWithError); LineCookie cookie = (LineCookie)objWithError.getCookie(LineCookie.class); Line.Set lineSet = cookie.getLineSet(); final Line line = lineSet.getOriginal(123); final Annotation ann = new SomeAnnotation("You made a mistake"); ann.attach(line);
In this example the user may correct the erroneous line, or at least do something to it - in this case we assume that the annotation is no longer needed, and should be removed. It is a simple call to do this; of course you need to know when it is appropriate, so for example:
line.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { String type = ev.getPropertyName(); if (type == null || type == Annotatable.PROP_TEXT) { // User edited the line, assume error should be cleared. ann.detach(); line.removePropertyChangeListener(this); } } });
It is possible that there might be more than one annotation on the same line. In this case it depends on the capabilities of the editor how the annotations will be displayed. The simplest scenario is that only one annotation is visible at time and the user can cycle through them. If this is the case it may be helpful to force the editor to move your annotation in front of any others:
ann.moveToFront();
NetBeans presents GUI settings to the user in which it is possible to customize the attributes of annotation types - for example, foreground and background color. Remember however that some editor implementations may find it difficult or impossible to accurately display all of these settings (for example display of arbitrary glyphs may be infeasible).
<type>
element are:
name
Annotation.getAnnotationType()
.description_key
localizing_bundle
description_key
.visible
glyph
nbresloc
protocol to access module resources and
automatically localize them. A 16x16 GIF is common.highlight
foreground
type
line
(full-line annotation) and linepart
(may be applied to a column range within a line).actions
<folder name="YourAnnotationTypeActions"> <file name="org-foo-BarAction.instance"/> </folder>
severity
error
,
warning
, ok
and none
. Annotations with severity
other then none
will be shown in the Error Stripe using default color
or color specified in custom_sidebar_color
. Default value is none
.
custom_sidebar_color
severity
is
not feasible. Note that this setting has no effect if severity
is set to none
.
browseable
true
and false
, default is false
.
priority
The annotation <type>
may also contain the
<combinations>
element - a definition of annotation
combinations. If two or more annotations from the same module (or
otherwise mutually known) are on the same line it might make sense to
combine them into one annotation visually. For example, if a debugger
module attached a breakpoint to a line and the current program counter
reached the same line, it is more pleasant to show a combination of
these two annotations rather than two separate annotations. This can
be accomplished using a combination definition. A combined annotation
type is otherwise normal (it may have a glyph icon and colors), but it
also contains the definition of annotation types which are subsumed by
this type. For example the combination of program counter with
breakpoint could be defined as follows:
<combinations tiptext_key="PC_BREAKPOINT_COMBINATION_TOOLTIP_TEXT"> <combine annotationtype="NameOfTheBreakpointAnnotationType"/> <combine annotationtype="NameOfTheCurrentPCAnnotationType"/> </combinations>
It is the responsibility of the editor to display combinations where the criteria for combinations as defined in available annotation types are met.
Attributes of the <combinations>
element
are:
tiptext_key
description_key
on <type>
. Since
multiple annotation types are being combined, each of which might have
its own tooltip, the combined annotation has just a static tooltip
which might explain that several annotations are combined in it.order
min_optionals
optional
of the
<combine/>
element. The combination is defined as a
list of annotation types to be combined. To make creation of the
combination more flexible, some annotation types can be optional
(optional
attribute on <combine/>
).
min_optionals
is then used to specify the minimum number
of optional annotation types which must be found to make the
combination valid. For example, you may have have a conditional
breakpoint and disabled breakpoint and wish to combine either of them
with the current program counter. You can define it as follows:
<combinations tiptext_key="COMBINATION_TOOLTIP_TEXT" min_optionals="1"> <combine annotationtype="debugger-disabledbreakpoint" optional="true"/> <combine annotationtype="debugger-conditionalbreakpoint" optional="true"/> <combine annotationtype="debugger-currentpc"/> </combinations>This way you specify that both breakpoints are optional, but that at least one must be found to make the combination succeed.
<combinations>
element can contain only
<combine/>
elements (one for each annotation type)
and they can have these attributes:
annotationtype
name
on <type>
.absorb_all
optional
min
If you would like to add something akin to guard blocks to a custom
file type handled by your module, you will need to insert the
appropriate hooks. The best thing to do is to subclass
EditorSupport
,
and use this subclass to implement cookies such as
EditorCookie
.
Now just provide appropriate implementations of
CloneableEditorSupport.loadFromStreamToKit(...)
(to interpret special markings in the saved file and convert them into document attributes); and
CloneableEditorSupport.saveFromKitToStream(...)
(to translate these attributes back into ASCII markings).
Beyond being a generic EditorKit, there are two significant pieces of functionality used by NetBeans which the editor should support if at all possible:
javax.swing.text.StyledDocument
to hold the content of the buffer being edited.
Actually, you could get away with a plain
Document
if you really wanted, but you would be unable to support guard blocks
and would have a harder time supporting annotations and line numbering; while this would probably
suffice for an editor that was not to be used on Java source code, in
general it is very much recommended that StyledDocument
be used instead.
Document
from the registered editor kit; however
this will not support guards (or NetBeans attributes either), and so if the
user edits what should have been a guarded block, they may cause
errors in the code, and their edits may be overwritten by NetBeans. If
you implement StyledDocument
, it is assumed you are
handling guard blocks, but again it is up to you to actually do so
correctly - NetBeans cannot determine this.
There is very little to the way NetBeans indicates
guarding. Essentially, it is just a character attribute, NbDocument.GUARDED
,
which will be set to Boolean.TRUE
for guarded characters,
and Boolean.FALSE
(or unset) for others; it is typically
placed on the document by means of the
NbDocument.markGuarded(...)
and
NbDocument.unmarkGuarded(...)
methods, which just call
StyledDocument.setCharacterAttributes(...)
.
Very likely you will want to override this method, calling its
superclass method but first checking to see if the attribute setting
mentions GUARDED
, whether setting it to TRUE
or FALSE
, and if so keeping track in another data
structure of which ranges of characters are currently guarded or not;
or you might already have a good way of keeping track of attributes in
general and would rather just query this attribute when it is
needed. If overriding setCharacterAttributes
for this
purpose, also remember to check the attributes on
insertString
,
etc.
Note that currently guarded areas always consist of entire lines or sets of lines, so if you make this assumption your editor will be acceptable - but please handle sub-line granularity of guard blocks if you can do so easily, in case this situation changes. Along the same lines, you should make sure that users may only insert a newline immediately before a guarded block, and not any other character, for otherwise a half-guarded line would be created.
It is important to understand that the guarded attribute applies
only to user modifications, i.e. those undertaken in the
context of a user-initiated Swing action, or by
NbDocument.runAtomicAsUser(...)
.
Internal NetBeans module code may freely insert or remove text (typically using
NbDocument.insertGuarded(...)
and Document.remove(...)
). For example, this would be
done by the Form Editor component while adding a new event
handler. The editor implementation should permit such programmatic
inserts and removes, while corresponding user actions must be
forbidden.
It is preferable, though optional, for the editor to visually mark
guarded areas, say with a special background color. It is your
responsibility to choose a color or another appearance for this
purpose, however. Possibly NetBeans will specify a
StyleConstants.ColorConstants.Background
attribute describing which color will actually be used, and make this
color settable in a control panel, but assume that you need to
colorize based on this attribute yourself.
EditorKit.getActions()
)
applicable to your editor kit be reviewed for the possibility that
they might attempt to change the content of the document (so, not only
character inserts but search-and-replace, block paste, etc.). Any that
do perform some kind of mutation should be reimplemented (or
a wrapper written for them) so that they check to make sure that a
guarded block is not being violated.
Even better, whenever possible an action should be disabled when it can easily be determined in advance that it would be in violation if performed at that time. As an example, if the user moves the caret into the middle of a guarded block, it would be much preferable for the editor to disable "Paste" (say, on a right-click context menu) for the time being, rather than permitting a Paste action to be invoked but then displaying an error dialog or beeping!
StyledDocument
, such as Swing's
DefaultStyledDocument
,
which already has a full implementation of important things but no
recognition of guard blocks.
The idea is to first get a list of all
actions
which might involve buffer modification - or, to be conservative, just
all actions. For each of these, create a new action which calls the
original
actionPerformed
,
but "dynamically binds" some special flag stored with the document to
true - dynamic binding here means that it should be restored (turned
back off) in a finally
block, and also that its value
should be specific to the executing thread (and its children,
perhaps). This flag indicates that operations are currently being
performed from a user action.
Override the insertString(...)
and remove
methods. They should check the flag just mentioned. If it is turned
off, just call the superclass method normally. If it is turned on,
check whether the requested insertion or removal is affecting a
guarded area (insertion within, or removal within or overlapping). If
not, again call the superclass method. If there is an attempted
violation, you might do one or more of the following:
javax.swing.text.BadLocationException
and see what happens. Since the original action cannot ignore this
exception (since actionPerformed
does not have any
throws), it must do something - currently, it seems the Swing actions
simply beep.
Toolkit.beep()
).
This would probably need to be done with
SwingUtilities.invokeLater(...)
.
Now bind all invocation objects (such as keymaps) to the new "wrapper" actions. Note that just returning them from the editor kit may not suffice.
If you go to the trouble of identifying specifically which actions could cause a violation, and under what circumstances they would or would not do so, then you could make specific wrappers that could disable actions, or safely invoke them only when possible, calling the original action if all is well - this is just one way to do the recommended implementation.
SimpleAttributeSet sas=new SimpleAttributeSet();
sas.addAttribute(NbDocument.GUARDED, Boolean.TRUE);
doc.setCharacterAttributes(0, 100, sas, false);
Now verify that modification attempts in this block are disabled.
You should make sure that lines in the editor are separated by exactly one text character - a newline. The APIs may rely on this to count character positions during parsing, so that this functionality may be efficient.
Furthermore you should ensure that the
default root element
of the document has child elements corresponding to all text lines;
and if using StyledDocument
, that
"paragraph" elements
again correspond to text lines. Proper use of elements corresponding
to lines will enable the APIs to accurately translate between buffer
offsets and line numbers. It is fine to have additional element
structures not corresponding to lines so long as the two conditions
above are met.
NbDocument.Annotatable
interface.NbDocument.Annotatable
public void addAnnotation(Position startPos, int length, Annotation annotation);The method is called with a
Position
in the document; the
length of the annotation (if the annotation is of the whole-line type,
the length will be -1
); and the annotation instance. Now
it is the responsibility of editor to collect all annotations for the
document and to display them properly. It may be helpful to take
advantage of StyledDocument
for changing the style of the
line (or part of the line). As for the glyph icon, it is fully up to
the editor how to represent it (if at all). The NetBeans standard
editor displays it in the left gutter.
The second method removed an annotation previously added:
public void removeAnnotation(Annotation annotation);This method will be called when the annotation is programmatically detached, or the document is about to be closed.
The editor should combine annotation types where requested if this behavior is supported.
If you want your editor to support printing of its contents,
you might just provide no special support. In this case,
printing should be able to work with plain text. If you have a styled
document, it is possible that NetBeans will be able to run through the
entire contents of the document; for each paragraph, retrieve its
Style
, and for each character, its attribute set; and
then attempt to convert these (Swing) formatting specifications into
(AWT) attributed character descriptions, for purposes of printing.
However, this process could be rather slow; is not terribly exact;
and may not be implemented. To better support printing, it is
desirable for the StyledDocument
to implement
org.openide.text.NbDocument.Printable
,
which will allow it to specify exactly how it wants to be printed. The
method
NbDocument.Printable.createPrintIterators(...)
should return a list of
java.text.AttributedCharacterIterator
s,
providing attributes taken from
java.awt.font.TextAttribute
.
Also, if your document supports either
java.awt.print.Printable
or
java.awt.print.Pageable
,
then these interfaces will be used to perform the printing
directly. You should only need to do this if attributed characters do
not satisfactorily capture everything that you are interested in
printing - for example, if your editor is working on HTML and it is
desired to print embedded images.
StyledDocument
implementation to
be able to lock the document against write access, as this will make
certain operations (performed by NetBeans, not in response to user
events) more reliable and safer. In order to do this, please
implement
org.openide.text.NbDocument.WriteLockable
and its
runAtomic(...)
method. The Runnable
passed in this way should be
executed with all other write actions (and reads) disabled,
i.e. blocked.
If you are extending
javax.swing.text.AbstractDocument
,
please note that just enclosing the Runnable
block in
calls to
writeLock()
and
writeUnlock()
will not do the trick - these calls do take out exclusive locks,
however they specifically do not nest. This means that you cannot
lock and then enter a runnable this way, because any modifications
attempted within the runnable will throw an illegal state
exception. Also, the locking methods are final and cannot be
advised to nest. So you must find some other way to implement
this, e.g. your own locks.
You must also implement
NbDocument.WriteLockable.runAtomicAsUser(...)
,
which is very similar but is invoked on behalf of user actions
unrelated to whatever component created the guard blocks - e.g., this
would be used to rename a method from the Explorer, in which case the
rename ought to check that the renamed method is not guarded due to
being used by the Form Editor. Thus, it should attempt to make
modifications requested by the Runnable
, locking out
other modifications, but ensure that guard blocks are not violated.
Any attempted violation should be prevented (or rolled back at the end
of the runnable), and after the end of the runnable an appropriate
exception should be thrown.
Note that while both methods in this interface ought to provide a
transactional interface if at all possible - i.e., either succeed at
executing the entire Runnable
, or fail and leave the
document untouched - the transactional aspect is much more important to
implement properly for runAtomicAsUser
. This is because
it is quite possible for an innocent user action (e.g. attempting to
rename a JavaBean property) to interfere with a guard block, and the
document should not be left half-modified after such a
mistake. On the other hand, a failure in the block of
runAtomic
is more likely to be an bug in some module,
and not the user's fault; so perfect recovery is of course less
important, as the bug should be fixed anyway.
There is currently no default convenience implementation of
runAtomicAsUser
, as any implementation may well be
closely tied to how guard blocks are implemented in that particular
editor - e.g. in Emacs there will be a quite idiosyncratic
implementation.
org.openide.text.NbDocument.PositionBiasable
and its
createPosition(...)
method, to create a position marker which not only moves freely with
insertions and deletions in nearby text, but also specifies the
direction the marker will move to when text is inserted at that
position.
If this is not done, NetBeans creates its own replacement.
NetBeans sometimes asks the editor to scroll the display so that a
given line will be displayed. You should not need to do anything
special to support this;
Caret.setDot()
will be called and ought to perform the scrolling appropriately.
Ctrl-R
; etc.
While it might be possible to add some of these things manually into the NetBeans action containers (like the "Main Window" entry in the Environment, visible in the Explorer), this is discouraged as that makes it more difficult for NetBeans to manage actions added by various modules.
Instead, you should use the Actions API to add
CallbackSystemAction
s
(e.g.) to your module.
You do not need to do much to support this editor toolbar: in the
getActions()
method of your editor kit, if there are any actions which are also
SystemAction
s
implementing
Presenter.Toolbar
,
then this interface will be used to get a
java.awt.Component
which will be displayed in the editor toolbar. You are free to make
this component be whatever you like, e.g. a button to run some
routine, or a checkbox to toggle an option; just add the appropriate
event listeners to it.
A few basic editing commands you do not need to explicitly
present to NetBeans; this will be done for you automatically. NetBeans
tests whether an editor kit provides (from its
EditorKit.getActions()
method) any actions with certain
names. Default instances of these are also available in the
DefaultEditorKit
class, but your actions will be
recognized based on a call to
getValue(Action.NAME)
:
| Name | Static field in
DefaultEditorKit |
|---|---|
copy-to-clipboard | copyAction |
cut-to-clipboard | cutAction |
paste-from-clipboard | pasteAction |
There are a few more which unfortunately do not exist in the
DefaultEditorKit
, and therefore have no standard
names. The following may be used:
| Name | Description |
|---|---|
find | Pop up dialog to find a string in the text. |
replace | Pop up dialog to find & replace a string in the text. |
goto | Pop up dialog to go to some place in the text, e.g. a specific line number. |
delete | Delete the selection, without affecting clipboard. |
undo | Undo action. See package
javax.swing.undo for help. Currently not specially
supported, except to call your action. |
redo | Redo action. Ditto. |
The corresponding items in the NetBeans "Edit" menu, and other
standard invocations such as from the system toolbar, will
automatically invoke these actions on your document, if you supply
them. You should use
Action.isEnabled()
to indicate whether your action is ready, and thus whether or not the
corresponding UI elements should be grayed out.
UndoableEdit
,
so that NetBeans can smoothly provide Undo/Redo support for the editor
from the standard places (e.g. in the Edit menu). Note that
AbstractDocument
,
for example, already provides this support.
NbPreferences
or similar.
javax.swing.JEditorPane.registerEditorKitForContentType(...)
,
and NetBeans should subsequently use it.
It is possible that there will be special support in the Modules
API for registering editors. Although doing it manually in the
module's
installed()
method is not difficult, properly the module should also restore the
original editor kit for each content type upon an uninstall, and
ideally there would be a user-visible control panel permitting
selection of the editor for each content type from among those
claiming to support it.
This is not likely to be done unless it turns out to be popular to have multiple editors installed, and conflicts become a problem.
In the meantime, please refer to the Modules API for instructions on creating a module to contain your editor.
CloneableEditorSupport.setMIMEType(String)
may be used to control the MIME type of an editor kit regardless of
the type of the underlying file.


Something went wrong! Rest assured, we are taking care of it.
Clicking here is probably your best bet to take care of it the issue.


Configure WebSphere Liberty with a set of selected technologies. Then download the project as a zip file.
STEP 1 / {{maxSteps}}
Select one or more technology types:
Getting list of technologies, please wait ...
Unfortunately the
Liberty app accelerator service appears to be down at the moment.
Please try again later.
{{technology.description}}


Click on the door to search Northwest Louisiana area properties
Click here to search East Texas area properties
Established in 1981
Located in Shreveport, Louisiana
Click on the buttons below to view listings
Contacting Us
E-mail<EMAIL_ADDRESS>318-868-LAND
(318-868-5263)
Outside Shreveport area
1-800-550-LAND
Ruth Woodman Real Estate, located in Shreveport, Louisiana, specializes in residential homes (town and country), land, horse farms, acreage, and cattle ranches, as well as lake properties and commercial properties.
North West Louisiana Area Property Search
East Texas Area Property Search
Caddo Parish Official School Board Site
Bossier Parish School Board Site


Summary
| Behaviors | Failed | Pending | Time (sec) |
|---|---|---|---|
| 2 | 0 | 1 | 0.433 |
Stories Summary
| Stories | Scenarios | Failed | Pending | Time (sec) |
|---|---|---|---|---|
| 2 | 2 | 0 | 1 | 0.433 |
Specifications Summary
| Specifications | Failed | Pending | Time (sec) |
|---|---|---|---|
| 0 | 0 | 0 | 0.0 |
| Behaviors | Failed | Pending | Time (sec) |
|---|---|---|---|
| 2 | 0 | 1 | 0.433 |
| Stories | Scenarios | Failed | Pending | Time (sec) |
|---|---|---|---|---|
| 2 | 2 | 0 | 1 | 0.433 |
| Specifications | Failed | Pending | Time (sec) |
|---|---|---|---|
| 0 | 0 | 0 | 0.0 |


DBC week 6: Technical blog
Ruby Classes
Established on Jan. 16, 2016
We have come a so far to talk about Ruby Class. In Ruby, like other class-based object oriented languages that you may already be familiar with, classes act as the factories and it build instance objects.
An instance object is an object that derived from the class, acquire every traits that the class has. This might sounds a bit abstract. But lets put it this way. A class is the category of its thing, something general.
If you have looked at my about me page. you will know that I love burrito. Especially from chipotle. So let me take it as the example of the explanation of Ruby class and its instance variables and methods.
I like burrito so I made a class called "Burrito". But what if I want a chicken burrito? Do I make a new class for that? Well, you can but what if you suddenly changed you mind and want beef instead? And what if you have 10 friends who want different combination of burrito? As a smart programmer we do not want to repeat similar things again and again. We want to keep every DRY!
So because of that, let me introduce you the concept of creating instance object. As I mentioned eariler, Class object is the general thing, the category of its own. Instance object is a more specific, a liittle bit elaborated item.
Allow me to remind again about instance variable, they are used because we want to make variables visible to different methods within a class. Each individual instance object will have they very own instance variable.
Here is the example of a class creation and an instance object creation.


%%MyInstructions%%
*
Nickname/Username
*
Email Address
*
Subject
Related URL
*
Message
%%Muamessage%%


Every drop counts!
by Iain RobertsonWater scarcity is spreading across the planet like wildfire. Gathering pace with every rising degree, it threatens the lives of millions daily. The Food and Agriculture Organization (FAO) of the United Nations says each degree of increase causes 500 million more to suffer. Check out the FAO video below to learn more about the solutions it is supporting. And as a business – or individual – take steps to ensure you are making every drop count.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.enterprise.sdk.onebox.OneBoxResults
Class encapsulating a response result set from a call to a OneBox provider.
OneBox clients expect an XML response that adhere's to Google's Schema. This
class, along with ModuleResult
and Field
, hides those details
by providing an API for conveniently building a result set. The
serialize()
method serializes the class' current state as a valid
OneBox for Enterprise XML response.
ModuleResult
,
Field
| Constructor Summary | |
OneBoxResults()
|
| Method Summary | |
void |
addResult(ModuleResult result)
Add an actual result to the OneBox provider's result set. |
boolean |
canAddResult()
Determines whether there is room to add another result. |
java.lang.String |
serialize()
Serialize the current state of this OneBoxResults object to an XML string that conforms to the Google Schema for OneBox for Enterprise provider responses. |
void |
setFailure(FailureCode failureCode,
java.lang.String diagnosticMessage)
In the event of provider failure, set the failure code and a diagnostic message. |
void |
setImageUrl(java.lang.String imageUrl)
Optionally provide an identifying icon for the result set. |
void |
setProviderText(java.lang.String providerText)
Text identifying the provider that ultimately handled the OneBox request. |
void |
setResultsTitleLink(java.lang.String text,
java.lang.String url)
Optionally provide a title link for the results set. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OneBoxResults()
| Method Detail |
public void setFailure(FailureCode failureCode, java.lang.String diagnosticMessage)
failureCode
- the code defining the nature of the failurediagnosticMessage
- descriptive text explaining the failurepublic void setProviderText(java.lang.String providerText)
public void setResultsTitleLink(java.lang.String text, java.lang.String url)
public void setImageUrl(java.lang.String imageUrl)
public void addResult(ModuleResult result)
java.lang.IndexOutOfBoundsException
- when too many results are addedpublic boolean canAddResult()
addResult()
will succeed.
public java.lang.String serialize()
serialize
in interface IOneBoxResults
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


{% extends "publisher/publisher_base.html" %} {% block page_title %}Down for maintenance{% endblock %} {% block publisher_content %}
This page is currently unavailable while we carry out some essential maintenance. Please check again later.
{% endblock %}


We welcome the submission of research papers on all aspects of question answering over Linked Data, system descriptions of systems participating in the shared task, and short papers on preliminary research.
| Release of training dataset | January 31 |
| Release of test dataset | March 28 |
| Submission of results | April 1 - April 15 |
| Deadline for abstracts (REQUIRED) | March 4 |
| Deadline for full papers (EXTENDED) | March 14 |
| Notification of acceptance | March 30 |
| Camera-ready version of papers | April 22 |
| Workshop | May 30 |


IacComparator
Class diagram
TODO / Markers
Errors
iacComparator.php
Classes
|
Properties
author
copyright
package
summary
version
Description
IacComparator Compare 2 variables
Classes
IacComparator
Properties
Extends
Implements
author
Raul Jose Santos Beranrd
copyright
2015
package
iac\util
version
1.0
Abstract
No
Final
No
Description
IacComparator Compare 2 variables strings: case/accent [in]sensitive, natural or computer ordering.


{% extends 'apidoc.html' %} {% block title %}Tile5 API Documentation{% endblock %} {% block api %}
The T5.Geo module contains classes and functionality to support geospatial operations and calculations that are required when drawing maps, routes, etc.


MoneyWatch
Actions
Investments:
Get Quotes [fetch]
Bulk Investments
Bank Accounts:
Total Bank Accounts [tally]
Bulk Interest
Bulk Bills
Investments
Bank Accounts
Investments:
loading...
Banks (Cash):
loading...
loading...
Weather
My Links
×
Universal
×
Transactions
Adjust
Date
Type
Trade Details
Add
Sub
Total
Adjust
Date
Type
Details
Add
Sub
Total


| Up | TOC | Index | |||||
| << 8 API Reference | < 9.40 Version 2.1 WIN32 + DOS32 March 29, 1999 | Up: 9 Release Notes | 9.42 Version 2.1 Alpha January 15, 1999 > | 10 Index >> |
9.41 Version 2.1 Beta March 5, 1999
- The rest of the files in the euphoria\doc directory have now been converted to HTML. Every .doc file in the doc directory now has a corresponding .htm file in the euphoria\html directory. Many improvements and clarifications were made to the documentation.
- You will now be warned when you have code that comes immediately after an exit, return or abort() statement. This code can never be executed. Suggested by Gabriel Boehme.
- safe.e no longer includes graphics.e. This eliminates possible naming conflicts when safe.e is substituted for machine.e.
- Using code supplied by David Guy, safe.e will now let you add or remove externally-allocated blocks of memory on the "safe address list". See the new library routines: register_block() and unregister_block().
- message_box() now uses the handle of the active window rather than NULL. This forces the user to reply to your message before he can continue to interact with your program. He won't be prevented from interacting with other programs. Thanks to Austin C.
- get() and value() have been sped up by a further 5% thanks to Gabriel Boehme.
- exw.exe has been made less likely to crash mysteriously when attacked by a virus.
- sanity.ex now checks your installation of Euphoria. You'll be warned if your PATH or EUDIR variables are not set, or your ex.exe, exw.exe, pdex.exe, or pdexw.exe files have been corrupted or not installed correctly in euphoria\bin.
- The security of bound and scrambled programs has been tightened some more. Thanks to Rusty Davis.
- To save space in euphor21.zip, the install program now generates the HTML and DOC files from a common source, using Junko Miura's documentation generator. In the process, the generator is deleted, but you can download it from the RDS site.
- When a type_check failure occurs you'll be warned if the type erroneously returned a sequence for it's "true/false" result. Previously, a sequence result was simply reported as a type_check failure. Suggested by Ralf Nieuwenhuijsen.
- The code for demo\win32\winwire.exw was cleaned up considerably.
- The install program will warn you to change your autoexec.bat file when you install a new release of Euphoria onto a different drive.