fluent

DevExpress v18.1新版亮点——WinForms篇(四)

随声附和 提交于 2019-11-28 11:12:50
用户界面套包DevExpress v18.1日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容。本文将介绍了DevExpress WinForms v18.1 的新功能,快来下载试用新版本! 点击下载>> Navigation UI Pager Navigation Radio Group和Windows UI Button Panel可以用作pager:Tile Control、Tile Bar、Navigation Frame和Image Slider。pager自动将目标控件的内容分割成单独的页面。 Tile Control - DirectX硬件加速 DevExpress WinForms Tile控件现在支持DirectX渲染,因此您可以创建高性能解决方案以便在高DPI设备上使用。 Fluent Design Form 新版本包含了新的Fluent Design Form,受全新的Microsoft Fluent Design System启发,其功能包括: Integrated Hamburger Menu Adaptive Layout Acrylic Material (部分透明的纹理) Reveal Highlight Acrylic Material和Reveal Highlight效果可在具有Windows 10 Spring

Will the jit optimize new objects

匆匆过客 提交于 2019-11-28 00:25:52
I created this class for being immutable and having a fluent API: public final class Message { public final String email; public final String escalationEmail; public final String assignee; public final String conversationId; public final String subject; public final String userId; public Message(String email, String escalationEmail, String assignee, String conversationId, String subject, String userId) { this.email = email; this.escalationEmail = escalationEmail; this.assignee = assignee; this.conversationId = conversationId; this.subject = subject; this.userId = userId; } public Message() {

Understanding of How to Create a Fluent Interface

别来无恙 提交于 2019-11-27 23:46:35
Hi i'm trying to understand how i could build a readable and also error preventing Fluent-API without to much restriction for the User to hold it simple let's say we want to change the following class to be fluent public class Car { public int Gallons { get; private set; } public int Tons { get; private set; } public int Bhp { get; private set; } public string Make { get; private set; } public string Model { get; private set; } public Car(string make, string model) { Make = make; Model = model; } public void WithHorsePower(int bhp) { Bhp = bhp; return this; } public void WithFuel(int gallons)

Inheritance Mapping with Fluent NHibernate

假如想象 提交于 2019-11-27 18:10:45
Given the following scenario, I want map the type hierarchy to the database schema using Fluent NHibernate. I am using NHibernate 2.0 Type Hierarchy public abstract class Item { public virtual int ItemId { get; set; } public virtual string ItemType { get; set; } public virtual string FieldA { get; set; } } public abstract class SubItem : Item { public virtual string FieldB { get; set; } } public class ConcreteItemX : SubItem { public virtual string FieldC { get; set; } } public class ConcreteItemY : Item { public virtual string FieldD { get; set; } } See image The Item and SubItem classes are

Fluent NHibernate Generated AND Assigned ID Columns

那年仲夏 提交于 2019-11-27 17:47:25
问题 I'm using Fluent NHibernate for my data-persistence in a web application. My problem... I have a base class that maps all entities with an ID property of type T (almost always an int or GUID) using GeneratedBy().Identity() On application start-up, I have a boot-strapper that checks and verifies the needed seed-data is populated. My problem is, some of the seed-data that is populated needs a specific ID. (IDs that would correspond to an enum or system user) Is there any way to force NHibernate

How to join table in fluent nhibernate

雨燕双飞 提交于 2019-11-27 12:16:47
问题 how do we do this mapping but fluently? <class name="Person" table="People"> <id name="Id"> <generator class="identity"/> </id> <property name="Name" /> <join table="Addresses"> <key column="PersonId"/> <property name="Line1"/> <property name="Line2"/> <property name="City"/> <property name="Country"/> <property name="ZipCode"/> </join> </class> I know i can use 'References' but i don't need all the columns from the related table. i just need one property. 回答1: What Paco said is not right.

Fluent NHibernate Many-to-Many

最后都变了- 提交于 2019-11-27 12:15:43
问题 I am using Fluent NHibernate and having some issues getting a many to many relationship setup with one of my classes. It's probably a stupid mistake but I've been stuck for a little bit trying to get it working. Anyways, I have a couple classes that have Many-Many relationships. public class Person { public Person() { GroupsOwned = new List<Groups>(); } public virtual IList<Groups> GroupsOwned { get; set; } } public class Groups { public Groups() { Admins= new List<Person>(); } public virtual

How to select count with Laravel's fluent query builder?

瘦欲@ 提交于 2019-11-27 09:58:22
问题 Here is my query using fluent query builder. $query = DB::table('category_issue') ->select('issues.*') ->where('category_id', '=', 1) ->join('issues', 'category_issue.issue_id', '=', 'issues.id') ->left_join('issue_subscriptions', 'issues.id', '=', 'issue_subscriptions.issue_id') ->group_by('issues.id') ->order_by(DB::raw('COUNT(issue_subscriptions.issue_id)'), 'desc') ->get(); As you can see, I am ordering by a count from the joined table. This is working fine. However, I want this count

论文阅读 | Generating Fluent Adversarial Examples for Natural Languages

ぃ、小莉子 提交于 2019-11-27 08:27:30
Generating Fluent Adversarial Examples for Natural Languages ACL 2019 为自然语言生成流畅的对抗样本 摘要 有效地构建自然语言处理(NLP)任务的对抗性攻击者是一个真正的挑战。首先,由于 句子空间是离散的 。沿梯度方向做小扰动是困难的。其次,生成的示例的 流畅性不能保证 。在本文中,我们提出了MHA,它通过 执行Metropolis-Hastings抽样 来解决这两个问题,其建议是在 梯度的指导下 设计的。在IMDB和SNLI上的实验表明,我们提出的MHA在攻击能力上优于基线模型。使用MHA进行Adver sarial训练也会带来更好的健壮性和性能。 1 介绍 对抗性学习是深度学习中的一个热门话题。攻击者通过扰动样本生成对抗性样本,并利用这些例子欺骗深度神经网络(DNNs)。从防御的角度出发,将对抗性样本混合到训练集中,提高了受害者模型的性能和鲁棒性。然而,为NLP 模型(例如文本分类器)构建攻击者是非常困难的。首先,由于句子空间离散,基于梯度的微扰难以实现。然而,梯度信息是至关重要的,它导致最陡的方向,以更有效的例子。其次,对抗性的例子通常不是流利的句子。 不流畅的例子在攻击中效果较差,因为受害者模型可以很容易地学会识别它们。 同时, 对它们进行对抗性训练通常效果不佳 (详细分析见图1)

Fluent NHibernate, working with interfaces

家住魔仙堡 提交于 2019-11-27 07:14:29
I just switched to Fluent NHibernate and I've encountered an issue and did not find any information about it. Here's the case : public class Field : DomainObject, IField { public Field() { } public virtual string Name { get; set; } public virtual string ContactPerson { get; set; } public virtual bool Private { get; set; } public virtual IAddress Address { get; set; } } IAddress is an interface implemented by a class named Address public class Address : DomainObject, IAddress { public Address() { } public virtual string City { get; set; } public virtual string Country { get; set; } public