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
/ Reset all variables before entering init_loop() and loop()
void resetControlVariables() { a1_cnt_ = 0; b1_cnt_ = 0; x1_cnt_ = 0; y1_cnt_ = 0; lb1_cnt_ = 0; rb1_cnt_ = 0; lsb1_cnt_ = 0; rsb1_cnt_ = 0; lt1_left_cnt_ = 0; lt1_right_cnt_ = 0; a2_cnt_ = 0; b2_cnt_ = 0; x2_cnt_ = 0; y2_cnt_ = 0; lb2_cnt_ = 0; rb2_cnt_ = 0; lsb2_cnt_ = 0; rsb2_cnt_ = 0; curr_time_ = 0.0; loop_cnt_ = 0; last_imu_read_loop_id_ = -1; last_motor_read_loop_id_ = -1; last_rgb_range_stone_read_loop_id_ = -1; last_range_stone_read_loop_id_ = -1; last_range_right_read_loop_id_ = -1; last_range_left_read_loop_id_ = -1; last_range_stone_read_time_ = 0; last_range_right_read_time_ = 0; last_range_left_read_time_ = 0; range_stone_dist_init_min_ = 0; range_right_dist_init_min_ = 0; range_left_dist_init_min_ = 0; range_stone_error_detected_ = false; range_right_error_detected_ = false; range_left_error_detected_ = false; battery_voltage_ = 0.0; last_button_time_ = 0.0; last_button_a1_time_ = 0.0; last_button_b1_time_ = 0.0; last_button_rb1_time_ = 0.0; last_button_time2_ = 0.0; last_double_stone_time_ = 0.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetLoop(){\n\t\tloopTime = 0;\n\t}", "public void reset() {\n cycles = 0;\n nextHaltCycle = GB_CYCLES_PER_FRAME;\n nextUpdateCycle = 0;\n running = false;\n timer.reset();\n \n cpu.reset();\n ram.reset();\n soundHandler.reset();\n }"...
[ "0.7289469", "0.7164366", "0.70518935", "0.70518935", "0.69381607", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", "0.6920025", ...
0.7090289
2
/ Return true if it's RED team
boolean isRedTeam() { return ( START_AS_RED ? (!color_flipped_) : color_flipped_ ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasTeam();", "public Team getTeamRed() {\r\n return teamRed;\r\n }", "@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}", "private boolean multipleTeams(SettingsClass s){\r\n int a =s.getPlayerColor(0);\r\n for(int i=0;i<s.getNumPla...
[ "0.7430659", "0.68227154", "0.6755472", "0.6614444", "0.63963425", "0.6269669", "0.62563354", "0.62423795", "0.62192607", "0.62174046", "0.6216008", "0.6177069", "0.61655474", "0.6136699", "0.6076335", "0.60534686", "0.6039118", "0.6000783", "0.598964", "0.5972112", "0.597211...
0.7926348
0
/ Return current robot heading based on gyro/IMU reading
double getHeading() { if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) { // return the existing heading when getHeading() is called in the same loop return heading_ ; } heading_ = 0; if( USE_IMU && imu_!=null && imu_init_ok_ ) { imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25 heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle); last_imu_read_loop_id_ = loop_cnt_; } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) { // use IMU2 if IMU failed imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle); last_imu_read_loop_id_ = loop_cnt_; } return heading_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHeading() {\n return Rotation2d.fromDegrees(m_gyro.getAngle()).getDegrees();\n }", "private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.norm...
[ "0.8118042", "0.8056666", "0.7725817", "0.7585154", "0.73448396", "0.70868134", "0.70427847", "0.6886599", "0.6884681", "0.6854208", "0.68505687", "0.6775642", "0.67640924", "0.67640924", "0.67640924", "0.6690107", "0.6683682", "0.665634", "0.6627259", "0.6596944", "0.6596944...
0.78634834
2
/ Return heading diff for a given init heading
double getHeadingDiff(double init_h) { double curr_h = getHeading(); double diff_h = init_h - curr_h; if( diff_h>=360.0 ) diff_h -= 360.0; else if( diff_h<=-360.0 ) diff_h += 360.0; return diff_h ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getHeading();", "float getHeading();", "float getHeading();", "public final native int getHeading() /*-{\n return this.getHeading() || 0;\n }-*/;", "public int getHeading()\n\t{\n\t\treturn heading;\n\t}", "public static double getHeading(double heading) {\n double newHeading;\n i...
[ "0.6426794", "0.6426794", "0.6426794", "0.5945456", "0.5934131", "0.5909542", "0.58892274", "0.579159", "0.5788811", "0.5788811", "0.5760367", "0.5683863", "0.56203973", "0.55912095", "0.55912095", "0.5570031", "0.5533982", "0.5515077", "0.551026", "0.54646087", "0.54646087",...
0.7880651
0
/ Gets the heading from REV IMU/IMU2
double readImuHeading() { double h = -360.0; if( USE_IMU && imu_!=null && imu_init_ok_ ) { h = imu_.getAngularOrientation().firstAngle; } return h; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }", "float getHeading();", "float getHeading();", "float getHeading();", "double getHeading() {\n if( CACHE...
[ "0.70897985", "0.681059", "0.681059", "0.681059", "0.6728169", "0.6669363", "0.6541932", "0.6541932", "0.64983165", "0.6386385", "0.62775934", "0.61813474", "0.6165063", "0.6160866", "0.6112569", "0.60833335", "0.6071503", "0.6071503", "0.60499173", "0.6046139", "0.6040675", ...
0.6842696
1
/ Gets the heading from REV IMU2
double readImu2Heading() { double h = -360.0; if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) { h = imu2_.getAngularOrientation().firstAngle; } return h; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getHeading();", "float getHeading();", "float getHeading();", "public int getHeading()\n\t{\n\t\treturn heading;\n\t}", "public String getHeading() {\n return heading;\n }", "public String getHeading() {\n return heading;\n }", "private String collectHeading(Document doc) {\n ...
[ "0.6953632", "0.6953632", "0.6953632", "0.6927565", "0.680693", "0.680693", "0.6733977", "0.65679073", "0.65599316", "0.6491443", "0.6425806", "0.6337517", "0.63121086", "0.6290067", "0.6202793", "0.62010664", "0.62010664", "0.6179691", "0.6178184", "0.6170329", "0.61637783",...
0.68929327
4
/ Normalize a given heading with value of (360,360] to range (180,180]
double normalizeHeading(double h) { double nh = h; if( h>-180 && h<180 ) { } else if( h <= -180 ) { nh = h+360; } else if( h > 180 ) { nh = h-360; } return nh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double normaliseHeading(double ang) {\r\n\t\tif (ang > 2 * PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < 0)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}", "public static double getHeading(double heading) {\n double newHeading;\n if (heading >=0.0 && heading < 90.0)\n newHeading = -1....
[ "0.72716206", "0.7262095", "0.6786755", "0.66619223", "0.6548429", "0.61182356", "0.6055653", "0.6038536", "0.59924054", "0.59216213", "0.59028864", "0.5829018", "0.57738596", "0.5736534", "0.5696143", "0.56802064", "0.5646758", "0.56402135", "0.56256914", "0.56256914", "0.56...
0.8149813
0
/ Computes the current battery voltage Copy from /robotcontroller/external/samples/ConceptTelemetry.java
double getBatteryVoltage(boolean first_reading) { double result = Double.POSITIVE_INFINITY; for (VoltageSensor sensor : hardwareMap.voltageSensor) { double voltage = sensor.getVoltage(); if (voltage > 0) { result = Math.min(result, voltage); if(first_reading) break; // return the first valid reading (>0.0) to minimize overhead } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getVoltage ()\n {\n return _voltage;\n }", "int getOutputVoltage();", "int getOutputVoltageRaw();", "public double getVoltage() {\n\t\treturn this.voltage;\n\t}", "public synchronized float getVoltage(){\n\t\t getData(REG_MMXCOMMAND, buf, 1);\n\t\t // 37 is the constant given by Min...
[ "0.68579966", "0.6812054", "0.6803465", "0.67168635", "0.65646476", "0.6459503", "0.6395143", "0.63831824", "0.6365473", "0.63416904", "0.6293411", "0.6143786", "0.6133401", "0.6117254", "0.6065154", "0.5895203", "0.5868969", "0.58664834", "0.5857332", "0.584944", "0.583031",...
0.6518112
5
/ Return true if all drive motors' encoder are 0s
boolean areAllDriveMotorsReset() { return ( getMotorEncoder(MotorName.MOTOR_LF)==0 && getMotorEncoder(MotorName.MOTOR_LB)==0 && getMotorEncoder(MotorName.MOTOR_RF)==0 && getMotorEncoder(MotorName.MOTOR_RB)==0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean checkEncoder(TalonSRX... motors)\n {\n boolean result = true;\n\n for (TalonSRX t : motors)\n {\n boolean isPresent = t.getSensorCollection().getPulseWidthRiseToRiseUs() != 0;\n\n if (isPresent)\n {\n System.out.println(S...
[ "0.6571653", "0.6269223", "0.6256126", "0.62471837", "0.61757416", "0.6146878", "0.6132159", "0.61014754", "0.6074309", "0.6020034", "0.599167", "0.59268415", "0.59226525", "0.59158444", "0.5900933", "0.58827287", "0.58505875", "0.5837114", "0.5824285", "0.5821462", "0.581476...
0.7591672
0
/ Return motor encoder value
int getMotorEncoder( MotorName m ) { int enc = 0; if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) { // Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle for( LynxModule module : all_hubs_ ) { module.clearBulkCache(); } } switch ( m ) { case MOTOR_LF: enc = motorLF_.getCurrentPosition(); break; case MOTOR_LB: enc = motorLB_.getCurrentPosition(); break; case MOTOR_RF: enc = motorRF_.getCurrentPosition(); break; case MOTOR_RB: enc = motorRB_.getCurrentPosition(); break; case MOTOR_LEFT_INTAKE: enc = motor_left_intake_.getCurrentPosition(); break; case MOTOR_RIGHT_INTAKE: enc = motor_right_intake_.getCurrentPosition(); break; case MOTOR_LIFT: enc = motor_lift_.getCurrentPosition(); break; default: break; } last_motor_read_loop_id_ = loop_cnt_ ; return enc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface EncoderMotor extends Motor {\n double getVelocity();\n double getVelocityRaw();\n double setVelocity(double speed);\n double getDistance();\n void resetDistance();\n @Override\n EncoderMotor setInverted(boolean inverted);\n @Override\n EncoderMotor invert();\n\n void ...
[ "0.66997236", "0.65084606", "0.6447973", "0.6363463", "0.6350608", "0.630096", "0.62849236", "0.6158026", "0.609505", "0.6062526", "0.6038672", "0.60381645", "0.60143626", "0.59867144", "0.5907038", "0.58986527", "0.5875822", "0.585832", "0.58506066", "0.57561", "0.5732597", ...
0.7494503
0
/ Return motor velocity value; TBD
double getMotorVelocity( MotorName m ) { double vol = 0.0; if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) { // Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle for( LynxModule module : all_hubs_ ) { module.clearBulkCache(); } } switch ( m ) { case MOTOR_LF: vol = motorLF_.getVelocity(); break; case MOTOR_LB: vol = motorLB_.getVelocity(); break; case MOTOR_RF: vol = motorRF_.getVelocity(); break; case MOTOR_RB: vol = motorRB_.getVelocity(); break; case MOTOR_LEFT_INTAKE: vol = motor_left_intake_.getVelocity(); break; case MOTOR_RIGHT_INTAKE: vol = motor_right_intake_.getVelocity(); break; case MOTOR_LIFT: vol = motor_lift_.getVelocity(); break; default: break; } last_motor_read_loop_id_ = loop_cnt_ ; return vol; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getVelocity() {\n return mV;\n }", "private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (curren...
[ "0.8315803", "0.8267917", "0.8049826", "0.80319786", "0.8019438", "0.78662384", "0.77871865", "0.77586", "0.77292097", "0.7710891", "0.7681434", "0.7679158", "0.7674676", "0.76695734", "0.76642114", "0.76638937", "0.76244247", "0.7611784", "0.7597179", "0.7589497", "0.7532636...
0.83331007
0
/ Determine wether a reading from a REV 2M range sensor is valid
boolean isValidRangeReading(double dist) { return ( !Double.isNaN(dist) && dist>MIN_RANGE_DIST && dist<MAX_RANGE_DIST ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isRangeValid()\n {\n return isRangeValid(((AnalogInput)m_echoChannel).getVoltage());\n }", "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFo...
[ "0.6911012", "0.6320528", "0.61640865", "0.60818064", "0.59708834", "0.5968603", "0.5944124", "0.5802985", "0.5696367", "0.5692179", "0.56637317", "0.55873567", "0.55677086", "0.55557525", "0.5534938", "0.5524301", "0.550979", "0.5501948", "0.54913896", "0.54819405", "0.54686...
0.66414714
1
/ Return reading for a given range sensor in meters
double getRangeDist( RangeName r ) { double dis = 0.0; double period = 1.0/MAX_RANGE_READ_FREQ ; // dflt 10Hz => one read per 100ms last_range_read_failed_ = false; switch ( r ) { case RGB_RANGE_STONE : if( rgb_range_stone_ != null ) { if( (last_rgb_range_stone_read_loop_id_ == loop_cnt_) || (last_rgb_range_stone_read_time_>0 && curr_time_-last_rgb_range_stone_read_time_<period) ) { dis = rgb_range_stone_dist_; } else { dis = rgb_range_stone_.getDistance( DistanceUnit.METER ); if( isValidRangeReading(dis) ) { last_rgb_range_stone_read_loop_id_ = loop_cnt_; last_rgb_range_stone_read_time_ = curr_time_; rgb_range_stone_dist_ = dis; last_range_failed_read_time_ = 0.0; } else { // invalid reading, use the last value dis = rgb_range_stone_dist_; last_range_read_failed_ = true; last_range_failed_read_time_ = curr_time_; } } } break; case RANGE_STONE : if( range_stone_ != null ) { if( (last_range_stone_read_loop_id_ == loop_cnt_) || (last_range_stone_read_time_>0 && curr_time_-last_range_stone_read_time_<period) ) { dis = range_stone_dist_; } else { dis = range_stone_.getDistance( DistanceUnit.METER ); if( isValidRangeReading(dis) ) { last_range_stone_read_loop_id_ = loop_cnt_; last_range_stone_read_time_ = curr_time_; range_stone_dist_ = dis; last_range_failed_read_time_ = 0.0; } else { // invalid reading, use the last value dis = range_stone_dist_; last_range_read_failed_ = true; last_range_failed_read_time_ = curr_time_; } } } break; case RANGE_RIGHT : if( range_right_ != null ) { if( (last_range_right_read_loop_id_ == loop_cnt_) || (last_range_right_read_time_>0 && curr_time_-last_range_right_read_time_<period) ) { dis = range_right_dist_; } else { dis = range_right_.getDistance( DistanceUnit.METER ); if( isValidRangeReading(dis) ) { last_range_right_read_loop_id_ = loop_cnt_; last_range_right_read_time_ = curr_time_; range_right_dist_ = dis; last_range_failed_read_time_ = 0.0; } else { // invalid reading, use the last value dis = range_right_dist_ ; last_range_read_failed_ = true; last_range_failed_read_time_ = curr_time_; } } } break; case RANGE_LEFT : if( range_left_ != null ) { if( (last_range_left_read_loop_id_ == loop_cnt_) || (last_range_left_read_time_>0 && curr_time_-last_range_left_read_time_<period) ) { dis = range_left_dist_; } else { dis = range_left_.getDistance( DistanceUnit.METER ); if( isValidRangeReading(dis) ) { last_range_left_read_loop_id_ = loop_cnt_; last_range_left_read_time_ = curr_time_; range_left_dist_ = dis; last_range_failed_read_time_ = 0.0; } else { // invalid reading, use the last value dis = range_left_dist_ ; last_range_read_failed_ = true; last_range_failed_read_time_ = curr_time_; } } } break; default: break; } return dis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRange(){\r\n\t\t uSensor.ping();\r\n\t\t return uSensor.getRangeInches();\r\n\t\t}", "public double getRangeInches(){\r\n\t\t return uSensor.getRangeInches();\r\n\t\t}", "public double getRangeInches()\n {\n if (isRangeValid())\n {\n\n double currentInches ...
[ "0.7699395", "0.68780094", "0.64465445", "0.6437907", "0.6343056", "0.63048023", "0.62599176", "0.6175859", "0.61083496", "0.59631294", "0.59310746", "0.57749355", "0.5730967", "0.57092196", "0.5693246", "0.5650654", "0.56499517", "0.56245977", "0.5617294", "0.5604232", "0.55...
0.6353436
4
you need to treat n as an unsigned value
public int hammingWeight(int n) { int answer = 0; while (n != 0) { n = n & (n - 1); answer++; } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long u(int n)\r\n\t{\r\n\t\tlong result = 0;\r\n\t\tlong current = 1;\r\n\t\tfor (int i = 0; i <= 10; i++)\r\n\t\t{\r\n\t\t\tif (i % 2 == 0)\r\n\t\t\t{\r\n\t\t\t\tresult += current;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tresult -= current;\r\n\t\t\t}\r\n\t\t\tcurrent *= n;\r\n\t\t}\r\n\r\n\t\...
[ "0.6894156", "0.64915156", "0.6461783", "0.6457394", "0.6421934", "0.6393902", "0.63731056", "0.63393265", "0.6307983", "0.6253979", "0.62502784", "0.6173648", "0.6166564", "0.6139457", "0.6130086", "0.612781", "0.6102054", "0.607891", "0.60733235", "0.6046902", "0.6046623", ...
0.0
-1
This method gets called when home button is pressed and app goes to background. We need to send adobe hits when app goes to background. When home button is pressed system calls this method with ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN and that's when we create Async task to make server call and push all queued tags to file.
@Override public void onTrimMemory(int level) { if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) { // We're in the Background Log.d(TAG, "BaseApplication::ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN : App went to background. "); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onTrimMemory(int level) {\n if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {\n// Log.d(TAG, \"APP in BACKGROUND\");\n Timber.i(\"APP in BACKGROUND\");\n status = ApplicationBackgroundStatus.BACKGROUND;\n sendNewStatus();\n ...
[ "0.6587777", "0.6334298", "0.5890152", "0.58828634", "0.58302987", "0.58120084", "0.58046585", "0.5754282", "0.5741867", "0.5738933", "0.5732398", "0.5712446", "0.57001126", "0.5674278", "0.5668966", "0.56637555", "0.56593937", "0.5654182", "0.56531227", "0.5629431", "0.56139...
0.6562261
1
Upload multiple files to s3
public List<PutObjectResult> upload(MultipartFile[] multipartFiles) { List<PutObjectResult> putObjectResults = new ArrayList<>(); Arrays.stream(multipartFiles) .filter(multipartFile -> !StringUtils.isEmpty(multipartFile.getOriginalFilename())) .forEach(multipartFile -> { try { putObjectResults.add(upload(multipartFile, multipartFile.getOriginalFilename())); } catch (IOException e) { e.printStackTrace(); } }); return putObjectResults; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> uploadMultipleFilesFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean ...
[ "0.68929493", "0.6562413", "0.6423676", "0.64081854", "0.6163465", "0.6144629", "0.60927224", "0.60516447", "0.60450953", "0.5846973", "0.58461344", "0.58410084", "0.58089256", "0.57788444", "0.5778467", "0.57706517", "0.56046164", "0.55965173", "0.55279666", "0.54816103", "0...
0.6338094
4
Converts a multipartfile into an input stream for s3 and uploads to s3. Also forms the minimum amount of metadata for the s3 object.
public PutObjectResult upload(MultipartFile multipartFile, String uploadKey) throws IOException { InputStream inputStream = multipartFile.getInputStream(); ObjectMetadata metadata = new ObjectMetadata(); metadata.setContentLength(multipartFile.getSize()); metadata.setContentType(multipartFile.getContentType()); return upload(inputStream, uploadKey, metadata); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void multipartUpload(File file, String bucketName) throws IOException {\r\n\t\tlong size = file.length();\r\n\t\ts3 = S3Client.builder().region(region).build();\r\n\t\t// First create a multipart upload and get upload id\r\n\t\tCreateMultipartUploadRequest createMultipartUploadRequest = CreateMultip...
[ "0.63553864", "0.62337786", "0.6097805", "0.6094613", "0.5967084", "0.5574816", "0.55452204", "0.55143666", "0.534648", "0.5344876", "0.53184634", "0.5285713", "0.5187639", "0.5154498", "0.51164365", "0.50472194", "0.50179183", "0.4979639", "0.49488342", "0.49210122", "0.4911...
0.5894997
5
Takes an input stream, upload key, and object metadata to upload an object to s3.
public PutObjectResult upload(InputStream inputStream, String uploadKey, ObjectMetadata metadata) { PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, uploadKey, inputStream, metadata); putObjectRequest.setCannedAcl(CannedAccessControlList.PublicRead); PutObjectResult putObjectResult = s3Client.putObject(putObjectRequest); IOUtils.closeQuietly(inputStream); return putObjectResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String putObject(InputStream in, String fileName, String id)\n {\n File f;\n MimetypesFileTypeMap mimetypesFileTypeMap = new MimetypesFileTypeMap();\n try\n {\n logger.info(\"run in the putObject1 try block\");\n ObjectMetadata ObjectMetadata = new Object...
[ "0.67306197", "0.6688462", "0.6555802", "0.6284709", "0.6239124", "0.6093423", "0.6082729", "0.60605055", "0.6054409", "0.5986647", "0.59125113", "0.5844135", "0.5834481", "0.5803336", "0.57518786", "0.5745306", "0.5742776", "0.5742252", "0.57325125", "0.5719234", "0.57015747...
0.7905324
0
Download an s3 image by key
public ResponseEntity<byte[]> download(String key) throws IOException { GetObjectRequest getObjectRequest = new GetObjectRequest(bucketName, key); S3Object s3Object = s3Client.getObject(getObjectRequest); S3ObjectInputStream objectInputStream = s3Object.getObjectContent(); byte[] bytes = IOUtils.toByteArray(objectInputStream); String fileName = URLEncoder.encode(key, "UTF-8").replaceAll("\\+", "%20"); HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_OCTET_STREAM); httpHeaders.setContentLength(bytes.length); httpHeaders.setContentDispositionFormData("attachment", fileName); return new ResponseEntity<>(bytes, httpHeaders, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] download(String path,String key) {\n try{\n S3Object object= s3.getObject(path,key);\n S3ObjectInputStream inputStream=object.getObjectContent();\n return IOUtils.toByteArray(inputStream);\n }catch(AmazonServiceException |IOException e){\n throw new IllegalStateException(\"Fail...
[ "0.7524742", "0.7005817", "0.7005064", "0.66591626", "0.64015484", "0.624499", "0.61612874", "0.60408455", "0.6016892", "0.5977459", "0.5817764", "0.5683877", "0.5577554", "0.55450165", "0.55345714", "0.5512936", "0.54805374", "0.54563445", "0.5367819", "0.534913", "0.5331796...
0.7472201
1
Lists the contents for a bucket
public List<S3ObjectSummary> list() { ObjectListing objectListing = s3Client.listObjects(new ListObjectsRequest().withBucketName(bucketName)); return objectListing.getObjectSummaries(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ListMyBuckets(String bucketName) {\n List<Bucket> buckets = s3.listBuckets();\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Bucket \"+bucketName+\" contents are as below:\");\n\n for (Bucket b : buckets) {\n Syste...
[ "0.7611348", "0.70719635", "0.7018117", "0.7006049", "0.68136543", "0.6765361", "0.656247", "0.6546688", "0.62479055", "0.618286", "0.61707824", "0.61442536", "0.61308235", "0.611786", "0.61135274", "0.6111344", "0.6032075", "0.59918314", "0.5968005", "0.59616053", "0.5952114...
0.6228581
9
Delete an object from s3
public void delete(String bucketName, String s3key) { s3Client.deleteObject(bucketName, s3key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}", "public com.amazon.s3.DeleteObjectResponse deleteObject(com.amazon.s3.DeleteObject deleteObject);", "void deleteObject(ProjectUser projectUser, String bucketName, String objectName);", "public void s3delete(String bucketName, String fi...
[ "0.799243", "0.78376853", "0.7475522", "0.7402168", "0.70680565", "0.6946029", "0.6923326", "0.6905439", "0.6640443", "0.65961456", "0.6565584", "0.6511293", "0.6472653", "0.64671844", "0.64152163", "0.6367721", "0.6344265", "0.62799555", "0.6268047", "0.6266962", "0.6230561"...
0.6785935
8
Get byte array of exception message in standard character set encoding format
private byte[] getExceptionMessageByte(String message) { return message.getBytes(StandardCharsets.UTF_8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] errorMessageAsBytes()\n {\n final int len = errorStringLength();\n final byte[] bytes = new byte[len];\n\n buffer().getBytes(errorMessageOffset(), bytes, 0, len);\n\n return bytes;\n }", "public String[] getEncoding() throws PDFNetException {\n/* 771 */ return...
[ "0.6837976", "0.6215173", "0.61990726", "0.6171405", "0.6112117", "0.6112117", "0.61107993", "0.60949045", "0.6093534", "0.60464793", "0.59640175", "0.5855667", "0.5814543", "0.5814543", "0.5814543", "0.5814543", "0.5814543", "0.5814543", "0.5814543", "0.5814543", "0.5814543"...
0.8052352
0
Costruttore di ManagerSistema, chiama il costruttore della superclasse Utente
public ManagerSistema(String codiceFiscale, String nome, String cognome, String indirizzo, Date dataNascita, String telefono, String email, String password, Sbu sbu ){ super(codiceFiscale, nome, cognome, indirizzo, dataNascita, telefono, email, password); sbu.setManager(this); this.sbuGestito = sbu; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Sistema(){\r\n\t\t\r\n\t}", "@Override\n public GenericManager<Societe, Long> getManager() {\n return manager;\n }", "@Override\r\n public GenericManager<TraitSalaire, Long> getManager() {\r\n return manager;\r\n }", "public interface Manager {\n\n}", "public interface Avan...
[ "0.6975711", "0.69054323", "0.65142924", "0.6409977", "0.62668246", "0.6259077", "0.62399644", "0.61906606", "0.61505467", "0.60995185", "0.6086694", "0.60562485", "0.6030426", "0.5995495", "0.59314865", "0.5927859", "0.5924195", "0.5917739", "0.59074086", "0.5904429", "0.588...
0.6667602
2
Once table is done being cleaned, can be ready again.
public void IsReady() { System.out.println("Table now ready for customers."); table.setState(table.GetReady()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}", "@Override\n\tpublic void cleanUp() {\n\t\t table = null;\n colFam = null;\n currentEvent = null;\n\t}", "public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\...
[ "0.80918455", "0.7913601", "0.7767223", "0.7444153", "0.73300064", "0.7286408", "0.725714", "0.72171116", "0.710915", "0.71028006", "0.70824414", "0.70801324", "0.7018833", "0.70097226", "0.69002736", "0.68767935", "0.6867742", "0.68044955", "0.67845166", "0.67599833", "0.675...
0.0
-1
Does nothing, table can't be in use if being cleaned
public void IsInUse() { System.out.println("Table being cleaned, cannot be used."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}", "public void IsBeingCleaned() {\n\t\tSystem.out.println(\"Table already being cleaned.\");\n\t}", "public void cleanTable() throws ClassicDatabaseException;", "public void clean() {\r\n\t\t\r\n\t\tlogger.t...
[ "0.79036516", "0.6951331", "0.69013995", "0.66975856", "0.65399283", "0.6465537", "0.6454295", "0.644326", "0.6436119", "0.6398127", "0.631666", "0.629799", "0.6255274", "0.62355727", "0.6229365", "0.620801", "0.6139047", "0.6079714", "0.60723346", "0.60721624", "0.6044304", ...
0.74058557
1
Does nothing, table already being cleaned.
public void DoesNeedCleaning() { System.out.println("Table is being cleaned right now."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}", "public void cleanTable() throws ClassicDatabaseException;", "@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\...
[ "0.7450564", "0.7442357", "0.74261236", "0.7287264", "0.7218668", "0.72111017", "0.7178828", "0.7139042", "0.70488447", "0.70182806", "0.7014537", "0.7009022", "0.7007474", "0.69839156", "0.6920092", "0.6884191", "0.68804395", "0.68117464", "0.68071157", "0.67947525", "0.6792...
0.8102467
0
Does nothing, table already being cleaned.
public void IsBeingCleaned() { System.out.println("Table already being cleaned."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}", "public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}", "public void cleanTable(...
[ "0.8102467", "0.7450564", "0.7442357", "0.74261236", "0.7218668", "0.72111017", "0.7178828", "0.7139042", "0.70488447", "0.70182806", "0.7014537", "0.7009022", "0.7007474", "0.69839156", "0.6920092", "0.6884191", "0.68804395", "0.68117464", "0.68071157", "0.67947525", "0.6792...
0.7287264
4
Created by Galaxy on 2018/5/10.
public interface CatagoryApiService { @GET("product/getCatagory") Observable<CatagoryBean> getCatagory(); }
{ "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}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpubl...
[ "0.6063219", "0.5932152", "0.5819805", "0.57389456", "0.57375443", "0.5705483", "0.5698441", "0.5698441", "0.5585669", "0.558176", "0.5567788", "0.55595255", "0.55492735", "0.5548538", "0.5530581", "0.55138195", "0.55138195", "0.55138195", "0.55138195", "0.55138195", "0.55138...
0.0
-1
This repository extends JpaRepository in which custom methods are declared depending upon our requirements
public interface MailRepository extends JpaRepository<Mail,Long> { List<Mail> findByToAddressAndType(String to,String type); List<Mail> findByFromAddressAndType(String from, String type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PersonRepository extends JpaRepository<Person, Long>, PersonRepositoryQuery {\n}", "public interface TypeRepositoryCustom extends JpaRepository<Type, Long> {\n\n}", "@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n //implementation will be provided to run...
[ "0.7723051", "0.7663435", "0.76127166", "0.7567485", "0.7551307", "0.7546734", "0.75288373", "0.74666846", "0.74663436", "0.7459811", "0.7458546", "0.7447868", "0.7436165", "0.7433882", "0.742965", "0.7423049", "0.7419182", "0.7419091", "0.7415033", "0.7406766", "0.7402544", ...
0.0
-1
Check path (without adding source prefix and with filename). Path example: src\main\java\com\samsungsds\Test.java
boolean haveToSkip(String path);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSrcPath();", "java.lang.String getSrcPath();", "private static boolean isJava8File(Path path) {\n var name = Paths.name(path);\n return !path.startsWith(\".bach\") // ignore all files in `.bach` directory\n && name.endsWith(\".java\")\n && !name.equals(\"module-info.java\") // ig...
[ "0.65950245", "0.62231565", "0.6211565", "0.6174249", "0.59620845", "0.5957535", "0.59339774", "0.59036523", "0.5742492", "0.5741215", "0.5741129", "0.5733809", "0.5712452", "0.56858844", "0.5664457", "0.56529856", "0.5627831", "0.5619623", "0.56187826", "0.55969656", "0.5589...
0.0
-1
Check path including specifying whether to add source prefix (with filename). Path example (w/ addSrcPrefix is true) : com\samsungsds\Test.java
boolean haveToSkip(String path, boolean addSrcPrefix);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSrcPath();", "boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename);", "public boolean startsWith(FilePath prefix) {\n return startsWith(prefix.path);\n }", "private boolean isOnSourcePath(String sourceFile, List<String> sourcePath) {\n\t\tfor (Iterator<String> j...
[ "0.69345814", "0.6725618", "0.6377191", "0.6370975", "0.62491465", "0.6219092", "0.60398465", "0.59361917", "0.5925745", "0.5915313", "0.58631164", "0.5847386", "0.58310395", "0.58092904", "0.5720646", "0.56531405", "0.5556754", "0.5486565", "0.5470812", "0.5470305", "0.54504...
0.71196616
0
Check path including specifying whether to add source prefix and whether to have filename. When checked, "/.java" is added on the matching pattern. Path example (w/ addSrcPrefix is true and w/o filename) : com\samsungsds\.java
boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean haveToSkip(String path, boolean addSrcPrefix);", "boolean hasSrcPath();", "boolean matchStart(String pattern, String path);", "private boolean isOnSourcePath(String sourceFile, List<String> sourcePath) {\n\t\tfor (Iterator<String> j = sourcePath.iterator(); j.hasNext();) {\n\t\t\tString srcPathEntry ...
[ "0.67475474", "0.65094227", "0.6169538", "0.6119068", "0.59838367", "0.58225477", "0.57495654", "0.5741806", "0.56921166", "0.5620204", "0.560377", "0.5585356", "0.5575052", "0.5558078", "0.5527827", "0.5485589", "0.5476652", "0.5399457", "0.52938104", "0.52682257", "0.525358...
0.6524453
1
Creates new form CadastroClientes
public CadastroClientes() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Erro...
[ "0.7275531", "0.7266275", "0.718576", "0.6924039", "0.6886174", "0.6885299", "0.68845433", "0.68797", "0.68699944", "0.6851693", "0.6818975", "0.68183494", "0.6790712", "0.6733143", "0.6732026", "0.6700387", "0.66907334", "0.666779", "0.6654046", "0.6645837", "0.6645837", "...
0.7230605
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() { jPanel7 = new javax.swing.JPanel(); Cadastros01_campo_senha = new javax.swing.JLabel(); Cadastros01_txtcampo_senha = new javax.swing.JTextField(); Cadastros01_campo_data_admissao = new javax.swing.JLabel(); Cadastros01_campo_data_demissao = new javax.swing.JLabel(); Cadastros01_txtcampo_data_admissao = new javax.swing.JFormattedTextField(); jFormattedTextField3 = new javax.swing.JFormattedTextField(); jPanel4 = new javax.swing.JPanel(); Cadastros01_txtcampo_profissao = new javax.swing.JTextField(); Cadastros01_campo_profissao = new javax.swing.JLabel(); Cadastros01_txtcampo_numero_socio = new javax.swing.JTextField(); Cadastros01_campo_numero_socio = new javax.swing.JLabel(); Cadastros01_txtcampo_CPF = new javax.swing.JTextField(); Cadastros01_txtcampo_email = new javax.swing.JTextField(); Cadastros01_campo_CPF = new javax.swing.JLabel(); Cadastros01_txtcampo_idade = new javax.swing.JTextField(); Cadastros01_campo_idade = new javax.swing.JLabel(); Cadastros01_campo_telefone = new javax.swing.JLabel(); Cadastros01_campo_estado_civil = new javax.swing.JComboBox(); Cadastros01_campo_sexo = new javax.swing.JComboBox(); Cadastros01_campo_email = new javax.swing.JLabel(); Cadastros01_campo_nome = new javax.swing.JLabel(); Cadastros01_txtcampo_nome = new javax.swing.JTextField(); Cadastros01_campo_especificacao_do_socio = new javax.swing.JLabel(); Cadastros01_txtcampo_especificacao_do_socio = new javax.swing.JTextField(); Cadastros01_txtcampo_telefone = new javax.swing.JFormattedTextField(); Cadastros01_campo_botao_limpar = new javax.swing.JButton(); Cadastros01_campo_botao_finalizar_cadastro = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); Cadastros01_campo_cidade = new javax.swing.JLabel(); Cadastros01_campo_bairro = new javax.swing.JLabel(); Cadastros01_campo_estados_brasileiros = new javax.swing.JComboBox(); Cadastros01_campo_rua = new javax.swing.JLabel(); Cadastros01_txtcampo_cidade = new javax.swing.JTextField(); Cadastros01_txtcampo_bairro = new javax.swing.JTextField(); Cadastros01_txtcampo_rua = new javax.swing.JTextField(); Cadastros01_campo_CEP = new javax.swing.JLabel(); Cadastros01_txtcampo_CEP = new javax.swing.JFormattedTextField(); Cadastros01_campo_botao_sair = new javax.swing.JButton(); Cadastros01_campo_confirmação = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); Cadastros01_txtcampo_telefone1 = new javax.swing.JFormattedTextField(); jLabel4 = new javax.swing.JLabel(); jTextField3 = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jTextField4 = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jTextField5 = new javax.swing.JTextField(); jComboBox1 = new javax.swing.JComboBox(); jLabel7 = new javax.swing.JLabel(); jFormattedTextField1 = new javax.swing.JFormattedTextField(); jLabel14 = new javax.swing.JLabel(); jComboBox3 = new javax.swing.JComboBox(); jPanel2 = new javax.swing.JPanel(); jLabel8 = new javax.swing.JLabel(); jTextField6 = new javax.swing.JTextField(); Cadastros01_campo_estados_brasileiros1 = new javax.swing.JComboBox(); Cadastros01_txtcampo_CEP1 = new javax.swing.JFormattedTextField(); Cadastros01_txtcampo_bairro1 = new javax.swing.JTextField(); Cadastros01_campo_CEP1 = new javax.swing.JLabel(); Cadastros01_txtcampo_rua1 = new javax.swing.JTextField(); Cadastros01_campo_bairro1 = new javax.swing.JLabel(); Cadastros01_campo_rua1 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jTextField7 = new javax.swing.JTextField(); jPanel5 = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); jTextField8 = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jTextField9 = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); jTextField10 = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jComboBox2 = new javax.swing.JComboBox(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Associado")); Cadastros01_campo_senha.setText("Senha:"); Cadastros01_campo_data_admissao.setText("Data de emissão:"); Cadastros01_campo_data_demissao.setText("Data de demissão:"); try { Cadastros01_txtcampo_data_admissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } try { jFormattedTextField3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(Cadastros01_campo_senha) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_senha, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup() .addComponent(Cadastros01_campo_data_admissao) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Cadastros01_txtcampo_data_admissao)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup() .addComponent(Cadastros01_campo_data_demissao) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_senha) .addComponent(Cadastros01_txtcampo_senha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(9, 9, 9) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_data_admissao) .addComponent(Cadastros01_txtcampo_data_admissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_data_demissao) .addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 17, Short.MAX_VALUE)) ); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Informações pessoais")); Cadastros01_txtcampo_profissao.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Cadastros01_txtcampo_profissaoActionPerformed(evt); } }); Cadastros01_campo_profissao.setText("Profissão:"); Cadastros01_txtcampo_numero_socio.setBackground(new java.awt.Color(204, 204, 204)); Cadastros01_campo_numero_socio.setText("N° socio:"); Cadastros01_campo_CPF.setText("CPF:"); Cadastros01_txtcampo_idade.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Cadastros01_txtcampo_idadeActionPerformed(evt); } }); Cadastros01_campo_idade.setText("Idade:"); Cadastros01_campo_telefone.setText("Telefone:"); Cadastros01_campo_estado_civil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estado Civil", "Solteiro", "Casado" })); Cadastros01_campo_sexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sexo", "Feminino", "Masculino" })); Cadastros01_campo_email.setText("Email:"); Cadastros01_campo_nome.setText("Nome:"); Cadastros01_campo_especificacao_do_socio.setText("Especificação do sócio:"); try { Cadastros01_txtcampo_telefone.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_especificacao_do_socio) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_especificacao_do_socio)) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_profissao) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_profissao)) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_email) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_email)) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_telefone) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_campo_CPF) .addGap(3, 3, 3) .addComponent(Cadastros01_txtcampo_CPF, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_nome) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_nome, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_numero_socio) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_numero_socio, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Cadastros01_campo_idade) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_idade, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(Cadastros01_campo_estado_civil, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(Cadastros01_campo_sexo, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Cadastros01_txtcampo_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_nome, javax.swing.GroupLayout.Alignment.TRAILING)) .addGap(11, 11, 11) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_idade) .addComponent(Cadastros01_txtcampo_idade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_numero_socio) .addComponent(Cadastros01_txtcampo_numero_socio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(Cadastros01_campo_sexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(11, 11, 11) .addComponent(Cadastros01_campo_estado_civil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_telefone) .addComponent(Cadastros01_campo_CPF) .addComponent(Cadastros01_txtcampo_CPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_txtcampo_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_profissao) .addComponent(Cadastros01_txtcampo_profissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_txtcampo_email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_email)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_especificacao_do_socio) .addComponent(Cadastros01_txtcampo_especificacao_do_socio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); Cadastros01_campo_botao_limpar.setText("Limpar"); Cadastros01_campo_botao_limpar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Cadastros01_campo_botao_limparActionPerformed(evt); } }); Cadastros01_campo_botao_finalizar_cadastro.setText("Finalizar Cadastro"); Cadastros01_campo_botao_finalizar_cadastro.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Cadastros01_campo_botao_finalizar_cadastroActionPerformed(evt); } }); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Endereço")); Cadastros01_campo_cidade.setText("Cidade:"); Cadastros01_campo_bairro.setText("Bairro:"); Cadastros01_campo_estados_brasileiros.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estados Brasileiros", "AC- Acre ", "AL- Alagoas ", "AP- Amapá \t", "AM- Amazonas \t", "BA- Bahia\t", "CE- Ceará \t", "DF- Distrito Federal \t", "ES- Espírito Santo ", "GO- Goiás ", "MA- Maranhão \t", "MT-Mato Grosso \t", "MS- Mato Grosso do Sul \t \t", "MG- Minas Gerais \t", "PR- Paraná ", "PA- Pará \t", "PE- Pernambuco", "PI- Piauí \t", "RJ- Rio de Janeiro \t", "RN- Rio Grande do Norte \t", "RS- Rio Grande do Sul \t", "RO- Rondonia \t", "RR- Roraima \t", "SC- Santa Catarina \t", "SE- Sergipe \t", "SP- São Paulo \t", "TO- Tocantins \t", " " })); Cadastros01_campo_rua.setText("Rua:"); Cadastros01_campo_CEP.setText("CEP:"); try { Cadastros01_txtcampo_CEP.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(Cadastros01_campo_cidade) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_cidade, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(Cadastros01_campo_rua) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_rua))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(Cadastros01_campo_estados_brasileiros, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(Cadastros01_campo_CEP) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_CEP))) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(Cadastros01_campo_bairro) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_bairro)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_cidade) .addComponent(Cadastros01_txtcampo_cidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_estados_brasileiros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_rua) .addComponent(Cadastros01_txtcampo_rua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_CEP) .addComponent(Cadastros01_txtcampo_CEP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_bairro) .addComponent(Cadastros01_txtcampo_bairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); Cadastros01_campo_botao_sair.setText("Sair"); Cadastros01_campo_botao_sair.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Cadastros01_campo_botao_sairActionPerformed(evt); } }); Cadastros01_campo_confirmação.setForeground(new java.awt.Color(255, 0, 0)); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados pessoais")); jLabel1.setText("Nome:"); jLabel2.setText("Idade:"); jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField2ActionPerformed(evt); } }); jLabel3.setText("Telefone:"); try { Cadastros01_txtcampo_telefone1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } jLabel4.setText("CPF:"); jLabel5.setText("Registo geral:"); jTextField4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField4ActionPerformed(evt); } }); jLabel6.setText("Código"); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sexo", "Masculino", "Feminino" })); jLabel7.setText("Data de nascimento:"); try { jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } jLabel14.setText("Status:"); jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ativo", "Desativo" })); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField1)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(10, 10, 10) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel14) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_telefone1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap(25, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(4, 4, 4) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6) .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5) .addComponent(jLabel3) .addComponent(Cadastros01_txtcampo_telefone1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7) .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel14) .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Endereço")); jLabel8.setText("Cidade:"); Cadastros01_campo_estados_brasileiros1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estados Brasileiros", "AC- Acre ", "AL- Alagoas ", "AP- Amapá \t", "AM- Amazonas \t", "BA- Bahia\t", "CE- Ceará \t", "DF- Distrito Federal \t", "ES- Espírito Santo ", "GO- Goiás ", "MA- Maranhão \t", "MT-Mato Grosso \t", "MS- Mato Grosso do Sul \t \t", "MG- Minas Gerais \t", "PR- Paraná ", "PA- Pará \t", "PE- Pernambuco", "PI- Piauí \t", "RJ- Rio de Janeiro \t", "RN- Rio Grande do Norte \t", "RS- Rio Grande do Sul \t", "RO- Rondonia \t", "RR- Roraima \t", "SC- Santa Catarina \t", "SE- Sergipe \t", "SP- São Paulo \t", "TO- Tocantins \t", " " })); try { Cadastros01_txtcampo_CEP1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } Cadastros01_campo_CEP1.setText("CEP:"); Cadastros01_campo_bairro1.setText("Bairro:"); Cadastros01_campo_rua1.setText("Rua:"); jLabel9.setText("Logradouro:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel9) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField7)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(Cadastros01_campo_CEP1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Cadastros01_txtcampo_CEP1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_campo_bairro1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_txtcampo_bairro1, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel8) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Cadastros01_campo_estados_brasileiros1, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(Cadastros01_campo_rua1) .addGap(18, 18, 18) .addComponent(Cadastros01_txtcampo_rua1))) .addGap(29, 29, 29)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_estados_brasileiros1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_rua1) .addComponent(Cadastros01_txtcampo_rua1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cadastros01_campo_CEP1) .addComponent(Cadastros01_txtcampo_CEP1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Cadastros01_campo_bairro1) .addComponent(Cadastros01_txtcampo_bairro1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Fisico")); jLabel10.setText("Altura:"); jLabel11.setText("Peso:"); jLabel12.setText("Modalidade:"); jLabel13.setText("Professor:"); jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Masculino", "Feminino" })); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel10) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel11) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel12) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel13) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10) .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11) .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jButton1.setText("Confirmar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText("Alterar"); jButton3.setText("Sair"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jButton4.setText("Deletar"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jButton1) .addGap(18, 18, 18) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2) .addComponent(jButton3) .addComponent(jButton4)) .addContainerGap(20, Short.MAX_VALUE)) ); pack(); setLocationRelativeTo(null); }
{ "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
return the fake first and last name
public static String getRandomName() { Faker faker = new Faker(); return faker.name().fullName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFirstName();", "java.lang.String getFirstName();", "public java.lang.String getFirstName();", "String getFirstName();", "String getFirstName();", "String getFirstName();", "public void getFirstAndLastName( String name ){//\r\n String nameNew = name.trim();\r\n String[]...
[ "0.7863742", "0.7863742", "0.75288975", "0.7366979", "0.7366979", "0.7366979", "0.7311014", "0.7239343", "0.71181947", "0.70883083", "0.7085426", "0.7036164", "0.7016397", "0.7003103", "0.7003103", "0.6999311", "0.69915074", "0.6939218", "0.69373643", "0.69161516", "0.6909301...
0.0
-1
return the random string. kasfdhjashkdfa
public static String getRandomString() { return RandomStringUtils.random(20, true, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.ap...
[ "0.8431612", "0.840824", "0.82443154", "0.82423484", "0.81162655", "0.80148476", "0.7936699", "0.79353774", "0.79129034", "0.7756246", "0.7703269", "0.7604436", "0.7597746", "0.7586239", "0.75827205", "0.75714654", "0.7562352", "0.75211585", "0.7488371", "0.74769074", "0.7461...
0.7893983
9
. Constructor CompositePersonne qu'inisialise
public CompositePersonne() { this.nomGroupe = " "; this.personnel = new ArrayList<InterfacePersonne>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Composite() {\n\n\t}", "public CompositeData()\r\n {\r\n }", "private Composite() {\n }", "@Test\r\n public void testComposite() {\r\n \r\n Leaf pers1 = new Leaf(\"Tracy\");\r\n Leaf pers2 = new Leaf(\"JR\");\r\n Leaf pers3 = new Leaf(\"Simon\");\r\n \r\n ...
[ "0.6692495", "0.6684572", "0.6360449", "0.6305765", "0.61825323", "0.61706245", "0.61706245", "0.6074302", "0.60505486", "0.60414183", "0.5999988", "0.5977437", "0.59508", "0.5942393", "0.5911422", "0.59063864", "0.5889531", "0.5883638", "0.5827642", "0.5820994", "0.5813224",...
0.83206946
0
Permet d'affiche le nom de groupe , ainsi que la liste des personnels.
public final void print() { System.out.println("Le nom du groupe est : " + this.nomGroupe); for (InterfacePersonne per : personnel) { per.print(); // Delegation } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getListaGrupos () {\n String nomesGruposList = \"\";\n if(this.conversas != null && this.conversas.size() > 0){\n for(int i = 0; i < this.conversas.size(); i++){\n //nomesGruposList += conversas.get(i).nomeGrupo + \" \";\n }\n }\n retur...
[ "0.6940802", "0.6795439", "0.678634", "0.6702712", "0.6628862", "0.6540683", "0.6522523", "0.6432106", "0.62828404", "0.6265367", "0.6258177", "0.6222148", "0.620926", "0.6195825", "0.6193027", "0.6164861", "0.6128947", "0.6105427", "0.6063183", "0.60406655", "0.6010792", "...
0.6276884
9
Elle ajoute un personnel per dans la liste des personnels.
public final void add(final InterfacePersonne per) { System.out.println(this.personnel.contains(per)); personnel.add(per); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addPersonnageToGame() throws PersonnageOnMultipleJoueurException {\n\t\t\n\t\t// liste de personnage venant d'un joueur\n\t\tList<Personnage> listePersonnageFromJoueur;\n\t\t\n\t\t// liste venant de TurnManager, qui représente la totalité des personnages\n\t\tList<Personnage> listePersonnageFromTurnMa...
[ "0.68407375", "0.6644866", "0.6561706", "0.6442365", "0.6403332", "0.6320113", "0.62359244", "0.614474", "0.61091524", "0.6102655", "0.60908407", "0.6086864", "0.6046274", "0.5987418", "0.5986418", "0.59406585", "0.58483416", "0.5842382", "0.58339405", "0.5816637", "0.5816161...
0.7075983
0
Retourne le nom de groupe.
public final String getNomGroupe() { return this.nomGroupe; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getGroupe() {\r\n return groupe;\r\n }", "public String getGroupName(){\r\n return Validator.unescapeJava(this.groupName);\r\n }", "public String getGroupName() {\n GitLabGroupInfo groupInfo = getGroupInfo();\n return (groupInfo != null) ? groupInfo.getName() : \...
[ "0.7384916", "0.729788", "0.7280023", "0.7025132", "0.69408154", "0.69115466", "0.68826", "0.6877626", "0.68440276", "0.6830132", "0.6757942", "0.6728543", "0.66639614", "0.65962094", "0.6584448", "0.65798014", "0.6579214", "0.6547547", "0.6492394", "0.6455253", "0.6454711", ...
0.810852
0
. Elle supperimme un personnel passer en parametre perso si
public final void remove(final Personnel perso) { if (this.personnel.contains(perso)) { System.out.println(this.personnel.contains(perso)); this.personnel.remove(perso); } else { System.out.println(this.personnel.contains(perso)); throw new InExistArgumentException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }", "public Final_parametre() {\r\n\t}", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "public void param(int direccionValorParam...
[ "0.6838597", "0.6729251", "0.6411208", "0.63459677", "0.6199326", "0.6137418", "0.61340153", "0.6086495", "0.6071371", "0.60188663", "0.60047007", "0.6001099", "0.59976655", "0.5907585", "0.58802515", "0.58468926", "0.58398104", "0.58358675", "0.5832343", "0.58180207", "0.580...
0.0
-1
Creates a new scanner
public smaliFlexLexer(Reader in, int apiLevel) { this.apiLevel = apiLevel; this.zzReader = in; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scanner createScanner(File file) {\n Scanner scanner;\n try {\n scanner = new Scanner(file);\n\n } catch (FileNotFoundException e) {\n scanner = null;\n }\n return scanner;\n }", "private ConsoleScanner() {}", "public Parser(Scanner scanner) {\...
[ "0.70184577", "0.6995181", "0.6993494", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.6599448", "0.6569486", "0.6569486", "0.6569486", "0.6569486", "0.6569486", "0.6569486", "0.6510001", "0.6377581", "0.6369...
0.0
-1
Unpacks the compressed character translation table.
private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x110000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 258) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int yy_unpack(String packed, int offset, int [] trans) {\n int i = 0; /* index in packed string */\n int j = offset; /* index in unpacked array */\n int l = packed.length();\n while (i < l) {\n int count = packed.charAt(i++);\n int value = packed.charAt(i++);\n val...
[ "0.6268001", "0.6268001", "0.61182714", "0.61120105", "0.6109145", "0.61077017", "0.61047965", "0.6102622", "0.6101135", "0.6101135", "0.6099395", "0.6099287", "0.60950166", "0.6091184", "0.60895145", "0.6088585", "0.6087667", "0.6081806", "0.6081659", "0.608088", "0.60797596...
0.6066226
25
Closes the input stream.
public final void yyclose() throws IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void close() throws IOException {\n input.close();\n }", "public void closeStream() {\n output.close();\n input.close();\n }", "public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public...
[ "0.7759348", "0.7442554", "0.7431424", "0.73467964", "0.7202436", "0.71076065", "0.69819653", "0.6875819", "0.6849541", "0.6823288", "0.67786884", "0.67334956", "0.6719289", "0.66913164", "0.66824675", "0.65635204", "0.656225", "0.65205383", "0.6506908", "0.6488402", "0.64391...
0.631258
51
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.
public final void yyreset(Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEOFDone = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = 0; zzFinalHighSurrogate = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; if (zzBuffer.length > ZZ_BUFFERSIZE) zzBuffer = new char[ZZ_BUFFERSIZE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;...
[ "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6719508", "0.6696548", "0.6696548", "0.6693055", "0.65405834", "0.6492", "0.6352284", "0....
0.66856056
18
Returns the current lexical state.
public final int yystate() { return zzLexicalState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LexerState getState() {\n\t\treturn state;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}", "final public int yystate() {\n return yy_lexical_state;\n }", "final public int yystate() {\n return yy_lexi...
[ "0.777735", "0.7045248", "0.69731486", "0.69486177", "0.69486177", "0.6926388", "0.68727165", "0.6855888", "0.6828191", "0.6828191", "0.6828191", "0.6828191", "0.6828191", "0.68169594", "0.6794179", "0.6780457", "0.67754173", "0.6752172", "0.6720868", "0.66741174", "0.6592735...
0.68280005
43
Enters a new lexical state
public final void yybegin(int newState) { zzLexicalState = newState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zz...
[ "0.73873174", "0.73873174", "0.73873174", "0.73873174", "0.73873174", "0.72941506", "0.7226648", "0.7226648", "0.71508276", "0.67628527", "0.675286", "0.66516984", "0.62365973", "0.6181515", "0.61330837", "0.6028637", "0.6020987", "0.59391516", "0.59199816", "0.5890798", "0.5...
0.734593
42
Returns the text matched by the current regular expression.
public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRegularExpression() {\n\t\treturn enteredText;\n\t}", "java.lang.String getRegex();", "java.lang.String getRegex();", "@Override\r\n\tpublic String getMatch() {\n\t\treturn match;\r\n\t}", "public String getRegex();", "public String getRegEx();", "public String getMatched() {\r\n\t\tre...
[ "0.70918065", "0.6484353", "0.6484353", "0.6231338", "0.6081341", "0.6011239", "0.59774715", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.594106", ...
0.5595711
51
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster
public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final char yycharat(int pos) {\n return input.readText().charAt(pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) ...
[ "0.7900187", "0.7561526", "0.7561526", "0.7561526", "0.7561526", "0.7561526", "0.7561526", "0.7561526", "0.7561526", "0.748312", "0.748312", "0.748312", "0.748312", "0.748312", "0.74619186", "0.74293286", "0.74293286", "0.7388772", "0.7388772", "0.7382884", "0.73818666", "0...
0.75123805
29
Returns the length of the matched text region.
public final int yylength() { return zzMarkedPos-zzStartRead; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTextLength();", "public int length() {\r\n\t\treturn text.length();\r\n\t}", "public int getTextLength();", "public int getLength() {\n\t\t\treturn this.text.length();\n\t}", "@Override\r\n \tpublic final int getLength() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getEndPos() - get...
[ "0.6528484", "0.6524071", "0.636394", "0.6363093", "0.61599505", "0.6144468", "0.60899585", "0.6083994", "0.607981", "0.6014312", "0.6012768", "0.60009634", "0.59647894", "0.5935444", "0.5883292", "0.5819961", "0.5805488", "0.57757026", "0.5772788", "0.5771723", "0.57381433",...
0.5758411
51
Reports an error that occured while scanning. In a wellformed scanner (no or only correct usage of yypushback(int) and a matchall fallback rule) this method will only be called with things that "Can't Possibly Happen". If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). Usual syntax/scanner level error handling should be done in error fallback rules.
private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void yy_ScanError(int errorCode) {\n String message;\n try {\n message = YY_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }", "private void yy_ScanError(int errorCode) {\n...
[ "0.61943", "0.61943", "0.61849064", "0.57066524", "0.5631599", "0.5553546", "0.55417734", "0.54892784", "0.54857516", "0.54709727", "0.5428538", "0.5340998", "0.5310531", "0.53092", "0.53019166", "0.53019166", "0.5287291", "0.5287291", "0.5287291", "0.5287291", "0.5287291", ...
0.5259722
55
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method
public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void pushBack() throws IOException {\n iis.seek(iis.getStreamPosition()-bufAvail);\n bufAvail = 0;\n bufPtr = 0;\n }", "public void finish() {\n charScanner.pushBack(currentCharToken);\n }", "@Override\n public void mark(final int readlimit) {\n input.mark();\n }"...
[ "0.5734373", "0.5665254", "0.5241355", "0.51768184", "0.51327187", "0.5131074", "0.5105206", "0.50397587", "0.5017513", "0.5015112", "0.50047463", "0.5002526", "0.4988889", "0.49811333", "0.49780416", "0.4958394", "0.49544096", "0.49515522", "0.49430543", "0.4930276", "0.4926...
0.0
-1
Helper method to create a toolbar item
private static ToolItem createItemHelper(ToolBar toolbar, Image image, String text) { ToolItem item = new ToolItem(toolbar, SWT.PUSH); if (image == null) { item.setText(text); } else { item.setImage(image); item.setToolTipText(text); } return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Component createNewToolItem() {\r\n Button button = new Button();\r\n gwtToolbarItem.addClasses(button);\r\n button.addStyleName(\"action-bar-tool-item\");\r\n return button;\r\n }", "public ToolItem (ToolBar parent, int style) {\r\n\tthis(parent, style, parent.getItemCount ...
[ "0.76050127", "0.69871646", "0.69554067", "0.68851686", "0.66676176", "0.6637981", "0.6622059", "0.6529776", "0.64822775", "0.6455589", "0.64491737", "0.64394486", "0.64345956", "0.6428304", "0.6379222", "0.6368298", "0.6347139", "0.63421875", "0.63401055", "0.63368994", "0.6...
0.7207088
1
TODO Autogenerated method stub
@Override public int compareTo(FreqLocKey o) { if (this.cityId > o.cityId) { return 1; } else if (this.cityId < o.cityId) { return -1; } else { if (this.freq > o.freq) { return 1; } else if (this.freq < o.freq) { return -1; } else { if (this.pci > o.pci) { return 1; } else if (this.pci < o.pci) { return -1; } else { 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
Created by Ngoc Vu on 12/18/2017.
public interface IOnClickFilter { void onClickFilter(String date); void onClickClearFilter(); }
{ "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}", "public final void mo51373a() {\n }", "@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\r\n\t...
[ "0.6164021", "0.58868957", "0.5859397", "0.58492446", "0.5833453", "0.5833453", "0.582324", "0.5787319", "0.5785273", "0.57738215", "0.5695674", "0.5694167", "0.5659513", "0.5658219", "0.56442726", "0.5642893", "0.5642701", "0.5641651", "0.5638759", "0.56335056", "0.5630677",...
0.0
-1
/ Showing splash screen with a timer. This will be useful when you want to show case your app logo / company
@Override public void run() { if (sharedPreferences.contains("User-id")) { loginUserId = sharedPreferences.getString("User-id", null); if (loginUserId.equals("") || loginUserId.equals(null)) { startActivity(new Intent(SplashScreen.this, LoginActivity.class)); } else { startActivity(new Intent(SplashScreen.this, HomePageActivity.class)); } } else { startActivity(new Intent(SplashScreen.this, LoginActivity.class)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100...
[ "0.8441948", "0.7592386", "0.758094", "0.74995446", "0.7415382", "0.7305605", "0.72871166", "0.72542226", "0.72480965", "0.72148776", "0.72088456", "0.71703327", "0.71419084", "0.71362996", "0.7089052", "0.70866483", "0.70741343", "0.7045565", "0.70037585", "0.699583", "0.693...
0.0
-1
Search into the dictionary the key passed in 'key' parameter into the ROOT
@Override public String getValueFromRootDictionary(final String key) { // search into the dictionary ROOT section final Map<String, String> rootDictionary = getVal(MetocsBaseDictionary.ROOT_SECTION_KEY); if (rootDictionary != null) { return rootDictionary.get(key); } else { if (LOGGER.isErrorEnabled()) LOGGER.error("Unable to find a key named: \'" + key + "\' into the dictionary."); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic K lookup(K key) {\n\t\treturn lookup(root, key);\n\t}", "@Override\n public boolean search(K key) {\n if (rootNode == null)\n return false;\n try {\n return exist(key, rootNode);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n ret...
[ "0.732411", "0.72647256", "0.71440285", "0.7099403", "0.70838755", "0.7003468", "0.69860935", "0.69286895", "0.6926768", "0.69255084", "0.6903724", "0.68447334", "0.68130165", "0.67621404", "0.6758053", "0.67397267", "0.6735766", "0.67027956", "0.66805625", "0.66738355", "0.6...
0.0
-1
Metodo que guarda una imagen en la bade de datos
void save(Images image);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nue...
[ "0.7086435", "0.6819326", "0.6618787", "0.656598", "0.6542426", "0.6523557", "0.642219", "0.62739956", "0.62578523", "0.62472427", "0.6224402", "0.61510694", "0.6102917", "0.6043047", "0.6040214", "0.60336053", "0.6020479", "0.5999752", "0.59820884", "0.59681326", "0.5967599"...
0.0
-1
... TODO(developer): Handle FCM messages here. Not getting messages here? See why this may be:
@Override public void onMessageReceived(RemoteMessage remoteMessage) { Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) { Log.d(TAG, "Message data payload: " + remoteMessage.getData()); } // Check if message contains a notification payload. if (remoteMessage.getNotification() != null) { //Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody()); final String msg = remoteMessage.getNotification().getBody(); Handler handler = new Handler(Looper.getMainLooper()); handler.post(new Runnable() { @Override public void run() { Toast.makeText(MyService.this.getApplicationContext(), msg,Toast.LENGTH_SHORT).show(); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messa...
[ "0.7152236", "0.7024289", "0.7013079", "0.6910088", "0.6905307", "0.6844186", "0.6792167", "0.67688257", "0.6761622", "0.6747036", "0.6709493", "0.66927433", "0.6687474", "0.6684927", "0.66717225", "0.66527075", "0.66309696", "0.6621969", "0.6619448", "0.6616293", "0.659749",...
0.66023624
20
Calculate return and update nexr
public static void calculateReturn(TestPortfolioStat dp, TestPortfolioStat next) { BigDecimal grossLast=dp.gross; BigDecimal gross=next.gross; if( grossLast.compareTo(BigDecimal.ZERO)!=0 ) { next.dailyReturn=gross.subtract(grossLast).abs(). divide(grossLast.abs(), RoundingMode.HALF_DOWN ); // set correct sign if( gross.compareTo(grossLast)<0 ) { next.dailyReturn=next.dailyReturn.negate(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}", "public double calculateNetPay() {\r\n return net_pay = grosspay - Statetax - Fedtax; }", "public static final double internalRateOfReturn (\n double irrEstimate,\n double [ ] cashFlows )\n ////////////////...
[ "0.60968804", "0.6095847", "0.58928263", "0.5850275", "0.57671523", "0.5740699", "0.5712003", "0.5694067", "0.5685615", "0.5633604", "0.56275403", "0.5600713", "0.5599903", "0.55895114", "0.55684465", "0.55331737", "0.5526549", "0.55169684", "0.5512577", "0.5510665", "0.54978...
0.6153583
0
Creates a new directed edge between to vertices with direction from>to
public Edge(Node from, Node to, int weight) { this.from = from; this.to = to; this.weight = weight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Edge(Vertex<VV> from, Vertex<VV> to)\r\n {\r\n this.from = from;\r\n this.to = to;\r\n from.addEdge(this);\r\n to.addEdge(this);\r\n }", "public void addEdge(Node from, Node to);", "public Edge(int from, int to) {\n this(from, to, null);\n }", "public Edge(Node from, Node to) {\n ...
[ "0.7491626", "0.7325222", "0.7166918", "0.7166637", "0.7025919", "0.69079804", "0.68526447", "0.68398035", "0.6789987", "0.655798", "0.65375525", "0.6507651", "0.64732", "0.6404573", "0.6394064", "0.6391131", "0.6387463", "0.6328087", "0.6320746", "0.62752265", "0.6239566", ...
0.6481911
12
Add weight to the existing edge
public void addWeight(int weightToMerge) { this.weight += weightToMerge; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addEdge(int start, int end, double weight);", "void addEdge(int source, int destination, int weight);", "public void setWeight(int weightIn){\n\t\tthis.edgeWeight = weightIn;\n\t}", "boolean addEdge(V v, V w, double weight);", "public void addWeight(){\n\t\tweight++;\n\t}", "public void setEd...
[ "0.79004776", "0.78305537", "0.7495176", "0.7440764", "0.74231917", "0.728654", "0.7273159", "0.7253498", "0.7223345", "0.719759", "0.7161828", "0.7130395", "0.6999705", "0.6997591", "0.6994346", "0.6989986", "0.694983", "0.6946185", "0.6937028", "0.69141304", "0.6856452", ...
0.7161041
11
Gets the source vertex
public Node getFrom() { return from; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vertex getSource() {\n return source;\n }", "@Override\n public Vertex getSource() {\n return sourceVertex;\n }", "public Vertex getFrom() {\r\n\r\n return from;\r\n }", "public Vertex<VV> getFrom()\r\n { return from; }", "Vertex getVertex();", "public Vertex getS...
[ "0.8718873", "0.85908216", "0.7395446", "0.71405274", "0.7077689", "0.70465297", "0.682045", "0.6689673", "0.6682081", "0.66801053", "0.66238314", "0.66225433", "0.66148525", "0.65918624", "0.65918624", "0.6584178", "0.6583489", "0.6552123", "0.6551212", "0.6548609", "0.65477...
0.0
-1
Gets the destination vertex
public Node getTo() { return to; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vertex getDestination() {\n return destination;\n }", "public V getDestination() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = succNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Vertex getFrom() {\r\n\r\n ...
[ "0.85373163", "0.6957672", "0.6665097", "0.66431904", "0.6555344", "0.65531886", "0.65136576", "0.6506455", "0.65032226", "0.6465987", "0.64613307", "0.6434834", "0.64030707", "0.6378259", "0.63702863", "0.6352991", "0.6309536", "0.6242124", "0.6241645", "0.62160784", "0.6194...
0.0
-1
Gets the weight of this edge
public int getWeight() { return weight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}", "public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}", "double getEdgeWeight();", "public double getWeight() {\n\t\treturn weight;\n\t}", "public float getWeight() {\n\t\t\treturn weight;\n\t\t}", "public Byte getWeight() {\n\t\tr...
[ "0.8496196", "0.84784704", "0.832242", "0.7956425", "0.7913882", "0.79100865", "0.78995305", "0.78749496", "0.7861408", "0.78605086", "0.784013", "0.7822992", "0.7815849", "0.7815849", "0.77961946", "0.7795873", "0.7783346", "0.7780804", "0.7775107", "0.77712005", "0.77685964...
0.7654398
34
Get the boundary of a subgraph (edges with 1 endpoint in the subgraph and 1 endpoint outside of it.
public Set<E> getBoundary(Graph<V,E> subG , Graph<V,E>g) { Set<E> boundary = new HashSet<E>(); for (V source : subG.vertexSet()) { for (E e : g.edgesOf(source)) { V target = Util.getEdgeTarget(g, source, e); if (!subG.vertexSet().contains(target)) { boundary.add(e); } } } return boundary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<? extends Boundary> getIsBoundaryNodeOf();", "public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n ...
[ "0.661723", "0.62518716", "0.6056818", "0.60562503", "0.60113853", "0.6008361", "0.58013326", "0.56860375", "0.5679862", "0.5674318", "0.5642868", "0.56094027", "0.5602731", "0.5588532", "0.55870306", "0.5585701", "0.55775857", "0.5576953", "0.5572957", "0.55350786", "0.55075...
0.7325538
0
Returns the bisection of the subgraph or null if the computation is not done yet
@Override public Set<E> getClustering() { return F; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int calcBF(Node node){\n\t\tint bf;\n\t\tif(node.left == null && node.right == null)\n\t\t\treturn 0;\n\t\tif(node.left == null){\n\t\t\tbf= -node.right.height;\n\t\t\tnode.height= 1+ node.right.height;\n\t\t}\n\t\telse if(node.right == null){\n\t\t\tbf= node.left.height;\n\t\t\tnode.height= 1+ node.left.h...
[ "0.5058364", "0.50119835", "0.49711078", "0.49510092", "0.49405876", "0.49254805", "0.49076843", "0.4905598", "0.4882285", "0.47915596", "0.47906885", "0.47797793", "0.47636425", "0.47570306", "0.47501245", "0.4746002", "0.4720728", "0.46936047", "0.46868533", "0.46649486", "...
0.0
-1
Returns the 'left' side of the bisection (= the side t is attached to)
public Set<V> getL() { return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double Left(){\n\t\treturn (x);\n\t}", "public double getLeft() {\r\n\t\treturn -left.getRawAxis(1);\r\n\t}", "double getLeft(double min);", "public double getLeft() {\n return this.xL;\n }", "public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n ...
[ "0.68917793", "0.66980654", "0.66127366", "0.6458944", "0.64583296", "0.6442114", "0.6396406", "0.6334296", "0.6302559", "0.6178557", "0.6162288", "0.6150682", "0.61446786", "0.6128713", "0.61066496", "0.60833967", "0.6063083", "0.6019708", "0.60159624", "0.6010008", "0.60057...
0.0
-1
Returns the 'right' side of the bisection (= the side s is attached to)
public Set<V> getR() { return R; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}", "int side() {\n return s;\n }", "public Bearing getRightNeighbour() {\n return this == N || this == S ? E : S;\n }", "public double getSideB()\r\n\t{\r\n\t\treturn this.sideB;\r\n\t}", "public float getRight()...
[ "0.6862899", "0.6773507", "0.6750002", "0.63999945", "0.6385609", "0.6371591", "0.63672394", "0.62645644", "0.6239806", "0.62240887", "0.61922747", "0.61711645", "0.6151033", "0.61340433", "0.6126873", "0.61249113", "0.61033964", "0.6047143", "0.6035836", "0.6034702", "0.6017...
0.0
-1
Note the MVC tests use the actual database, this might create a problem with the order of adding/retrieving
void fillDatabase() { Type.type( "FOOD" ); Type.type( "HOT" ); Type.type( "SNACK" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "@Test\n public void addArticle(){\n User user = userDao.load(3);\n Article article = new Article();\n article.setUser(...
[ "0.67534786", "0.65822726", "0.64337385", "0.6311345", "0.6217106", "0.620621", "0.6202508", "0.619957", "0.6178337", "0.6169391", "0.61558944", "0.614622", "0.6140043", "0.61117125", "0.61053133", "0.6071433", "0.6049612", "0.60223806", "0.6014231", "0.60021234", "0.60007054...
0.0
-1
Handles the HTTP GET method.
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); request.getRequestDispatcher("index.jsp").include(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) { response.setContentType("text/html;charset=UTF-8"); //Invalidate user session request.getSession().invalidate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Make the bar disappear after URL is loaded, and changes string to Loading...
public void onProgressChanged(WebView view, int progress) { setTitle("Loading..."); setProgress(progress * 100); //Make the bar disappear after URL is loaded // Return the app name after finish loading if (progress == 100) setTitle(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setLoadingBarVisible(String text)\n {\n loadingBar.setVisibility(View.VISIBLE);\n loadingText.setText(text);\n }", "private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n ...
[ "0.6785701", "0.6728997", "0.663491", "0.6597751", "0.6520122", "0.64353114", "0.6403619", "0.64014333", "0.6376774", "0.6375001", "0.6332176", "0.63294464", "0.63215005", "0.6309808", "0.630527", "0.62088156", "0.6191272", "0.6182557", "0.61794114", "0.6168333", "0.61610705"...
0.63134253
13
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
To parse page been specified by URL.
List<ParseData> parse(ParseDataSettings parseData);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String...
[ "0.74779797", "0.6869477", "0.665032", "0.65405256", "0.6440897", "0.6424629", "0.6409475", "0.63501763", "0.6246125", "0.6199847", "0.6128713", "0.61083573", "0.6090152", "0.60489804", "0.6001067", "0.59808534", "0.59636486", "0.59608656", "0.5952571", "0.59380513", "0.59176...
0.0
-1
liste des sessions accessibles par l'utilisateur en tant qu'apprenant
public List<Session> getListSessionApprenant() {// OK if (utilisateur.getListeSessionsApprenantAccessible().isEmpty()) { List<Session> liste = new ArrayList<Session>(); liste = getListeSessionsParam("sessionsAcc", "role", "apprenant"); utilisateur.setListeSessionsApprenantAccessible(liste); return liste; } else { return utilisateur.getListeSessionsApprenantAccessible(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t...
[ "0.73108876", "0.72718275", "0.7062307", "0.7046068", "0.6949508", "0.6889909", "0.68578464", "0.6786809", "0.67715716", "0.6765313", "0.67325574", "0.67322767", "0.6728642", "0.6669417", "0.6417641", "0.63619095", "0.6316831", "0.62818384", "0.6213493", "0.6162216", "0.61565...
0.79693204
0
suppression des candidatures de l'agent aux sessions ou il ne veut plus postuler
public void annuleCandidatures(List<Session> list) {// OK for (Session session : list) { String valID = String.valueOf(session.getId()); service.path(idConnexion + "/delete").queryParam("session", valID); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void supprimerInaccessibles(){\n grammaireCleaner.nettoyNonAccGramm();\n setChanged();\n notifyObservers(\"3\");\n }", "private void removeDuplicateUserAgents() throws Exception {\n Db db = getDb();\n try {\n db.enter();\n Map<Integer, Integer> d...
[ "0.55850947", "0.5294051", "0.528722", "0.5280719", "0.5252003", "0.5207434", "0.5178379", "0.51740056", "0.51735705", "0.51657265", "0.513529", "0.50925833", "0.5060659", "0.5055187", "0.50323683", "0.50285095", "0.5024063", "0.5010083", "0.49891162", "0.4981563", "0.4969020...
0.50951767
11
soumission des candidatures de l'agent comme apprenant
public void postulerApprenant(List<Session> list) {// OK for (Session session : list) { String valID = String.valueOf(session.getId()); String prio = String.valueOf(session.getPrio()); service.path(idConnexion + "/submit").queryParam("role", "Apprenant").queryParam("session", valID) .queryParam("prio", prio); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrl...
[ "0.6156156", "0.60783446", "0.5943292", "0.59376246", "0.59139246", "0.5908114", "0.5860505", "0.5851091", "0.5807388", "0.5766564", "0.5757402", "0.5751942", "0.5737166", "0.5723882", "0.5697107", "0.5691608", "0.5691365", "0.56881493", "0.5650249", "0.5646645", "0.56444293"...
0.0
-1
soumission des candidatures de l'agent comme formateur
public void postulerFormateur(List<Session> list) {// OK for (Session session : list) { String valID = String.valueOf(session.getId()); String prio = String.valueOf(session.getPrio()); service.path(idConnexion + "/submit").queryParam("role", "Formateur").queryParam("session", valID) .queryParam("prio", prio); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n ...
[ "0.6118943", "0.6113252", "0.6077922", "0.6036126", "0.5993698", "0.5980177", "0.5962998", "0.59380275", "0.58917224", "0.58546835", "0.58107394", "0.57986504", "0.5795864", "0.5774651", "0.5766006", "0.57649946", "0.5762705", "0.5745207", "0.5743996", "0.5740793", "0.5718204...
0.0
-1
convertit la liste de SessionT en Session
private List<Session> ConvertSessionT(List<SessionT> listT) { List<Session> listerep = new ArrayList<Session>(); for (SessionT st : listT) { Session session = new Session(); session.setSessionT(st); listerep.add(session); } return listerep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSessionList();", "List<Session> getAllSessions();", "public List<Session> getListSessionApprenant() {// OK\r\n\r\n\t\tif (utilisateur.getListeSessionsApprenantAccessible().isEmpty()) {\r\n\t\t\tList<Session> liste = new ArrayList<Session>();\r\n\t\t\tliste = getListeSessionsParam(\"se...
[ "0.6947645", "0.67987615", "0.6662458", "0.64974076", "0.64923686", "0.6349439", "0.6287025", "0.62805283", "0.6265119", "0.61937535", "0.6154852", "0.60634273", "0.6053341", "0.6043949", "0.60269856", "0.60144496", "0.6010456", "0.60001755", "0.5998978", "0.5997114", "0.5993...
0.81615126
0
convertit la liste de AgentT en Agent
private List<Agent> ConvertAgentT(List<AgentT> listT) { List<Agent> listerep = new ArrayList<Agent>(); for (AgentT at : listT) { Agent agent = new Agent(); agent.setAgentT(at); listerep.add(agent); } return listerep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getAgentLista() {\n return agentLista;\n }", "public List<Agente> getAllAgentes(){\r\n\t\treturn resAgenteDAO.getAllAgentes();\r\n\t}", "public StrategieClassique(List<InfraAgent> listInfraAgents, List<OrdonnanceurListener> listListenerActuels) {\r\n...
[ "0.6584916", "0.6390338", "0.629684", "0.6295812", "0.62739116", "0.6207889", "0.62073296", "0.61286426", "0.6036004", "0.5988465", "0.59661525", "0.5949867", "0.5934015", "0.5891889", "0.5882686", "0.5798925", "0.57689124", "0.5766785", "0.5739105", "0.5718551", "0.5688352",...
0.7920588
0
Distributes the given binding event to interested parties.
private void distribute( final BindingEvent event, final BindingPublisher publisher, final int rank ) { for ( final Iterator<XRankedBindings> itr = bindingsCache.values().iterator(); itr.hasNext(); ) { final XRankedBindings bindings = itr.next(); if ( bindings.isActive() ) { notify( bindings, event, publisher, rank ); } else { itr.remove(); // cleanup up stale entries } } for ( int i = 0; i < watchedBeans.size(); i++ ) { final XWatchedBeans beans = watchedBeans.get( i ); if ( beans.isActive() ) { notify( beans, event, publisher, rank ); } else { watchedBeans.remove( i-- ); // cleanup up stale entries } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void notify( final BindingDistributor distributor, final BindingEvent event,\n final BindingPublisher publisher, final int rank )\n {\n switch ( event )\n {\n case ADD:\n distributor.add( publisher, rank );\n br...
[ "0.62064075", "0.59603184", "0.584701", "0.5557553", "0.5254478", "0.50603855", "0.5026903", "0.50241685", "0.4973741", "0.49479073", "0.49479073", "0.4915836", "0.4852233", "0.4852233", "0.47720918", "0.47563088", "0.47345924", "0.4724394", "0.47100943", "0.46829718", "0.466...
0.6533612
0
Notifies the given distributor of the given binding event and its optional details.
private static void notify( final BindingDistributor distributor, final BindingEvent event, final BindingPublisher publisher, final int rank ) { switch ( event ) { case ADD: distributor.add( publisher, rank ); break; case REMOVE: distributor.remove( publisher ); break; case CLEAR: distributor.clear(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void distribute( final BindingEvent event, final BindingPublisher publisher, final int rank )\n {\n for ( final Iterator<XRankedBindings> itr = bindingsCache.values().iterator(); itr.hasNext(); )\n {\n final XRankedBindings bindings = itr.next();\n if ( bindings.isAct...
[ "0.53575975", "0.52533555", "0.5124526", "0.51093847", "0.5089501", "0.5039785", "0.4998557", "0.4941765", "0.49397773", "0.49392906", "0.49058735", "0.48393035", "0.47802287", "0.4768885", "0.47271195", "0.4659711", "0.46472296", "0.46471438", "0.464157", "0.46303257", "0.46...
0.75682306
0
constructor: same name as the class
studentCounter(){ numStudentInRoom = 0 ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "private Instantiation(){}", "defaultConstructor(){}", "public Clade() {}", "public _355() {\n\n }", "public PSRelation()\n {\n }", "public Chick() {\n\t}", "private void __sep__Constructors...
[ "0.8322638", "0.8241015", "0.7708888", "0.76635176", "0.7506672", "0.73829204", "0.7345352", "0.73355263", "0.7314051", "0.7289153", "0.72829735", "0.7269448", "0.72325623", "0.720557", "0.7185218", "0.71643543", "0.71621287", "0.71520877", "0.71508294", "0.7148654", "0.71445...
0.0
-1
constructor2: with some student in the room
studentCounter( int numStudentAlreadyInTheRoom ){ numStudentInRoom = numStudentAlreadyInTheRoom ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Student() {\n \n }", "public Student() {\r\n }", "public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}", "public Student(){}", ...
[ "0.7491991", "0.73914623", "0.7365542", "0.7327239", "0.73242867", "0.7304222", "0.7300967", "0.72765434", "0.7232966", "0.7228103", "0.7222494", "0.7222494", "0.7222494", "0.72158235", "0.7179406", "0.71485114", "0.7141651", "0.711161", "0.7067934", "0.7061169", "0.7058654",...
0.0
-1
methodoverloading: methods with same name but different arguments
public void StudentEntered() { numStudentInRoom ++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elemen...
[ "0.7265742", "0.69174397", "0.67893624", "0.6499035", "0.63102424", "0.62991756", "0.6238876", "0.62275845", "0.6212186", "0.6200564", "0.6156836", "0.5955843", "0.58426523", "0.58343863", "0.58138746", "0.5801521", "0.5797013", "0.5777153", "0.5762427", "0.5755801", "0.57471...
0.0
-1
Print following chessboard using nested for loops. W B W B W B W B B W B W B W B W W B W B W B W B B W B W B W B W W B W B W B W B B W B W B W B W W B W B W B W B B W B W B W B W NOTE: 1. Total 8 rows and 8 columns. 2. "W" and "B" are in alternate positions (rowwise or columnwise), you will not find consecutive W or B.
public static void main(String[] args) { int row=8; int column=8; for (int i=1; i<=row; i++) { for (int j=1; i%2==1&&j<=column; j+=2) { System.out.print("B"); System.out.print("W"); } for(int k=1;i%2==0 && k<=column; k+=2) { System.out.print("W"); System.out.print("B"); } System.out.println(); } /*!!!! BETTER !!! * * for(int i=1;i<=8;i++) { for(int j=1;j<=8;j++) { if ((i+j)%2!=0) { System.out.print("W "); }else { System.out.print("B "); } } System.out.println(); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSyst...
[ "0.743742", "0.73621684", "0.72961605", "0.72007877", "0.7163517", "0.71534497", "0.7143661", "0.7097016", "0.7095154", "0.7082978", "0.6984334", "0.69692874", "0.69668174", "0.6963451", "0.6959669", "0.6893516", "0.68648994", "0.6848538", "0.6846587", "0.6836146", "0.6825409...
0.74761677
0
Shuts down an ExecutorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks. Note: This method was culled from the ExecutorService documentation
private boolean shutdownAndAwaitTermination( ExecutorService pool, long timeout, TimeUnit unit, List<Runnable> addInterruptedHere) { pool.shutdown(); // Disable new tasks from being submitted if(timeout <= 0) { timeout = 1; } try { // Wait a while for existing tasks to terminate if (!pool.awaitTermination(timeout, unit)) { List interrupted = pool.shutdownNow(); // Cancel currently executing tasks if(addInterruptedHere != null && (interrupted != null && !interrupted.isEmpty())) { addInterruptedHere.addAll(interrupted); } // Wait a while for tasks to respond to being cancelled if (!pool.awaitTermination(timeout, unit)) { return false; } } } catch (InterruptedException ie) { // (Re-)Cancel if current thread also interrupted List interrupted = pool.shutdownNow(); if(addInterruptedHere != null && (interrupted != null && !interrupted.isEmpty())) { addInterruptedHere.addAll(interrupted); } // Preserve interrupt status Thread.currentThread().interrupt(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shutDownExecutorService() {\r\n\t\tlogger.info(\"Shutting down FileEncryptionExecutor...\");\r\n\t\ttry {\r\n\t\t\tservice.shutdown();\r\n\t\t\tservice.awaitTermination(60 * 10, TimeUnit.SECONDS);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tlogger.error(\r\n\t\t\t\t\t\"InterruptedException occur...
[ "0.7323128", "0.6762808", "0.6740299", "0.6712123", "0.6645723", "0.6568594", "0.65484524", "0.63611966", "0.63063234", "0.62286633", "0.61687714", "0.61384785", "0.60171175", "0.59957117", "0.59826344", "0.5927129", "0.5852816", "0.58085275", "0.5804328", "0.5684393", "0.567...
0.509492
56
Three ways to create thread 1. extend thread class 2. make anonymous class of thread 3. implement runnable interface(see another class)
public void run(){ System.out.println("Thread class extends " + getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}", "private static void createThreadUsingAnonymousInnerClass() {\n\t\tRunnable rn = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"My Anonymo...
[ "0.7622964", "0.7439177", "0.7281032", "0.7247681", "0.7088086", "0.70650136", "0.7015546", "0.6993771", "0.6977898", "0.69636816", "0.68349403", "0.6787434", "0.6595392", "0.65947163", "0.658184", "0.65483624", "0.6547933", "0.6538352", "0.6519646", "0.64696944", "0.6467151"...
0.58805007
51
Created by Ricardo Bravo on 7/07/16.
public interface OnTagDeleteListener { void onTagDeleted(TagGroup view, TagGroup.Tag tag, int position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}"...
[ "0.60618854", "0.60239667", "0.58510906", "0.5805997", "0.58017904", "0.58017904", "0.5792242", "0.57703006", "0.5737736", "0.57067055", "0.5706095", "0.56990796", "0.56983715", "0.56744635", "0.5666943", "0.5656584", "0.5635593", "0.56338704", "0.56291497", "0.5622822", "0.5...
0.0
-1
Creates new form IfrViagem
public IfrViagem() { initComponents(); v = new Viagem(); criarViagem(); Formatacao.formatarData(ftfDataSaida); Formatacao.formatarHora(ftfHoraSaida); Formatacao.formatarData(ftfDataRetorno); Formatacao.formatarHora(ftfHoraRetorno); Formatacao.formatarReal(ftfValorViagem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "@GetMapping(v...
[ "0.6351408", "0.6313825", "0.6020398", "0.595509", "0.59450215", "0.5886757", "0.58554447", "0.5785354", "0.5767957", "0.57352245", "0.5718646", "0.5669904", "0.565581", "0.5631023", "0.5628643", "0.5614351", "0.56077164", "0.5604907", "0.56035113", "0.5585308", "0.55849665",...
0.727859
0
End of variables declaration//GENEND:variables
private void limpaTela() { txfNomeGrupo.setText(""); ftfValorViagem.setText("0"); ftfDataSaida.setText(""); ftfHoraSaida.setText(""); ftfDataRetorno.setText(""); ftfHoraRetorno.setText(""); txfNumPessoas.setText(""); txfIntegrante.setText(""); txfNomeGrupo.setBackground(null); ftfValorViagem.setBackground(Color.white); ftfDataSaida.setBackground(Color.white); ftfHoraSaida.setBackground(Color.white); ftfDataRetorno.setBackground(Color.white); ftfHoraRetorno.setBackground(Color.white); txfNumPessoas.setBackground(null); txfIntegrante.setBackground(Color.white); }
{ "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
/ Retourne la couleur du diamant
public char getCouleur(){ return couleur; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getCustoAluguel(){\n return 2 * cilindradas;\n }", "public Integer getCedula() {return cedula;}", "double getDiametro(){\n return raggio * 2;\n }", "public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }", "int getCedula();", "@Override...
[ "0.6411981", "0.63984", "0.63391525", "0.63273203", "0.63069946", "0.6224698", "0.61927754", "0.6153293", "0.6144747", "0.61045957", "0.607537", "0.60576993", "0.6015161", "0.60030246", "0.5983227", "0.596796", "0.5965901", "0.5965901", "0.5960021", "0.5946415", "0.59416145",...
0.6088137
10
/ Retourne la position en x du diamant
public int getPositionX(){ return positionx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getX() { return position.x; }", "double getPositionX();", "double getPositionX();", "double getPositionX();", "double getXPosition();", "public int getXPos();", "public int getX(){ return xPosition; }", "public int getX(){\n return this.position[0];\n }", "public int getXPositi...
[ "0.82663953", "0.824418", "0.824418", "0.824418", "0.806901", "0.79546696", "0.7916644", "0.7841104", "0.7793408", "0.7793408", "0.7760998", "0.7744617", "0.7731366", "0.77300996", "0.77011055", "0.7624159", "0.7615702", "0.7591571", "0.7572285", "0.75635004", "0.7557258", ...
0.7812293
8
/ Retourne la position en y du diamant
public int getPositionY(){ return positiony; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getPositionY();", "double getPositionY();", "double getPositionY();", "double getYPosition();", "public int getY(){\n return this.position[1];\n }", "public int getY() { return loc.y; }", "double getY() { return pos[1]; }", "public int getY(){ return yPosition; }", "public int getT...
[ "0.8033784", "0.8033784", "0.8033784", "0.8012419", "0.7814433", "0.77821964", "0.77165437", "0.7649627", "0.75938416", "0.75625813", "0.75570226", "0.75412196", "0.7495531", "0.74933165", "0.7492683", "0.749143", "0.7478956", "0.7474868", "0.7474868", "0.7464015", "0.7457080...
0.73151624
41
lista powiazanych plikow, plik zrodlowy bedzie musial miec zmienione odnosniki
private static List<Message> parse(File f, String sourceUrlString) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n...
[ "0.6361666", "0.6341713", "0.61500233", "0.6089464", "0.60821956", "0.606075", "0.60573435", "0.6036577", "0.5968363", "0.5946225", "0.5937256", "0.5933286", "0.5929844", "0.59194565", "0.5889543", "0.58604354", "0.58440256", "0.5798579", "0.5794226", "0.57822335", "0.5760002...
0.0
-1
replace all url() with base64
private static String processCss(String input, URL baseUrl) { //StringBuffer sb = new StringBuffer(input.length()); StringBuffer sb = new StringBuffer(); // (url\s{0,}\(\s{0,}['"]{0,1})([^\)'"]*)(['"]{0,1}\)) String regex = "(url\\s{0,}\\(\\s{0,}['\"]{0,1})([^\\'\")]*)(['\"]{0,1}\\))"; // input.replaceAll(regex, "$1"+"URL"+"$2$3"); // return input; Pattern p = Pattern.compile(regex, Pattern.DOTALL); Matcher m = p.matcher(input); while(m.find()) { try { URL url; if(m.group(2).startsWith("http")) { url = new URL(m.group(2)); } else if(m.group(2).startsWith("data:")) { url = null; } else { url = new URL(baseUrl, m.group(2)); } if(url != null) { Logger.warn(m.group() + " => " + url.toString()); try { String b64 = toBase64(url); m.appendReplacement(sb, Matcher.quoteReplacement(m.group(1)+b64+m.group(3))); } catch (IOException e) { Logger.error(e.toString()); } } } catch (MalformedURLException e) { Logger.error(e.toString()); } } m.appendTail(sb); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String base64Encode(String str) throws StoreFactoryException;", "default String codificarBase64(String contenido) {\n\t\tbyte[] encoded = Base64.getEncoder().encode(contenido.getBytes(StandardCharsets.UTF_8));\n\t\treturn new String(encoded);\n\t}", "public abstract String encodeURL(CharSequence url);",...
[ "0.61537874", "0.61199534", "0.6118563", "0.60236156", "0.60220456", "0.5969834", "0.5948016", "0.5946031", "0.59329516", "0.5929207", "0.58962166", "0.58330923", "0.5751143", "0.57446134", "0.5726292", "0.5709433", "0.5677416", "0.5667532", "0.5655728", "0.560121", "0.557305...
0.57254684
15
TODO Autogenerated method stub
@Override public Client createClient(Client client) throws RemoteException { client=clientManager.create(client); return client; }
{ "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
Table Column and fields description
public interface TorrentFieldInterface extends ProtocolConstants, TorrentConstants { public static String COLUMN_RES_DESC = "tblTorrentList.columnModel.column.titles"; public static String names[] = { "№", "Name", "Size","Progress", "Status", "Seed","Leech", "Dn speep","Up speed", "Upload" }; public static final String[] fields = { FIELD_ID, FIELD_NAME, FIELD_TOTALSIZE, FIELD_DONEPROGRESS, FIELD_STATUS, FIELD_SEEDERS, FIELD_LEECHERS, FIELD_RATEDOWNLOAD_VIS, FIELD_RATEUPLOAD_VIS, FIELD_UPLOADEDEVER_VIS }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FieldDesc getColumnDesc(int i);", "public TableDataColumn(Creation creation){\r\n\t\tsuper();\r\n\t\tthis.creation = creation;\r\n\t\tattributs.add(new AttributDescribe(false, (\"NAME_COLUMN\"+(getRowCount()+1)), \"VARCHAR2\", \"20\", false, false));\r\n\t}", "public interface Column{\n\t\tpublic abstract Stri...
[ "0.7076007", "0.6989467", "0.6911733", "0.6820711", "0.67792666", "0.6599976", "0.6561488", "0.6470061", "0.6451229", "0.6387135", "0.63812804", "0.6348178", "0.6330351", "0.6330351", "0.6330351", "0.62774986", "0.62704057", "0.62694645", "0.6263221", "0.6249448", "0.62161356...
0.0
-1