How to use skewer-mode?

http://emacs.stackexchange.com/questions/2376/how-to-use-skewer-mode

Instead of running the demo, just perform these minimal steps to ensure that everything is working correctly.

  1. Open a new buffer with the name myskewer.js
  2. Enable JS2-mode (a dependency of skewer)
  3. Enable skewer-mode
  4. M-xrun-skewer (a browser opens, go back to myskewer.js)
  5. Type alert("hello"); and hit C-xC-e at the end of that line
  6. Go back to the browser.

You should see an alert box on the page.

shareimprove this answer

How to cancel a local git commit

http://stackoverflow.com/questions/4850717/how-to-cancel-a-local-git-commit

Just use git reset without the --hard flag:

git reset HEAD~1

PS: On Unix based systems you can use HEAD^ which is equal to HEAD~1. On Windows HEAD^ will not work because ^ signals a line continuation. So your command prompt will just ask you More?.

shareedit

Error: “Calling ‘Read’ when datareader is closed…”

http://iswwwup.com/t/cb38652a5600/error-calling-read-when-datareader-is-closed.html

1 answer

By dotnetomBest answer

You need to call a method like ToList in you data access layer to force the request to a database:

using (var context = new Admin_TestEntities())
{
    var data = context.Leave_GetDetails("Recommended").ToList();
    return View(data);
}

Methods like AsEnumerable() do not make a request to a database. The request is only made when you first access the data (in your case – in a view) or when you explicitly call a method which makes a call to the database (for example ToList()).

You get an error because when you try to access object in your view this is when the call to the database is actually made, but at the same time your object context is already disposed. To fix it you should explicitly force database query using ToList while the context is not yet disposed, that is in your controller method

Why do deleted data connections come back in Visual Studio?

http://stackoverflow.com/questions/3264806/why-do-deleted-data-connections-come-back-in-visual-studio

Steve, I have been dealing with this issue for a couple of days. Not only was I not able to remove the old connection, but I was also unable to add a new connection.

Here is what I found after searching high and low.

On Windows 7 and perhaps Vista try renaming or deleting this file “DefaultView.SEView” in this folder C:\Users…\AppData\Roaming\Microsoft\VisualStudio\9.0\ServerExplorer

Someone else said to remove the file from AppData\Local but that’s just not right.

shareedit