anchor stringlengths 10 14.3k | positive stringlengths 10 14.9k |
|---|---|
This interface defines the configuration for a view. | public interface IViewConfiguration {
/** Get the filter defining how to handle conditional directives */
IViewFilter getViewFilter();
/** Get the fixed macros (macro name or name=value).
* This array should not change after creation since this
* configuration is stored in a view.
*/
Collection<ID... |
Set the value related to the column: amc_contract | public void setAmcContract (java.lang.String amcContract) {
this.amcContract = amcContract;
} |
Gets string expression of the given signature for xadl. | private static String getXadlDirection(Direction direction) {
String strDirection = null;
switch (direction) {
case IN:
strDirection = "in";
break;
case OUT_MULTI:
case OUT_SINGLE:
strDirection = "out";
break;
default:
strDirection = "none";
}
return strDirection;
} |
Display the first 500 characters of the response string. | @Override
public void onResponse(String response) {
if (new CheckConnectivity().isConnected(context)) {
try {
prog.dismiss();
Log.e("Response : prince ", response);
... |
Has this action method been deprecated | public boolean isDeprecated() {
return isDeprecated;
} |
========= Operations ========= set callback called when buffers where synched to disk | public void setCallback(final CallbackSync callback) {
this.callback = callback;
} |
Returns a new object of class 'Text'. | Text createText(); |
Test case number: 57 /Coverage entropy=0.6931471805599453 | @Test(timeout = 4000)
public void test57() throws Throwable {
FBProcedureCall fBProcedureCall0 = new FBProcedureCall();
// Undeclared exception!
try {
fBProcedureCall0.addOutputParam((FBProcedureParam) null);
fail("Expecting exception: NullPointerException");
} catch(... |
string moodMessage = 5; | public Builder setMoodMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
moodMessage_ = value;
onChanged();
return this;
} |
This method was generated by Apache iBATIS ibator. This method sets the value of the database column V_RP_DY_ROUTE.DAY | public void setDay(Date day) {
this.day = day;
} |
input data validation resourse link implement the menu | public static void main(String[] args) {
final Scanner scanner = new Scanner(System.in);
boolean exit = false;
String select;
loadFromFile();
do {
System.out.println("Premier League Manager");
System.out.println("=================================");
... |
Verify the HHS Footer Link in LoginPage. | public void waitForVerifyHhsPage() {
verifyHHSPageElement.waitForState().enabled(30);
} |
Duration in seconds. The .9 should prevent flickering. | private static float getDefaultDuration(ResourceLocation effectId) {
return new ResourceLocation("night_vision").equals(effectId) ? 15.9f : 1.9f;
} |
Ensures that the Rmi tactic succeeds once on a goal | @Test
public void applyOnceGoal() {
assertSuccess(" ;H; ;S; x ∈ ℤ ;; y ∈ ℤ |- x↦y ∈ id", rm("", empty));
} |
Create an independent copy of this JSON member. | public JsonMember copy() {
return new JsonMember(name, value.copy());
} |
item_id int64 item_id = 9; | public Builder clearItemId() {
itemId_ = 0L;
onChanged();
return this;
} |
True if has "idVerificationResponseData" element | boolean isSetIdVerificationResponseData(); |
Called when the action bar initially shows the search entry field. | public void onSearchStarted(); |
display a specific club's statistics | private static void displayStatistics(){
Scanner scanner = new Scanner(System.in);
System.out.print("Please enter Club Name: ");
String clubName = scanner.nextLine();
leagueManager.displayStatistics(clubName);
} |
No further instances allowed | private Swiftbuy() {
super("swiftbuy");
} |
Gets the display name that identifies the family of ingest modules the factory creates. Autopsy uses this string to identify the module in user interface components and log messages. The module name must be unique. so a brief but distinctive name is recommended. | String getModuleDisplayName(); |
A method that takes in a BitInputStream and a PrintStream. Reads bits from the BitInputStream and translates them using the HuffmanTree and prints those characters to the PrintStream. | public void translate(BitInputStream input, PrintStream output) {
HuffmanNode node = this.front;
while (input.hasNextBit()) {
while (node.left != null && node.right != null) {
if (input.nextBit() == 0) {
node = node.left;
} else {
... |
113 use dfs recursive | public List<List<Integer>> pathSum(TreeNode root, int sum) {
if(root==null)
return res;
dfs(root, sum, new ArrayList<Integer>());
return res;
} |
System.setProperty("webdriver.ie.driver","F:\\IdeaProjectsWork\\selenium2\\drivers\\chromedriver.exe"); WebDriver wb = new InternetExplorerDriver(); | public void openIe(){
} |
method to print the movies with the 5 highest ratings | public void printTopRatingMovies() {
Collections.sort(this.dataList, new SortByRating());
int top = Math.min(5, getDataLength());
for (int i=0; i<top; ++i) {
System.out.println(this.dataList.get(i).toString());
}
Collections.sort(this.dataList);
} |
Carga la linea de un archivo Lista de Adyacencias dada en el Grafo dado. | private static void cargarLista(String linea, TraductorDesdeLista grafo)
throws IllegalArgumentException
{
int vertice = Integer.parseInt(linea.substring(0,1)); // Guarda el vertice
linea = linea.substring(3); // Guarda los vertices sucesores
String[] lista = linea.split(" "); // Almacena... |
set a rating for the item | public void setRating(int rating); |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
Intent intent = new Intent(GuideActivity.this,MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);
startActivity(intent);
MyApplication.getApp().getSysSpUtil().setIsFirstTime(false);
finish();
} |
Config the FontFamilySelector using the default values. All the system available font names are added to the combo box. | private void defaultConfig(Set<String> defaultFontFamilyNames) {
defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;
// the empty font name
addItem("");
// all the system font names to combo box
for (String defaultFontFamilyName : defaultFontFamilyNames) {
this.listFont... |
This code will create two variables to store the horizontal and vertical positions specified origin is (0,0) h= horizontal v=vertical | public static void main(String[] args) throws IOException {
int h = 0;
int v = 0;
InputStreamReader file = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(file);
//This string will be the iterable container
String directions = br.readLine();
//this code will check upp... |
Created by sandyr on 11/23/2017. | public interface SearchPresenter {
void onDestroy();
void loadNextPage();
void searchGithubRepos(String searchPhrase);
} |
method that allows to format the ru of the form with period and hyphen even if it is entered in different ways | public static String formatearRut(String rut){
int cont = 0;
String format;
rut= rut.replace(".", "");
rut = rut.replace("-", "");
format= "-" + rut.substring(rut.length()-1);
for(int i = rut.length()-2; i>=0;i--){
format=rut.substring(i,i+1)+format;
... |
Inner x = new Inner(); | private void demoInnerClass2() {
} |
krahason elementet e vektorit me nje vlere te caktuar | private boolean contains(int[] piket,int vlera){
for(int i=0; i<piket.length; i++){
if(piket[i]==vlera) return true; //eshte metode booleane spese kthen true ose false ne menyre qe te plotesohet if me lart
}
return false;
} |
Returns the current Player. | Player getCurrentPlayer(); |
the collection of ride lines Constructor for objects of class MyWorld. | public MyWorld()
{
// Create a new world with 800x600 cells with a cell size of 1x1 pixels.
super(800, 600, 1);
//could have as many RideLines as capasity dictates
rides = new RideLines[MAX_RIDES];
currentRide=0; //initially, we have 0 prisoners
//Crea... |
Success callback. Request is considered as successful when response code is between 200 and 299 | void onSuccess(int responseCode, int requestCode, Response<JsonElement> response); |
verify the conference When debug, delete the param "request" | @PostMapping("/Verify")
public ResponseEntity<String> verify(@RequestBody VerifyRequest request){
logger.debug("verify request");
String username = conferenceService.findConference(request.getId()).getOwner();
Conference conference = conferenceService.findConference(request.getId());
... |
Return the value associated with the column: excise_duty | public java.math.BigDecimal getExciseDuty () {
return exciseDuty;
} |
TODO: Double value of Defence Order | @Override
public void specialAbility() {
} |
TODO Autogenerated method stub | private String edit(String input_from_user, char[] input_array) {
System.out.println("Enter the number of positions you want to change the string"+input_from_user);
int user_input = in.nextInt();
String result = null;
for(int i=0; i <user_input; i++){
System.out.println("Enter the"+i+"th to edit in the "+inp... |
Returns a list of students objects from the search results | private List<Student> getStudentList(StudentSearchResponse srchResponse) {
List<Student> studentList = new ArrayList<Student>();
if (srchResponse != null && srchResponse.size() > 0) {
for (StudentSearchResult srchRes : srchResponse) {
Student std = new Student(srchRes.getInquiryId(),
srchRes.getSt... |
repeated .FileInfo files = 4; | public entities.Torrent.FileInfo.Builder addFilesBuilder(
int index) {
return getFilesFieldBuilder().addBuilder(
index, entities.Torrent.FileInfo.getDefaultInstance());
} |
HomeMembershipBoilerCoverHomeEmergencyAA: with specific test context and state. .title : Home Membership | Boiler Cover | Home Emergency | AA .class : Html.HtmlDocument .url : RegularExpression(homemembership) | protected DocumentTestObject homeMembership(TestObject anchor, long flags)
{
return new DocumentTestObject(
getMappedTestObject("homeMembership"), anchor, flags);
} |
Signed transactions that satisfy PaymentDetails.outputs repeated bytes transactions = 2; | public Builder addAllTransactions(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
copyOnWrite();
instance.addAllTransactions(values);
return this;
} |
Used to instruct the autoscaler to not try to synchronize this instance as an EC2 web server instance | public static String initLbInstanceId() {
try {
String url = "http://169.254.169.254/latest/meta-data/instance-id";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.b... |
Returns iterator in random order | public Iterator<Item> iterator() {
return new RandomArrayIterator();
} |
Return the name of the parameter that contains a locale specification in a locale change request. | public String getParamName() {
return this.paramName;
} |
Encodes the specified path segments as a path string | public static String toString(final Object[] segments) {
final StringBuilder builder = new StringBuilder();
for (final Object segment: segments) {
if (segment instanceof Integer) {
builder.append('[').append(segment).append(']');
} else if (segment == ANY_INDEX) {
builder.append(segment);
} ... |
/ ICS FORMATTING METHODS Write RRULE property of event given an UNTIL date The frequency of the recurrence is hardcoded to WEEKLY | private String makeEventRecurrence(LocalDateTime lastDay) {
return "RRULE:FREQ=WEEKLY;UNTIL=" + formatTimeToICS(lastDay) + "Z" + "\n";
} |
pour avoir position de l'appui Px sur segment | @Override
public double calPx() {
return this.n.getPx();
} |
Gets the value of the name property | public String getName()
{
return name;
} |
Create the note directory if it does not exist | private static void createNotesCollectionIfNotExists(UserRegistry registry) throws RegistryException {
if (!registry.resourceExists(NoteConstants.NOTE_LOCATION)) {
Collection collection = registry.newCollection();
registry.put(NoteConstants.NOTE_LOCATION, collection);
}
} |
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / | protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {
/* 126 */ String str1 = paramURL.getProtocol();
/* 127 */ String str2 = paramURL.getAuthority();
/* 128 */ String str3 = paramURL.getUserInfo();
/* 129 */ String str4 = paramURL.getHost();
/* 130 */ int i = par... |
Gets a Plan form DB with planName | public Plan getPlan(String planName); |
repeated .liubaninc.m0.pki.Certificate Certificate = 1; | public Builder addCertificate(liubaninc.m0.pki.CertificateOuterClass.Certificate value) {
if (certificateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCertificateIsMutable();
certificate_.add(value);
onChanged();
... |
Gets the current job title. | public StringFilter getCurrentJobTitle() {
return currentJobTitle;
} |
TODO implement this method | public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceResponse unSubscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceRequest parameters) {
throw new UnsupportedOperationException("Not implemented yet.");
} |
When mouse moves on the canvas In 3D, drop mouse position as it should not be displayed In 2D, store mouse position to overlay coordinates | @Override
public void mouseMoved(MouseEvent e) {
View view = getChart().getView();
//
if (getChart().getView().is3D()) {
mousePosition.event = null;
mousePosition.projection = null;
} else {
mousePosition.event = e;
mousePosition.projection = screenToModel(e);
}
view.s... |
Export script to a external XML file | protected void exportScriptToFile() {
try {
final MigrationConfiguration cfg = getMigrationWizard()
.getMigrationConfig();
prepare4SaveScript();
ExportScriptDialog.exportScript(cfg, isSaveSchema());
} catch (Exception e) {
// MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveS... |
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 {
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.