100+ results results for 'startswith windows 9' (45 ms)
6CUR_OS = _curos() 7IS_WIN = CUR_OS in ['Windows', 'cli'] 8IS_NIX = (not IS_WIN) and any( 8IS_NIX = (not IS_WIN) and any( 9 CUR_OS.startswith(i) for i in 10 ['CYGWIN', 'MSYS', 'Linux', 'Darwin', 'SunOS', 239 try: 240 return encoding.lower().startswith('utf-') or ('U8' == encoding) 241 except: 265 Return a function which gets width and height of console 266 (linux,osx,windows,cygwin). 267 """ 269 if IS_WIN: 270 _environ_cols = _environ_cols_windows 271 if _environ_cols is None:MoteFinder.java https://gitlab.com/rdeterre/contiki | Java | 226 lines
54 55 public static final String MOTELIST_WINDOWS = "./tools/motelist-windows.exe"; 56 public static final String MOTELIST_LINUX = "./tools/motelist-linux"; 59 private final Pattern motePattern; 60 private final boolean isWindows; 61 private final boolean isMacos; 68 String osName = System.getProperty("os.name", "").toLowerCase(); 69 isWindows = osName.startsWith("win"); 70 isMacos = osName.startsWith("mac"); 90 String fullCommand; 91 if (isWindows) { 92 fullCommand = MOTELIST_WINDOWS; 161 protected void parseIncomingLine(String line) { 162 if (line.contains("No devices found") || line.startsWith("Reference")) { 163 // No Sky connected or title before connected motesFullMailcapCommandMap.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 454 lines
226 // if you don't delete the .old file first, then the 227 // rename fails under Windows. 228 String oldSourceName = sourceFile.getAbsolutePath() + ".old"; 258 while (nextLine != null) { 259 if (!(nextLine.startsWith("#"))) 260 map.addMailcapEntry(nextLine); 435 return null; 436 if (! command.startsWith("x-java-")) 437 return new String[] {command, FullMailcapCommandMap.getExternalLauncher()};terminalwriter.py https://gitlab.com/phongphans61/machine-learning-tictactoe | Python | 423 lines
54 55 # XXX the windows getdimensions may be bogus, let's sanify a bit 56 if width < 40: 139 and os.environ.get('TERM') != 'dumb' \ 140 and not (sys.platform.startswith('java') and os._name == 'nt') 141 221 if sys.platform == "win32": 222 # if we print in the last column on windows we are on a 223 # new line but there is no way to verify/neutralize this 341 342 # ctypes access to the Windows console 343 STD_OUTPUT_HANDLE = -11 371 ('srWindow', SMALL_RECT), 372 ('dwMaximumWindowSize', COORD)] 373X11DesktopColors.cs https://github.com/cschlote/mono.git | C# | 294 lines
32 33namespace System.Windows.Forms { 34 internal class X11DesktopColors { 169 } else 170 if ( session.StartsWith("KDE") ) 171 desktop = Desktop.KDE; 204 205 if (line.StartsWith( "background=")) { 206 tmp_color = GetColorFromKDEString(line); 212 } else 213 if (line.StartsWith( "foreground=")) { 214 tmp_color = GetColorFromKDEString(line); 220 } else 221 if (line.StartsWith("selectBackground")) { 222 tmp_color = GetColorFromKDEString(line);runtests.py https://github.com/theosp/google_appengine.git | Python | 326 lines
51 spatial_dbs = [name for name, db_dict in settings.DATABASES.items() 52 if db_dict['ENGINE'].startswith('django.contrib.gis')] 53 return len(spatial_dbs) == len(settings.DATABASES) 61 for f in os.listdir(dirpath): 62 if (f.startswith('__init__') or 63 f.startswith('.') or 63 f.startswith('.') or 64 f.startswith('sql') or 65 os.path.basename(f) in REGRESSION_SUBDIRS_TO_SKIP): 140 # so that it will successfully remove temp trees containing 141 # non-ASCII filenames on Windows. (We're assuming the temp dir 142 # name itself does not contain non-ASCII characters.)setup.py https://github.com/RoDaniel/featurehouse.git | Python | 201 lines
49for line in file('lib/matplotlib/__init__.py').readlines(): 50 if (line.startswith('__version__')): 51 exec(line.strip()) 57if sys.platform == 'win32': 58 print_status('Windows version', sys.getwindowsversion()) 59print_raw("")NativeLibraryLoader.java https://gitlab.com/taichu/netty | Java | 346 lines
84 // This shouldn't happen, but just in case .. 85 if (isWindows()) { 86 f = toDirectory(System.getenv("TEMP")); 117 // Last resort. 118 if (isWindows()) { 119 f = new File("C:\\Windows\\Temp"); 148 private static boolean isWindows() { 149 return OSNAME.startsWith("windows"); 150 } 152 private static boolean isOSX() { 153 return OSNAME.startsWith("macosx") || OSNAME.startsWith("osx"); 154 }CommitInfo.cs https://github.com/eyalxjet/gitextensions.git | C# | 230 lines
3using System.Text.RegularExpressions; 4using System.Windows.Forms; 5using GitCommands; 150 // This shouldn't be a big problem if we're only displaying information. 151 branchIsLocal = !branch.StartsWith(remotesPrefix); 152 if (!branchIsLocal)SarifDiagnostics.cpp https://gitlab.com/williamwp/riscv-rv32x-llvm | C++ | 349 lines
76 StringRef Root = sys::path::root_name(Filename); 77 if (Root.startswith("//")) { 78 // There is an authority, so add it to the URI. 89 std::for_each(++Iter, End, [&Ret](StringRef Component) { 90 // For reasons unknown to me, we may get a backslash with Windows native 91 // paths for the initial backslash following the drive component, whichGetBatchTaskCommandTests.cs https://gitlab.com/jslee1/azure-powershell | C# | 271 lines
18using Microsoft.Rest.Azure; 19using Microsoft.WindowsAzure.Commands.ScenarioTest; 20using Moq; 155 cmdlet.Id = null; 156 cmdlet.Filter = "startswith(id,'test')"; 157 cmdlet.Select = "id,state";ResourcesExtensions.cs https://gitlab.com/jslee1/azure-powershell | C# | 268 lines
26using Microsoft.Azure.Management.Resources.Models; 27using Microsoft.WindowsAzure.Commands.Utilities.Common; 28using Newtonsoft.Json; 158 { 159 if (tagValuePair.Name.StartsWith(TagsClient.ExecludedTagPrefix)) 160 {Gen.java https://gitlab.com/borneywpf/openjdk-7-src | Java | 384 lines
87 static private final boolean isWindows = 88 System.getProperty("os.name").startsWith("Windows"); 89 269 // Visual C++ supports the i64 suffix, not LL. 270 if (isWindows) 271 constString = value.toString() + "i64";MavenArtifactRepository.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 408 lines
243 // special case: if omitted // on protocol, keep path as is 244 if ( retValue.startsWith( "//" ) ) 245 { 249 { 250 // special case: if there is a windows drive letter, then keep the original return value 251 retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); 261 262 // special case: if there is a windows drive letter, then keep the original return value 263 if ( retValue.length() >= 2 && ( retValue.charAt( 1 ) == '|' || retValue.charAt( 1 ) == ':' ) ) 274 275 // special case: if there is a windows drive letter using |, switch to : 276 if ( retValue.length() >= 2 && retValue.charAt( 1 ) == '|' )perf_device_trigger_unittest.py https://github.com/chromium/chromium.git | Python | 353 lines
100 'os', 101 'windows', 102 '--', 182 g = 'GTEST_SHARD_INDEX=' 183 shard = [int(r[len(g):]) for r in run if r.startswith(g)][0] 184Screenshot.py https://gitlab.com/freedmpure/robotframework | Python | 328 lines
16import os 17if sys.platform.startswith('java'): 18 from java.awt import Toolkit, Robot, Rectangle 22 import clr 23 clr.AddReference('System.Windows.Forms') 24 clr.AddReference('System.Drawing') 25 from System.Drawing import Bitmap, Graphics, Imaging 26 from System.Windows.Forms import Screen 27else: 36 try: 37 from PIL import ImageGrab # apparently available only on Windows 38 except ImportError: 62 - Python Imaging Library (PIL) :: http://www.pythonware.com/products/pil :: 63 This module can take screenshots only on Windows. 64identifier.js https://gitlab.com/nguyenthehiep3232/marius | JavaScript | 377 lines
8 9const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/; 10const SEGMENTS_SPLIT_REGEXP = /([|!])/; 10const SEGMENTS_SPLIT_REGEXP = /([|!])/; 11const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g; 12 20 if (relativePath === "..") return "../."; 21 if (relativePath.startsWith("../")) return relativePath; 22 return `./${relativePath}`; 51 52 if (WINDOWS_ABS_PATH_REGEXP.test(maybeAbsolutePath)) { 53 const querySplitPos = maybeAbsolutePath.indexOf("?"); 78const requestToAbsolute = (context, relativePath) => { 79 if (relativePath.startsWith("./") || relativePath.startsWith("../")) 80 return path.join(context, relativePath);template_verifier.py https://github.com/balp/NaCl-main.git | Python | 311 lines
76 stderr separately(to get around "killed by signal 15" getting 77 included as part of the file). Also, works on Windows.""" 78 (input, out, err) = os.popen3(command, 't') 136def fetch(url): 137 if url.startswith('file://'): 138 # just open the file directly because urllib is dumb about these things 175 # We can't rename atomically on top of an existing file on 176 # Windows. Unlinking the existing file will fail if the 177 # file is being held open by a process, but there's onlyTextureBundleXBT.cpp https://gitlab.com/sloshedpuppie/LetsGoRetro | C++ | 318 lines
34 35#ifdef TARGET_WINDOWS 36#pragma comment(lib,"liblzo2.lib") 126 std::string path = files[i].GetPath(); 127 if (StringUtils::StartsWithNoCase(path, testPath)) 128 textures.push_back(path);setup.py https://github.com/helloandre/cr48.git | Python | 391 lines
79 # This will have to be changed if we ever have to check 80 # for a function on Windows. 81 devnull = open('/dev/null', 'w') 128 err = [e for e in err.splitlines() 129 if not e.startswith(b('Not trusting file')) \ 130 and not e.startswith(b('warning: Not importing'))] 148 # Copy SystemRoot into the custom environment for Python 2.6 149 # under Windows. Otherwise, the subprocess will fail with 150 # error 0xc0150004. See: http://bugs.python.org/issue3440 247 for ext in self.distribution.ext_modules: 248 if ext.name.startswith("mercurial."): 249 self.py_modules.append("mercurial.pure.%s" % ext.name[10:]) 323 324# disable osutil.c under windows + python 2.4 (issue1364) 325if sys.platform == 'win32' and sys.version_info < (2, 5, 0, 'final'):Platform.java https://github.com/akafugu/Xmegaduino.git | Java | 231 lines
22 23package processing.app.windows; 24 68 69 CommandLine toDevicePath = CommandLine.parse("reg query \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\" /v \"" + folderType + "\""); 70 executor.execute(toDevicePath); 74 /** 75 * Remove extra quotes, slashes, and garbage from the Windows PATH. 76 */ 82 for (String item : pieces) { 83 if (item.startsWith("\"")) { 84 item = item.substring(1); 127 // after they're unpacked from the zip file. i don't know why, 128 // and don't understand what this does in terms of windows 129 // permissions. without the chmod, the command prompt sayshistory.py https://gitlab.com/gregtyka/frankenserver | Python | 530 lines
7 and Unix systems 8- `pyreadline`_, which many people use on Windows systems 9- A dummy fallback history implementation that does nothing, for when readline 65 try: 66 _have_pyreadline = readline.rl.__module__.startswith('pyreadline.') 67 except AttributeError:GetBatchPoolCommandTests.cs https://gitlab.com/jslee1/azure-powershell | C# | 233 lines
18using Microsoft.Rest.Azure; 19using Microsoft.WindowsAzure.Commands.ScenarioTest; 20using Moq; 31{ 32 public class GetBatchPoolCommandTests : WindowsAzure.Commands.Test.Utilities.Common.RMTestBase 33 { 122 cmdlet.Id = null; 123 cmdlet.Filter = "startswith(id,'test')"; 124 cmdlet.Select = "id,state";FileUtil.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 468 lines
355 * understands. That is all elements are separated by a forward slash rather 356 * than back slashes as on Windows systems. 357 * 389 filename = this.javaFilename(filename) ; 390 startedFromRoot = filename.startsWith( "/" ) ; 391 nameElements = this.str().parts( filename, "/" ) ;generate_stubs_unittest.py https://github.com/chromium/chromium.git | Python | 325 lines
131 132class WindowsLibUnittest(unittest.TestCase): 133 def testWriteWindowsDefFile(self): 136 outfile = StringIO.StringIO() 137 gs.WriteWindowsDefFile(module_name, signatures, outfile) 138 contents = outfile.getvalue() 140 # Check that the file header is correct. 141 self.assertTrue(contents.startswith("""LIBRARY %s 142EXPORTSmain.cpp https://bitbucket.org/jpe/experimental-shiboken.git | C++ | 448 lines
35 36#ifdef _WINDOWS 37 #define PATH_SPLITTER ";" 185 foreach (const QString& arg, arguments) { 186 if (arg.startsWith("--project-file")) { 187 int split = arg.indexOf("="); 226 arg = arg.trimmed(); 227 if (arg.startsWith("--")) { 228 int split = arg.indexOf("="); 232 args[arg.mid(2)] = QString(); 233 } else if (arg.startsWith("-")) { 234 args[arg.mid(1)] = QString();site.py https://github.com/argodev/BiLab.git | Python | 430 lines
16lib/python<version>/site-packages as well as lib/site-python. 17On other platforms (such as Windows), it tries each of the 18prefixes directly, as well as with lib/site-packages appended. The 68 dir = os.path.join(*paths) 69 if dir == '__classpath__' or dir.startswith('__pyclasspath__'): 70 return dir, dir 140 for line in f: 141 if line.startswith("#"): 142 continue 142 continue 143 if line.startswith("import"): 144 exec line 357def aliasmbcs(): 358 """On Windows, some default encodings are not provided by Python, 359 while they are always available as "mbcs" in each locale. Makefunc_inspect.py https://gitlab.com/sirarredondo/Plasmid_Assembly | Python | 303 lines
48 line_no = 1 49 if source_file.startswith('<doctest '): 50 source_file, line_no = re.match( 76def _clean_win_chars(string): 77 """Windows cannot encode some characters in filename.""" 78 import urllib 101 If true, substitute special characters using urllib.quote 102 This is useful in Windows, as it cannot encode some filenames 103 """ 124 parts = filename.split(os.sep) 125 if parts[-1].startswith('<ipython-input'): 126 # function is defined in an IPython session. The filename 152 if os.name == 'nt' and win_characters: 153 # Stupid windows can't encode certain characters in filenames 154 name = _clean_win_chars(name)HippoPlatformImpl.cpp https://gitlab.com/manoj-makkuboy/magnetism | C++ | 385 lines
5#include <HippoUtil.h> 6#include <Windows.h> 7#include <mshtml.h> 108static bool 109startsWith(WCHAR *str, WCHAR *prefix) 110{ 196 197 if (!startsWith(p, L"auth=")) 198 continue; 245void 246hippo_platform_impl_windows_migrate_cookie(const char *from_web_host, 247 const char *to_web_host)posixpath.py https://github.com/kephale/breve.git | Python | 454 lines
4this module as os.path. The "os.path" name is an alias for this 5module on Posix systems; on other systems (e.g. Mac, Windows), 6os.path provides the same operations in a manner specific to that 48 """Test whether a path is absolute""" 49 return s.startswith('/') 50 59 for b in p: 60 if b.startswith('/'): 61 path = b 99# Split a pathname into a drive specification and the rest of the 100# path. Useful on DOS/Windows/NT; on Unix, the drive is always empty. 101 381 if (initial_slashes and 382 path.startswith('//') and not path.startswith('///')): 383 initial_slashes = 2juce_ApplicationBase.cpp https://gitlab.com/bill-auger/JUCE | C++ | 308 lines
109 110 if (message.startsWith (appName + "/")) 111 app->anotherInstanceStarted (message.substring (appName.length() + 1)); 140 141#if JUCE_WINDOWS && ! defined (_CONSOLE) 142 173 174#if JUCE_WINDOWS 175 const char* const* juce_argv = nullptr; 259 260 #if JUCE_WINDOWS && JUCE_STANDALONE_APPLICATION && (! defined (_CONSOLE)) && (! JUCE_MINGW) 261 if (AttachConsole (ATTACH_PARENT_PROCESS) != 0)gitindex.h https://gitlab.com/zhaohaiyi/tortoisegit | C Header | 489 lines
1// TortoiseGit - a Windows shell extension for easy version control 2 109 { 110 if (CStringUtils::StartsWith((*it).first, thePath)) 111 toRemove.push_back((*it).first); 245 { 246 if (CStringUtils::StartsWith((*it).first, thePath)) 247 toRemove.push_back((*it).first); 334 bool CheckAndUpdateCoreExcludefile(const CString &adminDir); 335 const CString GetWindowsHome(); 336NeuronEditor.cs https://gitlab.com/Tiger66639/neural_network_designer | C# | 301 lines
2using System.ComponentModel; 3using System.Windows; 4using System.Windows.Threading; 183 { 184 if (Name.StartsWith(NamePrefix + ": ") == false) //if the name starts with Code: or similar, we need to strip the first part. If we don't, we get a stack overflow because this with the fData_PropertyChanged callback keep calling each other. 185 NeuronInfo.DisplayTitle = Name; 237 /// </summary> 238 /// <param name="managerType">The type of the <see cref="T:System.Windows.WeakEventManager"/> calling this method.</param> 239 /// <param name="sender">Object that originated the event.</param> 241 /// <returns> 242 /// true if the listener handled the event. It is considered an error by the <see cref="T:System.Windows.WeakEventManager"/> handling in WPF to register a listener for an event that the listener does not handle. Regardless, the method should return false if it receives an event that it does not recognize or handle. 243 /// </returns> 294 { 295 if (string.IsNullOrEmpty(Name) == false && Name.StartsWith(NamePrefix + ": ") == true && Name != fData.DisplayTitle) //name != displayTitle cause when name is changed,sometimes displaytitle might also get 296 Name = NamePrefix + ": " + fData.DisplayTitle;Program.cs https://github.com/andrewdavey/ravendb.git | C# | 356 lines
56 { 57 // no try catch here, we want the exception to be logged by Windows 58 ServiceBase.Run(new RavenService()); 136 { 137 var principal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); 138 if (principal.IsInRole(WindowsBuiltInRole.Administrator) == false) 169 return "debug"; 170 if (args[0].StartsWith("/") == false) 171 return "help";OutputWriter.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 296 lines
113 String os = System.getProperty("os.name").toLowerCase(); 114 if (os.startsWith("windows") || 115 os.startsWith("mac os"))connection.py https://gitlab.com/CoastHeavyIndustries/OSM-stats | Python | 428 lines
1# 2# A higher level module for using sockets (or Windows named pipes) 3# 79 return 'AF_INET' 80 elif type(address) is str and address.startswith('\\\\'): 81 return 'AF_PIPE' 95 This is a wrapper for a bound socket which is 'listening' for 96 connections, or for a Windows named pipe. 97 ''' 206 win32.ConnectNamedPipe(h1, win32.NULL) 207 except WindowsError, e: 208 if e.args[0] != win32.ERROR_PIPE_CONNECTED: 319 win32.ConnectNamedPipe(handle, win32.NULL) 320 except WindowsError, e: 321 if e.args[0] != win32.ERROR_PIPE_CONNECTED:WinSerialStream.cs https://github.com/skolima/mono.git | C# | 577 lines
20 { 21 // Windows API Constants 22 const uint GenericRead = 0x80000000; 78 { 79 handle = CreateFile (port_name != null && !port_name.StartsWith(@"\\.\") 80 ? @"\\.\" + port_name : port_name, 555 { 556 // FIXME: The windows api docs are not very clear about read timeouts, 557 // and we have to simulate infinite with a big value (uint.MaxValue - 1)RegistryUtil.cs https://gitlab.com/nerdymishka/kweh | C# | 320 lines
21 22 return left.StartsWith(right); 23 }; 26 { 27 @"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", 28 @"HKLM:\SOFTWARE\WOW6432Node\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", 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", 38 { 39 if (subKeyName.StartsWith("HKU") && noSid) 40 continue;CmsResourceMngImpl.java https://gitlab.com/MetadataDev/mcms | Java | 447 lines
253 name = en.nextElement().getName(); 254 if (!name.startsWith(RES_EXP)) { 255 solution = name.substring(0, name.indexOf("/")); 268 // 模板还是资源 269 if (name.startsWith(RES_EXP)) { 270 filename = resRoot + "/" + solutionico_tools.py https://github.com/chromium/chromium.git | Python | 385 lines
22 """Determines whether a sequence of bytes is a PNG.""" 23 return png_data.startswith(b'\x89PNG\r\n\x1a\n') 24 74def BytesPerRowBMP(width, bpp): 75 """Computes the number of bytes per row in a Windows BMP image.""" 76 # width * bpp / 8, rounded up to the nearest multiple of 4. 184 transparent. Pixels that violate this condition will show up as black in some 185 contexts in Windows (http://crbug.com/526622). Also checks the inverse 186 condition, that the mask is transparent wherever the alpha channel is fully 203 # mask is transparent, alpha is partially or fully opaque. This pixel 204 # can show up as black on Windows due to a rendering bug. 205 return False 217 GIMP (<=2.8.14) creates a bad AND mask on 32-bit icon images (pixels with <50% 218 opacity are marked as transparent, which end up looking black on Windows). 219 With rebuild == False, checks whether the mask is bad. With rebuild == True,PluginMain.cs https://bitbucket.org/kkszysiu/flashdevelop.git | C# | 361 lines
3using System.Drawing; 4using System.Windows.Forms; 5using System.ComponentModel; 129 String cmd = de.Action; 130 if (!cmd.StartsWith("ProjectManager.")) return; 131 switch (cmd)TestInferiorAssert.py https://gitlab.com/jorjpimm/lldb | Python | 273 lines
20 @expectedFailureDarwin("rdar://15367233") 21 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") 22 def test_inferior_asserting_dwarf(self): 32 33 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") 34 def test_inferior_asserting_register_dwarf(self): 41 @expectedFailureLinux("PC in __GI___assert_fail frame is just after the function (this is a no-return so there is no epilogue afterwards)") 42 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") 43 def test_inferior_asserting_disassemble(self): 48 @python_api_test 49 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") 50 def test_inferior_asserting_python(self): 63 @unittest2.expectedFailure("rdar://15367233") 64 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") 65 def test_inferior_asserting_expr(self):FileSystemHelper.cs https://gitlab.com/jslee1/azure-powershell | C# | 321 lines
17using System.IO; 18using Microsoft.WindowsAzure.Commands.Common; 19using Microsoft.WindowsAzure.Commands.Utilities.CloudService; 19using Microsoft.WindowsAzure.Commands.Utilities.CloudService; 20using Microsoft.WindowsAzure.Commands.Utilities.Common; 21using Microsoft.Azure.Commands.Common.Authentication; 24 25namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common 26{ 191 Debug.Assert(!string.IsNullOrEmpty(fullPath)); 192 Debug.Assert(fullPath.StartsWith(RootPath, StringComparison.OrdinalIgnoreCase)); 193 return fullPath.Substring(RootPath.Length, fullPath.Length - RootPath.Length);_htmlparser.py https://bitbucket.org/bendikro/deluge-yarss-plugin.git | Python | 350 lines
136 # http://bugs.python.org/issue13633 137 if name.startswith('x'): 138 real_name = int(name.lstrip('x'), 16) 138 real_name = int(name.lstrip('x'), 16) 139 elif name.startswith('X'): 140 real_name = int(name.lstrip('X'), 16) 147 # code points, but sometimes they reference code points in 148 # some other encoding (ahem, Windows-1252). E.g. “ 149 # instead of É for LEFT DOUBLE QUOTATION MARK. This 150 # code tries to detect this situation and compensate. 151 for encoding in (self.soup.original_encoding, 'windows-1252'): 152 if not encoding: 185 self.soup.endData() 186 if data.startswith("DOCTYPE "): 187 data = data[len("DOCTYPE "):]4SerenityFeatureLivePlugin.cs https://gitlab.com/enesasillioglu/GitExtensions-SerenityFlow-Plugin | C# | 174 lines
2using System.IO; 3using System.Windows.Forms; 4using GitCommands; 83 if (mergeLines.Length < 3 || 84 !mergeLines[0].StartsWith("commit ", StringComparison.OrdinalIgnoreCase) || 85 !mergeLines[1].StartsWith("Merge: ", StringComparison.OrdinalIgnoreCase) || 85 !mergeLines[1].StartsWith("Merge: ", StringComparison.OrdinalIgnoreCase) || 86 !mergeLines[2].StartsWith("Author: ", StringComparison.OrdinalIgnoreCase) || 87 !mergeLines[4].Trim().StartsWith("Merge branch '", StringComparison.OrdinalIgnoreCase) || 102 if (lines.Length < 3 || 103 ((!lines[0].StartsWith("commit ", StringComparison.OrdinalIgnoreCase) || 104 !lines[1].StartsWith("Author: ", StringComparison.OrdinalIgnoreCase)) && 104 !lines[1].StartsWith("Author: ", StringComparison.OrdinalIgnoreCase)) && 105 (!lines[0].StartsWith("commit ", StringComparison.OrdinalIgnoreCase) || 106 !lines[1].StartsWith("Merge: ", StringComparison.OrdinalIgnoreCase) ||SetSavedDataPage.cpp https://gitlab.com/hussinhassan80/tortoisegit | C++ | 402 lines
1// TortoiseGit - a Windows shell extension for easy version control 2 29#include "Git.h" 30#include "WindowsCredentialsStore.h" 31 91 CString sHistName = loghistlist.GetNext(pos); 92 if (CStringUtils::StartsWithI(sHistName, L"commit") || CStringUtils::StartsWithI(sHistName, L"merge")) 93 { 142 CStringList credStore; 143 CWindowsCredentialsStore::ListCredentials(L"git:*", credStore); 144 nSimple += static_cast<int>(credStore.GetCount()); 222 CString sHist = histlist.GetNext(pos); 223 if (CStringUtils::StartsWithI(sHist, L"commit")) 224 { 254 CStringList credStore; 255 CWindowsCredentialsStore::ListCredentials(L"git:*", credStore); 256 for (POSITION pos = credStore.GetHeadPosition(); pos;)AdminWhitelistRule.java https://gitlab.com/CORP-RESELLER/jenkins | Java | 229 lines
72 new File(jenkins.getRootDir(), "secrets/filepath-filters.d/30-default.conf"), 73 transformForWindows(getClass().getResourceAsStream("filepath-filter.conf"))); 74 106 /** 107 * Transform path for Windows. 108 */ 108 */ 109 private InputStream transformForWindows(InputStream src) throws IOException { 110 BufferedReader r = new BufferedReader(new InputStreamReader(src)); 114 while ((line=r.readLine())!=null) { 115 if (!line.startsWith("#") && Functions.isWindows()) 116 line = line.replace("/","\\\\"); 166 String name = (String) e.nextElement(); 167 if (name.startsWith("class:")) { 168 whitelist += name.substring(6)+"\n";SetupLiveEditingSceneOperator.py https://gitlab.com/sat-metalab/InSituImmersiveAuthoring | Python | 308 lines
23 def set_camera_view(self): 24 for window in bpy.context.window_manager.windows: 25 screen = window.screen 90 ) as (data_from, data_to): 91 data_to.objects = [name for name in data_from.objects if name.startswith("Vive")] 92 with bpy.data.libraries.load( 95 ) as (data_from, data_to): 96 data_to.meshes = [name for name in data_from.meshes if name.startswith("Vive")] 97 data_to.materials = [name for name in data_from.materials if name.startswith("Vive")] 97 data_to.materials = [name for name in data_from.materials if name.startswith("Vive")] 98 data_to.textures = [name for name in data_from.textures if name.startswith("Vive")] 99 278 with bpy.data.libraries.load(filepath=current_file_path+"/../assets/materials.blend", link=True) as (data_from, data_to): 279 data_to.materials = [name for name in data_from.materials if name.startswith("Mat_")] 280plcfactory.py https://gitlab.com/gregor_ulm/plc_factory | Python | 416 lines
133 for i in range(len(lines)): 134 if lines[i].startswith(tag): 135 tagPos = i 176 177# ensures that filenames are legal in Windows 178# (OSX automatically replaces illegal characters) 343 line = line.rstrip() 344 if not line.startswith("#COUNTER") \ 345 and not line.startswith("#FILENAME"):glances_stats.py https://gitlab.com/132nd-etcher/glances | Python | 407 lines
34 '.*BSD.*': 'bsd', 35 '.*Windows.*': 'windows', 36 '.*Cisco.*': 'cisco', 71 # Check if the attribute starts with 'get' 72 if item.startswith('get'): 73 # Get the plugin name 90 for item in os.listdir(plugins_path): 91 if (item.startswith(header) and 92 item.endswith(".py") and 117 export_name = os.path.basename(item)[len(header):-3].lower() 118 if (item.startswith(header) and 119 item.endswith(".py") andfilebased.py https://gitlab.com/areema/myproject | Python | 154 lines
68 def _delete(self, fname): 69 if not fname.startswith(self._dir) or not os.path.exists(fname): 70 return 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)ping.py https://gitlab.com/rshipp/python-ping | Python | 364 lines
7 Note that ICMP messages can only be send from processes running as root 8 (in Windows, you must run this script as 'Administrator'). 9 28 29if sys.platform.startswith("win32"): 30 # On Windows, the best timer is time.clock() 166 if hasattr(signal, "SIGBREAK"): 167 # Handle Ctrl-Break e.g. under Windows 168 signal.signal(signal.SIGBREAK, self.signal_handler) 348 349 # Inconsistent on Windows w/ ActivePython (Python 3.2 resolves correctly 350 # to the local host, but 2.7 tries to resolve to the local *gateway*)NewAzureDeployment.cs https://gitlab.com/jslee1/azure-powershell | C# | 284 lines
19using Microsoft.Azure.Commands.Common.Authentication.Models; 20using Microsoft.WindowsAzure.Commands.Common; 21using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; 21using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; 22using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; 23using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; 23using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; 24using Microsoft.WindowsAzure.Commands.Utilities.Common; 25using Microsoft.WindowsAzure.Management.Compute.Models; 25using Microsoft.WindowsAzure.Management.Compute.Models; 26using Microsoft.WindowsAzure.Management.Compute; 27 64 [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot [Staging | Production].")] 65 [ValidateSet(Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DeploymentSlotType.Staging, Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DeploymentSlotType.Production, IgnoreCase = true)] 66 public string Slotexception.html https://github.com/thirumg/Avro.NET.git | HTML | 316 lines
5<title>NUnit - Exception</title> 6<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 7<meta http-equiv="Content-Language" content="en-US"> 89 /// Expect a message starting with the parameter string 90 StartsWith 91}</pre></div>runUnitTests.py https://github.com/mogaal/editra.git | Python | 354 lines
5## Copyright: (c) 2008 Cody Precord <staff@editra.org> # 6## License: wxWindows License # 7################################################################################ 47 for arg in args: 48 if arg.startswith("-") and not arg.startswith("--"): 49 # handle the case where opt and arg are conjoined 89 for _name in [ n[:-3] for n in os.listdir(self.rootdir) 90 if n.startswith("test") and n.endswith(".py") ]: 91 _module_names[ _name.lower() ] = _name 150 restriction = _mname[_mname.find('_wx')+3:-4] 151 if not _class.__name__.startswith(restriction): 152 #print "filtered: %s (class=%s)" % (mname,_class.__name__) 166 s = s[:-3] 167 if s.startswith("wx."): 168 s = "test" + s[3:]test_time.py git://github.com/IronLanguages/main.git | Python | 250 lines
41 # Issue #10762: Guard against invalid/non-supported format string 42 # so that Python don't crash (Windows crashes when the format string 43 # input to [w]strftime is not kosher. 43 # input to [w]strftime is not kosher. 44 if sys.platform.startswith('win'): 45 with self.assertRaises(ValueError):gamma.py https://gitlab.com/braintech/psychopy-brain | Python | 356 lines
34 carbon = ctypes.CDLL('/System/Library/Carbon.framework/Carbon') 35elif sys.platform.startswith('linux'): 36 # we need XF86VidMode 96 97 On windows the first attempt to set the ramp doesn't always work. The 98 parameter nAttemps allows the user to determine how many attempts should 139 140 if sys.platform.startswith('linux') and not _TravisTesting: 141 newRamp = (numpy.around(65535 * newRamp)).astype(numpy.uint16) 203 204 if sys.platform.startswith('linux') and not _TravisTesting: 205 origramps = numpy.empty((3, rampSize), dtype=numpy.uint16) 236 rampType 0 : an 8-bit CLUT ranging 0:1 237 This is seems correct for most windows machines and older macOS systems 238 Known to be used by:_MozillaCookieJar.py https://gitlab.com/dahbearz/CRYENGINE | Python | 149 lines
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() == ""): 80 81 initial_dot = domain.startswith(".") 82 assert domain_specified == initial_dot 128 else: secure = "FALSE" 129 if cookie.domain.startswith("."): initial_dot = "TRUE" 130 else: initial_dot = "FALSE"Helpers.cs https://gitlab.com/jslee1/azure-powershell | C# | 199 lines
17using Microsoft.Azure.Management.Batch.Models; 18using Microsoft.WindowsAzure.Commands.Utilities.Common; 19using System; 141 { 142 if (tagValuePair.Name.StartsWith(ExcludedTagPrefix)) 143 {linux_ip.py https://gitlab.com/ricardo.hernandez/salt | Python | 194 lines
15 ''' 16 if salt.utils.is_windows(): 17 return (False, 'Module linux_ip: Windows systems are not supported.') 67 for line in out.splitlines(): 68 if not line.startswith(' '): 69 comps = line.split(':') 78 else: 79 if line.strip().startswith('link'): 80 comps = iter(line.strip().split()) 81 ret[if_]['link_layer'] = dict(list(zip(comps, comps))) 82 elif line.strip().startswith('inet'): 83 comps = line.strip().split() 141 continue 142 if line.startswith('Iface'): 143 continuebase.py https://github.com/hradec/chemshapes.git | Python | 386 lines
243 _workaround_checks = [ 244 # GDI Generic renderer on Windows does not implement 245 # GL_UNPACK_ROW_LENGTH correctly. 255 ('_workaround_vbo', 256 lambda info: (info.get_renderer().startswith('ATI Radeon X') 257 or info.get_renderer() ==SubmoduleUpdateDlg.cpp https://gitlab.com/Sajjad-dehghani/tortoisegit | C++ | 311 lines
1// TortoiseGit - a Windows shell extension for easy version control 2 41{ 42 s_bSortLogical = !CRegDWORD(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoStrCmpLogical", 0, false, HKEY_CURRENT_USER); 43 if (s_bSortLogical) 43 if (s_bSortLogical) 44 s_bSortLogical = !CRegDWORD(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoStrCmpLogical", 0, false, HKEY_LOCAL_MACHINE); 45} 84 CString prefix = prefixList->at(i) + _T("/"); 85 if (CStringUtils::StartsWith(path, prefix)) 86 list->push_back(path);config.py https://gitlab.com/gupta.d.gaurav/paramiko | Python | 287 lines
38 convenience to posix users (since the OpenSSH format is a de-facto 39 standard on posix) but should work fine on Windows too. 40 62 line = line.strip() 63 if not line or line.startswith('#'): 64 continue 81 else: 82 if value.startswith('"') and value.endswith('"'): 83 value = value[1:-1] 148 for host in hosts: 149 if host.startswith('!') and fnmatch.fnmatch(hostname, host[1:]): 150 return FalsePlateButtonDemo.py https://github.com/mogaal/editra.git | Python | 280 lines
5# Copyright: (c) 2007 Cody Precord <staff@editra.org> # 6# Licence: wxWindows Licence # 7############################################################################### 163 for fname in os.listdir(wx.GetHomeDir()): 164 if not fname.startswith('.'): 165 menu.Append(wx.NewId(), fname) 221 label = mitem.GetLabel() 222 if label.startswith('http://'): 223 webbrowser.open(label, True)Runtime.cs https://github.com/jlangridge/monodevelop.git | C# | 319 lines
103 foreach (AddinRepository rep in reps.GetRepositories ()) { 104 if (rep.Url.StartsWith ("http://go-mono.com/md/") || 105 (rep.Url.StartsWith ("http://monodevelop.com/files/addins/")) || 105 (rep.Url.StartsWith ("http://monodevelop.com/files/addins/")) || 106 (rep.Url.StartsWith ("http://addins.monodevelop.com/") && !validUrls.Contains (rep.Url))) 107 reps.RemoveRepository (rep.Url); 119 string platform; 120 if (PropertyService.IsWindows) 121 platform = "Win32";itkBase.py https://github.com/arnaudgelas/ITK.git | Python | 256 lines
59 for k, v in this_module.__dict__.items(): 60 if not (k.startswith('_') or k == 'swig'): 61 namespace[k] = v 86 try: 87 # for a windows tree 88 execfile(os.path.join(path, '..', 'Configuration', conf), data) 134 for k, v in module.__dict__.items(): 135 if not k.startswith('__'): 136 setattr(this_module.swig, k, v) 136 setattr(this_module.swig, k, v) 137 if namespace is not None and not k.startswith('__'): 138 setattr(swig, k, v)SubStationAlphaProperties.cs https://gitlab.com/minaz922/subtitleedit | C# | 273 lines
4using System.Text; 5using System.Windows.Forms; 6using Nikse.SubtitleEdit.Logic; 62 string s = line.ToLower().Trim(); 63 if (s.StartsWith("title:")) 64 { 66 } 67 else if (s.StartsWith("original script:")) 68 { 70 } 71 else if (s.StartsWith("original translation:")) 72 { 74 } 75 else if (s.StartsWith("original editing:")) 76 {MorePaths.java https://gitlab.com/smartether/buck | Java | 304 lines
55 56 public static String pathWithWindowsSeparators(Path path) { 57 return path.toString().replace('/', '\\'); 64 public static String pathWithPlatformSeparators(Path path) { 65 if (Platform.detect() == Platform.WINDOWS) { 66 return pathWithWindowsSeparators(path); 122 123 // On Windows, if path1 is "" then Path.relativize returns ../path2 instead of path2 or ./path2 124 if (EMPTY_PATH.equals(path1)) { 171 if (input.isAbsolute()) { 172 return input.normalize().startsWith(normalizedRoot); 173 } else { 190 public static Path expandHomeDir(Path path) { 191 if (!path.startsWith("~")) { 192 return path;String.php https://github.com/jakubkinst/Course-Manager.git | PHP | 474 lines
78 */ 79 public static function startsWith($haystack, $needle) 80 { 133 if (ICONV_IMPL === 'glibc') { 134 $s = @iconv('UTF-8', 'WINDOWS-1250//TRANSLIT', $s); // intentionally @ 135 $s = strtr($s, "\xa5\xa3\xbc\x8c\xa7\x8a\xaa\x8d\x8f\x8e\xaf\xb9\xb3\xbe\x9c\x9a\xba\x9d\x9f\x9e\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2"gtest_test_utils.py https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk | Python | 305 lines
55 56IS_WINDOWS = os.name == 'nt' 57IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0] 89 prefix = '--' + flag + '=' 90 if argv[i].startswith(prefix): 91 _flag_map[flag] = argv[i][len(prefix):] 157 executable_name)) 158 if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'): 159 path += '.exe' 179 if os.name == 'nt': 180 # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns 181 # the argument to exit() directly. 218 # since it is available and behaves consistently on all platforms, 219 # including Windows. But it is only available starting in python 2.4. 220 # In earlier python versions, we revert to the popen2 module, which isDeviceResolutionEmulator.html https://gitlab.com/crsr/openui5 | HTML | 379 lines
47 { // our Nokia Lumia 800, as delivered 48 name : "Nokia Lumia 800 (Windows Phone 7.5)", 49 "long" : 800, 50 "short" : 480, 51 ua : "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 800)" 52 }, 81 var trimmedUrl = jQuery.trim(url); 82 return !jQuery.sap.startsWith(trimmedUrl, "http:") && !jQuery.sap.startsWith(trimmedUrl, "https:") 83 && !jQuery.sap.startsWith(trimmedUrl, "javascript:") && !jQuery.sap.startsWith(trimmedUrl, "/"); 165 // URL of a page is given 166 if (jQuery.sap.startsWith(urlParts[1], "url=")) { 167 var rawUrl = urlParts[1].substr(4);UnknownSubtitle55.cs https://gitlab.com/minaz922/subtitleedit | C# | 162 lines
53 54 System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox(); 55 rtBox.Text = sb.ToString(); 71 string rtf = sb.ToString().Trim(); 72 if (!rtf.StartsWith("{\\rtf")) 73 return; 74 75 var rtBox = new System.Windows.Forms.RichTextBox(); 76 tryclang-include-fixer.py https://gitlab.com/Alioth-Project/clang-r445002 | Python | 219 lines
88def execute(command, text): 89 # Avoid flashing a cmd prompt on Windows. 90 startupinfo = None 90 startupinfo = None 91 if sys.platform.startswith('win32'): 92 startupinfo = subprocess.STARTUPINFO()HuPuWebView.java https://gitlab.com/gzsll/TLint | Java | 323 lines
84 settings.setAllowFileAccess(true); 85 settings.setSupportMultipleWindows(false); 86 settings.setJavaScriptCanOpenWindowsAutomatically(true); 129 String scheme = uri.getScheme(); 130 if (url.startsWith("hupu") || url.startsWith("kanqiu")) { 131 if (scheme != null) {Common.cs https://bitbucket.org/hphuong/eventbrite-win8.git | C# | 282 lines
12#if !WINRT_NOT_PRESENT 13using Windows.Data.Xml.Dom; 14#endif 162 bool goodPrefix = this.StrictValidation || value == null; 163 goodPrefix = goodPrefix || value.StartsWith("http://", StringComparison.OrdinalIgnoreCase); 164 goodPrefix = goodPrefix || value.StartsWith("https://", StringComparison.OrdinalIgnoreCase); 164 goodPrefix = goodPrefix || value.StartsWith("https://", StringComparison.OrdinalIgnoreCase); 165 goodPrefix = goodPrefix || value.StartsWith("ms-appx:///", StringComparison.OrdinalIgnoreCase); 166 goodPrefix = goodPrefix || value.StartsWith("ms-appdata:///local/", StringComparison.OrdinalIgnoreCase);frmInstallData.cs https://gitlab.com/GRIN-Global/GRIN-Global-server | C# | 212 lines
7using System.Text; 8using System.Windows.Forms; 9using System.Diagnostics; 97 var output = Utility.Run((updaterPath + @"\GrinGlobal.Updater.exe").Replace(@"\\", @"\"), args, false, true); 98 if (!output.StartsWith("FILES:")) { 99 // failureAkPluginActivator.cs https://gitlab.com/NunezG/villeEmergente | C# | 386 lines
100 pluginImporter.SetPlatformData (BuildTarget.StandaloneOSXUniversal, "CPU", "None"); 101 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows, "CPU", "None"); 102 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows64, "CPU", "None"); 110 pluginImporter.SetPlatformData (BuildTarget.StandaloneOSXUniversal, "CPU", "None"); 111 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows, "CPU", "None"); 112 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows64, "CPU", "None"); 121 pluginImporter.SetPlatformData (BuildTarget.StandaloneOSXUniversal, "CPU", "AnyCPU"); 122 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows, "CPU", "None"); 123 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows64, "CPU", "None"); 124 return; 125 case BuildTarget.StandaloneWindows: 126 pluginImporter.SetPlatformData (BuildTarget.StandaloneLinux, "CPU", "None"); 131 pluginImporter.SetPlatformData (BuildTarget.StandaloneOSXUniversal, "CPU", "None"); 132 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows, "CPU", "AnyCPU"); 133 pluginImporter.SetPlatformData (BuildTarget.StandaloneWindows64, "CPU", "None");path.cc https://gitlab.com/jslee1/omaha | C++ | 475 lines
161 // For example: regsvr32 /u /s "c:\program files\google\googletoolbar3.dll" 162 if (String_StartsWith(str, kRegSvr32Cmd1, true) || 163 String_StartsWith(str, kRegSvr32Cmd2, true)) { 168 // Handle the string starting with "rundll32" 169 // For example: "rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132 C:\WINDOWS\INF\PCHealth.inf" // NOLINT 170 if (String_StartsWith(str, kRunDll32Cmd1, true) || 170 if (String_StartsWith(str, kRunDll32Cmd1, true) || 171 String_StartsWith(str, kRunDll32Cmd2, true)) { 172 int idx_space = str.Find(_T(' ')); 186 // For example: MsiExec.exe /I{25A13826-8E4A-4FBF-AD2B-776447FE9646} 187 if (String_StartsWith(str, kMsiExecCmd1, true) || 188 String_StartsWith(str, kMsiExecCmd2, true)) { 195 for (int i = 0; i < str.GetLength(); ++i) { 196 if (String_StartsWith(str.GetString() + i, kDotExe, true)) { 197 file->SetString(str, i + dot_exe_length);TestLocalDirAllocator.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 211 lines
53 final static private boolean isWindows = 54 System.getProperty("os.name").startsWith("Windows"); 55 final static int SMALL_FILE_SIZE = 100; 74 assertTrue("Checking for " + BUFFER_DIR[i] + " in " + result + " - FAILED!", 75 result.getPath().startsWith(new File(BUFFER_DIR[i], FILENAME).getPath())); 76 } 94 public void test0() throws Exception { 95 if (isWindows) return; 96 try { 112 public void test1() throws Exception { 113 if (isWindows) return; 114 try { 128 public void test2() throws Exception { 129 if (isWindows) return; 130 try {ioutils.cpp https://gitlab.com/f3822/qtbase | C++ | 339 lines
35#ifdef Q_OS_WIN 36# include <qt_windows.h> 37#else 104#ifdef QMAKE_BUILTIN_PRFS 105 if (path.startsWith(QLatin1String(":/"))) 106 return false; 121#else 122 if (path.startsWith(QLatin1Char('/'))) 123 return false; 240# if defined(Q_OS_WIN) 241static QString windowsErrorCode() 242{ 282 if (rHand == INVALID_HANDLE_VALUE) { 283 *errorString = fL1S("Cannot open reference file %1: %2").arg(referenceFileName, windowsErrorCode()); 284 return false;misc.py https://gitlab.com/phyks/weboob | Python | 185 lines
72 for attribute_name in dir(obj): 73 if attribute_name.startswith('_'): 74 continue 101 except UnicodeError: 102 return unicode(text, 'windows-1252', 'replace') 103 110 # ASCII or ANSII is most likely a user mistake 111 if not encoding or encoding.lower() == 'ascii' or encoding.lower().startswith('ansi'): 112 encoding = 'UTF-8' 169 If the environment variable is not provided, the PATH will be searched 170 both without and with a ".exe" suffix for Windows compatibility. 171TestUtils.java https://gitlab.com/OpenSourceMirror/sourcenav | Java | 227 lines
106 for(int i = 0; i < remainingfiles.length; i++) { 107 if(remainingfiles[i].startsWith("log") || remainingfiles[i].endsWith("db2") || 108 remainingfiles[i].endsWith("log") || remainingfiles[i].startsWith("__db")) { 165 String OSStr = java.lang.System.getProperty("os.name"); 166 if((OSStr.toLowerCase()).indexOf("windows") != -1) 167 {DefaultSettingsBuilder.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 272 lines
102 103 // for the special case of a drive-relative Windows path, make sure it's absolute to save plugins from trouble 104 String localRepository = userSettings.getLocalRepository(); 107 File file = new File( localRepository ); 108 if ( !file.isAbsolute() && file.getPath().startsWith( File.separator ) ) 109 {test_scandir.py https://gitlab.com/Smileyt/KomodoEdit | Python | 279 lines
34 except NotImplementedError: 35 # Windows versions before Vista don't support symbolic links 36 symlinks_supported = False 205 self.assertTrue(isinstance(path, bytes)) 206 entries = [e for e in self.scandir_func(path) if e.name.startswith(b'unicod')] 207 self.assertEqual(len(entries), 1) 212 213 # b'unicod?.txt' on Windows, b'unicod\xc6\x8f.txt' (UTF-8) or similar on POSIX 214 entry_name = u'unicod\u018f.txt'.encode(sys.getfilesystemencoding(), 'replace') 223 self.assertTrue(isinstance(path, str)) 224 entries = [e for e in self.scandir_func(path) if e.name.startswith('unicod')] 225 self.assertEqual(len(entries), 1)ProgramTest.cpp https://gitlab.com/storedmirrors/minix | C++ | 323 lines
28#elif defined(LLVM_ON_WIN32) 29#include <windows.h> 30void sleep_for(unsigned int seconds) { 63#else 64 // environ seems to work for Windows and most other Unices. 65 char **envp = environ; 81 std::string MyExe; 82 if (!StringRef(MyAbsExe).startswith("\\\\?\\")) 83 MyExe.append("\\\\?\\"); 297 path::append(file_pathname, "international-file.txt"); 298 // Only on Windows we should encode in UTF16. For other systems, use UTF8 299 ASSERT_NO_ERROR(sys::writeFileWithEncoding(file_pathname.c_str(), utf8_text,PortletUrlHelper.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 298 lines
134 url.setPortletMode(getPortletMode(request, portletMode)); 135 url.setWindowState(getWindowState(request, windowState)); 136 } catch (Exception e) { 249 * @param portletReq The RenderRequest. 250 * @param windowState The WindowState as a String. 251 * @return The WindowState that mathces the <tt>windowState</tt> String, or if 251 * @return The WindowState that mathces the <tt>windowState</tt> String, or if 252 * the String is blank, the current WindowState. 253 */ 253 */ 254 private static WindowState getWindowState(RenderRequest portletReq, 255 String windowState) { 255 String windowState) { 256 WindowState state = portletReq.getWindowState(); 257 if (StringUtils.isNotEmpty(windowState)) {MarkupExpressionParser.cs https://github.com/andreiagaita/moon.git | C# | 457 lines
31using System.Text; 32using System.Windows; 33using System.Windows.Data; 34using System.Collections.Generic; 35using System.Windows.Markup; 36 145 { 146 if (expression.StartsWith ("{}")) 147 return expression.Substring (2); 309 310 if (remaining.StartsWith ("{")) { 311 value = ParseExpression (ref remaining);install.ps1 https://gitlab.com/vectorci/aws-sdk-net | Powershell | 179 lines
51 $lastCommand = $lastCommand.Trim().ToLower() 52 if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("awssdk")) 53 { 97 98 $installMatch = $lines | ? { $_.StartsWith("------- installing...awssdk") } | select -first 1 99 110 { 111 $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") 112 116 117 if ($selection.Text.StartsWith("Installing 'awssdk")) 118 {ProgramTest.java https://gitlab.com/shadyysf/anotherTest | Java | 352 lines
49 "username=Personal Access Token\n"; 50 if (!output.startsWith(expected)) 51 { 134 { 135 Assert.assertEquals(1, Program.checkOsRequirements("Windows", "1.1.1").size()); 136GetRecoverableDatabaseTests.cs https://gitlab.com/jslee1/azure-powershell | C# | 282 lines
20using Microsoft.VisualStudio.TestTools.UnitTesting; 21using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; 22using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; 22using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; 23using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; 24using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; 24using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; 25using Microsoft.WindowsAzure.Commands.Utilities.Common; 26using Microsoft.WindowsAzure.Management.Sql.Models; 26using Microsoft.WindowsAzure.Management.Sql.Models; 27using Microsoft.WindowsAzure.Commands.Common; 28 28 29namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet 30{qprocess_wince.cpp https://gitlab.com/x33n/phantomjs | C++ | 342 lines
43#include "qprocess_p.h" 44#include "qwindowspipewriter_p.h" 45 74 QString programName = program; 75 if (!programName.startsWith(QLatin1Char('\"')) && !programName.endsWith(QLatin1Char('\"')) && programName.contains(QLatin1Char(' '))) 76 programName = QLatin1Char('\"') + programName + QLatin1Char('\"'); 209 if (pid) { 210 EnumWindows(qt_terminateApp, (LPARAM)pid->dwProcessId); 211 PostThreadMessage(pid->dwThreadId, WM_CLOSE, 0, 0);machine_deal.cc https://gitlab.com/0072016/Facebook-SDK- | C++ | 301 lines
8 9#include <windows.h> 10#include <stddef.h> 105 106 if (!base::StartsWith(response_line, response_key, 107 base::CompareCase::SENSITIVE))wget.py https://gitlab.com/eientei95/crunchy-xml-decoder | Python | 399 lines
62 # several filename params is illegal, but just in case 63 fnames = [x for x in cdtype[1:] if x.strip().startswith('filename=')] 64 if len(fnames) > 1: 77 name, ext = filename.rsplit('.', 1) 78 names = [x for x in os.listdir(dirname) if x.startswith(name)] 79 names = [x.rsplit('.', 1)[0] for x in names] 82 suffixes = [x[2:-1] for x in suffixes 83 if x.startswith(' (') and x.endswith(')')] 84 indexes = [int(x) for x in suffixes 95 """Return width of available window area. Autodetection works for 96 Windows and POSIX platforms. Returns 80 for others 97 128 ("srWindow", SMALL_RECT), 129 ("dwMaximumWindowSize", DWORD)] 130JSR168ContainerProxyImpl.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 362 lines
181 182 public Collection getSupportedWindowStates() { 183 return service_.getSupportedWindowStates(); 202 String key = (String) iterator.next(); 203 if (key.startsWith(PortletContainerConstants.EXCEPTION)) { 204 log.error("Error body : " + propertiesMap.get(key)); 290 j = 0; 291 String[] windowStatesInArray = new String[windowStates.size()]; 292 for (Iterator iterator = windowStates.iterator(); iterator.hasNext(); j++) { 292 for (Iterator iterator = windowStates.iterator(); iterator.hasNext(); j++) { 293 WindowState wS = (WindowState) iterator.next(); 294 windowStatesInArray[j] = WSRPConstants.WSRP_PREFIX + wS.toString(); 295 } 296 mT.setWindowStates(windowStatesInArray); 297 mT.setLocales(locales);saveload.py https://gitlab.com/Skibbe/comet | Python | 325 lines
70 PATH = pathf.readline() 71 while PATH.lstrip().startswith('#'): 72 PATH = pathf.readline() 95 if not PATH.exists(): 96 # windows root not detected corretly 97 # there is a special case that can be intercepted 98 import platform 99 if platform.system() == 'Windows': 100 if PATH.drive == '': 144 from comet.pyhed import log 145 if '.' in savename and filename is False and not savename.startswith('.'): 146 filename = Truebuild_projects.py https://gitlab.com/jonnialva90/iridium-browser | Python | 357 lines
87 88 # On Windows add a prebuilt make 89 if getos.GetPlatform() == 'win': 159 160 if branch.startswith('examples') and not landing_page: 161 landing_page = LandingPage() 169 170 if branch.startswith('examples'): 171 landing_page.AddDesc(desc) 194 if getos.GetPlatform() == 'win': 195 # We need to modify the environment to build host on Windows. 196 make = os.path.join(make_dir, 'make.bat')pluralsight.py https://gitlab.com/angelbirth/youtube-dl | Python | 346 lines
36 _TESTS = [{ 37 'url': 'http://www.pluralsight.com/training/player?author=mike-mckeown&name=hosting-sql-server-windows-azure-iaas-m7-mgmt&mode=live&clip=3&course=hosting-sql-server-windows-azure-iaas', 38 'md5': '4d458cf5cf4c593788672419a8dd4cf8', 39 'info_dict': { 40 'id': 'hosting-sql-server-windows-azure-iaas-m7-mgmt-04', 41 'ext': 'mp4', 76 77 if not post_url.startswith('http'): 78 post_url = compat_urlparse.urljoin(self._LOGIN_URL, post_url) 298 # https://offers.pluralsight.com/technet?loc=zTS3z&prod=zOTprodz&tech=zOttechz&prog=zOTprogz&type=zSOz&media=zOTmediaz&country=zUSz 299 'url': 'http://www.pluralsight.com/courses/hosting-sql-server-windows-azure-iaas', 300 'info_dict': { 300 'info_dict': { 301 'id': 'hosting-sql-server-windows-azure-iaas', 302 'title': 'Hosting SQL Server in Microsoft Azure IaaS Fundamentals',MPlayer.cs https://gitlab.com/minaz922/subtitleedit | C# | 390 lines
9 private Process _mplayer; 10 private System.Windows.Forms.Timer timer; 11 private TimeSpan _lengthInSeconds; 129 130 public override void Initialize(System.Windows.Forms.Control ownerControl, string videoFileName, EventHandler onVideoLoaded, EventHandler onVideoEnded) 131 { 156 { 157 System.Windows.Forms.MessageBox.Show("Unable to start MPlayer - make sure MPlayer is installed!"); 158 throw; 175 // start timer to collect variable properties 176 timer = new System.Windows.Forms.Timer(); 177 timer.Interval = 1000; 222 223 if (e.Data.StartsWith("Playing ")) 224 {which.py https://gitlab.com/wkyu/gdev | Python | 250 lines
16 * does not search ``PATH`` for files that have a path specified in their name already 17 * uses ``PATHEXT`` on Windows, providing a default value for different Windows versions 18 34 If the ``PATHEXT`` variable is not set, then the default *pathext* value is hardcoded 35 for different Windows versions, to match the actual search performed on command execution. 36 On Windows <= 4.x, ie. NT and older, it defaults to '.COM;.EXE;.BAT;.CMD'. 57 58_windows = sys.platform.startswith('win') 59 96 or to os.defpath if the PATH variable is not set. 97 On Windows, a current directory is searched before directories in the PATH variable, 98 but not before directories in an explicitly passed path string or iterable. 100 The pathext is used to match files with any of the extensions appended to file. 101 On Windows, it defaults to the ``PATHEXT`` environment variable. 102 If the PATHEXT variable is not set, then the default pathext value is hardcodedFrmGhabzRpt.cs https://gitlab.com/mohamed.ahmadian89/best_me | C# | 406 lines
6using System.Text; 7using System.Windows.Forms; 8using DevComponents.DotNetBar; 9using System.Data.SqlClient; 10using CrystalDecisions.Windows.Forms; 11 151 { 152 if (Gcode.StartsWith("1")) 153 return "ab";symlink.py https://gitlab.com/dglmoore/betse | Python | 307 lines
8 9## Microsoft Windows 10 10 11Microsoft Windows does _not_ comply with POSIX standards and hence does _not_ 12generally support symbolic links. 13 14While post-Vista versions of Microsoft Windows _do_ purport to support symbolic 15links, the Windows version of the (Ana|Mini)conda Python distribution does _not_ 16appear to (at least, not reliably). Since this renders symbolic links useless 17for standard Windows use, this module assumes Windows to _never_ support 18symbolic links regardless of version. 19 20Under Microsoft Windows, this module "fakes" symbolic link-based installation by 21artifically prepending the Python-specific `sys.path` list of search dirnamesBuildTargetParser.java https://gitlab.com/smartether/buck | Java | 169 lines
80 if (buildTargetName.contains(BUILD_RULE_PREFIX) && 81 !buildTargetName.startsWith(BUILD_RULE_PREFIX)) { 82 int slashIndex = buildTargetName.indexOf(BUILD_RULE_PREFIX); 107 Preconditions.checkNotNull(baseName); 108 // On Windows, baseName may contain backslashes, which are not permitted by BuildTarget. 109 baseName = baseName.replace("\\", "/"); 135 } 136 if (!baseName.startsWith(BUILD_RULE_PREFIX)) { 137 throw new BuildTargetParseException( 143 String baseNamePath = baseName.substring(BUILD_RULE_PREFIX.length()); 144 if (baseNamePath.startsWith("/")) { 145 throw new BuildTargetParseException(sw.js https://gitlab.com/ratpoopmachine/3kh0-github-io | JavaScript | 399 lines
104 const cacheBaseName = GetCacheBaseName(); 105 return cacheNames.filter(n => n.startsWith(cacheBaseName)); 106}; 116 117// Automatically deduce the main page URL (e.g. index.html or main.aspx) from the available browser windows. 118// This prevents having to hard-code an index page in the file list, implicitly caching it like AppCache did. 129 let url = c.url; 130 if (url.startsWith(self.registration.scope)) 131 url = url.substring(self.registration.scope.length); 136 // e.g. https://example.com/?foo=bar needs to cache as /?foo=bar, not just ?foo=bar. 137 if (url.startsWith("?")) 138 url = "/" + url;update_password.jsp git://github.com/liferay/liferay-portal.git | JavaServer Pages | 200 lines
27 28if (referer.startsWith(themeDisplay.getPathMain() + "/portal/update_password") && Validator.isNotNull(ticketKey)) { 29 referer = themeDisplay.getPathMain(); 57 portletURL.setParameter("mvcRenderCommandName", "/login/forgot_password"); 58 portletURL.setWindowState(WindowState.MAXIMIZED); 59 %>SystemIDResolver.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 302 lines
85 { 86 if (absolutePath.startsWith(File.separator)) 87 urlString = "file://" + absolutePath; 126 //"fix" for Bugzilla Bug 22777 127 if(isWindowsAbsolutePath(systemId)){ 128 return false; 164 /** 165 * Return true if the local path is a Windows absolute path. 166 * 167 * @param systemId The path string 168 * @return true if the path is a Windows absolute path 169 */ 236 { 237 if (str.startsWith("///") || !str.startsWith("//")) 238 {ScalaTool.scala https://gitlab.com/mdimjasevic/scala-2.10-debian-package-take-2 | Scala | 276 lines
40 def isPermissible(value: String): Boolean = 41 (value == "") || values.exists(_.startsWith(value)) 42 } 45 object Platforms extends PermissibleValue { 46 val values = List("unix", "windows") 47 } 49 /** The path to the exec script file. `".bat"` will be appended for the 50 * Windows BAT file, if generated. */ 51 private var file: Option[File] = None 55 56 /** Supported platforms for the script. Either `"unix"` or `"windows"`. 57 * Defaults to both. */ 57 * Defaults to both. */ 58 private var platforms: List[String] = List("unix", "windows") 59appdirs.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 346 lines
34 "appname" is the name of application. 35 "appauthor" (only required and used on Windows) is the name of the 36 appauthor or distributing body for this application. Typically 41 would typically be "<major>.<minor>". 42 "roaming" (boolean, default False) can be set True to use the Windows 43 roaming appdata directory. That means that for users on a Windows 62 """ 63 if sys.platform.startswith("win"): 64 if appauthor is None: 64 if appauthor is None: 65 raise AppDirsError("must specify 'appauthor' on Windows") 66 const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA" 84 "appname" is the name of application. 85 "appauthor" (only required and used on Windows) is the name of the 86 appauthor or distributing body for this application. Typicallyguiutil.cpp https://gitlab.com/AirTank/primecoin | C++ | 461 lines
92 bool fShouldReturnFalse = false; 93 if (i->first.startsWith("req-")) 94 { 131 // which will lower-case it (and thus invalidate the address). 132 if(uri.startsWith("primecoin://")) 133 { 164 QApplication::clipboard()->setText(selection.at(0).data(role).toString(), QClipboard::Clipboard); 165 // Copy first item (global mouse selection for e.g. X11 - NOP on Windows) 166 QApplication::clipboard()->setText(selection.at(0).data(role).toString(), QClipboard::Selection); 264 QString tooltip = widget->toolTip(); 265 if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip)) 266 { 452#if defined(WIN32) 453 // On Windows, show a message box, as there is no stderr/stdout in windowed applications 454 exec();ipm.py https://github.com/leaflabs/projects.git | Python | 430 lines
69NEED_PYSERIAL = "Install the pySerial module from http://pyserial.sourceforge.net/" 70if not sys.platform.lower().startswith("win"): 71 PMVM_EXE = "../platform/desktop/main.out" 72else: 73 PMVM_EXE = "../platform/windows/Debug/pymite.exe" 74IPM_PROMPT = "ipm> " 89 90if sys.platform.lower().startswith("win"): 91 EOF_KEY = 'Z' 266 # Print any other syntax error 267 if not se.msg.startswith("unexpected EOF while parsing"): 268 self.stdout.write("%s:%s\n" % (se.__class__.__name__, se))itkBase.py https://github.com/luisibanez/ITK.git | Python | 238 lines
48 for k, v in this_module.__dict__.items(): 49 if not (k.startswith('_') or k == 'swig'): namespace[k] = v 50 return 73 try: 74 # for a windows tree 75 execfile(os.path.join(path, '..', 'Configuration', name + 'Config.py'), data) 118 for k, v in module.__dict__.items(): 119 if not k.startswith('__'): setattr(this_module.swig, k, v) 120 if namespace is not None and not k.startswith('__'): setattr(swig, k, v) 175 176 if sys.platform.startswith('darwin'): 177 dlopenflags = darwin_dlopenflags 177 dlopenflags = darwin_dlopenflags 178 elif sys.platform.startswith('win'): 179 dlopenflags = NoneSingleInstanceManager.java https://github.com/carrot-garden/carrot-jnlper.git | Java | 189 lines
60 // running 61 if (fList[i].startsWith( 62 SingleInstanceImpl.getSingleInstanceFilePrefix(idString + 178 } catch (java.net.SocketException se) { 179 // for windows 180 // no server is running - continue launchNicoLiveSource.vb https://misao.svn.codeplex.com/svn | Visual Basic | 221 lines
7Imports System.Text.RegularExpressions 8Imports System.Windows.Media 9Imports Pronama.NicoVideo.LiveStreaming 56 57 Public Sub ShowDialog(ByVal owner As System.Windows.Window) Implements IAddIn.ShowDialog 58 78 79 If Id.StartsWith("lv") Then 80 Return Id 142 143 If comment.Text.StartsWith("/") Then 144 If comment.Source = ChatSource.Broadcaster OrElse 179 180 m.ForegroundColor = System.Windows.Media.Colors.White 181 For i = 0 To colorCommands.Count - 1BaseControlProvider.cs https://SolutionFramework.svn.codeplex.com/svn | C# | 225 lines
8using System.Drawing; 9using System.Windows.Forms; 10using UIDesigner.FieldHandlers.Bases; 82 83 if (objBase.Name.StartsWith(strPrefix)) 84 {hostsovdub.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 323 lines
62 mainUrl = self.MAIN_URL 63 if 0 < len(url) and not url.startswith('http'): 64 if url.startswith('/'): 66 url = mainUrl + url 67 if not mainUrl.startswith('https://'): 68 url = url.replace('https://', 'http://') 72 sts, data = self.cm.getPage(url, params, post_data) 73 if sts: data = data.decode('windows-1251').encode('utf-8') 74 return sts, data 160 url = url.replace('amp;', '') 161 if url.startswith('http'): 162 params = dict(cItem)index.js https://gitlab.com/ananthurv/atom | JavaScript | 186 lines
18 19 // Normalize to make sure drive letter case is consistent on Windows 20 process.resourcesPath = path.normalize(process.resourcesPath) 25 26 var devMode = loadSettings.devMode || !loadSettings.resourcePath.startsWith(process.resourcesPath + path.sep) 27