case-insensitive

How to perform a case-insensitive file search in Erlang/Elixir

自闭症网瘾萝莉.ら 提交于 2019-12-23 19:50:30
问题 Elixir provides Path.wildcard , which uses the Erlang :filelib.wildcard function internally. Matching is case-sensitive, for example, "a" does not match "A". (http://erlang.org/doc/man/filelib.html#wildcard-1) Please is there a case-insensitive alternative? 回答1: There's no built in option to do this, but since the wildcard syntax supports character alternations similar to regex, you can replace every letter with an alternation of its lower and upper case versions, e.g. f0o -> [fF]0[oO] , and

Case Insensitively Sort a Multidimensional PHP Array using array_multisort()

淺唱寂寞╮ 提交于 2019-12-23 16:30:14
问题 After much searching I haven't been able to find a good explanation on how to use array_multisort() to case insensitively sort a multidimensional array by one field. I find this to be a very helpful feature when dealing with information from database queries so thought I would share. 回答1: I should note this only works in php 5.4+ # Example results from database $PDOresult = array( array('name' => 'Alpha', 'price' => '10'), array('name' => 'beta', 'price' => '12'), array('name' => 'Gamma',

Case insensitive search matching with sed?

依然范特西╮ 提交于 2019-12-23 07:05:00
问题 I'm trying to use SED to extract text from two words, such as "Account" and "Recognized", and I'd like that the searching be case insensitive. So I tried to use the I parameter, but receive this error message: cat Security.txt | sed -n "/Account/,/Recognized/pI" | sed -e '1d' -e '$d' sed: -e expression #1, char 24: extra characters after command 回答1: Use: sed -n "/Account/,/Recognized/Ip" i.e. change the order to: Ip instead of pI 回答2: Avoid useless use of cat /pattern/I is how to specify

How to compare a string in Java with another string stored in hbase with case-insensitive?

空扰寡人 提交于 2019-12-23 04:26:50
问题 I am new to HBase. I want to compare a string in Java with another string stored in hbase with case-insensitive. How can i achieve this ? Thanks in advance ... 回答1: You could try RegexStringComparator like RegexStringComparator regexStringComparator = new RegexStringComparator("^[aA][bB][cC]$");//will match aBc or ABC or Abc any case in order of a followed by b followed by c. SingleColumnValueFilter filter = new SingleColumnValueFilter( cf, column, CompareOp.EQUAL, regexStringComparator );

Unexpected (case-insensitive) string sorting in Elasticsearch

若如初见. 提交于 2019-12-22 09:19:27
问题 I have a list of console platforms that I'm sorting in Elasticsearch. Here is the mapping for the "name" field: { "name": { "type": "multi_field", "fields": { "name": { "type": "string", "index": "analyzed" }, "sort_name": { "type": "string", "index": "not_analyzed" } } } } When I execute the following query { "query": { "match_all": {} }, "sort": [ { "name.sort_name": { "order": "asc" } } ], "fields": ["name"] } I get these results: { "took": 1, "timed_out": false, "_shards": { "total": 3,

Are there issues using Dim foo As Foo in VB.NET?

こ雲淡風輕ζ 提交于 2019-12-22 08:57:11
问题 In a recent VB.NET project I adopted the naming conventions I'm used to using in C#. Namely, often calling a variable the same name as the class it references, only with a different case, e.g. Foo foo = new Foo(); // C# Dim foo As New Foo() ' VB.NET I find this is often the clearest way to write code, especially for small methods. This coding style obviously works fine in C#, being case sensitive, and because of the syntax highlighting provided by Visual Studio, it is very easy to see that

How to prevent git from committing two files with names differing only in case?

◇◆丶佛笑我妖孽 提交于 2019-12-22 04:45:09
问题 We develop in a mixed environment - some people work on Macs and some work on Linux. This has proven to be a bit of a challenge at times, as those people who work on Linux are used to having their filesystems be case sensitive, so there's no issue committing (accidentally or otherwise) multiple files differing just by case. (e.g. FileName.ext versus filename.ext ) However, when the people on Macs go to check out the repository, having a case-insensitive filesystem means that the two files -

case-insensitive regular expressions

心不动则不痛 提交于 2019-12-22 04:28:15
问题 What's the best way to use regular expressions with options (flags) in Haskell I use Text.Regex.PCRE The documentation lists a few interesting options like compCaseless, compUTF8, ... But I don't know how to use them with (=~) 回答1: All the Text.Regex.* modules make heavy use of typeclasses, which are there for extensibility and "overloading"-like behavior, but make usage less obvious from just seeing types. Now, you've probably been started off from the basic =~ matcher. (=~) :: ( RegexMaker

git merge: filter files to avoid silly conflicts (like whitespace or case changes)

江枫思渺然 提交于 2019-12-21 11:03:07
问题 I'm currently inside a very complicated merge in git, and I have many conflicts. The conflict is about two Ada source files. I would like to make a merge that would ignore both whitespace changes and case changes (as the Ada language is case insensitive). Do you know if there is a way to tell git to ignore some kind of changes before a merge ? My solution is currently to run the GNAT pretty print on both branches before the merge, but if there was a common solution included in git, that would

git merge: filter files to avoid silly conflicts (like whitespace or case changes)

这一生的挚爱 提交于 2019-12-21 11:02:50
问题 I'm currently inside a very complicated merge in git, and I have many conflicts. The conflict is about two Ada source files. I would like to make a merge that would ignore both whitespace changes and case changes (as the Ada language is case insensitive). Do you know if there is a way to tell git to ignore some kind of changes before a merge ? My solution is currently to run the GNAT pretty print on both branches before the merge, but if there was a common solution included in git, that would