query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
the analytic instantaneous velocity should compare well with numerical differentiation if sampled densely enough. This should be made into a general test for all trajectories, and acceleration...
public void testVelocityNumerically() { // crud, I don't know, how much can we expect velocity and finite differences to agree? double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc. double end...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "@Test\r\n public void testAverageacceleration() {\r\n System.out.println(\"Average Acceleration\");\r\n \r\n // Test case one.\r\n ...
[ "0.6339105", "0.6205824", "0.61544424", "0.6130935", "0.61224616", "0.6033112", "0.59726685", "0.5937737", "0.59163904", "0.5899716", "0.5834155", "0.5816574", "0.5816185", "0.58134717", "0.58061534", "0.5774447", "0.5771387", "0.5725021", "0.5700631", "0.5687249", "0.5659081...
0.7160202
0
Furthermore the difference in position over an interval should match the sum of densely sampled velocities over that interval.
public void testPositionNumerically() { double endtime = racetrack.getPerimeter() / racetrack.getVelocity(); double epsilon = 0.000000000001; integrateVelocity(racetrack, 0, endtime, n, epsilon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testVelocityNumerically() {\n // crud, I don't know, how much can we expect velocity and finite differences to agree?\n double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc.\n do...
[ "0.6655974", "0.6443125", "0.58960664", "0.5634203", "0.5616501", "0.5573374", "0.55097795", "0.5414777", "0.5413455", "0.5410426", "0.53056544", "0.52487046", "0.5227118", "0.5185846", "0.51685023", "0.51665807", "0.51384556", "0.51175857", "0.5116139", "0.51002145", "0.5094...
0.57095855
3
Make sure successive points within some time bound are within some position bound. Should be generalized to handle velocity as well...
public void continuity(Racetrack path, double t0, double t1, double dt, double bound) { if (verbose) System.out.println( "\nt\tPi\tPj\tPk\t|dP|"); Vector3 p0 = new TVector( path.getPosition(t0) ); if(verbose) System.out.println( "0.0\t"+p0.toString()+"\t0.0"); for (double t=dt; t<t1; t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void differentiatePosition(Racetrack path, double t0, double t1, double dt, double bound) {\n if (verbose) System.out.println(\"t\\tP(t)\\tV(t)\\t|dP-dt*V|\");\n\n // incrementally sample motion\n Vector3 p0 = new TVector( path.getPosition(t0) );\n for (double t=dt; t<t1; t+=dt) ...
[ "0.63123894", "0.6226508", "0.59863126", "0.59470224", "0.58846885", "0.5794371", "0.5740148", "0.57298917", "0.5727566", "0.56844366", "0.5681723", "0.5671904", "0.56525844", "0.5647845", "0.5647666", "0.5611819", "0.56090623", "0.5595706", "0.55326885", "0.55004776", "0.549...
0.5819061
5
Sample the path over the specified interval, ensuring that velocity magnitude remains constant
public void uniformMotion(Racetrack path, double t0, double t1, double dt, double velocity, double bound) { if (verbose) System.out.println("target speed:"+velocity+"\nt\tVi\tVj\tVk\t|dV|"); for (double t=0; t<t1; t+=dt) { Vector3 v = new TVector( path.getVelocity(t) ); double s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void integrateVelocity(Trajectory path, double t0, double t1, int samples, double bound) {\n // compute Velocity integral using the fundamental theorem of calculus\n Vector3 p0 = new TVector(path.getPosition(t0));\n Vector3 p1 = new TVector(path.getPosition(t1));\n Vector3 dp = n...
[ "0.5518473", "0.5100938", "0.4874532", "0.48344633", "0.4750678", "0.4728502", "0.47033647", "0.4682942", "0.46423328", "0.4612383", "0.46116954", "0.46036324", "0.46007758", "0.4593065", "0.45901132", "0.45459858", "0.45432118", "0.453087", "0.4525948", "0.45247397", "0.4520...
0.53816193
1
Sample the path over the specified interval, and ensure positional finite differences and analytic velocity agree to within a given bound.
public void differentiatePosition(Racetrack path, double t0, double t1, double dt, double bound) { if (verbose) System.out.println("t\tP(t)\tV(t)\t|dP-dt*V|"); // incrementally sample motion Vector3 p0 = new TVector( path.getPosition(t0) ); for (double t=dt; t<t1; t+=dt) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void integrateVelocity(Trajectory path, double t0, double t1, int samples, double bound) {\n // compute Velocity integral using the fundamental theorem of calculus\n Vector3 p0 = new TVector(path.getPosition(t0));\n Vector3 p1 = new TVector(path.getPosition(t1));\n Vector3 dp = n...
[ "0.56168956", "0.55224335", "0.5311258", "0.53002167", "0.5134636", "0.50197333", "0.4981926", "0.49472997", "0.48299643", "0.4695216", "0.46410626", "0.4608647", "0.4485115", "0.44768572", "0.44491047", "0.4412108", "0.44111934", "0.43711966", "0.4340834", "0.43267283", "0.4...
0.57244676
0
Sample the path over the given interval, ensuring the sum of velocity agrees with the positional difference.
public void integrateVelocity(Trajectory path, double t0, double t1, int samples, double bound) { // compute Velocity integral using the fundamental theorem of calculus Vector3 p0 = new TVector(path.getPosition(t0)); Vector3 p1 = new TVector(path.getPosition(t1)); Vector3 dp = new Vector...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void differentiatePosition(Racetrack path, double t0, double t1, double dt, double bound) {\n if (verbose) System.out.println(\"t\\tP(t)\\tV(t)\\t|dP-dt*V|\");\n\n // incrementally sample motion\n Vector3 p0 = new TVector( path.getPosition(t0) );\n for (double t=dt; t<t1; t+=dt) ...
[ "0.55626756", "0.5458647", "0.5321057", "0.5210321", "0.48415998", "0.48122403", "0.47429973", "0.46190992", "0.46137443", "0.46123597", "0.46098396", "0.45845783", "0.45839152", "0.45253742", "0.45236468", "0.4518475", "0.4495729", "0.44868597", "0.44700786", "0.44571695", "...
0.5735335
0
Called when the activity gets created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.play_12_leads); try { dataSource = new ECGCurveDataSource(new FileInputStream(Environment.getExternalStorageDirectory().getPath() + "/after...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}...
[ "0.78594303", "0.78411835", "0.7835017", "0.7835017", "0.7835017", "0.7835017", "0.7835017", "0.7835017", "0.7834279", "0.7832325", "0.77973205", "0.77897435", "0.7748129", "0.7748129", "0.77413166", "0.77413166", "0.77255845", "0.77255845", "0.7648308", "0.7528631", "0.74709...
0.0
-1
Updates the compression value.
private void updateCompressionValue() { ((TextView) findViewById(R.id.zoomLeftRightText)).setText(String.valueOf(curves[0].getCurrentCompression())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native void setCompression(int value) throws MagickException;", "public void setImageCompression(byte comp) {\n this.compression = comp;\n }", "public Builder setCompressed(boolean value) {\n \n compressed_ = value;\n onChanged();\n return this;\n }", "public WriterOpt...
[ "0.6974087", "0.6128576", "0.60310704", "0.5997781", "0.5933474", "0.58856183", "0.5642757", "0.56383204", "0.55427295", "0.5501564", "0.5457412", "0.5449231", "0.5428904", "0.5368498", "0.53273076", "0.5298492", "0.52881193", "0.52701014", "0.52298784", "0.519901", "0.517867...
0.63667995
1
Updates the amplification value.
private void updateAmplificationValue() { ((TextView) findViewById(R.id.zoomUpDownText)).setText(String.valueOf(curves[0].getCurrentAmplification())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAmplifier()\r\n/* 75: */ {\r\n/* 76: 75 */ return this.amplifier;\r\n/* 77: */ }", "public void setAAALethalityRate(int value) {\n this.aaaLethalityRate = value;\n }", "public void amplitudeUpdate(AudioHandler handler, float amplitude) {\r\n slrAmplitude.setValue...
[ "0.5661849", "0.5622821", "0.5547099", "0.55123895", "0.5511343", "0.54608303", "0.54257584", "0.5421286", "0.5362918", "0.5337667", "0.5311328", "0.5307061", "0.53016204", "0.52919334", "0.52677137", "0.52419114", "0.5207589", "0.5199537", "0.51743793", "0.5159658", "0.51592...
0.74429846
0
Created by jiangrenming on 2018/5/16.
public interface ICartListPresenter extends IBasePresenter { void loadNoData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r...
[ "0.6097728", "0.6009552", "0.5826998", "0.57869875", "0.57869875", "0.57837236", "0.5697392", "0.5692772", "0.56810296", "0.5650694", "0.56247807", "0.5623219", "0.5623219", "0.5623219", "0.5623219", "0.5623219", "0.5623219", "0.5616067", "0.5610311", "0.559874", "0.55971724"...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rowView = inflater.inflate(R.layout.fragment_tab_one, container, false); TextView pending = (TextView) rowView.findViewById(R.id.pending); pending.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
netKey index lower 12 bits appKey index higher 12 bits
@Override public byte[] getParams() { int netAppKeyIndex = (netKeyIndex & 0x0FFF) | ((appKeyIndex & 0x0FFF) << 12); // int netAppKeyIndex = ((netKeyIndex & 0x0FFF) << 12) | ((appKeyIndex & 0x0FFF)); byte[] indexesBuf = MeshUtils.integer2Bytes(netAppKeyIndex, 3, ByteOrder.LITTLE_ENDIAN); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "short getDefaultKeyIx();", "public short key();", "byte[] getKey();", "public String getAppKey(Integer appId) {\n\t\treturn \"d3d1f52452be41aaa1b68e33d59d0188\";\n\t}", "public String getHighestChromKey();", "short generateKeyAndWrap(byte[] applicationParameter, short applicationParameterOffset, byte[] ...
[ "0.6706395", "0.64737856", "0.6405113", "0.6242819", "0.6217991", "0.6131232", "0.61255383", "0.61193806", "0.6096926", "0.60940534", "0.6090286", "0.60767084", "0.60693496", "0.60502225", "0.60467595", "0.5965528", "0.5965528", "0.5949523", "0.5929976", "0.58808035", "0.5819...
0.5866647
20
TODO Autogenerated method stub
@Override public ArrayList<AccountSumary> selectList(String userid) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List<SaramDTO> selectAll() { List<SaramDTO> list = myBatis.selectList("org.mybatis.example.SaramMapper.selectAll"); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Returns the static SQLiteStorage.
public static SQLiteStorage instance() { return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized static SQLiteStorage build(Context context) {\n if (instance == null) {\n // Note: context is used for the paths to the DB. It should not matter which view\n // of the app calls the bulld() method first.\n instance = new SQLiteStorage(context);\n ...
[ "0.6603103", "0.6430028", "0.6377635", "0.6336526", "0.63011515", "0.62974995", "0.6286272", "0.6222783", "0.61654353", "0.5959299", "0.5958497", "0.5940799", "0.58594877", "0.5853154", "0.58359796", "0.5810296", "0.57999164", "0.5798885", "0.57873493", "0.5764968", "0.574728...
0.7817347
0
Returns the static SQLiteStorage, creating it on the first call.
public synchronized static SQLiteStorage build(Context context) { if (instance == null) { // Note: context is used for the paths to the DB. It should not matter which view // of the app calls the bulld() method first. instance = new SQLiteStorage(context); Log.i(T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static SQLiteStorage instance() {\n return instance;\n }", "public synchronized static DatabaseStorage query(Context context)\n {\n if (instance == null)\n {\n instance = new DatabaseStorage(context);\n }\n\n return instance;\n }", "public static sy...
[ "0.8014484", "0.64954793", "0.63289946", "0.6090665", "0.6086451", "0.6020399", "0.59512866", "0.5868889", "0.58665556", "0.58583766", "0.583225", "0.58196384", "0.5802386", "0.57729757", "0.576996", "0.5755505", "0.57490057", "0.57366365", "0.57223815", "0.5720779", "0.56899...
0.7117522
1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jButton3 = new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319545", "0.7290502", "0.7290502", "0.7290502", "0.72860676", "0.7248135", "0.72132677", "0.7208833", "0.7195503", "0.71899074", "0.71839535", "0.7159182", "0.71478266", "0.7092896", "0.7081379", "0.70575553", "0.6987028", "0.69771224", "0.69548094", "0.6954804", "0.69449...
0.0
-1
/ renamed from: a
public void mo84055a() { if (getVisibility() == 0) { animate().cancel(); setLayerType(2, null); animate().alpha(0.0f).setListener(new Animator.AnimatorListener() { /* class com.zhihu.android.article.widget.ArticleFloatingTipsView.C172711 */ pu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
The lawn mower is initialized with its initial position, all instructions and the validator.
public LawnMower(GridPosition initialPosition, List<Instruction> instructions, GridPositionValidator validator) { if( initialPosition == null ) throw new IllegalArgumentException("initialPosition cannot be null"); if( instructions == null ) throw new IllegalArgumentException("instructions cannot be null"); if( va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {\n \tstartTime = System.currentTimeMillis();\n \tintake.setLeftPower(power);\n \tintake.setRightPower(power);\n }", "public InitializeLift() {\n addSequential(new RunLiftDown());\n addSequential(new TimedCommand(0.5));\n addSequential(new ZeroEncoder());\n add...
[ "0.6154864", "0.60502434", "0.5928016", "0.5785173", "0.57727164", "0.5740277", "0.5711956", "0.57068866", "0.56384254", "0.56000644", "0.55940336", "0.5570232", "0.5567258", "0.55585134", "0.55202156", "0.548619", "0.54809076", "0.5479792", "0.54774964", "0.5470273", "0.5453...
0.6889763
0
Execute all the instructions and return the last position on the grid. At each instruction set the new position in GridPositionValidator and remove the previous.
public GridPosition run(){ instructions.forEach(i -> { GridPosition newPosition = i.nextPosition(position); logger.fine("new position is "+newPosition.toString()); if(validator.validate(position, newPosition)){ validator.addUsedCoordinate(newPosition); GridPosition oldPosition = position; posi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse i...
[ "0.6133831", "0.5883739", "0.57217306", "0.55713207", "0.5561655", "0.5544296", "0.5444563", "0.5390939", "0.5376635", "0.5349576", "0.5314864", "0.5307815", "0.5288456", "0.52494705", "0.5161156", "0.5159481", "0.51591474", "0.515559", "0.51490486", "0.51464254", "0.51298624...
0.7400468
0
TODO: rest of the items: datum prijatia, ... which was not deemed useful now BUT might become handy later on (like in crowdsourcing, having multiple items will help determine and correct mistakes etc.) TODO: for the purposes of "common use case" try adding the value of 'pricateInEur' calculated during harvesting from '...
public String getDatanestId() { return datanestId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void test_PNL_2Deals_Aggreg_buy(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, 10.0));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, 15.0));\n\t\tassertEquals( \"150.00\", nf.format(new PNLImpl(pa, AAPL,16.00).getPNLUnrealized(...
[ "0.5886241", "0.5878795", "0.574943", "0.5654051", "0.5576444", "0.5565213", "0.55457044", "0.55376935", "0.5532987", "0.54963505", "0.5496003", "0.5494291", "0.54901993", "0.5468139", "0.54123384", "0.5402408", "0.53850067", "0.53667736", "0.53580993", "0.53466713", "0.53319...
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { Thread t = new Thread(){ public void run(){ String str = trans.traditionalized(text.getText()); String searchString=""; try { searchString = URLEncoder.encode(str,"GB2312"); } catch (UnsupportedEncodingException e) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { ComicInfo comic = (ComicInfo)list.getSelectedValue(); Thread getContent = new SearchGetContent(comic.getTitle(),comic.getURL(),theview); getContent.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
The essential method of a parser combinator
public abstract boolean accept(Input i);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CParser getParser();", "private Parser () { }", "private Term parseImpl() throws ParseException {\n final Term expr = parseTerm(false);\n final int tt = _tokenizer.next();\n if (tt != Tokenizer.TT_EOS) {\n reportError(\"Incomplete expression.\"); /*I18N*/\n }\n ...
[ "0.677132", "0.67654186", "0.66172916", "0.66152847", "0.6565999", "0.6556346", "0.6529991", "0.6516763", "0.6445217", "0.64444876", "0.6384611", "0.63806987", "0.6360143", "0.6293569", "0.6200232", "0.61623055", "0.6150415", "0.61465", "0.6080704", "0.60741353", "0.60698587"...
0.0
-1
The following methods provide convenience of acceptor combination.
public static Acceptor optional(Acceptor a) { return new Optional(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAcceptor(String acceptor) {\r\n\t\tthis.acceptor = acceptor;\r\n\t}", "public PaxosAcceptor getAcceptor()\n {\n return m_acceptor;\n }", "public String getAcceptor() {\r\n\t\treturn acceptor;\r\n\t}", "public Acceptor getAcceptor (Address nearAddr, boolean blocking) \n ...
[ "0.6201311", "0.59993553", "0.58992594", "0.57041985", "0.5109668", "0.51044434", "0.49463993", "0.49329898", "0.49314362", "0.49281716", "0.48348075", "0.4796373", "0.4790081", "0.47668067", "0.47643983", "0.47602507", "0.47237414", "0.4713284", "0.4704665", "0.4701432", "0....
0.0
-1
write your code here
public int maxDepth(TreeNode root) { return helper(0,root); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpub...
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.5...
0.0
-1
/ 17: / 18:
private GetAccount() /* 19: */ { /* 20:18 */ super(new APITag[] { APITag.ACCOUNTS }, new String[] { "account" }); /* 21: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int method_2436() {\r\n return 16;\r\n }", "public void mo21877s() {\n }", "void mo1506m();", "@Override\n\tpublic void challenge17() {\n\n\t}", "@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}", "String canonHr(String s) {\n List<...
[ "0.5741338", "0.541165", "0.5405422", "0.5403031", "0.5342792", "0.5327782", "0.53255653", "0.5324796", "0.5299681", "0.52946776", "0.5274621", "0.52697134", "0.5252796", "0.5221474", "0.5209273", "0.52019835", "0.516981", "0.51525414", "0.5144293", "0.51285166", "0.5121728",...
0.0
-1
/ 22: / 23:
JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest) /* 24: */ throws NxtException /* 25: */ { /* 26:24 */ Account localAccount = ParameterParser.getAccount(paramHttpServletRequest); /* 27: */ /* 28:26 */ JSONObject localJSONObject1 = JSONData.accountBalance(localAcco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n String time =\"16:49:40\".substring(0,2);\n System.out.println(time);\n\n }", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "@Test public void Time_len_6()\t\t...
[ "0.5996365", "0.5890823", "0.5755819", "0.5721321", "0.5714589", "0.55808204", "0.5544129", "0.553714", "0.550724", "0.54637986", "0.5444024", "0.538846", "0.53527445", "0.5349727", "0.5312336", "0.52798325", "0.52721477", "0.5238663", "0.5222619", "0.52121747", "0.52097535",...
0.0
-1
An operator is not able to open a cash register
@Test(expected = CashierCanNotOpenCashRegisterException.class) public void operatorCanOpenACashRegister() { this.cashier.canOpen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = CashierCanNotCloseCashRegisterException.class)\n public void operatorCannotCloseACashRegister() {\n this.cashier.canClose();\n }", "public InvalidOperatorException(char op){\n super(LocalizationHelper.getMessage(LocalizationHelper.Message.INVALID_OPERATOR, Character.toString(op))...
[ "0.68591845", "0.54903", "0.528057", "0.5259999", "0.5256049", "0.5236654", "0.52245176", "0.52118707", "0.51828074", "0.51568735", "0.5147674", "0.51252484", "0.51214486", "0.51206106", "0.51183635", "0.51182014", "0.5113289", "0.50920826", "0.5086457", "0.50844157", "0.5067...
0.74335283
0
An operator is not able to close a cash register
@Test(expected = CashierCanNotCloseCashRegisterException.class) public void operatorCannotCloseACashRegister() { this.cashier.canClose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = CashierCanNotOpenCashRegisterException.class)\n public void operatorCanOpenACashRegister() {\n this.cashier.canOpen();\n }", "public abstract void close() throws OperatorException;", "@Test\n public void supervisorCanCloseACashRegister() {\n this.supervisor.canClose();\n...
[ "0.66238457", "0.61429614", "0.567315", "0.5611941", "0.55132276", "0.55086744", "0.5431744", "0.5429883", "0.53848714", "0.5366198", "0.5361177", "0.53600484", "0.5344533", "0.5344533", "0.53278047", "0.53218615", "0.5313735", "0.530855", "0.5301706", "0.5285403", "0.5280849...
0.7605472
0
A supervisor is able to open a cash register
@Test public void supervisorCanOpenACashRegister() { this.supervisor.canOpen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void supervisorCanCloseACashRegister() {\n this.supervisor.canClose();\n }", "public void openRegister() {\n\n }", "public void credit(){\n\t\tSystem.out.println(\"HSBC BANK :: CREDIT\");\n\t}", "public void credit(){\r\n\t\tSystem.out.println(\"HSBC-- Credit method called from...
[ "0.6519686", "0.64162624", "0.6037536", "0.6036287", "0.58960444", "0.58856606", "0.584621", "0.58384734", "0.5811702", "0.5761734", "0.5720349", "0.5686202", "0.56752276", "0.564554", "0.56360257", "0.5634633", "0.5615188", "0.5605958", "0.5605958", "0.5599467", "0.55504286"...
0.6982239
0
A supervisor is able to close a cash register
@Test public void supervisorCanCloseACashRegister() { this.supervisor.canClose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeAccount() {}", "public void closeAccount() {}", "public void closeCashDrawer(CashDrawer cd);", "public abstract void closeAccount();", "public void closeGate(){\n\t\t\tgateStatus = \"closed\";\n\t\t}", "public void closeCashDrawer(String campusCode);", "private void shutDown() {\r\n\t\...
[ "0.68699074", "0.68699074", "0.65485775", "0.65364385", "0.6301025", "0.62790734", "0.6221014", "0.62086535", "0.61315364", "0.6058344", "0.60205996", "0.59742457", "0.5905499", "0.587556", "0.5861518", "0.58103627", "0.5785116", "0.57666236", "0.57619894", "0.57555974", "0.5...
0.74119276
0
If you ever decide to manually modify a blueprint (insert/remove nodes), run this method when you are done. It will ensure integrity of blueprint. This method is part of public API but it is strongly advised against using it!
@Deprecated public void connectNodesWithParents() { pipeline.connectNodesWithParents(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fixupDatabase() {\n long count = 0;\n count = countBySearch(HierarchyNodeMetaData.class, new Search(\"isDisabled\",\"\", Restriction.NULL) );\n if (count > 0) {\n int counter = 0;\n counter += getHibernateTemplate().bulkUpdate(\"update HierarchyNodeMetaData nm...
[ "0.5525376", "0.5454531", "0.52701455", "0.52654696", "0.5196544", "0.5194388", "0.5167109", "0.5107938", "0.5103442", "0.5038693", "0.50372183", "0.50064576", "0.5003679", "0.49914333", "0.49879605", "0.49791524", "0.49791524", "0.4977367", "0.4948951", "0.49426943", "0.4941...
0.0
-1
get doctor by id
@GetMapping("{doctorId}") public ResponseEntity<Doctor> getDoctorById(@PathVariable("doctorId") int doctorId) { ResponseEntity<Doctor> responseEntity=null; Doctor doctor =new Doctor(); if(doctorService.isDoctorExists(doctorId)) { doctor=doctorService.getDoctorById(doctorId); responseEntit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Doctor findById(int id);", "public Doctor get(String id) {\n\t\treturn dao.get(id);\n\t}", "@GetMapping(\"/doctors/{id}\")\n @Timed\n public ResponseEntity<Doctor> getDoctor(@PathVariable String id) {\n log.debug(\"REST request to get Doctor : {}\", id);\n Doctor doctor = doctorRepos...
[ "0.85983765", "0.8402754", "0.81046444", "0.778806", "0.7367858", "0.7299961", "0.70676076", "0.7039963", "0.69903255", "0.69903255", "0.69430006", "0.6934903", "0.6811801", "0.6762314", "0.67172647", "0.6714891", "0.6689449", "0.6677683", "0.6635595", "0.66304386", "0.662798...
0.7403076
4
DO NOT MODIFY THE LIST. IT IS READ ONLY
public int hammingDistance(final List<Integer> A) { int length = A.size(), sum = 0; if(length < Integer.MAX_VALUE){ int[][] T = new int[length][length]; int i = 0, j = 0, start = 0; while(i < length && j < length){ if(i == j) T[i][j] = 0; e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initList() {\n\n }", "private void modify(List listString){\n\t}", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "@Override\n public void refreshList(ArrayList<String> newList){\n }", "public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}", "@...
[ "0.6656684", "0.65810925", "0.644535", "0.63385224", "0.63354015", "0.625136", "0.6250363", "0.6248963", "0.6240437", "0.6200287", "0.6150285", "0.61495626", "0.61465967", "0.6144663", "0.6128912", "0.6125207", "0.6123713", "0.6123452", "0.6118761", "0.6112415", "0.61005384",...
0.0
-1
TODO Autogenerated method stub
@Override public Course mapRow(ResultSet rs, int rowNum) throws SQLException { Course course=new Course(); course.setCourseid(rs.getString(1)); course.setCoursetitle(rs.getString(2)); course.setCoursedesc(rs.getString(3)); return course; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Method to add inner elements to the view.
public void drawInnerElements(Context context, HashMap<String, Object> itemLayoutMap) { SharedFunctions.drawInnerElements(context, itemLayoutMap, mDrawnLayout, mComponentMap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addViews() {\n\t}", "void fillInnerParts() {\n browserPanel = new BrowserPanel();\n\t\tTemplateClass.instrum(\"LineNumber: \",\"129\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\", \"VariableName: \",\"browserPanel\",...
[ "0.6378278", "0.6030841", "0.6021796", "0.59515417", "0.58104193", "0.58083266", "0.5799317", "0.57579273", "0.5702897", "0.5693071", "0.56904715", "0.5657728", "0.5638552", "0.5608434", "0.5562184", "0.5548636", "0.5537328", "0.549664", "0.5495779", "0.5481109", "0.54676235"...
0.0
-1
just get any known url...
@Override public URL getPersistenceUnitRootUrl() { return HibernatePersistenceProvider.class.getResource("/org/hibernate/jpa/persistence_1_0.xsd"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Uri getUrl();", "java.net.URL getUrl();", "URL getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.S...
[ "0.7355024", "0.7323658", "0.73078823", "0.72255105", "0.72255105", "0.72255105", "0.72255105", "0.72255105", "0.7164626", "0.7164626", "0.7164626", "0.7164626", "0.7164626", "0.7164626", "0.69019675", "0.6810377", "0.6765775", "0.67425597", "0.6666466", "0.6562126", "0.65621...
0.0
-1
Parse the fileConfigjSon and create a ConfigServer used to configure Server parameter
public static ConfigServer createConfigServer(String fileConfigjSon){ Map<String, String> json = new HashMap<String, String>(); ObjectMapper mapper = new ObjectMapper(); try { json = mapper.readValue(new File(fileConfigjSon), new TypeReference<HashMap<String, String>>() { }); } catch (JsonParseE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseServerFile() throws IOException {\r\n /* Creates new Scanner object of the filePath */\r\n Scanner scan = new Scanner(filePath).useDelimiter(\"version=\");\r\n /* Creates new Scanner object for the server version */\r\n Scanner scanVersion = new Scanner(scan.next()).use...
[ "0.6577558", "0.6156422", "0.6148497", "0.59167916", "0.5915965", "0.58833885", "0.57981664", "0.5743325", "0.5732431", "0.57130665", "0.56856847", "0.5668726", "0.56587166", "0.56570524", "0.56171787", "0.561013", "0.5606968", "0.5603679", "0.5603222", "0.5602683", "0.557616...
0.8200166
0
/ controller test Action
@Override public ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println("M : TestAction_execute() ȣ�� !"); String nick = request.getParameter("nick"); //DAO 객체 생성 TestDAO tdao = new TestDAO(); request.setAttribute("info", tdao.getIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void getSorteerAction() throws Exception {\n }", "@Test\n void getAddressBook() {\n\n assertEquals(test_AddressBook, controllerTest.getModel());\n\n }", "@Test\n void getGreeting() {\n System.out.println(controller.getGreeting());\n }", "@Test\r\n public void test...
[ "0.73339915", "0.72773206", "0.7131395", "0.71213365", "0.706729", "0.7048669", "0.69566923", "0.69373286", "0.69261163", "0.689857", "0.6890597", "0.6882304", "0.683668", "0.6823476", "0.6816522", "0.678377", "0.67660093", "0.67466676", "0.6721888", "0.66710013", "0.66632134...
0.0
-1
Inserts the specified element into the underlying queue, waiting if necessary for the underlying queue to be ready to accept new elements.
public void push(E e) throws InterruptedException { while (!isFree) { synchronized (this) { wait(); } } synchronized (this) { if (queue != null) { queue.add(e); } isFree = true; notifyAll(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "public void enqueue(E element) {\n\t\tadd(element);\n\t}", "public void enqueue (E element);", "public void enqueue(T element);", "public void insert(E element) {\n // TODO: YOUR CODE HERE\n if (c...
[ "0.7324313", "0.71708727", "0.71694815", "0.7110684", "0.6794641", "0.6750398", "0.6698091", "0.658285", "0.6578757", "0.65383637", "0.653154", "0.6524622", "0.6511402", "0.6505543", "0.64697784", "0.64588994", "0.64518005", "0.6432489", "0.64247423", "0.6414176", "0.64022607...
0.66102815
7
Retrieves and removes the head of the underlying queue, waiting if necessary until it is capable of providing an element.
public E pull() throws InterruptedException { while (!isFree) { synchronized (this) { wait(); } } synchronized (this) { if (queue != null && !queue.isEmpty()) { E element = queue.poll(); isFree = true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E poll() {\n\t\twhile (true) {\n\t\t\tlong f = front.get();\n\t\t\tint i = (int)(f % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did front change while we were reading x?\n\t\t\tif (f != front.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue empty?\n\t\t\tif (f == rear.get())\n\t\t\t\treturn n...
[ "0.74527705", "0.7368605", "0.7359165", "0.7297862", "0.7296904", "0.7222458", "0.72161084", "0.71948576", "0.7192432", "0.71755695", "0.7161707", "0.7138777", "0.70897496", "0.70505565", "0.70454955", "0.70400953", "0.7027868", "0.70070875", "0.6972721", "0.6967897", "0.6957...
0.7347913
3
pre: none post: creates button, sets image to /images/SolverA.png, sets location, sets _owner to b, sets _puzzle to p big O: O(1)
public SolverAStarButton(PuzzleBoard b, Puzzle p) { super("SolverA", 100, 30, b, p); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SlidePuzzle(int d){\n if (d == 3)\n {\n try {\n master = ImageIO.read(getClass().getResource(\"Images/udon.jpg\"));\n }\n catch (IOException ex) {\n }\n }\n else if (d == 4)\n {\n try {\n master = ImageIO.read(getClass().getResource(\"Images/sammie.jpg\"...
[ "0.6640833", "0.65552115", "0.6488994", "0.61810386", "0.6163676", "0.6115435", "0.60646063", "0.6021729", "0.59543264", "0.5949426", "0.5942491", "0.5942033", "0.5914336", "0.58971125", "0.58857226", "0.5874592", "0.58632", "0.5857746", "0.5834111", "0.58242035", "0.5810344"...
0.62871796
3
pre: mouse clicked Solver2Button post: puzzle solved using PuzzleAStarSolver Big O: O() because solve() is O() and everything else is O()
public void mouseClicked(MouseEvent e) { PuzzleSolvers s = new PuzzleAStarSolver(_puzzle); if (s.solve()) { System.out.println(s.moves()); s.play(_owner); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\r\n void solve(ActionEvent event) {\r\n \tsolveButton.setDisable(true);\r\n \tresetButton.setDisable(true);\r\n \tSolver solver = new Solver(file.toString());\r\n \tsolver.setListener(new StatusListener() {\r\n \t\t@Override\r\n \t\tpublic void updateText(String text) {\r\n\t\t\t\tPlatfo...
[ "0.66907704", "0.6266578", "0.62631994", "0.62086207", "0.6201299", "0.6186272", "0.6095331", "0.6044924", "0.60230064", "0.6007841", "0.599157", "0.5960277", "0.5944613", "0.5943944", "0.5881942", "0.5870661", "0.5835084", "0.5832826", "0.5827812", "0.5784661", "0.5782617", ...
0.7070881
0
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); System.out.print("Enter graph input file name: "); String file = sc.nextLine(); DFS graph = new DFS(file); System.out.println("The Graph Information is"); graph.pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
function that adds a new ticket price
public void addTicket(int price) throws WrongTicketPriceException { if (price > 100 || price < 1) { throw new WrongTicketPriceException(); } ticketPrice.add(price); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "public void putNewPrice(String symbol, double price);", "public Ticket addTicket(Ticket ticket){\n ticket.setDate(Instant.now());\n ticket.setAddition(0);\n List<Met> mets= ticket.getMets();\n ...
[ "0.7516124", "0.7250873", "0.6755499", "0.670094", "0.6591277", "0.6483946", "0.6466489", "0.6442795", "0.6422827", "0.641913", "0.64114493", "0.6398812", "0.63952553", "0.63840395", "0.63563544", "0.6345309", "0.6345309", "0.6345309", "0.6345309", "0.6345309", "0.6345309", ...
0.75060916
1
function that computes the average price of the tickets
public double averagePrice() { double sum = 0; for(Integer price : ticketPrice) { sum+=price; } return sum/ticketPrice.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigDecimal getAverageBuyPrice();", "BigDecimal getAverageSellPrice();", "public double getAveragePrice(String symbol);", "double getMeanPrice() {\n List<Double> allPrices = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> pricesOfFirm = firm.getPrices();\n a...
[ "0.76539373", "0.7590863", "0.7213759", "0.7026827", "0.7020358", "0.6879878", "0.6835746", "0.6781984", "0.67796546", "0.6741801", "0.672029", "0.66778374", "0.66674745", "0.6665868", "0.66315", "0.66313845", "0.66308093", "0.6581421", "0.6579725", "0.6520073", "0.65068257",...
0.859492
0
function that return the minimum price of a ticket
public static int min(int[] values) throws MathsException { if(values.length < Integer.MIN_VALUE || values.length > Integer.MAX_VALUE) throw new MathsException("Not ok"); int minimum = values[0]; for(int i=1;i<values.length;i++) if(minimum > values[i]) minimum = values[i]; return minimum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static BigDecimal FindMinPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.min(existingS...
[ "0.7364914", "0.72613525", "0.715007", "0.7090846", "0.68948984", "0.68424106", "0.68424106", "0.68081665", "0.6748456", "0.66455555", "0.66125244", "0.65277076", "0.65010357", "0.65001076", "0.64850634", "0.6434873", "0.63795257", "0.6345627", "0.63363814", "0.6331309", "0.6...
0.0
-1
Applies 5 step precedence system to get the billable revshare percentage
public static int getBillableRevshare(long sellerId, long dealId, long categoryId) throws HibernateException { int rate = getRate(RateCard.RateType.REVSHARE.getValue(), sellerId, dealId, categoryId); return rate > 0 ? rate : RateCard.RateType.REVSHARE.getDefaultRate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tch...
[ "0.64611", "0.6166031", "0.6026796", "0.6021114", "0.5972604", "0.5954863", "0.59547037", "0.5915464", "0.5879661", "0.5876705", "0.58668864", "0.58664656", "0.5853903", "0.57714593", "0.57492757", "0.57477164", "0.5743593", "0.5739045", "0.5735676", "0.5728269", "0.57180345"...
0.0
-1
Applies 5 step precedence system to get the reward points per lead
public static int getRewardPoints(long sellerId, long dealId, long categoryId) throws HibernateException { int rate = getRate(RateCard.RateType.REWARD_POINTS.getValue(), sellerId, dealId, categoryId); return rate > 0 ? rate : RateCard.RateType.REWARD_POINTS.getDefaultRate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tPointRewardCalculation pointRewards = new PointRewardCalculation();\n\t\t\n\t\tint rewardPoints = pointRewards.rewardCalculation(575);\n\t\tSystem.out.print(rewardPoints); \n\t}", "public BigDecimal getRewardPoint() {\n return rewardPoint;\n }", "double g...
[ "0.603979", "0.59634477", "0.59498054", "0.574795", "0.5705201", "0.5593076", "0.5584109", "0.5405794", "0.5384603", "0.5381589", "0.53700083", "0.536611", "0.5364177", "0.53598785", "0.5357525", "0.5334803", "0.5329759", "0.53230906", "0.5268227", "0.5249436", "0.5249219", ...
0.0
-1
UI ui = new UI();
public static void main(String[] args) { Parser p = new Parser(); //p.keyword = "035420"; u = new UI(); //p.goodSearch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Ui() { }", "public Ui() {\n }", "public UI() {\n initComponents();\n }", "void initUI();", "public GUI() {\n }", "private UI()\n {\n this(null, null);\n }", "private void initUI() {\n }", "public mainUI() {\n initComponents();\n }", "private UIManager() ...
[ "0.8014112", "0.78613746", "0.76709074", "0.75687075", "0.7479294", "0.74609697", "0.74048907", "0.7354925", "0.7311415", "0.7178133", "0.7172046", "0.71179277", "0.704768", "0.7027374", "0.7023863", "0.70163447", "0.7010856", "0.6997475", "0.6997362", "0.6931689", "0.688818"...
0.0
-1
No args constructor for use in serialization
public Register() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MyEncodeableWithoutPublicNoArgConstructor() {}", "public ObjectSerializationEncoder() {\n // Do nothing\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "defaultConstructor(){}", "public Data() {}", "private SerializerFactory() {\n ...
[ "0.74630904", "0.7387007", "0.7210724", "0.7029566", "0.7018587", "0.6977819", "0.69339114", "0.6881743", "0.6739828", "0.6727297", "0.6717886", "0.67169136", "0.669586", "0.669586", "0.66750634", "0.66246814", "0.6604095", "0.6532946", "0.65235436", "0.6500072", "0.6466648",...
0.0
-1
this function return the connection
public Connection getConnection(){ Connection conn = null; System.out.println("connection called"); try { Class.forName("com.mysql.jdbc.Driver"); conn=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/online_bidding_system","root",""); } catch(Cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Connection getConn(){\n \n return new util.ConnectionPar().getConn();\n }", "protected Connection getConnection () {\n \t\treturn connection;\n \t}", "public Connection getConnection() {\n \t\treturn this.connect;\n \t}", "public Connection getConn() {return conn;}", "public Connection...
[ "0.86563003", "0.8338467", "0.8072279", "0.8064631", "0.80524975", "0.80292165", "0.8023752", "0.8023752", "0.8023752", "0.79943925", "0.7987919", "0.7984936", "0.79649436", "0.79607564", "0.79439163", "0.792764", "0.7926248", "0.79112554", "0.7898272", "0.78877836", "0.78599...
0.0
-1
Conditionally create a normal or looping SvgView depending on what the user selects.
@Override public void writeSVG(Appendable ap, int tps, boolean looping, LinkedHashMap<String, IVisitableActor> actorMap) { IView svg; if (looping) { svg = new LoopingSvgView(ap, tps); } else { svg = new SvgView(ap, tps); } svg.setActors(actorMap); try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SvgStyle() {\n\n\t\t\tfillPaint = new Paint();\n\t\t\tstrokePaint = new Paint();\n\t\t\tfillPaint.setStyle(Paint.Style.FILL);\n\t\t\tstrokePaint.setStyle(Paint.Style.STROKE);\n\t\t\tfillPaint.setColor(0xff000000);\n\t\t\tstrokePaint.setColor(0xff000000);\n\t\t\tmasterOpacity = 1;\n\t\t\tfillOpacity = 1;\n\t...
[ "0.53522795", "0.5301038", "0.49972266", "0.49931118", "0.4846732", "0.47596034", "0.4714591", "0.47045052", "0.4644873", "0.4602179", "0.45518804", "0.45362544", "0.45300984", "0.45064652", "0.44907102", "0.44694906", "0.44514728", "0.44456202", "0.44444087", "0.44388208", "...
0.52972215
2
creating components to place onto the JOptionPane popup.
@Override public void saveSvgPopup(LinkedHashMap<String, IVisitableActor> actorCopies) { JTextField outputFile = new JTextField(); JTextField tps = new JTextField(); JCheckBox loopBack = new JCheckBox("Loopback?"); Object[] components = {"Output file name:", outputFile, "Ticks-per-second:", tps, loopB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDi...
[ "0.7329403", "0.72453046", "0.6887218", "0.68174624", "0.68106824", "0.67353356", "0.67004967", "0.6633844", "0.6583442", "0.65750754", "0.6572843", "0.6556635", "0.6551456", "0.6543091", "0.65371424", "0.6504505", "0.6504171", "0.64988214", "0.6490101", "0.6480779", "0.64636...
0.0
-1
/ creating an object for tripadvisor pom class
@Test public void reviewHotel() throws Throwable { TripAdvisorPage review=new TripAdvisorPage(driver); /*searching Club Mahindra */ review.searchinTripAdvisor(); /* review*/ review.searchForReview(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Parcelle createParcelle();", "P createP();", "public Plato(){\n\t\t\n\t}", "public Produto() {}", "Reproducible newInstance();", "private ThreePP createThreePP(String[] mavenCoord) {\n String vendor = mavenCoord[0];\n String product = mavenCoord[1];\n String version = mavenCoord[2];\...
[ "0.63239455", "0.63036186", "0.6175272", "0.6117878", "0.60430986", "0.6005511", "0.5958872", "0.5925134", "0.58254975", "0.581469", "0.5771606", "0.5765332", "0.57425755", "0.5741752", "0.57317406", "0.5723648", "0.5717303", "0.5702559", "0.5696326", "0.567877", "0.5674915",...
0.0
-1
instanciamos la clase ventana de listar pues asi mas adelante las actualizamos en tiempo real
static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real listaPersona.add(c); listaG.setListaGrafica(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\...
[ "0.6500631", "0.63822335", "0.6256832", "0.6213113", "0.6190226", "0.61663187", "0.6146501", "0.61217654", "0.6092219", "0.6053476", "0.6034896", "0.5988163", "0.5987713", "0.5972521", "0.5961656", "0.5958888", "0.59474933", "0.59335804", "0.5927872", "0.5916889", "0.59145117...
0.0
-1
Set the DataGraph value to convert.
public void setValue(List<T> convertData) { this.data = convertData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setGraphData(Object o) {\n\n }", "public void setGraph(Graph<V,E> graph);", "public void setGraph(){\r\n setDisplay(currentGraph);\r\n }", "public void Convert() {\n value = value;\n }", "public void setGraph(Graph2D graph) {\n mBI = null;\n m...
[ "0.6579495", "0.64413524", "0.6215124", "0.6007813", "0.58615845", "0.58164865", "0.5739516", "0.57181317", "0.5679062", "0.56681395", "0.5547022", "0.55350137", "0.5491095", "0.5448347", "0.543214", "0.5406476", "0.53936136", "0.5369181", "0.5361242", "0.53587157", "0.535737...
0.60720724
3
Set the data is multidimension.
public void setMultiple(boolean isMultiple) { this.multiple = isMultiple; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAll(Integer[][] newdata) {\r\n this.weekData = newdata;\r\n }", "protected void setDimension(int _dimension) {\r\n if (_dimension <= 0) {\r\n _dimension = 1;\r\n }\r\n this.dimension = _dimension;\r\n //this.data = new float[_dimension];\r\n ...
[ "0.61937547", "0.61686224", "0.5871773", "0.56850463", "0.56294113", "0.5530386", "0.5514626", "0.54935944", "0.5476091", "0.54660904", "0.5424203", "0.53932184", "0.539037", "0.5384794", "0.5381019", "0.5376505", "0.5376505", "0.5361233", "0.53389484", "0.5333563", "0.533204...
0.0
-1
Get the data is multidimension.
public boolean isMultiple() { return multiple; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@JavascriptInterface\n public float[] getData() {\n float[]mis;\n int i,k;\n mis[0]=misC;\n for(k=0;k<12;k++){\n for (i=0;i<(k+1)*misC;i++){\n mis[k*i+1]=misure[i][k];\n }\n }\n\n return mis; ...
[ "0.6089644", "0.60365194", "0.60215443", "0.59949505", "0.59059453", "0.5831874", "0.5815644", "0.57393587", "0.57376146", "0.57285714", "0.57190853", "0.5716582", "0.570774", "0.57075614", "0.570062", "0.5683668", "0.5673274", "0.5659984", "0.5651356", "0.5639737", "0.563574...
0.0
-1
Shape ground = new Plane(vec3(0.0, 0.5, 0.0), vec3(0, 1, 0), new Diffuse(new Vec3(1,1,1), gray)); Shape globe1 = new Sphere(vec3(1.0, 0.25, 2.5), 0.7, new Diffuse(new Vec3(1,1,1), red)); Shape globe2 = new Sphere(vec3(0.0, 0.25, 2.5), 0.5, new Diffuse(new Vec3(1,1,1), green)); Shape globe3 = new Sphere(vec3(1.0, 0.25, ...
public static void setScene() { Shape ground = new Plane(vec3(0.0, -1.0, 0.0), vec3(0, 1, -0.2), new Diffuse(new Vec3(1,1,1), white)); /* Shape globe1 = new Sphere(vec3(0.0, 2, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5))); Shape globe2 = new Sphere(vec3(2, 0, -6.0)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Group shapes() {\n Group group = new Group();\n\n Rectangle square = new Rectangle();\n square.setHeight(_size * 2.0);\n square.setWidth(_size * 2.0);\n square.setX(-_size);\n square.setY(-_size);\n square.setFill(_fill);\n square.setOpacity(0.2);\n ...
[ "0.69862413", "0.6561387", "0.655948", "0.6523628", "0.64272344", "0.63932496", "0.6372176", "0.63511485", "0.6248726", "0.62451774", "0.6192897", "0.61921287", "0.61730856", "0.61505437", "0.6138232", "0.613454", "0.613301", "0.6105179", "0.60651696", "0.60493445", "0.604532...
0.7648578
0
Creates new form HarvestingTaskWorkAreaJPanel
HarvestingTaskWorkAreaJPanel(JPanel userProcessContainer, OrganizationDirectory organizationDirectory, EcoSystem system, Farmer farmer) { initComponents(); this.userProcessContainer = userProcessContainer; this.farmer = farmer; this.userAccount = farmer.getUserAccount(); this.org...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makePanelTask() {\r\n if (panelTask == null) {\r\n panelTask = makePanel(jframe, BorderLayout.CENTER,\r\n \"Task Details\", 180, 50, 200, 25);\r\n\r\n JLabel createLabelName = makeJLabel(\"Name: \", 10, 100, 80, 25);\r\n JLabel createLabelDesc...
[ "0.7270262", "0.71374595", "0.6911291", "0.69102067", "0.6740383", "0.6711277", "0.6673171", "0.6630475", "0.6580084", "0.6490214", "0.6487524", "0.6487524", "0.64538294", "0.64403784", "0.6422088", "0.6269787", "0.6264984", "0.62597126", "0.6242626", "0.62053275", "0.6201985...
0.7073454
2
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); startJBtn = new javax.swing.JButton(); endJBtn = new javax.swing.JButton(); jLabel2 = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
End of variables declaration//GENEND:variables
private void setDataInFields() { quantityTxtFld.setText(farmer.getCropQuantity()+""); quantityTxtFld.setEnabled(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
Definicion de mayor de dos numeros enteros
public static int mayor (int x, int y) { return x>y ? x : y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\...
[ "0.6483043", "0.6406221", "0.6301263", "0.61402524", "0.6003923", "0.59485465", "0.5935211", "0.5799569", "0.57767385", "0.5626735", "0.5625689", "0.5536609", "0.55342513", "0.5532841", "0.5519241", "0.5513848", "0.5506238", "0.54835814", "0.54744816", "0.5421743", "0.5403942...
0.0
-1
/ parse the data file contents to a nested hash map which is a matrix of costs for every edge
private static void parseEdges(File fileNameWithPath) throws Exception{ try { BufferedReader in = new BufferedReader(new FileReader(fileNameWithPath)); /* * Read the first five lines from file as follows * * NAME: berlin52 * COMMENT: 52 locations in Berlin (Groetschel) * DIM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/*...
[ "0.6284713", "0.6176172", "0.5989649", "0.58850026", "0.56452125", "0.5561508", "0.54817677", "0.542369", "0.5402874", "0.53915554", "0.5377036", "0.5364113", "0.53639877", "0.535363", "0.5335702", "0.5329518", "0.532123", "0.52865833", "0.526625", "0.5258224", "0.52548367", ...
0.68689495
0
/ Invoke the approx mst to get the TSP
private static LinkedList<Integer> mstApprox(File fileNameWithPath) throws Exception{ String traceString = ""; double bestCost = Double.POSITIVE_INFINITY; LinkedList<Integer> bestTspList = null; double bestCycleTime = Double.POSITIVE_INFINITY; /* * read the file and build the cost table */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ...
[ "0.63417864", "0.62464654", "0.6160681", "0.6078335", "0.5998508", "0.59273845", "0.582256", "0.57394075", "0.56524974", "0.5634125", "0.563059", "0.5492748", "0.5492296", "0.5484118", "0.54133284", "0.53854114", "0.5364222", "0.5337112", "0.5326322", "0.5312143", "0.5310302"...
0.5466198
14
/ Invoke the greedy furthest insertion heuristic to get the TSP
private static LinkedList<Integer> heurFurthestInsertion(File fileNameWithPath) throws Exception{ String traceString = ""; double bestCost = Double.POSITIVE_INFINITY; LinkedList<Integer> bestTspList = null; double bestCycleTime = Double.POSITIVE_INFINITY; /* * read the file and build the cost table ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateNeighborhood(TSPSolution s){\r\n\t\tint [] rounte = new int[problem.city_num+1];\r\n\t\tfor(int i=0;i<problem.city_num;i++) rounte[i] = s.route[i];\r\n\t\trounte[problem.city_num] = rounte[0];\r\n\t\tint [] pos = new int[problem.city_num];\r\n\t\tproblem.calculatePosition(rounte, pos);\r\n\t\ti...
[ "0.6891457", "0.66084284", "0.651639", "0.6478318", "0.63521177", "0.6324069", "0.6303803", "0.627346", "0.6255347", "0.62272155", "0.61359966", "0.61106163", "0.60823095", "0.60751206", "0.6050836", "0.60169363", "0.5976731", "0.5944575", "0.5930596", "0.59282374", "0.592713...
0.62153345
10
/ Invoke the local search simulated annealing algorithm with 2 opt
private static LinkedList<Integer> localSearchSimulatedAnnealing(File fileNameWithPath, int kNeighborHood ) throws Exception{ String traceString = ""; double bestCost = Double.POSITIVE_INFINITY; LinkedList<Integer> bestTspList = null; double bestCycleTime = Double.POSITIVE_INFINITY; if (Project.runId == -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n INeighbor neighbor = new RandomNeighbor();\n IEvaluator evaluator = new BentEvaluator();\n ISolver solver = new RandomSearch(neighbor, evaluator);\n\n BoolFunction solution = solver.run();\n System.out.println(solution);\n }", "priv...
[ "0.64155793", "0.6413654", "0.6401754", "0.6359189", "0.63369054", "0.6291063", "0.6023056", "0.60139304", "0.6008851", "0.6002205", "0.59928626", "0.59410495", "0.58665943", "0.5852335", "0.58397335", "0.5803672", "0.57999474", "0.57760876", "0.5763538", "0.5750906", "0.5746...
0.65882796
0
/ Invoke the local search with 2 opt
private static LinkedList<Integer> localSearch2Opt(File fileNameWithPath, int kNeighborHood ) throws Exception{ String traceString = ""; double bestCost = Double.POSITIVE_INFINITY; LinkedList<Integer> bestTspList = null; double bestCycleTime = Double.POSITIVE_INFINITY; if (Project.runId == -1 ) Project...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchFunction() {\n\t\t\r\n\t}", "void compareSearch();", "void search();", "void search();", "public void search() {\r\n \t\r\n }", "SearchResult search(State root, List<State> expanded_list, State goal);", "void searchProbed (Search search);", "abstract public void search();", ...
[ "0.652221", "0.64465064", "0.6367747", "0.6367747", "0.63580674", "0.63218683", "0.62984014", "0.61852133", "0.61449456", "0.6122929", "0.61130035", "0.6096071", "0.6073436", "0.60424167", "0.60224193", "0.59970474", "0.59576637", "0.5949954", "0.5942981", "0.5940567", "0.592...
0.53876406
95
/ Get the cost of the tsp
private static double tspCost(LinkedList<Integer> tspList) { double tspCost=0; for (int i=1;i<tspList.size();i++){ tspCost += Project.sourceGTree.get(tspList.get(i-1)).get(tspList.get(i)); } if ( tspList.getFirst().intValue() != tspList.getLast().intValue() ){ tspCost += Project.sourceGTree.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getCost();", "double getCost();", "double getTotalCost();", "@Pure\n\tdouble getCost();", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "int getCost();", "int getCost();", "int getCost();", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "public double getCost()\r\n\t{...
[ "0.7922362", "0.7922362", "0.7730591", "0.76077044", "0.74820334", "0.7412816", "0.7412816", "0.7412816", "0.7371172", "0.7337339", "0.7322817", "0.7311829", "0.7289065", "0.7269465", "0.7261005", "0.72348785", "0.72232497", "0.72219706", "0.7221474", "0.7210431", "0.7209652"...
0.7473833
5
/ print the sol file
private static void printSol(Integer runId,LinkedList<Integer> bestTspList, double bestCost) throws java.io.FileNotFoundException,UnsupportedEncodingException{ // writing the sol // <inputFilename>_<method>_<cutoff>_<runID>*.sol String fileName = String.format("%s_%s_%.0f",Project.name,Project.method,Project.cut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public void printData() {\n\t\ttry {\n\t\t\tFiles.lines(...
[ "0.6501026", "0.64922255", "0.6427261", "0.64188576", "0.64183223", "0.629886", "0.6206043", "0.6167486", "0.61414516", "0.61123025", "0.6101602", "0.60533994", "0.60454214", "0.60024285", "0.5984013", "0.59479636", "0.5905042", "0.586887", "0.5799273", "0.5787372", "0.578385...
0.6690632
0
/ print the trace file
private static void printTrace(Integer runId, String traceString ) throws java.io.FileNotFoundException,UnsupportedEncodingException{ // writing the trace report // <inputFilename>_<method>_<cutoff>_<runID>*.sol String fileName = String.format("%s_%s_%.0f",Project.name,Project.method,Project.cutoffTimeSeconds); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "void dumpTraceLine(String s)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"[trace] \"); //$NON-NLS-1$\n\t\tsb.append(s);\n\t\tout(sb.toString());\n\t}", "private void writeTrace()\r\n {\r\n TGCreator creator = new TGCreator();\r...
[ "0.66835916", "0.6572704", "0.6559697", "0.64137465", "0.6356555", "0.63385475", "0.63195187", "0.6311246", "0.62300247", "0.6186268", "0.61650515", "0.61374307", "0.61010396", "0.6022262", "0.5952845", "0.5923128", "0.5904313", "0.5901034", "0.5899009", "0.58807725", "0.5880...
0.68916565
0
/ append to the trace file
private static void appendToTraceFile(Integer runId, String traceString ) throws java.io.FileNotFoundException,UnsupportedEncodingException{ // writing the trace report // <inputFilename>_<method>_<cutoff>_<runID>*.sol String fileName = String.format("%s_%s_%.0f",Project.name,Project.method,Project.cutoffTimeSec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeTrace()\r\n {\r\n TGCreator creator = new TGCreator();\r\n TGTrace trace = creator.createTrace(JVM.getVM(), this.stateGraph);\r\n TraceGraphWriter tgWriter = new TraceGraphWriter(trace);\r\n\r\n if (this.traceCompressed)\r\n {\r\n this.filename += ITraceConstant...
[ "0.699114", "0.68257433", "0.62180036", "0.6130567", "0.60753113", "0.5879288", "0.58635646", "0.5793304", "0.5745209", "0.5738982", "0.5712881", "0.5695566", "0.56843626", "0.56791085", "0.5677384", "0.5668866", "0.5661534", "0.56575614", "0.56323665", "0.56271243", "0.55938...
0.71078175
0
/ print the tab results file
private static void appendTabResults(Integer runId, double cpuTime,double bestCost,LinkedList<Integer> bestTspList) throws java.io.IOException,java.io.FileNotFoundException,UnsupportedEncodingException{ // <inputFilename>_<method>_<cutoff>_<runID>*.sol String fileName = Project.method+".tab"; FileOutputStream fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }", "public void print(int tabOrder);", "public void printResults(String fileName) {\n\t\ttry {\n\t\t\tPrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n\t\t\tfor (int i = 0; i < results.size(); i++)...
[ "0.70215714", "0.68729275", "0.663426", "0.65491456", "0.6527938", "0.64914757", "0.64779395", "0.6451201", "0.63599765", "0.6341974", "0.6220364", "0.6219796", "0.6210877", "0.6206692", "0.6183286", "0.61782664", "0.616001", "0.6159539", "0.61583745", "0.60983175", "0.609227...
0.6161782
16
Given a Solr field name and value and the name of a requestHandler, query Solr and return the matching Solr documents
public static SolrDocumentList getDocsFromFieldedQuery(SolrServer solrServer, String solrFldName, String solrFldVal, String requestHandlerName) { SolrQuery query = new SolrQuery(); query.setQuery(solrFldName + ":" + solrFldVal); query.setQueryType(requestHandlerName); query.setFacet(false); tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static SolrDocumentList getFullDocsFromFieldedQuery(SolrServer solrServer, String solrFldName, String solrFldVal, String requestHandlerName)\n\t{\n\t SolrQuery query = new SolrQuery();\n\t query.setQuery(solrFldName + \":\" + solrFldVal);\n\t query.setQueryType(requestHandlerName);\n\t query.set...
[ "0.66667205", "0.61772716", "0.61126447", "0.60330147", "0.5813241", "0.571001", "0.56879616", "0.54823697", "0.5321322", "0.5321322", "0.5296131", "0.5296024", "0.5295914", "0.52898073", "0.5275151", "0.525689", "0.5149506", "0.5130055", "0.51133364", "0.5105516", "0.5041376...
0.69126177
0
Do a fielded query using the requestHandler, return the matching Solr documents with all their (stored) fields
public static SolrDocumentList getFullDocsFromFieldedQuery(SolrServer solrServer, String solrFldName, String solrFldVal, String requestHandlerName) { SolrQuery query = new SolrQuery(); query.setQuery(solrFldName + ":" + solrFldVal); query.setQueryType(requestHandlerName); query.setFacet(false); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Collection<Record> handleRequest(SearchRequest request) {\n\t\tCollection<Record> resultSet = getResults(request.getQuery());\n\t\treturn resultSet;\n\t}", "public static SolrDocumentList getDocsFromFieldedQuery(SolrServer solrServer, String solrFldName, String solrFldVal, String requestHandlerName)\n\t{...
[ "0.6622437", "0.650169", "0.6186452", "0.6115584", "0.6092128", "0.58739734", "0.5838048", "0.5807496", "0.57414794", "0.5637983", "0.5572423", "0.55573875", "0.55041814", "0.5410513", "0.54045874", "0.5403277", "0.5387834", "0.53677356", "0.53586954", "0.5357653", "0.5355676...
0.6538283
1
create a SolrInputDocument from a Map of Solr field names to values
public static SolrInputDocument createSolrInputDoc(Map<String, Object> fldNames2ValsMap) { if (fldNames2ValsMap == null) return null; SolrInputDocument solrInputDoc = new SolrInputDocument(); for (String fldName : fldNames2ValsMap.keySet()) { Object valObj = fldNames2V...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SolrInputDocument collect(FlexDocument f) {\n\n\t\tSolrInputDocument cls_doc = new SolrInputDocument();\n\n\t\tfor( FlexLine l : f ){\n\t\t\tString fieldName = l.field();\n\t\t\tfor( String val : l.values() ){\n\t\t\t\tcls_doc.addField(fieldName, val);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cls_doc;\n\t}", "Se...
[ "0.5876976", "0.57683355", "0.5680602", "0.5510766", "0.54943097", "0.5401344", "0.53876877", "0.53827995", "0.5291338", "0.52681404", "0.5063048", "0.50459874", "0.49740064", "0.4969874", "0.49675193", "0.49654567", "0.49184698", "0.48613495", "0.4860048", "0.48355803", "0.4...
0.80949247
1
return an XML representation of the SolrInputDocument object, as a String. Do not include any default boost values in the XML.
public static String getXML(SolrInputDocument solrInputDoc) { if (solrInputDoc == null || solrInputDoc.isEmpty()) return null; return ClientUtils.toXML(solrInputDoc).replace(" boost=\"1.0\"", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getInputXml() {\r\n return localInputXml;\r\n }", "public java.lang.String getInputXml() {\r\n return localInputXml;\r\n }", "public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils....
[ "0.6177054", "0.6177054", "0.6166505", "0.60363877", "0.58496654", "0.5826846", "0.5826846", "0.5784758", "0.5766042", "0.5754755", "0.5716773", "0.5715563", "0.5706454", "0.5706454", "0.5706454", "0.56924105", "0.56224054", "0.56124353", "0.5600163", "0.55468255", "0.5530583...
0.7917809
1
fish finder op true zetten
@Test public void setFishFinderOpPos(){ Motorboot m = new Motorboot("boot1",true,true); assertEquals("boot1",m.getNaam()); assertEquals(true,m.isRadarAanBoord()); assertEquals(true,m.isFishFinderAanBoord()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isAtFish(){\n final RSNPC[] fishing_spots = NPCs.findNearest(\"Fishing spot\");\n if (fishing_spots.length < 1){\n return false;\n }\n return fishing_spots[0].isOnScreen();\n }", "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to fin...
[ "0.6207587", "0.60729694", "0.5980916", "0.5980325", "0.59232634", "0.57973707", "0.57951725", "0.56719816", "0.5498962", "0.54828304", "0.54700613", "0.5467222", "0.54366726", "0.54366726", "0.5414171", "0.53976357", "0.53974515", "0.5390088", "0.53794694", "0.53400224", "0....
0.0
-1
Created by Dark(DarkGuardsman, Robert) on 4/6/2019.
public interface ITickTimer<H extends Object> { /** * Called each tick of the host machine, item, or entity * * @param host - optional, host of the timer * @param systemTick - tick of the machine, item, or entity */ void tick(H host, int systemTick); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpubl...
[ "0.60915023", "0.5808557", "0.57847977", "0.56717634", "0.5645866", "0.563562", "0.559739", "0.559739", "0.5582447", "0.5562443", "0.5517451", "0.5481349", "0.5474303", "0.5457173", "0.5457173", "0.5457173", "0.5457173", "0.5457173", "0.5457173", "0.545462", "0.545134", "0....
0.0
-1
Called each tick of the host machine, item, or entity
void tick(H host, int systemTick);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "public void tick() {\n\t\tfor (Entity e : entities) {\n\t\t\te.tick();\n\t\t}\n\t}", "public void tick() {\r\n }", "@Override\n\tpublic void tick() {\n\n\t}", "public void tick() {\n\t}", "public ...
[ "0.7264646", "0.7264646", "0.71824574", "0.71354014", "0.7132613", "0.7108519", "0.7108519", "0.7073239", "0.7073239", "0.7073239", "0.7073239", "0.7073239", "0.7073239", "0.7073239", "0.70507157", "0.6983516", "0.6894126", "0.68892586", "0.6860741", "0.6842655", "0.67537093"...
0.74158686
0
Hardcodarea datelor de interes
@Before public void setUp() throws Exception { countryCode="RU"; cityName="Razvilka"; lat="55.5917"; lon="37.7408"; /** * Citirea din fisier */ ArrayList<String> list=new ArrayList<String>(); File inputFile=new File("src/main/resources/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract java.lang.String getFecha_inicio();", "public abstract java.lang.String getFecha_termino();", "public Date getFechaDesde()\r\n/* 164: */ {\r\n/* 165:283 */ return this.fechaDesde;\r\n/* 166: */ }", "public Date getGioBatDau();", "public Date getFechaHasta()\r\n/* 174: */ ...
[ "0.679139", "0.6633889", "0.6621242", "0.6614942", "0.6571348", "0.6522066", "0.6512969", "0.65076745", "0.64662814", "0.639201", "0.63587373", "0.6345253", "0.6345253", "0.6345253", "0.6342672", "0.6340297", "0.63008845", "0.62639505", "0.62557286", "0.6252782", "0.623821", ...
0.0
-1
The quads returned from this method are added to the tessellator, however the plant renderer directly adds them to the tessellator, so an empty list is returned
@Override @SideOnly(Side.CLIENT) public List<BakedQuad> getPlantQuads(IExtendedBlockState state, int growthStage, EnumFacing direction, Function<ResourceLocation, TextureAtlasSprite> textureToIcon) { if (textureToIcon instanceof ITessellator) { PlantRenderer.renderPlant((ITessellator) textur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addTestListData() {\n\t\ts.add(new Sphere(quad, sky, 1000, 0, 0, 0, -90, 0, 0));\n\t\t\n//\t\ts.add(new Sphere(quad, planets[0], 3.8f, 50, 40, -50, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[1], 9.5f, 40, 40, -20, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[2], 10.f, 0, 40, -20, -90, 0,...
[ "0.5676667", "0.54919744", "0.5418416", "0.51972795", "0.51438284", "0.51378113", "0.5115024", "0.5090188", "0.5061519", "0.50331366", "0.50210583", "0.49916035", "0.49606583", "0.49528506", "0.49411893", "0.4902219", "0.48759377", "0.48673788", "0.48657474", "0.48296225", "0...
0.6382402
0
return the index of the kth smallest number
private int quickSelect(int[] a, int low, int high,int k) { //using quick sort //put nums that are <= pivot to the left //put nums that are > pivot to the right int i = low, j = high, pivot = a[high]; while(i < j) { if(a[i++] > pivot) swap(a, --i, --j)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int kthSmallest(int[][] matrix, int k) {\n return 0;\n }", "public int kthSmallest(TreeNode root, int k) {\n ArrayList<Integer> arr = new ArrayList<>();\n inorder(root, arr);\n return arr.get(k-1);\n }", "public int kthSmallest(TreeNode root, int k) {\n if (r...
[ "0.810278", "0.8037608", "0.8014588", "0.8011211", "0.79396474", "0.77183574", "0.767894", "0.7648041", "0.7647583", "0.76352566", "0.7633448", "0.76155776", "0.7528877", "0.75010043", "0.7430882", "0.74163955", "0.740679", "0.73922276", "0.7284085", "0.72536176", "0.7194937"...
0.0
-1
Attiva il timer di notifica, se non è già attivo.
public void activate () { if (_timer!=null) { return; } _timer = new Timer ("tray-notifier", true); final TimerTask task = new TimerTask () { public void run() { SwingUtilities.invokeLater (new Runnable () { public void run () { /* * @workaround invoca in modo asincrono l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n ...
[ "0.67545027", "0.6742257", "0.67124194", "0.6663721", "0.66554517", "0.6579496", "0.6552523", "0.6506376", "0.64188176", "0.6389732", "0.6340688", "0.6336362", "0.63101256", "0.6294907", "0.6289303", "0.6269514", "0.62526065", "0.6243963", "0.62270314", "0.6208601", "0.620562...
0.0
-1
Disttiva il timer di notifica.
public void deactivate () { if (_timer!=null) { _timer.cancel (); _timer.purge (); _timer = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n ...
[ "0.75336176", "0.7312758", "0.7302132", "0.71606493", "0.7151932", "0.7151028", "0.71481407", "0.70077", "0.69893163", "0.69716984", "0.697165", "0.6960842", "0.69272643", "0.6920137", "0.6915977", "0.68110025", "0.67878914", "0.6760747", "0.67402065", "0.67361665", "0.672301...
0.0
-1
Effettua la notifica alla system tray.
public abstract void notifyTray (final SystemTraySupport traySupport);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTrayIcon()\n\t{\n\t\tImage image = new Image(display, PropertyManager.getInstance().getProperty(\"ICON_FOLDER\"));\n\t\tfinal Tray tray = display.getSystemTray();\n\n\t\tif (tray == null)\n\t\t{\n\t\t\tSystem.out.println(\"The system tray is not available\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal Tra...
[ "0.74584913", "0.7294084", "0.724386", "0.72037125", "0.6791251", "0.67896414", "0.6727593", "0.66966563", "0.6611935", "0.6564983", "0.651417", "0.643267", "0.6389597", "0.6238044", "0.62353927", "0.6209486", "0.6183873", "0.6155618", "0.6063854", "0.60435385", "0.5997156", ...
0.7872517
0
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","b"], ["a","a","b"] ]
public static void main(String[] args) { // TODO Auto-generated method stub ArrayList<ArrayList<String>> resultSet = partition("aba"); System.out.println(resultSet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<ArrayList<String>> partition(String s) {\r\n\t\tArrayList<ArrayList<String>> result = new ArrayList<ArrayList<String>>();\r\n\t\tif (s == null || s.length() == 0) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tArrayList<String> partition = new ArrayList<String>();// track each possible partition...
[ "0.8053659", "0.75287014", "0.6946114", "0.6579488", "0.65583813", "0.65398985", "0.64086187", "0.63920164", "0.62504643", "0.6209907", "0.61742294", "0.6144152", "0.61274725", "0.6111364", "0.6102481", "0.60887444", "0.6035488", "0.5903123", "0.5862461", "0.58188874", "0.581...
0.0
-1
Accepts values: ROCK / PAPER / SCISSORS and evaluates which player wins
private static ResultsObject evaluateWinner(String player1Choice, String player2Choice, String player1Type) { if (player1Choice == player2Choice) { return setDisplayMessage("It is a tie!", "", player2Choice, player1Choice, player1Type); } else { switch (player1Choice) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "private boolean winner() {\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) ...
[ "0.7272567", "0.719335", "0.70434463", "0.695861", "0.69415957", "0.6915342", "0.6914413", "0.6868136", "0.68279433", "0.6816284", "0.6812857", "0.680675", "0.6797255", "0.67910326", "0.67763376", "0.677135", "0.67542803", "0.6745318", "0.67064273", "0.6692904", "0.66826403",...
0.681219
11
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //item.getMenuInfo() switch (id) { case R.id.action_settings: return true; case R.id.action_download_data: if(!(getFragmentType(R.id.fragment_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577...
0.0
-1
TODO Autogenerated method stub
@Override public int getCount() { return mMeasuresinfoes.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Object getItem(int arg0) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public long getItemId(int arg0) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = inflater.inflate( R.layout.report_module_listview_item, null); mViewHolder = new ViewHolder(); mViewHolder.name_text = (TextView) convertView .findViewById(R.id.name); mVi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
End of code segment locked by HackerRank
public static String getSmallestAndLargest(String s, int k) { /* Create Strings for the largest and smalletst substrings, also a temporary String which will be used while searching for the largest and smallest substrings. The first loops iterates over the input String s for the larg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void end() {\r\n lang.nextStep();\r\n int total = seen + failed;\r\n\r\n hideAll();\r\n SourceCode end = lang.newSourceCode(new Offset(0, 50, pMap.get(\"hRect\"),\r\n \"SW\"), \"end\", null, sourceCodeProperties);\r\n end.addCodeLine(\r\n \"Das h\\u00F6chste Ergebnis, dass de...
[ "0.577156", "0.566775", "0.5484051", "0.54814696", "0.5451117", "0.54156905", "0.54152733", "0.5401145", "0.5388057", "0.53843874", "0.53411496", "0.5334036", "0.53132373", "0.531027", "0.53101236", "0.530131", "0.52967095", "0.52952826", "0.52878374", "0.5286322", "0.5283065...
0.0
-1
Start of code segment locked by HackerRank
public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.next(); int k = scan.nextInt(); scan.close(); System.out.println(getSmallestAndLargest(s, k)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void run() {\n int code = memory[pc];\n while (code != 0) {\n nextCode(code);\n code = memory[++pc];\n }\n }", "public int start() { return _start; }", "public int Start(int sz){\n\tint aux01 ;\n\tint aux02 ;\n\n\taux01 = this.Init(sz);\n\taux02 = this.Pri...
[ "0.57832634", "0.5648861", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", "0.5600008", ...
0.0
-1
Instantiates a new batch collecting builder.
public BatchCollectingBuilder(int batchSize, long ttl, TimeUnit timeUnit ) { super(ttl,timeUnit); this.batch = new ArrayList<>( batchSize ); this.batchSize = batchSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BatchCollectingBuilder(int batchSize ) {\n\t\tsuper();\n\t\tthis.batch = new ArrayList<>( batchSize );\n\t\tthis.batchSize = batchSize;\n\t}", "public BatchCollectingBuilder(int batchSize, long expiration ) {\n\t\tsuper(expiration);\n\t\tthis.batch = new ArrayList<>( batchSize );\n\t\tthis.batchSize = bat...
[ "0.7335196", "0.6804022", "0.66040593", "0.63810533", "0.61254907", "0.60518104", "0.59897125", "0.5942583", "0.5699128", "0.55167943", "0.55167943", "0.55167943", "0.55147094", "0.5496332", "0.54653853", "0.5419319", "0.5356346", "0.535568", "0.5345271", "0.5319354", "0.5318...
0.6686384
2
Instantiates a new batch collecting builder.
public BatchCollectingBuilder(int batchSize, long expiration ) { super(expiration); this.batch = new ArrayList<>( batchSize ); this.batchSize = batchSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BatchCollectingBuilder(int batchSize ) {\n\t\tsuper();\n\t\tthis.batch = new ArrayList<>( batchSize );\n\t\tthis.batchSize = batchSize;\n\t}", "public BatchCollectingBuilder(int batchSize, long ttl, TimeUnit timeUnit ) {\n\t\tsuper(ttl,timeUnit);\n\t\tthis.batch = new ArrayList<>( batchSize );\n\t\tthis.b...
[ "0.7335196", "0.6686384", "0.66040593", "0.63810533", "0.61254907", "0.60518104", "0.59897125", "0.5942583", "0.5699128", "0.55167943", "0.55167943", "0.55167943", "0.55147094", "0.5496332", "0.54653853", "0.5419319", "0.5356346", "0.535568", "0.5345271", "0.5319354", "0.5318...
0.6804022
1
Instantiates a new batch collecting builder.
public BatchCollectingBuilder(int batchSize ) { super(); this.batch = new ArrayList<>( batchSize ); this.batchSize = batchSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BatchCollectingBuilder(int batchSize, long expiration ) {\n\t\tsuper(expiration);\n\t\tthis.batch = new ArrayList<>( batchSize );\n\t\tthis.batchSize = batchSize;\n\t}", "public BatchCollectingBuilder(int batchSize, long ttl, TimeUnit timeUnit ) {\n\t\tsuper(ttl,timeUnit);\n\t\tthis.batch = new ArrayList<...
[ "0.6804022", "0.6686384", "0.66040593", "0.63810533", "0.61254907", "0.60518104", "0.59897125", "0.5942583", "0.5699128", "0.55167943", "0.55167943", "0.55167943", "0.55147094", "0.5496332", "0.54653853", "0.5419319", "0.5356346", "0.535568", "0.5345271", "0.5319354", "0.5318...
0.7335196
0