问题列表 - 第35241页

你可以在vim中对视觉选择的文本执行什么?

您可以在视觉选择的文本上执行哪些可能的操作(使用键盘快捷键)?为简单起见,请考虑以下简单内容:

   a  b  cd  1  p
   a  b  cd  2  y
   a  b  cd  3  t
   a  b  cd  4  h
   a  b  cd  5  o
   a  b  cd  6  n
Run Code Online (Sandbox Code Playgroud)

一个具体问题:是否可以在选择上执行Python/shell命令/脚本?

一些更具体的问题:

1-)如何对python列进行就地排序?

2-)如何切换列的位置?

3-)如何增加价值?(比如说.选择中只有大于3的数字)

谢谢.

python vi vim

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

如何在.NET中定义应用程序的语言环境

我在Windwos XP下使用Visual C++ 2008 Express Edition开发了一个应用程序,它在一台计算机上运行,​​默认语言设置为英语.但是,如果在使用默认语言德语的另一台计算机上运行相同的应用程序,我会遇到麻烦,因为Infinity在转换为double使用期间不会识别预定义的字符串ToDouble,因为在德语平台上字符串应该是Unendlich.特别是mscorlib投掷正确a FormatException.

如何强制应用程序与英语区域设置一起运行?我还没找到任何选择......

谢谢你的任何提示.

locale visual-studio-2008

0
推荐指数
1
解决办法
1045
查看次数

通知声音问题

我正在尝试测试通知.我创建了一个启用了音频播放的模拟器.我能收到通知,但我听不到声音.可能是什么问题呢?我缺少任何设置吗?

NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns);
        int icon = R.drawable.icon;
        CharSequence tickerText = "Hello";
        CharSequence contentTitle = "My notification";  // expanded message title
        CharSequence contentText = "Hello";      // expanded message text

        Intent notificationIntent = new Intent("ABC");
        PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);

        long when = System.currentTimeMillis();

        Notification notification = new Notification(icon, tickerText, when);

        notification.defaults |= Notification.DEFAULT_SOUND;

        notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);


        mNotificationManager.notify(HELLO_ID, notification);
Run Code Online (Sandbox Code Playgroud)

当我看到logcat时,我有以下堆栈跟踪.

09-20 15:44:47.297: DEBUG/MediaPlayer(62): Couldn't open file on client side, trying server side
09-20 15:44:47.347: ERROR/MediaPlayerService(34): Couldn't …
Run Code Online (Sandbox Code Playgroud)

android android-emulator

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

关闭JS后,AJAX应用如何正常降级的策略是什么?

我应该遵循哪些一般准则来优雅地降级基于JS的Web应用程序?有这样的指导方针吗?是否有任何公开网页可以说明好/坏的例子?有什么共同的陷阱吗?

javascript

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

Check if a class has a field by string

I would Google this, but honestly I have no idea what to search for

Say I have this class

class a
{
    public $a_a, $a_b, $a_c;
}

$true = "a_a";
$false = "a_e";
Run Code Online (Sandbox Code Playgroud)

How do I use the strings to prove that the class contains the field a_a, but not a_e ?

Thanks

php

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

Delegate to an instance method cannot have null 'this'

I am developing a C# .NET 2.0 application wherein at run-time one of two DLLs are loaded depending on the environment. Both DLLs contain the same functions, but they are not linked to the same address-offset. My question is regarding the function delegates in my application code.

public class MyClass
{
    public delegate int MyFunctionDelegate(int _some, string _args);

    public MyFunctionDelegate MyFuncToCallFrmApp;

    public MyClass() : base()
    {
        this.MyFuncToCallFrmApp = new MyFunctionDelegate(this.MyFuncToCallFrmApp); // <-- Exception thrown here.
    }

    public SomeFunction()
    {
        MyFuncToCallFrmApp(int …
Run Code Online (Sandbox Code Playgroud)

c# delegates

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

如何将.ico文件与已编译的.exe文件合并?

如何将.ico文件与已编译的.exe文件合并?

没有.ico文件,exe文件将在启动时崩溃...我已经在项目属性中添加了ico文件

提前致谢

c# icons

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

如何使用Bonjour跨子网宣传服务?

我熟悉Bonjour在"本地"域名上的广告服务的用法.我已经完成了几个例子,我知道我使用的相应Cocoa类.

我很好奇我如何将一个简单的Bonjour服务宣传到不同的子网.具体来说,我正在尝试编写一个在我的桌面上运行的网络服务,该服务通过以太网连接.客户端在通过Wifi连接的移动设备(iPhone/iPad)上运行.在我的网络设置中,Wifi与以太网位于不同的子网上.但是,两者都落后于防火墙.我没有必要在防火墙外做广告,我只是希望wifi客户端能够看到以太网连接服务器所宣传的服务.

这可能吗?我知道Bonjour应该支持跨子网的通信,但是当我尝试阅读有关此功能的任何时候,它深入研究DNS记录和诸如此类的东西.我是一名应用程序开发人员...我不知道这些东西,我也不想让用户担心它.我错过了一些简单的事吗?

iphone networking cocoa bonjour dns-sd

9
推荐指数
1
解决办法
8721
查看次数

F#/ .NET null实例奇怪

我有这个C#DLL:

namespace TestCSProject
{
    public class TestClass
    {
        public static TestClass Instance = null;

        public int Add(int a, int b)
        {
            if (this == null)
                Console.WriteLine("this is null");
            return a + b;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

这个引用DLL的F#app:

open TestCSProject
printfn "%d" (TestClass.Instance.Add(10,20))
Run Code Online (Sandbox Code Playgroud)

没有人启动Instance静态变量.猜猜F#app的输出是什么?

this is null
30
Press any key to continue . . .

经过几次测试后我发现除非我使用this(例如访问实例字段),否则我不会得到NullReferenceExpcetion.

这是F#编译/ CLR中的预期行为还是差距?

.net c# f#

9
推荐指数
1
解决办法
404
查看次数

jQuery用src选择img

我想通过src属性选择一个图像(使用jQuery).Image位于ul和div的集合中.ul的id是"可排序的".

这是我的HTML:

<ul id="sortable">
  <li id="pic_0">
    <div class="sortEleWrapper">
      <div class="imgWrapper">
        <img src="/test1.jpg">
      </div>
      <input type="text" name="picText" id="picText" value="""" style="width:105px;color:#aaa" class="sortInput">
    </div>
    <input type="hidden" id="picSrc" name="picSrc" value="/test1.jpg">
  </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

等等

这是我的js:

if($('#sortable').find('img[src="/test1.jpg"]').length > 0){
    alert('img exists');
}else{
    alert('img doesnt exists');
}
Run Code Online (Sandbox Code Playgroud)

我的问题是,他们没有找到任何图像.但如果我像这样写js:

if($('img[src="/test1.jpg"]').length > 0){
    alert('img exists');
}else{
    alert('img doesnt exists');
}
Run Code Online (Sandbox Code Playgroud)

所以他们找到了图像.

javascript jquery

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