case-sensitive

Case-inconsistency of PHP file paths on Mac / MAMP?

泪湿孤枕 提交于 2019-11-29 05:31:42
问题 I'm developing a PHP program on MAMP, and just realized the following screwy behavior: echo "<br/>PATH = ".dirname(__FILE__); include 'include.php'; include.php: <?php echo "<br/>PATH = ".dirname(__FILE__); ?> Result: PATH = /users/me/stuff/mamp_server/my_site (All lower case) PATH = /Users/me/Stuff/mamp_server/my_site (Mixed case) What is causing this inconsistent behavior, and how can I protect against it? (Note that I can't just convert everything to lowercase, because the application is

AngularJS Routing Case Sensitivity

喜夏-厌秋 提交于 2019-11-29 05:28:04
I haven't been able to find a straightforward answer to this, which leads me to believe that it's something really really simple. Either way, here I go. All of the calls in my $routeProvider work great, but are case sensitive. Here's a code sample: config(function ($routeProvider) { $routeProvider. when('/', { controller: 'TmpCtrl', templateUrl: '/app/home.html' }). when('/foo', { controller: 'TmpCtrl', templateUrl: '/app/foo.html' }). otherwise({ redirectTo: '/' }); }); What do I need to add so that '/Foo', '/fOO', '/FoO', etc, all redirect to the same path? There is an option you can pass to

.htaccess or other URL Case Sensitive

这一生的挚爱 提交于 2019-11-29 05:18:31
My server is Case Sensitive, and id like to turn it to inSensitive. Example of what I mean is lets say I upload Fruit.php Well then going to this file wont work: www.website.com/fruit.php but this one will: www.website.com/Fruit.php Is there a way so Fruit.php and fruit.php will work? also with the directories. i.e: / S cript/script.php /script/ S cript.php Case sensitivity depends on the file system, not Apache. There is a partial solution, however. mod_rewrite can coerce everything to lowercase (or uppercase) like so: RewriteMap tolowercase int:tolower RewriteRule ^(.*)$ ${tolowercase:$1}

Windows batch command to ignore case sensitivity in variables

不问归期 提交于 2019-11-29 02:47:24
I have a set of variables I allow some people I work with to edit. These are True ( T ) and False ( F ) values, but I have some people that insist on putting t and f instead of the upper case values respectively. I use the following workaround code to properly set uppercase values: IF '%dotnet35%'=='f' set dotnet35=F IF '%dotnet35%'=='t' set dotnet35=T IF '%dotnet40%'=='f' set dotnet40=F IF '%dotnet40%'=='t' set dotnet40=T IF '%regedit%'=='f' set regedit=F IF '%regedit%'=='t' set regedit=T IF '%SSL%'=='f' set SSL=F IF '%SSL%'=='t' set SSL=T This is however extremely bulky and it's not easy on

.NET HttpSessionState Case Insensitivity

霸气de小男生 提交于 2019-11-29 01:16:05
.NET's HttpSessionState using an " InProc " store seems to treat session variable key values as case insensitive. For example: session["foo"] = 1; session["Foo"] = 2; Trace.Write(session["foo"].ToString()); // => 2 This behavior appears to be undocumented, so I'm wondering if it is simply a side-effect of the underlying session store mechanism, or intentionally implemented by the class itself. Since C# treats everything else as case-sensitive, it is a bit unnerving for the session to not act the same way. What gives? Does it differ by store type? Is it there for backwards-compatibility with VB

Set two flags in Java regex.Pattern

老子叫甜甜 提交于 2019-11-29 00:37:49
问题 I need a matcher like this: Matcher kuchen = Pattern.compile("gibt es Kuchen in der K\u00FCche",Pattern.CASE_INSENSITIVE).matcher(""); and the problem is that it is not simple ASCII. I know that in this particular case I could use [\u00FC\u00DC] for the ü, but I need to be a bit more general (building the regex from other matcher groups). So according to javadocs: By default, case-insensitive matching assumes that only characters in the US-ASCII charset are being matched. Unicode-aware case

Javascript: highlight substring keeping original case but searching in case insensitive mode

不羁的心 提交于 2019-11-28 17:52:59
I'm trying to write a "suggestion search box" and I cannot find a solution that allows to highlight a substring with javascript keeping the original case. For example if I search for " ca " I search server side in a case insensitive mode and I have the following results: Calculator calendar ESCAPE I would like to view the search string in all the previous words, so the result should be: Ca lculator ca lendar ES CA PE I tried with the following code: var reg = new RegExp(querystr, 'gi'); var final_str = 'foo ' + result.replace(reg, '<b>'+querystr+'</b>'); $('#'+id).html(final_str); But

Is there any advantage of being a case-sensitive programming language? [duplicate]

若如初见. 提交于 2019-11-28 14:39:01
I personally do not like programming languages being case sensitive. (I know that the disadvantages of case sensitivity are now-a-days complemented by good IDEs) Still I would like to know whether there are any advantages for a programming language if it is case sensitive. Is there any reason why designers of many popular languages chose to make them case sensitive? EDIT: duplicate of Why are many languages case sensitive? EDIT: (I cannot believe I asked this question a few years ago) This is a preference. I prefer case sensitivity, I find it easier to read code this way. For instance, the

How do I use a variable as a regex modifier in Perl?

旧城冷巷雨未停 提交于 2019-11-28 13:31:48
I'm writing an abstraction function that will ask the user a given question and validate the answer based on a given regular expression. The question is repeated until the answer matches the validation regexp. However, I also want the client to be able to specify whether the answer must match case-sensitively or not. So something like this: sub ask { my ($prompt, $validationRe, $caseSensitive) = @_; my $modifier = ($caseSensitive) ? "" : "i"; my $ans; my $isValid; do { print $prompt; $ans = <>; chomp($ans); # What I want to do that doesn't work: # $isValid = $ans =~ /$validationRe/$modifier; #

Is it possible for lxml to work in a case-insensitive manner?

泪湿孤枕 提交于 2019-11-28 11:16:24
I'm trying to scrape META keywords and description tags from arbitrary websites. I obviusly have no control over said website, so have to take what I'm given. They have a variety of casings for the tag and attributes, which means I need to work case-insensitively. I can't believe that the lxml authors are as stubborn as to insist on full forced standards-compliance when it excludes much of the use of their library. I'd like to be able to say doc.cssselect('meta[name=description]') (or some XPath equivalent) but this will not catch <meta name="Description" Content="..."> tags due othe captial D