我正在尝试将.NET应用程序从 Windows移植到 Mono,但是在 Windows 上运行的某些代码不再在mono上运行(如预期的那样):
WebClient client = new WebClient ();
Console.WriteLine (client.DownloadString("http://www.maxima.fm/51Chart/"));
Run Code Online (Sandbox Code Playgroud)
它似乎正确地将编码检测为 UTF-8(并且手动将编码设置为 UTF-8 或 ASCII 也不起作用)仍然存在“?” 人物
我在C#中有一个函数,它通过从路由器页面检索64b XML来获取Internet的状态
public bool isOn()
{
HttpWebRequest hwebRequest = (HttpWebRequest)WebRequest.Create("http://" + this.routerIp + "/top_conn.xml");
hwebRequest.Timeout = 500;
HttpWebResponse hWebResponse = (HttpWebResponse)hwebRequest.GetResponse();
XmlTextReader oXmlReader = new XmlTextReader(hWebResponse.GetResponseStream());
string value;
while (oXmlReader.Read())
{
value = oXmlReader.Value;
if (value.Trim() != ""){
return !value.Substring(value.IndexOf("=") + 1, 1).Equals("0");
}
}
return false;
}
Run Code Online (Sandbox Code Playgroud)
使用Mozilla Firefox 3.5和FireBug插件我猜测它通常需要30ms来检索页面,但是在非常大的500ms限制下它仍然经常达到它.如何显着提高性能?
提前致谢
我在 joomla 中有一个组件可以导出为 PDF,我遇到的问题是导出的 PDF 不可读,因为 Joomla! 在pdf本身之后和之前插入的页面。
我已经制作了一个组件的标准结构并将其称为
index.php?option=com_listado_factura&task=exportar_pdf
Run Code Online (Sandbox Code Playgroud)
是com_listado_factura组件的名称和exportar_factura导出为pdf的控制器的功能。
找遍了也没找到解决办法,谢谢