我正试图想出一个快速的解决方案来查找字符串中的部分.这是一个Sample字符串:
"PostLoad成功!您将17.00卢比的金额转移到03334224222.现在通过拨打123使用PostLoad.短信的PostLoad将于01-03-2011结束."
目标:需要检索粗体值:金额和单元格编号.字符串内容略有变化,但单元格数字始终为11位数.金额始终为两位小数精度.使用C#和RegEx的任何建议?
我想知道如何让子窗体加载其大小覆盖整个 MDI 父级的 MDI 容器空间(深灰色的东西)?将子窗体的 WindowState 设置为最大化不是一个选项,因为它也会最大化任何其他窗体。建议?
我可以访问我的客户端的旧managemnt系统,他想要添加更多.我能够联系最初编写主要DLL的人,然后我得到控制并开始围绕他们构建.但是现在,我需要延长原件,我别无选择,只能进行逆向工程.
我尝试了Reflector Pro和JustDecompile,但获得的源代码充满了错误.ILSpy工作得很好但是,这里是我从ILSpy获得的示例代码:
private static object ParseIntoValue(string stringValue, string targetType)
{
if (targetType != null)
{
if (<PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1 == null)
{
<PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1 = new Dictionary<string, int>(12)
{
...
};
}
int num;
if (<PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1.TryGetValue(targetType, out num))
{
object result;
switch (num)
{
cases are here...
default:
goto IL_2A6;
}
return result;
}
}
IL_2A6:
return null;
}
Run Code Online (Sandbox Code Playgroud)
很明显,这里应用了某种形式的混淆.JustDecompile和Reflector Pro的反向代码完全没用.有了ILSpy,我就可以编译一些项目而不需要任何修改.
我需要帮助来识别这种混淆(如果是这种情况).最初的开发人员说他没有混淆.我不确定.
谢谢.
我修改了 Kendo (kendo.culture.en-US-Custom.min.js) 的文化设置文件并能够缩小它。但我不知道如何针对它创建 .map 。我的网络日志显示针对该文件的 404。有没有地图文件生成器?这是文件:
\n\n!function (e) { "function" == typeof define && define.amd ? define(["kendo.core.min"], e) : e() }(function () {\n !function (e, y) {\n kendo.cultures["en-US"] = {\n name: "en-US", numberFormat: {\n pattern: ["-n"],\n decimals: 2, \n ",": ",", \n ".": ".", \n groupSize: [3], \n percent: {\n pattern: ["-n %", "n %"],\n decimals: 2,\n ",": ",",\n ".": ".",\n groupSize: [3],\n symbol: "%"\n },\n currency: {\n name: "UAE Dirham",\n abbr: "AED",\n pattern: ["-n $", "n $"],\n …Run Code Online (Sandbox Code Playgroud) 我正在从SQL Server检索许多网页(之前保存)的HTML.我的目的是修改img的src属性.HTML中只有一个img标记,它的来源是这样的:
...
<td colspan="3" align="center">
<img src="/crossword/13cnum1.gif" height="360" width="360" border="1"><br></td>
...
我需要将/crossword/13cnum1.gif更改为http://www.nostrotech.com /crossword/13cnum1.gif
码:
private void ReplaceTest() {
String currentCode = string.Empty;
Cursor saveCursor = Cursor.Current;
try {
Cursor.Current = Cursors.WaitCursor;
foreach (WebData oneWebData in DataContext.DbContext.WebDatas.OrderBy(order => order.PuzzleDate)) {
if (oneWebData.Status == "Done" ) {
currentCode = oneWebData.Code;
#region Setup Agility
HtmlAgilityPack.HtmlDocument AgilityHtmlDocument = new HtmlAgilityPack.HtmlDocument {
OptionFixNestedTags = true
};
AgilityHtmlDocument.LoadHtml(oneWebData.PageData);
#endregion
#region Image and URL
var imageOnPage = from imgTags in AgilityHtmlDocument.DocumentNode.Descendants()
where imgTags.Name …Run Code Online (Sandbox Code Playgroud) 我遇到了严重问题让VS2017最新运行,因为它在升级时已进入不一致状态.有一些拒绝卸载的补丁包,因为它们显然缺少文件C:\Windows\Installer夹中的缓存文件.我从未碰过那个文件夹.但是,我确实C:\ProgramData\Packages Cache使用软连接将Visual Studio文件夹移动到另一个驱动器(mklink /D)
现在,即使在卸载VS2017之后,我也无法重新安装它,因为它无法立即报告:
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26127.0)
.NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.0.26206.0)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26206.0)
Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.0.26206.0)
Visual Studio core editor (Microsoft.VisualStudio.Workload.CoreEditor,version=15.0.26004.1)
Incomplete components
.NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.0.26109.1)
.NET Framework 4.6.1 development tools (Microsoft.Net.ComponentGroup.DevelopmentPrerequisites,version=15.0.26206.0)
.NET Portable Library targeting pack (Microsoft.VisualStudio.Component.PortableLibrary,version=15.0.26109.1)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26127.0)
Blend for Visual …Run Code Online (Sandbox Code Playgroud) 我有一个屏幕附在这里,我需要知道如何将列表转换为Longs列表?
var x = SchedulerMatrixStorage.Resources.Items.Select(col => col.Id);
Run Code Online (Sandbox Code Playgroud)
其中,Id是类型 Object

我正在向我的网站用户推送PEM文件以供下载.这是代码:
try
{
FileStream sourceFile = null;
Response.ContentType = "application/text";
Response.AddHeader("content-disposition", "attachment; filename=" + Path.GetFileName(RequestFilePath));
sourceFile = new FileStream(RequestFilePath, FileMode.Open);
long FileSize = sourceFile.Length;
byte[] getContent = new byte[(int)FileSize];
sourceFile.Read(getContent, 0, (int)sourceFile.Length);
sourceFile.Close();
Response.BinaryWrite(getContent);
}
catch (Exception exp)
{
throw new Exception("File save error! Message:<br />" + exp.Message, exp);
}
Run Code Online (Sandbox Code Playgroud)
问题是,下载的文件包含应该存在的内容+整个网页的HTML副本.
这里发生了什么事?
c# ×4
.net-4.0 ×2
winforms ×2
asp.net ×1
c#-4.0 ×1
download ×1
forms ×1
javascript ×1
linq-to-sql ×1
mdi ×1
msiexec ×1
obfuscation ×1
regex ×1
search ×1
uninstall ×1