我知道很多人都非常喜欢ASP.NET MVC 2在第一版中所做的改进.我刚刚开始迁移我们的MVC 1项目,到目前为止,已经完全清理了我们在大规模应用程序中的子文件夹混乱.当我深入了解所有改进和变化时,我仍然一直在想,如果他们在这个版本中有x,那将会很好.例如,如果他们内置了某种依赖注入而不必使用第三方解决方案,我会喜欢它.
我真正的问题是,现在ASP.NET MVC 2已经出现了,希望/希望团队实现了哪些功能,并希望它们能够实现ASP.NET MVC 3?
编辑
看起来像ASP.NET MVC 3的第一个预览版内置了依赖注入!我喜欢到目前为止添加的功能.ASP.NET 3预览一个就出来了!
我有一个工作区,有一堆java项目.如果我去File->Refresh,它并没有真正刷新任何东西(也许是当前选定的项目).如何让eclipse刷新所有项目?
这个问题主要是学术问题.我出于好奇而不是因为这给我带来了实际问题.
考虑以下不正确的C程序.
#include <signal.h>
#include <stdio.h>
static int running = 1;
void handler(int u) {
running = 0;
}
int main() {
signal(SIGTERM, handler);
while (running)
;
printf("Bye!\n");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
此程序不正确,因为处理程序中断了程序流,因此running可以随时修改,因此应该声明volatile.但是,让我们说程序员忘记了这一点.
gcc 4.3.3,带有-O3标志,将循环体(在对running标志进行一次初始检查后)编译为无限循环
.L7:
jmp .L7
Run Code Online (Sandbox Code Playgroud)
这是可以预料的.
现在我们在while循环中放入一些微不足道的东西,比如:
while (running)
putchar('.');
Run Code Online (Sandbox Code Playgroud)
突然间,gcc不再优化循环条件了!循环体的组件现在看起来像这样(再次-O3):
.L7:
movq stdout(%rip), %rsi
movl $46, %edi
call _IO_putc
movl running(%rip), %eax
testl %eax, %eax
jne .L7
Run Code Online (Sandbox Code Playgroud)
我们看到running每次循环都会从内存中重新加载; 它甚至没有缓存在寄存器中.显然gcc现在认为价值running可能会发生变化.
那么为什么gcc突然决定需要重新检查running …
有没有办法在由textarea标签或类似的东西定义的区域中实现自动完成功能?
我目前正在使用jQuery自动完成插件来向用户内部input标记建议输入,但问题是自动完成短语通常可能相当长,因此滚动input字段的边缘.
所以我们有很多从出口中产生的例程.我们经常需要在CLI中进行这些操作,进行更改并将其重新导入.是的,其中一些由不同的人管理,需要更好的更改控制,但目前情况就是如此.
如果我做:
mysqldump --routines --no-create-info --no-data --no-create-db
Run Code Online (Sandbox Code Playgroud)
那很棒,我有200个功能.我需要通过一个文件找到我想要的那个或一组.
有没有我想要的mysqldump例程,就像表格一样?
我正在使用带有jQuery的$ .blockUI来显示模态对话.HTML看起来像:
<div id="progressDialogue" class="mp_modalpopup">
<div class="mp_container">
<div class="mp_header">
<span id="pd_header_text" class="mp_msg">Please wait..</span>
</div>
<div class="mp_body">
<img src="ajax-loader.gif" style="text-align:center" alt="loading" />
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS看起来像:
.mp_modalpopup
{
font-family: arial,helvetica,clean,sans-serif;
font-size: small;
padding: 2px 3px;
bottom: 50%;
right: 50%;
position: absolute;
width: 400px;
z-index:999;
}
.mp_container
{
width: 400px;
border: solid 1px #808080;
border-width: 1px 1px;
left: 50%;
position: relative;
top: 50%;
}
/* removed mp_header, mp_body, mp_msg CSS for brevity */
Run Code Online (Sandbox Code Playgroud)
这将很高兴地在其他HTML之上呈现页面中心.
但是,如果我display:none在.mp_modalpopupCSS类中设置然后使用$ .blockUI使其可见,则在IE 8中,对话框会自动垂直对齐,但在页面左侧对齐一半对话框,在Google Chrome和Firefox中对话框不可见all(但是blockUI正在运行,因为页面灰显). …
从Java,我将可执行文件提取到使用File.createTempFile()指定的位置.当我尝试运行我的可执行文件时,我的程序在尝试读取第一行输出时挂起.
我发现如果我尝试从另一个程序运行相同的提取可执行文件,如果我将目录指定为C:\ Documents and Settings\username\Local Settings\Temp\prog.exe,它就可以工作.但是,如果我将目录指定为C:\ DOCUME~1\USERNA~1\LOCALS~1\Temp\prog.exe,我就会挂起.
有没有办法解开我的程序中的波浪号文件名,以便我可以指定一个可以工作的目录名?
(因为我总是喜欢解决语言和API设计问题,Java File.createTempFile()和java.io.tmpdir有没有必要评估错误的文件名?)
出于某种原因,我无法隐藏WPF Toolkit的DataGridColumn.我正在尝试执行以下操作:
<dg:DataGridTemplateColumn Header="Item Description" Visibility="{Binding IsReadOnly}">
<dg:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=ItemDescription}" />
</DataTemplate>
</dg:DataGridTemplateColumn.CellTemplate>
Run Code Online (Sandbox Code Playgroud)
这不起作用,因为它在ItemSource上寻找IsReadOnly属性(不是当前类的属性).如果将其添加为实现INoifyPropertyChanged的ItemSource类的属性,则它仍然不会隐藏该列.有没有解决的办法?当按钮单击更改IsReadOnly属性时,我希望列隐藏.
假设IsReadOnly返回Visibility值并且是依赖项属性
我完全陷入困境,我真的很感激帮助!非常感谢!
我将首先告诉我的项目设置:
我在这里创建了一个bootstrapper类:
Imports StructureMap
Imports DCS.Data
Imports DCS.Services
Public Class BootStrapper
Public Shared Sub ConfigureStructureMap()
ObjectFactory.Initialize(AddressOf StructureMapRegistry)
End Sub
Private Shared Sub StructureMapRegistry(ByVal x As IInitializationExpression)
x.AddRegistry(New MainRegistry())
x.AddRegistry(New DataRegistry())
x.AddRegistry(New ServiceRegistry())
x.Scan(AddressOf StructureMapScanner)
End Sub
Private Shared Sub StructureMapScanner(ByVal scanner As StructureMap.Graph.IAssemblyScanner)
scanner.Assembly("DCS")
scanner.Assembly("DCS.Data")
scanner.Assembly("DCS.Services")
scanner.WithDefaultConventions()
End Sub
End Class
Run Code Online (Sandbox Code Playgroud)
我在这里创建了一个控制器工厂:
Imports System.Web.Mvc
Imports StructureMap
Public Class StructureMapControllerFactory
Inherits DefaultControllerFactory
Protected Overrides Function GetControllerInstance(ByVal controllerType As System.Type) As System.Web.Mvc.IController
Return ObjectFactory.GetInstance(controllerType)
End Function …Run Code Online (Sandbox Code Playgroud) 我试图从Ruby中的一组数组中获取一个公共元素.通常,您可以使用 &运算符来比较两个数组,这两个数组返回两个数组中存在或共同的元素.这一切都很好,除非您尝试从两个以上的数组中获取常用元素.但是,我希望从未知的动态数量的数组中获取常见元素,这些数组存储在散列中.
我不得不求助于在ruby中使用eval()方法,它将字符串作为实际代码执行.这是我写的函数:
def get_common_elements_for_hash_of_arrays(hash) # get an array of common elements contained in a hash of arrays, for every array in the hash.
# ["1","2","3"] & ["2","4","5"] & ["2","5","6"] # => ["2"]
# eval("[\"1\",\"2\",\"3\"] & [\"2\",\"4\",\"5\"] & [\"2\",\"5\",\"6\"]") # => ["2"]
eval_string_array = Array.new # an array to store strings of Arrays, ie: "[\"2\",\"5\",\"6\"]", which we will join with & to get all common elements
hash.each do |key, array|
eval_string_array << array.inspect …Run Code Online (Sandbox Code Playgroud) asp.net-mvc ×2
jquery ×2
autocomplete ×1
binding ×1
blockui ×1
c ×1
caching ×1
css ×1
datacontext ×1
eclipse ×1
filenames ×1
gcc ×1
java ×1
linq-to-sql ×1
mysql ×1
mysqldump ×1
optimization ×1
refresh ×1
ruby ×1
structuremap ×1
textarea ×1
volatile ×1
windows ×1
workspace ×1
wpf ×1
wpfdatagrid ×1