我已经创建了一个类(下面的代码)来处理在测试中创建"匹配"测验项,这是输出:

它工作正常.
然而,为了得到它完全随机的,我必须把线程睡眠至少300个计数两列随机洗牌,一切皆有之间低于300个回报以同样的顺序进行排序两根柱子,就好像它是使用随机的相同种子:
LeftDisplayIndexes.Shuffle();
Thread.Sleep(300);
RightDisplayIndexes.Shuffle();
Run Code Online (Sandbox Code Playgroud)
我有什么做的,使两列完全随机没有这个时间的洗牌等待?
完整代码:
using System.Collections.Generic;
using System;
using System.Threading;
namespace TestSort727272
{
class Program
{
static void Main(string[] args)
{
MatchingItems matchingItems = new MatchingItems();
matchingItems.Add("one", "111");
matchingItems.Add("two", "222");
matchingItems.Add("three", "333");
matchingItems.Add("four", "444");
matchingItems.Setup();
matchingItems.DisplayTest();
matchingItems.DisplayAnswers();
Console.ReadLine();
}
}
public class MatchingItems
{
public List<MatchingItem> Collection { get; set; }
public List<int> LeftDisplayIndexes { get; set; }
public List<int> RightDisplayIndexes { get; set; }
private char[] _numbers = { '1', '2', …Run Code Online (Sandbox Code Playgroud) 随着时间的推移,Log Navigator中累积了许多过去的日志条目(用于构建或调试会话).如何删除这些条目?
我有HAML TextMate包并且在:javascript块中,我想要正确的javascript语法突出显示.我怎么能修改HAML包来做到这一点?
我正在尝试将当前路径导入我的导航控制器,以便在填充导航菜单数据时运行比较.
我的链接对象是这样的:
public class StreamNavLinks
{
public string Text { get; set; }
public RouteValueDictionary RouteValues { get; set; }
public bool IsSelected { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
在母版页中,我试图将当前路径传递给导航控制器,如下所示:
<% Html.RenderAction(
"MenuOfStreamEntries", // action
"Nav", // controller
new { // parameters for action
currentStreamUrl = "Blog",
currentRoute = ViewContext.RouteData } // get route data to compare in controller
); %>
Run Code Online (Sandbox Code Playgroud)
我遇到的问题是我无法弄清楚如何获取任何数据currentRoute.获取价值的最佳方法是什么currentRoute?
我试过这样的语法:
currentRoute.Values.routevaluename
Run Code Online (Sandbox Code Playgroud)
和
currentRoute.Values[0]
Run Code Online (Sandbox Code Playgroud)
但我似乎无法让它发挥作用.
我也尝试将此代码放入导航控制器的操作中:
var current = RouteData["streamUrl"];
Run Code Online (Sandbox Code Playgroud)
和
var current = …Run Code Online (Sandbox Code Playgroud) 我正在使用List.ElementAt(0)和List.ElementAt(1)来获取我需要的元素.我怎么不想硬编码0和1是否有任何其他方式在C#
我有一个基于TCPListener的服务器应用程序,它侦听单个特定端口上的客户端.客户端连接,发送一些xml,将一些xml作为响应返回,然后断开连接.
是否可以在不对客户端进行任何更改的情况下将基于TCPListener的应用程序替换为WCF服务?如果是这样,任何人都可以建议资源,这将有助于我构建这样的服务?
在Mercurial中,可以通过以下方式hg status仅修改/添加/删除文件:
hg st -m
hg st -a
hg st -r
Run Code Online (Sandbox Code Playgroud)
是否可以获得diff命令的相同行为?从手册页看来,似乎没有.
如果你还没有看到当前的谷歌涂鸦,你应该看看它.基本上,它是从鼠标飞出的一堆球.
谷歌涂鸦http://i.dailymail.co.uk/i/pix/2010/09/07/article-0-0B119C68000005DC-835_468x286.jpg
它在IE中与其他浏览器的编码方式不同.在IE中,它完成了.字符,而其他浏览器使用border-radius.
我在页面中找到了源代码(包括下面的完整性,美化后),但我想知道谷歌是否已将他们未压缩的源代码放在Google代码或公共存储库中.
有人知道我在哪里可以找到这个页面上使用的Javascript的人类可读副本吗?
(function () {
try {
if (!google.doodle) google.doodle = {};
var a = 200,
g = -200,
j = -200,
k, l, m, n = 0,
o = 0,
p = 0,
q = 35,
r, s = [],
t, u, v;
google.doodle.init = function () {
if (!v && window.location.href.indexOf("#") == -1) {
v = true;
if (t = document.getElementById("hplogo")) {
google.j && google.j.en && w(100, …Run Code Online (Sandbox Code Playgroud) 嘿,有一个类似jslint的检查器会在与旧版本的IE不兼容的调用上进行标记吗?或者只是跨浏览器不兼容的通话?