如何在sql中获取月份数?我使用以下代码,但它返回月份名称.
SELECT DATENAME(mm, GETDATE())
Run Code Online (Sandbox Code Playgroud) 我使用下面的函数将格里高利日期转换为波斯日期,但我一直无法编写函数来进行反向转换.我想要一个将波斯日期(像"1390/07/18 12:00:00"这样的字符串)转换为格鲁吉亚日期的函数.
public static string GetPdate(DateTime _EnDate)
{
PersianCalendar pcalendar = new PersianCalendar();
string Pdate = pcalendar.GetYear(_EnDate).ToString("0000") + "/" +
pcalendar.GetMonth(_EnDate).ToString("00") + "/" +
pcalendar.GetDayOfMonth(_EnDate).ToString("00") + " " +
pcalendar.GetHour(_EnDate).ToString("00") + ":" +
pcalendar.GetMinute(_EnDate).ToString("00") + ":" +
pcalendar.GetSecond(_EnDate).ToString("00");
return Pdate;
}
Run Code Online (Sandbox Code Playgroud) 我使用的是Visual Studio 2015,OpenCV.3和EmguCV.3.我的代码如下所示,结果如图所示.我知道问题是HoughCircles函数的输入值,但我不知道哪个输入适合这张图片.我感谢任何帮助.
Image<Gray, byte> OriginalImage = new Image<Gray, byte>(Openfile.FileName);
Image<Gray, byte> ResizedImage = OriginalImage.Resize(OriginalImage.Width / 2, OriginalImage.Height / 2, Emgu.CV.CvEnum.Inter.Cubic);
//********** Convert Image to Binary
Image<Gray, byte> smoothImg =
ResizedImage.SmoothGaussian(5);
smoothImg._Erode(5);
smoothImg._Dilate(5);
Image<Gray, byte> BinaryImage =
smoothImg.ThresholdBinary(new Gray(20), new Gray(255));
//********** Find Circles
Image<Rgb, byte> ROIImgScaledCircles = ROIImgScaled.Convert<Rgb, byte>();
CircleF[] circles = smoothImg.HoughCircles(
new Gray(180),//cannyThreshold
new Gray(60),//circleAccumulatorThreshold
2.0, //dp:Resolution of the accumulator used to detect centers of the circles
10.0, //min distance
10, //min radius
128 //max radius
)[0]; …Run Code Online (Sandbox Code Playgroud) 我有2个字符串,只包含0和1.我想要一个按字符串的结果字符串,或者按字符逐个字符.
DECLARE @str1 nvarchar;
DECLARE @str2 nvarchar;
SET @str1= '11001100';
SET @str2= '00100110';
-- I want result to be : 11101110
Run Code Online (Sandbox Code Playgroud)
字符串的大小是可变的.我可以逐个使用for循环和OR字符.但是字符串的数量是可变的,它们的大小可能超过100万......有没有比FOR循环更好的方法?
我正在通过Win8.1x64中的EmguCV和Visual Studio Express 2010开发应用程序.当我创建一个新项目(C#windows应用程序)时,它会自动选择x86作为目标平台,没有其他选择.当我尝试用下面的代码读取图像时,我得到了错误.我知道当没有选择目标平台或者它不像操作系统时会出现这个错误,但我不知道在这种情况下如何将目标平台更改为x64!
Image<Gray, byte> OrginalImage = new Image<Gray, byte>(Openfile.FileName);
Run Code Online (Sandbox Code Playgroud)
[System.BadImageFormatException] = {"试图加载格式不正确的程序.(HRESULT异常:0x8007000B)"}
我的.xsd文件中有更新查询,如下所示:
UPDATE Factors
SET CodeFactor = @CodeFactor, Date = @Date, MobileNumber = @MobileNumber,
Description= @Description, TotalPrice = @TotalPrice,
ShouldPayPrice = @ShouldPayPrice
WHERE ID = @Original_ID;
SELECT ID, CodeFactor, Date, PersonName, MobileNumber, Description, TotalPrice,
ShouldPayPrice, PaidPrice, Settlement, Kind
FROM Factors
WHERE ID = @Original_ID
ORDER BY Date DESC;
Run Code Online (Sandbox Code Playgroud)
我在下面的表格中使用它:
Fact.UpdateQuery(txtShomareFactor.Text.Trim(), fdpDate.Text.Trim(),
txtMobile.Text.Trim(), txtSharheKharid.Text,
Convert.ToInt64(txtJameKol.Text.Replace(",", "").Trim()),
Convert.ToInt64(txtMablagheGhabelePardakht.Text.Replace(",", "").Trim()),
IDFactorTOShowDetails);
Run Code Online (Sandbox Code Playgroud)
它会更新除描述列之外的所有列!
我想在 microsoft word 2010 中使用波斯语的多级列表。在英语中,数字如下:

在从右到左的语言(如波斯语)中,它应该是这样的:

但我不知道如何改变 RTL 语言的方向。谢谢你的帮助
我想在JDBC/Derby中运行此代码,但我得到以下错误.如何在JDBC中处理它?
码:
SELECT ID,Namee+ " " + Family AS NameS
FROM Students
Run Code Online (Sandbox Code Playgroud)
Errorr:
The '+' operator with a left operand type of 'VARCHAR' and a right operand type of 'VARCHAR' is not supported.
Run Code Online (Sandbox Code Playgroud) 我需要在while循环中使用select表达式,并使用下面的示例代码:
declare @i integer
set @i=1
while (@i<10)
begin
select @i as m;
set @i=@i+1
END
Run Code Online (Sandbox Code Playgroud)
这段代码返回10个单独的表!我希望它将所有选择结果返回到一个表中......这可能吗?如果是的话...怎么样?
我正在使用RadGrid来显示一些数据,并且我已将AllowFilteringByColumn设置为true,但是当我尝试过滤行时,会发生回发并且我的RadGrid内容消失(所有的东西都消失了,只剩下一个边框).
<telerik:RadAjaxPanel ID="pnlShowGrid" runat="server" LoadingPanelID="RadAjaxLoadingPanel4">
<div class="row-fluid">
<telerik:RadGrid ID="RadGrid1" runat="server"
CssClass="RadGrid" Height="400px"
ClientSettings-Selecting-AllowRowSelect="true"
AllowPaging="True" PageSize="20" AllowSorting="True"
AutoGenerateColumns="False" AllowAutomaticUpdates="True"
ShowStatusBar="True" AllowAutomaticDeletes="True"
AllowFilteringByColumn="True"
Width="100%"
OnUpdateCommand="RadGrid1_UpdateCommand"
OnItemDeleted="rgrd_Edit_ItemDeleted"
OnItemCommand="RadGrid1_ItemCommand">
<ExportSettings ExportOnlyData="True">
<Pdf DefaultFontFamily="Arial Unicode MS" FontType="Embed" />
<Excel AutoFitImages="True" />
</ExportSettings>
<FilterMenu EnableImageSprites="true">
</FilterMenu>
<ExportSettings ExportOnlyData="true" OpenInNewWindow="true">
<Excel Format="ExcelML"></Excel>
<Excel AutoFitImages="true" />
<Pdf FontType="Embed" AllowPrinting="true" />
<Pdf DefaultFontFamily="Arial Unicode MS" />
</ExportSettings>
<ClientSettings AllowGroupExpandCollapse="True" Selecting-AllowRowSelect="true">
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView
CommandItemDisplay="TopAndBottom" Dir="RTL" AllowFilteringByColumn="true"
DataKeyNames="AccessPesrmission_ID"
NoDetailRecordsText="??? ?????? ???? ????? !"
NoMasterRecordsText="??? ?????? ???? ????? !"> …Run Code Online (Sandbox Code Playgroud) 我使用word自动化来创建word文档.我想在该文件中嵌入一些HTML代码.我应该如何将html标签转换为word文档格式?(我想在html中保留字体,粗体,表格和其他样式)