我正在尝试编辑一个使用modx cms的网站,它正在使用Markdown.现在我想在另一个窗口中打开一个新链接.
可能吗?谢谢
The Link [Registration](http://www.registration.com)
Run Code Online (Sandbox Code Playgroud) <button id="tagBtnId" name="TagsFilter" ng-show="disableTagButton">Tags</button>
Run Code Online (Sandbox Code Playgroud)
NG-显示应用display: none或display: block财产,但我想申请visibility: hidden和visibility: visible财产.
基本上我是超级新手,并开始在IT公司实习.我用Xamarin安装了VS. 我面临的问题非常令人沮丧.所以即使我创建空项目我也无法编译它并得到如下错误:
严重级代码说明项目文件行抑制状态警告主要版本52比51更新,这是此编译器支持的最高主要版本.
我搜索了整个谷歌并问了这么多人,仍然没有解决我的问题.如果有人可以通过skype或teamwiever帮助我,我会非常感激.我的Skype:toniterdal,随时加我.
在将OData添加到我的项目之前,我的路由设置如下:
config.Routes.MapHttpRoute(
name: "ApiById",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional },
constraints: new { id = @"^[0-9]+$" },
handler: sessionHandler
);
config.Routes.MapHttpRoute(
name: "ApiByAction",
routeTemplate: "api/{controller}/{action}",
defaults: new { action = "Get" },
constraints: null,
handler: sessionHandler
);
config.Routes.MapHttpRoute(
name: "ApiByIdAction",
routeTemplate: "api/{controller}/{id}/{action}",
defaults: new { id = RouteParameter.Optional },
constraints: new { id = @"^[0-9]+$" },
handler: sessionHandler
Run Code Online (Sandbox Code Playgroud)
所有控制器都提供Get,Put(操作名称为Create),Patch(操作名称为Update)和Delete.例如,客户端使用这些各种标准URL来表示CustomerType请求:
string getUrl = "api/CustomerType/{0}";
string findUrl = "api/CustomerType/Find?param={0}";
string createUrl = "api/CustomerType/Create";
string updateUrl = "api/CustomerType/Update";
string deleteUrl …Run Code Online (Sandbox Code Playgroud) 单击数据关闭按钮时如何清除Bootstrap V3模式中的所有输入字段?
编辑:更新了Plunkr:http://plnkr.co/edit/fQ7P9KPjMxb5NAhccYIq?p = preview
这部分有效:
<div *ngFor="let entry of entries | async">
Label: {{ entry.label }}<br>
Value: {{ entry.value }}
</div>
Run Code Online (Sandbox Code Playgroud)
但我对选择框有问题,错误信息是:
无法绑定到'ngModel',因为它不是'select'的已知属性
整个组件:
//our root app component
import {Component} from '@angular/core';
import {NgFor} from '@angular/common';
import {HTTP_PROVIDERS, Http} from '@angular/http';
import 'rxjs/Rx';
import {Observable} from 'rxjs/Rx';
@Component({
selector: 'my-app',
providers: [HTTP_PROVIDERS],
template: `
<select [(ngModel)]="selectValue" name="selectValue">
<option *ngFor="let entry of entries | async"
[value]="entry.value">{{entry.label}}</option>
</select>
<div *ngFor="let entry of entries | async">
Label: {{ entry.label }}<br>
Value: {{ …Run Code Online (Sandbox Code Playgroud) json asynchronous drop-down-menu angular2-observables angular
我开始为笛卡尔积和矩阵乘法定义我自己的算子.
矩阵和向量别名为列表:
type Matrix = float list list
type Vector = float list
Run Code Online (Sandbox Code Playgroud)
我可以通过写作来编写自己的初始化代码(并将笛卡尔产品纳入讨价还价)
let inline (*) X Y =
X |> List.collect (fun x -> Y |> List.map (fun y -> (x, y)))
let createVector size f =
[0..size - 1] |> List.map (fun i -> f i)
let createMatrix rows columns f =
[0..rows - 1] * [0..columns - 1] |> List.map (fun i j -> f i j)
Run Code Online (Sandbox Code Playgroud)
到现在为止还挺好.问题是我的定义*消除了正常的定义,即使我的版本仅为Lists定义,而Lists没有自己的乘法运算符.
文档http://msdn.microsoft.com/en-us/library/vstudio/dd233204.aspx声明"新定义的运算符优先于内置运算符".但是,我没想到所有的数字化身都被消灭了 - 当然静态打字会解决这个问题吗?
我知道可以定义一个尊重类型的全局运算符,因为MathNet …
我正在尝试使用Web Api 2和Owin向我的应用程序添加日志记录,所以我开始使用Microsoft Owin Logging,这需要一个ILogger和ILoggerFactory已经实现的,当我需要在STARTUP方法或任何Owin Middleware组件.
例如,当我在Startup方法中时,我可以使用以下方法创建记录器:
public void Configuration(IAppBuilder app)
{
// Creates configuration
var configuration = new HttpConfiguration();
// Configure WebApi Settings
WebApiConfig.Register(configuration);
app.SetLoggerFactory(new OwinLog4NetLoggerFactory("Default"));
var logger = app.CreateLogger<Startup>();
logger.WriteInformation("test log");
// Enabled WebApi in OWIN
app.UseWebApi(configuration);
}
Run Code Online (Sandbox Code Playgroud)
其中"OwinLog4NetLoggerFactory"是我的自定义ILoggerFactory实现.
到目前为止,这么好......但是......当我在实际的web api动作方法中时,如何创建记录器?...我尝试访问Request.GetOwinEnvironment()并且记录器工厂不在字典中.
例如:
public class AccountController : ApiController
{
public int Get(int id)
{
// Create logger here
return id + 1;
}
}
Run Code Online (Sandbox Code Playgroud)
我知道我可以创建一个静态类,引用Logger Factory甚至是注入来将记录器添加到api控制器,但这对于应该存在的东西来说似乎太复杂了.
任何想法,将不胜感激.
此问题与标题中描述的完全相同.
我有一个便携式F#类库.我创建了一个ASP.NET核心Web应用程序(包括.NET Framework和.NET Core),我试图在其中添加对F#类库的引用.
尝试添加引用会给出一条消息:
以下项目不支持作为参考:
当前项目不支持项目类型,不能(原文如此)引用.
这非常令人失望,因为.NET Core现在处于通用可用性状态.
当这个bug得到解决时,有没有解决方法?
所以这是我写过的一些最潮湿的代码.但它很有用,这很烦人.所有重复的原因是因为我想保持界面流畅.如果我扩充了基类(恰好View在这种情况下),它只会返回一个实例View,这会阻止我做类似的事情
let label = theme.CreateLabel().WithMargin(new Thickness(5.0)).WithText("Hello")
Run Code Online (Sandbox Code Playgroud)
因为该Label.Text属性不是由View基类实现的.
所以这是我流畅的界面.做好准备.这很难看,也很重复.但它也有效,并且使用方便.
我是否错过了明显的干燥方法?
module ViewExtensions =
let private withTwoWayBinding<'TElement, 'TProperty, 'TViewModel, 'TView when 'TView :> IViewFor<'TViewModel>>(viewModel: 'TViewModel, view: 'TView, viewModelProperty: Expr<'TViewModel -> 'TProperty>, viewProperty: Expr<'TView -> 'TProperty>) (element: 'TElement) =
view.Bind(viewModel, ExpressionConversion.toLinq viewModelProperty, ExpressionConversion.toLinq viewProperty) |> ignore
element
let private withHorizontalOptions<'TElement when 'TElement :> View> options (element: 'TElement) =
element.HorizontalOptions <- options
element
let private withVerticalOptions<'TElement when 'TElement :> View> options (element: 'TElement) =
element.VerticalOptions <- …Run Code Online (Sandbox Code Playgroud) f# ×3
c# ×2
html ×2
angular ×1
angularjs ×1
asp.net-core ×1
asynchronous ×1
css ×1
javascript ×1
json ×1
markdown ×1
odata ×1
operators ×1
owin ×1
xamarin ×1