text:
package io.wyrmise.hanusync.activities;

import android.app.AlertDialog;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.IOException;
import java.util.Map;

import io.wyrmise.hanusync.adapters.CourseAdapter;
import io.wyrmise.hanusync.adapters.NavAdapter;
import io.wyrmise.hanusync.R;

public class MainActivity extends ActionBarActivity implements CourseAdapter.OnItemClickListener, NavAdapter.OnItemClickListener {

    private CharSequence title;
    String TITLES[] = {"General News", "Marktable Collection", "Courses", "Submissions", "Settings", "About", "Log out"};
    int ICONS[] = {R.drawable.ic_news, R.drawable.ic_mark, R.drawable.ic_courses, R.drawable.ic_submission, R.drawable.ic_settings, R.drawable.ic_about, R.drawable.ic_exit};
    String NAME = "";
    String ID = "";
    private Toolbar toolbar;
    RecyclerView mRecyclerView;                           // Declaring RecyclerView
    RecyclerView.Adapter mAdapter;                        // Declaring Adapter For Recycler View
    RecyclerView.LayoutManager mLayoutManager;            // Declaring Layout Manager as a linear layout manager
    DrawerLayout drawerLayout;                                  // Declaring DrawerLayout
    ActionBarDrawerToggle mDrawerToggle;
    private Map<String, String> cookies;
    SharedPreferences prefs;

    SharedPreferences.OnSharedPreferenceChangeListener myPrefListener = new SharedPreferences.OnSharedPreferenceChangeListener() {
        public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
            if (key.equals(SettingsActivity.KEY_ENTRY_NUM)) {
                reload();
            }
        }
    };

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

        setContentView(R.layout.activity_main);

        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        prefs = PreferenceManager.getDefaultSharedPreferences(this);

        mRecyclerView = (RecyclerView) findViewById(R.id.RecyclerView); // Assigning the RecyclerView Object to the xml View

        mRecyclerView.setHasFixedSize(true);                            // Letting the system know that the list objects are of fixed size

        mLayoutManager = new LinearLayoutManager(MainActivity.this);    // Creating a layout Manager

        mRecyclerView.setLayoutManager(mLayoutManager);                 // Setting the layout Manager

        drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);        // drawerLayout object Assigned to the view
        drawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
        mDrawerToggle = new ActionBarDrawerToggle(MainActivity.this, drawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close) {

            @Override
            public void onDrawerOpened(View drawerView) {
                super.onDrawerOpened(drawerView);
                // code here will execute once the drawer is opened( As I dont want anything happened whe drawer is
                // open I am not going to put anything here)
            }

            @Override
            public void onDrawerClosed(View drawerView) {
                super.onDrawerClosed(drawerView);
                // Code here will execute once drawer is closed
            }
        }; // drawerLayout Toggle Object Made
        drawerLayout.setDrawerListener(mDrawerToggle); // drawerLayout Listener set to the drawerLayout toggle
        mDrawerToggle.syncState();               // Finally we set the drawer toggle sync State

        Intent intent = getIntent();
        ID = intent.getStringExtra("id");
        new GetInformation().execute();

        if (savedInstanceState == null) {
            getGeneralNews(1);
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        NavAdapter.activityResult(this, requestCode, resultCode, data);
    }

    private class GetInformation extends AsyncTask<Void, Void, Void> {

        protected void onPreExecute() {
        }

        @Override
        protected Void doInBackground(Void... params) {
            try {
                Intent intent = getIntent();
                cookies = (Map<String, String>) intent.getSerializableExtra("cookies");
                Document document = Jsoup.connect("http://fit.hanu.edu.vn/fitportal/").cookies(cookies).get();
                Element featureName = document.select("div.header-profilename").first();
                featureName.select("a[href]");
                String url = featureName.text();
                int t = getIndexOfFirstNumber(url);
                NAME = url.substring(0, t);

            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

        @Override
        protected void onPostExecute(Void result) {
            mAdapter = new NavAdapter(getApplicationContext(), TITLES, ICONS, NAME, ID, MainActivity.this);
            mRecyclerView.setAdapter(mAdapter);
        }
    }

    private int getIndexOfFirstNumber(String str) {
        char[] arr = str.toCharArray();
        for (int i = 0; i < arr.length; i++) {
            if (Character.isDigit(arr[i]))
                return i;
        }
        return -1;
    }

    public void onClick(View view, int position) {
        switch (position) {
            case 1:
                getGeneralNews(position);
                break;
            case 2:
                getGeneralNews(position);
                break;
            case 3:
                selectItem(position);
                break;
            case 4:
                selectItem(position);
                break;
            case 5:
                drawerLayout.closeDrawer(mRecyclerView);
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        Intent intent = new Intent(MainActivity.this, SettingsActivity.class);
                        startActivity(intent);
                    }
                }, 200);

                break;
            case 6:
                drawerLayout.closeDrawer(mRecyclerView);
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        Intent about = new Intent(MainActivity.this, AboutActivity.class);
                        startActivity(about);
                    }
                }, 200);

                break;
            case 7:
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        showLogOutDialog();
                    }
                }, 200);

                break;
        }
    }

    private void getGeneralNews(int position) {
        NewsFragment fragment = new NewsFragment();
        Bundle args = new Bundle();
        args.putInt("news_type", position);
        fragment.setArguments(args);
        fragment.newInstance(position);
        FragmentManager fragmentManager = getFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.content_frame, fragment, "NEWS");
        fragmentTransaction.commit();
        setTitle(TITLES[position - 1]);
        drawerLayout.closeDrawer(mRecyclerView);
    }

    private void showLogOutDialog() {
        drawerLayout.closeDrawer(mRecyclerView);
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Confirm");
        builder.setMessage("Are you sure you want to log out?");
        builder.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                new LogOutAsyncTask().execute();
                dialog.dismiss();
            }
        });
        builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                dialog.dismiss();
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }

    @Override
    public void onResume() {
        super.onResume();
        prefs.registerOnSharedPreferenceChangeListener(myPrefListener);
    }

    private void reload() {
        NewsFragment myFragment = (NewsFragment) getFragmentManager().findFragmentByTag("NEWS");
        if (myFragment != null && myFragment.isVisible()) {
            myFragment.reload();
        }
    }

    private void selectItem(int position) {
        MainFragment fragment = new MainFragment();
        Bundle args = new Bundle();
        args.putInt("option_number", position);
        fragment.setArguments(args);
        fragment.newInstance(position);
        FragmentManager fragmentManager = getFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.content_frame, fragment);
        fragmentTransaction.commit();
        setTitle(TITLES[position - 1]);
        drawerLayout.closeDrawer(mRecyclerView);
    }

    public void setTitle(CharSequence title) {
        this.title = title;
        getSupportActionBar().setTitle(this.title);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        return super.onOptionsItemSelected(item);
    }

    private class LogOutAsyncTask extends AsyncTask<Void, Void, Boolean> {
        ProgressDialog progressDialog;

        protected void onPreExecute() {
            progressDialog = new ProgressDialog(MainActivity.this);
            progressDialog.setMessage("Logging out, please wait...");
            progressDialog.setCancelable(false);
            progressDialog.show();
        }

        @Override
        protected Boolean doInBackground(Void... params) {
            try {
                Document document = Jsoup.connect("http://fit.hanu.edu.vn/fitportal/").cookies(cookies).get();
                Elements featureName = document.select("div.header-profileoptions").select("ul").select("li").select("a[href]");
                String url = featureName.get(2).attr("abs:href");
                Jsoup.connect(url).cookies(cookies).get();
                return true;
            } catch (IOException e) {
                e.printStackTrace();
                return false;
            }
        }

        @Override
        protected void onPostExecute(Boolean result) {
            if (result) {
                LoginActivity.isLoggedOut = true;
                Intent i = getBaseContext().getPackageManager()
                        .getLaunchIntentForPackage(getBaseContext().getPackageName());
                i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                finish();
                startActivity(i);
            } else {
                Toast.makeText(getApplicationContext(), "There's an error while trying to log out!", Toast.LENGTH_LONG).show();
            }
        }
    }

}


text:
package com.hazelcast.map.impl.nearcache;

import com.hazelcast.config.Config;
import com.hazelcast.config.InMemoryFormat;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import com.hazelcast.internal.adapter.IMapDataStructureAdapter;
import com.hazelcast.internal.nearcache.AbstractBasicNearCacheTest;
import com.hazelcast.internal.nearcache.NearCache;
import com.hazelcast.internal.nearcache.NearCacheManager;
import com.hazelcast.internal.nearcache.NearCacheTestContext;
import com.hazelcast.nio.serialization.Data;
import com.hazelcast.test.HazelcastParametersRunnerFactory;
import com.hazelcast.test.TestHazelcastInstanceFactory;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.After;
import org.junit.Before;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;

import java.util.Arrays;
import java.util.Collection;

import static com.hazelcast.internal.nearcache.NearCacheTestUtils.createNearCacheConfig;
import static com.hazelcast.internal.nearcache.NearCacheTestUtils.getMapNearCacheManager;

/**
 * Basic Near Cache tests for {@link IMap} on Hazelcast members.
 */
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(HazelcastParametersRunnerFactory.class)
@Category(QuickTest.class)
public class BasicMapNearCacheTest extends AbstractBasicNearCacheTest<Data, String> {

    @Parameter
    public InMemoryFormat inMemoryFormat;

    private final TestHazelcastInstanceFactory hazelcastFactory = createHazelcastInstanceFactory(2);

    @Parameters(name = "format:{0}")
    public static Collection<Object[]> parameters() {
        return Arrays.asList(new Object[][]{
                {InMemoryFormat.BINARY},
                {InMemoryFormat.OBJECT},
        });
    }

    @Before
    public void setUp() {
        nearCacheConfig = createNearCacheConfig(inMemoryFormat)
                .setCacheLocalEntries(true);
    }

    @After
    public void tearDown() {
        hazelcastFactory.shutdownAll();
    }

    @Override
    protected <K, V> NearCacheTestContext<K, V, Data, String> createContext() {
        Config config = getConfig();
        config.getMapConfig(DEFAULT_NEAR_CACHE_NAME).setNearCacheConfig(nearCacheConfig);

        HazelcastInstance[] instances = hazelcastFactory.newInstances(config);
        HazelcastInstance member = instances[0];
        IMap<K, V> map = member.getMap(DEFAULT_NEAR_CACHE_NAME);

        NearCacheManager nearCacheManager = getMapNearCacheManager(member);
        NearCache<Data, String> nearCache = nearCacheManager.getNearCache(DEFAULT_NEAR_CACHE_NAME);

        return new NearCacheTestContext<K, V, Data, String>(
                getSerializationService(member),
                member,
                new IMapDataStructureAdapter<K, V>(map),
                true,
                nearCache,
                nearCacheManager);
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.android.deskclock.timer;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.android.deskclock.CircleTimerView;
import com.android.deskclock.R;

public class TimerListItem extends LinearLayout {

    CountingTimerView mTimerText;
    CircleTimerView mCircleView;

    long mTimerLength;

    public TimerListItem(Context context) {
        this(context, null);
    }

    public TimerListItem(Context context, AttributeSet attrs) {
        super(context, attrs);
        LayoutInflater layoutInflater =
                (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        layoutInflater.inflate(R.layout.timer_list_item, this);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        mTimerText = (CountingTimerView)findViewById(R.id.timer_time_text);
        mCircleView = (CircleTimerView)findViewById(R.id.timer_time);
        mCircleView.setTimerMode(true);
    }

    public void set(long timerLength, long timeLeft, boolean drawRed) {
        if (mCircleView == null) {
            mCircleView = (CircleTimerView)findViewById(R.id.timer_time);
            mCircleView.setTimerMode(true);
        }
        mTimerLength = timerLength;
        mCircleView.setIntervalTime(mTimerLength);
        mCircleView.setPassedTime(timerLength - timeLeft, drawRed);
        invalidate();
    }

    public void start() {
        mCircleView.startIntervalAnimation();
        mTimerText.redTimeStr(false, true);
        mTimerText.showTime(true);
        mCircleView.setVisibility(VISIBLE);
    }

    public void pause() {
        mCircleView.pauseIntervalAnimation();
        mTimerText.redTimeStr(false, true);
        mTimerText.showTime(true);
        mCircleView.setVisibility(VISIBLE);
    }

    public void stop() {
        mCircleView.stopIntervalAnimation();
        mTimerText.redTimeStr(false, true);
        mTimerText.showTime(true);
        mCircleView.setVisibility(VISIBLE);
    }

    public void timesUp() {
        mCircleView.abortIntervalAnimation();
        mTimerText.redTimeStr(true, true);
    }

    public void done() {
        mCircleView.stopIntervalAnimation();
        mCircleView.setVisibility(VISIBLE);
        mCircleView.invalidate();
        mTimerText.redTimeStr(true, false);
    }

    public void setLength(long timerLength) {
        mTimerLength = timerLength;
        mCircleView.setIntervalTime(mTimerLength);
        mCircleView.invalidate();
    }

    public void setTextBlink(boolean blink) {
        mTimerText.showTime(!blink);
    }

    public void setCircleBlink(boolean blink) {
        mCircleView.setVisibility(blink ? INVISIBLE : VISIBLE);
    }

    public void setTime(long time, boolean forceUpdate) {
        if (mTimerText == null) {
            mTimerText = (CountingTimerView)findViewById(R.id.timer_time_text);
        }
        mTimerText.setTime(time, false, forceUpdate);
    }

    // Used by animator to animate the size of a timer
    @SuppressWarnings("unused")
    public void setAnimatedHeight(int height) {
        ViewGroup.LayoutParams layoutParams = getLayoutParams();
        if (layoutParams != null) {
            layoutParams.height = height;
            requestLayout();
        }
    }

}


text:
WITH dokumente AS (
    SELECT
        schdstfflstt_bden_dokument.t_id,
        schdstfflstt_bden_dokument.t_ili_tid,
        schdstfflstt_bden_dokument.dokumentname,
        schdstfflstt_bden_dokument.dateipfad,
        schdstfflstt_bden_gartenbau.t_id AS gartenbau
    FROM
        afu_schadstoffbelastete_boeden.schdstfflstt_bden_dokument_gartenbau
        LEFT JOIN afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
            ON schdstfflstt_bden_gartenbau.t_id = schdstfflstt_bden_dokument_gartenbau.gartenbau
        LEFT JOIN afu_schadstoffbelastete_boeden.schdstfflstt_bden_dokument
            ON schdstfflstt_bden_dokument.t_id = schdstfflstt_bden_dokument_gartenbau.dokument
), dokumente_json AS (
    SELECT
        array_to_json(
            array_agg(
                row_to_json((
                    SELECT
                        docs
                    FROM
                        (
                            SELECT
                                'SO_AFU_Verzeichnis_schadstoffbelastete_Boeden_Publikation_20200701.Dokument' as "@type",
                                dokumentname as "Name",
                                dateipfad as "URL"
                        ) docs
                ))
            )
        ) AS dokumente,
        gartenbau
    FROM
        dokumente
    GROUP BY
        gartenbau
), schadstoffe AS (
    SELECT
        schdstfflstt_bden_schadstoff.t_id,
        schdstfflstt_bden_schadstoff.t_ili_tid,
        schdstfflstt_bden_schadstoff.schadstoffname,
        schdstfflstt_bden_schadstoff.kuerzel,
        schdstfflstt_bden_gartenbau.t_id AS gartenbau
    FROM
        afu_schadstoffbelastete_boeden.schdstfflstt_bden_schadstoff_gartenbau
        LEFT JOIN afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
            ON schdstfflstt_bden_gartenbau.t_id = schdstfflstt_bden_schadstoff_gartenbau.gartenbau
        LEFT JOIN afu_schadstoffbelastete_boeden.schdstfflstt_bden_schadstoff
            ON schdstfflstt_bden_schadstoff.t_id = schdstfflstt_bden_schadstoff_gartenbau.schadstoff
), schadstoffe_json AS (
    SELECT
        array_to_json(
            array_agg(
                row_to_json((
                    SELECT
                        schadstoffe
                    FROM
                        (
                            SELECT
                                'SO_AFU_Verzeichnis_schadstoffbelastete_Boeden_Publikation_20200701.Schadstoff' as "@type",
                                schadstoffname AS "Schadstoffname",
                                kuerzel AS "Kuerzel"
                        ) schadstoffe
                ))
            )
        ) AS schadstoffe,
        gartenbau
    FROM
        schadstoffe
    GROUP BY
        gartenbau
), gemeinden AS (
    SELECT
        schdstfflstt_bden_gartenbau.t_id,
        string_agg(DISTINCT hoheitsgrenzen_gemeindegrenze.gemeindename, ', ' ORDER BY hoheitsgrenzen_gemeindegrenze.gemeindename ASC) AS gemeinden
    FROM
        agi_hoheitsgrenzen_pub.hoheitsgrenzen_gemeindegrenze,
        afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
    WHERE
        ST_DWithin(schdstfflstt_bden_gartenbau.geometrie, hoheitsgrenzen_gemeindegrenze.geometrie, 0)
    GROUP BY
        schdstfflstt_bden_gartenbau.t_id
), bfs_nummern AS (
    SELECT
        schdstfflstt_bden_gartenbau.t_id,
        string_agg(DISTINCT CAST(hoheitsgrenzen_gemeindegrenze.bfs_gemeindenummer AS varchar), ', ' ORDER BY CAST(hoheitsgrenzen_gemeindegrenze.bfs_gemeindenummer AS varchar) ASC) AS bfs_nummern
    FROM
        agi_hoheitsgrenzen_pub.hoheitsgrenzen_gemeindegrenze,
        afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
    WHERE
        ST_DWithin(schdstfflstt_bden_gartenbau.geometrie, hoheitsgrenzen_gemeindegrenze.geometrie, 0)
    GROUP BY
        schdstfflstt_bden_gartenbau.t_id
), parzellennummern AS (
    SELECT
        schdstfflstt_bden_gartenbau.t_id,
        string_agg(DISTINCT liegen.nummer || '(' || liegen.bfs_nr|| ')', ', ' ORDER BY liegen.nummer || '(' || liegen.bfs_nr || ')') AS grundbuchnummern
    FROM
        (SELECT liegenschaften_grundstueck.nummer,
		         liegenschaften_grundstueck.t_datasetname AS bfs_nr,
		         liegenschaften_liegenschaft.geometrie
		 FROM agi_dm01avso24.liegenschaften_grundstueck
		 LEFT JOIN agi_dm01avso24.liegenschaften_liegenschaft
		     ON liegenschaften_liegenschaft.liegenschaft_von = liegenschaften_grundstueck.t_id
		) liegen,
        afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
    WHERE
        ST_DWithin(schdstfflstt_bden_gartenbau.geometrie, liegen.geometrie, 0)
    GROUP BY
        schdstfflstt_bden_gartenbau.t_id
), flurnamen AS (
    SELECT
        schdstfflstt_bden_gartenbau.t_id,
        string_agg(DISTINCT flurname.flurname, ', ' ORDER BY flurname.flurname) AS flurname
    FROM
        ( SELECT
		     aname AS flurname,
		     geometrie
		 FROM
		     agi_dm01avso24.nomenklatur_flurname
		 ) flurname,
        afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
    WHERE
        ST_DWithin(schdstfflstt_bden_gartenbau.geometrie, flurname.geometrie, 0)
    GROUP BY
        schdstfflstt_bden_gartenbau.t_id
)

SELECT
    schdstfflstt_bden_gartenbau.t_ili_tid,
    schdstfflstt_bden_gartenbau.objektname,
    schdstfflstt_bden_gartenbau.nutzungsbeginn,
    schdstfflstt_bden_gartenbau.nutzungsende,
    schdstfflstt_bden_gartenbau.bezeichnung,
    schdstfflstt_bden_gartenbau.astatus,
    schdstfflstt_bden_gartenbau.aktiv,
    schdstfflstt_bden_gartenbau.erfassungsdatum,
    schdstfflstt_bden_gartenbau.datenerfasser,
    schdstfflstt_bden_gartenbau.begruendung_aus_vsb_entlassen,
    schdstfflstt_bden_gartenbau.datum_aus_vsb_entlassen,
    schdstfflstt_bden_gartenbau.bemerkung,
    schdstfflstt_bden_gartenbau.nutzungseinschraenkung,
	schdstfflstt_bden_gartenbau.nutzungsverbot,
    dokumente_json.dokumente,
    schadstoffe_json.schadstoffe,
    schdstfflstt_bden_gartenbau.geometrie,
    bfs_nummern.bfs_nummern AS bfs_gemeindenummern,
    gemeinden.gemeinden AS gemeindenamen,
    parzellennummern.grundbuchnummern,
    flurnamen.flurname AS flurnamen,
    status.description AS status_txt,
    begruendung_vsb_entlassen.description AS begruendung_aus_vsb_entlassen_txt
FROM
    afu_schadstoffbelastete_boeden.schdstfflstt_bden_gartenbau
    LEFT JOIN dokumente_json
        ON dokumente_json.gartenbau = schdstfflstt_bden_gartenbau.t_id
    LEFT JOIN schadstoffe_json
        ON schadstoffe_json.gartenbau = schdstfflstt_bden_gartenbau.t_id
    LEFT JOIN gemeinden
        ON gemeinden.t_id = schdstfflstt_bden_gartenbau.t_id
    LEFT JOIN bfs_nummern
        ON bfs_nummern.t_id = schdstfflstt_bden_gartenbau.t_id
    LEFT JOIN parzellennummern
        ON parzellennummern.t_id = schdstfflstt_bden_gartenbau.t_id
    LEFT JOIN flurnamen
        ON flurnamen.t_id = schdstfflstt_bden_gartenbau.t_id
    LEFT JOIN afu_schadstoffbelastete_boeden.schadstoffbelasteter_boden_status status
        ON status.ilicode = schdstfflstt_bden_gartenbau.astatus
    LEFT JOIN afu_schadstoffbelastete_boeden.schadstoffbelasteter_boden_begruendung_aus_vsb_entlassen begruendung_vsb_entlassen
        ON begruendung_vsb_entlassen.ilicode = schdstfflstt_bden_gartenbau.begruendung_aus_vsb_entlassen
WHERE
    schdstfflstt_bden_gartenbau.flaechentyp = 'Gaertnerei'
;


text:
'use strict';

var metal = require('gulp-metal');

metal.registerTasks({
	bundleFileName: 'switcher.js',
	moduleName: 'metal-switcher'
});


text:
<?php
/**
 * @package dompdf
 * @link    http://www.dompdf.com/
 * @author  Benj Carson <benjcarson@digitaljunkies.ca>
 * @author  Helmut Tischer <htischer@weihenstephan.org>
 * @author  Fabien Ménager <fabien.menager@gmail.com>
 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 * @version $Id: dompdf_config.inc.php 468 2012-02-05 10:51:40Z fabien.menager $
 */

//error_reporting(E_STRICT | E_ALL | E_DEPRECATED);
//ini_set("display_errors", 1);

PHP_VERSION >= 5.0 or die("DOMPDF requires PHP 5.0+");

/**
 * The root of your DOMPDF installation
 */
define("DOMPDF_DIR", str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__))));

/**
 * The location of the DOMPDF include directory
 */
define("DOMPDF_INC_DIR", DOMPDF_DIR . "/include");

/**
 * The location of the DOMPDF lib directory
 */
define("DOMPDF_LIB_DIR", DOMPDF_DIR . "/lib");

/**
 * Some installations don't have $_SERVER['DOCUMENT_ROOT']
 * http://fyneworks.blogspot.com/2007/08/php-documentroot-in-iis-windows-servers.html
 */
if( !isset($_SERVER['DOCUMENT_ROOT']) ) {
  $path = "";

  if ( isset($_SERVER['SCRIPT_FILENAME']) )
    $path = $_SERVER['SCRIPT_FILENAME'];
  elseif ( isset($_SERVER['PATH_TRANSLATED']) )
    $path = str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']);

  $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($path, 0, 0-strlen($_SERVER['PHP_SELF'])));
}

/** Include the custom config file if it exists */
if ( file_exists(DOMPDF_DIR . "/dompdf_config.custom.inc.php") ){
  require_once(DOMPDF_DIR . "/dompdf_config.custom.inc.php");
}

//FIXME: Some function definitions rely on the constants defined by DOMPDF. However, might this location prove problematic?
require_once(DOMPDF_INC_DIR . "/functions.inc.php");

/**
 * Username and password used by the configuration utility in www/
 */
def("DOMPDF_ADMIN_USERNAME", "user");
def("DOMPDF_ADMIN_PASSWORD", "password");

/**
 * The location of the DOMPDF font directory
 *
 * If DOMPDF_FONT_DIR identical to DOMPDF_FONT_CACHE or user executing DOMPDF from the CLI,
 * this directory must be writable by the webserver process ().
 * *Please note the trailing slash.*
 *
 * Notes regarding fonts:
 * Additional .afm font metrics can be added by executing load_font.php from command line.
 *
 * Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
 * be embedded in the pdf file or the PDF may not display correctly. This can significantly
 * increase file size and could violate copyright provisions of a font. Font subsetting is
 * not currently supported.
 *
 * Any font specification in the source HTML is translated to the closest font available
 * in the font directory.
 *
 * The pdf standard "Base 14 fonts" are:
 * Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
 * Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
 * Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
 * Symbol,
 * ZapfDingbats,
 *
 * *Please note the trailing slash.*
 */
def("DOMPDF_FONT_DIR", DOMPDF_DIR . "/lib/fonts/");

/**
 * The location of the DOMPDF font cache directory
 *
 * Note this directory must be writable by the webserver process
 * This folder must already exist!
 * It contains the .afm files, on demand parsed, converted to php syntax and cached
 * This folder can be the same as DOMPDF_FONT_DIR
 */
def("DOMPDF_FONT_CACHE", DOMPDF_FONT_DIR);

/**
 * The location of a temporary directory.
 *
 * The directory specified must be writeable by the webserver process.
 * The temporary directory is required to download remote images and when
 * using the PFDLib back end.
 */
def("DOMPDF_TEMP_DIR", sys_get_temp_dir());

/**
 * ==== IMPORTANT ====
 *
 * dompdf's "chroot": Prevents dompdf from accessing system files or other
 * files on the webserver.  All local files opened by dompdf must be in a
 * subdirectory of this directory.  DO NOT set it to '/' since this could
 * allow an attacker to use dompdf to read any files on the server.  This
 * should be an absolute path.
 * This is only checked on command line call by dompdf.php, but not by
 * direct class use like:
 * $dompdf = new DOMPDF();	$dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
 */
def("DOMPDF_CHROOT", realpath(DOMPDF_DIR));

/**
 * Whether to use Unicode fonts or not.
 *
 * When set to true the PDF backend must be set to "CPDF" and fonts must be
 * loaded via load_font.php.
 *
 * When enabled, dompdf can support all Unicode glyphs.  Any glyphs used in a
 * document must be present in your fonts, however.
 */
def("DOMPDF_UNICODE_ENABLED", true);

/**
 * Whether to make font subsetting or not.
 */
def("DOMPDF_ENABLE_FONTSUBSETTING", false);

/**
 * The PDF rendering backend to use
 *
 * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
 * 'auto'.  'auto' will look for PDFLib and use it if found, or if not it will
 * fall back on CPDF.  'GD' renders PDFs to graphic files.  {@link
 * Canvas_Factory} ultimately determines which rendering class to instantiate
 * based on this setting.
 *
 * Both PDFLib & CPDF rendering backends provide sufficient rendering
 * capabilities for dompdf, however additional features (e.g. object,
 * image and font support, etc.) differ between backends.  Please see
 * {@link PDFLib_Adapter} for more information on the PDFLib backend
 * and {@link CPDF_Adapter} and lib/class.pdf.php for more information
 * on CPDF.  Also see the documentation for each backend at the links
 * below.
 *
 * The GD rendering backend is a little different than PDFLib and
 * CPDF.  Several features of CPDF and PDFLib are not supported or do
 * not make any sense when creating image files.  For example,
 * multiple pages are not supported, nor are PDF 'objects'.  Have a
 * look at {@link GD_Adapter} for more information.  GD support is new
 * and experimental, so use it at your own risk.
 *
 * @link http://www.pdflib.com
 * @link http://www.ros.co.nz/pdf
 * @link http://www.php.net/image
 */
def("DOMPDF_PDF_BACKEND", "CPDF");

/**
 * PDFlib license key
 *
 * If you are using a licensed, commercial version of PDFlib, specify
 * your license key here.  If you are using PDFlib-Lite or are evaluating
 * the commercial version of PDFlib, comment out this setting.
 *
 * @link http://www.pdflib.com
 *
 * If pdflib present in web server and auto or selected explicitely above,
 * a real license code must exist!
 */
//def("DOMPDF_PDFLIB_LICENSE", "your license key here");

/**
 * html target media view which should be rendered into pdf.
 * List of types and parsing rules for future extensions:
 * http://www.w3.org/TR/REC-html40/types.html
 *   screen, tty, tv, projection, handheld, print, braille, aural, all
 * Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
 * Note, even though the generated pdf file is intended for print output,
 * the desired content might be different (e.g. screen or projection view of html file).
 * Therefore allow specification of content here.
 */
def("DOMPDF_DEFAULT_MEDIA_TYPE", "screen");

/**
 * The default paper size.
 *
 * North America standard is "letter"; other countries generally "a4"
 *
 * @see CPDF_Adapter::PAPER_SIZES for valid sizes
 */
def("DOMPDF_DEFAULT_PAPER_SIZE", "letter");

/**
 * The default font family
 *
 * Used if no suitable fonts can be found. This must exist in the font folder.
 * @var string
 */
def("DOMPDF_DEFAULT_FONT", "serif");

/**
 * Image DPI setting
 *
 * This setting determines the default DPI setting for images and fonts.  The
 * DPI may be overridden for inline images by explictly setting the
 * image's width & height style attributes (i.e. if the image's native
 * width is 600 pixels and you specify the image's width as 72 points,
 * the image will have a DPI of 600 in the rendered PDF.  The DPI of
 * background images can not be overridden and is controlled entirely
 * via this parameter.
 *
 * For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
 * If a size in html is given as px (or without unit as image size),
 * this tells the corresponding size in pt.
 * This adjusts the relative sizes to be similar to the rendering of the
 * html page in a reference browser.
 *
 * In pdf, always 1 pt = 1/72 inch
 *
 * Rendering resolution of various browsers in px per inch:
 * Windows Firefox and Internet Explorer:
 *   SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
 * Linux Firefox:
 *   about:config *resolution: Default:96
 *   (xorg screen dimension in mm and Desktop font dpi settings are ignored)
 *
 * Take care about extra font/image zoom factor of browser.
 *
 * In images, <img> size in pixel attribute, img css style, are overriding
 * the real image dimension in px for rendering.
 *
 * @var int
 */
def("DOMPDF_DPI", 96);

/**
 * Enable inline PHP
 *
 * If this setting is set to true then DOMPDF will automatically evaluate
 * inline PHP contained within <script type="text/php"> ... </script> tags.
 *
 * Enabling this for documents you do not trust (e.g. arbitrary remote html
 * pages) is a security risk.  Set this option to false if you wish to process
 * untrusted documents.
 *
 * @var bool
 */
def("DOMPDF_ENABLE_PHP", false);

/**
 * Enable inline Javascript
 *
 * If this setting is set to true then DOMPDF will automatically insert
 * JavaScript code contained within <script type="text/javascript"> ... </script> tags.
 *
 * @var bool
 */
def("DOMPDF_ENABLE_JAVASCRIPT", true);

/**
 * Enable remote file access
 *
 * If this setting is set to true, DOMPDF will access remote sites for
 * images and CSS files as required.
 * This is required for part of test case www/test/image_variants.html through www/examples.php
 *
 * Attention!
 * This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and
 * allowing remote access to dompdf.php or on allowing remote html code to be passed to
 * $dompdf = new DOMPDF(); $dompdf->load_html(...);
 * This allows anonymous users to download legally doubtful internet content which on
 * tracing back appears to being downloaded by your server, or allows malicious php code
 * in remote html pages to be executed by your server with your account privileges.
 *
 * @var bool
 */
def("DOMPDF_ENABLE_REMOTE", true);

/**
 * The debug output log
 * @var string
 */
def("DOMPDF_LOG_OUTPUT_FILE", DOMPDF_FONT_DIR."log.htm");

/**
 * A ratio applied to the fonts height to be more like browsers' line height
 */
def("DOMPDF_FONT_HEIGHT_RATIO", 1.1);

/**
 * Enable CSS float
 *
 * Allows people to disabled CSS float support
 * @var bool
 */
def("DOMPDF_ENABLE_CSS_FLOAT", true);

/**
 * Prepend the DOMPDF autoload function the spl_autoload stack
 *
 * @var bool
 */
def("DOMPDF_AUTOLOAD_PREPEND", false);

/**
 * Use the more-than-experimental HTML5 Lib parser
 */
def("DOMPDF_ENABLE_HTML5PARSER", false);
require_once(DOMPDF_LIB_DIR . "/html5lib/Parser.php");

// ### End of user-configurable options ###

require_once(DOMPDF_INC_DIR . "/autoload.inc.php");

/**
 * Ensure that PHP is working with text internally using UTF8 character encoding.
 */
mb_internal_encoding('UTF-8');

/**
 * Global array of warnings generated by DomDocument parser and
 * stylesheet class
 *
 * @var array
 */
global $_dompdf_warnings;
$_dompdf_warnings = array();

/**
 * If true, $_dompdf_warnings is dumped on script termination when using
 * dompdf/dompdf.php or after rendering when using the DOMPDF class.
 * When using the class, setting this value to true will prevent you from
 * streaming the PDF.
 *
 * @var bool
 */
global $_dompdf_show_warnings;
$_dompdf_show_warnings = false;

/**
 * If true, the entire tree is dumped to stdout in dompdf.cls.php.
 * Setting this value to true will prevent you from streaming the PDF.
 *
 * @var bool
 */
global $_dompdf_debug;
$_dompdf_debug = false;

/**
 * Array of enabled debug message types
 *
 * @var array
 */
global $_DOMPDF_DEBUG_TYPES;
$_DOMPDF_DEBUG_TYPES = array(); //array("page-break" => 1);

/* Optionally enable different classes of debug output before the pdf content.
 * Visible if displaying pdf as text,
 * E.g. on repeated display of same pdf in browser when pdf is not taken out of
 * the browser cache and the premature output prevents setting of the mime type.
 */
def('DEBUGPNG', false);
def('DEBUGKEEPTEMP', false);
def('DEBUGCSS', false);

/* Layout debugging. Will display rectangles around different block levels.
 * Visible in the PDF itself.
 */
def('DEBUG_LAYOUT', false);
def('DEBUG_LAYOUT_LINES', true);
def('DEBUG_LAYOUT_BLOCKS', true);
def('DEBUG_LAYOUT_INLINE', true);
def('DEBUG_LAYOUT_PADDINGBOX', true);


text:
public class Sup {

}

class ExtractSuperClass extends Sup {

  private final String <caret>field;

  public ExtractSuperClass() {

    try {
      field = (String)"text";
    }
    catch (RuntimeException e) {
      throw new RuntimeException();
    }
  }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">

    <title>Floris: Крымский чай и сладости</title>
    <meta name="description" content="">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta property="og:image" content="assets_price/path/to/image.jpg">
    <link rel="shortcut icon" href="assets_price/img/favicon/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon" href="assets_price/img/favicon/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="assets_price/img/favicon/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="assets_price/img/favicon/apple-touch-icon-114x114.png">

    <link rel="stylesheet" href="assets_price/css/main.min.css">

    <meta name="theme-color" content="#000">

    <meta name="msapplication-navbutton-color" content="#000">

    <meta name="apple-mobile-web-app-status-bar-style" content="#000">

                        Крымский чай и сладости

                        0 800 1111-00-00

с 9:00  до 18:00

       <?php echo $content; ?>

© 2011–2016. Флорис.

                            Крым, г. Симферополь, ул. Данилова, 43.

                                +7 978 049-96-11
                                info@floristea.com

Отдел продаж:

                                +7 3652 583-577

                                floristea
                                floristea
                                floristea

                        Получите оптовый
прайс-лист на e-mail

                    <form id="w2" action="https://app.getresponse.com/add_subscriber.html" accept-charset="utf-8" method="post">
                        <input type="text" id="orders-phone" class="phone" name="custom_phone_price" placeholder="Номер телефона" value="">
                        <input type="text" id="orders-email" class="email" name="email" placeholder="Электронный адрес *" required>
                        <input type="hidden" name="campaign_token" value="pEIMz" />
                        <input type="submit" value="ПОЛУЧИТЬ"/>
                    </form>

<?php $this->endPage()?>


text:
/**
 * Created by prof on 18.02.14.
 */

exports.world = function() {
    console.log('Hello World');
}


text: {{ include.title }}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.digitaltwins.core;

import com.azure.core.http.HttpClient;
import com.azure.core.util.logging.ClientLogger;
import com.azure.digitaltwins.core.models.DigitalTwinsEventRoute;
import com.azure.digitaltwins.core.models.ListDigitalTwinsEventRoutesOptions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import reactor.test.StepVerifier;

import java.net.HttpURLConnection;
import java.util.concurrent.atomic.AtomicInteger;

import static com.azure.digitaltwins.core.TestHelper.DISPLAY_NAME_WITH_ARGUMENTS;
import static com.azure.digitaltwins.core.TestHelper.assertRestException;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
 * Tests for the async client's event route APIs
 */
public class EventRoutesAsyncTest extends EventRoutesTestBase {

    private final ClientLogger logger = new ClientLogger(EventRoutesAsyncTest.class);

    @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
    @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters")
    @Override
    public void eventRouteLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) throws InterruptedException {
        DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion);
        String eventRouteId = testResourceNamer.randomUuid();

        // CREATE
        DigitalTwinsEventRoute eventRouteToCreate = new DigitalTwinsEventRoute(EVENT_ROUTE_ENDPOINT_NAME);
        eventRouteToCreate.setFilter(FILTER);
        StepVerifier.create(asyncClient.createOrReplaceEventRoute(eventRouteId, eventRouteToCreate))
            .verifyComplete();

        waitIfLive();

        try {
            // GET
            StepVerifier.create(asyncClient.getEventRoute(eventRouteId))
                .assertNext((retrievedEventRoute) -> assertEventRoutesEqual(eventRouteToCreate, eventRouteId, retrievedEventRoute))
                .verifyComplete();

            // LIST
            StepVerifier.create(asyncClient.listEventRoutes())
                .thenConsumeWhile(
                    (eventRoute) -> eventRoute != null,
                    (retrievedEventRoute) -> {
                        // There may be other event routes in place, so ignore them if they aren't the event route
                        // that was just created. We only need to see that the newly created event route is present in the
                        // list of all event routes.
                        if (retrievedEventRoute.getEventRouteId().equals(eventRouteToCreate.getEventRouteId())) {
                            assertEventRoutesEqual(eventRouteToCreate, eventRouteId, retrievedEventRoute);
                        }
                    })
                .verifyComplete();
        } finally {
            // DELETE
            StepVerifier.create(asyncClient.deleteEventRoute(eventRouteId))
                .verifyComplete();
        }
    }

    @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
    @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters")
    @Override
    public void getEventRouteThrowsIfEventRouteDoesNotExist(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) {
        DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion);
        String eventRouteId = testResourceNamer.randomUuid();

        StepVerifier.create(asyncClient.getEventRoute(eventRouteId))
            .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_NOT_FOUND));
    }

    @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
    @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters")
    @Override
    public void createEventRouteThrowsIfFilterIsMalformed(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) {
        DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion);
        String eventRouteId = testResourceNamer.randomUuid();
        DigitalTwinsEventRoute eventRouteToCreate = new DigitalTwinsEventRoute(EVENT_ROUTE_ENDPOINT_NAME);
        eventRouteToCreate.setFilter("this is not a valid filter");

        StepVerifier.create(asyncClient.createOrReplaceEventRoute(eventRouteId, eventRouteToCreate))
            .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_BAD_REQUEST));
    }

    @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
    @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters")
    @Override
    public void listEventRoutesPaginationWorks(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) {
        DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion);
        final int eventRouteCountToCreate = 5;
        final int expectedPageSize = 2;

        // create enough event routes so that the list API can have multiple pages
        for (int i = 0; i < eventRouteCountToCreate; i++) {
            String eventRouteId = testResourceNamer.randomUuid();
            DigitalTwinsEventRoute eventRouteToCreate = new DigitalTwinsEventRoute(EVENT_ROUTE_ENDPOINT_NAME);
            eventRouteToCreate.setFilter(FILTER);
            StepVerifier.create(asyncClient.createOrReplaceEventRoute(eventRouteId, eventRouteToCreate))
                .verifyComplete();
        }

        // list event routes by page, make sure that all non-final pages have the expected page size
        AtomicInteger pageCount = new AtomicInteger(0);
        ListDigitalTwinsEventRoutesOptions listEventRoutesOptions = (new ListDigitalTwinsEventRoutesOptions()).setMaxItemsPerPage(expectedPageSize);
        StepVerifier.create(asyncClient.listEventRoutes(listEventRoutesOptions).byPage())
            .thenConsumeWhile(
                (pagedResponseOfEventRoute) -> pagedResponseOfEventRoute != null,
                (pagedResponseOfEventRoute) -> {
                    pageCount.incrementAndGet();

                    // Any page of results with a continuation token should be a non-final page, and should have the exact page size that we specified above
                    if (pagedResponseOfEventRoute.getContinuationToken() != null) {
                        assertEquals(expectedPageSize, pagedResponseOfEventRoute.getValue().size(), "Unexpected page size for a non-terminal page");
                    }
                })
            .verifyComplete();

        assertTrue(pageCount.get() >= 3, "At least three pages should have been returned.");
    }
}


text:
package controllers;

import akka.actor.ActorRef;
import akka.actor.Props;
import akka.actor.UntypedActor;
import com.fasterxml.jackson.databind.JsonNode;
import play.libs.Json;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by lu.kun on 2015/4/9.
 */
public class MyWebSocketOutputActor extends UntypedActor {

    public static Props props(ActorRef out) {
        return Props.create(MyWebSocketOutputActor.class, out);
    }

    private final ActorRef out;

    public MyWebSocketOutputActor(ActorRef out) {
        this.out = out;
    }

    @Override
    public void onReceive(Object message) throws Exception {
        System.out.println("onReceive in MyWebSocketOutputActor");
        if (message instanceof MsgEnvelope) {
            Map<String, String> innerMap = new HashMap<String, String>();
            innerMap.put("event", "message");
            innerMap.put("data", ((MsgEnvelope) message).data.toString());
            System.out.println(innerMap);
            out.tell(Json.toJson(innerMap), self());
        }
    }

    @Override
    public void postStop() throws Exception {
        super.postStop();
    }
}


text:
/**
 * @author mrdoob / http://mrdoob.com/
 */

Sidebar.Settings = function ( editor ) {

	var config = editor.config;
	var signals = editor.signals;
	var strings = editor.strings;

	var container = new UI.Panel();
	container.setBorderTop( '0' );
	container.setPaddingTop( '20px' );
	container.setPaddingBottom( '20px' );

	// language

	var options = {
		'en': 'English',
		'zh': '中文'
	};

	var languageRow = new UI.Row();
	var language = new UI.Select().setWidth( '150px' );
	language.setOptions( options );

	if ( config.getKey( 'language' ) !== undefined ) {

		language.setValue( config.getKey( 'language' ) );

	}

	language.onChange( function () {

		var value = this.getValue();

		editor.config.setKey( 'language', value );

	} );

	languageRow.add( new UI.Text( strings.getKey( 'sidebar/settings/language' ) ).setWidth( '90px' ) );
	languageRow.add( language );

	container.add( languageRow );

	// theme

	var options = {
		'css/light.css': 'light',
		'css/dark.css': 'dark'
	};

	var themeRow = new UI.Row();
	var theme = new UI.Select().setWidth( '150px' );
	theme.setOptions( options );

	if ( config.getKey( 'theme' ) !== undefined ) {

		theme.setValue( config.getKey( 'theme' ) );

	}

	theme.onChange( function () {

		var value = this.getValue();

		editor.setTheme( value );
		editor.config.setKey( 'theme', value );

	} );

	themeRow.add( new UI.Text( strings.getKey( 'sidebar/settings/theme' ) ).setWidth( '90px' ) );
	themeRow.add( theme );

	container.add( themeRow );

	container.add( new Sidebar.Settings.Shortcuts( editor ) );
	container.add( new Sidebar.Settings.Viewport( editor ) );

	return container;

};


text:
Cordova extension is a Crosswalk extension which enables Cordova plugins to integrate with Crosswalk runtime. With this extension you can leverage the existing Cordova plugins to build up your Crosswalk application for iOS.

# Installation

For hybrid application developers, the easiest way to integrate Cordova extension is using CocoaPods. For CocoaPods installation & usage, please refer to: https://cocoapods.org/

Add `crosswalk-extension-cordova` into your Podfile:

```
pod 'crosswalk-extension-cordova', '~> 1.0'
```

Then use 'pod install' to install pods and create the workspace for the project.

# Usage

Contents TBD...


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.WindowsAzure.MobileServices;
using Xamarin.Forms;
using Xamarin.Forms.Platform.WinPhone;

using MobileCRM.Shared.Pages.Home;
using MobileCRM.Shared.Services;

using MobileCRM.WindowsPhone.Renderers;

[assembly: ExportRenderer(typeof(MobileCRM.Shared.Pages.Home.LoginPage), typeof(LoginPageRenderer_WP))]

namespace MobileCRM.WindowsPhone.Renderers
{
    public class LoginPageRenderer_WP : PageRenderer, ILogin
    {

        protected async override void OnElementChanged(ElementChangedEventArgs<Page> e)
        {
            base.OnElementChanged(e);

            MobileServiceClient client = AuthInfo.Instance.GetMobileServiceClient();

            AuthInfo.Instance.User = await client.LoginAsync(AuthInfo.AUTH_PROVIDER);

            //Will implement in v2.
            //await AuthInfo.Instance.GetUserInfo();

            MessagingCenter.Send<ILogin>(this, "Authenticated");
        }

    }

}


text:
package cmd

import (
	"fmt"
	"os"
	"time"

	"github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb"
	"github.com/coreos/etcd/Godeps/_workspace/src/github.com/spf13/cobra"
	"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
	"github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc"
	"github.com/coreos/etcd/etcdserver/etcdserverpb"
)

// rangeCmd represents the range command
var rangeCmd = &cobra.Command{
	Use:   "range key [end-range]",
	Short: "Benchmark range",

	Run: rangeFunc,
}

var (
	rangeTotal int
)

func init() {
	RootCmd.AddCommand(rangeCmd)
	rangeCmd.Flags().IntVar(&rangeTotal, "total", 10000, "Total number of range requests")
}

func rangeFunc(cmd *cobra.Command, args []string) {
	if len(args) == 0 || len(args) > 2 {
		fmt.Fprintln(os.Stderr, cmd.Usage())
		os.Exit(1)
	}

	k := []byte(args[0])
	var end []byte
	if len(args) == 1 {
		end = []byte(args[1])
	}

	results = make(chan result)
	requests := make(chan etcdserverpb.RangeRequest, totalClients)
	bar = pb.New(rangeTotal)

	conns := make([]*grpc.ClientConn, totalConns)
	for i := range conns {
		conns[i] = mustCreateConn()
	}

	clients := make([]etcdserverpb.KVClient, totalClients)
	for i := range clients {
		clients[i] = etcdserverpb.NewKVClient(conns[i%int(totalConns)])
	}

	bar.Format("Bom !")
	bar.Start()

	for i := range clients {
		wg.Add(1)
		go doRange(clients[i], requests)
	}

	pdoneC := printReport(results)

	go func() {
		for i := 0; i < rangeTotal; i++ {
			requests <- etcdserverpb.RangeRequest{
				Key:      k,
				RangeEnd: end}
		}
		close(requests)
	}()

	wg.Wait()

	bar.Finish()

	close(results)
	<-pdoneC
}

func doRange(client etcdserverpb.KVClient, requests <-chan etcdserverpb.RangeRequest) {
	defer wg.Done()

	for req := range requests {
		st := time.Now()
		_, err := client.Range(context.Background(), &req)

		var errStr string
		if err != nil {
			errStr = err.Error()
		}
		results <- result{errStr: errStr, duration: time.Since(st)}
		bar.Increment()
	}
}


text:
My dot files.

## Installation

You can clone the repository wherever you want. The bootstrapper script will pull in the latest version and copy the files to your home folder.

```bash
git clone https://github.com/alexandref93/dotfiles.git && cd dotfiles && source bootstrap.sh
```

To update, `cd` into your local `dotfiles` repository and then:

```bash
source bootstrap.sh
```

Alternatively, to update while avoiding the confirmation prompt:

```bash
set -- -f; source bootstrap.sh
```

### Install Homebrew formulae

When setting up a new Mac, you may want to install some common [Homebrew](http://brew.sh/) formulae (after installing Homebrew, of course):

```bash
./brew.sh
```

### Install NPM CLI

When setting up a new Mac, you may want to install some common [NPM](https://www.npmjs.com/) Cli (after installing NodeJS, of course):

```bash
./npm.sh
```

## License

[MIT](https://github.com/alexandref93/dotfiles/blob/master/LICENSE)


text:
Deploy2

Source

         Download


text:
package pub.chara.cwui.pretendsharing_xposed.sub;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.widget.Toast;

/**
 * Created by user on 2017/9/5.
 */

public class QQ {
    //复用了原假装分享的一些代码
    private static final String string_share = "share";

    /**
     *
     * @param realIntent 真的Intent
     * @param thatActivity FakeActivity.this
     */
    public static void invoke(Intent realIntent, Activity thatActivity){
        //相关qq sdk内代码:搜索mqqapi
        onButtonClick(realIntent,thatActivity);
    }

    private static void onButtonClick(Intent realIntent,Activity thatActivity) { //函数名称是因为原假装分享的原设计是点击按钮才分享
        final Intent iGet = realIntent;
        final Uri uGet = iGet.getData();//获取Uri
        if(null!=uGet)
        {
            if(!(string_share.equals(uGet.getHost()))) {
                Toast.makeText(thatActivity, "不是一个QQ分享请求", Toast.LENGTH_SHORT).show();
            }
            Intent launchBackIntent = new Intent();
            String pkgName = iGet.getStringExtra("pkg_name"); //返回包名
            launchBackIntent.setData(Uri.parse("tencent222222://tauth.qq.com/?#action=shareToQQ&result=complete&response={\"ret\":0}")); //返回结果
            launchBackIntent.setFlags(272629760); //?
            launchBackIntent.putExtra("fling_action_key",2); //?
            launchBackIntent.putExtra("preAct","LiteActivity"); //?
            launchBackIntent.putExtra("leftViewText","分享成功"); //?
            launchBackIntent.putExtra("fling_code_key",32253408); //?
            launchBackIntent.putExtra("preAct_time",1493381615748L); //?
            try{
                launchBackIntent.setComponent(new ComponentName(pkgName,"com.tencent.tauth.AuthActivity")); //根据腾讯sdk标准是要这么定义
                thatActivity.startActivity(launchBackIntent);
            }catch (Exception e){
                //Toast.makeText(thatActivity,pkgName,Toast.LENGTH_SHORT).show();
                irregularCallback(realIntent,thatActivity);
                return;
            }
            return;
        }else {
            Toast.makeText(thatActivity, "不是一个有效的动作", Toast.LENGTH_SHORT).show();
            return;
        }

    }

    private static void irregularCallback(Intent realIntent,Activity thatActivity){
        final Intent iGet = realIntent;
        Intent launchBackIntent = new Intent();
        String pkgName = iGet.getStringExtra("pkg_name");
        launchBackIntent.setData(Uri.parse("tencent222222://tauth.qq.com/?#action=shareToQQ&result=complete&response={\"ret\":0}"));
        launchBackIntent.setFlags(272629760);
        launchBackIntent.putExtra("fling_action_key",2);
        launchBackIntent.putExtra("preAct","LiteActivity");
        launchBackIntent.putExtra("leftViewText","分享成功");
        launchBackIntent.putExtra("fling_code_key",32253408);
        launchBackIntent.putExtra("preAct_time",1493381615748L);
        try{
            thatActivity.startActivity(launchBackIntent);
        }catch (Exception e){
            return;
        }
    }
}


text:
package com.google.api.gax.grpc;

import com.google.api.gax.core.CredentialsProvider;
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.auth.Credentials;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.truth.Truth;
import io.grpc.MethodDescriptor;
import io.grpc.Status;
import java.io.IOException;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.joda.time.Duration;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mockito;

/** Tests for {@link ClientSettings}. */
@RunWith(JUnit4.class)
public class SettingsTest {

  @Rule public ExpectedException thrown = ExpectedException.none();

  private static class FakeSettings extends ClientSettings {

    private interface FakePagedListResponse extends PagedListResponse<Integer, Integer, Integer> {}

    @SuppressWarnings("unchecked")
    private static final MethodDescriptor<Integer, Integer> fakeMethodMethodDescriptor =
        Mockito.mock(MethodDescriptor.class);

    @SuppressWarnings("unchecked")
    private static final PagedListResponseFactory<Integer, Integer, FakePagedListResponse>
        fakePagedListResponseFactory = Mockito.mock(PagedListResponseFactory.class);

    @SuppressWarnings("unchecked")
    private static final BundlingDescriptor<Integer, Integer> fakeBundlingDescriptor =
        Mockito.mock(BundlingDescriptor.class);

    public static final String DEFAULT_SERVICE_ADDRESS = "pubsub-experimental.googleapis.com";
    public static final int DEFAULT_SERVICE_PORT = 443;
    public static final ImmutableList<String> DEFAULT_SERVICE_SCOPES =
        ImmutableList.<String>builder()
            .add("https://www.googleapis.com/auth/pubsub")
            .add("https://www.googleapis.com/auth/cloud-platform")
            .build();

    private static final ImmutableMap<String, ImmutableSet<Status.Code>> RETRYABLE_CODE_DEFINITIONS;

    static {
      ImmutableMap.Builder<String, ImmutableSet<Status.Code>> definitions = ImmutableMap.builder();
      definitions.put(
          "idempotent",
          Sets.immutableEnumSet(
              Lists.<Status.Code>newArrayList(
                  Status.Code.DEADLINE_EXCEEDED, Status.Code.UNAVAILABLE)));
      definitions.put("non_idempotent", Sets.immutableEnumSet(Lists.<Status.Code>newArrayList()));
      RETRYABLE_CODE_DEFINITIONS = definitions.build();
    }

    private static final ImmutableMap<String, RetrySettings.Builder> RETRY_PARAM_DEFINITIONS;

    static {
      ImmutableMap.Builder<String, RetrySettings.Builder> definitions = ImmutableMap.builder();
      RetrySettings.Builder settingsBuilder = null;
      settingsBuilder =
          RetrySettings.newBuilder()
              .setInitialRetryDelay(Duration.millis(100L))
              .setRetryDelayMultiplier(1.2)
              .setMaxRetryDelay(Duration.millis(1000L))
              .setInitialRpcTimeout(Duration.millis(2000L))
              .setRpcTimeoutMultiplier(1.5)
              .setMaxRpcTimeout(Duration.millis(30000L))
              .setTotalTimeout(Duration.millis(45000L));
      definitions.put("default", settingsBuilder);
      RETRY_PARAM_DEFINITIONS = definitions.build();
    }

    private final SimpleCallSettings<Integer, Integer> fakeMethodSimple;
    private final PagedCallSettings<Integer, Integer, FakePagedListResponse> fakePagedMethod;
    private final BundlingCallSettings<Integer, Integer> fakeMethodBundling;

    public SimpleCallSettings<Integer, Integer> fakeMethodSimple() {
      return fakeMethodSimple;
    }

    public PagedCallSettings<Integer, Integer, FakePagedListResponse> fakePagedMethod() {
      return fakePagedMethod;
    }

    public BundlingCallSettings<Integer, Integer> fakeMethodBundling() {
      return fakeMethodBundling;
    }

    public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
      return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
    }

    public static InstantiatingChannelProvider.Builder defaultChannelProviderBuilder() {
      return InstantiatingChannelProvider.newBuilder()
          .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
          .setPort(DEFAULT_SERVICE_PORT)
          .setCredentialsProvider(defaultCredentialsProviderBuilder().build());
    }

    public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
      return InstantiatingExecutorProvider.newBuilder();
    }

    public static Builder defaultBuilder() {
      return Builder.createDefault();
    }

    public Builder toBuilder() {
      return new Builder(this);
    }

    private FakeSettings(Builder settingsBuilder) throws IOException {
      super(settingsBuilder.getExecutorProvider(), settingsBuilder.getChannelProvider());

      this.fakeMethodSimple = settingsBuilder.fakeMethodSimple().build();
      this.fakePagedMethod = settingsBuilder.fakePagedMethod().build();
      this.fakeMethodBundling = settingsBuilder.fakeMethodBundling().build();
    }

    private static class Builder extends ClientSettings.Builder {

      private SimpleCallSettings.Builder<Integer, Integer> fakeMethodSimple;
      private PagedCallSettings.Builder<Integer, Integer, FakePagedListResponse> fakePagedMethod;
      private BundlingCallSettings.Builder<Integer, Integer> fakeMethodBundling;

      private Builder() {
        super(defaultChannelProviderBuilder().build());

        fakeMethodSimple = SimpleCallSettings.newBuilder(fakeMethodMethodDescriptor);
        fakePagedMethod =
            PagedCallSettings.newBuilder(fakeMethodMethodDescriptor, fakePagedListResponseFactory);
        fakeMethodBundling =
            BundlingCallSettings.newBuilder(fakeMethodMethodDescriptor, fakeBundlingDescriptor)
                .setBundlingSettingsBuilder(BundlingSettings.newBuilder());
      }

      private static Builder createDefault() {
        Builder builder = new Builder();
        builder
            .fakeMethodSimple()
            .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
            .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));

        builder
            .fakePagedMethod()
            .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
            .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));

        builder
            .fakeMethodBundling()
            .getBundlingSettingsBuilder()
            .setElementCountThreshold(800L)
            .setRequestByteThreshold(8388608L)
            .setDelayThreshold(Duration.millis(100));
        builder
            .fakeMethodBundling()
            .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
            .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));

        return builder;
      }

      private Builder(FakeSettings settings) {
        super(settings);

        fakeMethodSimple = settings.fakeMethodSimple().toBuilder();
        fakePagedMethod = settings.fakePagedMethod().toBuilder();
        fakeMethodBundling = settings.fakeMethodBundling().toBuilder();
      }

      @Override
      public Builder setChannelProvider(ChannelProvider channelProvider) {
        super.setChannelProvider(channelProvider);
        return this;
      }

      @Override
      public Builder setExecutorProvider(ExecutorProvider executorProvider) {
        super.setExecutorProvider(executorProvider);
        return this;
      }

      @Override
      public FakeSettings build() throws IOException {
        return new FakeSettings(this);
      }

      public SimpleCallSettings.Builder<Integer, Integer> fakeMethodSimple() {
        return fakeMethodSimple;
      }

      public PagedCallSettings.Builder<Integer, Integer, FakePagedListResponse> fakePagedMethod() {
        return fakePagedMethod;
      }

      public BundlingCallSettings.Builder<Integer, Integer> fakeMethodBundling() {
        return fakeMethodBundling;
      }
    }
  }

  //RetrySettings
  // ====

  @Test
  public void retrySettingsMerge() {
    RetrySettings.Builder builder =
        RetrySettings.newBuilder()
            .setTotalTimeout(Duration.millis(45000))
            .setInitialRpcTimeout(Duration.millis(2000))
            .setRpcTimeoutMultiplier(1.5)
            .setMaxRpcTimeout(Duration.millis(30000))
            .setInitialRetryDelay(Duration.millis(100))
            .setRetryDelayMultiplier(1.2)
            .setMaxRetryDelay(Duration.millis(1000));
    RetrySettings.Builder mergedBuilder = RetrySettings.newBuilder();
    mergedBuilder.merge(builder);

    RetrySettings settingsA = builder.build();
    RetrySettings settingsB = mergedBuilder.build();

    Truth.assertThat(settingsA.getTotalTimeout()).isEqualTo(settingsB.getTotalTimeout());
    Truth.assertThat(settingsA.getInitialRetryDelay()).isEqualTo(settingsB.getInitialRetryDelay());
    Truth.assertThat(settingsA.getRpcTimeoutMultiplier())
        .isWithin(0)
        .of(settingsB.getRpcTimeoutMultiplier());
    Truth.assertThat(settingsA.getMaxRpcTimeout()).isEqualTo(settingsB.getMaxRpcTimeout());
    Truth.assertThat(settingsA.getInitialRetryDelay()).isEqualTo(settingsB.getInitialRetryDelay());
    Truth.assertThat(settingsA.getRetryDelayMultiplier())
        .isWithin(0)
        .of(settingsB.getRetryDelayMultiplier());
    Truth.assertThat(settingsA.getMaxRetryDelay()).isEqualTo(settingsB.getMaxRetryDelay());
  }

  //ClientSettings
  // ====

  @Test
  public void customCredentials() throws IOException {
    Credentials credentials = Mockito.mock(Credentials.class);

    InstantiatingChannelProvider channelProvider =
        FakeSettings.defaultChannelProviderBuilder()
            .setCredentialsProvider(FixedCredentialsProvider.create(credentials))
            .build();
    FakeSettings settings =
        FakeSettings.defaultBuilder().setChannelProvider(channelProvider).build();

    ChannelProvider actualChannelProvider = settings.toBuilder().getChannelProvider();
    Truth.assertThat(actualChannelProvider).isInstanceOf(InstantiatingChannelProvider.class);
    InstantiatingChannelProvider actualInstChPr =
        (InstantiatingChannelProvider) actualChannelProvider;

    Truth.assertThat(actualInstChPr.getServiceAddress())
        .isEqualTo(FakeSettings.DEFAULT_SERVICE_ADDRESS);
    Truth.assertThat(actualInstChPr.getPort()).isEqualTo(FakeSettings.DEFAULT_SERVICE_PORT);
    //TODO(michaelbausor): create JSON with credentials and define GOOGLE_APPLICATION_CREDENTIALS
    // environment variable to allow travis build to access application default credentials
    Truth.assertThat(actualInstChPr.getCredentials()).isSameAs(credentials);
  }

  public void fixedChannelAndExecutorFromDefaultBuilders() throws Exception {
    Credentials credentials = Mockito.mock(Credentials.class);

    CredentialsProvider credentialsProvider = FixedCredentialsProvider.create(credentials);
    InstantiatingChannelProvider channelProvider =
        FakeSettings.defaultChannelProviderBuilder()
            .setCredentialsProvider(credentialsProvider)
            .build();
    InstantiatingExecutorProvider executorProvider =
        FakeSettings.defaultExecutorProviderBuilder().build();

    ChannelAndExecutor channelAndExecutor =
        ChannelAndExecutor.create(executorProvider, channelProvider);

    FakeSettings settings =
        FakeSettings.defaultBuilder()
            .setExecutorProvider(FixedExecutorProvider.create(channelAndExecutor.getExecutor()))
            .setChannelProvider(FixedChannelProvider.create(channelAndExecutor.getChannel()))
            .build();

    ChannelAndExecutor actualChannelAndExecutor = settings.getChannelAndExecutor();
    Truth.assertThat(actualChannelAndExecutor.getExecutor())
        .isSameAs(channelAndExecutor.getExecutor());
    Truth.assertThat(actualChannelAndExecutor.getChannel())
        .isSameAs(channelAndExecutor.getChannel());
  }

  public void providerManager() throws Exception {
    ProviderManager providerManager =
        ProviderManager.newBuilder()
            .setExecutorProvider(FakeSettings.defaultExecutorProviderBuilder().build())
            .setChannelProvider(FakeSettings.defaultChannelProviderBuilder().build())
            .build();

    FakeSettings settingsA =
        FakeSettings.defaultBuilder()
            .setExecutorProvider(providerManager)
            .setChannelProvider(providerManager)
            .build();
    FakeSettings settingsB =
        FakeSettings.defaultBuilder()
            .setExecutorProvider(providerManager)
            .setChannelProvider(providerManager)
            .build();

    ChannelAndExecutor channelAndExecutorA = settingsA.getChannelAndExecutor();
    ChannelAndExecutor channelAndExecutorB = settingsB.getChannelAndExecutor();
    Truth.assertThat(channelAndExecutorA.getChannel()).isSameAs(channelAndExecutorB.getChannel());
    Truth.assertThat(channelAndExecutorB.getExecutor()).isSameAs(channelAndExecutorB.getExecutor());

    Truth.assertThat(channelAndExecutorA.getChannel().isShutdown()).isFalse();
    Truth.assertThat(channelAndExecutorA.getExecutor().isShutdown()).isFalse();

    providerManager.shutdown();

    Truth.assertThat(channelAndExecutorA.getChannel().isShutdown()).isTrue();
    Truth.assertThat(channelAndExecutorA.getExecutor().isShutdown()).isTrue();
  }

  public void providerManagerFixedExecutor() throws Exception {

    FixedExecutorProvider fixedExecutorProvider =
        FixedExecutorProvider.create(
            FakeSettings.defaultExecutorProviderBuilder().build().getExecutor());

    ProviderManager providerManager =
        ProviderManager.newBuilder()
            .setExecutorProvider(fixedExecutorProvider)
            .setChannelProvider(FakeSettings.defaultChannelProviderBuilder().build())
            .build();

    FakeSettings settingsA =
        FakeSettings.defaultBuilder()
            .setExecutorProvider(providerManager)
            .setChannelProvider(providerManager)
            .build();
    FakeSettings settingsB =
        FakeSettings.defaultBuilder()
            .setExecutorProvider(providerManager)
            .setChannelProvider(providerManager)
            .build();

    ChannelAndExecutor channelAndExecutorA = settingsA.getChannelAndExecutor();
    ChannelAndExecutor channelAndExecutorB = settingsB.getChannelAndExecutor();
    Truth.assertThat(channelAndExecutorA.getChannel()).isSameAs(channelAndExecutorB.getChannel());
    Truth.assertThat(channelAndExecutorB.getExecutor()).isSameAs(channelAndExecutorB.getExecutor());

    Truth.assertThat(channelAndExecutorA.getChannel().isShutdown()).isFalse();
    Truth.assertThat(channelAndExecutorA.getExecutor().isShutdown()).isFalse();

    providerManager.shutdown();

    Truth.assertThat(channelAndExecutorA.getChannel().isShutdown()).isTrue();
    Truth.assertThat(channelAndExecutorA.getExecutor().isShutdown()).isFalse();

    fixedExecutorProvider.getExecutor().shutdown();
    Truth.assertThat(channelAndExecutorA.getExecutor().isShutdown()).isTrue();
  }

  @Test
  public void channelCustomCredentialScopes() throws IOException {
    ImmutableList<String> inputScopes =
        ImmutableList.<String>builder().add("https://www.googleapis.com/auth/fakeservice").build();

    CredentialsProvider credentialsProvider =
        FakeSettings.defaultCredentialsProviderBuilder().setScopesToApply(inputScopes).build();
    InstantiatingChannelProvider channelProvider =
        FakeSettings.defaultChannelProviderBuilder()
            .setCredentialsProvider(credentialsProvider)
            .build();
    FakeSettings settings =
        FakeSettings.defaultBuilder().setChannelProvider(channelProvider).build();

    ChannelProvider actualChannelProvider = settings.toBuilder().getChannelProvider();
    Truth.assertThat(actualChannelProvider).isInstanceOf(InstantiatingChannelProvider.class);
    InstantiatingChannelProvider actualInstChPr =
        (InstantiatingChannelProvider) actualChannelProvider;

    Truth.assertThat(actualInstChPr.getServiceAddress())
        .isEqualTo(FakeSettings.DEFAULT_SERVICE_ADDRESS);
    Truth.assertThat(actualInstChPr.getPort()).isEqualTo(FakeSettings.DEFAULT_SERVICE_PORT);

    CredentialsProvider actualCredentialsProvider = actualInstChPr.getCredentialsProvider();
    Truth.assertThat(actualCredentialsProvider).isInstanceOf(GoogleCredentialsProvider.class);
    GoogleCredentialsProvider googCredProv = (GoogleCredentialsProvider) actualCredentialsProvider;

    Truth.assertThat(googCredProv.getScopesToApply()).isEqualTo(inputScopes);

    //TODO(michaelbausor): create JSON with credentials and define GOOGLE_APPLICATION_CREDENTIALS
    // environment variable to allow travis build to access application default credentials
    //Truth.assertThat(connSettings.getCredentials()).isNotNull();
  }

  // CallSettings
  // ====

  @Test
  public void callSettingsToBuilder() throws IOException {
    FakeSettings.Builder builderA = FakeSettings.Builder.createDefault();
    FakeSettings settingsA = builderA.build();
    FakeSettings.Builder builderB = settingsA.toBuilder();
    FakeSettings settingsB = builderB.build();

    assertIsReflectionEqual(builderA, builderB);
    assertIsReflectionEqual(settingsA, settingsB);
  }

  @Test
  public void callSettingsTimeoutNoRetries() throws IOException {
    Duration timeout = Duration.millis(60000);

    FakeSettings.Builder builderA = FakeSettings.Builder.createDefault();
    builderA.fakeMethodSimple().setSimpleTimeoutNoRetries(timeout);
    FakeSettings settingsA = builderA.build();

    FakeSettings.Builder builderB = FakeSettings.Builder.createDefault();
    builderB
        .fakeMethodSimple()
        .setRetryableCodes()
        .setRetrySettingsBuilder(
            RetrySettings.newBuilder()
                .setTotalTimeout(timeout)
                .setInitialRetryDelay(Duration.ZERO)
                .setRetryDelayMultiplier(1)
                .setMaxRetryDelay(Duration.ZERO)
                .setInitialRpcTimeout(timeout)
                .setRpcTimeoutMultiplier(1)
                .setMaxRpcTimeout(timeout));
    FakeSettings settingsB = builderB.build();

    assertIsReflectionEqual(builderA, builderB);
    assertIsReflectionEqual(settingsA, settingsB);
  }

  @Test
  public void simpleCallSettingsBuildFailsUnsetProperties() throws IOException {
    thrown.expect(IllegalStateException.class);
    thrown.expectMessage("Missing required properties");
    SimpleCallSettings.Builder<Integer, Integer> builder =
        SimpleCallSettings.newBuilder(FakeSettings.fakeMethodMethodDescriptor);
    builder.build();
  }

  @Test
  public void callSettingsBuildFromTimeoutNoRetries() throws IOException {
    Duration timeout = Duration.millis(60000);

    SimpleCallSettings.Builder<Integer, Integer> builderA =
        SimpleCallSettings.newBuilder(FakeSettings.fakeMethodMethodDescriptor);
    builderA.setSimpleTimeoutNoRetries(timeout);
    SimpleCallSettings<Integer, Integer> settingsA = builderA.build();

    SimpleCallSettings.Builder<Integer, Integer> builderB =
        SimpleCallSettings.newBuilder(FakeSettings.fakeMethodMethodDescriptor);
    builderB
        .setRetryableCodes()
        .setRetrySettingsBuilder(
            RetrySettings.newBuilder()
                .setTotalTimeout(timeout)
                .setInitialRetryDelay(Duration.ZERO)
                .setRetryDelayMultiplier(1)
                .setMaxRetryDelay(Duration.ZERO)
                .setInitialRpcTimeout(timeout)
                .setRpcTimeoutMultiplier(1)
                .setMaxRpcTimeout(timeout));
    SimpleCallSettings<Integer, Integer> settingsB = builderB.build();

    assertIsReflectionEqual(builderA, builderB);
    assertIsReflectionEqual(settingsA, settingsB);
  }

  //Reflection Helper Methods
  // ====

  /*
   * The pattern for the assertIsReflectionEqual methods below is to exclude fields that would
   * cause the reflectionEquals check to fail, then explicitly recurse on those fields with another
   * call to assertIsReflectionEqual.
   */

  private static void assertIsReflectionEqual(Object objA, Object objB, String[] excludes) {
    Truth.assertThat(EqualsBuilder.reflectionEquals(objA, objB, excludes)).isTrue();
  }

  private static void assertIsReflectionEqual(Object objA, Object objB) {
    assertIsReflectionEqual(objA, objB, null);
  }

  private static void assertIsReflectionEqual(
      ChannelProvider providerA, ChannelProvider providerB) {
    assertIsReflectionEqual(providerA, providerB, new String[] {"credentialsProvider"});
  }

  private static void assertIsReflectionEqual(FakeSettings settingsA, FakeSettings settingsB) {
    assertIsReflectionEqual(
        settingsA,
        settingsB,
        new String[] {
          "fakeMethodSimple",
          "fakePagedMethod",
          "fakeMethodBundling",
          "channelProvider",
          "executorProvider"
        });
    assertIsReflectionEqual(settingsA.fakeMethodSimple, settingsB.fakeMethodSimple);
    assertIsReflectionEqual(settingsA.fakePagedMethod, settingsB.fakePagedMethod);
    assertIsReflectionEqual(settingsA.fakeMethodBundling, settingsB.fakeMethodBundling);
    assertIsReflectionEqual(settingsA.getChannelProvider(), settingsB.getChannelProvider());
    assertIsReflectionEqual(settingsA.getExecutorProvider(), settingsB.getExecutorProvider());
  }

  private static void assertIsReflectionEqual(
      FakeSettings.Builder builderA, FakeSettings.Builder builderB) {
    assertIsReflectionEqual(
        builderA,
        builderB,
        new String[] {
          "fakeMethodSimple",
          "fakePagedMethod",
          "fakeMethodBundling",
          "channelProvider",
          "executorProvider"
        });
    assertIsReflectionEqual(builderA.fakeMethodSimple, builderB.fakeMethodSimple);
    assertIsReflectionEqual(builderA.fakePagedMethod, builderB.fakePagedMethod);
    assertIsReflectionEqual(builderA.fakeMethodBundling, builderB.fakeMethodBundling);
    assertIsReflectionEqual(builderA.getChannelProvider(), builderB.getChannelProvider());
    assertIsReflectionEqual(builderA.getExecutorProvider(), builderB.getExecutorProvider());
  }

  private static void assertIsReflectionEqual(
      UnaryCallSettings.Builder builderA, UnaryCallSettings.Builder builderB) {
    assertIsReflectionEqual(builderA, builderB, new String[] {"retrySettingsBuilder"});
    assertIsReflectionEqual(builderA.getRetrySettingsBuilder(), builderB.getRetrySettingsBuilder());
  }

  private static <RequestT, ResponseT> void assertIsReflectionEqual(
      BundlingCallSettings.Builder<RequestT, ResponseT> builderA,
      BundlingCallSettings.Builder<RequestT, ResponseT> builderB) {
    assertIsReflectionEqual(
        builderA, builderB, new String[] {"retrySettingsBuilder", "bundlingSettingsBuilder"});
    assertIsReflectionEqual(builderA.getRetrySettingsBuilder(), builderB.getRetrySettingsBuilder());
    assertIsReflectionEqual(
        builderA.getBundlingSettingsBuilder(), builderB.getBundlingSettingsBuilder());
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using NExtra.Reflection;
using NUnit.Framework;

namespace NExtra.Tests.Reflection
{
    [TestFixture]
    public class TypeLocatorBehavior
    {
        private IEnumerable<ISomeInterface> _implementations;
        private IEnumerable<SomeBaseClass> _descendants;

        [SetUp]
        public void Setup()
        {
            var implementationLocator = new TypeLocator<ISomeInterface>(Assembly.GetExecutingAssembly());
            var descendantLocator = new TypeLocator<SomeBaseClass>(Assembly.GetExecutingAssembly());

            _implementations = implementationLocator.FindAll();
            _descendants = descendantLocator.FindAll();
        }

        [Test]
        public void FindAll_ShouldReturnAllImplementationsFromSingleAssembly()
        {
            Assert.That(_implementations.Count(), Is.EqualTo(2));
        }

        [Test]
        public void FindAll_ShouldReturnAllImplementationsWithCorrectTypeFromSingleAssembly()
        {
            Assert.That(_implementations.Any(x => x.GetType() == typeof(SomeClass)), Is.True);
            Assert.That(_implementations.Any(x => x.GetType() == typeof(SomeOtherClass)), Is.True);
        }

        [Test]
        public void FindAll_ShouldReturnAllDescendantsFromSingleAssembly()
        {
            Assert.That(_descendants.Count(), Is.EqualTo(2));
        }

        [Test]
        public void FindAll_ShouldReturnAllDescendantsWithCorrectTypeFromSingleAssembly()
        {
            Assert.That(_descendants.Any(x => x.GetType() == typeof(SomeClass)), Is.True);
            Assert.That(_descendants.Any(x => x.GetType() == typeof(SomeOtherClass)), Is.True);
        }
    }

    internal interface ISomeInterface
    {
        void DoStuff();
    }

    internal abstract class SomeBaseClass
    {
        protected abstract void DoOtherStuff();
    }

    internal class SomeClass : SomeBaseClass, ISomeInterface
    {
        public void DoStuff()
        {}

        protected override void DoOtherStuff()
        {
            throw new NotImplementedException();
        }
    }

    internal class SomeOtherClass : SomeBaseClass, ISomeInterface
    {
        public void DoStuff()
        {}

        protected override void DoOtherStuff()
        {
            throw new NotImplementedException();
        }
    }

}


text:
import sys
from scipy.stsci.image._image import *
from scipy.stsci.image.combine import *

__version__ = '2.0'

def test(level=1, verbosity=1):
    from numpy.testing import Tester
    return Tester().test(level,verbosity)


text:
.m-btn-downarrow{
	display:inline-block;
	width:12px;
	line-height:14px;
	*line-height:15px;
	background:url('images/menu_downarrow.png') no-repeat 4px center;
}

a.m-btn-active{
	background-position: bottom right;
}
a.m-btn-active span.l-btn-left{
	background-position: bottom left;
}
a.m-btn-plain-active{
	background:transparent;
	border:1px solid #ddd;
	_padding:0px 5px 0px 0px;
}


text:
<?xml version='1.0' encoding='utf-8'?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Tags></Tags>
    <Includes>
        <Include type="all" source="..\..\..\..\aptbuildxml\0.0-dev\pc\output\TacticalObjectiveIntroPopUp\TacticalObjectiveIntroPopUp.xml"/>
    </Includes>
</AssetDeclaration>


text:
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
#  License text for the above reference.)

FIND_PROGRAM(CMAKE_MAKE_PROGRAM
  NAMES xcodebuild
  PATHS
  /usr/bin
  )
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Video extends MY_Controller {

    const ACTIVE_DEFAULT_VALUE = '1';

    function __construct() {
        parent::__construct();
//cargo librerias,helpers necesarios en constructor.
        $this->load->helper(array('form', 'url'));
        $this->load->library('form_validation');
        $this->load->library('session');
    }

    /**
     * Muestra el form de subir video
     */
    public function upload() {
        if (!$this->isAuthorized()) {
            $data["error"] = 1;
            $data["error_message"] = "Es necesario tener una cuenta para subir videos.";
            $this->load->view('register_layout', $data);
            return; //andate de esta funcion
        }
        $data["log"] = 1;
        $this->load->model('tags_model');
        $arrTags = $this->tags_model->getAllTags();
        $data["tags"] = json_encode($arrTags);
        $this->load->view('upload_video_layout', $data);
        return; //andate de esta funcion
    }

    /**
     *
     * Hace la subida de video
     */
    public function doUpload() {
        if (!$this->isAuthorized()) {
            $data["error"] = 1;
            $data["error_message"] = "Es necesario tener una cuenta para subir videos.";
            $this->load->view('register_layout', $data);
            return; //andate de esta funcion
        }

        $data["log"] = 1;
        $this->form_validation->set_rules('name', 'name', 'trim|required');
        $this->form_validation->set_rules('link', 'link', 'trim|required');
        $this->form_validation->set_rules('duration', 'duration', 'trim|required');
        if ($this->form_validation->run() == FALSE) {
            $data["error"] = 1;
            $data["error_message"] = "Asegurese que escribió correctamente.";
            $this->load->model('tags_model');
            $arrTags = $this->tags_model->getAllTags();
            $data["tags"] = json_encode($arrTags);
            $this->load->view('upload_video_layout', $data);
            return;
        } else {
            $name = $this->input->post('name');
            $link = $this->input->post('link');
            $duration = $this->input->post('duration');
            $this->load->model('video_model');
            $this->load->model('channel_model');
            $this->load->helper('email_content');

            //Existance validation in YouTube system
            // Create a curl handle
            $ch = curl_init();
            $oembedURL = 'www.youtube.com/oembed?url=' . urlencode("https://www.youtube.com/watch?v=" . $link) . '&format=json';
            curl_setopt($ch, CURLOPT_URL, $oembedURL);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

            // Silent CURL execution
            $output = curl_exec($ch);
            unset($output);

            $info = curl_getinfo($ch);
            curl_close($ch);

            if ($info['http_code'] === 404) {
                $data["error"] = 1;
                $data["error_message"] = "El video no existe";
                $this->load->model('tags_model');
                $arrTags = $this->tags_model->getAllTags();
                $data["tags"] = json_encode($arrTags);
                $this->load->view('upload_video_layout', $data);
                return;
            }

            //Existance validation in YouTuve system
            if ($this->video_model->alreadyExist($link)) {
                $data["error"] = 1;
                $data["error_message"] = "El video que intenta subir ya existe";
                $this->load->model('tags_model');
                $arrTags = $this->tags_model->getAllTags();
                $data["tags"] = json_encode($arrTags);
                $this->load->view('upload_video_layout', $data);
                return; //andate de esta funcion
            }

//vemos si tiene un canal
            $idChannel = $this->getChannel($this->session->userdata('userId'));
            if (!$idChannel) {
//crear canal
                $this->load->model('channel_model');
                $idChannel = $this->channel_model->push($this->session->userdata('userId'), "El canal de " . $this->session->userdata('nick'), "", "");
            }
//intentamos insertarlo
            $videoId = $this->video_model->push($idChannel, $name, $link, date('Y-m-d H:i:s'), $duration, 1);
            if ($idChannel !== false && $videoId !== false) {
//Lo subió
//subimos las tags
                $tags = $this->input->post('tags');
                $this->load->model('tags_model');
                if ($tags !== NULL) {
//faltaria chequear que me lleguen cosas lindas y no feas...
                    $this->tags_model->pushTagsForVideo($videoId, $tags);
                }
//envio mail a los seguidores del canal
                newChannelVideoMail($name, $videoId);

                redirect('/', 'refresh');
            }
        }
        $data["error"] = 1;
        $data["error_message"] = "Ha ocurrido un error inesperado.";
        $this->load->view('upload_video_layout', $data);
        return; //andate de esta funcion
    }

    public function index() {
//esta es la pagina se entra si se pone www.mipagina.com/Video
        $this->load->library('session');
        $data["log"] = 0;
        if ($this->isAuthorized()) {
            $data["log"] = 1;
        }
        $this->load->model("video_model");
        $videos = $this->video_model->getVideos(true);
        $data["videos"] = $videos;
        $this->load->view('home_layout', $data);
    }

    /**
     * Es la pantalla de ver video
     */
    public function view() {
        $data = array();
        $data["log"] = 0;
        if ($this->isAuthorized()) {
            $data["log"] = 1;
        }
        $this->load->model('video_model');
        $this->load->model('rate_model');
        $this->load->model('user_model');
        $id = $this->uri->segment(3, 0);

        if ($id != FALSE) {
            $video = $this->video_model->selectById($id);
            if ($video != FALSE) {
                $userId = $this->session->userdata('userId');
//agrego al historial de vistas
                if ($this->isAuthorized())
                    $this->video_model->addView($id, $userId, date('Y-m-d H:i:s'));

                if ($video->userthumb === "") {
                    $video->userthumb = base_url() . ALT_PROFILE_PIC;
                } else {
                    $video->userthumb = base_url() . USER_THUMB_IMAGE_UPLOAD . $video->userthumb;
                }

                $data["follower"] = $this->user_model->isfollowingChannel($userId, $video->idChannel);
                $data["video"] = $video;

                $userRate = $this->rate_model->hasRated($id, $userId);
                $data["userRate"] = ($this->isAuthorized() && $userRate) ? $userRate : 0;

                $data["userID"] = $userId;
                $data["isMyVideo"] = $video->idUser === $userId ? true : false;
                $this->load->view('video_layout', $data);
                return;
            } else {
                $data["error"] = 1;
                $data["error_message"] = "El video solicitado no existe o ha sido eliminado";
                $this->load->view('home_layout', $data);
                return;
            }
        }
        show_404();
    }

    /**
     * Ya se deja paginar ej: /video/search?query=pepe&page=1
     * @return type
     */
    public function search() {
        if ($this->isAuthorized()) {
            $data["log"] = 1;
        }
        $search = $this->input->get("query");
        if ($search == NULL) {
            $this->load->view("home_layout", $data);
            return;
        }
        if ($search === "") {
            $this->load->view("home_layout", $data);
            return;
        }
        $page = ($this->input->get("page") !== NULL) ? $this->input->get("page") : 1;
        $page = ($page > 0) ? $page : 1;
        $this->load->model("video_model");
        $this->load->model("channel_model");
        $videos = $this->video_model->getVideosByNameLike($search, SEARCH_VIDEOS_LIMIT, ($page - 1) * SEARCH_VIDEOS_LIMIT);

        $channels = $this->channel_model->getChannelByNameLike($search, SEARCH_CHANNEL_LIMIT, ($page - 1) * SEARCH_CHANNEL_LIMIT);

        if ($channels != null) {
            foreach ($channels->list as $ch) {
                if ($ch->frontImgUrl === "") {
                    $ch->frontImgUrl = base_url() . ALT_CHANNEL_BACKGROUND_PIC;
                }
            }
        }
        $data["searched_query"] = $search;
        $data["searched_videos"] = $videos;
        $data["searched_channels"] = $channels;
        $this->load->view("search_layout", $data);

        return;
    }

    public function showList() {
        $orderBy = $this->input->get("orderBy");
        $this->load->model("video_model");
        if ($orderBy != "rate" && $orderBy != "date") {
            $this->load->view("home_layout");
            return;
        } else {
            if ($this->isAuthorized()) {
                $data['log'] = 1;
            }
            $videos = $this->video_model->getVideos($orderBy, 0, SEARCH_VIDEOS_LIMIT);
            $data["searched_videos"] = $videos;
            $data["orderby"] = $orderBy;
            $this->load->view("video_list_layout", $data);
            return;
        }
    }

    /**
     * Funcion que devuelve un json con mas videos en la busqueda
     * @return type
     */
    public function searchMoreVideosAX() {
        $this->load->model("video_model");
        $searchText = $this->input->post("searchText");
        $searchPage = ($this->input->post("searchPage") !== NULL) ? $this->input->post("searchPage") : 1;
        $searchPage = ($searchPage > 0) ? $searchPage : 1;
        $videos = $this->video_model->getVideosByNameLike($searchText, SEARCH_VIDEOS_LIMIT, ($searchPage - 1) * SEARCH_VIDEOS_LIMIT);
        if ($videos) {
            $data["videos"] = $videos;
            $formString = $this->load->view('axviews/ax_load_more_videos', $data, true);
            $arr = array('result' => 'true', 'html' => $formString);
            echo json_encode($arr, JSON_HEX_QUOT | JSON_HEX_TAG);
            return;
        }
        echo json_encode(array('result' => 'false', 'html' => ''));
        return;
    }

    public function getVideosAx() {
        $this->load->model("video_model");
        $fromChannel = $this->input->post("channelVideos");
        if (isset($fromChannel)) {
            $userId = $this->session->userdata('userId');
            $videos = $this->video_model->getVideosSusChan($userId, 4);
        } else {
            $orderBy = $this->input->post("orderBy");
            $videos = $this->video_model->getVideos($orderBy, 0, 4);
        }
        if ($videos) {
            $data["videos"] = $videos;
            $formString = $this->load->view('axviews/ax_home_videos', $data, true);
            $arr = array('result' => 'true', 'html' => $formString);
            echo json_encode($arr, JSON_HEX_QUOT | JSON_HEX_TAG);
            return;
        }
        echo json_encode(array('result' => 'false', 'html' => '

Todavia no sigues a nadie

'));
        return;
    }

    public function getMoreVideosAX() {
        $this->load->model("video_model");
        $orderBy = $this->input->post("orderBy");
        $searchPage = ($this->input->post("searchPage") !== NULL) ? $this->input->post("searchPage") : 1;
        $searchPage = ($searchPage > 0) ? $searchPage : 1;
        $videos = $this->video_model->getVideos($orderBy, 0, SEARCH_VIDEOS_LIMIT, ($searchPage - 1) * SEARCH_VIDEOS_LIMIT);
        if ($videos) {
            $data["videos"] = $videos;
            $formString = $this->load->view('axviews/ax_load_more_videos', $data, true);
            $arr = array('result' => 'true', 'html' => $formString);
            echo json_encode($arr, JSON_HEX_QUOT | JSON_HEX_TAG);
            return;
        }
        echo json_encode(array('result' => 'false', 'html' => ''));
        return;
    }

    public function rateAx() {
        $this->load->model("rate_model");
        $vidId = $this->input->post("vidId");
        $rte = $this->input->post("rate");
        $userId = $this->session->userdata('userId');
        if ($vidId === NULL || $vidId === "") {
            echo json_encode(array('result' => 'false', 'html' => 'Error: faltan parametros'));
            return;
        }
        $res = $this->rate_model->hasRated($vidId, $userId);
        if ($res) {
            $arr = array('result' => 'false', 'html' => "Ya votaste este video!");
            echo json_encode($arr, JSON_HEX_QUOT | JSON_HEX_TAG);
            return;
        } else {
            $res = $this->rate_model->rate($vidId, $userId, $rte);
            $arr = array('result' => 'true', 'html' => "Video votado correctamente!");
            echo json_encode($arr, JSON_HEX_QUOT | JSON_HEX_TAG);
            return;
        }
        echo json_encode(array('result' => 'false', 'html' => 'Error: Inesperado'));
        return;
    }

    public function remove() {
        $userId = $this->session->userdata('userId');
        $idVideo = $id = $this->uri->segment(3, 0);
        if ($idVideo) {
            $this->load->model("video_model");
            if ($this->video_model->belongsToUser($idVideo, $userId)) {
                if ($this->video_model->remove($idVideo)) {
                    redirect("channel/view/me?msg=success");
                } else {
                    redirect("channel/view/me?msg=error");
                }
            } else {
                echo "que hace?";
            }
        } else {
//404
        }
    }

}