text:
<?php

namespace GhaenCollege\ScrumBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * BasicInfo
 *
 * @ORM\Table(name="basic_info")
 * @ORM\Entity
 */
class BasicInfo
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="create_date", type="string", length=10)
     */
    private $createDate;

    /**
     * @var string
     *
     * @ORM\Column(name="start_date", type="string", length=10)
     */
    private $startDate;

    /**
     * @var string
     *
     * @ORM\Column(name="end_date", type="string", length=10)
     */
    private $endDate;

    /**
     * @ORM\ManyToOne(targetEntity="User",inversedBy="constructions")
     * @ORM\JoinColumn(name="builder_id",referencedColumnName="id")
     */
    protected $builder;

    /**
     * @ORM\OneToOne(targetEntity="Sprint",mappedBy="basicInfo")
     *
     */
    protected $sprint;

    /**
     * @ORM\OneToOne(targetEntity="Project",mappedBy="basicInfo")
     *
     */
    protected $project;

    /**
     * @ORM\OneToOne(targetEntity="Backlog",mappedBy="basicInfo")
     *
     */
    protected $backlog;

    /**
     * @ORM\OneToOne(targetEntity="Task",mappedBy="basicInfo")
     *
     */
    protected $task;

    /**
     * @ORM\OneToOne(targetEntity="Test",mappedBy="basicInfo")
     *
     */
    protected $test;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set createDate
     *
     * @param string $createDate
     * @return BasicInfo
     */
    public function setCreateDate($createDate)
    {
        $this->createDate = $createDate;

        return $this;
    }

    /**
     * Get createDate
     *
     * @return string
     */
    public function getCreateDate()
    {
        return $this->createDate;
    }

    /**
     * Set startDate
     *
     * @param string $startDate
     * @return BasicInfo
     */
    public function setStartDate($startDate)
    {
        $this->startDate = $startDate;

        return $this;
    }

    /**
     * Get startDate
     *
     * @return string
     */
    public function getStartDate()
    {
        return $this->startDate;
    }

    /**
     * Set endDate
     *
     * @param string $endDate
     * @return BasicInfo
     */
    public function setEndDate($endDate)
    {
        $this->endDate = $endDate;

        return $this;
    }

    /**
     * Get endDate
     *
     * @return string
     */
    public function getEndDate()
    {
        return $this->endDate;
    }

    /**
     * Set sprint
     *
     * @param \GhaenCollege\ScrumBundle\Entity\Sprint $sprint
     * @return BasicInfo
     */
    public function setSprint(\GhaenCollege\ScrumBundle\Entity\Sprint $sprint = null)
    {
        $this->sprint = $sprint;

        return $this;
    }

    /**
     * Get sprint
     *
     * @return \GhaenCollege\ScrumBundle\Entity\Sprint
     */
    public function getSprint()
    {
        return $this->sprint;
    }

    /**
     * Set project
     *
     * @param \GhaenCollege\ScrumBundle\Entity\Project $project
     * @return BasicInfo
     */
    public function setProject(\GhaenCollege\ScrumBundle\Entity\Project $project = null)
    {
        $this->project = $project;

        return $this;
    }

    /**
     * Get project
     *
     * @return \GhaenCollege\ScrumBundle\Entity\Project
     */
    public function getProject()
    {
        return $this->project;
    }

    /**
     * Set backlog
     *
     * @param \GhaenCollege\ScrumBundle\Entity\Backlog $backlog
     * @return BasicInfo
     */
    public function setBacklog(\GhaenCollege\ScrumBundle\Entity\Backlog $backlog = null)
    {
        $this->backlog = $backlog;

        return $this;
    }

    /**
     * Get backlog
     *
     * @return \GhaenCollege\ScrumBundle\Entity\Backlog
     */
    public function getBacklog()
    {
        return $this->backlog;
    }

    /**
     * Set task
     *
     * @param \GhaenCollege\ScrumBundle\Entity\Task $task
     * @return BasicInfo
     */
    public function setTask(\GhaenCollege\ScrumBundle\Entity\Task $task = null)
    {
        $this->task = $task;

        return $this;
    }

    /**
     * Get task
     *
     * @return \GhaenCollege\ScrumBundle\Entity\Task
     */
    public function getTask()
    {
        return $this->task;
    }

    /**
     * Set test
     *
     * @param \GhaenCollege\ScrumBundle\Entity\Test $test
     * @return BasicInfo
     */
    public function setTest(\GhaenCollege\ScrumBundle\Entity\Test $test = null)
    {
        $this->test = $test;

        return $this;
    }

    /**
     * Get test
     *
     * @return \GhaenCollege\ScrumBundle\Entity\Test
     */
    public function getTest()
    {
        return $this->test;
    }

    /**
     * Set builder
     *
     * @param \GhaenCollege\ScrumBundle\Entity\User $builder
     * @return BasicInfo
     */
    public function setBuilder(\GhaenCollege\ScrumBundle\Entity\User $builder = null)
    {
        $this->builder = $builder;

        return $this;
    }

    /**
     * Get builder
     *
     * @return \GhaenCollege\ScrumBundle\Entity\User
     */
    public function getBuilder()
    {
        return $this->builder;
    }

    public function __toString()
    {
        return (string) $this->getId();
    }
}


text:
using System;

namespace SFA.DAS.ProviderApprenticeshipsService.Domain.ContractFeed
{
    public class ContractFeedEvent
    {
        public Guid Id { get; set; }
        public long ProviderId { get; set; }
        public string HierarchyType { get; set; }
        public string FundingTypeCode { get; set; }
        public string Status { get; set; }
        public string ParentStatus { get; set; }
        public DateTime Updated { get; set; }

        public int PageNumber { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.asus.ctc.ie.utilities.servers;

import java.io.*;
import java.net.*;
import java.util.*;

import com.asus.ctc.ie.config.GlobalProperties;
import com.asus.ctc.ie.utilities.AnalysisUtilities;

import edu.cmu.ark.DiscriminativeTagger;
import edu.cmu.ark.LabeledSentence;
import edu.stanford.nlp.trees.Tree;
import edu.cmu.ark.*;

/**
 * Wrapper class for the Supersense tagger server
 * @author Sanjay_Meena
 *
 */
public class SuperSenseWrapper {

    String modelPath;
    String propertiesFilePath;
	private SuperSenseWrapper(){
		sst = null;
		//String str=GlobalProperties.prefixPath+GlobalProperties.getProperties(1).getProperty("propertiesFilePath");
		DiscriminativeTagger.loadProperties(GlobalProperties.getProperties(1).getProperty("propertiesFilePath",
			"resources" + File.separator + "core_ie_resources"+File.separator+"ie_data"+File.separator+"ie_properties.properties"));

	}

	/**
	 * @return instance
	 */
	public static SuperSenseWrapper getInstance(){
		if(instance == null){
			instance = new SuperSenseWrapper();
		}
		return instance;
	}

	private LabeledSentence generateSupersenseTaggingInput(Tree sentence){
		LabeledSentence res = new LabeledSentence();
		List<Tree> leaves = sentence.getLeaves();

		for(int i=0;i<leaves.size();i++){
			String word = leaves.get(i).label().value();
			Tree preterm = leaves.get(i).parent(sentence);
			String pos = preterm.label().value();
			String stem = AnalysisUtilities.getInstance().getLemma(word, pos);
			res.addToken(word, stem, pos, "0");
		}

		return res;
	}

	/**
	 * @param sentence
	 * @return list
	 */
	public List<String> annotateMostFrequentSenses(Tree sentence) {
		int numleaves = sentence.getLeaves().size();
		if(numleaves <= 1){
			return new ArrayList<String>();
		}
		LabeledSentence labeled = generateSupersenseTaggingInput(sentence);
		labeled.setMostFrequentSenses(SuperSenseFeatureExtractor.getInstance().extractFirstSensePredictedLabels(labeled));
		return labeled.getMostFrequentSenses();
	}

	/**
	 * @param sentence
	 * @return list
	 */
	public List<String> annotateSentenceWithSupersenses(Tree sentence) {
		List<String> result = new ArrayList<String>();

		int numleaves = sentence.getLeaves().size();
		if(numleaves <= 1){
			return result;
		}
		LabeledSentence labeled = generateSupersenseTaggingInput(sentence);

		//see if a NER socket server is available
        int port = new Integer(GlobalProperties.getProperties(1).getProperty("supersenseServerPort","5555"));
        String host = "127.0.0.1";
        Socket client;
        PrintWriter pw;
        BufferedReader br;
        String line;
		try{
			client = new Socket(host, port);

			pw = new PrintWriter(client.getOutputStream());
			br = new BufferedReader(new InputStreamReader(client.getInputStream()));
			String inputStr = "";
			for(int i=0;i<labeled.length(); i++){
				String token = labeled.getTokens().get(i);
				String stem = labeled.getStems().get(i);
				String pos = labeled.getPOS().get(i);
				inputStr += token+"\t"+stem+"\t"+pos+"\n";
			}
			pw.println(inputStr);
			pw.flush(); //flush to complete the transmission

			while((line = br.readLine())!= null){
				String [] parts = line.split("\\t");
				if(parts.length==1) continue;
				result.add(parts[2]);
			}
			br.close();
			pw.close();
			client.close();

		} catch (Exception ex) {
			if(GlobalProperties.getDebug()) System.err.println("Could not connect to SST server.");
		}

		//if socket server not available, then use a local NER object
		if(result.size() == 0){
			try {
				if(sst == null){
					sst = DiscriminativeTagger.loadModel(GlobalProperties.getProperties(1).getProperty("supersenseModelFile", "config"+File.separator+"supersenseModelAllSemcor.ser.gz"));
				}
				sst.findBestLabelSequenceViterbi(labeled, sst.getWeights());
				for(String pred: labeled.getPredictions()){
					result.add(pred);
				}
			} catch (Exception e){
				e.printStackTrace();
			}
		}

		//add a bunch of blanks if necessary
		while(result.size() < numleaves) result.add("0");

		if(GlobalProperties.getDebug()) System.err.println("annotateSentenceSST: "+result);
		return result;
	}

	private DiscriminativeTagger sst;
	private static SuperSenseWrapper instance;

}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <gradient
        android:angle="90"
        android:endColor="#8000BCD4"
        android:startColor="#FF00BCD4" />
</shape>


text:
% The MIT License
%
% Copyright (c) 2015 Avi Singh
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in
% all copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
% THE SOFTWARE.

%% the objective function (the reprojection error) which is minimized using
% levenberg-marquardt optimization method
% The parameters
function F = minimize(PAR, F1, F2, W1, W2, P1)
r = PAR(1:3);
t = PAR(4:6);
%F1, F2 -> 2d coordinates of features in I1_l, I2_l
%W1, W2 -> 3d coordinates of the features that have been triangulated
%P1, P2 -> Projection matrices for the two cameras
%r, t -> 3x1 vectors, need to be varied for the minimization
F = zeros(2*size(F1,1), 3);
reproj1 = zeros(size(F1,1), 3);
reproj2 = zeros(size(F1,1), 3);

dcm = angle2dcm( r(1), r(2), r(3), 'ZXZ' );
tran = [ horzcat(dcm, t); [0 0 0 1]];

for k = 1:size(F1,1)
    f1 = F1(k, :)';
    f1(3) = 1;
    w2 = W2(k, :)';
    w2(4) = 1;

    f2 = F2(k, :)';
    f2(3) = 1;
    w1 = W1(k, :)';
    w1(4) = 1;

    f1_repr = P1*(tran)*w2;
    f1_repr = f1_repr/f1_repr(3);
    f2_repr = P1*pinv(tran)*w1;
    f2_repr = f2_repr/f2_repr(3);

    reproj1(k, :) = (f1 - f1_repr);
    reproj2(k, :) = (f2 - f2_repr);
end

F = [reproj1; reproj2];


text:
package shedar.mods.ic2.nuclearcontrol.api;

/**
 * Enum of card states. Used as return value of
 * {@link IPanelDataSource#update(net.minecraft.tileentity.TileEntity, ICardWrapper, int)}
 * . If card state is OK or CUSTOM_ERROR, then
 * {@link IPanelDataSource#getStringData(int, ICardWrapper, boolean)} will be
 * called. Otherwise standard message will be displayed.
 *
 * @author Shedar
 */
public enum CardState {
	/**
	 * All required data found, ready to display it
	 */
	OK(1),

	/**
	 * Target block doesn't exist or has invalid type
	 */
	NO_TARGET(2),

	/**
	 * Target is out of range
	 */
	OUT_OF_RANGE(3),

	/**
	 * Card doesn't have required fields. Maybe was spawned via NEI
	 */
	INVALID_CARD(4),

	/**
	 * Reserved for future use
	 */
	CUSTOM_ERROR(5);

	private final int index;

	CardState(int index) {
		this.index = index;
	}

	public int getIndex() {
		return index;
	}

	public static CardState fromInteger(int value) {
		switch (value) {
		case 1:
			return OK;
		case 2:
			return NO_TARGET;
		case 3:
			return OUT_OF_RANGE;
		case 4:
			return INVALID_CARD;
		case 5:
			return CUSTOM_ERROR;
		}
		return CUSTOM_ERROR;
	}
}


text:
/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: Apache Tomcat/7.0.59
 * Generated at: 2017-07-20 08:16:07 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.WEB_002dINF.pages;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fif_0026_005ftest;
  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }

  public void _jspDestroy() {
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.release();
    _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.release();
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");
      out.write("    \n");
      out.write("        <title>Login Page</title>\n");
      out.write("        \n");
      out.write("        \n");
      out.write("        \n");
      out.write("        \n");
      out.write("\n");
      out.write("        \n");
      out.write("        <link rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/x-icon\"/>\n");
      out.write("        \n");
      out.write("        <link rel=\"stylesheet\" href=\"plugins/bootstrap/css/bootstrap.min.css\"/>\n");
      out.write("        \n");
      out.write("        <link rel=\"stylesheet\" href=\"css/font-awesome.min.css\"/>\n");
      out.write("        \n");
      out.write("        <link rel=\"stylesheet\" href=\"css/animate.css\"/>\n");
      out.write("        \n");
      out.write("        <link rel=\"stylesheet\" href=\"css/main.css\"/>\n");
      out.write("        \n");
      out.write("\n");
      out.write("\n");
      out.write("    </style>\n");
      out.write("\n");
      out.write("\n");
      out.write("
\n");
      out.write("        \n");
      out.write("            \n");
      out.write("
\n");
      out.write("                WebGoat\n");
      out.write("
\n");
      out.write("            \n");
      out.write("
\n");
      out.write("\n");
      out.write("
\n");
      out.write("
\n");
      out.write("                \n");
      out.write("
\n");
      out.write("\n");
      out.write("        \n");
      out.write("
\n");
      out.write("\n");
      out.write("
\n");
      out.write("                ");
      if (_jspx_meth_c_005fif_005f0(_jspx_page_context))
        return;
      out.write("\n");
      out.write("                ");
      if (_jspx_meth_c_005fif_005f1(_jspx_page_context))
        return;
      out.write("\n");
      out.write("

\n");
      out.write("                <form role=\"form\" name='loginForm' action=\"");
      if (_jspx_meth_c_005furl_005f0(_jspx_page_context))
        return;
      out.write("\" method='POST' style=\"width: 400px;\">\n");
      out.write("
\n");
      out.write("                        Username\n");
      out.write("                        <input type=\"text\" class=\"form-control\" id=\"exampleInputEmail1\" placeholder=\"Username\" name='username'>\n");
      out.write("
\n");
      out.write("
\n");
      out.write("                        Password\n");
      out.write("                        <input type=\"password\" class=\"form-control\" id=\"exampleInputPassword1\" placeholder=\"Password\" name='password'>\n");
      out.write("
\n");
      out.write("\n");
      out.write("\n");
      out.write("                    <input type=\"hidden\" name=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${_csrf.parameterName}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false));
      out.write("\"\n");
      out.write("                           value=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${_csrf.token}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false));
      out.write("\" />\n");
      out.write("                    <button class=\"btn btn-large btn-primary\" type=\"submit\">Sign in</button>\n");
      out.write("                </form>\n");
      out.write("

\n");
      out.write("
The following accounts are built into Webgoat
\n");
      out.write("
\n");
      out.write("
\n");
      out.write("
Account	User	Password
\n");
      out.write("
\n");
      out.write("
\n");
      out.write("
Webgoat User	guest	guest
\n");
      out.write("
Webgoat Admin	webgoat	webgoat
\n");
      out.write("
\n");
      out.write("
\n");
      out.write("

\n");
      out.write("\n");
      out.write("\n");
      out.write("
\n");
      out.write("
 \n");
      out.write("
\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_c_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
    _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005fif_005f0.setParent(null);
    // /WEB-INF/pages/login.jsp(44,16) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${not empty error}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue());
    int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
    if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      do {
        out.write("\n");
        out.write("
");
        out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${error}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false));
        out.write("
\n");
        out.write("                ");
        int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
    }
    if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
    return false;
  }

  private boolean _jspx_meth_c_005fif_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
    _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
    _jspx_th_c_005fif_005f1.setParent(null);
    // /WEB-INF/pages/login.jsp(47,16) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fif_005f1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${not empty msg}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue());
    int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
    if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      do {
        out.write("\n");
        out.write("
");
        out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${msg}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false));
        out.write("
\n");
        out.write("                ");
        int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
    }
    if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
      return true;
    }
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
    return false;
  }

  private boolean _jspx_meth_c_005furl_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:url
    org.apache.taglibs.standard.tag.rt.core.UrlTag _jspx_th_c_005furl_005f0 = (org.apache.taglibs.standard.tag.rt.core.UrlTag) _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.UrlTag.class);
    _jspx_th_c_005furl_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005furl_005f0.setParent(null);
    // /WEB-INF/pages/login.jsp(51,59) name = value type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005furl_005f0.setValue("j_spring_security_check");
    int _jspx_eval_c_005furl_005f0 = _jspx_th_c_005furl_005f0.doStartTag();
    if (_jspx_th_c_005furl_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.reuse(_jspx_th_c_005furl_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.reuse(_jspx_th_c_005furl_005f0);
    return false;
  }
}


text:
layout: post
title: '1 Syawal 1435H'
date: '2014-07-28 07:30:00'
---

Selamat Hari Raya Aidilfitri.
Mohon ampun dan maaf,
zahir dan batin,
daripada saya dan keluarga.

Mari kita semua berdoa agar seluruh umat Islam dapat meraikan Hari Raya tahun ini di dalam keadaan sempurna dan sentiasa berada dalam lindungan Allah s.w.t. tidak kira di mana jua mereka berada.

Saya juga ingin memohon maaf bagi pihak arwah isteri tercinta; Allahyarhamah [Salmi Syahirah](http://www.amischaheera.com/);[@amischaheera](http://instagram.com/amischaheera); sekiranya arwah ada melakukan kesalahan dan kesilapan sepanjang hidupnya di dunia ini.

Semoga arwah sentiasa berada dalam keadaan yang tenang di sana dan ditempatkan di kalangan orang-orang yang beriman.

InsyaAllah.

<iframe src="https://embed.spotify.com/?uri=spotify:track:2bbmmMoj24dhmFpuaalJJm" frameborder="0" allowtransparency="true" width="300" height="80"></iframe>


text:
    defined(USE_HEAPCHECKER)

#include "third_party/tcmalloc/chromium/src/gperftools/heap-checker.h"

#define ANNOTATE_SCOPED_MEMORY_LEAK \
    HeapLeakChecker::Disabler heap_leak_checker_disabler; static_cast<void>(0)

#define ANNOTATE_LEAKING_OBJECT_PTR(X) \
    HeapLeakChecker::IgnoreObject(X)

#elif defined(LEAK_SANITIZER) && !defined(OS_NACL)

extern "C" {
void __lsan_disable();
void __lsan_enable();
void __lsan_ignore_object(const void *p);
}  // extern "C"

class ScopedLeakSanitizerDisabler {
 public:
  ScopedLeakSanitizerDisabler() { __lsan_disable(); }
  ~ScopedLeakSanitizerDisabler() { __lsan_enable(); }
 private:
  DISALLOW_COPY_AND_ASSIGN(ScopedLeakSanitizerDisabler);
};

#define ANNOTATE_SCOPED_MEMORY_LEAK \
    ScopedLeakSanitizerDisabler leak_sanitizer_disabler; static_cast<void>(0)

#define ANNOTATE_LEAKING_OBJECT_PTR(X) __lsan_ignore_object(X);

#else

// If neither HeapChecker nor LSan are used, the annotations should be no-ops.
#define ANNOTATE_SCOPED_MEMORY_LEAK ((void)0)
#define ANNOTATE_LEAKING_OBJECT_PTR(X) ((void)0)

#endif

#endif  // BASE_DEBUG_LEAK_ANNOTATIONS_H_


text:
package org.jasig.cas.authentication.principal;

import org.apache.commons.lang3.builder.HashCodeBuilder;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * UsernamePasswordCredentials respresents the username and password that a user
 * may provide in order to prove the authenticity of who they say they are.
 *
 * @author Scott Battaglia
 * @since 3.0.0
 * <p>
 * This is a published and supported CAS Server 3 API.
 * </p>
 */
public class UsernamePasswordCredentials implements Credentials {

    /** Unique ID for serialization. */
    private static final long serialVersionUID = -8343864967200862794L;

    /** The username. */
    @NotNull
    @Size(min=1, message = "required.username")
    private String username;

    /** The password. */
    @NotNull
    @Size(min=1, message = "required.password")
    private String password;

    /**
     * @return Returns the password.
     */
    public final String getPassword() {
        return this.password;
    }

    /**
     * @param password The password to set.
     */
    public final void setPassword(final String password) {
        this.password = password;
    }

    /**
     * @return Returns the userName.
     */
    public final String getUsername() {
        return this.username;
    }

    /**
     * @param userName The userName to set.
     */
    public final void setUsername(final String userName) {
        this.username = userName;
    }

    @Override
    public String toString() {
        return "[username: " + this.username + "]";
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        final UsernamePasswordCredentials that = (UsernamePasswordCredentials) o;

        if (password != null ? !password.equals(that.password) : that.password != null) {
            return false;
        }

        if (username != null ? !username.equals(that.username) : that.username != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder()
                .append(username)
                .append(password)
                .toHashCode();

    }
}


text:
// Copyright (C) 2018-2020 Alibaba Group Holding Limited
// Adaptations to ESP-IDF Copyright (c) 2020 Espressif Systems (Shanghai) Co. Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <stdio.h>
#include <string.h>
#include <errno.h>

#include "esp_ble_mesh_defs.h"
#include "esp_ble_mesh_common_api.h"
#include "esp_ble_mesh_networking_api.h"
#include "esp_ble_mesh_local_data_operation_api.h"

#include "genie_mesh.h"
#include "genie_reset.h"
#include "genie_event.h"
#include "genie_util.h"
#include "ble_mesh_example_nvs.h"

static const char *TAG  = "genie_reset";
extern nvs_handle_t NVS_HANDLE;

util_timer_t g_genie_reset_timer;

// 1:need reset 0:no reset
uint8_t g_genie_reset_flag = 0;

uint8_t genie_reset_get_flag(void)
{
    return g_genie_reset_flag;
}

/**
 * @brief Set reset flag
 *
 * @param flag
 */
static void genie_reset_set_flag(uint8_t flag)
{
    g_genie_reset_flag = flag;
}

/**
 * @brief Reset timer callback timeout, Send event to genie event to handle reset action.
 *
 * @param p_timer
 */
static void genie_reset_done_timer_cb(void *p_timer)
{
    ENTER_FUNC();
    genie_event(GENIE_EVT_HW_RESET_DONE, NULL);
}

void genie_reset_done_timer_start(void)
{
    ENTER_FUNC();
    util_timer_init(&g_genie_reset_timer, genie_reset_done_timer_cb, NULL);
    util_timer_start(&g_genie_reset_timer, GENIE_RESET_WAIT_DONE_TIMEOUT);
}

/**
 * @brief Store reboot count in flash.
 *
 * @param count
 *
 * @return esp_err_t
 */
static esp_err_t genie_reset_write_count(uint8_t count)
{
    ENTER_FUNC();
    uint8_t   data = count;
    esp_err_t ret  = ESP_OK;

    ret = ble_mesh_nvs_store(NVS_HANDLE, GENIE_STORE_RESTART_COUNT_KEY, &data, sizeof(uint8_t));
    if (ret != ESP_OK) {
        ESP_LOGW(TAG, "Save the number of restarts within the set time");
    }

    return ret;
}

/**
 * @brief Read reboot count from flash.
 *
 * @param p_count
 * @return esp_err_t
 */
static esp_err_t genie_reset_read_count(uint8_t *p_count)
{
    ENTER_FUNC();
    bool      exist = false;
    esp_err_t ret   = ESP_OK;

    ret = ble_mesh_nvs_restore(NVS_HANDLE, GENIE_STORE_RESTART_COUNT_KEY, p_count, sizeof(uint8_t), &exist);
    if (ret != ESP_OK) {
        ESP_LOGW(TAG, "Load the number of restarts within the set time");
    }

    return ret;
}

/**
 * @brief GENIE_RESET_BY_REPEAT_TIMEOUT
 *
 * @param p_timer
 */
static void genie_reset_timer_cb(void *p_timer)
{
    ENTER_FUNC();
    uint8_t number = 0;

    genie_reset_write_count(number);
}

void genie_reset_clean_count(void)
{
    genie_reset_write_count(0);
    genie_reset_set_flag(0);
}

void genie_reset_by_repeat_init(void)
{
    ENTER_FUNC();
    uint8_t   count     = 0;
    esp_err_t flash_err = ESP_OK;

    /* we should check flash flag first */
    flash_err = genie_reset_read_count(&count);
    if (flash_err != ESP_OK) {
        ESP_LOGE(TAG, "flash read err");
        count = 0;
    }

    ESP_LOGI(TAG, "read count %d", count);

    count++;
    if (count == GENIE_RESET_BY_REPEAT_COUNTER) {
        ESP_LOGI(TAG, "Genie Event Reset By Repeat Notify");
        genie_event(GENIE_EVT_RESET_BY_REPEAT_NOTIFY, NULL);
    }

    /* update number and check if exceeded */
    if (count < GENIE_RESET_BY_REPEAT_COUNTER) {
        genie_reset_write_count(count);
        util_timer_init(&g_genie_reset_timer, genie_reset_timer_cb, NULL);
        util_timer_start(&g_genie_reset_timer, GENIE_RESET_BY_REPEAT_TIMEOUT);
    } else {
        //genie_event(GENIE_EVT_HW_RESET, NULL);
        ESP_LOGW(TAG, "genie_reset_set_flag need reset node");
        genie_reset_set_flag(1);
        util_timer_init(&g_genie_reset_timer, genie_reset_timer_cb, NULL);
        util_timer_start(&g_genie_reset_timer, GENIE_RESET_BY_REPEAT_TIMEOUT);
    }
    EXIT_FUNC();
}


text:
@class QBAssetCollectionViewController;

@protocol QBAssetCollectionViewControllerDelegate <NSObject>

@required
- (void)assetCollectionViewController:(QBAssetCollectionViewController *)assetCollectionViewController didFinishPickingAsset:(ALAsset *)asset;
- (void)assetCollectionViewController:(QBAssetCollectionViewController *)assetCollectionViewController didFinishPickingAssets:(NSArray *)assets;
- (void)assetCollectionViewControllerDidCancel:(QBAssetCollectionViewController *)assetCollectionViewController;
- (NSString *)descriptionForSelectingAllAssets:(QBAssetCollectionViewController *)assetCollectionViewController;
- (NSString *)descriptionForDeselectingAllAssets:(QBAssetCollectionViewController *)assetCollectionViewController;
- (NSString *)assetCollectionViewController:(QBAssetCollectionViewController *)assetCollectionViewController descriptionForNumberOfPhotos:(NSUInteger)numberOfPhotos;
- (NSString *)assetCollectionViewController:(QBAssetCollectionViewController *)assetCollectionViewController descriptionForNumberOfVideos:(NSUInteger)numberOfVideos;
- (NSString *)assetCollectionViewController:(QBAssetCollectionViewController *)assetCollectionViewController descriptionForNumberOfPhotos:(NSUInteger)numberOfPhotos numberOfVideos:(NSUInteger)numberOfVideos;

@end


text:
package name.lakhin.eliah.projects
package malvina.semantic

import name.lakhin.eliah.projects.malvina.syntax.Parser
import name.lakhin.eliah.projects.papacarlo.utils.Registry

final class Unit(val name: String, val global: Global) {
  private val parser = new Parser
  private var members = Map.empty[Int, Map[String, Member]]
  private[semantic] var errors = new Registry[SemanticError]

  def update(code: String) {
    parser.lexer.input(code)
  }

  for (root <- parser.syntax.getRootNode)
    root.onAddBranch.bind {
      branch =>
        branch.getKind match {
          case "type declaration" =>
            var members = Map(pair(new TypeDeclaration(this, branch)))

            if (branch.hasBranch("body"))
              members += pair(new FunctionInterface(this, branch))

            this.members += branch.getId -> members

          case "function declaration" =>

          case _ =>
        }
    }

  private def pair(member: Member) = member.phase -> member

  private[Compiler] def release() {
    for (member <- members.values.flatten) member._2.release()
    errors = new Registry[SemanticError]
  }

  private[Compiler] def resolve(references: List[Reference]) {
    for (reference <- references;
         member <- members
           .get(reference.nodeId)
           .flatMap(_.get(reference.phase)))
      member.resolve()
  }
}


text:
package org.jetbrains.jps.javac.ast;

import com.intellij.util.containers.Stack;
import com.sun.source.tree.*;
import com.sun.source.util.TreeScanner;
import org.jetbrains.jps.javac.ast.api.JavacDef;
import org.jetbrains.jps.javac.ast.api.JavacNameTable;
import org.jetbrains.jps.javac.ast.api.JavacRef;
import org.jetbrains.jps.javac.ast.api.JavacTypeCast;

import javax.lang.model.element.*;
import javax.lang.model.type.ArrayType;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;

class JavacTreeRefScanner extends TreeScanner<Tree, JavacReferenceCollectorListener.ReferenceCollector> {
  private static final Set<ElementKind> ALLOWED_ELEMENTS = EnumSet.of(ElementKind.ENUM,
                                                                      ElementKind.CLASS,
                                                                      ElementKind.ANNOTATION_TYPE,
                                                                      ElementKind.INTERFACE,
                                                                      ElementKind.ENUM_CONSTANT,
                                                                      ElementKind.FIELD,
                                                                      ElementKind.CONSTRUCTOR,
                                                                      ElementKind.METHOD);

  @Override
  public Tree visitCompilationUnit(CompilationUnitTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
    scan(node.getPackageAnnotations(), refCollector);
    scan(node.getTypeDecls(), refCollector);
    return node;
  }

  @Override
  public Tree visitIdentifier(IdentifierTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
    final Element element = refCollector.getReferencedElement(node);
    if (element == null) {
      return null;
    }
    if (ALLOWED_ELEMENTS.contains(element.getKind())) {
      refCollector.sinkReference(refCollector.asJavacRef(element));
    }
    return null;
  }

  @Override
  public Tree visitNewClass(NewClassTree node, JavacReferenceCollectorListener.ReferenceCollector collector) {
    if (node.getClassBody() == null) {
      final Element element = collector.getReferencedElement(node);
      if (element != null) {
        collector.sinkReference(collector.asJavacRef(element));
      }
    }
    return super.visitNewClass(node, collector);
  }

  @Override
  public Tree visitVariable(VariableTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
    final Element element = refCollector.getReferencedElement(node);
    if (element != null && element.getKind() == ElementKind.FIELD) {
      final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(element);
      if (ref != null) {
        processMemberDefinition(refCollector, ref, element, element.asType());
      }
    }
    return super.visitVariable(node, refCollector);
  }

  @Override
  public Tree visitMemberSelect(MemberSelectTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
    final Element element = refCollector.getReferencedElement(node);
    if (element != null && element.getKind() != ElementKind.PACKAGE) {
      ExpressionTree qualifierExpression = node.getExpression();
      Element qualifierType = null;
      TypeMirror type = refCollector.getType(qualifierExpression);
      if (type instanceof DeclaredType) {
        qualifierType = ((DeclaredType)type).asElement();
      }
      refCollector.sinkReference(refCollector.asJavacRef(element, qualifierType));
    }
    return super.visitMemberSelect(node, refCollector);
  }

  @Override
  public Tree visitMethod(MethodTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
    final Element element = refCollector.getReferencedElement(node);

    if (refCollector.getNameTable().isInit(node.getName()) &&
        myCurrentEnclosingElementOffset.peek() == refCollector.getStartOffset(node)) {
      return null;
    }

    if (element != null) {
      final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(element);
      if (ref != null) {
        processMemberDefinition(refCollector, ref, element, ((ExecutableElement)element).getReturnType());
      }
    }
    return super.visitMethod(node, refCollector);
  }

  private void processMemberDefinition(JavacReferenceCollectorListener.ReferenceCollector refCollector,
                                       JavacRef.JavacElementRefBase ref,
                                       Element element,
                                       TypeMirror retType) {
    refCollector.sinkReference(ref);
    byte dimension = 0;
    if (retType.getKind() == TypeKind.ARRAY) {
      retType = ((ArrayType)retType).getComponentType();
      dimension = 1;
    }
    else if (retType.getKind() == TypeKind.DECLARED) {
      List<? extends TypeMirror> typeArguments = ((DeclaredType)retType).getTypeArguments();
      if (typeArguments.size() == 1 && isIterator((TypeElement)((DeclaredType)retType).asElement(), refCollector)) {
        dimension = -1;
        retType = typeArguments.get(0);
      }
    }
    final JavacRef.JavacElementRefBase returnType = refCollector.asJavacRef(retType);
    if (returnType != null) {
      refCollector.sinkDeclaration(new JavacDef.JavacMemberDef(ref, returnType, dimension, isStatic(element)));
    }
  }

  @Override
  public Tree visitMethodInvocation(MethodInvocationTree node, JavacReferenceCollectorListener.ReferenceCollector collector) {
    if (node.getMethodSelect() instanceof IdentifierTree) {
      Element element = collector.getReferencedElement(node.getMethodSelect());
      if (element != null && element.getKind() != ElementKind.CONSTRUCTOR) {
        Set<Modifier> modifiers = element.getModifiers();
        if (!modifiers.contains(Modifier.STATIC) && !modifiers.contains(Modifier.PRIVATE)) {
          TypeElement currentClass = myCurrentEnclosingElement.peek();
          TypeElement actualQualifier = findQualifier(element, currentClass);
          //means java.lang.Object's method called from an interface
          if (actualQualifier == null) {
            actualQualifier = myCurrentEnclosingElement.peek();
          }
          collector.sinkReference(collector.asJavacRef(element, actualQualifier));
          scan(node.getTypeArguments(), collector);
          scan(node.getArguments(), collector);
          return null;
        }
      }
    }
    return super.visitMethodInvocation(node, collector);
  }

  private final Stack<TypeElement> myCurrentEnclosingElement = new Stack<TypeElement>(1);
  private final Stack<Long> myCurrentEnclosingElementOffset = new Stack<Long>(1);

  @Override
  public Tree visitClass(ClassTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
    TypeElement element = (TypeElement)refCollector.getReferencedElement(node);
    if (element == null) return null;
    myCurrentEnclosingElement.add(element);
    ModifiersTree modifiers = node.getModifiers();
    long modifiersEndOffset = refCollector.getEndOffset(modifiers);
    long startOffset = modifiersEndOffset == -1 ? refCollector.getStartOffset(node) : (modifiersEndOffset + 1);
    myCurrentEnclosingElementOffset.add(startOffset);
    try {
      final TypeMirror superclass = element.getSuperclass();
      final List<? extends TypeMirror> interfaces = element.getInterfaces();
      final JavacRef[] supers;
      if (superclass != refCollector.getTypeUtility().getNoType(TypeKind.NONE)) {
        supers = new JavacRef[interfaces.size() + 1];
        final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(superclass);
        if (ref == null) return null;
        supers[interfaces.size()] = ref;
      }
      else {
        supers = interfaces.isEmpty() ? JavacRef.EMPTY_ARRAY : new JavacRef[interfaces.size()];
      }

      int i = 0;
      for (TypeMirror anInterface : interfaces) {
        final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(anInterface);
        if (ref == null) return null;
        supers[i++] = ref;
      }
      final JavacRef.JavacElementRefBase aClass = refCollector.asJavacRef(element);
      if (aClass == null) return null;
      refCollector.sinkReference(aClass);
      refCollector.sinkDeclaration(new JavacDef.JavacClassDef(aClass, supers));
      super.visitClass(node, refCollector);
    } finally {
      myCurrentEnclosingElement.pop();
      myCurrentEnclosingElementOffset.pop();
    }
    return null;
  }

  @Override
  public Tree visitTypeCast(TypeCastTree node, JavacReferenceCollectorListener.ReferenceCollector collector) {
    super.visitTypeCast(node, collector);

    Element castType = collector.getReferencedElement(node.getType());
    if (castType == null) return null;
    JavacRef.JavacElementRefBase castTypeElement = collector.asJavacRef(castType);
    if (!(castTypeElement instanceof JavacRef.JavacClass)) return null;

    TypeMirror operandType = collector.getType(node.getExpression());
    if (operandType == null) return null;
    JavacRef.JavacElementRefBase operandTypeElement = collector.asJavacRef(operandType);
    if (!(operandTypeElement instanceof JavacRef.JavacClass)) return null;

    collector.sinkTypeCast(new JavacTypeCast((JavacRef.JavacClass) operandTypeElement, (JavacRef.JavacClass) castTypeElement));
    return null;
  }

  static JavacTreeRefScanner createASTScanner() {
    try {
      Class aClass = Class.forName("org.jetbrains.jps.javac.ast.Javac8RefScanner");
      return (JavacTreeRefScanner) aClass.newInstance();
    }
    catch (Throwable ignored) {
      return new JavacTreeRefScanner();
    }
  }

  private static boolean isStatic(Element element) {
    return element.getModifiers().contains(Modifier.STATIC);
  }

  private static TypeElement findQualifier(Element method, TypeElement scopeClass) {
    Element containingClass = method.getEnclosingElement();
    if (containingClass == null) return null;

    while (scopeClass != null) {
      Element parent = getClassOrPackageParent(scopeClass);
      if (scopeClass.getModifiers().contains(Modifier.STATIC) ||
          parent instanceof PackageElement ||
          isInheritorOrSelf(scopeClass, (TypeElement)containingClass)) {
        return scopeClass;
      }
      if (isPackageOrNull(parent)) {
        return null;
      }
      scopeClass = (TypeElement) parent;
    }

    return null;
  }

  private static boolean isIterator(TypeElement aClass, JavacReferenceCollectorListener.ReferenceCollector collector) {
    JavacNameTable table = collector.getNameTable();
    TypeElement iterable = table.getIterableElement();
    if (iterable != null && isInheritorOrSelf(aClass, iterable)) {
      return true;
    }
    TypeElement stream = table.getStreamElement();
    if (stream != null && isInheritorOrSelf(aClass, stream)) {
      return true;
    }
    TypeElement iterator = table.getIteratorElement();
    if (iterator != null && isInheritorOrSelf(aClass, iterator)) {
      return true;
    }
    return false;
  }

  private static Element getClassOrPackageParent(Element element) {
    element = element.getEnclosingElement();
    while (element != null) {
      ElementKind kind = element.getKind();
      if (kind == ElementKind.CLASS ||
          kind == ElementKind.INTERFACE ||
          kind == ElementKind.ENUM ||
          kind == ElementKind.PACKAGE) {
        return element;
      }
      element = element.getEnclosingElement();
    }
    return null;
  }

  private static boolean isPackageOrNull(Element element) {
    return element == null || element.getKind() == ElementKind.PACKAGE;
  }

  private static boolean isInheritorOrSelf(TypeElement aClass, TypeElement baseClass) {
    if (aClass == baseClass) return true;

    TypeMirror superType = aClass.getSuperclass();
    if (isTypeCorrespondsToElement(superType, baseClass)) {
      return true;
    }

    List<? extends TypeMirror> interfaces = aClass.getInterfaces();
    for (TypeMirror type : interfaces) {
      if (isTypeCorrespondsToElement(type, baseClass)) {
        return true;
      }
    }

    if (isInheritorOrSelf(superType, baseClass)) return true;

    for (TypeMirror type : interfaces) {
      if (isInheritorOrSelf(type, baseClass)) {
        return true;
      }
    }

    return false;
  }

  private static boolean isInheritorOrSelf(TypeMirror classType, TypeElement baseClass) {
    if (classType != null && classType.getKind() != TypeKind.NONE) {
      return isInheritorOrSelf((TypeElement)((DeclaredType) classType).asElement(), baseClass);
    }
    return false;
  }

  private static boolean isTypeCorrespondsToElement(TypeMirror type, TypeElement baseClass) {
    if (type != null && type.getKind() != TypeKind.NONE) {
      DeclaredType superClass = (DeclaredType)type;
      Element superClassElement = superClass.asElement();
      if (superClassElement == baseClass) return true;
    }
    return false;
  }
}


text:
[![Build Status](https://api.travis-ci.org/equivalent/extended_interpolation_string.png?branch=master)](http://travis-ci.org/equivalent/extended_interpolation_string)
[![Code Climate](https://codeclimate.com/github/equivalent/extended_interpolation_string.png)](https://codeclimate.com/github/equivalent/extended_interpolation_string)

# Extended interpolation for ruby string

When interpolating string with hash that includes lambda,
you can pass interpolator object upon which the lambda is
called before interpolating the hash.

```ruby
require 'ostruct'
user = OpenStruct.new(email_count: 20)

hello_string = 'hi %{user}, you have %{email_count} emails'

hello_string.class # => String
hello_string % { user: 'Joe', email_count: lambda { |user| user.email_count} }
# =>  "hi Joe, you have #<Proc:0x000000022a7928@(irb):9 (lambda)> emails"

# using this gem
extended_hello = hello_string.extended
extended_hello.class # => ExtendedInterpolationString
extended_hello.interpolator = user
extended_hello % { user: 'Joe', email_count: lambda { |user| user.email_count} }
#  "hi Joe, you have 20 emails"
```

## Installation

Add this line to your application's Gemfile:

    gem 'extended_interpolation_string'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install extended_interpolation_string

## Contributing

1. Fork it ( https://github.com/[my-github-username]/extended_interpolation_string/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
package so.raw.laoutil;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.view.View;
import android.widget.Toast;

public class LaoUtils {

	public static int ACT_PACKAGE_UNINSTALL = 0;
	public static int ACT_PACKAGE_INSTALL = 0;
	static {
		System.loadLibrary("lao");
	}

	/**
	 * ½«jsonÌî³äµ½javabeanÖÐ
	 * @param clazz
	 * @param jsonStr
	 * @return
	 * @throws JSONException
	 * @throws InstantiationException
	 * @throws IllegalAccessException
	 * @throws InvocationTargetException
	 */
	public static <T> T JSON2Maps(Class<T> clazz, String jsonStr)
			throws JSONException, InstantiationException,
			IllegalAccessException, InvocationTargetException {
		Map<String, Object> map = new HashMap<String, Object>();
		JSONObject json = new JSONObject(jsonStr);
		JSONArray names = json.names();
		for (int i = 0; i < names.length(); i++) {
			String key = names.getString(i);
			Object value = json.get(key);
			map.put(key, value);
		}
		T instance = clazz.newInstance();
		LaoBeanUtils.populate(instance, map);
		return instance;
	}

	/**
	 * ÓÃÓÚÌæ»»µ°ÌÛµÄfindViewById();
	 * @param aty
	 * @param id
	 * @param clazz
	 * @return
	 */
	public static <T extends View> T lfind(Activity aty, int id, Class<T> clazz) {
		View view = aty.findViewById(id);
		return clazz.cast(view);
	}

	/**
	 * Ôö¼ÓÒ»¸ö°üµÄ°²×°¡¢Ð¶ÔØ'þµÄ¼à¿ØÆ÷¡£
	 * @param action
	 * @param packageName
	 * @param runner
	 */
	public static native void addPackageListener(int action,
			String packageName, Runnable runner);

	/**
	 * Ô¤¶¨ÒåÒ»¸ö°ü¼à¿ØRunner£¬ÓÃÓÚ´ò¿ªÄ³Ò»ÍøÖ·.
	 * @author z(me@raw.so)
	 */
	public static class OpenUrl implements Runnable {
		private String url;
		private int version;

		/**
		 * ¹¹Ôì·½·¨£¬ÐèÒª´«ÈëÒ»¸öurlºÍÒ»¸ösdk°æ±¾ÐÅÏ¢¡£
		 * ¿ÉÓÃ	Build.VERSION.SDK_INT »ñÈ¡
		 * @param url
		 * @param sdkVersion
		 */
		public OpenUrl(String url, int sdkVersion) {
			this.url = url;
			this.version = sdkVersion;
		}

		public void run() {
			String prog = null;
			if (version > 16) {
				prog = "am start --user 0 -a android.intent.action.VIEW -d "
						+ url;
			} else {
				prog = "am start -a android.intent.action.VIEW -d " + url;
			}
			try {
				Runtime.getRuntime().exec(prog);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	/**
	 * ½«InputStreamת»»ÎªString
	 *
	 * @param InputStream is
	 * @param String charset
	 * @return String
	 * @throws UnsupportedEncodingException

	 */
	public static String converStream2String(InputStream is,String charset)
			throws UnsupportedEncodingException {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		byte[] buffer = new byte[512];
		int len = 0;

		try {
			while ((len = is.read(buffer)) != -1) {
				baos.write(buffer, 0, len);
			}
			is.close();
			return new String(baos.toByteArray());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return new String(baos.toByteArray(),charset);
	}

	/**
	 * ÎÞÂÛ×ÓÏ̻߳¹ÊÇ×ÓÏ߳̾ù¿ÉÏÔʾToast
	 *
	 * @param activity
	 *            ÉÏÏÂÎĶÔÏó
	 * @param msg
	 *            ÏûÏ¢ÄÚÈÝ
	 * @param duration
	 *            ʱ³¤ ¿ÉÒÔÑ¡Ôñ 0»ò1
	 */
	public static void ShowToast(final Activity activity, final String msg,
			final int duration) {
		// ÅжÏÊÇ·ñÖ÷Ïß³Ì
		if ("main0".equals(Thread.currentThread().getName())) {
			// µ±Ç°Ïß³ÌΪÖ÷Ïß³Ì
			Toast.makeText(activity, msg, duration).show();
		} else {
			activity.runOnUiThread(new Runnable() {

				@Override
				public void run() {
					// TODO Auto-generated method stub
					Toast.makeText(activity, msg, duration).show();
				}
			});
		}
	}
}


text:
use strict;
use warnings;
use utf8;

use FindBin qw($Bin);
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use
  Google::Ads::GoogleAds::V12::Services::RecommendationService::ApplyRecommendationOperation;
use Google::Ads::GoogleAds::V12::Utils::ResourceNames;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
use Cwd qw(abs_path);

# The following parameter(s) should be provided to run the example. You can
# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
# Recommendation ID is the last alphanumeric portion of the value from the
# resourceName field of a Recommendation, which has the format of
# customers/<customer_id>/recommendations/<recommendation_id>.
# Its example can be retrieved from get_text_ad_recommendations.pl.
my $recommendation_id = "INSERT_RECOMMENDATION_ID_HERE";

# [START apply_recommendation]
sub apply_recommendation {
  my ($api_client, $customer_id, $recommendation_id) = @_;

  my $recommendation_resource_name =
    Google::Ads::GoogleAds::V12::Utils::ResourceNames::recommendation(
    $customer_id, $recommendation_id);

  # Create an apply recommendation operation.
  my $apply_recommendation_operation =
    Google::Ads::GoogleAds::V12::Services::RecommendationService::ApplyRecommendationOperation
    ->new({
      resourceName => $recommendation_resource_name
    });

  # Each recommendation type has optional parameters to override the recommended values.
  # This is an example to override a recommended ad when a TextAdRecommendation is applied.
  # For details, please read
  # https://developers.google.com/google-ads/api/reference/rpc/latest/ApplyRecommendationOperation.
  #
  # my $overriding_ad = Google::Ads::GoogleAds::V12::Resources::Ad->new({
  #   id => "INSERT_AD_ID_AS_INTEGER_HERE"
  # });
  # my $text_ad_parameters =
  #   Google::Ads::GoogleAds::V12::Services::RecommendationService::TextAdParameters
  #   ->new({ad => $overriding_ad});
  # $apply_recommendation_operation->{textAd} = $text_ad_parameters;

  # Apply the recommendation.
  my $apply_recommendation_response =
    $api_client->RecommendationService()->apply({
      customerId => $customer_id,
      operations => [$apply_recommendation_operation]});

  printf "Applied recommendation with resource name: '%s'.\n",
    $apply_recommendation_response->{results}[0]{resourceName};

  return 1;
}
# [END apply_recommendation]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"       => \$customer_id,
  "recommendation_id=i" => \$recommendation_id,
);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.
pod2usage(2) if not check_params($customer_id, $recommendation_id);

# Call the example.
apply_recommendation($api_client, $customer_id =~ s/-//gr, $recommendation_id);

=pod

=head1 NAME

apply_recommendation

=head1 DESCRIPTION

This example applies a given recommendation. To retrieve recommendations for
text ads, run get_text_ad_recommendations.pl.

=head1 SYNOPSIS

apply_recommendation.pl [options]

    -help                       Show the help message.
    -customer_id                The Google Ads customer ID.
    -recommendation_id          The recommendation ID to apply.

=cut


text:
gpg, if not imported ever
```
[vagrant@kubedev-172-17-4-59 ~]$ sudo rpm --import http://127.0.0.1:48080/Downloads/workspace/src/github.com/tangfeixiong/go-to-kubernetes/https0x3A0x2F0x2Fkubernetes.io0x2Fdocs0x2Fsetup0x2Findependent0x2Finstall-kubeadm/https0x3A0x2F0x2Fpackages.cloud.google.com/yum/doc/yum-key.gpg
```

repo
```
[vagrant@kubedev-172-17-4-59 ~]$ curl -L http://127.0.0.1:48080/Downloads/workspace/src/github.com/tangfeixiong/go-to-kubernetes/https0x3A0x2F0x2Fkubernetes.io0x2Fdocs0x2Fsetup0x2Findependent0x2Finstall-kubeadm/etc0x2Fyum.repos.d/kubernetes.repo | sudo tee /etc/yum.repos.d/kubernetes.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1011  100  1011    0     0  31991      0 --:--:-- --:--:-- --:--:-- 37444
[kubernetes]
name=Kubernetes
#baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
        https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

### Modify URL first ###
[kubernetes-local-http]
name=Kubernetes offline - file server
baseurl=http://127.0.0.1:48080/Downloads/workspace/src/github.com/tangfeixiong/go-to-kubernetes/https0x3A0x2F0x2Fkubernetes.io0x2Fdocs0x2Fsetup0x2Findependent0x2Finstall-kubeadm/https0x3A0x2F0x2Fpackages.cloud.google.com/yum/
enabled=0
gpgcheck=0

### Modify path first ###
[kubernetes-local-file]
name=Kubernetes offline - downloads
baseurl=file:////Users/fanhongling/Downloads/workspace/src/github.com/tangfeixiong/go-to-kubernetes/https0x3A0x2F0x2Fkubernetes.io0x2Fdocs0x2Fsetup0x2Findependent0x2Finstall-kubeadm/https0x3A0x2F0x2Fpackages.cloud.google.com/yum/
enabled=0
gpgcheck=0

```

Issue
```
[vagrant@kubedev-172-17-4-59 ~]$ sudo dnf --disablerepo kubernetes --enablerepo kubernetes-local\* repolist
Failed to set locale, defaulting to C
Failed to synchronize cache for repo 'kubernetes-local-http', disabling.
Failed to synchronize cache for repo 'kubernetes-local-file', disabling.
Last metadata expiration check: 0:12:50 ago on Mon Dec 18 05:53:18 2017.
repo id                                                    repo name                                                                      status
*fedora                                                    Fedora 26 - x86_64                                                             53912
*updates                                                   Fedora 26 - x86_64 - Updates                                                   11821
```

https://unix.stackexchange.com/questions/390805/repos-not-working-on-fedora-error-failed-to-synchronize-cache-for-repo-update