我有什么:使用Android Maps API v2(本机库)的原生Android应用程序
香港和乌克兰的一切都很好.一旦我们踏入中国边境,问题就出现了.我们有下一个问题:
我对中国的了解:
问题是:
什么是没有想到的答案是"使用百度".我知道百度,这是一个veeryyy备份选项,只要他们有一个api docs in chineese.
需要补充的是,基于ditu.google.cn的Geocoding API运行良好.
期待,谢谢!
android google-maps android-maps google-maps-android-api-2 android-maps-v2
我在我的项目中使用EDM模型.
当我通过帖子请求在数据库中插入俄语单词时,我得到了 ??????
控制器:
[Authorize]
[HttpPost]
public string DescEdit(FormCollection formValues)
{
var CurrentUserPhoto = User.Identity.Name;
string x = Request.Form["id"];
Int64 id = Convert.ToInt64(x);
photos upPhotoDesc = photosRepository.GetPhotosById(id, CurrentUserPhoto);
upPhotoDesc.description = Request.Form["value"];
photosRepository.Save();
return Request.Form["value"];
}
Run Code Online (Sandbox Code Playgroud)
数据库代码:
CREATE TABLE `photos` (
`id` bigint(255) NOT NULL AUTO_INCREMENT,
`done` tinyint(1) NOT NULL DEFAULT '0',
`imgsmall` varchar(255) NOT NULL DEFAULT '',
`imgcrop` varchar(255) NOT NULL DEFAULT '',
`imgmiddle` varchar(255) NOT NULL DEFAULT '',
`imgbig` varchar(255) NOT NULL DEFAULT '',
`full_size` varchar(255) NOT …Run Code Online (Sandbox Code Playgroud) 我需要一个可以自动创建子文件夹的脚本.
例如:
我有一个基本文件夹存储在c:/upload.我转移到脚本文件夹字符串:/2011/23/12/3.脚本应解析此字符串并以c:/upload类似字符串创建文件夹和子文件夹(应该是c:/upload/2011/23/12/3)
我该怎么做?
现在我使用if/else并检查文件夹/子文件夹是否存在,但脚本太大而且很难管理.
我对EDM模型Union select有问题。我在数据库中有uniqe ID的记录。例如ID列表:1、2、3、4、5、6、7、8、9
例如,我需要选择#6记录和#6之前的2条记录以及#6之后的2条记录。选择结果应为4,5,6,7,8
我这样做:
public IQueryable<photos> GetNextPrev(Int64 photoid, string userlogin)
{
var p1 = (from m in db.photos
where m.id < photoid && m.userlogin == userlogin
orderby m.id descending
select m).Take(2).Skip(0);
var p2 = (from m in db.photos
where m.id >= photoid && m.userlogin == userlogin
orderby m.id descending
select m).Take(3).Skip(0);
return (p1.Union(p2));
}
Run Code Online (Sandbox Code Playgroud)
但是排序与示例中的不同...
谢谢您的帮助!
我有一个Ajax表单,如下所示:
@using (Ajax.BeginForm("AjaxSerchResult", "Search", new { area = string.Empty }, new AjaxOptions() { HttpMethod = "Get", UpdateTargetId = "Results", LoadingElementId = "Loading" }, new { id = "Search" })
{
//Fields go here
}
Run Code Online (Sandbox Code Playgroud)
问题是:如何用我使用AJAX发送的params更新浏览器URL?
我们将CC.NET作为持续集成环境.CC从Git获取每个提交,构建并发布到服务器.
这是配置:
<buildpublisher
<sourceDir>Path_to_dir_with_source</sourceDir>
<publishDir>path_to_deploy</publishDir>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<useLabelSubDirectory>false</useLabelSubDirectory>
<alwaysPublish>true</alwaysPublish>
</buildpublisher>
Run Code Online (Sandbox Code Playgroud)
但我们的QA engeneer希望每天早上都能获得"新鲜",而不是每天20次:)
谁知道如何用CC.NET做到这一点?
[UPDATE]
我们仍然需要构建每个提交,但是这个提交只能在一天内完成一次
我正在尝试设置Facebook Notification API.我有一个带有RealtimeUpdate()的APi控制器 - Get,将仅用于验证端点.
正如Fb Docs中所写:
首先,当您尝试添加或修改订阅时,Facebook服务器将对您的回调URL进行单个HTTP GET.查询字符串将使用以下参数附加到回调URL:
- hub.mode - 在此参数中传递字符串"subscribe"
- hub.challenge - 随机字符串
- hub.verify_token - 您在创建订阅时指定的verify_token值
从这里我有一个问题 - 我不知道如何在查询参数名称中处理这些点.我谷歌很多,并没有找到解决方案.
有人可以告诉我如何从这个中心获取数据.*值?
谢谢!
我是C#的大三学生,无法使用搜索找到解决方案
我有一个数据库模型(EDM)
我在models文件夹中创建了一个类文件:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
namespace photostorage.Models
{
public class PhotosRepository
{
private fotostorageEntities db = new fotostorageEntities();
public IEnumerable<photos> FindUserPhotos(string userid)
{
return from m in db.photos
select m;
}
public photos GetPhotosById(int photoid)
{
return db.photos.SingleOrDefault(d => d.id == photoid);
}
}
}
Run Code Online (Sandbox Code Playgroud)
接下来一个为该模型创建一个控制器:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using photostorage.Models;
namespace photostorage.Controllers
{
public class PhotosController : Controller
{
//
// GET: /Photos/
public …Run Code Online (Sandbox Code Playgroud) 今天天气真好!但是...... :)我有以下问题:我有一个控制器更新Mysql DB中的type_text字段.用户在texarea中键入文本,单击"更新",然后将文本发布到数据库.但没有休息......
在控制器中我有:
[Authorize]
[HttpPost]
public string EditComment(FormCollection formValues)
{
var Commenter = User.Identity.Name;
Int64 id = Convert.ToInt64(Request.Form["id"]);
string formValue = Request.Form["value"];
formValue = formValue.Replace("\r\n", "<br/>").Replace("\r", "<br/>");
comments updateCommnets = db.comments.SingleOrDefault(d => d.id == id && d.commenterName == Commenter);
updateCommnets.comment = formValue;
db.SaveChanges();
return formValue;
}
Run Code Online (Sandbox Code Playgroud)
它让我疯狂了2天......
有人可以帮帮我吗?非常感谢!
更新
我在我的应用程序中安装了MVCMailer.但当我发送邮件与俄罗斯charset身体我得到这样的事情:
ÏðèâåòñòâóåìÂàñíàñàéòåå
好看,不是吗?:)
有关详细信息,可以显示IUserMailer.cs:
namespace photostorage.Mailers
{
public interface IUserMailer
{
MailMessage Welcome(string userMail, string login, string password);
MailMessage PasswordReset();
}
}
Run Code Online (Sandbox Code Playgroud)
和UserMailer.cs:
public virtual MailMessage Welcome(string userMail, string login, string password)
{
var mailMessage = new MailMessage{Subject = "????? ?????????? ?? FotoStorage.org"};
mailMessage.To.Add(userMail);
ViewBag.login = login;
ViewBag.password = password;
PopulateBody(mailMessage, viewName: "Welcome");
return mailMessage;
}
Run Code Online (Sandbox Code Playgroud)
_Layout.cshtml:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
@RenderBody()
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
和Welcome.cshtml
<div>
<div><h1>???????????? ??? ?? ????? ......</h1></div>
<div>
<p>
??? ?????: @ViewBag.login …Run Code Online (Sandbox Code Playgroud) 让我们有成像模型:
public class InheritModel
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string OtherData { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我们有一个带View的控制器,代表这个模型:
private InheritModel GetAll()
{
return new InheritModel
{
Name = "name1",
Description = "decs 1",
OtherData = "other"
};
}
public ActionResult Index()
{
return View(GetAll());
}
Run Code Online (Sandbox Code Playgroud)
现在我们可以在View中编辑它,更改一些数据并发回到服务器:
[HttpPost]
public ActionResult Index(InheritModel model)
{
var merged = new MergeModel();
return View(merged.Merge(model, GetAll()));
}
Run Code Online (Sandbox Code Playgroud)
我需要做什么:
c# ×6
asp.net-mvc ×5
.net ×1
ajax ×1
android ×1
android-maps ×1
datamodel ×1
directory ×1
email ×1
facebook ×1
google-maps ×1
jquery ×1
line-breaks ×1
linq ×1
mvcmailer ×1
mysql ×1