小编adm*_*rew的帖子

你怎么找到玻璃鱼的版本?

如何确定正在运行的GlassFish服务器版本?

这个命令:

/var/glassfish/bin/asadmin version
Run Code Online (Sandbox Code Playgroud)

...回:

Version = Sun Java System Application Server 9.1_01
Command version executed successfully.
Run Code Online (Sandbox Code Playgroud)

这是哪个版本的GlassFish?

glassfish

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

单声道无法压缩?

我试图压缩像单声道这样的一些数据:

public static string Save(FlightProgram program, bool compressed)
{
    using (MemoryStream ms = new MemoryStream())
    {
        BinaryFormatter f = new BinaryFormatter();
        if (compressed)
        {
            using (DeflateStream gz = new DeflateStream(ms, CompressionMode.Compress))
            {
                f.Serialize(gz, program);
            }
        }
        else
        {
            f.Serialize(ms, program);
        }
        return Convert.ToBase64String(ms.ToArray()).Replace('/', '_');
    }
}
Run Code Online (Sandbox Code Playgroud)

我只是得到异常"CreateZStream".没有内在的例外.这里发生了什么 ?

堆栈跟踪:

Could not save flight program: CreateZStream at   at (wrapper managed-to-native) System.IO.Compression.DeflateStream:CreateZStream (System.IO.Compression.CompressionMode,bool,System.IO.Compression.DeflateStream/UnmanagedReadOrWrite,intptr)
    at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip) [0x00000] in <filename unknown>:0 
    at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode …
Run Code Online (Sandbox Code Playgroud)

c# mono deflatestream unity-game-engine

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

如何在我的Amazon Web Service使用量超过一定数量时编写警报脚本?

我们在相当复杂的项目中使用S3,SimpleDB和SQS.

我希望能够自动跟踪他们的使用情况,以确保我们不打算在我们不打算花费大量资金时(可能是因为一个错误).

有没有办法从脚本中读取所有亚马逊网络服务的使用数据和/或帐户的当前实时美元成本?

或者基于此提供警报的任何服务或脚本?

amazon-s3 amazon-ec2 amazon-web-services amazon-simpledb

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

访问内部类中的局部变量

package geometry;

public class Hypotenuse {
    public InnerTriangle it = new InnerTriangle();

    class InnerTriangle {  
        public int base;
        public int height;
    }
}
Run Code Online (Sandbox Code Playgroud)

关于可以引用变量库的对象的类,哪个陈述是正确的?

答:它可以是任何类.

B.没有班级可以进入基地.

C.该类必须属于几何包.

D.该类必须是Hypotenuse类的子类

这是来自SCJP Dumps,答案是"C".因为我的知识答案应该是"B",因为内部类具有称为"base"的局部变量,并且它仅在内部类中具有范围.即使我想在"几何"类中使用这个变量,我也不允许这样做.

如果我错了,请指导我?

java

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

如何区分提交?

假设我执行git log并看到一个带有 ID 的提交280c5af57b02c41edbf947a0eed31c72e2839123

看来要查看该提交中进行了哪些更改,我可以这样做

git diff 280c5af57^ 280c5af57
Run Code Online (Sandbox Code Playgroud)

或者

git show 280c5af57
Run Code Online (Sandbox Code Playgroud)

但是,由于我已经设置为 diff 工具(使用https://gist.github.com/bkeating/329690opendiff上的说明),所以上面的第一个命令将使用 来显示它,而第二个命令将使用命令行。opendiff

有没有办法不使用 Bash 别名或函数来区分git它,而无需两次输入或粘贴提交 ID?(喜欢svn diff -c 321234

git git-diff

6
推荐指数
2
解决办法
1431
查看次数

从MAC地址获取设备详细信息

我使用SendArp API函数来检索网络上存在的MAC地址.

现在我有一个MAC地址,我想检索有关此设备的更多信息(名称,类型,制造商名称等),但我不知道哪个(大多数)适合这个.

有人可以帮忙吗?

windows vb6 networking mac-address

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

生产环境中的AWS ElasticBeanstalk

我不知道选择AWS Elastic Beanstalk作为生产系统的环境。您在这方面有经验吗?

production amazon-web-services amazon-elastic-beanstalk

5
推荐指数
1
解决办法
1169
查看次数

rake sunspot:solr:reindex not working in Rails 4 app with multiple engines

I have rails 4 beta1 application with multiple engines. I've installed sunspot_rails gem /2.0.0.pre.130115/ in my host application. Most of my models lived in engine1. I used them on other engines. After I installed sunspot_rails, using rake sunspot:solr:run I got command/task not found. According to documentation I found a solution. Here is the link: https://github.com/sunspot/sunspot/wiki/Adding-Sunspot-search-to-Rails-in-5-minutes-or-less

After I created a new record Solr found it in a search. But when I reindexed my data, old records were still not found …

solr ruby-on-rails sunspot sunspot-rails ruby-on-rails-4

5
推荐指数
1
解决办法
1228
查看次数

在 C# 中读写 app.config

我知道app.config这个论坛中有很多参考资料,但我在这里发布这个问题,因为我认为我的问题非常直接。

我的长app.config这样...

<?xml version="1.0"?>
<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <section name="MySection.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="MySection.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    <userSettings>
        <MySection.Properties.Settings>
            <setting name="DEVICE_ID_VERSION" serializeAs="String">
                <value>1.0.0.0</value>
            </setting>
            <setting name="DEVICE_ID_ID" serializeAs="String">
                <value>0000 0001</value>
            </setting>
        </MySection.Properties.Settings>
    </userSettings>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="PInvoke" publicKeyToken="83380E73B2486719" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-3.0.19.0" newVersion="3.0.19.0"/>
            </dependentAssembly>
            <dependentAssembly> …
Run Code Online (Sandbox Code Playgroud)

c# app-config

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

Cygwin无法执行shell脚本

我试图.sh在Windows 7上使用Cygwin 执行一个文件,我收到一个错误cannot execute binary file.

这是我在Cygwin命令提示符窗口中编写的内容:

$ bash cygpath --unix C:\Users\\MyName\\Documents\\MyProject\\dygraphsMaster\\generate-combined.sh
Run Code Online (Sandbox Code Playgroud)

这是结果:

/usr/bin/cygpath: /usr/bin/cygpath: cannot execute binary file
Run Code Online (Sandbox Code Playgroud)

shell cygwin windows-7 cygpath

5
推荐指数
1
解决办法
1595
查看次数