text:
package kovacs

var (
	StdinDevNull     StdinType = stdinString("/dev/null")
	StdinNamePerLine StdinType = stdinString("NAME_PER_LINE")
)

type StdinType interface {
	stdinNoop()
}

type stdinString string

func (s stdinString) stdinNoop() {}

type StdinArray []string

func (s StdinArray) stdinNoop() {}

type Config struct {
	Settle               int        `json:"settle"`
	RootRestrictFiles    []string   `json:"root_restrict_files"`
	RootFiles            [][]string `json:"root_files"`
	EnforceRootFiles     bool       `json:"enforce_root_files"`
	IllegalFSTypes       []string   `json:"illegal_fstypes"`
	IllegalFSTypesAdvice string     `json:"illegal_fstypes_advice"`
	IgnoreVCS            []string   `json:"ignore_vcs"`
	IgnoreDirs           []string   `json:"ignore_dirs"`
	GCAgeSeconds         int        `json:"gc_age_seconds"`
	GCIntervalSeconds    int        `json:"gc_interval_seconds"`
	FSEventsLatency      float64    `json:"fsevents_latency"`
	IdleReapAgeSeconds   int        `json:"idle_reap_age_seconds"`
}

type File struct {
	Name    string
	Exists  bool
	Cclock  string
	Oclock  string
	Mtime   int64
	MtimeMs int64
	MtimeUs int64
	MtimeNs int64
	MtimeF  float64
	Ctime   int64
	CtimeMs int64
	CtimeUs int64
	CtimeNs int64
	CtimeF  float64
	Size    int
	Mode    int
	Uid     int
	Gid     int
	Ino     int
	Dev     int
	Nlink   int
	New     bool
}

type Path struct {
	Path  string
	Depth int
}

type QueryOptions struct {
	Suffix               []string   `json:"suffix,omitempty"`
	Since                string     `json:"since,omitempty"`
	Expression           Expression `json:"expression,omitempty"`
	Fields               []string   `json:"fields,omitempty"`
	Path                 []Path     `json:"path,omitempty"`
	SyncTimeout          int        `json:"sync_timeout,omitempty"`
	EmptyOnFreshInstance bool       `json:"empty_on_fresh_instance,omitempty"`
	RelativeRoot         string     `json:"relative_root,omitempty"`
}

type SubscriptionEvent struct {
	Version      string   `json:"version"`
	Clock        string   `json:"clock"`
	Files        []string `json:"files"`
	Root         string   `json:"root"`
	Subscription string   `json:"subscription"`
}

type SubscriptionOptions struct {
	Since    string
	Expr     Expression
	Fields   []string
	DeferVCS bool
}

type TriggerOptions struct {
	Name          string      `json:"name"`
	Command       []string    `json:"command"`
	AppendFiles   bool        `json:"append_files,omitempty"`
	Expression    interface{} `json:"expression"`
	Stdin         StdinType   `json:"stdin"`
	Stdout        string      `json:"stdout"`
	Stderr        string      `json:"stderr"`
	MaxFilesStdin int         `json:"max_files_stdin"`
	Chdir         string      `json:"chdir"`
	RelativeRoot  string      `json:"relative_root"`
}


text:
package com.example.charmer.moving.friendchat;

import android.os.AsyncTask;
import android.util.Log;
import android.widget.Button;

import com.example.charmer.moving.MainActivity;
import com.example.charmer.moving.MyApplicition.MyApplication;
import com.example.charmer.moving.R;
import com.example.charmer.moving.contantData.HttpUtils;
import com.example.charmer.moving.pojo.User;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2016/10/22.
 */
public class GetTokenAsyncTask extends AsyncTask<String,Integer,String> {
   private Button btn_friends;

    public GetTokenAsyncTask(Button btn_friends) {
        this.btn_friends = btn_friends;
    }

    private Integer j;
    private List<User> usersToken=new ArrayList<User>();//所有user的Token
    public  String Token;

    @Override
    protected void onPreExecute() {
        super.onPreExecute();
    }

    @Override
    protected void onPostExecute(String s) {
        super.onPostExecute(s);

    }

    @Override
    protected void onProgressUpdate(Integer... values) {
        super.onProgressUpdate(values);

    }

    @Override
    protected String doInBackground(String... params) {
       j= MainActivity.getUser().getUserid();
        Log.i("OOOOOOOOOO","asdasd"+j);
        RequestParams requestParams2=new RequestParams(HttpUtils.host4+"getalluserstoken");
        x.http().get(requestParams2, new Callback.CommonCallback<String>() {
            @Override
            public void onSuccess(String result) {
                Gson gson=new Gson();
                Type type=new TypeToken<List<User>>(){}.getType();
                Log.i("TokenSuccess",result);
                List<User> newusersToken=gson.fromJson(result,type);
                usersToken.addAll(newusersToken);
                //赋予当前用户token
                for (int i=0;i<usersToken.size();i++){
                    if(j==usersToken.get(i).getUserid()){
                        Token=usersToken.get(i).getUsertoken();
                        Log.i("Tooooo3","kennn"+Token);
                        setToken(Token);

                    }
                }

                btn_friends.setBackgroundResource(R.drawable.friends);
            }

            @Override
            public void onError(Throwable ex, boolean isOnCallback) {

            }

            @Override
            public void onCancelled(CancelledException cex) {

            }

            @Override
            public void onFinished() {

            }
        });
        return Token;
    }

    public  String getToken() {
        return Token;
    }

    public void setToken(String token) {
        Token = token;
    }

    @Override
    protected void onCancelled() {
        super.onCancelled();

    }
}

redpajama_set_name: RedPajamaGithub


text:
apetools.commons.broadcaster.Broadcaster.__iter__
=================================================

.. currentmodule:: apetools.commons.broadcaster

.. automethod:: Broadcaster.__iter__


text:
package com.eolwral.osmonitor.legacy.networks;

import java.io.File;
import java.io.FileWriter;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.net.InetAddress;
import java.net.URL;
import java.util.HashMap;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.app.TabActivity;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.view.GestureDetector;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.GestureDetector.OnGestureListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.webkit.WebView;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;

import com.eolwral.osmonitor.legacy.*;
import com.eolwral.osmonitor.legacy.preferences.Preferences;

public class NetworkList extends MapActivity implements OnGestureListener, OnTouchListener
{
	private JNIInterface JNILibrary = JNIInterface.getInstance();
	private NetworkListAdapter UpdateInterface = null;
    private NetworkInfoQuery NetworkInfo = null;

	private TextView EmptyMsg = null;

	private ProgressDialog ProcDialog = null;
    private EventHandler ProcHandler = null;
    private QueryWhois ProcThread = null;

	private boolean UseWhois = true;
	private boolean IP6to4 = true;
	private boolean RDNS = false;

	private WeakReference<FrameLayout> MapBodyRef = null;
	private MapView GeoIPMap = null;

	// Gesture
	private GestureDetector gestureScanner = new GestureDetector(this);;

    @Override
	public boolean onTouchEvent(MotionEvent me)
	{
		return gestureScanner.onTouchEvent(me);
	}

	@Override
	public boolean onDown(MotionEvent e)
	{
		return true;
	}

	@Override
	public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
	{
		try {
			if (Math.abs(e1.getY() - e2.getY()) > CommonUtil.SWIPE_MAX_OFF_PATH)
				return false;
			else if (e1.getX() - e2.getX() > CommonUtil.SWIPE_MIN_DISTANCE &&
							Math.abs(velocityX) > CommonUtil.SWIPE_THRESHOLD_VELOCITY)
				((TabActivity) this.getParent()).getTabHost().setCurrentTab(3);
			else if (e2.getX() - e1.getX() > CommonUtil.SWIPE_MIN_DISTANCE &&
							Math.abs(velocityX) > CommonUtil.SWIPE_THRESHOLD_VELOCITY)
				((TabActivity) this.getParent()).getTabHost().setCurrentTab(1);
			else
				return false;
		} catch (Exception e) {
			// nothing
		}

		return true;
	}

	@Override
	public void onLongPress(MotionEvent e)
	{
		return;
	}

	@Override
	public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
	{
		return false;
	}

	@Override
	public void onShowPress(MotionEvent e)
	{
		return;
	}

	@Override
	public boolean onSingleTapUp(MotionEvent e) {
		return false;
	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {

		// avoid exception - https://review.source.android.com/#/c/21318/
		try {
			event.getY();
		}
		catch (Exception e) {
			return false;
		}

		if(gestureScanner.onTouchEvent(event))
			return true;
		else
		{
			if(v.onTouchEvent(event))
				return true;
			return false;
		}
	}

	private Runnable runnable = new Runnable() {
		public void run() {

			if(JNILibrary.doDataLoad() == 1)
			{
		    	JNILibrary.doDataSwap();
		    	UpdateInterface.notifyDataSetChanged();

				if(EmptyMsg != null)
					EmptyMsg.setText("");
			}

	        handler.postDelayed(this, 1000);
		}
	};

	Handler handler = new Handler();

    public class  EventHandler extends Handler
    {
        public void handleMessage(Message msg)
        {
        	if(msg.obj != null)
        	{
        		CacheQuery WhoisQuery = (CacheQuery) msg.obj;
        		showWhois(WhoisQuery.Msg, WhoisQuery.Longtiude, WhoisQuery.Latitude);
        	}

        	if(ProcDialog != null)
        	{
            	ProcDialog.dismiss();
            	ProcDialog = null;
        	}
        }
    }

    class CacheQuery
    {
    	public String Msg;
    	public double Longtiude;
        public double Latitude;
    }

    private final HashMap<String, CacheQuery> CacheWhois = new HashMap<String, CacheQuery>();
	class QueryWhois extends Thread
	{
		public String QueryIP = "";
		public Boolean ForceStop = false;
		@Override
        public void run()
		{
			if(CacheWhois.get(QueryIP) != null)
			{
				if(!ForceStop)
				{
					CacheQuery WhoisQuery = CacheWhois.get(QueryIP);
					Message QueryResult = new Message();
					QueryResult.obj = WhoisQuery;
					ProcHandler.sendMessage(QueryResult);
				}
				return;
			}

			StringBuilder whoisInfo = new StringBuilder();
	        CacheQuery WhoisQuery = new CacheQuery();
			try {
				/* Create a URL we want to load some xml-data from. */
	            URL url = new URL("http://xml.utrace.de/?query="+QueryIP);

	            /* Get a SAXParser from the SAXPArserFactory. */
	            SAXParserFactory spf = SAXParserFactory.newInstance();
	            SAXParser sp = spf.newSAXParser();

	            /* Get the XMLReader of the SAXParser we created. */
	            XMLReader xr = sp.getXMLReader();

	            /* Create a new ContentHandler and apply it to the XML-Reader*/
	            WhoisSAX SAXHandler = new WhoisSAX();
	            xr.setContentHandler(SAXHandler);

	            InputStream urlData = url.openStream();
	            /* Parse the xml-data from our URL. */
	            xr.parse(new InputSource(urlData));
	            /* Parsing has finished. */
	            urlData.close();

	            /* Our ExampleHandler now provides the parsed data to us. */
	            WhoisSAXDataSet parsedDataSet = SAXHandler.getParsedData();

	            /* Set the result to be displayed in our GUI. */
	            whoisInfo.append(parsedDataSet.toString());

	            String WhoisMsg = whoisInfo.toString();

		        try
		        {
		        	WhoisMsg = "DNS: "+InetAddress.getByName(QueryIP).getHostName()+
		        			   "\n" + WhoisMsg;
				} catch (Exception e) {}

				WhoisQuery.Msg = WhoisMsg;
				WhoisQuery.Longtiude = parsedDataSet.getMapLongtiude();
				WhoisQuery.Latitude = parsedDataSet.getMapnLatitude();
		        CacheWhois.put(QueryIP, WhoisQuery);
	        }
			catch (Exception e)
	        {
				WhoisQuery.Msg = "Query failed!";
	        }

			if(!ForceStop) {
				Message QueryResult = new Message();
				QueryResult.obj = WhoisQuery;
				ProcHandler.sendMessage(QueryResult);
			}

			return;
		}
    }

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        // Use a custom layout file
        setContentView(R.layout.networklayout);

		GeoIPMap = new MapView(this, "0N4HYg91PN1-cGgp3exBmvC1AdzeiGYzp7C3V7g");
		//GeoIPMap = new MapView(this, "0N4HYg91PN19P2R67mtD2NGBl3ce5DxqXlmH6TA");
		GeoIPMap.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, 180));

		ProcHandler = new EventHandler();

		ListView InternalList = (ListView) findViewById(R.id.networklist);
    	InternalList.setOnTouchListener(this);
        InternalList.setEmptyView(findViewById(R.id.empty));
        InternalList.setAdapter(new NetworkListAdapter(this));
        InternalList.setOnItemClickListener(InternalListListener);
        UpdateInterface = (NetworkListAdapter) InternalList.getAdapter();

        EmptyMsg = (TextView) findViewById(R.id.empty);

        NetworkInfo = NetworkInfoQuery.getInstance();
    }

    public boolean onCreateOptionsMenu(Menu optionMenu)
    {
     	super.onCreateOptionsMenu(optionMenu);
     	optionMenu.add(0, 1, 0, getResources().getString(R.string.menu_options));
     	optionMenu.add(0, 2, 0, getResources().getString(R.string.menu_logexport));
       	optionMenu.add(0, 4, 0, getResources().getString(R.string.menu_help));
       	optionMenu.add(0, 5, 0, getResources().getString(R.string.menu_forceexit));

    	return true;
    }

	private void restorePrefs()
    {
		// load settings
		SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);

		try {
			JNILibrary.doDataTime(Integer.parseInt(settings.getString(Preferences.PREF_UPDATE, "2")));
		} catch(Exception e) {}

		IP6to4 = settings.getBoolean(Preferences.PREF_IP6to4, true);
		UseWhois = settings.getBoolean(Preferences.PREF_USEWHOIS, true);
		RDNS = settings.getBoolean(Preferences.PREF_RDNS, false);

		if(IP6to4 == true)
			JNILibrary.SetNetworkIP6To4(1);
		else
			JNILibrary.SetNetworkIP6To4(0);

        if(settings.getBoolean(Preferences.PREF_STATUSBAR, false))
        {
        	if(OSMonitorService.getInstance() == null)
        		startService(new Intent(this, OSMonitorService.class));
        	else
        		OSMonitorService.getInstance().Notify();
        }
        else
        	if(OSMonitorService.getInstance() != null)
        		OSMonitorService.getInstance().stopSelf();

    }

    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
    	restorePrefs();
    }

    @Override
    protected Dialog onCreateDialog(int id)
    {
    	switch (id)
    	{
    	case 0:
    		AlertDialog.Builder HelpWindows = new AlertDialog.Builder(this);
    		HelpWindows.setTitle(R.string.app_name);
			HelpWindows.setMessage(R.string.help_info);
			HelpWindows.setPositiveButton(R.string.button_close,
			   new DialogInterface.OnClickListener() {
				   public void onClick(DialogInterface dialog, int whichButton) { }
				}
			);

   	        WebView HelpView = new WebView(this);
            HelpView.loadUrl("http://wiki.android-os-monitor.googlecode.com/hg/phonehelp.html?r=b1c196ee43855882e59ad5b015b953d62c95729d");
            HelpWindows.setView(HelpView);

        	return HelpWindows.create();

    	case 1:
    		LinearLayout Layout = new LinearLayout(this);
    		Layout.setOrientation(LinearLayout.VERTICAL);
    		Layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
    									LayoutParams.FILL_PARENT));

    		EditText FileName = new EditText(this);
    		FileName.setId(100);

    		CheckBox UseHTML = new CheckBox(this);
    		UseHTML.setId(200);
    		UseHTML.setText("HTML");

    		Layout.addView(FileName, 0);
    		Layout.addView(UseHTML, 1);

    		return new AlertDialog.Builder(this)
            .setTitle(R.string.common_exportfile_title)
            .setView(Layout)
            .setPositiveButton(R.string.button_ok, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int whichButton) {
                	String FileName = ((EditText)((AlertDialog)dialog).findViewById(100)).getText().toString();
                	Boolean useHTML = ((CheckBox)((AlertDialog)dialog).findViewById(200)).isChecked();
                	SaveLog(FileName, useHTML);
                }
            })
            .setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int whichButton) {
                }
            })
            .create();    	}

    	return null;
    }

    private String GetAppInfo(String AppName, int UID)
    {
    	PackageManager AppInfo = getPackageManager();

		PackageInfo appPackageInfo = null;
		String PackageName = null;
		if(AppName.contains(":"))
			PackageName = AppName.substring(0, AppName.indexOf(":"));
		else
			PackageName = AppName;

		// for system user
		try {
			appPackageInfo = AppInfo.getPackageInfo(PackageName, 0);
		} catch (NameNotFoundException e) {}

		if(appPackageInfo == null && UID >0)
		{
			String[] subPackageName = AppInfo.getPackagesForUid(UID);

			if(subPackageName != null)
			{
				for(int PackagePtr = 0; PackagePtr < subPackageName.length; PackagePtr++)
				{
					if (subPackageName[PackagePtr] == null)
						continue;

					try {
						appPackageInfo = AppInfo.getPackageInfo(subPackageName[PackagePtr], 0);
						PackagePtr = subPackageName.length;
					} catch (NameNotFoundException e) {}
				}
			}
		}
		if(appPackageInfo != null)
			return appPackageInfo.applicationInfo.loadLabel(AppInfo).toString();
		else if (UID == 0)
			return "System";
		else
			return PackageName;
    }

    private void SaveLog(String FileName, Boolean useHTML)
    {
    	if(FileName.trim().equals(""))
    		return;

    	try {
        	File LogFile = new File("/sdcard/" + FileName);

        	if (LogFile.exists())
        	{
        		new AlertDialog.Builder(this)
    		   		.setTitle(R.string.app_name)
    		   		.setMessage(R.string.common_exportexist_title)
    		   		.setPositiveButton(R.string.button_ok,
    		   				new DialogInterface.OnClickListener() {
    		   			public void onClick(DialogInterface dialog, int whichButton) { } })
    		   		.create()
    		   		.show();
        		return;
        	}

        	int LogCount = JNILibrary.GetNetworkCounts();
        	LogFile.createNewFile();
        	FileWriter TextFile = new FileWriter(LogFile);

        	if(useHTML)
        		TextFile.write("\n\n
\n");

        	for(int i = 0; i < LogCount;i++)
        	{
        		String TextLine = "";
       			if(useHTML)
       				TextLine = "
"+JNILibrary.GetNetworkProtocol(i)+ "	"
       							+ JNILibrary.GetNetworkLocalIP(i)+":"
       							+ JNILibrary.GetNetworkLocalPort(i)+"	"
       							+ JNILibrary.GetNetworkRemoteIP(i)+":"
       							+ JNILibrary.GetNetworkRemotePort(i)+"	"
       							+ JNILibrary.GetNetworkStatus(i) + "
\n";
       			else
       				TextLine =  JNILibrary.GetNetworkProtocol(i)+ " "
       							+ JNILibrary.GetNetworkLocalIP(i)+":"
       							+ JNILibrary.GetNetworkLocalPort(i)+" "
       							+ JNILibrary.GetNetworkRemoteIP(i)+":"
       							+ JNILibrary.GetNetworkRemotePort(i)+" "
       							+ JNILibrary.GetNetworkStatus(i) + "\n";
        		TextFile.write(TextLine);
        	}

        	if(useHTML)
        		TextFile.write("
\n\n\n");

        	TextFile.close();

    	} catch (Exception e) {
    		new AlertDialog.Builder(this)
	   		.setTitle(R.string.app_name)
	   		.setMessage(e.getMessage())
	   		.setPositiveButton(R.string.button_ok,
	   				new DialogInterface.OnClickListener() {
	   			public void onClick(DialogInterface dialog, int whichButton) { } })
	   		.create()
	   		.show();

    		return;
    	}

  		new AlertDialog.Builder(this)
   		.setTitle(R.string.app_name)
   		.setMessage(R.string.common_exportdone_title)
   		.setPositiveButton(R.string.button_ok,
   				new DialogInterface.OnClickListener() {
   			public void onClick(DialogInterface dialog, int whichButton) { } })
   		.create()
   		.show();

  		return;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item)
    {

        super.onOptionsItemSelected(item);
        switch(item.getItemId())
        {
        case 1:
            Intent launchPreferencesIntent = new Intent().setClass( this, Preferences.class);
            startActivityForResult(launchPreferencesIntent, 0);
        	break;

        case 2:
        	this.showDialog(1);
        	break;

        case 4:
        	this.showDialog(0);
        	break;

        case 5:
        	if(OSMonitorService.getInstance() != null)
        		OSMonitorService.getInstance().stopSelf();

        	CommonUtil.killSelf(this);

        	break;
        }

        return true;
    }
    @Override
    public void onPause()
    {
    	if(ProcDialog != null)
    	{
        	ProcDialog.dismiss();
        	ProcDialog = null;
    	}

    	handler.removeCallbacks(runnable);
    	JNILibrary.doTaskStop();
    	super.onPause();
    }

    @Override
    protected void onResume()
    {
        restorePrefs();
    	JNILibrary.doTaskStart(JNILibrary.doTaskNetwork);
    	handler.post(runnable);
    	super.onResume();
    }

    private OnItemClickListener InternalListListener = new OnItemClickListener()
    {
    	@Override
    	public void onItemClick(AdapterView<?> l, View v, int position, long id)
    	{
    		if(!UseWhois || JNILibrary.GetNetworkRemoteIP(position).equals("0.0.0.0"))
    			return;

    		String QueryIP = "";
       		if(JNILibrary.GetNetworkProtocol(position).equals("TCP6") ||
        			JNILibrary.GetNetworkProtocol(position).equals("UDP6"))
        		{
        			QueryIP = JNILibrary.GetNetworkRemoteIP(position);
        			QueryIP = QueryIP.replaceFirst("ffff:", "");
        			QueryIP = QueryIP.replaceFirst("::", "");
        		}
        		else
        			QueryIP = JNILibrary.GetNetworkRemoteIP(position);

       		if(QueryIP.equals("0.0.0.0"))
       			return;

       		if(QueryIP.equals("88.198.156.18"))
       		{
    			Builder Alert = new Builder(NetworkList.this);
    			Alert.setTitle("Whois API IP");
    			Alert.setMessage("http://en.utrace.de/api.php");
    			Alert.show();
    			return;
       		}

    		// show progress dialog
    		ProcDialog = ProgressDialog.show( NetworkList.this, getResources().getText(R.string.pref_whoisdialog_title),
    					getResources().getText(R.string.message_waiting), true);

    		ProcDialog.setOnCancelListener(new DialogInterface.OnCancelListener()
    		{
    			public void onCancel(DialogInterface dialog)
    			{
    				if(ProcThread != null) {
    					ProcThread.ForceStop = true;
    					ProcThread.stop();
    					ProcThread = null;
    				}
    			}
    		});
    		ProcDialog.setCancelable(true);

    		ProcThread = new QueryWhois();
			ProcThread.QueryIP = QueryIP;
    		ProcThread.start();
    	}
    };

    public void showWhois(String Msg, double Latitude, double Longitude)
    {

    	/*TextView MsgBody = new TextView(this);
    	MsgBody.setText(Msg);
    	MsgBody.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
    								LayoutParams.WRAP_CONTENT));
    	MapBody = new TableLayout(this);
    	MapBody.setGravity(Gravity.CENTER);
    	MapBody.addView(MsgBody);
    	*/

    	FrameLayout MapBody = new FrameLayout(this);
   		MapBodyRef = new WeakReference<FrameLayout>(MapBody);

        MapBody.addView(GeoIPMap);
        MapController GeoIPControl = GeoIPMap.getController();

        GeoPoint MapPoint = new GeoPoint((int)Longitude,(int)Latitude);
		GeoIPControl.setZoom(8);
        GeoIPControl.animateTo(MapPoint);
        GeoIPControl.setCenter(MapPoint);
    	GeoIPMap.getOverlays().add(new MapOverlay(this, MapPoint, R.drawable.point));

    	AlertDialog.Builder WhoisAlert = new AlertDialog.Builder(this);
    	WhoisAlert.setTitle("Whois");
    	WhoisAlert.setMessage(Msg);
    	WhoisAlert.setView(MapBody);
    	WhoisAlert.setOnCancelListener(new DialogInterface.OnCancelListener() {
			@Override
			public void onCancel(DialogInterface dialog) {
		    	if(MapBodyRef != null && MapBodyRef.get() != null) {
		    		MapBodyRef.get().removeAllViews();
		    	}

			}
		});
    	WhoisAlert.show();

    }

    /**
     * A sample ListAdapter that presents content
     * from arrays of speeches and text.
     *
     */
    private class NetworkListAdapter extends BaseAdapter {
        public NetworkListAdapter(Context context)
        {
           // mContext = context;
        }

        /**
         * The number of items in the list is determined by the number of speeches
         * in our array.
         *
         * @see android.widget.ListAdapter#getCount()
         */
        public int getCount() {
            return JNILibrary.GetNetworkCounts();
        }

        /**
         * Since the data comes from an array, just returning
         * the index is sufficient to get at the data. If we
         * were using a more complex data structure, we
         * would return whatever object represents one
         * row in the list.
         *
         * @see android.widget.ListAdapter#getItem(int)
         */
        public Object getItem(int position) {
            return position;
        }

        /**
         * Use the array index as a unique id.
         * @see android.widget.ListAdapter#getItemId(int)
         */
        public long getItemId(int position) {
            return position;
        }

        /**
         * Make a SpeechView to hold each row.
         * @see android.widget.ListAdapter#getView(int, android.view.View, android.view.ViewGroup)
         */
        public View getView(int position, View convertView, ViewGroup parent) {
        	NetworkDetailView sv;

        	String LocalDNS = "";
    		String RemoteDNS = "";

            if(RDNS)
            {
            	if(JNILibrary.GetNetworkProtocol(position).equals("TCP6") ||
            		JNILibrary.GetNetworkProtocol(position).equals("UDP6"))
            	{
            		String QueryIPv4 = JNILibrary.GetNetworkLocalIP(position);
        			QueryIPv4 = QueryIPv4.replaceFirst("ffff:", "");
        			QueryIPv4 = QueryIPv4.replaceFirst("::", "");
            		NetworkInfo.doCacheInfo(QueryIPv4);
        			LocalDNS = NetworkInfo.GetDNS(QueryIPv4);

            		QueryIPv4 = JNILibrary.GetNetworkRemoteIP(position);
        			QueryIPv4 = QueryIPv4.replaceFirst("ffff:", "");
        			QueryIPv4 = QueryIPv4.replaceFirst("::", "");
        			NetworkInfo.doCacheInfo(QueryIPv4);
            		RemoteDNS = NetworkInfo.GetDNS(QueryIPv4);
            	}
            	else
            	{
            		NetworkInfo.doCacheInfo(JNILibrary.GetNetworkRemoteIP(position));
            		RemoteDNS = NetworkInfo.GetDNS(JNILibrary.GetNetworkRemoteIP(position));
            		NetworkInfo.doCacheInfo(JNILibrary.GetNetworkLocalIP(position));
            		LocalDNS = NetworkInfo.GetDNS(JNILibrary.GetNetworkLocalIP(position));
            	}
            }

            String AppName = GetAppInfo(JNILibrary.GetProcessNamebyUID(JNILibrary.GetNetworkUID(position)),
            							JNILibrary.GetNetworkUID(position));

            if (convertView == null) {
            	if(RDNS)
            	{
            		sv = new NetworkDetailView(getApplication(),
            				 JNILibrary.GetNetworkProtocol(position),
            				 LocalDNS,
            				 JNILibrary.GetNetworkLocalPort(position),
            				 RemoteDNS,
            				 JNILibrary.GetNetworkRemotePort(position),
            				 JNILibrary.GetNetworkStatus(position),
            				 AppName,
            				 position);
            	}
            	else
                    sv = new NetworkDetailView(getApplication(),
                    		 JNILibrary.GetNetworkProtocol(position),
		                     JNILibrary.GetNetworkLocalIP(position),
							 JNILibrary.GetNetworkLocalPort(position),
		                     JNILibrary.GetNetworkRemoteIP(position),
							 JNILibrary.GetNetworkRemotePort(position),
							 JNILibrary.GetNetworkStatus(position),
							 AppName,
							 position);

            } else {
                sv = (NetworkDetailView)convertView;
                if(RDNS)
                	sv.setContext(JNILibrary.GetNetworkProtocol(position),
                			  LocalDNS,
							  JNILibrary.GetNetworkLocalPort(position),
					          RemoteDNS,
 							  JNILibrary.GetNetworkRemotePort(position),
						 	  JNILibrary.GetNetworkStatus(position),
							  AppName,
						 	  position);
                else
                	sv.setContext(JNILibrary.GetNetworkProtocol(position),
              			  	  JNILibrary.GetNetworkLocalIP(position),
							  JNILibrary.GetNetworkLocalPort(position),
					          JNILibrary.GetNetworkRemoteIP(position),
							  JNILibrary.GetNetworkRemotePort(position),
						 	  JNILibrary.GetNetworkStatus(position),
						 	  AppName,
						 	  position);

            }

            return sv;
        }

        /**
         * Remember our context so we can use it when constructing views.
         */
        //private Context mContext;
    }

    /**
     * We will use a SpeechView to display each speech. It's just a LinearLayout
     * with two text fields.
     *
     */
    private class NetworkDetailView extends TableLayout {

    	private TableRow ConnectionRow;
    	private TextView ProtocolField;
    	private TextView IPField;
    	private TextView StatusField;
    	private TableRow ExtendRow;
    	private TextView APPField;

        public NetworkDetailView(Context context,String Protocol, String LocalIP, int LocalPort,
        							String RemoteIP, int RemotePort, String Status, String AppName, int position)
        {
            super(context);
            this.setColumnStretchable(1, true);
            this.setOrientation(VERTICAL);

            ProtocolField = new TextView(context);
            IPField = new TextView(context);
            StatusField = new TextView(context);
            APPField = new TextView(context);

            ProtocolField.setGravity(Gravity.LEFT);
            ProtocolField.setPadding(3, 3, 3, 3);
            if(CommonUtil.getScreenSize()== 2)
                ProtocolField.setWidth(70);
            else if(CommonUtil.getScreenSize() == 0)
            	ProtocolField.setWidth(32);
            else
            	ProtocolField.setWidth(45);

            IPField.setGravity(Gravity.LEFT);
            IPField.setPadding(3, 3, 3, 3);
            IPField.setWidth(getWidth()-160);

            StatusField.setGravity(Gravity.LEFT);
            StatusField.setPadding(3, 3, 3, 3);

            if(CommonUtil.getScreenSize() == 2)
                StatusField.setWidth(140);
            else if(CommonUtil.getScreenSize() == 0)
            	StatusField.setWidth(75);
            else
            	StatusField.setWidth(95);

            ProtocolField.setText(Protocol);
            StatusField.setText(Status);

            if(RemotePort == 0)
           		IPField.setText(LocalIP+":"+LocalPort+"\n"+RemoteIP+":*");
            else
           		IPField.setText(LocalIP+":"+LocalPort+"\n"+RemoteIP+":"+RemotePort);

            ConnectionRow = new TableRow(context);
            ConnectionRow.addView(ProtocolField);
            ConnectionRow.addView(IPField);
            ConnectionRow.addView(StatusField);
            addView(ConnectionRow);

            ExtendRow = new TableRow(context);
            APPField.setText(AppName);
            ExtendRow.addView(new TextView(context));
            ExtendRow.addView(APPField);
            ExtendRow.addView(new TextView(context));
            addView(ExtendRow);

            TableRow.LayoutParams RowParams = (TableRow.LayoutParams)APPField.getLayoutParams();
            RowParams.span = 2;
            APPField.setLayoutParams(RowParams);

            if(position % 2 == 0)
	     		setBackgroundColor(0x80444444);
	     	else
	     		setBackgroundColor(0x80000000);

        }

		public void setContext(String Protocol, String LocalIP, int LocalPort,
								String RemoteIP, int RemotePort, String Status, String AppName, int position)
		{

            ProtocolField.setText(Protocol);
            StatusField.setText(Status);

            if(RemotePort == 0)
           		IPField.setText(LocalIP+":"+LocalPort+"\n"+RemoteIP+":*");
            else
           		IPField.setText(LocalIP+":"+LocalPort+"\n"+RemoteIP+":"+RemotePort);

            APPField.setText(AppName);

	     	if(position % 2 == 0)
	     		setBackgroundColor(0x80444444);
	     	else
	     		setBackgroundColor(0x80000000);
		}
    }

	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}
}


text:
package org.apache.geode.internal.lang;

/**
 * The Filter interface defines a contract for implementing objects that act as a filter to
 * segregate other objects.
 * </p>
 *
 * @since GemFire 7.0
 */
public interface Filter<T> {

  public boolean accept(T obj);

}


text:
package com.amazonaws.services.neptune.waiters;

import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.waiters.WaiterAcceptor;
import com.amazonaws.waiters.WaiterState;
import com.amazonaws.waiters.AcceptorPathMatcher;
import com.amazonaws.services.neptune.model.*;

import com.fasterxml.jackson.databind.JsonNode;

import com.amazonaws.jmespath.*;

import java.io.IOException;
import javax.annotation.Generated;

@SdkInternalApi
@Generated("com.amazonaws:aws-java-sdk-code-generator")
class DBInstanceAvailable {

    static class IsAvailableMatcher extends WaiterAcceptor<DescribeDBInstancesResult> {
        private static final JsonNode expectedResult;

        static {
            try {
                expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"available\"");
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        }

        private static final JmesPathExpression ast = new JmesPathProjection(new JmesPathFlatten(new JmesPathField("DBInstances")), new JmesPathField(
                "DBInstanceStatus"));

        /**
         * Takes the result and determines whether the state of the resource matches the expected state. To determine
         * the current state of the resource, JmesPath expression is evaluated and compared against the expected result.
         *
         * @param result
         *        Corresponding result of the operation
         * @return True if current state of the resource matches the expected state, False otherwise
         */
        @Override
        public boolean matches(DescribeDBInstancesResult result) {
            JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
            JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
            return AcceptorPathMatcher.pathAll(expectedResult, finalResult);
        }

        /**
         * Represents the current waiter state in the case where resource state matches the expected state
         *
         * @return Corresponding state of the waiter
         */
        @Override
        public WaiterState getState() {
            return WaiterState.SUCCESS;
        }
    }

    static class IsDeletedMatcher extends WaiterAcceptor<DescribeDBInstancesResult> {
        private static final JsonNode expectedResult;

        static {
            try {
                expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"deleted\"");
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        }

        private static final JmesPathExpression ast = new JmesPathProjection(new JmesPathFlatten(new JmesPathField("DBInstances")), new JmesPathField(
                "DBInstanceStatus"));

        /**
         * Takes the result and determines whether the state of the resource matches the expected state. To determine
         * the current state of the resource, JmesPath expression is evaluated and compared against the expected result.
         *
         * @param result
         *        Corresponding result of the operation
         * @return True if current state of the resource matches the expected state, False otherwise
         */
        @Override
        public boolean matches(DescribeDBInstancesResult result) {
            JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
            JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
            return AcceptorPathMatcher.pathAny(expectedResult, finalResult);
        }

        /**
         * Represents the current waiter state in the case where resource state matches the expected state
         *
         * @return Corresponding state of the waiter
         */
        @Override
        public WaiterState getState() {
            return WaiterState.FAILURE;
        }
    }

    static class IsDeletingMatcher extends WaiterAcceptor<DescribeDBInstancesResult> {
        private static final JsonNode expectedResult;

        static {
            try {
                expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"deleting\"");
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        }

        private static final JmesPathExpression ast = new JmesPathProjection(new JmesPathFlatten(new JmesPathField("DBInstances")), new JmesPathField(
                "DBInstanceStatus"));

        /**
         * Takes the result and determines whether the state of the resource matches the expected state. To determine
         * the current state of the resource, JmesPath expression is evaluated and compared against the expected result.
         *
         * @param result
         *        Corresponding result of the operation
         * @return True if current state of the resource matches the expected state, False otherwise
         */
        @Override
        public boolean matches(DescribeDBInstancesResult result) {
            JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
            JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
            return AcceptorPathMatcher.pathAny(expectedResult, finalResult);
        }

        /**
         * Represents the current waiter state in the case where resource state matches the expected state
         *
         * @return Corresponding state of the waiter
         */
        @Override
        public WaiterState getState() {
            return WaiterState.FAILURE;
        }
    }

    static class IsFailedMatcher extends WaiterAcceptor<DescribeDBInstancesResult> {
        private static final JsonNode expectedResult;

        static {
            try {
                expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"failed\"");
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        }

        private static final JmesPathExpression ast = new JmesPathProjection(new JmesPathFlatten(new JmesPathField("DBInstances")), new JmesPathField(
                "DBInstanceStatus"));

        /**
         * Takes the result and determines whether the state of the resource matches the expected state. To determine
         * the current state of the resource, JmesPath expression is evaluated and compared against the expected result.
         *
         * @param result
         *        Corresponding result of the operation
         * @return True if current state of the resource matches the expected state, False otherwise
         */
        @Override
        public boolean matches(DescribeDBInstancesResult result) {
            JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
            JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
            return AcceptorPathMatcher.pathAny(expectedResult, finalResult);
        }

        /**
         * Represents the current waiter state in the case where resource state matches the expected state
         *
         * @return Corresponding state of the waiter
         */
        @Override
        public WaiterState getState() {
            return WaiterState.FAILURE;
        }
    }

    static class IsIncompatiblerestoreMatcher extends WaiterAcceptor<DescribeDBInstancesResult> {
        private static final JsonNode expectedResult;

        static {
            try {
                expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"incompatible-restore\"");
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        }

        private static final JmesPathExpression ast = new JmesPathProjection(new JmesPathFlatten(new JmesPathField("DBInstances")), new JmesPathField(
                "DBInstanceStatus"));

        /**
         * Takes the result and determines whether the state of the resource matches the expected state. To determine
         * the current state of the resource, JmesPath expression is evaluated and compared against the expected result.
         *
         * @param result
         *        Corresponding result of the operation
         * @return True if current state of the resource matches the expected state, False otherwise
         */
        @Override
        public boolean matches(DescribeDBInstancesResult result) {
            JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
            JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
            return AcceptorPathMatcher.pathAny(expectedResult, finalResult);
        }

        /**
         * Represents the current waiter state in the case where resource state matches the expected state
         *
         * @return Corresponding state of the waiter
         */
        @Override
        public WaiterState getState() {
            return WaiterState.FAILURE;
        }
    }

    static class IsIncompatibleparametersMatcher extends WaiterAcceptor<DescribeDBInstancesResult> {
        private static final JsonNode expectedResult;

        static {
            try {
                expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"incompatible-parameters\"");
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        }

        private static final JmesPathExpression ast = new JmesPathProjection(new JmesPathFlatten(new JmesPathField("DBInstances")), new JmesPathField(
                "DBInstanceStatus"));

        /**
         * Takes the result and determines whether the state of the resource matches the expected state. To determine
         * the current state of the resource, JmesPath expression is evaluated and compared against the expected result.
         *
         * @param result
         *        Corresponding result of the operation
         * @return True if current state of the resource matches the expected state, False otherwise
         */
        @Override
        public boolean matches(DescribeDBInstancesResult result) {
            JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
            JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
            return AcceptorPathMatcher.pathAny(expectedResult, finalResult);
        }

        /**
         * Represents the current waiter state in the case where resource state matches the expected state
         *
         * @return Corresponding state of the waiter
         */
        @Override
        public WaiterState getState() {
            return WaiterState.FAILURE;
        }
    }
}


text:
package org.omg.PortableInterceptor;

/**
* org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /HUDSON3/workspace/8-2-build-linux-amd64/jdk8u121/8372/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Monday, December 12, 2016 4:37:46 PM PST
*/

abstract public class IORInterceptor_3_0Helper
{
  private static String  _id = "IDL:omg.org/PortableInterceptor/IORInterceptor_3_0:1.0";

  public static void insert (org.omg.CORBA.Any a, IORInterceptor_3_0 that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static IORInterceptor_3_0 extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (IORInterceptor_3_0Helper.id (), "IORInterceptor_3_0");
    }
    return __typeCode;
  }

  public static String id ()
  {
    return _id;
  }

  public static IORInterceptor_3_0 read (org.omg.CORBA.portable.InputStream istream)
  {
      throw new org.omg.CORBA.MARSHAL ();
  }

  public static void write (org.omg.CORBA.portable.OutputStream ostream, IORInterceptor_3_0 value)
  {
      throw new org.omg.CORBA.MARSHAL ();
  }

  public static IORInterceptor_3_0 narrow (org.omg.CORBA.Object obj)
  {
    if (obj == null)
      return null;
    else if (obj instanceof IORInterceptor_3_0)
      return (IORInterceptor_3_0)obj;
    else
      throw new org.omg.CORBA.BAD_PARAM ();
  }

  public static IORInterceptor_3_0 unchecked_narrow (org.omg.CORBA.Object obj)
  {
    if (obj == null)
      return null;
    else if (obj instanceof IORInterceptor_3_0)
      return (IORInterceptor_3_0)obj;
    else
      throw new org.omg.CORBA.BAD_PARAM ();
  }

}


text:
package spookfishperfviz;

/**
 * @author Rahul Bakale
 * @since Nov, 2014
 */
public abstract class RecordParser {

	protected RecordParser() {
		//
	}

	protected abstract boolean isIgnore(String line);

	protected abstract Record parse(String line);

}


text:
class AddQuestionSortToMedium < ActiveRecord::Migration[6.0]
  def change
    add_column :media, :question_sort, :text
  end
end


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.LanguageServices;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Operations;
using Microsoft.VisualStudio.Utilities;
using DotVVM.Framework.Parser.Dothtml.Parser;
using DotVVM.VS2015Extension.DothtmlEditorExtensions.Classification;
using DotVVM.VS2015Extension.DothtmlEditorExtensions.Completions.Dothtml.Base;
using DotVVM.VS2015Extension.DothtmlEditorExtensions.Completions.Dothtml;

namespace DotVVM.VS2015Extension.DothtmlEditorExtensions.Completions
{
    [Export(typeof(ICompletionSourceProvider))]
    [Export(typeof(DothtmlCompletionSourceProvider))]
    [Name("DotVVM IntelliSense")]
    [ContentType(DothtmlContentTypeDefinitions.DothtmlContentType)]
    public class DothtmlCompletionSourceProvider : ICompletionSourceProvider
    {

        [Import]
        internal ITextStructureNavigatorSelectorService NavigatorService { get; set; }

        [Import]
        internal IClassificationTypeRegistryService Registry;

        [Import]
        internal IGlyphService GlyphService;

        [ImportMany(typeof(IDothtmlCompletionProvider))]
        public IDothtmlCompletionProvider[] CompletionProviders { get; set; }

        [Import(typeof(VisualStudioWorkspace))]
        public VisualStudioWorkspace Workspace { get; set; }

        public DotvvmConfigurationProvider ConfigurationProvider { get; private set; }

        public MetadataControlResolver MetadataControlResolver { get; private set; }

        public DothtmlParser Parser { get; private set; }

        public DothtmlClassifier Classifier { get; private set; }

        public ICompletionSource TryCreateCompletionSource(ITextBuffer textBuffer)
        {
            return textBuffer.Properties.GetOrCreateSingletonProperty(() =>
            {
                var classifierProvider = new DothtmlClassifierProvider()
                {
                    Registry = Registry
                };

                ConfigurationProvider = new DotvvmConfigurationProvider();
                MetadataControlResolver = new MetadataControlResolver();

                WatchWorkspaceChanges();

                Parser = new DothtmlParser();
                Classifier = (DothtmlClassifier)classifierProvider.GetClassifier(textBuffer);

                return new DothtmlCompletionSource(this, Parser, Classifier, textBuffer,
                    Workspace, GlyphService, CompletionHelper.DTE, ConfigurationProvider, MetadataControlResolver);
            });
        }

        private void WatchWorkspaceChanges()
        {
            CompletionRefreshHandler.Instance.RefreshCompletion += (sender, args) => FireWorkspaceChanged();

            Workspace.WorkspaceChanged += (sender, args) => CompletionRefreshHandler.Instance.NotifyRefreshNeeded();
            ConfigurationProvider.WorkspaceChanged += (sender, args) => CompletionRefreshHandler.Instance.NotifyRefreshNeeded();
        }

        private void FireWorkspaceChanged()
        {
            foreach (var provider in CompletionProviders)
            {
                provider.OnWorkspaceChanged();
            }
            MetadataControlResolver.OnWorkspaceChanged();
        }
    }
}


text:
class CreateVotes < ActiveRecord::Migration
  def change
    create_table :votes do |t|

      t.integer :user_id, null: false
      t.integer :project_id, null: false

      t.timestamps null: false
    end

    # TODO: need some indexes here
  end
end


text:
#creates array if needbe
#array = [[0 for x in range(h)] for y in range(w)]
#imports date time and curency handeling because i hate string formating (this takes the place of #$%.2f"%)
import locale
locale.setlocale( locale.LC_ALL, '' )
#use locale.currency() for currency formating
print("Welcome to the Cell Phone Program\n")

text = int(input("How many texts did you send? "))

if text > 300:
	 bill = (text-300)*.03+20
else:
	bill = 20

print("The total cost of your bill will be", locale.currency(bill))

input("\nPress Enter to Exit")


text:
package com.salesforce.dataloader.client;

import java.io.FileNotFoundException;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.log4j.Logger;

import com.salesforce.dataloader.client.SessionInfo.NotLoggedInException;
import com.salesforce.dataloader.config.Config;
import com.salesforce.dataloader.config.Messages;
import com.salesforce.dataloader.controller.Controller;
import com.salesforce.dataloader.exception.ParameterLoadException;
import com.sforce.soap.partner.Connector;
import com.sforce.ws.ConnectorConfig;

/**
 * Base class for API client wrapper classes
 *
 * @author Colin Jarvis
 * @since 17.0
 */
public abstract class ClientBase<ClientType> {

    private static Logger LOG = Logger.getLogger(PartnerClient.class);

    protected static final URL DEFAULT_AUTH_ENDPOINT_URL;
    static {
        URL loginUrl;
        try {
            loginUrl = new URL(Connector.END_POINT);
        } catch (MalformedURLException ex) {
            LOG.error(ex);
            throw new RuntimeException(ex);
        }
        DEFAULT_AUTH_ENDPOINT_URL = loginUrl;
    }

    public static final String REST_ENDPOINT = "/services/async/" + Controller.API_VERSION;

    protected final Logger logger;
    protected final Controller controller;
    protected final Config config;

    private SessionInfo session = new SessionInfo();

    protected abstract boolean connectPostLogin(ConnectorConfig connectorConfig);

    public abstract ClientType getClient();

    protected ClientBase(Controller controller, Logger logger) {
        this.controller = controller;
        this.config = controller.getConfig();
        this.logger = logger;
    }

    public final boolean connect(SessionInfo sess) {
        setSession(sess);
        return connectPostLogin(getConnectorConfig());
    }

    private static final String BASE_CLIENT_NAME = "DataLoader";
    private static final String BULK_API_CLIENT_TYPE = "Bulk";
    private static final String PARTNER_API_CLIENT_TYPE = "Partner";
    private static final String BATCH_CLIENT_STRING = "Batch";
    private static final String UI_CLIENT_STRING = "UI";

    protected static String getClientName(Config cfg) {
        final String apiType = cfg.isBulkAPIEnabled() ? BULK_API_CLIENT_TYPE : PARTNER_API_CLIENT_TYPE;
        final String interfaceType = cfg.isBatchMode() ? BATCH_CLIENT_STRING : UI_CLIENT_STRING;
        return new StringBuilder(32).append(BASE_CLIENT_NAME).append(apiType).append(interfaceType)
                .append("/").append(Controller.API_VERSION).toString(); //$NON-NLS-1$
    }

    protected ConnectorConfig getConnectorConfig() {
        ConnectorConfig cc = new ConnectorConfig();
        cc.setTransport(HttpClientTransport.class);
        cc.setSessionId(getSessionId());

        // set authentication credentials
        // blank username is not acceptible
        String username = config.getString(Config.USERNAME);
        boolean isManualSession = config.getBoolean(Config.SFDC_INTERNAL) && config.getBoolean(Config.SFDC_INTERNAL_IS_SESSION_ID_LOGIN);
        boolean isOAuthSession = config.getString(Config.OAUTH_ACCESSTOKEN) != null && config.getString(Config.OAUTH_ACCESSTOKEN).trim().length() > 0;
        if (!isManualSession && !isOAuthSession && (username == null || username.length() == 0)) {
            String errMsg = Messages.getMessage(getClass(), "emptyUsername", Config.USERNAME);
            logger.error(errMsg);
            throw new IllegalStateException(errMsg);
        }

        cc.setUsername(username);
        cc.setPassword(config.getString(Config.PASSWORD));

        // proxy properties
        try {
            String proxyHost = config.getString(Config.PROXY_HOST);
            int proxyPort = config.getInt(Config.PROXY_PORT);
            if (proxyHost != null && proxyHost.length() > 0 && proxyPort > 0) {
                logger.info(Messages.getFormattedString(
                        "Client.sforceLoginProxyDetail", new String[] { proxyHost, String.valueOf(proxyPort) })); //$NON-NLS-1$
                cc.setProxy(proxyHost, proxyPort);

                String proxyUsername = config.getString(Config.PROXY_USERNAME);
                if (proxyUsername != null && proxyUsername.length() > 0) {
                    logger.info(Messages.getFormattedString("Client.sforceLoginProxyUser", proxyUsername)); //$NON-NLS-1$
                    cc.setProxyUsername(proxyUsername);

                    String proxyPassword = config.getString(Config.PROXY_PASSWORD);
                    if (proxyPassword != null && proxyPassword.length() > 0) {
                        logger.info(Messages.getString("Client.sforceLoginProxyPassword")); //$NON-NLS-1$
                        cc.setProxyPassword(proxyPassword);
                    } else {
                        cc.setProxyPassword("");
                    }
                }

                String proxyNtlmDomain = config.getString(Config.PROXY_NTLM_DOMAIN);
                if (proxyNtlmDomain != null && proxyNtlmDomain.length() > 0) {
                    logger.info(Messages.getFormattedString("Client.sforceLoginProxyNtlm", proxyNtlmDomain)); //$NON-NLS-1$
                    cc.setNtlmDomain(proxyNtlmDomain);
                }
            }

        } catch (ParameterLoadException e) {
            logger.error(e.getMessage());
        }

        // Time out after 5 seconds for connection
        int connTimeoutSecs;
        try {
            connTimeoutSecs = config.getInt(Config.CONNECTION_TIMEOUT_SECS);
        } catch (ParameterLoadException e1) {
            connTimeoutSecs = Config.DEFAULT_CONNECTION_TIMEOUT_SECS;
        }
        cc.setConnectionTimeout(connTimeoutSecs * 1000);

        // Time out after 1 minute 10 sec for login response
        // set timeout for operations based on config
        int timeoutSecs;
        try {
            timeoutSecs = config.getInt(Config.TIMEOUT_SECS);
        } catch (ParameterLoadException e) {
            timeoutSecs = Config.DEFAULT_TIMEOUT_SECS;
        }
        cc.setReadTimeout((timeoutSecs * 1000));

        // use compression or turn it off
        if (config.contains(Config.NO_COMPRESSION)) {
            cc.setCompression(!config.getBoolean(Config.NO_COMPRESSION));
        }

        if (config.getBoolean(Config.DEBUG_MESSAGES)) {
            cc.setTraceMessage(true);
            cc.setPrettyPrintXml(true);
            String filename = config.getString(Config.DEBUG_MESSAGES_FILE);
            if (filename.length() > 0) {
                try {
                    cc.setTraceFile(filename);
                } catch (FileNotFoundException e) {
                    logger.warn(Messages.getFormattedString("Client.errorMsgDebugFilename", filename));
                }
            }
        }

        String server = getSession().getServer();
        if (server != null) {
            cc.setAuthEndpoint(server + DEFAULT_AUTH_ENDPOINT_URL.getPath());
            cc.setServiceEndpoint(server + DEFAULT_AUTH_ENDPOINT_URL.getPath());
            cc.setRestEndpoint(server + REST_ENDPOINT);
        }

        return cc;
    }

    public SessionInfo getSession() {
        return this.session;
    }

    protected void clearSession() {
        setSession(new SessionInfo());
    }

    protected void setSession(String sessionId, String server) {

        setSession(new SessionInfo(sessionId, server));
    }

    private void setSession(SessionInfo sess) {
        this.session = sess;
    }

    protected String getSessionId() throws NotLoggedInException {
        return getSession().getSessionId();
    }

}


text:
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>CSP via origin policy must trigger a securitypolicyviolation event even when the CSP is report-only</title>