问题列表 - 第36539页

如何使用ggplot绘制概率密度?

我正在寻找绘制概率密度函数(或任何函数)的ggplot方法.我曾经使用plot()R中的旧函数来做到这一点.例如,用alpha=1beta=1(统一)绘制beta分布:

x <- seq(0,1,length=100)
db <- dbeta(x, 1, 1)
plot(x, db, type='l')
Run Code Online (Sandbox Code Playgroud)

我怎么能在ggplot中做到这一点?

r ggplot2

5
推荐指数
2
解决办法
9072
查看次数

如果div有内容显示div

好吧继承人我有...它工作正常,但它寻找一个词而不是内容.我只是希望它显示何时有任何内容..

 $(document).ready(function(){
       if ($("#box3:contains('Product')").length) {
          $('#third').show();
       }                                           
    });
Run Code Online (Sandbox Code Playgroud)

我不认为你需要这个html

它寻找'产品'我如何让它只是寻找内容> 0

<div id="first" class="tab" >
    <div class="tabtxt">
        <a>DETAILS</a>
    </div>
</div>
<div class="tab" id="second">
    <div class="tabtxt">
        <a>INSPIRATION</a>
    </div>
</div>
<div class="tab" id="third" style="display:none">
    <div class="tabtxt">
        <a>NOTES</a>
    </div>
</div>

<div class="boxholder">
    <div style="overflow: hidden; display:block" class="box" id="box1">
        <div style="padding: 10px; line-height:16px">
            %%Panel.ProductDescription%%
        </div>
    </div>
    <div style="overflow: hidden; display:none" class="box" id="box2">
        <div style="padding: 10px; line-height:16px">
            %%Panel.ProductWarranty%%
        </div>
    </div>
    <div style="overflow: hidden; display:none" class="box" id="box3">
        <div style="padding: 10px; line-height:16px">
            %%Panel.UPC%%
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

它是一个interpire购物车,所以%% …

html jquery animation

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

如何简化这个xproc管道?

我刚刚开始深入研究XProc(使用Calabash).我有一系列XSLT转换我想应用于单个输入文档以生成单个输出文档.我以前使用一个简单的Python脚本来驱动转换,但似乎XProc可能是一个很好的选择.

下面的管道似乎对我有用.它基本上只是需要以正确顺序应用的XSLT转换列表.问题是,这似乎是多余的.我希望有一些方法可以减少它,但(到目前为止)我无法自己解决这个问题.

<?xml version="1.0"?>
<p:pipeline version="1.0" xmlns:p="http://www.w3.org/ns/xproc">
    <p:xslt name="remove-locations">
        <p:input port="stylesheet">
            <p:document href="preprocessors/remove-locations.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="divisions-1">
        <p:input port="stylesheet">
            <p:document href="preprocessors/divisions-1.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="divisions-2">
        <p:input port="stylesheet">
            <p:document href="preprocessors/divisions-2.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="subjects-1">
        <p:input port="stylesheet">
            <p:document href="preprocessors/subjects-1.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="subjects-2">
        <p:input port="stylesheet">
            <p:document href="preprocessors/subjects-2.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="types-1">
        <p:input port="stylesheet">
            <p:document href="preprocessors/types-1.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="types-2">
        <p:input port="stylesheet">
            <p:document href="preprocessors/types-2.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="core">
        <p:input port="stylesheet">
            <p:document href="preprocessors/core.xsl"/>
        </p:input>
    </p:xslt>

    <p:xslt name="consolidate-descriptions">
        <p:input port="stylesheet">
            <p:document href="preprocessors/consolidate-descriptions.xsl"/>
        </p:input> …
Run Code Online (Sandbox Code Playgroud)

xml pipeline saxon xproc

4
推荐指数
1
解决办法
1013
查看次数

数据驱动编程/事件驱动编程

一直以来,我一直在为我的所有Windows应用程序使用事件驱动编程.即处理所选索引已更改/文本已更改等事件.但最近我一直在使用INotifyPropertyChanged接口和ObservableCollection类来处理数据更改.
从长远来看,当你所涉及的应用程序/属性增长时,你是否看到了我可能面临的任何问题?

.net c#

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

MSBuild批处理三个独立变量

我一直在编写一个基于MSBuild的构建系统,并且到项目结束时我需要通过批处理三个变量来实际运行一个msbuild文件88次:

Configuration = Debug; 测试版; 发布; 评估
平台= x86; x64
语言= CN; CS; DE; EN; ES; FR; 它; J.P; KO; PL; TW

我想构建:
"Debug x86 CN","Debug x86 CS",..."Debug x86 TW"
"Debug x64 CN",...

当然,我可以定义其中的88个:

<ItemGroup>
  <ToBuild Include="Debug_x86_CN">
    <Configuration>Debug</Configuration>
    <Platform>x86</Platform>
    <Language>EN</Language>
  </ToBuild>
<ItemGroup>
Run Code Online (Sandbox Code Playgroud)

然后基于元数据批处理.但真是拖累!我可以在代码中创建88个排列,因此添加语言就像向ItemGroup添加三个字符一样简单:

<ItemGroup>
  <AllConfigurations Include="Beta; Release; Evaluation;"/>
  <AllPlatforms Include="x86; x64" />
  <AllLanguages Include="CN; CS; DE; EN; ES; FR; IT; JP; KO; PL; TW" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)

msbuild batching

4
推荐指数
1
解决办法
951
查看次数

如何使用css添加垂直渐变?

我有垂直子菜单,如下:

<div id="dropdown_menu" class="menu">
<ul>
<li> <a>First Link</a></li>
<li> <a>Second Link</a></li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)

我在css类'menu'中放置底部背景.在.menu ul中的顶部背景片段.现在,我有一个垂直渐变,从上到下改变颜色(在整个垂直菜单中),因此我不能把它放在.menu ul li中.是否可以添加垂直渐变而不对html进行任何更改?

html css gradient

3
推荐指数
1
解决办法
9916
查看次数

将Equinox OSGi集成到Apache Tomcat Web应用程序中

是否有可能将osgi-equinox引入现有的Java Apache Tomcat项目?根据我的理解,OSGI必须在某种"容器"中运行.我该如何整合它?

我也在使用Jersey来获取RESTful资源.

java osgi equinox

6
推荐指数
1
解决办法
6165
查看次数

DOJO:找到孩子

这是代码:

dojo.query(subNav.navClass).forEach(function(node, index, arr){
        if(dojo.style(node, 'display') == 'block'){

           "NOW HOW WOULD I FIND CHILDREN????"

            });
        }
    });
Run Code Online (Sandbox Code Playgroud)

顺便说一句,我刚刚开始使用 DOJO,我主要使用 jQuery。

现在我已经找到其显示设置为阻止的节点,我想对其特定的子节点执行某些操作,我将如何对我刚刚停止的节点的子节点执行查询?

有什么澄清、建议吗?谢谢。

javascript dojo

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

超过Excel中的最大字符数限制

如何在Excel的CONCATENATE函数中使用超过255个字符?我实际上也在EXCEL的HYPERLINK函数中使用CONCATENATE函数.示例如下所示:

=HYPERLINK(CONCATENATE("http://www.google/com/morethan255charsmorethan255charsmorethan255charsmorethan255charsmorethan255charsmorethan255charsmorethan255charsmorethan255charsmorethan255charsmorethan255chars","morethan255chars morethan255charsmorethan255charsmorethan255charsmorethan25"),"link");
Run Code Online (Sandbox Code Playgroud)

更新:这不是CONCATENATE函数的问题,而是HYPERLINK函数的第一个参数的问题.直接/间接使用长度超过255个字符的字符串(例如:= HYPERLINK(K204,"link"),其中K204包含256个字符的长度链接)HYPERLINK功能失败

我意识到我可以使用URL缩短器,但我正在为大量的链接执行此操作,这需要大量手动使用URL缩短器.

excel function

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

未初始化的int与Integer

我正在研究我的Java以准备考试,我遇到了一些未初始化的int/Integer值的问题.

class A
    {
       int x;
       Integer y;
       static int z;
       static Integer z2;
       public A(){}   
    }
Run Code Online (Sandbox Code Playgroud)

假设我初始化了A类的对象.A a = new A();

我在编译器中尝试了这个并得到了结果

a.x == 0; true
a.x == null; Static Error: Bad type in comparison expression
a.y == 0; java.lang.NullPointerException
a.y == null; true
a.z == 0; true 
a.z == null; Static Error: Bad type in comparison expression
a.z2 == 0; NullPointerException
a.z2 == null; true
Run Code Online (Sandbox Code Playgroud)

此外,我在交互窗格中尝试了一些更未初始化的int/Interger比较,看看如果我的x,y不是上面的类实例变量,我是否会得到不同的结果.

int x;
Integer y;
x == 0; true
x == null; Static …
Run Code Online (Sandbox Code Playgroud)

java reference primitive-types

20
推荐指数
3
解决办法
4万
查看次数