text:
Denver Municipal Code
Sec. 54-564. Scope.
(a)The provisions of this article applicable to bicycles shall apply whenever a bicycle is operated upon any street, roadway, highway or upon any public path set aside for the exclusive operation and use of bicycles, subject to those exceptions contained herein.
(b)The provisions of this article applicable to an electrical assisted bicycle shall apply whenever an electrical assisted bicycle is operated upon any street, roadway or highway, subject to those exceptions stated herein.
(Code 1950, § 522.1-3; Ord. No. 685-09, § 7, 11-23-09)
Sec. 54-565. Application of traffic laws.
Every person riding a bicycle or electrical assisted bicycle upon a roadway shall be granted all of the rights and shall be subjected to all of the duties applicable to the driver of a vehicle by the traffic rules and regulations of this city applicable to the driver of a vehicle, except as to special regulations and except as to the provisions of laws and ordinances which by their nature can have no application.
(Code 1950, § 522.11; Ord. No. 685-09, § 8, 11-23-09)
Sec. 54-566. Application to other human-powered devices.
The provisions of this article shall apply to other human-powered devices as well as bicycles.
Sec. 54-567. Obedience to traffic-control devices.
(a)Any person operating a bicycle or electrical assisted bicycle, shall obey the instructions of official traffic-control signals, signs and other control devices applicable to vehicles, unless otherwise directed by a police officer.
(b)Whenever authorized signs are erected indicating that no right or left or U-turn is permitted, it shall be unlawful for any person operating a bicycle or electrical assisted bicycle to disobey the direction of any such sign, except where such person dismounts from the bicycle or electrical assisted bicycle to make any such turn, in which event, such person shall then obey the regulations applicable to pedestrians.
Sec. 54-568. Riding on permanent seat.
It shall be unlawful for any person propelling or riding upon a bicycle or an electrical assisted bicycle to ride other than astride a permanent and regular seat attached thereto.
(Code 1950, § 522.13-1; Ord. No. 685-09, § 10, 11-23-09)
Sec. 54-569. Carrying persons.
No bicycle or electrical assisted bicycle shall be used to carry more persons at one (1) time than the number for which it is designed and a bicycle or electrical assisted bicycle must be equipped with permanent seat, hand holds and foot rests.
Sec. 54-570. Carrying articles.
It shall be unlawful for any person operating a bicycle or electrical assisted bicycle to carry any package, bundle or article which prevents the rider from keeping at least one (1) hand upon the handlebars.
(Code 1950, § 522.17; Ord. No. 685-09, § 12, 11-23-09)
Sec. 54-571. Right-of-way.
A bicycle or electrical assisted bicycle shall be considered a vehicle under all portions of this Code which govern right-of-way.
(Code 1950, § 501.1-16; Ord. No. 685-09, § 13, 11-23-09)
Sec. 54-572. Riding on roadways.
(a)Every person operating a bicycle or electrical assisted bicycle upon a roadway shall ride as near to the right-hand side of the roadway as judged safe by the bicyclist to facilitate the movement of such overtaking vehicles unless other conditions make it unsafe to do so.
(b)Persons riding bicycles upon a roadway shall not ride more than two (2) abreast except on roadways set aside for the exclusive use of bicycles. Persons riding bicycles two abreast shall not impede the normal and reasonable movement of traffic and, on a laned roadway, shall ride within a single lane.
(c)Persons riding electrical assisted bicycles upon a roadway shall not ride more than two (2) abreast.
(d)This section shall not apply to a uniformed city, state, or federal employee riding a bicycle or electrical assisted bicycle while engaged in the discharge of his or her duties or to a police officer riding a bicycle or electrical assisted bicycle that is a marked or unmarked official police bicycle or electrical assisted bicycle, while engaged in the discharge of his or her official duties.
(e)An electrical assisted bicycle shall not be operated on a limited-access highway.
(Code 1950, § 522.14; Ord. No. 464-02, § 1, 6-17-02; Ord. No. 685-09, § 14, 11-23-09)
Sec. 54-573. Speed.
(a)It shall be unlawful for any person to operate a bicycle or electrical assisted bicycle on a roadway or bicycle path at a speed greater than is reasonable and prudent under the conditions then existing or in excess of the posted speed limit.
(b)It shall be unlawful for any person to operate a bicycle or electrical assisted bicycle on a sidewalk, which is not part of a designated bicycle route, at a speed in excess of six (6) miles per hour.
(c)This section shall not apply to a uniformed city, state, or federal employee riding a bicycle or electrical assisted bicycle while engaged in the discharge of his or her duties or to a police officer riding a bicycle or electrical assisted bicycle that is a marked or unmarked official police bicycle, while engaged in the discharge of his or her official duties.
Sec. 54-574. Emerging from alley or driveway.
The operator of a bicycle or electrical assisted bicycle emerging from an alley, driveway or building shall, upon approaching a sidewalk or the sidewalk area extending across any alleyway, yield the right-of-way to all pedestrians approaching on the sidewalk or sidewalk area, and upon entering the roadway shall yield the right-of-way to all vehicles approaching on the roadway.
Sec. 54-575. Parking.
(a)A bicycle or electrical assisted bicycle may be parked upon a roadway at any angle to the curb or edge of the roadway at any location where parking is allowed.
(b)A bicycle or electrical assisted bicycle may be parked on the roadway abreast of another such bicycle or electrical assisted bicycle near the side of the roadway or any location where parking is allowed in such a manner as does not impede the normal and reasonable movement of traffic.
(c)A bicycle or electrical assisted bicycle may park on a sidewalk in a rack to support such bicycle or electrical assisted bicycle or against a building or at the curb, in such a manner as to not impede the normal and reasonable movement of pedestrian or other traffic.
Sec. 54-576. Riding on sidewalks.
Sec. 54-576. - Riding on sidewalks.
(a) Riding bicycles or electrical assisted bicycles upon or along sidewalks, whether on public property or private property opened for use by the general public, shall be unlawful except:
(1)When the operator or rider thereof is a uniformed city employee or uniformed state employee or uniformed federal employee, which are working as part of their official duties and are riding a bicycle or electrical assisted bicycle or a police officer riding a bicycle or electrical assisted bicycle that is a marked or unmarked official police bicycle or electrical assisted bicycle or while engaged in the discharge of his or her official duties; or
(2)When the operator or rider of a bicycle thereof is engaged in the delivery of newspapers;
(3) Where the sidewalk is part of a designated bicycle route; or
(4) When the operator or rider thereof is preparing to dismount and park the bicycle or electrical assisted bicycle at a location on the block on which the bicycle or electrical assisted bicycle is being operated, or the operator has just mounted and has not yet crossed a street or alley.
(b) Bicyclists shall yield the right-of-way to pedestrians on the sidewalk.
(c) Riding electrical assisted bicycles upon or along sidewalks shall be unlawful, except as provided for in this section above.
(Code 1950, §§ 522.19-1, 522.19-2, 852.5; Ord. No. 464-02, § 1, 6-17-02; Ord. No. 685-09, § 18, 11-23-09)
Sec. 54-577. Prohibited on roadways where posted.
The city traffic engineer is authorized to erect signs on any roadway prohibiting the riding of bicycles or electrical assisted bicycle thereon by any person, and when such signs are in place, no person shall disobey the same, except a uniformed city or state or federal employee riding a bicycle or electrical assisted bicycle, while engaged in the discharge of his or her duties, or a police officer riding a bicycle or electrical assisted bicycle that is a marked or unmarked official police bicycle or an electrical assisted bicycle, while engaged in his or her official duties.
(Code 1950, § 522.19-3; Ord. No. 464-02, § 1, 6-17-02; Ord. No. 685-09, § 19, 11-23-09)
Sec. 54-578. Lamps and reflectors.
(a)Every bicycle or electrical assisted bicycle, when in use at night time, shall be equipped with a lamp on the front which shall emit a white light visible from a distance of at least five hundred (500) feet to the front.
(b)Every bicycle or electrical assisted bicycle, when in use at night time, shall be equipped with a red reflector of a type approved by the department, which shall be visible for six (6) hundred feet to the rear when directly in front of lawful lower beams of head lamps on a motor vehicle.
(c)Every bicycle or electrical assisted bicycle, when in use at night time, shall be equipped with reflective material of sufficient size and reflectibility to be visible from both sides for six (6) hundred feet when directly in front of lawful lower beams or head lamps on a motor vehicle or, in lieu of such reflective material, with a lighted lamp visible from both sides from a distance of at least five hundred feet.
(d)A bicycle or electrical assisted bicycle may be equipped with lights or reflectors in addition to those required in this section.
Sec. 54-579. Loud sirens, whistles, etc., prohibited.
No bicycle or an electrical assisted bicycle shall be equipped with, nor shall any person install upon or use upon any bicycle or an electrical assisted bicycle a siren, whistle, or other device which emits a loud or raucous noise, except a police officer engaged in the discharge of his or her official duties and the bicycle or electrical assisted bicycle is a marked or unmarked official police bicycle or electrical assisted bicycle.
(Code 1950, § 507.5-2; Ord. No. 464-02, § 1, 6-17-02; Ord. No. 685-09, § 21, 11-23-09)
Cross reference— Noise control generally, Ch. 36.
Sec. 54-580. Impoundment.
(a)Members of the police department are hereby authorized to remove a bicycle or an electrical assisted bicycle from any street, alley, highway, sidewalk, bridge, viaduct, tunnel, path or other public place or way, to the bicycle pound or to any lot or place maintained by the city or the department for the storage of impounded bicycles or electrical assisted bicycles, or to any other place of safety under any of the circumstances hereinafter enumerated.
(1)When such bicycle or electrical assisted bicycle is not in safe mechanical condition;
(2)When such bicycle or electrical assisted bicycle is not equipped as required by section 54-578
(3)When such bicycle or electrical assisted bicycle is operated by any person under the age of sixteen (16) years in violation of any ordinance of the city relating to traffic or in violation of any of the provisions of this article.
(b)No bicycle or electrical assisted bicycle removed or impounded because not in safe mechanical condition or because not equipped as required by section 54-578 shall be released until such unsafe mechanical condition has been corrected or such lacking equipment has been placed on such bicycle or the manager of safety has been satisfied that such bicycle or electrical assisted bicycle will not be ridden, propelled or operated upon any street, alley, highway, sidewalk, bridge, viaduct, tunnel, path or other public place or way until such unsafe mechanical condition has been corrected or such lacking equipment has been placed on such bicycle or electrical assisted bicycle, and such bicycle or electrical assisted bicycle shall be released to the owner or person entitled to the possession thereof when the same is in safe mechanical condition and when such lacking equipment has been placed thereon or when the manager of safety has been so satisfied.
(c)No bicycle or electrical assisted bicycle removed or impounded because operated by any person under the age of sixteen (16) years in alleged violation of any ordinance of the city relating to traffic or in alleged violation of any of the provisions of this article shall be released until the manager of safety shall have had a reasonable period of time in which to investigate or cause to be investigated the facts relative to such alleged violation; if at the conclusion of such investigation the manager finds such alleged violation to have occurred, the manager may order such bicycle or electrical assisted bicycle to be retained or further impounded for such further period not exceeding thirty (30) days as in the manager's discretion shall seem proper, and at the expiration of such period or upon the conclusion of such investigation if the manager shall determine that such alleged violation did not occur, such bicycle shall be released to the owner or person entitled to the possession thereof.
(d)Whenever a bicycle or electrical assisted bicycle is removed from any public place or way or impounded as authorized by this article and the identity of the owner or person entitled to the possession thereof is known, such owner or person shall be given notice in writing of the fact of such removal or impounding, the reasons therefor, and the place to which the bicycle or electrical assisted bicycle has been removed or in which it is impounded.
(e)Whenever a bicycle or electrical assisted bicycle shall have been impounded for a period of two (2) months and no claim of ownership or the right to the possession thereof shall have been made and established to the satisfaction of the manager of safety, the manager shall consider such bicycles or electrical assisted bicycle as abandoned and the property of the city, to be disposed of as such, after the first advertising in one or more official publications of the city a notice stating that all bicycles impounded and unclaimed for a period of two (2) months will be considered as abandoned and become city property if not properly claimed within ten (10) days of the date of publication of the notice.
(f)The manager of safety shall be, and is hereby empowered and authorized to adopt rules and regulations governing the procedure to be followed in the removal and impounding of bicycles or electrical assisted bicycle pursuant to the provisions of this article.
(Code 1950, §§ 522.21, 522.23; Ord. No. 279-03, § 10, 4-21-03; Ord. No. 685-09, § 22, 11-23-09)
Sec. 54-581. Responsibilities of parents and guardians.
It shall be unlawful for the parent of any child or the guardian of any ward to authorize or knowingly permit any such child or ward to violate any of the provisions of this article.
(Code 1950, § 522.1-2)
Sec. 54-582. Responsibilities of dealers.
Every person engaged in the business of buying or selling new or secondhand bicycles shall make a report to the police department of every bicycle purchased or sold by such dealer, giving the name and address of the person from whom purchased, or to whom sold, a description of such bicycle by name or make, and the frame number thereof.
Section 23 of Ord. No. 685-09, adopted Nov. 23, 2009, deleted § 54-582, responsibilities of rental agencies, which derived from § 522.9 of the 1950 Code. Section 24 of said ordinance renumbered § 54-583 as § 54-582
Secs. 54-583—54-599. Reserved.
Review The Entire Code


Glasses, Peace Medallion And Sandals Sold Separately. Flower Not Included.
Be sure to wear flowers in your hair when you step out in this Women's Hippie Love Child Costume! Inspired by the free flowing fashions of the 1960s, this hippie costume for women includes a long sleeved maxi dress, a long vest, and an embroidered ribbon headband. You'll look like you stepped out of a time traveling VW bus in the multicolored floral dress trimmed with violet ruffles along the hem and bell sleeves. The dress features an empire waist accentuated by a band of brown embroidered ribbon that coordinates with the included headband. With fringe at the bottom, the long brown faux suede vest captures the essential message of the hippie subculture with peace and love themed appliques. If you browse our selection of accessories, you'll find sunglasses, sandals, and jewelry similar to what is pictured here to complete your look. When you're dressed in this hippie love child costume for women, you'll show all the squares the beauty of flower power.
What a nice costume! I was skeptical about ordering this outfit without being able to feel the quality of the fabric, but I took a chance and am so glad I did. For reference, I am 5'3", and the dress reaches my ankles. I wanted to buy an outfit with bell bottom pants, but I did not want to have to worry about hemming, so I chose this outfit instead. I am so excited to wear my costume for a 60's-themed Zumba party! Thank you!
The size said 14-16 but fits like a 8-10. I have to open the seams and put in elastic. I'm 5'2" and the length is perfect on me. I love the costume, just not the sizing.


text:
Video Coverage
Blu-Ray/DVD Releases
TV Awards
Film Awards
VIDEO: Barack Obama Discusses His New Book, Memories With Biden, and More on THE TONIGHT SHOW
Watch all of the clips here!
by Stage Tube
BroadwayWorld.com Dec. 5, 2020
Last night tonight Barack Obama returned to THE TONIGHT SHOW STARRING JIMMY FALLON to chat with Fallon about his new book, A Promised Land.
In addition, the former president talked about his favorite memories with Joe Biden, how it felt watching the last four years of the Trump administration unfold, and more. He also reminisced on his previous appearances on the show while in his presidency.
Obama and Fallon also played a hilarious game of "Obama Settles It" where the former President gave the final word on some of life's most controversial debates including New York style pizza vs. Chicago style pizza, and whether or not a hot dog qualifies as a sandwich.
Check out the clips below!
Click Here to Watch the Video!
Related Articles View More TV Stories
Award-Winning Documentary MY NAME IS PEDRO Out On VOD/DVD February 23
SPRING BAKING CHAMPIONSHIP is Coming to Food Network
SYSTEM K Documentary Available On Various VOD Platforms
REAL TIME WITH BILL MAHER Returns For Its 19th Season Jan. 15
VIDEO: Annaleigh Ashford Talks B POSITIVE and More on THE LATE LATE SHOW
VIDEO: Watch the Trailer for the Film Adaptation of ONE NIGHT IN MIAMI, Starring Leslie Odom Jr., Nicolette Robinson & More
VIDEO: Annaleigh Ashford Talks About Her Move to L.A. on THE LATE LATE SHOW
LAW & ORDER: SVU is 'Trying to Hire Every Broadway Actor' They Can
Lashana Lynch to Play 'Miss Honey' in MATILDA Movie Musical
VIDEO: Watch the Trailer for THE LADY AND THE DALE on HBO
Eva Noblezada & Alex Brightman Will Appear on LAW AND ORDER: SVU

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: HTTP.sys vs Kestrel: Why choose one over the other? Pros Cons? What is the reason for two separate but similar servers?
What are the differences?
Can I run both in docker?
Do both support same things, like all authentication types?

A: Kestrel vs HTTP.sys - I've highlighted the fundamental differences below.
(The words are Microsoft's and I've only edited it for brevity and clarity. See the sources linked at the bottom).

Update:
Kestrel previously always required the use of a reverse proxy with edge deployments (exposed to traffic from the Internet) for security reasons. With Kestrel in ASP.Net Core 2.x this is no longer the case. Take a look at the documentation for more information. Kestrel Web Server Documentation

Weblistener was renamed HTTP.sys in ASP.NET Core 2.0
Sources:

*

*Docs.Microsoft.com Web server implementations in ASP.NET Core

*Docs.Microsoft.com HTTP.sys web server implementation in ASP.NET Core
HTTP.sys is windows-only HTTP / Web Server for ASP.NET Core that allows you to expose the server directly to the Internet without needing to use IIS. HTTP.sys is built on top of Http.Sys ( the same mature technology that also powers IIS' HTTP Listener) as is as such very feature rich and provides protection against various attacks.
Kestrel on the other hand, is a cross-platform web server for ASP.NET Core that is designed to be run behind a proxy (for example IIS or Nginx) and should not be deployed directly facing the Internet. Kestrel is relatively new and does not have a full complement of defenses against attacks. It's also not as feature rich as HTTP.sys and comes with timeout limits, size limits and concurrent user limits.

In essence, the choice comes down to your web application's Deployment scenario.
HTTP.sys Use Cases :

Kestrel Use Cases :

A: Following  comparison will help you to choose which one is better

A: The ASP.NET 5 documentation (created by Microsoft on August 25, 2015) found here lists the chart found in the other answer  (see page 107 of the bottom right book pages, but page 111 of the PDF): https://media.readthedocs.org/pdf/aspnet/theming/aspnet.pdf
Kestrel in general has better performance, if you used for one of the following below:

*

*Great option if used in conjunction with a reverse proxy for apps exposed to Internet

*Internal apps connecting with other internal apps on a private virtual network (not exposed to Internet)

WebListener is more secure, slower, and has more features.  It is used in these cases:

*

*Expose app to the Internet but can't use IIS
Require higher security and exposing server directly to Internet.

*Additional features: List item, Windows Authentication, Port sharing, HTTPS with SNI, HTTP/2 over TLS (Windows 10), Direct file transmission, Response caching

redpajama_set_name: RedPajamaStackExchange


text:
Chips that listen to bacteria
Sensing and disrupting biofilms
The development of colony biofilms by Pseudomonas aeruginosa is affected by redox-active compounds called phenazines (credit: Hassan Sakhtah, Columbia University)
A Columbia University research team has demonstrated that integrated circuit technology can be used for a study of signaling in bacterial colonies.
The researchers have developed a complementary metal-oxide-semiconductor (CMOS) chip that enables them to electrochemically image the signaling molecules from these colonies spatially and temporally.
In effect, they have developed chips that "listen" to bacteria.
"This is an exciting new application for CMOS technology that will provide new insights into how biofilms form," says Ken Shepard, professor of electrical engineering and biomedical engineering at Columbia Engineering.
"Disrupting biofilm formation has important implications in public health in reducing infection rates."
Detecting electrons instead of photons
Experimental electrosensor setup, including the bacterial colony, integrated circuit, and agar interface membrane. Scale bar: 1 mm. (Credit: Daniel L. Bellin et al./Nature Communications)
The chip, which senses the electron charge on molecules, is capable of imaging 60 pixels for concentrations as low as 2.6 microns (millionths of a meter) in 36 seconds.
The researchers say that this is the first time integrated circuits have been used for imaging small molecules electrochemically in a multicellular structure. Optical microscopy techniques cannot directly detect critical components of physiology, such as primary metabolism and signaling factors.
Cells mediate their physiological activities using secreted molecules, explains Lars Dietrich, assistant professor of biological sciences at Columbia University.
The team looked specifically at phenazines, which are secreted metabolites that control gene expression. Their study found that the bacterial colonies produced a phenazine gradient that, they say, is likely to be of physiological significance and contribute to colony morphogenesis.
Disrupting biofilms in medical devices
"This is a big step forward," Dietrich continues. "We describe using this chip to 'listen in' on conversations taking place in biofilms, but we are also proposing to use it to interrupt these conversations and thereby disrupt the biofilm (a special concern in hospitals). In addition to the pure science implications of these studies, a potential application of this would be to integrate such chips into medical devices that are common sites of biofilm formation, such as catheters, and then use the chips to limit bacterial colonization."
The next step for the team will be to develop a larger chip that will enable larger colonies to be imaged at higher spatial and temporal resolutions.
"This represents a new and exciting way in which solid-state electronics can be used to study biological systems," Shepard adds. "This is one of the many emerging ways integrated circuit technology is having impact in biotechnology and the life sciences."
The study, published in Nature Communications, was supported by the National Institutes of Health and the National Science Foundation.
Abstract of Nature Communications paper
Despite advances in monitoring spatiotemporal expression patterns of genes and proteins with fluorescent probes, direct detection of metabolites and small molecules remains challenging. A technique for spatially resolved detection of small molecules would benefit the study of redox-active metabolites that are produced by microbial biofilms and can affect their development. Here we present an integrated circuit-based electrochemical sensing platform featuring an array of working electrodes and parallel potentiostat channels. 'Images' over a 3.25 × 0.9 mm2 area can be captured with a diffusion-limited spatial resolution of 750 μm. We demonstrate that square wave voltammetry can be used to detect, identify and quantify (for concentrations as low as 2.6 μM) four distinct redox-active metabolites called phenazines. We characterize phenazine production in both wild-type and mutant Pseudomonas aeruginosa PA14 colony biofilms, and find correlations with fluorescent reporter imaging of phenazine biosynthetic gene expression.


text:
/**
 *
 * Process Editor - Core Package
 *
 * (C) 2008,2009 Frank Puhlmann
 *
 * http://frapu.net
 *
 */
package net.frapu.code.visualization;

import java.awt.Point;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;
import net.frapu.code.visualization.editors.BooleanPropertyEditor;

/**
 *
 * Provides a Cluster of ProcessNodes (for Pools, Lanes, etc.)
 *
 * @author frank
 */
public abstract class Cluster extends ProcessNode {

    /** Property for the contained Nodes of this Cluster */
    public final static String PROP_CONTAINED_NODES = "#nodes";
    /** Marks if this cluster is currently collapsed */
    public final static String PROP_COLLAPSED = "collapsed";
    /** A list of contained ProcessNodes */
    private List<ProcessNode> containedNodes = new LinkedList<ProcessNode>();

    public Cluster() {
        super();
        setProperty(PROP_COLLAPSED, FALSE);
        setPropertyEditor(PROP_COLLAPSED, new BooleanPropertyEditor());
        updateProperties();
    }

    /**
     * Returns if this cluster is collapseable. Might be overwritten by
     * subclasses.
     * @return
     */
    public boolean isCollapseable() {
        return true;
    }

    public boolean isCollapsed() {
        return getProperty(PROP_COLLAPSED).equalsIgnoreCase(TRUE);
    }

    @Override
    public synchronized void setPos(int x, int y) {
        // Detect difference
        int xOffset = x - getPos().x;
        int yOffset = y - getPos().y;

        //recursively determining all nodes which are inside this cluster
        //and all clusters inside the cluster (for correct rp movement)
        List<ProcessNode> _containedNodesFull = this.getProcessNodesRecursivly();

        // Move the positions of all contained RoutingPoints
        for (ProcessModel model : getContexts()) {
            // Iterate over all contexts
            for (ProcessEdge edge : new LinkedList<ProcessEdge>(model.getEdges())) {
                if (_containedNodesFull.contains(edge.getSource())
                        || _containedNodesFull.contains(edge.getTarget())) {
                    List<Point> rp = edge.getRoutingPoints();
                    for (int i = 1; i < rp.size() - 1; i++) {
                        Point p = rp.get(i);
                        if (this.contains(p)) {
                            // Move routing point
                            edge.moveRoutingPoint(i, new Point(p.x + xOffset, p.y + yOffset));
                        }
                    }
                }
            }
        }
        moveClusterNodes(xOffset, yOffset);
    }

    public synchronized void setPosIgnoreContainedNodes(int x, int y) {
        super.setPos(x, y);
    }

    protected void moveClusterNodes(int dx, int dy) {

        // Move the positions of all contained ProcessNodes
        for (ProcessNode n : getProcessNodes()) {
            // Check if not contained inside cluster
            if (n instanceof Cluster) {
                Cluster c = (Cluster) n;
                if (c.containedNodes.contains(this)) {
                    continue;
                }
                ((Cluster) n).moveClusterNodes(dx, dy);
            } else {
                n.setPos(n.getPos().x + dx, n.getPos().y + dy);
            }
        }
        // Update position afterwards so graphical containment checks uses the correct basis
        super.setPos(this.getPos().x + dx, this.getPos().y + dy);
    }

    @Override
    public void setProperty(String key, String value) {
        // Check if key=PROP_CONTAINED_NODES
        List<String> removeList = new LinkedList<String>();
        if (key.equals(PROP_CONTAINED_NODES)) {
            // Take additional care of removing nodes
            String oldValue = getProperty(key);
            if (oldValue != null) {
                // Figure out nodes that are in oldValue but not in value
                StringTokenizer st1 = new StringTokenizer(oldValue, ";");
                while (st1.hasMoreElements()) {
                    StringTokenizer st2 = new StringTokenizer(value, ";");
                    String currentValue1 = st1.nextToken();
                    boolean found = false;
                    while (st2.hasMoreElements()) {
                        if (currentValue1.equals(st2.nextElement())) {
                            found = true;
                        }
                    }
                    if (!found) {
                        removeList.add(currentValue1);
                    }
                }
                // Remove deprecated nodes from containment
                for (String id : removeList) {
                    ProcessNode remNode = null;
                    for (ProcessNode n : getProcessNodes()) {
                        if (n.getProperty(ProcessObject.PROP_ID).equals(id)) {
                            remNode = n;
                        }
                    }
                    if (remNode != null) {
                        containedNodes.remove(remNode);
                    }
                }
            }
        }
        super.setProperty(key, value);
    }

    /**
     * Updates the property representation of the contained nodes.
     */
    private synchronized void updateProperties() {
        String result = "";
        for (ProcessNode node : containedNodes) {
            assert node != null;
            assert node.getProperty(PROP_ID) != null;
            result += node.getProperty(PROP_ID) + ";";
        }
        if (result.length() > 0) {
            result = result.substring(0, result.length() - 1);
        }
        setProperty(PROP_CONTAINED_NODES, result);
    }

    /**
     * Adds a ProcessNode to this Cluster.
     * @param n
     */
    public void addProcessNode(ProcessNode n) {
        if (n == null) {
            return;
        }
        if (!containedNodes.contains(n)) {
            containedNodes.add(n);
            updateProperties();
        }
    }

    /**
     * Removes a ProcessNode from this Cluster.
     * @param n
     */
    public void removeProcessNode(ProcessNode n) {
        if (containedNodes.contains(n)) {
            containedNodes.remove(n);
            updateProperties();
        }
    }

    /**
     * Returns the set of ProcessNodes contained in this Cluster.
     * @return final Set<ProcessNode>
     */
    public List<ProcessNode> getProcessNodes() {
        final List<ProcessNode> NODES = containedNodes;
        return NODES;
    }

    public List<ProcessNode> getProcessNodesRecursivly() {
        List<ProcessNode> nodes = new ArrayList<ProcessNode>();

        for (ProcessNode n : this.containedNodes) {
            nodes.add(n);

            if (n.isCluster()) {
                nodes.addAll(((Cluster) n).getProcessNodesRecursivly());
            }
        }

        return nodes;
    }

    /**
     * Sets the Nodeset as the ProcessNodes of the Cluster
     * @param NODES
     */
    public void setProcessNodes(Collection<ProcessNode> nodes) {
        //use add to ensure constraints and encapsulation
        clearContainment();
        for (ProcessNode givenNode : nodes) {
            addProcessNode(givenNode);
        }
    }

    /**
     * Returns whether a certain ProcessNode is contained inside this Cluster.
     * @param n
     * @return
     */
    public boolean isContained(ProcessNode n) {
        for (ProcessNode node : getProcessNodes()) {
            if (node == n) {
                return true;
            }
        }
        return false;
    }

    /**
     * Updates the containment set. Usually required after creating a
     * to initialize containments.
     * @param nodes
     */
    public void updateContainments(List<ProcessNode> nodes) {
        // Clear list
        containedNodes.clear();
        for (ProcessNode n : nodes) {
            // Skip self
            if (n == this) {
                continue;
            }
            // Check if contained
            if (isContainedGraphically(nodes, n, true)) {
                addProcessNode(n);
            }
        }
    }

    public void clearContainment() {
        containedNodes.clear();
        updateProperties();
    }

    /**
     * Returns whether a certain ProcessNode is graphically contained or not.
     */
    public boolean isContainedGraphically(List<ProcessNode> allNodes, ProcessNode node, boolean onTopRequired) {
        if (node == null | node == this) {
            return false;
        }

        // Check if this node is on top of the Cluster
        if (onTopRequired) {
            for (ProcessNode n : allNodes) {
                // If the node is behind the Cluster return false
                if (n == node) {
                    return false;
                }
                // If Cluster is found, exit loop
                if (n == this) {
                    break;
                }
            }
        }

        // Skip AttachedNodes that have the Cluster as parent
        if (node instanceof AttachedNode) {
            AttachedNode aNode = (AttachedNode) node;
            String parentId = aNode.getParentNodeId();
            if (parentId != null) {
                if (parentId.equals(getProperty(ProcessObject.PROP_ID))) {
                    return false;
                }
            }
        }

        // Check boundaries (complete
        Rectangle r1 = new Rectangle(getTopLeftPos().x, getTopLeftPos().y, getSize().width, getSize().height);
        Rectangle r2 = new Rectangle(node.getTopLeftPos().x, node.getTopLeftPos().y, node.getSize().width, node.getSize().height);

        if (r1.contains(r2)) {
            return true;
        }

//        if ((node.getPos().y >= (this.getTopLeftPos().y))
//                && (node.getPos().y <= (this.getPos().y + this.getSize().height / 2))
//                && (node.getPos().x > (this.getPos().x - this.getSize().width / 2))
//                && (node.getPos().x < (this.getPos().x + this.getSize().width / 2))) {
//            return true;
//        }

        return false;
    }

    @Override
    public boolean isCluster() {
        return true;
    }

    @Override
    public String toString() {
        return this.getClass().getSimpleName() + " (" + getText() + ")";
    }

    @Override
    public Cluster clone() {
        Cluster copy = (Cluster) super.clone();
        copy.containedNodes = new LinkedList<ProcessNode>(containedNodes);
        return copy;
    }
}

redpajama_set_name: RedPajamaGithub


text:
Q: Search using UITextField I have looked everywhere and there doesn't seem to be a clear example. I am trying to achieve this, where the textField will act as a searchBar then the user would be able to add that item:

Most example seem to use UI SearchBar and a tableView where it displays the filtered results. But there is no real example that uses just a textField.
My other option is to try and just get an autocompletion where it checks if the character that is inputted matches an array of data, something like this:
Are there any clearer examples or tutorial I can follow? I'm fairly new to programming so I would prefer it be in Swift please.
Other similar reference:
http://www.iostutorialjunction.com/2017/04/integrate-search-functionality-in-ios-using-swift3.html
How to make UITextField behave like a UISearchBar in Swift?
https://www.raywenderlich.com/113772/uisearchcontroller-tutorial
http://www.matthewhsingleton.com/blog/2016/5/26/predictive-text-table-view-swift-version-of-ray-wenderlich
https://www.youtube.com/watch?v=YZ_S2GHFwW4
https://www.youtube.com/watch?v=XtiamBbL5QU&t=975s
Getting autocomplete to work in swift
https://github.com/EddyBorja/MLPAutoCompleteTextField

A: There are many ways to accomplish this task.
You can place a textField as well as a UILabel exactly behind it.
And When Every you type a word just change the text of that label. Set the Label's textColor to lightGrey color and you will be good to go.
To set a method that invokes every time user type something use below code.
//Below line will set a method to textFields value change event.
searchTextField.addTarget(self, action: #selector(self.textIsChanging(textField:)), for: .editingChanged)

func textIsChanging(textField: UITextField) {

}

A: you can use an delegate method textFieldDidChangeSelection(_ textField: UITextField), works for me