Im new to C#/.NET . But Ive been doing TDD for quite some time now. I wanted to what is the best framework that can be used for mocking objects while writing tests in c3
I am trying to use Jquery to display dates in a dropdown with interval of half month...
so the first value would be the coming month's 1st, then second will be the coming month's 15th and third value would be next to next month's first and so on...
If today date is less than 15th then the first value would be the 15th of current month.
What will be the best or a cleaner way to do this... (want to display in the dropdown)
Thanks
I need change all standart error message on my message in Zend_Element_Text
when i use validator('EmailAddress') this validator trows several differnt message.
Value is required and can't be empty
'' is no valid email address in the
basic format local-part@hostname
When i set options setErrorMessage('some my error text')
it string shows on any error several times.
the error looks like
some my error text
some my error text
What the best way to solve this problem ?zf version 1.10.3
input is a string (var str) something like this:
`<<hello there//abcd//1234>>
I want to know how to best extract the information to have this:
var a = "hello there";
var b = "abcd";
var c = 1234;
case a: select everything after << until first //
case b: select everything after first // until second //
case c: select everything after second // until
Anybody knows a simple solution?
THX
When I was learning to code, I read up on the design patterns like a good boy. Long after this, I started to actually understand them.
Design discussions such as those on this site constantly try to make the rules more and more general, which is good. But there is a line, over which it becomes over-analysis starts to feed off itself and as such I think begins to obfuscate the original point - for example the "What's Alternative to Singleton" post and the links contained therein.
http://stackoverflow.com/questions/1300655/whats-alternative-to-singleton
I say this having been asked in both interviews I’ve had over the last 2 weeks what a singleton is and what criticisms I have of it.
I have used it a few times for items such as user data (simple key-value eg. last file opened by this user) and logging (very common i'm sure). I've never ever used it just to have what is essentially global application data, as this is clearly stupid.
In the first interview, I reply that I have no criticisms of it. He seemed disappointed by this but as the job wasn’t really for me, I forgot about it.
In the next one, I was asked again and, as I wanted this job, I thought about it on the spot and made some objections, similar to those contained in the post linked to above (I suggested use of a factory or dependency injection instead). He seemed happy with this.
But my problem is that I have used the singleton without ever using it in this kind of stupid way, which I had to describe on the spot. Using it for global data and the like isn’t something I did then realised was stupid, or read was stupid so didn’t do, it was just something I knew was stupid from the start. Essentially I’m supposed to be able to think of ways of how to misuse a pattern in the interview? Which class of programmers can best answer this question? The best ones? The medium ones? I'm not sure....
And these were both bright guys. I read more than enough to get better at my job but had never actually bothered to seek out criticisms of the most simple of the design patterns like this one.
Do people think such questions are valid and that I ought to know the objections off by heart? Or that it is reasonable to be able to work out what other people who are missing the point would do on the fly? Or do you think I’m at least partially right that the question is too unsubtle and that the questions ought to be better thought out in order to make sure only good candidates can answer.
PS. Please don’t think I’m saying that I’m just so clever that I know everything automatically - I’ve learnt the hard way like everyone else. But avoiding global data is hardly revolutionary.
What is the best place in servlet for Hibernate code that returns HibernateSessionFactory ?
I saw many examples: ones put db connection in service methods. Others - use smth like HibernateUtil (Singleton) that returns HibernateSessionFactory.
I don't know is it safe to use HibernateUtil in multithreaded Servlets ?
What the best way to store CSPC and UPC codes are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I've since switch to strings, but am not sure if a better generic datatype (needs to support SQLite, MySQL and PostgreSQL).
Thanks.
I'm in the process of weeding out all hardcoded values in a java library and was wondering what framework would be the best (in terms of zero- or close-to-zero configuration) to handle run-time configuration? I would prefer xml-based config-files, but it's not essential.
Please do only reply if you have practical experience with a framework. I'm not looking for examples, but experience... Thanks for taking the time.
NSOperationQueue has waitUntilAllOperationsAreFinished, but I don't want to wait synchronously for it. I just want to hide progress indicator in UI when queue finishes.
What's the best way to accomplish this?
I can't send notifications from my NSOperations, because I don't know which one is going to be last, and [queue operations] might not be empty yet (or worse - repopulated) when notification is received.
I am using basic level authentication. and i need best logout code in JSP / servlet.
I am using JSP & servlet and MS-ACCESS as backend.
Is it require a session creation in JSP?
please reply as soon as possible.
Thanking you.....
Suppose a service written with RoR starts to use AWS S3 to store some data. What is the best library to use for working with AWS S3? Currently the main two alternatives for me are:
RightScale AWS Ruby gems
http://github.com/rightscale/right_aws
AWS::s3 http://amazon.rubyforge.org/
What are their main advantages and disadvantages? What if later service will need to use other AWS (like EC2)? What other gems do you use and why?
Thanks!
As per title. I want to be able to save some data in a cache object but this object must be available to all users/sessions and can expire.
What is the best method to achieve this in a asp.net web app?
In a basic HTML web page, how do you make the user have to enter a username and password before they are allowed to download a file.
What is the best way of achieving this on a website, preferably in plain HTML.
Hello friends
The below link has my web page and i would like to validate all the fields using jquery, the problem is I dont have much space around the fields to display ordinary error messages. I am am a novice and thinking of using jquery validation, so could any of you suggest me the best possible way to do that.
http://www.4shared.com/photo/BowU9nFB/page.html
Thanking You,
Indranil
What is the best way to compare objects of value type N? So I want to do a String, Integer, DateTime, etc comparison depending on the type of the object.
I am currently the only developer on a MS Access project, but we may soon be adding developers onto to the project. This will be my first time sharing the load on a single MS Access project and I'm a bit clueless as to what versioning system (ex. SubVersion) might work best. Any suggestions on programs I should be taking a look at or staying away from? Thanks for your help!
What is the best process where code is checkedin by developers, installer is created by build engineer and release to QA to test the installer.
Should the installer be release to QA without unit testing by Dev. If dev do some changes then they should wait until QA to report bugs.Or if installer first given to dev for unit testing and once they signoff then only it should be release to QA?
I have a list of dictionaries:
[{'title':'New York Times', 'title_url':'New_York_Times','id':4},
{'title':'USA Today','title_url':'USA_Today','id':6},
{'title':'Apple News','title_url':'Apple_News','id':2}]
I'd like to sort it by the title, so elements with A go before Z:
[{'title':'Apple News','title_url':'Apple_News','id':2},
{'title':'New York Times', 'title_url':'New_York_Times','id':4},
{'title':'USA Today','title_url':'USA_Today','id':6}]
What's the best way to do this?
Also, is there a way to ensure the order of each dictionary key stays constant, e.g., always title, title_url, then id?
Thank you.
Are you an iPhone/iPad/Android programmer with a designer soul? If so we would like to hear from you.
Drop us your best work/portfolio and than we talk.
[email protected]
Cheers
T
Hi,
I have to login with a username / password with a c# program with asp.net form.
I have already do that with HttpUtility on PHP website but how to do that with ASP.NET website ?
In ASP.NET, I must handle postback and so on... Any ideas ?
Thanks in advance
Best regards
On my there are two set languages, which are English and Russian, and English is the default set language. Yet every time I leave Code::Blocks and click on the window again, the program automatically changes the language to Russian, which not only is it annoying, but it doesn't make much sense.
Does anyone have any idea why it's going on and how to get rid of this pest? So far that's the best C++ IDE I have found and I don't want to ditch it due to such a nasty annoyance.
I would like to know if there's exists some simple code to get to the page i know its ID , I would like to create small input (no matter where in templates)from where the people can easily get to the page if they know it's page ID (4numeric ID is better to remember - permalink name you can mistake . I have the girls portfolio in wordpress - portfolio=pages x jobs in clubs offers=posts , I would like the girls portfolios to be easily findable by ID(s) , if possible the same for the posts=jobs in clubs
The best solution little 4-5numeric input and send=go button in sidebar.php - index.php etc