To define constants, what is the more common and correct way? What is the cost, in terms of compilation, linking, etc., of defining constants with #define? It is another way less expensive?
Hi all,
it may be wrong place to ask this question, but i hope u all programmer must have the interesting naming convention of variables. i have seen many places that some variable names are very good n effective like
common variable names
$link
$db
$connect
$query
$stmt
$sql
$qry
$output
$result
$list
so please suggest me some good names for variable , bcoz all time i have to write
$x, $y etc.. if i want to save something instantly on page...that are even not relevant, so please suggest me good variable names
Hi everyone,
Is it common sense to encrypt hashed&salted passwords that are stored in a database with a strong encryption (AES 192 or so) or are we just aiming for the stars?
Of course, the encryption key will not be in the database itself, but will be kept at a safe place.
Thanks a lot!
I am a little bit new to the PHP/MYSQL arena, and had an idea to be able to interact with my Database by using a hidden Iframe to run PHP pages in the background(iframe) on events without having to leave the current page?
Good? Bad? Common Practice? Opinions?
Hi
The following code is not causing Page_Load of PhotoList to be called. I want the control to be initialized as if it is in normal Page live cycle, what I should do.
Page pageHolder = new Page();
UserControl viewControl = (UserControl)pageHolder.LoadControl("Common/PhotoList.ascx");
pageHolder.Controls.Add(viewControl);
I have an order edit and quote edit screen that are very similar. I want to try to avoid code like this:
if (order is Order)
SetupScreenForOrder();
if (order is Quote)
SetupScreenForQuote();
But maintaining two screens is not good either. If I create some common interface between a Quote and Order then how do you deal with fields like OrderNumber or QuoteDate?
What's the best way to handle this?
I am looking for a plugin or code with a functionality like the "line count" or "line number" in common editors.
The line number usually is shown on the left border of the editors content.
Anyone got an idea how to do it with TinyMCE?
Example:
line number | content
line number one
number two
3.
one line skipped (three is empty)
5.
contents end
I have anywhere from 5 to 10 generic list in an ASP.NET VB.NET web app. I would like to write a method to pass them all into, and return only the elements they all have in common.
I'm looking for some ideas how to accomplish this the easiest and cleanest way possible.
Hello all,
I am creating an installer to deploy some application .and I am getting following problems
All applications shortcut get created in start menu under a common name like:
*Start MENU-CMKIT-gcompris
-open office
-Scratch*
A pop up should be launched at the end of installation,which has buttons for each application and it will start respective application when user clicks on button.Its not launching now.
Its very critical for me,please help me.I am also ready to pay for this but give me solution for these. please mail me on
With the introduction of Object-Oriented and Namespacing capabilities in PHP, I am loving the new found cleanliness of PHP code that can be produced. The annoying thing though is that the core of PHP is still cluttered, unorganized mess of functions.
Are there any initiatives to organize the PHP core and "common" libraries into namespaces and classes?
div
{
margin:90px auto;
}
This code centers the div in chrome with a top margin of 90px, but the results are different in all other browsers ..
is there a common method to center the div and have a top margin at the same time ?
I have seen code where every class has an interface that it implements.
Sometimes there is no common interface for them all.
They are just there and they are used instead of concreate objects.
They do not offer a generic interface for two classes and are specific to the domain of the problem that the class solves.
Is there any reason to do that?
Say you have just embarked upon a new data-centric web application project, is there a to-do list of common best-practice things you tackle before getting to actually solve the business problem at hand ?
The application I am developing is in large parts a background-only Service BUT requires some settings that the user must add. Is there a way to integrate applications with the common Settings application/view/activity?
If there's some common settings for both release and debug configuration. How can I just make the change once, not both change in debug/release?
I tried to change in all configuration section, but it overwrites everything in debug and release. Did I do something wrong? Please advise, thanks.
Given the three models “message”, “profile” and “comment” i want to merge them into one list, ordered by their common attribute “created_at”. I want to accomplish something like the project overview in Basecamp - see 3) here: http://basecamphq.com/tour#overview
Consider the following:
ThreadA and ThreadB are two threads writing diagnostic information to a common object which stores a list of diagnostic information. Is it possible for ThreadA and ThreadB to write to the same memory address at the same time? If so what would result?
Is there any pitfalls when using char*'s to write cross platform code that does memory access?
I'm working on a play memory allocator to better understand how to debug memmory issues. I have come to believe char*'s are preferable because of the ability to do pointer arithmetic and derefernce them over void*'s, is that true? Do the following assumptions always hold true on different common platforms?
sizeof(char) == 1
sizeof(char*) == sizeof(void*)
sizeof(char*) == sizeof(size_t)
Let's assume someone has to write a solution to a problem and I have to test his solution with some tests. Is it possible (maybe with reflections or something) his program to pass all my tests, but to have nothing in common with the real solution to the problem?
(This question is specific to SQLite3, but it may be common to all SQL I don't know.)
This doesn't seem to work. Is it because the column names don't match? (If they match, it works.) If this is true, how can I select from a different field in the source table?
INSERT INTO [ImagePoint] (ImageID, PointID, X, Y)
SELECT Image2ID, PointID, X, Y
FROM Point
There are a lot of articles about SVN vs. Hg in general.
I would like to concentrate only on performance.
Real-live experiences preferred.
Here is my set-up:
(future setup) Windows with IIS fro Hg
(current setup) SVN 1.3.2 on top of apache under windows
I would like to have statistics for most commons operations (commits, stats, local/remote pulls, pushes, etc...). I am not really sure what are the most common operations for Hg.
Hi! I want to coordinate use of common files on Windows Server 2003 from two Windows XP Workstations. Does Windows Server 2003 provide network mutexes for this purpose? Are there any libraries of C functions to access to them? I couldn’t find such functions in Visual C++ 2008.
I'm just starting to use Objective-C and I need to clarify something
When I @synthesize a @property, it is common convention to do the following:
@interface Class : ParentClass
@property propertyName
@end
@implementation
@synthesize propertyName = _propertyName;
@end
I've seen plenty of questions and answers suggesting that "_propertyName" is widely accepted as the "correct" way to synthesize properties. However, does it serve ANY purpose? Or is it merely to increase readability and identify instance variables?
Is it possible to sell an app for lower than the 59p (99c) that is common on the Apple App Store? I'd like to sell for around 20p.
(sorry if this is not SO suitable)
I expect it should share a common description, like XmlSchema or IDL and should generate classes for target language.
I found Thrift and it's really nice solution, but it doesn't support structures polymorphism.
I would like to have collections of base class objects, where I could place instances of subclasses, serialize this and deserialize at the opposite side. Some mechanism of polymorphic behavior support, like Visitor, would be a perfect.
Does anybody know something suitable for these requirements?