小编Dev*_*ian的帖子

msxml3.dll访问被拒绝

我有以下代码:

Function filejson(json) 
  Dim objStream, strData 
  Set objStream = CreateObject("ADODB.Stream") 
  objStream.CharSet = "utf-8" 
  objStream.Open 
  objStream.LoadFromFile(json) 
  strData = objStream.ReadText() 
  filejson = strData 
End Function 
Function http2json(url) 
  Set http = CreateObject("Microsoft.XmlHttp") 
  http.open "GET", url, FALSE
  http.send ""                                   '<------- Line 13
  http2json=http.responseText 
End Function 
Function str2json(json,value) 
  Set scriptControl = CreateObject("MSScriptControl.ScriptControl") 
  scriptControl.Language = "JScript" 
  scriptControl.AddCode("x="& json & ";") 
  str2json= scriptControl.Eval( "x"& value ) 
End Function 
Function get_json_from_file(json,value) 
  get_json_from_file=str2json(filejson(json),value) 
End Function 
Function get_json_from_http(url,value) 
  get_json_from_http=str2json(http2json(url),value) 
End Function 
Function save_json_from_http(url,loc) 
  Set fso = CreateObject("Scripting.FileSystemObject") 
  fullpath = fso.GetAbsolutePathName(loc) …
Run Code Online (Sandbox Code Playgroud)

vbscript msxml3

11
推荐指数
2
解决办法
2万
查看次数

User.prototype的UserScript问题

我正在开发一个UserScript,我认为为Object创建2个Prototype函数会节省更多时间.

Object.prototype.Count = function() {
    var size = 0, key;
    for (key in this) {
        if (this.hasOwnProperty(key)) {
             size++;
        }
    }
    return size;
};
Object.prototype.GetEntry = function(index) {
    var size = 0, key;
    for (key in this) {
        if (this.hasOwnProperty(key)) {
            if (size == index)
                return this[key];
             size++;
        }
    }
    return null;
};
Run Code Online (Sandbox Code Playgroud)

这两个函数在我的调试控制台上完全正常工作,因为我输入它们,我使用它们,但是当我运行我的脚本时,它会让我的控制台出现一些奇怪的错误.

Uncaught TypeError: U[a].exec is not a function
Uncaught TypeError: (ec[b] || []).concat is not a function
Uncaught TypeError: X[g].exec is not a function
Uncaught TypeError: (Qn[t] …
Run Code Online (Sandbox Code Playgroud)

javascript jquery userscripts function-prototypes

10
推荐指数
1
解决办法
2822
查看次数

Awesomium.NET重新调整大小 - 内存泄漏

好吧,我注意到一个奇怪的错误.这在调整大小时会发生.

当我试图修复我的xaml对齐时,我首先注意到了它.当我尝试在我的2个屏幕上调整窗口大小时,awesomium内容开始闪烁,突然内容消失,带有徽标的红屏出现,在vshost32.exe崩溃后缩短.

我认为好..好吧它可能有一些宽度限制所以我限制了主屏幕宽度上窗口的MaxWidth.我注意到一些flickerings藏汉而我试图水平调整大小,但仅此而已,但是当我垃圾邮件的大小调整和改变了许多倍的高度和宽度上maxheight 1080和最大宽度1920同样的问题发生.

在此输入图像描述 在此输入图像描述

Edit2附加信息:我在同一个XAML上有2个WebControl.当我添加多个,并调整大小......它崩溃了第一秒.

编辑(1)

[1123/013232:INFO:(0)] WebCore is now online.
[1123/013232:INFO:(0)] Running Awesomium 1.7.5.1
[1123/013247:WARNING:Awesomium.NET(0)] System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Windows.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette)
   at Awesomium.Windows.Controls.WebViewPresenter.Awesomium.Core.ISurface.Initialize(IWebView view, Int32 width, Int32 height)
   at Awesomium.Core.Surface.oQVs2ZKQlyYpFHm4aaM(Object , Object , Int32 width, Int32 height)
   at Awesomium.Core.Surface.InitializeDirector(IWebView view, Int32 width, Int32 height)
   at Awesomium.Core.Surface..ctor(IWebView view, Int32 width, Int32 height, ISurface surfaceImpl)
   at Awesomium.Core.SurfaceFactory.Nu5RdsobJP(IntPtr  , Int32  , Int32  )
   at …
Run Code Online (Sandbox Code Playgroud)

c# wpf memory-leaks awesomium

7
推荐指数
1
解决办法
614
查看次数

Bootstrap Popover/Clickover

所以我想知道......我正在使用Twitter的Bootstrap进行我的项目,我发了一个小通知Popover/Clickover(http://www.leecarmichael.com/bootstrapx-clickover/examples.html)功能.而且我想知道如何在静态高度上设置自定义滚动条...

我创建此弹出/点击的基本概念是:

$(function () {
    $("[rel='tooltip']").tooltip({container: 'body'});
});
$("#notices").clickover({
    content:data,
    html:true,
    container:'body'
    ,onShown: function () {$("#notices").tooltip("destroy");},
    onHidden: function () {$("#notices").tooltip({container:'.navbar'});},
    template: '\
        <div class="popover notices">\
            <div class="arrow"></div>\
            <div class="popover-inner">\
                <div class="popover-header">\
                    <h3 class="popover-title"></h3>\
                    <h3 class="popover-settings"><a href="/notifications.php?act=settings">Settings</a></h3>\
                </div>\
                <div class="popover-content">\
                    <p></p>\
                </div>\
                <h3 class="popover-footer"><center><a href="/notifications.php">See All</a></center></h3>\
            </div>\
        </div>'

});
Run Code Online (Sandbox Code Playgroud)

使用HTML

<div id='userbar' class='btn-group input-prepend input-append'>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button id='notices' class='btn' rel='tooltip' data-placement='bottom' data-original-title='Notifications'> <i class='icon-exclamation-sign icon-large'> <span …
Run Code Online (Sandbox Code Playgroud)

javascript popover jsfiddle twitter-bootstrap

2
推荐指数
1
解决办法
6975
查看次数