code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public AT_Row setPaddingLeft(int paddingLeft) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingLeft(paddingLeft);
}
}
return this;
} | java |
public AT_Row setPaddingLeftChar(Character paddingLeftChar) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingLeftChar(paddingLeftChar);
}
}
return this;
} | java |
public AT_Row setPaddingLeftRight(int padding){
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingLeftRight(padding);
}
}
return this;
} | java |
public AT_Row setPaddingRight(int paddingRight) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingRight(paddingRight);
}
}
return this;
} | java |
public AT_Row setPaddingRightChar(Character paddingRightChar) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingRightChar(paddingRightChar);
}
}
return this;
} | java |
public AT_Row setPaddingTop(int paddingTop) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingTop(paddingTop);
}
}
return this;
} | java |
public AT_Row setPaddingTopBottom(int padding){
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingTopBottom(padding);
}
}
return this;
} | java |
public AT_Row setPaddingTopChar(Character paddingTopChar) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingTopChar(paddingTopChar);
}
}
return this;
} | java |
public AT_Row setTextAlignment(TextAlignment textAlignment){
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setTextAlignment(textAlignment);
}
}
return this;
} | java |
public AT_Row setTargetTranslator(TargetTranslator targetTranslator) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setTargetTranslator(targetTranslator);
}
}
return this;
} | java |
public AT_Row setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setHtmlElementTranslator(htmlElementTranslator);
}
}
return this;
} | java |
public AT_Row setCharTranslator(CharacterTranslator charTranslator) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setCharTranslator(charTranslator);
}
}
return this;
} | java |
public AT_Context setFrameLeftRightMargin(int frameLeft, int frameRight){
if(frameRight>-1 && frameLeft>-1){
this.frameLeftMargin = frameLeft;
this.frameRightMargin = frameRight;
}
return this;
} | java |
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom){
if(frameTop>-1 && frameBottom>-1){
this.frameTopMargin = frameTop;
this.frameBottomMargin = frameBottom;
}
return this;
} | java |
public final void addRule(TableRowStyle style){
Validate.notNull(style);
Validate.validState(style!=TableRowStyle.UNKNOWN, "cannot add a rule of unknown style");
this.rows.add(AT_Row.createRule(TableRowType.RULE, style));
} | java |
public AsciiTable setPaddingBottom(int paddingBottom) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingBottom(paddingBottom);
}
}
return this;
} | java |
public AsciiTable setPaddingBottomChar(Character paddingBottomChar) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingBottomChar(paddingBottomChar);
}
}
return this;
} | java |
public AsciiTable setPaddingLeft(int paddingLeft) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingLeft(paddingLeft);
}
}
return this;
} | java |
public AsciiTable setPaddingLeftChar(Character paddingLeftChar) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingLeftChar(paddingLeftChar);
}
}
return this;
} | java |
public AsciiTable setPaddingLeftRight(int padding){
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingLeftRight(padding);
}
}
return this;
} | java |
public AsciiTable setPaddingRight(int paddingRight) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingRight(paddingRight);
}
}
return this;
} | java |
public AsciiTable setPaddingRightChar(Character paddingRightChar) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingRightChar(paddingRightChar);
}
}
return this;
} | java |
public AsciiTable setPaddingTop(int paddingTop) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingTop(paddingTop);
}
}
return this;
} | java |
public AsciiTable setPaddingTopChar(Character paddingTopChar) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingTopChar(paddingTopChar);
}
}
return this;
} | java |
public AsciiTable setTextAlignment(TextAlignment textAlignment){
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setTextAlignment(textAlignment);
}
}
return this;
} | java |
public AsciiTable setTargetTranslator(TargetTranslator targetTranslator) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setTargetTranslator(targetTranslator);
}
}
return this;
} | java |
public AsciiTable setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setHtmlElementTranslator(htmlElementTranslator);
}
}
return this;
} | java |
public AsciiTable setCharTranslator(CharacterTranslator charTranslator) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setCharTranslator(charTranslator);
}
}
return this;
} | java |
public static String base64Encode(byte[] bytes) {
if (bytes == null) {
throw new IllegalArgumentException("Input bytes must not be null.");
}
if (bytes.length >= BASE64_UPPER_BOUND) {
throw new IllegalArgumentException(
"Input bytes length must not exceed " + BASE64_UPPER_BOUND);
}... | java |
static String md5(String input) {
if (input == null || input.length() == 0) {
throw new IllegalArgumentException("Input string must not be blank.");
}
try {
MessageDigest algorithm = MessageDigest.getInstance("MD5");
algorithm.reset();
algorithm.update(input.getBytes());
byte[]... | java |
static byte[] hmacSha1(StringBuilder message, String key) {
try {
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(new SecretKeySpec(key.getBytes(), "HmacSHA1"));
return mac.doFinal(message.toString().getBytes());
} catch (Exception e) {
throw new RuntimeException(e);
}
} | java |
@SuppressWarnings("InsecureCryptoUsage") // Only used in known-weak crypto "legacy" mode.
static byte[] aes128Encrypt(StringBuilder message, String key) {
try {
key = normalizeString(key, 16);
rightPadString(message, '{', 16);
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
cipher... | java |
public static Thumbor create(String host, String key) {
if (key == null || key.length() == 0) {
throw new IllegalArgumentException("Key must not be blank.");
}
return new Thumbor(host, key);
} | java |
public ThumborUrlBuilder buildImage(String image) {
if (image == null || image.length() == 0) {
throw new IllegalArgumentException("Image must not be blank.");
}
return new ThumborUrlBuilder(host, key, image);
} | java |
public ThumborUrlBuilder resize(int width, int height) {
if (width < 0 && width != ORIGINAL_SIZE) {
throw new IllegalArgumentException("Width must be a positive number.");
}
if (height < 0 && height != ORIGINAL_SIZE) {
throw new IllegalArgumentException("Height must be a positive number.");
... | java |
public ThumborUrlBuilder crop(int top, int left, int bottom, int right) {
if (top < 0) {
throw new IllegalArgumentException("Top must be greater or equal to zero.");
}
if (left < 0) {
throw new IllegalArgumentException("Left must be greater or equal to zero.");
}
if (bottom < 1 || bottom... | java |
public ThumborUrlBuilder align(VerticalAlign valign, HorizontalAlign halign) {
return align(valign).align(halign);
} | java |
public ThumborUrlBuilder trim(TrimPixelColor value, int colorTolerance) {
if (colorTolerance < 0 || colorTolerance > 442) {
throw new IllegalArgumentException("Color tolerance must be between 0 and 442.");
}
if (colorTolerance > 0 && value == null) {
throw new IllegalArgumentException("Trim pixe... | java |
StringBuilder assembleConfig(boolean meta) {
StringBuilder builder = new StringBuilder();
if (meta) {
builder.append(PREFIX_META);
}
if (isTrim) {
builder.append(PART_TRIM);
if (trimPixelColor != null) {
builder.append(":").append(trimPixelColor.value);
if (trimColorT... | java |
public static String rgb(int r, int g, int b) {
if (r < -100 || r > 100) {
throw new IllegalArgumentException("Red value must be between -100 and 100, inclusive.");
}
if (g < -100 || g > 100) {
throw new IllegalArgumentException("Green value must be between -100 and 100, inclusive.");
}
... | java |
public static String roundCorner(int radiusInner, int radiusOuter, int color) {
if (radiusInner < 1) {
throw new IllegalArgumentException("Radius must be greater than zero.");
}
if (radiusOuter < 0) {
throw new IllegalArgumentException("Outer radius must be greater than or equal to zero.");
... | java |
public static String fill(int color) {
final String colorCode = Integer.toHexString(color & 0xFFFFFF); // Strip alpha
return FILTER_FILL + "(" + colorCode + ")";
} | java |
public static String format(ImageFormat format) {
if (format == null) {
throw new IllegalArgumentException("You must specify an image format.");
}
return FILTER_FORMAT + "(" + format.value + ")";
} | java |
public static String frame(String imageUrl) {
if (imageUrl == null || imageUrl.length() == 0) {
throw new IllegalArgumentException("Image URL must not be blank.");
}
return FILTER_FRAME + "(" + imageUrl + ")";
} | java |
public static String blur(int radius, int sigma) {
if (radius < 1) {
throw new IllegalArgumentException("Radius must be greater than zero.");
}
if (radius > 150) {
throw new IllegalArgumentException("Radius must be lower or equal than 150.");
}
if (sigma < 0) {
throw new IllegalArg... | java |
public boolean start(SensorManager sensorManager) {
// Already started?
if (accelerometer != null) {
return true;
}
accelerometer = sensorManager.getDefaultSensor(
Sensor.TYPE_ACCELEROMETER);
// If this phone has an accelerometer, listen to it.
if (accelerometer != null) {
... | java |
public void stop() {
if (accelerometer != null) {
queue.clear();
sensorManager.unregisterListener(this, accelerometer);
sensorManager = null;
accelerometer = null;
}
} | java |
public ItemRequest<Task> findById(String task) {
String path = String.format("/tasks/%s", task);
return new ItemRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> update(String task) {
String path = String.format("/tasks/%s", task);
return new ItemRequest<Task>(this, Task.class, path, "PUT");
} | java |
public ItemRequest<Task> delete(String task) {
String path = String.format("/tasks/%s", task);
return new ItemRequest<Task>(this, Task.class, path, "DELETE");
} | java |
public CollectionRequest<Task> findByProject(String projectId) {
String path = String.format("/projects/%s/tasks", projectId);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public CollectionRequest<Task> findByTag(String tag) {
String path = String.format("/tags/%s/tasks", tag);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public CollectionRequest<Task> getTasksWithTag(String tag) {
String path = String.format("/tags/%s/tasks", tag);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> dependencies(String task) {
String path = String.format("/tasks/%s/dependencies", task);
return new ItemRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> dependents(String task) {
String path = String.format("/tasks/%s/dependents", task);
return new ItemRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> removeDependencies(String task) {
String path = String.format("/tasks/%s/removeDependencies", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public ItemRequest<Task> removeDependents(String task) {
String path = String.format("/tasks/%s/removeDependents", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public ItemRequest<Task> addFollowers(String task) {
String path = String.format("/tasks/%s/addFollowers", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public ItemRequest<Task> removeFollowers(String task) {
String path = String.format("/tasks/%s/removeFollowers", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public CollectionRequest<Task> projects(String task) {
String path = String.format("/tasks/%s/projects", task);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> addProject(String task) {
String path = String.format("/tasks/%s/addProject", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public ItemRequest<Task> removeProject(String task) {
String path = String.format("/tasks/%s/removeProject", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public CollectionRequest<Task> tags(String task) {
String path = String.format("/tasks/%s/tags", task);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> addTag(String task) {
String path = String.format("/tasks/%s/addTag", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public ItemRequest<Task> removeTag(String task) {
String path = String.format("/tasks/%s/removeTag", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public CollectionRequest<Task> subtasks(String task) {
String path = String.format("/tasks/%s/subtasks", task);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Task> addSubtask(String task) {
String path = String.format("/tasks/%s/subtasks", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | java |
public CollectionRequest<Task> stories(String task) {
String path = String.format("/tasks/%s/stories", task);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | java |
public ItemRequest<Tag> createInWorkspace(String workspace) {
String path = String.format("/workspaces/%s/tags", workspace);
return new ItemRequest<Tag>(this, Tag.class, path, "POST");
} | java |
public ItemRequest<Tag> findById(String tag) {
String path = String.format("/tags/%s", tag);
return new ItemRequest<Tag>(this, Tag.class, path, "GET");
} | java |
public ItemRequest<Tag> update(String tag) {
String path = String.format("/tags/%s", tag);
return new ItemRequest<Tag>(this, Tag.class, path, "PUT");
} | java |
public ItemRequest<Tag> delete(String tag) {
String path = String.format("/tags/%s", tag);
return new ItemRequest<Tag>(this, Tag.class, path, "DELETE");
} | java |
public CollectionRequest<Tag> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/tags", workspace);
return new CollectionRequest<Tag>(this, Tag.class, path, "GET");
} | java |
public ItemRequest<Project> createInWorkspace(String workspace) {
String path = String.format("/workspaces/%s/projects", workspace);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> createInTeam(String team) {
String path = String.format("/teams/%s/projects", team);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> findById(String project) {
String path = String.format("/projects/%s", project);
return new ItemRequest<Project>(this, Project.class, path, "GET");
} | java |
public ItemRequest<Project> update(String project) {
String path = String.format("/projects/%s", project);
return new ItemRequest<Project>(this, Project.class, path, "PUT");
} | java |
public ItemRequest<Project> delete(String project) {
String path = String.format("/projects/%s", project);
return new ItemRequest<Project>(this, Project.class, path, "DELETE");
} | java |
public CollectionRequest<Project> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/projects", workspace);
return new CollectionRequest<Project>(this, Project.class, path, "GET");
} | java |
public CollectionRequest<Project> findByTeam(String team) {
String path = String.format("/teams/%s/projects", team);
return new CollectionRequest<Project>(this, Project.class, path, "GET");
} | java |
public CollectionRequest<Project> tasks(String project) {
String path = String.format("/projects/%s/tasks", project);
return new CollectionRequest<Project>(this, Project.class, path, "GET");
} | java |
public ItemRequest<Project> addFollowers(String project) {
String path = String.format("/projects/%s/addFollowers", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> removeFollowers(String project) {
String path = String.format("/projects/%s/removeFollowers", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> addMembers(String project) {
String path = String.format("/projects/%s/addMembers", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> removeMembers(String project) {
String path = String.format("/projects/%s/removeMembers", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> addCustomFieldSetting(String project) {
String path = String.format("/projects/%s/addCustomFieldSetting", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
public ItemRequest<Project> removeCustomFieldSetting(String project) {
String path = String.format("/projects/%s/removeCustomFieldSetting", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | java |
private void retrieveNextPage() {
if (this.pageSize < Long.MAX_VALUE || this.itemLimit < Long.MAX_VALUE) {
this.request.query("limit", Math.min(this.pageSize, this.itemLimit - this.count));
} else {
this.request.query("limit", null);
}
ResultBodyCollection<T> page... | java |
public ItemRequest<User> findById(String user) {
String path = String.format("/users/%s", user);
return new ItemRequest<User>(this, User.class, path, "GET");
} | java |
public CollectionRequest<User> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/users", workspace);
return new CollectionRequest<User>(this, User.class, path, "GET");
} | java |
public ItemRequest<CustomField> findById(String customField) {
String path = String.format("/custom_fields/%s", customField);
return new ItemRequest<CustomField>(this, CustomField.class, path, "GET");
} | java |
public CollectionRequest<CustomField> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/custom_fields", workspace);
return new CollectionRequest<CustomField>(this, CustomField.class, path, "GET");
} | java |
public ItemRequest<CustomField> update(String customField) {
String path = String.format("/custom_fields/%s", customField);
return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT");
} | java |
public ItemRequest<CustomField> delete(String customField) {
String path = String.format("/custom_fields/%s", customField);
return new ItemRequest<CustomField>(this, CustomField.class, path, "DELETE");
} | java |
public ItemRequest<CustomField> updateEnumOption(String enumOption) {
String path = String.format("/enum_options/%s", enumOption);
return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT");
} | java |
public ItemRequest<CustomField> insertEnumOption(String customField) {
String path = String.format("/custom_fields/%s/enum_options/insert", customField);
return new ItemRequest<CustomField>(this, CustomField.class, path, "POST");
} | java |
public ItemRequest<ProjectStatus> createInProject(String project) {
String path = String.format("/projects/%s/project_statuses", project);
return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "POST");
} | java |
public CollectionRequest<ProjectStatus> findByProject(String project) {
String path = String.format("/projects/%s/project_statuses", project);
return new CollectionRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET");
} | java |
public ItemRequest<ProjectStatus> findById(String projectStatus) {
String path = String.format("/project_statuses/%s", projectStatus);
return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET");
} | java |
public ItemRequest<ProjectStatus> delete(String projectStatus) {
String path = String.format("/project_statuses/%s", projectStatus);
return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "DELETE");
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.