在Nop中有一个Html扩展的类叫HtmlExtensions,主要源码:

public static class HtmlExtensions
{
#region Admin area extensions public static MvcHtmlString Hint(this HtmlHelper helper, string value)
{
// Create tag builder
var builder = new TagBuilder("img"); // Add attributes
var urlHelper = new UrlHelper(helper.ViewContext.RequestContext);
var url = MvcHtmlString.Create(urlHelper.Content("~/Administration/Content/images/ico-help.gif")).ToHtmlString(); builder.MergeAttribute("src", url);
builder.MergeAttribute("alt", value);
builder.MergeAttribute("title", value); // Render tag
return MvcHtmlString.Create(builder.ToString());
} public static HelperResult LocalizedEditor<T, TLocalizedModelLocal>(this HtmlHelper<T> helper,
string name,
Func<int, HelperResult> localizedTemplate,
Func<T, HelperResult> standardTemplate,
bool ignoreIfSeveralStores = false)
where T : ILocalizedModel<TLocalizedModelLocal>
where TLocalizedModelLocal : ILocalizedModelLocal
{
return new HelperResult(writer =>
{
var localizationSupported = helper.ViewData.Model.Locales.Count > ;
if (ignoreIfSeveralStores)
{
var storeService = EngineContext.Current.Resolve<IStoreService>();
if (storeService.GetAllStores().Count >= )
{
localizationSupported = false;
}
}
if (localizationSupported)
{
var tabStrip = new StringBuilder();
tabStrip.AppendLine(string.Format("<div id='{0}'>", name));
tabStrip.AppendLine("<ul>"); //default tab
tabStrip.AppendLine("<li class='k-state-active'>");
tabStrip.AppendLine("Standard");
tabStrip.AppendLine("</li>"); foreach (var locale in helper.ViewData.Model.Locales)
{
//languages
var language = EngineContext.Current.Resolve<ILanguageService>().GetLanguageById(locale.LanguageId); tabStrip.AppendLine("<li>");
var urlHelper = new UrlHelper(helper.ViewContext.RequestContext);
var iconUrl = urlHelper.Content("~/Content/images/flags/" + language.FlagImageFileName);
tabStrip.AppendLine(string.Format("<img class='k-image' alt='' src='{0}'>", iconUrl));
tabStrip.AppendLine(HttpUtility.HtmlEncode(language.Name));
tabStrip.AppendLine("</li>");
}
tabStrip.AppendLine("</ul>"); //default tab
tabStrip.AppendLine("<div>");
tabStrip.AppendLine(standardTemplate(helper.ViewData.Model).ToHtmlString());
tabStrip.AppendLine("</div>"); for (int i = ; i < helper.ViewData.Model.Locales.Count; i++)
{
//languages
tabStrip.AppendLine("<div>");
tabStrip.AppendLine(localizedTemplate(i).ToHtmlString());
tabStrip.AppendLine("</div>");
}
tabStrip.AppendLine("</div>");
tabStrip.AppendLine("<script>");
tabStrip.AppendLine("$(document).ready(function() {");
tabStrip.AppendLine(string.Format("$('#{0}').kendoTabStrip(", name));
tabStrip.AppendLine("{");
tabStrip.AppendLine("animation: {");
tabStrip.AppendLine("open: {");
tabStrip.AppendLine("effects: \"fadeIn\"");
tabStrip.AppendLine("}");
tabStrip.AppendLine("}");
tabStrip.AppendLine("});");
tabStrip.AppendLine("});");
tabStrip.AppendLine("</script>");
writer.Write(new MvcHtmlString(tabStrip.ToString()));
}
else
{
standardTemplate(helper.ViewData.Model).WriteTo(writer);
}
});
} public static MvcHtmlString DeleteConfirmation<T>(this HtmlHelper<T> helper, string buttonsSelector) where T : BaseNopEntityModel
{
return DeleteConfirmation(helper, "", buttonsSelector);
} public static MvcHtmlString DeleteConfirmation<T>(this HtmlHelper<T> helper, string actionName,
string buttonsSelector) where T : BaseNopEntityModel
{
if (String.IsNullOrEmpty(actionName))
actionName = "Delete"; var modalId = MvcHtmlString.Create(helper.ViewData.ModelMetadata.ModelType.Name.ToLower() + "-delete-confirmation")
.ToHtmlString(); var deleteConfirmationModel = new DeleteConfirmationModel
{
Id = helper.ViewData.Model.Id,
ControllerName = helper.ViewContext.RouteData.GetRequiredString("controller"),
ActionName = actionName,
WindowId = modalId
}; var window = new StringBuilder();
window.AppendLine(string.Format("<div id='{0}' style='display:none;'>", modalId));
window.AppendLine(helper.Partial("Delete", deleteConfirmationModel).ToHtmlString());
window.AppendLine("</div>");
window.AppendLine("<script>");
window.AppendLine("$(document).ready(function() {");
window.AppendLine(string.Format("$('#{0}').click(function (e) ", buttonsSelector));
window.AppendLine("{");
window.AppendLine("e.preventDefault();");
window.AppendLine(string.Format("var window = $('#{0}');", modalId));
window.AppendLine("if (!window.data('kendoWindow')) {");
window.AppendLine("window.kendoWindow({");
window.AppendLine("modal: true,");
window.AppendLine(string.Format("title: '{0}',", EngineContext.Current.Resolve<ILocalizationService>().GetResource("Admin.Common.AreYouSure")));
window.AppendLine("actions: ['Close']");
window.AppendLine("});");
window.AppendLine("}");
window.AppendLine("window.data('kendoWindow').center().open();");
window.AppendLine("});");
window.AppendLine("});");
window.AppendLine("</script>"); return MvcHtmlString.Create(window.ToString());
} public static MvcHtmlString NopLabelFor<TModel, TValue>(this HtmlHelper<TModel> helper, Expression<Func<TModel, TValue>> expression, bool displayHint = true)
{
var result = new StringBuilder();
var metadata = ModelMetadata.FromLambdaExpression(expression, helper.ViewData);
var hintResource = string.Empty;
object value;
if (metadata.AdditionalValues.TryGetValue("NopResourceDisplayName", out value))
{
var resourceDisplayName = value as NopResourceDisplayName;
if (resourceDisplayName != null && displayHint)
{
var langId = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Id;
hintResource = EngineContext.Current.Resolve<ILocalizationService>()
.GetResource(resourceDisplayName.ResourceKey + ".Hint", langId); result.Append(helper.Hint(hintResource).ToHtmlString());
}
}
result.Append(helper.LabelFor(expression, new { title = hintResource }));
return MvcHtmlString.Create(result.ToString());
} public static MvcHtmlString OverrideStoreCheckboxFor<TModel, TValue>(this HtmlHelper<TModel> helper,
Expression<Func<TModel, bool>> expression,
Expression<Func<TModel, TValue>> forInputExpression,
int activeStoreScopeConfiguration)
{
var dataInputIds = new List<string>();
dataInputIds.Add(helper.FieldIdFor(forInputExpression));
return OverrideStoreCheckboxFor(helper, expression, activeStoreScopeConfiguration, null, dataInputIds.ToArray());
}
public static MvcHtmlString OverrideStoreCheckboxFor<TModel, TValue1, TValue2>(this HtmlHelper<TModel> helper,
Expression<Func<TModel, bool>> expression,
Expression<Func<TModel, TValue1>> forInputExpression1,
Expression<Func<TModel, TValue2>> forInputExpression2,
int activeStoreScopeConfiguration)
{
var dataInputIds = new List<string>();
dataInputIds.Add(helper.FieldIdFor(forInputExpression1));
dataInputIds.Add(helper.FieldIdFor(forInputExpression2));
return OverrideStoreCheckboxFor(helper, expression, activeStoreScopeConfiguration, null, dataInputIds.ToArray());
}
public static MvcHtmlString OverrideStoreCheckboxFor<TModel, TValue1, TValue2, TValue3>(this HtmlHelper<TModel> helper,
Expression<Func<TModel, bool>> expression,
Expression<Func<TModel, TValue1>> forInputExpression1,
Expression<Func<TModel, TValue2>> forInputExpression2,
Expression<Func<TModel, TValue3>> forInputExpression3,
int activeStoreScopeConfiguration)
{
var dataInputIds = new List<string>();
dataInputIds.Add(helper.FieldIdFor(forInputExpression1));
dataInputIds.Add(helper.FieldIdFor(forInputExpression2));
dataInputIds.Add(helper.FieldIdFor(forInputExpression3));
return OverrideStoreCheckboxFor(helper, expression, activeStoreScopeConfiguration, null, dataInputIds.ToArray());
}
public static MvcHtmlString OverrideStoreCheckboxFor<TModel>(this HtmlHelper<TModel> helper,
Expression<Func<TModel, bool>> expression,
string parentContainer,
int activeStoreScopeConfiguration)
{
return OverrideStoreCheckboxFor(helper, expression, activeStoreScopeConfiguration, parentContainer);
}
private static MvcHtmlString OverrideStoreCheckboxFor<TModel>(this HtmlHelper<TModel> helper,
Expression<Func<TModel, bool>> expression,
int activeStoreScopeConfiguration,
string parentContainer = null,
params string[] datainputIds)
{
if (String.IsNullOrEmpty(parentContainer) && datainputIds == null)
throw new ArgumentException("Specify at least one selector"); var result = new StringBuilder();
if (activeStoreScopeConfiguration > )
{
//render only when a certain store is chosen
const string cssClass = "multi-store-override-option";
string dataInputSelector = "";
if (!String.IsNullOrEmpty(parentContainer))
{
dataInputSelector = "#" + parentContainer + " input, #" + parentContainer + " textarea, #" + parentContainer + " select";
}
if (datainputIds != null && datainputIds.Length > )
{
dataInputSelector = "#" + String.Join(", #", datainputIds);
}
var onClick = string.Format("checkOverriddenStoreValue(this, '{0}')", dataInputSelector);
result.Append(helper.CheckBoxFor(expression, new Dictionary<string, object>
{
{ "class", cssClass },
{ "onclick", onClick },
{ "data-for-input-selector", dataInputSelector },
}));
}
return MvcHtmlString.Create(result.ToString());
} /// <summary>
/// Render CSS styles of selected index
/// </summary>
/// <param name="helper">HTML helper</param>
/// <param name="currentIndex">Current tab index (where appropriate CSS style should be rendred)</param>
/// <param name="indexToSelect">Tab index to select</param>
/// <returns>MvcHtmlString</returns>
public static MvcHtmlString RenderSelectedTabIndex(this HtmlHelper helper, int currentIndex, int indexToSelect)
{
if (helper == null)
throw new ArgumentNullException("helper"); //ensure it's not negative
if (indexToSelect < )
indexToSelect = ; //required validation
if (indexToSelect == currentIndex)
{
return new MvcHtmlString(" class='k-state-active'");
} return new MvcHtmlString("");
} #endregion #region Common extensions public static MvcHtmlString RequiredHint(this HtmlHelper helper, string additionalText = null)
{
// Create tag builder
var builder = new TagBuilder("span");
builder.AddCssClass("required");
var innerText = "*";
//add additional text if specified
if (!String.IsNullOrEmpty(additionalText))
innerText += " " + additionalText;
builder.SetInnerText(innerText);
// Render tag
return MvcHtmlString.Create(builder.ToString());
} public static string FieldNameFor<T, TResult>(this HtmlHelper<T> html, Expression<Func<T, TResult>> expression)
{
return html.ViewData.TemplateInfo.GetFullHtmlFieldName(ExpressionHelper.GetExpressionText(expression));
}
public static string FieldIdFor<T, TResult>(this HtmlHelper<T> html, Expression<Func<T, TResult>> expression)
{
var id = html.ViewData.TemplateInfo.GetFullHtmlFieldId(ExpressionHelper.GetExpressionText(expression));
// because "[" and "]" aren't replaced with "_" in GetFullHtmlFieldId
return id.Replace('[', '_').Replace(']', '_');
} /// <summary>
/// Creates a days, months, years drop down list using an HTML select control.
/// The parameters represent the value of the "name" attribute on the select control.
/// </summary>
/// <param name="html">HTML helper</param>
/// <param name="dayName">"Name" attribute of the day drop down list.</param>
/// <param name="monthName">"Name" attribute of the month drop down list.</param>
/// <param name="yearName">"Name" attribute of the year drop down list.</param>
/// <param name="beginYear">Begin year</param>
/// <param name="endYear">End year</param>
/// <param name="selectedDay">Selected day</param>
/// <param name="selectedMonth">Selected month</param>
/// <param name="selectedYear">Selected year</param>
/// <param name="localizeLabels">Localize labels</param>
/// <returns></returns>
public static MvcHtmlString DatePickerDropDowns(this HtmlHelper html,
string dayName, string monthName, string yearName,
int? beginYear = null, int? endYear = null,
int? selectedDay = null, int? selectedMonth = null, int? selectedYear = null, bool localizeLabels = true)
{
var daysList = new TagBuilder("select");
var monthsList = new TagBuilder("select");
var yearsList = new TagBuilder("select"); daysList.Attributes.Add("name", dayName);
monthsList.Attributes.Add("name", monthName);
yearsList.Attributes.Add("name", yearName); var days = new StringBuilder();
var months = new StringBuilder();
var years = new StringBuilder(); string dayLocale, monthLocale, yearLocale;
if (localizeLabels)
{
var locService = EngineContext.Current.Resolve<ILocalizationService>();
dayLocale = locService.GetResource("Common.Day");
monthLocale = locService.GetResource("Common.Month");
yearLocale = locService.GetResource("Common.Year");
}
else
{
dayLocale = "Day";
monthLocale = "Month";
yearLocale = "Year";
} days.AppendFormat("<option value='{0}'>{1}</option>", "", dayLocale);
for (int i = ; i <= ; i++)
days.AppendFormat("<option value='{0}'{1}>{0}</option>", i,
(selectedDay.HasValue && selectedDay.Value == i) ? " selected=\"selected\"" : null); months.AppendFormat("<option value='{0}'>{1}</option>", "", monthLocale);
for (int i = ; i <= ; i++)
{
months.AppendFormat("<option value='{0}'{1}>{2}</option>",
i,
(selectedMonth.HasValue && selectedMonth.Value == i) ? " selected=\"selected\"" : null,
CultureInfo.CurrentUICulture.DateTimeFormat.GetMonthName(i));
} years.AppendFormat("<option value='{0}'>{1}</option>", "", yearLocale); if (beginYear == null)
beginYear = DateTime.UtcNow.Year - ;
if (endYear == null)
endYear = DateTime.UtcNow.Year; if (endYear > beginYear)
{
for (int i = beginYear.Value; i <= endYear.Value; i++)
years.AppendFormat("<option value='{0}'{1}>{0}</option>", i,
(selectedYear.HasValue && selectedYear.Value == i) ? " selected=\"selected\"" : null);
}
else
{
for (int i = beginYear.Value; i >= endYear.Value; i--)
years.AppendFormat("<option value='{0}'{1}>{0}</option>", i,
(selectedYear.HasValue && selectedYear.Value == i) ? " selected=\"selected\"" : null);
} daysList.InnerHtml = days.ToString();
monthsList.InnerHtml = months.ToString();
yearsList.InnerHtml = years.ToString(); return MvcHtmlString.Create(string.Concat(daysList, monthsList, yearsList));
} public static MvcHtmlString Widget(this HtmlHelper helper, string widgetZone, object additionalData = null)
{
return helper.Action("WidgetsByZone", "Widget", new { widgetZone = widgetZone, additionalData = additionalData });
} /// <summary>
/// Renders the standard label with a specified suffix added to label text
/// </summary>
/// <typeparam name="TModel">Model</typeparam>
/// <typeparam name="TValue">Value</typeparam>
/// <param name="html">HTML helper</param>
/// <param name="expression">Expression</param>
/// <param name="htmlAttributes">HTML attributes</param>
/// <param name="suffix">Suffix</param>
/// <returns>Label</returns>
public static MvcHtmlString LabelFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, object htmlAttributes, string suffix)
{
string htmlFieldName = ExpressionHelper.GetExpressionText(expression);
var metadata = ModelMetadata.FromLambdaExpression(expression, html.ViewData);
string resolvedLabelText = metadata.DisplayName ?? (metadata.PropertyName ?? htmlFieldName.Split(new [] { '.' }).Last());
if (string.IsNullOrEmpty(resolvedLabelText))
{
return MvcHtmlString.Empty;
}
var tag = new TagBuilder("label");
tag.Attributes.Add("for", TagBuilder.CreateSanitizedId(html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldId(htmlFieldName)));
if (!String.IsNullOrEmpty(suffix))
{
resolvedLabelText = String.Concat(resolvedLabelText, suffix);
}
tag.SetInnerText(resolvedLabelText); var dictionary = ((IDictionary<string, object>)HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes));
tag.MergeAttributes(dictionary, true); return MvcHtmlString.Create(tag.ToString(TagRenderMode.Normal));
} #endregion
}

主要是看Widget这个扩展方法

 public static MvcHtmlString Widget(this HtmlHelper helper, string widgetZone, object additionalData = null)
{
return helper.Action("WidgetsByZone", "Widget", new { widgetZone = widgetZone, additionalData = additionalData });
}

添加这个类后,就可以在cshtml页面中直接@Html.Widget了

看Widget实现,还是调用的Action方法,第一个参数action名字,第二参数Controller

找到WidgetController下面的WidgetsByZone方法

[ChildActionOnly]
public ActionResult WidgetsByZone(string widgetZone, object additionalData = null)
{
var cacheKey = string.Format(ModelCacheEventConsumer.WIDGET_MODEL_KEY, _storeContext.CurrentStore.Id, widgetZone);
var cacheModel = _cacheManager.Get(cacheKey, () =>
{
//model
var model = new List<RenderWidgetModel>(); var widgets = _widgetService.LoadActiveWidgetsByWidgetZone(widgetZone, _storeContext.CurrentStore.Id);
foreach (var widget in widgets)
{
var widgetModel = new RenderWidgetModel(); string actionName;
string controllerName;
RouteValueDictionary routeValues;
widget.GetDisplayWidgetRoute(widgetZone, out actionName, out controllerName, out routeValues);
widgetModel.ActionName = actionName;
widgetModel.ControllerName = controllerName;
widgetModel.RouteValues = routeValues; model.Add(widgetModel);
}
return model;
}); //no data?
if (cacheModel.Count == )
return Content(""); //"RouteValues" property of widget models depends on "additionalData".
//We need to clone the cached model before modifications (the updated one should not be cached)
var clonedModel = new List<RenderWidgetModel>();
foreach (var widgetModel in cacheModel)
{
var clonedWidgetModel = new RenderWidgetModel();
clonedWidgetModel.ActionName = widgetModel.ActionName;
clonedWidgetModel.ControllerName = widgetModel.ControllerName;
if (widgetModel.RouteValues != null)
clonedWidgetModel.RouteValues = new RouteValueDictionary(widgetModel.RouteValues); if (additionalData != null)
{
if (clonedWidgetModel.RouteValues == null)
clonedWidgetModel.RouteValues = new RouteValueDictionary();
clonedWidgetModel.RouteValues.Add("additionalData", additionalData);
} clonedModel.Add(clonedWidgetModel);
} return PartialView(clonedModel);
}
[ChildActionOnly]
Child action 和 Patial view 类似,也是在应用程序的不同地方可以重复利用相同的子内容。不同的是,它是通过调用 controller 中的 action 方法来呈现子内容的,并且一般包含了业务的处理。任何 action 都可以作为子 action 。接下来介绍如何使用它。详细信息请见 http://www.cnblogs.com/willick/archive/2013/11/14/3410855.html
 var widgets = _widgetService.LoadActiveWidgetsByWidgetZone(widgetZone, _storeContext.CurrentStore.Id);

这个WidgetByZone就是查找当前已使用的@Html.Widget(“xxx”)并返回相应的控制器名字,方法名和路由值


打开试图Widget\WidgetsByZone.cshtml

@model List<RenderWidgetModel>
@using Nop.Web.Models.Cms;
@foreach (var widget in Model)
{
@Html.Action(widget.ActionName, widget.ControllerName, widget.RouteValues)
}

这个视图的目的就是循环输出html,具体输出的内容在插件里面实现的,比如插件Nop.Plugin.Widgets.NivoSlider里面有个NivoSliderPlugin,这类插件必须继承自BasePlugin,和IWidgetPlugin,里面的方法GetDisplayWidgetRoute就是用于返回显示这个插件内容的action的信息,WidgetsNivoSliderController.cs里面的public ActionResult PublicInfo(string widgetZone)就是这个插件具体输出的内容,大体流程就是这样了。

												

NopCommerce Html扩展方法Html.Widget的更多相关文章

  1. mvc给html扩展方法:

    mvc给html扩展方法: 注意:扩展方法和所在的类都必须是 public static如果在页面直接使用新扩展的方法,需要web.config里把Web.Helper名称命名空间加上,页面才能访问到 ...

  2. jQuery中的自定义插件之----工厂方法(Factory Widget)

    jQuery赋予了我们很强大的插件自定义的功能,可以作为我们的武器库,应用到所有的网页中,使用的语法比较有意思,下面是对它的一些探讨. 遵循以下的原则: 1 IIFE 创建一个jQuery的scope ...

  3. Yii实战中8个必备常用的扩展,模块和widget

    Yii实战中8个必备常用的扩展,模块和widget 在经过畅K网 的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明. ...

  4. 通过扩展jQuery UI Widget Factory实现手动调整Accordion高度

    □ 实现Accordion高度一致 <head> <meta name="viewport" content="width=device-width&q ...

  5. .NET Core中间件的注册和管道的构建(3) ---- 使用Map/MapWhen扩展方法

    .NET Core中间件的注册和管道的构建(3) ---- 使用Map/MapWhen扩展方法 0x00 为什么需要Map(MapWhen)扩展 如果业务逻辑比较简单的话,一条主管道就够了,确实用不到 ...

  6. .NET Core中间件的注册和管道的构建(2)---- 用UseMiddleware扩展方法注册中间件类

    .NET Core中间件的注册和管道的构建(2)---- 用UseMiddleware扩展方法注册中间件类 0x00 为什么要引入扩展方法 有的中间件功能比较简单,有的则比较复杂,并且依赖其它组件.除 ...

  7. 为IEnumerable<T>添加RemoveAll<IEnumerable<T>>扩展方法--高性能篇

    最近写代码,遇到一个问题,微软基于List<T>自带的方法是public bool Remove(T item);,可是有时候我们可能会用到诸如RemoveAll<IEnumerab ...

  8. C#的扩展方法解析

    在使用面向对象的语言进行项目开发的过程中,较多的会使用到“继承”的特性,但是并非所有的场景都适合使用“继承”特性,在设计模式的一些基本原则中也有较多的提到. 继承的有关特性的使用所带来的问题:对象的继 ...

  9. 扩展方法(C#)

    扩展方法使你能够向现有类型“添加”方法,而无需创建新的派生类型.重新编译或以其他方式修改原始类型.扩展方法是一种特殊的静态方法,但可以像扩展类型上的实例方法一样进行调用. 下面的示例为String添加 ...

随机推荐

  1. VS中使用QT调用R脚本

    一开始想直接把R编译成库然后调用R,后来查了n多资料,发现VS中是无法办到的,官方也给出了一句话,大概意思就是没可能在VS中使用R提供的C++接口,大概是涉及到了底层的ABI的原因,具体也不太清楚. ...

  2. vmware ubuntu14.04虚拟机不能正常拷贝文件到windows且不能自适应虚拟机屏幕窗口自动变化的解决办法

    纠结于这个问题了半天.一直重复安装不同版本的vmare-tools, 一直没有任何效果.进入到/usr/bin/ 目录使用ll vm* 查看,发现和别的不同的是没有vmware-toolbox-cmd ...

  3. 见过的最好AWK手册

    原文: http://linuxfire.com.cn/~lily/awk.html 简体中文版由bones7456 (http://li2z.cn)整理. 原文:应该是 http://phi.sin ...

  4. ubuntu下修改时区

    使用一个虚拟机服务,其时区设置的为格林兰标准时区,我北京时区在东八区,较其快八个小时. 修改时区需要执行 tzselect 一步步选择下来,注意确认后的information Therefore TZ ...

  5. poj 1517 u Calculate e

    u Calculate e Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19465   Accepted: 11362   ...

  6. JQuery中的AJAX参数详细介绍

    Jquery中AJAX参数详细介绍 参数名 类型 描述 url String    (默认: 当前页地址) 发送请求的地址. type String (默认: "GET") 请求方 ...

  7. ext4.0绘制chart(柱状图,条形图)

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"% ...

  8. matlab和FPGA中无符号数和有符号数的转化(转)

    在FPGA 设计过程中经常会遇到关于数表示之间的转化问题,最常见的是无符号数和有符号数之间的转化问题.(1)在FPGA设计过程中,能够很直接的看出数字的位宽,但经常以无符号数的形式输出,在后继的处理中 ...

  9. Unity3D之移植学习笔记:移植到Android平台更好的方法

    接上文,之前我们采用了直接将Unity项目导出为Eclipse项目来修改的方式,这种做法存在的一个最大的问题就是:每当Unity被修改之后,都需要重新导出,而每次导出的项目在Android平台方面的J ...

  10. BaiduMap开发,获取公交站点信息。

    可能有些人会出现无法导入overlayutil的错误,这是因为BaiduMap里面的包把这部分删除掉了,并且官方没有给出说明,这个地方以前也是让我折腾了很久. 不知道现在有没有说明这个问题,如果需要这 ...