What is the naming convention in Python for variable and function names?

Coming from a C# background the naming convention for variables and method names are usually either camelCase or PascalCase: // C# example string thisIsMyVariable = "a" public void...

How to convert PascalCase to pascal_case?

If I had: $string = "PascalCase"; I need "pascal_case" Does PHP offer a function for this purpose?

Regex that matches Camel and Pascal Case

I'm about to write a parser for a language that's supposed to have strict syntactic rules about naming of types, variables and such. For example all classes must be PascalCase, and all...

Built-in function to capitalise the first letter of each word

I don't want to create a custom function for that if such function already exists in SQL Server. Input string: This is my string to convert Expected output: This Is My String To Convert

JSON Naming Convention (snake_case, camelCase or PascalCase)

Is there a standard on JSON naming?I see most examples using all lower case separated by underscore, aka snake_case, but can it be used PascalCase or camelCase as well?

What's the name for hyphen-separated case?

This is PascalCase: SomeSymbol This is camelCase: someSymbol This is snake_case: some_symbol So my questions is whether there is a widely accepted name for this: some-symbol? It's commonly used in url's.

How can I convert text to Pascal case?

I have a variable name, say "WARD_VS_VITAL_SIGNS", and I want to convert it to Pascal case format: "WardVsVitalSigns" WARD_VS_VITAL_SIGNS -> WardVsVitalSigns How can I make this conversion?

How can I return camelCase JSON serialized by JSON.NET from ASP.NET MVC controller methods?

My problem is that I wish to return camelCased (as opposed to the standard PascalCase) JSON data via ActionResults from ASP.NET MVC controller methods, serialized by JSON.NET. As an example...

Web API 2: how to return JSON with camelCased property names, on objects and their sub-objects

UPDATE Thanks for all the answers. I am on a new project and it looks like I've finally got to the bottom of this: It looks like the following code was in fact to blame: public static...

Get primary key of Eloquent model instance

I'm happy enough to work on a project with (not) very consistent column names in our MySQL database. We have camelCase, PascalCase, 'Id', ID and it's driving me nuts. I've decided to start using...

Javascript convert PascalCase to underscore_case/snake_case

How can I convert PascalCase string into underscore_case/snake_case string? I need to convert dots into underscores as well. eg. convert TypeOfData.AlphaBeta into type_of_data_alpha_beta

How do I convert PascalCase to kebab-case with C#?

How do I convert a string value in PascalCase (other name is UpperCamelCase) to kebab-case with C#? e.g. "VeryLongName" to "very-long-name"

.net core entity framework (EF Core) table naming convention

.net core entity framework (EF Core) table naming convention plural to single/simple/underscore Being a fan of single simple underscore naming convention to table names, I feel uncomfortable with...

The column name X was not found in this ResultSet - JPA

So I have this Company entity, I'm having an error every time I add a company. I'm using PostgreSQL for my database and I use double quote literals to map the columns of the table in...

What is the idiomatic naming convention for local functions in C# 7

Normal class methods, whether instance or static, have an idiomatic naming convention with regards to their casing. It's not clear that there is a convention for local functions, introduced in C#...

View Component as a Tag Helper does not get Invoked

Invoking a View Component as a Tag Helper was introduced in ASP.NET Core 1.1. (See “Invoking a view component as a Tag Helper”). But the following only returns the Test for VC part of the...

JSON serializer Not Working After Upgrade To 3.6.2

I'm using ASP.NET Boilerplate for one of my application. The application was on 3.5.0 version of Abp and the template was ASP.NET Core with MVC. I recently upgraded it to 3.6.2 the upgrade was...

EF Core - Define custom column mapping strategy for all properties

By convention, each property will be set up to map to a column with the same name as the property. If I want to change the default mapping strategy, I can do it by using either Fluent API or Data...

Adding Code Style Naming for Local Variables or Method Parameters - C# Visual Studio

I'm trying to add some Naming Rules in Visual Studio for C# language. Everything is OK. for example I can add this rule: Property -> PascalCase -> Error Which means all properties should be in...

ValueTuple naming conventions

When naming a ValueTuple element, should they be capitalized or not? (string Name, int Index) rec; or (string name, int index) rec; EDIT: It seems the convention is PascalCase See:...

How do I covert kebab-case into PascalCase?

How could I convert this to PascalCase and to camelCase? var text = "welcome-to-a-New-day"; toPascalCase(text); // "WelcomeToANewDAY" toCamelCase(text); // "WelcomeToANewDAY"

Enforce camelCase using ESLint but not PascalCase

I am setting up ESlint for my project and I have a question. I want the following to work: class MyClass { } function awesomeFunction() { } let myVariable = "a"; But not this : class myClass...

How can I deserialize an enum when the case doesn't match?

I have a JSON structure that looks like this: { "type": "suite", "event": "started", "test_count": 1 } I want to deserialize into these structs: #[derive(Debug, Deserialize)] enum ResultType { ...

Change JSON serialization from camelCase to PascalCase [Duplicate-No solution?]

I know this is duplicate of some past questions.But there were no real solution. One of the related links Another one I am working with .Net Core 3 Multipage Template. I've tried everything like...

Automatically transform URL query parameter keys to kebab-case?

ASP.NET uses PascalCase URL components by default, but I'd like to use kebab-case instead. I have seen various articles and SO answers achieve this elegantly in ASP.NET Core via...

@typescript-eslint/naming-convention: How to allow PascalCase in const that only have arrow function expression?

Sometimes in const I store some arrow functions that returns React component: export const HomeOutline = (style: ImageStyle): IconElement => ( <Icon {...style} name="home-outline"...

Are Helm variables case insensitive? (The templates seem to be.)

I am trying to debug one of my Helm charts and I noticed that the app.kubernetes.io/version label is created using the following code (in _helpers.tpl): {{- if .Chart.AppVersion...

Powershell. edit string make it camelCase and PascalCase

My goal is to know how this kind of text $var1 = "my-name-is" convert to camelCase"myNameIs". And this type $var2 = "my_Name_is" convert to PascalCase"MyNameIs" Have no idea how to do it

Why does typescript-eslint enforce camelCase for enumMember?

All enum examples in the TypeScript documentation write enum members as PascalCase, like: enum Direction { Up = 1, Down, Left, Right, } But @typescript-eslint/naming-convention enforces...

FromQuery parameters from camelCase/PascalCase to snake_case .Net Core

I have tried the solution here: https://stackoverflow.com/questions/42353847/how-to-properly-set-up-snake-case-json-for-dotnet-core-api but seems to be this is only for request/response payloads....