anchor stringlengths 10 14.3k | positive stringlengths 10 14.9k |
|---|---|
Create an aliased JOURNAL_ENTRY_LINE table reference | public JournalEntryLine(String alias) {
this(DSL.name(alias), JOURNAL_ENTRY_LINE);
} |
Returns the value of the 'Id Node2' attribute. If the meaning of the 'Id Node2' attribute isn't clear, there really should be more of a description here... | String getIdNode2(); |
TODO Autogenerated method stub | @Override
public boolean dispatchTouchEvent(MotionEvent event) {
Log.i(TAG, "MyLinearLayout() dispatchTouchEvent event = " + event.getAction());
return super.dispatchTouchEvent(event);
} |
TODO switch to commons multipart | @Bean
public StandardServletMultipartResolver multipartResolver() {
return new StandardServletMultipartResolver();
} |
Disable these tests for Redis 2 and below | @Test
public void bitfieldOperations() throws Exception {
assumeThat(getEnv().serverVersion[0], is(greaterThanOrEqualTo(3)));
awaitIndefinitely(commandClient.del(key("bf")));
List<Long> results = awaitIndefinitely(commandClient.bitfield(key("bf"), asList(new Incrby(I05, 100L, 1L), new Get(... |
Act do whatever the StoreItem wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. | public void act()
{
if(Greenfoot.mouseClicked(this)){
storeMenu.getLastPressed(this,item,cost);
changeImage();
}
} |
DERencoded X.509 certificate chain repeated bytes certificate = 1; | @java.lang.Override
public java.util.List<com.google.protobuf.ByteString>
getCertificateList() {
return certificate_;
} |
Creates the shoe from file | @Override
public void createShoeFromFile(String fileName) {
File file = new File(fileName);
Scanner myReader = null;
try {
myReader = new Scanner(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
while (myReader.hasNextLine())... |
required .cn.mxz.protocols.user.PropsPro unReceived = 1112331; | boolean hasUnReceived(); |
gives a character object ability (behavior) to attack with a weapon and deal damage to opponent's health | String attack(); |
this is for fragment tabs | @Override
public Fragment getItem(int position) {
switch (position) {
case 0:
FragmentAboutUs aboutFragment = new FragmentAboutUs();
return aboutFragment;
case 1:
FragmentContactUs contactUsFragment = new FragmentContactUs();
... |
beginusercode TODO Autogenerated method stub endusercode | public void getCosts() {
} |
Creates a new PaxosExecution within the given PaxosInstance for the given initiator. A PaxosRound with round number 0 is also created and its timeout is started | public PaxosExecution(PaxosInstance a_instance, String a_initiator, Vector a_roundLeaders)
{
this.m_initiator = a_initiator;
this.m_paxosInstance = a_instance;
m_roundLeaders = a_roundLeaders;
createRound();
} |
sets the game with 2 players and their workers, creates instance of model then set the current player | @Before
public void setUp() {
player1 = new Player("Test", 5, "@");
player2 = new Player("Opponent", 2, "#");
ArrayList<Player> players = new ArrayList<>();
players.add(player1);
players.add(player2);
model = new Model(players, 2);
player1.setWorkers(GodName.H... |
Take a picture with the camera, this also handles the Mat objects | private Tuple<PatternCoordinates, Mat> pair(){
mCamera.takePicture(null, null, jpegCallBack);
Tuple<PatternCoordinates, Mat> patternAndImagePair = null;
switch(GlobalResources.getInstance().getImageSettings().getBackgroundMode()){
case ImageSettings.BACKGROUND_MODE_RGB:
... |
Get the name of the variable | public StructuredQName getVariableQName(); |
Executes a SELECT statement. By default this method will print the output to the console as a CSV. The output manager can be set explicitly by using the setOutputManager method. If the query is successful a CallableStatement is returned. Otherwise null is returned. | public CallableStatement execute(String query) throws RtpException {
/* Create a Callable statement. */
CallableStatement stmt = Connector.createCallableStatement(conn, query);
/* Execute the statement */
if (stmt != null) {
try {
boolean check = stmt.execut... |
Retrieve the Notional aggregated over the Date Pairs | public double notional (
final int iDate1,
final int iDate2)
throws java.lang.Exception
{
org.drip.analytics.cashflow.CompositePeriod cp = containingPeriod (iDate1);
if (null == cp || !cp.contains (iDate2))
throw new java.lang.Exception ("Stream::notional => Invalid Inputs");
org.drip.quant.common.Arr... |
Returns the Element at the position in the DoubleNodeList. | public E getElement(int position){
// Position is larger than the current size.
if(checkPosition(position)){
return null;
}
return getDoubleNodeAt(position).element;
} |
Set/clear the request queued flag | public synchronized final void setQueued(boolean qd) {
setFlag(RequestQueued, qd);
} |
toString for format 2 | public static String toStringFormat_2(Date date) {
return dateToString(date, DATE_FORMAT_2);
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_mp_num.vipType | public String getViptype() {
return viptype;
} |
Use HowMe.newBuilder() to construct. | private HowMe(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} |
Mark online boolean as b in firebase | private void markOnline(boolean b) {
usersRef.child(userMe.getId()).child("online").setValue(b);
} |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
RegisterActivity.this.finish();
} |
Close app Redirect back to login page | public void ClickLogout(View view ){
logout();
intent = new Intent(context,LoginActivity.class);
//remove all previous stack activities
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();
} |
Returns number of total attempts as integer from score string. | private static int parseTotalAttempts(String score) throws NumberFormatException {
String[] splitString = score.split("/");
if (splitString.length != 2) {
throw new NumberFormatException("Score is not formatted correctly.");
}
return Integer.parseInt(splitString[1]);
} |
Returns true if field legID is set (has been assigned a value) and false otherwise | public boolean isSetLegID() {
return EncodingUtils.testBit(__isset_bitfield, __LEGID_ISSET_ID);
} |
Update the tps_latency_history/k8s_tps_latency_history table with tps & Latency values. | public static void updateTpsLatHistory(final int envId, int componentId, float tpsVaule, float latencyValue, String platform){
final java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());
String queryStr = null;
if(platform.equals("K8s")){
queryStr = HQLConstants.UPDATE_K8S_T... |
end READINI method to get file extension of a file | public String getFileExtension(File objFile) {
String sFileName = null;
String sExtension = null;
try {
if (!objFile.exists()) {
throw new Exception("File does not exists");
}
sFileName = objFile.getName();
int i = sFileName.las... |
Constructor creating a random path for the TspSOlutionInstance | protected TspSolutionInstance(int amountOfCities) {
List<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < amountOfCities;i++) {
list.add(i);
}
java.util.Collections.shuffle(list);
this.path = list;
} |
Is this a possible path? | public boolean isCommandValid(Character character, String command)
{
if(command.length() > 4 && isKill(command))
{
HandleKill(character, command);
return true;
}
if(isPossess(command))
{
HandlePossess(character);
retu... |
Sets value at index i. 1. Convert target value to marked value. 2. Store into internal array. | public void set(int i, long v) {
data[i] = newValue(v);
} |
Check if there's an instance of the given item already in the set | public boolean contains(T item) {
synchronized(this) {
return _treeSet.contains(item);
}
} |
update coupon after users users use the coupon | public void updateCouponwithBoughtCoupon(String ID, boolean isgetCoupon) {
helper.updatePoolLocationTable(PooltableName, ID,
convertToString(isgetCoupon));
} |
Returns the value of the 'Tag' attribute. If the meaning of the 'Tag' attribute isn't clear, there really should be more of a description here... | String getTag(); |
constructor it initialize the hash table | public QuantDataHashTable() {
quantData = new Hashtable<String, Double>();
} |
2 VM by 2 hosts separate component | @Override
public void handle(final HttpServerRequest req) {
String startTime = "1355620946302"; //--separate-comp
Iterator<EventInfo> iter =
dataService.events()
.find("{timestamp:{$gt:"+startTime+"}}")
.sort("{timestamp:1}")
.as(EventInfo.class).iterator();
EventCounte... |
how to print the node | @Override
public Object string(Object node) {
return ((Node<E>) node).element.toString();
} |
TODO Autogenerated method stub | @Override
public void onStopOrder(StopOrder StopOrder) throws Exception {
} |
Find the element in the list which matches the object | private <T> T findActual(T matchingObject, List<? extends T> list) {
T actual = null;
for (T check : list) {
if (check.equals(matchingObject)) {
actual = check;
}
}
return actual;
} |
method ensureCapacity() double the capacity of the Dynamic Array it creates new array with increased length, then copies all elements of current array in this array and then assigns current array to new one Time Complexity is O(n) linear | private void ensureCapacity() {
int newSize = elements.length * 2;
Object[] newElements = new Object[newSize];
for (int i = 0; i < elements.length; i++) {
newElements[i] = elements[i];
}
elements = newElements;
} |
This method was generated by MyBatis Generator. This method returns the value of the database column AD_WSLOG.HEADING | public String getHeading() {
return heading;
} |
.ReplicateRequest replicateRequest = 8; | public boolean hasReplicateRequest() {
return replicateRequestBuilder_ != null || replicateRequest_ != null;
} |
This method was generated by MyBatis Generator. This method sets the value of the database column T_LOG_BASERECORD.COUNT | public void setCount(Integer count) {
this.count = count;
} |
This method was generated by MyBatis Generator. This method returns the value of the database column bjwg_withdrawals.user_id | public Long getUserId() {
return userId;
} |
Recursive "Bruteforce" metode BubbleSort O(n^2) | public void recursiveBubbleSort(int[] numbers) {
boolean sorted = false;
int posA;
int posB;
for(int i = 0; i < numbers.length - 1; i++) {
if(numbers[i] > numbers[i + 1] && numbers[i] != numbers.length) {
posA = numbers[i];
posB = numbers[i + ... |
Generate the Etag hash string that is returned by the assets location. | protected String getFileETag(File file) {
FileInputStream is = null;
try {
is = new FileInputStream(file);
return "\"" + DigestUtils.md5Hex(is) + "\"";
} catch (IOException e) {
return "";
} finally {
closeQuietly(is);
}
} |
optional string name = 1; | java.lang.String getName(); |
ExecuteQuery. xmlMessage is the string containing the BioMart query to execute. bos is the the output stream where the results of xmlMessage is written Updates npercentdone[nstatusfield] after obtaining lock on lockpd | public void executeQuery(BufferedOutputStream bos, String xmlMessage,
int[] npercentdone,int nstatusfield, Object lockpd) throws IOException
{
URL biomartServer = new URL(SZBIOMARTURL);
URLConnection conn = biomartServer.openConnection();
// use POST method
conn.setDoOutput(true);... |
Be sure the menus are current | public void updateMenus() {
System.out.println("BarGraphDisplayer.updateMenus");
CommandRegistrar.gRegistrar.checkAction("barGraph");
CommandRegistrar.gRegistrar.enableAction("viewOptions");
} |
Called as the drawer slides by percentage | @Override
public void onDrawerSlide(View drawerView, float slideOffset) {
super.onDrawerSlide(drawerView, slideOffset);
//SlideOffset comes in on a scale of 0-1.
//40% looks roughly about right to swap out
if (slideOffset > 0.4) {
... |
TODO Autogenerated method stub | public void onClick(View v) {
Intent i=new Intent(TimeOutActivity.this,Playlevel10Activity.class);finish();
startActivity(i);
//buttonSound.start();
} |
Validation Functions Description : To validate the Telephone Work in Contact Details of Customer Tab Coded by :Raja Created Data:05 Oct 2016 Last Modified Date:05 Oct 2016 Modified By:Raja Parameter:TelephoneWork | public void validate_the_Telephone_Work_in_Contact_Details_of_Customer_Tab(String TelephoneWork)throws Exception {
VerifyElementPresent(Desktop_XPATH_Verify_Customer_Page_TelephoneWork.replaceAll("M_Header", "Contact Details").replaceAll("M_Category", "Telephone - Work").replaceAll("M_InnerText", TelephoneWork), "Tel... |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu, menu);
return true;
} |
function that get customers by userId | @GET
@Path("getCustomerByUser")
public Customer getCustomerByUser(@QueryParam("user")int user) {
return ManagerHelper.getCustomerManager().getCustomerByUser(user);
} |
Writes to file, replacing user's existing secret with newSecret Returns true if new file was created properly with appropriate contents | private boolean replaceSecretWith(String user, String newSecret) {
//
System.out.println();
System.out.println();
System.out.println(); System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
System.out.println... |
/ renamed from: a | public int encodedSize(ZABEMobileNetwork jVar) {
return jVar.unknownFields().mo132944h();
} |
repeated .ProfileMessage.ContactAddress contactAddress = 4; | java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress>
getContactAddressList(); |
Sets the background color of a view | public S<T> bg(String color){
try{
int c = Color.parseColor(color);
bg(c);
}catch(IllegalArgumentException ex){
ex.printStackTrace();
}
return this;
} |
Load the detailed state of a game for a particular level, including highlevel information and elements present. | void loadOriginalGameState(String saveName, int level) throws IOException; |
The name of the column. | public String getName() {
return name;
} |
Set / Get Prefix Code | public String getPrefixCode() { return sharedPreferences.getString(PREFIX_CODE, ""); } |
/ renamed from: a | public void mo38281a(short s) {
this.f27039b = s;
} |
Get list of customers | public List<CustomerModel> readDatabase() throws Exception{
List<CustomerModel> list = new ArrayList<CustomerModel>();
try{
log.info("Loading MySql driver");
Class.forName("com.mysql.jdbc.Driver");
log.info("Setting up connection with db");
connect= DriverManager.getConnection("jdbc:mysql://localhost:3306/apidft","r... |
Send SMS Method Body | private void sendSms(String strPhoneNumber, String strSms) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.SEND_SMS) == PackageManager.PERMISSION_GRANTED) {// checking runtime permission for Sending SMS
try {
SmsManager smsManager = SmsManager.getDefault();
... |
Checks if this is capable of being a valid done command based on the criteria of length being more than 1. | public boolean satisfiesMinimumDoneCommandLength(String[] command) {
return (command.length > 1);
} |
additional method for method findPeriodForTwoFirstPositiveNumbersInARow | static int[] findFirstTwoPositiveNumbersInARow(int... sourceNumbers) {
return IntStream.of(sourceNumbers)
.filter(x -> x > 0)
.peek(x -> System.out.format("%d, ", x))
.limit(2).toArray();
} |
scegliere groupId e label per ogni server | @Override
public boolean prepareOp() {
Iterator<Server> iter = this.serverList.iterator();
Server current = null;
/*
* the first replicaNumber servers received the label 0.
* then the label of other servers is calculated by sql.getNewLabel()
*/
int groupId = 0;
long label = Constants.maxLabel;
... |
.cosmos.base.query.v1beta1.PageRequest pagination = 1; | public cosmos.base.query.v1beta1.Pagination.PageRequestOrBuilder getPaginationOrBuilder() {
return getPagination();
} |
Creates a new xforms error indication. | public XFormsErrorIndication(String message, Exception cause, EventTarget target, Object info) {
super(message, cause);
this.target = target;
this.info = info;
} |
Feature Code to Offset Offset has no clear meaning in V3 | int getFeatureOffset(int feat) {
throw new UIMARuntimeException(UIMARuntimeException.NOT_SUPPORTED_NO_HEAP_IN_UIMA_V3);
} |
Serializes the specified name. | private void _writeName(final Name name) throws IOException {
_out.startObject();
_writeReifier(name);
_writeItemIdentifiers(name);
if (!name.getType().equals(_defaultNameType)) {
_writeType(name);
}
_writeScope(name);
_writeKeyValue("value", name.getV... |
string regex = 1; | public java.lang.String getRegex() {
java.lang.Object ref = regex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8... |
Adds a result for the script; cannot have multiple query results. | public ExecServiceMethodDescription queryResult(String name, String description) {
if (resultAdded) {
throw new IllegalArgumentException("The query can only have one result");
}
resultAdded = true;
addResult(name, description, VType.class);
return this;
} |
Creates a wishlist when one product is added to the list when created | public void createWishlist(Customer customer, Product product) {
wishlistService.createWishlist(customerRepository.findByID(customer.getAccountID()), product);
} |
load the first page of results | void load(Request req); |
This is a callback from the PublisherLink | private void messageRecv(M msg) {
if (LOG.isTraceEnabled()) {
LOG.trace("messageRecv = {}", msg);
} else if (LOG.isDebugEnabled()) {
LOG.debug("messageRecv = {}", msg.getClass().getName());
}
synchronized (_subscribers) {
for (SubscriberImpl subscribe... |
.SubnetResponse subnetResponse = 17; | public Builder setSubnetResponse(entities.Torrent.SubnetResponse value) {
if (subnetResponseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
subnetResponse_ = value;
onChan... |
initialises Map based on data | @Override
public void start(final Stage primaryStage) {
loadDemoData(demoDataFile);
ProcessingProfiler.setVerboseOutputState(true);
ProcessingProfiler.setLoggerOutputState(true);
ProcessingProfiler.setDebugState(false);
DefaultErrorDataSet bubbleDataSet1a = new DefaultError... |
Determines if the updateDate has been initialized. It is useful to determine if a field is null on purpose or just because it has not been initialized. | public boolean isUpdateDateInitialized() {
return updateDate_is_initialized;
} |
Method is used to call the getAllVehicles() method from the service object to populate on create of the managed bean Used so that the List vehicles contains data when vehicles.xhtml renders | @PostConstruct
public void init() {
if (vehicles == null) {
try {
vehicles = getVehicles();
} catch (Exception e) {
//
}
}
} |
Is this a Priority Flight | public Flight(String flightNumber, String airline, int passengerCapacity, String destination){
this.flightNumber = flightNumber;
this.airline = airline;
this.passengerCapacity = passengerCapacity;
this.destination = destination;
passengerManifest = new ArrayList<Passenger>();
... |
Overwrites the rest of the protocol and sets the protocol state to finish | void endNegotiation(String reason); |
Tests handling of errors in isEmpty(). | @Test
public void testIsEmptyError() throws ConfigurationException {
assertTrue(setUpErrorConfig().isEmpty());
checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, null, null);
} |
clear all the text fields | public void clearTextFields()
{
firstNameTextField.setText("");
lastNameTextField.setText("");
roomNoTextField.setText("");
phoneTextField.setText("");
studentIDTextField.setText("");
createPasswordTextField.setText("");
confirmPasswordTextField.setText("");
} |
Responsible for handling the creation of table columns during the process of executing CREATE TABLE DDL statements. | private Column processCreateColumn(HsqlName hsqlName)
throws HsqlException {
boolean isIdentity = false;
long identityStart = database.firstIdentity;
long identityIncrement = 1;
boolean isPrimaryKey = false;
String typeName;
int ... |
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
try {
int itemPosition = position;
switch (itemPosition) {
case 0:
... | ListView Clicked item index |
@Test
public void testTradesAdapter() throws IOException {
InputStream is =
CryptopiaAdaptersTest.class.getResourceAsStream(
"/org/knowm/xchange/cryptopia/dto/marketdata/example-trades.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
CryptopiaBaseRespon... | Read in the JSON from the example resources |
public MovieDetails transform(Movie movie){
String genres = "";
for (int i = 0; i < movie.getMovieGenres().size(); i++)
genres += movie.getMovieGenres().get(i).getName() + ", ";
genres = genres.substring(0,genres.length() - 2);
String originalTitle = movie.getOriginalTitle... | Convertimos la lista de generos |
public String estadisticasFinancieras(String anio) {
String html = "";
DefaultTableModel dtm1 = venta.estadisticaFinancierasMeseVsIngresoGasto(anio);
DefaultTableModel dtm2 = venta.estadisticaFinancierasIngresosGastosUtilidades(anio);
html = Utils.dibujarGraficasHTMLLineasYTorta... | Proveedores mas solicitados (de todos los tiempos) (Grafica Barras => Proveedor vs NumeroCompras) |
private void populateEntityToDeletetList()
{
entityNameListDelete = new ArrayList<String>();
entityNameListDelete.add("edu.wustl.catissuecore.domain.Quantity");
entityNameListDelete
.add("edu.wustl.catissuecore.domain.SpecimenCollectionRequirementGroup");
} | This method populates Entity To Deletet List. |
@Override
public HashMap<String, Airport> findAll() {
List<City> cities = cityDao.findAll(0);
airportFile = new File(AirportDao.class.getClassLoader().getResource("airports.txt").getPath());
try {
FlightFileReader.consumeNonEmptyLinesFromFile(airportFile, line -> {
... | Finds all airports in provided txt file, with corresponding city with comments in database. Airport that does not have active city in database is not part of resulting HashMap. |
public void printList(TernaryTreeNode head) {
// System.out.println(" head :: " + head.right.right.data);
TernaryTreeNode current = head;
while (true)
{
System.out.print(current.data + " ");
current = current.right;
if... | Do a traversal of the list and print it out |
public static boolean tryParse(String str) {
try {
Integer.parseInt(str);
return true;
} catch (NumberFormatException ex) {
return false;
} catch (Exception ex) {
logError(ex);
return false;
}
} | attempt to parse an integer |
public String getNoPagedMessage() {
return getNoPagedMessage(null);
} | Returns a string specifying the message to display when there is no row to display. |
@Override
public BaseResponse testResponse() {
return setResultSuccess();
} | TODO Autogenerated method stub |
public static List<Comment> getCommentByMB(int idtargetmicroblog) throws SQLException {
List<Comment> comments = new ArrayList<Comment>();
Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword);
PreparedStatement ps = null;
ResultSet rs = null;
try {
/*List focusingIdusers = ge... | get comment to see |
public Object visitReturnStmt(GoIRReturnStmtNode node) {
return node.getChild().accept(this);
} | / returns a string of its children types (nonJavadoc) |
@Override
protected void onDestroy() {
super.onDestroy();
if(mReceiver != null) unregisterReceiver(mReceiver);
} | Activity wird beendet BroadcastReceiver deregistrieren |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.