shim

Microsoft Fakes (Shims and / or Stubs) on a c# method with SQL code

╄→гoц情女王★ 提交于 2019-12-23 17:15:20
问题 I am trying to learn a bit more about Unit Testing, using out-of-the-box functionality (i believe it is MSTest.exe), and Microsoft Fakes (stubs and Shims). I am using Visual Studio 2012 Ultimate and .Net 4.5 Framework. Given the following code that calls a stored procedure (SQL Server) which returns a single output value (for simplicity): public string GetSomeDatabaseValue() { string someValue = String.Empty; SqlParameter paramater = new SqlParameter(); paramater.ParameterName = "

jQuery: Problem with windowed controls in IE6

被刻印的时光 ゝ 提交于 2019-12-22 12:28:10
问题 I have a web page which contains a select box. When I open a jQuery Dialog it is displayed partly behind the select box. How should I approach this problem? Should I hide the select box or does jQuery offer some kind of 'shim' solution. (I have Googled but didn't find anything) Here is some code: <!DOCTYPE html> <html lang="en"> <head> <title>testJQuery</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application

jQuery: Problem with windowed controls in IE6

余生颓废 提交于 2019-12-22 12:28:03
问题 I have a web page which contains a select box. When I open a jQuery Dialog it is displayed partly behind the select box. How should I approach this problem? Should I hide the select box or does jQuery offer some kind of 'shim' solution. (I have Googled but didn't find anything) Here is some code: <!DOCTYPE html> <html lang="en"> <head> <title>testJQuery</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application

Equivalent for `-moz-element` in other browsers?

送分小仙女□ 提交于 2019-12-21 04:08:19
问题 I want to create an opacity blur overlay, similar to Windows Aero or iOS7. Unfortunately the filter: blur() or filter: url(#svgBlur) properties can only apply to the element, not content behind it. To get round this we need a copy of the background that is blurred. This is possible in FX using the background: -moz-element(#elementId) experimental CSS property. Using that I can get the effect I want in FX only. There are other questions about solving the blur problem, and one solution appears

Loading jQuery, Underscore and Backbone using RequireJS 2.0.1 and shim

╄→гoц情女王★ 提交于 2019-12-20 08:01:07
问题 I am experimenting a little bit with RequireJS 2.0.1 . My goal is to load correctly jQuery, Underscore and Backbone. From the original RequireJS doc I discovered that the author J. Burke added (to this new release) a new config option called shim. Then I wrote this stuff down here: index.html <!DOCTYPE html> <html> <head> <title>Testing time</title> <script data-main="scripts/main" src="scripts/require.js"></script> </head> <body> <h1>Testing time</h1> </body> </html> scripts/main.js

Acceptable CSS hacks/fixes

心已入冬 提交于 2019-12-18 13:22:41
问题 Is there a list of 'good' clean CSS hacks, which are certain to be future-proof? For example, zoom:1 is safe, as long as it's only served to IE, and you remember it's there. The very common hack of using child selectors is not safe because IE7 supports them. Using height:1% just feels dirty (but that might just be me). I know of ie7-js, so IE6 bugs don't worry me much. Also, I'm not looking for a religious debate, just sources. Thanks for the replies - I've selected the one with best sources

What is a Shim?

陌路散爱 提交于 2019-12-18 09:55:33
问题 What's the definition of a Shim? 回答1: From Wikipedia: In computer programming, a shim is a small library that transparently intercepts an API, changing the parameters passed, handling the operation itself, or redirecting the operation elsewhere. Shims typically come about when the behaviour of an API changes, thereby causing compatibility issues for older applications that still rely on the older functionality. In these cases, the older API can still be supported by a thin compatibility layer

How can I stub IDBconnection

人走茶凉 提交于 2019-12-13 05:01:08
问题 I am writting Unit Test for my database connection. I have following class Public class A { public IDbConnection _dbConnection; public A() { _dbConnection = new SqlConnection(connectionStringName); } public int ExecuteNoneQuery(CommandDefination command) { return _dbConnection.Execute(command); } } I want to test this class, how I can test with Microsoft Stub/Shim I have written following code, but it is not working. [TestMethod] public void TestMethod1() { StubIDbConnection stubIDbConnection

Preserving jQuery dependency for highcharts with requireJS optimizer

倖福魔咒の 提交于 2019-12-13 02:35:20
问题 I'm testing out requireJS and am trying to make a simple project using highcharts. I've started with the requireJS multipage example project as a starting point. My dir structure looks the same as the base structure, with highstock.js added in the lib directory. page1.html : page 1 of the app. page2.html : page 2 of the app. js app : the directory to store app-specific modules. lib : the directory to hold third party modules, like jQuery. common.js : contains the requirejs config, and it will

Browserify + shim on jquery and signalR not working

左心房为你撑大大i 提交于 2019-12-11 13:18:00
问题 I'm using gulp + browserify to bundle my source but i got always the same error : jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file. SignalR get $ = undefined... I split my source into two bundle : vendor and app. Vendor bundle get lib's id from packages.json and the bundle require it. App bundle get main entry and i passe id's lib to this bundle with bundle.external. Here my packages.json : "browser": { "angular-notify": "./node_modules