100+ results for 'startswith windows 9'

Not the results you expected?

useCurrentColorScheme.js (https://gitlab.com/sagefhopkins/hopkinsdev) JavaScript · 231 lines

199 var value = event.newValue;

200

201 if (typeof event.key === 'string' && event.key.startsWith(colorSchemeStorageKey) && (!value || joinedColorSchemes.match(value))) {

202 // If the key is deleted, value will be null then reset color scheme to the default one.

203 if (event.key.endsWith('light')) {

identifier.js (https://gitlab.com/nguyenthehiep3232/marius) JavaScript · 377 lines

7 const path = require("path");

8

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

388

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;

21

22 return left.StartsWith(right);

23 };

24

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;

15

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.

171 // workaround for Swing rendering labels starting

172 // with <html> using the HTML engine

173 if(item.toLowerCase().startsWith("<html>"))

174 buf.append(' ');

175 boolean ws = true;

_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).

23

64

65 # skip comments and blank lines XXX what is $ for?

66 if (line.strip().startswith(("#", "$")) or

67 line.strip() == ""):

68 continue

79 value = None

80

81 initial_dot = domain.startswith(".")

82 assert domain_specified == initial_dot

83

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.

544 public void setDirectory(String path)

545 {

546 if(path.startsWith("file:"))

547 path = path.substring(5);

548 path = MiscUtilities.expandVariables(path);

filebased.py (https://gitlab.com/areema/myproject) Python · 154 lines

67

68 def _delete(self, fname):

69 if not fname.startswith(self._dir) or not os.path.exists(fname):

70 return

71 try:

138 exp = pickle.load(f)

139 if exp is not None and exp < time.time():

140 f.close() # On Windows a file has to be closed before deleting

141 self._delete(f.name)

142 return True

Files.java (https://github.com/tazmaniax/play1.git) Java · 229 lines

27

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 }

163

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;

6

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

174 def filter(list, prefix):

175 prefix = prefix.lower()

176 list = [eachItem for eachItem in list if str(eachItem).lower().startswith(prefix)]

177 return list

178

dsym.d (https://github.com/CyberShadow/DMapTreeMap.git) D · 253 lines

22 catch (Throwable t) {}

23

24 if (sym.startsWith("__D"))

25 sym = sym[1..$];

26

58 foreach (ref seg; segments)

59 {

60 if (seg.startsWith("extern (C) "))

61 seg = seg["extern (C) ".length..$];

62 if (seg.lastIndexOf(' ')>=0)

72 }

73

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 }

47

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));

85

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.

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

52 }

53

54 System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox();

55 rtBox.Text = sb.ToString();

56 return rtBox.Rtf;

70

71 string rtf = sb.ToString().Trim();

72 if (!rtf.StartsWith("{\\rtf"))

73 return;

74

75 var rtBox = new System.Windows.Forms.RichTextBox();

76 try

77 {

RunScript.cs (https://github.com/yiketudou/gitextensions.git) C# · 312 lines

2 using GitCommands;

3 using GitUI.Script;

4 using System.Windows.Forms;

5

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)

54

55 on_windows = sys.platform.startswith('win')

56

57 # should we strip ANSI sequences from our output?

58 if strip is None:

59 strip = on_windows

60 self.strip = strip

61

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

7 using UIDesigner.FieldHandlers;

8 using System.Drawing;

9 using System.Windows.Forms;

10 using UIDesigner.FieldHandlers.Bases;

11 using System.ComponentModel.Design.Serialization;

81 }

82

83 if (objBase.Name.StartsWith(strPrefix))

84 {

85 strName = objBase.Name.Substring(strPrefix.Length);

LinkContext.cs (https://github.com/t-ashula/mono.git) C# · 258 lines

221 case "PresentationFramework":

222 case "PresentationCore":

223 case "WindowsBase":

224 case "UIAutomationProvider":

225 case "UIAutomationTypes":

228 return true;

229 default:

230 return name.Name.StartsWith ("System")

231 || name.Name.StartsWith ("Microsoft");

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 });

26

27 describe(nameof(FileUtils.pathStartsWith), () => {

28 it("should return false for a undefined path", () => {

29 expect(FileUtils.pathStartsWith(undefined, "test.ts")).to.be.false;

31

32 it("should return false for an empty path", () => {

33 expect(FileUtils.pathStartsWith("", "test.ts")).to.be.false;

34 });

35

36 it("should return true when both are undefined", () => {

37 expect(FileUtils.pathStartsWith(undefined, undefined)).to.be.true;

38 });

39

juce_PluginHostType.h (https://github.com/baeksanchang/juce.git) C Header · 188 lines

152 if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric;

153

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;

56

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/";

25

26 private static final boolean isWindows = Platform.OS_WIN32.equals(Platform

27 .getOS());

28

47 if (devkitProBasePath == null) {

48 // use default location

49 if (isWindows) {

50 devkitProBasePath = new Path(WIN_DEVKITPRO_DEFAULT_PATH);

51 } else {

93 }

94

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

52

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'.

122

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:'))

147

148

StubPathBuilder.java (https://bitbucket.org/nbargnesi/idea.git) Java · 147 lines

123 final List<StubElement> children = parentStub.getChildrenStubs();

124

125 if (id.startsWith("#")) {

126 int count = Integer.parseInt(id.substring(1));

127

qgsdecorationtitledialog.cpp (https://github.com/ricardogsilva/Quantum-GIS.git) C++ · 144 lines

108

109 // edit the selected expression if there's one

110 if ( selText.startsWith( QLatin1String( "[%" ) ) && selText.endsWith( QLatin1String( "%]" ) ) )

111 selText = selText.mid( 2, selText.size() - 4 );

112

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

5 using RestSharp.Authenticators.OAuth.Extensions;

6

7 #if WINDOWS_PHONE

8 using System.Net;

9 #else

217 !parameter.Name.IsNullOrBlank() &&

218 !parameter.Value.IsNullOrBlank() &&

219 parameter.Name.StartsWith("oauth_")

220 ).ToList();

221 foreach (var parameter in oathParameters)

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;

38

63 private string GetPathForType( Type type )

64 {

65 if ( type.Namespace.StartsWith( "Rock.Model" ) )

66 {

67 var domainAttribute = type.GetCustomAttributes()

158 IsExporting = true;

159

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.

162 {

163 return

164 desc.header.name.toString().startsWith

165 ( this.header.name.toString() );

166 }

441 // REVIEW Would a better check be "(File.separator == '\')"?

442

443 // String Win32Prefix = "Windows";

444 // String prefix = osname.substring( 0, Win32Prefix.length() );

445 // if ( prefix.equalsIgnoreCase( Win32Prefix ) )

448

449 // Per Patrick Beard:

450 String Win32Prefix = "windows";

451 if ( osname.toLowerCase().startsWith( Win32Prefix ) )

468

469 // No absolute pathnames

470 // Windows (and Posix?) paths can start with "\\NetworkDrive\",

471 // so we loop on starting /'s.

472

completion_widget.py (https://github.com/yarikoptic/ipython01x.git) Python · 134 lines

21

22 self.setAttribute(QtCore.Qt.WA_StaticContents)

23 self.setWindowFlags(QtCore.Qt.ToolTip | QtCore.Qt.WindowStaysOnTopHint)

24

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

70

71 public static boolean isDelegateLayoutNode(final String layoutNodeId) {

72 return layoutNodeId.startsWith(DELEGATE_LAYOUT_NODE_ID_PREFIX);

73 }

74

MailingList.py (https://github.com/cherokee/web.git) Python · 140 lines

58 # Clean title

59 title = entry['title']

60 if title.lower().startswith("re: "):

61 title = title[4:]

62 if title.lower().startswith("[cherokee] "):

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)

107

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

168

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

16

17 import com.liferay.portal.kernel.model.Portlet;

18 import com.liferay.portal.kernel.portlet.LiferayWindowState;

19 import com.liferay.portal.kernel.util.Validator;

20

166

167 String lifecycle = getLifecycle();

168 WindowState windowState = portletRequestImpl.getWindowState();

169

170 if (!contentType.startsWith(

171 portletRequestImpl.getResponseContentType()) &&

172 !lifecycle.equals(PortletRequest.RESOURCE_PHASE) &&

173 !windowState.equals(LiferayWindowState.EXCLUSIVE)) {

174

175 throw new IllegalArgumentException(

ExecuteTest.groovy (https://github.com/groovy/groovy-core.git) Groovy · 150 lines

27 private String getCmd() {

28 def cmd = "ls -l"

29 if (System.properties.'os.name'.startsWith('Windows ')) {

30 cmd = "cmd /c dir"

31 }

VaultVersionControlProvider.cs (https://github.com/DavidMoore/Foundation.git) C# · 175 lines

5 using Foundation.ExtensionMethods;

6 using Foundation.Services;

7 using Foundation.Windows;

8

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");

139

140 if (!localPath.StartsWith(args.DestinationPath,StringComparison.CurrentCultureIgnoreCase)) return null;

141

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;

148

149 // Return a folder path, not a file path

HgScmProviderRepository.java (https://github.com/intelchen/maven-scm.git) Java · 266 lines

105 // Assume we have a file unless we find a URL based syntax

106 String prot = FILE;

107 if ( url.startsWith( SFTP ) )

108 {

109 prot = SFTP;

110 }

111 else if ( url.startsWith( HTTP ) )

112 {

113 prot = HTTP;

114 }

115 else if ( url.startsWith( HTTPS ) )

116 {

117 prot = HTTPS;

MathMLString.cpp (https://github.com/AsherBond/MondocosmOS.git) C++ · 344 lines

3

4 #ifdef _WIN32

5 # include <windows.h>

6 #endif

7

41

42 //-----------------------------------------------------------------------

43 bool StringUtil::startsWith( const String& str, const String& pattern )

44 {

45 String::size_type pos = str.find( pattern );

48

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>

10

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>&nbsp;</TD>

42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</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>&nbsp;</TD>

44 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>

45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</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')

137

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;

9

10 using Altibase.Data.AltibaseClient;

11

12 namespace WindowsApplication1

13 {

14 public partial class Form1 : Form

60 String query = e_node.s_editor.syntaxRichTextBox1.Text.Trim().ToLower();

61

62 if (query.StartsWith("select"))

63 {

64 select();

TerrainModel.cs (https://hg.codeplex.com/helixtoolkit) C# · 279 lines

12 using System.IO.Compression;

13 using System.Text;

14 using System.Windows.Media.Media3D;

15

16 /// <summary>

190 var enc = new ASCIIEncoding();

191 var marker = enc.GetString(buffer);

192 if (!marker.StartsWith("binterr"))

193 {

194 throw new FileFormatException("Invalid marker.");

bootstrap.py (https://github.com/uhuracreativemedia/emencia-django-newsletter.git) Python · 121 lines

26 tmpeggs = tempfile.mkdtemp()

27

28 is_jython = sys.platform.startswith('java')

29

30 # parsing arguments

79 def quote(c):

80 if ' ' in c:

81 return '"%s"' % c # work around spawn lamosity on windows

82 else:

83 return c

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;

22

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 });

237

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

84

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.

94

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

124 {

125 String prot = UNKNOWN;

126 if ( url.startsWith( FILE ) )

127 {

128 prot = FILE;

129 }

130 else if ( url.startsWith( FTP ) )

131 {

132 prot = FTP;

133 }

134 else if ( url.startsWith( SFTP ) )

135 {

136 prot = SFTP;

mailslot.py (https://github.com/janschejbal/sabnzbd.git) Python · 130 lines

34

35 class MailSlot(object):

36 """ Simple Windows Mailslot communication

37 """

38 slotname = r'mailslot\SABnzbd\ServiceSlot'

109 if data is not None:

110 print data

111 if data.startswith('stop'):

112 break

113 sleep(2.0)

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

2

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();

136

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

32 for name in zid.namelist():

33 cnt = zid.read(name)

34 if name.startswith(root):

35 # XXX: even on windows, the path sep in zip is '/' ?

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);

227

228 [DllImport("user32.dll")]

229 [return: MarshalAs(UnmanagedType.Bool)]

230 static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);

231

232 [DllImport("user32.dll", SetLastError = true)]

280

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.

225 compareStyle = s.ToLower(CultureInfo.InvariantCulture);

226

227 if(compareStyle.StartsWith(style, StringComparison.Ordinal) || compareStyle.Contains(style))

228 return s;

229 }

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 }

39

60 existingDir.exists()

61 existingDir.isDirectory()

62 existingDir.absolutePath.startsWith(tempDirStr)

63

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 }

43

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;

226

243 var ldiskQuery =

244 from ManagementObject ldisk in LogicalDisks

245 where ldisk["Name"].ToString().StartsWith(letter)

246 select ldisk;

247

WindowsLoginModuleTests.java (git://github.com/dblock/waffle.git) Java · 349 lines

28 import waffle.mock.MockWindowsAuthProvider;

29 import waffle.windows.auth.impl.WindowsAccountImpl;

30

31 /**

34 * @author dblock[at]dblock[dot]org

35 */

36 public class WindowsLoginModuleTests {

37

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 }

269

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

80 // so we create the short version as well, e.g. de-AT => de

81 const lang = gitlabLanguage.substring(0, 2);

82 const locales = navigator.languages.filter((l) => l.startsWith(lang));

83 if (!locales.includes(gitlabLanguage)) {

84 locales.push(gitlabLanguage);

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);

57

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

123 startsWithKey = (command, key) ->

124 command is key or

125 (command.startsWith(key) and not command.startsWith '<')

126 for command, modes of bindings when modes[numberInsertMode]? and startsWithKey command, keys

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

47

48 windows = sys.platform.startswith('win')

49

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

35

36 import javax.portlet.PortletRequest;

37 import javax.portlet.WindowState;

38

39 /**

82 }

83

84 String windowState = String.valueOf(_request.getWindowState());

85

86 if (windowState.equals(WindowState.MAXIMIZED)) {

193 String name = enu.nextElement();

194

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.

570 String key = (String) iter.next();

571

572 if (urlPath.startsWith(key)) {

573 result = new File(((String) webmaps.get(key))

574 + urlPath.substring(key.length()));

test_decorators.py (https://gitlab.com/pooja043/Globus_Docker_3) Python · 169 lines

158 @dec.skip_linux

159 def test_linux():

160 nt.assert_false(sys.platform.startswith('linux'),"This test can't run under linux")

161

162 @dec.skip_win32

163 def test_win32():

164 nt.assert_not_equal(sys.platform,'win32',"This test can't run under windows")

165

166 @dec.skip_osx

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;

238

255 var ldiskQuery =

256 from ManagementObject ldisk in LogicalDisks

257 where ldisk["Name"].ToString().StartsWith(letter)

258 select ldisk;

259

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;

21

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

175 if (fSecurityManager != null) {

176 String host = maddr.getHostAddress();

177 if (!host.startsWith("[") && host.indexOf(':') != -1) { //$NON-NLS-1$

178 host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$

179 }

juce_PluginHostType.h (https://bitbucket.org/jeromegill/genie.git) C Header · 160 lines

121 if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne;

122

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){

63

64 if (a.StartsWith("/") || a.StartsWith("-")) {

65 showUsage();

66 return;

114

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;

77

78 string rtf = sb.ToString().Trim();

79 if (!rtf.StartsWith("{\\rtf"))

80 return;

81

82 var rtBox = new System.Windows.Forms.RichTextBox();

83 try

84 {

fileConverter.ts (https://github.com/Togusa09/vscode-tmlanguage.git) TypeScript · 239 lines

75

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);

118

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

64 for i,col in enumerate(row):

65 row[i] = col.rstrip()

66 if not row[i].startswith(" "):

67 row[i] = " " + row[i]

68

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

5 using System.Collections.Generic;

6 using System.Drawing;

7 using System.Windows.Forms;

8

9 namespace ICSharpCode.SharpDevelop.Widgets.SideBar

372 void SetCanRename()

373 {

374 if (name != null && name.StartsWith("${res:")) {

375 canBeRenamed = false;

376 }

Files.java (https://github.com/branaway/play.git) Java · 196 lines

18

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 }

129

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

10

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:

43

44

45 def _get_terminal_size_windows():

46 res = None

47 try:

BaseDirFileResolverSpec.groovy (https://github.com/andrewhj-mn/gradle.git) Groovy · 218 lines

142 }

143

144 @Requires(TestPrecondition.WINDOWS)

145 def "normalizes path which uses windows 8.3 name"() {

160 }

161

162 @Requires(TestPrecondition.WINDOWS)

163 def "normalizes non-existent file system root"() {

164 def file = new File("Q:\\")

214

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

7

8

9 #if WINDOWS_PHONE

10 namespace Microsoft.Phone.Controls

11 #else

12 namespace System.Windows.Controls

13 #endif

14 {

53 return EqualsOrdinalCaseSensitive;

54

55 case AutoCompleteFilterMode.StartsWith:

56 return StartsWith;

57

58 case AutoCompleteFilterMode.StartsWithCaseSensitive:

59 return StartsWithCaseSensitive;

Selection.cs (https://github.com/bangonkali/electronics.git) C# · 460 lines

12 using Alsing.SourceCode;

13

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());

125

126 if ( ! requestPath.startsWith(domainPath) ) {

127 showError( tr("Invalid request path %1 for URL %2" ).

128 arg( requestPath ).arg( url.toString() ) );

200

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;

4

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

82 div.appendChild(this.range_.cloneContents());

83 var result = div.innerHTML;

84 if(goog.string.startsWith(result, '<') || ! this.isCollapsed() && ! goog.string.contains(result, '<')) {

85 return result;

86 }

OS.java (https://github.com/revolsys/com.revolsys.open.git) Java · 181 lines

19 public final static boolean IS_SOLARIS = OS_NAME.equals("SunOS");

20

21 public final static boolean IS_WINDOWS = OS_NAME.startsWith("Windows");

22

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

65

66 Config file must define the mapping as config var "unix2win_path_mapping"

80 """Given a unix path return the platform-specific path

81

82 On Windows, use the given mapping to translate the path. On Unix platforms,

83 this function essentially returns `unixpath`.

84

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.

89

ReplaceForEachLoopWithIndexedForLoopIntention.java (https://bitbucket.org/nbargnesi/idea.git) Java · 272 lines

144 return null;

145 }

146 if (name.startsWith("to") && name.length() > 2) {

147 return StringUtil.decapitalize(name.substring(2));

148 }

149 else if (name.startsWith("get") && name.length() > 3) {

150 return StringUtil.decapitalize(name.substring(3));

151 }

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.

67 Token t = pe.currentToken;

68 if (t != null) {

69 if (t.next != null && t.next.image.startsWith("<%")) {

70 return;

71 }

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.

35 public FtpAddress(String url)

36 {

37 if(url.startsWith(FtpVFS.FTP_PROTOCOL + ":"))

38 secure = false;

39 else if(url.startsWith(FtpVFS.SFTP_PROTOCOL + ":"))

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.

387 // returns too large a value. This bug has been fixed in JDK 1.2.

388 InputStream src;

389 if ( System.getProperty("os.name").startsWith("Windows")

390 && System.getProperty("java.version").startsWith("1.1."))

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.

293 // the local filesystem, do a tree scan

294

295 if(!browserDir.startsWith(FavoritesVFS.PROTOCOL)

296 && !browserDir.startsWith(FileRootsVFS.PROTOCOL)

297 && !path.startsWith(symlinkBrowserDir))

298 return;

299

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.

146 closingTag = tag.tag;

147

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

321 int colonPos = link.indexOf(':');

322 if ((colonPos == -1) ||

323 (!link.startsWith("file:") && !link.startsWith("mailto:")))

324 return link;

325 return link.mid(colonPos + 1).simplified();

Make_Bug_Report.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 119 lines

59 {

60 if(!startupDone &&

61 (line.startsWith("[message] jEdit:")

62 || line.startsWith("[notice] jEdit:")

63 || line.startsWith("[notice] JARClassLoader:")))

64 {

65 report.append(line).append('\n');

69 }

70 }

71 else if(line.startsWith("[error]"))

72 {

73 if(!insideError)

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.

121

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.

183 // insure that core classes are loaded from the same loader

184 if ( c == null ) {

185 if ( name.startsWith( BSH_PACKAGE ) )

186 try {

187 c = Interpreter.class.getClassLoader().loadClass( name );

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.

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.

510

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.

181

182 \sa {Cleanlooks Style Widget Gallery}, QWindowsXPStyle, QMacStyle, QWindowsStyle,

183 QCDEStyle, QMotifStyle, QPlastiqueStyle, QCleanlooksStyle

184 */

238 gdkSfg = gtkEntry->style->text[GTK_STATE_SELECTED];

239

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);

476

finddialog.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 154 lines

58 int hits, Qt::MatchFlags flags) const

59 {

60 if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap))

61 flags |= Qt::MatchCaseSensitive;

62

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.

320 WARN_RESOLVING_URI_AGAINST_EMPTY_BASE);

321 } else {

322 // if (base.toLowerCase().startsWith("file:")

323 // && base.length()>5

324 // && base.charAt(5) != '/'

488 }

489

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.

232 while((line = in.readLine()) != null)

233 {

234 if(line.startsWith("[") && line.endsWith("]"))

235 {

236 if(currentModel != null)

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 }