text:
package com.example.scrumptious.picker;

import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.location.Location;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.ListView;
import com.facebook.*;
import com.facebook.appevents.AppEventsLogger;
import com.example.scrumptious.R;
import com.facebook.internal.AnalyticsEvents;
import com.facebook.internal.Logger;
import com.facebook.internal.Utility;

import org.json.JSONObject;

import java.util.*;

public class PlacePickerFragment extends PickerFragment {
    /**
     * The key for an int parameter in the fragment's Intent bundle to indicate the radius in meters around
     * the center point to search. The default is 1000 meters.
     */
    public static final String RADIUS_IN_METERS_BUNDLE_KEY = "com.example.scrumptious.widget.PlacePickerFragment.RadiusInMeters";
    /**
     * The key for an int parameter in the fragment's Intent bundle to indicate what how many results to
     * return at a time. The default is 100 results.
     */
    public static final String RESULTS_LIMIT_BUNDLE_KEY = "com.example.scrumptious.widget.PlacePickerFragment.ResultsLimit";
    /**
     * The key for a String parameter in the fragment's Intent bundle to indicate what search text should
     * be sent to the service. The default is to have no search text.
     */
    public static final String SEARCH_TEXT_BUNDLE_KEY = "com.example.scrumptious.widget.PlacePickerFragment.SearchText";
    /**
     * The key for a Location parameter in the fragment's Intent bundle to indicate what geographical
     * location should be the center of the search.
     */
    public static final String LOCATION_BUNDLE_KEY = "com.example.scrumptious.widget.PlacePickerFragment.Location";
    /**
     * The key for a boolean parameter in the fragment's Intent bundle to indicate that the fragment
     * should display a search box and automatically update the search text as it changes.
     */
    public static final String SHOW_SEARCH_BOX_BUNDLE_KEY = "com.example.scrumptious.widget.PlacePickerFragment.ShowSearchBox";

    /**
     * The default radius around the center point to search.
     */
    public static final int DEFAULT_RADIUS_IN_METERS = 1000;
    /**
     * The default number of results to retrieve.
     */
    public static final int DEFAULT_RESULTS_LIMIT = 100;

    private static final int searchTextTimerDelayInMilliseconds = 2 * 1000;

    private static final String ID = "id";
    private static final String NAME = "name";
    private static final String LOCATION = "location";
    private static final String CATEGORY = "category";
    private static final String WERE_HERE_COUNT = "were_here_count";
    private static final String TAG = "PlacePickerFragment";

    private Location location;
    private int radiusInMeters = DEFAULT_RADIUS_IN_METERS;
    private int resultsLimit = DEFAULT_RESULTS_LIMIT;
    private String searchText;
    private Timer searchTextTimer;
    private boolean hasSearchTextChangedSinceLastQuery;
    private boolean showSearchBox = true;
    private EditText searchBox;

    /**
     * Default constructor. Creates a Fragment with all default properties.
     */
    public PlacePickerFragment() {
        super(R.layout.picker_placepickerfragment);
    }

    /**
     * Gets the location to search around. Either the location or the search text (or both) must be specified.
     *
     * @return the Location to search around
     */
    public Location getLocation() {
        return location;
    }

    /**
     * Sets the location to search around. Either the location or the search text (or both) must be specified.
     *
     * @param location the Location to search around
     */
    public void setLocation(Location location) {
        this.location = location;
    }

    /**
     * Gets the radius in meters around the location to search.
     *
     * @return the radius in meters
     */
    public int getRadiusInMeters() {
        return radiusInMeters;
    }

    /**
     * Sets the radius in meters around the location to search.
     *
     * @param radiusInMeters the radius in meters
     */
    public void setRadiusInMeters(int radiusInMeters) {
        this.radiusInMeters = radiusInMeters;
    }

    /**
     * Gets the number of results to retrieve.
     *
     * @return the number of results to retrieve
     */
    public int getResultsLimit() {
        return resultsLimit;
    }

    /**
     * Sets the number of results to retrieve.
     *
     * @param resultsLimit the number of results to retrieve
     */
    public void setResultsLimit(int resultsLimit) {
        this.resultsLimit = resultsLimit;
    }

    /**
     * Gets the search text (e.g., category, name) to search for. Either the location or the search
     * text (or both) must be specified.
     *
     * @return the search text
     */
    public String getSearchText() {
        return searchText;
    }

    /**
     * Sets the search text (e.g., category, name) to search for. Either the location or the search
     * text (or both) must be specified. If a search box is displayed, this will update its contents
     * to the specified text.
     *
     * @param searchText the search text
     */
    public void setSearchText(String searchText) {
        if (TextUtils.isEmpty(searchText)) {
            searchText = null;
        }
        this.searchText = searchText;
        if (this.searchBox != null) {
            this.searchBox.setText(searchText);
        }
    }

    /**
     * Sets the search text and reloads the data in the control. This is used to provide search-box
     * functionality where the user may be typing or editing text rapidly. It uses a timer to avoid repeated
     * requerying, preferring to wait until the user pauses typing to refresh the data. Note that this
     * method will NOT update the text in the search box, if any, as it is intended to be called as a result
     * of changes to the search box (and is public to enable applications to provide their own search box
     * UI instead of the default one).
     *
     * @param searchText                 the search text
     * @param forceReloadEventIfSameText if true, will reload even if the search text has not changed; if false,
     *                                   identical search text will not force a reload
     */
    public void onSearchBoxTextChanged(String searchText, boolean forceReloadEventIfSameText) {
        if (!forceReloadEventIfSameText && Utility.stringsEqualOrEmpty(this.searchText, searchText)) {
            return;
        }

        if (TextUtils.isEmpty(searchText)) {
            searchText = null;
        }
        this.searchText = searchText;

        // If search text is being set in response to user input, it is wasteful to send a new request
        // with every keystroke. Send a request the first time the search text is set, then set up a 2-second timer
        // and send whatever changes the user has made since then. (If nothing has changed
        // in 2 seconds, we reset so the next change will cause an immediate re-query.)
        hasSearchTextChangedSinceLastQuery = true;
        if (searchTextTimer == null) {
            searchTextTimer = createSearchTextTimer();
        }
    }

    /**
     * Gets the currently-selected place.
     *
     * @return the currently-selected place, or null if there is none
     */
    public JSONObject getSelection() {
        Collection<JSONObject> selection = getSelectedGraphObjects();
        return (selection != null && !selection.isEmpty()) ? selection.iterator().next() : null;
    }

    @Override
    public void setSettingsFromBundle(Bundle inState) {
        super.setSettingsFromBundle(inState);
        if (inState != null) {
            setRadiusInMeters(inState.getInt(RADIUS_IN_METERS_BUNDLE_KEY, radiusInMeters));
            setResultsLimit(inState.getInt(RESULTS_LIMIT_BUNDLE_KEY, resultsLimit));
            if (inState.containsKey(SEARCH_TEXT_BUNDLE_KEY)) {
                setSearchText(inState.getString(SEARCH_TEXT_BUNDLE_KEY));
            }
            if (inState.containsKey(LOCATION_BUNDLE_KEY)) {
                Location location = inState.getParcelable(LOCATION_BUNDLE_KEY);
                setLocation(location);
            }
            showSearchBox = inState.getBoolean(SHOW_SEARCH_BOX_BUNDLE_KEY, showSearchBox);
        }
    }

    @Override
    public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) {
        super.onInflate(activity, attrs, savedInstanceState);
        TypedArray a = activity.obtainStyledAttributes(attrs, R.styleable.picker_place_picker_fragment);

        setRadiusInMeters(a.getInt(R.styleable.picker_place_picker_fragment_radius_in_meters, radiusInMeters));
        setResultsLimit(a.getInt(R.styleable.picker_place_picker_fragment_results_limit, resultsLimit));
        if (a.hasValue(R.styleable.picker_place_picker_fragment_results_limit)) {
            setSearchText(a.getString(R.styleable.picker_place_picker_fragment_search_text));
        }
        showSearchBox = a.getBoolean(R.styleable.picker_place_picker_fragment_show_search_box, showSearchBox);

        a.recycle();
    }

    @Override
    void setupViews(ViewGroup view) {
        if (showSearchBox) {
            ListView listView = (ListView) view.findViewById(R.id.com_facebook_picker_list_view);

            View searchHeaderView = getActivity().getLayoutInflater().inflate(
                    R.layout.picker_search_box, listView, false);

            listView.addHeaderView(searchHeaderView, null, false);

            searchBox = (EditText) view.findViewById(R.id.com_facebook_picker_search_text);

            searchBox.addTextChangedListener(new SearchTextWatcher());
            if (!TextUtils.isEmpty(searchText)) {
                searchBox.setText(searchText);
            }
        }
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

        if (searchBox != null) {
            InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.showSoftInput(searchBox, InputMethodManager.SHOW_IMPLICIT);
        }
    }

    @Override
    public void onDetach() {
        super.onDetach();

        if (searchBox != null) {
            InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(searchBox.getWindowToken(), 0);
        }
    }

    void saveSettingsToBundle(Bundle outState) {
        super.saveSettingsToBundle(outState);

        outState.putInt(RADIUS_IN_METERS_BUNDLE_KEY, radiusInMeters);
        outState.putInt(RESULTS_LIMIT_BUNDLE_KEY, resultsLimit);
        outState.putString(SEARCH_TEXT_BUNDLE_KEY, searchText);
        outState.putParcelable(LOCATION_BUNDLE_KEY, location);
        outState.putBoolean(SHOW_SEARCH_BOX_BUNDLE_KEY, showSearchBox);
    }

    @Override
    void onLoadingData() {
        hasSearchTextChangedSinceLastQuery = false;
    }

    @Override
    GraphRequest getRequestForLoadData() {
        return createRequest(location, radiusInMeters, resultsLimit, searchText, extraFields);
    }

    @Override
    String getDefaultTitleText() {
        return getResources().getString(R.string.nearby);
    }

    @Override
    void logAppEvents(boolean doneButtonClicked) {
        AppEventsLogger logger = AppEventsLogger.newLogger(this.getActivity(),
                AccessToken.getCurrentAccessToken().getToken());
        Bundle parameters = new Bundle();

        // If Done was clicked, we know this completed successfully. If not, we don't know (caller might have
        // dismissed us in response to selection changing, or user might have hit back button). Either way
        // we'll log the number of selections.
        String outcome = doneButtonClicked ? AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_COMPLETED :
                AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_UNKNOWN;
        parameters.putString(AnalyticsEvents.PARAMETER_DIALOG_OUTCOME, outcome);
        parameters.putInt("num_places_picked", (getSelection() != null) ? 1 : 0);

        logger.logSdkEvent(AnalyticsEvents.EVENT_PLACE_PICKER_USAGE, null, parameters);
    }

    @Override
    PickerFragmentAdapter createAdapter() {
        PickerFragmentAdapter adapter = new PickerFragmentAdapter(
                this.getActivity()) {
            @Override
            protected CharSequence getSubTitleOfGraphObject(JSONObject graphObject) {
                String category = graphObject.optString(CATEGORY);
                int wereHereCount = graphObject.optInt(WERE_HERE_COUNT);

                String result = null;
                if (category != null && wereHereCount != 0) {
                    result = getString(R.string.picker_placepicker_subtitle_format, category, wereHereCount);
                } else if (category == null && wereHereCount != 0) {
                    result = getString(R.string.picker_placepicker_subtitle_were_here_only_format, wereHereCount);
                } else if (category != null && wereHereCount == 0) {
                    result = getString(R.string.picker_placepicker_subtitle_catetory_only_format, category);
                }
                return result;
            }

            @Override
            protected int getGraphObjectRowLayoutId(JSONObject graphObject) {
                return R.layout.picker_placepickerfragment_list_row;
            }

            @Override
            protected int getDefaultPicture() {
                return R.drawable.picker_place_default_icon;
            }

        };
        adapter.setShowCheckbox(false);
        adapter.setShowPicture(getShowPictures());
        return adapter;
    }

    @Override
    LoadingStrategy createLoadingStrategy() {
        return new AsNeededLoadingStrategy();
    }

    @Override
    SelectionStrategy createSelectionStrategy() {
        return new SingleSelectionStrategy();
    }

    private GraphRequest createRequest(Location location, int radiusInMeters, int resultsLimit,
                                  String searchText, Set<String> extraFields) {
        AccessToken accessToken = AccessToken.getCurrentAccessToken();
        GraphRequest request = GraphRequest.newPlacesSearchRequest(accessToken, location, radiusInMeters,
                resultsLimit, searchText, null);

        Set<String> fields = new HashSet<String>(extraFields);
        String[] requiredFields = new String[]{
                ID,
                NAME,
                LOCATION,
                CATEGORY,
                WERE_HERE_COUNT
        };
        fields.addAll(Arrays.asList(requiredFields));

        String pictureField = adapter.getPictureFieldSpecifier();
        if (pictureField != null) {
            fields.add(pictureField);
        }

        Bundle parameters = request.getParameters();
        parameters.putString("fields", TextUtils.join(",", fields));
        request.setParameters(parameters);

        return request;
    }

    private Timer createSearchTextTimer() {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                onSearchTextTimerTriggered();
            }
        }, 0, searchTextTimerDelayInMilliseconds);

        return timer;
    }

    private void onSearchTextTimerTriggered() {
        if (hasSearchTextChangedSinceLastQuery) {
            Handler handler = new Handler(Looper.getMainLooper());
            handler.post(new Runnable() {
                @Override
                public void run() {
                    FacebookException error = null;
                    try {
                        loadData(true);
                    } catch (FacebookException fe) {
                        error = fe;
                    } catch (Exception e) {
                        error = new FacebookException(e);
                    } finally {
                        if (error != null) {
                            OnErrorListener onErrorListener = getOnErrorListener();
                            if (onErrorListener != null) {
                                onErrorListener.onError(PlacePickerFragment.this, error);
                            } else {
                                Logger.log(LoggingBehavior.REQUESTS, TAG, "Error loading data : %s", error);
                            }
                        }
                    }
                }
            });
        } else {
            // Nothing has changed in 2 seconds. Invalidate and forget about this timer.
            // Next time the user types, we will fire a query immediately again.
            searchTextTimer.cancel();
            searchTextTimer = null;
        }
    }

    private class AsNeededLoadingStrategy extends LoadingStrategy {
        @Override
        public void attach(GraphObjectAdapter adapter) {
            super.attach(adapter);

            this.adapter.setDataNeededListener(new GraphObjectAdapter.DataNeededListener() {
                @Override
                public void onDataNeeded() {
                    // Do nothing if we are currently loading data . We will get notified again when that load finishes
                    // if the adapter still needs more data. Otherwise, follow the next link.
                    if (!loader.isLoading()) {
                        loader.followNextLink();
                    }
                }
            });
        }

        @Override
        protected void onLoadFinished(GraphObjectPagingLoader loader, GraphObjectCursor data) {
            super.onLoadFinished(loader, data);

            // We could be called in this state if we are clearing data or if we are being re-attached
            // in the middle of a query.
            if (data == null || loader.isLoading()) {
                return;
            }

            hideActivityCircle();
        }
    }

    private class SearchTextWatcher implements TextWatcher {

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            onSearchBoxTextChanged(s.toString(), false);
        }

        @Override
        public void afterTextChanged(Editable s) {
        }
    }
}

redpajama_set_name: RedPajamaGithub


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

namespace ECDLManager
{
    class TimeManager
    {
        internal List<MinSecTime> times = new List<MinSecTime>();

        internal TimeManager(List<FormatedStudent> formatedStudents)
        {
            foreach (var fs in formatedStudents)
            {
                times.Add(new MinSecTime(fs.examDuration));
            }
            G.I.Dof.WriteInfo("Byly vygenerovány všechny časy pomocí TimeManageru");
        }

        internal void CountDown()
        {
            foreach (var mst in times)
            {
                mst.CountDown();
            }
        }

        internal void PauseTimer(int index)
        {
            times[index].Stop();
        }

        internal void RestoreTimer(int index)
        {
            times[index].Continue();
        }

        internal void KillTimer(int index, string withStatus)
        {
            times[index].Kill(withStatus);
        }

        internal void RestoreAll()
        {
            foreach (var mst in times)
            {
                mst.Continue();
            }
        }
        internal void ResetAll()
        {
            foreach (var mst in times)
            {
                mst.Reset();
            }
        }
        internal void EndTimer(int index)
        {
            times[index].SetToMinimal();
        }
    }
}


text:
/**
 * @author Intel, Konstantin M. Anisimov, Igor V. Chebykin
 *
 */

#ifndef IPFEMITTER_H_
#define IPFEMITTER_H_

#include <vector>
#include <bitset>
#include "Type.h"
#include "IpfEncoder.h"
#include "IpfCfg.h"
#include "IpfCodeSelector.h"

using namespace std;

namespace Jitrino {
namespace IPF {

//========================================================================================//
// This file is based on following docs:
//   Intel Itanium Architecture
//   Software Developers Manual
//   Volume 1: Application Architecture
//   Volume 2: System Architecture
//   Volume 3: Instruction Set Reference
//   Revision 2.1
//   October 2002
//========================================================================================//

//
//  Constants that describe cache on Itanium2
//

//
//  Level 1 cache
//
#define L1I_CACHE_LINE_SIZE 64
#define L1I_CACHE_BANK_SIZE 16384
#define L1D_CACHE_LINE_SIZE 64
#define L1D_CACHE_BANK_SIZE 16384

//
//  Level 2 cache
//
#define L2_CACHE_LINE_SIZE 128
#define L2_CACHE_BANK_SIZE 262144

#define PR(n)  (opndManager->newRegOpnd(OPND_P_REG, DATA_P, n))
#define GR(n)  (opndManager->newRegOpnd(OPND_G_REG, DATA_I64, n))
#define FR(n)  (opndManager->newRegOpnd(OPND_F_REG, DATA_F, n))
#define BR(n)  (opndManager->newRegOpnd(OPND_B_REG, DATA_I64, n))
#define IMM(n) (opndManager->newImm(n))

#define IPF_SLOTS_COUNT 3
#define IT_SLOT0(v) (0xFF & v)
#define IT_SLOT1(v) ((0xFF & v) << 8)
#define IT_SLOT2(v) ((0xFF & v) << 16)

#define TEMPLATES_COUNT    24                      // count of valid templates
#define IPF_CODE_ALIGNMENT 32                      // 2-bundles alignment

typedef vector<bool>   vectorbool;
typedef bitset<128>    bitset128;
typedef bitset<64>     bitset64;
typedef bitset<8>      bitset8;
typedef vector<Opnd *> vectorconst;

//============================================================================//
/*
 * Bundle description
 * slots = slot_0_type | (slot_1_type << 8) | (slot_2_type << 16)
 *         type of slot is InstructionType enum, but IT_I...IT_X only
 * stops = 1 in bit pos corresponds stop after those slot
 *         id est, 0x1 - stop after 0 slot, 0x6 - stops after 1 and 2 slots, ...
 * tmpl  = template field encoding
 */
struct BundleDescription {
    U_32 slots;
    U_32 stops;
    U_32 tmpl;
};

//============================================================================//
class RegistersBitset {
    public:
      void reset() {
        GR.reset();
        FR.reset();
        PR.reset();
        BR.reset();
      }

      bool any() {
        return GR.any() || FR.any() || PR.any() || BR.any();
      }

      bitset128 GR;
      bitset128 FR;
      bitset64  PR;
      bitset8   BR;
};

typedef vector<RegistersBitset *> vectorregs;

//============================================================================//
// Bundle
//============================================================================//
class Bundle {
  public:
    Bundle(Cfg& cfg, U_32 tmpl, Inst *, Inst *, Inst *);

    Inst   * getSlot(int si) { return slot[si]; };
    U_32   getTmplIndex() { return indxtmpl; };
    U_32   getTmpl() { return BundleDesc[indxtmpl].tmpl; };
    bool     hasStop() { U_32 t = getTmpl();
                         if (t%2==1 || t==0x2 || t==0xa) return true; return false; };
    void     emitBundleGeneral(void *);
    void     emitBundleExtended(void *);
    void     emitBundleBranch(void *, int *);
    void     print();
    uint64   getSlotBits(int);
    uint64   getSlotBitsBranch(int, int);
    uint64 * getSlotBitsExtended(uint64 *, void *);

    static const BundleDescription BundleDesc[TEMPLATES_COUNT];

  protected:
    U_32  indxtmpl;
    Inst   *slot[IPF_SLOTS_COUNT];
};

class BundleVector : public vector<Bundle*> {
    MemoryManager& mm;
    Cfg&           cfg;
  public:
    BundleVector(Cfg& cfg): mm(cfg.getMM()), cfg(cfg) {
        branches=new(mm) vector<int>;
    };

    void addBundle(U_32 itmpl, Inst *i0, Inst *i1, Inst *i2) {
        push_back(new(mm) Bundle(cfg, itmpl, i0, i1, i2));
        if(Encoder::isBranchInst(i0) || Encoder::isBranchInst(i1) || Encoder::isBranchInst(i2)) {
            branches->push_back(size() - 1);
        }
    }

    vector<int> * branches; // indexes of bundles which contain br, brl, ...

};

class EmitterBb {
  public:
    EmitterBb(Cfg & cfg_, CompilationInterface & compilationinterface_
            , BbNode  * node_, bool _break4cafe=false, bool _nop4cafe=false);

    BbNode       * node;
    InstVector   & insts;
    long           isize;
    vectorbool   * stops;
    vectorregs   * wregs;
    vectorregs   * rregs;
    BundleVector * bundles;
    vectorconst  * consts;
    bool           istarget;

    long           bsize;
    char         * codeoff;   // offset in full code block
    long           codesize;  // size of this bb code block
};

typedef vector<EmitterBb *> vectorbb;

//============================================================================//
// Encoder
//============================================================================//

class Emitter {
  public:
    Emitter(Cfg & cfg_, CompilationInterface & compilationinterface_, bool _break4cafe=false);

    bool emit();
    void printInsts(char *);
    void printInsts(int);
    void printBundles(char *);
    void printBundles(int);
    void printCodeBlock(char *);
    void printDisasm(char * cap);
    void registerDirectCall(Inst *, uint64);

    static InstructionType getExecUnitType(int, int);
    static const char Itanium2_DualIssueBundles[30][30];

  protected:
    static void getTmpl(int, BundleDescription &, Inst *, Inst *, Inst *, bool, bool, bool);
    static int  findTmpl(const BundleDescription &);
    static void getWriteDpndBitset(Inst *, RegistersBitset *);
    static void getReadDpndBitset(Inst *, RegistersBitset *);
    static bool tricking(InstVector & insts, MemoryManager& mm, Cfg& cfg);
    static int  removeUselessInst(Cfg &, CompilationInterface &);
    static int  removeIgnoreTypeInst(Cfg &, CompilationInterface &);
    bool    parsing();
    bool    parsing(int);
    bool    stopping();
    bool    stopping(int);
    bool    bundling();
    bool    bundling(int);
    bool    emitData();
    bool    emitCode();
    bool    fixSwitchTables();
    void    checkForDualIssueBundles();
    bool    isBranchBundle(Bundle *, char *, char *, int *);
    bool    isExtendedBundle(Bundle *bundle) { if (bundle->getTmpl()>=0x4 && bundle->getTmpl()<=0x5) return true; return false; };
    int     getBbNodeIndex(BbNode * node);
    char  * getBbNodeOff(BbNode * node);

    MemoryManager& mm;
    Cfg      & cfg;
    CompilationInterface & compilationinterface;
    vectorbb * bbs;
    char *     dataoff;
    long       datasize;  // full size of data block
    char *     codeoff;
    long       codesize;  // full size of code block (summ of all bb codesize)
};

} // IPF
} // Jitrino

#endif /*IPFEMITTER_H_*/


text:
package com.kencook.sharpspring;

import lombok.Getter;

import java.util.Map;

/**
 * An exception due to errors in the Sharpspring response
 *
 * @since 0.1.0
 */
@Getter
public class SharpspringException extends Exception {

    private Map<String, Object> error;

    public SharpspringException(Map<String, Object> error) {
        this.error = error;
    }

}


text:
package com.creditease.dbus.encoders;

import java.io.Serializable;

/**
 * Created by zhangyf on 2018/4/27.
 */
public class EncodePlugin implements Serializable {
    private String id;
    private String name;
    private String jarPath;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getJarPath() {
        return jarPath;
    }

    public void setJarPath(String jarPath) {
        this.jarPath = jarPath;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "EncodePlugin{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", jarPath='" + jarPath + '\'' +
                '}';
    }
}


text:
package br.com.ifam.mvc.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="categoria")
public class Categoria {

    @Id
    @GeneratedValue
    @Column(name = "catid")
    private int id;

    @Column(name = "catdescricao", nullable = false, length = 80)
    private String descricao;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

}


text:
from __future__ import print_function
import os
import paddle.fluid as fluid
import paddle
import numpy as np
import unittest

class TestReaderReset(unittest.TestCase):
    def prepare_data(self):
        def fake_data_generator():
            for n in range(self.total_ins_num):
                yield np.ones(self.ins_shape) * n, n

        # Prepare data
        with fluid.program_guard(fluid.Program(), fluid.Program()):
            reader = paddle.batch(fake_data_generator, batch_size=1)
            feeder = fluid.DataFeeder(
                feed_list=[
                    fluid.layers.data(
                        name='data', shape=[3], dtype='float32'),
                    fluid.layers.data(
                        name='label', shape=[1], dtype='int64'),
                ],
                place=fluid.CPUPlace())
            fluid.recordio_writer.convert_reader_to_recordio_file(
                self.data_file_name, reader, feeder)

    def setUp(self):
        # set parallel threads to fit 20 batches in line 49
        os.environ['CPU_NUM'] = str(20)
        self.use_cuda = fluid.core.is_compiled_with_cuda()
        self.data_file_name = './reader_reset_test.recordio'
        self.ins_shape = [3]
        self.batch_size = 5
        self.total_ins_num = self.batch_size * 20
        self.test_pass_num = 100
        self.prepare_data()

    def main(self, with_double_buffer):
        main_prog = fluid.Program()
        startup_prog = fluid.Program()

        with fluid.program_guard(main_prog, startup_prog):
            data_reader_handle = fluid.layers.io.open_files(
                filenames=[self.data_file_name],
                shapes=[[-1] + self.ins_shape, [-1, 1]],
                lod_levels=[0, 0],
                dtypes=['float32', 'int64'],
                thread_num=1,
                pass_num=1)
            data_reader = fluid.layers.io.batch(data_reader_handle,
                                                self.batch_size)
            if with_double_buffer:
                data_reader = fluid.layers.double_buffer(data_reader)
            image, label = fluid.layers.read_file(data_reader)
            fetch_list = [image.name, label.name]

        place = fluid.CUDAPlace(0) if self.use_cuda else fluid.CPUPlace()
        exe = fluid.Executor(place)
        exe.run(startup_prog)

        build_strategy = fluid.BuildStrategy()
        if with_double_buffer:
            build_strategy.enable_data_balance = True
        exec_strategy = fluid.ExecutionStrategy()
        parallel_exe = fluid.ParallelExecutor(
            use_cuda=self.use_cuda,
            main_program=main_prog,
            build_strategy=build_strategy,
            exec_strategy=exec_strategy)

        data_appeared = [False] * self.total_ins_num
        pass_count = 0
        while (True):
            try:
                data_val, label_val = parallel_exe.run(fetch_list,
                                                       return_numpy=True)
                ins_num = data_val.shape[0]
                broadcasted_label = np.ones((ins_num, ) + tuple(
                    self.ins_shape)) * label_val.reshape((ins_num, 1))
                self.assertEqual(data_val.all(), broadcasted_label.all())
                for l in label_val:
                    self.assertFalse(data_appeared[l[0]])
                    data_appeared[l[0]] = True

            except fluid.core.EOFException:
                pass_count += 1
                if with_double_buffer:
                    data_appeared = data_appeared[:-parallel_exe.device_count *
                                                  self.batch_size]
                for i in data_appeared:
                    self.assertTrue(i)
                if pass_count < self.test_pass_num:
                    data_appeared = [False] * self.total_ins_num
                    data_reader_handle.reset()
                else:
                    break

    def test_all(self):
        self.main(with_double_buffer=False)
        self.main(with_double_buffer=True)

if __name__ == '__main__':
    unittest.main()


text:
"""
The MIT License

Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""

import urllib

class Consumer(object):
    """A consumer of OAuth-protected services.

    The OAuth consumer is a "third-party" service that wants to access
    protected resources from an OAuth service provider on behalf of an end
    user. It's kind of the OAuth client.

    Usually a consumer must be registered with the service provider by the
    developer of the consumer software. As part of that process, the service
    provider gives the consumer a *key* and a *secret* with which the consumer
    software can identify itself to the service. The consumer will include its
    key in each request to identify itself, but will use its secret only when
    signing requests, to prove that the request is from that particular
    registered consumer.

    Once registered, the consumer can then use its consumer credentials to ask
    the service provider for a request token, kicking off the OAuth
    authorization process.
    """

    key = None
    secret = None

    def __init__(self, key, secret):
        self.key = key
        self.secret = secret

        if self.key is None or self.secret is None:
            raise ValueError("Key and secret must be set.")

    def __str__(self):
        data = {'oauth_consumer_key': self.key,
            'oauth_consumer_secret': self.secret}

        return urllib.urlencode(data)


text:
<template name="gameCellYT">

    You: {{getMyMatrix rowIndex colIndex}}

    Them: {{getTheirMatrix rowIndex colIndex}}

</template>


text:
/*	$NetBSD: disklabel_rdb.h,v 1.2 2010/06/19 08:45:25 kiyohara Exp $	*/

/*
 * Copyright (c) 1994 Christian E. Hopps
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by Christian E. Hopps.
 * 4. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef _SYS_DISKLABEL_RDB_H_
#define _SYS_DISKLABEL_RDB_H_

/*
 * describes ados Rigid Disk Blocks
 * which are used to partition a drive
 */
#define RDBNULL ((u_long)0xffffffff)

/*
 * you will find rdblock somewhere in [0, RDBMAXBLOCKS)
 */
#define RDB_MAXBLOCKS	16

struct rdblock {
	u_long id;		/* 'RDSK' */
	u_long nsumlong;	/* number of longs in check sum */
	u_long chksum;		/* simple additive with wrap checksum */
	u_long hostid;		/* scsi target of host */
	u_long nbytes;		/* size of disk blocks */
	u_long flags;
	u_long badbhead;	/* linked list of badblocks */
	u_long partbhead;	/* linked list of partblocks */
	u_long fsbhead;		/*   "     "   of fsblocks */
	u_long driveinit;
	u_long resv1[6];	/* RDBNULL */
	u_long ncylinders;	/* number of cylinders on drive */
	u_long nsectors;	/* number of sectors per track */
	u_long nheads;		/* number of tracks per cylinder */
	u_long interleave;
	u_long park;		/* only used with st506 i.e. not */
	u_long resv2[3];
	u_long wprecomp;	/* start cyl for write precomp */
	u_long reducedwrite;	/* start cyl for reduced write current */
	u_long steprate;	/* driver step rate in ?s */
	u_long resv3[5];
	u_long rdblowb;		/* lowblock of range for rdb's */
	u_long rdbhighb;	/* high block of range for rdb's */
	u_long lowcyl;		/* low cylinder of partition area */
	u_long highcyl;		/* upper cylinder of partition area */
	u_long secpercyl;	/* number of sectors per cylinder */
	u_long parkseconds;	/* zero if no park needed */
	u_long resv4[2];
	char   diskvendor[8];	/* inquiry stuff */
	char   diskproduct[16];	/* inquiry stuff */
	char   diskrevision[4];	/* inquiry stuff */
	char   contvendor[8];	/* inquiry stuff */
	char   contproduct[16];	/* inquiry stuff */
	char   contrevision[4];	/* inquiry stuff */
#if never_use_secsize
	u_long resv5[0];
#endif
};

#define RDBF_LAST	0x1	/* last drive available */
#define RDBF_LASTLUN	0x2	/* last LUN available */
#define RDBF_LASTUNIT	0x4	/* last target available */
#define RDBF_NORESELECT	0x8	/* do not use reselect */
#define RDBF_DISKID	0x10	/* disk id is valid ?? */
#define RDBF_CTRLID	0x20	/* ctrl id is valid ?? */
#define RDBF_SYNC	0x40	/* drive supports SCSI synchronous mode */

struct ados_environ {
	u_long tabsize;		/* 0: environ table size */
	u_long sizeblock;	/* 1: n long words in a block */
	u_long secorg;		/* 2: not used must be zero */
	u_long numheads;	/* 3: number of surfaces */
	u_long secperblk;	/* 4: must be 1 */
	u_long secpertrk;	/* 5: blocks per track */
	u_long resvblocks;	/* 6: reserved blocks at start */
	u_long prefac;		/* 7: must be 0 */
	u_long interleave;	/* 8: normally 1 */
	u_long lowcyl;		/* 9: low cylinder of partition */
	u_long highcyl;		/* 10: upper cylinder of partition */
	u_long numbufs;		/* 11: ados: number of buffers */
	u_long membuftype;	/* 12: ados: type of bufmem */
	u_long maxtrans;	/* 13: maxtrans the ctrlr supports */
	u_long mask;		/* 14: mask for valid address */
	u_long bootpri;		/* 15: boot priority for autoboot */
	u_long dostype;		/* 16: filesystem type */
	u_long baud;		/* 17: serial handler baud rate */
	u_long control;		/* 18: control word for fs */
	u_long bootblocks;	/* 19: blocks containing boot code */
	u_long fsize;		/* 20: file system block size */
	u_long frag;		/* 21: allowable frags per block */
	u_long cpg;		/* 22: cylinders per group */
};

struct partblock {
	u_long id;		/* 'PART' */
	u_long nsumlong;	/* number of longs in check sum */
	u_long chksum;		/* simple additive with wrap checksum */
	u_long hostid;		/* scsi target of host */
	u_long next;		/* next in chain */
	u_long flags;		/* see below */
	u_long resv1[3];
	u_char partname[32];	/* (BCPL) part name (may not be unique) */
	u_long resv2[15];
	struct ados_environ e;
#if never_use_secsize
	u_long extra[9];	/* 8 for extra added to environ */
#endif
};

#define PBF_BOOTABLE	0x1	/* partition is bootable */
#define PBF_NOMOUNT	0x2	/* partition should be mounted */

struct badblock {
	u_long id;		/* 'BADB' */
	u_long nsumlong;	/* number of longs in check sum */
	u_long chksum;		/* simple additive with wrap checksum */
	u_long hostid;		/* scsi target of host */
	u_long next;		/* next in chain */
	u_long resv;
	struct badblockent {
		u_long badblock;
		u_long goodblock;
	} badtab[0];		/* 61 for secsize == 512 */
};

struct fsblock {
	u_long id;		/* 'FSHD' */
	u_long nsumlong;	/* number of longs in check sum */
	u_long chksum;		/* simple additive with wrap checksum */
	u_long hostid;		/* scsi target of host */
	u_long next;		/* next in chain */
	u_long flags;
	u_long resv1[2];
	u_long dostype;		/* this is a file system for this type */
	u_long version;		/* version of this fs */
	u_long patchflags;	/* describes which functions to replace */
	u_long type;		/* zero */
	u_long task;		/* zero */
	u_long lock;		/* zero */
	u_long handler;		/* zero */
	u_long stacksize;	/* to use when loading handler */
	u_long priority;	/* to run the fs at. */
	u_long startup;		/* zero */
	u_long lsegblocks;	/* linked list of lsegblocks of fs code */
	u_long globalvec;	/* bcpl vector not used mostly */
#if never_use_secsize
	u_long resv2[44];
#endif
};

struct lsegblock {
	u_long id;		/* 'LSEG' */
	u_long nsumlong;	/* number of longs in check sum */
	u_long chksum;		/* simple additive with wrap checksum */
	u_long hostid;		/* scsi target of host */
	u_long next;		/* next in chain */
	u_long loaddata[0];	/* load segment data, 123 for secsize == 512 */
};

#define RDBLOCK_ID	0x5244534b	/* 'RDSK' */
#define PARTBLOCK_ID	0x50415254	/* 'PART' */
#define BADBLOCK_ID	0x42414442	/* 'BADB' */
#define FSBLOCK_ID	0x46534844	/* 'FSHD' */
#define LSEGBLOCK_ID	0x4c534547	/* 'LSEG' */

/*
 * Dos types for identifying file systems
 * bsd file systems will be 'N','B',x,y where y is the fstype found in
 * disklabel.h (for DOST_DOS it will be the version number)
 */
#define DOST_XXXBSD	0x42534400	/* Old type back compat*/
#define DOST_NBR	0x4e425200	/* 'NBRx' NetBSD root partition */
#define DOST_NBS	0x4e425300	/* 'NBS0' NetBSD swap partition */
#define DOST_NBU	0x4e425500	/* 'NBUx' NetBSD user partition */
#define DOST_DOS	0x444f5300	/* 'DOSx' AmigaDos partition */
#define DOST_AMIX	0x554e4900	/* 'UNIx' AmigaDos partition */
#define DOST_MUFS	0x6d754600	/* 'muFx' AmigaDos partition (muFS) */
#define DOST_EXT2	0x4c4e5800	/* 'LNX0' Linux fs partition (ext2fs) */
#define DOST_LNXSWP	0x53575000	/* 'SWP0' Linux swap partition */
#define DOST_RAID	0x52414900	/* 'RAID' Raidframe partition */
#define DOST_MSD	0x4d534400	/* 'MSDx' MSDOS partition */
#define DOST_SFS	0x53465300	/* 'SFSx' Smart fs partition */

struct adostype {
	u_char archtype;	/* see ADT_xxx below */
	u_char fstype;		/* byte 3 from amiga dostype */
};

/* archtypes */
#define ADT_UNKNOWN	0
#define ADT_AMIGADOS	1
#define ADT_NETBSDROOT	2
#define ADT_NETBSDSWAP	3
#define ADT_NETBSDUSER	4
#define ADT_AMIX	5
#define ADT_EXT2	6
#define ADT_RAID	7
#define ADT_MSD		8
#define ADT_SFS		9

#define ISFSARCH_NETBSD(adt) \
	((adt).archtype >= ADT_NETBSDROOT && (adt).archtype <= ADT_NETBSDUSER)

#endif /* _SYS_DISKLABEL_RDB_H_ */


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using Facturacion.Modelo;
using System.Data;

namespace Facturacion.Controlador
{
    class UsuarioDB
    {
        conexion con = new conexion();

        private Persona usuario = null;

        public Persona getUsuario()
        {
            if (this.usuario == null)
            {
                this.usuario = new Persona();
            }
            return this.usuario;
        }
        public void setUsuario(Persona usuario)
        {
            this.usuario = usuario;
        }
        public List<Persona> TraeUsuarios(string est)
        {
            PersonaDB per = null;
            List<Persona> ListaUsu = new List<Persona>();
            MySqlCommand cmd;
            MySqlConnection cn = con.GetConnection();
            try
            {
                string sqlcad = " select * from persona where idRol=1 || idRol=2 and est_per= '" + est + "'";
                cmd = new MySqlCommand(sqlcad, cn);
                cmd.CommandType = CommandType.Text;
                cn.Open();
                MySqlDataReader dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    per = new PersonaDB();
                    per.getPersona().cedper = dr[1].ToString();
                    per.getPersona().apeper = dr[2].ToString();
                    per.getPersona().nomper = dr[3].ToString();
                    per.getPersona().dirper = dr[4].ToString();
                    per.getPersona().telper = dr[5].ToString();
                    per.getPersona().estper = dr[6].ToString();
                    per.getPersona().Nombre = per.getPersona().apeper + " " + per.getPersona().nomper;
                    ListaUsu.Add(per.getPersona());
                }
                dr.Close();
            }
            catch (MySqlException ex)
            {
                per = null;
                throw ex;
            }
            catch (Exception ex)
            {
                per = null;
                throw ex;
            }
            cn.Close();
            cmd = null;
            return ListaUsu;
        }

        public Persona TraeUsuario(string ced)
        {
            PersonaDB per = null;
            MySqlCommand cmd;
            MySqlConnection cn = con.GetConnection();
            try
            {
                string sqlcad = "Select * from persona Where ced_per='" + ced + "'";
                cmd = new MySqlCommand(sqlcad, cn);
                cmd.CommandType = CommandType.Text;
                cn.Open();
                MySqlDataReader dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    per = new PersonaDB();
                    per.getPersona().cedper = dr[1].ToString();
                    per.getPersona().apeper = dr[2].ToString();
                    per.getPersona().nomper = dr[3].ToString();
                    per.getPersona().dirper = dr[4].ToString();
                    per.getPersona().telper = dr[5].ToString();
                    per.getPersona().estper = dr[6].ToString();
                }
                dr.Close();
            }
            catch (MySqlException ex)
            {
                per = null;
                throw ex;
            }
            catch (Exception ex)
            {
                per = null;
                throw ex;
            }
            cn.Close();
            cmd = null;
            return per.getPersona();
        }
    }
}