case-sensitive

Rails Routes - How to make them case insensitive?

安稳与你 提交于 2019-12-01 15:40:51
Routes in Ruby on Rails are case sensitive. It seems someone brought this up before, and it has been labeled will not fix. http://rails.lighthouseapp.com/projects/8994/tickets/393-routes-are-case-sensitive That strikes me as unfortunate, as I don't really see any upside on my own application for routes to be case sensitive, while on the downside it creates a potential for confusion and a general appearance of lack of polish in my opinion. What's the best way to make my routes case insensitive? I found this tip on a Google search: map.connect "web_feeds/:action", :controller => 'web_feeds',

mysql case sensitive table names in queries

我与影子孤独终老i 提交于 2019-12-01 12:23:20
I have php code where first letter of database table names is in capital letter every where but table names in database are in lowercase. What global setting should I use so that no need to change in every code file for making table names in same case as in database. jainvikram444 MySQL metadata is case sensitive by default on Linux. That is if you have a table my_table, in lower case, then select * from my_table will succeed while select * from MY_TABLE will fail with some sort of table doesn't exist message. If you want both statements to succeed, you need to put the following line lower

DBunit; confusion over case sensitivity on table/column names

雨燕双飞 提交于 2019-12-01 07:08:25
I'm getting this error when I start up my application Caused by: org.dbunit.dataset.NoSuchColumnException: CLIENT.ID - (Non-uppercase input column: ID) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive I'm not too sure why I'm getting this, since my table/column names all all referenced in upper case(even though the message insists this shouldn't be an issue) My table : mysql> describe CLIENT; +------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+----

Override case sensitive regex in Perl

那年仲夏 提交于 2019-12-01 04:43:30
Is it possible to override the case sensitivity of a previously defined regex in Perl? For instance, if I were to have the following: my $upper = qr/BLAH/x; my $lower = qr/$upper/xi; warn "blah" =~ $lower I'd like the third line to print a positive match. You can add the /i to the regexp as follows: use re qw( is_regexp regexp_pattern ); sub make_re_case_insensitive { my ($re) = @_; return "(?i:$re)" if !is_regexp($re); my ($pat, $mods) = regexp_pattern($re); if ($mods !~ /i/) { $re = eval('qr/$pat/'.$mods.'i') or die($@); } return $re; } But that won't affect qr/(?-i:BLAH)/ . This is more of

How to write Case Sensitive Query for MS Access?

余生颓废 提交于 2019-12-01 04:11:26
I want to know the Select Query for MS Access with case sensitive. I have two values for VitualMonitorName as below VCode VirtualMonitorName Row 1 (1, 'VM1'); Row 2 (2, 'Vm1'); Here both values are different. If I write "SELECT VCode FROM VirtualMaster WHERE VirtualMonitorName like '" + Vm1 + "'"; It replies VCode = 1 Only. HansUp You can use the StrComp() function with vbBinaryCompare for a case-sensitive comparison. Here is an example from the Immediate window to show how StrComp() works. See the Access help topic for more details. ? StrComp("a", "A", vbBinaryCompare) 1 ? StrComp("a", "A"

How to determine if an instance of SQL Server is case sensitive or not

倾然丶 夕夏残阳落幕 提交于 2019-12-01 03:24:58
问题 How can I find out if an instance of SQL Server 2005 allows case sensitive databases or not? By case sensitive, I mean case sensitivity of the objects in the database, i.e. the following two statements are not equivalent: SELECT * FROM TABLE SELECT * FROM table I've looked in the property pages of the server (in Management Studio) but I couldn't see it. 回答1: SELECT DATABASEPROPERTYEX('DatabaseNameHere', 'Collation') SQLCollation; Returns "SQL_Latin1_General_CP1_CI_AS", the CI is what

Git on windows: Can't switch branch after renaming a file (only changed case)

假如想象 提交于 2019-12-01 03:19:51
I'm working with git on windows, and I have a file in my repo, lets say "foo.txt". Today I wanted to rename this file to "Foo.txt" (uppercase). As suggested in this SO question , I used git mv -f foo.txt Foo.txt , which produced the desired result. I proceeded to commit the change to my repo. EDIT: I would like this to be a permanent change, and still be able to checkout commit that predate this change. However, after that I encountered an error upon trying to switch branch: # I'm on branch1 git checkout branch2 Aborting error: The following untracked working tree files would be overwritten by

what are the changes in mysql 8 result rowset case?

老子叫甜甜 提交于 2019-12-01 02:00:44
when running SELECT maxlen FROM `information_schema`.`CHARACTER_SETS`; mysql 5.7 and mysql 8 produce different results: on mysql 5.7 the results row names are lower cased, on mysql 8 the results row names are upper cased. NB : in the CHARACTER_SETS table, the comumn name is MAXLEN (upper cased). Since I can't find a resource documenting it, my question is : what are the changes in mysql 8 result rowset case ? MySQL 8.0 did change the implementation of some views in the INFORMATION_SCHEMA: https://mysqlserverteam.com/mysql-8-0-improvements-to-information_schema/ says: Now that the metadata of

JavaScript and why capital letters sometimes work and sometimes don't

淺唱寂寞╮ 提交于 2019-12-01 01:21:27
问题 In Notepad++, I was writing a JavaScript file and something didn't work: an alert had to be shown when a button was clicked, but it wasn't working. I has used the auto-complete plugin provided with Notepad++, which presented me with onClick . When I changed the capital C to a small c , it did work. So first of all, when looking at the functions in the auto-completion, I noticed a lot of functions using capitals. But when you change getElementById to getelementbyid , you also get an error, and

How can Python regex ignore case inside a part of a pattern but not the entire expression?

心不动则不痛 提交于 2019-11-30 19:59:46
Say I have a string containing foobar fooBAR FOObar FOOBAR , and I want to search all instances containing a case insensitive "foo" or "FOO" but a lowercase "bar". In this case, re.findall should return ['foobar', 'FOObar'] . The accepted answer for this question explains that it can be done in C# with (?i)foo(?-i)bar , but Python raises an invalid expression error. Does the Python regex library support such a feature? The re module doesn't support scoped flags, but there's an alternative regex implementation which does: http://pypi.python.org/pypi/regex Python does not support disabling flags