小编Wer*_*nze的帖子

IE 7 CTRL +点击打开一个新窗口 - 如何抑制它?

CTRL+点击链接打开一个新窗口时,是否可以禁止默认的IE 7功能?如果是这样,怎么样?

谢谢!

click ctrl internet-explorer-7

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

在Visual Studio中设置环境变量以进行构建(2008)

我查看了VS的Qt插件生成的一些项目,并注意到他们使用环境变量QTDIR来引用例如Qt头文件.但是我没有弄清楚这个变量的设置位置.我想它必须在项目设置中的某个地方,但是我找不到它.另请注意,我指的是构建期间所需的环境变量,而不是用于调试的环境变量.

qt visual-studio-2008 visual-studio

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

ctrl - ]冻结窗口?

我在Microsoft SQL Server Management Studio 2008中持有ctrl和按]几次有一些问题.不要问我为什么需要这样做,我不这样做,这只是我试图按下的东西.每次我这样做,Microsoft SQL Server Management Studio都会冻结.它不允许我滚动或选择文本.我在Word中尝试了相同的键击(可能它是某种东西的微软快捷方式),但它只是改变字体或类似的东西.

任何人都知道什么ctrl+ ]应该在工具呢?为什么它会冻结?

sql-server-2008

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

将下载的视频复制到相机胶卷

即使它看起来像一个简单的程序,现在是3个小时,我正在尝试没有成功.我可能错过了一些非常愚蠢的东西.

所以,我有这个应用程序从互联网上下载视频.视频正确存储在本地,因为我可以播放它们提供本地网址.但是,我无法成功将视频复制到相机胶卷.这是我做的:

    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
    ALAssetsLibraryWriteVideoCompletionBlock videoWriteCompletionBlock =
    ^(NSURL *newURL, NSError *error) {
        if (error) {
            NSLog( @"Error writing image with metadata to Photo Library: %@", error );
        } else {
            NSLog( @"Wrote image with metadata to Photo Library %@", newURL.absoluteString);
        }
    };

    NSLog(@"file %@", localPath);
    NSURL *url = [NSURL fileURLWithPath:localPath isDirectory:NO];
    [library writeVideoAtPathToSavedPhotosAlbum:url
                                completionBlock:videoWriteCompletionBlock];
Run Code Online (Sandbox Code Playgroud)

但我得到的输出是:

2013-07-24 00:13:32.094 App[1716:907] file /var/mobile/Applications/70C18C4E-9F97-4A6A-B63E-1BD19961F010/Documents/downloaded_video.mp4
2013-07-24 00:13:32.374 App[1716:907] Wrote image with metadata to Photo Library (null)
Run Code Online (Sandbox Code Playgroud)

当然,文件不会保存在相机胶卷中.它是一个简单的mp4,与我正在使用的设备兼容(即应该可以保存它).

老实说,我不知道该怎么做.任何提示都将受到高度赞赏.谢谢

iphone camera objective-c avfoundation ios

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

int []中的未赋值

想知道在C++中int[]通常是什么值的未分配整数.

int arr[5];
arr[1]=2;
arr[3]=4;
for(int i=0;i<5;i++)
{
  cout <<arr[i] <<endl;
}
Run Code Online (Sandbox Code Playgroud)

它打印

-858993460
2
-858993460
4
-858993460
Run Code Online (Sandbox Code Playgroud)

我们知道阵列会在{?,2,?,4,?}哪里?不明.

什么会"?" 通常?

当我测试时,我总是得到负值.我可以假设在C++中,整数数组中的未分配元素总是小于或等于零吗?

如我错了请纠正我.当我在Java中学习时,未分配的数组元素将产生null.

c++ visual-c++

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

从另一个批处理文件中批处理中调用子例程

file1.bat:

@echo off
 :Test
echo in file one
call file2.bat (Here i want to call only Demo routine in the file2.bat)
Run Code Online (Sandbox Code Playgroud)

file2.bat:

:hello
echo in hello
:Demo
 echo in Demo
Run Code Online (Sandbox Code Playgroud)

我想从批处理文件1中调用批处理文件2中的子例程。
我尝试了例如,call file2.bat:Demo但是没有给出正确的结果。

我该如何实现?

batch-file

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

为什么gcc打印"Segmentation fault:11"?

当我使用gcc编译器在程序下面运行时,我最终出现在"Segmentation fault:11"中,但是当我在" https://www.onlinegdb.com/online_c_compiler "运行时,它执行得非常好.我想知道,为什么gcc在这里抛出分段错误?

#include <stdio.h>

int main(){

    typedef int myArray[10];

    myArray x = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29};//Equivalant to x[10]
    myArray y[2]; //equivalant to y[10][2]

    int counter = 0;

    for(int i = 0; i < 10; i++){
        for(int j = 0; j < 2; j++){
            //printf("%i %i\n", i, j);
            y[i][j] = counter++;
        }
    }

    printf("\n\nElements in array x are\n");
    for(int i = 0; i < 10; i++){
        printf("x[%i] = %i\n", i, x[i]);
    }

    printf("\n\nElements …
Run Code Online (Sandbox Code Playgroud)

c gcc

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

窄播有什么作用?

我看到一个代码,使用narrow_cast这样的

int num = narrow_cast<int>(26.72);
cout << num;
Run Code Online (Sandbox Code Playgroud)

问题是我的编译器说:

'narrow_cast' was not decleared in this scope. 
Run Code Online (Sandbox Code Playgroud)

我应该定义narrow_cast自己还是我使用错误的方式或者没有类似的东西narrow_cast

c++ guideline-support-library

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

二进制表达式的无效操作数('int_node' 和 const 'int_node')

我是一个 C++ 初学者,我周围有很多问题。我已经定义了 的!=运算符int_node,但是当我编译这段代码时,显示错误:

二进制表达式的无效操作数('int_node' 和 const 'int_node')

我使用的 IDE 是 xcode 4.6。

下面是我的所有代码

typedef struct int_node{
    int val;
    struct int_node *next;
} int_t;

template <typename Node>
struct node_wrap{
    Node *ptr;

    node_wrap(Node *p = 0) : ptr(p){}
    Node &operator *() const {return *ptr;}
    Node *operator->() const {return ptr;}

    node_wrap &operator++() {ptr = ptr->next; return *this;}
    node_wrap operator++(int) {node_wrap tmp = *this; ++*this; return tmp;}

    bool operator == (const node_wrap &i) const {return ptr == i.ptr;}
    bool …
Run Code Online (Sandbox Code Playgroud)

c++

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

C++ unsigned char数组长度

我在我的C++程序中有六进制值的unsigned char数组:

unsigned char buff[] = {0x03, 0x35, 0x6B};
Run Code Online (Sandbox Code Playgroud)

我想计算这个数组的大小,以便我可以使用这个函数在UART端口linux上发送它:

if ((count = write(file,buff,length))<0)
{
    perror("FAIL to write on exit\n"); 
}
Run Code Online (Sandbox Code Playgroud)

因为我可以看到长度是int数,buff是一个可以在程序执行期间改变大小的数组.任何人都可以帮助我如何写它.谢谢

c++ linux uart

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