What does a recruiter look for when they're sourcing candidates for a job?
They look for a lot of things—skills, education, previous job titles, etc. But it all boils down to the fit between job and candidate. An IT recruiter wants someone who can write code, whereas an academic recruiter wants a good teacher or researcher.
The requirements for IT and teaching jobs, much like the requirements for other jobs, vary. The recruiter might be looking for a candidate with knowledge of specific software or experience in a certain industry. And what they're looking for varies from job to job. That variation is why generic resumes rarely work, and why your resume should be tailored to every job you apply to with the right keywords.
You probably think this process will take ages. It might at first, but you'll get the hang of it.
Besides, isn't it better to submit ten tailored resumes to get three job interviews than to submit 50 generic resumes only to end up with no responses?
After reading this guide, you'll learn how to tailor a resume to a job by using the exact keywords recruiters look for, and putting them in key places on your resume. I'll also explain how using a resume template can shorten the process.
Read the job ad you want to apply for and highlight the important points related to the job.
Impressive terms. Ivy League school and impressive terms like Fortune 500, Inc 500, or Top Salesman.
Company names. Some companies use the names of their competitors or other big companies when hiring for top positions.
Location. Recruiters look for candidates living or working within a specific location for jobs where hiring local is a must.
Here's what that process looks like for three actual jobs.
Critical information such as job-related skills and software are underlined in Black.
"Work closely with quota carrying sales executives" is too long and awkward to directly mention on your resume, but you can use related keywords like teamwork or collaboration.
Writing is usually considered a soft skill, but it's underlined in black here because writing is a copywriter's main job.
The bullet point "define and maintain a consistent, engaging voice" and "alignment with brand guidelines" refers to "developing or creating a brand's voice," which could be referenced in a copywriter's resume as such. The phrase "switch vocabulary, tone and style" is just another way of saying that you can follow the "editorial style guide," which was already mentioned in the candidate's responsibility. Analyzing the job posting like this allows you to decide which are worth including in your resume, and which keywords are just variations of one another.
The job-specific skills listed in this example are straightforward and easy to incorporate on a resume. The recurring mention of curiosity and desire for learning, however, can't be described as easily.
Situations like this call for a little storytelling. For example, you can write about a time when you had to look up how to code a certain function because all the other strategies you tried didn't work. Any previous work experience that can prove you're willing to set aside your ego to learn will work.
Now that we know what the company is looking for, next we need to figure out if those requirements are already listed on your resume. And if they are, can the recruiter easily spot them? Does your resume provide enough evidence that you're knowledgeable and experienced enough with those skills?
If you don't have their requirements on your resume, the obvious thing to do is add them. The problem with this approach is there's a risk you'll forget some of your skills, achievements, and tasks the next time you tailor your resume to a job.
To prevent this, create a "master resume" where all of your skills, tasks, work history, and achievements are listed, so you can just add to this document whenever you receive an award, finish a big project, or acquire a new skill.
This document takes time to compile, but there's no need to complete it right away. It's just that creating an inventory of your skills and achievements is a good way to start a master resume, so you might as well do it and hit two birds with one stone in the process.
Don't worry if this document gets too long, you won't be using it for job applications anyway. This is the document you'll customize for every job you send.
Go through the skills section of your resume, and then copy all the skills listed there on your paper and put it under the appropriate column for skills. Add any other skills you've got that aren't already listed on your resume to this list.
Using the same process you applied for the job postings, highlight your job-related skills, transferable skills, and soft skills found elsewhere on your resume.
Compare the information you highlighted with your list, and then add the skills that are on your resume, but not in the inventory.
Write all the achievements tied to a specific skill in the achievements column.
With this inventory, you don't have to rack your brains next time you've got to customize your resume for a specific job posting. All you've got to do is check if you've got the keywords highlighted on their job ad on your list, and then add them to the right places on your resume.
Now comes the tedious part, tailoring your resume. You'll use a combination of keywords, power words, and data.
You can't just add the keywords wherever you want; you've got to put them in the right places to satisfy both the recruiters and the digital gatekeepers or Applicant Tracking Systems (ATS).
Doing this helps with the recruiters or anyone reading your resume. These people go through hundreds of applications daily, so to save time they only look at key areas of your resume, and if they don't find what they're looking for in that first scan—you're out.
The first thing they look at is your resume summary, so make it a point to include all the job-related skills there.
The job posting also mentioned Slack, Google for Business and Dropbox, but I've opted not to include them in the must-have list as they're not writing or marketing tools. I also didn't include "writing skills" and "editorial judgment" as both are too generic and situational, so they're better placed somewhere else in my resume. You've got to use your best judgment in situations like this, as there are details only someone with experience in your job can determine.
As you can see, only the keywords "website copy" and "email campaign" directly match the job posting. Even if "USP" or "unique selling proposition" is just another variation of the phrase "value props," the keyword indicated on the job posting, a recruiter with no copywriting background might not connect the dots between the two phrases.
These keywords are listed on certain entries in my work history because I don't find them impressive enough to list on my qualifications summary since I've got other achievements I want to highlight there. But those accomplishments, such as the link bait article with 500+ shares, aren't relevant for the job so I need to remove it to make room for the important keywords. You'll have to make similar changes when you're customizing your own resume.
Here's what my resume's qualifications summary looks like after incorporating the missing keywords. I even included the soft skills "collaborate" and "flexible" on bullet points where it made sense.
Now you're probably thinking, where did those new bullet points come from?
Some of them I had to write because even though they're part of my job, they're not results-oriented and I tend to focus on results-oriented tasks in my resume. For instance, writing an email campaign can be a quantifiable achievement, whereas following an editorial style guide cannot. But as this job ad shows, even non-results-oriented tasks are important for some employers.
The other bullet points are easier because I just moved them up from my work history. You can do the same when you're customizing your resume. You can even customize your resume template so that it matches the brand colors of the company you're applying for!
Rearrange the bullet points you've got so the ones with the keywords that match the job posting are on the top. This is the easiest way to tailor your resume to a job ad, but it only works if those keywords are already in your resume in the first place.
Think of another way to reframe the tasks or accomplishments so the skills or keywords in the job posting are highlighted (see below).
We continue with the same example using my resume. Notice that my original work history only had a few of the keywords mentioned in the job ad, while several of the bullet points, highlighted in purple, appear irrelevant.
As with any candidate, you'll have sub-tasks or specialties that aren't related to the job you're applying for. In this example, it's my tasks as an outreach specialist writing link bait or roundup articles.
For designers, you may have experience designing 3D layouts, but that may not be relevant when applying for an illustrator job. In the same way, IT specialists applying for an app-development role should highlight front-end development experience, instead of database expertise.
The first thing you'll notice is there are more black and red underlined phrases, which means the revised version now has more keywords from the copywriter job posting.
You'll also see phrases underlined in green, which are variations of the job-specific keywords. For instance, website landing page is a variation of website copy in the sense that the recruiter might also use this keyword when filtering resumes using an Applicant Tracking System (ATS). Some of the bullet points in the old version were redundant, such as the "2-stage email campaign" bullet, so I deleted them.
The two sentences basically refer to the same task of writing copy that emphasizes benefits, except in the second bullet, "tangible benefits" is replaced with "benefit-driven." I've also inserted "value proposition" and "market positioning" since these tasks go hand in hand.
It's hard to insert the keyword or soft skill "comfortable working in a fast-paced startup environment." So instead of using the whole phrase, I used the keyword "startup" in a bullet point since it practically means fast-paced anyway, especially for those familiar with startup environments.
You might think using the keyword as a situational limitation as I did in the bullet point will affect your credibility. Using the phrase "startup clients" might suggest that I only work with startups when in reality I also work with established brands—and the recruiter will see that later on as they read through my work history.
Since this job prioritizes startup experience, the best way to tailor the resume to the job is to highlight my startup work so I can fit in as their ideal candidate.
You might have a similar experience, where you don't want to let go of the credibility that big brands add to your resume. Don't worry, you don't have to. As long as the skill or achievement connected to your work with big brands is related to the job you're applying for, it's okay.
The bullet point "Revise website, email, and social media copy based on client or editor feedback, and A/B split test results" is new.
You can't write a targeted resume without writing at least a couple new bullet points. It's inevitable because there are so many skills related to a job that it's impossible for you to predict and include them all in your resume.
A targeted resume won't work if you can't show proof of your skills, so use numbers whenever possible to provide a measurable evidence of your value as an applicant. In my case, I use open rates, click-through rates, social shares, and inbound links, as these are some of the well-known metrics that companies use when gauging a writer's skill.
For other jobs, these metrics might include time saved, money earned, sales quotas, or customer satisfaction ratings.
The tools "Google for Business," "Slack" and "Dropbox" and the soft skills "switch vocabulary, tone and style" and "editorial judgement" are still not in my resume since I've deemed them not important enough to appear in the summary and the first two entries of my work history. You'll see keywords like this when you tailor your resume to job postings, too. For example, in the Software Engineer job, it seems "can do attitude" is the least important of all the keywords.
Keywords like this shouldn't be neglected, because you can still put them in the skills section of your resume. Variations of the important keywords, on the other hand, should be added elsewhere in your work history and education section to satisfy ATS requirements. The goal here is to create an 80% match when your resume is compared directly to the job posting, and you can't do that if you only edit your summary and the first two job entries.
Is it clear that you're qualified for the job?
If your resume and a printout of the job posting are compared side by side, can the person reading it immediately see the qualifications listed in the job posting? If they can't, then you need to tailor your resume to the job a bit more, which means adding more keywords or going beyond the qualifications summary and first two job entries suggested above. In some cases, you might be using a cluttered resume template that makes your application difficult to read. The goal here is to create an 80% match when your resume is compared directly to the job posting.
You'll find dozens of top-notch resume designs that can easily be tailored to a job position on Envato Elements.
You've just learned how to tailor a resume to a job. We've examined three different job postings, and I've shown you how to match your resume to each of those jobs. We've also discussed how a targeted resume can help set your resume apart. Finally, I've explained how starting with a resume template and tailoring that resume template to a job posting can save you time.


Brand build out for the Full Service Workers Alliance (FSWA) for their Seattle Legislation campaign against the Secure Scheduling Ordinance.
Creating a foundational hub for full service restaurant workers to find both support and camaraderie. Demonstrating positive, yet assertive interactions with local legislators and business owners, who respect the integrity of this alliance.
The FSWA will steer and help mold legislation that can positively impact working conditions and further protect the rights + freedoms of those within the full service restaurant industry. The goal is to mediate issues between workers and the companies who hire them.
Staying true to the playful-yet-strong aesthetic, this ideation embodies the strength and protection offered by FSWA, while utilizing utensils to show ties the food industry.
This logo translates well in black & white, while bringing in a young, playful and modern color palette sets it apart and adds inspiration for your audience - something the competitors are lacking.
With possibility to for the FSWA to expand, this logo could transition to any locale, by changing the name of the city. When used in conjunction with the sub-mark, the FSWA can grow exponentially and independently, with the brand intact.


text:
Q: jQuery Get element by name and do action on Key "Enter" I hope you can help me with this.
I have an element, a button input that has not an ID but only a name.
I am working on a CMS and I do not want to modify the default code.
I am wondering if there is in jQuery a function that will give me the possibility to get an Element by name instead than by ID.
I want to add an onClick function to this element, so I need a way to get its name instead of the ID.
The other question is if there is a way in jQuery that I can use to run a function when Enter on the keyboard is pressed on a input text element. Something like onClick, but when the Enter key is pressed.
Let me know. Thank you!

A: Yes...
1) You can get the element by name using the attribute equals selector:
$('button[name="foo"]')

where foo is your element's name.
2) The click handler will automatically be run if you press enter if the element is an anchor (link) element.  Otherwise, use keypress and compare event.which (the numeric identifier for the key that was pressed) to 13 (which indicates the enter key):
$('button[name="foo"]').keypress(function(event) {
    if (event.which === 13) {
        // the enter key was pressed
    }
});

A: This is an attribute equality selector.
$('input[name="foo"]').click(function(){});

On the second part, you'll need to add an event handler for keydown.
$('input[name="textfield"]').keydown(function(evt){
  if ((evt.keyCode) && (evt.keyCode == 13))
  {
     // perform enter actions.
  }
});

A: $('input[name="myName"]').click(function() {
    //do whatever
});

A: Get Element by name attribute:
$("[name='elementName']").click(function(){
  //perform action
});

Run code when enter is pressed in an input field:
$('input[type="text"]').bind("keypress", function (e) {
            if (e.keyCode == 13){
                //run enter code
            }
        });

redpajama_set_name: RedPajamaStackExchange


text:
package com.actelion.research.chem;

import java.awt.*;
import java.awt.geom.*;

import com.actelion.research.chem.reaction.Reaction;
import com.actelion.research.chem.reaction.ReactionArrow;

public class ExtendedDepictor {
    private StereoMolecule[]		mMolecule;
    private AbstractDepictor[]		mDepictor;
    private DrawingObjectList		mDrawingObjectList;
    private int						mDisplayMode,mReactantOrCoreCount;
    private boolean					mUseGraphics2D,mDoLayoutMolecules,mIsMarkushStructure;
    private DepictorTransformation	mTransformation;
    private Color                   mFragmentNoColor;

    public ExtendedDepictor(StereoMolecule mol, DrawingObjectList drawingObjectList, boolean useGraphics2D) {
        if (mol != null) {
            mMolecule = new StereoMolecule[1];
            mMolecule[0] = mol;
            }
        mIsMarkushStructure = false;
        mDrawingObjectList = drawingObjectList;
        mUseGraphics2D = useGraphics2D;
        mReactantOrCoreCount = -1;
        initialize();
        }

    public ExtendedDepictor(StereoMolecule[] mol, DrawingObjectList drawingObjectList, boolean useGraphics2D) {
        mMolecule = mol;
        mIsMarkushStructure = false;
        mDrawingObjectList = drawingObjectList;
        mUseGraphics2D = useGraphics2D;
        mReactantOrCoreCount = -1;
        initialize();
        }

    /**
     * Use this constructor for markush structures. The first fragments in the list
     * are the Markush core structures (typically only one), decorated with R1,R2,R3,...
     * The remaining fragments need to contain one atom with atomicNo=0 each, that
     * indicates the attachment point. They also may contain Rn atoms.
     * Any of the fragments may contain query features.
     * @param mol
     * @param markushCoreCount
     * @param drawingObjectList
     * @param useGraphics2D
     */
    public ExtendedDepictor(StereoMolecule[] mol, int markushCoreCount, DrawingObjectList drawingObjectList, boolean useGraphics2D) {
        mMolecule = mol;
        mIsMarkushStructure = true;
        mDrawingObjectList = drawingObjectList;
        mUseGraphics2D = useGraphics2D;
        mReactantOrCoreCount = markushCoreCount;
        initialize();
        }

    public ExtendedDepictor(Reaction reaction, DrawingObjectList drawingObjectList, boolean layoutReaction, boolean useGraphics2D) {
        if (reaction != null) {
            mMolecule = new StereoMolecule[reaction.getMolecules()];
            for (int i=0; i<reaction.getMolecules(); i++)
                mMolecule[i] = reaction.getMolecule(i);
            mReactantOrCoreCount = reaction.getReactants();
            mDoLayoutMolecules = layoutReaction;
            }
        mIsMarkushStructure = false;
        mDrawingObjectList = drawingObjectList;
        mUseGraphics2D = useGraphics2D;
        initialize();
        }

    private void initialize() {
            // for reactions and sets of molecules the availability of coordinates
            // is mandatory. However, every individual molecule may have its first
            // atom at coords 0.0/0.0, e.g. if they are encoded idcodes or if
        mTransformation = new DepictorTransformation();
        if (mMolecule != null) {
            mDepictor = new AbstractDepictor[mMolecule.length];
            for (int i=0; i<mMolecule.length; i++) {
                if (mUseGraphics2D)
                    mDepictor[i] = new Depictor2D(mMolecule[i]);
                else
                    mDepictor[i] = new Depictor(mMolecule[i]);
                }
            }
        }

    public void setDisplayMode(int displayMode) {
        mDisplayMode = displayMode;
        }

    public void setFragmentNoColor(Color c) {
        // use setFragmentNoColor(null) if you don't want fragment numbers to be shown
        mFragmentNoColor = c;
        }

    public int getMoleculeCount() {
        return mMolecule.length;
        }

    public ExtendedMolecule getMolecule(int i) {
        return mMolecule[i];
        }

    public AbstractDepictor getMoleculeDepictor(int i) {
        return mDepictor[i];
        }

	public void setOverruleColor(Color foreGround, Color background) {
		if (mDepictor != null)
			for (AbstractDepictor d:mDepictor)
				d.setOverruleColor(foreGround, background);
		}

    public void paint(Graphics g)
    {
        Color saveColor = g.getColor();
        Font saveFont = g.getFont();
        try {
            paintFragmentNumbers(g);
            paintStructures(g);
            paintDrawingObjects(g);
        } finally {
            g.setColor(saveColor);
            g.setFont(saveFont);
        }
    }

    public void paintFragmentNumbers(Graphics g) {
        if (mFragmentNoColor != null && mMolecule != null) {
        	float averageBondLength = calculateAverageBondLength();
            g.setColor(mFragmentNoColor);
            g.setFont(new Font("Helvetica",Font.BOLD, (int)(1.6*averageBondLength)));
            for (int i=0; i<mMolecule.length; i++) {
                if (mMolecule[i].getAllAtoms() != 0) {
                    Point cog = new Point();
                    for (int atom=0; atom<mMolecule[i].getAllAtoms(); atom++) {
                        cog.x += mMolecule[i].getAtomX(atom);
                        cog.y += mMolecule[i].getAtomY(atom);
                        }
                    cog.x /= mMolecule[i].getAllAtoms();
                    cog.y /= mMolecule[i].getAllAtoms();
                    cog.x = (int)mDepictor[i].getTransformation().transformX(cog.x);
                    cog.y = (int)mDepictor[i].getTransformation().transformY(cog.y);

                    String str = (mReactantOrCoreCount == -1) ? "F"+(i+1)
                                 : (i < mReactantOrCoreCount) ? ""+(char)('A'+i)
                                 : (mIsMarkushStructure) ? "R"+(i+1-mReactantOrCoreCount)
                                 :                        "P"+(i+1-mReactantOrCoreCount);
                    int width = g.getFontMetrics().stringWidth(str);
                    g.drawString(str, cog.x-width/2, cog.y+(int)(0.3*g.getFontMetrics().getHeight()));

                    /* this would require an mDepictor[i].validateView(...)
                    if (mIsMarkushStructure && i>= mReactantOrCoreCount) {
                        Rectangle2D.Float r = mDepictor[i].getBoundingRect();
                        if (r != null) {
                            g.drawRect((int)r.x-8, (int)r.y-8, (int)r.width+16, (int)r.height+16);
                            g.drawRect((int)r.x-7, (int)r.y-7, (int)r.width+14, (int)r.height+14);
                            }
                        } */
                    }
                }
            }
        }

    public void paintStructures(Object g) {
        if (mDepictor != null) {
            for (int i=0; i<mDepictor.length; i++) {
                mDepictor[i].setDisplayMode(mDisplayMode);
                mDepictor[i].paint(g);
/*
Rectangle2D.Float r = mDepictor[i].getBoundingRect();
if (r != null) {
g.setColor(Color.magenta);
g.drawRect((int)r.x, (int)r.y, (int)r.width, (int)r.height);
}*/
                }
            }
        }

    public void paintDrawingObjects(Graphics g) {
        if (mDrawingObjectList != null) {
            for (int i=0; i<mDrawingObjectList.size(); i++) {
                AbstractDrawingObject object = (AbstractDrawingObject)mDrawingObjectList.get(i);
                if (mUseGraphics2D)
                    object.draw2D((Graphics2D)g, mTransformation);
                else
                    object.draw(g, mTransformation);
/*
Rectangle2D.Float r = object.getBoundingRect();
mTransformation.applyTo(r);
g.setColor(Color.magenta);
g.drawRect((int)r.x, (int)r.y, (int)r.width, (int)r.height);*/
                }
            }
        }

    public DepictorTransformation updateCoords(Object g, Rectangle2D.Float viewRect, int mode) {
    // returns full transformation that moves/scales original molecules/objects into viewRect
        validateView(g, viewRect, mode);

        if (mTransformation.isVoidTransformation()) {
            return null;
            }
        else {
            if (mMolecule != null)
                for (int i=0; i<mMolecule.length; i++)
                    mTransformation.applyTo(mMolecule[i]);

            if (mDrawingObjectList != null)
                for (int i=0; i<mDrawingObjectList.size(); i++)
                    mTransformation.applyTo((AbstractDrawingObject)mDrawingObjectList.get(i));

            if (mDepictor != null)
                for (int i=0; i<mDepictor.length; i++)
                    mDepictor[i].getTransformation().clear();

            DepictorTransformation t = mTransformation;
            mTransformation = new DepictorTransformation();
            return t;
            }
        }

    public DepictorTransformation validateView(Object g, Rectangle2D.Float viewRect, int mode) {
    // returns incremental transformation that moves/scales already transformed molecules/objects into viewRect
        if (mDoLayoutMolecules)
            doLayoutMolecules(g);

        Rectangle2D.Float boundingRect = null;
        if (mDepictor != null) {
            for (int i=0; i<mDepictor.length; i++) {
                mDepictor[i].validateView(g, null, 0);
                boundingRect = (boundingRect == null) ? mDepictor[i].getBoundingRect()
                            : (Rectangle2D.Float)boundingRect.createUnion(mDepictor[i].getBoundingRect());
                }
            }
        if (mDrawingObjectList != null) {
            for (int i=0; i<mDrawingObjectList.size(); i++) {
                Rectangle2D.Float objectBounds = ((AbstractDrawingObject)mDrawingObjectList.get(i)).getBoundingRect();
                mTransformation.applyTo(objectBounds);
                boundingRect = (boundingRect == null) ? objectBounds
                        : (Rectangle2D.Float)boundingRect.createUnion(objectBounds);
                }
            }

        if (boundingRect == null)
            return null;

        float avbl = calculateAverageBondLength();

        DepictorTransformation t = new DepictorTransformation(boundingRect, viewRect, avbl, mode);

        if (!t.isVoidTransformation()) {
            t.applyTo(mTransformation);

            if (mDepictor != null)
                for (int i=0; i<mDepictor.length; i++)
                    mDepictor[i].applyTransformation(t);

            return t;
            }

        return null;
        }

    private float calculateAverageBondLength() {
    	float averageBondLength = 0.0f;
        int bondCount = 0;
        if (mMolecule != null) {
            for (int i=0; i<mMolecule.length; i++) {
                if (mMolecule[i].getAllAtoms() != 0) {
                    averageBondLength += mDepictor[i].getTransformation().getScaling()
                                       * mMolecule[i].getAllBonds() * mMolecule[i].getAverageBondLength();
                    bondCount += mMolecule[i].getAllBonds();
                    }
                }
            }
        return (bondCount == 0) ? AbstractDepictor.cOptAvBondLen
                                : mTransformation.getScaling() * averageBondLength / bondCount;
        }

    private void doLayoutMolecules(Object g) {
        Rectangle2D.Float[] boundingRect = new Rectangle2D.Float[mMolecule.length];
        float totalWidth = 0.0f;
        float totalHeight = 0.0f;
        for (int i=0; i<mMolecule.length; i++) {
            mDepictor[i].validateView(g, null, AbstractDepictor.cModeInflateToMaxAVBL);
            boundingRect[i] = mDepictor[i].getBoundingRect();
            totalWidth += boundingRect[i].width;
            totalHeight = Math.max(totalHeight, boundingRect[i].height);
            }

        float spacing = 1.5f * AbstractDepictor.cOptAvBondLen;
        float arrowWidth = 2f * AbstractDepictor.cOptAvBondLen;

        int arrow = -1;
        if (mDrawingObjectList == null) {
            mDrawingObjectList = new DrawingObjectList();
            mDrawingObjectList.add(new ReactionArrow());
            arrow = 0;
            }
        else {
            for (int i=0; i<mDrawingObjectList.size(); i++) {
                if (mDrawingObjectList.get(i) instanceof ReactionArrow) {
                    arrow = i;
                    break;
                    }
                }
            if (arrow == -1) {
                arrow = mDrawingObjectList.size();
                mDrawingObjectList.add(new ReactionArrow());
                }
            }

        float rawX = 0.5f * spacing;
        for (int i=0; i<mMolecule.length; i++) {
            if (i == mReactantOrCoreCount) {
                ((ReactionArrow)mDrawingObjectList.get(arrow)).setCoordinates(
                        rawX-spacing/2, totalHeight/2, rawX-spacing/2+arrowWidth, totalHeight/2);
                rawX += arrowWidth;
                }

            float dx = rawX - boundingRect[i].x;
            float dy = 0.5f * (totalHeight - boundingRect[i].height) - boundingRect[i].y;
            mDepictor[i].applyTransformation(new DepictorTransformation(1.0f, dx, dy));

            rawX += spacing + boundingRect[i].width;
            }

        mDoLayoutMolecules = false;
        }
    }

redpajama_set_name: RedPajamaGithub


As a number of state legislatures — including Connecticut, Delaware, New Hampshire, New Jersey, New Mexico, and New York — seriously contemplate joining the parade this year, it's more important than ever to be able to assess just what impact marijuana legalization has had on those states that have led the way.
Well, of course. If there's one thing you could predict about legalizing marijuana, this is it. The decline in the number of pot arrests is dramatic: 98 percent in Washington, 96 percent in Oregon, 93 percent in Alaska, 81 percent in Colorado, 76 percent in D.C. That means tens of thousands of people not being cuffed, hauled away, and branded with lifelong criminal records, with all the consequences those bring.
The savings in human liberty and potential are inestimable, but the savings to state criminal justice and correctional systems are not: The report puts them at hundreds of millions of dollars.
High school kids in the earliest legalization states smoke pot at rates similar to kids in states that haven't legalized it, and those rates have remained stable. In the later legalization states, rates of teen use vary widely, but have mostly stabilized or declined in the years leading up to legalization. And in those latest states — Maine, Massachusetts, Nevada, California — regulatory programs are either not yet in place or so new they're unlikely to have affected youth use rates.
In Colorado, an upward trend in overdoses began to decline after 2014, the first year of retail pot sales in the state. Other positive indicia come from medical marijuana states, which report a nearly 25 percent drop in overdose death rates, a 23 percent reduction in opioid addiction-related hospitalizations and a 15 percent reduction in opioid treatment admissions.
Legalization states have collected more than a billion dollars in pot tax revenues — and that's not counting the monster market in California, where recreational sales just began this month. Likewise, slow roll-outs of taxed and regulated marijuana commerce in Maine and Massachusetts mean no tax dollars have yet been generated there. In the states that do have legal pot sales, overall sales and tax revenues quickly exceeded initial estimates.
Like $230 million to the Colorado Department of Education in two years to fund school construction, early literacy, school health, and bullying prevention programs. Likewise, schools in Oregon get 40 percent of the pot taxes and schools in Nevada will get $56 million in wholesale pot tax revenues. Oregon also allocates 20 percent of pot taxes for alcohol and drug treatment, while Washington kicks in 25 percent. In Washington state, 55 percent of pot tax revenues fund basic health plans.
"Marijuana criminalization has been a massive waste of money and has unequally harmed black and Latino communities," said Jolene Forman, staff attorney at the Drug Policy Alliance and author of the report. "This report shows that marijuana legalization is working. States are effectively protecting public health and safety through comprehensive regulations. Now more states should build on the successes of marijuana legalization and advance policies to repair the racially disparate harms of the war on drugs."


text:
Sharks take long-term view as NHL Trade Deadline nears
GM Wilson won't give up young talent, high picks for rentals despite Thornton injury
by Nicholas J. Cotsonika @cotsonika / NHL.com Columnist
DETROIT -- San Jose Sharks general manager Doug Wilson is not interested in paying a high price for a pending unrestricted free agent before the NHL Trade Deadline on Feb. 26 after losing center Joe Thornton to a knee injury.
But he would like to add one or two top-end forwards before the trade deadline or in the offseason. He lost forward Patrick Marleau to the Toronto Maple Leafs in free agency July 1.
"We're not about to give up any of our key young players," Wilson said Wednesday, when the Sharks lost 2-1 in a shootout to the Detroit Red Wings at Little Caesars Arena. "We're not looking to move our first-round picks for rentals. We've always looked at, if there's a player that fits for now and the future, we'll explore that."
Wilson said that's how the Sharks acquired Thornton from the Boston Bruins on Nov. 30, 2005; defenseman Brent Burns from the Minnesota Wild on June 24, 2011; and goaltender Martin Jones from the Bruins on June 30, 2015.
"We think the young players are really trending up," Wilson said. "We have a nice blend [of young players and veterans]. We think our goaltending is in a good place. We think our defense is set for many years.
"Would we like to add another top-end forward in the next while? Or a couple of them? Yeah. And there's different ways to do that. One is through the draft. One is through free agency. We have a lot of [salary-]cap space this upcoming year, which was part of our plan. Then there's obviously the trade potential. We explore every way to add to our team."
Video: SJS@PIT: Burns finds the top shelf on the power play
It all fits into what Wilson calls the "natural evolution" of the Sharks.
They moved their American Hockey League team from Worcester, Massachusetts, to San Jose in 2015-16, allowing them to mentor and evaluate their prospects better.
"We knew that we needed to have younger players that played the game the current way the game is played, with offense, puck possession, speed and all that," Wilson said. "So you know that the inevitable day is coming that you need those players to contribute more. I think we've been very cognizant the last five or six years to get the right type of players that one could complement the team that we had, but again how we want to play.
"A lot of our younger players are not young. They've played in the [Stanley Cup Playoffs]. They've played in the Stanley Cup Final [against the Pittsburgh Penguins in 2016]. They've played a lot of hockey surrounded by really good people. And I think there comes a point that the younger players have to step up and take ownership of more of the team."
Marleau, 38, is the leading scorer in Sharks history with 1,082 points (508 goals, 574 assists). He had 46 points (27 goals, 19 assists) last season.
The Sharks have filled that void internally. Forwards Joonas Donskoi, 25; Tomas Hertl, 24; Chris Tierney, 23; and Timo Meier, 21, combined for 16 goals through 50 games last season. They have combined for 47 through 50 games this season.
Video: SJS@PIT: Couture nets 200th NHL goal on power play
"There's maybe a little more ice, a little more opportunity, there, but they've also earned that opportunity," coach Peter DeBoer said. "We haven't handed it to them. … They've all taken steps -- and some of them more steps than others -- but definitely have kept us competitive."
But now the Sharks are without Thornton, 38, the second-leading scorer in franchise history with 973 points (228 goals, 745 assists). He had 36 points (13 goals, 23 assists) this season before having surgery on his right medical collateral ligament Jan. 25. Wilson has said he will miss "several weeks."
Do the Sharks have enough to fill that void internally too?
"We have to, right?" DeBoer said with a laugh. "We don't have any option."
Unless and until Wilson makes a move. The Sharks are 0-2-1 without Thornton, and the playoff race is tight. San Jose is second in the Pacific Division, one point ahead of the third-place Los Angeles Kings and the just-out-of-a-wild-card-spot Anaheim Ducks.
"He's a really tough one to replace," Wilson said of Thornton. "His presence. His love for the game. He makes everybody around him better. But every team goes through injuries. We had to go through patches of losing Logan Couture several times, and he's a really important player for us. Every team in the League is [like], 'Who can step in and not pick up the slack but bring a little bit more?' We think we do it by committee.
"Joe has inspired a lot of people, and I think now it's time for some of those guys he's inspired to step up like he has or he would. We've got an extremely close group that cares about each other, and I think that's what our approach is."

redpajama_set_name: RedPajamaCommonCrawl


Binghamton folk-rock band Driftwood is on tour in Florida right now after the release of their newest album 'City Lights'. They will make their way back for two performances in the Ransom Steele Tavern in Apalachin on Thanksgiving weekend. Front man Dan Forsyth talks about how their grueling tour schedule impacts their task of writing songs, and how a studio session helps the creative process.


text:
Неотропічний погонич (Laterallus) — рід журавлеподібних птахів родини пастушкових (Rallidae). Представники цього роду мешкають в Америці.

Види
Виділяють тринадцять видів:.
 Погонич жовтоволий (Laterallus flaviventer)
 Погонич американський (Laterallus jamaicensis)
 Погонич галапагоський (Laterallus spilonota)
 Погонич уругвайський (Laterallus spiloptera)
 Пастушок тристанський (Laterallus rogersi)
 Погонич рудий (Laterallus ruber)
 Погонич оливковий (Laterallus melanophaius)
 Погонич венесуельський (Laterallus levraudi)
 Погонич парагвайський (Laterallus xenopterus)
 Погонич біловолий (Laterallus leucopyrrhus)
 Погонич амазонійський (Laterallus exilis)
 Погонич білогорлий (Laterallus albigularis)
 Деркач колумбійський (Laterallus fasciatus)

Примітки

Джерела
Taylor, B., & van Perlo, B. (1998). Rails – A Guide to the Rails, Crakes, Gallinules and Coots of the World.

Пастушкові
Роди птахів

redpajama_set_name: RedPajamaWikipedia


text:
Nyah Grace unveils an appetizing neo-soul tune, entitled, "My Sista Told Me"
Neo Soul
July 17, 2020 0 3 min read
Nyah Grace is a rising London-based singer-songwriter from Monmouth, Oregon. Not too long ago, she released an appetizing neo-soul tune, entitled, "My Sista Told Me". The song was co-written, composed, and performed with Grammy Award-winner Corinne Bailey-Rae. Also, it was completed with a further co-write from producer Steve Chrisanthou, who produced some of Corinne's biggest hits.
Nyah Grace – "My Sista Told Me" single
"Corinne and I started writing this song when we first met. But it was a year later that I saw her again and we were able to finish the song. I couldn't get the verse quite right, but she suggested that I try this and it immediately worked. I'm not a rapper, so this was really fun and out there for me." – Nyah Grace stated
'My Sista Told Me' is a slick, sun-kissed slice of modern soul, which delivers feel-good vibes and uplifting funk in equal measure. Nyah's timeless voice carries the power and nuance of a veteran artist, while a verse delivered in a mix of spoken word and rap adds a fresh angle to her versatile vocal. Furthermore, "My Sista Told Me" was released alongside Nyah's other attractive single, entitled, "I Don't Really".
"I Don't Really" song
"Michael played the most beautiful set of chords I'd ever heard and put in some chords, quickly found the drum loop, and it sounded amazing. I wrote all the lyrics at home that same day and put in some vocals. The next day, I thought a voicemail part would be cool, so I edited together all the messages on my phone. It has my grandma, plus all my friends from elementary school because no one's left me a voicemail forever. I'm really proud of it." – Nyah stated
The second track, "I Don't Really", flows with a different kind of energy. The song tells the tale of a young woman's rejection of a love interest that didn't meet the grade. Also, the song is an empowered strut of modern pop, throwback R&B, and understated jazz. Furthermore, Nyah Grace wrote the song alongside Michael Kwesi Graves.
'I Don't Really' and "My Sista Told Me" serves as appetizing presentations to the type of music listeners can expect to hear on Nyah Grace's upcoming debut album, entitled, "Honey-Coloured", set for release on July 24, 2020.
Nyah Grace
"I want 'Honey-Coloured' to be the record that you put on with friends late at night. I love writing stories, I want people to hear a combination of words and think that's so poetic, and be moved by it." – Nyah Grace
Nyah Grace is a teenage prodigy with an old soul who has a knack for telling relatable stories. Her album represents the culmination of her journey so far. You'll hear echoes of influences spanning decades of music history, from H.E.R. and Mac Ayres to Alicia Keys, Lauryn Hill, and Estelle and back to Billie Holiday. However, Nyah's identity is pretty much her own. All of which makes "Honey-Coloured" a modern classic that's waiting to be discovered.
"My Sista Told Me" single
We recommend adding Nyah Grace's "My Sista Told Me" and "I Don't Really" singles to your personal playlist. Also, let us know how you feel about it in the comment section below.
Contact us on social media via Twitter, YouTube, Instagram, or Facebook, and let us know what's going on. Also, check out our Dope Music Video Showcase and vote for the dopest music video. Expect to watch exciting videos showcasing music in popular genres such as hip-hop, R&B, soul, jazz, Pop, Rock, alternative, electronic, and more. Furthermore, don't forget to subscribe to our newsletter, purchase our merchandise, and become a Patron of Bong Mines Entertainment.
Previous ALIX unveils a lovely music video for her "Good" single featuring NEZZA
Next Emili releases an introspective single, entitled, "On and On"
Nyah Grace releases a classic neo-soul tune, entitled, "Sooner or Later"
May 3, 2020 0 3 min read0
Nyah Grace releases a lovely neo-soul tune, entitled, "Sunday"
February 14, 2020 0 1 min read0


text:
package ca

import (
	"bytes"
	"crypto"
	"crypto/ecdsa"
	"crypto/rand"
	"crypto/tls"
	"crypto/x509"
	"encoding/pem"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"time"

	cfcsr "github.com/cloudflare/cfssl/csr"
	"github.com/cloudflare/cfssl/helpers"
	"github.com/cloudflare/cfssl/initca"
	cflog "github.com/cloudflare/cfssl/log"
	cfsigner "github.com/cloudflare/cfssl/signer"
	"github.com/cloudflare/cfssl/signer/local"
	"github.com/docker/distribution/digest"
	"github.com/docker/go-events"
	"github.com/docker/swarmkit/api"
	"github.com/docker/swarmkit/identity"
	"github.com/docker/swarmkit/ioutils"
	"github.com/docker/swarmkit/remotes"
	"golang.org/x/net/context"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials"
)

const (
	// Security Strength Equivalence
	//-----------------------------------
	//| ECC  |  DH/DSA/RSA  |
	//| 256  |     3072     |
	//| 384  |     7680     |
	//-----------------------------------

	// RootKeySize is the default size of the root CA key
	// It would be ideal for the root key to use P-384, but in P-384 is not optimized in go yet :(
	RootKeySize = 256
	// RootKeyAlgo defines the default algorithm for the root CA Key
	RootKeyAlgo = "ecdsa"
	// PassphraseENVVar defines the environment variable to look for the
	// root CA private key material encryption key
	PassphraseENVVar = "SWARM_ROOT_CA_PASSPHRASE"
	// PassphraseENVVarPrev defines the alternate environment variable to look for the
	// root CA private key material encryption key. It can be used for seamless
	// KEK rotations.
	PassphraseENVVarPrev = "SWARM_ROOT_CA_PASSPHRASE_PREV"
	// RootCAExpiration represents the expiration for the root CA in seconds (20 years)
	RootCAExpiration = "630720000s"
	// DefaultNodeCertExpiration represents the default expiration for node certificates (3 months)
	DefaultNodeCertExpiration = 2160 * time.Hour
	// CertBackdate represents the amount of time each certificate is backdated to try to avoid
	// clock drift issues.
	CertBackdate = 1 * time.Hour
	// CertLowerRotationRange represents the minimum fraction of time that we will wait when randomly
	// choosing our next certificate rotation
	CertLowerRotationRange = 0.5
	// CertUpperRotationRange represents the maximum fraction of time that we will wait when randomly
	// choosing our next certificate rotation
	CertUpperRotationRange = 0.8
	// MinNodeCertExpiration represents the minimum expiration for node certificates
	MinNodeCertExpiration = 1 * time.Hour
)

// ErrNoLocalRootCA is an error type used to indicate that the local root CA
// certificate file does not exist.
var ErrNoLocalRootCA = errors.New("local root CA certificate does not exist")

// ErrNoValidSigner is an error type used to indicate that our RootCA doesn't have the ability to
// sign certificates.
var ErrNoValidSigner = errors.New("no valid signer found")

func init() {
	cflog.Level = 5
}

// CertPaths is a helper struct that keeps track of the paths of a
// Cert and corresponding Key
type CertPaths struct {
	Cert, Key string
}

// RootCA is the representation of everything we need to sign certificates
type RootCA struct {
	// Key will only be used by the original manager to put the private
	// key-material in raft, no signing operations depend on it.
	Key []byte
	// Cert includes the PEM encoded Certificate for the Root CA
	Cert []byte
	Pool *x509.CertPool
	// Digest of the serialized bytes of the certificate
	Digest digest.Digest
	// This signer will be nil if the node doesn't have the appropriate key material
	Signer cfsigner.Signer
}

// CanSign ensures that the signer has all three necessary elements needed to operate
func (rca *RootCA) CanSign() bool {
	if rca.Cert == nil || rca.Pool == nil || rca.Signer == nil {
		return false
	}

	return true
}

// IssueAndSaveNewCertificates generates a new key-pair, signs it with the local root-ca, and returns a
// tls certificate
func (rca *RootCA) IssueAndSaveNewCertificates(paths CertPaths, cn, ou, org string) (*tls.Certificate, error) {
	csr, key, err := GenerateAndWriteNewKey(paths)
	if err != nil {
		return nil, fmt.Errorf("error when generating new node certs: %v", err)
	}

	if !rca.CanSign() {
		return nil, ErrNoValidSigner
	}

	// Obtain a signed Certificate
	certChain, err := rca.ParseValidateAndSignCSR(csr, cn, ou, org)
	if err != nil {
		return nil, fmt.Errorf("failed to sign node certificate: %v", err)
	}

	// Ensure directory exists
	err = os.MkdirAll(filepath.Dir(paths.Cert), 0755)
	if err != nil {
		return nil, err
	}

	// Write the chain to disk
	if err := ioutils.AtomicWriteFile(paths.Cert, certChain, 0644); err != nil {
		return nil, err
	}

	// Create a valid TLSKeyPair out of the PEM encoded private key and certificate
	tlsKeyPair, err := tls.X509KeyPair(certChain, key)
	if err != nil {
		return nil, err
	}

	return &tlsKeyPair, nil
}

// RequestAndSaveNewCertificates gets new certificates issued, either by signing them locally if a signer is
// available, or by requesting them from the remote server at remoteAddr.
func (rca *RootCA) RequestAndSaveNewCertificates(ctx context.Context, paths CertPaths, token string, remotes remotes.Remotes, transport credentials.TransportCredentials, nodeInfo chan<- api.IssueNodeCertificateResponse) (*tls.Certificate, error) {
	// Create a new key/pair and CSR for the new manager
	// Write the new CSR and the new key to a temporary location so we can survive crashes on rotation
	tempPaths := genTempPaths(paths)
	csr, key, err := GenerateAndWriteNewKey(tempPaths)
	if err != nil {
		return nil, fmt.Errorf("error when generating new node certs: %v", err)
	}

	// Get the remote manager to issue a CA signed certificate for this node
	// Retry up to 5 times in case the manager we first try to contact isn't
	// responding properly (for example, it may have just been demoted).
	var signedCert []byte
	for i := 0; i != 5; i++ {
		signedCert, err = GetRemoteSignedCertificate(ctx, csr, token, rca.Pool, remotes, transport, nodeInfo)
		if err == nil {
			break
		}
	}
	if err != nil {
		return nil, err
	}

	// Доверяй, но проверяй.
	// Before we overwrite our local certificate, let's make sure the server gave us one that is valid
	// Create an X509Cert so we can .Verify()
	certBlock, _ := pem.Decode(signedCert)
	if certBlock == nil {
		return nil, fmt.Errorf("failed to parse certificate PEM")
	}
	X509Cert, err := x509.ParseCertificate(certBlock.Bytes)
	if err != nil {
		return nil, err
	}
	// Include our current root pool
	opts := x509.VerifyOptions{
		Roots: rca.Pool,
	}
	// Check to see if this certificate was signed by our CA, and isn't expired
	if _, err := X509Cert.Verify(opts); err != nil {
		return nil, err
	}

	// Create a valid TLSKeyPair out of the PEM encoded private key and certificate
	tlsKeyPair, err := tls.X509KeyPair(signedCert, key)
	if err != nil {
		return nil, err
	}

	// Ensure directory exists
	err = os.MkdirAll(filepath.Dir(paths.Cert), 0755)
	if err != nil {
		return nil, err
	}

	// Write the chain to disk
	if err := ioutils.AtomicWriteFile(paths.Cert, signedCert, 0644); err != nil {
		return nil, err
	}

	// Move the new key to the final location
	if err := os.Rename(tempPaths.Key, paths.Key); err != nil {
		return nil, err
	}

	return &tlsKeyPair, nil
}

// PrepareCSR creates a CFSSL Sign Request based on the given raw CSR and
// overrides the Subject and Hosts with the given extra args.
func PrepareCSR(csrBytes []byte, cn, ou, org string) cfsigner.SignRequest {
	// All managers get added the subject-alt-name of CA, so they can be
	// used for cert issuance.
	hosts := []string{ou, cn}
	if ou == ManagerRole {
		hosts = append(hosts, CARole)
	}

	return cfsigner.SignRequest{
		Request: string(csrBytes),
		// OU is used for Authentication of the node type. The CN has the random
		// node ID.
		Subject: &cfsigner.Subject{CN: cn, Names: []cfcsr.Name{{OU: ou, O: org}}},
		// Adding ou as DNS alt name, so clients can connect to ManagerRole and CARole
		Hosts: hosts,
	}
}

// ParseValidateAndSignCSR returns a signed certificate from a particular rootCA and a CSR.
func (rca *RootCA) ParseValidateAndSignCSR(csrBytes []byte, cn, ou, org string) ([]byte, error) {
	if !rca.CanSign() {
		return nil, ErrNoValidSigner
	}

	signRequest := PrepareCSR(csrBytes, cn, ou, org)

	cert, err := rca.Signer.Sign(signRequest)
	if err != nil {
		return nil, fmt.Errorf("failed to sign node certificate: %v", err)
	}

	return rca.AppendFirstRootPEM(cert)
}

// AppendFirstRootPEM appends the first certificate from this RootCA's cert
// bundle to the given cert bundle (which should already be encoded as a series
// of PEM-encoded certificate blocks).
func (rca *RootCA) AppendFirstRootPEM(cert []byte) ([]byte, error) {
	// Append the first root CA Cert to the certificate, to create a valid chain
	// Get the first Root CA Cert on the bundle
	firstRootCA, _, err := helpers.ParseOneCertificateFromPEM(rca.Cert)
	if err != nil {
		return nil, err
	}
	if len(firstRootCA) < 1 {
		return nil, fmt.Errorf("no valid Root CA certificates found")
	}
	// Convert the first root CA back to PEM
	firstRootCAPEM := helpers.EncodeCertificatePEM(firstRootCA[0])
	if firstRootCAPEM == nil {
		return nil, fmt.Errorf("error while encoding the Root CA certificate")
	}
	// Append this Root CA to the certificate to make [Cert PEM]\n[Root PEM][EOF]
	certChain := append(cert, firstRootCAPEM...)

	return certChain, nil
}

// NewRootCA creates a new RootCA object from unparsed PEM cert bundle and key byte
// slices. key may be nil, and in this case NewRootCA will return a RootCA
// without a signer.
func NewRootCA(certBytes, keyBytes []byte, certExpiry time.Duration) (RootCA, error) {
	// Parse all the certificates in the cert bundle
	parsedCerts, err := helpers.ParseCertificatesPEM(certBytes)
	if err != nil {
		return RootCA{}, err
	}
	// Check to see if we have at least one valid cert
	if len(parsedCerts) < 1 {
		return RootCA{}, fmt.Errorf("no valid Root CA certificates found")
	}

	// Create a Pool with all of the certificates found
	pool := x509.NewCertPool()
	for _, cert := range parsedCerts {
		// Check to see if all of the certificates are valid, self-signed root CA certs
		if err := cert.CheckSignature(cert.SignatureAlgorithm, cert.RawTBSCertificate, cert.Signature); err != nil {
			return RootCA{}, fmt.Errorf("error while validating Root CA Certificate: %v", err)
		}
		pool.AddCert(cert)
	}

	// Calculate the digest for our Root CA bundle
	digest := digest.FromBytes(certBytes)

	if len(keyBytes) == 0 {
		// This RootCA does not have a valid signer.
		return RootCA{Cert: certBytes, Digest: digest, Pool: pool}, nil
	}

	var (
		passphraseStr              string
		passphrase, passphrasePrev []byte
		priv                       crypto.Signer
	)

	// Attempt two distinct passphrases, so we can do a hitless passphrase rotation
	if passphraseStr = os.Getenv(PassphraseENVVar); passphraseStr != "" {
		passphrase = []byte(passphraseStr)
	}

	if p := os.Getenv(PassphraseENVVarPrev); p != "" {
		passphrasePrev = []byte(p)
	}

	// Attempt to decrypt the current private-key with the passphrases provided
	priv, err = helpers.ParsePrivateKeyPEMWithPassword(keyBytes, passphrase)
	if err != nil {
		priv, err = helpers.ParsePrivateKeyPEMWithPassword(keyBytes, passphrasePrev)
		if err != nil {
			return RootCA{}, fmt.Errorf("Malformed private key: %v", err)
		}
	}

	// We will always use the first certificate inside of the root bundle as the active one
	if err := ensureCertKeyMatch(parsedCerts[0], priv.Public()); err != nil {
		return RootCA{}, err
	}

	signer, err := local.NewSigner(priv, parsedCerts[0], cfsigner.DefaultSigAlgo(priv), SigningPolicy(certExpiry))
	if err != nil {
		return RootCA{}, err
	}

	// If the key was loaded from disk unencrypted, but there is a passphrase set,
	// ensure it is encrypted, so it doesn't hit raft in plain-text
	keyBlock, _ := pem.Decode(keyBytes)
	if keyBlock == nil {
		// This RootCA does not have a valid signer.
		return RootCA{Cert: certBytes, Digest: digest, Pool: pool}, nil
	}
	if passphraseStr != "" && !x509.IsEncryptedPEMBlock(keyBlock) {
		keyBytes, err = EncryptECPrivateKey(keyBytes, passphraseStr)
		if err != nil {
			return RootCA{}, err
		}
	}

	return RootCA{Signer: signer, Key: keyBytes, Digest: digest, Cert: certBytes, Pool: pool}, nil
}

func ensureCertKeyMatch(cert *x509.Certificate, key crypto.PublicKey) error {
	switch certPub := cert.PublicKey.(type) {
	// TODO: Handle RSA keys.
	case *ecdsa.PublicKey:
		ecKey, ok := key.(*ecdsa.PublicKey)
		if ok && certPub.X.Cmp(ecKey.X) == 0 && certPub.Y.Cmp(ecKey.Y) == 0 {
			return nil
		}
	default:
		return fmt.Errorf("unknown or unsupported certificate public key algorithm")
	}

	return fmt.Errorf("certificate key mismatch")
}

// GetLocalRootCA validates if the contents of the file are a valid self-signed
// CA certificate, and returns the PEM-encoded Certificate if so
func GetLocalRootCA(baseDir string) (RootCA, error) {
	paths := NewConfigPaths(baseDir)

	// Check if we have a Certificate file
	cert, err := ioutil.ReadFile(paths.RootCA.Cert)
	if err != nil {
		if os.IsNotExist(err) {
			err = ErrNoLocalRootCA
		}

		return RootCA{}, err
	}

	key, err := ioutil.ReadFile(paths.RootCA.Key)
	if err != nil {
		if !os.IsNotExist(err) {
			return RootCA{}, err
		}
		// There may not be a local key. It's okay to pass in a nil
		// key. We'll get a root CA without a signer.
		key = nil
	}

	return NewRootCA(cert, key, DefaultNodeCertExpiration)
}

// GetRemoteCA returns the remote endpoint's CA certificate
func GetRemoteCA(ctx context.Context, d digest.Digest, r remotes.Remotes) (RootCA, error) {
	// This TLS Config is intentionally using InsecureSkipVerify. Either we're
	// doing TOFU, in which case we don't validate the remote CA, or we're using
	// a user supplied hash to check the integrity of the CA certificate.
	insecureCreds := credentials.NewTLS(&tls.Config{InsecureSkipVerify: true})
	opts := []grpc.DialOption{
		grpc.WithTransportCredentials(insecureCreds),
		grpc.WithTimeout(5 * time.Second),
		grpc.WithBackoffMaxDelay(5 * time.Second),
	}

	peer, err := r.Select()
	if err != nil {
		return RootCA{}, err
	}

	conn, err := grpc.Dial(peer.Addr, opts...)
	if err != nil {
		return RootCA{}, err
	}
	defer conn.Close()

	client := api.NewCAClient(conn)
	ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
	defer cancel()
	defer func() {
		if err != nil {
			r.Observe(peer, -remotes.DefaultObservationWeight)
			return
		}
		r.Observe(peer, remotes.DefaultObservationWeight)
	}()
	response, err := client.GetRootCACertificate(ctx, &api.GetRootCACertificateRequest{})
	if err != nil {
		return RootCA{}, err
	}

	if d != "" {
		verifier, err := digest.NewDigestVerifier(d)
		if err != nil {
			return RootCA{}, fmt.Errorf("unexpected error getting digest verifier: %v", err)
		}

		io.Copy(verifier, bytes.NewReader(response.Certificate))

		if !verifier.Verified() {
			return RootCA{}, fmt.Errorf("remote CA does not match fingerprint. Expected: %s", d.Hex())

		}
	}

	// Check the validity of the remote Cert
	_, err = helpers.ParseCertificatePEM(response.Certificate)
	if err != nil {
		return RootCA{}, err
	}

	// Create a Pool with our RootCACertificate
	pool := x509.NewCertPool()
	if !pool.AppendCertsFromPEM(response.Certificate) {
		return RootCA{}, fmt.Errorf("failed to append certificate to cert pool")
	}

	return RootCA{Cert: response.Certificate, Digest: digest.FromBytes(response.Certificate), Pool: pool}, nil
}

// CreateAndWriteRootCA creates a Certificate authority for a new Swarm Cluster, potentially
// overwriting any existing CAs.
func CreateAndWriteRootCA(rootCN string, paths CertPaths) (RootCA, error) {
	// Create a simple CSR for the CA using the default CA validator and policy
	req := cfcsr.CertificateRequest{
		CN:         rootCN,
		KeyRequest: &cfcsr.BasicKeyRequest{A: RootKeyAlgo, S: RootKeySize},
		CA:         &cfcsr.CAConfig{Expiry: RootCAExpiration},
	}

	// Generate the CA and get the certificate and private key
	cert, _, key, err := initca.New(&req)
	if err != nil {
		return RootCA{}, err
	}

	// Ensure directory exists
	err = os.MkdirAll(filepath.Dir(paths.Cert), 0755)
	if err != nil {
		return RootCA{}, err
	}

	// Write the Private Key and Certificate to disk, using decent permissions
	if err := ioutils.AtomicWriteFile(paths.Cert, cert, 0644); err != nil {
		return RootCA{}, err
	}
	if err := ioutils.AtomicWriteFile(paths.Key, key, 0600); err != nil {
		return RootCA{}, err
	}

	return NewRootCA(cert, key, DefaultNodeCertExpiration)
}

// BootstrapCluster receives a directory and creates both new Root CA key material
// and a ManagerRole key/certificate pair to be used by the initial cluster manager
func BootstrapCluster(baseCertDir string) error {
	paths := NewConfigPaths(baseCertDir)

	rootCA, err := CreateAndWriteRootCA(rootCN, paths.RootCA)
	if err != nil {
		return err
	}

	nodeID := identity.NewID()
	newOrg := identity.NewID()
	_, err = GenerateAndSignNewTLSCert(rootCA, nodeID, ManagerRole, newOrg, paths.Node)

	return err
}

// GenerateAndSignNewTLSCert creates a new keypair, signs the certificate using signer,
// and saves the certificate and key to disk. This method is used to bootstrap the first
// manager TLS certificates.
func GenerateAndSignNewTLSCert(rootCA RootCA, cn, ou, org string, paths CertPaths) (*tls.Certificate, error) {
	// Generate and new keypair and CSR
	csr, key, err := generateNewCSR()
	if err != nil {
		return nil, err
	}

	// Obtain a signed Certificate
	certChain, err := rootCA.ParseValidateAndSignCSR(csr, cn, ou, org)
	if err != nil {
		return nil, fmt.Errorf("failed to sign node certificate: %v", err)
	}

	// Ensure directory exists
	err = os.MkdirAll(filepath.Dir(paths.Cert), 0755)
	if err != nil {
		return nil, err
	}

	// Write both the chain and key to disk
	if err := ioutils.AtomicWriteFile(paths.Cert, certChain, 0644); err != nil {
		return nil, err
	}
	if err := ioutils.AtomicWriteFile(paths.Key, key, 0600); err != nil {
		return nil, err
	}

	// Load a valid tls.Certificate from the chain and the key
	serverCert, err := tls.X509KeyPair(certChain, key)
	if err != nil {
		return nil, err
	}

	return &serverCert, nil
}

// GenerateAndWriteNewKey generates a new pub/priv key pair, writes it to disk
// and returns the CSR and the private key material
func GenerateAndWriteNewKey(paths CertPaths) (csr, key []byte, err error) {
	// Generate a new key pair
	csr, key, err = generateNewCSR()
	if err != nil {
		return
	}

	// Ensure directory exists
	err = os.MkdirAll(filepath.Dir(paths.Key), 0755)
	if err != nil {
		return
	}

	if err = ioutils.AtomicWriteFile(paths.Key, key, 0600); err != nil {
		return
	}

	return
}

// GetRemoteSignedCertificate submits a CSR to a remote CA server address,
// and that is part of a CA identified by a specific certificate pool.
func GetRemoteSignedCertificate(ctx context.Context, csr []byte, token string, rootCAPool *x509.CertPool, r remotes.Remotes, creds credentials.TransportCredentials, nodeInfo chan<- api.IssueNodeCertificateResponse) ([]byte, error) {
	if rootCAPool == nil {
		return nil, fmt.Errorf("valid root CA pool required")
	}

	if creds == nil {
		// This is our only non-MTLS request, and it happens when we are boostraping our TLS certs
		// We're using CARole as server name, so an external CA doesn't also have to have ManagerRole in the cert SANs
		creds = credentials.NewTLS(&tls.Config{ServerName: CARole, RootCAs: rootCAPool})
	}

	peer, err := r.Select()
	if err != nil {
		return nil, err
	}

	opts := []grpc.DialOption{
		grpc.WithTransportCredentials(creds),
		grpc.WithTimeout(5 * time.Second),
		grpc.WithBackoffMaxDelay(5 * time.Second),
	}

	conn, err := grpc.Dial(peer.Addr, opts...)
	if err != nil {
		return nil, err
	}
	defer conn.Close()

	// Create a CAClient to retrieve a new Certificate
	caClient := api.NewNodeCAClient(conn)

	// Send the Request and retrieve the request token
	issueRequest := &api.IssueNodeCertificateRequest{CSR: csr, Token: token}
	issueResponse, err := caClient.IssueNodeCertificate(ctx, issueRequest)
	if err != nil {
		return nil, err
	}

	// Send back the NodeID on the nodeInfo, so the caller can know what ID was assigned by the CA
	if nodeInfo != nil {
		nodeInfo <- *issueResponse
	}

	statusRequest := &api.NodeCertificateStatusRequest{NodeID: issueResponse.NodeID}
	expBackoff := events.NewExponentialBackoff(events.ExponentialBackoffConfig{
		Base:   time.Second,
		Factor: time.Second,
		Max:    30 * time.Second,
	})

	// Exponential backoff with Max of 30 seconds to wait for a new retry
	for {
		// Send the Request and retrieve the certificate
		ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
		defer cancel()
		statusResponse, err := caClient.NodeCertificateStatus(ctx, statusRequest)
		if err != nil {
			r.Observe(peer, -remotes.DefaultObservationWeight)
			return nil, err
		}

		// If the certificate was issued, return
		if statusResponse.Status.State == api.IssuanceStateIssued {
			if statusResponse.Certificate == nil {
				return nil, fmt.Errorf("no certificate in CertificateStatus response")
			}

			// The certificate in the response must match the CSR
			// we submitted. If we are getting a response for a
			// certificate that was previously issued, we need to
			// retry until the certificate gets updated per our
			// current request.
			if bytes.Equal(statusResponse.Certificate.CSR, csr) {
				r.Observe(peer, remotes.DefaultObservationWeight)
				return statusResponse.Certificate.Certificate, nil
			}
		}

		// If we're still pending, the issuance failed, or the state is unknown
		// let's continue trying.
		expBackoff.Failure(nil, nil)
		time.Sleep(expBackoff.Proceed(nil))
	}
}

// readCertExpiration returns the number of months left for certificate expiration
func readCertExpiration(paths CertPaths) (time.Duration, error) {
	// Read the Cert
	cert, err := ioutil.ReadFile(paths.Cert)
	if err != nil {
		return time.Hour, err
	}

	// Create an x509 certificate out of the contents on disk
	certBlock, _ := pem.Decode([]byte(cert))
	if certBlock == nil {
		return time.Hour, fmt.Errorf("failed to decode certificate block")
	}
	X509Cert, err := x509.ParseCertificate(certBlock.Bytes)
	if err != nil {
		return time.Hour, err
	}

	return X509Cert.NotAfter.Sub(time.Now()), nil

}

func saveRootCA(rootCA RootCA, paths CertPaths) error {
	// Make sure the necessary dirs exist and they are writable
	err := os.MkdirAll(filepath.Dir(paths.Cert), 0755)
	if err != nil {
		return err
	}

	// If the root certificate got returned successfully, save the rootCA to disk.
	return ioutils.AtomicWriteFile(paths.Cert, rootCA.Cert, 0644)
}

func generateNewCSR() (csr, key []byte, err error) {
	req := &cfcsr.CertificateRequest{
		KeyRequest: cfcsr.NewBasicKeyRequest(),
	}

	csr, key, err = cfcsr.ParseRequest(req)
	if err != nil {
		return
	}

	return
}

// EncryptECPrivateKey receives a PEM encoded private key and returns an encrypted
// AES256 version using a passphrase
// TODO: Make this method generic to handle RSA keys
func EncryptECPrivateKey(key []byte, passphraseStr string) ([]byte, error) {
	passphrase := []byte(passphraseStr)
	cipherType := x509.PEMCipherAES256

	keyBlock, _ := pem.Decode(key)
	if keyBlock == nil {
		// This RootCA does not have a valid signer.
		return nil, fmt.Errorf("error while decoding PEM key")
	}

	encryptedPEMBlock, err := x509.EncryptPEMBlock(rand.Reader,
		"EC PRIVATE KEY",
		keyBlock.Bytes,
		passphrase,
		cipherType)
	if err != nil {
		return nil, err
	}

	if encryptedPEMBlock.Headers == nil {
		return nil, fmt.Errorf("unable to encrypt key - invalid PEM file produced")
	}

	return pem.EncodeToMemory(encryptedPEMBlock), nil
}


AsianCAA members and network organisations will be attending the 2019 World of Coal Ash Conference and Exhibition in St. Louis, Missouri, May 13-16. WOCA is organized by or friends at the American Coal Ash Association (ACAA) and the University of Kentucky's Center for Applied Energy Research (CAER). The 2019 conference is the 8th joint biennial meeting with a focus on the science, applications and sustainability of worldwide coal combustion products (CCP's) as well as gasification products. The University of Kentucky Center for Applied Energy (CAER) explores technologies to improve the environment from energy efficiency. Researchers add to technically sound strategies related to fossil and renewable energy.
· Renewable energy such as biofuels and bioenergy, electrochemistry, solar energy and environmental remediation.
The CAER is proudly supported by UK, and is staffed by professional scientists and engineers. The Center has extensive interactions with faculty members and students, and provides analytical services for external commercial and academic organizations.
In order to extend access to industry leaders in Asia, anyone who registers through AsianCAA will save $200 on early bird registration (ends May 1st, 2019).
Sustainability is simply the ability to meet the demands of today without negatively impacting the future. This goal is not easily met, especially in the construction industry. With demands for building materials on the rise in places like Malaysia and Vietnam, companies scramble to provide quality building materials such as concrete, cement, ceramic, etc, while still adhering to ever tightening restrictions on emission and waste disposal. Switching unfriendly environmental practices to a more efficient infrastructure of Building materials manufacturers providing suitable coal ash byproducts from local power station waste is not yet common practice. As legislative reform takes its time, researchers are attacking the problem of reusing industrial waste from all angles.
CSA (Calcium Sulfoaluminate) cement is another approach at reducing energy to produce environmentally friendlier cement. Calcium Sulfoaluminate requires lower heating temperatures to produce. CSA is composed of a mixture of bauxite, limestone and gypsum and burning these at lower temperatures emits representatively lower amounts of carbon dioxide into the atmosphere. Also, the amount of limestone needed is much less. Limestone is said to be one of the key emitters of carbon dioxide in the sintering process. Using less materials and less energy is not only better for the environment, but more appealing to building materials manufacturers.
Dr. Tom Robl, Associate Director, Environmental & Coal Technologies at University of Kentucky's Center for Applied Energy Research will be presenting the latest research and discussing CSA cement at the upcoming Coal Ash Asia. To join Tom at this year's event please register by Clicking Here!


text:
namespace WootzJs.Compiler.JsAst
{
    public class JsLocalVariableDeclaration : JsStatement
    {
        public JsVariableDeclaration Declaration { get; set; }

        public JsLocalVariableDeclaration()
        {
        }

        public JsLocalVariableDeclaration(JsVariableDeclaration declaration)
        {
            Declaration = declaration;
        }

        public override void Accept(IJsVisitor visitor)
        {
            visitor.Visit(this);
        }

        public override T Accept<T>(IJsVisitor<T> visitor)
        {
            return visitor.Visit(this);
        }
    }
}


When it comes to street performers, The Red Trouser Show is a unique "must see" act that brings a blend of daring circus-style acrobatics and comedy to our Bangor, Maine waterfront. The New England-based duo, David Graham and Tobin Renwick, have been delighting audiences with their impressive array of stunts since 2003. The two have traveled the globe, gracing stages and streets at Six Flags, Key West, the Edinburgh Fringe Festival, Comedy Festival in Australia, and the International Circus in Karachi, Pakistan, and last but certainly not least, alumni weekend at their high school in Wilton, New Hampshire.
Tobin and David credit their elementary school PE teacher for introducing them to the art and giving them the basics they needed, but have had many teachers over the years. "We also went to Circus Smirkus summer camp and have had some world-class circus coaches from all over the world, especially Russia and Mongolia," Tobin explains.
Learn more about the Red Trouser Show at www.TheRedTrouserShow.com.


Guild Wars 2: Path of Fire is the second expansion pack for Guild Wars 2, a massively multiplayer online role-playing game.
The expansion introduces new features such as mounts, additional elite specializations for each profession, a bounty system for defeating certain enemies, and access to the areas of the Crystal Desert and Elona (first seen in the first game's Guild Wars Nightfall expansion). It will also introduce new raids and season four of the living world storyline.
The setting for the expansion is a location known as the Crystal Desert, located in Elona, an area to the south-east of the base-game's playable area known as Tyria. Elona is an area which players have had access to before in the original Guild Wars, the precursor to Guild Wars 2. The expansion takes place ~250 years after the events of the original Guild Wars' story, and shortly after the events of Guild Wars 2's first expansion, Heart of Thorns, and the "Living World Season 3" content.


text:
package play.utils;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.FutureTask;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.bytecode.SourceFileAttribute;
import play.Play;
import play.classloading.enhancers.LocalvariablesNamesEnhancer.LocalVariablesNamesTracer;
import play.data.binding.Binder;
import play.exceptions.UnexpectedException;
import play.mvc.After;
import play.mvc.Before;
import play.mvc.Finally;
import play.mvc.With;

/**
 * Java utils
 */
public class Java {

    public static String[] extractInfosFromByteCode(byte[] code) {
        try {
            CtClass ctClass = ClassPool.getDefault().makeClass(new ByteArrayInputStream(code));
            String sourceName = ((SourceFileAttribute) ctClass.getClassFile().getAttribute("SourceFile")).getFileName();
            return new String[] {ctClass.getName(), sourceName};
        } catch (Exception e) {
            throw new UnexpectedException("Cannot read a scala generated class using javassist", e);
        }
    }

    /**
     * Try to discover what is hidden under a FutureTask (hack)
     */
    public static Object extractUnderlyingCallable(FutureTask futureTask) {
        try {
            Field syncField = FutureTask.class.getDeclaredField("sync");
            syncField.setAccessible(true);
            Object sync = syncField.get(futureTask);
            Field callableField = sync.getClass().getDeclaredField("callable");
            callableField.setAccessible(true);
            Object callable = callableField.get(sync);
            if (callable.getClass().getSimpleName().equals("RunnableAdapter")) {
                Field taskField = callable.getClass().getDeclaredField("task");
                taskField.setAccessible(true);
                return taskField.get(callable);
            }
            return callable;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * Find the first public static method of a controller class
     * @param name The method name
     * @param clazz The class
     * @return The method or null
     */
    public static Method findActionMethod(String name, Class clazz) {
        while (!clazz.getName().equals("java.lang.Object")) {
            for (Method m : clazz.getDeclaredMethods()) {
                if (m.getName().equalsIgnoreCase(name) && Modifier.isPublic(m.getModifiers())) {
                    // Check that it is not an intercepter
                    if (!m.isAnnotationPresent(Before.class) && !m.isAnnotationPresent(After.class) && !m.isAnnotationPresent(Finally.class)) {
                        return m;
                    }
                }
            }
            clazz = clazz.getSuperclass();
        }
        return null;
    }

    /**
     * Invoke a static method
     * @param clazz The class
     * @param method The method name
     * @return The result
     * @throws java.lang.Exception
     */
    public static Object invokeStatic(Class<?> clazz, String method) throws Exception {
        return invokeStatic(clazz, method, new Object[0]);
    }

    public static Object invokeStatic(String clazz, String method) throws Exception {
        return invokeStatic(Play.classloader.loadClass(clazz), method, new Object[0]);
    }

    /**
     * Invoke a static method with args
     * @param clazz The class
     * @param method The method name
     * @param args Arguments
     * @return The result
     * @throws java.lang.Exception
     */
    public static Object invokeStatic(Class<?> clazz, String method, Object... args) throws Exception {
        Class[] types = new Class[args.length];
        for (int i = 0; i < args.length; i++) {
            types[i] = args[i].getClass();
        }
        Method m = clazz.getDeclaredMethod(method, types);
        m.setAccessible(true);
        return m.invoke(null, args);
    }

    public static Object invokeStaticOrParent(Class<?> clazz, String method, Object... args) throws Exception {
        Class[] types = new Class[args.length];
        for (int i = 0; i < args.length; i++) {
            types[i] = args[i].getClass();
        }
        Method m = null;
        while (!clazz.equals(Object.class) && m == null) {
            try {
                m = clazz.getDeclaredMethod(method, types);
            } catch (Exception e) {
                clazz = clazz.getSuperclass();
            }
        }
        if (m != null) {
            m.setAccessible(true);
            if(Modifier.isStatic(m.getModifiers())) {
                return m.invoke(null, args);
            } else {
                Object instance = m.getDeclaringClass().getDeclaredField("MODULE$").get(null);
                return m.invoke(instance, args);
            }
        }
        throw new NoSuchMethodException(method);
    }

    public static Object invokeStatic(Method method, Map<String, String[]> args) throws Exception {
        return method.invoke(null, prepareArgs(method, args));
    }

    public static Object invokeStatic(Method method, Object[] args) throws Exception {
        return method.invoke(null, args);
    }

    static Object[] prepareArgs(Method method, Map<String, String[]> args) throws Exception {
        String[] paramsNames = parameterNames(method);
        if (paramsNames == null && method.getParameterTypes().length > 0) {
            throw new UnexpectedException("Parameter names not found for method " + method);
        }
        Object[] rArgs = new Object[method.getParameterTypes().length];
        for (int i = 0; i < method.getParameterTypes().length; i++) {
            rArgs[i] = Binder.bind(paramsNames[i], method.getParameterTypes()[i], method.getGenericParameterTypes()[i], method.getParameterAnnotations()[i], args);
        }
        return rArgs;
    }

    /**
     * Retrieve parameter names of a method
     */
    public static String[] parameterNames(Method method) throws Exception {
        try {
            return (String[]) method.getDeclaringClass().getDeclaredField("$" + method.getName() + LocalVariablesNamesTracer.computeMethodHash(method.getParameterTypes())).get(null);
        } catch (Exception e) {
            throw new UnexpectedException("Cannot read parameter names for " + method);
        }
    }

    public static String rawMethodSignature(Method method) {
        StringBuilder sig = new StringBuilder();
        sig.append(method.getDeclaringClass().getName());
        sig.append(".");
        sig.append(method.getName());
        sig.append('(');
        for (Class clazz : method.getParameterTypes()) {
            sig.append(rawJavaType(clazz));
        }
        sig.append(")");
        sig.append(rawJavaType(method.getReturnType()));
        return sig.toString();
    }

    public static String rawJavaType(Class clazz) {
        if (clazz.getName().equals("void")) {
            return "V";
        }
        if (clazz.getName().equals("boolean")) {
            return "Z";
        }
        if (clazz.getName().equals("byte")) {
            return "B";
        }
        if (clazz.getName().equals("char")) {
            return "C";
        }
        if (clazz.getName().equals("double")) {
            return "D";
        }
        if (clazz.getName().equals("float")) {
            return "F";
        }
        if (clazz.getName().equals("int")) {
            return "I";
        }
        if (clazz.getName().equals("long")) {
            return "J";
        }
        if (clazz.getName().equals("short")) {
            return "S";
        }
        if (clazz.getName().startsWith("[")) {
            return clazz.getName().replace('.', '/');
        }
        return "L" + (clazz.getName().replace('.', '/')) + ";";
    }

    /**
     * Find all annotated method from a class
     * @param clazz The class
     * @param annotationType The annotation class
     * @return A list of method object
     */
    public static List<Method> findAllAnnotatedMethods(Class<?> clazz, Class<? extends Annotation> annotationType) {
        List<Method> methods = new ArrayList<Method>();
        // Clazz can be null if we are looking at an interface / annotation
        while (clazz != null && !clazz.equals(Object.class)) {
            for (Method method : clazz.getDeclaredMethods()) {
                if (method.isAnnotationPresent(annotationType)) {
                    methods.add(method);
                }
            }
            if (clazz.isAnnotationPresent(With.class)) {
                for (Class withClass : clazz.getAnnotation(With.class).value()) {
                    methods.addAll(findAllAnnotatedMethods(withClass, annotationType));
                }
            }
            clazz = clazz.getSuperclass();
        }
        return methods;
    }

   /**
     * Find all annotated method from a class
     * @param classes The classes
     * @param annotationType The annotation class
     * @return A list of method object
     */
    public static List<Method> findAllAnnotatedMethods(List<Class> classes, Class<? extends Annotation> annotationType) {
        List<Method> methods = new ArrayList<Method>();
        for (Class clazz : classes) {
            methods.addAll(findAllAnnotatedMethods(clazz, annotationType));
        }
        return methods;
    }

    public static void findAllFields(Class clazz, Set<Field> found) {
        Field[] fields = clazz.getDeclaredFields();
        for (int i = 0; i < fields.length; i++) {
            found.add(fields[i]);
        }
        Class sClazz = clazz.getSuperclass();
        if (sClazz != null && sClazz != Object.class) {
            findAllFields(sClazz, found);
        }
    }

    /** cache */
    private static Map<Field, FieldWrapper> wrappers = new HashMap<Field, FieldWrapper>();

    public static FieldWrapper getFieldWrapper(Field field) {
        if (wrappers.get(field) == null) {
            FieldWrapper fw = new FieldWrapper(field);
            play.Logger.trace("caching %s", fw);
            wrappers.put(field, fw);
        }
        return wrappers.get(field);
    }

    public static byte[] serialize(Object o) throws Exception {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oo = new ObjectOutputStream(baos);
        oo.writeObject(o);
        oo.flush();
        oo.close();
        return baos.toByteArray();
    }

    public static Object deserialize(byte[] b) throws Exception {
        ByteArrayInputStream bais = new ByteArrayInputStream(b);
        ObjectInputStream oi = new ObjectInputStream(bais);
        return oi.readObject();
    }

    /**
     * Field accessor
     * set and get value for a property, using the getter/setter when it exists or direct access otherwise.
     * final, native or static properties are safely ignored
     */
    public static class FieldWrapper {

        final static int unwritableModifiers = Modifier.FINAL | Modifier.NATIVE | Modifier.STATIC;
        private Method setter;
        private Method getter;
        private Field field;
        private boolean writable;
        private boolean accessible;

        private FieldWrapper(Method setter, Method getter) {
            this.setter = setter;
            this.getter = getter;
        }

        private FieldWrapper(Field field) {
            this.field = field;
            accessible = field.isAccessible();
            writable = ((field.getModifiers() & unwritableModifiers) == 0);
            String property = field.getName();
            try {
                String setterMethod = "set" + property.substring(0, 1).toUpperCase() + property.substring(1);
                setter = field.getDeclaringClass().getMethod(setterMethod, field.getType());
            } catch (Exception ex) {
            }
            try {
                String getterMethod = "get" + property.substring(0, 1).toUpperCase() + property.substring(1);
                getter = field.getDeclaringClass().getMethod(getterMethod);
            } catch (Exception ex) {
            }
        }

        public boolean isModifiable() {
            return writable;
        }

        public void setValue(Object instance, Object value) {
            if (!writable) {
                return;
            }
            try {
                if (setter != null) {
                    play.Logger.trace("invoke setter %s on %s with value %s", setter, instance, value);
                    setter.invoke(instance, value);
                } else {
                    if (!accessible) {
                        field.setAccessible(true);
                    }
                    play.Logger.trace("field.set(%s, %s)", instance, value);
                    field.set(instance, value);
                    if (!accessible) {
                        field.setAccessible(accessible);
                    }
                }
            } catch (Exception ex) {
                play.Logger.info("ERROR: when setting value for field %s - %s", field, ex);
            }
        }

        public Object getValue(Object instance) {
            try {
                if (getter != null) {
                    return getter.invoke(instance);
                } else {
                    return field.get(instance);
                }
            } catch (Exception ex) {
                play.Logger.info("ERROR: when getting value for field %s - %s", field, ex);
            }
            return null;
        }

        @Override
        public String toString() {
            return "FieldWrapper (" + (writable ? "RW" : "R ") + ") for " + field;
        }
    }

}


...your STUFF from Chaos to Order.
dispersal solutions recognizes the extra responsibilities and added stress of settling an estate; downsizing; a Senior's transition and/or dissolving a partnership.
all of our dispersal.solutions are full-service and specifically designed to reduce the many burdens, overwhelm and emotional toll associated with these life changing situations.
We work empathetically and efficiently with you and your loved ones in order to reach your end goals and the well being of all.


text:
WEYDEMANN BROS. (COLOGNE)
COLOGNE 03:19 (UTC+1)
50823 COLOGNE, GERMANY
Weydemann Bros. produces films for the national and the international market. We have a vision of a narrative cinema that is both entertaining and political. For us film is always a critical look at the world and the times we live in. With our films we do not only hope to get people laughing and crying, but to inform them and inspire them to contemplate. Weydemann Bros. is alumni of the start-up grant 'Mediengründerzentrum Köln' and we have won the Robert Bosch Co-Production Prize 2010 and 2011 and the Gerd Ruge Stipendium 2010 and 2011, as well as the First Steps Award 2014. Our films have been shown on festivals around the world like the Berlinale, Shanghai, Moscow, Rome, Guadalajara, Los Angeles, San Sebastian, Sarajevo, Sofia, Thessaloniki, Hamburg, St. Petersburg and many more and have won various international prizes, among which an official entry for the Best Foreign Language Oscar.Weydemann Bros. are members of the German Producers Association VDFP, the Film and Media Ass