100+ results for 'trim toLowerCase'
Not the results you expected?
hook.cors_csrf.test.js (https://gitlab.com/yutiansut/sails) JavaScript · 1310 lines
254 assert.equal(response.statusCode, 200);
255 assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
256 assert.equal(response.headers['access-control-allow-methods'].toLowerCase(), 'get, post, put, delete, options, head');
257 done();
258 });
274 assert.equal(response.statusCode, 200);
275 assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
276 assert.equal(response.headers['access-control-allow-methods'].toLowerCase(), 'get, post, put, delete, options, head');
277 done();
278 });
sessionManager.js (https://github.com/deitch/cansecurity.git) JavaScript · 305 lines
FictionController.groovy (https://github.com/TouK/RapidOSS3TouK.git) Groovy · 245 lines
ContentImportManager.java (https://github.com/jehc/MondocosmOS.git) Java · 172 lines
116 }
118 contentImportMap.put(extension.toLowerCase(), importer);
119 }
120 }
136 }
138 ContentImporterSPI curImporter = contentImportMap.get(extension.toLowerCase());
140 // XXX the use of .equals() here is problematic -- it
142 // if unregister is called after register XXX
143 if (curImporter != null && curImporter.equals(importer)) {
144 contentImportMap.remove(extension.toLowerCase());
145 }
146 }
ConfigurationClassBuilder.java (https://github.com/ccrouch/rhq.git) Java · 158 lines
DAOParamUtil.java (https://github.com/viktorkovacs/liferay-portal-trunk.git) Java · 239 lines
123 public static String getLike(
124 HttpServletRequest request, String param, boolean toLowerCase) {
126 return getLike(request, param, null, toLowerCase);
135 public static String getLike(
136 HttpServletRequest request, String param, String defaultValue,
137 boolean toLowerCase) {
139 String value = request.getParameter(param);
141 if (value != null) {
142 value = value.trim();
144 if (toLowerCase) {
Room.java (https://bitbucket.org/teamchromide/habbo-4-java.git) Java · 151 lines
setting.js (https://github.com/TomTasche/Announcify.js.git) JavaScript · 645 lines
components-dropdowns.js (https://gitlab.com/SFMSP/Hagape) JavaScript · 263 lines
37 function format(state) {
38 if (!state.id) return state.text; // optgroup
39 return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/> " + state.text;
40 }
41 $("#select2_sample4").select2({
153 function format(state) {
154 if (!state.id) return state.text; // optgroup
155 return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/> " + state.text;
156 }
157 $("#select2_sample_modal_4").select2({
pollResult.jsp (https://bitbucket.org/NightFury_37/poll.git) JavaServer Pages · 141 lines
Create_Constructor.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 222 lines
18 */
20 boolean JAVA_MODE = buffer.getMode().getName().toLowerCase().equals("java");
21 String UNDEFINED = "UNKNOWN_CLASS";
56 {
57 fileClassName = fileClassName.substring(0, index);
58 if(fileClassName.toLowerCase().indexOf("untitled") == -1)
59 {
60 return fileClassName;
156 if( lineText != null && !lineText.equals("") )
157 {
158 lineText = lineText.trim();
159 if( lineText.endsWith(";") )
160 {
ShortcutsOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 443 lines
✨ Summary
This Java code creates a graphical user interface (GUI) for managing shortcuts in an application. It allows users to add, edit, and delete shortcuts, with options to customize their names and shortcuts. The GUI displays a table of existing shortcuts, enabling users to modify them as needed. The code also saves changes to the shortcuts when the user clicks “OK”.
This Java code creates a graphical user interface (GUI) for managing shortcuts in an application. It allows users to add, edit, and delete shortcuts, with options to customize their names and shortcuts. The GUI displays a table of existing shortcuts, enabling users to modify them as needed. The code also saves changes to the shortcuts when the user clicks “OK”.
173 public String prepareFilter(String filter)
174 {
175 return filter.toLowerCase();
176 }
179 public boolean passFilter(int row, String filter)
180 {
181 String name = delegated.getBindingAt(row, 0).label.toLowerCase();
182 return name.contains(filter);
183 }
408 public int compare(GrabKeyDialog.KeyBinding[] k1, GrabKeyDialog.KeyBinding[] k2)
409 {
410 String label1 = k1[0].label.toLowerCase();
411 String label2 = k2[0].label.toLowerCase();
api.test.js (https://github.com/nanek/mstranslator.git) JavaScript · 208 lines
base-core-tests.js (https://github.com/ArnaudD/yui3.git) JavaScript · 1233 lines
textbox.js (https://github.com/sundowndk/SNDK.git) JavaScript · 802 lines
GrabKeyDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 544 lines
✨ Summary
This Java code creates a dialog for setting and managing keyboard shortcuts. It allows users to input a shortcut, check if it’s already in use, and override existing shortcuts. The dialog also includes options to remove an old shortcut, cancel changes, and confirm duplicate shortcuts. It uses a custom ActionHandler
class to handle user interactions and display error messages or confirmation prompts as needed.
This Java code creates a dialog for setting and managing keyboard shortcuts. It allows users to input a shortcut, check if it’s already in use, and override existing shortcuts. The dialog also includes options to remove an old shortcut, cancel changes, and confirm duplicate shortcuts. It uses a custom ActionHandler
class to handle user interactions and display error messages or confirmation prompts as needed.
jEdit.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 3463 lines
✨ Summary
This Java code initializes various objects and sets up the application’s configuration. It loads system properties, registers protocol handlers, and sets the User-Agent string for HTTP requests. The code also determines the installation directory of the application and sets up a class loader to load JAR files. Additionally, it creates an input handler and adds an EditBus component to reload edit modes and macros when changed.
This Java code initializes various objects and sets up the application’s configuration. It loads system properties, registers protocol handlers, and sets the User-Agent string for HTTP requests. The code also determines the installation directory of the application and sets up a class loader to load JAR files. Additionally, it creates an input handler and adds an EditBus component to reload edit modes and macros when changed.
ExitOperationsCriteriaCollector.java (https://github.com/donnchadh/hibernate-shards.git) Java · 192 lines
GetterUtil.java (https://github.com/portalcollc/liferay-portal.git) Java · 1029 lines
285 try {
286 value = value.trim().toLowerCase();
288 if (value.equals(BOOLEANS[0]) || value.equals(BOOLEANS[1]) ||
311 try {
312 Date date = dateFormat.parse(value.trim());
314 if (date != null) {
325 if (value != null) {
326 try {
327 return Double.parseDouble(_trim(value));
328 }
329 catch (Exception e) {
powerdynamo.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 465 lines
KeyEventTranslator.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 545 lines
✨ Summary
This Java code defines a system for handling keyboard events, specifically key presses and releases, in a graphical user interface (GUI) application. It maps keyboard input to specific actions and provides a way to track which keys are pressed simultaneously, allowing for more accurate event tracking and processing. The code also includes a Key
class to represent individual key press events.
This Java code defines a system for handling keyboard events, specifically key presses and releases, in a graphical user interface (GUI) application. It maps keyboard input to specific actions and provides a way to track which keys are pressed simultaneously, allowing for more accurate event tracking and processing. The code also includes a Key
class to represent individual key press events.
OAuth20AccessTokenControllerTests.java (https://github.com/frett/cas.git) Java · 645 lines
50 mockRequest.setParameter(OAuth20Constants.REDIRECT_URI, REDIRECT_URI);
51 mockRequest.setParameter(OAuth20Constants.CLIENT_SECRET, CLIENT_SECRET);
52 mockRequest.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.name().toLowerCase());
53 val principal = createPrincipal();
54 val service = addRegisteredService(
69 mockRequest.setParameter(OAuth20Constants.CLIENT_ID, CLIENT_ID);
70 mockRequest.setParameter(OAuth20Constants.CLIENT_SECRET, CLIENT_SECRET);
71 mockRequest.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.name().toLowerCase());
72 val principal = createPrincipal();
73 val service = addRegisteredService(
147 mockRequest.setParameter(OAuth20Constants.CLIENT_ID, CLIENT_ID);
148 mockRequest.setParameter(OAuth20Constants.REDIRECT_URI, REDIRECT_URI);
149 mockRequest.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.name().toLowerCase());
150 val principal = createPrincipal();
151 val service = addRegisteredService(
CBRoot.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 304 lines
✨ Summary
This Java code is part of a CodeBrowser application, which parses ctags files to generate a tree-like structure representing file contents and their corresponding tags. It creates child nodes based on the parsed data and provides methods for expanding paths and sorting children in a JTree component. The class implements the TreeNode interface to provide access to its children and other properties.
This Java code is part of a CodeBrowser application, which parses ctags files to generate a tree-like structure representing file contents and their corresponding tags. It creates child nodes based on the parsed data and provides methods for expanding paths and sorting children in a JTree component. The class implements the TreeNode interface to provide access to its children and other properties.
MaximalBodyDescriptor.java (https://github.com/mkautzmann/titanium_mobile.git) Java · 399 lines
107 public void addField(String name, String value) {
108 name = name.trim().toLowerCase();
109 if (MimeUtil.MIME_HEADER_MIME_VERSION.equals(name) && !isMimeVersionSet) {
110 parseMimeVersion(value);
129 isContentMD5Set = true;
130 if (value != null) {
131 contentMD5Raw = value.trim();
132 }
133 }
216 contentDescription = "";
217 } else {
218 contentDescription = value.trim();
219 }
220 isContentDescriptionSet = true;
PasteFromListDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 263 lines
✨ Summary
This Java code creates a dialog for pasting text from a list of clips. The dialog displays a list of available clips, and allows the user to select one to paste into the current editor’s text area. When the “Insert” button is clicked, the selected clip is inserted at the cursor position in the text area.
This Java code creates a dialog for pasting text from a list of clips. The dialog displays a list of available clips, and allows the user to select one to paste into the current editor’s text area. When the “Insert” button is clicked, the selected clip is inserted at the cursor position in the text area.
GUIUtilities.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1789 lines
✨ Summary
This Java code provides utility methods for a text editor, specifically for GUI-related tasks. It includes functionality for displaying a splash screen, advancing its progress, and saving the size of frames and windows. The SizeSaver
class is used to continually save a frame’s size when it is resized or moved.
This Java code provides utility methods for a text editor, specifically for GUI-related tasks. It includes functionality for displaying a splash screen, advancing its progress, and saving the size of frames and windows. The SizeSaver
class is used to continually save a frame’s size when it is resized or moved.
375 if(index != -1 && label.length() - index > 1)
376 {
377 mnemonic = Character.toLowerCase(label.charAt(index + 1));
378 label = label.substring(0,index).concat(label.substring(++index));
379 }
409 if(index != -1 && label.length() - index > 1)
410 {
411 mnemonic = Character.toLowerCase(label.charAt(index + 1));
412 label = label.substring(0,index).concat(label.substring(++index));
413 }
988 String styleName = "view.style."
989 + Token.tokenToString((byte)i)
990 .toLowerCase(Locale.ENGLISH);
991 styles[i] = GUIUtilities.parseStyle(
992 jEdit.getProperty(styleName),
SettingsReloader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 95 lines
✨ Summary
This Java class, SettingsReloader
, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate
messages from the JEdit editor and checks if the updated path belongs to either the “macros” or “modes” directories. If it does, it calls methods to load or reload the corresponding settings.
This Java class, SettingsReloader
, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate
messages from the JEdit editor and checks if the updated path belongs to either the “macros” or “modes” directories. If it does, it calls methods to load or reload the corresponding settings.
bootstrap-material-design.css (https://gitlab.com/adamm0/swedish) CSS · 1389 lines
9 var colors = {}, main = {};
10 $(".color-group").each(function() {
11 var color = $(this).find(".name").text().trim().toLowerCase().replace(" ", "-");
12 colors[color] = {};
14 $(this).find(".color").not(".main-color").each(function() {
15 var shade = $(this).find(".shade").text().trim(),
16 hex = $(this).find(".hex").text().trim();
18 colors[color][shade] = hex;
19 });
20 main[color] = color + "-" + $(this).find(".main-color .shade").text().trim();
22 });
Censor.java (https://github.com/gamerx/tgxn317.git) Java · 978 lines
Os.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 426 lines
✨ Summary
This Java code provides a way to determine and manipulate environment variables on different operating systems. It checks the system’s family (e.g., Windows, Unix, NetWare) and uses specific commands to retrieve and set environment variables. The getEnvironmentValue
method retrieves the value of an environment variable, while the getProcEnvCommand
method returns a command to execute to get environment variables on different systems.
This Java code provides a way to determine and manipulate environment variables on different operating systems. It checks the system’s family (e.g., Windows, Unix, NetWare) and uses specific commands to retrieve and set environment variables. The getEnvironmentValue
method retrieves the value of an environment variable, while the getProcEnvCommand
method returns a command to execute to get environment variables on different systems.
73 public class Os {
74 private static final String OS_NAME =
75 System.getProperty( "os.name" ).toLowerCase( Locale.US );
76 private static final String OS_ARCH =
77 System.getProperty( "os.arch" ).toLowerCase( Locale.US );
78 private static final String OS_VERSION =
79 System.getProperty( "os.version" ).toLowerCase( Locale.US );
80 private static final String PATH_SEP =
81 System.getProperty( "path.separator" );
122 */
123 public void setFamily( String f ) {
124 family = f.toLowerCase( Locale.US );
125 }
Parser.js (https://github.com/tomelam/parser-lib.git) JavaScript · 1341 lines
389 if (tokenStream.match(Tokens.IDENT)){
390 ident = tokenStream.token().value.toLowerCase();
392 //since there's no custom tokens for these, need to manually check
418 this._readWhitespace();
419 while (tokenStream.match(Tokens.IDENT)){
420 if (tokenStream.token().value.toLowerCase() != "and"){
421 this._unexpectedToken(tokenStream.token());
422 }
516 //The value 'auto' may not be used as a page name and MUST be treated as a syntax error.
517 if (identifier.toLowerCase() === "auto"){
518 this._unexpectedToken(tokenStream.token());
519 }
VMSMyDAO.java (https://github.com/rkshakya/RKSProjects.git) Java · 1277 lines
92 if(serverName.toLowerCase().indexOf(VMSStaticParams.APACBEALIAS) > -1){
93 serverName = serverName.toLowerCase().replaceAll(VMSStaticParams.APACBEALIAS.toLowerCase(), "");
94 }else if(serverName.toLowerCase().indexOf(VMSStaticParams.APACFEALAIS) > -1){
95 serverName = serverName.toLowerCase().replaceAll(VMSStaticParams.APACFEALAIS.toLowerCase(), "");
96 }
Bundle.properties (https://bitbucket.org/alsajib/netbeans-soa.git) Properties File · 584 lines
40 #Operator tolowercase
41 LBL_String_tolowercase = ToLowercase
42 LBL_String_displayname_tolowercase_inputparam1=string to convert
72 #Operator lefttrim
73 LBL_String_lefttrim = LeftTrim
74 LBL_String_displayname_lefttrim_inputparam1=string to trim
81 LBL_String_righttrim = RightTrim
82 LBL_String_displayname_righttrim_inputparam1=string to trim
83 LBL_String_displayname_righttrim_outputparam1=result (varchar)
84 TOOLTIP_String_righttrim = Trim String (Remove White Space) from Right
85 TOOLTIP_String_righttrim_inputParm1 = Input String
112 #Operator TRIM
113 LBL_String_trim = Trim
114 LBL_String_displayname_trim_inputparam1=input
StyleSettings.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 375 lines
✨ Summary
This Java code provides a set of utility methods for managing syntax highlighting in the jEdit text editor. It allows loading and saving style sets, tokens, and fold levels, as well as retrieving default styles and style set names. The methods are designed to work with the jEdit API, providing a way to customize the editor’s appearance and behavior.
This Java code provides a set of utility methods for managing syntax highlighting in the jEdit text editor. It allows loading and saving style sets, tokens, and fold levels, as well as retrieving default styles and style set names. The methods are designed to work with the jEdit API, providing a way to customize the editor’s appearance and behavior.
registry.js (https://gitlab.com/then-try-this/penelopean-robotics) JavaScript · 265 lines
105 */
106 Blockly.registry.register = function(type, name, registryItem, opt_quiet) {
107 if ((!(type instanceof Blockly.registry.Type) && typeof type != 'string') || String(type).trim() == '') {
108 throw Error('Invalid type "' + type + '". The type must be a' +
109 ' non-empty string or a Blockly.registry.Type.');
110 }
111 type = String(type).toLowerCase();
113 if ((typeof name != 'string') || (name.trim() == '')) {
115 ' non-empty string.');
116 }
117 name = name.toLowerCase();
118 if (!registryItem) {
119 throw Error('Can not register a null value');
colors.js (https://gitlab.com/Etern4l/BitcoinDice) JavaScript · 653 lines
String.cpp (https://github.com/deas/alfresco.git) C++ · 885 lines
231 * @return String
232 */
233 String String::toLowerCase() const {
235 // Create a copy of the string then convert to lowercase
472 /**
473 * Trim leading and trailing whitespace from the string returning the resulting String
474 *
475 * @return String
476 */
477 String String::trim( void) const {
478 std::wstring str = m_string;
479 str.erase( str.find_last_not_of( L" ") + 1);
matchers.js (https://gitlab.com/warmsys-public/warmsys-jasmine-matchers) JavaScript · 434 lines
StaticStringy.php (https://gitlab.com/kimting254/wbms) PHP · 979 lines
43 /**
44 * Returns a camelCase version of the string. Trims surrounding spaces,
45 * capitalizes letters following digits, spaces, dashes and underscores,
46 * and removes spaces, dashes, as well as underscores.
57 /**
58 * Returns an UpperCamelCase version of the supplied string. It trims
59 * surrounding spaces, capitalizes letters following digits, spaces, dashes
60 * and underscores, and removes spaces, dashes, underscores.
71 /**
72 * Returns a lowercase and trimmed string separated by dashes. Dashes are
73 * inserted before uppercase characters (with the exception of the first
74 * character of the string), and in place of spaces as well as underscores.
StaticStringyTest.php (https://gitlab.com/4gdevs/online-class-record-system) PHP · 710 lines
255 /**
256 * @dataProvider toLowerCaseProvider()
257 */
258 public function testToLowerCase($expected, $str, $encoding = null)
259 {
260 $result = S::toLowerCase($str, $encoding);
261 $this->assertInternalType('string', $result);
262 $this->assertEquals($expected, $result);
402 /**
403 * @dataProvider trimProvider()
404 */
405 public function testTrim($expected, $str, $chars = null, $encoding = null)
QuickAccessSourcePath.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 251 lines
✨ Summary
This Java class, QuickAccessSourcePath, is a wrapper around a SourcePath that provides quicker access to its elements. It creates an index map of source files by their first letter and substring, allowing for faster lookup of files starting with a specific character or containing a certain substring. The class also includes methods to get all files in the project and filter them based on exclude regular expressions.
This Java class, QuickAccessSourcePath, is a wrapper around a SourcePath that provides quicker access to its elements. It creates an index map of source files by their first letter and substring, allowing for faster lookup of files starting with a specific character or containing a certain substring. The class also includes methods to get all files in the project and filter them based on exclude regular expressions.
120 public List getSourceFilesStartingWith(char ch)
121 {
122 List sourceFileList = mQuickAccessMap.get(String.valueOf(ch).toLowerCase());
124 if(sourceFileList == null) {
138 }
140 List sourceFileList = mQuickAccessMap.get(string.toLowerCase());
142 if(sourceFileList == null) {
190 {
191 // get first letter
192 String firstLetter = sourcePathFile.getFullName().toLowerCase().substring(0,1);
193 List<SourcePathFile> currentLetterList = mQuickAccessMap.get(firstLetter);
194 if (currentLetterList == null) {
QuickAccessSourcePath.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 222 lines
✨ Summary
This Java class, QuickAccessSourcePath
, is a wrapper around a SourcePath
that provides quicker access to its elements by storing them in data structures for fast lookup. It maps characters and substrings to lists of source path files, allowing users to quickly retrieve files starting with or containing specific letters or strings.
This Java class, QuickAccessSourcePath
, is a wrapper around a SourcePath
that provides quicker access to its elements by storing them in data structures for fast lookup. It maps characters and substrings to lists of source path files, allowing users to quickly retrieve files starting with or containing specific letters or strings.
116 public List getSourceFilesStartingWith(char ch)
117 {
118 List sourceFileList = (List) mQuickAccessMap.get(String.valueOf(ch).toLowerCase());
120 if(sourceFileList == null) {
134 }
136 List sourceFileList = (List) mQuickAccessMap.get(string.toLowerCase());
138 if(sourceFileList == null) {
179 if (regularExpression == null || !regularExpression.isMatch(sourcePathFile.getFullName())) {
180 // get first letter
181 String firstLetter = sourcePathFile.getFullName().toLowerCase().substring(0,1);
182 List currentLetterList = (List) mQuickAccessMap.get(firstLetter);
183 if (currentLetterList == null) {
FindFileWindow.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 663 lines
✨ Summary
This Java code is part of a file finder application that integrates with the JEdit text editor. It creates a window to search for files based on a given text, and updates the list of matching files as the user types. The code uses Swing components and event handling to create an interactive interface. When a file is selected, it notifies listeners and closes the window.
This Java code is part of a file finder application that integrates with the JEdit text editor. It creates a window to search for files based on a given text, and updates the list of matching files as the user types. The code uses Swing components and event handling to create an interactive interface. When a file is selected, it notifies listeners and closes the window.
browser.js (https://gitlab.com/marvin1/soundcloud) JavaScript · 771 lines
91 getResponseHeader: function (header) {
93 return res.headers[header.toLowerCase()];
94 }
95 };
135 getResponseHeader: function (header) {
137 return res.headers[header.toLowerCase()];
138 }
139 };
179 getResponseHeader: function (header) {
181 return res.headers[header.toLowerCase()];
182 }
183 };
SuggestionFieldBean.java (https://github.com/grb123/OpenFaces.git) Java · 193 lines
autocomplete.controllers.js (https://github.com/MapStory/mapstory.git) JavaScript · 215 lines
EncodedPolyline.js (https://github.com/pgiraud/openlayers.git) JavaScript · 557 lines
AbbrevsOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 508 lines
✨ Summary
This Java code is a GUI application for managing abbreviations and expansions. It allows users to add, remove, and sort abbreviations based on their text content. The data is stored in a Hashtable
and displayed in a table with two columns: abbreviation and expansion. The application uses a custom comparator to sort the data alphabetically.
This Java code is a GUI application for managing abbreviations and expansions. It allows users to add, remove, and sort abbreviations based on their text content. The data is stored in a Hashtable
and displayed in a table with two columns: abbreviation and expansion. The application uses a custom comparator to sort the data alphabetically.
330 // workaround for Swing's annoying processing of
331 // labels starting with <html>, which often breaks
332 if(valueStr.toLowerCase().startsWith("<html>"))
333 valueStr = ' ' + valueStr;
334 return super.getTableCellRendererComponent(table,valueStr,
471 if(col == 0)
472 {
473 String abbrev1 = a1.abbrev.toLowerCase();
474 String abbrev2 = a2.abbrev.toLowerCase();
479 else
480 {
481 String expand1 = a1.expand.toLowerCase();
482 String expand2 = a2.expand.toLowerCase();
SessionFileConverter.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 133 lines
✨ Summary
This Java program converts old session files to XML format. It scans a directory for .session
files, reads each file line by line, and parses the information into an XML structure. The converted XML is then saved to a new file, replacing the original. This process maintains compatibility with older versions of jEdit sessions.
This Java program converts old session files to XML format. It scans a directory for .session
files, reads each file line by line, and parses the information into an XML structure. The converted XML is then saved to a new file, replacing the original. This process maintains compatibility with older versions of jEdit sessions.
API.java (https://github.com/Minecraftserver-si/AuthDB.git) Java · 845 lines
53 }
54 } else {
55 UserID = MySQL.getfromtable(Config.script_tableprefix + "users", "`user_id`", "username_clean", player.getName().toLowerCase());
56 IsBanned = MySQL.getfromtable(Config.script_tableprefix + "banlist", "`ban_id`", "ban_userid", UserID);
57 if (IsBanned.equalsIgnoreCase("fail")) {
70 }
71 } else {
72 UserID = MySQL.getfromtable(Config.script_tableprefix + "users", "`users_id`", "username_clean",player.getName().toLowerCase());
73 BanReason = MySQL.getfromtable(Config.script_tableprefix + "banlist", "`ban_reason`", "ban_userid", UserID);
74 if (BanReason != "fail" && BanReason != "" && BanReason != null) {
91 }
92 } else {
93 UserID = MySQL.getfromtable(Config.script_tableprefix + "users", "`user_id`", "username_clean", player.getName().toLowerCase());
94 BannedToDate = MySQL.getfromtable(Config.script_tableprefix + "banlist", "`ban_end`", "ban_userid", UserID);
95 if (BannedToDate != "fail") {
ArrayUtils.cls (https://gitlab.com/Aaeinstein54/linguist) Visual Basic for Applications · 458 lines
70 if(strs.size() > 0){
71 for(String str : strs){
72 returnValue.add(str == null ? null : str.toLowerCase());
73 }
74 }
90 }
92 global static List<String> trim(List<String> strs){
93 List<String> returnValue = null;
94 if(strs != null){
150 global static Object[] pluck(SObject[] objectArray, String fieldName){
151 if(isEmpty(objectArray) || fieldName == null || fieldName.trim() == null || fieldName.trim().length() == 0){
152 return new Object[]{};
153 }
cutter.developer.js (https://gitlab.com/Mirros/jsdelivr) JavaScript · 546 lines
218 };
219 /**
220 * trim is an utilities method used to keep out all the spaces before or after the sentence
221 * @member Cutter.prototype
222 * @author Tomas Corral Casas
223 * @param {string} sString This is the text to be trimmed
224 * @private
225 * @return the trimmed string
226 * @type String
227 */
228 Cutter.prototype.trim = function (sString) {
229 return sString.replace(/^\s+/g, '').replace(/\s+$/g, '');
230 };
GetterUtil.java (https://github.com/danielreuther/liferay-portal.git) Java · 1110 lines
176 try {
177 return new BigDecimal(valueString.trim());
178 }
179 catch (NumberFormatException numberFormatException) {
244 }
246 value = StringUtil.toLowerCase(value);
247 value = value.trim();
266 try {
267 Date date = dateFormat.parse(value.trim());
269 if (date != null) {
280 if (value != null) {
281 try {
282 return Double.parseDouble(value.trim());
283 }
284 catch (Exception exception) {
FragmentEntryLocalServiceTest.java (https://github.com/danielreuther/liferay-portal.git) Java · 1138 lines
114 Assert.assertEquals(
115 StringUtil.toLowerCase(fragmentEntryKey),
116 persistedFragmentEntry.getFragmentEntryKey());
117 Assert.assertEquals(name, persistedFragmentEntry.getName());
155 Assert.assertEquals(
156 StringUtil.toLowerCase(fragmentEntryKey),
157 persistedFragmentEntry.getFragmentEntryKey());
158 Assert.assertEquals(name, persistedFragmentEntry.getName());
193 Assert.assertEquals(
194 StringUtil.toLowerCase(fragmentEntryKey),
195 persistedFragmentEntry.getFragmentEntryKey());
196 Assert.assertEquals(name, persistedFragmentEntry.getName());
tip34.html
(https://jedit.svn.sourceforge.net/svnroot/jedit)
HTML · 23 lines
✨ Summary
This HTML code explains how to use BeanShell scripting in a search dialog box for replacing strings or regular expressions in an HTML file. It provides an example of converting HTML tags to lower case by searching for <code>...</code>
and replacing with "<" + _1.toLowerCase() + ">"
.
This HTML code explains how to use BeanShell scripting in a search dialog box for replacing strings or regular expressions in an HTML file. It provides an example of converting HTML tags to lower case by searching for <code>...</code>
and replacing with "<" + _1.toLowerCase() + ">"
.
KeyEventTranslator.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 365 lines
✨ Summary
This Java code is a key event translator for handling keyboard events on different operating systems. It maps Java modifier flags to symbolic names and translates them into strings that can be used in event handling. The code also includes a Key
class to represent individual key events with modifiers, keys, and input characters.
This Java code is a key event translator for handling keyboard events on different operating systems. It maps Java modifier flags to symbolic names and translates them into strings that can be used in event handling. The code also includes a Key
class to represent individual key events with modifiers, keys, and input characters.
colors.js
(http://enginey.googlecode.com/svn/trunk/)
JavaScript · 233 lines
✨ Summary
This JavaScript code defines a set of color constants and assigns them to an object called Color
. It creates a comprehensive list of colors, including their RGB values, which can be used in web development for styling and design purposes. The colors are organized alphabetically and can be accessed using the dot notation, e.g., Color.lavender
would return the color with the value [230, 230, 250]
.
This JavaScript code defines a set of color constants and assigns them to an object called Color
. It creates a comprehensive list of colors, including their RGB values, which can be used in web development for styling and design purposes. The colors are organized alphabetically and can be accessed using the dot notation, e.g., Color.lavender
would return the color with the value [230, 230, 250]
.
Answer.java (https://bitbucket.org/Schimodie/aiprojectqa.git) Java · 533 lines
BshClassPath.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 888 lines
✨ Summary
This Java code defines a class BshClassPath
that represents a classpath for a Java application. It provides methods to add URLs, map classes, and provide feedback on the mapping process through listeners. The class also handles loading of class files from disk and provides an interface for external feedback mechanisms.
This Java code defines a class BshClassPath
that represents a classpath for a Java application. It provides methods to add URLs, map classes, and provide feedback on the mapping process through listeners. The class also handles loading of class files from disk and provides an interface for external feedback mechanisms.
510 public static boolean isClassFileName( String name ){
511 return ( name.toLowerCase().endsWith(".class") );
512 //&& (name.indexOf('$')==-1) );
513 }
515 public static boolean isArchiveFileName( String name ){
516 name = name.toLowerCase();
517 return ( name.endsWith(".jar") || name.endsWith(".zip") );
518 }
GUIUtilities.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1838 lines
✨ Summary
This Java code provides utility methods for a text editor, specifically for GUI-related tasks. It includes functionality for displaying a splash screen, advancing its progress, and saving the size of frames and windows. The SizeSaver
class is used to continually save a frame’s size when it is resized or moved.
This Java code provides utility methods for a text editor, specifically for GUI-related tasks. It includes functionality for displaying a splash screen, advancing its progress, and saving the size of frames and windows. The SizeSaver
class is used to continually save a frame’s size when it is resized or moved.
377 if(index != -1 && label.length() - index > 1)
378 {
379 mnemonic = Character.toLowerCase(label.charAt(index + 1));
380 label = label.substring(0,index).concat(label.substring(++index));
381 }
411 if(index != -1 && label.length() - index > 1)
412 {
413 mnemonic = Character.toLowerCase(label.charAt(index + 1));
414 label = label.substring(0,index).concat(label.substring(++index));
415 }
WebConfigParamUtils.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 709 lines
PerspectivationPositionTest.java (https://gitlab.com/monochromata-de/de.monochromata.eclipse.anaphors) Java · 859 lines
230 position.notify(new DocumentEvent(), document);
232 assertThat(position.getToLowerCasePositions()).containsExactly(new ToLowerCasePosition(10));
233 }
410 @Test
411 public void documentRetainsToLowerCaseOfUnaffectedPositionOnDeletion() throws Exception {
412 document.set("The Quick Brown Fox Is Slow Today.");
413 final PerspectivationPosition position = new PerspectivationPosition(19, 5, event -> true,
414 asList(new Perspectivation.ToLowerCase(0)));
415 originDocument.addPosition(PERSPECTIVATION_CATEGORY, position);
416 position.notify(new DocumentEvent(document, 0, 0, ""), document);
Domain.java (https://github.com/revolsys/com.revolsys.open.git) Java · 358 lines
64 this.idValueMap.put(identifier, values);
65 this.stringIdMap.put(code.toString(), identifier);
66 this.valueIdMap.put(name.toLowerCase(), identifier);
67 if (code instanceof Number) {
68 final int id = ((Number)code).intValue();
155 return this.stringIdMap.get(value.toString());
156 } else {
157 final String lowerValue = ((String)value).toLowerCase();
158 final Identifier id = this.valueIdMap.get(lowerValue);
159 return id;
tip34.html
(https://jedit.svn.sourceforge.net/svnroot/jedit)
HTML · 20 lines
✨ Summary
This HTML code displays a snippet explaining how to use BeanShell to convert HTML tags to lower case. It shows an example regular expression for matching HTML tags and a corresponding BeanShell script that converts the matched text to lower case, replacing it in the original string. The goal is to demonstrate a way to automate this task using BeanShell.
This HTML code displays a snippet explaining how to use BeanShell to convert HTML tags to lower case. It shows an example regular expression for matching HTML tags and a corresponding BeanShell script that converts the matched text to lower case, replacing it in the original string. The goal is to demonstrate a way to automate this task using BeanShell.
StandardUtilities.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 492 lines
✨ Summary
This Java code provides a set of utility methods for string manipulation, comparison, and regular expression conversion. It includes functions for comparing strings, checking object equality, converting Unix-style glob patterns to regular expressions, and more. The code is part of a larger class called StandardUtilities
and appears to be designed for use in an integrated development environment (IDE) or text editor.
This Java code provides a set of utility methods for string manipulation, comparison, and regular expression conversion. It includes functions for comparing strings, checking object equality, converting Unix-style glob patterns to regular expressions, and more. The code is part of a larger class called StandardUtilities
and appears to be designed for use in an integrated development environment (IDE) or text editor.
SettingsReloader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 96 lines
✨ Summary
This Java class, SettingsReloader
, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate
messages from the JEdit editor and checks if the updated path starts with specific directories (e.g., macros
or modes
). If it does, it reloads the corresponding settings.
This Java class, SettingsReloader
, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate
messages from the JEdit editor and checks if the updated path starts with specific directories (e.g., macros
or modes
). If it does, it reloads the corresponding settings.
GetterUtil.java (https://github.com/kiyoshilee/liferay-portal.git) Java · 1110 lines
176 try {
177 return new BigDecimal(valueString.trim());
178 }
179 catch (NumberFormatException nfe) {
244 }
246 value = StringUtil.toLowerCase(value);
247 value = value.trim();
266 try {
267 Date date = dateFormat.parse(value.trim());
269 if (date != null) {
280 if (value != null) {
281 try {
282 return Double.parseDouble(value.trim());
283 }
284 catch (Exception e) {
AbstractDelegatingCache.java (https://github.com/wburns/infinispan.git) Java · 641 lines
jquery.quiz.js (https://bitbucket.org/reinholdsson/slidifyexamples.git) JavaScript · 565 lines
385 if ( !self.caseSensitive ) {
386 userAnswer = userAnswer.toLowerCase();
387 if ( self.answer )
388 self.answer = self.answer.toLowerCase();
389 }
391 if ( !self.notrim ) {
392 userAnswer = $.trim(userAnswer);
393 self.answer = $.trim(self.answer);
394 if ( self.answer )
395 self.answer = self.answer.toLowerCase();
485 self.caseSensitive = self.question.attr('data-sensitive') != undefined;
486 self.notrim = self.question.attr('data-notrim') != undefined;
488 $('.quiz-clear', self.question).each(function() {
VoxSpellPainter.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 325 lines
✨ Summary
This Java code is part of a spell-checking system for an integrated development environment (IDE). It checks words in a line of text against a dictionary to determine if they are valid or not. The code uses a combination of tokenization and string matching to identify invalid words, and it can be used to highlight or underline these words in the IDE’s editor.
This Java code is part of a spell-checking system for an integrated development environment (IDE). It checks words in a line of text against a dictionary to determine if they are valid or not. The code uses a combination of tokenization and string matching to identify invalid words, and it can be used to highlight or underline these words in the IDE’s editor.
184 boolean user_only)
185 {
186 String trim_word = word.trim();
187 String low_word = trim_word.toLowerCase();
189 if (trim_word.length() == 0)
190 return true;
191 if (low_word.length() == 1)
192 return true;
193 if (trim_word.endsWith("'") && trim_word.length() == 2)
194 return true;
195 Character c = trim_word.charAt(0);
224 if (user_only) {
225 return user_checker.find(low_word) ||
226 user_checker.find(trim_word) ||
227 ignore_checker.find(low_word) ||
228 ignore_checker.find(trim_word);
properties.js (https://gitlab.com/nguyenthehiep3232/marius) JavaScript · 1687 lines
161 var backgroundRepeat_local_var_parse = function parse(v) {
162 if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {
163 return v;
164 }
185 var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {
186 return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
187 };
507 var borderCollapse_local_var_parse = function parse(v) {
508 if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {
509 return v;
510 }
Furniture.java (https://github.com/GitLance/cappo-Java.git) Java · 427 lines
85 if(Item.Type.equals("s"))
86 {
87 String ItemName = Item.ItemName.toLowerCase();
89 if(Item.PublicName.startsWith("WIRED Trigger:"))
276 }
277 }
278 else if(Item.PublicName.toLowerCase().contains("chair"))
279 {
280 Item.IsSeat = true;
284 Item.IsSeat = true;
285 }
286 else if(Item.PublicName.toLowerCase().contains("bed"))
287 {
288 Item.Interaction = BED;
RequestManager.java (https://github.com/masp/SimpleClans.git) Java · 515 lines
49 String msg = MessageFormat.format(plugin.getLang().getString("asking.for.the.demotion"), Helper.capitalize(requester.getName()), demotedName);
51 ClanPlayer demotedTp = plugin.getClanManager().getClanPlayer(demotedName.toLowerCase());
53 List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(clan.getLeaders());
107 String msg = MessageFormat.format(plugin.getLang().getString("inviting.you.to.join"), Helper.capitalize(requester.getName()), clan.getName());
108 Request req = new Request(plugin, ClanRequest.INVITE, null, requester, invitedName, clan, msg);
109 requests.put(invitedName.toLowerCase(), req);
110 ask(req);
111 }
262 }
264 requests.remove(req.getTarget().toLowerCase());
265 }
EnhancedMenu.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 68 lines
✨ Summary
This Java class, EnhancedMenu, extends JMenu to create a custom menu for jEdit. It loads menu items from properties files and adds them to the menu based on their names. The menu’s label and mnemonic are also set according to the properties file. It uses GUIUtilities to load menu items and separators.
This Java class, EnhancedMenu, extends JMenu to create a custom menu for jEdit. It loads menu items from properties files and adds them to the menu based on their names. The menu’s label and mnemonic are also set according to the properties file. It uses GUIUtilities to load menu items and separators.
HelpSearchPanel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 301 lines
✨ Summary
This Java code implements a search functionality for a help viewer GUI. It allows users to search for specific keywords within the help documentation, displaying relevant results in a list with ranking scores. The search is case-insensitive and ignores punctuation. When a result is selected, it opens the corresponding URL in the help viewer.
This Java code implements a search functionality for a help viewer GUI. It allows users to search for specific keywords within the help documentation, displaying relevant results in a list with ranking scores. The search is case-insensitive and ignores punctuation. When a result is selected, it opens the corresponding URL in the help viewer.
CodeGenerationASTTransformsTest.groovy (https://github.com/lhotari/groovy-core.git) Groovy · 1051 lines
ActionBar.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 555 lines
✨ Summary
This Java code implements a custom text editor’s action bar, which provides a dropdown list of possible actions (e.g., “Open File”, “Save File”). The action bar is triggered by pressing the Tab key while editing. When an action is selected, it invokes a corresponding method on the action
object. The action bar also handles keyboard shortcuts for common operations like escaping and entering new text.
This Java code implements a custom text editor’s action bar, which provides a dropdown list of possible actions (e.g., “Open File”, “Save File”). The action bar is triggered by pressing the Tab key while editing. When an action is selected, it invokes a corresponding method on the action
object. The action bar also handles keyboard shortcuts for common operations like escaping and entering new text.
109 else
110 {
111 cmd = action.getText().trim();
112 int index = cmd.indexOf('=');
113 if(index != -1)
114 {
115 action.addCurrentToHistory();
116 String propName = cmd.substring(0,index).trim();
117 String propValue = cmd.substring(index + 1).trim();
214 private String[] getCompletions(String str)
215 {
216 str = str.toLowerCase();
217 String[] actions = jEdit.getActionNames();
218 ArrayList returnValue = new ArrayList(actions.length);
219 for(int i = 0; i < actions.length; i++)
220 {
221 if(actions[i].toLowerCase().indexOf(str) != -1)
222 returnValue.add(actions[i]);
223 }
jquery.validate-vsdoc.js
(https://hg01.codeplex.com/fsharpmvc3vsix)
JavaScript · 1300 lines
✨ Summary
This JavaScript code provides a set of utility functions and plugins for jQuery, including:
- A validator plugin for form validation
- An AJAX abort function to cancel previous requests
- Cross-browser focusin and focusout event handling
- Event delegation functionality using the
validateDelegate
method.
It appears to be a collection of miscellaneous utilities for working with forms and AJAX requests in jQuery.
This JavaScript code provides a set of utility functions and plugins for jQuery, including:
- A validator plugin for form validation
- An AJAX abort function to cancel previous requests
- Cross-browser focusin and focusout event handling
- Event delegation functionality using the
validateDelegate
method.
It appears to be a collection of miscellaneous utilities for working with forms and AJAX requests in jQuery.
212 $.extend($.expr[":"], {
213 // http://docs.jquery.com/Plugins/Validation/blank
214 blank: function(a) {return !$.trim("" + a.value);},
215 // http://docs.jquery.com/Plugins/Validation/filled
216 filled: function(a) {return !!$.trim("" + a.value);},
786 getLength: function(value, element) {
787 switch( element.nodeName.toLowerCase() ) {
788 case 'select':
789 return $("option:selected", element).length;
815 optional: function(element) {
816 return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
817 },
jquery-ui-1.8.11.js
(https://hg01.codeplex.com/fsharpmvc3vsix)
JavaScript · 11701 lines
✨ Summary
This JavaScript code defines four jQuery UI effects: slide
, transfer
, shake
, and slide
. It creates animations for elements to slide, transfer position, shake, or slide with a last shake effect. The effects are triggered by calling the corresponding function on a jQuery object, passing an options object that configures the animation’s duration, easing, and other properties.
This JavaScript code defines four jQuery UI effects: slide
, transfer
, shake
, and slide
. It creates animations for elements to slide, transfer position, shake, or slide with a last shake effect. The effects are triggered by calling the corresponding function on a jQuery object, passing an options object that configures the animation’s duration, easing, and other properties.
137 $.each( [ "Width", "Height" ], function( i, name ) {
138 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
139 type = name.toLowerCase(),
140 orig = {
141 innerWidth: $.fn.innerWidth,
194 focusable: function( element ) {
195 var nodeName = element.nodeName.toLowerCase(),
196 tabIndex = $.attr( element, "tabindex" );
197 if ( "area" === nodeName ) {
199 mapName = map.name,
200 img;
201 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
202 return false;
203 }
effects.js
(git://github.com/kingarawana/testapp.git)
JavaScript · 1123 lines
✨ Summary
This JavaScript code defines a set of visual effects and utility functions for manipulating HTML elements, such as fading, animating, highlighting, and modifying element styles. It also provides methods for getting inline styles, forcing re-rendering, and collecting text nodes from an element. The effects are designed to be reusable and can be chained together to create complex animations.
This JavaScript code defines a set of visual effects and utility functions for manipulating HTML elements, such as fading, animating, highlighting, and modifying element styles. It also provides methods for getting inline styles, forcing re-rendering, and collecting text nodes from an element. The effects are designed to be reusable and can be chained together to create complex animations.
19 } else {
20 if (this.slice(0,1) == '#') {
21 if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
22 if (this.length==7) color = this.toLowerCase();
150 toggle: function(element, effect, options) {
151 element = $(element);
152 effect = (effect || 'appear').toLowerCase();
154 return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({
FileHandler.java
(http://keywatch.googlecode.com/svn/trunk/)
Java · 428 lines
✨ Summary
This Java code is part of a file handler that processes XML events from an XML-RPC server. It parses the event XML, extracts relevant information such as severity, description, and source task, and creates an Event
object to represent the parsed data. The code uses various libraries like DOM and XML-RPC to handle the parsing and extraction of data.
This Java code is part of a file handler that processes XML events from an XML-RPC server. It parses the event XML, extracts relevant information such as severity, description, and source task, and creates an Event
object to represent the parsed data. The code uses various libraries like DOM and XML-RPC to handle the parsing and extraction of data.
TypedProperties.java (https://github.com/interdroid/smartsockets.git) Java · 506 lines
MessageHeader.java (https://gitlab.com/UnderSampled/aard2-build) Java · 477 lines
100 if(value == null) {
101 String token = name.toLowerCase();
103 values.remove(token);
352 * will present that values as tokens extracted from the header.
353 * This has obvious performance benefits as it avoids having to
354 * deal with <code>substring</code> and <code>trim</code> calls.
355 * <p>
356 * The tokens returned by this method are ordered according to
360 * there are no "q" values present then order is by appearance.
361 * <p>
362 * The result from this is either the trimmed header value, that
363 * is, the header value with no leading or trailing whitespace
364 * or an array of trimmed tokens ordered with the most preferred
SystemShell.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1069 lines
✨ Summary
This Java code is part of a console shell implementation, likely for an integrated development environment (IDE). It provides functionality for navigating directories, executing commands, and handling user input. The code includes methods for changing the current directory, listing available commands, and parsing command-line arguments with escaped delimiters. It also tracks the last executed directory change and error messages.
This Java code is part of a console shell implementation, likely for an integrated development environment (IDE). It provides functionality for navigating directories, executing commands, and handling user input. The code includes methods for changing the current directory, listing available commands, and parsing command-line arguments with escaped delimiters. It also tracks the last executed directory change and error messages.
886 ArrayList matchingFilenames = new ArrayList(filenames.length);
887 int matchingFilenamesCount = 0;
888 String matchedString = isOSCaseSensitive ? fileName : fileName.toLowerCase();
889 for(int i = 0; i < filenames.length; i++)
890 {
891 String matchedAgainst = isOSCaseSensitive ? filenames[i] : filenames[i].toLowerCase();
893 if(matchedAgainst.startsWith(matchedString))
Locator.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 597 lines
✨ Summary
This Java code provides utility methods for working with Java classes, files, and URLs. It can load Sun compiler tools, find jar files in a location, scan directories for matching files, and more. The code is designed to be used by the Eclipse IDE’s Java Development Tools (JDT) project.
This Java code provides utility methods for working with Java classes, files, and URLs. It can load Sun compiler tools, find jar files in a location, scan directories for matching files, and more. The code is designed to be used by the Eclipse IDE’s Java Development Tools (JDT) project.
287 File f = new File( path );
288 // check for jar or zip
289 if ( path.toLowerCase().endsWith( ".jar" ) || path.toLowerCase().endsWith( ".zip" ) ) {
290 List names = getJarClassNames( f );
291 if ( names != null ) {
294 }
295 // check for individual class
296 else if ( path.toLowerCase().endsWith( ".class" ) ) {
297 allnames.add( f.getName().substring( 0, f.getName().lastIndexOf( "." ) ) );
298 }
509 // based on java.home setting
510 String javaHome = System.getProperty( "java.home" );
511 if ( javaHome.toLowerCase( Locale.US ).endsWith( "jre" ) ) {
512 javaHome = javaHome.substring( 0, javaHome.length() - 4 );
513 }
FieldDeclaration.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 249 lines
✨ Summary
This Java class represents a Field Declaration in PHP, which is a variable declaration for a php class. It extends Statement and implements various interfaces to provide information about the field, such as its name, path, and variables. It also provides methods to analyze code and get the field’s expression at a specific line and column.
This Java class represents a Field Declaration in PHP, which is a variable declaration for a php class. It extends Statement and implements various interfaces to provide information about the field, such as its name, path, and variables. It also provides methods to analyze code and get the field’s expression at a specific line and column.
SettingsReloader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 81 lines
✨ Summary
This Java class, SettingsReloader
, is a utility that reloads macros and modes when necessary. It listens for VFSUpdate
messages to check if files have changed in the settings directory or JEdit home directory. If a file has changed, it updates the corresponding macro or mode settings accordingly.
This Java class, SettingsReloader
, is a utility that reloads macros and modes when necessary. It listens for VFSUpdate
messages to check if files have changed in the settings directory or JEdit home directory. If a file has changed, it updates the corresponding macro or mode settings accordingly.
TextUtilities.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 714 lines
✨ Summary
This Java code provides various string manipulation and formatting functions, including:
- String case detection (mixed, lower case, upper case, title case)
- String conversion to title case
- Line wrapping and formatting for text with a specified maximum line length
- Leading whitespace trimming and calculation
- Tokenization of strings into words
These functions can be used in various applications, such as text editing or formatting.
This Java code provides various string manipulation and formatting functions, including:
- String case detection (mixed, lower case, upper case, title case)
- String conversion to title case
- Line wrapping and formatting for text with a specified maximum line length
- Leading whitespace trimming and calculation
- Tokenization of strings into words
These functions can be used in various applications, such as text editing or formatting.
SearchAndReplace.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 909 lines
✨ Summary
This Java code implements a search and replace functionality for a text editor. It allows users to set various options, such as case sensitivity and regular expression usage, and then performs a global search and replacement of specified strings within a buffer. The code also records the actions taken during the process for debugging purposes.
This Java code implements a search and replace functionality for a text editor. It allows users to set various options, such as case sensitivity and regular expression usage, and then performs a global search and replacement of specified strings within a buffer. The code also records the actions taken during the process for debugging purposes.
FilteredTreeModel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 498 lines
✨ Summary
This Java code implements a custom tree model that filters nodes based on visibility. It provides methods to set and reset the visible nodes, as well as add and remove listeners for events related to node changes. The TreeNodeParentProvider
class is used to retrieve parent nodes in a tree structure. It allows for customization of how parents are retrieved from nodes.
This Java code implements a custom tree model that filters nodes based on visibility. It provides methods to set and reset the visible nodes, as well as add and remove listeners for events related to node changes. The TreeNodeParentProvider
class is used to retrieve parent nodes in a tree structure. It allows for customization of how parents are retrieved from nodes.
LFont.java
(http://loon-simple.googlecode.com/svn/trunk/)
Java · 308 lines
✨ Summary
This Java code defines a class LFont
that represents a font used for rendering text on an Android screen. It provides methods to create and manipulate fonts, including getting font metrics, measuring text width, and setting font styles. The class is designed to work with the Android system’s font management system.
This Java code defines a class LFont
that represents a font used for rendering text on an Android screen. It provides methods to create and manipulate fonts, including getting font metrics, measuring text width, and setting font styles. The class is designed to work with the Android system’s font management system.
AStyle.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 694 lines
✨ Summary
This is a help message for an AStyle command-line tool, explaining its options and usage. It provides detailed information on various formatting and configuration options, including file naming conventions, error handling, and version control. The output explains how to use the tool, what options are available, and where default settings can be found.
This is a help message for an AStyle command-line tool, explaining its options and usage. It provides detailed information on various formatting and configuration options, including file naming conventions, error handling, and version control. The output explains how to use the tool, what options are available, and where default settings can be found.
ShortcutsOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 358 lines
✨ Summary
This Java code is a part of an application that manages shortcuts for various applications. It creates a table model to display and edit shortcuts, with columns for shortcut name, first shortcut, and second shortcut. The model allows users to add, edit, and delete shortcuts, and saves the changes to the system’s properties.
This Java code is a part of an application that manages shortcuts for various applications. It creates a table model to display and edit shortcuts, with columns for shortcut name, first shortcut, and second shortcut. The model allows users to add, edit, and delete shortcuts, and saves the changes to the system’s properties.
BinaryDictionary.java
(http://softkeyboard.googlecode.com/svn/)
Java · 163 lines
✨ Summary
This Java class, BinaryDictionary
, implements a static binary dictionary of standard words for an Android application. It loads and compiles a raw resource file into a native library, allowing for efficient word suggestions and validation. The class provides methods to load the dictionary, get words from input codes, validate words, and close the dictionary.
This Java class, BinaryDictionary
, implements a static binary dictionary of standard words for an Android application. It loads and compiles a raw resource file into a native library, allowing for efficient word suggestions and validation. The class provides methods to load the dictionary, get words from input codes, validate words, and close the dictionary.
HtmlScrubber.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 148 lines
✨ Summary
This Java class, HtmlScrubber
, is a Visitor that cleans up an HTML document tree by applying various transformations to its elements and attributes. It can convert tag names and attribute values to uppercase or lowercase, strip unnecessary quotes, and trim spaces from text nodes. The scrubbing options are customizable through a bitmask.
This Java class, HtmlScrubber
, is a Visitor that cleans up an HTML document tree by applying various transformations to its elements and attributes. It can convert tag names and attribute values to uppercase or lowercase, strip unnecessary quotes, and trim spaces from text nodes. The scrubbing options are customizable through a bitmask.
34 public static final int ATTR_DOWNCASE = 8;
35 public static final int STRIP_QUOTES = 16;
36 public static final int TRIM_SPACES = 32;
37 public static final int DEFAULT_OPTIONS =
38 TAGS_DOWNCASE | ATTR_DOWNCASE | STRIP_QUOTES;
83 t.tagName = t.tagName.toUpperCase();
84 else if ((flags & TAGS_DOWNCASE) != 0)
85 t.tagName = t.tagName.toLowerCase();
86 for (Iterator it=t.attributeList.attributes.iterator(); it.hasNext(); ) {
87 HtmlDocument.Attribute a = (HtmlDocument.Attribute) it.next();
89 a.name = a.name.toUpperCase();
90 else if ((flags & ATTR_DOWNCASE) != 0)
91 a.name = a.name.toLowerCase();
92 if (((flags & STRIP_QUOTES) != 0)
93 && a.hasValue
JavadocPlugin.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 172 lines
✨ Summary
This Java code is a plugin for the JEdit text editor, specifically designed to manage and search Java API documentation. It allows users to add and remove API roots from a list, which are used to search for class names in HTML files within those directories. The plugin also provides an action set with commands related to searching and resolving class names.
This Java code is a plugin for the JEdit text editor, specifically designed to manage and search Java API documentation. It allows users to add and remove API roots from a list, which are used to search for class names in HTML files within those directories. The plugin also provides an action set with commands related to searching and resolving class names.
SyntaxHiliteOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 418 lines
✨ Summary
This Java code creates a graphical user interface (GUI) for editing syntax highlighting styles. It allows users to select font attributes, colors, and background colors for different text elements. The GUI is presented in a dialog box with buttons for “OK” and “Cancel”. When the user clicks “OK”, the selected style is returned as a SyntaxStyle
object, which can be used to apply the changes to a text editor or other application.
This Java code creates a graphical user interface (GUI) for editing syntax highlighting styles. It allows users to select font attributes, colors, and background colors for different text elements. The GUI is presented in a dialog box with buttons for “OK” and “Cancel”. When the user clicks “OK”, the selected style is returned as a SyntaxStyle
object, which can be used to apply the changes to a text editor or other application.
simple.tagx (https://bitbucket.org/zzha4573/readertest.git) Unknown · 35 lines
AbbrevsOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 504 lines
✨ Summary
This Java code defines a GUI application for managing abbreviations and expansions. It creates a table model to store abbreviations and their corresponding expansions, allowing users to add, remove, and sort entries. The table is displayed in a GUI window with two columns: one for the abbreviation and one for the expansion.
This Java code defines a GUI application for managing abbreviations and expansions. It creates a table model to store abbreviations and their corresponding expansions, allowing users to add, remove, and sort entries. The table is displayed in a GUI window with two columns: one for the abbreviation and one for the expansion.
328 // workaround for Swing's annoying processing of
329 // labels starting with <html>, which often breaks
330 if(valueStr.toLowerCase().startsWith("<html>"))
331 valueStr = ' ' + valueStr;
332 return super.getTableCellRendererComponent(table,valueStr,
470 if(col == 0)
471 {
472 String abbrev1 = a1.abbrev.toLowerCase();
473 String abbrev2 = a2.abbrev.toLowerCase();
478 else
479 {
480 String expand1 = a1.expand.toLowerCase();
481 String expand2 = a2.expand.toLowerCase();
ExpandableDictionary.java
(http://scandinavian-keyboard.googlecode.com/svn/trunk/)
Java · 458 lines
✨ Summary
This Java code outputs a hexadecimal representation of Unicode character codes, mapping each code to its corresponding Unicode character. The data is generated from a file called UnicodeData.txt
and is used to create a lookup table for easy access to Unicode characters by their code points.
This Java code outputs a hexadecimal representation of Unicode character codes, mapping each code to its corresponding Unicode character. The data is generated from a file called UnicodeData.txt
and is used to create a lookup table for easy access to Unicode characters by their code points.
207 final Node node = roots.data[i];
208 final char c = node.code;
209 final char lowerC = toLowerCase(c);
210 final boolean terminal = node.terminal;
211 final NodeArray children = node.children;
270 }
272 static char toLowerCase(char c) {
273 if (c < BASE_CHARS.length) {
274 c = BASE_CHARS[c];
277 c = (char) (c | 32);
278 } else if (c > 127) {
279 c = Character.toLowerCase(c);
280 }
281 return c;