In today's tech driven world parents often find themselves wrestling over the topic of cell phones with their children. If your child is between the ages of 9 and 16 and doesn't have a cell phone, chances are that they want one. Chances are also good that the subject is frequently broached in your home. I'm sure being a parent is a balancing act and as every parent knows from experience, the wants of a child are very different from needs of a child. Your child may want a phone but it's up to you as the parent to weigh the issue carefully and decide if it is a real need.
When you gift children phones you're handing over extremely powerful communications and production devices. Life was easier for parents when cell phones did one thing, made phone calls. With smartphones, not only do kids get full access to the internet on their phones, they are also able to text, make videos and take pictures. The videos and pictures can be extensively distributed and uploaded to websites. In addition, you are giving your child the ability to broadcast their status and their location. If you think your kid's tech savvy is greater than his ability to use it judiciously, pay attention to the gap. In effect, you're exposing your children to a world that can be a wonderful place, but at the same time, not so wonderful. Just as you have rules in your home for the internet; it's a good idea to make a list of rules for phone usage. It's your job as a parent to teach your children to conduct themselves well, regardless of technology.
There are important advantages to children having a cell phone. On the plus side, giving your child a phone can be a nice convenience for families with chaotic schedules. Phones help coordinate rides home. They also assist during emergency situations. When fitted with a GPS tracking device, they provide an electronic tether to home which allows a parent to know where their underage children are. But they also turn into a huge distraction for kids. Children can become so technologically connected to their phones that they run the risk of not looking at who is sitting next to them. They tune the world out, becoming focused exclusively on the small screen in their young hands. So not only are they unaware of the dangers around them, they miss the beauty around them as well.
Although making a list of rules associated with a phone is important, what may be even more important is to remember that your child learns by observing you. If you keep your phone turned on and allow the beeps and buzzes to interrupt him as he is talking to you, he will notice. If you are so connected to your phone that you have it with you at all times, he will notice. If you read text messages or emails while out with the family, be assured, he will notice. In the end, giving your children rules is fine, but showing your children how you want them to conduct themselves by your actions is better yet.


Having a Clairemont locksmith available and nearby in the event of an emergency is convenient. It also allows you the chance to get to know that local locksmith professional, and that is why Noble Locksmith enjoys such a great reputation in the greater Clairemont area. Whether you are looking to get your keys out of your locked vehicle, or you are looking to entirely revamp your home's security system, give us a call to get the process started with an assessment of your security needs.
Call your neighborhood experts here at Noble Locksmith to ensure that your house is protected with the strongest of locks and security.
With our bonded mobile technicians, we can be dispatched to your location in the event of an emergency. Needless to say, most emergencies are scheduled at the absolutely worst possible time, so let us come to you and assess how we can help. As a full service locksmith shop in the heart of your community, you can trust us to arrive with a plan and a solution whether you have locked your keys in the car or you have inadvertently broken the key off in the lock due to weakened tumblers. You can rely on our professional demeanor and fully stocked trucks to service, fix, or replace most name brand locks. Let's find out how we can help you meet your immediate security needs, while looking to your long term protection.


text:
Public Domain Picture: To the rescue
By: U.S. Air Force photo by Airman 1st Class Joshua T. Jasper, Courtesy: US Air Force
Views: 840 | Downloads: 20
To the rescue
OVER THE ATLANTIC OCEAN (AFPN) -- One of two pararescuemen from 38th Rescue Squadron at Moody Air Force Base, Ga., follows an inflatable boat out the back of an HC-130 during a rescue mission 350 miles northeast of the Caribbean island of St. Maarten on July 23. They provided medical support to a Chinese fisherman who sustained a life-threatening chest injury the day before.
U.S. Air Force photo by Airman 1st Class Joshua T. Jasper
World War II had been over for two years and the Korean War lay three years ahead when the Air Force ended a 40-year association with the U.S. Army to become a separate service. The Department of the Air Force was created when President Harry S Truman signed the National Security Act of 1947.

redpajama_set_name: RedPajamaCommonCrawl


text:
Simon Doonan on 2016, Dior and I, LACMA Update
Hosted by Frances Anderton Apr. 21, 2015
Simon Doonan says the 2016 presidential candidates should provide more "fash-tainment;" and a documentary pulls back the veil on the House of Dior. Plus, Joseph Giovannini questions the LACMA design by Peter Zumthor.
Image: Dior's haute couture atelier discovers Raf Simons' first sketches from the documentary DIOR AND I, directed by Frédéric Tcheng. Courtesy of CIM Productions.
From this Episode:
Simon Doonan Wants "Fash-tainment" in the 2016 Election
Washington politicians aren't known for daring fashion choices, but Simon Doonan , writer and creative ambassador for Barney's New York, wants that to change.
Seamstresses Steal the Show in 'Dior and I'
Dior and I is a new documentary directed by Frédéric Tcheng , who cut his teeth on Diana Vreeland: The Eye has to Travel and Valentino: the Last Emperor .
Should the LACMA Scheme Move Forward?
As LACMA celebrates its 50th birthday this week, the project for the museum's new design by Swiss architect Peter Zumthor appears to be moving forward. But should it?
A Celebration of Tap Water
Evelyn Wendel is co-founder of WeTap , a non-profit advocating for greater access to public drinking water. She explains why California, in the midst of a crippling...
Frances Anderton
Frances Anderton, Caroline Chamberlain


text:
Q: mongodb with microsoft failover cluster im required to install mongodb in a microsoft windows 2012r2 server in a failover cluster mode.
does mongodb supports that as microsoft sql do?
if the answer is yes, can you point mo to a guide please?
thanks!
Guy

A: Yes. The technology in MongoDB is called Replication. You define several servers to act in unison as a Replica Set; they automatically keep identical copies of the same data, and if the primary fails then the replica set will automatically fail over: one of the other nodes will take over as the new primary.

redpajama_set_name: RedPajamaStackExchange


Three crewmen have been confirmed dead after the cargo ship they were on sank near Sado Island in Niigata, Japan, according to Maritime Executive.
The vessel sank early Thursday morning in the <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />Sea of Japan with a total of 12 mariners onboard - nine Chinese and three South Korean.
Upon receiving a distress call from the sinking ship, a helicopter from Japan's Self-Defense Force located a lifeboat about 300 km northwest of Sado's Hajikizaki Island carrying the abandoned vessel's crewmen.
Japan's Coast Guard rescued all of the crewmembers, but three of the men unfortunately died while receiving medical treatment.


text:
National Network for the Transportation Workforce
About NNTW
National Transportation Career Pathways Initiative
Women in Transportation
Road Safety Champion Program
Empowering the New Mobility Workforce
Transportation Career Pathways
Interviews with Transportation Professionals
Environmental Career Path Profiles
Careers in Computer & Data Science
The Clean Transportation Workforce
Environmental Career Competencies
You are here: Home / Archives for Public/Education
Public/Education
Sarah Heath
Sarah Heath has worked in Career and Technical Education (CTE) her whole career as a high school business and computer science teacher, state program director for Business and Computer Science in Georgia, a local system CTE and concurrent enrollment administrator in Jeffco Public Schools in Colorado, and now as the State Director of CTE in Colorado. In her current position, she supports all secondary and post-secondary CTE programs in Colorado. Colorado is fairly unique in that all CTE programs for secondary and post-secondary are managed and supported by one state agency, the Colorado Community College System. This provides Sarah and the Colorado CTE the ability to work with programs and students along their career pathway from 7th grade into the workforce either through direct placement after their high school CTE program or a post-secondary CTE program. Increasing workforce education and preparation is her life's passion and she is fortunate to have a team of people who feel the same way helping her serve Colorado. She has served as the National President of the Association for Career and Technical Education (ACTE), which has a mission is to increase support for Career and Technical Education and general career development across the country. She also is proud that all three of her degrees are from the University of Georgia – Go Dawgs!
Mathew K. Isaac
Kevin Fleming
Dr. Fleming supports all Career & Technical Education programs at Norco College as well as CTE curriculum development for multiple state and federal grants. He also serves as the Principal Investigator for the National Science Foundation's National Center for Supply Chain Automation. Dr. Fleming's professional background includes experience working in higher education at community colleges as well as both public and private 4-year universities. Beginning his career in academia within student services, he has experience in classroom instruction, fundraising/foundations, economic development, academic affairs, and professional speaking/training. He most recently analyzed industry and workforce needs providing customized labor market research for the California Community College system through the Centers of Excellence.
Kevin Fleming earned his Bachelor of Arts in Psychology and his Bachelor of Arts in Philosophy at Loyola Marymount University; a Master of Arts in Educational Policy & Leadership at The Ohio State University, a Master of Business Administration at the University of Redlands, and a Ph.D. in Education at Claremont Graduate University.
Jennifer Cleary
Jennifer Cleary performs a variety of research, evaluation, and capacity-building activities. Her current work is focused on understanding and improving the responsiveness of higher education to the emerging needs of the labor market and assisting policymakers and educators to build industry-focused workforce strategies. Several recent projects have been focused on addressing workforce challenges in the nation's transportation industry, including the National Transit Virtual Career Network and the Transportation, Logistics, and Distribution Talent Network in New Jersey. She has also authored several studies on the workforce and education issues associated with emerging industries, including clean energy and other green sectors and she managed New Jersey's Ready for the Job initiative, a multi-year project to ensure New Jersey educates qualified workers for the state's key industries. Cleary has also evaluated adult literacy and dislocated worker programs, managed customer satisfaction surveys for several states, and coordinated work on the New Jersey Consumer Report Card System, an interactive directory of training providers.
Cleary has over 10 years of experience managing social service programs and spent 5 years coordinating events and projects for nonprofit organizations. Her previous experience includes working as the executive director for a shelter for homeless families in New Jersey. She also served as an events coordinator for the Robert Wood Johnson University Hospital Foundation. Cleary earned her master's degree from the Edward J. Bloustein School of Planning and Public Policy at Rutgers University and has completed over 30 credits of additional coursework in evaluation methods and public policy areas.
Lee D. Lambert
Lee D. Lambert has been Chancellor of Pima Community College since July 1, 2013.
Chancellor Lambert is a strong believer in the transformative power of education and the central role community colleges must play in our highly competitive 21st century economy. He sees community colleges as centers of opportunity for students of all ages and backgrounds, and knows they can be a critical stepping stone to a better quality of life for our families, friends and neighbors.
Chancellor Lambert's vision for PCC is shaped by his commitment to set of fundamental principles: open access, community engagement, prudent fiscal stewardship and consistent measures of accountability. He believes that by embracing diversity, creating a student-centered learning environment and aligning resources to the needs of the community, PCC can become one of the premier community colleges in the United States.
Chancellor Lambert's involvement in national and state organizations means PCC is in a position to influence important educational and workforce policy discussions. He serves on the Board of Directors of the American Association of Community Colleges (AACC) and in 2013-14 he served on AACC's Executive Committee. He is a former chair of AACC's Committee on Program Initiatives and Workforce Training.
He has served as board chair of the National Coalition of Certification Centers and, in July 2014, received the group's Founders Award for Vision and Leadership.
In April 2014, Chancellor Lambert was named to the Executive Committee of the Arizona Manufacturing Partnership. He also is a founding member of the Manufacturing Institute Education Council, and a member of the Founders Circle and Board of Directors of Tucson Regional Economic Development (TREO).
Chancellor Lambert received a Juris Doctor degree from the Seattle University School of Law and a bachelor's degree in Liberal Arts from The Evergreen State College in Olympia, Wash.
A U.S. Army veteran, Chancellor Lambert was born in Seoul, South Korea, grew up on three continents, and graduated from high school in the Olympia, Wash. area.
He often is asked to speak at national and international conferences. He recently spoke at the International Conference on Community Colleges and at AACC's 20th Annual Workforce Development Institute, where he presented on "The Keys to Collaboration: K-12 and Workforce Relationships."
Marc Anderberg
Marc Anderberg currently is the chief analyst for research and data development projects being conducted by the Center for Employability Outcomes, a think tank housed at the Texas State Technical College. The research is focused on identifying and validating the technical and soft skills employers deem essential to worker engagement, productivity and performance across all sectors of the economy. He served as the director of applied research in the Labor Market Information Division of the Texas Workforce Commission for twenty years. His duties there included identifying and profiling emerging demand occupations and managing the state's automated student and adult learning follow-up system. Prior to working for the TWC, Mr. Anderberg was the state labor market analyst for JTPA programs administer by the Texas Department of Commerce. Previously he'd been the Director of Quality Workforce Planning serving the thirteen counties of the Texas Coastal Bend. He began his professional career teaching policy analysis and statistics at Macalester College.
Copyright © 2021 National Network for the Transportation Workforce • Contact Us


text:
Q: How to create a pivot table from hstore data? Imagining I have a table cars with a field data inside:
CARS
name  |  data
car 1 |  { "doors" => "5", "engine" => "1.1" }
car 2 |  { "doors" => "3", "engine" => "1.1", "air_conditioning" => "true" }
car 3 |  { "doors" => "5", "engine" => "1.4" }

Assuming data keys are dynamic (more can be added), how can I create a pivot table from that data like this:
CROSSTAB
name  |  doors  |  engine  |  air_conditioning
car 1 |  5      |  1.1     |
car 2 |  3      |  1.1     |  "true"
car 3 |  5      |  1.4     |

A: Here's how to get the result you asked for:
CREATE TABLE hstore_test (id bigserial primary key, title text, doors integer, engine text, air_conditioning boolean)
INSERT INTO hstore_test (title, doors, engine, air_conditioning)
VALUES ('Car1', 2, '1.1', false), ('Car2', 4, '1.2', true), ('Car3', 3, '1.3', false), ('Car4', 5, '1.4', null);

DROP TABLE IF EXISTS hstore_persist;
CREATE TABLE hstore_persist AS
SELECT hstore(t) car_data FROM hstore_test AS t;

SELECT car_data->'title' "name", car_data->'doors' doors, car_data->'engine' engine, car_data->'air_conditioning' air_conditioning
FROM hstore_persist

This will result in the table
name | doors | engine | air_conditioning
Car1 |     2 |    1.1 | f
Car2 |     4 |    1.2 | t
Car3 |     3 |    1.3 | f
Car4 |     5 |    1.4 |

There is nothing "crosstab" about it, though.  This is just using the accessor methods of an hstore to display the data in the way you show in the example.


We invite you to consider these alternative giving options, which will ensure you are able to make a lasting contribution to The Friends' School.
Your gift to the School will ensure we are able to continue to provide our students with the best education and support them to develop in to men and women who will think clearly, act with integrity, make decisions for themselves, be sensitive to the needs of others and the environment, be strong in service and hold a global perspective for many years to come.
Instead of giving the traditional gift of flowers at the time of your passing you may like to invite your friends and family to give a gift of support to the school in your memory.
The Development Department would work collaboratively with you to create a personalised giving envelope and donation slip, which can be ready for mailing at short notice.
At birthday or Christmas time you may consider suggesting your loved ones make a donation to the School on your behalf in lieu of a gift. Once again The Friends' School can arrange to have personalised giving slips and envelopes created and provided at short notice.


text:
City, state at odds on plant outputs
Andrew Nash The Morning Sun
City of Pittsburg officials hope that by spending about $11,000, they won't have to spend $24 million.
The city commission approved the hire of a consultant group during Tuesday's meeting to provide professional expertise for the city's debate with the state over levels of phosphorus in Cow Creek.
"The question is whether their science is good science. I'm not so sure," said Dr. John Bailey, Pittsburg Public Utilities director.
According to the state, the city's Wastewater Treatment Plant has been putting 4.5 mg/L of phosphorus into Cow Creek. Their "recommendations" call for that to be lowered to 1.5 mg/L in phase I and to 0.5 mg/L in phase II, both to be completed by 2019. Those improvements would include the construction of anoxic basins, the use of microfiltration, and disinfection using ultraviolet radiation — all told, a price tag near $24 million.
In addition, the state has set a public hearing on the issue for May 19 at 1 p.m. at the Kansas Department of Health and Environment Mined Land/Surface Mining Section in Frontenac.
Bailey recommended the hire of CH 2M Hill, an engineering consultant group out of Kansas City, Mo., for roughly $11,000. Bailey said the state has agreed to wait 30-45 days on a decision to give the city sufficient time to hear from its consultant.
Pittsburg's not the only city dealing with this issue — 21 cities in total are evaluating the wastewater treatment process in response to state claims.
Further, Bailey said that the findings by the state are very technical, but never actually involved the measurement of Cow Creek at all — rather, it used what's called "reference streams" instead of measuring Cow Creek, then arbitrarily set standards.
"Some cities have drinking water with up to 250 mg/L of phosphorus. It's not a problem [as low as we are]," Bailey said. "We want CH 2M Hill to look at what we do to optimize operations, examine damage to Cow Creek and look at the criteria to see if it's truly reasonable. The real question is whether 4.5 mg/L is damaging to Cow Creek, and the answer is that's unknown."
The city commission also dealt with setting up a policy for a community improvement district. Such a district would allow developers to increase the sales tax by a bit, with the extra taxes going to pay for improvements, renovations, or redevelopment within a certain geographic area. A tax-increment financed district, a similar concept, does not allow for renovations or redevelopment. The tax increases, according to the policy, would last no longer than 22 years.
"The two most logical areas are Meadowbrook Mall and Town Center, where the Home Depot is," said Economic Development Director and Pittsburg Area Chamber of Commerce President Blake Benson. "...In Town Center, they have the Goody's that's so big, and they'd like to split that up into three different office buildings. That's obviously costly, but if there's a CID, it helps the developers."
Finally, the commissioners heard a bi-monthly budget report from Finance Director Jamie Clarkson.


PHIL COLLINS Testify (2002 UK 12-track CD album) He is often maligned but wrongly so. The truth is that Phil Collins makes clever, memorable pop music that appeals across genre & age.
29 Hello, I Must Be Going!


text:
Q: Filtering on a JTree Problem
Applying filtering on a JTree to avoid certain nodes/leaves to show up in the rendered version of the JTree. Ideally I am looking for a solution which allows to have a dynamic filter, but I would already be glad if I can get a static filter to work.
To make it a bit easier, let us suppose the JTree only supports rendering, and not editing. Moving, adding, removing of nodes should be possible.
An example is a search field above a JTree, and on typing the JTree would only show the subtree with matches.
A few restrictions: it is to be used in a project which has access to JDK and SwingX. I would like to avoid to include other third party libs.
I already thought of a few possible solutions, but neither of those seemed ideal
Approaches
Model based filtering

*

*decorate the TreeModel to filter out some of the values. A quick-and-dirt version is easy to write. Filter out nodes, and on every change of the filter or the delegate TreeModel the decorator can fire an event that the whole tree has changes (treeStructureChanged with the root node as node). Combine this with listeners which restore the selection state and the expansion state of the JTree and you get a version which works more or less, but the events originating from the TreeModel are messed up. This is more or less the approach used in this question

*decorate the TreeModel but try fire the correct events. I did not (yet) managed to come up with a working version of this. It seems to require a copy of the delegate TreeModel in order to be able to fire an event with the correct child indices when nodes are removed from the delegate model. I think with some more time I could get this to work, but it just feels wrong (filtering feels like something the view should do, and not the model)

*decorate whatever data structure was used to create the initial TreeModel. However, this is completely non-reusable, and probably as hard as to write a decorator for a TreeModel
View based filtering
This seems like the way to go. Filtering should not affect the model but only the view.

*

*I took a look at RowFilter class. Although the javadoc seems to suggest you can use it in combination with a JTree:

when associated with a JTree, an entry corresponds to a node.

I could not find any link between RowFilter (or RowSorter) and the JTree class. The standard implementations of RowFilter and the Swing tutorials seems to suggest that RowFilter can only be used directly with a JTable (see JTable#setRowSorter). No similar methods are available on a JTree

*I also looked at the JXTree javadoc. It has a ComponentAdapter available and the javadoc of ComponentAdapter indicates a RowFilter could interact with the target component, but I fail to see how I make the link between the RowFilter and the JTree

*I did not yet look at how a JTable handles the filtering with RowFilters, and perhaps the same can be done on a modified version of a JTree.

So in short: I have no clue on what's the best approach to solve this
Note: this question is a possible duplicate of this question, but that question is still unanswered, the question rather short and the answers seems incomplete, so I thought to post a new question. If this is not done (the FAQ did not provide a clear answer on this) I will update that 3year old question

A: Take a look at this implementation: http://www.java2s.com/Code/Java/Swing-Components/InvisibleNodeTreeExample.htm
It creates subclasses of DefaultMutableNode adding a "isVisible" property rather then actually removing/adding nodes from the TreeModel. Pretty sweet I think, and it solved my filtering problem neatly.

A: View-based filtering is definitely the way to go.  You can use something like the example I've coded below.  Another common practice when filtering trees is to switch to a list view when filtering a tree, since the list won't require you to show hidden nodes whose descendants need to be shown.
This is absolutely horrendous code (I tried to cut every corner possible in whipping it up just now), but it should be enough to get you started.  Just type your query in the search box and press Enter, and it'll filter the JTree's default model.  (FYI, the first 90 lines are just generated boilerplate and layout code.)
package com.example.tree;

import java.awt.BorderLayout;

public class FilteredJTreeExample extends JFrame {

    private JPanel contentPane;
    private JTextField textField;

    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    FilteredJTreeExample frame = new FilteredJTreeExample();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    /**
     * Create the frame.
     */
    public FilteredJTreeExample() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 450, 300);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        contentPane.setLayout(new BorderLayout(0, 0));
        setContentPane(contentPane);

        JPanel panel = new JPanel();
        contentPane.add(panel, BorderLayout.NORTH);
        GridBagLayout gbl_panel = new GridBagLayout();
        gbl_panel.columnWidths = new int[]{34, 116, 0};
        gbl_panel.rowHeights = new int[]{22, 0};
        gbl_panel.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
        gbl_panel.rowWeights = new double[]{0.0, Double.MIN_VALUE};
        panel.setLayout(gbl_panel);

        JLabel lblFilter = new JLabel("Filter:");
        GridBagConstraints gbc_lblFilter = new GridBagConstraints();
        gbc_lblFilter.anchor = GridBagConstraints.WEST;
        gbc_lblFilter.insets = new Insets(0, 0, 0, 5);
        gbc_lblFilter.gridx = 0;
        gbc_lblFilter.gridy = 0;
        panel.add(lblFilter, gbc_lblFilter);

        JScrollPane scrollPane = new JScrollPane();
        contentPane.add(scrollPane, BorderLayout.CENTER);
        final JTree tree = new JTree();
        scrollPane.setViewportView(tree);

        textField = new JTextField();
        GridBagConstraints gbc_textField = new GridBagConstraints();
        gbc_textField.fill = GridBagConstraints.HORIZONTAL;
        gbc_textField.anchor = GridBagConstraints.NORTH;
        gbc_textField.gridx = 1;
        gbc_textField.gridy = 0;
        panel.add(textField, gbc_textField);
        textField.setColumns(10);
        textField.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
                TreeModel model = tree.getModel();
                tree.setModel(null);
                tree.setModel(model);
            }
        });

        tree.setCellRenderer(new DefaultTreeCellRenderer() {
            private JLabel lblNull = new JLabel();

            @Override
            public Component getTreeCellRendererComponent(JTree tree, Object value,
                    boolean arg2, boolean arg3, boolean arg4, int arg5, boolean arg6) {

                Component c = super.getTreeCellRendererComponent(tree, value, arg2, arg3, arg4, arg5, arg6);

                DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
                if (matchesFilter(node)) {
                    c.setForeground(Color.BLACK);
                    return c;
                }
                else if (containsMatchingChild(node)) {
                    c.setForeground(Color.GRAY);
                    return c;
                }
                else {
                    return lblNull;
                }
            }

            private boolean matchesFilter(DefaultMutableTreeNode node) {
                return node.toString().contains(textField.getText());
            }

            private boolean containsMatchingChild(DefaultMutableTreeNode node) {
                Enumeration<DefaultMutableTreeNode> e = node.breadthFirstEnumeration();
                while (e.hasMoreElements()) {
                    if (matchesFilter(e.nextElement())) {
                        return true;
                    }
                }

                return false;
            }
        });
    }

}

When you implement it for real, you'll probably want to create your own TreeNode and TreeCellRenderer implementations, use a less stupid method for triggering an update, and follow MVC separation.  Note that the "hidden" nodes are still rendered, but they're so small that you can't see them.  If you use the arrow keys to navigate the tree, though, you'll notice that they're still there.  If you just need something that works, this might be good enough.

Edit
Here are screenshots of the unfiltered and filtered version of the tree in Mac OS, showing that the whitespace is visible in Mac OS:

A: Old Question, I stumbled upon... for all those who want a quick and easy Solution of
JUST FILTERING THE VIEW:
I know it isn't as clean as Filtering the Model and comes with possible backdraws, but if you just want a quick solution for a small Application:
Extend the DefaultTableCellRenderer, override getTreeCellRendererComponent - invoke super.getTreeCellRendererComponent(...) and after that just set the Preferred Height to ZERO for all Nodes you want to hide.
When constructing your JTree be sure to set setRowHeight(0); - so it will respect the Preferred Height of each row...
voila - all filtered Rows invisible!
COMPLETE WORKING EXAMPLE
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTree;
import javax.swing.UIManager;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;

public class JTreeExample
{
    public static void main( final String[] args ) throws Exception
    {
        UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );

        // The only correct way to create a SWING Frame...
        EventQueue.invokeAndWait( new Runnable()
            {
                @Override
                public void run()
                {
                    swingMain();
                }
            } );
    }

    protected static void swingMain()
    {
        final JFrame f = new JFrame( "JTree Test" );
        f.setLocationByPlatform( true );
        f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );

        final int items = 5;

        final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode( "JTree", true );
        final DefaultTreeModel myModel = new DefaultTreeModel( rootNode );

        final Box buttonBox = new Box( BoxLayout.X_AXIS );

        for( int i = 0; i < items; i++ )
        {
            final String name = "Node " + i;
            final DefaultMutableTreeNode newChild = new DefaultMutableTreeNode( name );
            rootNode.add( newChild );

            final JButton b = new JButton( "Show/Hide " + i );
            buttonBox.add( b );
            b.addActionListener( new ActionListener()
                {
                    @Override
                    public void actionPerformed( final ActionEvent e )
                    {
                        // If the node has a Text, set it to null, otherwise reset it
                        newChild.setUserObject( newChild.getUserObject() == null ? name : null );
                        myModel.nodeStructureChanged( newChild.getParent() );
                    }
                } );
        }

        final JTree tree = new JTree( myModel );
        tree.setRowHeight( 0 );
        tree.setCellRenderer( new JTreeExample.TreeRenderer() );

        f.add( tree, BorderLayout.CENTER );
        f.add( buttonBox, BorderLayout.SOUTH );

        f.setSize( 600, 500 );
        f.setVisible( true );
    }

    public static class TreeRenderer extends DefaultTreeCellRenderer
    {
        @Override
        public Component getTreeCellRendererComponent( final JTree tree, final Object value, final boolean selected,
                                                        final boolean expanded, final boolean leaf, final int row, final boolean hasFocus )
        {
            // Invoke default Implementation, setting all values of this
            super.getTreeCellRendererComponent( tree, value, selected, expanded, leaf, row, hasFocus );

            if( !isNodeVisible( (DefaultMutableTreeNode)value ) )
            {
                setPreferredSize( new Dimension( 0, 0 ) );
            }
            else
            {
                setPreferredSize( new Dimension( 200, 15 ) );
            }

            return this;
        }
    }

    public static boolean isNodeVisible( final DefaultMutableTreeNode value )
    {
        // In this example all Nodes without a UserObject are invisible
        return value.getUserObject() != null;
    }
}

A: I've been working on a workarround for filtering an extended JXTreeTable. I've followed the two-model approach for simplicity.
The Filtered Model
public abstract class TellapicModelFilter extends DefaultTreeTableModel {

    protected Map<AbstractMutableTreeTableNode,
                  AbstractMutableTreeTableNode>  family;
    protected Map<AbstractMutableTreeTableNode,
                  AbstractMutableTreeTableNode>  filter;
    protected MyTreeTable                        treeTable;
    private   boolean                            withChildren;
    private   boolean                            withParents;

    /**
     *
     * @param model
     */
    public TellapicModelFilter(MyTreeTable treeTable) {
        this(treeTable, false, false);
    }

    /**
    *
    * @param treeTable
    * @param wp
    * @param wc
    */
    public TellapicModelFilter(MyTreeTable treeTable, boolean wp, boolean wc) {
        super(new DefaultMutableTreeTableNode("filteredRoot"));
        this.treeTable = treeTable;
        setIncludeChildren(wc);
        setIncludeParents(wp);
    }

    /**
     *
     */
    public void filter() {
        filter = new HashMap<AbstractMutableTreeTableNode, AbstractMutableTreeTableNode>();
        family = new HashMap<AbstractMutableTreeTableNode, AbstractMutableTreeTableNode>();
        AbstractMutableTreeTableNode filteredRoot = (AbstractMutableTreeTableNode) getRoot();
        AbstractMutableTreeTableNode root = (AbstractMutableTreeTableNode) treeTable.getTreeTableModel().getRoot();
        filterChildren(root, filteredRoot);
        for(AbstractMutableTreeTableNode node : family.keySet())
            node.setParent(null);
        for(AbstractMutableTreeTableNode node : filter.keySet())
            node.setParent(filter.get(node));
    }

    /**
     *
     * @param node
     * @param filteredNode
     */
    private void filterChildren(AbstractMutableTreeTableNode node, AbstractMutableTreeTableNode filteredNode) {
        int count = node.getChildCount();
        for(int i = 0; i < count; i++) {
            AbstractMutableTreeTableNode child = (AbstractMutableTreeTableNode) node.getChildAt(i);
            family.put(child, node);
            if (shouldBeFiltered(child)) {
                filter.put(child, filteredNode);
                if (includeChildren())
                    filterChildren(child, child);
            } else {
                filterChildren(child, filteredNode);
            }
        }
    }

    /**
     *
     */
    public void restoreFamily() {
        for(AbstractMutableTreeTableNode child : family.keySet()) {
            AbstractMutableTreeTableNode parent = family.get(child);
            child.setParent(parent);
        }
    }

    /**
     *
     * @param node
     * @return
     */
    public abstract boolean shouldBeFiltered(AbstractMutableTreeTableNode node);

    /**
     * Determines if parents will be included in the filtered result. This DOES NOT means that parent will be filtered
     * with the filter criteria. Instead, if a node {@code}shouldBeFiltered{@code} no matter what the parent node is,
     * include it in the filter result. The use of this feature is to provide contextual data about the filtered node,
     * in the terms of: "where was this node that belongs to?"
     *
     * @return True is parents should be included anyhow.
     */
    public boolean includeParents() {
        return withParents;
    }

    /**
     * Determines if children should be filtered. When a node {@code}shouldBeFiltered{@code} you can stop the filtering
     * process in that node by setting: {@code}setIncludeChildren(false){@code}. In other words, if you want to filter
     * all the tree, {@code}includeChildren{@code} should return true.
     *
     * By letting this method return {@code}false{@code} all children of the node filtered will be automatically added
     * to the resulting filter. That is, children aren't filtered with the filter criteria and they will be shown with
     * their parent in the filter result.
     *
     * @return True if you want to filter all the tree.
     */
    public boolean includeChildren() {
        return withChildren;
    }

    /**
     *
     * @param include
     */
    public void setIncludeParents(boolean include) {
       withParents = include;
    }

   /**
    *
    * @param include
    */
   public void setIncludeChildren(boolean include) {
       withChildren = include;
   }

Basically, the idea was to connect/unconnect nodes from the original model to the filtered model root keeping track of the current family nodes.
The filtered model will have a mapping between children and parents, with the appropiate method to restore this family. The method ´restoreFamily´ will re-connect those missing childrens.
The filtered model will do most of the job in its filter() method leaving the abstract method shouldBeFiltered(node) to the implementations:
It should be taken into account, that there is no need to unconnect ALL children from family prior to connect the filtered ones to the filtered root. If performance is key, that behaviour could be analyzed more deeply.
Extending JXTreeTable
Lastly, but most important, there is the need to extend the underlying treetable by implementing one method and overriding another:
@Override
public void setTreeTableModel(TreeTableModel treeModel) {
    if (!(treeModel instanceof TellapicModelFilter))
        model = treeModel;

    super.setTreeTableModel(treeModel);
}

public void setModelFilter(TellapicModelFilter mf) {
    if (modelFilter != null) {
        modelFilter.restoreFamily();
        setTreeTableModel(getUnfilteredModel());
    }
    // Is this necessary?
    if (mf == null) {
        setTreeTableModel(getUnfilteredModel());
    } else {
        modelFilter = mf;
        modelFilter.filter();
        setTreeTableModel(modelFilter);
    }
}

A complete and working example with a treetable could be found at this link. It includes a Main.java with a ready-to-build tree. The testing GUI has a button that adds nodes in the selected node (if any) and in the top of the frame a text field that filters while writting.

A: ETable, a subclass of JTable and the parent class of Outline, described here, includes "Quick-Filter features allowing to show only certain rows from the model (see setQuickFilter())." While this violates the no "third party libs" requirement, the Outline JAR has no dependencies other than the JDK.

A: Here's a possible solution that uses only standard Swing components:

*

*Filtered Tree Just Like In Eclipse
I haven't used this yet, but I like its implementation much more than other quick 'n dirty solutions I found online.

A: I've finally managed to pull of something the suits my needs perfectly, and thought I'd share in case someone else can use it.
I have been trying to display two JTrees side by side - one that contains a filtered list of the other.
Basically I have made two TreeModels, and use the same root node for both.  This seems to work fine so far, so long as I make sure to override EVERY method that gets called from DefaultTreeModel in my code, such as nodeChanged( TreeNode node ) or else there will be pain.
The pain comes from the fact that the only time the nodes themselves are queried for information like childcount, is when nodestructure type methods are called on the DefaultTreeModel.  Aside from that, all calls for tree structure information can be intercepted and filtered out as shown below.
This can get nasty as you have to make sure you dig out every time the nodes themselves are queried if you use DefaultTreeModel as the base like I did.  This problem might not be there if you implement TreeModel directly instead of being lazy like me.  NodesChanged source came straight from the JDK source.
I was lucky in that what I wanted meant there was always a path back to the root node from every item in the filtered list.
This was all I needed to do, even tho I spent the whole day trying wild and chaotic inventions, like recreating a shallow copy of the tree etc, not to mention reading lots on Stack !:
public class FilteredSceneModel extends DefaultTreeModel {

public static boolean isSceneItem(Object child) {
    return !(child instanceof DataItem);
}

public FilteredSceneModel(RootSceneNode root, SelectionModel sm) {
    super(root, sm);
}

private boolean isSceneFolder(Object node) {
    return node instanceof RootSceneNode || node instanceof Floor;
}

@Override
public AbstractSceneItem getChild(Object parent, int index) {
    AbstractSceneItem asi = (AbstractSceneItem) parent;
    if (isSceneItem(parent)) {
        int dex = 0;
        for (AbstractSceneItem child : asi.children) {
            if (isSceneItem(child)) {
                if (dex == index) {
                    return child;
                }
                dex++;
            }
        }
    }
    System.out.println("illegal state for: " + parent + " at index: " + index);
    return asi.getChildAt(index);
}

@Override
public int getChildCount(Object parent) {
    if (isSceneItem(parent)) {
        AbstractSceneItem asi = (AbstractSceneItem) parent;
        int count = 0;
        for (AbstractSceneItem child : asi.children) {
            if (isSceneItem(child)) {
                count++;
            }
        }
        return count;
    }
    return -1;
}

@Override
public int getIndexOfChild(Object parent, Object childItem) {
    if (isSceneItem(parent)) {
        AbstractSceneItem asi = (AbstractSceneItem) parent;
        int count = 0;
        for (AbstractSceneItem child : asi.children) {
            if (isSceneItem(child)) {
                if (child == childItem) {
                    return count;
                }
                count++;
            }
        }
    }
    return -1;
}

@Override
public boolean isLeaf(Object node) {
    if (isSceneItem(node)) {
        if (isSceneFolder(node)) {
            return false;
        }
    }
    return true;
}

@Override
public void activeFloorChanged(Floor floor) {
    for (AbstractSceneItem asi : floor) {
        if (isSceneItem(asi)) {
            nodeChanged(asi);
        }
    }
}

@Override
protected void renamed(AbstractSceneItem asi) {
    if (isSceneItem(asi)) {
        nodeChanged(asi);
        System.out.println("scene only model renamed: " + asi.fullPathToString());
    }
}

@Override
public void nodeChanged(TreeNode tn) {
    if (isSceneItem(tn)) {
        filteredNodeChanged(tn);
    }
}

@Override
public void nodeStructureChanged(TreeNode tn) {
    if (isSceneItem(tn)) {
        super.nodeStructureChanged(tn);
    }
}

private void filteredNodeChanged(TreeNode node) {
    if (listenerList != null && node != null) {
        TreeNode parent = node.getParent();

        if (parent != null) {
            int anIndex = getIndexOfChild(parent, node);
            if (anIndex != -1) {
                int[] cIndexs = new int[1];

                cIndexs[0] = anIndex;
                nodesChanged(parent, cIndexs);
            }
        } else if (node == getRoot()) {
            nodesChanged(node, null);
        }
    }
}

@Override
public void nodesChanged(TreeNode node, int[] childIndices) {
    if (node != null) {
        if (childIndices != null) {
            int cCount = childIndices.length;

            if (cCount > 0) {
                Object[] cChildren = new Object[cCount];

                for (int counter = 0; counter < cCount; counter++) {
                    cChildren[counter] = getChild(node, childIndices[counter]);
                }
                fireTreeNodesChanged(this, getPathToRoot(node),
                        childIndices, cChildren);
            }
        } else if (node == getRoot()) {
            fireTreeNodesChanged(this, getPathToRoot(node), null, null);
        }
    }
}
}

A: Principle that i used:
Filling ArrayList from DB, then populating tree. When i have to filter tree nodes, i just iterate through ArrayList, remove all nodes that don't match criteria, and then rebuild the tree with modified ArrayList...

A: I have a suggestion for this which may be of interest.  I've put it into practice in my own app and it seems to work nicely... below is an absolute minimal implementation SSCCE demonstrating "insertNodeInto".
The central design is multiple couplings of JTree-TreeModel which are all kept in perfect synch with one another... except, obviously, that some filtering pattern is applied so that certain nodes (and their subtrees) are not present in one model.  Meanwhile each node in the ON tree has a "counterpart" node in the OFF tree (although the converse is not necessarily true).
The simplest design therefore involves 2 such couplings: one with the filter "OFF" and the other with the filter "ON" (incidentally you can have more than 1 filter, so that you then need n^2 couplings, where n is the number of filters... and I have got this working!).
To switch from one coupling to another (i.e. from ON to OFF or vice versa) you just substitute one JTree for another in the containing JViewport... and this happens in the blink of an eye, completely unspottable.  So it's kind of like an optical illusion.
By the way, the filter used here is "does the toString() of the node contain the string 'nobble'"?  (see method FilterPair.is_filtered_out)
Some might say that such an idea would be ridiculously memory inefficient... but in fact the nodes in the different couplings, although different nodes, use the same user object... so I suggest the structure is fairly lightweight.
Much, much more difficult is getting the mechanics of two couplings (let alone 4 or 8) to synch up to one another.  Below I demonstrate a fairly comprehensive implementation of insertNodeInto... but many methods of DefaultTreeModel, of JTree, and also relating to selection, require a lot of thought.  E.g. if selection in the (filter) OFF tree is on a node which has no counterpart in the ON tree (because it or one of its ancestors has been filtered out), where should selection in the ON tree go?  I have found answers to all of these questions but there isn't space here to show them...
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.tree.*;

public class FilterTreeDemo {
  public static void main(String[] args) throws FileNotFoundException {
    EventQueue.invokeLater(new ShowIt());
  }
}

class FiltNode extends DefaultMutableTreeNode {
  FiltNode( Object user_obj ){
    super( user_obj );
  }
  FiltNode m_counterpart_node;

//  public String toString(){
//    // hash code demonstrates (as you toggle) that these are not the same nodes...
//    return super.toString() + " (" + hashCode() + ")";
//  }
}

class FilterPair {

  TreeCoupling m_on_coupling, m_off_coupling;
  boolean m_filter_on = true;
  JFrame m_main_frame;
  FiltNode m_on_root = new FiltNode( "root" );
  FiltNode m_off_root = new FiltNode( "root" );

  // needed to prevent infinite calling between models...
  boolean m_is_propagated_call = false;

  FilterPair( JFrame main_frame ){
    m_on_root.m_counterpart_node = m_off_root;
    m_off_root.m_counterpart_node = m_on_root;
    m_on_coupling = new TreeCoupling( true );
    m_off_coupling = new TreeCoupling( false );
    m_main_frame = main_frame;
    // starts by toggling to OFF (i.e. before display)
    toggle_filter();
  }

  // this is the filter method for this particular FilterPair...
  boolean is_filtered_out( MutableTreeNode node ){
    return node.toString().contains( "nobble");
  }

  class TreeCoupling {

    class FilterTreeModel extends DefaultTreeModel {
      FilterTreeModel( TreeNode root ){
        super( root );
      }

      public void insertNodeInto(MutableTreeNode new_child, MutableTreeNode parent, int index){
        // aliases for convenience
        FiltNode new_filt_node = (FiltNode)new_child;
        FiltNode parent_filt_node = (FiltNode)parent;

        FiltNode new_counterpart_filt_node = null;
        FiltNode counterpart_parent_filt_node = null;
        // here and below the propagation depth test is used to skip code which is leading to another call to
        // insertNodeInto on the counterpart TreeModel...
        if( ! m_is_propagated_call ){
          // NB the counterpart new FiltNode is given exactly the same user object as its counterpart: no duplication
          // of the user object...
          new_counterpart_filt_node = new FiltNode( new_filt_node.getUserObject() );
          counterpart_parent_filt_node = parent_filt_node.m_counterpart_node;
          // set up the 2 counterpart relationships between the node in the ON tree and the node in the OFF tree
          new_counterpart_filt_node.m_counterpart_node = new_filt_node;
          new_filt_node.m_counterpart_node = new_counterpart_filt_node;
        }

        if( TreeCoupling.this == m_on_coupling ){
          // ... we are in the ON coupling

          // if first call and the parent has no counterpart (i.e. in the OFF coupling) sthg has gone wrong
          if( ! m_is_propagated_call && counterpart_parent_filt_node == null ){
            throw new NullPointerException();
          }
          if( ! is_filtered_out( new_filt_node ) ){
            // only insert here (ON coupling) if the node is NOT filtered out...
            super.insertNodeInto( new_filt_node, parent_filt_node, index);
          }
          else {
            // enable the originally submitted new node (now rejected) to be unlinked and garbage-collected...
            // (NB if you suspect the first line here is superfluous, try commenting out and see what happens)
            new_filt_node.m_counterpart_node.m_counterpart_node = null;
            new_filt_node.m_counterpart_node = null;
          }
          if( ! m_is_propagated_call  ){
            // as we are in the ON coupling we can't assume that the index value should be passed on unchanged to the
            // OFF coupling: some siblings (of lower index) may be missing here... but we **do** know that the previous
            // sibling (if there is one) of the new node has a counterpart in the OFF tree... so get the index of its
            // OFF counterpart and add 1...
            int off_index = 0;
            if( index > 0 ){
              FiltNode prev_sib = (FiltNode)parent_filt_node.getChildAt( index - 1 );
              off_index = counterpart_parent_filt_node.getIndex( prev_sib.m_counterpart_node ) + 1;
            }
            m_is_propagated_call = true;
            m_off_coupling.m_tree_model.insertNodeInto( new_counterpart_filt_node, counterpart_parent_filt_node, off_index);
          }

        }
        else {
          // ... we are in the OFF coupling

          super.insertNodeInto( new_filt_node, parent_filt_node, index);
          if( ! m_is_propagated_call  ){

            // we are in the OFF coupling: it is perfectly legitimate for the parent to have no counterpart (i.e. in the
            // ON coupling: indicates that it, or an ancestor of it, has been filtered out)
            if( counterpart_parent_filt_node != null ){
              // OTOH, if the parent **is** available, we can't assume that the index value should be passed on unchanged:
              // some siblings of the new incoming node (of lower index) may have been filtered out... to find the
              // correct index value we track down the index value until we reach a node which has a counterpart in the
              // ON coupling... or if not found the index must be 0
              int on_index = 0;
              if( index > 0 ){
                for( int i = index - 1; i >= 0; i-- ){
                  FiltNode counterpart_sib = ((FiltNode)parent_filt_node.getChildAt( i )).m_counterpart_node;
                  if( counterpart_sib != null ){
                    on_index = counterpart_parent_filt_node.getIndex( counterpart_sib ) + 1;
                    break;
                  }
                }
              }
              m_is_propagated_call = true;
              m_on_coupling.m_tree_model.insertNodeInto( new_counterpart_filt_node, counterpart_parent_filt_node, on_index);
            }
            else {
              // ... no ON-coupling parent node "counterpart": the new ON node must be discarded
              new_filt_node.m_counterpart_node = null;
            }

          }
        }
        m_is_propagated_call = false;
      }
    }

    JTree m_tree;
    FilterTreeModel m_tree_model;
    TreeCoupling( boolean on ){
      m_tree = new JTree();
      m_tree_model = on ? new FilterTreeModel( m_on_root ) : new FilterTreeModel( m_off_root );
      m_tree.setModel( m_tree_model );
    }
  }

   void toggle_filter(){
    m_filter_on = ! m_filter_on;
    m_main_frame.setTitle( m_filter_on? "FilterTree - ON (Ctrl-F6 to toggle)" : "FilterTree - OFF (Ctrl-F6 to toggle)" );
  }

  TreeCoupling getCurrCoupling(){
    return m_filter_on? m_on_coupling : m_off_coupling;
  }
}

class ShowIt implements Runnable {
  @Override
  public void run() {
    JFrame frame = new JFrame("FilterTree");
    final FilterPair pair = new FilterPair( frame );
    final JScrollPane jsp = new JScrollPane( pair.getCurrCoupling().m_tree );
    Action toggle_between_views = new AbstractAction( "toggle filter" ){
      @Override
      public void actionPerformed(ActionEvent e) {
        pair.toggle_filter();
        jsp.getViewport().setView( pair.getCurrCoupling().m_tree );
        jsp.requestFocus();
      }};
    JPanel cpane = (JPanel)frame.getContentPane();
    cpane.getActionMap().put("toggle between views", toggle_between_views );
    InputMap new_im = new InputMap();
    new_im.put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, InputEvent.CTRL_DOWN_MASK), "toggle between views");
    cpane.setInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, new_im);

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(jsp);
    frame.pack();
    frame.setBounds(50, 50, 800, 500);
    frame.setVisible(true);

    // populate the tree(s) NB we are currently viewing the OFF tree
    FilterPair.TreeCoupling curr_coupling = pair.getCurrCoupling();
    curr_coupling.m_tree_model.insertNodeInto( new FiltNode( "scrags 1" ), (FiltNode)curr_coupling.m_tree_model.getRoot(), 0 );
    FiltNode d2 = new FiltNode( "scrags 2" );
    curr_coupling.m_tree_model.insertNodeInto( d2, (FiltNode)curr_coupling.m_tree_model.getRoot(), 1 );
    curr_coupling.m_tree_model.insertNodeInto( new FiltNode( "scrags 3" ), (FiltNode)curr_coupling.m_tree_model.getRoot(), 2 );
    curr_coupling.m_tree_model.insertNodeInto( new FiltNode( "scrags 2.1" ), d2, 0 );

    // this will be filtered out of the ON tree
    FiltNode nobble = new FiltNode( "nobble" );
    curr_coupling.m_tree_model.insertNodeInto( nobble, d2, 1 );
    // this will also be filtered out of the ON tree
    FiltNode son_of_nobble = new FiltNode( "son of nobble");
    curr_coupling.m_tree_model.insertNodeInto( son_of_nobble, nobble, 0 );

    curr_coupling.m_tree_model.insertNodeInto( new FiltNode( "peewit (granddaughter of n****e)"), son_of_nobble, 0 );

    // expand the OFF tree
    curr_coupling.m_tree.expandPath( new TreePath( curr_coupling.m_tree_model.getRoot() ) );
    curr_coupling.m_tree.expandPath( new TreePath( d2.getPath() ) );
    curr_coupling.m_tree.expandPath( new TreePath( nobble.getPath() ) );
    curr_coupling.m_tree.expandPath( new TreePath( son_of_nobble.getPath() ) );

    // switch view (programmatically) to the ON tree
    toggle_between_views.actionPerformed( null );

    // expand the ON tree
    curr_coupling = pair.getCurrCoupling();
    curr_coupling.m_tree.expandPath( new TreePath( curr_coupling.m_tree_model.getRoot() ) );
    curr_coupling.m_tree.expandPath( new TreePath( d2.m_counterpart_node.getPath() ) );

    // try to expand the counterpart of "nobble"... there shouldn't be one...
    FiltNode nobble_counterpart = nobble.m_counterpart_node;
    if( nobble_counterpart != null ){
      curr_coupling.m_tree.expandPath( new TreePath( nobble_counterpart.getPath() ) );
      System.err.println( "oops..." );
    }
    else {
      System.out.println( "As expected, node \"nobble\" has no counterpart in the ON coupling" );
    }

    // try inserting a node into the ON tree which will immediately be "rejected" by the ON tree (due to being
    // filtered out before the superclass insertNodeInto is called), but will nonetheless appear in the
    // OFF tree as it should...
    curr_coupling.m_tree_model.insertNodeInto( new FiltNode( "yet another nobble"), d2.m_counterpart_node, 0 );

  }
}

One more thought: how to generalise it so that FilterTreeModel extends your own supplied subclass of DefaultTreeModel?  (and in the full implmentation so that FilterJTree extends your supplied JTree subclass?).  I wrote this code originally in Jython, where passing a class A as a parameter of a definition of class B is trivial!  Using stately old Java, it could possibly be done with reflection and static factory methods, or possibly by some ingenious encapsulation technique.  It'd be a hard slog though.  Better to switch to Jython if at all possible!

A: A solution was given http://forums.sun.com/thread.jspa?forumID=57&threadID=5378510
We have implemented it here, adn it works as a charm.
You just have to implement you TreeModel, and on the JTree use a FilterTreeModel with a TreeFilter.
The implementation is quite simple, there is perhaps maybe some stuff to do on listener, since the actual code will called twice, which is not good at all. My idea is to just pass listener to delegate model, I don't see the point to add listener on the filter model... But that is another question.


text:
Q: metaprogram c++ code New semester in my university started and I am once again "forced" to quit abstractions and explore the deep waters of low level programming in c++. My mind is already partially contamined with folds, high order functions, etc., and I don't find any fun in writing for example: bool allEven = true;
for(int i = 0; i < arr.length; i++){
   if (arr[i] % 2 != 0){
      allEven = false;
      break;
   }
}

when I know that I can write val allEven = arr forall (_ % 2 == 0).
My question is: is there any tool|technique|language construct|metaprogramming stuff, that can bring some c++ code without writing it actually? I need to the whole source but it can be eventually obfuscated, only machine is going to process it.
And please don't me accuse of being lazy, I value it as one of my best virtues. :-)

EDIT It's not entirely clear what are you asking for... At best, I would like to use something like GWT but instead compiling Java sources to JavaScript sources It would compile Scala or Haskell or F# to C++ sources, but since I don't believe that something like this exists, I would like to have something... helpful. I appreciate the suggested anon functions, for example.

A: It's not entirely clear what you're really asking for, but if you're trying to write C++ that's more like your other code, you could do something like this:
bool allEven =
    std::accumulate(arr.begin(), arr.end(), [](bool a, int i) {return a && i & 1==0; }, 1);

This does use a lambda, which is new in C++0x. If you're using an older compiler that doesn't support lambdas, you could look into using Boost Lambda instead (in which case your code would be even closer to the example you've given).

A: bool is_even = std::find_if(arr.begin(), arr.end(), [](int i) { return i%2 != 0; }) == arr.end();

A: With new algorithms in C++0x, there is all_of:
bool all_even = std::all_of(arr.begin(), arr.end(),
                            [](int i) { return i%2 == 0; });

Boost.Range allows less verbosity:
bool all_even =
    0==boost::count_if(arr, [](int i){ return i%2 != 0;});

Hopefully, Boost.Range will soon offer all_of.

A: Take a look at Boost.Phoenix library, it enables you to write close(er) to functional style of programming in C++.


text:
???G?S??S Glafkos Georghiades
Nikolas Petri Yiangou, an EOKA fighter from Zodia, Cyprus, was captured by the British and murdered while suffering severe punishment for his part in the move to free the country of Cyprus from the British. His body was not given to his relatives by his murderers. The British claimed he escaped while being 'examined'... The drama is about his life, his capture, suffering of his family and his death.
A Better Star: A 21st Century Play Eduardo Torres
Ernesto Suarez is a medical student who lives with his Abuela, weighed down by work stress, student debt, and a finals week which looms over him. In a world where he's financially outgunned, he manages to keep cool. His plans grind to a halt when he is profiled, assaulted, and framed by a police officer. Utterly powerless, Ernesto struggles to find the truth that will set him free. A love letter to Hispanic culture, A Better Star weaves together a colorful spectrum of characters in a racially charged, semi-surreal modern commentary on the plight of the American justice system.
A History of Student Theatre at the University of Pennsylvania Jeremy Berman
Author Jeremy Berman spent over a year researching the history of student theatre at the University of Pennsylvania. This comprehensive volume contains information gleaned from yearbooks, programs, journals, group minutes, letters, tickets, websites, and interviews.
A Mourning Hollow Taylor Gruenloh
Welcome to Plains Hollow, Missouri. This Halloween everyone is getting a second chance. The residents of Plains Hollow, Missouri love to celerate Halloween, but this year some folks are having a hard time with life. A clown loses a childhood friend, the local cat lady doesn't like the new vet, the high school janitor gets her house coverved in toilet paper again, and the pet psychic got demoted to being a zombie at the town's Haunted Hollow Festival. And that's just to name a few! A great play to be produced everywhere!
A Mourning Hollow (acting edition) Polychoron Press
11 f, 7 m (4 - 18 actors possible) Welcome to Plains Hollow, Missouri. This Halloween everyone is getting a second chance. The residents of Plains Hollow, Missouri love to celebrate Halloween, but this year some folks are having a hard time with life. A clown loses a childhood friend, the local cat lady doesn't like the new vet, the high school janitor gets her house covered in toilet paper again, and the pet psychic got demoted to being a zombie at the town's Haunted Hollow Festival. And that's just to name a few! A Mourning Hollow is a collection of nine vignettes exploring the process of grief in a small town. A great play to be produced everywhere!
A New York Lamentation Chuck Kramer
A New York Lamentation: A Play About Slavery. Six historical figures from New York's slavery era meet to tell their stories. From supporters of slavery to abolitionists to formerly enslaved men and women, each has to reckon with the evil they witnessed and, in some cases, participated in.
Abba Tekel Getachew Tarekegn
The long and arduous journey of Emperor Haile Selassie of Ethiopia.
Abbaba Mengistu Getachew Tarekegn
Once upon a time in Ethiopia. 1974-1991
Abba-Dagnew Getachew Tarekegn
A play about Menelik II of Ethiopia, who was king of Shewa and emperor of Ethiopia (1889) expanded the empire, repelled an Italian invasion, and modernized Ethiopia.
ACT ONE : ONE ACT VOL 2 VARIOUS ARTISTS
In our continuing series of anthologies, we are proud to present 7 plays from The Secret Theatre's Act One: One Act Festival. This selection reflects the amazing variety of new work present by emerging and unsung playwrights. We hope you will enjoy these plays and perhaps may consider producing or directing one of them yourself. Featured playwrights include Will Hart, Pete Holmberg, Mark Lord, Stephen Bracco, Amanda Terman, Rollin Jewett, and Kyle Smith.
Theatre[Remove]
Over $25(0)


Why Companies should go Mobile First?
Advancement in mobile technology has changed the way consumers use their smartphones today. This latest mobility trend is revolutionizing the way enterprises look at empowering their workforce. The primary reasons for this good change are proliferation of smart devices – tablets, smartphones, notebooks and Phablets, and evolution in Internet connectivity. The ever-increasing expectations of employees are pressurizing organizations to go mobile.
We know that 'The Mobile Advantage' is its ability to allow users to communicate and access information from anytime, anywhere. Thus, always stay connected with your people.
So, let's look at some of the key parameters in more detail, for you to implement mobile first strategy.
1. Design a Responsive Website: People are increasingly using their mobile devices to perform their daily activities – checking their office emails while they are on the way to work, responding to customers & co-workers when they are at the field, making critical decisions quickly from home.
With variety of mobile devices available today, it is expected that employees will have different types of hand-held devices with different mobile OS versions. To develop a mobile app to support each device type becomes challenging, as and when the number of employees in the organization grows. If you build a website first, the site will not look good on other mobile devices due to different screen sizes and form factors.
Therefore, to save cost, to provide better UI and with lesser effort, the right method would be to build a responsive design website which will be optimized across all mobile devices.
For example: A corporate website designed in responsive style will be available in device-optimized format for customers and staff.
2. Mobilize your Enterprise Systems: Today's apps aren't just for consumers; they can improve your staff's productivity too. Instead of making your staff dependent on their laptop/ PCs, you can give them a tablet/smartphone with most important apps installed. This enterprise app shall allow your staff to access information from your CRMs, ERPs, Financial Systems etc. in a secure manner.
For example: By providing an iPad with financial dashboard application installed for your CXOs, will allow them track financial status of the organization and help them make fast decisions during critical times.
3. Enable Device-Specific Features: Many times it's important to provide rich user experience for mobile users. Smart phones as its name suggests are packaged with smart features. Smartphone have several functionality in them, which are specific to the device. Some of them include camera, accelerometer, voice enabler, GPS etc.
Therefore, if you plan to implement a native application for your users, ensure you make the best use of device-specific features (based on iPhone, iPad, Android Phone, Android Tablet, Windows Phone, BlackBerry).
For Example: Retailers can implement native app for their online shoppers. This gives personalized shopping experience to consumers and better customer retention.
4. Implement Apps across Devices: As new versions of Mobile OS and hand-held devices are coming into the market each day, there is positive impact on the mobile ecosystem. This mobility growth is mainly influencing mobile application service providers, since the demand for variety of mobile applications (consumer and enterprise) is on the rise.
Therefore, if you support mobile first strategy, you will be able to support multiple mobile applications and large number of users (employees and consumers).
For example: Your Field Service Engineer has access to PC, iPhone and Android tablet. If you install Field service app across all his devices, it will help him to connect with his manager, customers and co-workers from office, at customer site and from home. This in turn will make your engineer more productive and efficient.
5. Plan to support BYOD: This term is becoming more and more popular these days at work. Many organizations are recognizing the need to incorporate BYOD (Bring-Your-Own-Device) policy for their enterprise. This is because BYOD and Enterprise Mobility together brings in higher agility in business operations, more convenience to employees, better workforce connectivity and faster means of communication. The smartphone and tablet trend will only continue to grow.
Therefore, to improve employee satisfaction and provision scalability, the right method would to be proactive and implement a mobile first strategy with BYOD policy included.
Are you mobile-enabled? How useful is mobility important for your organization? It will be good to know your thoughts.