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 |
|---|---|---|---|---|---|---|
This method sends the initial handshake response | private void sendDeviceHandshake(SelectionKey key, boolean flag) throws IOException {
SocketChannel channel = (SocketChannel)key.channel();
byte[] ackData = new byte[1];
if(flag) {
ackData[0]=01;
}else {
ackData[0]=00;
}
ByteBuffer bSend = ByteBuffer.allocate(ackData.length);
bSend.clear();
bSend.put(ackData);
bSend.flip();
while (bSend.hasRemaining()) {
try {
channel.write(bSend);
} catch (IOException e) {
throw new IOException("Failed to send acknowledgement");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void prepareHandshakeMessageContents() {\n }",
"void handshake() throws SyncConnectionException;",
"private void doHandshake()throws Exception {\n\t\tHttpClient httpClient = new HttpClient();\n\t\t// Here set up Jetty's HttpClient, for example:\n\t\t// httpClient.setMaxConnectionsPe... | [
"0.703378",
"0.7028544",
"0.6812075",
"0.67717236",
"0.66614294",
"0.6559981",
"0.64989734",
"0.64860797",
"0.64849865",
"0.64720577",
"0.64223045",
"0.63884944",
"0.6213776",
"0.61869043",
"0.61115134",
"0.60917276",
"0.6084625",
"0.60642415",
"0.605083",
"0.5983558",
"0.596... | 0.5630193 | 34 |
This method sends the data reception complete message | private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException {
SocketChannel channel = (SocketChannel)key.channel();
byte[] ackData = new byte[4];
ackData[0]=00;
ackData[1]=00;
ackData[2]=00;
ackData[3]=data[9]; //bPacketRec[0];
ByteBuffer bSend = ByteBuffer.allocate(ackData.length);
bSend.clear();
bSend.put(ackData);
bSend.flip();
while (bSend.hasRemaining()) {
try {
channel.write(bSend);
} catch (IOException e) {
throw new IOException("Could not send Data Reception Acknowledgement");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendRemainData();",
"public void onDataReceived( final List<Byte> data) {\r\n\r\n /* accumulate chars in partial string, until sequence 0xFF-0xFF is found */\r\n for (int i = 0; i < data.size(); i++) {\r\n _partialMessage.add( data.get(i));\r\n\r\n if (data.get(i) == Protoco... | [
"0.7209731",
"0.6772382",
"0.67704034",
"0.6643094",
"0.65830904",
"0.6500751",
"0.6449824",
"0.6447455",
"0.6389074",
"0.6350146",
"0.63398975",
"0.6332133",
"0.6331343",
"0.6330276",
"0.6320365",
"0.6282768",
"0.62606007",
"0.6244067",
"0.6185331",
"0.61797947",
"0.6167523"... | 0.7445858 | 0 |
This generic method is called to process the device input | private void processDeviceStream(SelectionKey key, byte[] data) throws IOException{
SocketChannel channel = (SocketChannel)key.channel();
String sDeviceID = "";
// Initial call where the device sends it's IMEI# - Sarat
if ((data.length >= 10) && (data.length <= 17)) {
int ii = 0;
for (byte b : data)
{
if (ii > 1) { // skipping first 2 bytes that defines the IMEI length. - Sarat
char c = (char)b;
sDeviceID = sDeviceID + c;
}
ii++;
}
// printing the IMEI #. - Sarat
System.out.println("IMEI#: "+sDeviceID);
LinkedList<String> lstDevice = new LinkedList<String>();
lstDevice.add(sDeviceID);
dataTracking.put(channel, lstDevice);
// send message to module that handshake is successful - Sarat
try {
sendDeviceHandshake(key, true);
} catch (IOException e) {
e.printStackTrace();
}
// second call post handshake where the device sends the actual data. - Sarat
}else if(data.length > 17){
mClientStatus.put(channel, System.currentTimeMillis());
List<?> lst = (List<?>)dataTracking.get(channel);
if (lst.size() > 0)
{
//Saving data to database
sDeviceID = lst.get(0).toString();
DeviceState.put(channel, sDeviceID);
//String sData = org.bson.internal.Base64.encode(data);
// printing the data after it has been received - Sarat
StringBuilder deviceData = byteToStringBuilder(data);
System.out.println(" Data received from device : "+deviceData);
try {
//publish device IMEI and packet data to Nats Server
natsPublisher.publishMessage(sDeviceID, deviceData);
} catch(Exception nexp) {
nexp.printStackTrace();
}
//sending response to device after processing the AVL data. - Sarat
try {
sendDataReceptionCompleteMessage(key, data);
} catch (IOException e) {
e.printStackTrace();
}
//storing late timestamp of device
DeviceLastTimeStamp.put(sDeviceID, System.currentTimeMillis());
}else{
// data not good.
try {
sendDeviceHandshake(key, false);
} catch (IOException e) {
throw new IOException("Bad data received");
}
}
}else{
// data not good.
try {
sendDeviceHandshake(key, false);
} catch (IOException e) {
throw new IOException("Bad data received");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void processInput() {\n\t}",
"public void processInput() {\n\n\t}",
"private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"protected abstract void getInput();",
"protecte... | [
"0.7214011",
"0.7151976",
"0.65762067",
"0.65731657",
"0.65726626",
"0.6507743",
"0.6500181",
"0.6392133",
"0.6388394",
"0.63386554",
"0.6266778",
"0.6225161",
"0.6202829",
"0.610575",
"0.60833144",
"0.6043853",
"0.6004619",
"0.5993477",
"0.5990771",
"0.5968786",
"0.59640336"... | 0.5786151 | 30 |
DB2 Multidatabase JDBC Connection constructor. | public DB2MultiDbJDBCConnection(Connection dbConnection, boolean readOnly, JDBCDataContainerConfig containerConfig)
throws SQLException
{
super(dbConnection, readOnly, containerConfig);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataBaseConnector()\n {\n dataSource = new SQLServerDataSource();\n dataSource.setServerName(\"EASV-DB2\");\n dataSource.setPortNumber(1433);\n dataSource.setDatabaseName(\"AutistMovies\");\n dataSource.setUser(\"CS2017A_15\");\n dataSource.setPassword(\"Bjoernha... | [
"0.69835603",
"0.6831441",
"0.6703251",
"0.65923184",
"0.65354335",
"0.65354335",
"0.65277547",
"0.652307",
"0.64883286",
"0.64539135",
"0.64385813",
"0.6411571",
"0.6398667",
"0.63774306",
"0.63750494",
"0.6372551",
"0.6352459",
"0.63467646",
"0.6343081",
"0.6338285",
"0.633... | 0.66513157 | 3 |
Initialize the list for numbers Implement the random number generation here the method containsNumber is probably useful | public void randomizeNumbers() {
this.numbers = new ArrayList<>();
Random randy = new Random(); //starts a random obkject
int number = 1; //starts the first lottery number index
while (number <= 7){ //repeats the same process 7 times to get a set of lottery numbers
int randomNumber = randy.nextInt(40) + 1; //generates a random int betweeen 1-40(inclusive)
//if this number already exists in the list, it ignores it and repeats until a unique number is thrown
if(containsNumber(randomNumber)){
continue;
}
//once we have a new unique number, it's added to our arraylsit
this.numbers.add(randomNumber);
number++; //and we move on to the next number
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static ArrayList<String> GenNumber() {\n\n ArrayList<String> initialList = new ArrayList<>();\n\n initialList.add(\"1\"); //Add element\n initialList.add(\"2\");\n initialList.add(\"3\");\n initialList.add(\"4\");\n initialList.add(\"5\");\n initialList.ad... | [
"0.7447287",
"0.71823865",
"0.70710635",
"0.68596494",
"0.67494535",
"0.67251444",
"0.67055976",
"0.666577",
"0.661219",
"0.6577882",
"0.65170115",
"0.64895946",
"0.6489008",
"0.64655644",
"0.64431685",
"0.641129",
"0.63768685",
"0.63376707",
"0.63328075",
"0.63103294",
"0.62... | 0.7714357 | 0 |
Check here whether the number is among the drawn numbers | public boolean containsNumber(int number) {
return this.numbers.contains(number);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkForNum(int checkFor, int[] lottoDraw) {\n \n boolean repeat = false;\n // for loop that goes thru length of array\n for (int counter = 0; counter < lottoDraw.length; counter++) {\n // if potential num is in array, break loop and return True\n if... | [
"0.6573296",
"0.6456888",
"0.62303436",
"0.62057245",
"0.6172467",
"0.6056295",
"0.6031591",
"0.60103613",
"0.600855",
"0.59944314",
"0.5944256",
"0.5930615",
"0.5930098",
"0.59102035",
"0.589565",
"0.58888805",
"0.5835974",
"0.58206487",
"0.58206487",
"0.58206487",
"0.582037... | 0.0 | -1 |
LATER It's not ideal that currently the web response needs to be parsed twice, once for the search results and once for the completion of the indexer search result. Will need to check how much that impacts performance | @Override
protected void completeIndexerSearchResult(String response, IndexerSearchResult indexerSearchResult, AcceptorResult acceptorResult, SearchRequest searchRequest, int offset, Integer limit) {
Document doc = Jsoup.parse(response);
if (doc.select("table.xMenuT").size() > 0) {
Element navigationTable = doc.select("table.xMenuT").get(1);
Elements pageLinks = navigationTable.select("a");
boolean hasMore = !pageLinks.isEmpty() && pageLinks.last().text().equals(">");
boolean totalKnown = false;
indexerSearchResult.setOffset(searchRequest.getOffset());
int total = searchRequest.getOffset() + 100; //Must be at least as many as already loaded
if (!hasMore) { //Parsed page contains all the available results
total = searchRequest.getOffset() + indexerSearchResult.getSearchResultItems().size();
totalKnown = true;
}
indexerSearchResult.setHasMoreResults(hasMore);
indexerSearchResult.setTotalResults(total);
indexerSearchResult.setTotalResultsKnown(totalKnown);
} else {
indexerSearchResult.setHasMoreResults(false);
indexerSearchResult.setTotalResults(0);
indexerSearchResult.setTotalResultsKnown(true);
}
indexerSearchResult.setPageSize(100);
indexerSearchResult.setOffset(offset);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void parseData(String url, String response) {\n\n if (response.isEmpty()) {\n if (!mErrorMessage.isEmpty()) {\n alertParseErrorAndFinish(mErrorMessage);\n } else {\n renderData();\n }\n } else {\n if (mItemTotal == 0) {... | [
"0.6171221",
"0.5971142",
"0.59153795",
"0.58608705",
"0.58484775",
"0.58219683",
"0.57913005",
"0.5773178",
"0.57220274",
"0.5654181",
"0.56377137",
"0.55997694",
"0.5598473",
"0.5585544",
"0.55563223",
"0.55563223",
"0.5540636",
"0.55395335",
"0.5488023",
"0.54597473",
"0.5... | 0.69433373 | 0 |
lets constructor of HomeworkXX() make all magic :P | public static void main(String[] args) throws IOException {
// new Homework01();
new Homework02();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Homework(int initialcode, String initialtitle, String initialdescription, String initialcreationDate,\n\t\t\tint initialstate , String initialdeadline) throws ParseException {\n\t\tsuper(initialcode , initialtitle , initialdescription , initialcreationDate,initialstate);\n\t\tthis.deadline = initialdeadline... | [
"0.66186625",
"0.64329976",
"0.64039284",
"0.63705575",
"0.6256434",
"0.62451714",
"0.62451714",
"0.6234528",
"0.62239116",
"0.620448",
"0.619248",
"0.6162416",
"0.6148563",
"0.6137634",
"0.61233735",
"0.61194617",
"0.6105087",
"0.6101307",
"0.60944194",
"0.60726875",
"0.6070... | 0.66547364 | 0 |
/ Using an ArrayList in a ListView we (hopefully) will be able to display a list of games previously played and who won them. | @Override
protected void onCreate(Bundle savedInstanceState) {
ArrayList<User> testUser = new ArrayList<>();
testUser.add(new User("Erlend", "950"));
testUser.add(new User("Klister", "12"));
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_score);
scoreScreen = (ListView) findViewById(R.id.score_view);
UserAdapter userAdapter = new UserAdapter(this, testUser);
scoreScreen.setAdapter(userAdapter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void listMostPlayed(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MostPlayedListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}",
"private void updateView(ArrayList<BasketballGame> games... | [
"0.6611208",
"0.64983827",
"0.63140696",
"0.62719786",
"0.6241992",
"0.6207081",
"0.6152852",
"0.61374766",
"0.61275125",
"0.6113669",
"0.6081718",
"0.6053426",
"0.6020433",
"0.5987665",
"0.59855926",
"0.5933916",
"0.5912157",
"0.59057724",
"0.5899791",
"0.5879798",
"0.587321... | 0.54584867 | 75 |
Reads a property list from the specified properties file. | void loadProperties(File propertiesFile) throws IOException
{
// Load the properties.
LOGGER.info("Loading properties from \"{}\" file...", propertiesFile);
try (InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(propertiesFile), "UTF-8"))
{
properties.load(inputStreamReader);
}
// Log all properties except for password.
StringBuilder propertiesStringBuilder = new StringBuilder();
for (Object key : properties.keySet())
{
String propertyName = key.toString();
propertiesStringBuilder.append(propertyName).append('=')
.append(HERD_PASSWORD_PROPERTY.equalsIgnoreCase(propertyName) ? "***" : properties.getProperty(propertyName)).append('\n');
}
LOGGER.info("Successfully loaded properties:%n{}", propertiesStringBuilder.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<Property> getProperties() {\r\n\t\ttry {\r\n\t\t\tproperties.clear();\r\n\t\t\tFileInputStream fis = new FileInputStream(PROPERTY_FILEPATH);\r\n \tObjectInputStream ois = new ObjectInputStream(fis);\r\n \t\r\n \tProperty obj = null;\r\n \twhile ((obj=(Property)ois.readO... | [
"0.68936706",
"0.67187476",
"0.6650028",
"0.66214365",
"0.6593103",
"0.652771",
"0.6510583",
"0.63506675",
"0.6321745",
"0.6310717",
"0.6303097",
"0.6267891",
"0.6246",
"0.62449586",
"0.62313414",
"0.62202936",
"0.62016773",
"0.61927426",
"0.6189398",
"0.6173349",
"0.61684",
... | 0.5853279 | 47 |
Check if property is missing or blank | Boolean isBlankOrNull(String key)
{
return StringUtils.isBlank(properties.getProperty(key));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}",
"@SuppressWarnings(\"rawtypes\")\n private boolean containsNoValidValueFor(final Dictionary properties,\n final String propertyKey) {\n final Object propertyValue = pr... | [
"0.75159866",
"0.67995244",
"0.6748104",
"0.67318994",
"0.67318994",
"0.67318994",
"0.6712649",
"0.66744506",
"0.66408205",
"0.66265005",
"0.6553647",
"0.6523469",
"0.6518938",
"0.6485601",
"0.64410967",
"0.6417902",
"0.6410742",
"0.6402587",
"0.6394694",
"0.6367265",
"0.6366... | 0.74075544 | 1 |
end of BeforeSuite Before method is only defined to capture your test method name to imported on your html report | @BeforeMethod
public void methodName(Method method) {
logger = reports.startTest(method.getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@BeforeMethod\r\n public void beforeMethod(Method method)\r\n {\n\t String testName = method.getName();\r\n\t \r\n\t System.out.println(\"Before Method\" + testName);\r\n\t \r\n\t //Get the data from DataSheet corresponding to Class Name & Test Name\r\n\t asapDriver.fGetDataForTest(testName);\r\n\t... | [
"0.75970453",
"0.7358651",
"0.71479565",
"0.7117101",
"0.7082368",
"0.70649135",
"0.70277166",
"0.70216817",
"0.70021254",
"0.69852597",
"0.69120044",
"0.68553436",
"0.68517524",
"0.68309444",
"0.68220705",
"0.68156093",
"0.6748374",
"0.67256826",
"0.672475",
"0.6712811",
"0.... | 0.6804273 | 16 |
After method to end the test that your are running on your xml suite | @AfterMethod
public void endTest(){
reports.endTest(logger);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@AfterTest\n\tpublic void afterTest() {\n\t\tiDriver.quit();\n\t\tSystem.out.println(\"=====================VEGASF_419_END=====================\");\n\t}",
"@After \n public void tearDownTest()\n {\n\t System.out.println(\"Test Complete\\n\\n\\n\\n\\n\");\n }",
"@After\n\tpublic void testEachCleanup() {\n\t... | [
"0.8213764",
"0.8018958",
"0.7961067",
"0.7955303",
"0.7940437",
"0.7814027",
"0.77378345",
"0.77364",
"0.77161795",
"0.77027565",
"0.76975536",
"0.7691849",
"0.7673472",
"0.76702607",
"0.76616186",
"0.76610416",
"0.7648926",
"0.76469404",
"0.7629352",
"0.7623443",
"0.7616246... | 0.80658567 | 1 |
Close and flush the report and either quit the driver or open your html report automatically | @AfterSuite
public void close(){
//flush the report
reports.flush();
//close the report
reports.close();
//quit the driver
driver.quit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void close_report() {\n if (output != null) {\n output.flush();\n output.close();\n }\n }",
"@AfterSuite (alwaysRun = true)\n public static void closeBrowser() {\n report.endTest(test);\n //line below will flush the report\n report.flush();\n\n\n //line belo... | [
"0.788908",
"0.74182206",
"0.73363817",
"0.72296864",
"0.6620998",
"0.6520037",
"0.64725405",
"0.642409",
"0.6326075",
"0.6301825",
"0.621403",
"0.6204132",
"0.6188141",
"0.6153084",
"0.6115005",
"0.610599",
"0.59950143",
"0.59595",
"0.595077",
"0.5938151",
"0.5920842",
"0.... | 0.7551578 | 1 |
Returns tne maximum flow from s to t in the given graph | int fordFulkerson(int graph[][], int s, int t) {
int u, v; // Create a residual graph and fill the residual graph with given capacities in the original graph as residual capacities in residual graph
int rGraph[][] = new int[MaxFlow.graph.getNumOfNode()][MaxFlow.graph.getNumOfNode()]; // Residual graph where rGraph[i][j] indicates residual capacity of edge from i to j (if there is an edge. If rGraph[i][j] is 0, then there is not)
for (u = 0; u < MaxFlow.graph.getNumOfNode(); u++)
for (v = 0; v < MaxFlow.graph.getNumOfNode(); v++)
rGraph[u][v] = graph[u][v]; //store the graph capacities
int parent[] = new int[MaxFlow.graph.getNumOfNode()]; // This array is filled by BFS and to store path
int max_flow = 0; // There is no flow initially
while (bfs(rGraph, s, t, parent)) { // Augment the flow while there is path from source to sink
int path_flow = Integer.MAX_VALUE; // Find minimum residual capacity of the edges along the path filled by BFS. Or we can say find the maximum flow through the path found.
for (v = t; v != s; v = parent[v]) { //when v=0 stop the loop
u = parent[v];
path_flow = Math.min(path_flow, rGraph[u][v]);
}
for (v = t; v != s; v = parent[v]) { // update residual capacities of the edges and reverse edges along the path
u = parent[v];
rGraph[u][v] -= path_flow; //min the path cap
rGraph[v][u] += path_flow; //add the path cap
}
System.out.println("Augmenting Path "+ path_flow);
max_flow += path_flow; // Add path flow to overall flow
}
return max_flow; // Return the overall flow
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MaxFlow(Graph g){\n graph = g;\n graphNode = graph.G;\n s = 0;\n maxFlow = 0;\n t = graphNode[graphNode.length - 1].nodeID;\n }",
"public AbstractWeightedGraph<V,E>.FlowGraph maximumFlow(V source, V sink);",
"public double getMaxFlow(long source, long sink){\n ... | [
"0.73227924",
"0.6728781",
"0.6244345",
"0.59956586",
"0.58540636",
"0.57665086",
"0.57051474",
"0.56564367",
"0.54589003",
"0.54535556",
"0.54012847",
"0.53244126",
"0.53182495",
"0.5316524",
"0.53012604",
"0.5276124",
"0.52074045",
"0.52022123",
"0.51782227",
"0.51722956",
... | 0.6438728 | 2 |
Driver program to test above functions | public static void main(String[] args) throws java.lang.Exception {
double []averageTime = new double[3]; //double array to get average time
MaxFlow m = new MaxFlow();
Stopwatch stopwatch = new Stopwatch();
getDataset();
try{
System.out.println("\n"+"The maximum possible flow is " + m.fordFulkerson(graph.getAddMatrix(), 0, graph.getNumOfNode()-1));
for(int i =1; i<=3;i++){
System.out.println("Time "+i+" : "+stopwatch.elapsedTime());
averageTime[i-1]= stopwatch.elapsedTime();
}
double a = averageTime[0]; //calculate the average time
double b = averageTime[1];
double c = averageTime[2];
double average = (a+b+c)/3;
System.out.println("\nAverage Time: "+average);
graph.printArray();
}catch (NullPointerException e){
System.out.println("");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"public static void main(String[] args){\n //The driver of the methods created above\n //fi... | [
"0.73421466",
"0.7015957",
"0.7015154",
"0.69689256",
"0.69380856",
"0.6917498",
"0.68921894",
"0.6879147",
"0.6814333",
"0.6773102",
"0.67368996",
"0.6724063",
"0.6697663",
"0.6696944",
"0.66904354",
"0.6680867",
"0.6614301",
"0.66120595",
"0.6589705",
"0.6577128",
"0.655868... | 0.0 | -1 |
Method called to notify the observers about the Action contained in the parameter | public void notifyNewAction(Action action){
notifyObservers(action);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void actionChanged( final ActionAdapter action );",
"@Override\n public void onPressed(Action action) {\n // pass the message on\n notifyOnPress(action);\n }",
"public abstract void onAction();",
"public interface Observer {\n\tpublic void update(Action action);\n}",
"protected void fir... | [
"0.7384706",
"0.6723216",
"0.66858166",
"0.653126",
"0.65106636",
"0.6420981",
"0.6366028",
"0.6353828",
"0.63482803",
"0.633666",
"0.6324881",
"0.6323988",
"0.625573",
"0.6252857",
"0.6252857",
"0.6252857",
"0.6226673",
"0.62250066",
"0.6207616",
"0.61561126",
"0.61495066",
... | 0.7297401 | 1 |
bazi objectler external vrebiliyor cook cook what?cook pasta for example masanin uzunlugunu soyle; tableObject.length(); arabanin mileage goster carObject.displayMileage(); tell me your first and last name personObject.showName(Fatma,Ulusal); butun bunlara method deniyor system.out.println(); calling method class is a blueprinth method is action(cookie cutter and cookie gibi) string class; you have two stack and heap living room bed room gibi 2 farkli string iki farkli objectde durabilir String str1 ="Hello"; ==> string object gidiyor String str2 ="World"; | public static void main(String[] args) {
int x = 2;
int y = x ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n String obj=new String();\n obj.getData();\n obj.operation1();\n obj.operation2();\n obj.operation3();\n obj.operation4();\n }",
"public static void main(String[] args) {\n Object obj1 = obterString();\n String s1 = (String) obj1... | [
"0.6616418",
"0.65410566",
"0.62074494",
"0.62072706",
"0.6186344",
"0.6179418",
"0.617828",
"0.61754686",
"0.6079712",
"0.60211414",
"0.59924734",
"0.5976613",
"0.59561",
"0.5925742",
"0.5921404",
"0.5920388",
"0.5918226",
"0.591619",
"0.59142685",
"0.5896429",
"0.58641344",... | 0.0 | -1 |
Code'u yazinca gorunmuyolar fakat gizlice var olan exceptionlar. ornek1 | public static void main(String[] args) {
int [] array = {12,13,12};
System.out.println(array[3]);
//Exception'in ismi = java.lang.ArrayIndexOutOfBoundsException //cunku array icinde index 3 yok. (0,1,2)
//ornek2
String a="Hello";
System.out.println(a.charAt(5));//java.lang.StringIndexOutOfBoundsException //cuku 5. index yok
//ornek3
String str=null;
System.out.println(str.length());//NullPointerException //cunku null'un length'i olmaz
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}",
"public void sendeFehlerHelo();",
"private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n ... | [
"0.69464797",
"0.67312056",
"0.6641686",
"0.66094315",
"0.6457155",
"0.64493656",
"0.63986355",
"0.63821584",
"0.62724954",
"0.62294286",
"0.6074946",
"0.6068068",
"0.60664105",
"0.60547143",
"0.60498834",
"0.60457414",
"0.604044",
"0.6010105",
"0.5998335",
"0.59938407",
"0.5... | 0.0 | -1 |
Created by Administrator on 2017/9/20. | public interface MyObserver extends Parcelable, Observer {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Over... | [
"0.63247395",
"0.61438745",
"0.58734256",
"0.5863221",
"0.58613014",
"0.58445585",
"0.58309525",
"0.5765187",
"0.574053",
"0.574053",
"0.5731307",
"0.57303196",
"0.57303196",
"0.5728562",
"0.57016814",
"0.57006466",
"0.56992906",
"0.5698493",
"0.5694588",
"0.5680047",
"0.5667... | 0.0 | -1 |
Identifica qual botao foi clicado | public void onClick( View v ) {
switch (v.getId()) {
// Caso o botao de adicionar experimento for clicado
case R.id.buttonDim:
if( isNumeric(Largura.getEditText().getText().toString()) && isNumeric(Profundidade.getEditText().getText().toString())
&& !Unidade.getEditText().getText().toString().equals("") && !Instituicao.getEditText().getText().toString().equals("")
&& !Sala.getEditText().getText().toString().equals("") && !NumLamp.getEditText().getText().toString().equals("")
&& !NumLum.getEditText().getText().toString().equals("") && !Potencia.getEditText().getText().toString().equals("")){
Global.X = Integer.parseInt(spinnerX.getSelectedItem().toString());
Global.Y = Integer.parseInt(spinnerY.getSelectedItem().toString());
Global.Sala = Integer.parseInt( Sala.getEditText().getText().toString());
Global.NumLum = Integer.parseInt( NumLum.getEditText().getText().toString());
Global.NumLamp = Integer.parseInt( NumLamp.getEditText().getText().toString());
Global.Potencia = Double.parseDouble( Potencia.getEditText().getText().toString() );
Global.Largura = Double.parseDouble(Largura.getEditText().getText().toString());
Global.Profundidade = Double.parseDouble(Profundidade.getEditText().getText().toString());
Global.Instituicao = Instituicao.getEditText().getText().toString();
Global.Unidade = Unidade.getEditText().getText().toString();
Global.Mapa = new int[ Global.Y ][ Global.X ];
for ( int i = 0; i < Global.Y; i++ ){
for ( int j = 0; j < Global.X; j++ ){
Global.Mapa[i][j] = 0;
}
}
Intent ClickMap = new Intent( mActivity, MapeamentoFisico.class );
startActivity(ClickMap);
finish();
}
else{
Snackbar.make(findViewById(android.R.id.content), "Existem campos ainda nao preenchidos. Preencha todos os campos e tente de novo.", Snackbar.LENGTH_LONG).setAction("Action", null).show();
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void actionPerformed(ActionEvent ae) {\n\t\tif(ae.getActionCommand().equals(\"Ação 3\"));\n\t\tSystem.out.println(\"Clicke no botão 3\");\n\t\t\n\t}",
"public boolean test(CommandSender sender, MCommand command);",
"public void uiVerifyButtonUndoExist() {\n try {\n getLogg... | [
"0.61551255",
"0.6013124",
"0.5928976",
"0.5907848",
"0.5872263",
"0.58666265",
"0.58574224",
"0.5761426",
"0.57277066",
"0.5720287",
"0.57156324",
"0.564312",
"0.5598524",
"0.55839604",
"0.5580043",
"0.5565054",
"0.5565054",
"0.5560962",
"0.55535656",
"0.55470943",
"0.552783... | 0.0 | -1 |
A type of item. | @CatalogedBy(ItemTypes.class)
public interface ItemType extends CatalogType, Translatable {
/**
* Gets the id of this item.
*
* <p>Ex. Minecraft registers a golden carrot as
* "minecraft:golden_carrot".</p>
*
* @return The id
*/
@Override
String getName();
/**
* Get the default maximum quantity for
* {@link ItemStack}s of this item.
*
* @return Max stack quantity
*/
int getMaxStackQuantity();
/**
* Gets the default {@link Property} of this {@link ItemType}.
*
* <p>While item stacks do have properties, generally, there is an
* intrinsic default property for many item types. However, it should be
* considered that when mods are introducing their own custom items, they
* too could introduce different item properties based on various data on
* the item stack. The default properties retrieved from here should merely
* be considered as a default, not as a definitive property.</p>
*
* @param propertyClass The item property class
* @param <T> The type of item property
* @return The item property, if available
*/
<T extends Property<?, ?>> Optional<T> getDefaultProperty(Class<T> propertyClass);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ItemType getType();",
"@Override\n public int getItemType() {\n return ITEM_TYPE;\n }",
"public ItemType getType() {\n return type;\n }",
"public String getItemType() {\n\t\treturn itemType;\n\t}",
"public ItemType getType()\n {\n\treturn type;\n }",
"@Override\n\tprot... | [
"0.83738136",
"0.8242845",
"0.80428374",
"0.8015289",
"0.8009405",
"0.7644276",
"0.7584018",
"0.75758857",
"0.72293234",
"0.7087867",
"0.707786",
"0.705054",
"0.69367284",
"0.6926918",
"0.68929976",
"0.68707806",
"0.6863873",
"0.6847792",
"0.6847792",
"0.6847792",
"0.6801798"... | 0.0 | -1 |
Gets the id of this item. Ex. Minecraft registers a golden carrot as "minecraft:golden_carrot". | @Override
String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }",
"public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}",
"public final ItemId getId() {\r\n return null;\r\n }",
"public final String getId() {\r\n\t\treturn id;\r\n\t}",
"public... | [
"0.7266755",
"0.7201945",
"0.71473527",
"0.70895845",
"0.7023227",
"0.69790375",
"0.6951372",
"0.6940282",
"0.6936175",
"0.6933974",
"0.6933222",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.692857",
"0.69285... | 0.0 | -1 |
Update dispensed to confirmed. | public static void updateDispensedToConfirmed(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {
Connection con = null;
PreparedStatement pstmtUpdate = null;
PreparedStatement pstmtInsertImage = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(false);
pstmtUpdate = con.prepareStatement(sqlUpdateDispensedToConfirmed);
int offset = 1;
pstmtUpdate.setString(offset++, DispenseState.CONFIRMED.toString());
pstmtUpdate.setString(offset++, pillsDispensedUuid);
pstmtUpdate.executeUpdate();
con.commit();
} catch (Exception e) {
logger.error(e.getMessage(), e);
if( con != null ) {
try {
con.rollback();
} catch(Exception erb ) {
logger.warn(e.getMessage(), e);
}
}
throw e;
} finally {
try {
if (pstmtUpdate != null)
pstmtUpdate.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }",
"protected void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }",
"public static void updatePendingToDispensing(MasterConfig masterConfig, String pillsDispensedUuid) throws Exception {\n\t\tConne... | [
"0.6505874",
"0.63787663",
"0.63083",
"0.60481143",
"0.59472793",
"0.583679",
"0.5717989",
"0.558917",
"0.5578589",
"0.55471927",
"0.55223256",
"0.5462154",
"0.5439987",
"0.5439831",
"0.5371851",
"0.53586394",
"0.5352677",
"0.5327427",
"0.52773684",
"0.52249384",
"0.5190599",... | 0.63321066 | 2 |
Update dispensing to dispensed. | public static void updateDispensingToDispensed(MasterConfig masterConfig, String pillsDispensedUuid, Integer numDispensed, Integer delta, byte[] imagePng ) throws Exception {
Connection con = null;
PreparedStatement pstmtUpdate = null;
PreparedStatement pstmtInsertImage = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(false);
pstmtUpdate = con.prepareStatement(sqlUpdateDispensingToDispensed);
int offset = 1;
pstmtUpdate.setString(offset++, DispenseState.DISPENSED.toString());
pstmtUpdate.setInt(offset++, numDispensed);
pstmtUpdate.setInt(offset++, delta);
pstmtUpdate.setString(offset++, pillsDispensedUuid);
pstmtUpdate.executeUpdate();
pstmtInsertImage = con.prepareStatement(sqlInsertImage);
pstmtInsertImage.setString(1, pillsDispensedUuid);
ByteArrayInputStream bais = new ByteArrayInputStream(imagePng);
pstmtInsertImage.setBinaryStream(2, bais);
pstmtInsertImage.execute();
con.commit();
} catch (Exception e) {
logger.error(e.getMessage(), e);
if( con != null ) {
try {
con.rollback();
} catch(Exception erb ) {
logger.warn(e.getMessage(), e);
}
}
throw e;
} finally {
try {
if (pstmtUpdate != null)
pstmtUpdate.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void updateWithoutObservations(SensingDevice sensingDevice) {\n\n }",
"public static void updatePendingToDispensing(MasterConfig masterConfig, String pillsDispensedUuid) throws Exception {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tcon = PooledData... | [
"0.62397796",
"0.61334836",
"0.6006788",
"0.5976038",
"0.58068347",
"0.57941055",
"0.56536025",
"0.55417717",
"0.5499086",
"0.5499086",
"0.5499086",
"0.54946023",
"0.54946023",
"0.54873866",
"0.5447617",
"0.54417604",
"0.54339254",
"0.5409066",
"0.5379899",
"0.5379899",
"0.53... | 0.53350204 | 27 |
Update pending to dispensing. | public static void updatePendingToDispensing(MasterConfig masterConfig, String pillsDispensedUuid) throws Exception {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
pstmt = con.prepareStatement(sqlUpdatePendingToDispensing);
int offset = 1;
pstmt.setString(offset++, DispenseState.DISPENSING.toString());
pstmt.setString(offset++, pillsDispensedUuid );
pstmt.executeUpdate();
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void incrementPending() {\n\t\tpending++;\n\t}",
"@Override\r\n\tpublic void pending() {\n\t\tSystem.out.println(\"pending\");\r\n\t}",
"public void BufferUpdates()\n {\n //Clear the dispatch list and start buffering changed entities.\n DispatchList.clear();\n bBuff... | [
"0.64939195",
"0.61305994",
"0.58833265",
"0.5882787",
"0.5862058",
"0.57387185",
"0.5718026",
"0.5712421",
"0.569692",
"0.565186",
"0.55728036",
"0.55574954",
"0.5524154",
"0.5486163",
"0.5481279",
"0.5465564",
"0.5459424",
"0.5432758",
"0.542386",
"0.5412199",
"0.5399514",
... | 0.5886031 | 2 |
Sql find by dispense state. | public static List<PillsDispensedVo> sqlFindByDispenseState(MasterConfig masterConfig, DispenseState dispenseState ) throws Exception {
Connection con = null;
PreparedStatement pstmt = null;
try {
List<PillsDispensedVo> pillsDispensedVos = new ArrayList<PillsDispensedVo>();
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
pstmt = con.prepareStatement(sqlFindByDispenseState);
int offset = 1;
pstmt.setString(offset++, dispenseState.toString());
ResultSet rs = pstmt.executeQuery();
while( rs.next() ) {
pillsDispensedVos.add(new PillsDispensedVo(rs));
}
rs.close();
return pillsDispensedVos;
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"State findByPrimaryKey( int nIdState );",
"public void searchAreaState(Connection connection, String state) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n ... | [
"0.61747587",
"0.5715274",
"0.57003087",
"0.54880345",
"0.5487578",
"0.5480604",
"0.5424714",
"0.54196227",
"0.53957576",
"0.52937055",
"0.5257325",
"0.51765877",
"0.5174929",
"0.51662403",
"0.5118836",
"0.5116647",
"0.51146924",
"0.5111445",
"0.51039565",
"0.507431",
"0.5065... | 0.6288435 | 0 |
Find by pills dispensed uuid. | public static PillsDispensedVo findByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
pstmt = con.prepareStatement(sqlFindByPillsDispensedUuid);
int offset = 1;
pstmt.setString(offset++, pillsDispensedUuid);
ResultSet rs = pstmt.executeQuery();
if( !rs.next() ) throw new Exception("Row not found for pillsDispensedUuid=" + pillsDispensedUuid);
PillsDispensedVo pillsDispensedVo = new PillsDispensedVo(rs);
rs.close();
return pillsDispensedVo;
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int find(int p) {\r\n return id[p];\r\n }",
"User getUserByUUID(String uuid);",
"private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\... | [
"0.5366394",
"0.5203682",
"0.5171338",
"0.51535577",
"0.5106757",
"0.50400287",
"0.5029949",
"0.50189507",
"0.49895993",
"0.49436402",
"0.4922524",
"0.49054387",
"0.48996004",
"0.4871271",
"0.48569208",
"0.4851756",
"0.48503697",
"0.48485678",
"0.48456058",
"0.4845298",
"0.48... | 0.5294099 | 1 |
Find image bytes by pills dispensed uuid. | public static byte[] findImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
pstmt = con.prepareStatement(sqlFindImageBytesByPillsDispensedUuid);
int offset = 1;
pstmt.setString(offset++, pillsDispensedUuid);
ResultSet rs = pstmt.executeQuery();
if( !rs.next() ) throw new Exception("Row not found for pillsDispensedUuid=" + pillsDispensedUuid);
InputStream is = rs.getBinaryStream("image_png");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int buffByte;
while( ( buffByte = is.read()) != -1 ) baos.write(buffByte);
byte[] imageBytes = baos.toByteArray();
baos.close();
rs.close();
return imageBytes;
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long extractI2b2QueryId(byte[] bytes);",
"byte[] getRecipeImage(CharSequence query);",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, ... | [
"0.54636014",
"0.5452571",
"0.53813416",
"0.5377059",
"0.5339149",
"0.53151584",
"0.52736336",
"0.51678336",
"0.507859",
"0.50772107",
"0.5075744",
"0.5069479",
"0.506282",
"0.50533533",
"0.49793556",
"0.49221453",
"0.49048123",
"0.48975718",
"0.48891523",
"0.48673064",
"0.48... | 0.6404486 | 0 |
Find all pills dispensed uuids. | public static List<String> findAllPillsDispensedUuids( MasterConfig masterConfig ) throws Exception {
List<String> allUuids = new ArrayList<String>();
Connection con = null;
Statement stmt = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sqlFindAllPillsDispensedUuids);
while( rs.next() ) {
allUuids.add( rs.getString(1));
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (stmt != null)
stmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
return allUuids;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String[] _truncatable_ids();",
"List<String> findAllIds();",
"private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception... | [
"0.5451133",
"0.52532786",
"0.5017727",
"0.49009937",
"0.48626179",
"0.48558137",
"0.48209545",
"0.48030117",
"0.4796302",
"0.47814897",
"0.47690338",
"0.47665662",
"0.47636664",
"0.47524595",
"0.4751993",
"0.4751321",
"0.47173396",
"0.47156918",
"0.47153607",
"0.47066295",
"... | 0.64288056 | 0 |
Delete pills dispensed by pills dispensed uuid. | public static void deletePillsDispensedByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
pstmt = con.prepareStatement(sqlDeletePillsDispensedByPillsDispensedUuid);
int offset = 1;
pstmt.setString(offset++, pillsDispensedUuid);
pstmt.execute();
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deletePokemon(Long pokemonId);",
"public static void deleteImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tcon = PooledDataSource.getInstance(masterConfig).getConnectio... | [
"0.600786",
"0.60053307",
"0.5710554",
"0.56936395",
"0.56837106",
"0.5683275",
"0.5614295",
"0.55874103",
"0.54712695",
"0.5469679",
"0.54192996",
"0.53952736",
"0.5384172",
"0.5334623",
"0.53190434",
"0.53053504",
"0.5292803",
"0.529164",
"0.5288522",
"0.5266265",
"0.526157... | 0.70330846 | 0 |
Delete image bytes by pills dispensed uuid. | public static void deleteImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = PooledDataSource.getInstance(masterConfig).getConnection();
con.setAutoCommit(true);
pstmt = con.prepareStatement(sqlDeleteImageBytesByPillsDispensedUuid);
int offset = 1;
pstmt.setString(offset++, pillsDispensedUuid);
pstmt.execute();
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw e;
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
logger.warn(e);
}
try {
if (con != null)
con.close();
} catch (Exception exCon) {
logger.warn(exCon.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void delete(String uuid);",
"int deleteImage(int pos);",
"public void removeByUuid(String uuid);",
"public void removeByUuid(String uuid);",
"public void removeByUuid(String uuid);",
"public void removeByUuid(java.lang.String uuid);",
"void delete(UUID uuid) throws DataNotFoundInStorage, FailedToDelete... | [
"0.68090856",
"0.64973307",
"0.62892795",
"0.62892795",
"0.62892795",
"0.62749076",
"0.6215396",
"0.5983342",
"0.58597517",
"0.5850349",
"0.5848875",
"0.5848875",
"0.5848875",
"0.5848875",
"0.5840216",
"0.57715154",
"0.5763655",
"0.57531446",
"0.570942",
"0.57024145",
"0.5702... | 0.6880272 | 0 |
Created by themavencoder on 09,April,2019 | public interface MovieApiService {
@GET("movie/popular")
Call<MoviesResponse> getPopularMovies(@Query("page") int page);
@GET("movie/top_rated")
Call<MoviesResponse> getTopRatedMovies(@Query("page") int page);
@GET("movie/{id}")
Call<MoviesResponse> getMovieDetails(@Path("id") long id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
... | [
"0.5843323",
"0.5718311",
"0.567731",
"0.551541",
"0.54534304",
"0.54517305",
"0.54476047",
"0.5394388",
"0.5394388",
"0.5382981",
"0.5382689",
"0.5379455",
"0.53704876",
"0.5347016",
"0.5314963",
"0.5314963",
"0.5314963",
"0.5314963",
"0.5314963",
"0.5314963",
"0.5314963",
... | 0.0 | -1 |
This method initializes sShell | public void createSShell() {
GridData gridData = new GridData();
gridData.widthHint = 500;
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;
gridData.grabExcessHorizontalSpace = true;
gridData.heightHint = 80;
sShell = new Shell();
sShell.setText("系统管理");
sShell.setSize(new Point(703, 656));
sShell.setLayout(new GridLayout());
cLabel = new CLabel(sShell, SWT.CENTER);
cLabel.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream("/images/news.png")));
cLabel.setFont(new Font(Display.getDefault(), "微软雅黑", 18, SWT.NORMAL));
cLabel.setLayoutData(gridData);
cLabel.setText("系统管理");
createTabFolder();
if(SystemMainShell.userType.equals("管理员")){
buttonAddRoom.setEnabled(true);
buttonDeleteRoom.setEnabled(true);
// buttonAddGoods.setEnabled(true);
// buttonDeleteGoods.setEnabled(true);
buttonAddStaff.setEnabled(true);
buttonDeleteStaff.setEnabled(true);
buttonAddUser.setEnabled(true);
buttonDeleteUser.setEnabled(true);
}else if(SystemMainShell.userType.equals("操作员")){
buttonAddRoom.setEnabled(false);
buttonDeleteRoom.setEnabled(false);
// buttonAddGoods.setEnabled(false);
// buttonDeleteGoods.setEnabled(false);
buttonAddStaff.setEnabled(false);
buttonDeleteStaff.setEnabled(false);
buttonAddUser.setEnabled(false);
buttonDeleteUser.setEnabled(false);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Shell() { }",
"private void createSShell(Display display) {\r\n\t\tsShell = new Shell(display, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\r\n\t\t//sShell = new Shell();\r\n\t\tsShell.setText(\"Read\");\r\n\t\tsShell.setLayout(null);\r\n\t\tsShell.setSize(new Point(240, 188));\r\n\t\tlabelTagId = new Label... | [
"0.6891598",
"0.63774985",
"0.6322151",
"0.6264282",
"0.6220932",
"0.61967397",
"0.616392",
"0.610993",
"0.60474557",
"0.5952093",
"0.5934362",
"0.5926938",
"0.5906768",
"0.5902803",
"0.58835316",
"0.58613217",
"0.5844445",
"0.58439827",
"0.58385843",
"0.58285344",
"0.5828534... | 0.62881666 | 3 |
This method initializes tabFolder | private void createTabFolder() {
GridData gridData1 = new GridData();
gridData1.grabExcessHorizontalSpace = true;
gridData1.heightHint = 500;
gridData1.grabExcessVerticalSpace = true;
gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
gridData1.widthHint = 600;
tabFolder = new TabFolder(sShell, SWT.NONE);
tabFolder.setLayoutData(gridData1);
createCompositeRoomMange();
createCompositeGoodsMange();
createCompositeStaffMange();
createCompositeUserMange();
TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
tabItem.setText("房间管理");
tabItem.setControl(compositeRoomMange);
TabItem tabItem1 = new TabItem(tabFolder, SWT.NONE);
tabItem1.setText("商品管理");
tabItem1.setControl(compositeGoodsMange);
TabItem tabItem2 = new TabItem(tabFolder, SWT.NONE);
tabItem2.setText("员工管理");
tabItem2.setControl(compositeStaffMange);
TabItem tabItem3 = new TabItem(tabFolder, SWT.NONE);
tabItem3.setText("系统用户管理");
tabItem3.setControl(compositeUserMange);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initTab()\n {\n \n }",
"private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t... | [
"0.7480498",
"0.70132715",
"0.6877827",
"0.67551154",
"0.6653755",
"0.6606948",
"0.6538462",
"0.6513692",
"0.6430507",
"0.6427663",
"0.6421947",
"0.63708234",
"0.6297996",
"0.62591463",
"0.6232386",
"0.62270886",
"0.6205204",
"0.6190781",
"0.6131854",
"0.61165786",
"0.6104258... | 0.78748375 | 0 |
This method initializes compositeRoomMange | public void createCompositeRoomMange() {
compositeRoomMange = new Composite(tabFolder, SWT.V_SCROLL);
compositeRoomMange.setLayout(null);
compositeRoomMange.setSize(new Point(500, 340));
tableRoom = new Table(compositeRoomMange, SWT.NONE);
tableRoom.setHeaderVisible(true);
tableRoom.setLocation(new Point(5, 5));
tableRoom.setLinesVisible(true);
tableRoom.setSize(new Point(540, 330));
tableViewer = new TableViewer(tableRoom);
TableColumn tableColumn = new TableColumn(tableRoom, SWT.NONE);
tableColumn.setWidth(60);
tableColumn.setText("房间编号");
TableColumn tableColumn1 = new TableColumn(tableRoom, SWT.NONE);
tableColumn1.setWidth(60);
tableColumn1.setText("房间类型");
TableColumn tableColumn2 = new TableColumn(tableRoom, SWT.NONE);
tableColumn2.setWidth(60);
tableColumn2.setText("容纳人数");
TableColumn tableColumn3 = new TableColumn(tableRoom, SWT.NONE);
tableColumn3.setWidth(60);
tableColumn3.setText("包房单价");
TableColumn tableColumn4 = new TableColumn(tableRoom, SWT.NONE);
tableColumn4.setWidth(200);
tableColumn4.setText("房间评价");
buttonAddRoom = new Button(compositeRoomMange, SWT.NONE);
buttonAddRoom.setBounds(new Rectangle(79, 382, 81, 27));
buttonAddRoom.setText("增加房间");
buttonAddRoom
.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
//RoomAddWizard roomAddWizard=new RoomAddWizard();
//WizardDialog wDialog=new WizardDialog(sShell,roomAddWizard);
RoomAdd ra=new RoomAdd();
ra.getsShell().open();
sShell.setMinimized(true);
/*if(ra.flag){
newRoom=ra.getRoom();
tableViewer.add(SystemManageShell.newRoom);
}*/
}
}
);
buttonDeleteRoom = new Button(compositeRoomMange, SWT.NONE);
buttonDeleteRoom.setBounds(new Rectangle(324, 381, 96, 27));
buttonDeleteRoom.setText("删除房间");
buttonDeleteRoom
.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
int deleteIndex=tableRoom.getSelectionIndex();
Room roomToDel=(Room)tableRoom.getItem(deleteIndex).getData();
tableViewer.remove(roomToDel);
RoomFactory.deleteDB(roomToDel);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }",
"public Room() {\r\n\t\troomObjects = new ArrayList<GameObject>();\r\n\t\troom_listener = new RoomListener();\r\n\t\tlisteners = new ListenerContainer(room_listener);\r\n\t}",
"public void initRo... | [
"0.6549173",
"0.63019127",
"0.62850934",
"0.6240827",
"0.62135464",
"0.6167973",
"0.61411524",
"0.6007615",
"0.5967357",
"0.5945639",
"0.5945627",
"0.59368044",
"0.59312093",
"0.5898291",
"0.58809495",
"0.5852984",
"0.5845729",
"0.5841572",
"0.58299744",
"0.5829583",
"0.58055... | 0.6519308 | 1 |
RoomAddWizard roomAddWizard=new RoomAddWizard(); WizardDialog wDialog=new WizardDialog(sShell,roomAddWizard); | public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
RoomAdd ra=new RoomAdd();
ra.getsShell().open();
sShell.setMinimized(true);
/*if(ra.flag){
newRoom=ra.getRoom();
tableViewer.add(SystemManageShell.newRoom);
}*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWizard(IWizard newWizard);",
"static public Wizard createWizard (){\n System.out.println(\"Enter the name of your wizard : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n // enter and get the HP value of the character\n System.... | [
"0.67116183",
"0.65649754",
"0.65217614",
"0.6445027",
"0.64292574",
"0.6427119",
"0.640502",
"0.6376776",
"0.63703406",
"0.63018876",
"0.62722176",
"0.62502277",
"0.6153948",
"0.6125835",
"0.6111364",
"0.6074977",
"0.6028841",
"0.5966401",
"0.59663427",
"0.5957825",
"0.59514... | 0.0 | -1 |
This method initializes compositeGoodsMange | private void createCompositeGoodsMange() {
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
compositeGoodsMange = new Composite(tabFolder, SWT.NONE);
compositeGoodsMange.setLayout(gridLayout);
compositeGoodsMange.setSize(new Point(500, 400));
buttonAddGoods = new Button(compositeGoodsMange, SWT.NONE);
buttonAddGoods.setText("增加商品");
buttonAddGoods.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
InputDialog id1=new InputDialog(sShell,"新增商品","输入商品信息,用空格分开,例如:001 方便面 6.8","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
String str[]=input.split(" ");
CommonADO ado=CommonADO.getCommonADO();
String sql="insert into Goods values('"+str[0]+"','"+str[1]+"','"+str[2]+"')";
ado.executeUpdate(sql);
compositeGoodsShow.dispose();
createCompositeGoodsShow();
compositeGoodsMange.layout(true);
//compositeGoodsShow.layout(true);
}
@Override
public void widgetDefaultSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
}
});
label = new Label(compositeGoodsMange, SWT.NONE);
label.setText(" ");
buttonDeleteGoods = new Button(compositeGoodsMange, SWT.NONE);
buttonDeleteGoods.setText("删除商品");
buttonDeleteGoods.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
InputDialog id1=new InputDialog(sShell,"删除商品","输入商品编号","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
CommonADO ado=CommonADO.getCommonADO();
String sql="delete from Goods where GoodsNo='"+input+"'";
ado.executeUpdate(sql);
//createCompositeGoodsShow();
compositeGoodsShow.dispose();
createCompositeGoodsShow();
compositeGoodsMange.layout(true);
}
@Override
public void widgetDefaultSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
}
});
createCompositeGoodsShow();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createCompositeGoodsShow() {\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 3;\r\n\t\tgridData4.heightHint = 380;\r\n\t\tgridData4.widthHint = 560;\r\n\t\tgridData4.grabExcessVerticalSpace = true;\r\n\t\tGridLayout gridL... | [
"0.6211954",
"0.5889432",
"0.58620834",
"0.5858343",
"0.58029824",
"0.57662606",
"0.5738368",
"0.5704511",
"0.56994677",
"0.567352",
"0.5651787",
"0.56512266",
"0.5644889",
"0.56175774",
"0.5616102",
"0.56051487",
"0.5604899",
"0.55881053",
"0.5577036",
"0.55733323",
"0.55690... | 0.5979621 | 1 |
TODO Autogenerated method stub | @Override
public void widgetSelected(SelectionEvent arg0) {
InputDialog id1=new InputDialog(sShell,"新增商品","输入商品信息,用空格分开,例如:001 方便面 6.8","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
String str[]=input.split(" ");
CommonADO ado=CommonADO.getCommonADO();
String sql="insert into Goods values('"+str[0]+"','"+str[1]+"','"+str[2]+"')";
ado.executeUpdate(sql);
compositeGoodsShow.dispose();
createCompositeGoodsShow();
compositeGoodsMange.layout(true);
//compositeGoodsShow.layout(true);
} | {
"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 widgetDefaultSelected(SelectionEvent arg0) {
} | {
"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 widgetSelected(SelectionEvent arg0) {
InputDialog id1=new InputDialog(sShell,"删除商品","输入商品编号","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
CommonADO ado=CommonADO.getCommonADO();
String sql="delete from Goods where GoodsNo='"+input+"'";
ado.executeUpdate(sql);
//createCompositeGoodsShow();
compositeGoodsShow.dispose();
createCompositeGoodsShow();
compositeGoodsMange.layout(true);
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void widgetDefaultSelected(SelectionEvent arg0) {
} | {
"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 |
This method initializes compositeStaffMange | private void createCompositeStaffMange() {
GridData gridData2 = new GridData();
gridData2.horizontalSpan = 14;
gridData2.heightHint = 300;
gridData2.widthHint = 500;
gridData2.grabExcessHorizontalSpace = true;
GridData gridData8 = new GridData();
gridData8.widthHint = 100;
GridLayout gridLayout1 = new GridLayout();
gridLayout1.numColumns = 18;
compositeStaffMange = new Composite(tabFolder, SWT.NONE);
compositeStaffMange.setLayout(gridLayout1);
textAreaStaff = new Text(compositeStaffMange, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
textAreaStaff.setLayoutData(gridData2);
label2 = new Label(compositeStaffMange, SWT.NONE);
label2.setText("");
label3 = new Label(compositeStaffMange, SWT.NONE);
label3.setText("");
label3.setLayoutData(gridData8);
label4 = new Label(compositeStaffMange, SWT.NONE);
label4.setText("");
Label filler = new Label(compositeStaffMange, SWT.NONE);
tableViewer.setContentProvider(new IStructuredContentProvider(){
public Object[] getElements(Object arg0) {
// TODO Auto-generated method stub
RoomFactory roomFactory=(RoomFactory)arg0;
return roomFactory.getRoomList().toArray();
}
public void dispose() {
}
public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
}});
tableViewer.setInput(new RoomFactory());
tableViewer.setLabelProvider(new ITableLabelProvider(){
public Image getColumnImage(Object arg0, int arg1) {
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object arg0, int arg1) {
// TODO Auto-generated method stub
Room room=(Room)arg0;
CommonADO ado=CommonADO.getCommonADO();
String roomInfoQueryStr="select * from RoomType where Type='"+room.getType()+"'";
ResultSet rs;
rs=ado.executeSelect(roomInfoQueryStr);
int peopleNum=0;
float price=0;
try {
if(rs.next()){
peopleNum=rs.getInt("PeopleNums");
price=rs.getFloat("Price");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(arg1==0)
return room.getRoomNo();
if(arg1==1)
return room.getType();
if(arg1==2)
return peopleNum+"";
if(arg1==3)
return price+"";
if(arg1==4)
return room.getRemarks();
System.out.println(room.getType()+room.getState()+room.getRoomNo());
return null;
}
public void addListener(ILabelProviderListener arg0) {
}
public void dispose() {
}
public boolean isLabelProperty(Object arg0, String arg1) {
// TODO Auto-generated method stub
return false;
}
public void removeListener(ILabelProviderListener arg0) {
}});
buttonAddStaff = new Button(compositeStaffMange, SWT.NONE);
buttonAddStaff.setText("新增员工");
buttonAddStaff.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
InputDialog id1=new InputDialog(sShell,"新增员工","输入员工信息,用空格分开,例如:001 Manager Tommy f 312039","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
String str[]=input.split(" ");
CommonADO ado=CommonADO.getCommonADO();
String sql="insert into Staff values('"+str[0]+"','"+str[1]+"','"+str[2]+"','"+str[3]+"','"+str[4]+"')";
ado.executeUpdate(sql);
showStaff();
}
@Override
public void widgetDefaultSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
}
});
Label filler7 = new Label(compositeStaffMange, SWT.NONE);
Label filler4 = new Label(compositeStaffMange, SWT.NONE);
Label filler1 = new Label(compositeStaffMange, SWT.NONE);
buttonDeleteStaff = new Button(compositeStaffMange, SWT.NONE);
buttonDeleteStaff.setText("删除员工");
buttonDeleteStaff.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
InputDialog id1=new InputDialog(sShell,"删除员工","输入员工编号","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
CommonADO ado=CommonADO.getCommonADO();
String sql="delete from Staff where StaffNo='"+input+"'";
ado.executeUpdate(sql);
showStaff();
}
@Override
public void widgetDefaultSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
}
});
showStaff();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public StaffMember(){\r\n\t\tsuper();\r\n\t\tthis.job = \"\";\r\n\t\tthis.staffShows = new ArrayList<ScheduledConcert>();\r\n\t\tthis.setStaffID();\r\n\t}",
"private void initStaff(){\n //wake movie staff, maintains ArrayList MovieModel and MovieItem buffers\n mMovieStaff = new MovieStaff(this);\n\... | [
"0.62418985",
"0.62120837",
"0.57805073",
"0.57285285",
"0.5507891",
"0.5499547",
"0.5418969",
"0.53996843",
"0.5387631",
"0.5314236",
"0.5244517",
"0.5194516",
"0.51872677",
"0.5173453",
"0.5160525",
"0.5079244",
"0.50414276",
"0.50390834",
"0.50361145",
"0.5031575",
"0.5029... | 0.57657164 | 3 |
TODO Autogenerated method stub | public Object[] getElements(Object arg0) {
RoomFactory roomFactory=(RoomFactory)arg0;
return roomFactory.getRoomList().toArray();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public Image getColumnImage(Object arg0, int arg1) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | public String getColumnText(Object arg0, int arg1) {
Room room=(Room)arg0;
CommonADO ado=CommonADO.getCommonADO();
String roomInfoQueryStr="select * from RoomType where Type='"+room.getType()+"'";
ResultSet rs;
rs=ado.executeSelect(roomInfoQueryStr);
int peopleNum=0;
float price=0;
try {
if(rs.next()){
peopleNum=rs.getInt("PeopleNums");
price=rs.getFloat("Price");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(arg1==0)
return room.getRoomNo();
if(arg1==1)
return room.getType();
if(arg1==2)
return peopleNum+"";
if(arg1==3)
return price+"";
if(arg1==4)
return room.getRemarks();
System.out.println(room.getType()+room.getState()+room.getRoomNo());
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public boolean isLabelProperty(Object arg0, String arg1) {
return 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 widgetSelected(SelectionEvent arg0) {
InputDialog id1=new InputDialog(sShell,"新增员工","输入员工信息,用空格分开,例如:001 Manager Tommy f 312039","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
String str[]=input.split(" ");
CommonADO ado=CommonADO.getCommonADO();
String sql="insert into Staff values('"+str[0]+"','"+str[1]+"','"+str[2]+"','"+str[3]+"','"+str[4]+"')";
ado.executeUpdate(sql);
showStaff();
} | {
"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 widgetDefaultSelected(SelectionEvent arg0) {
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void widgetSelected(SelectionEvent arg0) {
InputDialog id1=new InputDialog(sShell,"删除员工","输入员工编号","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
CommonADO ado=CommonADO.getCommonADO();
String sql="delete from Staff where StaffNo='"+input+"'";
ado.executeUpdate(sql);
showStaff();
} | {
"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 widgetDefaultSelected(SelectionEvent arg0) {
} | {
"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 | private void showStaff() {
CommonADO ado=CommonADO.getCommonADO();
String sql="select * from Staff";
ResultSet rs=ado.executeSelect(sql);
String str="";
str+="员工编号:"+" 职位:"+" 姓名:"+" 性别: "+" 电话号码:"+"\n";
try {
while(rs.next()){
String no=rs.getString("StaffNo");
String jobname=rs.getString("JobName");
String name=rs.getString("Name");
String sex=rs.getString("Sex");
String phone=rs.getString("Phone");
if(no.length()<8){
for(int i=no.length();i<=12;i++)
no+=" ";
}
if(jobname.length()<8){
for(int i=jobname.length();i<=8;i++)
jobname+=" ";
}
if(name.length()<8){
for(int i=name.length();i<=8;i++)
name+=" ";
}
if(sex.length()<8){
for(int i=sex.length();i<=8;i++)
sex+=" ";
}
if(phone.length()<12){
for(int i=phone.length();i<=12;i++)
phone+=" ";
}
str+=no+jobname+name+sex+phone+"\n";
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
textAreaStaff.setText(str);
} | {
"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 |
This method initializes compositeUserMange | private void createCompositeUserMange() {
GridData gridData3 = new GridData();
gridData3.grabExcessHorizontalSpace = true;
gridData3.heightHint = 300;
gridData3.widthHint = 400;
gridData3.horizontalSpan = 3;
GridData gridData11 = new GridData();
gridData11.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;
gridData11.grabExcessHorizontalSpace = true;
GridData gridData10 = new GridData();
gridData10.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;
gridData10.grabExcessHorizontalSpace = true;
GridLayout gridLayout2 = new GridLayout();
gridLayout2.numColumns = 3;
compositeUserMange = new Composite(tabFolder, SWT.NONE);
compositeUserMange.setLayout(gridLayout2);
textAreaUser = new Text(compositeUserMange, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
textAreaUser.setLayoutData(gridData3);
buttonAddUser = new Button(compositeUserMange, SWT.NONE);
buttonAddUser.setText("新增用户");
buttonAddUser.setLayoutData(gridData10);
buttonAddUser.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
System.out.println("新增用户");
InputDialog id1=new InputDialog(sShell,"新增用户","输入用户信息,用空格分开,例如:pdl 666 管理员","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
String str[]=input.split(" ");
CommonADO ado=CommonADO.getCommonADO();
String sql="insert into Users values('"+str[0]+"','"+str[1]+"','"+str[2]+"')";
ado.executeUpdate(sql);
showUser();
}
@Override
public void widgetDefaultSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
}
});
buttonDeleteUser = new Button(compositeUserMange, SWT.NONE);
buttonDeleteUser.setText("删除用户");
buttonDeleteUser.setLayoutData(gridData11);
buttonDeleteUser.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
InputDialog id1=new InputDialog(sShell,"删除用户","输入用户名","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
CommonADO ado=CommonADO.getCommonADO();
String sql="delete from Users where UserName='"+input+"'";
ado.executeUpdate(sql);
showUser();
}
@Override
public void widgetDefaultSelected(SelectionEvent arg0) {
// TODO Auto-generated method stub
}
});
showUser();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initUser() {\n\t}",
"public void initialize() {\n\t\tBmoUser bmoUser = new BmoUser();\n\n\t\t// Responsable\n\t\tBmFilter filterLeaderUserActive = new BmFilter();\n\t\tfilterLeaderUserActive.setValueFilter(bmoUser.getKind(), bmoUser.getStatus(), \"\" + BmoUser.STATUS_ACTIVE);\n\t\tleaderUserIdSugges... | [
"0.64958686",
"0.6372979",
"0.613504",
"0.59331816",
"0.5868309",
"0.584865",
"0.57636315",
"0.57430106",
"0.5668942",
"0.5653913",
"0.56355894",
"0.5555834",
"0.55503",
"0.55446863",
"0.5544628",
"0.5543505",
"0.55208856",
"0.55063397",
"0.54714376",
"0.54605514",
"0.5442284... | 0.66203827 | 0 |
TODO Autogenerated method stub | @Override
public void widgetSelected(SelectionEvent arg0) {
System.out.println("新增用户");
InputDialog id1=new InputDialog(sShell,"新增用户","输入用户信息,用空格分开,例如:pdl 666 管理员","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
String str[]=input.split(" ");
CommonADO ado=CommonADO.getCommonADO();
String sql="insert into Users values('"+str[0]+"','"+str[1]+"','"+str[2]+"')";
ado.executeUpdate(sql);
showUser();
} | {
"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 widgetDefaultSelected(SelectionEvent arg0) {
} | {
"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 widgetSelected(SelectionEvent arg0) {
InputDialog id1=new InputDialog(sShell,"删除用户","输入用户名","",null);
if(id1.open()==0){
input=id1.getValue();
if(input.equals("")) return;
}
else return;
CommonADO ado=CommonADO.getCommonADO();
String sql="delete from Users where UserName='"+input+"'";
ado.executeUpdate(sql);
showUser();
} | {
"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 widgetDefaultSelected(SelectionEvent arg0) {
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | private void showUser() {
CommonADO ado=CommonADO.getCommonADO();
String sql="select * from Users";
ResultSet rs=ado.executeSelect(sql);
String str="";
try {
while(rs.next()){
String user=rs.getString("UserName");
String pass=rs.getString("Password");
String type=rs.getString("UserType");
if(type.equals("管理员"))
pass="******";
if(user.length()<12){
for(int i=user.length();i<=12;i++)
user+=" ";
}
if(pass.length()<12){
for(int i=pass.length();i<=12;i++)
pass+=" ";
}
if(type.length()<12){
for(int i=type.length();i<=12;i++)
type+=" ";
}
str+="用户名:"+user;
str+=" 密码:"+pass;
str+=" 用户类型:"+type+"\n";
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
textAreaUser.setText(str);
} | {
"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 |
This method initializes compositeGoodsShow | private void createCompositeGoodsShow() {
GridData gridData4 = new GridData();
gridData4.grabExcessHorizontalSpace = true;
gridData4.horizontalSpan = 3;
gridData4.heightHint = 380;
gridData4.widthHint = 560;
gridData4.grabExcessVerticalSpace = true;
GridLayout gridLayout3 = new GridLayout();
gridLayout3.numColumns = 3;
compositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE);
compositeGoodsShow.setLayout(gridLayout3);
compositeGoodsShow.setLayoutData(gridData4);
displayRoom(compositeGoodsShow);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public shopbybrands() {\n initComponents();\n }",
"private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");... | [
"0.6268289",
"0.62127656",
"0.6103518",
"0.60814214",
"0.6074058",
"0.60722154",
"0.6064909",
"0.60466766",
"0.60322493",
"0.6022396",
"0.598013",
"0.59518033",
"0.5939173",
"0.59241706",
"0.59162617",
"0.5888461",
"0.58863455",
"0.5879996",
"0.5850768",
"0.5838169",
"0.58380... | 0.7407896 | 0 |
When data changes, this method updates the list of clipEntries and notifies the adapter to use the new values on it | public void setClips(List<Countries> mCountries) {
countries = mCountries;
notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setClipBoardData() {\n }",
"public void refershData(ArrayList<SquareLiveModel> contents) {\n\t\tlistData = contents;\n\t\tnotifyDataSetChanged();\n\t}",
"public void clipCompleted(){\n // unbind service\n getApplicationContext().unbindService(mConnection);\n mIsBound = false... | [
"0.59372103",
"0.5736694",
"0.56753266",
"0.55703",
"0.55004424",
"0.5449395",
"0.5394818",
"0.536567",
"0.5344344",
"0.5333108",
"0.53279996",
"0.5304046",
"0.5299881",
"0.52896565",
"0.52604014",
"0.5249059",
"0.5229612",
"0.5223233",
"0.5155945",
"0.5131103",
"0.5127063",
... | 0.0 | -1 |
Filter Class utilised in v2 | public void filter(String charText) {
charText = charText.toLowerCase();
//countries.clear();
//countries = DashboardFragment.countriesList;
CountryFragment.countriesList.clear();
if (charText.length() == 0) {
CountryFragment.countriesList.addAll(countries);
// countries.addAll(DashboardFragment.countriesList);
} else {
for (Countries wp : countries) {
if (wp.getCountry().toLowerCase().contains(charText)) {
CountryFragment.countriesList.add(wp);
//countries.add(wp);
}
}
}
notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Filter getFilter();",
"public Filter () {\n\t\tsuper();\n\t}",
"public String getFilter();",
"String getFilter();",
"FeatureHolder filter(FeatureFilter filter);",
"public interface Filter {\n\n}",
"public Filter() {\n }",
"public abstract Filter<T> filter();",
"java.lang.String getFilter();",
... | [
"0.76653594",
"0.731847",
"0.7309096",
"0.7297366",
"0.71729505",
"0.7165262",
"0.7118643",
"0.70919526",
"0.7063161",
"0.70459855",
"0.70286757",
"0.6963095",
"0.694132",
"0.6938744",
"0.6938744",
"0.69290024",
"0.69172966",
"0.6916018",
"0.6824074",
"0.6814873",
"0.67212445... | 0.0 | -1 |
Find the top 1 of digital news by id The object will appear with the same id it have. | @Override
public Digital getNews(int id) throws Exception {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
String s = "select * from digital where id = ?";
// check connection of db if cannot connect, it will throw an object of Exception
try {
con = getConnection();
ps = con.prepareCall(s);
ps.setInt(1, id);
rs = ps.executeQuery();
while (rs.next()) {
Digital d = new Digital(rs.getInt("id"),
rs.getString("title"),
rs.getString("description"),
rs.getString("images"),
rs.getString("author"),
rs.getTimestamp("timePost"),
rs.getString("shortDes"));
return d;
}
} catch (Exception e) {
throw e;
} finally {
// close ResultSet, PrepareStatement, Connection
closeResultSet(rs);
closePrepareStateMent(ps);
closeConnection(con);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic NewsCollection findOne(Integer id) {\n\t\treturn newsCollectionMapper.findOne(id);\n\t}",
"public News getByid(News news);",
"Article findLatestArticle();",
"@Override\r\n\tpublic News getNewsById(int id) {\n\t\tConnection conn =null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSe... | [
"0.7161551",
"0.662444",
"0.6559261",
"0.6465206",
"0.64186907",
"0.64182407",
"0.6353288",
"0.6137013",
"0.6108487",
"0.60650676",
"0.6060688",
"0.6059803",
"0.6020251",
"0.60049653",
"0.59848315",
"0.5978958",
"0.5909912",
"0.5891013",
"0.5857839",
"0.5798615",
"0.57945037"... | 0.6318674 | 7 |
Find list of digital news All the digital news will card listed returned the result contain a list of entity.Digital objects with id, title, description, images, author, timePost,shortDes | @Override
public List<Digital> getSearch(String txt, int pageIndex, int pageSize) throws Exception {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
List<Digital> list = new ArrayList<>();
String query = "select *from("
+ "select ROW_NUMBER() over (order by ID ASC) as rn, *\n"
+ "from digital where title \n"
+ "like ?"
+ ")as x\n"
+ "where rn between ?*?-2"
+ "and ?*?";
// check connection of db if cannot connect, it will throw an object of Exception
try {
con = getConnection();
ps = con.prepareStatement(query);
ps.setString(1, "%" + txt + "%");
ps.setInt(2, pageIndex);
ps.setInt(3, pageSize);
ps.setInt(4, pageIndex);
ps.setInt(5, pageSize);
rs = ps.executeQuery();
while (rs.next()) {
Digital d = new Digital(rs.getInt("id"),
rs.getString("title"),
rs.getString("description"),
rs.getString("images"),
rs.getString("author"),
rs.getTimestamp("timePost"),
rs.getString("shortDes"));
list.add(d);
}
} catch (Exception e) {
throw e;
} finally {
// close ResultSet, PrepareStatement, Connection
closeResultSet(rs);
closePrepareStateMent(ps);
closeConnection(con);
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Digital getNews(int id) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n String s = \"select * from digital where id = ?\";\n // check connection of db if cannot connect, it will throw an object of Exception... | [
"0.6452437",
"0.61660653",
"0.6162173",
"0.6079599",
"0.60448927",
"0.6007034",
"0.5964042",
"0.5857159",
"0.5766077",
"0.5717256",
"0.5703867",
"0.5682538",
"0.5618",
"0.5614663",
"0.5601224",
"0.5569107",
"0.55394435",
"0.548333",
"0.5474398",
"0.54572636",
"0.5452037",
"... | 0.5630575 | 12 |
Find number page of digital news. | @Override
public int count(String txt) throws Exception {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
// check connection of db if cannot connect, it will throw an object of Exception
try {
String query = "select count(*) from digital \n"
+ "where title like ?";
con = getConnection();
ps = con.prepareStatement(query);
ps.setString(1, "%" + txt + "%");
rs = ps.executeQuery();
int count = 0;
while (rs.next()) {
count = rs.getInt(1);
}
return count;
} catch (Exception e) {
throw e;
} finally {
// close ResultSet, PrepareStatement, Connection
closeResultSet(rs);
closePrepareStateMent(ps);
closeConnection(con);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getPageNumber();",
"Integer getPage();",
"int getPage();",
"public int getActualPageNumber() {\n try {\n return (int) this.webView.getEngine().executeScript(\"PDFViewerApplication.page;\");\n } catch (RuntimeException e) {\n e.printStackTrace();\n return 0;\... | [
"0.7746502",
"0.7120118",
"0.7054791",
"0.68950665",
"0.68685067",
"0.67633724",
"0.66409314",
"0.65690386",
"0.65690386",
"0.65690386",
"0.65690386",
"0.65122724",
"0.6386757",
"0.63841933",
"0.63841933",
"0.6357709",
"0.63322055",
"0.62743443",
"0.62350464",
"0.6234752",
"0... | 0.0 | -1 |
Find top of digital news All the digital news will card listed returned the result contain a list of entity.Digital objects with id, title, description, images, author, timePost,shortDes | @Override
public List<Digital> getTop(int top) throws Exception {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
List<Digital> list = new ArrayList<>();
// check connection of db if cannot connect, it will throw an object of Exception
try {
String query = "select top " + top + " * from digital order by timePost desc";
con = getConnection();
ps = con.prepareCall(query);
rs = ps.executeQuery();
while (rs.next()) {
Digital d = new Digital(rs.getInt("id"),
rs.getString("title"),
rs.getString("description"),
rs.getString("images"),
rs.getString("author"),
rs.getTimestamp("timePost"),
rs.getString("shortDes"));
list.add(d);
}
} catch (Exception e) {
throw e;
} finally {
// close ResultSet, PrepareStatement, Connection
closeResultSet(rs);
closePrepareStateMent(ps);
closeConnection(con);
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }",
"@Override\n public List<News> getTop(int top) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n Resu... | [
"0.66386276",
"0.6403873",
"0.6147981",
"0.5731571",
"0.5722923",
"0.5674937",
"0.5638402",
"0.56222695",
"0.55872685",
"0.5545453",
"0.5522578",
"0.5521411",
"0.5513936",
"0.5484382",
"0.5464482",
"0.5429761",
"0.5423852",
"0.537246",
"0.53317064",
"0.5331053",
"0.5306271",
... | 0.7282294 | 0 |
Check the exist id of Digital | @Override
public boolean checkExistId(int id) throws Exception {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
try {
String query = "select id from digital where id like ?";
con = getConnection();
ps = con.prepareCall(query);
ps.setString(1, "%" + id + "%");
rs = ps.executeQuery();
int count = 0;
while (rs.next()) {
count = rs.getInt(1);
}
return count != 0;
} catch (Exception e) {
throw e;
} finally {
// close ResultSet, PrepareStatement, Connection
closeResultSet(rs);
closePrepareStateMent(ps);
closeConnection(con);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"public abstract boolean isNatureExist(long id);",
"@Override\n\tpublic boolean existId(String id) {\n\t\treturn fal... | [
"0.69691193",
"0.69691193",
"0.69691193",
"0.69691193",
"0.69691193",
"0.69691193",
"0.69691193",
"0.69691193",
"0.69691193",
"0.67264414",
"0.67103475",
"0.66014665",
"0.65533864",
"0.6544984",
"0.6544984",
"0.6544984",
"0.6544984",
"0.6544984",
"0.6544984",
"0.6544984",
"0.... | 0.72117585 | 0 |
Can be used to get a clone of the current position of the robot | public abstract Position getPosition(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected RobotCoordinates getRobotCoordinates() { return currentPos; }",
"Position getNewPosition();",
"Robot getRobot(Position pos);",
"@Override\r\n\tpublic MotionStrategy Clone() {\n\t\tMotionStrategy move = new RandomAndInvisible(mLifetime);\r\n\t\treturn move;\r\n\t}",
"@Override\r\n\tpublic Point cl... | [
"0.72154164",
"0.6890811",
"0.6687968",
"0.66807854",
"0.6632441",
"0.65777826",
"0.64962053",
"0.64833057",
"0.6434292",
"0.64123213",
"0.6284639",
"0.6226738",
"0.6190268",
"0.6170603",
"0.61594695",
"0.61448294",
"0.6142297",
"0.6133725",
"0.61264974",
"0.61250556",
"0.612... | 0.0 | -1 |
returns the current Orientation relative to the original orientation. | public abstract double getOrientation(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNewOrientation() {\n return newOrientation;\n }",
"public float getOrientation() {\n return this.orientation + this.baseRotation;\n }",
"public final Orientation getOrientation() {\n return orientation == null ? Orientation.HORIZONTAL : orientation.get();\n }... | [
"0.7574596",
"0.7568137",
"0.74372697",
"0.71378696",
"0.7130304",
"0.71275926",
"0.71189064",
"0.70913285",
"0.7089725",
"0.7062196",
"0.701604",
"0.7015564",
"0.70143455",
"0.6952368",
"0.6903211",
"0.6863588",
"0.6765561",
"0.67478925",
"0.67143863",
"0.66762185",
"0.66699... | 0.7200039 | 3 |
Method for testing whether the robot can move with takin into account the walls and otherobstructions. | public abstract boolean canMove(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean canMove(Tile t);",
"public static boolean isValidMove(Robot robot) {\r\n\t\t\r\n\t\tint x = robot.getX();\r\n\t\tint y = robot.getY();\r\n\t\t\r\n\t\t//Make sure the next move won't out\r\n\t\t//of bound to the east\r\n\t\tif(robot.facingEast()) {\r\n\t\t\tif(x + 1 < 10) {\r\n\t\t\t\treturn true;\r\n\t\t... | [
"0.6568437",
"0.64619356",
"0.6418483",
"0.63583666",
"0.6306924",
"0.6303836",
"0.6299335",
"0.62828255",
"0.6272086",
"0.6249702",
"0.62389207",
"0.61633205",
"0.6102159",
"0.6090448",
"0.60867757",
"0.6054542",
"0.60428876",
"0.6005512",
"0.5965378",
"0.5963322",
"0.593763... | 0.5722863 | 46 |
public abstract boolean isTouching(); | public abstract double readLightValue(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Boolean isTouchable();",
"public final boolean isTouching(Shape shape) {\n\t\t// TODO: write this function.\n\t\treturn false;\n\t}",
"public boolean getIsTouchEnabled() {\r\n\t\treturn isTouchEnabled;\r\n\t}",
"@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTou... | [
"0.8646122",
"0.79613954",
"0.76957005",
"0.72126377",
"0.7183674",
"0.7157271",
"0.71471876",
"0.7139767",
"0.7134134",
"0.7133473",
"0.71260154",
"0.710025",
"0.7098938",
"0.70888674",
"0.7082532",
"0.70819396",
"0.7054542",
"0.7041228",
"0.7036605",
"0.70255435",
"0.701850... | 0.0 | -1 |
Makes the robot make an arc of the specified angle. This method does not return immediately. | public abstract void steer(double angle); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void arc(int centerX, int centerY, float angle) {\n tail(centerX, centerY, getSize() - (MARGIN / 2), getSize() - (MARGIN / 2), angle);\n }",
"public void fillArc(float x, float y, float radius, float startAngle, float endAngle);",
"public void strokeArc(float x, float y, float radius, float startAn... | [
"0.6743635",
"0.62701106",
"0.6192377",
"0.61260974",
"0.6015281",
"0.6000632",
"0.594723",
"0.5929112",
"0.5910208",
"0.58669806",
"0.58269703",
"0.58245236",
"0.5823925",
"0.58126926",
"0.58126926",
"0.5771627",
"0.5735055",
"0.5718298",
"0.56931335",
"0.5630374",
"0.561523... | 0.5254904 | 65 |
de check van infrarood is reeds gebeurd als deze methode wordt aangeroepen! | public abstract int getInfraredValue(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void checkeoDeBateria() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void verificaData() {\n\t\t\n\t}",
"public void checkIn() {\n\t}",
"@Override\n\tpublic void check() {\n\t\t\n\t}",
"@Override\n\tpublic void check() {\n\t\t\n\t}",
"private boolean chec... | [
"0.65236163",
"0.63959956",
"0.63746756",
"0.6255718",
"0.6245349",
"0.6245349",
"0.60841024",
"0.60740346",
"0.60683256",
"0.60609436",
"0.6042531",
"0.6038318",
"0.6003",
"0.59939706",
"0.59497124",
"0.5912024",
"0.5879579",
"0.5873249",
"0.5851158",
"0.58470726",
"0.584686... | 0.0 | -1 |
//////////////////////////////////////////////////////////////////////////// VANAF HIER IMPLEMENTATIE PLAYER HANDLER// //////////////////////////////////////////////////////////////////////////// | @Override
public void playerReady(String playerID, boolean isReady) {
//printMessage("ph.playerReady: "+playerID+" is ready");
//moeten wij niets met doen
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void handleServer(EntityPlayerMP player) {\n\n\t}",
"public static void handleDream(Player player) {\n\t\t\n\t}",
"public void OnPlayer(Joueur joueur);",
"@Override\n public void handle(Event event) {\n secondPlayer();\n }",
"void handleKeyboard(Keyb... | [
"0.71373504",
"0.71135616",
"0.69244784",
"0.685429",
"0.6848974",
"0.6845427",
"0.6838431",
"0.6796018",
"0.6784967",
"0.6746137",
"0.6746137",
"0.6729264",
"0.6703956",
"0.6693106",
"0.6693106",
"0.66629094",
"0.6655055",
"0.6654865",
"0.6631584",
"0.6609854",
"0.6590904",
... | 0.0 | -1 |
printMessage("ph.playerJoining: "+playerID+" is joining"); moeten wij niets met doen | @Override
public void playerJoining(String playerID) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void playerJoined(String playerID) {\n\t}",
"public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }",
"GameJoinResult join(Player pla... | [
"0.74850947",
"0.7324614",
"0.7125524",
"0.71172637",
"0.7112299",
"0.7099869",
"0.70561284",
"0.70085436",
"0.69471455",
"0.6941269",
"0.69189334",
"0.6908394",
"0.68998325",
"0.68219167",
"0.6809442",
"0.6804609",
"0.67661536",
"0.675912",
"0.67531",
"0.673185",
"0.6630969"... | 0.7906767 | 0 |
printMessage("ph.playerJoined: "+playerID+" joined"); moeten wij niets met doen | @Override
public void playerJoined(String playerID) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void playerJoining(String playerID) {\n\t}",
"void notifyPlayerJoined(String username);",
"public void playerWon()\r\n {\r\n \r\n }",
"@Override\r\n public void onPlayerJoin(PlayerJoinEvent event) {\r\n Player player = event.getPlayer();\r\n \r\n // Play ba... | [
"0.7328164",
"0.7252421",
"0.700241",
"0.6940685",
"0.69317853",
"0.6913074",
"0.6822056",
"0.67986107",
"0.6784806",
"0.6769775",
"0.6762565",
"0.6607544",
"0.6601682",
"0.6589922",
"0.65855104",
"0.65773517",
"0.65366703",
"0.6519188",
"0.6484245",
"0.64668274",
"0.6448486"... | 0.78393924 | 0 |
printMessage("ph.playerFoundObj: "+playerID+" number:"+playerNumber+" found object"); moeten we zelf checken of dit teammate is? | @Override
public void playerFoundObject(String playerID, int playerNumber) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printPlayerStat(Player player);",
"private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }",
"@Test\n public void searchFindsPlayer() {\n Player jari... | [
"0.62346256",
"0.6173756",
"0.61727965",
"0.6130125",
"0.61133903",
"0.609373",
"0.60442805",
"0.59585243",
"0.5940507",
"0.5890478",
"0.58627874",
"0.5859385",
"0.5858103",
"0.5851851",
"0.58197695",
"0.5802882",
"0.5799619",
"0.5794353",
"0.5790319",
"0.5764488",
"0.5758298... | 0.7458327 | 0 |
printMessage("ph.playerdisc: "+playerID+" disconnected, reason: "+reason); moeten wij niets met doen | @Override
public void playerDisconnected(String playerID, DisconnectReason reason) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void disconnectedPlayerMessage(String name);",
"public void disconnected(String reason) {}",
"void disconnect(String reason);",
"public static String getPlayerDisconnect(ClientController game_client){\n\t\treturn \"DISC \" + (int)game_client.getPlayerInfo()[0];\n\t}",
"protected abstract void disconnect(UU... | [
"0.7601615",
"0.72396576",
"0.70161724",
"0.6790395",
"0.6710423",
"0.6666483",
"0.6654886",
"0.6623333",
"0.6549863",
"0.6479112",
"0.6429383",
"0.640353",
"0.6322266",
"0.6322026",
"0.63092875",
"0.62984866",
"0.62968165",
"0.6147973",
"0.6117565",
"0.61164486",
"0.6110999"... | 0.74432427 | 1 |
printMessage("ph.gameStopped"); htttpImplementation.getController().cancel(); TODO: ik zou reset doen | @Override
public void gameStopped() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void stopGame() {\n ((MultiplayerHostController) Main.game).stopGame();\n super.stopGame();\n }",
"private void stopGame() {\n\t\ttimer.cancel();\n\t\tboard.stopGame();\n\t\treplayButton.setEnabled(true);\n\t\t// to do - stopGame imp\n\t}",
"private void stopGame() {\r\n ... | [
"0.73222387",
"0.71086407",
"0.7098756",
"0.7052279",
"0.69900197",
"0.6810006",
"0.68082184",
"0.679805",
"0.67827773",
"0.6757101",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",
"0.6716121",... | 0.72014916 | 1 |
printMessage("ph.gameStarted, starting to send position"); | @Override
public void gameStarted() {
updatePosition(0,0,0);
// startSendingPositionsThread();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendGameCommand(){\n\n }",
"@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}",
"void sendStartMessage();",
"void sendStartMessage();",
"public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + ... | [
"0.69687355",
"0.6952749",
"0.68383485",
"0.68383485",
"0.68245894",
"0.67095345",
"0.66758794",
"0.6671943",
"0.66098404",
"0.66062766",
"0.65578747",
"0.647584",
"0.64593124",
"0.6440365",
"0.6426094",
"0.64038587",
"0.6385889",
"0.6370257",
"0.63605785",
"0.6321443",
"0.62... | 0.70889866 | 0 |
printMessage("ph.GameWon by Team " + teamNumber); | @Override
public void gameWon(int teamNumber) {
Controller.setStopped(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void printWinner() {\n }",
"public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }",
"public String playerWon() {\n\t\tString message = \"Congratulations \"+name+ \"! \";\n\t\tRandom rand = new Random();\n\t\tswitch(rand.next... | [
"0.7173399",
"0.7153381",
"0.686019",
"0.6765002",
"0.67349744",
"0.66966325",
"0.6674697",
"0.66314995",
"0.6616413",
"0.6576702",
"0.65316576",
"0.6491715",
"0.6459404",
"0.6434995",
"0.6422902",
"0.6420533",
"0.6417613",
"0.64077973",
"0.6404487",
"0.63926136",
"0.6335962"... | 0.58695596 | 79 |
ATtention This method is not used for the simrobot, only has an effect on the real robot | public abstract void snapPoseToTileMid(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void robotInit() {\n }",
"@Override\n public void robotInit() {\n }",
"@Override\n public void robotInit() {\n }",
"public abstract void interagir (Robot robot);",
"public void robotInit() {\n\n }",
"public void robotInit() {\n\n }",
"public abstract void interagir(Robot ... | [
"0.7055639",
"0.7055639",
"0.7055639",
"0.6855842",
"0.67863035",
"0.67863035",
"0.6782274",
"0.67736286",
"0.67736286",
"0.67736286",
"0.67736286",
"0.67736286",
"0.67736286",
"0.6763968",
"0.67063296",
"0.662317",
"0.6610946",
"0.6603239",
"0.6603077",
"0.65345514",
"0.6534... | 0.0 | -1 |
String startOrEnd = intent.getStringExtra("START_OR_END"); String channel = intent.getStringExtra("NOTIFICATION_CHANNEL"); | @Override
public void onReceive(Context context, Intent intent) {
String type = intent.getStringExtra("NOTIFICATION_TYPE");
String channelId = intent.getStringExtra("CHANNEL_ID");
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
Notification notification = null;
if (type.contains("course")) {
String content = (type.contains("start")) ? "Your course starts today!" : "Your course ends today!";
notification = new NotificationCompat.Builder(context, App.CHANNEL_COURSE_ID).setSmallIcon(R.drawable.ic_notifications_white_24dp).setContentTitle("New Course Information").setContentText(content).build();
} else {
notification = new NotificationCompat.Builder(context, App.CHANNEL_ASSESSMENT_ID).setSmallIcon(R.drawable.ic_notifications_white_24dp).setContentTitle("New Assessment Information").setContentText("Your assessment is due today!").build();
}
notificationManager.notify(Integer.parseInt(channelId), notification);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getIncomingIntent()\n {\n if(getIntent().hasExtra(\"Title\")\n && getIntent().hasExtra(\"Time\")\n && getIntent().hasExtra(\"Date\")\n && getIntent().hasExtra(\"Duration\")\n && getIntent().hasExtra(\"Location\")\n && getIntent().hasExtr... | [
"0.6395139",
"0.62746835",
"0.6118142",
"0.60974735",
"0.58036333",
"0.5792988",
"0.57615983",
"0.5740532",
"0.57320666",
"0.57114464",
"0.5642794",
"0.5621858",
"0.5593888",
"0.5580009",
"0.55769694",
"0.55743694",
"0.5571589",
"0.5564626",
"0.5561972",
"0.5552343",
"0.55452... | 0.60311097 | 4 |
alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Login Status"); | @Override
protected void onPreExecute() {
super.onPreExecute();
// Showing progress dialog
pDialog = new ProgressDialog(thisContext);
pDialog.setMessage("Please wait...");
pDialog.setCancelable(true);
pDialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onClick(DialogInterface dialog, int id) {\n\r\n Context context = getApplicationContext();\r\n CharSequence text = \"Welcome \" + name + \"! Signing up...\";\r\n int duration = Toast.LENGTH_SHORT;\r\n\r\n Toast toast = Toast.makeText(context, ... | [
"0.7214013",
"0.715677",
"0.7111684",
"0.7066088",
"0.7064668",
"0.704397",
"0.6995633",
"0.6995633",
"0.6980476",
"0.6948025",
"0.6937573",
"0.69088876",
"0.6900713",
"0.68985975",
"0.6886988",
"0.6842692",
"0.6835197",
"0.68185097",
"0.6810134",
"0.67973685",
"0.67885613",
... | 0.0 | -1 |
Makes an HTTP request to the web service to update the given model or save it if it does not exist in the database. | @Override
public long saveOrUpdate(Object model) {
OrmPreconditions.checkForOpenSession(mIsOpen);
OrmPreconditions.checkPersistenceForModify(model, mPersistencePolicy);
mLogger.debug("Sending PUT request to save or update entity");
String uri = mHost + mPersistencePolicy.getRestEndpoint(model.getClass());
Map<String, String> headers = new HashMap<String, String>();
RestfulModelMap modelMap = mMapper.mapModel(model);
if (mRestContext.getMessageType() == MessageType.JSON)
headers.put("Content-Type", "application/json");
else if (mRestContext.getMessageType() == MessageType.XML)
headers.put("Content-Type", "application/xml");
RestResponse response = mRestClient.executePut(uri, modelMap.toHttpEntity(), headers);
switch (response.getStatusCode()) {
case HttpStatus.SC_CREATED:
return 1;
case HttpStatus.SC_OK:
case HttpStatus.SC_NO_CONTENT:
return 0;
default:
return -1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean update(ModelObject obj);",
"@Override\n public int update(Model model) throws ServiceException {\n try {\n \treturn getDao().updateByID(model);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tlogger.error(e.getMessage());\n\t\t\tthrow new ServiceException(Resu... | [
"0.71019894",
"0.6671019",
"0.6463319",
"0.644475",
"0.6329234",
"0.63078016",
"0.6219448",
"0.6219448",
"0.61766744",
"0.61766744",
"0.6109925",
"0.6067224",
"0.5895542",
"0.58668953",
"0.5852896",
"0.58517474",
"0.5844449",
"0.5821127",
"0.58056897",
"0.5800574",
"0.5777123... | 0.6928236 | 1 |
TODO Autogenerated method stub | @Override
public boolean accept(File dir, String name) {
return(name.endsWith(".mp3"));
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | public void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
index = position;
sour = paths.get(position);
finish();
} | {
"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 Toast.makeText(this, p[index], 1000).show(); | @Override
public void finish() {
Intent I = new Intent();
I.putExtra("songs_path", sour);
I.putExtra("songs_index", index);
I.putExtra("path_detail", p);
I.putExtra("name_song", name_song);
I.putExtra("length", ind);
//Toast.makeText(this, sour, 1000).show();
setResult(RESULT_OK,I);
super.finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n \tSystem.out.println(\"ss1ss\");\n //Toast.makeText(ListViewActivity.this, title[mPosition], Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n ... | [
"0.68214124",
"0.6758684",
"0.6752585",
"0.67437226",
"0.652738",
"0.649858",
"0.64903206",
"0.63822216",
"0.6334517",
"0.63289535",
"0.63104576",
"0.6209714",
"0.6115152",
"0.6102723",
"0.6070943",
"0.6070567",
"0.6039277",
"0.6031918",
"0.5951745",
"0.5949662",
"0.5905967",... | 0.0 | -1 |
Setup for before each test case | @BeforeEach
public void setup() throws Exception {
MockitoAnnotations.openMocks(this);
mockMvc = standaloneSetup(userController)
.setControllerAdvice(userManagementExceptionHandler)
.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void runBeforeTest() {}",
"@Before public void setUp() { }",
"@Before\r\n\tpublic void setup() {\r\n\t}",
"@Before\r\n\t public void setUp(){\n\t }",
"@Before\n\t public void setUp() {\n\t }",
"@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}",
"@Before\n public void setup() {\n ... | [
"0.824252",
"0.8086822",
"0.8025366",
"0.80219376",
"0.80033875",
"0.7994822",
"0.79937744",
"0.79937744",
"0.79937744",
"0.7969581",
"0.7969581",
"0.7969581",
"0.7969581",
"0.7969581",
"0.79663527",
"0.7949009",
"0.78930974",
"0.7888912",
"0.78489465",
"0.7818042",
"0.778049... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args)
{
try
{
throw new MyException("This is the my custom error message");
}
catch (MyException error)
{
System.out.println(error);
}
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
ThreadPoolExecutor pool = (ThreadPoolExecutor) Executors.newFixedThreadPool(10); | public static void main(String[] args) {
MyTheads threads = new MyTheads();
threads.exec();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void useCachedThreadPool() {\n ExecutorService executor = Executors.newCachedThreadPool();\n\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n\n\n executor.execute(() -> {\n System.out.println(\"==========\");\n });\n\n System.out... | [
"0.7306395",
"0.7280557",
"0.7155857",
"0.7149113",
"0.68747926",
"0.6836253",
"0.6719816",
"0.66763794",
"0.6573371",
"0.6569097",
"0.65411454",
"0.6531555",
"0.65245503",
"0.6518193",
"0.65083784",
"0.6502246",
"0.64953816",
"0.64498264",
"0.64495605",
"0.6449142",
"0.64153... | 0.0 | -1 |
TODO Autogenerated method stub System.out.println(args[0]); | public static void main(String[] args) {
if(args.length != 1)
{
System.out.println("using : java FileInfo input filename plz");
System.exit(0);
}
// System.out.println(args[0]);
File f = new File(args[0]);
int
if(f.exists())
{
System.out.println("파일이름 : " + f.getName());
System.out.println("파일경로 : " + f.getPath());
System.out.println("현재경로 : " + f.getAbsolutePath());
System.out.println("쓰기여부 : " + f.canWrite());
System.out.println("읽기여부 : " + f.canRead());
System.out.println("파일길이 : " + f.length());
}
else
{
System.out.println(args[0] + " 파일은 논존재하지 않는다.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n System.out.println(\"args[0] = \" + args[0]);\n System.out.println(\"args[1] = \" + args[1]);\n System.out.println(\"args[2] = \" + args[2]);\n }",
"public static void main(String[] args) {\n\t\tfor (int i =0; i<args.length; i++) {\r\n\t\t\tSyste... | [
"0.8009967",
"0.77192914",
"0.76821214",
"0.76366824",
"0.7635338",
"0.7635338",
"0.7635338",
"0.7635338",
"0.7635338",
"0.7624561",
"0.76025724",
"0.7590127",
"0.7581282",
"0.7571235",
"0.7568944",
"0.7559567",
"0.7555295",
"0.75539815",
"0.75538534",
"0.7550266",
"0.7550266... | 0.0 | -1 |
sets layout to focused if enter pressed | @Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if(keyCode==KeyEvent.KEYCODE_ENTER) {
layout.requestFocus();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void mouseEntered(MouseEvent e) {\n view.requestFocus();\n }",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {\n //enter key ... | [
"0.7003682",
"0.6851449",
"0.68018436",
"0.66881067",
"0.6663253",
"0.6645273",
"0.6617965",
"0.656932",
"0.65664905",
"0.65664905",
"0.65664905",
"0.65663",
"0.654991",
"0.6542241",
"0.65246487",
"0.65246487",
"0.65246487",
"0.65246487",
"0.65246487",
"0.6523315",
"0.6519074... | 0.7619127 | 0 |
sets layout to focused if layout pressed | @Override
public boolean onTouch(View v, MotionEvent event) {
layout.requestFocus();
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFocus() {\n\t}",
"public void setFocus();",
"public void setFocused(boolean focused);",
"void setFocus();",
"public void focus() {}",
"public void setFocus() {\n }",
"@Override\n public void onClick(View view) {\n // clear and set the focus on this viewgroup\n this.cl... | [
"0.70400697",
"0.70005006",
"0.6989401",
"0.69741046",
"0.69394106",
"0.68516403",
"0.679961",
"0.6752377",
"0.67503595",
"0.67503595",
"0.67503595",
"0.67503595",
"0.67503595",
"0.67446595",
"0.6737927",
"0.67350996",
"0.67313516",
"0.67313516",
"0.67313516",
"0.67313516",
"... | 0.72156304 | 0 |
sets layout to focused if alarmTimeButton pressed | @Override
public boolean onTouch(View v, MotionEvent event) {
layout.requestFocus();
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View view) {\n calendar.set(Calendar.HOUR_OF_DAY, tp.getHour());\n calendar.set(Calendar.MINUTE, tp.getMinute());\n\n //get int value of timepicker selected time\n int hour = tp.getHour();\n int mi... | [
"0.6291798",
"0.6240165",
"0.6212706",
"0.61580074",
"0.60433686",
"0.59696776",
"0.59542996",
"0.59417486",
"0.59387255",
"0.5925583",
"0.5923349",
"0.5920649",
"0.59190816",
"0.59159076",
"0.5913716",
"0.59063613",
"0.5903052",
"0.59002906",
"0.5899253",
"0.5889857",
"0.588... | 0.5927065 | 10 |
sets layout to focused if adTimeButton pressed | @Override
public boolean onTouch(View v, MotionEvent event) {
layout.requestFocus();
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFocus() {\n startButton.setFocus();\n }",
"public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}",
"void setFocus();",
"public void setFocus() {\n\t}",
"public void setFocus();",
"protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\... | [
"0.6142135",
"0.60901755",
"0.6067187",
"0.60457456",
"0.60447913",
"0.5961433",
"0.5955083",
"0.5955083",
"0.5955083",
"0.5930116",
"0.5911048",
"0.5820092",
"0.58031654",
"0.57849073",
"0.57692033",
"0.5767916",
"0.57640564",
"0.5761231",
"0.5759486",
"0.5717006",
"0.571700... | 0.62275547 | 2 |
if urlText not focused, hide keyboard | @Override
public void onFocusChange(View v, boolean hasFocus) {
if(!hasFocus) {
imm.hideSoftInputFromWindow(layout.getWindowToken(), 0);
} else {
urlText.selectAll();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void hideKeyboard() {\n\t\tInputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tEditText editText = (EditText)findViewById(R.id.searchtext);\n\t\tinputMgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);\t\t\n\t}",
"public void setInputMethodShowOff... | [
"0.6625575",
"0.64518404",
"0.6347333",
"0.6334012",
"0.6281871",
"0.62800837",
"0.6239035",
"0.6237449",
"0.6237449",
"0.6234434",
"0.6199721",
"0.61975986",
"0.6193481",
"0.61874044",
"0.618441",
"0.61500555",
"0.6139629",
"0.61229235",
"0.6122296",
"0.61197466",
"0.6111657... | 0.74313575 | 0 |
shows the time picker | public void pickTime(View view) {
DialogFragment newFragment = new TimePicker();
newFragment.show(getFragmentManager(), "timePicker");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showTimePicker(){\n final Calendar c = Calendar.getInstance();\n mHour = c.get(Calendar.HOUR_OF_DAY);\n mMinute = c.get(Calendar.MINUTE);\n\n // Launch Time Picker Dialog\n TimePickerDialog tpd = new TimePickerDialog(this,\n new TimePickerDialog.OnTime... | [
"0.8156941",
"0.7951597",
"0.77912736",
"0.7729824",
"0.76787233",
"0.7639499",
"0.7563876",
"0.75263005",
"0.7495254",
"0.74766797",
"0.7441154",
"0.7388808",
"0.72970134",
"0.72139657",
"0.7199064",
"0.71902364",
"0.7180407",
"0.71717286",
"0.7162668",
"0.7159221",
"0.71569... | 0.75944006 | 6 |
Use the current time as the default values for the picker | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR_OF_DAY);
int minute = c.get(Calendar.MINUTE);
// Create a new instance of TimePickerDialog and return it
return new TimePickerDialog(getActivity(), this, hour, minute,
DateFormat.is24HourFormat(getActivity()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initializeTime() {\n hour = cal.get(Calendar.HOUR);\n min = cal.get(Calendar.MINUTE);\n\n time = (EditText) findViewById(R.id.textSetTime);\n time.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n if(min < 10) {\n time.s... | [
"0.7145544",
"0.6881153",
"0.6741829",
"0.66395825",
"0.6638164",
"0.6624899",
"0.65596735",
"0.65371704",
"0.65153104",
"0.65095294",
"0.65068406",
"0.6505117",
"0.6502575",
"0.64955634",
"0.64939094",
"0.6490701",
"0.6488149",
"0.6481539",
"0.6474427",
"0.6473683",
"0.64642... | 0.0 | -1 |
set hour of alarm time | @Override
public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute) {
boolean timeInAM = true;
if(hourOfDay>=12) { //if it's pm
hourOfDay-=12;
timeInAM = false;
} else { //if it's am
timeInAM = true;
}
//update shared preferences with alarm time
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt("alarmHour_"+alarmID, hourOfDay).apply(); //will be 0:00 if 12:00
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt("alarmMinutes_"+alarmID, minute).apply();
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putBoolean("timeInAM_"+alarmID, timeInAM).apply();
//set minuteString of alarm time
String minuteString;
if(minute<10) {
minuteString = "0" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("alarmMinutes_"+alarmID, 0);
} else {
minuteString = "" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("alarmMinutes_"+alarmID, 10);
}
int alarmHour = PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("alarmHour_"+alarmID, 0);
if(alarmHour<10 && alarmHour>0) {
alarmTimeButton.setText(" "+alarmHour+":"+minuteString);
} else if(alarmHour==0) {
alarmTimeButton.setText("12:"+minuteString);
} else {
alarmTimeButton.setText(alarmHour+":"+minuteString);
}
//show alarm time
if(PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("timeInAM_"+alarmID, true)) {
dayOrNight.setText("AM");
} else {
dayOrNight.setText("PM");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHour(int newHour) {\n hour = newHour; // sets the appointment's hour to the input in military time\n }",
"public void setTime(String newHour) { // setTime sets the appointment's hour in standard time\n \n // this divides the newHour string into the hour part and the 'am'/'p... | [
"0.74369746",
"0.7128418",
"0.7123178",
"0.7041694",
"0.69339716",
"0.6821802",
"0.6781678",
"0.6772096",
"0.67640454",
"0.669386",
"0.6679871",
"0.6607545",
"0.6604041",
"0.6596059",
"0.659389",
"0.65368295",
"0.65352196",
"0.65181917",
"0.6505283",
"0.65003276",
"0.64222956... | 0.67290044 | 9 |
initialize array of days and selectedRepeatDays | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
selectedRepeatDays = new ArrayList<String>();
final String[] days = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle("Restrict alarm to some days? If not, select none.")
.setMultiChoiceItems(days, null, new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
if(isChecked) {
selectedRepeatDays.add(days[which]);
} else {
selectedRepeatDays.remove(days[which]);
}
}
})
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//display in order
Collections.sort(selectedRepeatDays);
Set<String> daySet = new HashSet<String>(selectedRepeatDays);
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putStringSet("daySet_"+alarmID, daySet).apply(); //permanently store selectedRepeatDays as a set
String displayDays = "";
if(selectedRepeatDays.contains("Monday")) {
displayDays = displayDays + " M";
}
if(selectedRepeatDays.contains("Tuesday")) {
displayDays = displayDays + " Tu";
}
if(selectedRepeatDays.contains("Wednesday")) {
displayDays = displayDays + " W";
}
if(selectedRepeatDays.contains("Thursday")) {
displayDays = displayDays + " Th";
}
if(selectedRepeatDays.contains("Friday")) {
displayDays = displayDays + " F";
}
if(selectedRepeatDays.contains("Saturday")) {
displayDays = displayDays + " Sa";
}
if(selectedRepeatDays.contains("Sunday")) {
displayDays = displayDays + " Su";
}
if(selectedRepeatDays.isEmpty()) {
displayDays = "Next available time";
}
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putString("displayDays_"+alarmID, displayDays).apply();
daysOfWeek.setText(PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("displayDays_"+alarmID, "Next available time"));
}
})
.setNegativeButton("Cancel", null);
return builder.create();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initSelectedDays() {\n binding.viewAlarm.cbMonday.setSelected(alarmVM.isDayActive(Calendar.MONDAY));\n binding.viewAlarm.cbTuesday.setSelected(alarmVM.isDayActive(Calendar.TUESDAY));\n binding.viewAlarm.cbWednesday.setSelected(alarmVM.isDayActive(Calendar.WEDNESDAY));\n bin... | [
"0.6945343",
"0.67848134",
"0.64677143",
"0.6435846",
"0.62859553",
"0.6206987",
"0.61690444",
"0.6143989",
"0.604144",
"0.6023553",
"0.59792244",
"0.5950047",
"0.5874162",
"0.5851062",
"0.5758694",
"0.5721984",
"0.57008165",
"0.5698366",
"0.56473464",
"0.5596389",
"0.5583019... | 0.5354981 | 32 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.