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 |
|---|---|---|---|---|---|---|
Qcom Preference add here | private void qcomInitPreferences(PreferenceGroup group){
ListPreference powerMode = group.findPreference(KEY_POWER_MODE);
ListPreference zsl = group.findPreference(KEY_ZSL);
ListPreference colorEffect = group.findPreference(KEY_COLOR_EFFECT);
ListPreference faceDetection = group.findPreference(KEY_FACE_DETECTION);
ListPreference touchAfAec = group.findPreference(KEY_TOUCH_AF_AEC);
ListPreference selectableZoneAf = group.findPreference(KEY_SELECTABLE_ZONE_AF);
ListPreference saturation = group.findPreference(KEY_SATURATION);
ListPreference contrast = group.findPreference(KEY_CONTRAST);
ListPreference sharpness = group.findPreference(KEY_SHARPNESS);
ListPreference autoExposure = group.findPreference(KEY_AUTOEXPOSURE);
ListPreference antiBanding = group.findPreference(KEY_ANTIBANDING);
ListPreference mIso = group.findPreference(KEY_ISO);
ListPreference lensShade = group.findPreference(KEY_LENSSHADING);
ListPreference histogram = group.findPreference(KEY_HISTOGRAM);
ListPreference denoise = group.findPreference(KEY_DENOISE);
ListPreference redeyeReduction = group.findPreference(KEY_REDEYE_REDUCTION);
ListPreference hfr = group.findPreference(KEY_VIDEO_HIGH_FRAME_RATE);
ListPreference hdr = group.findPreference(KEY_AE_BRACKET_HDR);
ListPreference jpegQuality = group.findPreference(KEY_JPEG_QUALITY);
ListPreference videoSnapSize = group.findPreference(KEY_VIDEO_SNAPSHOT_SIZE);
ListPreference pictureFormat = group.findPreference(KEY_PICTURE_FORMAT);
//BEGIN: Added by zhanghongxing at 2013-01-06 for DER-173
ListPreference videoColorEffect = group.findPreference(KEY_VIDEO_COLOR_EFFECT);
//END: Added by zhanghongxing at 2013-01-06
// ListPreference videoEffect = group.findPreference(KEY_VIDEO_EFFECT);
if (touchAfAec != null) {
filterUnsupportedOptions(group,
touchAfAec, mParameters.getSupportedTouchAfAec());
}
if (selectableZoneAf != null) {
filterUnsupportedOptions(group,
selectableZoneAf, mParameters.getSupportedSelectableZoneAf());
}
if (mIso != null) {
filterUnsupportedOptions(group,
mIso, mParameters.getSupportedIsoValues());
}
/* if (lensShade!= null) {
filterUnsupportedOptions(group,
lensShade, mParameters.getSupportedLensShadeModes());
}*/
if (redeyeReduction != null) {
filterUnsupportedOptions(group,
redeyeReduction, mParameters.getSupportedRedeyeReductionModes());
}
if (hfr != null) {
filterUnsupportedOptions(group,
hfr, mParameters.getSupportedVideoHighFrameRateModes());
}
if (denoise != null) {
filterUnsupportedOptions(group,
denoise, mParameters.getSupportedDenoiseModes());
}
if (pictureFormat != null) {
// getSupportedPictureFormats() returns the List<Integar>
// which need to convert to List<String> format.
List<Integer> SupportedPictureFormatsInIntArray = mParameters.getSupportedPictureFormats();
List<String> SupportedPictureFormatsInStrArray = new ArrayList<String>();
for (Integer picIndex : SupportedPictureFormatsInIntArray) {
SupportedPictureFormatsInStrArray.add(cameraFormatForPixelFormatVal(picIndex.intValue()));
}
// if(1 == mParameters.getInt("raw-format-supported")) {
// getSupportedPictureFormats() doesnt have the support for RAW Pixel format.
// so need to add explicitly the RAW Pixel Format.
// SupportedPictureFormatsInStrArray.add(PIXEL_FORMAT_RAW);
// }
//BEGIN: Modified by zhanghongxing at 2013-03-12 for FBD-115
// Remove the picture format.
// filterUnsupportedOptions(group, pictureFormat, SupportedPictureFormatsInStrArray);
filterUnsupportedOptions(group, pictureFormat, null);
//END: Modified by zhanghongxing at 2013-03-12
}
if (colorEffect != null) {
filterUnsupportedOptions(group,
colorEffect, mParameters.getSupportedColorEffects());
CharSequence[] entries = colorEffect.getEntries();
if(entries == null || entries.length <= 0 ) {
filterUnsupportedOptions(group, colorEffect, null);
}
}
if (antiBanding != null) {
filterUnsupportedOptions(group,
antiBanding, mParameters.getSupportedAntibanding());
}
if (autoExposure != null) {
filterUnsupportedOptions(group,
autoExposure, mParameters.getSupportedAutoexposure());
}
if (!mParameters.isPowerModeSupported())
{
filterUnsupportedOptions(group,
videoSnapSize, null);
}else{
filterUnsupportedOptions(group, videoSnapSize, sizeListToStringList(
mParameters.getSupportedPictureSizes()));
}
if (histogram!= null) {
filterUnsupportedOptions(group,
histogram, mParameters.getSupportedHistogramModes());
}
if (hdr!= null) {
// filterUnsupportedOptions(group,
// hdr, mParameters.getSupportedAEBracketModes());
}
//BEGIN: Added by zhanghongxing at 2013-01-06 for DER-173
if (videoColorEffect != null) {
//BEGIN: Modified by zhanghongxing at 2013-04-09 for FBD-722/723
//Remove the front camera video color effect.
filterUnsupportedOptions(group,
videoColorEffect, mParameters.getSupportedColorEffects());
CharSequence[] entries = videoColorEffect.getEntries();
if(entries == null || entries.length <= 0 ) {
filterUnsupportedOptions(group, videoColorEffect, null);
}
//END: Modified by zhanghongxing at 2013-04-09
}
//END: Added by zhanghongxing at 2013-01-06
// if (videoEffect != null) {
// filterUnsupportedOptions(group,
// videoEffect, mParameters.getSupportedColorEffects());
// }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface PreferenceHelper {\r\n // Preference Name\r\n String PREFERENCE_NAME = \"Embedded_Downloads_preference\";\r\n // Preference mode\r\n int PRIVATE_MODE = 0;\r\n String INITIAL_START = \"initial_start\";\r\n String WALLET_ADDRESS = \"wallet_address\";\r\n String WALLET_... | [
"0.6121963",
"0.60741264",
"0.5903876",
"0.5847316",
"0.582696",
"0.58043987",
"0.5763053",
"0.569668",
"0.567832",
"0.5664268",
"0.5643105",
"0.5642187",
"0.56295794",
"0.561026",
"0.55977094",
"0.55964404",
"0.5574035",
"0.55447835",
"0.5542584",
"0.55362576",
"0.55218965",... | 0.6144123 | 0 |
Add by wangbin at 201365 for backCamera picturesize 16 : 9;frontCamera 4 : 3. | private void needResetPictureSize(
PreferenceGroup group, ListPreference pictureSize) {
final double pictureSizeRatio = 0.75;
List<Size> pictureSizeTemp = new ArrayList<Size>();
int backCameraId = CameraHolder.instance().getBackCameraId();
if (mCameraId == backCameraId) {
List<Size> supported = mParameters.getSupportedPictureSizes();
for (Size size : supported) {
double ratio = (double)size.height / size.width;
if (size.width == 2592 || size.height == 1944) {
pictureSizeTemp.add(size);
}
if (ratio < pictureSizeRatio) {
pictureSizeTemp.add(size);
}
}
} else {
List<Size> supported = mParameters.getSupportedPictureSizes();
for (Size size : supported) {
double ratio = (double)size.height / size.width;
if (ratio >= pictureSizeRatio) {
pictureSizeTemp.add(size);
}
}
}
filterUnsupportedOptions(group, pictureSize, sizeListToStringList(pictureSizeTemp));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline r20) {\n /*\n r19 = this;\n r0 = r19\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n ... | [
"0.6898593",
"0.65821105",
"0.6515719",
"0.6411933",
"0.63914317",
"0.63451713",
"0.62909365",
"0.6230989",
"0.62129384",
"0.6177157",
"0.6150365",
"0.6108678",
"0.6087772",
"0.6078024",
"0.60158044",
"0.60135937",
"0.5977795",
"0.5959289",
"0.59389967",
"0.59294367",
"0.5905... | 0.0 | -1 |
Remove the preference if the parameter is not supported or there is only one options for the settings. | private void filterUnsupportedOptions(PreferenceGroup group,
ListPreference pref, List<String> supported) {
if (supported == null || supported.size() <= 1) {
if (pref instanceof IconListPreference){
((IconListPreference) pref).setAvailable(false);
} else {
removePreference(group, pref.getKey());
}
return;
}
pref.filterUnsupported(supported);
if (pref.getEntries().length <= 1 && !(pref instanceof IconListPreference
) && !pref.getKey().equals(CameraSettings.KEY_PICTURE_SIZE)) {
removePreference(group, pref.getKey());
return;
}
resetIfInvalid(pref);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void removePreferenceAndUpdateWidget(Context ctx) {\n IngredientSharedPreference.removePreferences(ctx);\n updateWidget(ctx);\n }",
"private void filterUnsupportedOptions(PreferenceGroup group,\n ListPreference pref, List<String> supported) {\n if (support... | [
"0.6492157",
"0.5898932",
"0.5860918",
"0.5755972",
"0.57512087",
"0.57363296",
"0.57359236",
"0.5656255",
"0.56542313",
"0.5634333",
"0.5620406",
"0.5600966",
"0.5541796",
"0.55199784",
"0.55039006",
"0.54537153",
"0.5445493",
"0.5406906",
"0.53961587",
"0.53914464",
"0.5373... | 0.60918987 | 1 |
Set the value to the first entry if it is invalid. | private void resetIfInvalid(ListPreference pref) {
String value = pref.getValue();
if (pref.findIndexOfValue(value) == NOT_FOUND) {
if(pref.getKey().equalsIgnoreCase(KEY_VIDEO_QUALITY)) {
return;
}
pref.setValueIndex(0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\tpublic E setFirst(E first) {\n\t\t\treturn pair.setFirst(first);\r\n\t\t}",
"@Override\r\n\t\tpublic T setFirst(T first) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.setFirst(first);\r\n\t\t\t}\r\n\t\t}",
"public void setFirst(@NotNull F first) {\n Condition.argNotNull(\"first... | [
"0.62385446",
"0.61684936",
"0.5647566",
"0.5449298",
"0.54397553",
"0.5408307",
"0.537732",
"0.52720875",
"0.5225788",
"0.5220117",
"0.51914346",
"0.5176404",
"0.5169309",
"0.5166385",
"0.51661265",
"0.51204276",
"0.5091856",
"0.5073179",
"0.5066864",
"0.5061961",
"0.5050706... | 0.0 | -1 |
The id stored in the preference may be out of range if we are running inside the emulator and a webcam is removed. Note: This method accesses the global preferences directly, not the combo preferences. | private static void upgradeCameraId(SharedPreferences pref) {
int cameraId = readPreferredCameraId(pref);
if (cameraId == 0) return; // fast path
int n = CameraHolder.instance().getNumberOfCameras();
if (cameraId < 0 || cameraId >= n) {
writePreferredCameraId(pref, 0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCameraIdPref();",
"public int getActiveId(){\n if (this.id == -1){\n //if id is not set which it should be but in the case it isn't grab from shared preferences.\n //check if the shared preferences even has a deck id to begin with\n this.id = this.sharedPreferences.... | [
"0.69554275",
"0.6016704",
"0.600847",
"0.5916876",
"0.55549216",
"0.549617",
"0.54384905",
"0.5383091",
"0.53452015",
"0.53452015",
"0.53395313",
"0.53322786",
"0.53301525",
"0.52639174",
"0.52484",
"0.51981914",
"0.519593",
"0.51643026",
"0.51590693",
"0.51473886",
"0.51372... | 0.59955204 | 3 |
private int checkSupportedVideoQuality(List supported) | private static boolean checkSupportedVideoQuality(int width, int height){
List <Size> supported = mParameters.getSupportedVideoSizes();
int flag = 0;
for (Size size : supported){
//since we are having two profiles with same height, we are checking with height
if (size.height == 480) {
if (size.height == height && size.width == width) {
flag = 1;
break;
}
} else {
if (size.width == width) {
flag = 1;
break;
}
}
}
if (flag == 1)
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasQualityMax();",
"boolean hasQuality();",
"boolean hasQuality();",
"private void getClosestSupportedQuality(Camera.Parameters parameters) {\n\n\t\t// Resolutions\n\t\tString supportedSizesStr = \"Supported resolutions: \";\n\t\tList<Size> supportedSizes = parameters.getSupportedPreviewSizes();\n\t\... | [
"0.732272",
"0.7127495",
"0.7127495",
"0.6735421",
"0.63350517",
"0.6324739",
"0.62996876",
"0.6230857",
"0.6214253",
"0.61221814",
"0.6115919",
"0.604493",
"0.60337",
"0.6019617",
"0.60193",
"0.6010434",
"0.5988962",
"0.5894127",
"0.5889171",
"0.5874684",
"0.5874191",
"0.5... | 0.75107497 | 0 |
semantica stato: 0 ok, 1 rotto, 1 inesistente. | public int getIdPosto() {
return idPosto;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente... | [
"0.6405102",
"0.60512596",
"0.6027496",
"0.60119456",
"0.6001616",
"0.5965525",
"0.596153",
"0.591337",
"0.58665526",
"0.5837422",
"0.58307153",
"0.57833654",
"0.5764092",
"0.5748362",
"0.5732945",
"0.57126844",
"0.57075346",
"0.5692968",
"0.5690373",
"0.56696635",
"0.565919"... | 0.0 | -1 |
Define os ID's dos TextView's e define a fonte do TextView. | private void instanciarTextButtons(){
for (int buttons : textIds) {
TextView btn = findViewById(buttons);
ComponentesAuxiliares.definirFonte(this, btn);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setCustomFont(TextView textview, Context context, AttributeSet attrs) {\n TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CTextViewDefault);\n String font = a.getString(R.styleable.CTextViewDefault_customFont);\n setCustomFont(textview, font, context);\n ... | [
"0.65323806",
"0.6406759",
"0.6338221",
"0.6303898",
"0.6302491",
"0.62679064",
"0.62514526",
"0.61997956",
"0.6197929",
"0.6181735",
"0.6179879",
"0.61656857",
"0.61081016",
"0.60381854",
"0.6020874",
"0.601296",
"0.60062706",
"0.5986078",
"0.5964827",
"0.5963591",
"0.596189... | 0.618692 | 9 |
Checks if the current screen configuration is landscape. | public static boolean isLandscape(Configuration configuration) {
return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isLandscape() {\n WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n return display.getWidth() > display.getHeight();\n }",
"private boolean isLandscapeOrientation(){\n return getResources().getConfigu... | [
"0.79325515",
"0.7584878",
"0.7173606",
"0.67723036",
"0.64941376",
"0.63583326",
"0.6127166",
"0.59075016",
"0.58865124",
"0.5839776",
"0.5819711",
"0.58075947",
"0.5793882",
"0.56975275",
"0.568887",
"0.5654815",
"0.56415874",
"0.5640042",
"0.56200725",
"0.56166095",
"0.560... | 0.72688884 | 2 |
Checks if the current screen configuration is portrait. | public static boolean isPortrait(Configuration configuration) {
return configuration.orientation == Configuration.ORIENTATION_PORTRAIT;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isPortrait() {\n return mState.isPortrait;\n }",
"private static boolean isLandscapePortraitValue(String pageSizeChunk) {\n return CssConstants.LANDSCAPE.equals(pageSizeChunk) || CssConstants.PORTRAIT.equals(pageSizeChunk);\n }",
"public boolean isLandscape() {\n WindowMan... | [
"0.711066",
"0.6194316",
"0.6119361",
"0.5887963",
"0.5849719",
"0.58311516",
"0.57519907",
"0.57057554",
"0.56178695",
"0.5596457",
"0.5565808",
"0.5531844",
"0.5529746",
"0.55044127",
"0.5458112",
"0.54489917",
"0.5421315",
"0.5413144",
"0.5401853",
"0.5375731",
"0.5363127"... | 0.719711 | 0 |
to check whether playlist with that name exists. command: create / set n | public static void checkNameExist(String name, UserProfile userProfile) throws PlaylistExceptions {
for (String log : userProfile.getPlaylistNames()) {
if (name.equals(log)) {
throw new PlaylistExceptions("ohno u already have a playlist with the same name :( "
+ "pls try again with another name for this playlist");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkIfNameExists(String name) {\n String[] projection = {\n MediaStore.Audio.Playlists._ID,\n MediaStore.Audio.Playlists.NAME\n };\n\n String selection = MediaStore.Audio.Playlists.NAME + \" = ? \";\n String[] selectionArgs = {\n ... | [
"0.7042761",
"0.64775324",
"0.63478994",
"0.6332471",
"0.6297799",
"0.623306",
"0.6181726",
"0.60344964",
"0.5981701",
"0.5979369",
"0.5929053",
"0.5923976",
"0.59018755",
"0.5838587",
"0.57990146",
"0.57955915",
"0.5795385",
"0.5758375",
"0.57542336",
"0.5752014",
"0.5731056... | 0.5958103 | 10 |
to check whether a particular movie can be added to playlist. command: add m | public static void checkMovieForAdd(MovieInfoObject movie, Playlist playlist) throws PlaylistExceptions {
boolean flag = false;
for (PlaylistMovieInfoObject log : playlist.getMovies()) {
if (movie.getID() == log.getID()) {
flag = true;
break;
}
}
if (flag) {
throw new PlaylistExceptions("ohno the movie < " + movie.getMovieTitle()
+ " > has already been added to this playlist :( pls try again with another movie");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasVideo();",
"public boolean addVideo(Video newVideo)throws NullPointerException;",
"boolean addPlayer(String player);",
"public boolean addSongstoPlaylist(String songTitle, List<Song> songLinkedList){\n Song checkedSong = findSong(songTitle);\n if(checkedSong != null){\n so... | [
"0.59758514",
"0.587781",
"0.56940544",
"0.5622105",
"0.5606752",
"0.55863315",
"0.55798995",
"0.54960144",
"0.5488065",
"0.54684055",
"0.5407726",
"0.54075396",
"0.53445125",
"0.53283113",
"0.5318145",
"0.5284893",
"0.5253413",
"0.5250857",
"0.5250681",
"0.52311325",
"0.5230... | 0.6741115 | 0 |
to check whether a particular movie can be removed from playlist. command: remove m | public static void checkMovieForRemove(MovieInfoObject movie, Playlist playlist) throws PlaylistExceptions {
boolean flag = true;
for (PlaylistMovieInfoObject log : playlist.getMovies()) {
if (movie.getID() == log.getID()) {
flag = false;
break;
}
}
if (flag) {
throw new PlaylistExceptions("ohno the movie < " + movie.getMovieTitle()
+ " > does not belong to this playlist :( pls try again with another movie");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean removeVideo(Video video)throws NullPointerException;",
"public boolean removeMovie(String t)\n\t{\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tMovie temp_movie = itr.next();\n\t\t\tif(temp_movie.getTitle().equals(t))\n\t\t\t{\n\t\t\t\treturn list_of... | [
"0.687078",
"0.67774755",
"0.6366602",
"0.63058794",
"0.6210117",
"0.6104201",
"0.59656405",
"0.5854873",
"0.5811881",
"0.5801108",
"0.57844985",
"0.57805216",
"0.5774747",
"0.5752967",
"0.573871",
"0.57082295",
"0.5688322",
"0.56830907",
"0.5666769",
"0.5645753",
"0.56192833... | 0.6941312 | 0 |
to check whether playlist name in playload exists. command: set / add / remove / clear / delete | public static void checkPayloadPlaylist(String name, UserProfile userProfile) throws PlaylistExceptions {
boolean flag = true;
for (String log : userProfile.getPlaylistNames()) {
if (name.equals(log)) {
flag = false;
break;
}
}
if (flag) {
throw new PlaylistExceptions("ohno the playlist < " + name
+ " > does not exist :( pls try again with another playlist");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkIfNameExists(String name) {\n String[] projection = {\n MediaStore.Audio.Playlists._ID,\n MediaStore.Audio.Playlists.NAME\n };\n\n String selection = MediaStore.Audio.Playlists.NAME + \" = ? \";\n String[] selectionArgs = {\n ... | [
"0.7142417",
"0.67297494",
"0.6695938",
"0.65883183",
"0.6213765",
"0.6175934",
"0.6145562",
"0.61320806",
"0.6108329",
"0.58795613",
"0.58398896",
"0.5832676",
"0.582396",
"0.5783689",
"0.5770834",
"0.5760149",
"0.5744062",
"0.56948084",
"0.56932664",
"0.56511575",
"0.564981... | 0.62800306 | 4 |
to check whether the index indicated is out of range. command: add m / remove m | public static void checkIndex(int i, int size) throws PlaylistExceptions {
if ((i < 0) || (i >= size)) {
throw new PlaylistExceptions("ohno the index < " + i
+ "> does not exist :( pls try again with another index");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isOutOfBounds(int index) {\n return index < 0 || index >= this.size();\n }",
"private boolean validateIndex(int index)\n {\n return index >= 0;\n }",
"private boolean validIndex(int index)\n {\n if(index >= 0 && index < songs.size())\n return true;\n ... | [
"0.688794",
"0.6773798",
"0.66075444",
"0.65098375",
"0.6502128",
"0.6492859",
"0.6406963",
"0.6406123",
"0.6347794",
"0.6220703",
"0.6217127",
"0.6211299",
"0.61683387",
"0.6145282",
"0.6049717",
"0.6042616",
"0.60255134",
"0.5987254",
"0.5955926",
"0.59427494",
"0.5936313",... | 0.5653025 | 42 |
Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code! | private void $$$setupUI$$$() {
mainPanel = new JPanel();
mainPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));
mainPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
servicesButton = new JButton();
servicesButton.setText("Services management");
panel1.add(servicesButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
surveysManagementButton = new JButton();
surveysManagementButton.setText("Surveys management");
panel1.add(surveysManagementButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
connectingAndResultsButton = new JButton();
connectingAndResultsButton.setText("Conecting surveys to services");
panel1.add(connectingAndResultsButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label1 = new JLabel();
label1.setText("Choose option below");
panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
results = new JButton();
results.setText("Browse the results");
panel1.add(results, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tpublic void guiTinNhan() {\n\n\t}",
"@Override\n\tprotected void setValueOnUi() {\n\n\t}",
"@Override\n public void initGUI() {\n\n }",
"private void $$$setupUI$$$() {\n ST = ... | [
"0.69449884",
"0.69449884",
"0.677618",
"0.6600125",
"0.6541412",
"0.64937764",
"0.6454206",
"0.64535457",
"0.64373714",
"0.64083403",
"0.6360807",
"0.6325067",
"0.6290529",
"0.62835795",
"0.62804085",
"0.6251332",
"0.62084395",
"0.6167931",
"0.61440414",
"0.6136206",
"0.6136... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setUp() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void cast() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void display() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onPlayerHit(Player p) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onEntityHit(LivingEntity ent) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onSpellHit(Spell spell) {
if (spell.getName().contains("Antlitz der Göttin")){
caster.setFlying(false);
caster.setAllowFlight(false);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onBlockHit(Block block) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDeath() {
} | {
"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 |
Start of interval != currentTime | @Test
public void testGetPlannedCapacity_Linear_Interval() {
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerLinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 300, 900), 1e-8);
assertEquals(car.sumUsedPhases*150.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerLinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 450, 600), 1e-8);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerLinear.getPlannedCapacityNonlinear(chargingStation, car, 300, 900, 1500), 1e-8);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isNewInterval();",
"public int setInterval(){\r\n if(interval == 0){\r\n gamePanel.setGameLoop(false);\r\n\r\n gamePanel.GameOver();\r\n time.cancel();\r\n }\r\n return --interval;\r\n }",
"public boolean act(long currentTime) {\n\t\tif(mEnded ||... | [
"0.6295101",
"0.62637985",
"0.6184059",
"0.61056125",
"0.60549396",
"0.6046311",
"0.60300976",
"0.5988463",
"0.58979243",
"0.58910716",
"0.5845134",
"0.5816826",
"0.58138144",
"0.57189906",
"0.57109433",
"0.5675686",
"0.56360406",
"0.5627041",
"0.5597793",
"0.55973214",
"0.55... | 0.0 | -1 |
Nonlinear scheduler Start of interval = currentTime | @Test
public void testGetPlannedCapacity_Nonlinear() {
assertEquals(car.sumUsedPhases*900.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 0, 900), 1e-8);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 300, 300, 900), 1e-8);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 0, 600), 1e-8);
assertEquals(car.sumUsedPhases*300.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 300, 300, 600), 1e-8);
assertEquals(car.sumUsedPhases*1200.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 300, 300, 1500), 1e-8);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.SECONDS);\n }",
"public synchronized void start(long period){\n\t\ttickHandle = scheduler.scheduleAtFixedRate(tickTask, 0, period, TimeUnit.MILLISECONDS);\t \n\t}",
"private void beginSchedule(){\n\t\tD... | [
"0.64320356",
"0.63839775",
"0.6272222",
"0.6135235",
"0.60534805",
"0.60201216",
"0.5873678",
"0.58613527",
"0.5779941",
"0.57772136",
"0.57612896",
"0.5759834",
"0.57574606",
"0.57418096",
"0.5732557",
"0.57317454",
"0.57044584",
"0.56902975",
"0.56836337",
"0.56547016",
"0... | 0.0 | -1 |
Start of interval != currentTime | @Test
public void testGetPlannedCapacity_Nonlinear_Interval() {
assertEquals(0, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 0, 0), 0);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 300, 900), 1e-8);
assertEquals(car.sumUsedPhases*150.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 0, 450, 600), 1e-8);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacityNonlinear(chargingStation, car, 300, 900, 1500), 1e-8);
assertEquals(0, schedulerNonlinear.getPlannedCapacity(chargingStation, car, 0, 0, 0), 0);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacity(chargingStation, car, 0, 300, 900), 1e-8);
assertEquals(car.sumUsedPhases*150.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacity(chargingStation, car, 0, 450, 600), 1e-8);
assertEquals(car.sumUsedPhases*600.0/3600*chargePlan[0]*CONSTANTS.CHARGING_EFFICIENCY, schedulerNonlinear.getPlannedCapacity(chargingStation, car, 300, 900, 1500), 1e-8);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isNewInterval();",
"public int setInterval(){\r\n if(interval == 0){\r\n gamePanel.setGameLoop(false);\r\n\r\n gamePanel.GameOver();\r\n time.cancel();\r\n }\r\n return --interval;\r\n }",
"public boolean act(long currentTime) {\n\t\tif(mEnded ||... | [
"0.6295101",
"0.62637985",
"0.6184059",
"0.61056125",
"0.60549396",
"0.6046311",
"0.60300976",
"0.5988463",
"0.58979243",
"0.58910716",
"0.5845134",
"0.5816826",
"0.58138144",
"0.57189906",
"0.57109433",
"0.5675686",
"0.56360406",
"0.5627041",
"0.5597793",
"0.55973214",
"0.55... | 0.0 | -1 |
Test exactness of nonlinear filling charge plans | @Test
public void testFillChargingNonlinear_EmptyCar_ExhaustiveDesiredCapacity() {
Simulation.verbosity = 0;
int startTimeSeconds = 0;
double desiredCapacityInterval = 1;
double desiredCapacity = desiredCapacityInterval;
while (desiredCapacity <= car.getMaxCapacity()) {
//System.out.println("desiredCapacity=" + desiredCapacity);
car.setCurrentPlan(new double[96]);
schedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity,
TimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX),
startTimeSeconds);
assertEquals(desiredCapacity, schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-2);
desiredCapacity += desiredCapacityInterval;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void testFillChargingPlan_Nonlinear_HighInitialSoC() {\n\t\tdouble initialSoC = 0.99;\r\n\t\tint startTimeSeconds = 0;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\tdouble desiredCapacity = car.getMissingCapacity();\r\n\t\t\r\n\t\t\r... | [
"0.6267436",
"0.61854583",
"0.6142715",
"0.6121043",
"0.588554",
"0.57682467",
"0.5692977",
"0.5678515",
"0.5671582",
"0.5598533",
"0.5578938",
"0.5558766",
"0.5548086",
"0.55320495",
"0.55143636",
"0.5505211",
"0.5489944",
"0.5485985",
"0.5485764",
"0.54506415",
"0.5424477",... | 0.6032841 | 4 |
Test exactness of nonlinear filling charge plans | @Test
public void testFillChargingNonlinear_HighInitialSoC_ExhaustiveDesiredCapacity() {
Simulation.verbosity = 0;
int startTimeSeconds = 0;
// Charge until soc=0.9
double initialSoC = 0.9;
while (car.carBattery.getSoC() < initialSoC) {
car.addChargedCapacity(1, 32);
}
double desiredCapacity = 0.1;
while (desiredCapacity <= car.getMissingCapacity()) {
car.setCurrentPlan(new double[96]);
schedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity,
TimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX),
startTimeSeconds);
double plannedCapacity = schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds);
//System.out.println("desiredCapacity=" + desiredCapacity + "Ah, plannedCapacity=" + plannedCapacity);
assertEquals(desiredCapacity, plannedCapacity, 1e-2);
desiredCapacity+=0.1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void testFillChargingPlan_Nonlinear_HighInitialSoC() {\n\t\tdouble initialSoC = 0.99;\r\n\t\tint startTimeSeconds = 0;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\tdouble desiredCapacity = car.getMissingCapacity();\r\n\t\t\r\n\t\t\r... | [
"0.6267436",
"0.61854583",
"0.6121043",
"0.6032841",
"0.588554",
"0.57682467",
"0.5692977",
"0.5678515",
"0.5671582",
"0.5598533",
"0.5578938",
"0.5558766",
"0.5548086",
"0.55320495",
"0.55143636",
"0.5505211",
"0.5489944",
"0.5485985",
"0.5485764",
"0.54506415",
"0.5424477",... | 0.6142715 | 2 |
InitialSoC = 0.9 Charge until soc=0.9 | @Test
public void testFillChargingPlan_Linear_HighInitialSoC() {
double initialSoC = 0.9;
int startTimeSeconds = 0;
while (car.carBattery.getSoC() < initialSoC) {
car.addChargedCapacity(1, 32);
}
double desiredCapacity = car.getMissingCapacity();
// Linear
car.setCurrentPlan(new double[96]);
schedulerLinear.fillChargingPlan(car, chargingStation, desiredCapacity,
TimeslotSorter.getSortedTimeslots(null, 0, 95, TimeslotSortingCriteria.INDEX),
startTimeSeconds);
//System.out.println("DesiredCapactiy: " + desiredCapacity);
//System.out.println("Planned capacity: " + schedulerLinear.getPlannedCapacity(chargingStation, car, startTimeSeconds));
//System.out.println(Arrays.toString(car.getCurrentPlan()));
assertTrue(car.getCurrentPlan()[0] > 0);
assertEquals(car.getMissingCapacity(), schedulerLinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-6);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object setInitialCash(double initcash)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setInitialCash : \" + \"Agent\");\r\n/* 86 */ \tthis.initialcash = initcash;\r\n/* 87 */ \treturn this;\r\n/* */ }",
"public void initAccount() {\n initAccount(Huobi.PLATFORM_NAME, ... | [
"0.62059385",
"0.5920158",
"0.5903048",
"0.5764473",
"0.56774384",
"0.5618457",
"0.5611388",
"0.5577242",
"0.55347395",
"0.54021704",
"0.536589",
"0.53580445",
"0.53449225",
"0.5337885",
"0.528776",
"0.5246613",
"0.52343476",
"0.52203757",
"0.5198906",
"0.51791054",
"0.515892... | 0.5667041 | 5 |
InitialSoC = 0.9 Charge until soc=0.9 | @Test
public void testFillChargingPlan_Nonlinear_HighInitialSoC() {
double initialSoC = 0.99;
int startTimeSeconds = 0;
while (car.carBattery.getSoC() < initialSoC) {
car.addChargedCapacity(1, 32);
}
double desiredCapacity = car.getMissingCapacity();
// Nonlinear
car.setCurrentPlan(new double[96]);
schedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity,
TimeslotSorter.getSortedTimeslots(null, 0, 95, TimeslotSortingCriteria.INDEX),
startTimeSeconds);
//System.out.println(Arrays.toString(car.getCurrentPlan()));
//System.out.println(schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds));
assertEquals(car.getMissingCapacity(), schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-8);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object setInitialCash(double initcash)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setInitialCash : \" + \"Agent\");\r\n/* 86 */ \tthis.initialcash = initcash;\r\n/* 87 */ \treturn this;\r\n/* */ }",
"public void initAccount() {\n initAccount(Huobi.PLATFORM_NAME, ... | [
"0.62059385",
"0.5920158",
"0.5764473",
"0.56774384",
"0.5667041",
"0.5618457",
"0.5611388",
"0.5577242",
"0.55347395",
"0.54021704",
"0.536589",
"0.53580445",
"0.53449225",
"0.5337885",
"0.528776",
"0.5246613",
"0.52343476",
"0.52203757",
"0.5198906",
"0.51791054",
"0.515892... | 0.5903048 | 2 |
Create new views (invoked by the layout manager) | @Override
public AdapterNewsow.MyViewHolder onCreateViewHolder(ViewGroup parent,
int viewType) {
// create a new view
View v = LayoutInflater.from(parent.getContext())
.inflate(R.layout.news_sr_view, parent, false);
MyViewHolder vh = new MyViewHolder(v);
return vh;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"View createView();",
"private void addViews() {\n\t}",
"@Override\n public void Create() {\n\n initView();\n }",
"ViewContainer createViewContainer();",
"private void createView() {\n\t\tTabWidget tWidget = (TabWidget) findViewById(android.R.id.tabs);\r\n\t\tshowLayout = (LinearLayout) LayoutI... | [
"0.73330516",
"0.7290258",
"0.72524214",
"0.6896963",
"0.6842908",
"0.67892873",
"0.6757536",
"0.66984254",
"0.6675081",
"0.66690147",
"0.6597825",
"0.658943",
"0.65769076",
"0.6563808",
"0.6537989",
"0.6486454",
"0.6471762",
"0.64565444",
"0.64475906",
"0.64475906",
"0.63975... | 0.0 | -1 |
Replace the contents of a view (invoked by the layout manager) | @Override
public void onBindViewHolder(MyViewHolder holder, int position) {
// - get element from your dataset at this position
// - replace the contents of the view with that element
holder.textView.setText(mDataset.get(position).tresc);
Picasso.get().load(mDataset.get(position).miniaturka).into(holder.imageView);
holder.cardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, WyswietlanieNewsaActivity.class);
intent.putExtra("url", mDataset.get(position).link);
context.startActivity(intent);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setView(View view);",
"void updateView();",
"void updateView();",
"void setView(View v);",
"@Override\n\tpublic void setView(View view) {\n\n\t}",
"public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}",
"public void replaceView(){\n ... | [
"0.70212805",
"0.69806224",
"0.69806224",
"0.69289434",
"0.68319106",
"0.67423284",
"0.6719235",
"0.66682535",
"0.6551954",
"0.65405315",
"0.64150465",
"0.6410784",
"0.6404721",
"0.6383419",
"0.6347588",
"0.62931347",
"0.62602854",
"0.6247691",
"0.6201184",
"0.6193189",
"0.61... | 0.0 | -1 |
Return the size of your dataset (invoked by the layout manager) | @Override
public int getItemCount() {
return mDataset.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int dimensions() {\n return this.data[0].length;\n }",
"Dimension getSize();",
"Dimension getSize();",
"public int getDataSize() {\n\t\treturn (int)this.getSize(data);\n\t}",
"public int getSize() {\n\t\treturn width + length;\n\t}",
"public int get_size() {\r\n return this.dimens... | [
"0.7193386",
"0.71875966",
"0.71875966",
"0.7131573",
"0.7046541",
"0.7036978",
"0.70349944",
"0.70336044",
"0.69905853",
"0.69406134",
"0.6937759",
"0.6907996",
"0.6904331",
"0.6874467",
"0.6849123",
"0.6834903",
"0.6814243",
"0.67925316",
"0.6785474",
"0.67618626",
"0.67610... | 0.0 | -1 |
Created by arauj on 23/03/2017. | public interface Draw {
void draw();
} | {
"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\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public final void mo51373a() {\n }",
"@Overri... | [
"0.5967138",
"0.5802166",
"0.572806",
"0.5698575",
"0.56981295",
"0.5696865",
"0.5667619",
"0.5667619",
"0.5611151",
"0.5610684",
"0.56027955",
"0.5586026",
"0.554368",
"0.55225015",
"0.5517948",
"0.5515607",
"0.5511663",
"0.550879",
"0.54941076",
"0.5492279",
"0.54866594",
... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) throws HttpException, IOException {
String smsTemplate="你好, 测试短信通知为%s";
String parameter=" ";
String a[]=parameter.trim().split("\\|");
Boolean b=StringUtils.isBlank(parameter.trim());
System.out.println(b);
String smsContent = String.format(smsTemplate,a);
//String smsContent = String.format(smsTemplate, (StringUtils.isBlank(parameter.trim()) ? "" :a));
System.out.println(smsContent);
LocalDateTime l=LocalDateTime.now();
System.out.println(l);
LocalTime midnight = LocalTime.MIDNIGHT;
LocalDate tomorrow = LocalDate.now().plusDays(1);
LocalDateTime x = LocalDateTime.of(tomorrow, midnight);
System.out.println(x);
LocalTime now=LocalTime.now();
System.out.println(now.getHour());
System.out.println(now.getMinute());
System.out.println(now.getSecond());
String s = "templateCode==SMS_46165066&&signName==Radius服务&&msg==866834";
String[] str = s.split("&&");
for (String s1 : str) {
System.out.println(s1);
}
long ll=1496751143000L;
Timestamp reportTime=new Timestamp(ll);
System.out.println(reportTime);
LocalDateTime end=LocalDateTime.now();
//三天之前
LocalDateTime start=end.minusDays(3);
Timestamp startTime=Timestamp.from(start.atZone(ZoneId.systemDefault()).toInstant());
Timestamp endTime=Timestamp.from(end.atZone(ZoneId.systemDefault()).toInstant());
System.out.println(startTime);
System.out.println(endTime);
int i=10;
System.out.println(String.format("dsfasf %s", i));
System.out.println(LocalDateTime.now().toLocalDate());
} | {
"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 |
Toast toast = Toast.makeText (this, "Button is clicked", Toast.LENGTH_LONG); Toast.makeText (this, "Button is clicked", Toast.LENGTH_LONG).show(); toast.show(); Snackbar snackbar = Snackbar.make(v, "Button was clicked. This is a snackbar.", Snackbar.LENGTH_LONG); snackbar.show(); myButton.setText("Hello"); | public void displayMsg (View v) {
Intent i = new Intent (this, SecondActivity.class);
startActivity(i);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showToast(View clickedButton) {\n String greetingText = getString(R.string.greeting_text);\n Toast tempMessage\n = Toast.makeText(this, greetingText,\n Toast.LENGTH_SHORT);\n tempMessage.show();\n }",
"void showToast(String message);",
"... | [
"0.7164836",
"0.6892891",
"0.6892891",
"0.6829395",
"0.6744639",
"0.66427124",
"0.6557952",
"0.652363",
"0.6499013",
"0.64751685",
"0.6446539",
"0.64355135",
"0.64343137",
"0.64265424",
"0.64066446",
"0.6405626",
"0.6384289",
"0.63681287",
"0.6362165",
"0.6350398",
"0.6346751... | 0.0 | -1 |
any sub class of Shape can be passed here | public static void displayShape(Shape shape) {
System.out.println("************************************************");
System.out.println("Area of shape is " + shape.area());
System.out.println("Perimeter of shape is " + shape.perimeter());
System.out.println("************************************************");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void drawShape(Shape s) {\n }",
"protected Shape() {}",
"public interface Shape {\n\t/**\n\t * Calculates and returns the area of the object\n\t * @return\n\t */\n\tpublic abstract double getArea();\n\t\n\t/**\n\t * Returns the Color of the object.\n\t * @return\n\t */\n\tpublic abstract Color getColor();\n... | [
"0.737234",
"0.7243574",
"0.70147437",
"0.6980189",
"0.68906015",
"0.68889874",
"0.6836946",
"0.6802431",
"0.67591244",
"0.6709267",
"0.67017496",
"0.66938627",
"0.66804683",
"0.6672718",
"0.6631811",
"0.6618498",
"0.659917",
"0.65864104",
"0.65719044",
"0.6558587",
"0.655266... | 0.0 | -1 |
Game over if there is no snake alive | @Override
public void run()
{
if (this.world.countSnakes() == 0)
{
Debug.log("Game.actionP: Game closing due to lack of snakes alive");
Dialog.nonBlockingMessage("Snak", "Game over!");
close();
return;
}
// Keep the amount of eggs
int numEatables = this.world.countSnakes();
for (int i = this.world.countEatables(); i < numEatables; i++)
this.world.add(new Egg(this.world.findEmptyCell()));
// Makes moves and paint
Set<Snake> dead = this.world.move();
if (this.server != null)
{
List<Element> elements = new ArrayList<Element>(this.world.getSnakes());
elements.addAll(this.world.getEatables());
Debug.log("HostG.actionP: Elements: " + elements);
this.server.sendFrame(elements.toArray(new Element[0]));
for (Snake snake : dead)
this.server.notifyDeath(snake);
}
this.world.repaint();
// Turn off keyboard listener if player's snake is dead
if (dead.contains(this.player))
{
this.frame.removeKeyListener(this);
if (this.world.countSnakes() > 0)
Dialog.nonBlockingMessage("Snak",
new MessagePanel()
.add("Your snake is dead! :(")
.add("But allow the players to finish! :)")
);
}
// Remove dead bots and genereate their next movements
Iterator<Bot> botIt = this.bots.iterator();
while (botIt.hasNext())
{
Bot bot = botIt.next();
if (dead.contains(bot))
botIt.remove();
else
bot.generateNextMovement();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }",
"public void checkGameOver() {\n if(snake.getX() < 0 || snake.getX() > WIDTH - 4) { setGameState(GameState.GAME_OVER); }\n if(snake.getY() < 0 || snake.getY() > HEIGHT - 4) { setGameSt... | [
"0.7835172",
"0.7805446",
"0.739794",
"0.7206042",
"0.7201201",
"0.7188736",
"0.7163386",
"0.7146054",
"0.7143851",
"0.71410877",
"0.71183175",
"0.70735556",
"0.70664525",
"0.70258456",
"0.70068705",
"0.696064",
"0.69517726",
"0.69477373",
"0.6944536",
"0.6938607",
"0.6915263... | 0.6618542 | 50 |
/ No configuration for this manager | public void loadConfigurations(Dictionary configurations) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ConfigManager() {\n // Nobody here.\n }",
"private Config() {\n }",
"@Override\n protected Path getConfigurationPath() {\n return null;\n }",
"@Override\n public boolean hasAdditionalConfig() { return true; }",
"@Override\n public AbstractConfiguration get... | [
"0.65283835",
"0.62581235",
"0.62447786",
"0.6241234",
"0.6150129",
"0.6109895",
"0.6071123",
"0.6013832",
"0.5984509",
"0.59839565",
"0.59839565",
"0.59839565",
"0.59839565",
"0.59812963",
"0.59425193",
"0.59338367",
"0.5932679",
"0.58937776",
"0.5890233",
"0.5889845",
"0.58... | 0.0 | -1 |
/ No initialization required | public boolean init() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void init() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void init() {}",
"private void init() {\n }",
"private void init() {\n\n\n\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Overr... | [
"0.6989161",
"0.69638824",
"0.69098866",
"0.68672925",
"0.68621844",
"0.6829974",
"0.68294823",
"0.68294823",
"0.68294823",
"0.68294823",
"0.68294823",
"0.68043673",
"0.68043673",
"0.68043673",
"0.67921185",
"0.6769564",
"0.676841",
"0.6753568",
"0.6753568",
"0.6753568",
"0.6... | 0.0 | -1 |
/ No disposing phase | public void dispose() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void doDispose() {\n\t}",
"@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tprotected void dispose() {\n\t\t\r\n\t}",
"@Override\n \t\t\tpublic void dispose() {\n \n \t\t\t}",
"private void dispose() {\n\n\t}",
"@Override\n\t\t\tpub... | [
"0.78071135",
"0.7692707",
"0.7468198",
"0.7430242",
"0.7395277",
"0.7390092",
"0.7342287",
"0.7342212",
"0.7342212",
"0.7342212",
"0.7342212",
"0.7342212",
"0.7342212",
"0.7342212",
"0.7342212",
"0.7296696",
"0.7296696",
"0.7290817",
"0.7290817",
"0.7290817",
"0.7290817",
... | 0.0 | -1 |
Initializer for a column/parameter default. | public void init(
Object defaultTree,
Object defaultText)
{
this.defaultTree = (ValueNode) defaultTree;
this.defaultText = (String) defaultText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initDefaultValues() {\n }",
"protected String getDefaultColumnName(int col)\r\n {\n return \"\";\r\n }",
"public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ thi... | [
"0.64220196",
"0.61528504",
"0.6091842",
"0.59082675",
"0.5829472",
"0.58273953",
"0.58273953",
"0.57426643",
"0.57380915",
"0.57244956",
"0.56306034",
"0.56215984",
"0.561254",
"0.55910534",
"0.55829567",
"0.55424726",
"0.55424726",
"0.5522303",
"0.54917884",
"0.5491756",
"0... | 0.0 | -1 |
Get the text of the default. | public String getDefaultText()
{
return defaultText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String getDefaultText() {\n\t\treturn DEFAULT_TEXT;\n\t}",
"public String getDefaultText() {\n\t\tif (null != this.defaultText) {\n\t\t\treturn this.defaultText;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"defaultText\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesCo... | [
"0.8515577",
"0.79004425",
"0.77510047",
"0.76619947",
"0.7518478",
"0.7492185",
"0.739493",
"0.7340335",
"0.71082383",
"0.7046193",
"0.69971675",
"0.69971675",
"0.68473816",
"0.6819781",
"0.6819781",
"0.68159765",
"0.68151593",
"0.67687935",
"0.6762772",
"0.67522764",
"0.675... | 0.84815943 | 1 |
Get the query tree for the default. | ValueNode getDefaultTree()
{
return defaultTree;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"WeakerAccess\")\n public static QueryOptions defaultOptions() {\n return new Builder().build();\n }",
"public Query advancedQuery() \n {\n return null;\n }",
"public abstract T queryRootNode();",
"public NestedClause getXQueryClause();",
"void resetTreeForQueries() {\n... | [
"0.5819044",
"0.58164954",
"0.57175153",
"0.5528912",
"0.5429641",
"0.5407271",
"0.5388661",
"0.535378",
"0.5344371",
"0.5342742",
"0.53363264",
"0.52702445",
"0.52375615",
"0.5174662",
"0.51640755",
"0.51584315",
"0.5149574",
"0.51459837",
"0.51241183",
"0.51143116",
"0.5096... | 0.59376633 | 0 |
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing. | public String toString()
{
if (SanityManager.DEBUG)
{
return "columnName: " + columnName + "\n" +
"defaultText: " + defaultText + "\n" +
super.toString();
}
else
{
return "";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() {\n return tree.toString();\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }",
"public String toString() {\n if (subTrees.isEmpty(... | [
"0.79048127",
"0.75851786",
"0.74755263",
"0.7455304",
"0.7402389",
"0.7401323",
"0.7371622",
"0.7366222",
"0.73480034",
"0.73249984",
"0.7270662",
"0.7262455",
"0.72246075",
"0.7187225",
"0.71656674",
"0.71477824",
"0.70737296",
"0.70711935",
"0.706732",
"0.7060377",
"0.7044... | 0.0 | -1 |
Prints the subnodes of this object. See QueryTreeNode.java for how tree printing is supposed to work. | public void printSubNodes(int depth)
{
if (SanityManager.DEBUG)
{
super.printSubNodes(depth);
if (defaultTree != null) {
printLabel(depth, "defaultTree:");
defaultTree.treePrint(depth + 1);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printSubNodes(int depth) {\r\n super.printSubNodes(depth);\r\n\r\n if (orderByList != null) {\r\n printLabel(depth, \"orderByList: \");\r\n orderByList.treePrint(depth + 1);\r\n }\r\n if (offset != null) {\r\n printLabel(depth, \"offset: \");... | [
"0.76190794",
"0.75582707",
"0.74716336",
"0.7031258",
"0.70160806",
"0.69968814",
"0.69593483",
"0.6931406",
"0.69294614",
"0.68918127",
"0.6865441",
"0.68406564",
"0.68079984",
"0.6775077",
"0.6774368",
"0.6745037",
"0.67237127",
"0.67130595",
"0.67001987",
"0.6696274",
"0.... | 0.676338 | 15 |
Bind this expression. This means binding the subexpressions, as well as figuring out what the return type is for this expression. In this case, there are no subexpressions, and the return type is already known, so this is just a stub. | @Override
public ValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
List<AggregateNode> aggregateVector) throws StandardException {
ColumnDescriptor cd;
TableDescriptor td;
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(fromList.size() != 0,
"fromList expected to be non-empty");
if (! (fromList.elementAt(0) instanceof FromBaseTable))
{
SanityManager.THROWASSERT(
"fromList.elementAt(0) expected to be instanceof FromBaseTable, not " +
fromList.elementAt(0).getClass().getName());
}
}
// Get the TableDescriptor for the target table
td = ((FromBaseTable) fromList.elementAt(0)).getTableDescriptor();
// Get the ColumnDescriptor for the column
cd = td.getColumnDescriptor(columnName);
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(cd != null,
"cd expected to be non-null");
}
/* If we have the default text, then parse and bind it and
* return the tree.
*/
DefaultInfoImpl defaultInfo = (DefaultInfoImpl) cd.getDefaultInfo();
if (defaultInfo != null)
{
String defaultText = defaultInfo.getDefaultText();
ValueNode defaultTree = parseDefault(defaultText, getLanguageConnectionContext(),
getCompilerContext());
/* Query is dependent on the DefaultDescriptor */
DefaultDescriptor defaultDescriptor = cd.getDefaultDescriptor(
getDataDictionary());
getCompilerContext().createDependency(defaultDescriptor);
return defaultTree.bindExpression(
fromList,
subqueryList,
aggregateVector);
}
else
{
// Default is null
ValueNode nullNode = (ValueNode) getNodeFactory().getNode(
C_NodeTypes.UNTYPED_NULL_CONSTANT_NODE,
getContextManager());
return nullNode;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void visit(NumericBind arg0) {\n\t\t\n\t}",
"Expression getBindingExpression();",
"@Override\n\tpublic void bind() {\n\t\t\n\t}",
"CloseableIteration<BindingSet, QueryEvaluationException> evaluate(TupleExpr expr, BindingSet bindings) {\n BindingSetPipeIterator root = new BindingSet... | [
"0.58442205",
"0.5610539",
"0.5374254",
"0.53532827",
"0.5292975",
"0.528198",
"0.5204112",
"0.5196685",
"0.5196685",
"0.5104448",
"0.5098645",
"0.50952345",
"0.50432026",
"0.50153595",
"0.50153595",
"0.50112915",
"0.4975209",
"0.49569106",
"0.49199587",
"0.49179053",
"0.4895... | 0.48080567 | 24 |
Parse a default and turn it into a query tree. | public static ValueNode parseDefault
(
String defaultText,
LanguageConnectionContext lcc,
CompilerContext cc
)
throws StandardException
{
Parser p;
ValueNode defaultTree;
/* Get a Statement to pass to the parser */
/* We're all set up to parse. We have to build a compilable SQL statement
* before we can parse - So, we goober up a VALUES defaultText.
*/
String values = "VALUES " + defaultText;
/*
** Get a new compiler context, so the parsing of the select statement
** doesn't mess up anything in the current context (it could clobber
** the ParameterValueSet, for example).
*/
CompilerContext newCC = lcc.pushCompilerContext();
p = newCC.getParser();
/* Finally, we can call the parser */
// Since this is always nested inside another SQL statement, so topLevel flag
// should be false
Visitable qt = p.parseStatement(values);
if (SanityManager.DEBUG)
{
if (! (qt instanceof CursorNode))
{
SanityManager.THROWASSERT(
"qt expected to be instanceof CursorNode, not " +
qt.getClass().getName());
}
CursorNode cn = (CursorNode) qt;
if (! (cn.getResultSetNode() instanceof RowResultSetNode))
{
SanityManager.THROWASSERT(
"cn.getResultSetNode() expected to be instanceof RowResultSetNode, not " +
cn.getResultSetNode().getClass().getName());
}
}
defaultTree = ((ResultColumn)
((CursorNode) qt).getResultSetNode().getResultColumns().elementAt(0)).
getExpression();
lcc.popCompilerContext(newCC);
return defaultTree;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Query parse(String userQuery, String defaultOperator) {\n\n\t\ttry\n\t\t{\n\t\t\tif(userQuery != null && !\"\".equals(userQuery))\n\t\t\t{\n\t\t\t\treturn new Query(new QueryEvaluators(userQuery.trim(), defaultOperator));\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new QueryParserException();\n\t\t}\n\t\tcat... | [
"0.6533377",
"0.58156115",
"0.5476647",
"0.54396325",
"0.5351241",
"0.5271763",
"0.50052273",
"0.48931575",
"0.48710528",
"0.48458964",
"0.48207092",
"0.47935614",
"0.47591686",
"0.47591686",
"0.4746354",
"0.47430572",
"0.47132573",
"0.47037566",
"0.47005537",
"0.46934786",
"... | 0.68079454 | 0 |
Check input params and tart the deployment | @SuppressWarnings("rawtypes")
@Override
public boolean perform( AbstractBuild build, Launcher launcher, BuildListener listener ) throws InterruptedException, IOException {
env = build.getEnvironment( listener );
// deployment only, if build is successfully
if ( build.getResult().isWorseOrEqualTo( Result.FAILURE) ) {
listener.getLogger().println( "[WSO2 CAR Deployer] WSO2 CAR upload: STOP, due to worse build result!" );
return true; // nothing to do
}
listener.getLogger().println( "[WSO2 CAR Deployer] WSO2 CAR upload initiated (baseDir="+build.getArtifactsDir().getPath()+")" );
try {
// validate input and get variable values
String xCarSource = checkParam( carSource, "AAR source", listener );
String xCarTargetFileName = checkParam( carTargetFileName, "AAR target file name", listener );
String xWso2URL = checkParam( wso2URL, "WSO2 Server URL", listener );
String xWso2AdminUser = checkParam( wso2AdminUser, "WSO2 admin user", listener );
String xWso2AdminPwd = checkParam( wso2AdminPwd, "WSO2 admin password", listener );
if ( ! xWso2URL.endsWith("/") ) {
xWso2URL += "/";
}
boolean result = true;
FilePath[] aarList = build.getWorkspace().list( xCarSource );
if ( aarList.length == 0 ) {
listener.error( "[WSO2 CAR Deployer] No CAR file found for '"+xCarSource+"'" );
return false;
} else if ( aarList.length != 1 ) {
listener.error( "[WSO2 CAR Deployer] Multiple CAR files found for '"+xCarSource+"'" );
for ( FilePath aarFile : aarList ) {
listener.getLogger().println( "AAR is n="+aarFile.toURI() );
}
return false;
} else {
for ( FilePath aarFile : aarList ) {
listener.getLogger().println( "[WSO2 CAR Deployer] CAR file is = "+ aarFile.toURI() );
listener.getLogger().println( "[WSO2 CAR Deployer] CAR file size = "+ aarFile.length() );
listener.getLogger().println( "[WSO2 CAR Deployer] CAR target is = "+xCarTargetFileName );
InputStream fileIs = aarFile.read();
Wso2CarDeployClient deployer = new Wso2CarDeployClient( xWso2URL, xWso2AdminUser, xWso2AdminPwd, listener );
result = deployer.uploadCAR( fileIs, xCarTargetFileName, appType );
}
}
return result;
} catch ( Exception e ) {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }",
"protected void check() throws IOException, ServletException {\n if(... | [
"0.6062106",
"0.5991514",
"0.5871298",
"0.5796813",
"0.5692857",
"0.5670601",
"0.56544167",
"0.56326085",
"0.5519622",
"0.54639244",
"0.5400746",
"0.5390653",
"0.5386344",
"0.53835624",
"0.53835624",
"0.5355629",
"0.5346408",
"0.5343777",
"0.5313268",
"0.5313268",
"0.5309531"... | 0.48077613 | 69 |
Validate input and get variable values (if set) | private String checkParam( String param, String logName, BuildListener listener ) throws Exception {
String result = param;
if ( StringUtils.isBlank( param ) ) {
listener.error( "[WSO2 Deployer] "+logName+" must be set!" );
throw new Exception("param is blanc");
} else {
if ( param.startsWith( "$" ) ) {
String envVar = param.substring( 1 );
listener.getLogger().println( "[WSO2 Deployer] '"+logName+"' from env var: $"+envVar );
result = env.get( envVar );
if ( result == null ) {
listener.error( "[WSO2 Deployer] $"+envVar+" is null (check parameter names and settings)" );
throw new Exception("var is null");
}
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getVariable(){\n Scanner kb = new Scanner(System.in);\n String variable = null;\n\n System.out.println(\"Enter the variable you would like to solve for: \");\n variable = kb.nextLine().toLowerCase();\n\n // check to make sure it is a valid variable name\n if( !variable.equals... | [
"0.6268099",
"0.6176839",
"0.57469285",
"0.55962145",
"0.5584806",
"0.5575104",
"0.55619717",
"0.5472053",
"0.5446511",
"0.5446056",
"0.54295397",
"0.54295397",
"0.5428321",
"0.5418954",
"0.5416335",
"0.5410525",
"0.540577",
"0.539769",
"0.5351174",
"0.53499585",
"0.5348492",... | 0.0 | -1 |
Indicates that this builder can be used with all kinds of project types | @SuppressWarnings("rawtypes")
public boolean isApplicable( Class<? extends AbstractProject> aClass ) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isApplicable(@SuppressWarnings(\"rawtypes\") Class<? extends AbstractProject> jobType) {\n return true;\n }",
"@Override\n public boolean isApplicable(Class<? extends AbstractProject> aClass) {\n return true;\n }",
"private void enabl... | [
"0.62362224",
"0.606702",
"0.5810815",
"0.5791235",
"0.5483283",
"0.538888",
"0.52587545",
"0.52521807",
"0.52510583",
"0.5239883",
"0.52306116",
"0.52286583",
"0.52286583",
"0.52286583",
"0.52122164",
"0.50723934",
"0.50695616",
"0.5060683",
"0.4994687",
"0.497559",
"0.49569... | 0.5290973 | 6 |
This human readable name is used in the configuration screen. | public String getDisplayName() {
return "Deploy Carbon App (CAR) to WSO2 Server or ESB";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDisplayName() {\n return configName;\n }",
"@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }",
"String getConfigName();",
"public Stri... | [
"0.7679259",
"0.72417116",
"0.7200004",
"0.70196754",
"0.6946507",
"0.6917227",
"0.6904815",
"0.68846756",
"0.6854029",
"0.6854029",
"0.6845874",
"0.6821106",
"0.6819099",
"0.68154126",
"0.68154126",
"0.68154126",
"0.68154126",
"0.68154126",
"0.68154126",
"0.6811028",
"0.6809... | 0.6516998 | 61 |
To check whether two Array Type is suitable | @Override
public Boolean isSuitableAs(Type rhs) {
//since an array can be null
if (rhs == null || rhs == virtualArrayType) return true;
return rhs instanceof ArrayType
&& baseType.isSuitableAs(((ArrayType) rhs).baseType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void arraysEqualsWithEqualArraysReturnsTrue() {\n\n Class<?>[] arrayOne = { String.class, Integer.class };\n Class<?>[] arrayTwo = { String.class, Integer.class };\n\n assertThat(Arrays.equals(arrayOne, arrayTwo)).isTrue();\n }",
"private boolean rangeEquals(Object [] b1, Object [] b2, ... | [
"0.6639211",
"0.65939957",
"0.6450498",
"0.63862544",
"0.6371096",
"0.62576944",
"0.62534773",
"0.61826223",
"0.6102738",
"0.6064846",
"0.6063146",
"0.6004729",
"0.60012674",
"0.5948352",
"0.59307146",
"0.5930621",
"0.5896929",
"0.5885216",
"0.58730304",
"0.58693206",
"0.5841... | 0.64690787 | 2 |
the address is 4 words | @Override
public int variableSize() {
return CONSTANT.wordSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"String getAddress(int type);",
"String getAddress();",
"String getAddress();",
"private void ... | [
"0.6924732",
"0.6924732",
"0.6924732",
"0.6924732",
"0.6924732",
"0.6924732",
"0.6807321",
"0.6804668",
"0.6804668",
"0.67047584",
"0.6476646",
"0.643301",
"0.63929254",
"0.6335558",
"0.6294324",
"0.62603503",
"0.6243924",
"0.62169135",
"0.6204325",
"0.62000805",
"0.61995673"... | 0.0 | -1 |
TODO Autogenerated method stub setContentView(R.layout.activity_add_location_1); | @Override
protected void onCreate(Bundle savedInstanceState) {
View view = View.inflate(this, R.layout.activity_add_location_1, null);
setContentView(view);
keting = (ImageView) view.findViewById(R.id.myActivity);
woshi = (ImageView) view.findViewById(R.id.myFollow);
chufang = (ImageView) view.findViewById(R.id.myWallet);
cesuo = (ImageView) view.findViewById(R.id.myScroll);
shufang = (ImageView) view.findViewById(R.id.myEnroll);
bangongshi = (ImageView) view.findViewById(R.id.myShare);
editlocation = (EditText) view.findViewById(R.id.editlocation);
locationname = (TextView) view.findViewById(R.id.text_get_location);
saveButton = (Button) view.findViewById(R.id.save);
cancleButton = (Button) view.findViewById(R.id.cancel);
background1=view.findViewById(R.id.background1);
background2=view.findViewById(R.id.background2);
background3=view.findViewById(R.id.background3);
background4=view.findViewById(R.id.background4);
background5=view.findViewById(R.id.background5);
background6=view.findViewById(R.id.background6);
Intent intent=getIntent();
concenter=(Concenter) intent.getExtras().getSerializable("con");
EventBus.getDefault().register(this);
displayImage(keting, R.drawable.keting);
displayImage(woshi, R.drawable.woshi);
displayImage(chufang, R.drawable.chufang);
displayImage(cesuo, R.drawable.cesuo);
displayImage(shufang, R.drawable.shufang);
displayImage(bangongshi, R.drawable.bangongshi);
keting.setOnClickListener(this);
woshi.setOnClickListener(this);
chufang.setOnClickListener(this);
cesuo.setOnClickListener(this);
shufang.setOnClickListener(this);
bangongshi.setOnClickListener(this);
saveButton.setOnClickListener(this);
cancleButton.setOnClickListener(this);
super.onCreate(savedInstanceState);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.location);\n setUpMapIfNeeded();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n ... | [
"0.68141454",
"0.648343",
"0.6413855",
"0.64133394",
"0.62505764",
"0.62387663",
"0.62134314",
"0.61638117",
"0.614534",
"0.6144721",
"0.60959506",
"0.60732925",
"0.60162145",
"0.599533",
"0.59201837",
"0.58696806",
"0.58232296",
"0.58154255",
"0.5809865",
"0.57811016",
"0.57... | 0.6017834 | 12 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.myActivity:
locationname.setText("客厅");
background1.setVisibility(View.VISIBLE);
background2.setVisibility(View.GONE);
background3.setVisibility(View.GONE);
background4.setVisibility(View.GONE);
background5.setVisibility(View.GONE);
background6.setVisibility(View.GONE);
break;
case R.id.myFollow:
locationname.setText("卧室");
background1.setVisibility(View.GONE);
background2.setVisibility(View.VISIBLE);
background3.setVisibility(View.GONE);
background4.setVisibility(View.GONE);
background5.setVisibility(View.GONE);
background6.setVisibility(View.GONE);
break;
case R.id.myWallet:
locationname.setText("厨房");
background1.setVisibility(View.GONE);
background2.setVisibility(View.GONE);
background3.setVisibility(View.VISIBLE);
background4.setVisibility(View.GONE);
background5.setVisibility(View.GONE);
background6.setVisibility(View.GONE);
break;
case R.id.myScroll:
locationname.setText("厕所");
background1.setVisibility(View.GONE);
background2.setVisibility(View.GONE);
background3.setVisibility(View.GONE);
background4.setVisibility(View.VISIBLE);
background5.setVisibility(View.GONE);
background6.setVisibility(View.GONE);
break;
case R.id.myEnroll:
locationname.setText("书房");
background1.setVisibility(View.GONE);
background2.setVisibility(View.GONE);
background3.setVisibility(View.GONE);
background4.setVisibility(View.GONE);
background5.setVisibility(View.VISIBLE);
background6.setVisibility(View.GONE);
break;
case R.id.myShare:
locationname.setText("办公室");
background1.setVisibility(View.GONE);
background2.setVisibility(View.GONE);
background3.setVisibility(View.GONE);
background4.setVisibility(View.GONE);
background5.setVisibility(View.GONE);
background6.setVisibility(View.VISIBLE);
break;
case R.id.cancel:
finish();
break;
case R.id.save:
if (TextUtils.isEmpty(editlocation.getText().toString())) {
Toast.makeText(Activity_addLocation_background.this, "请填写区域名", Toast.LENGTH_SHORT).show();
break;
}
Intent intent = new Intent();
Bundle bundle=new Bundle();
bundle.putString("LocationName", editlocation.getText().toString());
bundle.putString("image", locationname.getText().toString());
bundle.putSerializable("con", concenter);
intent.putExtras(bundle);
intent.setClass(Activity_addLocation_background.this,
CopyOfActivity_addLocation_Detail_test.class);
startActivity(intent);
break;
}
} | {
"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 |
when init the adapter, init the each UI field. In our case, only the club title. | @Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) {
Log.d(TAG, "onBindViewHolder: " + ((RecmdClubViewHolder) viewHolder).title);
((RecmdClubViewHolder) viewHolder).title.setText(mClubList.get(i).getName());
//show joined clubs
//String list of all club
if (mClubJoined != null) {
if (mClubList.get(i) != null) {
if (mClubJoined.contains(mClubList.get(i).getName()))
((RecmdClubViewHolder) viewHolder).isJoined.setVisibility(View.VISIBLE);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void init() {\n if (getSupportActionBar() != null &&\n (presenter.getRepositoryName() != null && !presenter.getRepositoryName().isEmpty())) {\n getSupportActionBar().setTitle(presenter.getRepositoryName());\n }\n\n rcvItems.setLayoutManager(new LinearLayoutMan... | [
"0.6390139",
"0.62631464",
"0.6182472",
"0.61563134",
"0.61083084",
"0.60790557",
"0.60566574",
"0.6051364",
"0.59856844",
"0.59331757",
"0.5921904",
"0.58982337",
"0.587916",
"0.58515066",
"0.58485955",
"0.58438385",
"0.58424735",
"0.5836973",
"0.58057344",
"0.58013904",
"0.... | 0.58410853 | 17 |
TODO Autogenerated method stub List leveltr = new ArrayList(); | public static void main(String[] args) {
System.out.print(treeByLevels(new Node(new Node(null, new Node(null, null, 4), 2),
new Node(new Node(null, null, 5), new Node(null, null, 6), 3), 1)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.util.List<message.Figure.FigureData.FigureLevelTable> \n getLevelTableListList();",
"public List<Level> getLevels() {\n return levels;\n }",
"public java.util.List<message.Figure.FigureData.FigureLevelTable> getLevelTableListList() {\n return java.util.Collections.unmodifiableL... | [
"0.72313607",
"0.71148944",
"0.68848366",
"0.68341714",
"0.6733512",
"0.6696425",
"0.6532165",
"0.6429168",
"0.64239067",
"0.6369367",
"0.6333516",
"0.632964",
"0.6305594",
"0.6295484",
"0.626188",
"0.62599164",
"0.62535363",
"0.62472403",
"0.62436354",
"0.6228873",
"0.622406... | 0.0 | -1 |
============================ constructor ============================ construct zero complex number | public Complex() {
this(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Complex() {\r\n real = 0;\r\n imaginary = 0;\r\n }",
"Complex() {\n real = 0.0;\n imag = 0.0;\n }",
"public Complex(){\r\n\t this(0,0);\r\n\t}",
"public MComplex() {\r\n\t\ta = b = r = phi = 0;\r\n\t\tcartesian = polar = true;\r\n\t}",
"public Complex(double real) ... | [
"0.8465765",
"0.83462936",
"0.7876267",
"0.7819795",
"0.7428572",
"0.724451",
"0.72311103",
"0.7133822",
"0.71068925",
"0.7091393",
"0.7056951",
"0.7002833",
"0.6997297",
"0.69828326",
"0.6956418",
"0.6936805",
"0.6917691",
"0.68647903",
"0.68546546",
"0.67604715",
"0.6731790... | 0.8081104 | 2 |
construct the complex number given real number | public Complex(double real) {
this(real, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexNumber fromReal(double real) {\n\t\treturn new ComplexNumber(real, 0);\n\t}",
"Complex(double r, double i) {\n real = r;\n imag = i;\n }",
"public ComplexNumber(double real, double imaginary) {\n this.real = real;\n this.imaginary = imaginary;\n }",
"pub... | [
"0.74985784",
"0.7288056",
"0.727196",
"0.72086376",
"0.7182332",
"0.709703",
"0.707995",
"0.69683385",
"0.69509345",
"0.69502103",
"0.69107807",
"0.6905113",
"0.68590695",
"0.67460454",
"0.6739587",
"0.6725877",
"0.66773",
"0.66399723",
"0.66325146",
"0.66271013",
"0.6567913... | 0.6694353 | 16 |
construct the complex number with given numbers | public Complex(double real, double imaginary) {
r = real;
i = imaginary;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Complex(double r, double i) {\n real = r;\n imag = i;\n }",
"Complex() {\n real = 0.0;\n imag = 0.0;\n }",
"public Complex_Number(double realPart,double imaginaryPart)\n {\n this(realPart,imaginaryPart,1);\n }",
"public Complex(String cStr){\r\n\t\tthis(cStr.rep... | [
"0.668406",
"0.6672369",
"0.6598352",
"0.6591056",
"0.64830625",
"0.6481076",
"0.6474795",
"0.6456446",
"0.6441392",
"0.6400478",
"0.63850063",
"0.6358982",
"0.6357495",
"0.62644196",
"0.6257458",
"0.6244281",
"0.62412035",
"0.62394255",
"0.61900437",
"0.6121164",
"0.6102497"... | 0.6044485 | 23 |
construct with given complex number | public Complex(Complex c) {
r = c.r;
i = c.i;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Complex() {\n real = 0.0;\n imag = 0.0;\n }",
"Complex(double r, double i) {\n real = r;\n imag = i;\n }",
"public Complex_Number(double realPart,double imaginaryPart)\n {\n this(realPart,imaginaryPart,1);\n }",
"public Complex_Number(double realPart)\n {\n ... | [
"0.7463339",
"0.73987144",
"0.71497196",
"0.71172434",
"0.706857",
"0.699145",
"0.69891846",
"0.69455934",
"0.69228023",
"0.69191605",
"0.6917858",
"0.69123346",
"0.6909867",
"0.68763053",
"0.6862999",
"0.68374",
"0.68244714",
"0.67498815",
"0.6740938",
"0.6734633",
"0.671626... | 0.6563646 | 24 |
get angle [PI ~ +PI] (radian) | public double getAngle() {
if (r == 0) {
if (i == 0)
return 0;// error?
if (i > 0)
return p2;
else
return -p2;
}
double d = Math.atan(i / r);
if (r >= 0) {
return d;
}
if (i >= 0)
return Math.PI + d;
return d + Math.PI;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getAngle();",
"double getAngle();",
"public double getAngle();",
"private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(nor... | [
"0.79614425",
"0.79614425",
"0.7846126",
"0.7799907",
"0.7563241",
"0.75461507",
"0.75303346",
"0.7495341",
"0.74886507",
"0.7420293",
"0.73694414",
"0.73686486",
"0.7303344",
"0.72871035",
"0.7275948",
"0.72685933",
"0.72643745",
"0.72032756",
"0.7193448",
"0.7185129",
"0.71... | 0.82012767 | 0 |
get square of scalar length | public double getSquareLength() {
return r * r + i * i;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float lengthSquared ( );",
"public double lengthsq()\n {\n return Math.pow(this.x, 2) + Math.pow(this.y, 2);\n }",
"public double squareMagnitude() {\n\t\treturn x*x + y*y + z*z;\n\t}",
"abstract double getLengthSquared();",
"LengthScalarMultiply createLengthScalarMultiply();",
"publi... | [
"0.7289892",
"0.70007825",
"0.6927719",
"0.68846333",
"0.6819145",
"0.67395777",
"0.6689747",
"0.6658152",
"0.65630645",
"0.6532941",
"0.6498511",
"0.6431605",
"0.64056605",
"0.6392945",
"0.63710946",
"0.63269466",
"0.62918836",
"0.62916994",
"0.62752783",
"0.6257676",
"0.623... | 0.7303779 | 0 |
make a new complex conjugate object | public Complex getConjugate() {
return new Complex(r, -i);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Complex conjugate() {\r\n return new Complex(this.getReal(), this.getImag() * -1);\r\n }",
"public Complex getConjugate() {\n\t\treturn new Complex(real, -imaginary);\n\t}",
"public Quaternion conjugate()\n {\n x = -x;\n y = -y;\n z = -z;\n\n return this;\n }",
"C... | [
"0.78990227",
"0.7516371",
"0.6991997",
"0.6855107",
"0.643517",
"0.6434377",
"0.6335275",
"0.63157177",
"0.6189118",
"0.6186287",
"0.6144797",
"0.6004532",
"0.597957",
"0.5950613",
"0.59452987",
"0.5944252",
"0.5931645",
"0.5919953",
"0.5917526",
"0.59066445",
"0.58939874",
... | 0.7410291 | 2 |
============================ Argeburaical operation ============================ swap the numbers between a and b | public static void swap(Complex a, Complex b) {
double t;
t = a.r;
a.r = b.r;
b.r = t;
t = a.i;
a.i = b.i;
b.i = t;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void swap(int a, int b) {\n sequence.swap(a, b);\n }",
"public static void inplaceSwap(int a, int b) {\n a = a - b;\n b = a + b;\n a = b - a;\n }",
"public static void swap(int a1, int b1) {\t\t\n\t\tint temp = algorithmThree[a1];\n\t\talgorithmThree[a1] = algorithmThre... | [
"0.8292206",
"0.80098903",
"0.78132516",
"0.7783356",
"0.7781892",
"0.7769482",
"0.7720494",
"0.7712224",
"0.770692",
"0.7691555",
"0.7550798",
"0.750298",
"0.74940735",
"0.74569374",
"0.74350435",
"0.7420282",
"0.7410251",
"0.7386693",
"0.73730046",
"0.7366435",
"0.7357347",... | 0.6898853 | 68 |
multiplication by real number | public Complex mult(double d) {
return new Complex(r * d, i * d);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BaseNumber multiply(BaseNumber operand);",
"public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"public void multiply() {\n\t\t\n\t}",
"private void mul() {\n\n\t}",
"private static native double mul(int n);",
"abstract... | [
"0.72628653",
"0.715821",
"0.7034909",
"0.6995099",
"0.6977902",
"0.69590986",
"0.6934703",
"0.69297844",
"0.6849659",
"0.68337405",
"0.67287385",
"0.6601626",
"0.65756196",
"0.6566826",
"0.6550299",
"0.6477983",
"0.6477347",
"0.64534616",
"0.6447731",
"0.6442832",
"0.6435113... | 0.0 | -1 |
multiplication by real number and substitution | public Complex mults(double d) {
r *= d;
i *= d;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BaseNumber multiply(BaseNumber operand);",
"public void multiply() {\n\t\t\n\t}",
"public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"void multiply(double value);",
"Multiply createMultiply();",
"private void mul() {\... | [
"0.73351824",
"0.7111608",
"0.70148283",
"0.69787955",
"0.6841266",
"0.68389034",
"0.6788145",
"0.6724901",
"0.669035",
"0.66896766",
"0.66130674",
"0.6543313",
"0.65258026",
"0.64851135",
"0.64837724",
"0.64031905",
"0.6371308",
"0.63688916",
"0.6350801",
"0.63377166",
"0.63... | 0.0 | -1 |
division by real number | public Complex div(double d) {
return new Complex(r / d, i / d);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void div(double val) {\r\n\t\tresult = result / val;\r\n\t}",
"BaseNumber divide(BaseNumber operand);",
"public static double div() {\n System.out.println(\"Enter dividend\");\n double a = getNumber();\n System.out.println(\"Enter divisor\");\n double b = getNumber();\n\n ret... | [
"0.7317165",
"0.7125888",
"0.68301886",
"0.678731",
"0.6660326",
"0.66344064",
"0.6630466",
"0.6624399",
"0.6605084",
"0.65460074",
"0.65429914",
"0.6530229",
"0.65199846",
"0.64765805",
"0.6472309",
"0.6449208",
"0.643768",
"0.6407659",
"0.6365799",
"0.6351129",
"0.63434815"... | 0.0 | -1 |
division by real number and substitution | public Complex divs(double d) {
r /= d;
i /= d;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BaseNumber divide(BaseNumber operand);",
"void div(double val) {\r\n\t\tresult = result / val;\r\n\t}",
"public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand)... | [
"0.7203128",
"0.70584345",
"0.6767079",
"0.65307003",
"0.6460253",
"0.64486593",
"0.6409624",
"0.64005435",
"0.6341123",
"0.6282601",
"0.62653893",
"0.6262309",
"0.62393135",
"0.6233615",
"0.62258846",
"0.622156",
"0.62073004",
"0.6164114",
"0.6163418",
"0.61472285",
"0.61445... | 0.0 | -1 |
transform "double" array objects into Complex array object | public static Complex[] translate(double[] ar, double[] ai) {
Complex[] ac = new Complex[ar.length];
for (int i = 0; i < ac.length; i++)
ac[i] = new Complex(ar[i], ai[i]);
return ac;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Complex[] double2Complex(double[] d) {\r\n\t\tComplex[] complexArr = new Complex[d.length];\r\n\t\tComplex com;\r\n\t\tfor (int i = 0; i < d.length; i++) {\r\n\t\t\tcom = new Complex(d[i], 0);\r\n\t\t\tcomplexArr[i] = com;\r\n\t\t}\r\n\t\treturn complexArr;\r\n\t}",
"public abstract double[] toDoub... | [
"0.65162617",
"0.62448585",
"0.60971886",
"0.6093078",
"0.6082169",
"0.58679867",
"0.57165766",
"0.5591844",
"0.55141747",
"0.5491745",
"0.5425579",
"0.54044276",
"0.53875303",
"0.53721946",
"0.5367195",
"0.5364126",
"0.53328717",
"0.5323468",
"0.53224415",
"0.532083",
"0.530... | 0.505089 | 41 |
transform Complex array object into "double" array object | public static double[][] translate(Complex[] ac) {
double[][] ret = new double[2][ac.length];
for (int i = 0; i < ac.length; i++) {
ret[0][i] = ac[i].r;
ret[1][i] = ac[i].i;
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract double[] toDoubleArray();",
"double[][] asDouble();",
"public static Number[][] array2Object(double[][] array) {\n Number[][] ret = new Number[array.length][];\n for (int i = 0; i < array.length; i++) {\n ret[i] = ArrayUtils.toObject(array[i]);\n }\n return ret;\n }",
"publi... | [
"0.7449689",
"0.70693666",
"0.6529474",
"0.6520579",
"0.6447995",
"0.6426409",
"0.6418888",
"0.6337683",
"0.62820786",
"0.62399435",
"0.6166494",
"0.61410034",
"0.6116912",
"0.6039977",
"0.6014491",
"0.59958416",
"0.59861064",
"0.59756374",
"0.5958412",
"0.5823271",
"0.581873... | 0.5842919 | 19 |
transform "double "array object into Complex array object | public static Complex[] translate(double[] ar) {
Complex[] ac = new Complex[ar.length];
for (int i = 0; i < ac.length; i++)
ac[i] = new Complex(ar[i], 0);
return ac;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Complex[] double2Complex(double[] d) {\r\n\t\tComplex[] complexArr = new Complex[d.length];\r\n\t\tComplex com;\r\n\t\tfor (int i = 0; i < d.length; i++) {\r\n\t\t\tcom = new Complex(d[i], 0);\r\n\t\t\tcomplexArr[i] = com;\r\n\t\t}\r\n\t\treturn complexArr;\r\n\t}",
"public abstract double[] toDoub... | [
"0.6442013",
"0.63140005",
"0.6226616",
"0.6136406",
"0.59827584",
"0.57826257",
"0.57614154",
"0.56598514",
"0.5634441",
"0.55316705",
"0.54935807",
"0.5478458",
"0.54698354",
"0.54655683",
"0.54601413",
"0.54404235",
"0.54404235",
"0.54404235",
"0.54298514",
"0.5429543",
"0... | 0.58977145 | 5 |
a structure is a basic component of any block but is nothing more complicated than a contiguous chunk of space. | public interface Structure
{
int getStart();
int getEnd();
/**
* set position to start position.
*/
void moveToStart();
/**
* set position to end position.
*/
void moveToEnd();
/**
* reset to factory settings
*/
void reset();
int size();
ByteBuffer getByteBuffer();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Structure createStructure();",
"@Override\r\n\tpublic boolean isStructure() {\n\t\treturn false;\r\n\t}",
"public Structure getStructure() {\n/* 3557 */ return this.structure;\n/* */ }",
"@Override\n\tpublic boolean isMemberOfStructure() {\n\t\treturn false;\n\t}",
"public Struct(String a, int b... | [
"0.6926609",
"0.6756979",
"0.66576105",
"0.63894683",
"0.61471987",
"0.60197186",
"0.5965247",
"0.5914392",
"0.5913224",
"0.58941567",
"0.58231086",
"0.57914186",
"0.57910556",
"0.5746446",
"0.574352",
"0.5738892",
"0.572836",
"0.5686794",
"0.5671172",
"0.55844194",
"0.554358... | 0.69884914 | 0 |
set position to start position. | void moveToStart(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setStartPosition(int start) {\n mLastPosition = start;\n }",
"public void setStartPos(int startPos) {\r\n this.startPos = startPos;\r\n }",
"public void setStartPos(int startPos) {\n this.startPos = startPos;\n }",
"private void setPosition(int startPosition) {\n ... | [
"0.826207",
"0.74417776",
"0.7421822",
"0.73509926",
"0.7345004",
"0.7297894",
"0.7245346",
"0.72344106",
"0.7231255",
"0.7230096",
"0.71983206",
"0.718016",
"0.7158095",
"0.7083756",
"0.7001717",
"0.6955622",
"0.68547094",
"0.68500227",
"0.68375784",
"0.68280447",
"0.6827318... | 0.6351984 | 73 |
set position to end position. | void moveToEnd(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder setEndPosition(int value) {\n bitField0_ |= 0x00000010;\n endPosition_ = value;\n onChanged();\n return this;\n }",
"public void setEndPosition(Point endPosition)\r\n\t{\r\n\t\tthis.endPosition = endPosition;\r\n\t\tthrow new UnsupportedOperationException(\"Še ne d... | [
"0.7488036",
"0.73767656",
"0.7358029",
"0.7344843",
"0.7331547",
"0.73244935",
"0.7305025",
"0.7257868",
"0.71756256",
"0.70872074",
"0.6963882",
"0.6696601",
"0.6673851",
"0.66556203",
"0.6639628",
"0.65296966",
"0.64908767",
"0.649053",
"0.647727",
"0.64738554",
"0.6468649... | 0.6058103 | 52 |
reset to factory settings | void reset(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetFactory() {\n\t\ttry {\n\t\t\tif(null != rawSrv){\n\t\t\trawSrv.resetCfgGroup(ConfigType.RESET_FACTORY);\n\t\t\t}\n\t\t} catch (TVMException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void reset() {\n\t\t// set any default values\n\t\t// setDefaultController() ???\n\t}",
"protected... | [
"0.77510005",
"0.7150001",
"0.7035812",
"0.6963316",
"0.6961181",
"0.6872954",
"0.6848769",
"0.6840518",
"0.6840518",
"0.6840518",
"0.6840518",
"0.6805062",
"0.6790023",
"0.6790023",
"0.6790023",
"0.6790023",
"0.678953",
"0.678953",
"0.677991",
"0.6779035",
"0.6764315",
"0.... | 0.0 | -1 |
Nothing to do here, move along.. | @Override
public void closeTemplateSource(Object templateSource) throws IOException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n ... | [
"0.62336075",
"0.6167016",
"0.6165805",
"0.6163578",
"0.6150724",
"0.6112948",
"0.61052555",
"0.6089976",
"0.6085455",
"0.6067574",
"0.6063689",
"0.6022484",
"0.60112786",
"0.60112786",
"0.6008434",
"0.6001258",
"0.59976447",
"0.5903229",
"0.5898064",
"0.58843565",
"0.5879195... | 0.0 | -1 |
This interface describes contract that DAO of entities responsible for managing their lifecycle themselves, must follow. Most of methods were taken from project | public interface EntityDao<T extends Entity> {
/**
* Saves or updates entity
* @param entity entity to save
*/
void saveOrUpdate(T entity);
/**
* Deletes entity by object reference
* @param entity entity to delete
*/
void delete(T entity);
/**
* Returns entity found by given unique id or {@code null} if entity
* wasn't found
* @param id entity's unique id
* @return entity just found
*/
T getById(int id);
/**
* Returns {@code true} if entity with given unique id exists
* @param id unique id of entity
* @return {@code true} if entity exists
*/
boolean isExist(int id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface EntityDAOInterface {\n}",
"public interface EmployeeDAO {\r\n\r\n\t\t\tpublic List<Employee> findAll();\r\n\r\n\t\t\tpublic Employee findById(int theId);\r\n\t\t\t\r\n\t\t\tpublic void save(Employee theEmployee);\r\n\r\n\t\t\tpublic void deleteById(int theId);\r\n}",
"public interface StorageD... | [
"0.67025435",
"0.6689335",
"0.66619205",
"0.66507846",
"0.66440403",
"0.664241",
"0.6625161",
"0.66183114",
"0.65949243",
"0.65734494",
"0.65729725",
"0.65459263",
"0.65375334",
"0.6531612",
"0.65289164",
"0.6521844",
"0.65128326",
"0.6512584",
"0.650146",
"0.64981544",
"0.64... | 0.0 | -1 |
Saves or updates entity | void saveOrUpdate(T entity); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Entity save(Entity entity);",
"E save(E entity);",
"void save(Object entity);",
"void save(E entity);",
"public void updateEntity();",
"E update(E entity);",
"E update(E entity);",
"void save(T entity);",
"T save(T entity);",
"T save(T entity);",
"T save(T entity);",
"void save(T entity, bool... | [
"0.80204123",
"0.78221405",
"0.78210837",
"0.7789108",
"0.7560341",
"0.7549463",
"0.7549463",
"0.7480769",
"0.7472661",
"0.7472661",
"0.7472661",
"0.72578233",
"0.7223406",
"0.7214326",
"0.7212731",
"0.7157664",
"0.71485806",
"0.7148302",
"0.70950663",
"0.70838904",
"0.708389... | 0.716646 | 16 |
Deletes entity by object reference | void delete(T entity); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void delete(Object entity);",
"@Override\n\tpublic int deleteObject(Evaluate entity) {\n\t\treturn evaluateMapper.deleteObject(entity);\n\t}",
"void delete(E entity);",
"void delete(E entity);",
"void delete(Entity entity);",
"void delete(int entityId);",
"void deleteEntityById(Long id);",
"public vo... | [
"0.801604",
"0.7584643",
"0.75714386",
"0.75714386",
"0.75523084",
"0.7490522",
"0.7279409",
"0.720665",
"0.71742165",
"0.7144427",
"0.712825",
"0.7125886",
"0.7050232",
"0.6988376",
"0.6980404",
"0.6979044",
"0.69728065",
"0.6972571",
"0.6947588",
"0.69374543",
"0.6934784",
... | 0.729926 | 7 |
Interface pre quad strom. | public interface IQuadTree<T extends INodeElement<T>>
{
/**
* Metoda sa vola pri zmene pozicii vrchola.
*
* @param v
* Vertex
* @param old
* Stara pozicia = null tak prvok sa pridava prvykrat
*/
public void insert(T vertex, Point2D pos);
/**
* Najdi a vymaz prvok zo stromu.
* @param element
* @param pos
* @return
*/
public boolean remove(T element, Point2D pos);
/**
* Spusti IWalkThrought pre vsetky objekty ktory su v oblasti Rectangle.
*
* @param re
* @param i
*/
public void walk(Rectangle re, IWalkThrought<T> i);
/**
* Prehladaj cely strom a najdi prvok.
* Teda sa nehlada podla pozicie objektu ale vsade.
*
* @param element
* @return
*/
public Node<T> findSlow(T element);
/**
* Vymaz vsetky objekty v strome, ktore su totozne s element.
*
* @param element
*/
public void removeAll(Object element);
/**
* Interface ktory sa spusta na kazdu skupinu vertexov v 1 node.
* Prvky vo vnutri by som nemal modifikovat lebo su v QDtree.
*
* Povodne to bol interface na 1 prvok, ale toto by to malo urychlit.
*
* Interface pri VertexsInRectangle moze spustit vertexi hoci sedia mimo obrazovky.
* O dalsie sa postara JUNG ktory to este raz otestuje
* Alebo ked v jednom NODE su napriklad len 4 prvky tak mozme vypnut dalsiu kontrolu a zobrazit
* to.
*
* @author Lukas Sekerak
*
* @param <T>
*/
public interface IWalkThrought<T>
{
public void walkThrought(ArrayList<T> v);
}
/**
* Vrat elementy v danej oblasti.
*
* @param point
* @return
*/
public ArrayList<T> getElements(Point2D point);
/**
* Vymaz vsetko v strome.
*/
public void clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Quadcopter() {\r\n\t\tsuper();\r\n\t\tmaxFlyingSpeed = 0;\r\n\t}",
"@Override\n \t\t\t\tpublic void doCreateQuadWater() {\n \n \t\t\t\t}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public void processQuad(Quad q) {\n in[q.getID()].che... | [
"0.604915",
"0.59669715",
"0.5852017",
"0.55147046",
"0.5460406",
"0.54232985",
"0.54208106",
"0.5405955",
"0.53019655",
"0.5246261",
"0.52098334",
"0.5184131",
"0.51829964",
"0.5170638",
"0.5139095",
"0.5135968",
"0.51288086",
"0.51142055",
"0.5103426",
"0.50941926",
"0.5088... | 0.53741133 | 8 |
Metoda sa vola pri zmene pozicii vrchola. | public void insert(T vertex, Point2D pos); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null... | [
"0.7061327",
"0.6866411",
"0.6849235",
"0.6742633",
"0.6741128",
"0.671529",
"0.65702736",
"0.656802",
"0.65141517",
"0.64819527",
"0.6423662",
"0.64211446",
"0.6397578",
"0.63804686",
"0.6379083",
"0.63738364",
"0.63382167",
"0.6337481",
"0.6335275",
"0.633283",
"0.6326286",... | 0.0 | -1 |
Najdi a vymaz prvok zo stromu. | public boolean remove(T element, Point2D pos); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IzvajalecZdravstvenihStoritev() {\n\t}",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozici... | [
"0.67275",
"0.6715154",
"0.6644625",
"0.6628201",
"0.6445231",
"0.64160514",
"0.6381386",
"0.6379849",
"0.63624305",
"0.62857723",
"0.62501496",
"0.6162193",
"0.60993254",
"0.60777736",
"0.6066964",
"0.60397345",
"0.59931445",
"0.5991384",
"0.59858996",
"0.597799",
"0.5975969... | 0.0 | -1 |
Spusti IWalkThrought pre vsetky objekty ktory su v oblasti Rectangle. | public void walk(Rectangle re, IWalkThrought<T> i); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void rectangle(int width, int height, Turtle turtle)\r\n {\r\n turtle.turnRight();\r\n turtle.forward(width);\r\n turtle.turnRight();\r\n turtle.forward(height);\r\n turtle.turnRight();\r\n turtle.forward(width);\r\n turtle.turnRight();\r\n turtle.fo... | [
"0.6421716",
"0.61825985",
"0.57456666",
"0.5732535",
"0.5705932",
"0.5671941",
"0.5661234",
"0.56463104",
"0.5628242",
"0.5615712",
"0.5602624",
"0.5601488",
"0.5600636",
"0.5564489",
"0.5554504",
"0.5528979",
"0.548729",
"0.54825103",
"0.5470296",
"0.5461992",
"0.54408115",... | 0.6590428 | 0 |
Prehladaj cely strom a najdi prvok. Teda sa nehlada podla pozicie objektu ale vsade. | public Node<T> findSlow(T element); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n ... | [
"0.70744276",
"0.7009525",
"0.6998518",
"0.6971611",
"0.6914825",
"0.68863946",
"0.6874995",
"0.6821424",
"0.66704696",
"0.6581876",
"0.65636593",
"0.6543798",
"0.6530158",
"0.6522404",
"0.64926785",
"0.64110833",
"0.63722545",
"0.6372128",
"0.63656723",
"0.63571644",
"0.6356... | 0.0 | -1 |
Vymaz vsetky objekty v strome, ktore su totozne s element. | public void removeAll(Object element); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean buscar(T elemento) {\n\t\treturn false;\r\n\t}",
"public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }",
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n ... | [
"0.553555",
"0.5395842",
"0.538851",
"0.5275517",
"0.52749616",
"0.52598375",
"0.5243372",
"0.51964456",
"0.51660883",
"0.51278645",
"0.5124331",
"0.5111357",
"0.5083917",
"0.5044191",
"0.50338084",
"0.5010008",
"0.50009",
"0.49788678",
"0.49703157",
"0.4956339",
"0.49476662"... | 0.0 | -1 |
Interface ktory sa spusta na kazdu skupinu vertexov v 1 node. Prvky vo vnutri by som nemal modifikovat lebo su v QDtree. Povodne to bol interface na 1 prvok, ale toto by to malo urychlit. Interface pri VertexsInRectangle moze spustit vertexi hoci sedia mimo obrazovky. O dalsie sa postara JUNG ktory to este raz otestuje Alebo ked v jednom NODE su napriklad len 4 prvky tak mozme vypnut dalsiu kontrolu a zobrazit to. | public interface IWalkThrought<T>
{
public void walkThrought(ArrayList<T> v);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IQuadTree<T extends INodeElement<T>>\n{\n\t/**\n\t * Metoda sa vola pri zmene pozicii vrchola.\n\t * \n\t * @param v\n\t * Vertex\n\t * @param old\n\t * Stara pozicia = null tak prvok sa pridava prvykrat\n\t */\n\tpublic void insert(T vertex, Point2D pos);\n\t\n\t/**\n\t * Na... | [
"0.63538337",
"0.6163855",
"0.599087",
"0.5902194",
"0.58683014",
"0.5825647",
"0.5796139",
"0.5746334",
"0.5740971",
"0.5740936",
"0.5738457",
"0.5721395",
"0.57177055",
"0.57177055",
"0.56868017",
"0.5641218",
"0.5549181",
"0.5537687",
"0.5487411",
"0.54839844",
"0.5478348"... | 0.0 | -1 |
Vrat elementy v danej oblasti. | public ArrayList<T> getElements(Point2D point); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n ... | [
"0.6584427",
"0.60250753",
"0.5920654",
"0.5904725",
"0.5818256",
"0.5796922",
"0.57331264",
"0.5714024",
"0.56457585",
"0.5644217",
"0.56256825",
"0.5625309",
"0.5613792",
"0.56020904",
"0.5581329",
"0.55275977",
"0.5519283",
"0.5517049",
"0.5507929",
"0.548192",
"0.54735434... | 0.0 | -1 |
Vymaz vsetko v strome. | public void clear(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validerSaisie();",
"public IzvajalecZdravstvenihStoritev() {\n\t}",
"public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}",
"public void sinyal();",
"public void sendeSpielfeld();",
"private void strin() {\n\n\t}",
"@Ov... | [
"0.634471",
"0.633022",
"0.6122736",
"0.6012424",
"0.5999656",
"0.5999154",
"0.5986803",
"0.59703374",
"0.595352",
"0.5931726",
"0.58716756",
"0.58550334",
"0.58120173",
"0.58055115",
"0.58049834",
"0.57992566",
"0.575013",
"0.5739591",
"0.5728839",
"0.5706873",
"0.569375",
... | 0.0 | -1 |
returns all the errors inside a domain. | Set<ISOAError> getErrors(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<GmlExceptionReport> getErrors()\r\n {\r\n return myErrorHandler.getExceptionReports();\r\n }",
"public List<QueryError> getErrors() {\n return errors;\n }",
"public List<NaaccrValidationError> getAllValidationErrors() {\n List<NaaccrValidationError> results = new... | [
"0.6563529",
"0.65115416",
"0.6455884",
"0.639357",
"0.63515687",
"0.6314525",
"0.62861687",
"0.6243428",
"0.61997354",
"0.61676204",
"0.6166003",
"0.61195004",
"0.6071439",
"0.6069103",
"0.60105914",
"0.600274",
"0.59922105",
"0.59849346",
"0.59708077",
"0.59620225",
"0.5926... | 0.66007936 | 0 |
return the organization property for this domain. | String getOrganization(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getOrganization() {\n return organization;\n }",
"public String getOrganization() {\n\t\treturn organization;\n\t}",
"public String organization() {\n return this.organization;\n }",
"public String getOrganization ()\n {\n return this.organization;\n }",... | [
"0.80781615",
"0.80623114",
"0.8058267",
"0.80336493",
"0.7876834",
"0.7748681",
"0.7748681",
"0.7695857",
"0.7670329",
"0.7448437",
"0.74472356",
"0.7420474",
"0.74202156",
"0.7416924",
"0.7307405",
"0.7307405",
"0.7257874",
"0.72449696",
"0.72377247",
"0.7152408",
"0.697869... | 0.76610374 | 9 |
return the parent library to which this domain belong to. | ISOAErrLibrary getLibrary(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.... | [
"0.698105",
"0.688148",
"0.688148",
"0.688148",
"0.688148",
"0.6751437",
"0.6751437",
"0.67093235",
"0.6625025",
"0.65986764",
"0.6549895",
"0.6513928",
"0.64921224",
"0.64704025",
"0.64412326",
"0.64381456",
"0.64282423",
"0.64282423",
"0.64282423",
"0.64135945",
"0.6377564"... | 0.0 | -1 |
Notifies this object that the user clicked the button associated with this handler for a specific element. The ID of this element is passed to the handler. It is now up to the handler which actions it performs in order to react on this event. | void handleElement(Object elemID); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void notifyMouseEvent(int id, long when, int button,\n int x, int y, int absX, int absY,\n int modifiers, int clickCount, boolean popupTrigger,\n byte[] bdata);",
"protected void elementClicked(int selectedId, boolean doubleClicked)\n\t{\... | [
"0.6026915",
"0.5990884",
"0.5834587",
"0.5768555",
"0.5734964",
"0.5605944",
"0.55073786",
"0.5490941",
"0.54904073",
"0.54677474",
"0.54419",
"0.5371119",
"0.5350642",
"0.534419",
"0.5288866",
"0.5282317",
"0.525532",
"0.5254006",
"0.52375233",
"0.52328867",
"0.52204436",
... | 0.5774882 | 3 |
Called when a department admin rejects an issue not belonging to their dept | @RequestMapping(value = "/reject", method = RequestMethod.POST)
public String rejectIssue(HttpServletRequest request) {
IssueDAO issueDAO = (IssueDAO) ApplicationContextProvider.getApplicationContext().getBean("issueDAO");
DepartmentDAO deptDAO = (DepartmentDAO) ApplicationContextProvider.getApplicationContext()
.getBean("departmentDAO");
int issueId = Integer.parseInt(request.getParameter("issueId"));
Issue issue = null;
Department dept = null;
try {
issue = issueDAO.readById(issueId);
dept = deptDAO.readById(1);
} catch (IssueDoesNotExistException | DepartmentDoesNotExistException e) {
logger.error("Issue or Department does not exist", e);
}
AssignIssueCommand assign = new AssignIssueCommand(issue, dept, Status.REJECTED);
assign.execute();
logger.info(issue.getTitle()+": department changed to 'General' because it was rejected by Department Admin");
String[] headers = request.getHeader("referer").split("/");
String sendTo = headers[headers.length - 1];
logger.trace("redirecting to: "+sendTo);
return "redirect:/" + sendTo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reject() {\n rejectBus.add(applicantQueue.dequeue());\n }",
"void rejectNewOrders();",
"void rejectOrder(String orderId);",
"@RequiresLock(\"SeaLock\")\r\n protected void deponentInvalidAction(Drop invalidDeponent) {\r\n invalidate();\r\n }",
"private void manageDeniedPacket(Meet... | [
"0.5860261",
"0.5657108",
"0.55405647",
"0.5488914",
"0.5452125",
"0.54508233",
"0.54454184",
"0.5443362",
"0.54096705",
"0.5395346",
"0.5385046",
"0.53804046",
"0.5379523",
"0.53502727",
"0.53502727",
"0.5337896",
"0.5331035",
"0.5320555",
"0.53043425",
"0.5290755",
"0.52323... | 0.6527606 | 0 |
Called when a general admin changes the department an issue is assigned to | @RequestMapping(value = "/changeDept", method = RequestMethod.POST)
public String changeDept(HttpServletRequest request, HttpSession session) {
IssueDAO issueDAO = (IssueDAO) ApplicationContextProvider.getApplicationContext().getBean("issueDAO");
DepartmentDAO deptDAO = (DepartmentDAO) ApplicationContextProvider.getApplicationContext()
.getBean("departmentDAO");
int issueId = Integer.parseInt(request.getParameter("issueId"));
int deptId = Integer.parseInt(request.getParameter("deptId"));
User user = (User) session.getAttribute("user");
Issue issue = null;
Department dept = null;
try {
issue = issueDAO.readById(issueId);
dept = deptDAO.readById(deptId);
AssignIssueCommand assign = new AssignIssueCommand(issue, dept, Status.NEW);
assign.execute();
IssueUpdates issueUpdate = new IssueUpdates();
issueUpdate.setSubmittedBy(user);
issueUpdate.setUpdateDate(new Date());
String updateText = "Change issue department to: " + dept.getDeptName();
CreateIssueUpdateCommand updateIssue = new CreateIssueUpdateCommand(updateText, issue, user, session);
updateIssue.execute();
logger.info(issue.getTitle()+": department changed to: '" + dept.getDeptName() + "' by General Admin");
} catch (IssueDoesNotExistException | DepartmentDoesNotExistException e) {
logger.error("Issue or Department does not exist", e);
}
String[] headers = request.getHeader("referer").split("/");
String sendTo = headers[headers.length - 1];
logger.trace("redirecting to: " + sendTo);
return "redirect:/" + sendTo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void updateDept() {\n\t}",
"void modifyDepartment(Department dRef);",
"@Override\n public void setEmployeeDepartment(int employeeId, int departmentId) {\n\n }",
"@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }",
"public void assignDepartm... | [
"0.67875767",
"0.6703525",
"0.64886117",
"0.6481008",
"0.6465466",
"0.6419169",
"0.63818496",
"0.63180906",
"0.6177281",
"0.6142705",
"0.61041754",
"0.60254335",
"0.6020057",
"0.60150546",
"0.600966",
"0.5994487",
"0.5948216",
"0.5948216",
"0.59407717",
"0.5936575",
"0.592633... | 0.6817584 | 0 |
Constant amount of diffuse light Constructs a sphere with default values. | public Sphere(){
radius = 128;
lightScale = 1;
ambientLight = 0.3; // Amount of ambient light
diffuseLight = 0.7; // Amount of diffuse light
lightSource = new double[]{0, 0, 128}; // Place light 128 units away from origin
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Sphere(final Material m) {\n super(m);\n this.c = new Point3(0,0,0);\n this.r = 1;\n }",
"public float getSphereRadius();",
"public Sphere( double radius, Point3d center, Material material ) {\n \tsuper();\n \tthis.radius = radius;\n \tthis.center = center;\n \tthis.m... | [
"0.631077",
"0.6197512",
"0.61674637",
"0.6141568",
"0.6128591",
"0.6108803",
"0.6102787",
"0.60575527",
"0.6020571",
"0.5955878",
"0.5923373",
"0.5915013",
"0.59038323",
"0.588671",
"0.5851082",
"0.5848899",
"0.5833861",
"0.58022344",
"0.5760327",
"0.57463175",
"0.5715291",
... | 0.7461705 | 0 |
Calculates the illumination of a given point on the sphere. | public double getIllumination(double x, double y){
double z = Math.sqrt(radius * radius - y*y - x*x); // Calculate z coordinate
// Calculate diffuse light:
double diffuse = (diffuseLight *
dotProduct(x, y, z, lightSource[0], lightSource[1], lightSource[2]));
if (diffuse < 0) // If no diffuse light, use ambient light only
return ambientLight;
else // Otherwise use the sum
return diffuse + ambientLight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getIllumination(SimpleMatrix normal, SimpleMatrix point) {\n double illumination = intensity * Vectors.dot(\n Vectors.unit(normal),\n Vectors.unit(point.minus(position))\n );\n\n return Math.max(illumination, 0);\n }",
"public Float getIlluminat... | [
"0.6575857",
"0.5962036",
"0.58182997",
"0.58179164",
"0.5565134",
"0.55428904",
"0.550739",
"0.55071795",
"0.5489739",
"0.5413406",
"0.5386437",
"0.53490883",
"0.51854396",
"0.51597595",
"0.5154614",
"0.5102017",
"0.5082173",
"0.5036753",
"0.5021559",
"0.5019352",
"0.5018125... | 0.55346906 | 6 |
Returns the normalized dot product of two 2d vectors. | private double dotProduct(double x, double y, double z, double d, double e, double f){
double length1 = Math.sqrt(x*x + y*y + z*z); // Calculate length of [x, y]
double length2 = Math.sqrt(d*d + e*e + f*f); // Calculate length of [d, e]
// Normalize vectors:
x /= length1;
y /= length1;
z /= length1;
d /= length2;
e /= length2;
f /= length2;
// Return dot product:
return (x * d) + (y * e) + (z * f);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double dotProduct(Coordinates vectorA, Coordinates vectorB);",
"static double dot(Vec a, Vec b) {\n return (a.x * b.x + a.y * b.y);\n }",
"public static float dotProduct(float[] a, float[] b) {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"vector dimensio... | [
"0.8299755",
"0.790275",
"0.75728893",
"0.7424408",
"0.7284288",
"0.7272809",
"0.71679574",
"0.71411306",
"0.7120046",
"0.710376",
"0.70722127",
"0.7054171",
"0.69827795",
"0.69620013",
"0.6919408",
"0.6911456",
"0.690868",
"0.6841691",
"0.6841506",
"0.67975825",
"0.6781079",... | 0.6797787 | 19 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.