I read SVG docs but I can't find solution to this. How to draw in SVG ellipse gradient like in picture below?
I use svg radialGradient but it renders circle which is not I want. So next I draw ellipse and fill it with radialGradient and I end up with this:

I use svg mask to crop ellipse but it not working as I expected. Is there any way to achieve that?
Link to svg code: https://codesandbox.io/s/fancy-dew-skokw
<svg
tabindex="0"
focusable="true" …Run Code Online (Sandbox Code Playgroud)如何编写查询以在日期之间返回对象?查询应搜索嵌套属性。我使用$gteand$lte但它似乎没有按我预期的那样工作。我想返回在两个日期之间具有 history.startTime 的“任务”对象。
db.tasks.find({'history.startTime' : { '$gte': ISODate("2017-02-04T00:00:00.000Z"), '$lt': ISODate("2017-02-05T23:00:00.000Z")} }).pretty()
{
"_id" : ObjectId("588f53c5d00baa2558fd56ae"),
"desc" : "test3",
"category" : "Category1",
"project" : "Project1",
"_creator" : "582afb3800c1bc1f203edf39",
"history" : [
{
"startTime" : ISODate("2017-02-06T11:49:42.570Z"),
"stopTime" : ISODate("2017-02-06T11:49:45.725Z"),
"_id" : ObjectId("589862d9449b4629f8dbaba7"),
"dt" : 3.155
},
{
"startTime" : ISODate("2017-02-06T08:53:53.086Z"),
"stopTime" : ISODate("2017-02-06T11:47:58.098Z"),
"_id" : ObjectId("5898626e449b4629f8dbaba6"),
"dt" : 10445.012
},
{
"startTime" : ISODate("2017-01-30T15:30:46.287Z"),
"stopTime" : ISODate("2017-01-30T15:32:52.979Z"),
"_id" : ObjectId("588f5c2cd00baa2558fd56b0"),
"dt" : 126.692
},
{
"startTime" : ISODate("2017-01-30T13:55:09.738Z"), …Run Code Online (Sandbox Code Playgroud) 当我从home.html自动完成功能中删除materialize.min.js时.是实现问题还是我做错了什么?
home.html的
<!DOCTYPE html>
<html ng-app="timeTracker">
<head>
<title>TimeTracker</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!--Import Google Icon Font-->
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="materialize/css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="stylesheets/style.css" />
<link href="/src/css/angular-datepicker.css" rel="stylesheet" type="text/css" />
</head>
<body ng-controller="containerCtrl" >
<div class="container" id="mainContainer">
<div ng-view></div>
</div><!--- container -->
<footer>
<br />
</footer>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="materialize/js/materialize.min.js"></script>
<script type="text/javascript" src="/angular.js"></script>
<script type="text/javascript" src="/angular-resource.js"></script>
<script type="text/javascript" src="/angular-route.js"></script>
<script type="text/javascript" src="javascripts/home.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这是taskView.html. …
我在测试我的React SFC时遇到问题。我想测试'PointDetailConfig'是否具有两个'DayHours'组件(可以模拟)。我不知道为什么wrapper.find()找不到'DayHours'。它与React statefull组件一起工作。收到的值表示“ DayHours”是props.children。我应该断言wrapper.props()。children吗?感谢您提供有关如何正确测试的提示。
expect(received).toHaveLength(length)
Expected value to have length:
2
Received:
{Symbol(enzyme.__root__): {Symbol(enzyme.__root__): [Circular], Symbol(enzyme.__unrendered__): <PointDetailConfig increaseCurrentDayPeriod={[]} increaseNextDayPeriod={[]} reduceCurrentDayPeriod={[]} reduceNextDayPeriod={[]} />, Symbol(enzyme.__renderer__): {"batchedUpdates": [Function batchedUpdates], "getNode": [Function getNode], "render": [Function render], "simulateEvent": [Function simulateEvent], "unmount": [Function unmount]}, Symbol(enzyme.__node__): {"instance": null, "key": undefined, "nodeType": "host", "props": {"children": [<DayHours increaseCurrentDayPeriod={[]} increaseHours={[]} increaseNextDayPeriod={[]} name="some name" reduceCurrentDayPeriod={[]} reduceHours={[]} reduceNextDayPeriod={[]} />, <DayHours increaseCurrentDayPeriod={[]} increaseHours={[]} increaseNextDayPeriod={[]} name="some name" reduceCurrentDayPeriod={[]} reduceHours={[]} reduceNextDayPeriod={[]} />]}, "ref": null, "rendered": [{"instance": null, "key": undefined, "nodeType": "function", "props": {"increaseCurrentDayPeriod": [], "increaseHours": …Run Code Online (Sandbox Code Playgroud)我在根据路径检测语言时遇到问题,即http://localhost:3000/en或http://localhost:3000/en/subpage应该将我的页面翻译成英文。我可以通过单击按钮并调用 i18n.changeLanguage('en') 来翻译它,但检测器似乎不起作用。
import i18n from "i18next";
import { reactI18nextModule } from "react-i18next";
import LngDetector from "i18next-browser-languagedetector";
import backend from "i18next-xhr-backend";
const detectionOptions = {
order: ['path', 'cookie', 'navigator', 'localStorage', 'subdomain', 'queryString', 'htmlTag'],
lookupFromPathIndex: 0
}
i18n
.use(LngDetector)
.use(backend)
.use(reactI18nextModule) // passes i18n down to react-i18next
.init({
ns: ['translation', 'main'],
defaultNS: 'translation',
lng: "pl",
fallbackLng: 'pl',
detection: detectionOptions,
keySeparator: false, // we do not use keys in form messages.welcome
interpolation: {
escapeValue: false // react already …Run Code Online (Sandbox Code Playgroud)