Questions tagged [hard-coding]
40 questions
2
votes
1 answer
I want to hardcode the value of a dummy column from my view created upon an oracle DB
I have a view which has one dummy column called action.
I have a formula {@action}
if {abc_view.name} startswith "abc" Then {abc_view.action} = "Represents action" Else {abc_view.action} = ""
and when I am calling this formula from the record filter…

samuel
- 53
- 6
1
vote
5 answers
Avoid hardcoding in switch statement
I have an object with has two properties: Text and Type.
To avoid hard-coding the Types, I put them in the database, so they can be added to in future. At the moment the types are URL, Username and ID.
However, I now want to run a Utility method to…

finoutlook
- 2,523
- 5
- 29
- 43
1
vote
0 answers
How to remove hard coding of Exe names in C++ application?
I am working on Form application using Codegear C++. All Exe names in the code are hard coded. The Exes are present in a common drive. What is the best way to remove hard coding?
Is it good to use .ini file? If yes, how to go about it? I tried using…

Dolly
- 277
- 2
- 7
- 16
1
vote
2 answers
SymmetricDS Community Edition passwords hard-coding in property files
We have setup SymmetricDS on Windows for SQL server databases and it's working fine.
But we have hard-coded the passwords in property files. My question here is, is there any way to avoid hard-coding?

sweenal
- 67
- 8
1
vote
2 answers
Is setting height and width of buttons considered hard coding?
I am trying to improve the UI of my Xylophone app. So at first, all the buttons were expanded vertically and stretched horizontally. But now I want to have different sizes of buttons and their sizes must change in a decreasing order. This is what it…

Gigili
- 600
- 1
- 7
- 19
1
vote
2 answers
Test Program for Date class
I have written a Date class, which adds/subtracts days/months/years taking into consideration leap years. I now need to write a test program with hard coded data to test my implementation. The easiest way would be to create a "reference" date and…

cee
- 11
- 1
1
vote
2 answers
Simple hard coded ListView in Android
Is it possible to do something like this in Android? (basically the equivalent of select and option in HTML):
TEST
…

b85411
- 9,420
- 15
- 65
- 119
0
votes
1 answer
How can I avoid hard coding in SQL Query
I have a query like Select '16453842' AS ACCOUNT, I want to change this Account number to a dynamic one. Can anyone tell me what are some possible ways to do it?
The scenario is like, I would also like to accommodate other values as well for the…

Sam_2207
- 2,759
- 2
- 9
- 15
0
votes
1 answer
Are path templates defined using Attribute Routing considered hard coded?
If I'm using Attribute Routing in an ASP.NET controller, are those path templates considered hard coded? For instance, if I add [HttpGet("/employee")] or [Route("/employee")], is the /employee path a hard-coded value?

Shubham Tiwari
- 959
- 1
- 11
- 32
0
votes
2 answers
how to locate a same folder on different machines on different directory?
I have two folders named Student and Faculty in the directory /home/ubuntu/Desktop/Pythontraining. I need to save totally 10 files inside Student folder and 3 files inside the Faculty folder.I need to do the same in another system where the Student…

Saravanan Selvam
- 109
- 1
- 2
- 12
0
votes
3 answers
hardcoded ID vs query
There's situation when I have table named "status", which only contains ID (PK) and name (string, unique). Also, other table has reference to this status (e.g. status_id)
let's say, there's two statuses:
1 - status1
2 - status2
Now, I'd like to…

Segfaultz
- 3
- 1
- 3
0
votes
1 answer
How to avoid hardcoding text files in java
I'm working on a project where 3 text files stored into a folder. I'm trying to avoid hardcoding the 3 paths into the source file.
That being said, I would like to run the program by typing at the prompt:java sourceCode folderName.
Please see below…

setod003
- 1
- 2
0
votes
4 answers
String Resource in laravel programming?
is there any way that instead of hard coding strings in the blade you use something like a string resource(or string table) so if you change a string every blade will be changed . For example instead of hoard coding "product" in the blade I use a…

M.Shahrokhi
- 385
- 1
- 7
- 19
0
votes
3 answers
Implementing own data types in C# without enum?
The main difference between built-in data types and user defined data types is that: built-in data types can accept literal values(values inserted into code directly,this process is also know as hard-codding).
So is it possible create custom data…

Amir
- 1
- 4
0
votes
1 answer
Create DB by taking DBName from C# application
I've a requirement to create DB by taking the DB name from the C# application. Basically, avoiding hard-coding of DBname in the sql script. ex: "create Database abc". In this "abc" must be passed as parameter.
Once i read the DBName from the…

user3744269
- 1
- 3