我正在尝试在Windows Server 2012计算机上设置Jenkins,而且我遇到了很多困难.
我做过的事情:
id_rsa
,和id_rsa.pub
known_hosts
为bitbucket.org 创建了一个文件,使用ssh.exe -T bitbucket.org
并接受添加主机.E:
到系统范围的HOME变量C:/Windows/SysWOW64/config/systemprofile/.ssh
,以及E:/.ssh
C:/Program Files (x86)/Jenkins/jobs/MyProject/workspace/
然而它仍然坚持着
Building in workspace C:\Program Files (x86)\Jenkins\jobs\MyProject\workspace
Checkout:workspace / C:\Program Files (x86)\Jenkins\jobs\MyProject\workspace - hudson.remoting.LocalChannel@13ca972
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Run Code Online (Sandbox Code Playgroud)
我已经给了它大约20分钟,所以这不是回购问题的速度/大小.如果我取消,这是返回的内容:
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: C:\Program Files (x86)\Git\bin\git.exe fetch -t …
Run Code Online (Sandbox Code Playgroud) 我希望我的程序能够覆盖32x32的最大强制鼠标大小,就像所附图片中的程序一样,图中的光标是72x72.这是一个捕获,ProcMon
显示游标更改时发生的事情.
但是,如果我尝试自己更改游标文件的注册表值,然后使用推送更改
SystemParametersInfo(SPI.SPI_SETCURSORS, 0, IntPtr.Zero, SPIF.SPIF_SENDCHANGE);
然后光标会改变,但它仍然限制在32x32的最大尺寸.这个程序如何能够绕过这个限制?此外,游标在程序结束后仍保留,因此它不能在运行时执行,但必须覆盖某处的设置.
感谢您的帮助,我无法在网上找到这样的任何内容,所以我甚至不知道是否有人会得到答案.
编辑:我看到一些文件的访问权限C:\Windows\SysWOW64\Imageres.dll
.它们只是读取,但也许这些游标存储在这里,或者它们以某种方式修改了这个文件.但我认为它可能会让一个比我更有经验的人走上正轨.
编辑2:我认为尺寸是由SM_CXCURSOR和SM_CYCURSOR变量决定的.如果我能找到一种方法来设置这些,我可能会做生意.要编写一个快速程序,在程序运行时使用巨大的鼠标光标在PC上获取这些值,看看它返回的内容......
编辑3:没有运气; 带有巨大游标的PC为SM_CXCURSOR和SM_CYCURSOR返回32x32.
我们有一个dockerized服务器应用程序,它通过在端口6969上侦听多播数据包来自动发现网络上的物理设备.所以我们需要我们的docker容器能够通过主机从主机外部的设备接收这些数据包,并进入容器.我已经看到了一些 类似的 问题,并做了一个 很大 的 阅读,但我仍然无法获取服务器对这些组播报文作出回应.
我坐在Wireshark上观看网络流量,但我不是专家.我知道Docker创建了一个MASQUERADE
地址,使得流量看起来都像是来自Docker网关,所以当我观看时,veth
我看到主要是在谈话之间172.17.0.1
,172.17.0.2
尽管我的服务器无法检索有关网络设备的任何信息.(如果我在码头工人外面跑,我当然没有问题.)
我不能--net=host
像其他人一样使用该--link
功能.我尝试了以下变化......
docker run --name app -p 6969:6969 -d me/app:latest
docker run --name app -p 0.0.0.0:6969:6969 -d me/app:latest
(这个我可以发誓曾经工作一次,但现在不行?)docker run --name app -p 0.0.0.0:6969:6969/udp -d me/app:latest
docker run --name app -p 255.255.255.255:6969:6969 -d me/app:latest
您可以提供的任何帮助或见解将不胜感激.
我正在尝试向用户显示以下行的消息:
"无法添加用户5"
但是,如何将变量添加到放在.resx文件中的字符串中?我正在尝试搜索诸如"本地化中的变量""变量全球化"等内容,但是却出现了问题.
如果我没有本地化,我会写:
Console.Write("User " + userNum + " could not be added");
Run Code Online (Sandbox Code Playgroud)
如何利用资源实现这一目标?
在允许用户提交之前,我们目前正在使用 git hook(如下)在我们的源代码上运行 astyle。这有一个警告,即用户必须提交,格式化他们的代码,然后再次提交,这有点麻烦。理想情况下,我们希望钩子格式化代码,然后将格式化的代码包含在原始提交中。我试过重新添加更改的文件,但它会导致引用错误(显然)。我还尝试在 pre-commit 挂钩中获取历史记录,并尝试退出挂钩并重新运行 git commit 命令,但没有成功。
# Run astyle on changed .cs files, ignoring $ignored
res=$(exec git diff --cached --name-only | \
grep -Ev $ignored | \
xargs astyle --options=conf/astylerc | \
tail -n 1)
num_formatted=$(echo $res | cut -b 1) # We are only interested in the number preceeding 'formatted'.
[[ $num_formatted -ne 0 ]] && echo "WARNING: Code has been automatically formatted. Please re-add and re-commit" && exit 1 || echo "No code to format! …
Run Code Online (Sandbox Code Playgroud) 所以这有点令人头疼.
如果我从Jenkins作业运行我们的Protractor e2e测试,它会失败:
[10:23:53] I/local - Starting selenium standalone server...
[10:23:53] I/launcher - Running 1 instances of WebDriver
[10:23:54] I/local - Selenium standalone server started at http://10.0.0.5:43412/wd/hub
[10:23:56] E/launcher - Error: Error: Test `title` should be a "string" but "function" was given instead.
at new Test (/var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/mocha/lib/test.js:24:11)
at context.it.context.specify (/var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/mocha/lib/interfaces/bdd.js:84:18)
at /var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/protractor/node_modules/selenium-webdriver/testing/index.js:95:14
at context.xit.context.xspecify.context.it.skip (/var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/mocha/lib/interfaces/bdd.js:103:15)
at Function.skip (/var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/protractor/node_modules/selenium-webdriver/testing/index.js:98:14)
at Suite.<anonymous> (/var/jenkins/workspace/vw3-predevelop-linux/src/Ui/dev/test/endToEnd/presetInteractions.scenario.js:87:8)
at Object.create (/var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/mocha/lib/interfaces/common.js:114:19)
at context.describe.context.context (/var/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_5.0.0/lib/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at Object.<anonymous> (/var/jenkins/workspace/develop-linux/src/Ui/dev/test/endToEnd/presetInteractions.scenario.js:8:1)
at Module._compile (module.js:425:26)
[10:23:56] E/launcher - Process exited with error …
Run Code Online (Sandbox Code Playgroud) 我有以下两种使用LDAP和LDAPS验证用户的实现,我想知道哪个更好/更正确.对于记录,这两个都适用于SSL和非SSL连接.
我也很好奇,因为使用Wireshark于观看时Non-SSL PrincipalContext
的版本,我仍然看到交通上的端口636的四种组合(Non-SSL LdapConnection
,SSL LdapConnection
,Non-SSL PrincipalContext
,SSL PrincipalContext
)它是唯一一个有两个端口389的流量和636而不是一个或另一个.可能是什么导致了这个?
LDAP连接方法:
bool userAuthenticated = false;
var domainName = DomainName;
if (useSSL)
{
domainName = domainName + ":636";
}
try
{
using (var ldap = new LdapConnection(domainName))
{
var networkCredential = new NetworkCredential(username, password, domainName);
ldap.SessionOptions.VerifyServerCertificate = new VerifyServerCertificateCallback((con, cer) => true);
ldap.SessionOptions.SecureSocketLayer = useSSL;
ldap.SessionOptions.ProtocolVersion = 3;
ldap.AuthType = AuthType.Negotiate;
ldap.Bind(networkCredential);
}
// If the bind succeeds, we have a valid user/pass.
userAuthenticated …
Run Code Online (Sandbox Code Playgroud) 为了帮助我在 Windows 7 中使用低级鼠标钩子。我创建了一个计时器来检查上次触发鼠标移动事件的时间,如果超过给定时间,我将鼠标移动到屏幕的左上角使用 SetCursorPos(0,0)
在移动鼠标之前,我获取了它的旧坐标并保存了它们。这样,当我收到下一个 MouseMove 事件时,我可以将鼠标替换到原来的位置。但是,在调用 SetCursorPos(oldPos.x, oldPos.y) 时,鼠标不会移动。
我确信 oldPos 值是正确的,但光标拒绝移动。这可能是由于我正在使用的库造成的吗?请帮忙。
[DllImport("user32.dll", SetLastError = true)]
public static extern bool SetCursorPos(int X, int Y);
[DllImport("user32.dll")]
public static extern bool GetCursorPos(out POINT lpPoint);
void mouseHook_MouseMove(object sender, MouseEventArgs e)
{
//If the mouse was not visible, move it back to it's original position
if (!mouseVisible)
{
mouseVisible = true;
SetCursorPos(cursorPosition.x, cursorPosition.y);
}
//Update the last moved time.
lastMoved = DateTime.Now;
}
private void hideMouse(object sender, EventArgs …
Run Code Online (Sandbox Code Playgroud) 我试图通过命令行(通过C#)控制新生成的Google Chrome窗口的大小和位置.
我的命令行最终看起来像:
--new-window --window-position=100,100 --window-size=800,600 www.UrlToOpen.com
Run Code Online (Sandbox Code Playgroud)
但是,新窗口只会打开最后一个Chrome窗口的顶部.
我正在寻找的最终结果是能够在单独的窗口中启动具有特定位置和大小的多个Google Chrome实例.到目前为止,我能够做到这一点的唯一方法是指定每个实例都拥有它自己的实例--user-data-dir
.但是,考虑到用户可能安装了多少扩展,这并不理想,并且它不是最佳用户体验.
有没有人有什么建议?
我们正在使用电子包装器来捆绑和分发我们的 Web 应用程序的前端。我们需要能够将服务器的host
和传递port
到电子前端进行连接。当我们通过electron main.js --host blah --port 8080
它启动时。打包后,我们运行通过./MyApp --host blah --port 8080
,它不起作用。这很糟糕,因为我们不希望客户需要自己安装电子/npm。另外值得注意的是,无论我们是否将应用程序打包到asar
存档中,都会发生这种情况。
关于我们可以尝试的任何想法,或者我们是否试图以错误的方式解决这个问题?
c# ×5
.net ×2
git ×2
jenkins ×2
node.js ×2
atom-editor ×1
dll ×1
docker ×1
electron ×1
formatting ×1
githooks ×1
javascript ×1
ldap ×1
localization ×1
mocha.js ×1
mouse ×1
multicast ×1
networking ×1
process ×1
protractor ×1
registry ×1
ssh ×1
ssl ×1
string ×1
winapi ×1
wireshark ×1
yargs ×1