It is the development practice of writing data considered as configuration or input directly in source code.
-3
votes
2answers
139 views
PDO insert multiple rows with key and values as array
my array looks like:
Array
(
[name] => Array
(
[0] => Matrix
[1] => Ryan
)
[surname] => Array
(
[0] => Relaoded
...
1
vote
2answers
63 views
Avoiding database calls by hardcoding data into script
I've got approximately 1000 rows (4 fields) in a MySQL database. I know for a fact that the data in the database is not going to change very often (they are GPS coordinates). Is it better for me to ...
0
votes
1answer
57 views
Should I go with CMS? Website description included [closed]
Would like to discuss something with all of you. I have been learning and using PHP for 5 years now and everything I know, I have learned by myself. I mostly made websites for myself, friends and one ...
0
votes
2answers
64 views
Is there a better way to compute the top of the hour code for repeat interval notification? [closed]
I have hard coded this Hour to help me fire the local notification at the top of each hour, but something is wrong. Though, I dunno if it's the way I'm testing it, my Xcode behaviour, or the code ...
-1
votes
1answer
51 views
How can I hardcode input with the “select” system call in C?
If I understand this system call "select" correctly,
18
votes
5answers
772 views
hardcode string vs @string in Java code - Android
I'm just wondering what the benefits/overheads are for using @string rather than hard coding strings within the actual Java code... For Example:
// To get the string resource:
...
0
votes
2answers
107 views
How to hardcode the settings
How can I hardcode the settings of the initiator and the acceptor, so that I don't need an external settings file?
This is what I've tried so far:
FIX::SessionSettings serverSettings;
...
3
votes
1answer
905 views
Why is libtool is throwing “unsupported hardcode properties” errors and what do they mean?
I am cross-compiling gettext-0.18.2 for Windows but running into some problems. During the linking stages of one of the shared libraries, libtool gives me the following error message:
/bin/bash ...
0
votes
1answer
87 views
Wordpress po/mo classes
I am trying to make a simple system with plugin and themes support, but I need translation for them. The file path of languages with /en/LC_MESSAGES is too big and I want simple and it should be put ...
0
votes
1answer
211 views
Hard Coding a button to an IBAction in xcode
when I google the title of my question I get another stackoverflow question that was answered that has been really helpful and explains most of what I need to do with hard coding a button. The problem ...
1
vote
0answers
99 views
Android - More elegant way of declaring customs components in XML files
Currently I have a class called CustomizedGallery that extends the default Gallery. I include it in my XML layout files like this:
<RelativeLayout
...
-1
votes
1answer
95 views
3D: What to hardcode and what not [closed]
I just wonder what do I hardcode in my game? E.g do I have an external file for every Enemy properties so on or do I make a class?
So what info/stuff should I code and what should I have as a .file?
...
1
vote
2answers
304 views
How to not hardcode my password (Android)?
in my App i send bugreports via email. I heard that the to hardcode my password here is not secure so how do i protect it?
Is it enough to write into my /res/values and then read it from there?
The ...
0
votes
0answers
86 views
django “smart” enums?
Here is the thing. I have a project class - project information type of thing - who's owning it, its state, progress and all that. I want the project to have progress indicators (progress indicator ...
0
votes
2answers
321 views
UIView code vs interface builder
I have defined a UIView in the header file named rectangle0
I got a question in regards to IB vs coding a view. Please see the following code example:
rectangle0.frame = CGRectMake(0.0, 70.0, 320.0, ...
0
votes
1answer
489 views
struts2: avoiding hardcode in struts tags, jsp
When using struts2 I can access my session attributes inside struts2 tags using OGNL expression like this:
#session['object_key']
The problem is that I use this expression on different pages, every ...
2
votes
9answers
2k views
Java array declaration without hard coding the size
How can I initialize an array of objects of a class in another class without hardcoding its size?
2
votes
4answers
222 views
Is It Okay to Hard-Code Credentials?
I'm working on a small web project with a friend. It involves a lot of MySQL queries, so I've created a ConnectToDatabase() function that connects to the server and selects our database.
It looks ...
0
votes
1answer
299 views
Symfony search form
I use symfony 1.4.12 with Zend Lucene. And I make custom search, I have field like category, country...I create module and I have MysearchSucess.php and there I write hardcode, like :
<select ...
0
votes
2answers
213 views
Inserting a Hard Coded Value Into a Table
I'm looking to understand how I can insert a hard coded value into a table during an insert of a specific pull of data. The code below should give an idea of what I am trying to do...It's basically ...
0
votes
1answer
133 views
How do I hardcode in the post date into my WordPress post?
I am in the middle of customizing my Canvas theme by WooThemes and would like to hardcode in the date into my posts so that it looks something like this:
July 7, 2011 Paragraph text goes here ...
1
vote
2answers
176 views
iOS hardcode user location
I would like to introduce a specific user location by code.
I only need to hardcode the userlocation to make an screenshot for the appStore.
Could somebody help me?
Thankyou!
0
votes
2answers
78 views
Django HardCoding Many to Many fields in a form
I am trying to hardcode the following in my view for testing purposes. How do I do this without encountering an error?
My view:
`def create(request):
form= PlayForm(request.POST or None)
if ...
2
votes
3answers
136 views
Fortran: Hardcode some code in dependency on an environment variable
Hey there,
if the env var "XYZ" is set WHILE compiling, than I want the part:
write (STDOUT,*) "Compiled with XYZ"
here one more function call bla()
to be compiled into the binary. If not, than ...
1
vote
1answer
2k views
iPhone - comparing a character returned by characterAtIndex with another hard coded one
I'd like to compare a character returned by characterAtIndex with some "hard" charaters, like @" ", or @"P". This may look stupid, but I don't find the way to do this...
1
vote
1answer
68 views
Django better way to filter dates without hard coding in the view
In a django view I am filter out the content for each year to display it in a chart via a template. Currently I am doing the calculation for each year manual, but there has to be a better way to right ...
1
vote
2answers
172 views
call printf() editing the executable
I'm trying to "crack" a console program, forcing it to display something. The problem is I can't print a newline (\r\n).
With a disassebler I found the place and edited the binary:
push 4ad0eb46 ...
3
votes
5answers
216 views
.net: Hard-coded conditions or WHAT?
hi all
I have a form (form1) which contains a simple drop down list (dropdown1) and 2 textboxes (textbox1) and (textbox2).
The senario is: user enters some code in textbox1 and then based on what he ...
0
votes
4answers
469 views
Should I hardcode values (when and where) or avoid hardcoding at all (why)
I'm wondering should I eliminate all the hardcoded values (most of them are very minor or not important) in my application and using constants instead.
Is hardcoding bad in every situations?
Thanks
0
votes
1answer
196 views
What is the best way to populate DropDownLists with many entries in ASP.NET MVC
I have a DropDownList that particpates in an Address View Model.
Is it best to store the list of 170 or so countries in a database and load them into a collection on the View Model, or is it better ...
5
votes
1answer
445 views
Constants for resource types in Android
Are there constants for the various resource types (ie: "drawable") in Android?
I want to code some conditional logic based on the return value of getResourceTypeName and I would prefer to avoid ...
1
vote
2answers
162 views
Is this hardcoding? How can I avoid it?
I'm creating a parser for a specific XML structure and I'm facing a possible hardcoding issue. Here:
private function filterDefaultParams($param){
#FIXME Hardcoding?
return ...
0
votes
3answers
52 views
should i use the web framework for implementing a bunch of external links that likely won't change?
i'm building my webapp using the wicket java web framework. there is one page that i'm building right now contains 20+ external links, a lot of them are pointing to the wikipedia pages. i'm currently ...
2
votes
7answers
1k views
JQuery - Hardcoding HTML in Javascript - Is there a better way to dynamically create dom elements?
I have a lot of messages, and raw HTML that I hard code in my javascript code, such as:
var subjectId = $(subject).attr('subjectId');
var subjectName = $(subject).attr('subjectName');
var html = ...
10
votes
6answers
4k views
Can .NET source code hard-code a debugging breakpoint?
I'm looking for a way in .NET (2.0, C# in particular) for source code to trigger a debugging break as if a breakpoint was set at that point, without having to remember to set a specific breakpoint ...
1
vote
3answers
2k views
Hard-coding HTML into VB6 code
Background: we have an application that generates reports from HTML (that may or may not have inline scripting). The HTML source is normally stored as a blob in the database.
There is now the need to ...
-1
votes
5answers
237 views
What casing is a driveletter
is it uppercased C:\ or lowercased c:\ ?
We tried to come up with a conclusion, only argument is that that MS displays uppercase (C:)
Its not what is technically correct, its a matter of arguments ...