|
Lately I had to change some code on older systems where not all of the code has unit tests.
Before making the changes I want to write tests, but each class created a lot of dependencies and other anti-patterns which made testing quite hard.
Obviously,...
Started by abyx on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If tests don't break the build....
One easy way to do this is to make private members protected, and then override the protected field).
To avoid making tons of changes in old code is to just refactor it a little until you can test it.
|
|
I built a a.py in my mysite file,
a.py:
from django.core.management import setup_environ from mysite import settings setup_environ(settings) from django.contrib.sites.models import Site domain = Site.objects.get_current().domain print domain
It prints...
Started by zjm1126 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Or do a query on Site "D:\zjm_code\register\a.py", line 13, in <module> obj=Site.objects.get(id=1).update(name='sss update(...) on the result of calling....
Go to the Site model in the admin interface and change the value there.
|
|
I want to change the backcolor of a headercell in datagridview row .So how can i do that in code C#?
Started by Mobin on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
But now can anyone tell me how do i change font properties of the text named as value of the headercell like " headercell.value "
To change the font properties of a specified header cell you can try.
|
Ask your Facebook Friends
|
I need to check in my code changes to a certain branch but im not sure how to do that since my code is from trunk =/
Started by amvx on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Select TortoiseSVN | Switch....
Using Switch allows you to change a checkout from one repository want switch.
Check out the branch, copy code changes, and the recommit directory, or use svn switch .
Ok I found a way to do this.
|
|
How do I enable a check_change for a checkbox in VB.
Here is what I have so far.
Code Behind:
Protected Sub CheckBoxCash_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxCash.CheckedChanged Label1.Text = "Cash" End Sub...
Started by Bill Quinn on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Production code would also involve.
In that case, I'd skip the postback entirely an do it more').value = 'Cash';" />
Of course, that's the simple version.
That specifically requires a postback here.
|
|
What are the best practices and rules-of-thumb to follow while maintaining code? Is it good practice to have only the production ready code in the development branch, or should untested latest code be available in the development branch?
How do you guys...
Started by Mohit Ranka on
, 13 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Independent Code Reviewdev goes in trunk (svn....
Most development is performed explanation:
Do all development on a branch, committing regularly as you go.
For what it's worth, this is how we do it.
Or rather long to resolve.
|
|
Whenever I create a new Java file in Eclipse and check off the option to add public static void main(String args[]) , this code is generated:
public class Test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method...
Started by Click Upvote on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Browse all of them and look for the things you would like to change -> Braces Tab -> Change which situations you want * Templates -> Code -> Method Body -> (or the Eclipse Preferences....
Style -> Code Templates.
|
|
Hi,
To change Proxy server I have to go to IE->Internet Options->LAN Settings and click on "Use a proxy server for your LAN". I am sure there is some way of doing that by code. Does anybody has any idea how to do it (C#)?
Thanks a lot.
Sincerely...
Started by Vlad Bezden on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
System.net.httpwebrequest.proxy (VS.71).aspx
If you want to setup the proxy for use by your code you can set it via.
|
|
The UK VAT system is changing from 17.5% to 15%. What strategies have you used in your code to store the VAT, and how will the change affect your applications. Do you store a history of vats so you can calculate old prices, or are old invoices stored ...
Started by digiguru on
, 10 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
If it is hard-coded, do the work now to soft-code it, because it is likely deal for us....
So I imagine, with effective dates and rates.
Than that, I don't know where I'm going to get the time to actually do the change.
|
|
I`m reading the code of some open source project. I see that in one of the places code is not written well and could be changed a little bit to increase readability/design/anything else here that improves code and makes it easier to work with this code...
Started by Yaroslav Yakovlev on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
How example:
"I saw that you use technique x and y....
But if you spend more time working, it would be less risk for them .
It takes some time to adapt your change, take a look important issues.
Will it only be possible to contribute there.
|