id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
36,400
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.isSaturday
public static boolean isSaturday(int column, int firstDayOfWeek) { return (firstDayOfWeek == Time.SUNDAY && column == 6) || (firstDayOfWeek == Time.MONDAY && column == 5) || (firstDayOfWeek == Time.SATURDAY && column == 0); }
java
public static boolean isSaturday(int column, int firstDayOfWeek) { return (firstDayOfWeek == Time.SUNDAY && column == 6) || (firstDayOfWeek == Time.MONDAY && column == 5) || (firstDayOfWeek == Time.SATURDAY && column == 0); }
[ "public", "static", "boolean", "isSaturday", "(", "int", "column", ",", "int", "firstDayOfWeek", ")", "{", "return", "(", "firstDayOfWeek", "==", "Time", ".", "SUNDAY", "&&", "column", "==", "6", ")", "||", "(", "firstDayOfWeek", "==", "Time", ".", "MONDAY...
Determine whether the column position is Saturday or not. @param column the column position @param firstDayOfWeek the first day of week in android.text.format.Time @return true if the column is Saturday position
[ "Determine", "whether", "the", "column", "position", "is", "Saturday", "or", "not", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L434-L438
36,401
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.isSunday
public static boolean isSunday(int column, int firstDayOfWeek) { return (firstDayOfWeek == Time.SUNDAY && column == 0) || (firstDayOfWeek == Time.MONDAY && column == 6) || (firstDayOfWeek == Time.SATURDAY && column == 1); }
java
public static boolean isSunday(int column, int firstDayOfWeek) { return (firstDayOfWeek == Time.SUNDAY && column == 0) || (firstDayOfWeek == Time.MONDAY && column == 6) || (firstDayOfWeek == Time.SATURDAY && column == 1); }
[ "public", "static", "boolean", "isSunday", "(", "int", "column", ",", "int", "firstDayOfWeek", ")", "{", "return", "(", "firstDayOfWeek", "==", "Time", ".", "SUNDAY", "&&", "column", "==", "0", ")", "||", "(", "firstDayOfWeek", "==", "Time", ".", "MONDAY",...
Determine whether the column position is Sunday or not. @param column the column position @param firstDayOfWeek the first day of week in android.text.format.Time @return true if the column is Sunday position
[ "Determine", "whether", "the", "column", "position", "is", "Sunday", "or", "not", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L447-L451
36,402
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.convertAlldayUtcToLocal
public static long convertAlldayUtcToLocal(Time recycle, long utcTime, String tz) { if (recycle == null) { recycle = new Time(); } recycle.timezone = Time.TIMEZONE_UTC; recycle.set(utcTime); recycle.timezone = tz; return recycle.normalize(true); }
java
public static long convertAlldayUtcToLocal(Time recycle, long utcTime, String tz) { if (recycle == null) { recycle = new Time(); } recycle.timezone = Time.TIMEZONE_UTC; recycle.set(utcTime); recycle.timezone = tz; return recycle.normalize(true); }
[ "public", "static", "long", "convertAlldayUtcToLocal", "(", "Time", "recycle", ",", "long", "utcTime", ",", "String", "tz", ")", "{", "if", "(", "recycle", "==", "null", ")", "{", "recycle", "=", "new", "Time", "(", ")", ";", "}", "recycle", ".", "time...
Convert given UTC time into current local time. This assumes it is for an allday event and will adjust the time to be on a midnight boundary. @param recycle Time object to recycle, otherwise null. @param utcTime Time to convert, in UTC. @param tz The time zone to convert this time to.
[ "Convert", "given", "UTC", "time", "into", "current", "local", "time", ".", "This", "assumes", "it", "is", "for", "an", "allday", "event", "and", "will", "adjust", "the", "time", "to", "be", "on", "a", "midnight", "boundary", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L461-L469
36,403
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getNextMidnight
public static long getNextMidnight(Time recycle, long theTime, String tz) { if (recycle == null) { recycle = new Time(); } recycle.timezone = tz; recycle.set(theTime); recycle.monthDay++; recycle.hour = 0; recycle.minute = 0; recycle.second = 0...
java
public static long getNextMidnight(Time recycle, long theTime, String tz) { if (recycle == null) { recycle = new Time(); } recycle.timezone = tz; recycle.set(theTime); recycle.monthDay++; recycle.hour = 0; recycle.minute = 0; recycle.second = 0...
[ "public", "static", "long", "getNextMidnight", "(", "Time", "recycle", ",", "long", "theTime", ",", "String", "tz", ")", "{", "if", "(", "recycle", "==", "null", ")", "{", "recycle", "=", "new", "Time", "(", ")", ";", "}", "recycle", ".", "timezone", ...
Finds and returns the next midnight after "theTime" in milliseconds UTC @param recycle - Time object to recycle, otherwise null. @param theTime - Time used for calculations (in UTC) @param tz The time zone to convert this time to.
[ "Finds", "and", "returns", "the", "next", "midnight", "after", "theTime", "in", "milliseconds", "UTC" ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L488-L499
36,404
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.checkForDuplicateNames
public static void checkForDuplicateNames( Map<String, Boolean> isDuplicateName, Cursor cursor, int nameIndex) { isDuplicateName.clear(); cursor.moveToPosition(-1); while (cursor.moveToNext()) { String displayName = cursor.getString(nameIndex); // Set it to tr...
java
public static void checkForDuplicateNames( Map<String, Boolean> isDuplicateName, Cursor cursor, int nameIndex) { isDuplicateName.clear(); cursor.moveToPosition(-1); while (cursor.moveToNext()) { String displayName = cursor.getString(nameIndex); // Set it to tr...
[ "public", "static", "void", "checkForDuplicateNames", "(", "Map", "<", "String", ",", "Boolean", ">", "isDuplicateName", ",", "Cursor", "cursor", ",", "int", "nameIndex", ")", "{", "isDuplicateName", ".", "clear", "(", ")", ";", "cursor", ".", "moveToPosition"...
Scan through a cursor of calendars and check if names are duplicated. This travels a cursor containing calendar display names and fills in the provided map with whether or not each name is repeated. @param isDuplicateName The map to put the duplicate check results in. @param cursor The query of calendars to c...
[ "Scan", "through", "a", "cursor", "of", "calendars", "and", "check", "if", "names", "are", "duplicated", ".", "This", "travels", "a", "cursor", "containing", "calendar", "display", "names", "and", "fills", "in", "the", "provided", "map", "with", "whether", "...
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L510-L521
36,405
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getDisplayColorFromColor
public static int getDisplayColorFromColor(int color) { if (!isJellybeanOrLater()) { return color; } float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[1] = Math.min(hsv[1] * SATURATION_ADJUST, 1.0f); hsv[2] = hsv[2] * INTENSITY_ADJUST; ret...
java
public static int getDisplayColorFromColor(int color) { if (!isJellybeanOrLater()) { return color; } float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[1] = Math.min(hsv[1] * SATURATION_ADJUST, 1.0f); hsv[2] = hsv[2] * INTENSITY_ADJUST; ret...
[ "public", "static", "int", "getDisplayColorFromColor", "(", "int", "color", ")", "{", "if", "(", "!", "isJellybeanOrLater", "(", ")", ")", "{", "return", "color", ";", "}", "float", "[", "]", "hsv", "=", "new", "float", "[", "3", "]", ";", "Color", "...
For devices with Jellybean or later, darkens the given color to ensure that white text is clearly visible on top of it. For devices prior to Jellybean, does nothing, as the sync adapter handles the color change. @param color
[ "For", "devices", "with", "Jellybean", "or", "later", "darkens", "the", "given", "color", "to", "ensure", "that", "white", "text", "is", "clearly", "visible", "on", "top", "of", "it", ".", "For", "devices", "prior", "to", "Jellybean", "does", "nothing", "a...
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L553-L563
36,406
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getDeclinedColorFromColor
public static int getDeclinedColorFromColor(int color) { int bg = 0xffffffff; int a = DECLINED_EVENT_ALPHA; int r = (((color & 0x00ff0000) * a) + ((bg & 0x00ff0000) * (0xff - a))) & 0xff000000; int g = (((color & 0x0000ff00) * a) + ((bg & 0x0000ff00) * (0xff - a))) & 0x00ff0000; ...
java
public static int getDeclinedColorFromColor(int color) { int bg = 0xffffffff; int a = DECLINED_EVENT_ALPHA; int r = (((color & 0x00ff0000) * a) + ((bg & 0x00ff0000) * (0xff - a))) & 0xff000000; int g = (((color & 0x0000ff00) * a) + ((bg & 0x0000ff00) * (0xff - a))) & 0x00ff0000; ...
[ "public", "static", "int", "getDeclinedColorFromColor", "(", "int", "color", ")", "{", "int", "bg", "=", "0xffffffff", ";", "int", "a", "=", "DECLINED_EVENT_ALPHA", ";", "int", "r", "=", "(", "(", "(", "color", "&", "0x00ff0000", ")", "*", "a", ")", "+...
white. The result is the color that should be used for declined events.
[ "white", ".", "The", "result", "is", "the", "color", "that", "should", "be", "used", "for", "declined", "events", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L567-L574
36,407
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.weaveDNAStrands
private static void weaveDNAStrands(LinkedList<DNASegment> segments, int firstJulianDay, HashMap<Integer, DNAStrand> strands, int top, int bottom, int[] dayXs) { // First, get rid of any colors that ended up with no segments Iterator<DNAStrand> strandIterator = st...
java
private static void weaveDNAStrands(LinkedList<DNASegment> segments, int firstJulianDay, HashMap<Integer, DNAStrand> strands, int top, int bottom, int[] dayXs) { // First, get rid of any colors that ended up with no segments Iterator<DNAStrand> strandIterator = st...
[ "private", "static", "void", "weaveDNAStrands", "(", "LinkedList", "<", "DNASegment", ">", "segments", ",", "int", "firstJulianDay", ",", "HashMap", "<", "Integer", ",", "DNAStrand", ">", "strands", ",", "int", "top", ",", "int", "bottom", ",", "int", "[", ...
list of points to draw
[ "list", "of", "points", "to", "draw" ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L600-L639
36,408
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getPixelOffsetFromMinutes
private static int getPixelOffsetFromMinutes(int minute, int workDayHeight, int remainderHeight) { int y; if (minute < WORK_DAY_START_MINUTES) { y = minute * remainderHeight / WORK_DAY_START_MINUTES; } else if (minute < WORK_DAY_END_MI...
java
private static int getPixelOffsetFromMinutes(int minute, int workDayHeight, int remainderHeight) { int y; if (minute < WORK_DAY_START_MINUTES) { y = minute * remainderHeight / WORK_DAY_START_MINUTES; } else if (minute < WORK_DAY_END_MI...
[ "private", "static", "int", "getPixelOffsetFromMinutes", "(", "int", "minute", ",", "int", "workDayHeight", ",", "int", "remainderHeight", ")", "{", "int", "y", ";", "if", "(", "minute", "<", "WORK_DAY_START_MINUTES", ")", "{", "y", "=", "minute", "*", "rema...
Compute a pixel offset from the top for a given minute from the work day height and the height of the top area.
[ "Compute", "a", "pixel", "offset", "from", "the", "top", "for", "a", "given", "minute", "from", "the", "work", "day", "height", "and", "the", "height", "of", "the", "top", "area", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L645-L658
36,409
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getOrCreateStrand
private static DNAStrand getOrCreateStrand(HashMap<Integer, DNAStrand> strands, int color) { DNAStrand strand = strands.get(color); if (strand == null) { strand = new DNAStrand(); strand.color = color; strand.count = 0; strands.put(strand.color, strand); ...
java
private static DNAStrand getOrCreateStrand(HashMap<Integer, DNAStrand> strands, int color) { DNAStrand strand = strands.get(color); if (strand == null) { strand = new DNAStrand(); strand.color = color; strand.count = 0; strands.put(strand.color, strand); ...
[ "private", "static", "DNAStrand", "getOrCreateStrand", "(", "HashMap", "<", "Integer", ",", "DNAStrand", ">", "strands", ",", "int", "color", ")", "{", "DNAStrand", "strand", "=", "strands", ".", "get", "(", "color", ")", ";", "if", "(", "strand", "==", ...
Try to get a strand of the given color. Create it if it doesn't exist.
[ "Try", "to", "get", "a", "strand", "of", "the", "given", "color", ".", "Create", "it", "if", "it", "doesn", "t", "exist", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L663-L672
36,410
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.setUpSearchView
public static void setUpSearchView(SearchView view, Activity act) { SearchManager searchManager = (SearchManager) act.getSystemService(Context.SEARCH_SERVICE); view.setSearchableInfo(searchManager.getSearchableInfo(act.getComponentName())); view.setQueryRefinementEnabled(true); }
java
public static void setUpSearchView(SearchView view, Activity act) { SearchManager searchManager = (SearchManager) act.getSystemService(Context.SEARCH_SERVICE); view.setSearchableInfo(searchManager.getSearchableInfo(act.getComponentName())); view.setQueryRefinementEnabled(true); }
[ "public", "static", "void", "setUpSearchView", "(", "SearchView", "view", ",", "Activity", "act", ")", "{", "SearchManager", "searchManager", "=", "(", "SearchManager", ")", "act", ".", "getSystemService", "(", "Context", ".", "SEARCH_SERVICE", ")", ";", "view",...
This sets up a search view to use Calendar's search suggestions provider and to allow refining the search. @param view The {@link android.widget.SearchView} to set up @param act The activity using the view
[ "This", "sets", "up", "a", "search", "view", "to", "use", "Calendar", "s", "search", "suggestions", "provider", "and", "to", "allow", "refining", "the", "search", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L682-L686
36,411
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.setMidnightUpdater
public static void setMidnightUpdater(Handler h, Runnable r, String timezone) { if (h == null || r == null || timezone == null) { return; } long now = System.currentTimeMillis(); Time time = new Time(timezone); time.set(now); long runInMillis = (24 * 3600 - ti...
java
public static void setMidnightUpdater(Handler h, Runnable r, String timezone) { if (h == null || r == null || timezone == null) { return; } long now = System.currentTimeMillis(); Time time = new Time(timezone); time.set(now); long runInMillis = (24 * 3600 - ti...
[ "public", "static", "void", "setMidnightUpdater", "(", "Handler", "h", ",", "Runnable", "r", ",", "String", "timezone", ")", "{", "if", "(", "h", "==", "null", "||", "r", "==", "null", "||", "timezone", "==", "null", ")", "{", "return", ";", "}", "lo...
do run the runnable
[ "do", "run", "the", "runnable" ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L690-L701
36,412
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.resetMidnightUpdater
public static void resetMidnightUpdater(Handler h, Runnable r) { if (h == null || r == null) { return; } h.removeCallbacks(r); }
java
public static void resetMidnightUpdater(Handler h, Runnable r) { if (h == null || r == null) { return; } h.removeCallbacks(r); }
[ "public", "static", "void", "resetMidnightUpdater", "(", "Handler", "h", ",", "Runnable", "r", ")", "{", "if", "(", "h", "==", "null", "||", "r", "==", "null", ")", "{", "return", ";", "}", "h", ".", "removeCallbacks", "(", "r", ")", ";", "}" ]
Stop the midnight update thread
[ "Stop", "the", "midnight", "update", "thread" ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L704-L709
36,413
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getDisplayedTimezone
public static String getDisplayedTimezone(long startMillis, String localTimezone, String eventTimezone) { String tzDisplay = null; if (!TextUtils.equals(localTimezone, eventTimezone)) { // Figure out if this is in DST TimeZone tz = Ti...
java
public static String getDisplayedTimezone(long startMillis, String localTimezone, String eventTimezone) { String tzDisplay = null; if (!TextUtils.equals(localTimezone, eventTimezone)) { // Figure out if this is in DST TimeZone tz = Ti...
[ "public", "static", "String", "getDisplayedTimezone", "(", "long", "startMillis", ",", "String", "localTimezone", ",", "String", "eventTimezone", ")", "{", "String", "tzDisplay", "=", "null", ";", "if", "(", "!", "TextUtils", ".", "equals", "(", "localTimezone",...
Returns the timezone to display in the event info, if the local timezone is different from the event timezone. Otherwise returns null.
[ "Returns", "the", "timezone", "to", "display", "in", "the", "event", "info", "if", "the", "local", "timezone", "is", "different", "from", "the", "event", "timezone", ".", "Otherwise", "returns", "null", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L715-L730
36,414
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.singleDayEvent
private static boolean singleDayEvent(long startMillis, long endMillis, long localGmtOffset) { if (startMillis == endMillis) { return true; } // An event ending at midnight should still be a single-day event, so check // time end-1. int startDay = Time.getJulianDay(s...
java
private static boolean singleDayEvent(long startMillis, long endMillis, long localGmtOffset) { if (startMillis == endMillis) { return true; } // An event ending at midnight should still be a single-day event, so check // time end-1. int startDay = Time.getJulianDay(s...
[ "private", "static", "boolean", "singleDayEvent", "(", "long", "startMillis", ",", "long", "endMillis", ",", "long", "localGmtOffset", ")", "{", "if", "(", "startMillis", "==", "endMillis", ")", "{", "return", "true", ";", "}", "// An event ending at midnight shou...
Returns whether the specified time interval is in a single day.
[ "Returns", "whether", "the", "specified", "time", "interval", "is", "in", "a", "single", "day", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L735-L745
36,415
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.isTodayOrTomorrow
private static int isTodayOrTomorrow(Resources r, long dayMillis, long currentMillis, long localGmtOffset) { int startDay = Time.getJulianDay(dayMillis, localGmtOffset); int currentDay = Time.getJulianDay(currentMillis, localGmtOffset); int days = startD...
java
private static int isTodayOrTomorrow(Resources r, long dayMillis, long currentMillis, long localGmtOffset) { int startDay = Time.getJulianDay(dayMillis, localGmtOffset); int currentDay = Time.getJulianDay(currentMillis, localGmtOffset); int days = startD...
[ "private", "static", "int", "isTodayOrTomorrow", "(", "Resources", "r", ",", "long", "dayMillis", ",", "long", "currentMillis", ",", "long", "localGmtOffset", ")", "{", "int", "startDay", "=", "Time", ".", "getJulianDay", "(", "dayMillis", ",", "localGmtOffset",...
Returns TODAY or TOMORROW if applicable. Otherwise returns NONE.
[ "Returns", "TODAY", "or", "TOMORROW", "if", "applicable", ".", "Otherwise", "returns", "NONE", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L755-L768
36,416
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.createEmailAttendeesIntent
public static Intent createEmailAttendeesIntent(Resources resources, String eventTitle, String body, List<String> toEmails, List<String> ccEmails, String ownerAccount) { List<String> toList = toEmails; List<String> ccList = ccEmails; if (toEmai...
java
public static Intent createEmailAttendeesIntent(Resources resources, String eventTitle, String body, List<String> toEmails, List<String> ccEmails, String ownerAccount) { List<String> toList = toEmails; List<String> ccList = ccEmails; if (toEmai...
[ "public", "static", "Intent", "createEmailAttendeesIntent", "(", "Resources", "resources", ",", "String", "eventTitle", ",", "String", "body", ",", "List", "<", "String", ">", "toEmails", ",", "List", "<", "String", ">", "ccEmails", ",", "String", "ownerAccount"...
Create an intent for emailing attendees of an event. @param resources The resources for translating strings. @param eventTitle The title of the event to use as the email subject. @param body The default text for the email body. @param toEmails The list of emails for the 'to' line. @param ccEmails ...
[ "Create", "an", "intent", "for", "emailing", "attendees", "of", "an", "event", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L780-L860
36,417
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getVersionCode
public static String getVersionCode(Context context) { if (sVersion == null) { try { sVersion = context.getPackageManager().getPackageInfo( context.getPackageName(), 0).versionName; } catch (PackageManager.NameNotFoundException e) { ...
java
public static String getVersionCode(Context context) { if (sVersion == null) { try { sVersion = context.getPackageManager().getPackageInfo( context.getPackageName(), 0).versionName; } catch (PackageManager.NameNotFoundException e) { ...
[ "public", "static", "String", "getVersionCode", "(", "Context", "context", ")", "{", "if", "(", "sVersion", "==", "null", ")", "{", "try", "{", "sVersion", "=", "context", ".", "getPackageManager", "(", ")", ".", "getPackageInfo", "(", "context", ".", "get...
Return the app version code.
[ "Return", "the", "app", "version", "code", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L921-L932
36,418
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.findNanpMatchEnd
private static int findNanpMatchEnd(CharSequence text, int startPos) { /* * A few interesting cases: * 94043 # too short, ignore * 123456789012 # too long, ignore * +1 (650) 555-1212 # 11 digits, spaces...
java
private static int findNanpMatchEnd(CharSequence text, int startPos) { /* * A few interesting cases: * 94043 # too short, ignore * 123456789012 # too long, ignore * +1 (650) 555-1212 # 11 digits, spaces...
[ "private", "static", "int", "findNanpMatchEnd", "(", "CharSequence", "text", ",", "int", "startPos", ")", "{", "/*\n * A few interesting cases:\n * 94043 # too short, ignore\n * 123456789012 # too long, ignore\n ...
Checks to see if there is a valid phone number in the input, starting at the specified offset. If so, the index of the last character + 1 is returned. The input is assumed to begin with a non-whitespace character. @return Exclusive end position, or -1 if not a match.
[ "Checks", "to", "see", "if", "there", "is", "a", "valid", "phone", "number", "in", "the", "input", "starting", "at", "the", "specified", "offset", ".", "If", "so", "the", "index", "of", "the", "last", "character", "+", "1", "is", "returned", ".", "The"...
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L1184-L1254
36,419
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.spanWillOverlap
private static boolean spanWillOverlap(Spannable spanText, URLSpan[] spanList, int start, int end) { if (start == end) { // empty span, ignore return false; } for (URLSpan span : spanList) { int existingStart = spanTe...
java
private static boolean spanWillOverlap(Spannable spanText, URLSpan[] spanList, int start, int end) { if (start == end) { // empty span, ignore return false; } for (URLSpan span : spanList) { int existingStart = spanTe...
[ "private", "static", "boolean", "spanWillOverlap", "(", "Spannable", "spanText", ",", "URLSpan", "[", "]", "spanList", ",", "int", "start", ",", "int", "end", ")", "{", "if", "(", "start", "==", "end", ")", "{", "// empty span, ignore", "return", "false", ...
Determines whether a new span at [start,end) will overlap with any existing span.
[ "Determines", "whether", "a", "new", "span", "at", "[", "start", "end", ")", "will", "overlap", "with", "any", "existing", "span", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L1259-L1279
36,420
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/EventRecurrenceFormatter.java
EventRecurrenceFormatter.dayToUtilDay
private static int dayToUtilDay(int day) { switch (day) { case EventRecurrence.SU: return Calendar.SUNDAY; case EventRecurrence.MO: return Calendar.MONDAY; case EventRecurrence.TU: return Calendar.TUESDAY; case EventRecurrence.WE: return Calendar.WEDNESDAY; ...
java
private static int dayToUtilDay(int day) { switch (day) { case EventRecurrence.SU: return Calendar.SUNDAY; case EventRecurrence.MO: return Calendar.MONDAY; case EventRecurrence.TU: return Calendar.TUESDAY; case EventRecurrence.WE: return Calendar.WEDNESDAY; ...
[ "private", "static", "int", "dayToUtilDay", "(", "int", "day", ")", "{", "switch", "(", "day", ")", "{", "case", "EventRecurrence", ".", "SU", ":", "return", "Calendar", ".", "SUNDAY", ";", "case", "EventRecurrence", ".", "MO", ":", "return", "Calendar", ...
Converts EventRecurrence's day of week to DateUtil's day of week. @param day of week as an EventRecurrence value @return day of week as a DateUtil value.
[ "Converts", "EventRecurrence", "s", "day", "of", "week", "to", "DateUtil", "s", "day", "of", "week", "." ]
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/EventRecurrenceFormatter.java#L160-L171
36,421
EasyPost/easypost-java
src/main/java/com/easypost/model/Report.java
Report.reportURL
protected static String reportURL(String type) throws EasyPostException { try { String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); return String.format("%s/reports/%s/", EasyPost.API_BASE, urlType); } catch (java.io.UnsupportedEncodingException e) { throw new EasyPostException("U...
java
protected static String reportURL(String type) throws EasyPostException { try { String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); return String.format("%s/reports/%s/", EasyPost.API_BASE, urlType); } catch (java.io.UnsupportedEncodingException e) { throw new EasyPostException("U...
[ "protected", "static", "String", "reportURL", "(", "String", "type", ")", "throws", "EasyPostException", "{", "try", "{", "String", "urlType", "=", "URLEncoder", ".", "encode", "(", "type", ",", "\"UTF-8\"", ")", ".", "toLowerCase", "(", ")", ";", "return", ...
generate report URL pattern
[ "generate", "report", "URL", "pattern" ]
323b4cece5fa0f607e80a7e66cb1ce20c9d5b844
https://github.com/EasyPost/easypost-java/blob/323b4cece5fa0f607e80a7e66cb1ce20c9d5b844/src/main/java/com/easypost/model/Report.java#L121-L128
36,422
EasyPost/easypost-java
src/main/java/com/easypost/model/Item.java
Item.retrieveReference
public Item retrieveReference(String name, String value) throws EasyPostException { return retrieveReference(name, value, null); }
java
public Item retrieveReference(String name, String value) throws EasyPostException { return retrieveReference(name, value, null); }
[ "public", "Item", "retrieveReference", "(", "String", "name", ",", "String", "value", ")", "throws", "EasyPostException", "{", "return", "retrieveReference", "(", "name", ",", "value", ",", "null", ")", ";", "}" ]
retrieve by custom reference
[ "retrieve", "by", "custom", "reference" ]
323b4cece5fa0f607e80a7e66cb1ce20c9d5b844
https://github.com/EasyPost/easypost-java/blob/323b4cece5fa0f607e80a7e66cb1ce20c9d5b844/src/main/java/com/easypost/model/Item.java#L147-L149
36,423
dbmdz/iiif-presentation-api
iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java
IIIFPresentationApiController.getOriginalUri
private URI getOriginalUri(HttpServletRequest request) { String requestUrl = request.getRequestURL().toString(); String incomingScheme = URI.create(requestUrl).getScheme(); String originalScheme = request.getHeader("X-Forwarded-Proto"); if (originalScheme != null && !incomingScheme.equals(originalScheme...
java
private URI getOriginalUri(HttpServletRequest request) { String requestUrl = request.getRequestURL().toString(); String incomingScheme = URI.create(requestUrl).getScheme(); String originalScheme = request.getHeader("X-Forwarded-Proto"); if (originalScheme != null && !incomingScheme.equals(originalScheme...
[ "private", "URI", "getOriginalUri", "(", "HttpServletRequest", "request", ")", "{", "String", "requestUrl", "=", "request", ".", "getRequestURL", "(", ")", ".", "toString", "(", ")", ";", "String", "incomingScheme", "=", "URI", ".", "create", "(", "requestUrl"...
Return the URL as it was originally received from a possible frontend proxy. @param request Incoming request @return URL as it was received at the frontend proxy
[ "Return", "the", "URL", "as", "it", "was", "originally", "received", "from", "a", "possible", "frontend", "proxy", "." ]
8b551d3717eed2620bc9e50b4c23f945b73b9cea
https://github.com/dbmdz/iiif-presentation-api/blob/8b551d3717eed2620bc9e50b4c23f945b73b9cea/iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java#L163-L172
36,424
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/authentication/strong/oath/totp/TOTP.java
TOTP.hmacSha
private static byte[] hmacSha(String crypto, byte[] keyBytes, byte[] text) { try { Mac hmac; hmac = Mac.getInstance(crypto); SecretKeySpec macKey = new SecretKeySpec(keyBytes, "RAW"); hmac.init(macKey); return hmac.doFinal(text); } catch (Gener...
java
private static byte[] hmacSha(String crypto, byte[] keyBytes, byte[] text) { try { Mac hmac; hmac = Mac.getInstance(crypto); SecretKeySpec macKey = new SecretKeySpec(keyBytes, "RAW"); hmac.init(macKey); return hmac.doFinal(text); } catch (Gener...
[ "private", "static", "byte", "[", "]", "hmacSha", "(", "String", "crypto", ",", "byte", "[", "]", "keyBytes", ",", "byte", "[", "]", "text", ")", "{", "try", "{", "Mac", "hmac", ";", "hmac", "=", "Mac", ".", "getInstance", "(", "crypto", ")", ";", ...
This method uses the JCE to provide the crypto algorithm. HMAC computes a Hashed Message Authentication Code with the crypto hash algorithm as a parameter. @param crypto : the crypto algorithm (HmacSHA1, HmacSHA256, HmacSHA512) @param keyBytes : the bytes to use for the HMAC key @param text : the message or text to be...
[ "This", "method", "uses", "the", "JCE", "to", "provide", "the", "crypto", "algorithm", ".", "HMAC", "computes", "a", "Hashed", "Message", "Authentication", "Code", "with", "the", "crypto", "hash", "algorithm", "as", "a", "parameter", "." ]
9af2d4896e02d30622acec638539bfc41f45e480
https://github.com/Unicon/cas-addons/blob/9af2d4896e02d30622acec638539bfc41f45e480/src/main/java/net/unicon/cas/addons/authentication/strong/oath/totp/TOTP.java#L35-L45
36,425
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/authentication/strong/oath/totp/TOTP.java
TOTP.generateTOTP
public static int generateTOTP(byte[] key, long time, int digits, String crypto) { byte[] msg = ByteBuffer.allocate(8).putLong(time).array(); byte[] hash = hmacSha(crypto, key, msg); // put selected bytes into result int int offset = hash[hash.length - 1] & 0xf; int binary = (...
java
public static int generateTOTP(byte[] key, long time, int digits, String crypto) { byte[] msg = ByteBuffer.allocate(8).putLong(time).array(); byte[] hash = hmacSha(crypto, key, msg); // put selected bytes into result int int offset = hash[hash.length - 1] & 0xf; int binary = (...
[ "public", "static", "int", "generateTOTP", "(", "byte", "[", "]", "key", ",", "long", "time", ",", "int", "digits", ",", "String", "crypto", ")", "{", "byte", "[", "]", "msg", "=", "ByteBuffer", ".", "allocate", "(", "8", ")", ".", "putLong", "(", ...
This method generates a TOTP value for the given set of parameters. @param key : the shared secret @param time : a value that reflects a time @param digits : number of digits to return @param crypto : the crypto function to use @return digits
[ "This", "method", "generates", "a", "TOTP", "value", "for", "the", "given", "set", "of", "parameters", "." ]
9af2d4896e02d30622acec638539bfc41f45e480
https://github.com/Unicon/cas-addons/blob/9af2d4896e02d30622acec638539bfc41f45e480/src/main/java/net/unicon/cas/addons/authentication/strong/oath/totp/TOTP.java#L62-L75
36,426
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/serviceregistry/JsonServiceRegistryDao.java
JsonServiceRegistryDao.loadServices
@SuppressWarnings("unchecked") public final List<RegisteredService> loadServices() { logger.info("Loading Registered Services from: [ {} ]...", this.servicesConfigFile); final List<RegisteredService> resolvedServices = new ArrayList<RegisteredService>(); try { ...
java
@SuppressWarnings("unchecked") public final List<RegisteredService> loadServices() { logger.info("Loading Registered Services from: [ {} ]...", this.servicesConfigFile); final List<RegisteredService> resolvedServices = new ArrayList<RegisteredService>(); try { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "List", "<", "RegisteredService", ">", "loadServices", "(", ")", "{", "logger", ".", "info", "(", "\"Loading Registered Services from: [ {} ]...\"", ",", "this", ".", "servicesConfigFile", ")", "...
This method is used as a Spring bean loadServices-method as well as the reloading method when the change in the services definition resource is detected at runtime
[ "This", "method", "is", "used", "as", "a", "Spring", "bean", "loadServices", "-", "method", "as", "well", "as", "the", "reloading", "method", "when", "the", "change", "in", "the", "services", "definition", "resource", "is", "detected", "at", "runtime" ]
9af2d4896e02d30622acec638539bfc41f45e480
https://github.com/Unicon/cas-addons/blob/9af2d4896e02d30622acec638539bfc41f45e480/src/main/java/net/unicon/cas/addons/serviceregistry/JsonServiceRegistryDao.java#L112-L141
36,427
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/persondir/JsonBackedComplexStubPersonAttributeDao.java
JsonBackedComplexStubPersonAttributeDao.init
public void init() throws Exception { try { unmarshalAndSetBackingMap(); } //If we get to this point, the JSON file is well-formed, but its structure does not map into PersonDir backingMap generic type - fail fast. catch (final ClassCastException ex) { throw new B...
java
public void init() throws Exception { try { unmarshalAndSetBackingMap(); } //If we get to this point, the JSON file is well-formed, but its structure does not map into PersonDir backingMap generic type - fail fast. catch (final ClassCastException ex) { throw new B...
[ "public", "void", "init", "(", ")", "throws", "Exception", "{", "try", "{", "unmarshalAndSetBackingMap", "(", ")", ";", "}", "//If we get to this point, the JSON file is well-formed, but its structure does not map into PersonDir backingMap generic type - fail fast.", "catch", "(", ...
Init method un-marshals JSON representation of the person attributes.
[ "Init", "method", "un", "-", "marshals", "JSON", "representation", "of", "the", "person", "attributes", "." ]
9af2d4896e02d30622acec638539bfc41f45e480
https://github.com/Unicon/cas-addons/blob/9af2d4896e02d30622acec638539bfc41f45e480/src/main/java/net/unicon/cas/addons/persondir/JsonBackedComplexStubPersonAttributeDao.java#L50-L59
36,428
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/persondir/JsonBackedComplexStubPersonAttributeDao.java
JsonBackedComplexStubPersonAttributeDao.onApplicationEvent
@Override public void onApplicationEvent(final ResourceChangeDetectingEventNotifier.ResourceChangedEvent resourceChangedEvent) { try { if (!resourceChangedEvent.getResourceUri().equals(this.personAttributesConfigFile.getURI())) { //Not our resource. Just get out of here. ...
java
@Override public void onApplicationEvent(final ResourceChangeDetectingEventNotifier.ResourceChangedEvent resourceChangedEvent) { try { if (!resourceChangedEvent.getResourceUri().equals(this.personAttributesConfigFile.getURI())) { //Not our resource. Just get out of here. ...
[ "@", "Override", "public", "void", "onApplicationEvent", "(", "final", "ResourceChangeDetectingEventNotifier", ".", "ResourceChangedEvent", "resourceChangedEvent", ")", "{", "try", "{", "if", "(", "!", "resourceChangedEvent", ".", "getResourceUri", "(", ")", ".", "equ...
Reload person attributes when JSON config is changed. In case of un-marshaling errors, or any other errors, do not disturb running CAS server by propagating the exceptions, but instead log the error and leave the previously cached person attributes state alone. @param resourceChangedEvent event representing the resour...
[ "Reload", "person", "attributes", "when", "JSON", "config", "is", "changed", ".", "In", "case", "of", "un", "-", "marshaling", "errors", "or", "any", "other", "errors", "do", "not", "disturb", "running", "CAS", "server", "by", "propagating", "the", "exceptio...
9af2d4896e02d30622acec638539bfc41f45e480
https://github.com/Unicon/cas-addons/blob/9af2d4896e02d30622acec638539bfc41f45e480/src/main/java/net/unicon/cas/addons/persondir/JsonBackedComplexStubPersonAttributeDao.java#L69-L97
36,429
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/authentication/handler/ShiroHashServicePasswordEncoder.java
ShiroHashServicePasswordEncoder.init
void init() throws Throwable { if (this.digestAlgorithmName != null) { this.hashService.setHashAlgorithmName(this.digestAlgorithmName); } if (this.hashIterations > 0) { this.hashService.setHashIterations(this.hashIterations); } }
java
void init() throws Throwable { if (this.digestAlgorithmName != null) { this.hashService.setHashAlgorithmName(this.digestAlgorithmName); } if (this.hashIterations > 0) { this.hashService.setHashIterations(this.hashIterations); } }
[ "void", "init", "(", ")", "throws", "Throwable", "{", "if", "(", "this", ".", "digestAlgorithmName", "!=", "null", ")", "{", "this", ".", "hashService", ".", "setHashAlgorithmName", "(", "this", ".", "digestAlgorithmName", ")", ";", "}", "if", "(", "this",...
This method is only intended to be called by the infrastructure code managing instances of this class once during initialization of this instance
[ "This", "method", "is", "only", "intended", "to", "be", "called", "by", "the", "infrastructure", "code", "managing", "instances", "of", "this", "class", "once", "during", "initialization", "of", "this", "instance" ]
9af2d4896e02d30622acec638539bfc41f45e480
https://github.com/Unicon/cas-addons/blob/9af2d4896e02d30622acec638539bfc41f45e480/src/main/java/net/unicon/cas/addons/authentication/handler/ShiroHashServicePasswordEncoder.java#L68-L75
36,430
bbottema/outlook-message-parser
src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java
OutlookMessageParser.parseMsg
public OutlookMessage parseMsg(@Nonnull final InputStream msgFileStream) throws IOException { // the .msg file, like a file system, contains directories and documents within this directories // we now gain access to the root node and recursively go through the complete 'filesystem'. final OutlookMessage msg = ...
java
public OutlookMessage parseMsg(@Nonnull final InputStream msgFileStream) throws IOException { // the .msg file, like a file system, contains directories and documents within this directories // we now gain access to the root node and recursively go through the complete 'filesystem'. final OutlookMessage msg = ...
[ "public", "OutlookMessage", "parseMsg", "(", "@", "Nonnull", "final", "InputStream", "msgFileStream", ")", "throws", "IOException", "{", "// the .msg file, like a file system, contains directories and documents within this directories", "// we now gain access to the root node and recursi...
Parses a .msg file provided by an input stream. @param msgFileStream The .msg file as a InputStream. @return A {@link OutlookMessage} object representing the .msg file. @throws IOException Thrown if the file could not be loaded or parsed.
[ "Parses", "a", ".", "msg", "file", "provided", "by", "an", "input", "stream", "." ]
ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e
https://github.com/bbottema/outlook-message-parser/blob/ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e/src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java#L97-L109
36,431
bbottema/outlook-message-parser
src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java
OutlookMessageParser.getBytesFromStream
private byte[] getBytesFromStream(final InputStream dstream) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final byte[] buffer = new byte[1024]; int read; while ((read = dstream.read(buffer)) > 0) { baos.write(buffer, 0, read); } return baos.toByteArray(); }
java
private byte[] getBytesFromStream(final InputStream dstream) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final byte[] buffer = new byte[1024]; int read; while ((read = dstream.read(buffer)) > 0) { baos.write(buffer, 0, read); } return baos.toByteArray(); }
[ "private", "byte", "[", "]", "getBytesFromStream", "(", "final", "InputStream", "dstream", ")", "throws", "IOException", "{", "final", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "final", "byte", "[", "]", "buffer", "=", ...
Reads the bytes from the stream to a byte array. @param dstream The stream to be read from. @return An array of bytes. @throws IOException If the stream cannot be read properly.
[ "Reads", "the", "bytes", "from", "the", "stream", "to", "a", "byte", "array", "." ]
ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e
https://github.com/bbottema/outlook-message-parser/blob/ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e/src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java#L491-L500
36,432
bbottema/outlook-message-parser
src/main/java/org/simplejavamail/outlookmessageparser/model/OutlookFileAttachment.java
OutlookFileAttachment.setProperty
public void setProperty(final OutlookMessageProperty msgProp) { final String name = msgProp.getClazz(); final Object value = msgProp.getData(); if (name != null && value != null) { switch (name) { case "3701": setSize(msgProp.getSize()); setData((byte[]) value); break; case "3704": ...
java
public void setProperty(final OutlookMessageProperty msgProp) { final String name = msgProp.getClazz(); final Object value = msgProp.getData(); if (name != null && value != null) { switch (name) { case "3701": setSize(msgProp.getSize()); setData((byte[]) value); break; case "3704": ...
[ "public", "void", "setProperty", "(", "final", "OutlookMessageProperty", "msgProp", ")", "{", "final", "String", "name", "=", "msgProp", ".", "getClazz", "(", ")", ";", "final", "Object", "value", "=", "msgProp", ".", "getData", "(", ")", ";", "if", "(", ...
Sets the property specified by the name parameter. Unknown names are ignored.
[ "Sets", "the", "property", "specified", "by", "the", "name", "parameter", ".", "Unknown", "names", "are", "ignored", "." ]
ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e
https://github.com/bbottema/outlook-message-parser/blob/ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e/src/main/java/org/simplejavamail/outlookmessageparser/model/OutlookFileAttachment.java#L39-L65
36,433
WASdev/tool.accelerate.core
liberty-starter-common/src/main/java/com/ibm/liberty/starter/service/common/api/v1/ProviderEndpoint.java
ProviderEndpoint.getStringResource
private String getStringResource(String path) { InputStream in = getClass().getResourceAsStream(path); StringBuilder index = new StringBuilder(); char[] buffer = new char[1024]; int read = 0; try(InputStreamReader reader = new InputStreamReader(in)){ while((read = reader.read(buffer...
java
private String getStringResource(String path) { InputStream in = getClass().getResourceAsStream(path); StringBuilder index = new StringBuilder(); char[] buffer = new char[1024]; int read = 0; try(InputStreamReader reader = new InputStreamReader(in)){ while((read = reader.read(buffer...
[ "private", "String", "getStringResource", "(", "String", "path", ")", "{", "InputStream", "in", "=", "getClass", "(", ")", ".", "getResourceAsStream", "(", "path", ")", ";", "StringBuilder", "index", "=", "new", "StringBuilder", "(", ")", ";", "char", "[", ...
read the description contained in the index.html file
[ "read", "the", "description", "contained", "in", "the", "index", ".", "html", "file" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-common/src/main/java/com/ibm/liberty/starter/service/common/api/v1/ProviderEndpoint.java#L46-L61
36,434
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/ServiceConnector.java
ServiceConnector.getServiceObjectFromId
public Service getServiceObjectFromId(String id) { log.fine("Return service object for " + id); Service service = null; for (Service s : services.getServices()) { if (id.equals(s.getId())) { return s; } } return service; }
java
public Service getServiceObjectFromId(String id) { log.fine("Return service object for " + id); Service service = null; for (Service s : services.getServices()) { if (id.equals(s.getId())) { return s; } } return service; }
[ "public", "Service", "getServiceObjectFromId", "(", "String", "id", ")", "{", "log", ".", "fine", "(", "\"Return service object for \"", "+", "id", ")", ";", "Service", "service", "=", "null", ";", "for", "(", "Service", "s", ":", "services", ".", "getServic...
Returns the service object associated with the given id
[ "Returns", "the", "service", "object", "associated", "with", "the", "given", "id" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/ServiceConnector.java#L72-L81
36,435
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/GitHubConnector.java
GitHubConnector.createGitRepository
public File createGitRepository(String repositoryName) throws IOException { RepositoryService service = new RepositoryService(); service.getClient().setOAuth2Token(oAuthToken); Repository repository = new Repository(); repository.setName(repositoryName); repository = service.crea...
java
public File createGitRepository(String repositoryName) throws IOException { RepositoryService service = new RepositoryService(); service.getClient().setOAuth2Token(oAuthToken); Repository repository = new Repository(); repository.setName(repositoryName); repository = service.crea...
[ "public", "File", "createGitRepository", "(", "String", "repositoryName", ")", "throws", "IOException", "{", "RepositoryService", "service", "=", "new", "RepositoryService", "(", ")", ";", "service", ".", "getClient", "(", ")", ".", "setOAuth2Token", "(", "oAuthTo...
Creates a repository on GitHub and in a local temporary directory. This is a one time operation as once it is created on GitHub and locally it cannot be recreated.
[ "Creates", "a", "repository", "on", "GitHub", "and", "in", "a", "local", "temporary", "directory", ".", "This", "is", "a", "one", "time", "operation", "as", "once", "it", "is", "created", "on", "GitHub", "and", "locally", "it", "cannot", "be", "recreated",...
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/GitHubConnector.java#L52-L70
36,436
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.hasChildNode
public static boolean hasChildNode(Node parentNode, String nodeName){ return getChildNode(parentNode, nodeName, null) != null ? true : false; }
java
public static boolean hasChildNode(Node parentNode, String nodeName){ return getChildNode(parentNode, nodeName, null) != null ? true : false; }
[ "public", "static", "boolean", "hasChildNode", "(", "Node", "parentNode", ",", "String", "nodeName", ")", "{", "return", "getChildNode", "(", "parentNode", ",", "nodeName", ",", "null", ")", "!=", "null", "?", "true", ":", "false", ";", "}" ]
Determine if the parent node contains a child node with matching name @param parentNode - the parent node @param nodeName - name of child node to match @return boolean value to indicate whether the parent node contains matching child node
[ "Determine", "if", "the", "parent", "node", "contains", "a", "child", "node", "with", "matching", "name" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L39-L41
36,437
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.getChildNode
public static Node getChildNode(Node parentNode, String name, String value){ List<Node> matchingChildren = getChildren(parentNode, name, value); return (matchingChildren.size() > 0) ? matchingChildren.get(0) : null; }
java
public static Node getChildNode(Node parentNode, String name, String value){ List<Node> matchingChildren = getChildren(parentNode, name, value); return (matchingChildren.size() > 0) ? matchingChildren.get(0) : null; }
[ "public", "static", "Node", "getChildNode", "(", "Node", "parentNode", ",", "String", "name", ",", "String", "value", ")", "{", "List", "<", "Node", ">", "matchingChildren", "=", "getChildren", "(", "parentNode", ",", "name", ",", "value", ")", ";", "retur...
Get the matching child node @param parentNode - the parent node @param name - name of child node to match @param value - value of child node to match, specify null to not match value @return the child node if a match was found, null otherwise
[ "Get", "the", "matching", "child", "node" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L50-L53
36,438
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.getGrandchildNode
public static Node getGrandchildNode(Node parentNode, String childNodeName, String grandChildNodeName, String grandChildNodeValue){ List<Node> matchingChildren = getChildren(parentNode, childNodeName, null); for(Node child : matchingChildren){ Node matchingGrandCh...
java
public static Node getGrandchildNode(Node parentNode, String childNodeName, String grandChildNodeName, String grandChildNodeValue){ List<Node> matchingChildren = getChildren(parentNode, childNodeName, null); for(Node child : matchingChildren){ Node matchingGrandCh...
[ "public", "static", "Node", "getGrandchildNode", "(", "Node", "parentNode", ",", "String", "childNodeName", ",", "String", "grandChildNodeName", ",", "String", "grandChildNodeValue", ")", "{", "List", "<", "Node", ">", "matchingChildren", "=", "getChildren", "(", ...
Get the matching grand child node @param parentNode - the parent node @param childNodeName - name of child node to match @param grandChildNodeName - name of grand child node to match @param grandChildNodeValue - value of grand child node to match @return the grand child node if a match was found, null otherwise
[ "Get", "the", "matching", "grand", "child", "node" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L63-L72
36,439
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.getChildren
private static List<Node> getChildren(Node parentNode, String name, String value){ List<Node> childNodes = new ArrayList<Node>(); if(parentNode == null || name == null){ return childNodes; } if (parentNode.getNodeType() == Node.ELE...
java
private static List<Node> getChildren(Node parentNode, String name, String value){ List<Node> childNodes = new ArrayList<Node>(); if(parentNode == null || name == null){ return childNodes; } if (parentNode.getNodeType() == Node.ELE...
[ "private", "static", "List", "<", "Node", ">", "getChildren", "(", "Node", "parentNode", ",", "String", "name", ",", "String", "value", ")", "{", "List", "<", "Node", ">", "childNodes", "=", "new", "ArrayList", "<", "Node", ">", "(", ")", ";", "if", ...
Get all matching child nodes @param parentNode - the parent node @param name - name of child node to match @param value - value of child node to match, specify null to not match value @return matching child nodes
[ "Get", "all", "matching", "child", "nodes" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L81-L98
36,440
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.addChildNode
public static Node addChildNode(Document doc, Node parentNode, String childName, String childValue){ if(doc == null || parentNode == null || childName == null){ return null; } Node childNode = doc.createElement(childName); if(childV...
java
public static Node addChildNode(Document doc, Node parentNode, String childName, String childValue){ if(doc == null || parentNode == null || childName == null){ return null; } Node childNode = doc.createElement(childName); if(childV...
[ "public", "static", "Node", "addChildNode", "(", "Document", "doc", ",", "Node", "parentNode", ",", "String", "childName", ",", "String", "childValue", ")", "{", "if", "(", "doc", "==", "null", "||", "parentNode", "==", "null", "||", "childName", "==", "nu...
Add a child node @param parentNode - the parent node @param childName - name of child node to create @param childValue - value of child node @return the child node
[ "Add", "a", "child", "node" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L107-L117
36,441
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.findOrAddChildNode
public static Node findOrAddChildNode(Document doc, Node parentNode, String childName, String childValue){ Node matchingChild = getChildNode(parentNode, childName, childValue); return matchingChild != null ? matchingChild : addChildNode(doc, parentNode, childName, childValue); }
java
public static Node findOrAddChildNode(Document doc, Node parentNode, String childName, String childValue){ Node matchingChild = getChildNode(parentNode, childName, childValue); return matchingChild != null ? matchingChild : addChildNode(doc, parentNode, childName, childValue); }
[ "public", "static", "Node", "findOrAddChildNode", "(", "Document", "doc", ",", "Node", "parentNode", ",", "String", "childName", ",", "String", "childValue", ")", "{", "Node", "matchingChild", "=", "getChildNode", "(", "parentNode", ",", "childName", ",", "child...
Get the matching child node. Create a node if it doens't already exist @param parentNode - the parent node @param childName - name of child node to match @param childValue - value of child node to match, specify null to not match value @return the child node
[ "Get", "the", "matching", "child", "node", ".", "Create", "a", "node", "if", "it", "doens", "t", "already", "exist" ]
6511da654a69a25a76573eb76eefff349d9c4d80
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L126-L129
36,442
conductor-framework/conductor
src/main/java/io/ddavison/conductor/Locomotive.java
Locomotive.waitForElement
public WebElement waitForElement(By by) { int attempts = 0; int size = driver.findElements(by).size(); while (size == 0) { size = driver.findElements(by).size(); if (attempts == MAX_ATTEMPTS) fail(String.format("Could not find %s after %d seconds", ...
java
public WebElement waitForElement(By by) { int attempts = 0; int size = driver.findElements(by).size(); while (size == 0) { size = driver.findElements(by).size(); if (attempts == MAX_ATTEMPTS) fail(String.format("Could not find %s after %d seconds", ...
[ "public", "WebElement", "waitForElement", "(", "By", "by", ")", "{", "int", "attempts", "=", "0", ";", "int", "size", "=", "driver", ".", "findElements", "(", "by", ")", ".", "size", "(", ")", ";", "while", "(", "size", "==", "0", ")", "{", "size",...
Method that acts as an arbiter of implicit timeouts of sorts.. sort of like a Wait For Ajax method.
[ "Method", "that", "acts", "as", "an", "arbiter", "of", "implicit", "timeouts", "of", "sorts", "..", "sort", "of", "like", "a", "Wait", "For", "Ajax", "method", "." ]
fc9843cfd633c358ce4f0708672c0081e6ef3e22
https://github.com/conductor-framework/conductor/blob/fc9843cfd633c358ce4f0708672c0081e6ef3e22/src/main/java/io/ddavison/conductor/Locomotive.java#L269-L290
36,443
conductor-framework/conductor
src/main/java/io/ddavison/conductor/LocomotiveConfig.java
LocomotiveConfig.url
@Override public String url() { String url = ""; if (!StringUtils.isEmpty(baseUrl())) { url = baseUrl() + path(); } else { if (!StringUtils.isEmpty(properties.getProperty(Constants.DEFAULT_PROPERTY_URL))) { url = properties.getProperty(Constants.DEFAUL...
java
@Override public String url() { String url = ""; if (!StringUtils.isEmpty(baseUrl())) { url = baseUrl() + path(); } else { if (!StringUtils.isEmpty(properties.getProperty(Constants.DEFAULT_PROPERTY_URL))) { url = properties.getProperty(Constants.DEFAUL...
[ "@", "Override", "public", "String", "url", "(", ")", "{", "String", "url", "=", "\"\"", ";", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "baseUrl", "(", ")", ")", ")", "{", "url", "=", "baseUrl", "(", ")", "+", "path", "(", ")", ";", "...
Url that automated tests will be testing. @return If a base url is provided it'll return the base url + path, otherwise it'll fallback to the normal url params.
[ "Url", "that", "automated", "tests", "will", "be", "testing", "." ]
fc9843cfd633c358ce4f0708672c0081e6ef3e22
https://github.com/conductor-framework/conductor/blob/fc9843cfd633c358ce4f0708672c0081e6ef3e22/src/main/java/io/ddavison/conductor/LocomotiveConfig.java#L34-L51
36,444
LinkedDataFragments/Server.Java
src/main/java/org/linkeddatafragments/datasource/DataSourceFactory.java
DataSourceFactory.create
public static IDataSource create(JsonObject config) throws DataSourceCreationException { String title = config.getAsJsonPrimitive("title").getAsString(); String description = config.getAsJsonPrimitive("description").getAsString(); String typeName = config.getAsJsonPrimitive("type").getAsString()...
java
public static IDataSource create(JsonObject config) throws DataSourceCreationException { String title = config.getAsJsonPrimitive("title").getAsString(); String description = config.getAsJsonPrimitive("description").getAsString(); String typeName = config.getAsJsonPrimitive("type").getAsString()...
[ "public", "static", "IDataSource", "create", "(", "JsonObject", "config", ")", "throws", "DataSourceCreationException", "{", "String", "title", "=", "config", ".", "getAsJsonPrimitive", "(", "\"title\"", ")", ".", "getAsString", "(", ")", ";", "String", "descripti...
Create a datasource using a JSON config @param config @return datasource interface @throws DataSourceCreationException
[ "Create", "a", "datasource", "using", "a", "JSON", "config" ]
15f72a0675cb761a986f0d0d40b36a83dd482b1e
https://github.com/LinkedDataFragments/Server.Java/blob/15f72a0675cb761a986f0d0d40b36a83dd482b1e/src/main/java/org/linkeddatafragments/datasource/DataSourceFactory.java#L21-L33
36,445
LinkedDataFragments/Server.Java
src/main/java/org/linkeddatafragments/servlet/LinkedDataFragmentServlet.java
LinkedDataFragmentServlet.getDataSource
private IDataSource getDataSource(HttpServletRequest request) throws DataSourceNotFoundException { String contextPath = request.getContextPath(); String requestURI = request.getRequestURI(); String path = contextPath == null ? requestURI : requestURI.substring(co...
java
private IDataSource getDataSource(HttpServletRequest request) throws DataSourceNotFoundException { String contextPath = request.getContextPath(); String requestURI = request.getRequestURI(); String path = contextPath == null ? requestURI : requestURI.substring(co...
[ "private", "IDataSource", "getDataSource", "(", "HttpServletRequest", "request", ")", "throws", "DataSourceNotFoundException", "{", "String", "contextPath", "=", "request", ".", "getContextPath", "(", ")", ";", "String", "requestURI", "=", "request", ".", "getRequestU...
Get the datasource @param request @return @throws IOException
[ "Get", "the", "datasource" ]
15f72a0675cb761a986f0d0d40b36a83dd482b1e
https://github.com/LinkedDataFragments/Server.Java/blob/15f72a0675cb761a986f0d0d40b36a83dd482b1e/src/main/java/org/linkeddatafragments/servlet/LinkedDataFragmentServlet.java#L132-L151
36,446
LinkedDataFragments/Server.Java
src/main/java/org/linkeddatafragments/fragments/LinkedDataFragmentBase.java
LinkedDataFragmentBase.addMetadata
public void addMetadata( final Model model ) { final Resource datasetId = model.createResource( getDatasetURI() ); final Resource fragmentId = model.createResource( fragmentURL ); datasetId.addProperty( CommonResources.RDF_TYPE, CommonResources.VOID_DATASET ); datasetId.addProperty(...
java
public void addMetadata( final Model model ) { final Resource datasetId = model.createResource( getDatasetURI() ); final Resource fragmentId = model.createResource( fragmentURL ); datasetId.addProperty( CommonResources.RDF_TYPE, CommonResources.VOID_DATASET ); datasetId.addProperty(...
[ "public", "void", "addMetadata", "(", "final", "Model", "model", ")", "{", "final", "Resource", "datasetId", "=", "model", ".", "createResource", "(", "getDatasetURI", "(", ")", ")", ";", "final", "Resource", "fragmentId", "=", "model", ".", "createResource", ...
Adds some basic metadata to the given RDF model. This method may be overridden in subclasses. @param model
[ "Adds", "some", "basic", "metadata", "to", "the", "given", "RDF", "model", ".", "This", "method", "may", "be", "overridden", "in", "subclasses", "." ]
15f72a0675cb761a986f0d0d40b36a83dd482b1e
https://github.com/LinkedDataFragments/Server.Java/blob/15f72a0675cb761a986f0d0d40b36a83dd482b1e/src/main/java/org/linkeddatafragments/fragments/LinkedDataFragmentBase.java#L121-L135
36,447
LinkedDataFragments/Server.Java
src/main/java/org/linkeddatafragments/fragments/LinkedDataFragmentBase.java
LinkedDataFragmentBase.addControls
public void addControls( final Model model ) { final URIBuilder pagedURL; try { pagedURL = new URIBuilder( fragmentURL ); } catch ( URISyntaxException e ) { throw new IllegalArgumentException( e ); } final Resource fragmentId = model.createRes...
java
public void addControls( final Model model ) { final URIBuilder pagedURL; try { pagedURL = new URIBuilder( fragmentURL ); } catch ( URISyntaxException e ) { throw new IllegalArgumentException( e ); } final Resource fragmentId = model.createRes...
[ "public", "void", "addControls", "(", "final", "Model", "model", ")", "{", "final", "URIBuilder", "pagedURL", ";", "try", "{", "pagedURL", "=", "new", "URIBuilder", "(", "fragmentURL", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "thro...
Adds an RDF description of page links to the given RDF model. This method may be overridden in subclasses. @param model
[ "Adds", "an", "RDF", "description", "of", "page", "links", "to", "the", "given", "RDF", "model", ".", "This", "method", "may", "be", "overridden", "in", "subclasses", "." ]
15f72a0675cb761a986f0d0d40b36a83dd482b1e
https://github.com/LinkedDataFragments/Server.Java/blob/15f72a0675cb761a986f0d0d40b36a83dd482b1e/src/main/java/org/linkeddatafragments/fragments/LinkedDataFragmentBase.java#L142-L180
36,448
LinkedDataFragments/Server.Java
src/main/java/org/linkeddatafragments/datasource/hdt/HdtBasedRequestProcessorForTPFs.java
HdtBasedRequestProcessorForTPFs.toTriple
private Triple toTriple(TripleID tripleId) { return new Triple( dictionary.getNode(tripleId.getSubject(), TripleComponentRole.SUBJECT), dictionary.getNode(tripleId.getPredicate(), TripleComponentRole.PREDICATE), dictionary.getNode(tripleId.getObject(), TripleComponentRole.OBJ...
java
private Triple toTriple(TripleID tripleId) { return new Triple( dictionary.getNode(tripleId.getSubject(), TripleComponentRole.SUBJECT), dictionary.getNode(tripleId.getPredicate(), TripleComponentRole.PREDICATE), dictionary.getNode(tripleId.getObject(), TripleComponentRole.OBJ...
[ "private", "Triple", "toTriple", "(", "TripleID", "tripleId", ")", "{", "return", "new", "Triple", "(", "dictionary", ".", "getNode", "(", "tripleId", ".", "getSubject", "(", ")", ",", "TripleComponentRole", ".", "SUBJECT", ")", ",", "dictionary", ".", "getN...
Converts the HDT triple to a Jena Triple. @param tripleId the HDT triple @return the Jena triple
[ "Converts", "the", "HDT", "triple", "to", "a", "Jena", "Triple", "." ]
15f72a0675cb761a986f0d0d40b36a83dd482b1e
https://github.com/LinkedDataFragments/Server.Java/blob/15f72a0675cb761a986f0d0d40b36a83dd482b1e/src/main/java/org/linkeddatafragments/datasource/hdt/HdtBasedRequestProcessorForTPFs.java#L172-L178
36,449
dadoonet/testcontainers-java-module-elasticsearch
src/main/java/fr/pilato/elasticsearch/containers/ElasticsearchContainer.java
ElasticsearchContainer.withSecureSetting
public ElasticsearchContainer withSecureSetting(String key, String value) { securedKeys.put(key, value); return this; }
java
public ElasticsearchContainer withSecureSetting(String key, String value) { securedKeys.put(key, value); return this; }
[ "public", "ElasticsearchContainer", "withSecureSetting", "(", "String", "key", ",", "String", "value", ")", "{", "securedKeys", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Define the elasticsearch docker registry base url @param key Key @param value Value @return this
[ "Define", "the", "elasticsearch", "docker", "registry", "base", "url" ]
780eec66c2999a1e4814f039b2a4559d6a5da408
https://github.com/dadoonet/testcontainers-java-module-elasticsearch/blob/780eec66c2999a1e4814f039b2a4559d6a5da408/src/main/java/fr/pilato/elasticsearch/containers/ElasticsearchContainer.java#L93-L96
36,450
dadoonet/testcontainers-java-module-elasticsearch
src/main/java/fr/pilato/elasticsearch/containers/ElasticsearchContainer.java
ElasticsearchContainer.withPluginDir
public ElasticsearchContainer withPluginDir(Path pluginDir) { if (pluginDir == null) { return this; } // When we have a plugin dir, we need to mount it in the docker instance this.pluginDir = createVolumeDirectory(true); // We create the volume that will be needed f...
java
public ElasticsearchContainer withPluginDir(Path pluginDir) { if (pluginDir == null) { return this; } // When we have a plugin dir, we need to mount it in the docker instance this.pluginDir = createVolumeDirectory(true); // We create the volume that will be needed f...
[ "public", "ElasticsearchContainer", "withPluginDir", "(", "Path", "pluginDir", ")", "{", "if", "(", "pluginDir", "==", "null", ")", "{", "return", "this", ";", "}", "// When we have a plugin dir, we need to mount it in the docker instance", "this", ".", "pluginDir", "="...
Path to plugin dir which contains plugins that needs to be installed @param pluginDir plugins dir @return this
[ "Path", "to", "plugin", "dir", "which", "contains", "plugins", "that", "needs", "to", "be", "installed" ]
780eec66c2999a1e4814f039b2a4559d6a5da408
https://github.com/dadoonet/testcontainers-java-module-elasticsearch/blob/780eec66c2999a1e4814f039b2a4559d6a5da408/src/main/java/fr/pilato/elasticsearch/containers/ElasticsearchContainer.java#L113-L142
36,451
rtyley/android-screenshot-lib
paparazzo/src/main/java/com/github/rtyley/android/screenshot/paparazzo/OnDemandScreenshotService.java
OnDemandScreenshotService.start
public void start() { Thread thread = new Thread(new LogCatCommandExecutor()); thread.setName(getClass().getSimpleName() + " logcat for " + device.getSerialNumber()); thread.start(); try { sleep(500); // ignore old output that logcat feeds us } catch (InterruptedExce...
java
public void start() { Thread thread = new Thread(new LogCatCommandExecutor()); thread.setName(getClass().getSimpleName() + " logcat for " + device.getSerialNumber()); thread.start(); try { sleep(500); // ignore old output that logcat feeds us } catch (InterruptedExce...
[ "public", "void", "start", "(", ")", "{", "Thread", "thread", "=", "new", "Thread", "(", "new", "LogCatCommandExecutor", "(", ")", ")", ";", "thread", ".", "setName", "(", "getClass", "(", ")", ".", "getSimpleName", "(", ")", "+", "\" logcat for \"", "+"...
Start receiving and acting on paparazzo requests from the device.
[ "Start", "receiving", "and", "acting", "on", "paparazzo", "requests", "from", "the", "device", "." ]
8714d37ca3e62716953032cf8e55657bc2ed211b
https://github.com/rtyley/android-screenshot-lib/blob/8714d37ca3e62716953032cf8e55657bc2ed211b/paparazzo/src/main/java/com/github/rtyley/android/screenshot/paparazzo/OnDemandScreenshotService.java#L33-L44
36,452
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/css/RGBColor.java
RGBColor.rgb
public static RGBColor rgb(int r, int g, int b) { return new RGBColor(makeRgb(r, g, b)); }
java
public static RGBColor rgb(int r, int g, int b) { return new RGBColor(makeRgb(r, g, b)); }
[ "public", "static", "RGBColor", "rgb", "(", "int", "r", ",", "int", "g", ",", "int", "b", ")", "{", "return", "new", "RGBColor", "(", "makeRgb", "(", "r", ",", "g", ",", "b", ")", ")", ";", "}" ]
RGB color as r,g,b triple.
[ "RGB", "color", "as", "r", "g", "b", "triple", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/css/RGBColor.java#L70-L72
36,453
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
DocumentStyleImpl.cur
public double cur(Element elem, String prop, boolean force) { if (JsUtils.isWindow(elem)) { if ("width".equals(prop)) { return getContentDocument(elem).getClientWidth(); } if ("height".equals(prop)) { return getContentDocument(elem).getClientHeight(); } elem = GQuery.bo...
java
public double cur(Element elem, String prop, boolean force) { if (JsUtils.isWindow(elem)) { if ("width".equals(prop)) { return getContentDocument(elem).getClientWidth(); } if ("height".equals(prop)) { return getContentDocument(elem).getClientHeight(); } elem = GQuery.bo...
[ "public", "double", "cur", "(", "Element", "elem", ",", "String", "prop", ",", "boolean", "force", ")", "{", "if", "(", "JsUtils", ".", "isWindow", "(", "elem", ")", ")", "{", "if", "(", "\"width\"", ".", "equals", "(", "prop", ")", ")", "{", "retu...
Returns the numeric value of a css property. The parameter force has a special meaning: - When force is false, returns the value of the css property defined in the set of style attributes. - Otherwise it returns the real computed value.
[ "Returns", "the", "numeric", "value", "of", "a", "css", "property", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java#L46-L77
36,454
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
DocumentStyleImpl.curCSS
public String curCSS(Element elem, String name, boolean force) { if (elem == null) { return ""; } name = fixPropertyName(name); // value defined in the element style String ret = elem.getStyle().getProperty(name); if (force) { Element toDetach = null; if (JsUtils.isDetached(e...
java
public String curCSS(Element elem, String name, boolean force) { if (elem == null) { return ""; } name = fixPropertyName(name); // value defined in the element style String ret = elem.getStyle().getProperty(name); if (force) { Element toDetach = null; if (JsUtils.isDetached(e...
[ "public", "String", "curCSS", "(", "Element", "elem", ",", "String", "name", ",", "boolean", "force", ")", "{", "if", "(", "elem", "==", "null", ")", "{", "return", "\"\"", ";", "}", "name", "=", "fixPropertyName", "(", "name", ")", ";", "// value defi...
Return the string value of a css property of an element. The parameter force has a special meaning: - When force is false, returns the value of the css property defined in the set of style attributes. - Otherwise it returns the real computed value. For instance if you do not define 'display=none' in the element style...
[ "Return", "the", "string", "value", "of", "a", "css", "property", "of", "an", "element", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java#L91-L122
36,455
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
DocumentStyleImpl.fixInlineElement
private void fixInlineElement(Element e) { if (e.getClientHeight() == 0 && e.getClientWidth() == 0 && "inline".equals(curCSS(e, "display", true))) { setStyleProperty(e, "display", "inline-block"); setStyleProperty(e, "width", "auto"); setStyleProperty(e, "height", "auto"); } }
java
private void fixInlineElement(Element e) { if (e.getClientHeight() == 0 && e.getClientWidth() == 0 && "inline".equals(curCSS(e, "display", true))) { setStyleProperty(e, "display", "inline-block"); setStyleProperty(e, "width", "auto"); setStyleProperty(e, "height", "auto"); } }
[ "private", "void", "fixInlineElement", "(", "Element", "e", ")", "{", "if", "(", "e", ".", "getClientHeight", "(", ")", "==", "0", "&&", "e", ".", "getClientWidth", "(", ")", "==", "0", "&&", "\"inline\"", ".", "equals", "(", "curCSS", "(", "e", ",",...
inline elements do not have width nor height unless we set it to inline-block
[ "inline", "elements", "do", "not", "have", "width", "nor", "height", "unless", "we", "set", "it", "to", "inline", "-", "block" ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java#L170-L177
36,456
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
DocumentStyleImpl.setStyleProperty
public void setStyleProperty(Element e, String prop, String val) { if (e == null || prop == null) { return; } prop = fixPropertyName(prop); // put it in lower-case only when all letters are upper-case, to avoid // modifying already camelized properties if (prop.matches("^[A-Z]+$")) { ...
java
public void setStyleProperty(Element e, String prop, String val) { if (e == null || prop == null) { return; } prop = fixPropertyName(prop); // put it in lower-case only when all letters are upper-case, to avoid // modifying already camelized properties if (prop.matches("^[A-Z]+$")) { ...
[ "public", "void", "setStyleProperty", "(", "Element", "e", ",", "String", "prop", ",", "String", "val", ")", "{", "if", "(", "e", "==", "null", "||", "prop", "==", "null", ")", "{", "return", ";", "}", "prop", "=", "fixPropertyName", "(", "prop", ")"...
Set the value of a style property of an element.
[ "Set", "the", "value", "of", "a", "style", "property", "of", "an", "element", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java#L236-L255
36,457
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
DocumentStyleImpl.defaultDisplay
public String defaultDisplay(String tagName) { String ret = elemdisplay.get(tagName); if (ret == null) { Element e = DOM.createElement(tagName); Document.get().getBody().appendChild(e); ret = curCSS(e, "display", false); e.removeFromParent(); if (ret == null || ret.matches("(|none)...
java
public String defaultDisplay(String tagName) { String ret = elemdisplay.get(tagName); if (ret == null) { Element e = DOM.createElement(tagName); Document.get().getBody().appendChild(e); ret = curCSS(e, "display", false); e.removeFromParent(); if (ret == null || ret.matches("(|none)...
[ "public", "String", "defaultDisplay", "(", "String", "tagName", ")", "{", "String", "ret", "=", "elemdisplay", ".", "get", "(", "tagName", ")", ";", "if", "(", "ret", "==", "null", ")", "{", "Element", "e", "=", "DOM", ".", "createElement", "(", "tagNa...
Returns the default display value for each html tag.
[ "Returns", "the", "default", "display", "value", "for", "each", "html", "tag", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java#L270-L283
36,458
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/model/BatchResponse.java
BatchResponse.setItems
public void setItems(java.util.Collection<java.util.Map<String,AttributeValue>> items) { if (items == null) { this.items = null; return; } java.util.List<java.util.Map<String,AttributeValue>> itemsCopy = new java.util.ArrayList<java.util.Map<String,AttributeValue>>(items...
java
public void setItems(java.util.Collection<java.util.Map<String,AttributeValue>> items) { if (items == null) { this.items = null; return; } java.util.List<java.util.Map<String,AttributeValue>> itemsCopy = new java.util.ArrayList<java.util.Map<String,AttributeValue>>(items...
[ "public", "void", "setItems", "(", "java", ".", "util", ".", "Collection", "<", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", ">", "items", ")", "{", "if", "(", "items", "==", "null", ")", "{", "this", ".", "items", "=...
Sets the value of the Items property for this object. @param items The new value for the Items property for this object.
[ "Sets", "the", "value", "of", "the", "Items", "property", "for", "this", "object", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/model/BatchResponse.java#L55-L64
36,459
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
Effects.queueAnimation
public void queueAnimation(final GQAnimation anim, final int duration) { if (isOff()) { anim.onStart(); anim.onComplete(); } else { queue(anim.e, DEFAULT_NAME, new Function() { public void cancel(Element e) { Animation anim = (Animation) data(e, GQAnimation.ACTUAL_ANIMATION, ...
java
public void queueAnimation(final GQAnimation anim, final int duration) { if (isOff()) { anim.onStart(); anim.onComplete(); } else { queue(anim.e, DEFAULT_NAME, new Function() { public void cancel(Element e) { Animation anim = (Animation) data(e, GQAnimation.ACTUAL_ANIMATION, ...
[ "public", "void", "queueAnimation", "(", "final", "GQAnimation", "anim", ",", "final", "int", "duration", ")", "{", "if", "(", "isOff", "(", ")", ")", "{", "anim", ".", "onStart", "(", ")", ";", "anim", ".", "onComplete", "(", ")", ";", "}", "else", ...
Queue an animation for an element. The goal of this method is to reuse animations. @param e @param anim @param duration
[ "Queue", "an", "animation", "for", "an", "element", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java#L122-L140
36,460
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
Effects.vendorProperty
public static String vendorProperty(String prop) { return vendorPropNames.get(prop) != null ? vendorPropNames.get(prop) : prop; }
java
public static String vendorProperty(String prop) { return vendorPropNames.get(prop) != null ? vendorPropNames.get(prop) : prop; }
[ "public", "static", "String", "vendorProperty", "(", "String", "prop", ")", "{", "return", "vendorPropNames", ".", "get", "(", "prop", ")", "!=", "null", "?", "vendorPropNames", ".", "get", "(", "prop", ")", ":", "prop", ";", "}" ]
Get the cached vendor property name.
[ "Get", "the", "cached", "vendor", "property", "name", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java#L166-L168
36,461
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
Effects.slideToggle
public Effects slideToggle(Function... f) { return as(Effects).slideToggle(Speed.DEFAULT, f); }
java
public Effects slideToggle(Function... f) { return as(Effects).slideToggle(Speed.DEFAULT, f); }
[ "public", "Effects", "slideToggle", "(", "Function", "...", "f", ")", "{", "return", "as", "(", "Effects", ")", ".", "slideToggle", "(", "Speed", ".", "DEFAULT", ",", "f", ")", ";", "}" ]
Toggle the visibility of all matched elements by adjusting their height and firing an optional callback after completion. Only the height is adjusted for this animation, causing all matched elements to be hidden or shown in a "sliding" manner
[ "Toggle", "the", "visibility", "of", "all", "matched", "elements", "by", "adjusting", "their", "height", "and", "firing", "an", "optional", "callback", "after", "completion", ".", "Only", "the", "height", "is", "adjusted", "for", "this", "animation", "causing", ...
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java#L582-L584
36,462
ArcBees/gwtquery
samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java
GwtQueryBenchModule.initResultsTable
private void initResultsTable(DeferredSelector[] dg, Benchmark... benchs) { int numRows = dg.length; grid = new FlexTable(); grid.addStyleName("resultstable"); RootPanel.get("results").clear(); RootPanel.get("results").add(grid); grid.setText(0, 0, "Selector"); for (int i=0; i < benchs.leng...
java
private void initResultsTable(DeferredSelector[] dg, Benchmark... benchs) { int numRows = dg.length; grid = new FlexTable(); grid.addStyleName("resultstable"); RootPanel.get("results").clear(); RootPanel.get("results").add(grid); grid.setText(0, 0, "Selector"); for (int i=0; i < benchs.leng...
[ "private", "void", "initResultsTable", "(", "DeferredSelector", "[", "]", "dg", ",", "Benchmark", "...", "benchs", ")", "{", "int", "numRows", "=", "dg", ".", "length", ";", "grid", "=", "new", "FlexTable", "(", ")", ";", "grid", ".", "addStyleName", "("...
Reset the result table
[ "Reset", "the", "result", "table" ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java#L413-L431
36,463
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java
Callbacks.add
public Callbacks add(com.google.gwt.core.client.Callback<?, ?>... c) { addAll((Object[]) c); return this; }
java
public Callbacks add(com.google.gwt.core.client.Callback<?, ?>... c) { addAll((Object[]) c); return this; }
[ "public", "Callbacks", "add", "(", "com", ".", "google", ".", "gwt", ".", "core", ".", "client", ".", "Callback", "<", "?", ",", "?", ">", "...", "c", ")", "{", "addAll", "(", "(", "Object", "[", "]", ")", "c", ")", ";", "return", "this", ";", ...
Add a Callback or a collection of callbacks to a callback list.
[ "Add", "a", "Callback", "or", "a", "collection", "of", "callbacks", "to", "a", "callback", "list", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java#L76-L79
36,464
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java
Callbacks.fire
public Callbacks fire(Object... o) { if (!done) { done = isOnce; if (isMemory) { memory = new ArrayList<>(Arrays.asList(o)); } if (stack != null) for (Object c : stack) { if (!run(c, o) && stopOnFalse) { break; } } } return this...
java
public Callbacks fire(Object... o) { if (!done) { done = isOnce; if (isMemory) { memory = new ArrayList<>(Arrays.asList(o)); } if (stack != null) for (Object c : stack) { if (!run(c, o) && stopOnFalse) { break; } } } return this...
[ "public", "Callbacks", "fire", "(", "Object", "...", "o", ")", "{", "if", "(", "!", "done", ")", "{", "done", "=", "isOnce", ";", "if", "(", "isMemory", ")", "{", "memory", "=", "new", "ArrayList", "<>", "(", "Arrays", ".", "asList", "(", "o", ")...
Call all of the callbacks with the given arguments.
[ "Call", "all", "of", "the", "callbacks", "with", "the", "given", "arguments", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java#L112-L126
36,465
mboudreau/Alternator
src/main/java/com/michelboudreau/alternator/AlternatorDBHandler.java
AlternatorDBHandler.save
public synchronized void save(String persistence) { try { createObjectMapper().writeValue(new File(persistence), tableList); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } }
java
public synchronized void save(String persistence) { try { createObjectMapper().writeValue(new File(persistence), tableList); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } }
[ "public", "synchronized", "void", "save", "(", "String", "persistence", ")", "{", "try", "{", "createObjectMapper", "(", ")", ".", "writeValue", "(", "new", "File", "(", "persistence", ")", ",", "tableList", ")", ";", "}", "catch", "(", "IOException", "e",...
Maybe save automatically on destroy?
[ "Maybe", "save", "automatically", "on", "destroy?" ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/michelboudreau/alternator/AlternatorDBHandler.java#L129-L135
36,466
mboudreau/Alternator
src/main/java/com/michelboudreau/alternator/AlternatorDBHandler.java
AlternatorDBHandler.createObjectMapper
public ObjectMapper createObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY) .setVisibility(PropertyAccessor.CREATOR, JsonAutoDetect.Visibility.ANY) .setVisibility(PropertyAccessor.SETTER, JsonAutoDetect.Visibility.NONE) ...
java
public ObjectMapper createObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY) .setVisibility(PropertyAccessor.CREATOR, JsonAutoDetect.Visibility.ANY) .setVisibility(PropertyAccessor.SETTER, JsonAutoDetect.Visibility.NONE) ...
[ "public", "ObjectMapper", "createObjectMapper", "(", ")", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "mapper", ".", "setVisibility", "(", "PropertyAccessor", ".", "FIELD", ",", "JsonAutoDetect", ".", "Visibility", ".", "ANY", ")", ...
Not sure about this. If correct and only need one, only create one instance
[ "Not", "sure", "about", "this", ".", "If", "correct", "and", "only", "need", "one", "only", "create", "one", "instance" ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/michelboudreau/alternator/AlternatorDBHandler.java#L156-L167
36,467
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/model/AttributeValue.java
AttributeValue.setSS
public void setSS(java.util.Collection<String> sS) { if (sS == null) { this.sS = null; return; } java.util.List<String> sSCopy = new java.util.ArrayList<String>(sS.size()); sSCopy.addAll(sS); this.sS = sSCopy; }
java
public void setSS(java.util.Collection<String> sS) { if (sS == null) { this.sS = null; return; } java.util.List<String> sSCopy = new java.util.ArrayList<String>(sS.size()); sSCopy.addAll(sS); this.sS = sSCopy; }
[ "public", "void", "setSS", "(", "java", ".", "util", ".", "Collection", "<", "String", ">", "sS", ")", "{", "if", "(", "sS", "==", "null", ")", "{", "this", ".", "sS", "=", "null", ";", "return", ";", "}", "java", ".", "util", ".", "List", "<",...
A set of strings. @param sS A set of strings.
[ "A", "set", "of", "strings", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/model/AttributeValue.java#L243-L252
36,468
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/model/AttributeValue.java
AttributeValue.setNS
public void setNS(java.util.Collection<String> nS) { if (nS == null) { this.nS = null; return; } java.util.List<String> nSCopy = new java.util.ArrayList<String>(nS.size()); nSCopy.addAll(nS); this.nS = nSCopy; }
java
public void setNS(java.util.Collection<String> nS) { if (nS == null) { this.nS = null; return; } java.util.List<String> nSCopy = new java.util.ArrayList<String>(nS.size()); nSCopy.addAll(nS); this.nS = nSCopy; }
[ "public", "void", "setNS", "(", "java", ".", "util", ".", "Collection", "<", "String", ">", "nS", ")", "{", "if", "(", "nS", "==", "null", ")", "{", "this", ".", "nS", "=", "null", ";", "return", ";", "}", "java", ".", "util", ".", "List", "<",...
A set of numbers. @param nS A set of numbers.
[ "A", "set", "of", "numbers", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/model/AttributeValue.java#L309-L318
36,469
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/model/AttributeValue.java
AttributeValue.setBS
public void setBS(java.util.Collection<java.nio.ByteBuffer> bS) { if (bS == null) { this.bS = null; return; } java.util.List<java.nio.ByteBuffer> bSCopy = new java.util.ArrayList<java.nio.ByteBuffer>(bS.size()); bSCopy.addAll(bS); this.bS = bSCopy; }
java
public void setBS(java.util.Collection<java.nio.ByteBuffer> bS) { if (bS == null) { this.bS = null; return; } java.util.List<java.nio.ByteBuffer> bSCopy = new java.util.ArrayList<java.nio.ByteBuffer>(bS.size()); bSCopy.addAll(bS); this.bS = bSCopy; }
[ "public", "void", "setBS", "(", "java", ".", "util", ".", "Collection", "<", "java", ".", "nio", ".", "ByteBuffer", ">", "bS", ")", "{", "if", "(", "bS", "==", "null", ")", "{", "this", ".", "bS", "=", "null", ";", "return", ";", "}", "java", "...
A set of binary attributes. @param bS A set of binary attributes.
[ "A", "set", "of", "binary", "attributes", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/model/AttributeValue.java#L375-L384
36,470
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Deferred.java
Deferred.when
public static Promise when(Object... d) { int l = d.length; Promise[] p = new Promise[l]; for (int i = 0; i < l; i++) { p[i] = makePromise(d[i]); } return when(p); }
java
public static Promise when(Object... d) { int l = d.length; Promise[] p = new Promise[l]; for (int i = 0; i < l; i++) { p[i] = makePromise(d[i]); } return when(p); }
[ "public", "static", "Promise", "when", "(", "Object", "...", "d", ")", "{", "int", "l", "=", "d", ".", "length", ";", "Promise", "[", "]", "p", "=", "new", "Promise", "[", "l", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "l", ...
Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. Returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds passed. The method will resolve its master Deferred as soon as all the Def...
[ "Provides", "a", "way", "to", "execute", "callback", "functions", "based", "on", "one", "or", "more", "objects", "usually", "Deferred", "objects", "that", "represent", "asynchronous", "events", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Deferred.java#L279-L286
36,471
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
UiPlugin.trigger
protected void trigger(GwtEvent<?> e, Function callback, Element element) { trigger(e, callback, element, eventBus); }
java
protected void trigger(GwtEvent<?> e, Function callback, Element element) { trigger(e, callback, element, eventBus); }
[ "protected", "void", "trigger", "(", "GwtEvent", "<", "?", ">", "e", ",", "Function", "callback", ",", "Element", "element", ")", "{", "trigger", "(", "e", ",", "callback", ",", "element", ",", "eventBus", ")", ";", "}" ]
fire event and call callback function.
[ "fire", "event", "and", "call", "callback", "function", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java#L172-L174
36,472
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/PaginatedList.java
PaginatedList.iterator
@Override public Iterator<T> iterator() { /* * We make a copy of the allResults list to iterate over in order to * avoid ConcurrentModificationExceptions caused by other methods * loading more results into the list while someone iterates over it. * This is a more...
java
@Override public Iterator<T> iterator() { /* * We make a copy of the allResults list to iterate over in order to * avoid ConcurrentModificationExceptions caused by other methods * loading more results into the list while someone iterates over it. * This is a more...
[ "@", "Override", "public", "Iterator", "<", "T", ">", "iterator", "(", ")", "{", "/*\n * We make a copy of the allResults list to iterate over in order to\n * avoid ConcurrentModificationExceptions caused by other methods\n * loading more results into the list while som...
Returns an iterator over this list that lazily initializes results as necessary.
[ "Returns", "an", "iterator", "over", "this", "list", "that", "lazily", "initializes", "results", "as", "necessary", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/PaginatedList.java#L143-L199
36,473
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/PaginatedList.java
PaginatedList.subList
@Override public List<T> subList(int arg0, int arg1) { while ( allResults.size() < arg1 && nextResultsAvailable() ) { moveNextResults(); } return Collections.unmodifiableList(allResults.subList(arg0, arg1)); }
java
@Override public List<T> subList(int arg0, int arg1) { while ( allResults.size() < arg1 && nextResultsAvailable() ) { moveNextResults(); } return Collections.unmodifiableList(allResults.subList(arg0, arg1)); }
[ "@", "Override", "public", "List", "<", "T", ">", "subList", "(", "int", "arg0", ",", "int", "arg1", ")", "{", "while", "(", "allResults", ".", "size", "(", ")", "<", "arg1", "&&", "nextResultsAvailable", "(", ")", ")", "{", "moveNextResults", "(", "...
Returns a sub-list in the range specified, loading more results as necessary.
[ "Returns", "a", "sub", "-", "list", "in", "the", "range", "specified", "loading", "more", "results", "as", "necessary", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/PaginatedList.java#L247-L254
36,474
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/PaginatedList.java
PaginatedList.indexOf
@Override public int indexOf(Object arg0) { int indexOf = allResults.indexOf(arg0); if ( indexOf >= 0 ) return indexOf; while ( nextResultsAvailable() ) { indexOf = nextResults.indexOf(arg0); int size = allResults.size(); moveNextResults(); ...
java
@Override public int indexOf(Object arg0) { int indexOf = allResults.indexOf(arg0); if ( indexOf >= 0 ) return indexOf; while ( nextResultsAvailable() ) { indexOf = nextResults.indexOf(arg0); int size = allResults.size(); moveNextResults(); ...
[ "@", "Override", "public", "int", "indexOf", "(", "Object", "arg0", ")", "{", "int", "indexOf", "=", "allResults", ".", "indexOf", "(", "arg0", ")", ";", "if", "(", "indexOf", ">=", "0", ")", "return", "indexOf", ";", "while", "(", "nextResultsAvailable"...
Returns the first index of the object given in the list. Additional results are loaded incrementally as necessary.
[ "Returns", "the", "first", "index", "of", "the", "object", "given", "in", "the", "list", ".", "Additional", "results", "are", "loaded", "incrementally", "as", "necessary", "." ]
4b230ac843494cb10e46ddc2848f5b5d377d7b72
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/PaginatedList.java#L260-L275
36,475
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
Transform.supportsTransform3d
private static boolean supportsTransform3d() { if (transform == null) { return false; } String rotate = "rotateY(1deg)"; divStyle.setProperty(transform, rotate); rotate = divStyle.getProperty(transform); return rotate != null && !rotate.isEmpty(); }
java
private static boolean supportsTransform3d() { if (transform == null) { return false; } String rotate = "rotateY(1deg)"; divStyle.setProperty(transform, rotate); rotate = divStyle.getProperty(transform); return rotate != null && !rotate.isEmpty(); }
[ "private", "static", "boolean", "supportsTransform3d", "(", ")", "{", "if", "(", "transform", "==", "null", ")", "{", "return", "false", ";", "}", "String", "rotate", "=", "\"rotateY(1deg)\"", ";", "divStyle", ".", "setProperty", "(", "transform", ",", "rota...
Some browsers like HTMLUnit only support 2d transformations
[ "Some", "browsers", "like", "HTMLUnit", "only", "support", "2d", "transformations" ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java#L75-L83
36,476
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
Transform.getVendorPropertyName
public static String getVendorPropertyName(String prop) { // we prefer vendor specific names by default String vendorProp = JsUtils.camelize("-" + prefix + "-" + prop); if (JsUtils.hasProperty(divStyle, vendorProp)) { return vendorProp; } if (JsUtils.hasProperty(divStyle, prop)) { retur...
java
public static String getVendorPropertyName(String prop) { // we prefer vendor specific names by default String vendorProp = JsUtils.camelize("-" + prefix + "-" + prop); if (JsUtils.hasProperty(divStyle, vendorProp)) { return vendorProp; } if (JsUtils.hasProperty(divStyle, prop)) { retur...
[ "public", "static", "String", "getVendorPropertyName", "(", "String", "prop", ")", "{", "// we prefer vendor specific names by default", "String", "vendorProp", "=", "JsUtils", ".", "camelize", "(", "\"-\"", "+", "prefix", "+", "\"-\"", "+", "prop", ")", ";", "if"...
Compute the correct CSS property name for a specific browser vendor.
[ "Compute", "the", "correct", "CSS", "property", "name", "for", "a", "specific", "browser", "vendor", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java#L88-L102
36,477
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
Transform.getInstance
public static Transform getInstance(Element e, String initial) { Transform t = GQuery.data(e, TRANSFORM); if (t == null || initial != null) { if (initial == null) { initial = GQuery.getSelectorEngine().getDocumentStyleImpl().curCSS(e, transform, false); } t = new Transform(initial); ...
java
public static Transform getInstance(Element e, String initial) { Transform t = GQuery.data(e, TRANSFORM); if (t == null || initial != null) { if (initial == null) { initial = GQuery.getSelectorEngine().getDocumentStyleImpl().curCSS(e, transform, false); } t = new Transform(initial); ...
[ "public", "static", "Transform", "getInstance", "(", "Element", "e", ",", "String", "initial", ")", "{", "Transform", "t", "=", "GQuery", ".", "data", "(", "e", ",", "TRANSFORM", ")", ";", "if", "(", "t", "==", "null", "||", "initial", "!=", "null", ...
Return the Transform dictionary object of an element, but reseting historical values and setting them to the initial value passed.
[ "Return", "the", "Transform", "dictionary", "object", "of", "an", "element", "but", "reseting", "historical", "values", "and", "setting", "them", "to", "the", "initial", "value", "passed", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java#L123-L133
36,478
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
Transform.parse
private void parse(String s) { if (s != null) { for (MatchResult r = transformParseRegex.exec(s); r != null; r = transformParseRegex.exec(s)) { setFromString(vendorProperty(r.getGroup(1)), r.getGroup(2)); } } }
java
private void parse(String s) { if (s != null) { for (MatchResult r = transformParseRegex.exec(s); r != null; r = transformParseRegex.exec(s)) { setFromString(vendorProperty(r.getGroup(1)), r.getGroup(2)); } } }
[ "private", "void", "parse", "(", "String", "s", ")", "{", "if", "(", "s", "!=", "null", ")", "{", "for", "(", "MatchResult", "r", "=", "transformParseRegex", ".", "exec", "(", "s", ")", ";", "r", "!=", "null", ";", "r", "=", "transformParseRegex", ...
Parse a transform value as string and fills the dictionary map.
[ "Parse", "a", "transform", "value", "as", "string", "and", "fills", "the", "dictionary", "map", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java#L163-L169
36,479
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
Transform.setFromString
public void setFromString(String prop, String ...val) { if (val.length == 1) { String[] vals = val[0].split("[\\s,]+"); set(prop, vals); } else { set(prop, val); } }
java
public void setFromString(String prop, String ...val) { if (val.length == 1) { String[] vals = val[0].split("[\\s,]+"); set(prop, vals); } else { set(prop, val); } }
[ "public", "void", "setFromString", "(", "String", "prop", ",", "String", "...", "val", ")", "{", "if", "(", "val", ".", "length", "==", "1", ")", "{", "String", "[", "]", "vals", "=", "val", "[", "0", "]", ".", "split", "(", "\"[\\\\s,]+\"", ")", ...
Set a transform multi-value giving either a set of strings or just an string of values separated by comma.
[ "Set", "a", "transform", "multi", "-", "value", "giving", "either", "a", "set", "of", "strings", "or", "just", "an", "string", "of", "values", "separated", "by", "comma", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java#L182-L189
36,480
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.clearQueue
@SuppressWarnings("unchecked") public T clearQueue(String name) { for (Element e : elements()) { queue(e, name, null).clear(); } return (T) this; }
java
@SuppressWarnings("unchecked") public T clearQueue(String name) { for (Element e : elements()) { queue(e, name, null).clear(); } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "clearQueue", "(", "String", "name", ")", "{", "for", "(", "Element", "e", ":", "elements", "(", ")", ")", "{", "queue", "(", "e", ",", "name", ",", "null", ")", ".", "clear", "(", ...
remove all queued function from the named queue.
[ "remove", "all", "queued", "function", "from", "the", "named", "queue", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L94-L100
36,481
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.delay
@SuppressWarnings("unchecked") public T delay(int milliseconds, String name, Function... funcs) { for (Element e : elements()) { queue(e, name, new DelayFunction(e, name, milliseconds, funcs)); } return (T) this; }
java
@SuppressWarnings("unchecked") public T delay(int milliseconds, String name, Function... funcs) { for (Element e : elements()) { queue(e, name, new DelayFunction(e, name, milliseconds, funcs)); } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "delay", "(", "int", "milliseconds", ",", "String", "name", ",", "Function", "...", "funcs", ")", "{", "for", "(", "Element", "e", ":", "elements", "(", ")", ")", "{", "queue", "(", "e"...
Add a delay in the named queue.
[ "Add", "a", "delay", "in", "the", "named", "queue", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L112-L118
36,482
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.dequeue
@SuppressWarnings("unchecked") public T dequeue(String name) { for (Element e : elements()) { dequeueCurrentAndRunNext(e, name); } return (T) this; }
java
@SuppressWarnings("unchecked") public T dequeue(String name) { for (Element e : elements()) { dequeueCurrentAndRunNext(e, name); } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "dequeue", "(", "String", "name", ")", "{", "for", "(", "Element", "e", ":", "elements", "(", ")", ")", "{", "dequeueCurrentAndRunNext", "(", "e", ",", "name", ")", ";", "}", "return", ...
Removes a queued function from the front of the named queue and executes it.
[ "Removes", "a", "queued", "function", "from", "the", "front", "of", "the", "named", "queue", "and", "executes", "it", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L130-L136
36,483
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.promise
public Promise promise(final String name) { final Promise.Deferred dfd = Deferred(); // This is the unique instance of the resolve function which will be added to each element. final Function resolve = new Function() { // Because it is an inner function, the counter cannot final outside the function ...
java
public Promise promise(final String name) { final Promise.Deferred dfd = Deferred(); // This is the unique instance of the resolve function which will be added to each element. final Function resolve = new Function() { // Because it is an inner function, the counter cannot final outside the function ...
[ "public", "Promise", "promise", "(", "final", "String", "name", ")", "{", "final", "Promise", ".", "Deferred", "dfd", "=", "Deferred", "(", ")", ";", "// This is the unique instance of the resolve function which will be added to each element.", "final", "Function", "resol...
Returns a dynamically generated Promise that is resolved once all actions in the named queue have ended.
[ "Returns", "a", "dynamically", "generated", "Promise", "that", "is", "resolved", "once", "all", "actions", "in", "the", "named", "queue", "have", "ended", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L150-L179
36,484
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.queue
public int queue(String name) { Queue<?> q = isEmpty() ? null : queue(get(0), name, null); return q == null ? 0 : q.size(); }
java
public int queue(String name) { Queue<?> q = isEmpty() ? null : queue(get(0), name, null); return q == null ? 0 : q.size(); }
[ "public", "int", "queue", "(", "String", "name", ")", "{", "Queue", "<", "?", ">", "q", "=", "isEmpty", "(", ")", "?", "null", ":", "queue", "(", "get", "(", "0", ")", ",", "name", ",", "null", ")", ";", "return", "q", "==", "null", "?", "0",...
Show the number of functions to be executed on the first matched element in the named queue.
[ "Show", "the", "number", "of", "functions", "to", "be", "executed", "on", "the", "first", "matched", "element", "in", "the", "named", "queue", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L193-L196
36,485
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.queue
@SuppressWarnings("unchecked") public T queue(Function... funcs) { for (Element e : elements()) { for (Function f : funcs) { queue(e, DEFAULT_NAME, f); } } return (T) this; }
java
@SuppressWarnings("unchecked") public T queue(Function... funcs) { for (Element e : elements()) { for (Function f : funcs) { queue(e, DEFAULT_NAME, f); } } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "queue", "(", "Function", "...", "funcs", ")", "{", "for", "(", "Element", "e", ":", "elements", "(", ")", ")", "{", "for", "(", "Function", "f", ":", "funcs", ")", "{", "queue", "(",...
Adds new functions, to be executed, onto the end of the effects queue of all matched elements.
[ "Adds", "new", "functions", "to", "be", "executed", "onto", "the", "end", "of", "the", "effects", "queue", "of", "all", "matched", "elements", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L202-L210
36,486
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.queue
@SuppressWarnings("unchecked") public T queue(final String name, Function... funcs) { for (final Function f : funcs) { for (Element e : elements()) { queue(e, name, f); } } return (T) this; }
java
@SuppressWarnings("unchecked") public T queue(final String name, Function... funcs) { for (final Function f : funcs) { for (Element e : elements()) { queue(e, name, f); } } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "queue", "(", "final", "String", "name", ",", "Function", "...", "funcs", ")", "{", "for", "(", "final", "Function", "f", ":", "funcs", ")", "{", "for", "(", "Element", "e", ":", "eleme...
Adds new functions, to be executed, onto the end of the named queue of all matched elements.
[ "Adds", "new", "functions", "to", "be", "executed", "onto", "the", "end", "of", "the", "named", "queue", "of", "all", "matched", "elements", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L216-L224
36,487
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.queue
@SuppressWarnings("unchecked") public T queue(String name, Queue<?> queue) { for (Element e : elements()) { replacequeue(e, name, queue); } return (T) this; }
java
@SuppressWarnings("unchecked") public T queue(String name, Queue<?> queue) { for (Element e : elements()) { replacequeue(e, name, queue); } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "queue", "(", "String", "name", ",", "Queue", "<", "?", ">", "queue", ")", "{", "for", "(", "Element", "e", ":", "elements", "(", ")", ")", "{", "replacequeue", "(", "e", ",", "name",...
Replaces the current named queue with the given queue on all matched elements.
[ "Replaces", "the", "current", "named", "queue", "with", "the", "given", "queue", "on", "all", "matched", "elements", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L236-L242
36,488
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
QueuePlugin.dequeueIfNotDoneYet
public void dequeueIfNotDoneYet(Element elem, String name, Object object) { @SuppressWarnings("rawtypes") Queue queue = queue(elem, name, null); if (queue != null && object.equals(queue.peek())) { dequeueCurrentAndRunNext(elem, name); } }
java
public void dequeueIfNotDoneYet(Element elem, String name, Object object) { @SuppressWarnings("rawtypes") Queue queue = queue(elem, name, null); if (queue != null && object.equals(queue.peek())) { dequeueCurrentAndRunNext(elem, name); } }
[ "public", "void", "dequeueIfNotDoneYet", "(", "Element", "elem", ",", "String", "name", ",", "Object", "object", ")", "{", "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "Queue", "queue", "=", "queue", "(", "elem", ",", "name", ",", "null", ")", ";", ...
Dequeue the object and run the next if it is the first in the queue.
[ "Dequeue", "the", "object", "and", "run", "the", "next", "if", "it", "is", "the", "first", "in", "the", "queue", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java#L357-L363
36,489
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java
FunctionDeferred.f
public final Object f(Object... args) { return dfd != null && (cache == CacheType.ALL || cache == CacheType.RESOLVED && dfd.promise().isResolved() || cache == CacheType.REJECTED && dfd.promise().isRejected()) ? dfd.promise() : new PromiseFunction() { public void...
java
public final Object f(Object... args) { return dfd != null && (cache == CacheType.ALL || cache == CacheType.RESOLVED && dfd.promise().isResolved() || cache == CacheType.REJECTED && dfd.promise().isRejected()) ? dfd.promise() : new PromiseFunction() { public void...
[ "public", "final", "Object", "f", "(", "Object", "...", "args", ")", "{", "return", "dfd", "!=", "null", "&&", "(", "cache", "==", "CacheType", ".", "ALL", "||", "cache", "==", "CacheType", ".", "RESOLVED", "&&", "dfd", ".", "promise", "(", ")", ".",...
This function is called when the previous promise in the pipe is resolved.
[ "This", "function", "is", "called", "when", "the", "previous", "promise", "in", "the", "pipe", "is", "resolved", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java#L71-L85
36,490
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.getArgumentJSO
@SuppressWarnings("unchecked") public <T extends JavaScriptObject> T getArgumentJSO(int argIdx, int pos) { return (T) getArgument(argIdx, pos, JavaScriptObject.class); }
java
@SuppressWarnings("unchecked") public <T extends JavaScriptObject> T getArgumentJSO(int argIdx, int pos) { return (T) getArgument(argIdx, pos, JavaScriptObject.class); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "JavaScriptObject", ">", "T", "getArgumentJSO", "(", "int", "argIdx", ",", "int", "pos", ")", "{", "return", "(", "T", ")", "getArgument", "(", "argIdx", ",", "pos", ",", ...
Utility method for safety getting a JavaScriptObject present at a certain position in the list of arguments composed by arrays.
[ "Utility", "method", "for", "safety", "getting", "a", "JavaScriptObject", "present", "at", "a", "certain", "position", "in", "the", "list", "of", "arguments", "composed", "by", "arrays", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L148-L151
36,491
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.getArgumentArray
public Object[] getArgumentArray(int idx) { Object o = idx < 0 ? arguments : getArgument(idx); if (o != null) { return o.getClass().isArray() ? (Object[]) o : new Object[] {o}; } else if (idx == 0) { return arguments; } return new Object[0]; }
java
public Object[] getArgumentArray(int idx) { Object o = idx < 0 ? arguments : getArgument(idx); if (o != null) { return o.getClass().isArray() ? (Object[]) o : new Object[] {o}; } else if (idx == 0) { return arguments; } return new Object[0]; }
[ "public", "Object", "[", "]", "getArgumentArray", "(", "int", "idx", ")", "{", "Object", "o", "=", "idx", "<", "0", "?", "arguments", ":", "getArgument", "(", "idx", ")", ";", "if", "(", "o", "!=", "null", ")", "{", "return", "o", ".", "getClass", ...
Utility method for safety getting an array present at a certain position in the list of arguments. Useful for Deferred chains where result of each resolved promise is set as an array in the arguments list. Always returns an array.
[ "Utility", "method", "for", "safety", "getting", "an", "array", "present", "at", "a", "certain", "position", "in", "the", "list", "of", "arguments", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L170-L178
36,492
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.getArgument
public <T> T getArgument(int idx, Class<? extends T> type) { return getArgument(-1, idx, type); }
java
public <T> T getArgument(int idx, Class<? extends T> type) { return getArgument(-1, idx, type); }
[ "public", "<", "T", ">", "T", "getArgument", "(", "int", "idx", ",", "Class", "<", "?", "extends", "T", ">", "type", ")", "{", "return", "getArgument", "(", "-", "1", ",", "idx", ",", "type", ")", ";", "}" ]
Safety return the argument in the position idx. If the element class is not of the requested type it returns null and you don't get casting exeption.
[ "Safety", "return", "the", "argument", "in", "the", "position", "idx", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L221-L223
36,493
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.getArgument
@SuppressWarnings("unchecked") public <T> T getArgument(int argIdx, int pos, Class<? extends T> type) { Object[] objs = getArgumentArray(argIdx); Object o = objs.length > pos ? objs[pos] : null; if (o != null && ( // When type is null we don't safety check type == null || // Th...
java
@SuppressWarnings("unchecked") public <T> T getArgument(int argIdx, int pos, Class<? extends T> type) { Object[] objs = getArgumentArray(argIdx); Object o = objs.length > pos ? objs[pos] : null; if (o != null && ( // When type is null we don't safety check type == null || // Th...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getArgument", "(", "int", "argIdx", ",", "int", "pos", ",", "Class", "<", "?", "extends", "T", ">", "type", ")", "{", "Object", "[", "]", "objs", "=", "getArgumentArray"...
Utility method for safety getting an object present at a certain position in the list of arguments composed by arrays. Useful for Deferred chains where result of each resolved promise is set as an array in the arguments list. When the object found in the array doesn't match the type required it returns a null. Note:...
[ "Utility", "method", "for", "safety", "getting", "an", "object", "present", "at", "a", "certain", "position", "in", "the", "list", "of", "arguments", "composed", "by", "arrays", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L238-L253
36,494
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.f
public Object f(Widget w, int i) { setElement(w.getElement()); setIndex(i); f(w); return null; }
java
public Object f(Widget w, int i) { setElement(w.getElement()); setIndex(i); f(w); return null; }
[ "public", "Object", "f", "(", "Widget", "w", ",", "int", "i", ")", "{", "setElement", "(", "w", ".", "getElement", "(", ")", ")", ";", "setIndex", "(", "i", ")", ";", "f", "(", "w", ")", ";", "return", "null", ";", "}" ]
Override this for GQuery methods which loop over matched widgets and invoke a callback on each widget. NOTE: If your query has non-widget elements you might need to override 'public void f()' or 'public void f(Element e)' to handle these elements and avoid a runtime exception.
[ "Override", "this", "for", "GQuery", "methods", "which", "loop", "over", "matched", "widgets", "and", "invoke", "a", "callback", "on", "each", "widget", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L385-L390
36,495
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.f
public void f(int i, Object... args) { setIndex(i); setArguments(args); if (args.length == 1 && args[0] instanceof JavaScriptObject) { if (JsUtils.isElement((JavaScriptObject) args[0])) { setElement((com.google.gwt.dom.client.Element) args[0]); f(getElement(), i); } else if (JsUt...
java
public void f(int i, Object... args) { setIndex(i); setArguments(args); if (args.length == 1 && args[0] instanceof JavaScriptObject) { if (JsUtils.isElement((JavaScriptObject) args[0])) { setElement((com.google.gwt.dom.client.Element) args[0]); f(getElement(), i); } else if (JsUt...
[ "public", "void", "f", "(", "int", "i", ",", "Object", "...", "args", ")", "{", "setIndex", "(", "i", ")", ";", "setArguments", "(", "args", ")", ";", "if", "(", "args", ".", "length", "==", "1", "&&", "args", "[", "0", "]", "instanceof", "JavaSc...
Override this method for bound callbacks.
[ "Override", "this", "method", "for", "bound", "callbacks", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L411-L425
36,496
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.f
public boolean f(Event e, Object... arg) { setArguments(arg); setEvent(e); return f(e); }
java
public boolean f(Event e, Object... arg) { setArguments(arg); setEvent(e); return f(e); }
[ "public", "boolean", "f", "(", "Event", "e", ",", "Object", "...", "arg", ")", "{", "setArguments", "(", "arg", ")", ";", "setEvent", "(", "e", ")", ";", "return", "f", "(", "e", ")", ";", "}" ]
Override this method for bound event handlers if you wish to deal with per-handler user data. @return boolean false means stop propagation and prevent default
[ "Override", "this", "method", "for", "bound", "event", "handlers", "if", "you", "wish", "to", "deal", "with", "per", "-", "handler", "user", "data", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L433-L437
36,497
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.f
public void f(Widget w) { setElement(w.getElement()); if (loop) { loop = false; f(); } else { f(w.getElement().<com.google.gwt.dom.client.Element> cast()); } }
java
public void f(Widget w) { setElement(w.getElement()); if (loop) { loop = false; f(); } else { f(w.getElement().<com.google.gwt.dom.client.Element> cast()); } }
[ "public", "void", "f", "(", "Widget", "w", ")", "{", "setElement", "(", "w", ".", "getElement", "(", ")", ")", ";", "if", "(", "loop", ")", "{", "loop", "=", "false", ";", "f", "(", ")", ";", "}", "else", "{", "f", "(", "w", ".", "getElement"...
Override this for GQuery methods which take a callback, but do not expect a return value, apply to a single widget. NOTE: If your query has non-widget elements you might need to override 'public void f()' or 'public void f(Element e)' to handle these elements and avoid a runtime exception.
[ "Override", "this", "for", "GQuery", "methods", "which", "take", "a", "callback", "but", "do", "not", "expect", "a", "return", "value", "apply", "to", "a", "single", "widget", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L490-L498
36,498
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
Ajax.ajax
public static Promise ajax(Settings settings) { resolveSettings(settings); final Function onSuccess = settings.getSuccess(); if (onSuccess != null) { onSuccess.setElement(settings.getContext()); } final Function onError = settings.getError(); if (onError != null) { onError.setEleme...
java
public static Promise ajax(Settings settings) { resolveSettings(settings); final Function onSuccess = settings.getSuccess(); if (onSuccess != null) { onSuccess.setElement(settings.getContext()); } final Function onError = settings.getError(); if (onError != null) { onError.setEleme...
[ "public", "static", "Promise", "ajax", "(", "Settings", "settings", ")", "{", "resolveSettings", "(", "settings", ")", ";", "final", "Function", "onSuccess", "=", "settings", ".", "getSuccess", "(", ")", ";", "if", "(", "onSuccess", "!=", "null", ")", "{",...
Perform an ajax request to the server. Example: <pre> import static com.google.gwt.query.client.GQ.* ... Properties properties = $$("dataType: xml, type: post; data: {q: 'gwt'}, headers: {X-Powered-By: GQuery}"); ajax("test.php", new Function() { public void f() { Element xmlElem = getData()[0]; System.out.println($(...
[ "Perform", "an", "ajax", "request", "to", "the", "server", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java#L162-L228
36,499
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
JsCache.checkNull
public static final <T extends JavaScriptObject> T checkNull(T js) { if (!GWT.isProdMode() && js == null) { throw new NullPointerException(); } return js; }
java
public static final <T extends JavaScriptObject> T checkNull(T js) { if (!GWT.isProdMode() && js == null) { throw new NullPointerException(); } return js; }
[ "public", "static", "final", "<", "T", "extends", "JavaScriptObject", ">", "T", "checkNull", "(", "T", "js", ")", "{", "if", "(", "!", "GWT", ".", "isProdMode", "(", ")", "&&", "js", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ...
Throw a NPE when a js is null.
[ "Throw", "a", "NPE", "when", "a", "js", "is", "null", "." ]
93e02bc8eb030081061c56134ebee1f585981107
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java#L259-L264