小编Tim*_*ren的帖子

强类型数据集的动态连接字符串

我有一个asp.net nTier应用程序.数据访问层是一个强类型的DataSet,由多个DataTable和DataAdapter组成.当用户登录时,他们选择要连接的数据库(来自成员资格数据库中的表).我需要将选定的连接字符串传递给DataSet对象,该对象对于这些用户保持不变,直到他们再次登录.

我想答案可能是创建一个DataSet对象的部分类,我可以将连接字符串传递给构造函数.我不知道怎么回事.

干杯

asp.net string connection dynamic dataset

6
推荐指数
1
解决办法
2491
查看次数

来自Census.gov的2008 TIGER /Line®Shape文件 - > Google地图

如何绘制shapefile并提取lat/lng coords,以便在Google Maps上绘制多边形?

http://www2.census.gov/cgi-bin/shapefiles/national-files

我在这里问这个问题:

http://groups.google.com/group/Google-Maps-API/browse_thread/thread/18763b4b0cb996c7

他们告诉我该怎么做,但不是如何做到这一点= P.

谢谢!

google-maps shapefile tiger-lines

5
推荐指数
1
解决办法
1043
查看次数

我们可以让UAC提示只显示一次吗?

有没有办法让应用程序在首次运行时只向用户显示一次UAC提示.此后,没有进一步的提示.

换句话说,我知道我们的应用程序需要用户的UAC权限才能执行某些操作.那没关系.但是我们不希望它在每次运行时都要继续询问.用户是否可以一直授予我们的应用程序权限?或者我所问的是否违反了UAC的基本原则?

我们正在使用.NET和Windows 7

.net uac windows-7

5
推荐指数
2
解决办法
3104
查看次数

相机翻转问题

我正在使用XNA3.1引擎在C#中编写游戏.然而,我的相机问题很小,基本上我的相机在其转动时旋转超过180度时会"翻转"(当相机达到180度时,它似乎会翻转回0度).获取视图矩阵的代码如下:

Globals.g_GameProcessingInfo.camera.viewMat = Matrix.CreateLookAt(Globals.g_GameProcessingInfo.camera.target.pos, Globals.g_GameProcessingInfo.camera.LookAt, up);                //Calculate the view matrix
Run Code Online (Sandbox Code Playgroud)

所述Globals.g_GameProcessingInfo.camera.LookAt可变位置1单元直接在相机,相对于摄像机的转动的前面,而"向上"是用下面的函数得到的变量:

static Vector3 GetUp()      //Get the up Vector of the camera
{
    Vector3 up = Vector3.Zero;
    Quaternion quat = Quaternion.Identity;
    Quaternion.CreateFromYawPitchRoll(Globals.g_GameProcessingInfo.camera.target.rot.Y, Globals.g_GameProcessingInfo.camera.target.rot.X, Globals.g_GameProcessingInfo.camera.target.rot.Z, out quat);

    up.X = 2 * quat.X * quat.Y - 2 * quat.W * quat.Z;       //Set the up x-value based on the orientation of the camera
    up.Y = 1 - 2 * quat.X * quat.Z - 2 * quat.Z * quat.Z;   //Set the up y-value …
Run Code Online (Sandbox Code Playgroud)

c# xna

5
推荐指数
1
解决办法
1590
查看次数

IE中的ASP.NET页在其他程序中时会成为焦点

我有一个很漂亮的问题!

我创建了一个带有updatepanel和该updatepanel上的触发器的ASP.NET页。触发器每30秒更新一次面板。

问题在于,当触发器更新面板时,IE8会从我正在使用的任何其他程序中获取焦点。有人对此有解决方案吗?

这发生在IE8中;在Firefox中,我对此没有任何问题。

这是带有updatepanel的计时器:

<asp:Timer ID="Timer1" runat="server" Interval="30000" ontick="Timer1_Tick">
</asp:Timer>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
    <asp:AsyncPostBackTrigger ControlID="ButtonSubmit" EventName="Click" />
    </Triggers>    
    <ContentTemplate>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
            <ProgressTemplate>
                Loading....
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder><br />
        <div class="clear"></div>
        <asp:Label ID="Label4" runat="server" Text="Grid not refreshed yet.">                    
        </asp:Label><br />
        <asp:Label ID="Label5" runat="server" Text="(Grid Will Referesh after Every 30 Sec)" Font-Bold="true"></asp:Label> 
    </ContentTemplate>   
</asp:UpdatePanel> 
Run Code Online (Sandbox Code Playgroud)

在计时器刻度上,我仅执行以下操作:

protected void Timer1_Tick(object sender, EventArgs e)
{
    Label4.Text = "Grid Refreshed at: " + DateTime.Now.ToLongTimeString();
}
Run Code Online (Sandbox Code Playgroud)

提前致谢。 …

asp.net internet-explorer asp.net-ajax

5
推荐指数
1
解决办法
766
查看次数

使用HTMLAgilityPack从Node的子项中选择所有<p>

我有以下代码,我用来获取HTML页面.使网址绝对,然后使链接rel nofollow并在新窗口/选项卡中打开.我的问题是在<a>s中添加属性.

        string url = "http://www.mysite.com/";
        string strResult = "";            

        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();

        if ((request.HaveResponse) && (response.StatusCode == HttpStatusCode.OK)) {
            using (StreamReader sr = new StreamReader(response.GetResponseStream())) {
                strResult = sr.ReadToEnd();
                sr.Close();
            }
        }

        HtmlDocument ContentHTML = new HtmlDocument();
        ContentHTML.LoadHtml(strResult);
        HtmlNode ContentNode = ContentHTML.GetElementbyId("content");

        foreach (HtmlNode node in ContentNode.SelectNodes("/a")) {
            node.Attributes.Append("rel", "nofollow");
            node.Attributes.Append("target", "_blank");
        }

        return ContentNode.WriteTo();
Run Code Online (Sandbox Code Playgroud)

谁能看到我做错了什么?在这里试了一会儿,没有运气.此代码出现,ContentNode.SelectNodes("/ a")未设置为对象的实例.我虽然尝试将蒸汽设置为0?

干杯,丹尼斯

c# screen-scraping html-agility-pack

5
推荐指数
1
解决办法
2729
查看次数

可以将MSIL转换为Java Native Code吗?

Dotnet CLR将语言代码转换为MSIL.将Java代码转换为独立于平台的本机代码.我们可以将此MSIL转换为本机代码吗?因此,Dotnet将自动变为独立于平台.

.net java cil native-code

5
推荐指数
1
解决办法
2753
查看次数

为什么System.Configuration程序集默认不包含在新项目中?

小宠物peev.在创建新的visual studio项目时,有没有办法在默认情况下包含system.configuration程序集?几乎所有我的新项目都需要访问配置AppSettings.

我知道做项目>添加引用不是很费力,但我想这对大多数人来说是一个非常普遍的事情,并且想知道为什么默认情况下不包括它?

.net c# configuration-files visual-studio

5
推荐指数
1
解决办法
1028
查看次数

jQuery show/hide td

如何使用jQuery能够使用按钮在表单/表格中显示或隐藏特定的TD?

jquery

5
推荐指数
1
解决办法
9259
查看次数

SQLPro read_passphrase:无法打开/dev/tty:设备未配置

当尝试使用 SQL pro 进入远程数据库时,我收到此错误。它时不时地工作,不确定发生了什么。

我现在也遇到了 GIT 的这个问题,它要求我输入密码。

我已经更新了 dev/tty 的权限,尝试删除known_hosts、检查~/ssh/并添加authorized_keys文件的权限。什么都不起作用。

错误:

Used command:  /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -i /Users/PackyTagliaferro/.ssh/id_rsa.pub -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 -p 22 forge@107.170.236.120 -L 58527:127.0.0.1:3306 -L 58528:107.170.236.120:3306

OpenSSH_7.3p1, LibreSSL 2.4.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Control socket " none" does not exist
debug1: Connecting to 107.170.236.120 [107.170.236.120] port 22.
debug1: fd …
Run Code Online (Sandbox Code Playgroud)

git ssh ssh-keys

5
推荐指数
1
解决办法
4749
查看次数