| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
| 3 | * contributor license agreements. See the NOTICE file distributed with | |
| 4 | * this work for additional information regarding copyright ownership. | |
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| 6 | * (the "License"); you may not use this file except in compliance with | |
| 7 | * the License. You may obtain a copy of the License at | |
| 8 | * | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 | * | |
| 11 | * Unless required by applicable law or agreed to in writing, software | |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 | * See the License for the specific language governing permissions and | |
| 15 | * limitations under the License. | |
| 16 | */ | |
| 17 | package org.apache.commons.collections4.bag; | |
| 18 | ||
| 19 | import java.util.Set; | |
| 20 | ||
| 21 | import org.apache.commons.collections4.Bag; | |
| 22 | import org.apache.commons.collections4.Transformer; | |
| 23 | import org.apache.commons.collections4.collection.TransformedCollection; | |
| 24 | import org.apache.commons.collections4.set.TransformedSet; | |
| 25 | ||
| 26 | /** | |
| 27 | * Decorates another {@link Bag} to transform objects that are added. | |
| 28 | * <p> | |
| 29 | * The add methods are affected by this class. | |
| 30 | * Thus objects must be removed or searched for using their transformed form. | |
| 31 | * For example, if the transformation converts Strings to Integers, you must | |
| 32 | * use the Integer form to remove objects. | |
| 33 | * <p> | |
| 34 | * This class is Serializable from Commons Collections 3.1. | |
| 35 | * | |
| 36 | * @since 3.0 | |
| 37 | * @version $Id: TransformedBag.java 1686855 2015-06-22 13:00:27Z tn $ | |
| 38 | */ | |
| 39 | public class TransformedBag<E> extends TransformedCollection<E> implements Bag<E> { | |
| 40 | ||
| 41 | /** Serialization version */ | |
| 42 | private static final long serialVersionUID =<PHONE_NUMBER>299074185L; | |
| 43 | ||
| 44 | /** | |
| 45 | * Factory method to create a transforming bag. | |
| 46 | * <p> | |
| 47 | * If there are any elements already in the bag being decorated, they | |
| 48 | * are NOT transformed. Contrast this with {@link #transformedBag(Bag, Transformer)}. | |
| 49 | * | |
| 50 | * @param <E> the type of the elements in the bag | |
| 51 | * @param bag the bag to decorate, must not be null | |
| 52 | * @param transformer the transformer to use for conversion, must not be null | |
| 53 | * @return a new transformed Bag | |
| 54 | * @throws NullPointerException if bag or transformer is null | |
| 55 | * @since 4.0 | |
| 56 | */ | |
| 57 | public static <E> Bag<E> transformingBag(final Bag<E> bag, final Transformer<? super E, ? extends E> transformer) { | |
| 58 |
1
1. transformingBag : mutated return of Object value for org/apache/commons/collections4/bag/TransformedBag::transformingBag to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return new TransformedBag<E>(bag, transformer); |
| 59 | } | |
| 60 | ||
| 61 | /** | |
| 62 | * Factory method to create a transforming bag that will transform | |
| 63 | * existing contents of the specified bag. | |
| 64 | * <p> | |
| 65 | * If there are any elements already in the bag being decorated, they | |
| 66 | * will be transformed by this method. | |
| 67 | * Contrast this with {@link #transformingBag(Bag, Transformer)}. | |
| 68 | * | |
| 69 | * @param <E> the type of the elements in the bag | |
| 70 | * @param bag the bag to decorate, must not be null | |
| 71 | * @param transformer the transformer to use for conversion, must not be null | |
| 72 | * @return a new transformed Bag | |
| 73 | * @throws NullPointerException if bag or transformer is null | |
| 74 | * @since 4.0 | |
| 75 | */ | |
| 76 | public static <E> Bag<E> transformedBag(final Bag<E> bag, final Transformer<? super E, ? extends E> transformer) { | |
| 77 | final TransformedBag<E> decorated = new TransformedBag<E>(bag, transformer); | |
| 78 |
2
1. transformedBag : changed conditional boundary → NO_COVERAGE 2. transformedBag : negated conditional → NO_COVERAGE |
if (bag.size() > 0) { |
| 79 | @SuppressWarnings("unchecked") // Bag is of type E | |
| 80 | final E[] values = (E[]) bag.toArray(); // NOPMD - false positive for generics | |
| 81 |
1
1. transformedBag : removed call to org/apache/commons/collections4/Bag::clear → NO_COVERAGE |
bag.clear(); |
| 82 |
3
1. transformedBag : changed conditional boundary → NO_COVERAGE 2. transformedBag : Changed increment from 1 to -1 → NO_COVERAGE 3. transformedBag : negated conditional → NO_COVERAGE |
for (final E value : values) { |
| 83 | decorated.decorated().add(transformer.transform(value)); | |
| 84 | } | |
| 85 | } | |
| 86 |
1
1. transformedBag : mutated return of Object value for org/apache/commons/collections4/bag/TransformedBag::transformedBag to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return decorated; |
| 87 | } | |
| 88 | ||
| 89 | //----------------------------------------------------------------------- | |
| 90 | /** | |
| 91 | * Constructor that wraps (not copies). | |
| 92 | * <p> | |
| 93 | * If there are any elements already in the bag being decorated, they | |
| 94 | * are NOT transformed. | |
| 95 | * | |
| 96 | * @param bag the bag to decorate, must not be null | |
| 97 | * @param transformer the transformer to use for conversion, must not be null | |
| 98 | * @throws NullPointerException if bag or transformer is null | |
| 99 | */ | |
| 100 | protected TransformedBag(final Bag<E> bag, final Transformer<? super E, ? extends E> transformer) { | |
| 101 | super(bag, transformer); | |
| 102 | } | |
| 103 | ||
| 104 | /** | |
| 105 | * Gets the decorated bag. | |
| 106 | * | |
| 107 | * @return the decorated bag | |
| 108 | */ | |
| 109 | protected Bag<E> getBag() { | |
| 110 |
1
1. getBag : mutated return of Object value for org/apache/commons/collections4/bag/TransformedBag::getBag to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return (Bag<E>) decorated(); |
| 111 | } | |
| 112 | ||
| 113 | @Override | |
| 114 | public boolean equals(final Object object) { | |
| 115 |
4
1. equals : negated conditional → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE 3. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE 4. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return object == this || decorated().equals(object); |
| 116 | } | |
| 117 | ||
| 118 | @Override | |
| 119 | public int hashCode() { | |
| 120 |
1
1. hashCode : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return decorated().hashCode(); |
| 121 | } | |
| 122 | ||
| 123 | //----------------------------------------------------------------------- | |
| 124 | ||
| 125 | @Override | |
| 126 | public int getCount(final Object object) { | |
| 127 |
1
1. getCount : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return getBag().getCount(object); |
| 128 | } | |
| 129 | ||
| 130 | @Override | |
| 131 | public boolean remove(final Object object, final int nCopies) { | |
| 132 |
1
1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return getBag().remove(object, nCopies); |
| 133 | } | |
| 134 | ||
| 135 | //----------------------------------------------------------------------- | |
| 136 | ||
| 137 | @Override | |
| 138 | public boolean add(final E object, final int nCopies) { | |
| 139 |
1
1. add : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return getBag().add(transform(object), nCopies); |
| 140 | } | |
| 141 | ||
| 142 | @Override | |
| 143 | public Set<E> uniqueSet() { | |
| 144 | final Set<E> set = getBag().uniqueSet(); | |
| 145 |
1
1. uniqueSet : mutated return of Object value for org/apache/commons/collections4/bag/TransformedBag::uniqueSet to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return TransformedSet.<E>transformingSet(set, transformer); |
| 146 | } | |
| 147 | ||
| 148 | } | |
Mutations | ||
| 58 |
1.1 |
|
| 78 |
1.1 2.2 |
|
| 81 |
1.1 |
|
| 82 |
1.1 2.2 3.3 |
|
| 86 |
1.1 |
|
| 110 |
1.1 |
|
| 115 |
1.1 2.2 3.3 4.4 |
|
| 120 |
1.1 |
|
| 127 |
1.1 |
|
| 132 |
1.1 |
|
| 139 |
1.1 |
|
| 145 |
1.1 |


Salesforce login statistics aggregation
A recent requirement from a customer was "I'd like to analyze logins by users in Excel", despite a dashboard approach would be sufficient. With a few million records aggregating in Excel wasn't particularly appealing
Download the log
Salesforce setup allows to download the log as csv
or csv.gz
file. In any case you should use the later. I learned the hard way: the chunked transfer encoding might leave you with less data be processed than you expect.
The Scanner simply stopped after a few thousand entries, while the csv parser barfed with an error.
Processing
After downloading and extracting the csv I used a small Java routine (yep, I'm that old) to aggregate logins per user, capturing the count and the first/last login date as well as the country of login (with the disclaimer caveats) and the eventual community.
For reliably and robustly reading csv in Java, usually I would use a robust library, however in this case having no dependencies and using the scanner did just nicely
Two little details: to get the results I simply overwrote the toString()
method, so the output generation is a one liner using an arrow function. Enjoy!
Class: Report.java
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
/**
* @author swissel
*
*/
public class Report {
/**
* @param args
* @throws IOException
*/
public static void main(final String[] args) throws IOException {
if (args.length < 2) {
System.err.println("Use: java report CSVInputFile CSVOutoutFile");
System.exit(1);
}
// From args[0]/[1]
final String inFileName = args[0];
final String outFileName = args[1];
final File inFile = new File(inFileName);
final File outFile = new File(outFileName);
if (outFile.exists()) {
outFile.delete();
}
final OutputStream out = new FileOutputStream(outFile);
final Report r = new Report();
r.run(inFile, out);
out.close();
}
private void run(final File inFile, final OutputStream outStream) throws IOException {
final Map<String, UserStat> allUsers = new TreeMap<>();
int total = 0;
final PrintWriter out = new PrintWriter(outStream);
final Scanner s = new Scanner(inFile);
s.nextLine(); // Skip the header
while (s.hasNextLine()) {
total++;
final String line = s.nextLine();
final String[] items = line.split(",");
final String user = items[0];
final String timeString = items[1];
final String country = (items.length > 16) ? items[16] : "N/A";
final String community = (items.length > 12) ? items[12] : "N/A";
final UserStat curUser = (allUsers.containsKey(user)) ? allUsers.get(user) : new UserStat(user);
curUser.addLogin(timeString, country, community);
allUsers.put(user, curUser);
}
s.close();
out.println("User,Country,Community,firstLogin,LastLogin,LoginCount");
allUsers.entrySet().forEach(u -> out.println(u.getValue()));
System.out.println(total);
}
}
Class: UserStat.java
public class UserStat {
private final String userName;
private String country = "N/A";
private String community = "N/A";
private int loginCount;
private String firstLogin = "";
private String lastLogin = "";
public UserStat(final String userName) {
this.userName = userName;
}
public void addLogin(final String dateString, final String country, final String community) {
String loginDateString = this.yearMonthDate(dateString);
if (country != null && !country.equals("") && !country.equals("N/A")) {
this.country = country;
}
if (community != null && !community.equals("") && !community.equals("N/A")) {
this.community = community;
}
this.loginCount++;
if (loginDateString.compareTo(this.lastLogin) > 0) {
this.lastLogin = loginDateString;
}
if (this.firstLogin.equals("") || this.firstLogin.compareTo(loginDateString) > 0) {
this.firstLogin = loginDateString;
}
}
@Override
public String toString() {
return this.userName+","+this.country+","+this.community+","+this.firstLogin+","+this.lastLogin+","+String.valueOf(this.loginCount);
}
// Reformats date string Singapore format DD/MM/YYYY into YYYY-MM-DD
private String yearMonthDate(final String incoming) {
return incoming.substring(7, 11)+"-"+incoming.substring(4, 6)+"-"+incoming.substring(1, 3);
}
}
Take the result, open it in the spreadsheet of your choice and make shiny graphs!
As usual YMMV!
Posted by Stephan H Wissel on 05 December 2018 | Comments (0) | categories: Java Salesforce


UK's Johnson says he is not complacent in face of Labour challenge
LONDON (Reuters) - British Prime Minister Boris Johnson said he was not complacent about the outcome of the Dec. 12 election, because any vote for smaller parties could strip him of a majority and lead to a Labour-led coalition in power.
Johnson’s Conservatives are comfortably ahead of Jeremy Corbyn’s Labour in the polls but analysts have warned that Brexit, which has divided parties and their voters, could make the result highly unpredictable.
“We’re not complacent about any outcome,” Johnson told reporters in southwest England.
“The real risk is that if people vote for the Liberal Democrats, or indeed any other party, you get a coalition led by Jeremy Corbyn in Number 10.”


Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Fully responsive
Lorem ipsum dolor sit , consectetur adipisicing elit. Tenetur, .
Don’t go by our , checkout our awesome Layout and verify yourself.
You will surely fall love over the fresh & brilliant code.
View More..


REVIEW: Sphere (1998)
by Luke Buckmaster
2 and a half stars out of 5
It may surprise some people to know that Berry Levinson, the director who brought us Donnie Brasco and Wag the Dog, has ventured into Stephen Spielberg territory with one of Michael Crichtons less known novels Sphere.
After the opening credits we are hastily introduced to Dr. Norman Goodman (Dustin Hoffman), a calm psychologist with an intellect and common sense that more than matches the specialists around him. Unfortunately, his credibility isnt always dependable. In the 1980s Norman sold the government a top-secret report explaining what to do if alien life was ever encountered. Also on the report were the names of biochemist Beth Halperin (Sharon Stone), mathematician Harry Adams (Samuel L. Jackson) and astrophysicist Ted Fielding (Liey Schreiber). The problem is, the report was hastily put together because Norman needed the cash and borrowed material from famous writers to meet his needs.
So when a three hundred year old alien vessel is found buried deep in the ocean, Normans report is followed like a bible. Much to his surprise, all of people he specified (as well as himself) are gathered together and sent to investigate this mysterious ship. But, as would be predicted in this sort of film, when they are stuck hundreds of meters below the surface things start to go wrong.
A funny little character called Jerry, based inside the vessels computers, pops up and begins to create chaos for Norman and his crew. But all is not what it seems, and as the film delves into the psychological aspects of its characters, tension begins to rise and things start to hot up.
In quality and concept, Sphere is much like last years Event Horizon. They both created interest from the audience, but when they had it they failed to do anything original or engaging with it and at times its incredibly annoying to be witness a potentially great film resort to using clichi characters and confrontations.
Its interesting to note that the vast percentage of Spheres footage has three of the same characters appear on the screen - and whilst this is not necessarily a bad thing, if limited amounts of characters are going to successfully hold the audiences attention they really need to be something special. In this case, they certainly are not Norman somehow seems to be the most intelligent even though he asks the stupidest questions, the ships commander Barnes Barnes (Peter Coyote) is the diplomatic dork that no body likes, and Samuel L. Jacksons character serves as an excuse to whip up some amusing dialogue. So even though Sphere doesnt produce the most rewarding characters, its great fun to see them all shoved into situations that have more to do with common sense rather than PHDs.
Yes Sphere succeeds as a not-to-be-taken-seriously film, but this is not what Levinson was after. Psychological thriller it should have been but psychological mediocrity it is.
I would love to announce Event Horizon and Sphere as great films heck, I enjoy so many things about them but they both get so bogged down in a sea of Weve this his all before material that they hardly become a worthwhile experience. But this isnt the main thing that bothers me being Sci Fi movies, these two films lost sight of what they should have achieved rather than thrilling the audience, they merely scare the audience.
But on the up side, Sphere is a treat to watch and the special effects are appropriately impressive. I can not, however, forgive it for watering down such a spectacular concept into a pedestrian (and very Hollywood) flavor.
As for the three dependable actors Hoffman, Jackson and Stone they do look great together, and Sharon especially is certain to arouse male interest with a notably tight singlet/shirt. But at the end of the day, when these three people are resorted to driving a film stuck in neutral, one must wonder why Jim Carey or Mike Myers werent cast as the alien vessels comic reliefs. At least then we could laugh at them, and not the film.
As it so happens, the day after I saw Sphere I watched Basic Instinct on TV. And lets just say, Sharon Stones vessels were moving much more appealingly in the later film.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


https://s3-us-west-2.amazonaws.com/buzzmusiq/sik_1488593972.010495.mp4
Your browser does not support video


Edit Quality Attribute Template (ID:
{{catalogQa.id}})
Create new Quality Attribute Template
You are editing a Quality Attribute Template, which is already connected to a catalog. So you are editing this link.
In this case, you can only change variable values.
Step 1: Select categories


CircuitBreaker
public class CircuitBreaker<A, B>
CircuitBreaker class
- A: Parameter types used in the arguments for the command closure.
- B: Parameter type used as the second argument for the fallback closure.
-
Name of Circuit Breaker Instance
Declaration
Swift
public private(set) var name: String
-
Undocumented
Declaration
Swift
public class CircuitBreaker<A, B>
-
Execution timeout for command contect (Default: 1000 ms)
Declaration
Swift
public let timeout: Int
-
Timeout to reset circuit (Default: 6000 ms)
Declaration
Swift
public let resetTimeout: Int
-
Maximum number of failures allowed before opening circuit (Default: 5)
Declaration
Swift
public let maxFailures: Int
-
(Default: 10000 ms)
Declaration
Swift
public let rollingWindow: Int
-
Instance of Circuit Breaker Stats
Declaration
Swift
public let breakerStats = Stats()
-
The Breaker’s Current State
Declaration
Swift
public private(set) var breakerState: State
-
Initializes CircuitBreaker instance with asyncronous context command (Advanced usage)
Declaration
Swift
public init(name: String, group: String? = nil, timeout: Int = 1000, resetTimeout: Int = 60000, maxFailures: Int = 5, rollingWindow: Int = 10000, bulkhead: Int = 0, command: @escaping AnyContextFunction<A>, fallback: @escaping AnyFallback<B>)
Parameters
name
name of the circuit instance
group
optional group description
timeout
Execution timeout for command contect (Default: 1000 ms)
resetTimeout
Timeout to reset circuit (Default: 6000 ms)
maxFailures
Maximum number of failures allowed before opening circuit (Default: 5)
rollingWindow
(Default: 10000 ms)
bulkhead
Number of the limit of concurrent requests running at one time. Default is set to 0, which is equivalent to not using the bulkheading feature.(Default: 0)
command
Contextual function to circuit break, which allows user defined failures (the context provides an indirect reference to the corresponding circuit breaker instance).
fallback
Function user specifies to signal timeout or fastFail completion. Required format: (BreakerError, (fallbackArg1, fallbackArg2,…)) -> Void
-
Runs the circuit using the provided arguments
Declaration
Swift
public func run(commandArgs: A, fallbackArgs: B)
Parameters
commandArgs
Arguments of type
A
for the circuit commandfallbackArgs
Arguments of type
B
for the circuit fallback -
Method to print current stats
Declaration
Swift
public func logSnapshot()
-
Method to force the circuit open
Declaration
Swift
public func forceOpen()
-
Method to force the circuit closed
Declaration
Swift
public func forceClosed()
-
Method to force the circuit halfopen
Declaration
Swift
public func forceHalfOpen()
-
Method to create link a StatsMonitor Instance
Declaration
Swift
public static func addMonitor(monitor: StatsMonitor)
-
Property to compute snapshot
Declaration
Swift
public var snapshot: Snapshot


{% if 'sigal.plugins.encrypt' in settings.plugins %}
Password is required to access this gallery:
Incorrect password!
Password is required to access this gallery:
This page cannot function properly because some features are not available.
Some possible solutions are:


 The Logos pathway is where it all starts. In this pathway your fundamental movements will be solidified in a safe an effective manner in order to increase your success in the program.
You have mastered the basics and have formed a new commitment to excellence. By now you should have defined your purpose in coming to the gym and plan on taking the next step in proving yourself.
Ethos is an appeal to ethics, and it is a means of convincing someone of their character or credibility. In the ethos path you will develop skills that will better yourself as a person. These excericses will strengthen yourself physically and mentally.
Signing up for the program is the fastest way to get started. Users will pick their CrossFit gym during the registration process. After signing up you will immediately be a member of your gym's Logos Academy.
Our expert-developed curriculum sets attainable goals for your to progress through the Logos Academy. Physical movements are accompanied by instructional tips and videos ensuring a clear understanding of the requirements.
 This is how we measure our growth. The Logos Academy allows you to set and maintain your goals through our easy-to-use interface.


There is usually a time lag between the start of pumping and the rate of stream depletion reaching equilibrium, which is affected by the distance between the well and the stream, as well as the hydraulic conductivity of aquifer. The longer distance of a pumping well from a stream, the larger time lag. The lower hydraulic conductivity of aquifer, the longer time lag.
There is usually a time lag between the start of pumping and the rate of stream depletion reaching equilibrium, which is affected by the distance between the well and the stream, as well as the hydraulic conductivity of aquifer. The longer distance of a pumping well from a stream, the larger time lag. The lower hydraulic conductivity of aquifer, the longer time lag.
Nebraska Department of Natural Resources (NDNR) considers hydrologically connected area, a.k.a. the “10/50 Area”, to be the area in which pumping of a well for 50 years would deplete streamflow by at least 10 percent of the amount pumped. The area with Stream Depletion Factor (SDF) equal to or above 0.1 is regarded as the area where groundwater and surface water are hydrologically connected.
Stream Depletion
Time
Depletion Curve (Near)
Depletion Curve (Far)


Below is a list of your most recent job search history that you can easily go back and reference.
Good luck with your job search!


| Option | Setting | Default Value |
|---|---|---|
| Use smart compilation | Off | Off |
| Enable parallel Assembler and TimeQuest Timing Analyzer during compilation | On | On |
| Enable compact report table | Off | Off |
| Generate compressed bitstreams | On | On |
| Compression mode | Off | Off |
| Clock source for configuration device | Internal | Internal |
| Clock frequency of the configuration device | 10 MHZ | 10 MHz |
| Divide clock frequency by | 1 | 1 |
| Auto user code | On | On |
| Configuration device | Auto | Auto |
| Configuration device auto user code | Off | Off |
| Generate Tabular Text File (.ttf) For Target Device | Off | Off |
| Generate Raw Binary File (.rbf) For Target Device | Off | Off |
| Generate Hexadecimal (Intel-Format) Output File (.hexout) for Target Device | Off | Off |
| Hexadecimal Output File start address | 0 | 0 |
| Hexadecimal Output File count direction | Up | Up |
| Release clears before tri-states | Off | Off |
| Auto-restart configuration after error | On | On |
| Enable OCT_DONE | Off | Off |
| Use Checkered Pattern as Uninitialized RAM Content | Off | Off |
| Generate Serial Vector Format File (.svf) for Target Device | Off | Off |
| Generate a JEDEC STAPL Format File (.jam) for Target Device | Off | Off |
| Generate a compressed Jam STAPL Byte Code 2.0 File (.jbc) for Target Device | Off | Off |
| Generate a compressed Jam STAPL Byte Code 2.0 File (.jbc) for Target Device | On | On |


Our Services are on time, reliable and safe and we make sure that our customers are 100% satisfied with all the services that we offer.
You can choose your Medellin Airport Taxi service from the options laid out above. All of our drivers are highly qualified and professional and our vehicles are specifically chosen, modern and kept up to a high standard of cleanliness and safety.
*All prices in U.S. Dollar
We have a partnership with Stripe so that every payment that we receive is completely secure. The concerns of our customers are of the highest importance to us, so we make sure that your details are not used by third parties. We accept all major international cards. Our website is SSL secured to guarantee your online security.
We have taken all the steps to make sure that every part of our business is up to the highest possible standard. Every vehicle is accredited with the Colombian Tourist and Transport Boards, we hire only the most experienced and trustworthy drivers and offer our services at the best possible prices.
We also offer private transport to and from the many popular towns and villages surrounding Medellin. Whether you want to go to towns such as Guatape on a day-trip, or you want to go for a longer stay you can ask for a quote today. We will get back to you within 24 hours.


{% extends "blog/base.html" %}
{% block title %} About Me {% endblock %}
{% block header %}
{% load staticfiles %}
About Me
This is what I do.
Hello and welcome to my website
I am Kevin, a freelance web developer based in Nairobi, Kenya and this is where I collect some of my writings.
More info about the site itself can be found on the About this Site page.
If you have any feedback, ideas or anything at all you may wish to discuss with me, I can be contacted via the Contact Me page.
Enjoy the website.
{% endblock %}


I am an aspiring web/app developer. Although, my main passion is in writing. I also have a certification in hardware maintenance.
I am an aspiring web/app developer. Although, my main passion is in writing. I also have a certification in hardware maintenance.
I was born in Chicago, IL and raised in Oak Park, a Chicago suburb. I like read, travel, and write on my spare time. I can remember some of the places I traveled to with my family, and most of those places were picked out by my mother, who actually had pretty decent taste in vacation spots.
I already mentioned writing as a hobby, but for me, it is also a passion of mine. In fact, would put it right up there next to web/app development. I really feel like with writing and web/app development I can express my own creativity and, also, make a living off of it, hopefully someday soon.
A fun fact: As a born Chicagoan, I'm pretty used to the cold. Although, that doesn't that I, in any way, enjoy the cold. To be honest I would much rather be living in a much warmer climate, preferably one where it never snows. Rain I can handle, but snow, no, I've had quite enough of that.


404
{% trans "Childcare Not found" %}
{% trans "There are no childcare services for" %} "{{ suburb }}" and "{{ language }}"
{% trans "← Back to Home" %}{% load static %} {% load i18n %}
{% include "component/meta.html" %}{% trans "Childcare Not found" %}
{% trans "There are no childcare services for" %} "{{ suburb }}" and "{{ language }}"
{% trans "← Back to Home" %}


Test dotchart
Hover over points to have them change
size; click to change color
Hover over points to have them change
size; click to change color
Hover over points to have them change
size; click to change color
Example 4 (More data, horizontal)
Hover over points to have them change
size; click to change color
Example 6 (Random jitter, horizontal)
Example 8 (No jitter, horizontal)
Example 9 (Missing y values)
Example 10 (Missing y values, horizontal)
Example 12 (Missing x values, horizontal)
Example 13 (Missing x and y values)
Example 14 (Missing x and y values, horizontal)
Source at GitHub:
source |
documentation |
test code


public interface Graphics2DAdapter
| Modifier and Type | Method and Description |
|---|---|
void |
paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
RendererContext context,
int x,
int y,
int width,
int height)
Paints an arbitrary images on a given Graphics2D instance.
|
void |
paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x,
int y,
int width,
int height)
Deprecated.
Use the variant with the Graphics2DImagePainter from XML Graphics Commons instead
|
void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, RendererContext context, int x, int y, int width, int height) throws java.io.IOException
painter
- the painter which will paint the actual imagecontext
- the renderer context for the current rendererx
- X position of the imagey
- Y position of the imagewidth
- width of the imageheight
- height of the imagejava.io.IOException
- In case of an I/O error while writing the output formatvoid paintImage(Graphics2DImagePainter painter, RendererContext context, int x, int y, int width, int height) throws java.io.IOException
painter
- the painter which will paint the actual imagecontext
- the renderer context for the current rendererx
- X position of the imagey
- Y position of the imagewidth
- width of the imageheight
- height of the imagejava.io.IOException
- In case of an I/O error while writing the output formatCopyright 1999-2020 The Apache Software Foundation. All Rights Reserved.


Get information about quality of your software as soon as possible
Reduce the need of manual testing by automation testing of web applications using Selenium
Automated testing of native on Android and iOS apps
Run automated tests every night or on demand before release
Furby


--- layout: post title: "#death of a #cumulus #cloud #hyperlapse" date: '2014-08-28T13:18:00.001-04:00' author: Bob Sica tags: - ifttt - video - instagram modified_time: '2014-08-28T13:18:00.870-04:00' blogger_id: tag:blogger.com,1999:blog-4599947215754335931.post-9210894667275323691 blogger_orig_url: http://blog.bobsica.com/2014/08/death-of-cumulus-cloud-hyperlapse.html ---


CLAIM SUMMARY
| Employee Id |
Employee Name |
Claim Number |
Claim Type |
Claim Programs |
Claim Start Date |
Claim End Date |
Action |
| 1 |
ABC |
ABC-11-Test |
Submitted |
XXXX |
01-08-2020 |
11-08-2020 |
|
| 2 |
DEF |
DEF-11-Test |
Submitted |
XXYY |
02-08-2020 |
16-08-2020 |
|
| 3 |
GHI |
GHI-11-Test |
Submitted |
XXXX |
04-08-2020 |
21-08-2020 |
|
| 4 |
JKL |
JKL-11-Test |
Submitted |
XXXX |
07-08-2020 |
21-08-2020 |
|
| 5 |
MNO |
MNO-11-Test |
Submitted |
XXXX |
03-08-2020 |
26-08-2020 |
|


@* * Copyright 2010-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import controllers.Application.latestScaladocFor192 @userGuidePage("Using matchers") {
(See also Matchers quick reference.)
ScalaTest provides a domain specific language (DSL) for expressing assertions in tests
using the word should
or must
. If you prefer the word should
, you mix in ShouldMatchers
, like this:
import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers class ExampleSpec extends FlatSpec with ShouldMatchers { ...If you prefer
must
, you mix in MustMatchers
:
import org.scalatest.FlatSpec import org.scalatest.matchers.MustMatchers class ExampleSpec extends FlatSpec with MustMatchers { ...
You can alternatively import the members of either trait, a technique particularly useful when you want to try out matcher expressions in the
Scala interpreter. Here's an example where the members of ShouldMatchers
are imported:
import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers._ class ExampleSpec extends FlatSpec { // Can use should matchers here ...
Here is a table of contents for this page:
be
=
=
=
Boolean
properties with be
BeMatchers
and
and or
Option
shave
If you mix ShouldMatchers
into
a suite class (or import its members), you can write an equality assertion in that suite like this:
result should equal (3)
Here result
is a variable, and can be of any type. If the object is an
Int
with the value 3, execution will continue (i.e., the expression will result
in the unit value, ()
). Otherwise, a TestFailedException
will be thrown with a detail message that explains the problem, such as "7 did not equal 3"
.
This TestFailedException
will cause the test to fail.
The left should equal (right)
syntax works by calling ==
on the left
value, passing in the right
value, on every type except arrays. If both left
and right are arrays, deep
will be invoked on both left
and right
before comparing them with ==. Thus, even though this expression
will yield false, because Array
's equals
method compares object identity:
Array(1, 2) == Array(1, 2) // yields false
The following expression will not result in a TestFailedException
, because ScalaTest compares
the two arrays structurally, taking into consideration the equality of the array's contents:
Array(1, 2) should equal (Array(1, 2)) // succeeds (i.e., does not throw TestFailedException)
If you ever do want to verify that two arrays are actually the same object (have the same identity), you can use the
be theSameInstanceAs
syntax, described below.
You can check the size or length of just about any type of object for which it would make sense. Here's how checking for length looks:
result should have length (3)
Size is similar:
result should have size (10)
The length
syntax can be used with any object that has a field or method named length
or a method named getLength
. Similarly, the size
syntax can be used with any
object that has a field or method named size
or a method named getSize
.
The type of a length
or size
field, or return type of a method, must be either Int
or Long
. Any such method must take no parameters. (The Scala compiler will ensure at compile time that
the object on which should
is being invoked has the appropriate structure.)
You can check for whether a string starts with, ends with, or includes a substring like this:
string should startWith ("Hello") string should endWith ("world") string should include ("seven")
You can check for whether a string starts with, ends with, or includes a regular expression, like this:
string should startWith regex ("Hel*o") string should endWith regex ("wo.ld") string should include regex ("wo.ld")
And you can check whether a string fully matches a regular expression, like this:
string should fullyMatch regex ("""(-)?(\d+)(\.\d*)?""")
The regular expression passed following the regex
token can be either a String
or a scala.util.matching.Regex
.
You can check whether any type that is, or can be implicitly converted to,
an Ordered[T]
is greater than, less than, greater than or equal, or less
than or equal to a value of type T
. The syntax is:
one should be < (7) one should be > (0) one should be <= (7) one should be >= (0)
be
=
=
=
An alternate way to check for equality of two objects is to use be
with
===
. Here's an example:
result should be === (3)
Here result
is a variable, and can be of any type. If the object is an
Int
with the value 3, execution will continue (i.e., the expression will result
in the unit value, ()
). Otherwise, a TestFailedException
will be thrown with a detail message that explains the problem, such as "7 was not equal to 3"
.
This TestFailedException
will cause the test to fail.
The left should be === (right)
syntax works by calling ==
on the left
value, passing in the right
value, on every type except arrays. If both left
and right are arrays, deep
will be invoked on both left
and right
before comparing them with ==. Thus, even though this expression
will yield false, because Array
's equals
method compares object identity:
Array(1, 2) == Array(1, 2) // yields false
The following expression will not result in a TestFailedException
, because ScalaTest compares
the two arrays structurally, taking into consideration the equality of the array's contents:
Array(1, 2) should be === (Array(1, 2)) // succeeds (i.e., does not throw TestFailedException)
If you ever do want to verify that two arrays are actually the same object (have the same identity), you can use the
be theSameInstanceAs
syntax, described below.
Boolean
properties with be
If an object has a method that takes no parameters and returns boolean, you can check
it by placing a Symbol
(after be
) that specifies the name
of the method (excluding an optional prefix of "is
"). A symbol literal
in Scala begins with a tick mark and ends at the first non-identifier character. Thus,
'empty
results in a Symbol
object at runtime, as does
'defined
and 'file
. Here's an example:
emptySet should be ('empty)
Given this code, ScalaTest will use reflection to look on the object referenced from
emptySet
for a method that takes no parameters and results in Boolean
,
with either the name empty
or isEmpty
. If found, it will invoke
that method. If the method returns true
, execution will continue. But if it returns
false
, a TestFailedException
will be thrown that will contain a detail message, such as:
Set(1, 2, 3) was not empty
This be
syntax can be used with any type. If the object does
not have an appropriately named predicate method, you'll get a TestFailedException
at runtime with a detail message that explains the problem.
(For the details on how a field or method is selected during this
process, see the documentation for BeWord
.)
If you think it reads better, you can optionally put a
or an
after
be
. For example, java.io.File
has two predicate methods,
isFile
and isDirectory
. Thus with a File
object
named temp
, you could write:
temp should be a ('file)
Or, given java.awt.event.KeyEvent
has a method isActionKey
that takes
no arguments and returns Boolean
, you could assert that a KeyEvent
is
an action key with:
keyEvent should be an ('actionKey)
If you prefer to check Boolean
properties in a type-safe manner, you can use a BePropertyMatcher
.
This would allow you to write expressions such as:
emptySet should be (empty) temp should be a (file) keyEvent should be an (actionKey)
These expressions would fail to compile if should
is used on an inappropriate type, as determined
by the type parameter of the BePropertyMatcher
being used. (For example, file
in this example
would likely be of type BePropertyMatcher[java.io.File]
. If used with an appropriate type, such an expression will compile
and at run time the Boolean
property method or field will be accessed directly; i.e., no reflection will be used.
See the documentation for BePropertyMatcher
for more information.
BeMatchers
be
, which doesn't map to an actual property on the
type you care about, you can create a BeMatcher
. You could use this, for example, to create BeMatcher[Int]
called odd
, which would match any odd Int
, and even
, which would match
any even Int
.
Given this pair of BeMatcher
s, you could check whether an Int
was odd or even with expressions like:
num should be (odd) num should not be (even)For more information, see the documentation for
BeMatcher
.
If you need to check that two references refer to the exact same object, you can write:
ref1 should be theSameInstanceAs (ref2)
To check whether a floating point number has a value that exactly matches another, you
can use should equal
:
sevenDotOh should equal (7.0)
Often, however, you may want to check whether a floating point number is within a
range. You can do that using be
and plusOrMinus
, like this:
sevenDotOh should be (6.9 plusOrMinus 0.2)
This expression will cause a TestFailedException
to be thrown if the floating point
value, sevenDotOh
is outside the range 6.7
to 7.1
.
You can also use plusOrMinus
with integral types, for example:
seven should be (6 plusOrMinus 2)
You can use some of the syntax shown previously with Iterable
and its
subtypes. For example, you can check whether an Iterable
is empty
,
like this:
iterable should be ('empty)
You can check the length of an Seq
(Array
, List
, etc.),
like this:
array should have length (3) list should have length (9)
You can check the size of any Traversable
, like this:
map should have size (20) set should have size (90)
In addition, you can check whether an Iterable
contains a particular
element, like this:
iterable should contain ("five")
You can also check whether a Map
contains a particular key, or value, like this:
map should contain key (1) map should contain value ("Howdy")
You can use similar syntax on Java collections (java.util.Collection
) and maps (java.util.Map
).
For example, you can check whether a Java Collection
or Map
is empty
,
like this:
javaCollection should be ('empty) javaMap should be ('empty)
Even though Java's List
type doesn't actually have a length
or getLength
method,
you can nevertheless check the length of a Java List
(java.util.List
) like this:
javaList should have length (9)
You can check the size of any Java Collection
or Map
, like this:
javaMap should have size (20) javaSet should have size (90)
In addition, you can check whether a Java Collection
contains a particular
element, like this:
javaCollection should contain ("five")
One difference to note between the syntax supported on Java collections and that of Scala
iterables is that you can't use contain (...)
syntax with a Java Map
.
Java differs from Scala in that its Map
is not a subtype of its Collection
type.
If you want to check that a Java Map
contains a specific key/value pair, the best approach is
to invoke entrySet
on the Java Map
and check that entry set for the appropriate
element (a java.util.Map.Entry
) using contain (...)
.
Despite this difference, the other (more commonly used) map matcher syntax works just fine on Java Map
s.
You can, for example, check whether a Java Map
contains a particular key, or value, like this:
javaMap should contain key (1) javaMap should contain value ("Howdy")
All uses of be
other than those shown previously perform an equality comparison. In other words, they work
the same as equals
. This redundance between be
and equals
exists because it enables syntax
that sometimes sounds more natural. For example, instead of writing:
result should equal (null)
You can write:
result should be (null)
(Hopefully you won't write that too much given null
is error prone, and Option
is usually a better, well, option.)
Here are some other examples of be
used for equality comparison:
sum should be (7.0) boring should be (false) fun should be (true) list should be (Nil) option should be (None) option should be (Some(1))
As with equal
, using be
on two arrays results in deep
being called on both arrays prior to
calling equal
. As a result,
the following expression would not throw a TestFailedException
:
Array(1, 2) should be (Array(1, 2)) // succeeds (i.e., does not throw TestFailedException)
Because be
is used in several ways in ScalaTest matcher syntax, just as it is used in many ways in English, one
potential point of confusion in the event of a failure is determining whether be
was being used as an equality comparison or
in some other way, such as a property assertion. To make it more obvious when be
is being used for equality, the failure
messages generated for those equality checks will include the word equal
in them. For example, if this expression fails with a
TestFailedException
:
option should be (Some(1))
The detail message in that TestFailedException
will include the words "equal to"
to signify be
was in this case being used for equality comparison:
Some(2) was not equal to Some(1)
If you wish to check the opposite of some condition, you can simply insert not
in the expression.
Here are a few examples:
result should not be (null) sum should not be <= (10) mylist should not equal (yourList) string should not startWith ("Hello")
and
and or
You can also combine matcher expressions with and
and/or or
, however,
you must place parentheses or curly braces around the and
or or
expression. For example,
this and
-expression would not compile, because the parentheses are missing:
map should contain key ("two") and not contain value (7) // ERROR, parentheses missing!
Instead, you need to write:
map should (contain key ("two") and not contain value (7))
Here are some more examples:
number should (be > (0) and be <= (10)) option should (equal (Some(List(1, 2, 3))) or be (None)) string should ( equal ("fee") or equal ("fie") or equal ("foe") or equal ("fum") )
Two differences exist between expressions composed of these and
and or
operators and the expressions you can write
on regular Boolean
s using its &&
and ||
operators. First, expressions with and
and or
do not short-circuit. The following contrived expression, for example, would print "hello, world!"
:
"yellow" should (equal ("blue") and equal { println("hello, world!"); "green" })
In other words, the entire and
or or
expression is always evaluated, so you'll see any side effects
of the right-hand side even if evaluating
only the left-hand side is enough to determine the ultimate result of the larger expression. Failure messages produced by these
expressions will "short-circuit," however,
mentioning only the left-hand side if that's enough to determine the result of the entire expression. This "short-circuiting" behavior
of failure messages is intended
to make it easier and quicker for you to ascertain which part of the expression caused the failure. The failure message for the previous
expression, for example, would be:
"yellow" did not equal "blue"
Most likely this lack of short-circuiting would rarely be noticeable, because evaluating the right hand side will usually not
involve a side effect. One situation where it might show up, however, is if you attempt to and
a null
check on a variable with an expression
that uses the variable, like this:
map should (not be (null) and contain key ("ouch"))
If map
is null
, the test will indeed fail, but with a NullPointerException
, not a
TestFailedException
. Here, the NullPointerException
is the visible right-hand side effect. To get a
TestFailedException
, you would need to check each assertion separately:
map should not be (null) map should contain key ("ouch")
If map
is null
in this case, the null
check in the first expression will fail with
a TestFailedException
, and the second expression will never be executed.
The other difference with Boolean
operators is that although &&
has a higher precedence than ||
,
and
and or
have the same precedence. Thus although the Boolean
expression (a || b && c)
will evaluate the &&
expression
before the ||
expression, like (a || (b && c))
, the following expression:
traversable should (contain (7) or contain (8) and have size (9))
Will evaluate left to right, as:
traversable should ((contain (7) or contain (8)) and have size (9))
If you really want the and
part to be evaluated first, you'll need to put in parentheses, like this:
traversable should (contain (7) or (contain (8) and have size (9)))
Option
s
ScalaTest matchers has no special support for Option
s, but you can
work with them quite easily using syntax shown previously. For example, if you wish to check
whether an option is None
, you can write any of:
option should equal (None) option should be (None) option should not be ('defined) option should be ('empty)
If you wish to check an option is defined, and holds a specific value, you can write either of:
option should equal (Some("hi")) option should be (Some("hi"))
If you only wish to check that an option is defined, but don't care what it's value is, you can write:
option should be ('defined)
If you mix in (or import the members of) OptionValues
,
you can write one statement that indicates you believe an option should be defined and then say something else about its value. Here's an example:
import org.scalatest.OptionValues._ option.value should be < (7)
have
Using have
, you can check properties of any type, where a property is an attribute of any
object that can be retrieved either by a public field, method, or JavaBean-style get
or is
method, like this:
book should have ( 'title ("Programming in Scala"), 'author (List("Odersky", "Spoon", "Venners")), 'pubYear (2008) )
This expression will use reflection to ensure the title
, author
, and pubYear
properties of object book
are equal to the specified values. For example, it will ensure that book
has either a public Java field or method
named title
, or a public method named getTitle
, that when invoked (or accessed in the field case) results
in a the string "Programming in Scala"
. If all specified properties exist and have their expected values, respectively,
execution will continue. If one or more of the properties either does not exist, or exists but results in an unexpected value,
a TestFailedException
will be thrown that explains the problem. (For the details on how a field or method is selected during this
process, see the documentation for HavePropertyMatcherGenerator
.)
When you use this syntax, you must place one or more property values in parentheses after have
, seperated by commas, where a property
value is a symbol indicating the name of the property followed by the expected value in parentheses. The only exceptions to this rule is the syntax
for checking size and length shown previously, which does not require parentheses. If you forget and put parentheses in, however, everything will
still work as you'd expect. Thus instead of writing:
array should have length (3) set should have size (90)
You can alternatively, write:
array should have (length (3)) set should have (size (90))
If a property has a value different from the specified expected value, a TestFailedError
will be thrown
with a detail message that explains the problem. For example, if you assert the following on
a book
whose title is Moby Dick
:
book should have ('title ("A Tale of Two Cities"))
You'll get a TestFailedException
with this detail message:
The title property had value "Moby Dick", instead of its expected value "A Tale of Two Cities", on object Book("Moby Dick", "Melville", 1851)
If you prefer to check properties in a type-safe manner, you can use a HavePropertyMatcher
.
This would allow you to write expressions such as:
book should have ( title ("Programming in Scala"), author (List("Odersky", "Spoon", "Venners")), pubYear (2008) )
These expressions would fail to compile if should
is used on an inappropriate type, as determined
by the type parameter of the HavePropertyMatcher
being used. (For example, title
in this example
might be of type HavePropertyMatcher[org.publiclibrary.Book]
. If used with an appropriate type, such an expression will compile
and at run time the property method or field will be accessed directly; i.e., no reflection will be used.
See the documentation for HavePropertyMatcher
for more information.
If none of the built-in matcher syntax (or options shown so far for extending the syntax) satisfy a particular need you have, you can create
custom Matcher
s that allow
you to place your own syntax directly after should
. For example, class java.io.File
has a method exists
, which
indicates whether a file of a certain path and name exists. Because the exists
method takes no parameters and returns Boolean
,
you can call it using be
with a symbol or BePropertyMatcher
, yielding assertions like:
file should be ('exists) // using a symbol file should be (inExistance) // using a BePropertyMatcher
Although these expressions will achieve your goal of throwing a TestFailedException
if the file does not exist, they don't produce
the most readable code because the English is either incorrect or awkward. In this case, you might want to create a
custom Matcher[java.io.File]
named exist
, which you could then use to write expressions like:
// using a plain-old Matcher file should exist file should not (exist) file should (exist and have ('name ("temp.txt")))
Note that when you use custom Matcher
s, you will need to put parentheses around the custom matcher in more cases than with
the built-in syntax. For example you will often need the parentheses after not
, as shown above. (There's no penalty for
always surrounding custom matchers with parentheses, and if you ever leave them off when they are needed, you'll get a compiler error.)
One good way to organize custom matchers is to place them inside one or more traits that you can then mix into the suites or specs that need them. Here's an example:
trait CustomMatchers {
class FileExistsMatcher extends Matcher[java.io.File] {
def apply(left: java.io.File) = {
val fileOrDir = if (left.isFile) "file" else "directory"
val failureMessageSuffix = fileOrDir + " named " + left.getName + " did not exist"
val negatedFailureMessageSuffix = fileOrDir + " named " + left.getName + " existed"
MatchResult( left.exists, "The " + failureMessageSuffix, "The " + negatedFailureMessageSuffix, "the " + failureMessageSuffix, "the " + negatedFailureMessageSuffix ) } }
val exist = new FileExistsMatcher }
// Make them easy to import with: // import CustomMatchers._ object CustomMatchers extends CustomMatchers
Note: the CustomMatchers
companion object exists to make it easy to bring the
matchers defined in this trait into scope via importing, instead of mixing in the trait. The ability
to import them is useful, for example, when you want to use the matchers defined in a trait in the Scala interpreter console.
This trait contains one matcher class, FileExistsMatcher
, and a val
named exist
that refers to
an instance of FileExistsMatcher
. Because the class extends Matcher[java.io.File]
,
the compiler will only allow it be used to match against instances of java.io.File
. A matcher must declare an
apply
method that takes the type decared in Matcher
's type parameter, in this case java.io.File
.
The apply method will return a MatchResult
whose matches
field will indicate whether the match succeeded.
The failureMessage
field will provide a programmer-friendly error message indicating, in the event of a match failure, what caused
the match to fail.
The FileExistsMatcher
matcher in this example determines success by calling exists
on the passed java.io.File
. It
does this in the first argument passed to the MatchResult
factory method:
left.exists,
In other words, if the file exists, this matcher matches.
The next argument to MatchResult
's factory method produces the failure message string:
"The " + failureMessageSuffix,
If the passed java.io.File
is a file (not a directory) and has the name temp.txt
, for example, the failure
message would be:
The file named temp.txt did not exist
For more information on the fields in a MatchResult
, including the subsequent three fields that follow the failure message,
please see the documentation for MatchResult
.
Given the CustomMatchers
trait as defined above, you can use the exist
syntax in any suite or spec in
which you mix in the trait:
class ExampleSpec extends Spec with ShouldMatchers with CustomMatchers {
describe("A temp file") {
it("should be created and deleted") {
val tempFile = java.io.File.createTempFile("delete", "me")
try { // At this point the temp file should exist tempFile should exist } finally { tempFile.delete() }
// At this point it should not exist tempFile should not (exist) } } }
Note that when you use custom Matcher
s, you will need to put parentheses around the custom matcher when if follows not
,
as shown in the last assertion above: tempFile should not (exist)
.
There are other ways to create new matchers besides defining one as shown above. For example, you would normally check to ensure an option is defined like this:
Some("hi") should be ('defined)
If you wanted to get rid of the tick mark, you could simply define defined
like this:
val defined = 'defined
Now you can check that an option is defined without the tick mark:
Some("hi") should be (defined)
Perhaps after using that for a while, you realize you're tired of typing the parentheses. You could get rid of them with another one-liner:
val beDefined = be (defined)
Now you can check that an option is defined without the tick mark or the parentheses:
Some("hi") should beDefined
You can also use ScalaTest matchers' logical operators to combine existing matchers into new ones, like this:
val beWithinTolerance = be >= 0 and be <= 10
Now you could check that a number is within the tolerance (in this case, between 0 and 10, inclusive), like this:
num should beWithinTolerance
When defining a full blown matcher, one shorthand is to use one of the factory methods in Matcher
's companion
object. For example, instead of writing this:
val beOdd = new Matcher[Int] { def apply(left: Int) = MatchResult( left % 2 == 1, left + " was not odd", left + " was odd" ) }
You could alternately write this:
val beOdd = Matcher { (left: Int) => MatchResult( left % 2 == 1, left + " was not odd", left + " was odd" ) }
Either way you define the beOdd
matcher, you could use it like this:
3 should beOdd 4 should not (beOdd)
You can also compose matchers. If for some odd reason, you wanted a Matcher[String]
that
checked whether a string, when converted to an Int
,
was odd, you could make one by composing beOdd
with
a function that converts a string to an Int
, like this:
val beOddAsInt = beOdd compose { (s: String) => s.toInt }
Now you have a Matcher[String]
whose apply
method first
invokes the converter function to convert the passed string to an Int
,
then passes the resulting Int
to beOdd
. Thus, you could use
beOddAsInt
like this:
"3" should beOddAsInt "4" should not (beOddAsInt)
You can also define a method that produces a matcher using matcher
composition and a passed parameter. For example, here's how you could create a Matcher[File]
from a
Matcher[String]
:
import java.io.File def endWithExtension(ext: String) = endWith(ext) compose { (f: File) => f.getPath }
Every time you call the above endWithExtension
method, you'll get a new Matcher[File]
. Here's an example:
new File("output.txt") should endWithExtension("txt")
Sometimes you need to test whether a method throws an expected exception under certain circumstances, such
as when invalid arguments are passed to the method. With ShouldMatchers
mixed in, you can
check for an expected exception like this:
evaluating { s.charAt(-1) } should produce [IndexOutOfBoundsException]
If charAt
throws an instance of StringIndexOutOfBoundsException
,
this expression will result in that exception. But if charAt
completes normally, or throws a different
exception, this expression will complete abruptly with a TestFailedException
.
This expression returns the caught exception so that you can inspect it further if you wish, for
example, to ensure that data contained inside the exception has the expected values. Here's an
example:
val thrown = evaluating { s.charAt(-1) } should produce [IndexOutOfBoundsException] thrown.getMessage should equal ("String index out of range: -1")
Perhaps the most tricky part of writing assertions using ScalaTest matchers is remembering when you need or don't need parentheses, but bearing in mind a few simple rules should help. It is also reassuring to know that if you ever leave off a set of parentheses when they are required, your code will not compile. Thus the compiler will help you remember when you need the parens. That said, the rules are:
1. Although you don't always need them, it is recommended style to always put parentheses
around right-hand values, such as the 7
in num should equal (7)
:
result should equal (4) array should have length (3) book should have ( 'title ("Programming in Scala"), 'author (List("Odersky", "Spoon", "Venners")), 'pubYear (2008) ) option should be ('defined) catMap should (contain key (9) and contain value ("lives")) keyEvent should be an ('actionKey) javaSet should have size (90)
2. Except for length
and size
, you must always put parentheses around
the list of one or more property values following a have
:
file should (exist and have ('name ("temp.txt"))) book should have ( title ("Programming in Scala"), author (List("Odersky", "Spoon", "Venners")), pubYear (2008) ) javaList should have length (9) // parens optional for length and size
3. You must always put parentheses around and
and or
expressions, as in:
catMap should (contain key (9) and contain value ("lives")) number should (equal (2) or equal (4) or equal (8))
4. Although you don't always need them, it is recommended style to always put parentheses
around custom Matcher
s when they appear directly after not
:
file should exist file should not (exist) file should (exist and have ('name ("temp.txt"))) file should (not (exist) and have ('name ("temp.txt")) file should (have ('name ("temp.txt") or exist) file should (have ('name ("temp.txt") or not (exist))
That's it. With a bit of practice it should become natural to you, and the compiler will always be there to tell you if you forget a set of needed parentheses.
Next, learn about testing with mock objects.


1 reference to ClearRunningRunspaceList
System.Management.Automation (1)
engine\debugger\debugger.cs (1)
1119
ClearRunningRunspaceList
();


Intro to HTML & CSS 4wk Series
Homework
Week 3, Session 6 •
March 29, 2018
Start to refine your site's design
Using the new things you've learned this week try to make your site look the way you want it based on the wireframe you built on Tuesday.


ProscriptLS
Prolog for the Web
The ProscriptLS language is a version of Prolog that runs in web browsers. It aspires to be a superset of ISO Prolog that is a complete alternative to Javascript for implementing web sites. (This site is implemented using ProscriptLS instead of Javascript.)
It supports interaction with the HTML Document Object Model (DOM) through builtin predicates. There is a full source-level Prolog debugger based on the Byrd Box Model available through an in-client command-line ProscriptLS interpreter.
The implementation uses a runtime engine that interprets byte codes. This engine is implemented in Javascript and is a version of the Warren Abstract Machine (WAM).
The ProscriptLS SDK associated with each release contains all of the files needed to develop a ProscriptLS web site.
Running ProscriptLS
ProscriptLS is started by the proscriptls_init function (implemented in the proscriptls.js library). This function is typically invoked once per load of the web page in an onload handler for the 'body' element:

Body stuff

Compiling ProscriptLS programs in the web client
The proscriptls_init function supports compilation of ProscriptLS programs in the client using the 'script' tag with the 'type' attribute of 'text/prolog' or using the ProscriptLS 'consult/1' predicate.Compilation Examples
- The 'script' tag with the source being a file specified using the
'src' attribute:

-
The 'script' tag with the source as the text content of the 'script' element:

-
Consulting a source file using the proscriptls function:
 More HTML
Basic Example
The following HTML source is a basic example showing the use of a ProscriptLS program to create a 'click me' button that when clicked displays a 'Hello World' alert dialog.

<title>ProscriptLS Basic</title>

ProscriptLS Basic

The button displays an alert
dialog containing
'Hello World'

The ':- initialization(setup_button).' statement in the Prolog source is a Prolog compiler
directive that causes the wam_compiler to evaluate 'setup_button' after completing the compilation
of the Prolog source in that 'script' element.


flutter_scandit_plugin library
Classes
- BarcodeResult
- Result of scanning a barcode
- Scandit
- Make sure that you display this widghet only after the app was granted the camera permissions from the user. You can use 'permission_handler' package or similar for this matters.
- ScanditController
- SymbologyUtils
- Simple utilities for dealing with symbology
Enums
- Symbology
- Type of encoding for the barcode
Exceptions / Errors
- BarcodeScanException
- Generic Flutter Scandit Barcode Exception
- CameraInitialisationException
- Exception caused by unexpected failure in initialising the camera
- CameraPermissionDeniedException
- Exception caused denied camera permissions
- MissingLicenceException
- Exception caused by missing Scandit licence key
- NoCameraException
- Exception caused by not finding a camera to use for scanning


REWARD HELPER
TEACHERS NOT ONLY TEACH, THEY ALSO LEARN.

We are a team that works in the best way, managing to do the best in each more job.
Server configuration
We ourselves configure your server from scratch, or at a certain level, where you have stayed.
Basic bot programming
Our team knows the JavaScript and BDScript languages, well enough to create your own bot.
Your website
We take care of giving you the website, for whatever you want (the hosting is not paid by us).
Why trust us?
We not only say and certify our services; we have people, who also recommend us, and you can contact them yourself.


Huge Pages¶
VPP requires hugepages to run during VPP operation, to manage large pages of memory. During VPP installation, VPP will overwrite the existing hugepage settings. By default, VPP sets the number of hugepages on a system to 1024 2M hugepages. This is the number of hugepages on the system, not just used by VPP.
When VPP is installed, the following configuration file is copied to the system. The hugepage settings are applied in the VPP installation and on system reboots. To set the hugepage settings, perform the following commands:
$ cat /etc/sysctl.d/80-vpp.conf
# Number of 2MB hugepages desired
vm.nr_hugepages=1024
# Must be greater than or equal to (2 * vm.nr_hugepages).
vm.max_map_count=3096
# All groups allowed to access hugepages
vm.hugetlb_shm_group=0
# Shared Memory Max must be greater or equal to the total size of hugepages.
# For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
# If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
# is greater than the calculated TotalHugepageSize then set this parameter
# to current shmmax value.
kernel.shmmax=2147483648
Depending on how the system is being used, this configuration file can be updated to adjust the number of hugepages reserved on a system. Below are some examples of possible settings.
For a small VM with minimal workload:
vm.nr_hugepages=512
vm.max_map_count=2048
kernel.shmmax=1073741824
For a large system running multiple VMs, each needing its own set of hugepages:
vm.nr_hugepages=32768
vm.max_map_count=66560
kernel.shmmax=68719476736
Note
If VPP is being run in a Virtual Machine (VM), the VM must have hugepage backing. When VPP is installed, it will attempt to overwrite existing the hugepage setting. If the VM does not have hugepage backing, the install will fail, but the failure may go unnoticed. When the VM is rebooted, on system startup, ‘vm.nr_hugepages’ will be reapplied, and will fail, and the VM will abort kernel boot, locking up the VM. To avoid this scenario, ensure the VM has enough hugepage backing.


Git is an open-source version control management system that allows developers to track changes made on their code files throughout the lifetime of a project. Git exists locally on a person’s computer. Github is a social coding website that allows developers to share their code and keep track of their changes using Git. It exists remotely online.
Version control is the ability to save multiple versions of a project so that they can be reviewed or tracked. GitHub is great because it allows multiple people to work on a project at the same time and tells you when a change was made, who made it, what they called the change, what file they changed, what they deleted and what they added to the code.
Developers use version control and websites like GitHub to keep track of changes in their code. This is useful if a mistake is made or an earlier version is needed. It is also important when a developer is working on the same files with other people. Instead of sending a file back and forth to work on it, they can all work on the same files at the same time and merge them together.


Popular Areas in a sad face crying a cartoon
Sad Face Stock Photos, Pictures, Royalty Free Sad Face Images ...
Matches 1 - 60 of 36114 . sad face Search and download from millions of HD .
http://www.123rf.com/stock-photo/sad_face.html
Free Crying Smiley Face Clip Art Illustration
This royalty-free cartoon styled clip art picture is available as a fine art print and poster. . Clipart Illustration Of A Sad Yellow Smiley Face Pouting And Crying .
http://free.clipartof.com/details/28-Free-Crying-Smiley-Face-Clip-Art-Illustration
Sad - The Internet Reaction Face Archive
Funny, Confused, and Sarcastic reaction faces to post on .
http://www.reactionface.info/face?tid=sad
Iminent -Emoticons of Sad Elephant Crying
Emoticons : This is an emoticon of a sad elephant crying his eyes out. . us again for another Elephant Emoticon with a sad face, and Elephant crying Photos!
http://www.iminent.com/Emoticons/3330403/sad-elephant-crying
How to Draw a Sad Face, Sad Anime - Drawing Tutorials
Dec 23, 2012 . How to Draw an Anime Cartoon Puppy . Intensity of Crying - There's many ways to draw a crying face, and depending . Depending on the topic or situation, these are two very helpful ways to draw a crying/sad anime scene.
http://www.dragoart.com/tuts/14552/1/1/how-to-draw-a-sad-face,-sad-anime-face.htm
Sad Face Crying vector - Download 1,000 Vectors (Page 1)
Sad Face Crying vector - Download 1000 Vectors (Page 1) . Smiley Face With Glasses clip art. 1-20 of 1,000 vectors for Sad Face Crying. < Prev 1 2 3 4 5 6 7 .
http://vector.us/search/sad-face-crying


Draw a shape and mimic scale factor proportionate to image scale in background
Scale (0.25 - 15):
+
-
1
Line
Rectangle


fun populateWIMSData(): void
Populates button description including distance to the nearest WIMSPoint


WATERWORLD A film review by Eric Grossman Copyright 1995 LOS ANGELES INDEPENDENT
For its first half hour, WATERWORLD looked as if it might be a decent movie. Huge sets and big action sequences offered some hope that this film would not be the total disaster many had predicted. Then the trouble started and WATERWORLD became a big, overproduced bore.
In this monstrosity, Kevin Costner plays the Mariner, a mutation that is mostly man but has gills and fish feet. The Mariner travels the ocean on his tricked-out trimaran, trading, scavenging and fighting off evil bad guys called Smokers. The Smokers are lead by the Deacon (Dennis Hopper) and their goal is to find a young child named, Enola (vociferously played by Tina Majorino), who bears a birthmark that holds the way to a mythic place called Dryland.
The Mariner arrives at a huge atoll to trade pure dirt (a most precious commodity) for hydro (fresh water). While there he meets Enola and her mother Helen (Jeanne Tripplehorn). When the Smokers attack the atoll so they can capture Enola, the Mariner escapes with the help of Helen and the young girl and the three head out into the open sea. At first, the Mariner doesn't want their company but he eventually grows fond of them and together they set out to find Dryland.
Up until the point where the Mariner escapes the atoll, WATERWORLD moves along in a swift, entertaining fashion. After that, the story slows to a crawl and all we are left with are the paper thin characters. Director Kevin Reynolds has a good eye but he and cinematographer Dean Semler can't make up for the lackluster script by Peter Rader and David Twohy.
The only thing as bad as the writing in this film is the acting. For his part, Costner never seems to find the right tone. His Mariner oscillates between a tough, uncaring anti-hero and a sensitive `90's guy. Hopper, playing yet another villain, looks as if he sleepwalked through his role as the Deacon. He has a few good one-liners but he is never menacing and that does not make for much drama. As the poorly scripted Helen, Jeanne Tripplehorn, no matter what she tries, cannot make her character interesting. She stares a lot and yells often at the Mariner but we never really learn much about her and she does not give us much reason to care to.
Technically, WATERWORLD is a great achievement, except I would like to know why on a film that costs $175 million, things still look fake. Production designer Dennis Gassner's sets, which include the atoll, a super-tanker and the trimaran give a sense of where some of that enormous budget went. The editing by Peter Boyle is slick and James Newton Howard's score, while it is nothing memorable, works just fine. Unfortunately, despite all its technical bravado, WATERWORLD is a lousy movie.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Reports cases of heavyweight property delegation.
Property delegation to noinline function(s) causes (reflective) KProperty
creation
which slows down initialization and should be avoided in applications which should start up fast.
The fix is either to delegate to inline functions (optimized since Kotlin 1.3.60) or to delegate manually.
See these issues in Kotlin YouTrack:
The inspection is provided by Mike's IDEA Extensions.


Jeremy Corbyn had his beard trimmed in a Carmarthen barber shop
Big Mel's barbershop gave the UK Labour leader a trim
by Robert HarriesBeing a political leader in the run-up to a General Election can be quite a time-consuming job, but it’s important to still find the time to keep yourself well groomed.
That’s what Jeremy Corbyn did over the weekend as he hit the campaign trail in Wales.
The Labour leader was in Barry , Swansea , Haverfordwest and Carmarthen on Saturday, before hitting the streets of north Wales on Sunday.
But it was in Carmarthen where he arguably made the biggest splash as he walked through the town centre and spoke at a rally at the county showground on the outskirts of town.
But in between the rallies and the speeches, he managed to pop into a popular Carmarthen barber shop to have his beard trimmed.
Mr Corbyn sat in a barber’s chair for around 20 minutes and spoke to staff and locals at Big Mel’s Barbershop in Nott Square in the centre of town.
“We had visitor from the Welsh Labour party come in on Saturday afternoon and he asked us if we minded if Jeremy Corbyn and some media popped in a bit later on,” explained owner Joey Sarrionandia.
“Of course we didn’t mind and we were happy to welcome him. We meet people from all walks of life in here and we’re very respectful to everyone and of everyone’s views.
“So just after 4pm he walked in and asked for a beard trim.”
Big Mel’s Barbershop, which opened as a business in 1997 and opened its current home in Nott Square two years ago, was a hive of media activity as Mr Corbyn sat in one of the leather chairs.
“We spoke for about 20 minutes, mainly about local business and also a bit about football,” added Joey.
“He was nice to chat to and seemed to take a genuine interest in how we were doing as a local, independent business. Despite all the media and the cameras going off he seemed very happy just to have a chat.”
Corbyn left the barber shop after around 25 minutes, but not before remembering that he had to pay.
“It’s £10 for a beard trim so as he got up to leave he put his hand into his pocket to get his wallet out," explained Joey.
"As it was past when we normally close on a Saturday I had already cashed up for the day, so I told him not to worry about it!”
With that Mr Corbyn was gone and Big Mel's Barbershop returned to normal.
“This wasn’t about politics for me,” added Joey.
“We respect everyone’s beliefs here. We were happy to have a public figure in the shop and it was just nice to chat to someone about local businesses, as they are so important for the future of Carmarthen and indeed any town.”