Camel case is a language-independent naming convention in which an identifier name will start with a lowercase letter and each additional word within the name will start uppercase, such as customerName, printInvoice, etc.
Questions tagged [camelcasing]
403 questions
1
vote
1 answer
Angular - How to deal with Backend to Frontend naming convention?
I am using Angular as front end and Postgresql as database.
The interface below are names of columns in database which are being consumed by service
export interface AmazonDataLog {
customer_id: number;
first_target: string;
…

Tejas Mehta
- 281
- 1
- 4
- 17
1
vote
1 answer
If I am using camel case for my code, should I use camel case for my db variables?
I am following Airbnb's style guide for my eslint, which throws an error when I try to create database fields with snake case names. I was told that snake case is the standard for database naming convention. Should I disable eslint on all database…

Samson
- 1,336
- 2
- 13
- 28
1
vote
1 answer
How to specify the key format (i.e. camelcase) for an ActiveModel::Serializer :has_many association as a one-off option (not global config)?
I have a serializer like this:
class FooSerializer < ActiveModel::Serializer
attributes :id, :name
has_many :foo_bars, serializer: BarSerializer
end
class BarSerializer < ActiveModel::Serializer
attributes :id, :acronym
end
My issue is that…

some_guy
- 49
- 8
1
vote
1 answer
Can struts2-json-plugin accept upper camel case parameters?
I'm using struts2(struts2-json-plugin) to handle Content-Type=application/json request,
everything is fine where params style is lower camel case,like {"region":"China","version":"v4"}.
But it can't work when params is upper camel case,like…

LodgeGong
- 13
- 2
1
vote
1 answer
ASP.NET Core 3.1 web API JSON response camelizes more than first character
In our web API we have legacy entities that have abbreviated names. We are also using code generation via T4 templates, where we like to keep things simple and predictable:
Template creates C# classes and capitalize the first character of the…

JeroenW
- 753
- 6
- 16
1
vote
1 answer
How to force Rails ActiveRecord to use CamelCase in queries, instead of snake_case
I am trying to create a rails app that will connect to a production SQLServer that is used by 3rd party software, so migrating the database is not an option.
I am able to connect to the SQL server without any issues (I used this guide for connecting…

User9123
- 55
- 7
1
vote
1 answer
CamelCase for internal capital word
Sorry this might be a very meta question,
What should I name a variable with internal capitalized word? for example, get FX rate,
getFXrate?
getFxRate?
getFXRate?
Or is there some material I can read upon?
Best Regards

Yang
- 152
- 1
- 9
1
vote
1 answer
Codeigniter 4 - Naming Convention & Style Guide
I have found contradictory rules about Codeigniter 4 naming conventions & style guide. For example following are two guides about class names:
Controller class names MUST start with an uppercase letter and ONLY the first character can be…

Crunch
- 57
- 12
1
vote
2 answers
PHP - preg_replace_callback for camelCasing
I have the following content
"aa_bb" : "foo"
"pp_Qq" : "bar"
"Xx_yY_zz" : "foobar"
And I want to convert the content on the left side to camelCase
"aaBb" : "foo"
"ppQq" : "bar"
"xxYyZz" : "foobar"
And the code:
// selects the left part
$newString…
user4447799
1
vote
1 answer
How to check for camelCase in javascript
I need to add custom validation for a Name field. The name however needs to be camelCase. I need to add a check to see if its camelCase else throw an appropriate error message. I am not sure how to check for camelCase.
Any help will be much…

Sidd
- 84
- 1
- 2
- 7
1
vote
2 answers
Add spaces to Camelcase with Caps in it
I have an external app passing strings in camelcase. Users are looking to report on the string and want it formatted as a sentence. The string may have words in it with all caps that I need to add spaces around.
built out a function based on this…

Eric
- 13
- 4
1
vote
0 answers
Semantically matching camelcase or underscore separated words
I need to merge two ontologies together to a single file based on semantic similarity of concepts. For doing this, I use nlp for determining similar concepts semantically. There are cases that ontology concepts are named in camelcase or underscores…

Agent47
- 147
- 1
- 1
- 13
1
vote
2 answers
How to match camel case identifiers with a Regular Expression?
I have the need to match camel case variables. I am ignoring variables with numbers in the name.
private const String characters = @"\-:;*+=\[\{\(\/?\s^""'\<\]\}\.\)$\>";
private const String start = @"(?<=[" + characters +"])[_a-z]+";
private const…

jwize
- 4,230
- 1
- 33
- 51
1
vote
1 answer
Asp.net Core Razor Pages serialization not working with CamelCasePropertyNamesContractResolver in Startup.cs
I'm using Asp.net Core Razor Pages and I'm returning json. I need the json to be in camel casing across the board, therefore I tried to set the resolver in Startup.cs like this
services.AddMvc()
.AddJsonOptions(options => {
…

Ray
- 12,101
- 27
- 95
- 137
1
vote
3 answers
Python: convert a string from any format into CamelCase
Please explain the below Python code to me. This answer works when submitted on CodeWars and I want help understanding the ins and outs of it. What is happening at each step of this program?
from re import split
def camelize(string):
return…

Blank Reaver
- 225
- 3
- 5
- 17