我在c#中创建连接字符串时遇到了困难,该字符串将使用公共IP,命名实例和端口号(1433除外)连接到远程SQL服务器.谁知道怎么做?
我是 php 新手,希望将网站与一些租赁软件集成。他们使用非 WSDL 模式服务并提供了这段代码,但我对“this-is-the-action-uri”有点困惑。我的猜测是这是我需要调用的方法。
$client = new SoapClient(NULL, array(
'location' => '21.ip2.ip3.ip4/r2ws_v5/servlet/messagerouter',
'uri' => 'urn:this-is-the-action-uri',
'exceptions' => 1,
);
Run Code Online (Sandbox Code Playgroud)
我可以打电话并得到回复。
http://21.ip2.ip3.ip4:8080/r2ws_v5/jsp/UBS_GetAvailability.jsp
Run Code Online (Sandbox Code Playgroud)
响应是这样开始的。
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:getAvailabilityByItemResponse xmlns:ns1="UBS/R2" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<response>
<product>
<productID xsi:type="xsd:string">TESTUB</productID>
<level xsi:type="xsd:int">1</level>
<description xsi:type="xsd:string">
<![CDATA[ testub ]]>
</description>
</level>
Run Code Online (Sandbox Code Playgroud)
您能否告诉我在这种情况下“uri”参数应该是什么或者它应该如何格式化?
在没有记录匹配ICAO ='YXTO'的情况下
SELECT 1, ISNULL((SELECT ID FROM Location WHERE ICAO='YXTO'),2)
Run Code Online (Sandbox Code Playgroud)
返回1,2
而
SELECT 1, (SELECT ISNULL(ID,2) FROM Location WHERE ICAO='YXTO')
Run Code Online (Sandbox Code Playgroud)
返回1,NULL
发生了什么?当没有记录可以执行时,ISNULL不会返回值吗?
对流不了解很多.为什么第一个版本使用文件但第二个版本没有?在"返回目标"上设一个断点 看起来两者都创建了完全相同的东西,但dest始终是使用第二个版本的空白图像.
public static BitmapSource ConvertByteArrayToBitmapSource(Byte[] imageBytes, ImageFormat formatOfImage)
{
BitmapSource dest = null;
if (formatOfImage == ImageFormat.Png)
{
var streamOut = new FileStream("tmp.png", FileMode.Create);
streamOut.Write(imageBytes, 0, imageBytes.Length);
streamOut.Close();
Uri myUri = new Uri("tmp.png", UriKind.RelativeOrAbsolute);
var bdecoder2 = new PngBitmapDecoder(myUri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
dest = bdecoder2.Frames[0];
}
return dest;
}
public static BitmapSource ConvertByteArrayToBitmapSource_NoWork(Byte[] imageBytes, ImageFormat formatOfImage)
{
BitmapSource dest = null;
using (var stream = new MemoryStream(imageBytes))
{
var bdecoder = new PngBitmapDecoder(stream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
stream.Flush();
dest = bdecoder.Frames[0];
stream.Close(); …Run Code Online (Sandbox Code Playgroud) 我有几个项目的解决方案.我将Fluent nHibernate的几个引用更改为NuGet包(v1.3.0.717).最近我改变了另一个项目,并添加了当前的Fluent软件包,1.2.0.712(早期但当前),我的应用程序将构建但不运行.当前版本指向nHibernate v3.1.0.4,但在某处它与v3.2.9.4000冲突,而前者版本的Fluent引用了该版本.
Inner Exception
{"Could not load file or assembly 'NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"
NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4"}
Exception
Could not load file or assembly 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Run Code Online (Sandbox Code Playgroud)
如何清理此项目并使其再次运行?
我正在从一个 1bpp 索引图像剪切和粘贴到一个新图像。
一切正常,直到起始像素是 8 的除数。在下面的代码中,步幅等于一个相对于矩形宽度的值,直到我到达字节边界。那么步幅就等于整个页面的宽度。
var croppedRect = new Rectangle((int)left, (int)top, (int)width, (int)height);
BitmapData croppedSource = _bitmapImage.LockBits(croppedRect, ImageLockMode.ReadWrite, BitmapImage.PixelFormat);
int stride = croppedSource.Stride;
Run Code Online (Sandbox Code Playgroud)
这是一个问题,因为 Marshal 没有将我选择的区域粘贴到新图像中,而是复制页面整个宽度的横截面、所选区域的高度。
int numBytes = stride * (int)height;
var srcData = new byte[numBytes];
Marshal.Copy(croppedSource.Scan0, srcData, 0, numBytes);
Marshal.Copy(srcData, 0, croppedDest.Scan0, numBytes);
destBmp.UnlockBits(croppedDest);
Run Code Online (Sandbox Code Playgroud) 在委托声明中引用i是否有效?
targets[i].PingReply = e.Reply;
Run Code Online (Sandbox Code Playgroud)
它是否会引用相同的数组元素
pingSender.SendAsync( targets[i].IPAddress, targets[i].Timeout);
Run Code Online (Sandbox Code Playgroud)
当代表开火时,我的价值是不同的东西?我问,因为我在PingCompleted中得到一个超出i = 3的索引,我不知道为什么.
public void Ping(PingTest[] targets)
{
var finished = new CountdownEvent(targets.Count());
for (int i = 0; i < targets.Count(); i++)
{
finished.AddCount();
var pingSender = new Ping();
pingSender.PingCompleted += (sender, e) =>
{
targets[i].PingReply = e.Reply;
finished.Signal();
};
pingSender.SendAsync(targets[i].IPAddress, targets[i].Timeout);
}
finished.Signal();
finished.Wait();
}
Run Code Online (Sandbox Code Playgroud)
这是电话......
var pingTests = new PingTest[]
{
new PingTest("Router", new IPAddress(new byte[] {192, 168, 1, 8}), 2),
new PingTest("Exchange", new IPAddress(new byte[] {192, 168, 1, 78}), …Run Code Online (Sandbox Code Playgroud) 扩展我没有建立的网站.我希望能够使用参数调用ShowWindow proc.我该怎么办?JQuery和Javascript的新手.
default.aspx
<script type="text/javascript" src="/scripts/jquery-1.2.6.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a#ShowWindow').click(function() {
window.open("TerminalInfo.aspx?", 'Info', 'scrollbars=yes,width=510,height=536');
})
});
Run Code Online (Sandbox Code Playgroud)
default.aspx.cs
动态构建aspx ...
public static string ToHtml(this Location location)
{
var html = new StringBuilder();
html.Append("<td><a href='#' id='ShowWindow'>ShowLetter</a></td>"); //This works
html.Append("<td><a href='#' id='ShowWindow(\"MyInfo.aspx\")'>Read More</a></td>"); //How can I do this? It doesn't work.
return html.ToString();
}
Run Code Online (Sandbox Code Playgroud) c# ×4
bitmapsource ×1
graphics ×1
javascript ×1
jquery ×1
lambda ×1
nhibernate ×1
nuget ×1
php ×1
sql ×1
sql-server ×1
stream ×1
t-sql ×1
windows ×1
wpf ×1
wsdl ×1