Search Results

Search found 6502 results on 261 pages for 'dont reinvent the wheel'.

Page 105/261 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • Do i need to dispose of MySqlCommand?

    - by acidzombie24
    I find it incredibly annoying to write a using statement on every one of my queries (which require its own command or write parameters.clear()) which sometimes require declaring variables outside of the using block. Its so incredibly annoying and looks much dirtier compared to the version without disposing the object. Do i need to dispose of it? what happens if i dont? I do know its good practice to dispose of an object when it has that interface.

    Read the article

  • Delete query in Linq

    - by Ani
    I have this simple code but it shows error. I dont know where I am going wrong. I shows error in last line.."DeleteOnSubmit" linq_testDataContext db = new linq_testDataContext(); var remove = from aremove in db.logins where aremove.username == userNameString && aremove.Password == pwdString select aremove; db.logins.DeleteOnSubmit(remove); Thanks, Ani

    Read the article

  • Problem while disabling scrolling of UITableview

    - by Sreelal
    Hi, I am facing a problem while disabling the scrolling of table view.When i disabled the scrolling then the cells are not responding to user clicks,even delegates( like - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath) are not firing .Still dont know how to resolve looking for a solution Thanks in advance....

    Read the article

  • Mocking methods that call other methods Still hit database.Can I avoid it?

    - by devnet247
    Hi, It has been decided to write some unit tests using moq etc..It's lots of legacy code c# (this is beyond my control so cannot answer the whys of this) Now how do you cope with a scenario when you dont want to hit the database but you indirectly still hit the database? This is something I put together it's not the real code but gives you an idea. How would you deal with this sort of scenario? Basically calling a method on a mocked interface still makes a dal call as inside that method there are other methods not part of that interface?Hope it's clear [TestFixture] public class Can_Test_this_legacy_code { [Test] public void Should_be_able_to_mock_login() { var mock = new Mock<ILoginDal>(); User user; var userName = "Jo"; var password = "password"; mock.Setup(x => x.login(It.IsAny<string>(), It.IsAny<string>(),out user)); var bizLogin = new BizLogin(mock.Object); bizLogin.Login(userName, password, out user); } } public class BizLogin { private readonly ILoginDal _login; public BizLogin(ILoginDal login) { _login = login; } public void Login(string userName, string password, out User user) { //Even if I dont want to this will call the DAL!!!!! var bizPermission = new BizPermission(); var permissionList = bizPermission.GetPermissions(userName); //Method I am actually testing _login.login(userName,password,out user); } } public class BizPermission { public List<Permission>GetPermissions(string userName) { var dal=new PermissionDal(); var permissionlist= dal.GetPermissions(userName); return permissionlist; } } public class PermissionDal { public List<Permission> GetPermissions(string userName) { //I SHOULD NOT BE GETTING HERE!!!!!! return new List<Permission>(); } } public interface ILoginDal { void login(string userName, string password,out User user); } public interface IOtherStuffDal { List<Permission> GetPermissions(); } public class Permission { public int Id { get; set; } public string Name { get; set; } } Any suggestions? Am I missing the obvious? Is this Untestable code? Very very grateful for any suggestions.

    Read the article

  • what are sparse voxel octrees?

    - by pdeva
    I have reading a lot about the potential use of sparse voxel octrees in future graphics engines. However I have been unable to find technical information on them. I understand what a voxel is, however I dont know what sparse voxel octrees are or how are they any more efficient than the polygonal techniques in use now. Could somebody explain or point me to an explanation for this?

    Read the article

  • True random number generator

    - by goldenmean
    Sorry for this not being a "real" question, but Sometime back i remember seeing a post here about randomizing a randomizer randomly to generate truly random numbers, not just pseudo random. I dont see it if i search for it. Does anybody know about that article?

    Read the article

  • speech recognition project

    - by sk
    hello im making my final year project i.e. speech recognition.but i dont have nay idea how to start.i will use c#.plz can anyone guide me how to start.what shoul be the first step? thnx

    Read the article

  • creating class diagram vs2008

    - by jaymin
    Hi, i am currently working on a project using visual studio 2008, vc++. i want to view the class diagram of my code, but i dont see any "class diagram" option when i click add new item, please do help me.. thanks..

    Read the article

  • jQuery Selector issue finding href with text category1 in it

    - by sushil bharwani
    i have a set of hyperlinks with href = javascript:method('category1') and likewise category2 category3 ... I want to select hyperlink with href containing category1 so i have written jQuery(a[href*='category1']) but dont know why it also selects hyperlinks with category10 category11 category12 ... also I understand that category1 is common in all of them but 'category1' should'nt be do i need to put ' with escape charaters.

    Read the article

  • Openid for apps domain

    - by user268515
    Hi I'm new to openId concepts. I want to use my google apps domain's user-name & password in third party websites for that i followed this link http://jeremiahlee.com/blog/2009/09/28/how-to-setup-openid-with-google-apps/. But i got struck on second step i dont know where and how to create openId file in server.Please Help on this issue it will be very useful for me. Thanks, Sharun.

    Read the article

  • IIS Directory Browing

    - by Zinx
    Hi All, If I enable directory browsing in IIS it displays folder contents to user. Is there any way of controlling the way it shows the list. For example, I dont want to show full physical path of the folder. Is it possible to achieve? If yes, how? Thanks.

    Read the article

  • Hibernate Communications Link Failure in Restlet-Hibernate Based Java application powered by MySQL

    - by Vatsala
    Let me describe my question - I have a Java application - Hibernate as the DB interfacing layer over MySQL. I get the communications link failure error in my application. The occurence of this error is a very specific case. I get this error , When I leave mysql server unattended for more than approximately 6 hours (i.e. when there are no queries issued to MySQL for more than approximately 6 hours). I am pasting a top 'exception' level description below, and adding a pastebin link for a detailed stacktrace description. javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Cannot open connection - Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open connection - Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure - The last packet successfully received from the server was 1,274,868,181,212 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. - Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure - The last packet successfully received from the server was 1,274,868,181,212 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. - Caused by: java.net.ConnectException: Connection refused: connect the link to the pastebin for further investigation - http://pastebin.com/4KujAmgD What I understand from these exception statements is that MySQL is refusing to take in any connections after a period of idle/nil activity. I have been reading up a bit about this via google search, and came to know that one of the possible ways to overcome this is to set values for c3p0 properties as c3p0 comes bundled with Hibernate. Specifically, I read from here http://www.mchange.com/projects/c3p0/index.html that setting two properties idleConnectionTestPeriod and preferredTestQuery will solve this for me. But these values dont seem to have had an effect. Is this the correct approach to fixing this? If not, what is the right way to get over this? The following are related Communications Link Failure questions at stackoverflow.com, but I've not found a satisfactory answer in their answers. http://stackoverflow.com/questions/2121829/java-db-communications-link-failure http://stackoverflow.com/questions/298988/how-to-handle-communication-link-failure Note 1 - i dont get this error when I am using my application continuosly. Note 2 - I use JPA with Hibernate and hence my hibernate.dialect,etc hibernate properties reside within the persistence.xml in the META-INF folder (does that prevent the c3p0 properties from working?)

    Read the article

  • Java Filepath Question

    - by JJ Nooby
    I am trying to finish a java program that uploads a file from a client machine to a webserver. The java program is executed with a bat script. I need to pass in a file name to the java program somehow since the filename is different every time. Or can i somehow use %1 instead of the filepath? I dont know.

    Read the article

  • How to disable the delete button for the particular row when we are using the table view delegate me

    - by monish
    Hi guys, Here I need a help from ur side that Im using the tableview delegate method commitEditing sytle to get the delete button for every cell when we swipe.But my problem here is I dont want the delete button for the first row in the tableview and swipe should not work and I dnt have any idea how to implemet this. Anyone's help will be much appreciated. Thank You, Monish.

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >