I find myself working in a Windows environment due to some temporary problems with my Linux installation. In terms of user experience Windows is not terrible. But more notable, things mostly just feel the same. My computing experience is not very dependent on the operating system… almost. Most of what I do is in a web browser — except programming itself. Probably a lot of you have the same experience: web browser, text editor, and terminal are pretty much all I need. I occasionally play with other tools, but none of them stick. Of course underlying the terminal and text editor UI is a whole host of important software — interpreters, version control tools, checkouts of all my projects, etc. So really there’s two things keeping us from a browser-only world: a few bits of UI, and a whole bunch of tools. Can we bridge this? I’m thinking (more speculatively than as an actual plan): could I stay on Windows without ever having to "use" Windows?
Browsers are clearly capable of implementing a capable UI for a terminal or editor; not a trivial endeavor, but not impossible. We need a way of handling the tools. The obvious answer in that case is a virtual machine. The virtual machine would certainly be using Linux, as there’s clear consensus that if you remove the UI and hardware considerations and just consider tools then Linux is by far the best choice — who uses Mac servers? And Windows is barely worth mentioning. I worked in a Linux VM for a while but found it really unsatisfying — but that was using the Linux UI through a VMWare interface.
So instead imagine: you start up a headless VM (remembering the tools are not about UI, so there’s no reason to have a graphical user interface on the VM), you point your browser at this VM, and you use a browser-based developer environment that mediates all the tools (the lightest kind of mediation is just simulating a terminal and using existing console-based interfaces).
I’m intrigued then by the idea of adding more to these interfaces, incrementally. Like HTML in the console, or applications lightly wrapping individual tools. IDEs never stick for me, maybe in part because I can’t commit, and also there’s collaboration issues with these tools (I’m never in a team where we would be able to agree on a single environment). But incremental decentralized improvements seem genuinely workable — improvement more in the style of the web, the browser providing the central metaphor.
I call this a Browser Desktop because it’s a fairly incremental change at this point and other terms (Web OS, Cloud OS) are always presented with unnecessarily hyperbole. What "operating system" you are using in this imagined system is a somewhat uninteresting semantic question; the OS hasn’t disappeared, it’s just boring. "The Cloud" is fine, but too easy to overthink, and there are many technical reasons to use a hybrid of local and remote pieces. "Internet Operating System" is more a framing concept than a thing-that-can-be-built. Chromium OS is essentially the same idea… I’m not really sure how they categorize themselves.
What would be painful right now? Good Javascript terminals exist. Bespin is hard at work on an editor worthy of being used by programmers. The browser needs to be an extremely solid platform. Google Chrome has done a lot in this direction, and Firefox is moving the same direction with the Electrolysis project. It’s okay to punt for now on all the "consumer" issues like music and media handling… and anyway, other people are hard at work on those things. Web sockets will help with some kinds of services that ideally will connect directly to a port; it’s not the same as a raw socket, but I feel like there’s potential for small intermediaries (e.g., imagine a Javascript app that connects to a locally-hosted server-side app that proxies to ssh). Also AddOns can be used when necessary (e.g., ChatZilla <https://addons.mozilla.org/en-US/firefox/addon/16>).
I’d like much better management of all these "apps" aka pages aka windows or tabs — things like split screens and workspaces. Generally I think using such a system heavily will create all sorts of interesting UI tensions. Which might be annoying for the user, but if it’s a constructive annoyance…
On the whole… this seems doable. It’s navel gazing in a sense — programmers thinking about programming — but one good thing about navel gazing is that programmers have traditionally been quite good at navel gazing, and while some results aren’t generally applicable (e.g., VM management) the exercise will certainly create many generally applicable side products. It would encourage interesting itch-scratching. There’s lots of other "web OS" efforts out there, but I’ve never really understood them… they copy desktop metaphors, or have weird filesystem metaphors, or create an unnecessarily cohesive experience. The web is not cohesive, and I’m pretty okay with that; I don’t expect my experiences in this context to be any more cohesive than my tasks are cohesive. In fact it’s exactly the lack of cohesiveness that interests me in this exercise — the browser mostly gives me the level of cohesiveness I want, and I’m open to experimentation on the rest. And maybe the biggest interest for me is that I am entirely convinced that traditional GUI applications are a dead end; they rise and fall (mobile apps being a current rise) but I can’t seriously imagine long term (10 year) viability for any current or upcoming GUI system. I’m certain the browser is going to be along for the long haul. Doing this would let us Live The Future ;)
Automatically generated list of related posts:
- pdb in the browser People have asked me a few times about evalexception and...
Paddy Mullen ported the rxvt terminal emulator to javascript and uses it in the browser for TerminalCast.
This seems like a mighty good starting place for an in-browser front end to a linux VM.
I’ve thought about this a lot too, and even more lately when I wish I could do more with iPad.
I keep wussing out of doing anything about this because it’s still so hard to make web applications with rich interfaces. I think we need some better tools before we really start seeing nice solutions to this problem. And I think we might have to wait a while for the browsers and standards to mature more before good tools are even possible.
Why do we need better tools? I need a respectable editor and a functional terminal; Bespin is close for an editor (and maybe was hard to implement, but so be it), and rxvt-js or some other tool have pretty much done the terminal. Building more stuff is interesting, but I don’t see why it should stop us from making the leap, nor does it seem like a big regression in terms of current UI. And I find the long-term maintainability of HTML UIs to be easier than traditional GUI UIs (but then I would, since I don’t do GUI work). Also in cases like these you can ignore some browser backward compatibility. There’s no need to support IE 6 for instance.
Also, I had forgot about this, but someone ported vi to javascript: http://gpl.internetconnection.net/vi/
Zope2 was trying to move all development to browser. They have failed. I’m not Zope expert so I might be wrong :) What you are offering is slightly different and because of that your idea might succeed. Terminal is good idea: I can still use version control, I can still use my tools (code indexing tools). Editor is problem however. I can still use my editor (Vim) in terminal but that will be slow if used over network and in that case there is no point to use browser: I can use putty from Windows. If we use browser native editor there is no guarantee that editor will satisfy everyone and each editor has its own learning curve and becomes favorite tool for developer (vim, emacs and textmate are only some examples). Again editor in JS will need to be different. E.g. I have mentioned code indexing tools (ctags, gnu id utils or my own pig (http://bitbucket.org/Dalius/pig/wiki/Home)) – there should be way to integrate with those tools. Editor must be extensible in this case.
TL;DR: If I can connect to server using SSH I don’t need dev. env. in browser.
There are two separate issues here: the Linux VM, and the browser-based interface. Both seem reasonable, but it strikes me that a better-than-browser-based interface is possible to be written.
This is in essence my situation as well; chromium, gedit and a shell… Making a web based text-editor with a shell seems like an interesting way of minimizing a “web/remote OS” to something approachable. It’s really all I need, and would leave me with … just a browser :).
This is actually what bespin could en up becoming. What I would like to see is their “terminal” being an interface to a OS level shell with all the richness of tools and control we are used to, and not just some bespin specific thing which is what it seems to be now ( I could be wrong – been a while since I had a look ).
Another important thing to me is the ability to save application states. Typically I’m in gedit with a bunch of files open relevant to a bug on a current project. It would be nice to save that application state and bring it back whenever and wherever I feel like and keep on working. This could be solved by saving browser states ( different file in different tab sort of thing and bringing that back up ), but I’d rather see 1 tab being 1 remote OS – or at least 1 editor with multiple files. Seems cleaner.
A second note would be the ability to work offline. But this can largely be solved with the storage facility being built into browsers these days.
The statement that it’s hard making web applications with rich interfaces I think i fault. With javascript libraries such as jQuery, processingjs and also taking into account the new possibilities with html5, making rich user-interfaces for the web is relatively simple compared to other approaches ( IMHO ).
Interesting stuff, drop me a line if you start up something and would like a hand :)
//Asbjørn
Working in a browser, or simply in Windows for that matter, is mostly an ergonomic issue for me. I miss the window management love from X11 WM, I miss the real command line / terminal and I always need to set up a myriad of things before it works like-it-should (even vim is msim’ified in an horrid way). A bit orthogonal, but interesting approach anyway : http://qubes-os.org/ This project tries to produce an integrated security-by-isolation Xen-VM based distribution, featuring a different VM for any different “class” of activity : web browsing, work, finance, name it.
The orbited project [0] is a server-side proxy that exposes the socket API to javascript in the browser (disclaimer: I’m the current maintainer). It’s been around for a couple of years now so it’s pretty stable and we’re working on making it easier to use. The js.io [1] project is working on javascript implementations of standard protocols that can be used both server-side and in the browser. If we’re willing to say that the right idea is to make network programming in the browser look like it does on the OS, I think this is a good start.
 In doing so, they hit me in the mind. It’s seems strange to think about a desktop environment implemented entirely in the browser, but it does seem possible. I’m just not sure it’s a good idea.
With regard to the Linux VM, I’m currently maintaining my development machine as a virtual machine, and I’m pretty happy with it. A nice side-effect seems to be that I can more easily separate “user” me from “developer” me. They have very different needs. Developing in a VM has had a stabilizing effect on the rest of my computing environment since I’m much less likely to hose my host OS install while doing strange developer things.
[0] http://orbited.org/
[1] http://js.io/
[2] http://steveire.wordpress.com/2009/10/24/akonadi-goes-web2-0/
Most of your desired digital eco-system can be provided on Windows by Cygwin (http://www.cygwin.org). Cygwin also has an implementation of X-Windows which gives you your connection to a headless machine accessed by network protocols. And X is much more fluid and functional than running things through a browser. It just seems like a lot of people are re-inventing everything just to say it runs through the browser.
I have to agree. I’m also actually currently working technically from Windows, but with a Linux VM. Between the amount of time I spend in a browser, Cygwin-powered X forwarding and VMWare’s Unity features, I barely notice the OS save that the UI is generally more streamlined when I come up from a linux command line.


ABSTRACT RANDOM
My Gregoric Thinking style is abstract random. According to the research I conducted, I'm emotional, I exist in the moment, I'm an idealist and creative, emotionally and physically free, exuberant, and I use words like 'Super!' 'Fantastic!' and 'Out-of-sight!' Close, Gregory. But that last one stopped working 20 years ago.
SUPER!
So I'm a people person. Genuinely, I knew that. My last job required me to teach others about thinking and learning styles - and coping mechanisms. My issue was primarily that last part, but I will glaze over that for now.
People persons are actually hard to find sometimes. I hope to use my people-personality at Dev Bootcamp to foster groupwork. And one-on-one work. Up to this point, I've always enjoyed pairing, and I always enjoy watching people workout problems and coordinate solutions with me or someone else. That will come in handy starting tomorrow, and I hope I can untilize it properly!
STRUGGLES?
I've had my share. Phase 0 was pretty tough when I had to go it alone. Granted, I only missed a few solutions (I think), but it was a darn struggle. When I paired, it was much easier to learn the concepts and have someone explain to me what they were doing or a collaboration of the two. Thankfully, DBC seems to focus quite a lot on pairing and cooperation, so that will be a good thing going forward. Though I do still get quite nervous.
A plan? Well, I have to learn to cope with nervousness. I enjoy pairing and I am a people person - but I get so nervous of not being enough. Working harder doesn't help, either; I still become terribly nervous. I hope that I can sidestep that. I assume that will just come with pairing more and more often.


| Arch | Endianness | Hostname | Platform | Release | Type | Tmpdir |
|---|
| UID | GID | Username | Homedir | Shell |
|---|
| Uptime | Total mem | Free mem | Load avg |
|---|
| Model | Speed | Times |
|---|
| Address | Netmask | Family | MAC | Internal | CIDR | Scope ID |
|---|
| Arch | Endianness | Hostname | Platform | Release | Type | Tmpdir |
|---|
| UID | GID | Username | Homedir | Shell |
|---|
| Uptime | Total mem | Free mem | Load avg |
|---|
| Model | Speed | Times |
|---|
| Address | Netmask | Family | MAC | Internal | CIDR | Scope ID |
|---|


Rockets' Austin Rivers calls for dad, Clippers coach Doc Rivers, to get technical foul
by Ryan GaydosHouston Rockets guard Austin Rivers was seen Wednesday night calling on the referees to give his father, Los Angeles Clippers coach Doc Rivers, a technical foul during their game.
The moment came with just under two minutes left to play in the game, with the Rockets up 96-88. Doc Rivers exploded on the referees and Austin Rivers was seen behind one of the officials making his hands into a “T” to signify a technical foul.
LAKERS SIT ANTHONY DAVIS AGAINST GOLDEN STATE
When Doc Rivers didn’t let up, he received the technical foul from the referee. Austin Rivers was delighted.
“I did,” Austin Rivers told reporters after he was asked whether he enjoyed the technical foul on his father, according to ESPN. “I knew it was coming. I could see it. I've seen that look before -- many times. Once he starts blinking his eyes fast, and he starts [imitates Doc getting mad], that's when I know he is about to level up. So I just started telling Tony to get him. They got him. He's out of here.”
Doc Rivers explained afterward his fury began with about five minutes to play in the game, when he sought to challenge an out of bounds call the referees had made. James Harden appeared to have poked the ball out of Clippers forward JaMychal Green’s hand before Green ran into Clint Capella.
MICHAEL JORDAN DESTROYED THE CLEVELAND CAVALIERS AFTER DAY-DRINKING, GOLFING, EX-NHL STAR SAYS
Capella was injured on the play and the Rockets called the timeout while he was being attended to, according to ESPN. The Clippers then called for a timeout so they could challenge the call that the ball went off Green. However, Rivers said he was told that he took more than the allowed time given to coaches to ask for a challenge.
Then, when Doc Rivers tried to call a timeout later in the game, he said he was told he had one timeout left. Rivers tried to contest it, to no avail.
During the timeout, Patrick Beverly was given a technical foul by Brothers and Rivers was then given two technical fouls and ejected for arguing.
GIANNIS ANTETOKOUNMPO TEARS JERSEY, KICKS HOLE IN THUNDER SIGN IN FRUSTRATION
“The refs screwed up,” Doc River said. “I made a challenge. They actually said I was right in the challenge, but that I took over the 30-second time to call it. So then two refs walked over to me and told me that that means you don't win the challenge. But you get your timeout back. The arena actually put the extra timeout back up on the board. So we think we have two timeouts. I think [we have two timeouts] because two refs actually walked over to me and told me, told all of our assistants and told our players.”
Brothers told a pool reporter that Rivers was informed he would not be charged a timeout for the challenge.
Austin Rivers, however, was still pretty happy over the technical fouls.
“I was just trying to help out the situation,” he said, jokingly.  Y'all don't know me for that. I've always been a peacemaker. That's just 100 percent Doc's gotta keep his cool.”
CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM
Even better for Austin Rivers, the Rockets came away with the win, 102-93.


Equivalent to clicking the Preferred command on the Gallery menu in Microsoft Excel version 4.0. Changes the format of the active chart to the format currently defined by the Set As Default Chart option in the Standard Types tab of the Chart Type dialog box or the SET.PREFERRED macro function.
Syntax
PREFERRED( )
Related Function
SET.PREFERRED Changes the default chart format
Return to index


This repository contains a simple implementation of a point-to-point virtual private network by opening a TUN device and transferring raw traffic over UDP. This VPN was designed to create a tunnel between two hosts: 1. A client host operating behind an obtrusive NAT which drops TCP connections frequently, but happens to pass UDP traffic reliably. 2. A server host that is internet-accessible.
TUN traffic is sent ad-verbatim between the two endpoints via unencrypted UDP packets. Thus, this should only be used if a more secure protocol (like SSH; see github.com/dsnet/sshtunnel ) is running on top of this VPN. In order to prevent attackers from connecting to other locally binded sockets on the endpoints, a simple port filter is built-in to restrict IP traffic to only the specified ports. Users of udptunnel should also setup iptable rules as a secondary measure to restrict malicious traffic.
This only supports Linux.
Build the daemon:
Create a server configuration file:
```javascript
{
"TunnelAddress": "<IP_ADDRESS>",
"NetworkAddress": ":8000",
"AllowedPorts": [22],
}
The
NetworkAddress
with an empty host indicates that the daemon is operating
in server mode.
Create a client configuration file:
{
"TunnelAddress": "<IP_ADDRESS>",
"NetworkAddress": "server.example.com:8000",
"AllowedPorts": [22],
}
The host
server.example.com
is assumed to resolve to some address where the
client can reach the server.
Start the daemon on both the client and server (assuming
$GOPATH/bin
is in your
$PATH
):
<EMAIL_ADDRESS>$ udptunnel /path/to/config.json
<EMAIL_ADDRESS>$ udptunnel /path/to/config.json
Try accessing the other endpoint (example is for client to server):
<EMAIL_ADDRESS>$ ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_req=1 ttl=64 time=56.7 ms
64 bytes from <IP_ADDRESS>: icmp_req=2 ttl=64 time=58.7 ms
64 bytes from <IP_ADDRESS>: icmp_req=3 ttl=64 time=50.1 ms
64 bytes from <IP_ADDRESS>: icmp_req=4 ttl=64 time=51.6 ms
<EMAIL_ADDRESS>$ nmap <IP_ADDRESS>
Host is up (0.063s latency).
PORT STATE SERVICE
22/tcp open ssh
<EMAIL_ADDRESS>$ ssh <IP_ADDRESS>
Password: ...
The above example shows the client trying to communicate with the server,
which is addressable at
<IP_ADDRESS>
. The example commands can be done from the
server by dialing the client at
<IP_ADDRESS>
, instead.
Copyright © 2017, The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the copyright holder nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.

Hide license


You have notified Revenue that the subcontractor(s) named below will be engaged in a contract with you.
The rate of RCT for the subcontractor(s) outlined below is the current rate. The actual
rate of RCT to be applied to each relevant payment to the subcontractor
concerned is the rate shown on the Deduction Authorisation. This will
be issued to you by Revenue when you make a Payment Notification.
Please Wait.....


Chain Evaluator
Evaluation results
Chains evaluated
| Name | Sequence | PAM |
|---|---|---|
| {{sequence.name}} | {{sequence.chain}} | {{sequence.pam}} |
Errors during evaluation
| File | Row | Error |
|---|---|---|
| {{error.fileName}} | {{error.row}} | {{error.error}} |
| Name | Sequence | PAM |
|---|---|---|
| {{sequence.name}} | {{sequence.chain}} | {{sequence.pam}} |
| File | Row | Error |
|---|---|---|
| {{error.fileName}} | {{error.row}} | {{error.error}} |


{include file="inc/header" company="123321"/} {include file="inc/left" /}
{include file="inc/title" /} {__CONTENT__}
{include file="inc/footer" /}


{% set title = gettext("Developers") %} {% set adaptor_type = "JS Config" %} {% extends "composers/adapt/about.html" %} {% block adaptor_content %}
Creating an application is simple. Your application must contain two scripts with the following special tags:
<script data-configuration-definition type="text/javascript" charset="utf-8" src="conceptmap1.0/configuration_definition.js"></script> <script data-configuration type="text/javascript" charset="utf-8" src="conceptmap1.0/configuration_default.js"></script>
The first script includes the definition of the variables which are present. An example of this, developed at University of Twente, is the following:
(function() { "use strict"; window.golab = window.golab || {}; window.golab.tools = window.golab.tools || {}; window.golab.tools = window.golab.tools || {}; window.golab.tools.configurationDefinition = window.golab.tools.configurationDefinition || {}; window.golab.tools.configurationDefinition["conceptmapper"] = { debug: { label: "Debug mode?", description: "Turns on/off verbose console messages.", type: "boolean", value: "true", configurable: "true" }, auto_load: { label: "Auto load?", description: "Automatically load the latest saved file?", type: "boolean", value: "true", configurable: "true" } } }).call(this);
You have the complete example here. The second script contains the default configuration:
(function() { "use strict"; window.golab = window.golab || {}; window.golab.tools = window.golab.tools || {}; window.golab.tools = window.golab.tools || {}; window.golab.tools.configuration = window.golab.tools.configuration || {}; window.golab.tools.configuration["conceptmapper"] = { debug: { type: "boolean", value: "true" }, auto_load: { type: "boolean", value: "false" } }; }).call(this);
You have the complete example here.
The AppComposer basically takes the first script and use it to display a form to the teachers. Then, it stores the changes made by the teacher. Finally, every user loading the adaptation will have the same contents, but the second file path will be replaced by the one customized by the teacher.
{% endblock %}


Ever faced disruption of services when Wifi is down and it switches over to your mobile network. Well thats why we need mobility.
Read MoreAn internet world dominated by ruthless hackers and attackers, MobilityFirst gives you protection like no other Network technology. By the use of GNS, which fortifies security and privacy by the usage of GUID and Network Addresses, and flexible Access Control Lists. The massive replication and federation of name certification as well as name resolution in GNS implies a huge and near impossible cost for the adversary to inflict a DDoS attack. GNS also helps in verifying an end point entity.
Read MoreNo more hacks to initiate communication with your clients. Look into mobility first and feel the breeze while designing scalable applications.
This is one of the core underlying principles that brings us to the next gen internetworking arena. GNS aids in providing security and privacy and also enables us to communicate towards end point principals like content, hosts, services, etc. Want to know more ? Check out GNS for yourselves.
High availability and low lookup latency made available through Gigapaxos - a system that helps create a geo-distributed system that scales based on a demand-aware system. Want to know more ? Check out Gigapaxos for yourselves.


Turnip
Turnip is a Green food. Green foods are safe to eat as a regular part of a diet.
Category Quotes
Guideline related quotes related to Non-Starchy and Green throughout Geoff Bond's publications.
Eat at least 2 3/4 lbs of mixed salad and vegetables per day, consisting of "Green-Green” and “Green” foods. Of these, at least 3/4 lb should be mixed salad. Also include at least 5 cups of “Green-Green” leafy vegetables or 2 1/2 cups of other vegetables per week. ~Paleo in a Nutshell p.102
Additional Quotes
Specific references to Turnip throughout Geoff Bond's publications.
Being a World War II baby, I spent the first fifteen years of my life on food rations. It is said that we are the "lucky" generation: Many unhealthy foods like sugar, bacon, pork, beef, milk, butter, fat, cakes, and even bread were strictly rationed. Meanwhile, we could eat as much as we liked of cabbage, onions, and turnips! ~Paleo in a Nutshell p.9
Not all underground vegetables are starchy. For example, turnip and radish, which both originated in Asia, are non-starchy, as are bulbs such as onion and garlic from Asia and the leek from the Middle East. Corms such as Chinese water chestnut are also non-starchy. Unlike the starchy roots, they mostly get their bulk from another com pound called "inulin." ~Deadly Harvest p.56


Replication¶
Because each replica in Swift functions independently, and clients generally require only a simple majority of nodes responding to consider an operation successful, transient failures like network partitions can quickly cause replicas to diverge. These differences are eventually reconciled by asynchronous, peer-to-peer replicator processes. The replicator processes traverse their local filesystems, concurrently performing operations in a manner that balances load across physical disks.
Replication uses a push model, with records and files generally only being copied from local to remote replicas. This is important because data on the node may not belong there (as in the case of handoffs and ring changes), and a replicator can’t know what data exists elsewhere in the cluster that it should pull in. It’s the duty of any node that contains data to ensure that data gets to where it belongs. Replica placement is handled by the ring.
Every deleted record or file in the system is marked by a tombstone, so that deletions can be replicated alongside creations. The replication process cleans up tombstones after a time period known as the consistency window. The consistency window encompasses replication duration and how long transient failure can remove a node from the cluster. Tombstone cleanup must be tied to replication to reach replica convergence.
If a replicator detects that a remote drive has failed, the replicator uses the get_more_nodes interface for the ring to choose an alternate node with which to synchronize. The replicator can maintain desired levels of replication in the face of disk failures, though some replicas may not be in an immediately usable location. Note that the replicator doesn’t maintain desired levels of replication when other failures, such as entire node failures, occur because most failure are transient.
Replication is an area of active development, and likely rife with potential improvements to speed and correctness.
There are two major classes of replicator - the db replicator, which replicates accounts and containers, and the object replicator, which replicates object data.
DB Replication¶
The first step performed by db replication is a low-cost hash comparison to determine whether two replicas already match. Under normal operation, this check is able to verify that most databases in the system are already synchronized very quickly. If the hashes differ, the replicator brings the databases in sync by sharing records added since the last sync point.
This sync point is a high water mark noting the last record at which two databases were known to be in sync, and is stored in each database as a tuple of the remote database id and record id. Database ids are unique amongst all replicas of the database, and record ids are monotonically increasing integers. After all new records have been pushed to the remote database, the entire sync table of the local database is pushed, so the remote database can guarantee that it is in sync with everything with which the local database has previously synchronized.
If a replica is found to be missing entirely, the whole local database file is transmitted to the peer using rsync(1) and vested with a new unique id.
In practice, DB replication can process hundreds of databases per concurrency setting per second (up to the number of available CPUs or disks) and is bound by the number of DB transactions that must be performed.
Object Replication¶
The initial implementation of object replication simply performed an rsync to push data from a local partition to all remote servers it was expected to exist on. While this performed adequately at small scale, replication times skyrocketed once directory structures could no longer be held in RAM. We now use a modification of this scheme in which a hash of the contents for each suffix directory is saved to a per-partition hashes file. The hash for a suffix directory is invalidated when the contents of that suffix directory are modified.
The object replication process reads in these hash files, calculating any invalidated hashes. It then transmits the hashes to each remote server that should hold the partition, and only suffix directories with differing hashes on the remote server are rsynced. After pushing files to the remote server, the replication process notifies it to recalculate hashes for the rsynced suffix directories.
Performance of object replication is generally bound by the number of uncached directories it has to traverse, usually as a result of invalidated suffix directory hashes. Using write volume and partition counts from our running systems, it was designed so that around 2% of the hash space on a normal node will be invalidated per day, which has experimentally given us acceptable replication speeds.
Work continues with a new ssync method where rsync is not used at all and instead all-Swift code is used to transfer the objects. At first, this ssync will just strive to emulate the rsync behavior. Once deemed stable it will open the way for future improvements in replication since we’ll be able to easily add code in the replication path instead of trying to alter the rsync code base and distributing such modifications.
One of the first improvements planned is an “index.db” that will replace the hashes.pkl. This will allow quicker updates to that data as well as more streamlined queries. Quite likely we’ll implement a better scheme than the current one hashes.pkl uses (hash-trees, that sort of thing).
Another improvement planned all along the way is separating the local disk structure from the protocol path structure. This separation will allow ring resizing at some point, or at least ring-doubling.
Note that for objects being stored with an Erasure Code policy, the replicator daemon is not involved. Instead, the reconstructor is used by Erasure Code policies and is analogous to the replicator for Replication type policies. See Erasure Code Support for complete information on both Erasure Code support as well as the reconstructor.
Hashes.pkl¶
The hashes.pkl file is a key element for both replication and reconstruction (for Erasure Coding). Both daemons use this file to determine if any kind of action is required between nodes that are participating in the durability scheme. The file itself is a pickled dictionary with slightly different formats depending on whether the policy is Replication or Erasure Code. In either case, however, the same basic information is provided between the nodes. The dictionary contains a dictionary where the key is a suffix directory name and the value is the MD5 hash of the directory listing for that suffix. In this manner, the daemon can quickly identify differences between local and remote suffix directories on a per partition basis as the scope of any one hashes.pkl file is a partition directory.
For Erasure Code policies, there is a little more information required. An object’s hash directory may contain multiple fragments of a single object in the event that the node is acting as a handoff or perhaps if a rebalance is underway. Each fragment of an object is stored with a fragment index, so the hashes.pkl for an Erasure Code partition will still be a dictionary keyed on the suffix directory name, however, the value is another dictionary keyed on the fragment index with subsequent MD5 hashes for each one as values. Some files within an object hash directory don’t require a fragment index so None is used to represent those. Below are examples of what these dictionaries might look like.
Replication hashes.pkl:
{'a43': '72018c5fbfae934e1f56069ad4425627',
'b23': '12348c5fbfae934e1f56069ad4421234'}
Erasure Code hashes.pkl:
{'a43': {None: '72018c5fbfae934e1f56069ad4425627',
2: 'b6dd6db937cb8748f50a5b6e4bc3b808'},
'b23': {None: '12348c5fbfae934e1f56069ad4421234',
1: '45676db937cb8748f50a5b6e4bc34567'}}
Dedicated replication network¶
Swift has support for using dedicated network for replication traffic. For more information see Overview of dedicated replication network.


@FunctionalInterface public interface TypeAnnotationChecker
A1
is
assignable to annotation A2
, then a given annotated type @A1 T1
is assignable to
another type @A2 T2
as long as T1
is assignable to T2
according to the
Java type system. (See Types.isAssignable(java.lang.reflect.Type, java.lang.reflect.Type)
for more info.)
This can provide functionality similar to the Checker Framework, except that it works at runtime instead of compile-time and is backed by core reflection.
TypeAnnotationHierarchy
| Modifier and Type | Method and Description |
|---|---|
default TypeAnnotationChecker |
and(TypeAnnotationChecker other)
Combines two checkers into one.
|
default boolean |
isAssignable(Annotation[] from,
Annotation[] to)
Determines if a given set of annotations is assignable to a second set of annotations.
|
boolean |
isAssignable(Annotation from,
Annotation to)
Determines if the given annotation is assignable to the other.
|
default boolean |
isAssignable(Collection<? extends Annotation> from,
Collection<? extends Annotation> to)
Determines if the one set of annotations is assignable to a second set of annotations.
|
default boolean |
isEquivalent(Annotation[] a1,
Annotation[] a2)
Determines if a given set of annotations is equivalent to a second set of annotations.
|
default boolean |
isEquivalent(Annotation a1,
Annotation a2)
Determines if the given two annotations are equivalent.
|
default boolean |
isEquivalent(Collection<? extends Annotation> a1,
Collection<? extends Annotation> a2)
Determines if a given set of annotations is equivalent to a second set of annotations.
|
default void |
validateAnnotations(Annotation[] annotations)
Validates that the given set of annotations is consistent.
|
default void |
validateAnnotations(Collection<? extends Annotation> annotations)
Validates that the given set of annotations is consistent.
|
boolean isAssignable(Annotation from, Annotation to)
null
, indicating unannotated types.
Note that two equivalent types are mutually assignable. So if two annotations indicate the same type, then this method should return true regardless of the order of arguments.
from
- annotation that appears on the type of the assignment source (RHS)to
- annotation that appears on the type of the assignment target (LHS)to
is assignable from a type annotated with
from
default boolean isEquivalent(Annotation a1, Annotation a2)
null
, indicating unannotated types.
The default implementation verifies that the first annotation is assignable to the second and vice versa: that the second is assignable to the first.
a1
- a type annotationa2
- another type annotationdefault boolean isAssignable(Collection<? extends Annotation> from, Collection<? extends Annotation> to)
A1
is assignable from annotation A2
, then a given annotated
type @A1 T1
is assignable from another type @A2 T2
as long as T1
is
assignable from T2
according to the Java type system. (See Types.isAssignable(java.lang.reflect.Type, java.lang.reflect.Type)
for more info.)
Note that two equivalent types are mutually assignable. So if two annotations indicate the same type, then this method should return true regardless of the order of arguments.
An argument that is empty indicates the absence of any type annotations.
The default implementation reduces the two sets of annotations to single annotations. If
either set contains more than one annotation which is not equivalent to the others, then an
exception is thrown since this indicates an invalid (or incompatible) set of annotations. Upon
reduction, the single from and to annotations are checked via
isAssignable(Annotation, Annotation)
.
from
- annotations that appear on the type of the assignment source (RHS)to
- annotations that appear on the type of the assignment target (LHS)to
annotations is assignable from a type
annotated with from
annotationsIllegalArgumentException
- if either collection of annotations represents an illegal
combination of type annotations (for example, contains both NotNull
and
Nullable
)default boolean isAssignable(Annotation[] from, Annotation[] to)
from
- annotations that appear on the type of the assignment source (RHS)to
- annotations that appear on the type of the assignment target (LHS)to
annotations is assignable from a type
annotated with from
annotationsIllegalArgumentException
- if either collection of annotations represents an illegal
combination of type annotations (for example, contains both NotNull
and
Nullable
)isAssignable(Collection, Collection)
default boolean isEquivalent(Collection<? extends Annotation> a1, Collection<? extends Annotation> a2)
An argument that is empty indicates the absence of any type annotations.
The default implementation reduces the two sets of annotations to single annotations. If
either set contains more than one annotation which is not equivalent to the others, then an
exception is thrown since this indicates an invalid (or incompatible) set of annotations. Upon
reduction, the single from and to annotations are checked via
isEquivalent(Annotation, Annotation)
.
a1
- a set of annotations associated with a typea2
- another set of annotations associated with a typea1
annotations is equivalent to a type
annotated with a2
annotationsIllegalArgumentException
- if either collection of annotations represents an illegal
combination of type annotations (for example, contains both NotNull
and
Nullable
)default boolean isEquivalent(Annotation[] a1, Annotation[] a2)
a1
- a set of annotations associated with a typea2
- another set of annotations associated with a typea1
annotations is equivalent to a type
annotated with a2
annotationsIllegalArgumentException
- if either collection of annotations represents an illegal
combination of type annotations (for example, contains both NotNull
and
Nullable
)isEquivalent(Collection, Collection)
default void validateAnnotations(Annotation[] annotations)
annotations
- a set of type annotationsIllegalArgumentException
- if either collection of annotations represents an illegal
combination of type annotations (for example, contains both NotNull
and
Nullable
)validateAnnotations(Collection)
default void validateAnnotations(Collection<? extends Annotation> annotations)
Nullable
and NonNull
) then an
exception is thrown
The default implementation verifies that all recognized annotations in the given set are equivalent. Otherwise, the set represents an invalid combination, and an exception is thrown.
annotations
- a set of type annotationsIllegalArgumentException
- if either collection of annotations represents an illegal
combination of type annotations (for example, contains both NotNull
and
Nullable
)default TypeAnnotationChecker and(TypeAnnotationChecker other)
other
- another annotation checker


Woman's tip for making mouldy shower tiles look good as new - without scrubbing
A woman has shared the simple but very effective way she managed to remove the mould from the grouting in her bathroom, without doing any scrubbing
by Courtney Pochin, https://www.facebook.com/courtneypochinmirror/?modal=admin_todo_tourIt's no secret that mould grows in warm, damp areas which have poor air circulation.
One place it often thrives in is bathrooms, growing around windows or on the grouting around shower tiles.
Trying to get rid of it can be incredibly tricky, but one woman claims to have found a solution.
In a post on a cleaning tips and tricks Facebook group, an unnamed woman revealed she'd found a simple hack for removing mould without doing an intense scrubbing - and it only cost around £2 to do.
The woman initially posted a photo of her mouldy grouting on the group, asking fellow members for suggestions on how to get them looking good as new.
Many people responded to her post, sharing ideas, including using toilet bowl cleaner and just re-sealing the tiles.
After trying a few of the hacks out, she finally found one that really did the trick, and all she needed were cotton wool and bleach to do it.
The woman claims she soaked a pieces of the cotton wool in the cleaning product and packed them all around the edges of the tiles.
The cotton wool was left on the tiles overnight and by the morning, the difference was incredible.
She re-shared her original photo as well as a new one showing the results of the cleaning trick.
"Thank you to everyone who has commented," she said. "I used cotton wool and bleach and have attached photos of the results. Wow!"
Dozens of people liked her post, with one person commented: "This is amazing!"


Chocolate Pizza
POSTED ON 15 DEC 2013/DESERTS
PRINT
For the fig swirl; Melt butter over medium heat in a suace pan. Add brown sugar and stir to dissolve. Halve all of the figs and toss in the saucepan with water and lemon juice. Cook over medium heat, stirring frequently, until you have a chunky-jammy mixture. Add salt with one or two stirs, set aside and let cool completely.
Ice cream: In a small pot over medium heat, combine milk, and granulated sugar until sugar is completely dissolved and the milk is just barely lukewarm. Whisk in the egg yolks. Set mixture in the fridge and wait until the fig mixture is cooled.
Using an ice cream machine, pour liquids into the fridge basin and process according to manufacturer instructions, i.e., let spin and thicken for 20 minutes before adding mascarpone, fig jam mixture, and the nuts. Continue to process for +/- 10 minutes. Pour semi-frozen mixture into a pyrex dish or glass tupperware. Freeze for at least 2 hours before serving.
- 1 1/2 cups milk
- 1/2 cup mascarpone
- 1/2 tsp pink salt
- 1 lb Black Mission Figs
- 1/2 cup brown sugar
- 1-4 tbsp water
- 1 1/2 cups heavy cream
- 4/3 granulated sugar
- 2 egg yolks
- 1 lemon, juiced
- 2 tbsp butter
- 1 cup honey roasted pecans, roughly chopped
Vanessa Stevenson
Food enthusiast, photography fan. Add a pinch of raw foodism and that's pretty much who I am.


The Final Frontier
Home
Latest
News Letters
Articles
Videos
Podcasts
Blogs
By
Hellp
Previous
Next
By
Hellp
Previous
Next
By
Hellp
Previous
Next


---
layout: post
title: 12/28 schoolwork
date: '2013-12-28T22:08:00.001-07:00'
author: Jacob .
tags:
- homeschool-journal
modified_time: '2013-12-28T22:08:52.277-07:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-8285621448808076169
blogger_orig_url: http://www.svlark.com/2013/12/1228-schoolwork.html
---
Audrey
- History: finished Chapter 12 on the Middle Kingdom of Egypt
- Spelling: started Lesson 12
- Composition: returned letter to Grampsy
Lorelei
- Kumon cutting


Happiness is Perception
Western cultures are incredibly unhappy. Although we have the hugest amount of opportunity available to us, we aren't happy. In fact, we are stressed all the time.
We are constantly focused on the next thing and what we need (or consume) next to make us happy. Once we obtain something (possession or goal), we are happy for a little while, but then go back to a stressful existence.
Western culture, and capitalism to some extent, is to blame for this mindset. If I asked you what your largest goal in life is, the underlying reason is you expect achieving it will make you happy. But, if you obtained this, would you be happy? No. You would have a temporary happiness and euphoria which only lasted for a short period of time. Once the happiness goes away, you would set another goal, which you think would make you happy if you achieved.
The Mindset of Happiness
No amount of goals achieved will actually make you happy. You have to change what your outlook is in order to be happy. Both Tony Robbins and Joel Osteen talk about the benefit of being thankful for things you currently have.
Tony Robbins suggests, an hour of power, walking each morning and saying out loud the things you are thankful for. His thought is by doing this and hearing yourself saying the things you are thankful for will create a change in mindset. Rather than being focused on things you want you will be focused on things you have.
Think about it. If you are living in a first-world country you have, clean running water, cheap abundant food, and relative easy access to health care. 95% of the world doesn't even have these 3 things. But are you thankful for this amazing things? We are so focused on what we want that we take what we have for granted.
To put this in perspective the U.S. Government puts out a cost of Food at Home Plan every month. For July 2012, an average person's meals for a month costs around $250. This is not even the thrifty plan. Your $2000 laptop could feed someone for 8 months. Are you thankful you can afford a device to read this on?
Everything is Amazing and No One Is Happy
We are more connected and have better networks than anyone in the past has ever had. We should be able to build amazing things with the resources available to us. But we don't. We are so focused on the bad and rarely focus on the good.
Louis C.K. has an entire rant where he talks about how amazing we all have it, but all anyone does is complain.
I was on an airplane and there was Internet, high speed Internet on the airplane. It was brand new. I'm sitting on the plane and they go open up your laptop and you can go on the Internet and it's fast and I'm watching YouTube clips it's amazing. I'm in an airplane and then it breaks down and they apologize the Internet is not working and the guy next to me says, "this is bullshit." Like how quickly the world owes him something he knew existed only 10 seconds ago.
Flying is the worst because people come back from flights and they tell you their story and it's always a horror story. They make it sound like it is the worst day of their life. "First of all we didn't board for 20 minutes and then we get on the plane and they made us sit there on the runway for 40 minutes. We had to sit there." Oh really, what happened next? Did you fly through the air incredibly like a bird? Did you partake in the miracle of human flight? Wow, you're flying! It's amazing!
Appreciate the Things and People You Have
When someone close to you dies, you will often focus on things that were unsaid. Once many experience this they start to appreciate things around them, at least temporarily. However, you need to appreciate those around you regardless of what is going on in your life. You always think you have more time than you actually do. This is a part of the human experience. You think you will live forever.
Appreciation is a critical part of being happy and feeling fulfilled. Every day, is a day to impact something or someone. Make the most of it. Today, you are one day closer to death. Be happy for what you currently have and make the most of what is available to you?


| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Java is a trademark or registered trademark of Sun Microsystems, Inc. | |
| 25 | * in the United States and other countries.] | |
| 26 | * | |
| 27 | * -------------- | |
| 28 | * PinNeedle.java | |
| 29 | * -------------- | |
| 30 | * (C) Copyright 2002-2008, by the Australian Antarctic Division and | |
| 31 | * Contributors. | |
| 32 | * | |
| 33 | * Original Author: Bryan Scott (for the Australian Antarctic Division); | |
| 34 | * Contributor(s): David Gilbert (for Object Refinery Limited); | |
| 35 | * | |
| 36 | * Changes: | |
| 37 | * -------- | |
| 38 | * 25-Sep-2002 : Version 1, contributed by Bryan Scott (DG); | |
| 39 | * 27-Mar-2003 : Implemented Serializable (DG); | |
| 40 | * 09-Sep-2003 : Added equals() method (DG); | |
| 41 | * 08-Jun-2005 : Implemented Cloneable (DG); | |
| 42 | * 22-Nov-2007 : Implemented hashCode() (DG); | |
| 43 | * | |
| 44 | */ | |
| 45 | ||
| 46 | package org.jfree.chart.needle; | |
| 47 | ||
| 48 | import java.awt.Graphics2D; | |
| 49 | import java.awt.geom.Area; | |
| 50 | import java.awt.geom.Ellipse2D; | |
| 51 | import java.awt.geom.GeneralPath; | |
| 52 | import java.awt.geom.Point2D; | |
| 53 | import java.awt.geom.Rectangle2D; | |
| 54 | import java.io.Serializable; | |
| 55 | ||
| 56 | /** | |
| 57 | * A needle that is drawn as a pin shape. | |
| 58 | */ | |
| 59 | public class PinNeedle extends MeterNeedle | |
| 60 | implements Cloneable, Serializable { | |
| 61 | ||
| 62 | /** For serialization. */ | |
| 63 | private static final long serialVersionUID = -3787089953079863373L; | |
| 64 | ||
| 65 | /** | |
| 66 | * Draws the needle. | |
| 67 | * | |
| 68 | * @param g2 the graphics device. | |
| 69 | * @param plotArea the plot area. | |
| 70 | * @param rotate the rotation point. | |
| 71 | * @param angle the angle. | |
| 72 | */ | |
| 73 | protected void drawNeedle(Graphics2D g2, Rectangle2D plotArea, | |
| 74 | Point2D rotate, double angle) { | |
| 75 | ||
| 76 | Area shape; | |
| 77 | GeneralPath pointer = new GeneralPath(); | |
| 78 | ||
| 79 | int minY = (int) (plotArea.getMinY()); | |
| 80 | //int maxX = (int) (plotArea.getMaxX()); | |
| 81 | int maxY = (int) (plotArea.getMaxY()); | |
| 82 |
2
1. drawNeedle : Replaced double division with multiplication → NO_COVERAGE 2. drawNeedle : Replaced double addition with subtraction → NO_COVERAGE |
int midX = (int) (plotArea.getMinX() + (plotArea.getWidth() / 2)); |
| 83 | //int midY = (int) (plotArea.getMinY() + (plotArea.getHeight() / 2)); | |
| 84 |
1
1. drawNeedle : Replaced double division with multiplication → NO_COVERAGE |
int lenX = (int) (plotArea.getWidth() / 10); |
| 85 |
2
1. drawNeedle : changed conditional boundary → NO_COVERAGE 2. drawNeedle : negated conditional → NO_COVERAGE |
if (lenX < 2) { |
| 86 | lenX = 2; | |
| 87 | } | |
| 88 | ||
| 89 |
3
1. drawNeedle : Replaced integer subtraction with addition → NO_COVERAGE 2. drawNeedle : Replaced integer subtraction with addition → NO_COVERAGE 3. drawNeedle : removed call to java/awt/geom/GeneralPath::moveTo → NO_COVERAGE |
pointer.moveTo(midX - lenX, maxY - lenX); |
| 90 |
3
1. drawNeedle : Replaced integer addition with subtraction → NO_COVERAGE 2. drawNeedle : Replaced integer subtraction with addition → NO_COVERAGE 3. drawNeedle : removed call to java/awt/geom/GeneralPath::lineTo → NO_COVERAGE |
pointer.lineTo(midX + lenX, maxY - lenX); |
| 91 |
2
1. drawNeedle : Replaced integer addition with subtraction → NO_COVERAGE 2. drawNeedle : removed call to java/awt/geom/GeneralPath::lineTo → NO_COVERAGE |
pointer.lineTo(midX, minY + lenX); |
| 92 |
1
1. drawNeedle : removed call to java/awt/geom/GeneralPath::closePath → NO_COVERAGE |
pointer.closePath(); |
| 93 | ||
| 94 |
1
1. drawNeedle : Replaced integer multiplication with division → NO_COVERAGE |
lenX = 4 * lenX; |
| 95 |
3
1. drawNeedle : Replaced integer division with multiplication → NO_COVERAGE 2. drawNeedle : Replaced integer subtraction with addition → NO_COVERAGE 3. drawNeedle : Replaced double subtraction with addition → NO_COVERAGE |
Ellipse2D circle = new Ellipse2D.Double(midX - lenX / 2, |
| 96 | plotArea.getMaxY() - lenX, lenX, lenX); | |
| 97 | ||
| 98 | shape = new Area(circle); | |
| 99 |
1
1. drawNeedle : removed call to java/awt/geom/Area::add → NO_COVERAGE |
shape.add(new Area(pointer)); |
| 100 |
2
1. drawNeedle : negated conditional → NO_COVERAGE 2. drawNeedle : negated conditional → NO_COVERAGE |
if ((rotate != null) && (angle != 0)) { |
| 101 | /// we have rotation | |
| 102 |
1
1. drawNeedle : removed call to java/awt/geom/AffineTransform::setToRotation → NO_COVERAGE |
getTransform().setToRotation(angle, rotate.getX(), rotate.getY()); |
| 103 |
1
1. drawNeedle : removed call to java/awt/geom/Area::transform → NO_COVERAGE |
shape.transform(getTransform()); |
| 104 | } | |
| 105 | ||
| 106 |
1
1. drawNeedle : removed call to org/jfree/chart/needle/PinNeedle::defaultDisplay → NO_COVERAGE |
defaultDisplay(g2, shape); |
| 107 | ||
| 108 | } | |
| 109 | ||
| 110 | /** | |
| 111 | * Tests another object for equality with this object. | |
| 112 | * | |
| 113 | * @param obj the object to test (null permitted). | |
| 114 | * | |
| 115 | * @return A boolean. | |
| 116 | */ | |
| 117 | public boolean equals(Object obj) { | |
| 118 |
1
1. equals : negated conditional → SURVIVED |
if (obj == this) { |
| 119 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 120 | } | |
| 121 |
1
1. equals : negated conditional → KILLED |
if (!(obj instanceof PinNeedle)) { |
| 122 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 123 | } | |
| 124 |
1
1. equals : negated conditional → KILLED |
if (!super.equals(obj)) { |
| 125 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 126 | } | |
| 127 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return true; |
| 128 | } | |
| 129 | ||
| 130 | /** | |
| 131 | * Returns a hash code for this instance. | |
| 132 | * | |
| 133 | * @return A hash code. | |
| 134 | */ | |
| 135 | public int hashCode() { | |
| 136 |
1
1. hashCode : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return super.hashCode(); |
| 137 | } | |
| 138 | ||
| 139 | /** | |
| 140 | * Returns a clone of this needle. | |
| 141 | * | |
| 142 | * @return A clone. | |
| 143 | * | |
| 144 | * @throws CloneNotSupportedException if the PinNeedle | |
| 145 | * cannot be cloned (in theory, this should not happen). | |
| 146 | */ | |
| 147 | public Object clone() throws CloneNotSupportedException { | |
| 148 |
1
1. clone : mutated return of Object value for org/jfree/chart/needle/PinNeedle::clone to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return super.clone(); |
| 149 | } | |
| 150 | ||
| 151 | } | |
Mutations | ||
| 82 |
1.1 2.2 |
|
| 84 |
1.1 |
|
| 85 |
1.1 2.2 |
|
| 89 |
1.1 2.2 3.3 |
|
| 90 |
1.1 2.2 3.3 |
|
| 91 |
1.1 2.2 |
|
| 92 |
1.1 |
|
| 94 |
1.1 |
|
| 95 |
1.1 2.2 3.3 |
|
| 99 |
1.1 |
|
| 100 |
1.1 2.2 |
|
| 102 |
1.1 |
|
| 103 |
1.1 |
|
| 106 |
1.1 |
|
| 118 |
1.1 |
|
| 119 |
1.1 |
|
| 121 |
1.1 |
|
| 122 |
1.1 |
|
| 124 |
1.1 |
|
| 125 |
1.1 |
|
| 127 |
1.1 |
|
| 136 |
1.1 |
|
| 148 |
1.1 |


{% extends 'portal.html' %} {% block content %}
The HAWC license has changed. Please review the license and accept:
Welcome to the HAWC portal. Here you're able to create new assessments, or work on existing assessments. Each assessment is a single human-health risk assessment. You can view assessments by the role you've been assigned.
{% with assessments=user.assessment_pms.all %} {% if assessments %}


boxWidth is the width of the window. boxHeight is the height of the window.
const ( BoxWidth = 648 BoxHeight = 498 )
BallSpeedX : Speed of ball in X-direcrion BallSpeedY : Speed of ball in Y-direcrion radius : radius of ball
const ( BallSpeedX = 1.5 BallSpeedY = 0.5 )
var GamesStatus = GameStatus{ Teams: make([]Team, 2), Ball: Ball{}, Score: make([]int, 2), }
func DrawBackground(tableTex *sdl.Texture, renderer *sdl.Renderer) *sdl.Texture
drawBackground makes the texture for the background.
circle struct is inherited ball has its texture xv : pixels moved by ball in one frame in X-direction yv : pixels moved by ball in one frame in Y-direction
type Ball struct { Circle Tex *sdl.Texture Xv, Yv float64 }
func (ball *Ball) CheckCollision(t Team, teamid int32)
CheckCollision() checks at every frame if a collision has happened with a player or not. If a collision has happened, it invokes onCollisionwithPlayer().
func (ball *Ball) Draw(renderer *sdl.Renderer) *sdl.Renderer
draw function for drawing the ball
Circle : struct representing center co-ordinates and the radius
type Circle struct { X, Y, Radius float64 }
GameStatus : struct representing status of the game at any given instant. This will be communicated in json format
type GameStatus struct { Teams []Team `json:"player"` Ball Ball `json:"ball"` Score []int `json:"score"` Renderer *sdl.Renderer `json:"renderer"` }
KeyboardInput : struct representing keyboard input. This will be sent to the server in json format
type KeyboardInput struct { TeamID int8 //team1/team2 SelectStick int8 //A/S/D/F KeyPressed int8 //up/down }
struct for player it contains an imaginary circle for detecting collision which also defines players position and also texture pointer for drawing the player
type Player struct { Circle Tex *sdl.Texture }
struct for the teams containing some arrays of players
type Team struct { GoalKeeper [1]Player Defence [2]Player Mid [5]Player Attack [3]Player LastMotion int32 LastStick []Player }
func (t *Team) Draw(renderer *sdl.Renderer)
calls playerDraw for each and every team member of the team which is called


Athens Attractions
Notable Athens events to check out this year
From festivals to parades to parties full of music, there are several different events and activities near campus to look forward to. Here are just four Athens-centric activities to keep an eye out for this year:
Ohio PawPaw Festival
The 21st annual Pawpaw Festival will be held Sept. 13-15. It is the largest festival of its kind in the world and is held at Lake Snowden, about 6 miles west of Athens. Shuttles will be available at Baker University Center for students interested in going.
The festival includes a huge selection of microbreweries selling beers made with pawpaw. All vendors at the festival include pawpaw in one of their dishes.
McKinley Law | FOR THE POST
Festival attendee buys fresh Paw Paws at the 20th anniversary of the Paw Paw Festival on September 15 2018.
Pawpaws are a tropical flavored tree fruit native to Ohio. It is North America’s largest native tree plant. Festival founder Chris Chmiel works with Integration Acres to process the fruit by taking the skins off and the seeds out and freezing them to eat year-round.
“It’s been a lot of fun. We’ve had people from all around come to our community … It has a big economic impact,” Chmiel said. “It’s a tradition for a lot of people.”
Athens Halloween Block Party
Perhaps the most renowned event in Athens is the Halloween block party. Students and Athens residents alike fill up Court Street to marvel at one another’s costumes as well as listen to the live music put on by bands or DJs. Brandon “DJ B-Funk” Thompson said all of the acts are typically local to Athens.
“We try to keep acts local, so they can play on the big stage and gain support,” Thompson, who has DJed the Athens Halloween Block Party before, said.
Thompson said that this year, the Halloween celebration will most likely start a little earlier and include some family-friendly activities.
Thompson said that this year, the Halloween celebration will most likely start a little earlier and include some family-friendly activities.
“We want people to come out early and look for new, exciting things to happen. Don’t just stay at a house party; definitely go to Court Street.”-Brandon “DJ B-Funk” Thompson
To Thompson, the Honey for the Heart parade held by Passion Works Studio is one of the most interesting parts of the block party. Anyone is welcome to participate by meeting at Central Venue and finding a giant puppet costume to wear prior to the parade, which goes from Courtside Pizza to the Alumni Gateway.
“We want people to come out early and look for new, exciting things to happen,” Thompson said. “Don’t just stay at a house party; definitely go to Court Street.”
Fest Season
Once spring rolls around, every Ohio University student knows that fest season is quickly approaching. Throughout the month of March and halfway through April, respective locations in Athens hold different fests for students to get together with friends and listen to great music.
Kaylen “DJ Marcellus Doe” Spears, one of the founders of Brick Life Entertainment in Athens, said the most exciting event he has DJed at was Palmer Place Fest, which takes place in March.
“It’s crazy to feel a whole entire apartment complex and balconies full of people vibe to my music inside of a private area,” Spears said.
- Nate Swanson | PHOTO EDITOR
Ria Grilliot shows off her lip tattoo at one of the several parties held during Ohio University's annual Mill Fest. The fest has multiple houses holding rowdy parties on March 2, 2019. (FILE)
-
Spears said at the beginning of his career as a DJ, he charged $1 per song request. Now, he does not take requests because he believes that as a DJ, it is his job to influence people to dance to music they never thought they would dance to.
“I like seeing other people enjoy themselves,” Spears said. “I want people to see that an event is being held by Brick Life and say, ‘If this page is throwing a party, this is what I’m interested in.’”
This fall, DJ Marcellus Doe plans to perform during opening weekend and bid day parties held by various sororities on campus. He will be at all the fests in the spring.
Spears has been a DJ for four years, and his first set was in a backyard on Palmer Street with nearly 1,000 people. He plans to move to North Carolina next year to continue his DJ business.
“I’m leaving, but I’ll still come back to Athens to throw ragers,” Spears said.
Athens Farmers Market
Year-round, there is a farmers market held every Saturday morning on East State Street next to Texas Roadhouse. April through October, the market is open every Wednesday and Saturday morning.
There are almost 80 local vendors to the area selling food from poultry to vegetables.
Becky Clark, head of promotions and marketing for the Athens Farmers Market, said the market wants to reach the student population.
“I think as local business owners and community members, we’re excited when students look past what’s on Court Street and on campus,” Clark said. “I love to see students meeting local business owners and seeing how agriculturally diverse Athens is, especially if they’re not from around here.”
Coffee and breakfast food are available during the time the market is open. Clark said people will go to the market every week and socialize with people they see there, while eating breakfast and sipping coffee.
There is also a separate event the market holds off-site at which people are encouraged to meet and get to know the vendors.
© Copyright 2019, The Post, Athens, OH


What I'm Craving
Choose which cuisine you're craving
American
Chinese
Seafood
Deli
Soups
Asian
Barbecue
Healthy
Indian
Italian
Mediterranean
Mexican
Sushi
Pizza
Grill
Search
Clear


com.hazelcast.queue.impl.operations
Classes
AddAllBackupOperation
AddAllOperation
CheckAndEvictOperation
ClearBackupOperation
ClearOperation
CompareAndRemoveBackupOperation
CompareAndRemoveOperation
ContainsOperation
DrainBackupOperation
DrainOperation
IsEmptyOperation
IteratorOperation
OfferBackupOperation
OfferOperation
PeekOperation
PollBackupOperation
PollOperation
QueueBackupAwareOperation
QueueOperation
QueueReplicationOperation
RemainingCapacityOperation
RemoveBackupOperation
RemoveOperation
SizeOperation


Author’s note: this piece is on its way to becoming a fully interactive editorial on how sports rivalries stand the test of time and how they affect their respective games. For now though, scroll on to read about the project as is.
Intense rivalries have played an integral role in professional sports since professional sports began. While the competitive pressure affects players, coaches, and managers, it is perhaps felt most by the fans. Although often manifested in friendly competition, matchups occasionally lead to serious violence in the game and also in the stands.
As part of William Bevington’s Data Visualization and Information Aeshetics, I created a map of 128 rivalries (shown as thin lines) between 121 teams (shown as circles placed almost geographically) in six major professional sports, both as a print piece and as a completely interactive site built with D3.js.
Rivalries can begin for many different reasons; indeed, some rivalries don’t even have a clear beggining - they just sort of are. For the purposes of this map, I’ve categorized all 127 matchups into one of seven types. The first two are based on location: Territorial, occurs between two teams (usually) playing in the same city, often across town from each other and occasionally in the same venue. Geographical rivalries, often known as a battle or derby, or based on the close geographical proximity of two teams.
Three types are based on scheduling: Divisional rivalries are characterized by familiarity between two teams that face off often in the regular season, Playoff, League, and Superbowl matchups are based on games played when it matters, and Original Six rivalries are between two of the NHL’s original teams who have played each other regularly. Manufactured, a rivalry created to increase ticket sales and attendance, and historical, often based on competition between two cities off the playing field, round off the types.
The final print is 48"x48" in fine art paper, while the interactive piece is available at sportsrivalri.es and updates automatically once weekly. A colour is assigned to each league (CFL, MLB, MLS, NFL, NBA, NHL), which is the average of all team primary colours in that league. Each team is given a circle which is sized by the number of wins against the team it’s connected to. Online, you can search for a team (by city, state, country, nickname, or mascot) and click on a matchup to see the stats.
Footnotes
Created with ♥ by Sam Vickars. © 2016. All rights reserved. All trademarks property of their respective owners. Accuracy not guaranteed. Rivalry intensities based on number of head-to-head matches, number of games won between teams, number of goals scored against opponent, and fan ratings on rivalrywatch.com. Data sourced from http://hockey-reference.com, http://baseball-reference.com, http://pro-football-reference.com, http://basketball-reference.com, http://soccerstats.com, the official website of each league (http://nhl.com, http://mlb.com, http://nfl.com, http://cfl.com, http://nba.com, and http://mls.com).
Notes: The territorial rivalry between the Boston Bruins and Hartford Whalers, known as the Battle of New England, existed from 1979 to 1997, when the Whalers relocated to North Carolina. The Battle of Quebec, between Les Canadiens de Montreal and the Quebec Nordiques existed from 1979 to 1995, when the Nordiques relocated to Colorado. The expansion rivalry between the Calgary Flames and original Winnipeg Jets (not to be confused with their current incarnation) existed from 1980 to 1987 when the Jets relocated to Phoenix (now known as Arizona Coyotes). The expansion rivalry between the Chicago Blackhawks and Minnesota North Stars existed between 1981 and 1993, when the North Stars were spun off into the Dallas Stars and the Mighty Ducks of Anaheim (now known as the Anaheim Ducks). The rivalry between the Edmonton Oilers and the original Winnipeg Jets existed before the two teams entered the NHL in 1979 and lasted until 1996 when the Jets relocated to Phoenix. The territorial Battle of Montreal between Les Canadiens de Montreal and the Montreal Maroons existed from 1924 to 1938, when Maroons folded. The territorial rivalry between the New York Rangers and the New York Americans existed from 1925 to 1942, when the Americans folded to World War II. The rivalry between the Indianapolis Colts and New England Patriots is based on the individual rivalry between Peyton Manning and Tom Brady. The rivalry between the New York Yankees and the Los Angeles Dodgers/San Francisco Giants stems from the former two being located in New York, as the Brooklyn Dodgers and New York Giants, respectively, until the move in 1957. The Florida Derby existed in the MLS between the Miami Fusion and Tampa Bay Mutiny until 2001, when both teams exited the league. It continues to exist outside of the league between the Fort Lauderdale Strikers and Tampa Bay Rowdies. The Cascadia Cup has existed (unofficially) as part of the MLS since 2011, but has existed since 2004 and is awarded to the best of three teams after the season ends. The SuperClasico existed between the LA Galaxy and the now defunct Chivas USA between 2005 and 2013, when USA Chivas folded.
Fonts used: Skolar Sans Latin, designed by David Březina and Sláva Jevčinová of Rosetta Type Foundry, courtesy of Adobe Typekit. League colours based on the average of the primary or secondary colour of all teams in the respective league.
Historical Rivalry (2485 games played) - San Francisco Giants (1237W) vs Los Angeles Dodgers (1202W)
These two teams orginally played across town from each other in Brooklyn and New York City beginning in the late 1800s. Their ability to remain foes after a cross-country move and keep the balance has led to this being called one of the greatest rivalries in sports.
Original Six/Franco-Anglo Rivalry (732 games played) - Toronto Maple Leafs (338W) vs Les Canadiens de Montreal (293W)
The oldest in the NHL, the Leafs-Habs rivalry is symbolic of a country divided: the Quebecois Francophones against the Anglophones of the remainder of Canada. The two largest Canadian cities have won the most Stanley Cups of any team, facing off for the cup five times.
Historical Rivalry (358 games played) - Boston Celtics (199W) vs Los Angeles Lakers (159W)
While not the most contested in the NBA, this rivalry involves two of the league’s most storied teams. They have met a record twelve times in the championship series, while their combined 33 trophies account for almost half of the 68 in NBA history.
The Banjo Bowl (221 games played) - Winnipeg Blue Bombers (126W) vs Saskatchewan Roughriders (91W)
Known as the Banjo Bowl (when played on Labour Day) since 2004, this rivalry is older than the Canadian Football League itself and extends far beyond the field, fueled by traditional competition between the two prairie provinces.
Historical Rivalry (187 games played) - Chicago Bears (94W) vs Green Bay Packers (93W)
The longest-running in the NFL, this rivalry began in 1921 and is characterized by the balance between the two teams. The mutual Chicago- Wisconsin hatred has sparked similar rivalries in the MLB and NBA, as well as at the collegiate level.


Location Is Key
Geocoding is the process of transforming a normal human-readable address and into a pair of Earth latitude and longitude values. The applications of geocoding are many from simple parsing routing endpoints for directions to address validation and analysis.


Flexible parametric models for time-to-event data, including the Royston-Parmar spline model, generalized gamma and generalized F distributions. Any user-defined parametric distribution can be fitted, given at least an R function defining the probability density or hazard. There are also tools for fitting and predicting from fully parametric multi-state models.
| Version: | 1.1 |
| Depends: | survival, R (≥ 2.15.0) |
| Imports: | mstate (≥ 0.2.10), muhaz, mvtnorm, deSolve, quadprog, Rcpp (≥ 0.11.5) |
| LinkingTo: | Rcpp |
| Suggests: | eha, numDeriv, testthat, msm, ActuDistns, knitr, TH.data, colorspace |
| Published: | 2017-03-27 |
| Author: | Christopher Jackson [aut, cre], Paul Metcalfe [ctb], Jordan Amdahl [ctb] |
| Maintainer: | Christopher Jackson <chris.jackson at mrc-bsu.cam.ac.uk> |
| BugReports: | https://github.com/chjackson/flexsurv-dev/issues |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://github.com/chjackson/flexsurv-dev |
| NeedsCompilation: | yes |
| Citation: | flexsurv citation info |
| Materials: | NEWS ChangeLog |
| In views: | Distributions, Survival |
| CRAN checks: | flexsurv results |
| Reference manual: | flexsurv.pdf |
| Vignettes: |
flexsurv user guide Supplementary examples of using flexsurv |
| Package source: | flexsurv_1.1.tar.gz |
| Windows binaries: | r-devel: flexsurv_1.1.zip, r-release: flexsurv_1.1.zip, r-oldrel: flexsurv_1.1.zip |
| OS X binaries: | r-release: flexsurv_1.1.tgz, r-oldrel: flexsurv_1.1.tgz |
| Old sources: | flexsurv archive |
| Reverse depends: | flexsurvcure, survHE |
| Reverse imports: | Countr, educineq, parmsurvfit, surv2sampleComp, SurvGSD |
| Reverse suggests: | fitteR, heemod, mlt.docreg, msm, multistateutils, rprev, simsurv, survminer |
Please use the canonical form https://CRAN.R-project.org/package=flexsurv to link to this page.


dojox.widget.Roller
Powered by dojo.data (by way of google):
A Simple UL: (progressive)
start/stop onhover
- First Item
- Second Item
- items added 1
- items added 2
- items added 3
- items added 4
- items added 5
- items added 6
- items added 7
- items added 8
- items added 9
- items added 0
An empty UL, programatic from Array
An empty UL, programatic Slider from Array
and a dojoType one
- Today's episode of random widget
- brought to you by Dojo
- (really just testing simple markup)
- enjoy.
-
- wow that was 10 seconds
One with embedded LI's
Customer RollerHover
- test 1
- test 2
- test 3
- test 4


Log in to your account.
Email address
Password
Remember me
Forgot your password?
Log In
Don't have an account?
Sign up


Bases: object
Linear Position-Invariant Filter (2-dimensional)
| Parameters : | impulse_response : callable f(r, c, **filter_params)
|
|---|
Examples
>>> def filt_func(r, c, sigma = 1):
... return np.exp(-np.hypot(r, c)/sigma)
>>> filter = LPIFilter2D(filt_func)
| skimage.filter.canny(image[, sigma, ...]) | Edge filter an image using the Canny algorithm. |
| skimage.filter.denoise_bilateral | Denoise image using bilateral filter. |
| skimage.filter.denoise_tv_bregman | Perform total-variation denoising using split-Bregman optimization. |
| skimage.filter.denoise_tv_chambolle(im[, ...]) | Perform total-variation denoising on 2D and 3D images. |
| skimage.filter.gabor_filter(image, frequency) | Return real and imaginary responses to Gabor filter. |
| skimage.filter.gabor_kernel(frequency[, ...]) | Return complex 2D Gabor filter kernel. |
| skimage.filter.gaussian_filter(image, sigma) | Multi-dimensional Gaussian filter |
| skimage.filter.hprewitt(image[, mask]) | Find the horizontal edges of an image using the Prewitt transform. |
| skimage.filter.hscharr(image[, mask]) | Find the horizontal edges of an image using the Scharr transform. |
| skimage.filter.hsobel(image[, mask]) | Find the horizontal edges of an image using the Sobel transform. |
| skimage.filter.inverse(data[, ...]) | Apply the filter in reverse to the given data. |
| skimage.filter.median_filter(*args, **kwargs) | Deprecated function. Use filter.rank.median instead. |
| skimage.filter.prewitt(image[, mask]) | Find the edge magnitude using the Prewitt transform. |
| skimage.filter.rank_order(image) | Return an image of the same shape where each pixel is the index of the pixel value in the ascending order of the unique values of image, aka the rank-order value. |
| skimage.filter.roberts(image[, mask]) | Find the edge magnitude using Roberts’ cross operator. |
| skimage.filter.roberts_negative_diagonal(image) | Find the cross edges of an image using the Roberts’ Cross operator. |
| skimage.filter.roberts_positive_diagonal(image) | Find the cross edges of an image using Roberts’ cross operator. |
| skimage.filter.scharr(image[, mask]) | Find the edge magnitude using the Scharr transform. |
| skimage.filter.sobel(image[, mask]) | Find the edge magnitude using the Sobel transform. |
| skimage.filter.threshold_adaptive(image, ...) | Applies an adaptive threshold to an array. |
| skimage.filter.threshold_otsu(image[, nbins]) | Return threshold value based on Otsu’s method. |
| skimage.filter.vprewitt(image[, mask]) | Find the vertical edges of an image using the Prewitt transform. |
| skimage.filter.vscharr(image[, mask]) | Find the vertical edges of an image using the Scharr transform. |
| skimage.filter.vsobel(image[, mask]) | Find the vertical edges of an image using the Sobel transform. |
| skimage.filter.wiener(data[, ...]) | Minimum Mean Square Error (Wiener) inverse filter. |
Edge filter an image using the Canny algorithm.
| Parameters : | image : 2D array
sigma : float
low_threshold : float
high_threshold : float
mask : array, dtype=bool, optional
|
|---|---|
| Returns : | output : 2D array (image)
|
See also
skimage.sobel
Notes
The steps of the algorithm are as follows:
References
Canny, J., A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986
William Green’s Canny tutorial http://dasl.mem.drexel.edu/alumni/bGreen/www.pages.drexel.edu/_weg22/can_tut.html
Examples
>>> from skimage import filter
>>> # Generate noisy image of a square
>>> im = np.zeros((256, 256))
>>> im[64:-64, 64:-64] = 1
>>> im += 0.2 * np.random.random(im.shape)
>>> # First trial with the Canny filter, with the default smoothing
>>> edges1 = filter.canny(im)
>>> # Increase the smoothing for better results
>>> edges2 = filter.canny(im, sigma=3)
Denoise image using bilateral filter.
This is an edge-preserving and noise reducing denoising filter. It averages pixels based on their spatial closeness and radiometric similarity.
Spatial closeness is measured by the gaussian function of the euclidian distance between two pixels and a certain standard deviation (sigma_spatial).
Radiometric similarity is measured by the gaussian function of the euclidian distance between two color values and a certain standard deviation (sigma_range).
| Parameters : | image : ndarray
win_size : int
sigma_range : float
sigma_spatial : float
bins : int
mode : string
cval : string
|
|---|---|
| Returns : | denoised : ndarray
|
References
| [R130] | http://users.soe.ucsc.edu/~manduchi/Papers/ICCV98.pdf |
Perform total-variation denoising using split-Bregman optimization.
Total-variation denoising (also know as total-variation regularization) tries to find an image with less total-variation under the constraint of being similar to the input image, which is controlled by the regularization parameter.
| Parameters : | image : ndarray
weight : float, optional
eps : float, optional
max_iter : int, optional
isotropic : boolean, optional
|
|---|---|
| Returns : | u : ndarray
|
References
| [R131] | http://en.wikipedia.org/wiki/Total_variation_denoising |
| [R132] | Tom Goldstein and Stanley Osher, “The Split Bregman Method For L1 Regularized Problems”, ftp://ftp.math.ucla.edu/pub/camreport/cam08-29.pdf |
| [R133] | Pascal Getreuer, “Rudin–Osher–Fatemi Total Variation Denoising using Split Bregman” in Image Processing On Line on 2012–05–19, http://www.ipol.im/pub/art/2012/g-tvd/article_lr.pdf |
| [R134] | http://www.math.ucsb.edu/~cgarcia/UGProjects/BregmanAlgorithms_JacquelineBush.pdf |
Perform total-variation denoising on 2D and 3D images.
| Parameters : | im : ndarray (2d or 3d) of ints, uints or floats
weight : float, optional
eps : float, optional
n_iter_max : int, optional
multichannel : bool, optional
|
|---|---|
| Returns : | out : ndarray
|
Notes
Make sure to set the multichannel parameter appropriately for color images.
The principle of total variation denoising is explained in http://en.wikipedia.org/wiki/Total_variation_denoising
The principle of total variation denoising is to minimize the total variation of the image, which can be roughly described as the integral of the norm of the image gradient. Total variation denoising tends to produce “cartoon-like” images, that is, piecewise-constant images.
This code is an implementation of the algorithm of Rudin, Fatemi and Osher that was proposed by Chambolle in [R135].
References
| [R135] | (1, 2) A. Chambolle, An algorithm for total variation minimization and applications, Journal of Mathematical Imaging and Vision, Springer, 2004, 20, 89-97. |
Examples
2D example on Lena image:
>>> from skimage import color, data
>>> lena = color.rgb2gray(data.lena())
>>> lena += 0.5 * lena.std() * np.random.randn(*lena.shape)
>>> denoised_lena = denoise_tv_chambolle(lena, weight=60)
3D example on synthetic data:
>>> x, y, z = np.ogrid[0:40, 0:40, 0:40]
>>> mask = (x - 22)**2 + (y - 20)**2 + (z - 17)**2 < 8**2
>>> mask = mask.astype(np.float)
>>> mask += 0.2*np.random.randn(*mask.shape)
>>> res = denoise_tv_chambolle(mask, weight=100)
Return real and imaginary responses to Gabor filter.
The real and imaginary parts of the Gabor filter kernel are applied to the image and the response is returned as a pair of arrays.
Frequency and orientation representations of the Gabor filter are similar to those of the human visual system. It is especially suitable for texture classification using Gabor filter banks.
| Parameters : | image : array
frequency : float
theta : float
bandwidth : float
sigma_x, sigma_y : float
offset : float, optional
|
|---|---|
| Returns : | real, imag : arrays
|
References
| [R136] | http://en.wikipedia.org/wiki/Gabor_filter |
| [R137] | http://mplab.ucsd.edu/tutorials/gabor.pdf |
Return complex 2D Gabor filter kernel.
Frequency and orientation representations of the Gabor filter are similar to those of the human visual system. It is especially suitable for texture classification using Gabor filter banks.
| Parameters : | frequency : float
theta : float
bandwidth : float
sigma_x, sigma_y : float
offset : float, optional
|
|---|---|
| Returns : | g : complex array
|
References
| [R138] | http://en.wikipedia.org/wiki/Gabor_filter |
| [R139] | http://mplab.ucsd.edu/tutorials/gabor.pdf |
Multi-dimensional Gaussian filter
| Parameters : | image : array-like
sigma : scalar or sequence of scalars
output : array, optional
mode : {‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’}, optional
cval : scalar, optional
multichannel : bool, optional (default: None)
|
|---|---|
| Returns : | filtered_image : ndarray
|
Notes
This function is a wrapper around scipy.ndimage.gaussian_filter().
Integer arrays are converted to float.
The multi-dimensional filter is implemented as a sequence of one-dimensional convolution filters. The intermediate arrays are stored in the same data type as the output. Therefore, for output types with a limited precision, the results may be imprecise because intermediate results may be stored with insufficient precision.
Examples
>>> a = np.zeros((3, 3))
>>> a[1, 1] = 1
>>> a
array([[ 0., 0., 0.],
[ 0., 1., 0.],
[ 0., 0., 0.]])
>>> gaussian_filter(a, sigma=0.4) # mild smoothing
array([[ 0.00163116, 0.03712502, 0.00163116],
[ 0.03712502, 0.84496158, 0.03712502],
[ 0.00163116, 0.03712502, 0.00163116]])
>>> gaussian_filter(a, sigma=1) # more smooting
array([[ 0.05855018, 0.09653293, 0.05855018],
[ 0.09653293, 0.15915589, 0.09653293],
[ 0.05855018, 0.09653293, 0.05855018]])
>>> # Several modes are possible for handling boundaries
>>> gaussian_filter(a, sigma=1, mode='reflect')
array([[ 0.08767308, 0.12075024, 0.08767308],
[ 0.12075024, 0.16630671, 0.12075024],
[ 0.08767308, 0.12075024, 0.08767308]])
>>> # For RGB images, each is filtered separately
>>> from skimage.data import lena
>>> image = lena()
>>> filtered_lena = gaussian_filter(image, sigma=1, multichannel=True)
Find the horizontal edges of an image using the Prewitt transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
1 1 1
0 0 0
-1 -1 -1
Find the horizontal edges of an image using the Scharr transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
3 10 3
0 0 0
-3 -10 -3
References
| [R140] | D. Kroon, 2009, Short Paper University Twente, Numerical Optimization of Kernel Based Image Derivatives. |
Find the horizontal edges of an image using the Sobel transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
1 2 1
0 0 0
-1 -2 -1
Apply the filter in reverse to the given data.
| Parameters : | data : (M,N) ndarray
impulse_response : callable f(r, c, **filter_params)
filter_params : dict
max_gain : float
|
|---|
Deprecated function. Use filter.rank.median instead.
Masked median filter with octagon shape.
| Parameters : | image : (M, N) ndarray
radius : int
mask : (M, N) ndarray
percent : int
|
|---|---|
| Returns : | out : (M, N) ndarray
|
Notes
Because of the histogram implementation, the number of unique values for the output is limited to 256.
Examples
>>> a = np.ones((5, 5))
>>> a[2, 2] = 10 # introduce outlier
>>> b = median_filter(a)
>>> b[2, 2] # the median filter is good at removing outliers
1.0
Find the edge magnitude using the Prewitt transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
Return the square root of the sum of squares of the horizontal and vertical Prewitt transforms.
Return an image of the same shape where each pixel is the index of the pixel value in the ascending order of the unique values of image, aka the rank-order value.
| Parameters : | image: ndarray : |
|---|---|
| Returns : | labels: ndarray of type np.uint32, of shape image.shape :
original_values: 1-d ndarray :
|
Examples
>>> a = np.array([[1, 4, 5], [4, 4, 1], [5, 1, 1]])
>>> a
array([[1, 4, 5],
[4, 4, 1],
[5, 1, 1]])
>>> rank_order(a)
(array([[0, 1, 2],
[1, 1, 0],
[2, 0, 0]], dtype=uint32), array([1, 4, 5]))
>>> b = np.array([-1., 2.5, 3.1, 2.5])
>>> rank_order(b)
(array([0, 1, 2, 1], dtype=uint32), array([-1. , 2.5, 3.1]))
Find the edge magnitude using Roberts’ cross operator.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Find the cross edges of an image using the Roberts’ Cross operator.
The kernel is applied to the input image to produce separate measurements of the gradient component one orientation.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
0 1
-1 0
Find the cross edges of an image using Roberts’ cross operator.
The kernel is applied to the input image to produce separate measurements of the gradient component one orientation.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
1 0
0 -1
Find the edge magnitude using the Scharr transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
Take the square root of the sum of the squares of the horizontal and vertical Scharrs to get a magnitude that’s somewhat insensitive to direction.
References
| [R141] | D. Kroon, 2009, Short Paper University Twente, Numerical Optimization of Kernel Based Image Derivatives. |
Find the edge magnitude using the Sobel transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
Take the square root of the sum of the squares of the horizontal and vertical Sobels to get a magnitude that’s somewhat insensitive to direction.
Note that scipy.ndimage.sobel returns a directional Sobel which has to be further processed to perform edge detection.
Applies an adaptive threshold to an array.
Also known as local or dynamic thresholding where the threshold value is the weighted mean for the local neighborhood of a pixel subtracted by a constant. Alternatively the threshold can be determined dynamically by a a given function using the ‘generic’ method.
| Parameters : | image : (N, M) ndarray
block_size : int
method : {‘generic’, ‘gaussian’, ‘mean’, ‘median’}, optional
offset : float, optional
mode : {‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’}, optional
param : {int, function}, optional
|
|---|---|
| Returns : | threshold : (N, M) ndarray
|
References
| [R142] | http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#adaptivethreshold |
Examples
>>> from skimage.data import camera
>>> image = camera()
>>> binary_image1 = threshold_adaptive(image, 15, 'mean')
>>> func = lambda arr: arr.mean()
>>> binary_image2 = threshold_adaptive(image, 15, 'generic', param=func)
Return threshold value based on Otsu’s method.
| Parameters : | image : array
nbins : int, optional
|
|---|---|
| Returns : | threshold : float
|
References
| [R143] | Wikipedia, http://en.wikipedia.org/wiki/Otsu’s_Method |
Examples
>>> from skimage.data import camera
>>> image = camera()
>>> thresh = threshold_otsu(image)
>>> binary = image <= thresh
Find the vertical edges of an image using the Prewitt transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
1 0 -1
1 0 -1
1 0 -1
Find the vertical edges of an image using the Scharr transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
3 0 -3
10 0 -10
3 0 -3
References
| [R144] | D. Kroon, 2009, Short Paper University Twente, Numerical Optimization of Kernel Based Image Derivatives. |
Find the vertical edges of an image using the Sobel transform.
| Parameters : | image : 2-D array
mask : 2-D array, optional
|
|---|---|
| Returns : | output : 2-D array
|
Notes
We use the following kernel and return the absolute value of the result at each point:
1 0 -1
2 0 -2
1 0 -1
Minimum Mean Square Error (Wiener) inverse filter.
| Parameters : | data : (M,N) ndarray
K : float or (M,N) ndarray
impulse_response : callable f(r, c, **filter_params)
filter_params : dict
|
|---|


| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Java is a trademark or registered trademark of Sun Microsystems, Inc. | |
| 25 | * in the United States and other countries.] | |
| 26 | * | |
| 27 | * ----------------- | |
| 28 | * DatasetGroup.java | |
| 29 | * ----------------- | |
| 30 | * (C) Copyright 2002-2008, by Object Refinery Limited. | |
| 31 | * | |
| 32 | * Original Author: David Gilbert (for Object Refinery Limited); | |
| 33 | * Contributor(s): -; | |
| 34 | * | |
| 35 | * Changes | |
| 36 | * ------- | |
| 37 | * 07-Oct-2002 : Version 1 (DG); | |
| 38 | * 26-Mar-2003 : Implemented Serializable (DG); | |
| 39 | * 20-Aug-2003 : Implemented Cloneable (DG); | |
| 40 | * | |
| 41 | */ | |
| 42 | ||
| 43 | package org.jfree.data.general; | |
| 44 | ||
| 45 | import java.io.Serializable; | |
| 46 | ||
| 47 | /** | |
| 48 | * A class that is used to group datasets (currently not used for any specific | |
| 49 | * purpose). | |
| 50 | */ | |
| 51 | public class DatasetGroup implements Cloneable, Serializable { | |
| 52 | ||
| 53 | /** For serialization. */ | |
| 54 | private static final long serialVersionUID = -3640642179674185688L; | |
| 55 | ||
| 56 | /** The group id. */ | |
| 57 | private String id; | |
| 58 | ||
| 59 | /** | |
| 60 | * Constructs a new group. | |
| 61 | */ | |
| 62 | public DatasetGroup() { | |
| 63 | super(); | |
| 64 | this.id = "NOID"; | |
| 65 | } | |
| 66 | ||
| 67 | /** | |
| 68 | * Creates a new group with the specified id. | |
| 69 | * | |
| 70 | * @param id the identification for the group. | |
| 71 | */ | |
| 72 | public DatasetGroup(String id) { | |
| 73 |
1
1. |
if (id == null) { |
| 74 | throw new IllegalArgumentException("Null 'id' argument."); | |
| 75 | } | |
| 76 | this.id = id; | |
| 77 | } | |
| 78 | ||
| 79 | /** | |
| 80 | * Returns the identification string for this group. | |
| 81 | * | |
| 82 | * @return The identification string. | |
| 83 | */ | |
| 84 | public String getID() { | |
| 85 |
1
1. getID : mutated return of Object value for org/jfree/data/general/DatasetGroup::getID to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return this.id; |
| 86 | } | |
| 87 | ||
| 88 | /** | |
| 89 | * Clones the group. | |
| 90 | * | |
| 91 | * @return A clone. | |
| 92 | * | |
| 93 | * @throws CloneNotSupportedException not by this class. | |
| 94 | */ | |
| 95 | public Object clone() throws CloneNotSupportedException { | |
| 96 |
1
1. clone : mutated return of Object value for org/jfree/data/general/DatasetGroup::clone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return super.clone(); |
| 97 | } | |
| 98 | ||
| 99 | /** | |
| 100 | * Tests this instance for equality with an arbitrary object. | |
| 101 | * | |
| 102 | * @param obj the object (null permitted). | |
| 103 | * | |
| 104 | * @return A boolean. | |
| 105 | */ | |
| 106 | public boolean equals(Object obj) { | |
| 107 |
1
1. equals : negated conditional → SURVIVED |
if (obj == this) { |
| 108 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 109 | } | |
| 110 |
1
1. equals : negated conditional → KILLED |
if (!(obj instanceof DatasetGroup)) { |
| 111 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 112 | } | |
| 113 | DatasetGroup that = (DatasetGroup) obj; | |
| 114 |
1
1. equals : negated conditional → KILLED |
if (!this.id.equals(that.id)) { |
| 115 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 116 | } | |
| 117 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return true; |
| 118 | } | |
| 119 | ||
| 120 | } | |
Mutations | ||
| 73 |
1.1 |
|
| 85 |
1.1 |
|
| 96 |
1.1 |
|
| 107 |
1.1 |
|
| 108 |
1.1 |
|
| 110 |
1.1 |
|
| 111 |
1.1 |
|
| 114 |
1.1 |
|
| 115 |
1.1 |
|
| 117 |
1.1 |