小编par*_*man的帖子

Google地图移动版SDK不再免费吗?

根据这个链接:

谷歌价格指南

谷歌从6月11日起改变了它的价格.这是否意味着使用谷歌地图SDK的移动设备不再是免费的?

google-maps google-maps-android-api-2 google-maps-sdk-ios

16
推荐指数
2
解决办法
2万
查看次数

错误的位置imgAreaSelect插件在bootstrap模式窗口中

我在Bootstrap中遇到了imgAreaSelect插件的问题.我在初始化imgAreaSelect时设置父级以防止滚动移动区域:

 thumb.imgAreaSelect({
 handles: true,
 aspectRatio: '1:1',
 fadeSpeed: 300,
 parent: "#thumbBox"
 })
Run Code Online (Sandbox Code Playgroud)

这是我的HTML:

<div class="modal-body">
            <div class="row">
                <div class="col-xs-12" style="font-weight:bold;">
                    Upload your picture and crop it.
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <div id="thumbBox">
                        <img id="thumb" class="img-responsive" />
                    </div>
                </div>
            </div>
Run Code Online (Sandbox Code Playgroud)

当我试图选择一个区域时,ImgAreaSelect选择图片外的区域但是点(我的意思是x1,x2等)正是我想要的(功能正常但在界面中有问题).在较小的设备中,ImgAreaSelect接口是尼特,但在某些情况下它会搞砸!我曾经搜索过很多,但我找不到任何有用的东西.我该如何解决这个问题?

更新: 我解决了这个我自己...请参阅此链接: github

我们必须从代码中删除这些行:

/* Also check if any of the ancestor elements has fixed position */ 
        if ($p.css('position') == 'fixed')
           position = 'fixed';
Run Code Online (Sandbox Code Playgroud)

我们必须相对于我们自己初始化的父框(父级:"#thumbBox").

html javascript css jquery twitter-bootstrap

12
推荐指数
2
解决办法
3742
查看次数

从android发送数据到asp.net mvc

谁能告诉我一个简单的例子,用json格式从android发布数据到asp mvc web服务器?我使用它来从asp.net mvc获取数据到json格式的android:

new Thread() {

                public void run() {
                    try{

                         JsonNode userData = null;
                         ObjectMapper mapper = new ObjectMapper();
                        HttpResponse res;
                        DefaultHttpClient httpclient = new DefaultHttpClient();
                        HttpPost post = new HttpPost(URI.create("http://mylink.com/test/api"));
                        res = httpclient.execute(post);
                        userData = mapper.readValue(res.getEntity().getContent(), JsonNode.class);
                        name= (String)userData.get("name").getTextValue();

                    }catch(Exception e){
                       Log.e("activity","dead",e);


                    }
                }
            }.start();
            editStatus.setText(name);
Run Code Online (Sandbox Code Playgroud)

在asp.net中:

[HttpPost]
public ActionResult Api()
{

    return Json(new { name = "test" });
}
Run Code Online (Sandbox Code Playgroud)

它非常适合从asp.net mvc web服务器获取数据但是如何将数据从android发送到带有json格式或其他格式的asp.net mvc控制器?

asp.net-mvc android

6
推荐指数
0
解决办法
1380
查看次数

在EF 7.0中使用数据注释或流畅的api验证实体(内存中)

我无法通过内存提供程序验证和测试我的数据库.例如,我将这些属性设置为必需:

public abstract class Log
{
    #region Properties
    public Guid Id { get; set; }
    [Required]
    public string ClientIp { get; set; }
    [Required]
    public string Application { get; set; }
    [Required]
    public string Host { get; set; }
    [Required]
    public string Path { get; set; }
    [Required]
    public string Method { get; set; }
    [Required]
    public string User { get; set; }
    [Required]
    public string Date { get; set; }
    #endregion
}
Run Code Online (Sandbox Code Playgroud)

这是我的DBContext:

public class ApplicationDbContext : IdentityDbContext<ApplicationUsers, Role, …
Run Code Online (Sandbox Code Playgroud)

unit-testing mstest in-memory-database data-annotations entity-framework-core

6
推荐指数
0
解决办法
760
查看次数