id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
2188276_6 | public String getEditableTableOutputClassName()
{
return IDataSetDestinations.EDITABLE_TABLE;
} |
2188276_7 | public String getReadOnlySQLResultsOutputClassName()
{
if (_sqlResultsOutputClassName.equals(IDataSetDestinations.EDITABLE_TABLE))
return IDataSetDestinations.READ_ONLY_TABLE;
return _sqlResultsOutputClassName;
} |
2188276_8 | public void addPropertyChangeListener(PropertyChangeListener listener)
{
getPropertyChangeReporter().addPropertyChangeListener(listener);
} |
2188276_9 | public void removePropertyChangeListener(PropertyChangeListener listener)
{
getPropertyChangeReporter().removePropertyChangeListener(listener);
} |
2192780_1 | public static FastFilter tag(final String tagName) {
return tag(tagName, true);
} |
2192780_2 | public static Match $() {
return $(builder().newDocument());
} |
2192780_3 | public static FastFilter ids(String... ids) {
final Set<String> set = new HashSet<String>(Arrays.asList(ids));
return new FastFilter() {
@Override
public boolean filter(Context context) {
return set.contains($(context).attr("id"));
}
};
} |
2192780_4 | public static FastFilter ids(String... ids) {
final Set<String> set = new HashSet<String>(Arrays.asList(ids));
return new FastFilter() {
@Override
public boolean filter(Context context) {
return set.contains($(context).attr("id"));
}
};
} |
2192780_5 | public static FastFilter ids(String... ids) {
final Set<String> set = new HashSet<String>(Arrays.asList(ids));
return new FastFilter() {
@Override
public boolean filter(Context context) {
return set.contains($(context).attr("id"));
}
};
} |
2192780_6 | public static FastFilter attr(final String name) {
if (name == null || name.equals(""))
return new FastFilter() {
@Override
public boolean filter(Context context) {
return context.element().getAttributes().getLength() == 0;
}
};
else
re... |
2192780_7 | public static FastFilter tag(final String tagName) {
return tag(tagName, true);
} |
2192780_8 | public static FastFilter even() {
return EVEN;
} |
2192780_9 | public static FastFilter tag(final String tagName) {
return tag(tagName, true);
} |
2192825_0 | public String write(Object object) throws JSONException {
return this.write(object, null, null, false);
} |
2197202_0 | public static List<Field> getTableFields(Class table) {
List<Field> fieldList = SugarConfig.getFields(table);
if (fieldList != null) return fieldList;
if (ManifestHelper.isDebugEnabled()) {
Log.d("Sugar", "Fetching properties");
}
List<Field> typeFields = new ArrayList<>();
getAllFields(... |
2197202_1 | public static void addFieldValueToColumn(ContentValues values, Field column, Object object,
Map<Object, Long> entitiesMap) {
column.setAccessible(true);
Class<?> columnType = column.getType();
try {
String columnName = NamingHelper.toColumnName(column);
... |
2197202_2 | public static void setFieldValueForId(Object object, Long value) {
try {
Field field = getDeepField("id", object.getClass());
field.setAccessible(true);
field.set(object, value);
} catch (Exception e) {
e.printStackTrace();
}
} |
2197202_3 | private static List<String> getAllClasses() throws PackageManager.NameNotFoundException, IOException {
String packageName = ManifestHelper.getDomainPackageName();
List<String> classNames = new ArrayList<>();
try {
List<String> allClasses = MultiDexHelper.getAllClasses();
for (String classStr... |
2197202_4 | public static void setFieldValueFromCursor(Cursor cursor, Field field, Object object) {
field.setAccessible(true);
try {
Class fieldType = field.getType();
String colName = NamingHelper.toColumnName(field);
int columnIndex = cursor.getColumnIndex(colName);
//TODO auto upgrade to ... |
2197202_5 | public int compare(Object o1, Object o2) {
String a = o1.toString();
String b = o2.toString();
int ia = 0;
int ib = 0;
int nza;
int nzb;
while (true) {
nza = nzb = 0;
char ca = charAt(a, ia);
char cb = charAt(b, ib);
while ((isSpaceChar(ca)) || (ca == '0')) {
... |
2197202_6 | public int compare(Object o1, Object o2) {
String a = o1.toString();
String b = o2.toString();
int ia = 0;
int ib = 0;
int nza;
int nzb;
while (true) {
nza = nzb = 0;
char ca = charAt(a, ia);
char cb = charAt(b, ib);
while ((isSpaceChar(ca)) || (ca == '0')) {
... |
2197202_7 | public int compare(Object o1, Object o2) {
String a = o1.toString();
String b = o2.toString();
int ia = 0;
int ib = 0;
int nza;
int nzb;
while (true) {
nza = nzb = 0;
char ca = charAt(a, ia);
char cb = charAt(b, ib);
while ((isSpaceChar(ca)) || (ca == '0')) {
... |
2197202_8 | protected int compareRight(String a, String b) {
int bias = 0;
int ia = 0;
int ib = 0;
while (true) {
char ca = charAt(a, ia);
char cb = charAt(b, ib);
if ((!isDigit(ca)) && (!isDigit(cb))) {
return bias;
}
if (!isDigit(ca)) {
return -1;
... |
2197202_9 | protected static char charAt(String s, int i) {
if (i >= s.length()) {
return '\000';
}
return s.charAt(i);
} |
2197427_0 | public JSONArray getPosts() throws JSONException {
logger.info("Get Posts from " + baseHostname);
WebResource resource = client.resource("http://api.tumblr.com/v2/blog/" + baseHostname + "/posts");
JSONObject response = resource.queryParam("api_key", consumerKey).get(JSONObject.class);
JSONArray posts = response.ge... |
2197427_1 | public JSONObject postText(String title, String body, String tags, String date)
throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
if (title != null && title != "")
params.put("title", title);
params.put("body", body);
return post(POST_TEXT, tags, date, params);
} |
2197427_2 | public JSONObject postPhoto(String caption, String source, String link,
String tags, String date)
throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
if (caption != null && caption != "")
params.put("caption", caption);
params.put("source", source);
if (link != null && caption != ""... |
2197427_3 | public JSONObject postPhotoData(String caption, byte[] data, String link, String tags, String date)
throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
if (caption != null && caption != "")
params.put("caption", caption);
params.put("data", new String(data));
if (link != null && capti... |
2197427_4 | public JSONObject postQuote(String quote, String source, String tags, String date)
throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
params.put("quote", quote);
if (source != null && source != "")
params.put("source", source);
return post(POST_QUOTE, tags, date, params);
} |
2197427_5 | public JSONObject postLink(String name, String url, String description,
String tags, String date) throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
params.put("title", name);
params.put("url", url);
params.put("description", description);
return post(POST_LINK, tags, date, params);
} |
2197427_6 | public JSONObject postChat(String title, String conversation,
String tags, String date) throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
params.put("title", title);
params.put("conversation", conversation);
return post(POST_CHAT, tags, date, params);
} |
2197427_7 | public JSONObject postAudio(String externalUrl, String caption, String tags,
String date) throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
params.put("external_url", externalUrl);
if (caption != null && caption != "")
params.put("caption", caption);
return post(POST_AUDIO, tags, da... |
2197427_8 | public JSONObject postVideo(String embed, String caption, String tags,
String date) throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
params.put("embed", embed);
if (caption != null && caption != "")
params.put("caption", caption);
return post(POST_VIDEO, tags, date, params);
} |
219850_10 | public static <T> void applyDiff(final List<T> a,
final List<T> b,
final List<T> l,
final Comparator<T> cmp,
final DiffEditor<T> ed) {
int acur = 0;
int bcur = 0;
int lcur = 0;... |
219850_11 | public static <T> void applyDiff(final List<T> a,
final List<T> b,
final List<T> l,
final Comparator<T> cmp,
final DiffEditor<T> ed) {
int acur = 0;
int bcur = 0;
int lcur = 0;... |
219850_12 | public static <T> void applyDiff(final List<T> a,
final List<T> b,
final List<T> l,
final Comparator<T> cmp,
final DiffEditor<T> ed) {
int acur = 0;
int bcur = 0;
int lcur = 0;... |
219850_13 | public static <T> void applyDiff(final List<T> a,
final List<T> b,
final List<T> l,
final Comparator<T> cmp,
final DiffEditor<T> ed) {
int acur = 0;
int bcur = 0;
int lcur = 0;... |
219850_14 | public JSONObject toJson(final Note n) throws IOException {
try {
return toJsonInternal(n);
} catch (JSONException e) {
throw new IOException(e);
}
} |
219850_15 | public JSONObject toJson(final Note n) throws IOException {
try {
return toJsonInternal(n);
} catch (JSONException e) {
throw new IOException(e);
}
} |
219850_16 | public JSONObject toJson(final Note n) throws IOException {
try {
return toJsonInternal(n);
} catch (JSONException e) {
throw new IOException(e);
}
} |
219850_17 | @Override
public Note parse(final InputStream inputStream) throws IOException {
reset();
BufferedReader bufferedReader = createReader(inputStream);
while ((currentLine = bufferedReader.readLine()) != null) {
parseLine();
}
if (currentLineIsInPage && !isEmptyPage(currentValue)) {
root... |
219850_18 | @Override
public Note parse(final InputStream inputStream) throws IOException {
reset();
BufferedReader bufferedReader = createReader(inputStream);
while ((currentLine = bufferedReader.readLine()) != null) {
parseLine();
}
if (currentLineIsInPage && !isEmptyPage(currentValue)) {
root... |
219850_19 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_20 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_21 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_22 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_23 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_24 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_25 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_26 | public void setUseCanonicalFormat(boolean useCanonicalFormat) {
this.useCanonicalFormat = useCanonicalFormat;
} |
219850_27 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_28 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_29 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_30 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_31 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_32 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_33 | @Override
public Note parse(InputStream inputStream) throws IOException {
Document document = parseToMarkdownDocument(inputStream);
return parse(document);
} |
219850_34 | @Override
public boolean test(final Atom atom) {
Integer sourceIndex = getSourceIndexFor(atom);
Float weight = atom.getWeight();
if (null == sourceIndex || null == weight) return false;
// The weight criterion includes the minimum; if the minimum is 0.25,
// items with a value of 0.25 and greater wi... |
219850_35 | public static boolean isAtomFile(final File file) {
return ATOM_FILENAME_PATTERN.matcher(file.getName()).matches();
} |
219850_36 | public static boolean isAtomFile(final File file) {
return ATOM_FILENAME_PATTERN.matcher(file.getName()).matches();
} |
219850_37 | public static boolean isAtomFile(final File file) {
return ATOM_FILENAME_PATTERN.matcher(file.getName()).matches();
} |
219850_38 | @Override
public List<Format> getFormats() {
return Collections.singletonList(VCSFormat.getInstance());
} |
219850_39 | @Override
public void addAll() throws RepositoryException {
performOperation(getGit().add()
.addFilepattern("."));
} |
219850_40 | public static Dataset datasetForBatonGesture(final long timestamp,
final Resource actor,
Resource... graphs) {
if (null == actor) {
throw new IllegalArgumentException();
}
Collection<Statement> c = new LinkedLi... |
219850_41 | public static Dataset datasetForHandshakePulse(final long timestamp,
final Resource actor,
Resource... graphs) {
if (null == actor) {
throw new IllegalArgumentException();
}
Collection<Statement> c = new Li... |
2209304_0 | @Override
public void stop(Runnable callback) {
stop();
if (null != callback) {
callback.run();
}
} |
2213380_0 | public double calculateRisk(double baselineSurvival) {
return calculateRisk(baselineSurvival, linearPredictor());
} |
2221963_0 | public String getContext() {
return context;
} |
2221963_1 | public Timer start(String item) {
for (Monitor monitor : monitors) {
Timer foo = monitor.start(item);
// return first non NULL timer.
if (!(foo instanceof Timer.NULL)) {
return foo;
}
}
return monitors[0].start(item);
} |
2221963_2 | public FluentExecutionStopped exceptionDuringExecution(FluentExecutionStopped ex, WebElement webElement) {
FluentExecutionStopped rv = ex;
for (Monitor monitor : monitors) {
rv = monitor.exceptionDuringExecution(rv, webElement);
}
return rv;
} |
2221963_3 | protected void executeScript(WebElement webElement) {
((JavascriptExecutor) driver).executeScript(highlightOperation(), webElement, highlightValue());
} |
2221963_4 | protected void executeScript(WebElement webElement) {
((JavascriptExecutor) driver).executeScript(highlightOperation(), webElement, highlightValue());
} |
2221963_5 | protected void executeScript(WebElement webElement) {
((JavascriptExecutor) driver).executeScript(highlightOperation(), webElement, highlightValue());
} |
2221963_6 | public static ByAttribute attribute(final String name) {
return attribute(name, null);
} |
2221963_7 | public static ByAttribute attribute(final String name) {
return attribute(name, null);
} |
2221963_8 | public static ByLast last(By by) {
if (by instanceof ByAttribute) {
return new ByLast((ByAttribute) by);
}
throw new UnsupportedOperationException("last() not allowed for " + by.getClass().getName() + " type");
} |
2221963_9 | public static ByStrictClassName strictClassName(final String className) {
if (className == null)
throw new IllegalArgumentException(
"Cannot find elements when the class name expression is null.");
if (className.matches(".*\\s+.*")) {
throw new InvalidSelectorException(
... |
223355_10 | @Override
public synchronized WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
try {
stopWatch.start("createModel");
final Type type = new TypeToken<WroModel>() {}.getType();
final InputStream is = getModelResourceAsStream();
if (is == null) {
thro... |
223355_11 | @Override
public synchronized WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
try {
stopWatch.start("createModel");
final Type type = new TypeToken<WroModel>() {}.getType();
final InputStream is = getModelResourceAsStream();
if (is == null) {
thro... |
223355_12 | @Override
public synchronized WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
try {
stopWatch.start("createModel");
final Type type = new TypeToken<WroModel>() {}.getType();
final InputStream is = getModelResourceAsStream();
if (is == null) {
thro... |
223355_13 | @Override
public synchronized WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
try {
stopWatch.start("createModel");
final Type type = new TypeToken<WroModel>() {}.getType();
final InputStream is = getModelResourceAsStream();
if (is == null) {
thro... |
223355_14 | @Override
public WroModel create() {
if (factoryList == null) {
factoryList = newWroModelFactoryFactoryList();
}
if (factoryList != null) {
// Holds the details about model creation which are logged only when no model can be created
final StringBuffer logMessageBuffer = new StringBuffer();
for (fi... |
223355_15 | @Override
public WroModel create() {
if (factoryList == null) {
factoryList = newWroModelFactoryFactoryList();
}
if (factoryList != null) {
// Holds the details about model creation which are logged only when no model can be created
final StringBuffer logMessageBuffer = new StringBuffer();
for (fi... |
223355_16 | @Override
public WroModel create() {
if (factoryList == null) {
factoryList = newWroModelFactoryFactoryList();
}
if (factoryList != null) {
// Holds the details about model creation which are logged only when no model can be created
final StringBuffer logMessageBuffer = new StringBuffer();
for (fi... |
223355_17 | @Override
public WroModel create() {
if (factoryList == null) {
factoryList = newWroModelFactoryFactoryList();
}
if (factoryList != null) {
// Holds the details about model creation which are logged only when no model can be created
final StringBuffer logMessageBuffer = new StringBuffer();
for (fi... |
223355_18 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_19 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_20 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_21 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_22 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_23 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_24 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_25 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_26 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_27 | @Override
public WroModel create() {
final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
final Script script;
try {
stopWatch.start("parseStream");
script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
LOG.debug("Parsing groovy script to build the ... |
223355_28 | @Override
public boolean isAuthorized(final String uri) {
for (final String pattern : patterns) {
if (matcher.match(pattern, WroUtil.removeQueryString(uri))) {
return true;
}
}
return false;
} |
223355_29 | public static String createUri(final String path) {
notNull(path);
return PREFIX + path;
} |
223355_30 | public static String createUri(final String path) {
notNull(path);
return PREFIX + path;
} |
223355_31 | @Override
public boolean accept(final String uri) {
return uri.trim().startsWith(PREFIX);
} |
223355_32 | @Override
public InputStream locate(final String uri)
throws IOException {
LOG.debug("locating: {}", uri);
try {
final String fullpath = webjarAssetLocator.getFullPath(extractPath(uri));
return classpathLocator.locate(ClasspathUriLocator.createUri(fullpath));
} catch (final Exception e) {
throw ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.