I personally write out any program that is not a throwaway script on plain paper. Mostly, this is so that I have something to do during the more boring classes, but I actually feel that it has done a lot for the quality of my programs. Generally, when I jump right in and code, a lot of hacks come into the code and it is generally of lowe...
In Linux for example when i use batch if error code is 0 thats good, but what is the convention in C++ ?
when int (or bool) is equal to one we say that's true, but what must be the return of such function in C++ ?
...
I have tried Resharper Power toy Zen Coding and found it can only generate code in one line, can it generate formatted code.
for example i type in
ul>li*3
it generate:
<ul><li></li><li></li><li></li></ul>
i want it format to:
<ul>
<li></li>
<li></li>
<li></li>
</ul>
...
For example:
Name: 'textfield1'
Surname: 'textfield2'
Age: 'textfield3'
Save those three textfields and make a file where it would print it like this:
textfield1, textfield2, textfield3
...
I want something similar to a Wordpress.com blog.
What site has a free solution like this?
I want to start a little WPF blog to help newbies with the same problems I've had in my learning of WPF.
Edit:
I need it to have a [code] tag or something similar.
...
I want a function to calculate numerology.For example if i enter "XYZ" then my output should be 3 .
Here is how it became 3:
X = 24
Y = 25
Z = 26
on adding it becomes 75 which again adds up to 12 (7+5) which again adds up to 3(1+2) . Similarly whatever names i should pass,my output should be a single digit score.
...
XML file one could have 1000 - 6000 forms; XML file two could have one to 100 or more. I want to replace any identical form in file one with file two. If it exists in file 2 but not in file one I want to add it to file 1. After the files are merged I want to run it against my XSLT. I am using a 2.0 stylesheet and a Saxon parser.
Fil...
Which Storage media is used in The coding of "Trace" operation provided in c and c++ Editors?
...
Is it better to return a null value or throw an exception from an API method?
Returning a null requires ugly null checks all over, and cause a major quality problem if the return is not checked.
Throwing an exception forces the user to code for the faulty condition, but since Java exceptions bubble up and force the caller code to handl...
So in PHP, I am checking a file extension against multiple types to get the general type of file
so here is what I have for images alone:
if ( $ext == "bmp" || $ext == "jpg" || $ext == "png" || $ext == "psd" || $ext =="psp" || $ext == "thm" || $ext == "tif" || $ext == "ai" || $ext == "drw" || $ext == "eps" || $ext == "ps" || $ext == "s...
Hi,
Is there any way to extract the controlpoints calculated using Panomatic or any other Control Point detector? All I need is to compare two images based on the number of control points and tell which two images are similar.
I need to do this in Command Line.
...
I have an events calendar written in PHP, with the following pagination script that I obtained from a free PHP site.
This is the basic script (entitled PmcPagination.php):
http://pastebin.com/f7c5a4a90
(linked here for convenience, too lengthy to post in full!)
It works to the extent that it shows all events - but the dates do not tall...
My application server is in London so date format is freeze to format DD-MMM-YYYY (e.g. today’s date 16-Feb-2010) we have written VBScript code to enter the date in same format. But code fails in LN machine due to LN PC date format is dd/MM/yyyy whether NY and India PC format is MM/dd/yyyy where code works fine.
Here I want one generic ...
Currently in a situation where a co-worker refuses to do any work, and seems to want to make me do all the work, and then take the credit for it. Unfortunately for me, he tells the boss that we are sharing the work, but he is doing more work than I am. Said co-worker has been with the company longer than I have so the boss believes him m...
I'm working on writing a plugin to change the value of a cookie to prevent log out. I was planning to have it so that on every page load the value of that cookies is changed to my value. Is this the best way to go at it? Is it safe? I'm mostly needing to know how other developers would go at it and what are the pit falls of my current id...
Many years of coding have brought me to believe and try to reach this kind of if conditional coding: (demonstrated in C, but it's relevant almost to any language)
if(a <= 0)
return false;
if(strlen(str) <= a)
return false;
if(str[a] == NULL)
return false;
return true;
Which i think is much more readable than the ...
Know any updated ones that are good?
...
Below is my example script:
<li><a <?php if ($_GET['page']=='photos' && $_GET['view']!=="projects"||!=="forsale") { echo ("href=\"#\" class=\"active\""); } else { echo ("href=\"/?page=photos\""); } ?>>Photos</a></li>
<li><a <?php if ($_GET['view']=='projects') { echo ("href=\"#\" class=\"active\""); } else { echo ("href=\"/?page=photos...
While many ask questions about where to find good books or tutorials, I'd like to take the opposite tack.
I consider myself to be an entry-level programmer ready to move up to mid-level. I have written code in c, c++, c#, perl, python, clojure, vb, and java, so I'm not completely clueless.
Where I see a problem in moving to the next le...
Somebody said that when your PHP Code and application use global variable then it must be a spaghetti code (i assume this). I use wordpress a lot. As far as i know, it's the best thing near a great php software. And it use many global variables to interact between its components.
but forget about that, cause frankly, that's the only th...