100+ results for 'startswith windows 9'
Not the results you expected?
useCurrentColorScheme.js (https://gitlab.com/sagefhopkins/hopkinsdev) JavaScript · 231 lines
identifier.js (https://gitlab.com/nguyenthehiep3232/marius) JavaScript · 377 lines
7 const path = require("path");
9 const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/;
10 const SEGMENTS_SPLIT_REGEXP = /([|!])/;
11 const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g;
19 if (relativePath === "") return "./.";
20 if (relativePath === "..") return "../.";
21 if (relativePath.startsWith("../")) return relativePath;
22 return `./${relativePath}`;
23 };
77 */
78 const requestToAbsolute = (context, relativePath) => {
79 if (relativePath.startsWith("./") || relativePath.startsWith("../"))
80 return path.join(context, relativePath);
81 return relativePath;
FileUtil.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 468 lines
354 * Returns the given filename in the platform independent way that Java
355 * understands. That is all elements are separated by a forward slash rather
356 * than back slashes as on Windows systems.
357 *
358 * @param filename The name to be modified
389 filename = this.javaFilename(filename) ;
390 startedFromRoot = filename.startsWith( "/" ) ;
391 nameElements = this.str().parts( filename, "/" ) ;
392 if ( nameElements.length > 0 )
RegistryUtil.cs (https://gitlab.com/nerdymishka/kweh) C# · 320 lines
20 return false;
22 return left.StartsWith(right);
23 };
25 var list = new List<string>()
26 {
27 @"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",
28 @"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall",
29 @"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",
30 @"HKCU:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall",
31 $"HKU:\\{sid}\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall",
32 $"HKU:\\{sid}\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall",
MainWindow.xaml.cs (https://github.com/Comfy-Mittens/Digital-World.git) C# · 230 lines
3 using System.Linq;
4 using System.Text;
5 using System.Windows;
6 using System.Windows.Controls;
7 using System.Windows.Data;
8 using System.Windows.Documents;
9 using System.Windows.Input;
10 using System.Windows.Media;
11 using System.Windows.Media.Imaging;
12 using System.Windows.Navigation;
13 using System.Windows.Shapes;
14 using System.Threading;
PasteFromListDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 248 lines
✨ Summary
This Java code defines a dialog box for pasting text from a list of clips. The dialog allows users to select multiple clips and paste their contents into the current editor’s text area. It also includes buttons for inserting and canceling the operation, with default button set to insert. The dialog updates its behavior based on the selected clips.
This Java code defines a dialog box for pasting text from a list of clips. The dialog allows users to select multiple clips and paste their contents into the current editor’s text area. It also includes buttons for inserting and canceling the operation, with default button set to insert. The dialog updates its behavior based on the selected clips.
_MozillaCookieJar.py (https://github.com/atoun/jsrepl.git) Python · 149 lines
19 Don't expect cookies saved while the browser is running to be noticed by
20 the browser (in fact, Mozilla on unix will overwrite your saved cookies if
21 you change them on disk while it's running; on Windows, you probably can't
22 save at all while the browser is running).
65 # skip comments and blank lines XXX what is $ for?
66 if (line.strip().startswith(("#", "$")) or
67 line.strip() == ""):
68 continue
79 value = None
81 initial_dot = domain.startswith(".")
82 assert domain_specified == initial_dot
VFSBrowser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1981 lines
✨ Summary
This Java code is part of a file manager application, specifically a GUI component for selecting and filtering files. It provides functionality for navigating through directories, applying filters to files, and displaying file information in a graphical user interface. The code includes various classes and interfaces for handling file operations, filters, and rendering file names.
This Java code is part of a file manager application, specifically a GUI component for selecting and filtering files. It provides functionality for navigating through directories, applying filters to files, and displaying file information in a graphical user interface. The code includes various classes and interfaces for handling file operations, filters, and rendering file names.
filebased.py (https://gitlab.com/areema/myproject) Python · 154 lines
Files.java (https://github.com/tazmaniax/play1.git) Java · 229 lines
28 /**
29 * Characters that are invalid in Windows OS file names (Unix only forbids '/' character)
30 */
31 public static final char[] ILLEGAL_FILENAME_CHARS = { 34, 60, 62, 124, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
138 }
139 File f = new File(to, entry.getName());
140 if (!f.getCanonicalPath().startsWith(outDir)) {
141 throw new IOException("Corrupted zip file");
142 }
164 /**
165 * Replace all characters that are invalid in file names on Windows or Unix operating systems with
166 * {@link Files#ILLEGAL_FILENAME_CHARS_REPLACE} character.
167 * <p>
file_path_utils.cc (https://github.com/draco003/chromium.git) C++ · 161 lines
130 // it doesn't have a separator in the right place, then it also
131 // can't be a child, so we return the absolute path to the child.
132 // file_util::AbsolutePath() normalizes '/' to '\' on Windows, so we
133 // only need to check kSeparators[0].
134 if (child_str.length() <= parent_str.length() ||
140 if (
141 #if defined(OS_WIN)
142 // file_util::AbsolutePath() does not flatten case on Windows,
143 // so we must do a case-insensitive compare.
144 StartsWith(child_str, parent_str, false)
145 #else
146 StartsWithASCII(child_str, parent_str, true)
147 #endif
148 ) {
Selection.cs (https://github.com/westybsa/MP.LSharp.git) C# · 440 lines
5 using System.ComponentModel;
7 namespace Fireball.Windows.Forms.CodeEditor
8 {
9 /// <summary>
251 ActionGroup.Add(b);
252 string s = xtr.Text;
253 if (s.StartsWith("\t"))
254 {
255 b.Text = s.Substring(0, 1);
256 s = s.Substring(1);
257 }
258 if (s.StartsWith(" "))
259 {
260 b.Text = s.Substring(0, 4);
Helpers.cs (https://gitlab.com/jslee1/azure-powershell) C# · 199 lines
16 using Microsoft.Azure.Commands.Batch.Properties;
17 using Microsoft.Azure.Management.Batch.Models;
18 using Microsoft.WindowsAzure.Commands.Utilities.Common;
19 using System;
20 using System.Collections;
140 if (tagValuePair != null)
141 {
142 if (tagValuePair.Name.StartsWith(ExcludedTagPrefix))
143 {
144 continue;
popup.py (https://github.com/bollwyvl/MagicDrawJythonTerminal.git) Python · 178 lines
dsym.d (https://github.com/CyberShadow/DMapTreeMap.git) D · 253 lines
22 catch (Throwable t) {}
24 if (sym.startsWith("__D"))
25 sym = sym[1..$];
58 foreach (ref seg; segments)
59 {
60 if (seg.startsWith("extern (C) "))
61 seg = seg["extern (C) ".length..$];
62 if (seg.lastIndexOf(' ')>=0)
72 }
74 if (segments[0].startsWith("TypeInfo_"))
75 {
76 // _D71TypeInfo_S4core3sys7windows8setupapi11__mixin114220SP_DRVINFO_DATA_V2_W6__initZ
JavaEnvUtilsTest.java (https://bitbucket.org/kaendfinger/apache-ant.git) Java · 140 lines
46 }
48 public void testGetExecutableWindows() {
49 if (Os.isFamily("windows")) {
57 try {
58 assertTrue(j+" is normalized and in the JRE dir",
59 j.startsWith(javaHome));
60 } catch (AssertionFailedError e) {
61 // java.home is bogus
70 FILE_UTILS.normalize(javaHome+"/..").getAbsolutePath();
71 assertTrue(j+" is normalized and in the JDK dir",
72 j.startsWith(javaHomeParent));
73 assertTrue(j+" is normalized and not in the JRE dir",
74 !j.startsWith(javaHome));
86 public void testGetExecutableMostPlatforms() {
87 if (!Os.isName("netware") && !Os.isFamily("windows")) {
88 String javaHome =
89 FILE_UTILS.normalize(System.getProperty("java.home"))
VFSBrowser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 2199 lines
✨ Summary
This Java code is part of a file browser application, specifically handling the display and editing of file paths and filters. It provides functionality for displaying a list of files, filtering by type, and editing the filter settings using a combo box editor. The code also handles various events such as focus changes and item state changes in the combo box.
This Java code is part of a file browser application, specifically handling the display and editing of file paths and filters. It provides functionality for displaying a list of files, filtering by type, and editing the filter settings using a combo box editor. The code also handles various events such as focus changes and item state changes in the combo box.
610 public void setDirectory(String path)
611 {
612 if(path.startsWith("file:"))
613 path = path.substring(5);
614 path = MiscUtilities.expandVariables(path);
629 public static String getRootDirectory()
630 {
631 if(OperatingSystem.isMacOS() || OperatingSystem.isWindows())
632 return FileRootsVFS.PROTOCOL + ':';
633 else
UnknownSubtitle55.cs (https://gitlab.com/minaz922/subtitleedit) C# · 162 lines
RunScript.cs (https://github.com/yiketudou/gitextensions.git) C# · 312 lines
2 using GitCommands;
3 using GitUI.Script;
4 using System.Windows.Forms;
6 namespace GitUI.Script
87 if (!string.IsNullOrEmpty(argument) && argument.Contains(option))
88 {
89 if (option.StartsWith("{s") && selectedRevision == null)
90 {
91 if (RevisionGrid == null)
115 }
116 }
117 else if (option.StartsWith("{c") && currentRevision == null)
118 {
119 IList<GitHead> heads;
ansitowin32.py (https://bitbucket.org/acaceres/mr-injector.git) Python · 189 lines
37 class AnsiToWin32(object):
38 '''
39 Implements a 'write()' method which, on Windows, will strip ANSI character
40 sequences from the text, and if outputting to a tty, will convert them into
41 win32 function calls.
53 self.stream = StreamWrapper(wrapped, self)
55 on_windows = sys.platform.startswith('win')
57 # should we strip ANSI sequences from our output?
58 if strip is None:
59 strip = on_windows
60 self.strip = strip
ScriptRunner.cs (https://github.com/fraga/gitextensions.git) C# · 471 lines
5 using System.Linq;
6 using System.Security.Policy;
7 using System.Windows.Forms;
8 using GitCommands;
9 using GitCommands.Config;
54 if (string.IsNullOrEmpty(argument) || !argument.Contains(option))
55 continue;
56 if (!option.StartsWith("{s"))
57 continue;
58 if (revisionGrid != null)
107 if (string.IsNullOrEmpty(argument) || !argument.Contains(option))
108 continue;
109 if (option.StartsWith("{c") && currentRevision == null)
110 {
111 currentRevision = GetCurrentRevision(aModule, revisionGrid, currentTags, currentLocalBranches, currentRemoteBranches, currentBranches, currentRevision);
BaseControlProvider.cs (https://SolutionFramework.svn.codeplex.com/svn) C# · 225 lines
LinkContext.cs (https://github.com/t-ashula/mono.git) C# · 258 lines
mitkProvisioningInfo.cpp (https://github.com/NifTK/MITK.git) C++ · 232 lines
63 do {
64 line = fileStream.readLine().trimmed();
65 if (!line.isEmpty() && !line.startsWith('#'))
66 {
67 QString keyword = line.section(sep, 0, 0);
222 if (value.contains("@EXECUTABLE_DIR") && value.contains("blueberry_osgi"))
223 {
224 // special case for org_blueberry_osgi in install trees for Windows
225 return QString(value).replace("@EXECUTABLE_DIR", appPath, Qt::CaseInsensitive).replace("plugins/", "");
226 }
fileUtilsTests.ts (https://github.com/dsherret/ts-morph.git) TypeScript · 222 lines
25 });
27 describe(nameof(FileUtils.pathStartsWith), () => {
28 it("should return false for a undefined path", () => {
29 expect(FileUtils.pathStartsWith(undefined, "test.ts")).to.be.false;
32 it("should return false for an empty path", () => {
33 expect(FileUtils.pathStartsWith("", "test.ts")).to.be.false;
34 });
36 it("should return true when both are undefined", () => {
37 expect(FileUtils.pathStartsWith(undefined, undefined)).to.be.true;
38 });
juce_PluginHostType.h (https://github.com/baeksanchang/juce.git) C Header · 188 lines
152 if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric;
154 #elif JUCE_WINDOWS
155 if (hostFilename.containsIgnoreCase ("Live 6.")) return AbletonLive6;
156 if (hostFilename.containsIgnoreCase ("Live 7.")) return AbletonLive7;
174 if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric;
175 if (hostFilename.containsIgnoreCase ("rm-host")) return MuseReceptorGeneric;
176 if (hostFilename.startsWithIgnoreCase ("Sam")) return MagixSamplitude;
177 if (hostFilename.startsWith ("FL")) return FruityLoops;
UpdatingFileTree.java (https://github.com/UWNetworksLab/OneSwarm.git) Java · 214 lines
50 public boolean accept(File dir, String name) {
51 /**
52 * We don't want to hash trash on windows
53 */
54 if (name.toLowerCase().equals("recycler") && Constants.isWindows)
55 return false;
57 return name.startsWith(".") == false; // skip hidden files
58 }
59 });
130 File[] files = thisFile.listFiles(new FilenameFilter() {
131 public boolean accept(File dir, String name) {
132 return name.startsWith(".") == false; // skip hidden files
133 }
134 });
WiiClipsePathResolver.java (https://github.com/wiiclipse/wiiclipse.git) Java · 207 lines
24 private static final String DEVKITPPC_DEFAULT_REL_PATH = "devkitPPC/";
26 private static final boolean isWindows = Platform.OS_WIN32.equals(Platform
27 .getOS());
47 if (devkitProBasePath == null) {
48 // use default location
49 if (isWindows) {
50 devkitProBasePath = new Path(WIN_DEVKITPRO_DEFAULT_PATH);
51 } else {
93 }
95 private static String fixWindowsPath(String path) {
96 if (path != null && path.length() >= 3 && path.startsWith("/")) {
195 String value = System.getenv(envVar);
196 if (value != null) {
197 if (isWindows) {
198 value = fixWindowsPath(value);
TabbedNote.cs (https://hg.codeplex.com/mynotepad) C# · 300 lines
2 using System.IO;
3 using System.Text;
4 using System.Windows.Forms;
5 using WeifenLuo.WinFormsUI.Docking;
6 using ScintillaNet;
203 {
204 isDirty = true;
205 if (!this.TabText.StartsWith("*"))
206 {
207 string str = this.TabText.Insert(0, "*");
213 {
214 isDirty = true;
215 if (!this.TabText.StartsWith("*"))
216 {
217 string str = this.TabText.Insert(0, "*");
SetAccess.java (https://github.com/ikeji/openjdk7-jdk.git) Java · 186 lines
53 public static void doTest(File f) throws Exception {
54 if (!System.getProperty("os.name").startsWith("Windows")) {
55 if (!f.setReadOnly())
56 throw new Exception(f + ": setReadOnly Failed");
122 throw new Exception(f + ": setReadable(false, true) Failed");
123 } else {
124 //Windows platform
125 if (f.isFile()) {
126 if (!f.setReadOnly())
SingleInstanceManager.java (https://github.com/carrot-garden/carrot-jnlper.git) Java · 189 lines
59 // if file with the same prefix already exist, server is
60 // running
61 if (fList[i].startsWith(
62 SingleInstanceImpl.getSingleInstanceFilePrefix(idString +
63 Config.getInstance().getSessionSpecificString()))) {
177 return false;
178 } catch (java.net.SocketException se) {
179 // for windows
180 // no server is running - continue launch
181 Trace.println("no server is running - continue launch!", TraceLevel.TEMP);
test_grep.py (https://github.com/albertz/CPython.git) Python · 156 lines
118 class Grep_itTest(unittest.TestCase):
119 # Test captured reports with 0 and some hits.
120 # Should test file names, but Windows reports have mixed / and \ separators
121 # from incomplete replacement, so 'later'.
144 self.assertIn('py: 1:', lines[1]) # line number 1
145 self.assertIn('2', lines[3]) # hits found 2
146 self.assertTrue(lines[4].startswith('(Hint:'))
StubPathBuilder.java (https://bitbucket.org/nbargnesi/idea.git) Java · 147 lines
qgsdecorationtitledialog.cpp (https://github.com/ricardogsilva/Quantum-GIS.git) C++ · 144 lines
ScriptRunner.cs (https://github.com/XelaRellum/gitextensions.git) C# · 507 lines
3 using System.Diagnostics;
4 using System.Linq;
5 using System.Windows.Forms;
6 using GitCommands;
7 using GitCommands.Config;
53 if (string.IsNullOrEmpty(argument) || !argument.Contains(option))
54 continue;
55 if (!option.StartsWith("{s"))
56 continue;
57 if (revisionGrid != null)
105 if (string.IsNullOrEmpty(argument) || !argument.Contains(option))
106 continue;
107 if (option.StartsWith("{c") && currentRevision == null)
108 {
109 currentRevision = GetCurrentRevision(aModule, revisionGrid, currentTags, currentLocalBranches, currentRemoteBranches, currentBranches, currentRevision);
OAuth1Authenticator.cs (https://github.com/NokNokLLC/RestSharp.git) C# · 232 lines
xmlInjections-html.xml (https://bitbucket.org/nbargnesi/idea.git) XML · 27 lines
8 <injection language="JavaScript" injector-id="xml">
9 <display-name>*/@on.*</display-name>
10 <place><![CDATA[xmlAttribute().withLocalName(string().startsWith("on")).withParent(xmlTag().withNamespace(string().equalTo("http://www.w3.org/1999/xhtml")))]]></place>
11 </injection>
12 <injection language="CSS" injector-id="xml">
ObsidianEnumsPage.xaml.cs (https://github.com/SparkDevNetwork/Rock.git) C# · 177 lines
6 using System.Reflection;
7 using System.Runtime.CompilerServices;
8 using System.Windows;
9 using System.Windows.Controls;
34 foreach ( var item in typeItems )
35 {
36 var unsupported = !item.Type.FullName.StartsWith( "Rock.Enums." )
37 && item.Type.GetCustomAttributes().FirstOrDefault( a => a.GetType().FullName == "Rock.Enums.EnumDomainAttribute" ) == null;
63 private string GetPathForType( Type type )
64 {
65 if ( type.Namespace.StartsWith( "Rock.Model" ) )
66 {
67 var domainAttribute = type.GetCustomAttributes()
158 IsExporting = true;
160 if ( Name.StartsWith( "Rock.ViewModels." ) )
161 {
162 Name = Name.Substring( 15 );
TarEntry.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 730 lines
✨ Summary
This Java code is part of a Tar ( Tape Archive) file parser. It defines classes and methods to parse, create, and manipulate TarHeader information, which represents metadata about files in a Tar archive. The code handles various aspects of Tar file structure, including file names, permissions, ownership, timestamps, and checksums.
This Java code is part of a Tar ( Tape Archive) file parser. It defines classes and methods to parse, create, and manipulate TarHeader information, which represents metadata about files in a Tar archive. The code handles various aspects of Tar file structure, including file names, permissions, ownership, timestamps, and checksums.
162 {
163 return
164 desc.header.name.toString().startsWith
165 ( this.header.name.toString() );
166 }
441 // REVIEW Would a better check be "(File.separator == '\')"?
443 // String Win32Prefix = "Windows";
444 // String prefix = osname.substring( 0, Win32Prefix.length() );
445 // if ( prefix.equalsIgnoreCase( Win32Prefix ) )
449 // Per Patrick Beard:
450 String Win32Prefix = "windows";
451 if ( osname.toLowerCase().startsWith( Win32Prefix ) )
469 // No absolute pathnames
470 // Windows (and Posix?) paths can start with "\\NetworkDrive\",
471 // so we loop on starting /'s.
completion_widget.py (https://github.com/yarikoptic/ipython01x.git) Python · 134 lines
22 self.setAttribute(QtCore.Qt.WA_StaticContents)
23 self.setWindowFlags(QtCore.Qt.ToolTip | QtCore.Qt.WindowStaysOnTopHint)
25 # Ensure that the text edit keeps focus when widget is displayed.
125 prefix = self._current_text_cursor().selection().toPlainText()
126 if prefix:
127 items = self.findItems(prefix, (QtCore.Qt.MatchStartsWith |
128 QtCore.Qt.MatchCaseSensitive))
129 if items:
PortletEntityIdStringUtils.java (https://github.com/Jasig/uPortal.git) Java · 97 lines
MailingList.py (https://github.com/cherokee/web.git) Python · 140 lines
ipc.py (https://github.com/ethereum/web3.py.git) Python · 272 lines
34 def get_ipc_socket(ipc_path: str, timeout: float=0.1) -> socket.socket:
35 if sys.platform == 'win32':
36 # On Windows named pipe is used. Simulate socket with it.
37 from web3._utils.windows import NamedPipe
106 return str(ipc_path)
108 elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'):
109 ipc_path = os.path.expanduser(os.path.join(
110 "~",
167 return ipc_path
169 elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'):
170 ipc_path = os.path.expanduser(os.path.join(
171 "/tmp",
MimeResponseImpl.java (https://github.com/kiyoshilee/liferay-portal.git) Java · 189 lines
17 import com.liferay.portal.kernel.model.Portlet;
18 import com.liferay.portal.kernel.portlet.LiferayWindowState;
19 import com.liferay.portal.kernel.util.Validator;
167 String lifecycle = getLifecycle();
168 WindowState windowState = portletRequestImpl.getWindowState();
170 if (!contentType.startsWith(
171 portletRequestImpl.getResponseContentType()) &&
172 !lifecycle.equals(PortletRequest.RESOURCE_PHASE) &&
173 !windowState.equals(LiferayWindowState.EXCLUSIVE)) {
175 throw new IllegalArgumentException(
ExecuteTest.groovy (https://github.com/groovy/groovy-core.git) Groovy · 150 lines
VaultVersionControlProvider.cs (https://github.com/DavidMoore/Foundation.git) C# · 175 lines
5 using Foundation.ExtensionMethods;
6 using Foundation.Services;
7 using Foundation.Windows;
9 namespace Foundation.Build.VersionControl.Vault
138 if( args.DestinationPath.IsNullOrEmpty()) throw new ArgumentException("The DestinationPath is empty, so we cannot map a version control file if we have no working path.", "args");
140 if (!localPath.StartsWith(args.DestinationPath,StringComparison.CurrentCultureIgnoreCase)) return null;
142 var relativePath = localPath.Substring(args.DestinationPath.Length);
145 // other slashes and the repository root character ($)
146 relativePath = relativePath.TrimStart('$', '\\');
147 if(!relativePath.StartsWith("/")) relativePath = "/" + relativePath;
149 // Return a folder path, not a file path
HgScmProviderRepository.java (https://github.com/intelchen/maven-scm.git) Java · 266 lines
MathMLString.cpp (https://github.com/AsherBond/MondocosmOS.git) C++ · 344 lines
4 #ifdef _WIN32
5 # include <windows.h>
6 #endif
42 //-----------------------------------------------------------------------
43 bool StringUtil::startsWith( const String& str, const String& pattern )
44 {
45 String::size_type pos = str.find( pattern );
49 //-----------------------------------------------------------------------
50 bool StringUtil::startsWith( const String& str, char character )
51 {
52 String::size_type pos = str.find( character );
FN_StrStartsWith.html (https://github.com/suzuken/xbrl2rdf.git) HTML · 145 lines
6 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
7 <TITLE>
8 Uses of Class com.hp.hpl.jena.sparql.function.library.FN_StrStartsWith (ARQ 2.8.8)
9 </TITLE>
17 {
18 if (location.href.indexOf('is-external=true') == -1) {
19 parent.document.title="Uses of Class com.hp.hpl.jena.sparql.function.library.FN_StrStartsWith (ARQ 2.8.8)";
20 }
21 }
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../com/hp/hpl/jena/sparql/function/library/FN_StrStartsWith.html" title="class in com.hp.hpl.jena.sparql.function.library"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
44 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
monkey.py (https://gitlab.com/phongphans61/machine-learning-tictactoe) Python · 177 lines
52 cls
53 for cls in _get_mro(cls)
54 if not cls.__module__.startswith('setuptools')
55 )
56 base = next(external_bases)
57 if not base.__module__.startswith('distutils'):
58 msg = "distutils has already been patched by %r" % cls
59 raise AssertionError(msg)
136 msvc = import_module('setuptools.msvc')
138 if platform.system() != 'Windows':
139 # Compilers only available on Microsoft Windows
Form1.cs (https://github.com/ALTIBASE/altibase.git) C# · 261 lines
5 using System.Drawing;
6 using System.Text;
7 using System.Windows.Forms;
8 using System.Data;
10 using Altibase.Data.AltibaseClient;
12 namespace WindowsApplication1
13 {
14 public partial class Form1 : Form
60 String query = e_node.s_editor.syntaxRichTextBox1.Text.Trim().ToLower();
62 if (query.StartsWith("select"))
63 {
64 select();
TerrainModel.cs (https://hg.codeplex.com/helixtoolkit) C# · 279 lines
bootstrap.py (https://github.com/uhuracreativemedia/emencia-django-newsletter.git) Python · 121 lines
MockStorageTableManagement.cs (https://gitlab.com/jslee1/azure-powershell) C# · 223 lines
16 using System.Collections.Generic;
17 using System.Threading.Tasks;
18 using Microsoft.WindowsAzure.Commands.Common.Storage;
19 using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
20 using Microsoft.WindowsAzure.Storage;
21 using Microsoft.WindowsAzure.Storage.Table;
23 namespace Microsoft.WindowsAzure.Commands.Storage.Test.Service
24 {
25 /// <summary>
62 foreach (CloudTable table in tableList)
63 {
64 if (table.Name.ToLower().StartsWith(prefix.ToLower()))
65 {
66 prefixTables.Add(table);
ListDictionaryFixture.cs (https://github.com/jeffras/Prism-4-with-WinForms.git) C# · 267 lines
1 //===================================================================================
2 // Microsoft patterns & practices
3 // Composite Application Guidance for Windows Presentation Foundation and Silverlight
4 //===================================================================================
5 // Copyright (c) Microsoft Corporation. All rights reserved.
233 IEnumerable<object> filtered = list.FindAllValuesByKey(delegate(string key)
234 {
235 return key.StartsWith("b");
236 });
StringBufferReplaceableWithStringFixTest.java (https://bitbucket.org/nbargnesi/idea.git) Java · 27 lines
19 public void testStringBufferVariable() { doTest(); }
20 public void testStringBufferVariable2() { doTest(); }
21 public void testStartsWithPrimitive() { doTest(); }
22 public void testPrecedence() { doTest(InspectionGadgetsBundle.message("string.builder.replaceable.by.string.quickfix")); }
23 public void testPrecedence2() { doTest(InspectionGadgetsBundle.message("string.builder.replaceable.by.string.quickfix")); }
_tzpath.py (https://gitlab.com/Alioth-Project/clang-r445002) Python · 175 lines
85 # We only care about the kinds of path normalizations that would change the
86 # length of the key - e.g. a/../b -> a/b, or a/b/ -> a/b. On Windows,
87 # normpath will also change from a/b to a\b, but that would still preserve
88 # the length.
95 resolved = os.path.normpath(os.path.join(_base, new_path))
96 if not resolved.startswith(_base):
97 raise ValueError(
98 f"ZoneInfo keys must refer to subdirectories of TZPATH, got: {path}"
Neo4jGraphTest.java (https://github.com/tor5/blueprints.git) Java · 201 lines
109 deleteDirectory(new File(directory));
110 for (Method method : testSuite.getClass().getDeclaredMethods()) {
111 if (method.getName().startsWith("test")) {
112 System.out.println("Testing " + method.getName() + "...");
113 method.invoke(testSuite);
121 String directory = System.getProperty("neo4jGraphDirectory");
122 if (directory == null) {
123 if (System.getProperty("os.name").toUpperCase().contains("WINDOWS"))
124 directory = "C:/temp/blueprints_test";
125 else
BazaarScmProviderRepository.java (https://github.com/intelchen/maven-scm.git) Java · 311 lines
mailslot.py (https://github.com/janschejbal/sabnzbd.git) Python · 130 lines
Image.cs (https://github.com/eddwinston/Event-tracker.git) C# · 205 lines
1 using System;
2 using System.Net;
3 using System.Windows;
4 using System.Windows.Controls;
5 using System.Windows.Documents;
6 using System.Windows.Ink;
7 using System.Windows.Input;
8 using System.Windows.Media;
63 get
64 {
65 if (_url.StartsWith("http:") || _url.StartsWith("https:"))
66 return false;
67 return true;
Performance_tests_for_reaction.cs (https://github.com/xpando/lokad-cqrs.git) C# · 163 lines
1 #region (c) 2010-2011 Lokad - CQRS for Windows Azure - New BSD License
3 // Copyright (c) Lokad 2010-2011, http://www.lokad.com
47 {
48 var config = AzureStorage.CreateConfigurationForDev();
49 WipeAzureAccount.Fast(s => s.StartsWith("performance"), config);
50 TestConfiguration(c => c.Azure(m =>
51 {
59 {
60 var config = AzureStorage.CreateConfigurationForDev();
61 WipeAzureAccount.Fast(s => s.StartsWith("performance"), config);
62 TestConfiguration(c => c.Azure(m =>
63 {
MessageParserBase.cs (https://hg.codeplex.com/caliburn) C# · 197 lines
5 using System;
6 using System.Linq;
7 using System.Windows;
8 using System.Windows.Data;
135 var actualParameter = new Parameter();
137 if (parameter.StartsWith("'") && parameter.EndsWith("'"))
138 actualParameter.Value = parameter.Substring(1, parameter.Length - 2);
139 else if (messageBinder.IsSpecialValue(parameter) || char.IsNumber(parameter[0]))
prepare_bootstrap.py (https://github.com/wizzk42/numpy.git) Python · 109 lines
Program.cs (https://gitlab.com/frank-van-westerop/rapcad) C# · 299 lines
224 internal class Program
225 {
226 public delegate bool EnumWindowsProc(IntPtr hwnd, int lParam);
228 [DllImport("user32.dll")]
229 [return: MarshalAs(UnmanagedType.Bool)]
230 static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
232 [DllImport("user32.dll", SetLastError = true)]
281 Process p = Process.Start(args[0]);
282 WaitFor(p, Name.StartsWith("Next")).DoAction();
283 WaitFor(p, Name.StartsWith("Skip")).DoAction();
284 WaitFor(p, Name.StartsWith("Next")).DoAction();
285 WaitFor(p, Name.StartsWith("Next")).DoAction();
OSGiLoadService.java (https://github.com/saillinux/jruby.git) Java · 158 lines
78 @Override
79 protected LoadServiceResource findFileInClasspath(String name) {
80 if (name.startsWith(OSGI_BUNDLE_CLASSPATH_SCHEME)) {
81 name = cleanupFindName(name);
82 StringTokenizer tokenizer = new StringTokenizer(name, "/", false);
113 }
114 String file = state.loadName;
115 if (file.startsWith(OSGI_BUNDLE_CLASSPATH_SCHEME)) {
116 file = cleanupFindName(file);
117 StringTokenizer tokenizer = new StringTokenizer(file, "/", false);
150 protected String resolveLoadName(LoadServiceResource foundResource, String previousPath) {
151 String path = foundResource.getAbsolutePath();
152 if (Platform.IS_WINDOWS) {
153 path = path.replace('\\', '/');
154 }
PresentationStyleTypeConverter.cs
(https://SHFB.svn.codeplex.com/svn)
C# · 0 lines
✨ Summary
This C# code defines a custom type converter for presentation styles in Sandcastle, a documentation builder. It allows users to select a presentation style folder from those installed on their system and provides a dropdown list of available styles. The converter uses environment variables and file system searches to determine the available styles.
This C# code defines a custom type converter for presentation styles in Sandcastle, a documentation builder. It allows users to select a presentation style folder from those installed on their system and provides a dropdown list of available styles. The converter uses environment variables and file system searches to determine the available styles.
FileHandlingServiceSpec.groovy (https://github.com/hennito/grails-ext-proc-plugin.git) Groovy · 243 lines
19 @TestFor(FileHandlingService)
20 class FileHandlingServiceSpec extends Specification {
21 static final String nl = isWindows() ? "\r\n" : "\n"
22 static final String HELLO = "hello world"
23 static final String HELLO_LINE = "hello world" + nl
35 private static boolean isWindows() {
36 String nameOS = "os.name"
37 return System.properties.get(nameOS).toString().toUpperCase().startsWith("WINDOWS")
38 }
60 existingDir.exists()
61 existingDir.isDirectory()
62 existingDir.absolutePath.startsWith(tempDirStr)
64 when:
OperatingSystemFamily.java (https://github.com/bmoussaud/overthere.git) Java · 136 lines
26 public enum OperatingSystemFamily {
27 /**
28 * An operating system from the Windows family: NT, XP, Server 2003, Vista, etc.
29 */
30 WINDOWS,
39 */
40 public static OperatingSystemFamily getLocalHostOperatingSystemFamily() {
41 return System.getProperty("os.name").startsWith("Windows") ? WINDOWS : UNIX;
42 }
49 */
50 public String getScriptExtension() {
51 if (this == WINDOWS) {
52 return ".bat";
53 } else {
SystemDevices.cs (https://github.com/nefarius/TrueMount-2.git) C# · 342 lines
9 {
10 /// <summary>
11 /// Static wrapper for windows system devices.
12 /// </summary>
13 static class SystemDevices
222 from ManagementObject ldisk in LogicalDisks
223 where int.Parse(ldisk["DriveType"].ToString()) == drive_type
224 && ldisk["Name"].ToString().StartsWith(letter)
225 select ldisk;
243 var ldiskQuery =
244 from ManagementObject ldisk in LogicalDisks
245 where ldisk["Name"].ToString().StartsWith(letter)
246 select ldisk;
WindowsLoginModuleTests.java (git://github.com/dblock/waffle.git) Java · 349 lines
28 import waffle.mock.MockWindowsAuthProvider;
29 import waffle.windows.auth.impl.WindowsAccountImpl;
31 /**
34 * @author dblock[at]dblock[dot]org
35 */
36 public class WindowsLoginModuleTests {
38 /** The login module. */
85 final Subject subject = new Subject();
86 final UsernamePasswordCallbackHandler callbackHandler = new UsernamePasswordCallbackHandler(
87 WindowsAccountImpl.getCurrentUsername(), "password");
88 final Map<String, String> options = new HashMap<>();
89 options.put("debug", "true");
151 final Subject subject = new Subject();
152 final UsernamePasswordCallbackHandler callbackHandler = new UsernamePasswordCallbackHandler(
153 WindowsAccountImpl.getCurrentUsername(), "password");
154 final Map<String, String> options = new HashMap<>();
155 options.put("debug", "true");
env.js (https://github.com/ivmartel/dwv.git) JavaScript · 278 lines
118 * Browser check for clamped array.
119 * Missing in:
120 * - Safari 5.1.7 for Windows
121 * - PhantomJS 1.9.20 (on Travis).
122 *
268 }
270 // check string startsWith
271 if (!String.prototype.startsWith) {
272 Object.defineProperty(String.prototype, 'startsWith', {
273 value: function (search, rawPos) {
274 return dwv.utils.startsWith(this, search, rawPos);
ConnectionInfo.cs (https://gitlab.com/GRIN-Global/GRIN-Global-server) C# · 238 lines
94 ci.DatabaseEngineServerName = nd.Attributes.GetValue("DatabaseEngineName");
95 ci.DatabaseEngineProviderName = nd.Attributes.GetValue("DatabaseEngineProvider", "sqlserver");
96 ci.UseWindowsAuthentication = Toolkit.ToBoolean(nd.Attributes.GetValue("UseWindowsAuthentication", "true"), true);
97 ci.DatabaseEngineRememberPassword = Toolkit.ToBoolean(nd.Attributes.GetValue("DatabaseEngineRememberPassword", "true"), true);
98 ci.DatabaseEngineDatabaseName = nd.Attributes.GetValue("DatabaseEngineDatabaseName", "gringlobal");
125 nd.Attributes.SetValue("DatabaseEngineName", DatabaseEngineServerName);
126 nd.Attributes.SetValue("DatabaseEngineProvider", DatabaseEngineProviderName);
127 nd.Attributes.SetValue("UseWindowsAuthentication", UseWindowsAuthentication.ToString());
128 nd.Attributes.SetValue("DatabaseEngineRememberPassword", DatabaseEngineRememberPassword.ToString());
129 nd.Attributes.SetValue("DatabaseEngineDatabaseName", DatabaseEngineDatabaseName);
156 DatabaseEngineServerName = info.GetString("DatabaseEngineServerName");
157 DatabaseEngineProviderName = info.GetString("DatabaseEngineProvider");
158 UseWindowsAuthentication = info.GetBoolean("UseWindowsAuthentication");
159 DatabaseEngineRememberPassword = info.GetBoolean("DatabaseEngineRememberPassword");
160 DatabaseEngineDatabaseName = info.GetString("DatabaseEngineDatabaseName");
index.js (https://github.com/gitlabhq/gitlabhq.git) JavaScript · 130 lines
RuntimeLoadAssemblyTests.cs (https://github.com/eusebiu/SharpDevelop.git) C# · 137 lines
16 {
17 [Test]
18 public void AssemblyLoadCalledWhenAssemblyNameStartsWithColon()
19 {
20 DerivedRuntime runtime = new DerivedRuntime(":ICSharpCode.SharpDevelop", String.Empty);
58 [Test]
59 public void AssemblyLoadFromCalledWhenAssemblyNameStartsWithDollar()
60 {
61 List<AddIn> addIns = GetAddInsList();
82 " author = \"Mike Krueger\"\r\n" +
83 " copyright = \"prj:///doc/copyright.txt\"\r\n" +
84 " description = \"Windows Forms Designer\"\r\n" +
85 " addInManagerHidden = \"preinstalled\">\r\n" +
86 "\r\n" +
key-event.coffee (https://github.com/jinzhu/vrome.git) CoffeeScript · 156 lines
RemoteSdkCredentialsHolder.java (https://github.com/JetBrains/intellij-community.git) Java · 249 lines
37 */
38 public static String getInterpreterPathFromFullPath(String fullPath) {
39 if (fullPath.startsWith(SSH_PREFIX)) {
40 fullPath = fullPath.substring(SSH_PREFIX.length());
41 int index = fullPath.indexOf(":");
42 if (index != -1 && index < fullPath.length()) {
43 fullPath = fullPath.substring(index + 1); // it is like 8080/home/user or 8080C:\Windows
44 index = 0;
45 while (index < fullPath.length() && Character.isDigit(fullPath.charAt(index))) {
client.py (https://gitlab.com/132nd-etcher/CouchPotatoServer) Python · 162 lines
27 auth_file = ""
28 username = password = ""
29 if platform.system() in ('Windows', 'Microsoft'):
30 appDataPath = os.environ.get("APPDATA")
31 if not appDataPath:
32 import _winreg
33 hkey = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")
34 appDataReg = _winreg.QueryValueEx(hkey, "AppData")
35 appDataPath = appDataReg[0]
47 if os.path.exists(auth_file):
48 for line in open(auth_file):
49 if line.startswith("#"):
50 # This is a comment line
51 continue
which.py (https://gitlab.com/thanhchatvn/cloud-odoo) Python · 153 lines
27 On Windows, a current directory is searched before using the ``PATH`` variable,
28 but not before an explicitly passed *path*.
29 The *pathext* is only used on Windows to match files with given extensions appended as well.
30 It defaults to the ``PATHEXT`` variable, or the string/iterable passed in as *pathext*.
31 In the event that a ``PATHEXT`` variable is not found,
32 default value for Windows XP/Vista is used.
33 The command is always searched without extension first,
34 even when *pathext* is explicitly passed.
46 from os.path import exists, dirname, split, join
48 windows = sys.platform.startswith('win')
50 defpath = environ.get('PATH', defpath).split(pathsep)
87 >>> if windows: test_which([cmd], cmd, pathext='<nonexistent>')
88 >>> if windows: test_which([cmd], cmd[:-4])
89 >>> if windows: test_which([cmd], cmd[:-4], path='<nonexistent>')
IFrameDisplayContext.java (https://github.com/kiyoshilee/liferay-portal.git) Java · 300 lines
36 import javax.portlet.PortletRequest;
37 import javax.portlet.WindowState;
39 /**
82 }
84 String windowState = String.valueOf(_request.getWindowState());
86 if (windowState.equals(WindowState.MAXIMIZED)) {
193 String name = enu.nextElement();
195 if (name.startsWith(_IFRAME_PREFIX)) {
196 iFrameVariables.add(
197 name.substring(_IFRAME_PREFIX.length()) + StringPool.EQUAL +
Util.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 700 lines
✨ Summary
This Java code provides a utility class with various methods for tasks such as URL path resolution, HTML escaping, and input stream reading. It also includes functions for resolving URLs to local file paths, escaping plain text strings for HTML, and reading input streams into memory. The methods are likely used in a web application or similar context.
This Java code provides a utility class with various methods for tasks such as URL path resolution, HTML escaping, and input stream reading. It also includes functions for resolving URLs to local file paths, escaping plain text strings for HTML, and reading input streams into memory. The methods are likely used in a web application or similar context.
test_decorators.py (https://gitlab.com/pooja043/Globus_Docker_3) Python · 169 lines
SystemDevices.cs (https://github.com/nefarius/TrueMount-3.git) C# · 333 lines
8 {
9 /// <summary>
10 /// Static wrapper for windows system devices.
11 /// </summary>
12 // TODO: on release BACK TO INTERNAL!!!
234 from ManagementObject ldisk in LogicalDisks
235 where int.Parse(ldisk["DriveType"].ToString()) == drive_type
236 && ldisk["Name"].ToString().StartsWith(letter)
237 select ldisk;
255 var ldiskQuery =
256 from ManagementObject ldisk in LogicalDisks
257 where ldisk["Name"].ToString().StartsWith(letter)
258 select ldisk;
SMSMMSResultParser.cs (https://bitbucket.org/jrasanen/silverlightzxing.git) C# · 123 lines
47 }
48 int prefixLength;
49 if (rawText.StartsWith("sms:") || rawText.StartsWith("SMS:") || rawText.StartsWith("mms:") || rawText.StartsWith("MMS:"))
50 {
51 prefixLength = 4;
52 }
53 else if (rawText.StartsWith("smsto:") || rawText.StartsWith("SMSTO:") || rawText.StartsWith("mmsto:") || rawText.StartsWith("MMSTO:"))
54 {
55 prefixLength = 6;
97 number = smsURIWithoutQuery.Substring(0, (numberEnd) - (0));
98 System.String maybeVia = smsURIWithoutQuery.Substring(numberEnd + 1);
99 if (maybeVia.StartsWith("via="))
100 {
101 via = maybeVia.Substring(4);
PermissiveRecordMatcherWithApiExclusion.cs (https://gitlab.com/jslee1/azure-powershell) C# · 150 lines
20 using System.Text.RegularExpressions;
22 namespace Microsoft.WindowsAzure.Commands.ScenarioTest
23 {
24 // Excludes api version when matching mocked records.
66 foreach (var userAgnet in _userAgentsToIgnore)
67 {
68 if (agent.Value.Any(v => v.StartsWith(userAgnet.Key, StringComparison.OrdinalIgnoreCase)))
69 {
70 path = RemoveOrReplaceApiVersion(path, userAgnet.Value);
109 if (_ignoreGenericResource &&
110 !requestUri.Contains("providers") &&
111 !requestUri.StartsWith("/certificates?", StringComparison.InvariantCultureIgnoreCase) &&
112 !requestUri.StartsWith("/pools", StringComparison.InvariantCultureIgnoreCase) &&
113 !requestUri.StartsWith("/jobs", StringComparison.InvariantCultureIgnoreCase) &&
114 !requestUri.StartsWith("/jobschedules", StringComparison.InvariantCultureIgnoreCase) &&
AntSecurityManager.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 373 lines
juce_PluginHostType.h (https://bitbucket.org/jeromegill/genie.git) C Header · 160 lines
121 if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne;
123 #elif JUCE_WINDOWS
124 if (hostFilename.containsIgnoreCase ("Live 6.")) return AbletonLive6;
125 if (hostFilename.containsIgnoreCase ("Live 7.")) return AbletonLive7;
145 if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric;
146 if (hostFilename.containsIgnoreCase ("rm-host")) return MuseReceptorGeneric;
147 if (hostFilename.startsWithIgnoreCase ("Sam")) return MagixSamplitude;
148 if (hostFilename.startsWith ("FL")) return FruityLoops;
CodeFile.cs (https://github.com/yiketudou/gitextensions.git) C# · 180 lines
98 else if (line == "")
99 NumberBlankLines++;
100 else if (_inCommentBlock || line.StartsWith("'") || line.StartsWith(@"//"))
101 NumberCommentsLines++;
102 else if (File.Extension.ToLower() == ".py" && line.StartsWith("#"))
132 if (line.StartsWith("(*") && !line.StartsWith("(*$"))
133 _inCommentBlock = true;
134 if (line.StartsWith("{") && !line.StartsWith("{$"))
135 _inCommentBlock = true;
136 }
141 if (File.Extension.ToLower() == ".py" && !_inCommentBlock)
142 {
143 if (line.StartsWith("'''") || line.StartsWith("\"\"\""))
144 {
145 _inCommentBlock = true;
Program.cs (https://gitlab.com/GRIN-Global/GRIN-Global-server) C# · 205 lines
3 using System.Linq;
4 using System.Text;
5 using System.Windows.Forms;
6 using GrinGlobal.Core;
7 using System.Diagnostics;
62 if (program == null){
64 if (a.StartsWith("/") || a.StartsWith("-")) {
65 showUsage();
66 return;
115 try {
116 if (program.StartsWith(@"""")) {
117 program = program.Substring(1);
118 }
UnknownSubtitle45.cs (https://gitlab.com/minaz922/subtitleedit) C# · 141 lines
55 sb.AppendLine(string.Format("* {0}-{1} 00.00 00.0 1 {2} 00 16-090-090{3}{4}{3}@", EncodeTimeCode(p.StartTime), EncodeTimeCode(p.EndTime), index.ToString().PadLeft(4, '0'), Environment.NewLine, Utilities.RemoveHtmlTags(p.Text)));
56 }
57 System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox();
58 rtBox.Text = sb.ToString();
59 return rtBox.Rtf;
78 string rtf = sb.ToString().Trim();
79 if (!rtf.StartsWith("{\\rtf"))
80 return;
82 var rtBox = new System.Windows.Forms.RichTextBox();
83 try
84 {
fileConverter.ts (https://github.com/Togusa09/vscode-tmlanguage.git) TypeScript · 239 lines
76 // Some of the sublime tmlanguage variant files had comments as hints for auto conversion
77 if (documentText.startsWith("//")){
78 var lastLineRange : vscode.Range = doc.lineAt(doc.lineCount - 1).range;
79 documentText = doc.getText(new vscode.Range(new vscode.Position(1, 0), lastLineRange.end));
117 var paths = matchingFiles.map(p => p.fsPath);
119 var editorWindows = vscode.window.visibleTextEditors.map(x => x.document.fileName);
120 paths = paths.concat(editorWindows);
Test_PRL_05_01_004_AddNewCateogryWithNameStartsWithDashChars.html (https://github.com/anhnht/exogtn.git) HTML · 196 lines
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <link rel="selenium.base" href="" />
7 <title>Test_PRL_05_01_004_AddNewCateogryWithNameStartsWithDashChars</title>
8 </head>
9 <body>
10 <table cellpadding="1" cellspacing="1" border="1">
11 <thead>
12 <tr><td rowspan="1" colspan="3">Test_PRL_05_01_004_AddNewCateogryWithNameStartsWithDashChars</td></tr>
13 </thead><tbody>
14 <tr>
table.py (https://bitbucket.org/dryobates/riv.vim.git) Python · 281 lines
ConfigurationModuleCatalogFixture.Desktop.cs (https://github.com/jeffras/Prism-4-with-WinForms.git) C# · 166 lines
1 //===================================================================================
2 // Microsoft patterns & practices
3 // Composite Application Guidance for Windows Presentation Foundation and Silverlight
4 //===================================================================================
5 // Copyright (c) Microsoft Corporation. All rights reserved.
60 Assert.AreNotEqual(InitializationMode.WhenAvailable, modules.First().InitializationMode);
61 Assert.IsNotNull(modules.First().Ref);
62 StringAssert.StartsWith(modules.First().Ref, "file://");
63 Assert.IsTrue( modules.First().Ref.Contains(@"MocksModules/MockModuleA.dll"));
64 Assert.IsNotNull( modules.First().ModuleType);
SideTab.cs (https://github.com/eusebiu/SharpDevelop.git) C# · 552 lines
Files.java (https://github.com/branaway/play.git) Java · 196 lines
19 /**
20 * Characters that are invalid in Windows OS file names (Unix only forbids '/' character)
21 */
22 public static final char[] ILLEGAL_FILENAME_CHARS = {34, 60, 62, 124, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
93 }
94 File f = new File(to, entry.getName());
95 if (!f.getCanonicalPath().startsWith(outDir)) {
96 throw new IOException("Corrupted zip file");
97 }
130 /**
131 * Replace all characters that are invalid in file names on Windows or Unix operating systems
132 * with {@link Files#ILLEGAL_FILENAME_CHARS_REPLACE} character.
133 * <p>
terminal.py (https://github.com/hoffstein/pandas.git) Python · 120 lines
11 It is mentioned in the stackoverflow response that this code works
12 on linux, os x, windows and cygwin (windows).
13 """
14 from __future__ import print_function
29 current_os = platform.system()
30 tuple_xy = None
31 if current_os == 'Windows':
32 tuple_xy = _get_terminal_size_windows()
36 if current_os == 'Linux' or \
37 current_os == 'Darwin' or \
38 current_os.startswith('CYGWIN'):
39 tuple_xy = _get_terminal_size_linux()
40 if tuple_xy is None:
45 def _get_terminal_size_windows():
46 res = None
47 try:
BaseDirFileResolverSpec.groovy (https://github.com/andrewhj-mn/gradle.git) Groovy · 218 lines
142 }
144 @Requires(TestPrecondition.WINDOWS)
145 def "normalizes path which uses windows 8.3 name"() {
160 }
162 @Requires(TestPrecondition.WINDOWS)
163 def "normalizes non-existent file system root"() {
164 def file = new File("Q:\\")
215 private File[] getFsRoots() {
216 File.listRoots().findAll { !it.absolutePath.startsWith("A:") }
217 }
218 }
AutoCompleteFilter.cs (https://github.com/kvervo/HorizontalLoopingSelector.git) C# · 207 lines
9 #if WINDOWS_PHONE
10 namespace Microsoft.Phone.Controls
11 #else
12 namespace System.Windows.Controls
13 #endif
14 {
53 return EqualsOrdinalCaseSensitive;
55 case AutoCompleteFilterMode.StartsWith:
56 return StartsWith;
58 case AutoCompleteFilterMode.StartsWithCaseSensitive:
59 return StartsWithCaseSensitive;
Selection.cs (https://github.com/bangonkali/electronics.git) C# · 460 lines
12 using Alsing.SourceCode;
14 namespace Alsing.Windows.Forms.SyntaxBox
15 {
16 /// <summary>
276 ActionGroup.Add(b);
277 string s = xtr.Text;
278 if (s.StartsWith("\t"))
279 {
280 b.Text = s.Substring(0, 1);
281 s = s.Substring(1);
282 }
283 if (s.StartsWith(" "))
284 {
285 b.Text = s.Substring(0, 4);
Application.cpp (https://github.com/jingoro/browseurl.git) C++ · 263 lines
124 QString requestPath = QDir::cleanPath(domainPath + url.path());
126 if ( ! requestPath.startsWith(domainPath) ) {
127 showError( tr("Invalid request path %1 for URL %2" ).
128 arg( requestPath ).arg( url.toString() ) );
201 foreach ( const Domain & domain, domains ) {
202 if ( path.startsWith( domain.getLocalPath() ) ) {
203 QUrl url;
204 url.setScheme( QString( BROWSEURL_SCHEME ) );
SETextBox.cs (https://gitlab.com/minaz922/subtitleedit) C# · 265 lines
1 using System;
2 using System.Drawing;
3 using System.Windows.Forms;
5 namespace Nikse.SubtitleEdit.Controls
71 void SETextBox_MouseDown(object sender, MouseEventArgs e)
72 {
73 if (MouseButtons == System.Windows.Forms.MouseButtons.Left && !string.IsNullOrEmpty(_dragText))
74 {
75 Point pt = new Point(e.X, e.Y);
178 // fix start spaces
179 int endIndex = index + newText.Length;
180 if (index > 0 && !newText.StartsWith(" ") && Text[index - 1] != ' ')
181 {
182 Text = Text.Insert(index, " ");
w3crange.js (https://github.com/pdubroy/Purple.git) JavaScript · 169 lines
OS.java (https://github.com/revolsys/com.revolsys.open.git) Java · 181 lines
19 public final static boolean IS_SOLARIS = OS_NAME.equals("SunOS");
21 public final static boolean IS_WINDOWS = OS_NAME.startsWith("Windows");
23 public static File getApplicationDataDirectory() {
24 String path;
25 if (OS.isWindows()) {
26 path = System.getenv("APPDATA");
27 } else if (OS.isMac()) {
44 if (osArch.equals("i386")) {
45 return "x86";
46 } else if (osArch.startsWith("amd64") || osArch.startsWith("x86_64")) {
47 return "x86_64";
48 } else if (osArch.equals("ppc")) {
misc.py (https://gitlab.com/orvi2014/rcs-db-ext) Python · 104 lines
62 def _hack_unix2win_path_conversion(cmdln_options, option_names):
63 """Hack to convert Unix paths in cmdln options (via config file) to
64 Windows specific netshare location
66 Config file must define the mapping as config var "unix2win_path_mapping"
80 """Given a unix path return the platform-specific path
82 On Windows, use the given mapping to translate the path. On Unix platforms,
83 this function essentially returns `unixpath`.
85 The mapping is simply a buildout.cfg-friendly multiline string that would
86 get parsed as dictionary which should have path prefixes as keys, and the
87 translated Windows net share path as the values. See PyPM's
88 etc/activestate.conf for an example.
ReplaceForEachLoopWithIndexedForLoopIntention.java (https://bitbucket.org/nbargnesi/idea.git) Java · 272 lines
CSS2Parser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 3155 lines
✨ Summary
This Java code is a part of a CSS parser, specifically for parsing CSS rules and at-rules. It defines various methods to match different parts of CSS syntax, such as selectors, properties, values, and media queries. The code uses a finite state machine approach to recognize patterns in the input string and return true if the pattern matches, or false otherwise.
This Java code is a part of a CSS parser, specifically for parsing CSS rules and at-rules. It defines various methods to match different parts of CSS syntax, such as selectors, properties, values, and media queries. The code uses a finite state machine approach to recognize patterns in the input string and return true if the pattern matches, or false otherwise.
FtpAddress.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 101 lines
✨ Summary
This Java class, FtpAddress
, encapsulates FTP addressing information. It has two constructors: one that parses a URL to extract host, user, and path information, and another that allows direct initialization of these fields. The class also provides a toString()
method for converting the address into a string representation.
This Java class, FtpAddress
, encapsulates FTP addressing information. It has two constructors: one that parses a URL to extract host, user, and path information, and another that allows direct initialization of these fields. The class also provides a toString()
method for converting the address into a string representation.
Interpreter.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1234 lines
✨ Summary
This Java code defines a class Interpreter
that represents an interactive shell for executing BeanShell scripts. It provides methods for sourcing scripts, evaluating expressions, and controlling output and error streams. The class also handles security exceptions and provides features like verbose printing and exit on EOF control.
This Java code defines a class Interpreter
that represents an interactive shell for executing BeanShell scripts. It provides methods for sourcing scripts, evaluating expressions, and controlling output and error streams. The class also handles security exceptions and provides features like verbose printing and exit on EOF control.
BrowserView.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 743 lines
✨ Summary
This Java code defines a GUI component for displaying and navigating directories, specifically a JList
that displays directory paths. It handles keyboard events to navigate up, down, left, right, and enter, as well as special keys like Tab, Backspace, F5, and Ctrl+N. The component is part of a larger application, likely a file manager or editor, and interacts with other components to perform actions like selecting files, deleting directories, and creating new ones.
This Java code defines a GUI component for displaying and navigating directories, specifically a JList
that displays directory paths. It handles keyboard events to navigate up, down, left, right, and enter, as well as special keys like Tab, Backspace, F5, and Ctrl+N. The component is part of a larger application, likely a file manager or editor, and interacts with other components to perform actions like selecting files, deleting directories, and creating new ones.
293 // the local filesystem, do a tree scan
295 if(!browserDir.startsWith(FavoritesVFS.PROTOCOL)
296 && !browserDir.startsWith(FileRootsVFS.PROTOCOL)
297 && !path.startsWith(symlinkBrowserDir))
298 return;
300 if(browserDir.startsWith(FileRootsVFS.PROTOCOL)
301 && MiscUtilities.isURL(path)
302 && !MiscUtilities.getProtocolOfURL(path)
XmlParser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 230 lines
✨ Summary
This Java class, XmlParser
, is a base class for parsing XML and HTML documents. It provides auto-completion functionality for closing element tags, attributes, and entities. The parser analyzes the current text position in the document and suggests possible completions based on the context. It also supports customizing the completion behavior through configuration properties.
This Java class, XmlParser
, is a base class for parsing XML and HTML documents. It provides auto-completion functionality for closing element tags, attributes, and entities. The parser analyzes the current text position in the document and suggests possible completions based on the context. It also supports customizing the completion behavior through configuration properties.
146 closingTag = tag.tag;
148 if("!--".startsWith(word))
149 allowedCompletions.add(new XmlListCellRenderer.Comment());
150 if(!data.html && "![CDATA[".startsWith(word))
151 allowedCompletions.add(new XmlListCellRenderer.CDATA());
152 if(closingTag != null && ("/" + closingTag).startsWith(word))
153 {
154 if(word.length() == 0 || !jEdit.getBooleanProperty("xml.close-complete"))
168 Object obj = completions.get(i);
169 ElementDecl element = (ElementDecl)obj;
170 if(element.name.startsWith(word)
171 || (data.html && element.name.toLowerCase()
172 .startsWith(word.toLowerCase())))
doc.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 3248 lines
Make_Bug_Report.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 119 lines
CompletionRequest.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 219 lines
✨ Summary
This Java class, CompletionRequest
, is part of a CSS editor’s auto-completion feature. It analyzes user input and suggests possible completions based on CSS properties, units, and values. The class uses regular expressions to parse the input text and determine whether it matches certain patterns, allowing it to provide relevant suggestions for completion.
This Java class, CompletionRequest
, is part of a CSS editor’s auto-completion feature. It analyzes user input and suggests possible completions based on CSS properties, units, and values. The class uses regular expressions to parse the input text and determine whether it matches certain patterns, allowing it to provide relevant suggestions for completion.
122 //{{{ findMatchedProperties() method
123 private ArrayList findMatchedProperties(String startsWith) {
124 ArrayList found = new ArrayList();
125 Iterator it = CssSideKickCompletion.getCssProperties().keySet().iterator();
126 while (it.hasNext()) {
127 String n = (String) it.next();
128 if (!startsWith.equals(n) && n.startsWith(startsWith)) {
129 found.add(n);
130 }
140 while (it.hasNext()) {
141 value = (String)it.next();
142 if (value.length() > startsWith.length() && value.startsWith(startsWith)) {
143 completionList.add(value);
144 }
ClassManagerImpl.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 576 lines
✨ Summary
This Java class manages a BeanShell interpreter’s classpath, handling imports, reloading classes, and notifying listeners of changes. It provides methods for defining new classes, getting the full classpath, and importing namespaces. The class also maintains a list of listeners that can be notified when the class cache is cleared or updated.
This Java class manages a BeanShell interpreter’s classpath, handling imports, reloading classes, and notifying listeners of changes. It provides methods for defining new classes, getting the full classpath, and importing namespaces. The class also maintains a list of listeners that can be notified when the class cache is cleared or updated.
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.
176 JarEntry entry = ( JarEntry ) entries.nextElement();
177 String classname = entry.getName();
178 if ( classname.startsWith( "java/" ) ||
179 classname.startsWith( "javax/" ) ||
180 classname.startsWith( "org/omg/" ) ||
181 classname.startsWith( "org/ietf/" ) ||
182 classname.startsWith( "org/w3c/" ) ||
183 classname.startsWith( "org/xml/" ) ) {
226 for ( Iterator it = runtimeClassNames.iterator(); it.hasNext(); ) {
227 String fullClassName = ( String ) it.next();
228 if ( fullClassName.startsWith( name ) && fullClassName.indexOf( "$" ) < 0 ) {
229 list.add( fullClassName.substring( fullClassName.lastIndexOf( "/" ) + 1 ) );
230 }
Command.java
(http://loon-simple.googlecode.com/svn/trunk/)
Java · 1004 lines
✨ Summary
This Java code is a part of a scripting engine, responsible for parsing and executing script commands. It processes input strings, splitting them into individual commands, and then executes these commands based on their type (e.g., include, print, etc.). The code also manages various data structures to store scripts, environment variables, and cache.
This Java code is a part of a scripting engine, responsible for parsing and executing script commands. It processes input strings, splitting them into individual commands, and then executes these commands based on their type (e.g., include, print, etc.). The code also manages various data structures to store scripts, environment variables, and cache.
511 private void setupSET(String cmd) {
512 if (cmd.startsWith(SET_TAG)) {
513 List temps = commandSplit(cmd);
514 int len = temps.size();
529 for (Iterator it = set.iterator(); it.hasNext();) {
530 Entry entry = (Entry) it.next();
531 if (!(result.startsWith("\"") && result.endsWith("\""))) {
532 result = replaceMatch(result, (String) entry.getKey(),
533 entry.getValue().toString());
535 }
536 // ????????
537 if (result.startsWith("\"") && result.endsWith("\"")) {
538 setEnvironmentList.put(temps.get(1), result.substring(1,
539 result.length() - 1));
qgtkstyle.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 3560 lines
180 The Qt3-based "Qt" GTK+ theme engine will not work with QGtkStyle.
182 \sa {Cleanlooks Style Widget Gallery}, QWindowsXPStyle, QMacStyle, QWindowsStyle,
183 QCDEStyle, QMotifStyle, QPlastiqueStyle, QCleanlooksStyle
184 */
238 gdkSfg = gtkEntry->style->text[GTK_STATE_SELECTED];
240 // The ACTIVE base color is really used for inactive windows
241 gdkaSbg = gtkEntry->style->base[GTK_STATE_ACTIVE];
242 gdkaSfg = gtkEntry->style->text[GTK_STATE_ACTIVE];
472 QChar splitChar(QLatin1Char(','));
473 foreach (const QString &value, values) {
474 if (value.startsWith(QLS("gtk-button="))) {
475 QString iconSize = value.right(value.size() - 11);
finddialog.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 154 lines
XMLHandler.java
(http://androjena.googlecode.com/svn/trunk/)
Java · 539 lines
✨ Summary
This Java code defines a class that parses RDF (Resource Description Framework) data from XML files. It creates an abstract syntax tree and performs validation on the input data, including checking for well-formed namespace URIs and deprecated relative namespace URI usage. The class also provides methods to initialize parsing, handle errors, and perform cleanup after parsing is complete.
This Java code defines a class that parses RDF (Resource Description Framework) data from XML files. It creates an abstract syntax tree and performs validation on the input data, including checking for well-formed namespace URIs and deprecated relative namespace URI usage. The class also provides methods to initialize parsing, handle errors, and perform cleanup after parsing is complete.
320 WARN_RESOLVING_URI_AGAINST_EMPTY_BASE);
321 } else {
322 // if (base.toLowerCase().startsWith("file:")
323 // && base.length()>5
324 // && base.charAt(5) != '/'
488 }
490 if (uri.startsWith(rdfns) && !uri.equals(rdfns))
491 warning(null,WARN_BAD_RDF_NAMESPACE_URI, "Namespace URI ref <"
492 + uri + "> may not be used in RDF/XML.");
493 if (uri.startsWith(xmlns) && !uri.equals(xmlns))
494 warning(null,WARN_BAD_XML_NAMESPACE_URI, "Namespace URI ref <"
495 + uri + "> may not be used in RDF/XML.");
HistoryModel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 326 lines
✨ Summary
This Java code defines a HistoryModel
class that manages a list of history entries for a text editor. It allows adding, removing, and retrieving items from the list, as well as saving and loading the entire list to/from a file. The model is designed to be used in conjunction with a text editor, where it can store and retrieve user input history.
This Java code defines a HistoryModel
class that manages a list of history entries for a text editor. It allows adding, removing, and retrieving items from the list, as well as saving and loading the entire list to/from a file. The model is designed to be used in conjunction with a text editor, where it can store and retrieve user input history.
JdkUtil.java (https://bitbucket.org/nbargnesi/idea.git) Java · 313 lines
175 try {
176 for (String param : vmParametersList.getList()) {
177 if (param.startsWith("-D")) {
178 writer.println(param);
179 }
189 final List<String> list = vmParametersList.getList();
190 for (String param : list) {
191 if (!param.trim().startsWith("-D")) {
192 commandLine.addParameter(param);
193 }