anchor stringlengths 10 14.3k | positive stringlengths 10 14.9k |
|---|---|
TODO convert this to binary search | public boolean isEndState(int i) {
for (int k = 0; k < endStates.length; k++)
if (endStates[k] == i)
return true;
return false;
} |
int k = i%j; | protected void addInstagramDetailPage(Panel middleTable, List<Data> instagrams) {
int i = 0;
HorizontalPanel hp = new HorizontalPanel();
for (Data data : instagrams) {
//thumbnails
VerticalPanel vp = new VerticalPanel();
if (i % 3 == 0) {
hp = ... |
Method to return a pet from the map by name | public VirtualPet getPet(String name) {
return shelterPets.get(name);
} |
/ access modifiers changed from: protected | @Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c
/* renamed from: c */
public void mo42880b(MessageV3 messageV3) {
C6777d.m40835b(mo42881c(), messageV3.getUploadDataPackageName(), messageV3.getDeviceId(), messageV3.getTaskId(), messageV3.getSeqId(), messageV3.getPushTimestamp(), messageV3.getDe... |
Create a view of the given width and height. | public MapView(int height, int width)
{
stats = new FieldStats();
colors = new LinkedHashMap<>();
setTitle("Map Environment Viewer");
stepLabel = new JLabel(STEP_PREFIX, JLabel.CENTER);
infoLabel = new JLabel(" ", JLabel.CENTER);
population = new JLabel(POPULATION_P... |
String[] languages = getResources().getStringArray(R.array.languages); | @Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
} |
System.setProperty("java.awt.headless","true"); ConfigFile.init(); String pw = "Escherichia_coli_K12/superpathway_of_threonine_metabolism"; / final String pw = "Escherichia_coli_K12/b"; final String graphFile = pw + ".grp"; viz = GraphVisHandler.getImageByType(System.getProperty("user.dir") + "/..", graphFile, true, pw... | public static JSplitPane buildContentPane() {
final String pw = "Escherichia_coli_K12/superpathway_of_leucine-_valine-_and_isoleucine_biosynthesis";//b3";
final String graphFile = pw + ".grp";
viz = GraphVisHandler.getImageByType(System.getProperty("user.dir") + "/..", graphFile, true, pw, 400, 400, ... |
Returns a bitmask containing the types of resources in the selection. | private int getSelectedResourceTypes(IResource[] resources) {
int types = 0;
for (IResource resource : resources) {
types |= resource.getType();
}
return types;
} |
Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1]. | default public double pdf(double... x) {
return pdf(DenseVector.toDenseVec(x));
} |
/ renamed from: b | public final boolean mo31287b(Context context, String str, Hashtable hashtable, TJConnectListener tJConnectListener) {
this.f13976a.lock();
if (tJConnectListener != null) {
try {
this.f13982g.addLast(C5087fn.m17200a(tJConnectListener, TJConnectListener.class));
} ... |
Validates a given property path as Boolean | private static boolean validateBoolean(Map.Entry<String, CheckState> entry) {
String prop = System.getProperty(entry.getKey());
if (entry.getValue().isOptional && prop == null) {
return true;
}
return Boolean.TRUE.toString().equals(prop) || Boolean.FALSE.toString().equals(pro... |
TODO Autogenerated method stub | @Override
protected void findViewById() {
mIndicator = (SimpleViewPagerIndicator) findViewById(R.id.id_stickynavlayout_indicator);
mViewPager = (ViewPager) findViewById(R.id.id_stickynavlayout_viewpager);
stickyNavLayout = (StickyNavLayout) findViewById(R.id.stickynavlayout);
iv_user_logo = (ImageVie... |
TODO Autogenerated method stub | public static void main(String[] args) {
for(int count = 1 ; count <=3 ; ++count) {
System.out.print(count+"★★★★");//요자리 요거 대신에 13~15행의 내용??
System.out.println();
}
for( int col = 1; col <=4 ; col++ ) {
System.out.print('★');
}
Syste... |
Get the Number of Services Running | public static int getNumberOfServices(CounterDetailVO counterDetails) {
Session session = HibernateConfig.getSessionFactory().getCurrentSession();
Transaction txn = session.beginTransaction();
Query query = session.createQuery(HQLConstants.DB_QUERY_GET_NUMBER_OF_SERVICES);
query.setInteger("envId", counterDetai... |
Computes the sum of all frequencies in a specified column | protected int sumColumn(Label l){
int sum = 0;
int colIx = resolveIndex(l);
//iterate all cells in the column
for(int i = 0;i<size();i++){
Integer cell = matrix.get(i).get(colIx);
sum+=cell;
}
return sum;
} |
Set the superWorld of an entity to the given world. | @Raw
protected void setSuperWorld(World world) throws IllegalArgumentException{
if(world == null || isValidSuperWorld(world)) this.superWorld = world;
else throw new IllegalArgumentException("Isn't a valid world @setSuperWorld()");
} |
Returns the last vcms discussion in the ordered set where articleId = &63; and approved = &63;. | public VcmsDiscussion findByA_A_Last(java.lang.String articleId,
boolean approved,
com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator)
throws NoSuchVcmsDiscussionException; |
Converts a multipartfile into an input stream for s3 and uploads to s3. Also forms the minimum amount of metadata for the s3 object. | public PutObjectResult upload(MultipartFile multipartFile, String uploadKey) throws IOException {
InputStream inputStream = multipartFile.getInputStream();
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(multipartFile.getSize());
metadata.setContentType(multipa... |
Initializes the controller class. | @Override
public void initialize(URL url, ResourceBundle rb) {
try {
cmbBookPublisherIdAdd.getItems().setAll(ChoiceBoxes.PublisherIdChoice());
cmbBookAuthorIdAdd.getItems().setAll(ChoiceBoxes.AuthorIdChoice());
cmdBookGenreIdAdd.getItems().setAll(ChoiceBoxes.GenreIdChoic... |
/ metodo: Equivalencia AFN para AFD objetivo: Criar o Automato AFD equivalente | public Automato equalAFN2AFD(Automato a){
Automato r = a;
Estado morto = new Estado("morto");
r.addEstado(morto);
r.addTransicao(morto,morto,'0');
r.addTransicao(morto,morto,'1');
Iterator<Estado> it = r.getQ().iterator();
while(it.hasNext()){
Estado e = it.next();
if (r.findAll(e, '0').isEmpty()){
... |
Logs debug messages in an easier to search way You can also use system.out, but it'll be harder to work with | void log(HandlerInput input, String message) {
System.out.printf("[%s] [%s] : %s]\n",
input.getRequestEnvelope().getRequest().getRequestId().toString(),
new Date(),
message);
} |
/ Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. | public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
long[] ar = new long[n];
for(int ar_r=0; ar_r<n; ar_r++){
ar[ar_r] = in.nextLong();
}
double[] result = findPlusMinus(n, ar);
System.out... |
The act method of the world. Does the following: Shows intro text. Shows outro text. Goes back to GameWorld at the end of a battle. | public void act()
{
if(worldTimer == 1)
{
if(wildPokemon)
{
textInfoBox.displayText("Wild " + enemyPokemon.getName() + " appeared!", true, false);
}
else
{
textInfoBox.displayText("Enemy trainer sen... |
Called whenever one of the list items is clicked. | @Override
protected void onListItemClick(ListView list, View view, int position, long id){
// Start the selected Activity
Intent intent = new Intent(this, activities[position]);
startActivity(intent);
} |
Test compitability with old JSON format. | @Test
@SmallTest
public void testReadFromJsonString() throws Throwable {
final String jsonObjectString =
"{'crash-local-id':'123456abc','crash-capture-time':1234567890,"
+ "'crash-keys':{'app-package-name':'org.test.package'}}";
CrashInfo parsed = CrashInfo.readF... |
TODO: not sure this is appropriate | @SuppressWarnings("unchecked")
@Test
void shouldThrowExceptionWhenGivenEntriesIsEmpty() {
DefaultValidator<Target> validator = new DefaultValidator<>(Target.class);
assertThrows(IllegalArgumentException.class, () -> validator.ruleForMap(Target::getMap).doesNotContain(new MapEntry[0]));
} |
Constructs with the specified initial text and icon. | public JRibbonAction(String text, Icon icon)
{
super(text, icon);
} |
returns the position where the pacman needs to be positioned | public Point getPacmanPosition() {
throw new RuntimeException("Not Implemented");
} |
A generic method for rendering sliders with an event on mouse release | private void renderSlider(double min, double max, double value, EventHandler eventHandler) {
unmountSlider();
buildSlider(min, max, value);
slider.addEventHandler(MouseEvent.MOUSE_RELEASED, eventHandler);
mountSlider();
} |
Method responsible for control the refresh icon | private void postRefreshing(final boolean refreshing) {
// Check if layout is not null and then add or remove the refresh icon according to the parameter
if (mSwipeRefreshLayout != null)
mSwipeRefreshLayout.post(new Runnable() {
@Override public void run() {
... |
/ algo 1. find the multiples of numbers in first array | public static void main(String[] args) {
int[] arr = {2,6};
for (int i = 0; i < arr.length; i++) {
int[] arrNew = null;
for (int j = 1; j < 100; j++) {
arrNew[j] = arr[i] *j ;
}
}
} |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static CartFragment newInstance(String param1, String param2) {
CartFragment fragment = new CartFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
} |
=========================================================== Getter & Setter =========================================================== | public void setParallaxValue(final float pParallaxValueX, final float pParallaxValueY) {
this.mParallaxValueX = pParallaxValueX;
this.mParallaxValueY = pParallaxValueY;
} |
Channel is called onCreate() | public void createNotificationChannel()
{
//Instantiate the NotificationManager
mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
//Notification Channel constructed
NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, "Si... |
set (no duplicati) ordinato (Comparable) | public static void main(String[] args) {
ProvaCollezioni pc = new ProvaCollezioni();
pc.spesa.add("latte");
pc.spesa.add("pane");
pc.spesa.add("biscotti");
pc.spesa.add("olio");
pc.spesa.add("biscotti");
System.out.println(pc.spesa.size());
for (String voce : pc.spesa) {
pc.spesaFiltrata... |
This method returns all values of object as string | @Override
public String toString() {
return "Visitor{" +
"period=" + period +
'}';
} |
Launches confirmation dialog asking is user really wants to delete the report, then deletes it if user confirms | private void runDeleteReport() {
showDialog(DIALOG_CONFIRM_DELETE_REPORT_ID);
} |
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.id | public void setId(Integer id) {
this.id = id;
} |
see DbFile.java for javadocs | public DbFileIterator iterator(TransactionId tid) {
System.out.println("numPages is " + numPages);
return new TupleIter(numPages);
} |
This decides how the result will be sorted. | public static URL buildMovieDbQueryURL(@MovieDisplayMode int displayMode) {
String chosenURLBasedOnSortBy = "";
switch (displayMode) {
case MovieDisplayMode.MOST_POPULAR:
chosenURLBasedOnSortBy = MOVIEDB_API_MOSTPOPULAR_URL;
break;
case MovieDispl... |
Remove all elements in the sorted set at key with rank between start and end. Start and end are 0based with rank 0 being the element with the lowest score. Both start and end can be negative numbers, where they indicate offsets starting at the element with the highest rank. For example: 1 is the element with the highes... | public Long zremrangeByRank(String key, long start, long end) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.zremrangeByRank(key, start, end);
} finally {
if (jedis != null) {
jedis.close();
}
}
... |
Spring Data repository for the GOtherVoucherDetails entity. | @SuppressWarnings("unused")
@Repository
public interface GOtherVoucherDetailsRepository extends JpaRepository<GOtherVoucherDetails, UUID>, GOtherVoucherDetailsRepositoryCustom {
@Query(value = "select * from GOtherVoucherDetail where GOtherVoucherID = ?1 order by OrderPriority ", nativeQuery = true)
List<GOthe... |
The title of the Drive item. string title = 2; | java.lang.String getTitle(); |
/ renamed from: a | void m70531a(Throwable th) {
try {
this.f61096d.call(th);
} catch (Throwable th2) {
this.f61095c.unsubscribe();
}
this.f61095c.unsubscribe();
} |
Called when a key is released. | protected void keyHit(int keyCode) {
} |
Retrieves the building block by id. | BuildingBlock findBuildingBlockById(Long id) throws BusinessException; |
afficher info d'un produit | public void afficherInfo(View v){
Intent intent=new Intent(CarteActivity.this,InfoActivity.class);
startActivity(intent);
} |
Copy files or directories from 'from' to 'to'. Recursively descends if 'from' is a directory. Does not create 'from' tail directory in 'to', e.g.: from = c:/foo/bar contains a,b,c to = c:/temp > c:/temp/a c:/temp/b c:/temp/c | public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {
File[] files;
Check.checkArg(from.isDirectory());
files = from.listFiles(filter);
to.mkdirs();
for (int i = 0; i < files.length; i++) {
... |
This is the setter method to the attribute. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. Default value when not specified in API or module is interpreted by Avi Controller as null. | public void setSeGrpName(String seGrpName) {
this.seGrpName = seGrpName;
} |
get bean by bean name | public static <T> T getBean(String beanName) {
return (T) applicationContext.getBean(beanName);
} |
TODO Autogenerated method stub | @Override
public List<Evento> listarDisponivelPorDataAsc() {
return repository.findByFimAfterToday(sortByInicioAsc());
} |
TODO Autogenerated method stub | public void onClick(View arg0) {
int seledtedId = radioSex.getCheckedRadioButtonId();
RadioButton radioMale = (RadioButton) findViewById(seledtedId);
Toast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show();
} |
Gets the value of cpuSerialNo | public String getCpuSerialNo()
{
return cpuSerialNo;
} |
repeated .liubaninc.m0.pki.Certificate Certificate = 1; | java.util.List<liubaninc.m0.pki.CertificateOuterClass.Certificate>
getCertificateList(); |
Gets the attribute values map | public Map getAttributeValueMap() {
return m_attributeValueMap;
} |
returns true if the method is currently running | public Future<Void> stop(Integer id) throws DynamicCallException, ExecutionException{
return call("stop", id);
} |
Assigns the noninstantiated variable of smallest domain size to its lower bound. | public static IntStrategy minDom_LB(IntVar... VARS) {
return custom(minDomainSize_var_selector(), min_value_selector(), VARS);
} |
Button Click Event for Edit Profile Button | public void friendSearchClick(ActionEvent event) throws Exception{
displayAddFriendresults();
} |
This method was generated by MyBatis Generator. This method corresponds to the database table qt_activitytype | int updateByPrimaryKeySelective(QtActivitytype record); |
Remove data from the context | public void removeProperty(Object key) {
properties.remove(key);
} |
Draw the vehicle points on the screen. | public void draw(Frame frame) {
// Draw vehicle corner points.
if (this.points != null) {
for (int i = 0; i < 3; i++) {
if (this.points[i] == null) continue;
Imgproc.circle(frame.getSource(), this.points[i], 3, new Scalar(0, 0, 255));
}
}
// Draw the vehicles back point.
if (this.back != null... |
Returns an ordered range of all the phat vaies. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtilALL_POS will return the full result set.... | @Override
public List<PhatVay> findAll(
int start, int end, OrderByComparator<PhatVay> orderByComparator,
boolean retrieveFromCache) {
boolean pagination = true;
FinderPath finderPath = null;
Object[] finderArgs = null;
if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
(orderByComparat... |
/ access modifiers changed from: protected | public abstract String getIntentActionString(); |
returns the average of the array | double average() { // used double b/c I want decimal places
int sum = 0;
for (int i = 0; i < array.length; i++) {
sum = sum + array[i];
}
double average = (double) sum / array.length;
return average;
} |
Returns maximum value in collection as an Optional | public static <E extends Comparable<E>> Optional<E>
max2(Collection<E> c){
if(c.isEmpty()){
return Optional.empty();
}
E result = null;
for(E e : c){
if(result == null || e.compareTo(result) > 0){
result = Objects.requireNonNull(e);
... |
This custom string converter will convert a bad input string to null, instead of just failing. And it will display a null value as "Bad Value" and an empty string value as 0. | public Integer fromString(String s) {
if (s == null || s.trim().length() == 0)
return 0;
try {
return Integer.parseInt(s);
}
catch (NumberFormatException e) {
return null;
}
... |
Spring Data dao for the Visiteur entity. | @SuppressWarnings("unused")
@Repository
public interface VisiteurRepository extends JpaRepository<Visiteur, Long> {
} |
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml"); | public static void main(String[] args) throws Exception {
ApplicationContext factory = new AnnotationConfigApplicationContext(AppConfig.class);
ProductService service = (ProductServiceImpl) factory.getBean(ProductServiceImpl.class);
System.out.println("Scanning Items.... ");
service.scanProductId("Item... |
Returns the File backing this HeapFile on disk. | public File getFile() {
return file;
} |
next hour or next day | private void nextDate() {
Calendar calendar = Calendar.getInstance();
long hourMills = this.nextHourMills;
int day;
calendar.setTimeInMillis(this.nextHourMills);
calendar.add(Calendar.HOUR_OF_DAY, 1);
this.nextHourMills = calendar.getTimeInMillis();
day = calendar.get(Calendar.DATE);
... |
Testet, ob ein leeres Set von Raumen erlaubt ist. | @Test
public void testSetRooms_Empty_NoIllegalArgumentException() {
HashSet<Room> rooms = new HashSet<Room>();
teachu1.setRooms(rooms);
assertTrue(teachu1.getRooms().size() == 0);
} |
Parsing Table: 0 123456 0+.cde 0|123 1|46 2|13 3|436 4|5 5|56 6|778 7|8 8|8 here: c = 19 d = 09 e = E|e accepting state: 1,3,5,8 | public static int isNumber(String num)
{
int[][] table = new int[9][7];
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 6; j++)
{
table[i][j] = -1;
}
}
table[0][0] = 1;
table[0][2] = 2;
table[0][4] = 3;
table[1][3] = 4;
table[1][6] = 6;
table[2][0] = 1;
table[2][4] = 3;
table[3][... |
Retrieves a new SYS Session. | public Session getSysSessionForScript(Database db) {
Session session = new Session(db, db.getUserManager().getSysUser(),
false, false, 0, null, 0);
// some old 1.8.0 do not have SET SCHEMA PUBLIC
session.setCurrentSchemaHsqlName(
db.schemaManag... |
Object methods Adds info to a hashMap and returns false if it already exists and true if added | public boolean add(RegistrationPlate plate, String owner){
if(this.registrationList.containsKey(plate)){
return false;
}
else {
this.registrationList.put(plate, owner);
return true;
}
} |
Set the balance for this account | public void setBalance(double balance){
this.balance = balance;
} |
Initialize the contents of the frame. | private void initialize() {
frame = new JFrame();
frame.getContentPane().setBackground(new Color(64, 64, 64));
frame.getContentPane().setForeground(Color.WHITE);
frame.setBounds(100, 100, 450, 401);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
te... |
Get connection and return the page as a string. | public String connectAndGetPage(String url) throws IOException {
URL page = new URL(url);
HttpURLConnection conn = (HttpURLConnection) page.openConnection();
conn.connect();
InputStreamReader in = new InputStreamReader((InputStream) conn.getContent());
BufferedReader buff = new B... |
Delete the directory if it is empty. | public static boolean deleteEmptyDir(File directory) {
return directory.exists() && directory.isDirectory() && directory.list() != null &&
directory.list().length == 0 && directory.delete();
} |
receive a file table entry reference save the corresponding inode to the disk free this file table entry. return true if this file table entry found in my table | public synchronized boolean ffree(FileTableEntry ftEnt) {
// count is zero so return false
if (ftEnt.inode.count == 0) {
return false;
}
// subtract 1 from the count
ftEnt.inode.count -= 1;
// if the count is zero after the decrement
// then it can be... |
Sets value as the attribute value for TotalAlocRolls. | public void setTotalAlocRolls(Number value) {
setAttributeInternal(TOTALALOCROLLS, value);
} |
Getter for property parentKey. | public String getParentKey() {
return this.parentKey;
} |
crear vista y viewholder | @Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater layoutInflater = LayoutInflater.from(context);
View viewCelda;
FragmentActivity unaActivity = (FragmentActivity) context;
FragmentManager fragmentManager = (FragmentManag... |
Returns probabilities of the image containing racy or adult content. | public Observable<EvaluateInner> evaluateMethodAsync() {
return evaluateMethodWithServiceResponseAsync().map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() {
@Override
public EvaluateInner call(ServiceResponse<EvaluateInner> response) {
return response.body();... |
Returns the maximum velocity of the entity. | @Basic @Raw @Immutable
public double getMaxVelocity(){
return this.maxVelocity = SPEED_OF_LIGHT;
} |
Called when the associated thread has acquired access to whatever is guarded by waitQueue. This can occur either as a result of acquire(thread) being invoked on waitQueue (where thread is the associated thread), or as a result of nextThread() being invoked on waitQueue. | public void acquire(PriorityQueue waitQueue)
{
waitQueue = null;
donation = 0;
lastEffectivePriority = -1; //Need to recalculate the effectivePriority as the leaving thread might take off its donation effects or
... |
To View the Important News Search Form | @SkipValidation
public String importantNewsSearchForm() {
return SUCCESS;
} |
TODO: I'm working here!! | public void downloadWeatherForCurrentLocation() {
if(checkConnection()) {
LocationManager locationManager = LocationManager.getInstance(this, view);
locationManager.getCoordinates();
} else {
showNoConnectionDialog();
}
} |
Sets the plot synopsis of the movie. | public void setOverview(String overview) {
this.overview = overview;
} |
Calling method checked for validity of routes; | protected void setRoutes(WriteFileResponse response) {
routes[ response.getSequence() ] = response.getRoutingPath();
if ( ableToWrite && totalReceived.incrementAndGet() == routes.length )
{
unlock();
}
} |
TODO Autogenerated method stub return super.instantiateItem(container, position); | @Override
public Object instantiateItem(ViewGroup container, int position) {
((ViewPager)container).addView(viewContainter.get(position));
return viewContainter.get(position);
} |
metodos usuados para el menu Setea la descripcion de la categoria del usuario | public void setCategoriaDescripcion(String descripcion); |
public ElasticSearchDictator createSearchDictator(String indexName, String documentType, CummulativeDataRequestDto dto, String tenant) throws Exception ; | MultiSearchResponse executeMultiSearchRequest(List<SearchRequest> searchRequestList, Boolean primaryOrNot); |
DERencoded X.509 certificate chain repeated bytes certificate = 1; | private void addAllCertificate(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureCertificateIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, certificate_);
} |
end try wait for connection to arrive, then display connection info | private void waitForConnection() throws IOException {
System.out.println("Waiting for connection" + myConID + "\n");
connection = server.accept(); // allow server to accept connection
System.out.println("Connection " + myConID + " received from: "
+ connection.getInetAddress().getHostName());
} |
Create the ok and cancel button pane and its components. | JPanel createButtonPane()
{
// create the Ok button
_okButton = new JButton("OK");
_okButton.addActionListener(this);
_panel.add(_okButton);
// create the Cancel button
_cancelButton = new JButton("Cancel");
_cancelButton.addActionListener(this);
_panel.add(_cancelBut... |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(DataStoredActivity.this, SqliteActivity.class);
startActivity(intent);
} |
if the thread is not running return null | public Results doQuery(String[] settings)
{
if (queryThread != null)
{
// create the query object and to hand to the thread
QueryObject query = new QueryObject(settings);
synchronized (query)
{
synchronized (this)
{
// hand the query object to the thread
... |
TODO Autogenerated method stub | @Override
public void onEvent(String name, String params, byte[] data, int offset,
int length) {
String result = "name:" + name;
//if(params != null && !params.isEmpty()){
// result+=";params:"+params;
//}
if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_PARTIAL)){
if(params.contains("\"final_result\""... |
/ Confirm that it's in the services info | public boolean isServicesDiSplayed() {
return isDisplayed(servicesTextLocator);
} |
Waits for the JDialog with the given title Note: Sometimes the task dialog might have the same title as the dialog you pop up and you want to get yours instead of the one for the task monitor. | public static JDialog waitForJDialog(String title) {
int totalTime = 0;
while (totalTime <= DEFAULT_WINDOW_TIMEOUT) {
Set<Window> winList = getAllWindows();
Iterator<Window> iter = winList.iterator();
while (iter.hasNext()) {
Window w = iter.next();
if ((w instanceof JDialog) && w.isShowing()) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.