position

How can C# nullable value typed values be set on NHibernate named IQuery parameters?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using NHibernate and calling a stored procedure via a named query: <sql-query name="SearchStuff" read-only="true" cacheable="true"> <return class="ResultEntity" /> EXEC [SearchStuff] ?, ?, ? </sql-query> Many of the stored procedure parameters are deliberately nullable - this cannot be changed. The C#: IQuery listQuery = this.Session.GetNamedQuery("SearchStuff"); listQuery.SetInt32(0, param1); listQuery.SetDateTime(1, param2); listQuery.SetString(2, param3); IList<ResultEntity> results = listQuery.List<ResultEntity>(); Unfortunately,

BadParcelableException:ClassNotFoundException when unmarshalling: android.support.v4.app.FragmentManagerState

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've migrated to SDK Android 27.1.0 3 days ago, and there are some crashs like this one, I can't understand why. It appears (currently) on Android 8 and 6. BadParcelableException ClassNotFoundException when unmarshalling: android.support.v4.app.FragmentManagerState android.support.v4.app.Fragment.setUserVisibleHint android.os.Parcel.readParcelableCreator (Parcel.java:2916) android.os.Parcel.readParcelable (Parcel.java:2842) android.os.Parcel.readValue (Parcel.java:2745) android.os.Parcel.readArrayMapInternal (Parcel.java:3114) android.os

getting absolute position of HTML element in webbrowser control with C#

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was wondering if its possible to get the absolute position of specific HTML element I have loaded in webbrowser control with C#. I tried almost all of the options that .Net provides.. none of them give me the correct position. all of them give me 0 for Y coordinate.. the element is definitely is not in 0.. does anybody have any solution or idea to solve this? 回答1: here is the solution I got so far: // set the size of our web browser to be the same size as the image int width, height; width = webBrowser1.Document.Images[0].ClientRectangle

CSS 常用技巧

空扰寡人 提交于 2019-12-03 02:45:47
本文转载于: 猿2048 网站➸ https://www.mk2048.com/blog/blog.php?id=hikii1c2ab 概述 相信大家在写css属性的时候,会遇到一些问题,比如说:垂直对齐,垂直居中,背景渐变动画,表格宽度自适应,模糊文本,样式重置,清除浮动,通用媒体查询,自定义选择文本,强制出现滚动条,固定头部和页脚,自己在网上看到的一篇关于css的文章,感觉这里边一些常用的css代码片段对大家很有帮助,所以我就把这篇文章分享给大家,希望大家能够喜欢。 css代码片段 1、垂直对齐 如果你用 CSS ,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用 CSS3 的 Transform ,可以很优雅的解决这个困惑: .verticalcenter{ position: relative; top: 50%; -webkit-transform: translateY(-50%); -o-transform: translateY(-50%); transform: translateY(-50%); } 使用这个技巧,从单行文本、段落到box,都会垂直对齐。目前浏览器对 Transform 的支持是需要关注的, Chrome 4 , Opera 10 , Safari 3 , Firefox 3 , and Internet Explorer 9 均支持该属性

Position DIV relative to another DIV?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to position a DIV relative to another DIV? I imagine this can be done by first placing it inside of the reference DIV, and then using position: relative . However, I can't figure out how to do this without affecting the contents of the reference DIV. How can I do this properly? See: http://jsfiddle.net/CDmGQ Thanks! =) 回答1: First set position of the parent DIV to relative (specifying the offset, i.e. left , top etc. is not necessary) and then apply position: absolute to the child DIV with the offset you want. It's simple and

RecyclerView onBindViewHolder only called when getItemViewType changes

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a viewholder with multiple viewtypes. When scrolling onBindViewHolder is only called when getItemViewType changes value. This causes my list items to not be updated properly. Is this a bug? Or I'm i doing something wrong here. This seems very strange behaviour from the new recyclerView class. Here is my adapter: package se.davison.smartrecycleradapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.util.SparseIntArray; import android.view.LayoutInflater; import

No animation on item removal on RecyclerView

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using RecyclerView for the first time. Everything is working fine except that there is no animation on item removal even though the animation on item addition works just fine. I have not set any custom item animator, but according to the documentation : Animations for adding and removing items are enabled by default in RecyclerView . So the animations on removal should work. I would like to have the default animation on removal, but can't get that to work. This is how I setup the RecyclerView: private void setupRecyclerView() {

How to position a div in bottom right corner of a browser?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to place my div with some notes in the bottom right position of the screen which will be displayed all time. I used following css for it: #foo { position: fixed; bottom: 0; right: 0; } It works fine with Chrome 3 and Firefox 3.6 but IE8 sucks... what can be a suitable solution for it? 回答1: This snippet works in IE7 at least <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>Test</title> <style> #foo { position: fixed; bottom: 0; right: 0; } </style> </head> <body> <div id="foo">Hello World</div> </body> </html> 回答2: I

Web前端学习笔记——HTML5与CSS3之H5-DOM扩展、H5新增API

人走茶凉 提交于 2019-12-03 02:44:45
H5-dom扩展 获取元素 document . getElementsByClassName ( 'class' ) ; //通过类名获取元素,以伪数组形式存在。 document . querySelector ( 'selector' ) ; //通过CSS选择器获取元素,符合匹配条件的第1个元素。 document . querySelectorAll ( 'selector' ) ; //通过CSS选择器获取元素,以伪数组形式存在。 类名操作 Node . classList . add ( 'class' ) ; //添加class Node . classList . remove ( 'class' ) ; //移除class Node . classList . toggle ( 'class' ) ; //切换class,有则移除,无则添加 Node . classList . contains ( 'class' ) ; //检测是否存在class <!DOCTYPE html> < html lang = " en " > < head > < meta charset = " UTF-8 " > < title > Title </ title > < style > ul { list-style : none ; } li { width :

登录注册前台

元气小坏坏 提交于 2019-12-03 02:44:25
目录 前台 Login.vue Register.vue Header.vue 前台 Login.vue <template> <div class="login box"> <img src="@/assets/img/Loginbg.jpg" alt=""> <div class="login"> <div class="login-title"> <img src="@/assets/img/Logotitle.png" alt=""> <p>帮助有志向的年轻人通过努力学习获得体面的工作和生活!</p> </div> <div class="login_box"> <div class="title"> <span :class="{active: a0}" @click="changeLogin(0)">密码登录</span> <span :class="{active: a1}" @click="changeLogin(1)">短信登录</span> </div> <div class="inp" v-if="login_type===0"> <input v-model="username" type="text" placeholder="用户名 / 手机号码" class="user"> <input v-model="password" type=