specifications

New HTML5 Canvas API support

非 Y 不嫁゛ 提交于 2019-12-23 07:34:16
问题 I have found several posts about new functions in HTML5 Canvas API, like Path primitives or Hit Regions. It seems that the current specification (4.8.11) has got these features: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#hit-regions Althought the context.addHitRegion (context is canvas2d context) in my Chrome 23.0.1271.64 returns undefined (I cannot create Path primitives too). Does somebody know when these features will be implemented (their

org.specs2.mock.Mockito matchers are not working as expected

佐手、 提交于 2019-12-22 18:52:46
问题 Here is the code I am trying to run: import org.specs2.mock.Mockito import org.specs2.mutable.Specification import org.specs2.specification.Scope import akka.event.LoggingAdapter class MySpec extends Specification with Mockito { "Something" should { "do something" in new Scope { val logger = mock[LoggingAdapter] val myVar = new MyClassTakingLogger(logger) myVar.doSth() there was no(logger).error(any[Exception], "my err msg") } } } When running this, I get the following error: [error] org

HTML 5 local computer hardware specs

為{幸葍}努か 提交于 2019-12-22 15:23:28
问题 Is there a way to use HTML 5 to access local system hardware details? I'm looking specifically for attributes about CPU, RAM, Disk space, Video card information, Browsers available and plug-ins (with verson information). Ultimately, I am trying to determine if I can build a tool to check a machine for hardware requirements to run software but do so without needing to actually install anything on the machine. Any help is much appreciated! Thanks! 回答1: I don't know if HTML5 can help you but

RPM spec files in version control system

北战南征 提交于 2019-12-22 10:54:14
问题 I faced with task of building RPM packets from sources of c++ (but it may be any other language) project controlled with Git. And my question is where should I store ".spec" files for this task? Should it be stored independently of project main sources or be included in them? This task is complicated by the condition that I'm participating in different projects and use different version control systems: SVN, Git, Mercurial. So I'm trying to find most common and convenient solution without

distutils setup.py and %post %postun

你。 提交于 2019-12-22 09:07:10
问题 I am newbie. I am buidling rpm package for my own app and decided to use distutils to do achieve it. I managed to create some substitue of %post by using advice from this website, which i really am thankfull for, but i am having problems with %postun. Let me describe what i have done. In setup.py i run command that creates symbolic link which is needed to run application. It works good but problem is when i want to remove rpm, link stays there. So i figured that i should use %postun in spec

Web Components - why <content> was replaced with <slot>

 ̄綄美尐妖づ 提交于 2019-12-22 06:55:47
问题 Version 1.0 of Shadow DOM will completely replace the <content> tag with <slot> . There are examples on the web I cannot find a relevant discussion which justifies this change. What was the problem with <content> , which <slot> will solve? After all the new design is completely different. 回答1: The editor of Shadow DOM specification is here. It would be difficult to summarize the reason here, however, the following discussions and the minutes might be helpful to understand the history and the

explicit specialization of template class member function

亡梦爱人 提交于 2019-12-21 12:11:33
问题 I have this : template<class T, class U> class A { template<size_t N> void BindValues(); } template<class T, class U> template<size_t N> inline void A<T, U>::BindValues() { conn->setValue<N-1>( std::get<N-1>(m_Tuple) ); BindValues<N-1>(conn); } template<class T, class U> template<> inline void A<T, U>::BindValues<1>() { conn->setValue<0>( std::get<0>(m_Tuple) ); } My Compile error is: invalid explicit specialization before '>' token enclosing class templates are not explicitly specialized

How to implement a JSR Specification

只谈情不闲聊 提交于 2019-12-21 12:07:25
问题 I'm considering implementing one or two JSR APIs. I have not yet read the entire specification (the plan is to read them as I code the implementation) but I am very familiar with them. I have read that the JSR process includes implementing a Test Compatibility Kit (TCK) for testing said JSR implementations. Before I start writing a bunch of unit tests to verify the correctness/completeness of my implementation I would really like to use this TCK but I have no idea if it is available for me.

jsDoc - how to specify array length

a 夏天 提交于 2019-12-21 09:27:06
问题 In jsDoc I can specify my array parameters and members like this: /** * @constructor * @param {Array.<string>} myArray */ function someFunction( myArray ){ this.firstArray = myArray; /** @member {Array.<float>} */ this.secondArray = []; } Is there also a way to specify the length , or minLength and maxLength of these arrays? 回答1: I think you're asking whether you can include the minimum/maximum length in the type expressions (for example, Array.<string> ). In short, the answer is no. You'll

What should getBoundingClientRect() on a transformed SVG element return?

谁说我不能喝 提交于 2019-12-21 09:16:41
问题 Today I tested what happens when you use getBoundingClientRect() on an SVG element that has been rotated. Test: http://phrogz.net/svg/getBoundingClientRect-on-rotated-elements.html The result is that: Chrome, Safari, Opera, and IE appear to calculate the local (untransformed) bounding box of the element, and then return the client rect for that bounding box . This can result in a client rect larger than seems appropriate. Firefox, on the other hand, clips the client rect to fit the element