case-sensitive

How do you tell Emacs to leave the case alone in a search and replace string?

倖福魔咒の 提交于 2019-11-30 18:01:38
I'm trying to perform a regex search and replace in Emacs (using M-x query-replace-regexp ), but the usually helpful smart case is getting in the way. My source is: One Two Three And I want to replace each line with something like <item name="One"/> instead. Unfortunately the capital at the start of each line is being misinterpreted, and I'm getting <Item> with an uppercase that I don't want. I can find examples about how to make the search case sensitive, and how to keep the \1 lowercase in the replacement string, but nothing about how to keep the entire replacement string case-unmodified.

How do uppercase and lowercase letters differ by only one bit?

筅森魡賤 提交于 2019-11-30 13:49:57
问题 I have found one example in Data and Communication Networking book written by Behrouza Forouzan regarding upper- and lowercase letters which differ by only one bit in the 7 bit code. For example, character A is 1000001 (0x41) and character a is 1100001 (0x61).The difference is in bit 6, which is 0 in uppercase letters and 1 in lowercase letters. If we know the code for one case, we can easily find the code for the other by adding or subtracting 32 in decimal, or we can just flip the sixth bit

have jQuery ignore case in attribute/data names?

流过昼夜 提交于 2019-11-30 13:49:40
问题 We're using HTML5's data-* attributes for some of our client side interaction set up. jQuery uses these to do its thing. The catch is that the HTML coming in may vary. Obviously this is the problem that should be fixed but I'm not always in control of the HTML being produced, unfortunately. The question: Given these two tags: <a data-sampleAttributeName="example"> <a data-sampleattributename="example"> Is there a clever way to treat them as one and the same? The best I've come up with is

How do uppercase and lowercase letters differ by only one bit?

半腔热情 提交于 2019-11-30 08:53:53
I have found one example in Data and Communication Networking book written by Behrouza Forouzan regarding upper- and lowercase letters which differ by only one bit in the 7 bit code. For example, character A is 1000001 (0x41) and character a is 1100001 (0x61).The difference is in bit 6, which is 0 in uppercase letters and 1 in lowercase letters. If we know the code for one case, we can easily find the code for the other by adding or subtracting 32 in decimal, or we can just flip the sixth bit. What does all this mean? I have found myself very confused with all these things. Could someone

have jQuery ignore case in attribute/data names?

好久不见. 提交于 2019-11-30 08:52:53
We're using HTML5's data-* attributes for some of our client side interaction set up. jQuery uses these to do its thing. The catch is that the HTML coming in may vary. Obviously this is the problem that should be fixed but I'm not always in control of the HTML being produced, unfortunately. The question: Given these two tags: <a data-sampleAttributeName="example"> <a data-sampleattributename="example"> Is there a clever way to treat them as one and the same? The best I've come up with is something like this: var theAttribute = ($myobject).data('sampleAttributeName'); if (($myobject).data(

SQL Server queries case sensitivity

ぃ、小莉子 提交于 2019-11-30 08:25:23
I have this database: abcDEF ABCdef abcdef if I write: select * from MyTbl where A='ABCdef' how to get: ABCdef and how to get: abcDEF ABCdef abcdef Thanks in advance forgot to write - sqlCE You can make your query case sensitive by making use of the COLLATE keyword. SELECT A FROM MyTbl WHERE A COLLATE Latin1_General_CS_AS = 'ABCdef' gbn If you have abcDEF, ABCdef, abcdef already in the database then it's already case sensitive or you have no constraint. You'd have to add a COLLATE on both sides to make sure it's truly case sensitive (for a non case sensitive database) which will invalidate

AngularJS Routing Case Sensitivity

空扰寡人 提交于 2019-11-30 07:57:36
问题 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

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

回眸只為那壹抹淺笑 提交于 2019-11-30 06:34:25
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 destined for a Linux server, where file paths are case sensitive. ) Update: This problem exists for _

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

人盡茶涼 提交于 2019-11-30 06:25:04
问题 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

C# Filepath Recasing

陌路散爱 提交于 2019-11-30 04:44:28
I'm trying to write a static member function in C# or find one in the .NET Framework that will re-case a file path to what the filesystem specifies. Example: string filepath = @"C:\temp.txt"; filepath = FileUtility.RecaseFilepath(filepath); // filepath = C:\Temp.TXT // Where the real fully qualified filepath in the NTFS volume is C:\Temp.TXT I've tried the following code below and many variants of it and it still doesn't work. I know Windows is case-insensitive in general but I need to pass these file paths to ClearCase which considers file path casing since it's a Unix and Windows application