问题列表 - 第35139页

vb6程序的许可要求是什么

我的一位朋友正在用 vb6 制作商业程序,向最终用户出售应用程序是否需要任何许可证。他拥有 vb6 开发人员许可证。

vb6 licensing

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

AS3自定义对象到ByteArray然后到自定义对象

读取自定义对象的bytearray时遇到问题.任何帮助表示赞赏

public class CustomObject extends Object {
public function CustomObject() {
public var _x:Number =  100
public var _y:Number = 10
public var _z:Number  = 60
}
}

var cObj:CustomObject = new CustomObject()
var bytes:ByteArray = new ByteArray()
bytes.writeObject(cObj)
bytes.compress()

//read
try { bytes.uncompress() } catch (e:Error) { }
var obj:CustomObject = bytes.readObject() as CustomObject

trace(obj) // null why?!
trace(obj._z) // Obviously - TypeError: Error #1009: Cannot access a property or method of a null object reference. 
Run Code Online (Sandbox Code Playgroud)

bytearray object actionscript-3

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

如何正确释放AVCaptureSession

我正在使用AV Foundation类从相机捕获实时视频流并处理视频样本.这很好用.但是,一旦完成,我确实无法正确释放AV基础实例(捕获会话,预览层,输入和输出).

当我不再需要会话和所有关联对象时,我会停止捕获会话并释放它.这大部分时间都有效.但是,有时应用程序崩溃时会在调度队列(以及处理视频样本的位置)创建的第二个线程中引发EXEC_BAD_ACCESS信号.崩溃主要是由于我自己的类实例,它作为样本缓冲区委托,并在我停止捕获会话后被释放.

Apple文档提到了问题:停止捕获会话是一种异步操作.那就是:它不会立即发生.特别是,第二个线程继续处理视频样本并访问不同的实例,如捕获会话或输入和输出设备.

那么如何正确释放AVCaptureSession和所有相关实例呢?是否有通知可靠地告诉我AVCaptureSession已完成?

这是我的代码:

声明:

AVCaptureSession* session;
AVCaptureVideoPreviewLayer* previewLayer;
UIView* view;
Run Code Online (Sandbox Code Playgroud)

实例设置:

AVCaptureDevice* camera = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeVideo];
session = [[AVCaptureSession alloc] init];

AVCaptureDeviceInput* input = [AVCaptureDeviceInput deviceInputWithDevice: camera error: &error];
[session addInput: input];
AVCaptureVideoDataOutput* output = [[[AVCaptureVideoDataOutput alloc] init] autorelease];
[session addOutput: output];

dispatch_queue_t queue = dispatch_queue_create("augm_reality", NULL);
[output setSampleBufferDelegate: self queue: queue];
dispatch_release(queue);

previewLayer = [[AVCaptureVideoPreviewLayer layerWithSession: session] retain];
previewLayer.frame = view.bounds;
[view.layer addSublayer: previewLayer];

[session startRunning];
Run Code Online (Sandbox Code Playgroud)

清理:

[previewLayer removeFromSuperlayer];
[previewLayer release];
[session stopRunning];
[session release];
Run Code Online (Sandbox Code Playgroud)

iphone camera multithreading avfoundation ios

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

Git push -f vs. +

做的有什么区别:

 git push -f origin my-branch:my-branch
Run Code Online (Sandbox Code Playgroud)

 git push origin +my-branch:my-branch
Run Code Online (Sandbox Code Playgroud)

git

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

Android开发:如何使用onKeyUp?

我是Android开发的新手,我似乎无法找到关于如何使用onKeyUp监听器的好指南.

在我的应用程序中,我有一个很大的EditText,当有人按下并释放一个键,EditText我想调用一个函数,将执行正则表达式EditText.

我不知道我是如何使用onKeyUp的.有人可以告诉我怎么样?

java android onkeyup

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

cd可执行文件的位置

我读到使用exec()调用发出的命令的可执行文件应该存储在属于PATH变量的目录中.

因此,我找到了ls, chmod, grep, cat/ bin中的可执行文件.

但是,我找不到可执行文件cd.

它在哪里?

linux exec

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

使用Linq解析文本文件

我有一个下面格式的日志文件,因为您可以看到每个日志以时间开始并以管道分隔符结束.

将每个日志以dateTime开头,并以List中的管道分隔符结束

如何解析此文本文件并将日志放入集合中?我似乎在确定如何找到日志的开头和结尾并在每个日志中读取它时遇到问题

下面是一个简单的例子来说明我想要做的事情.任何指针帮助等...真的很感激

记录示例

        08:52:03.260|Error| Stack Trace and other info removed here|
        lots of info about the  stack trace
        lots of info about the  stack trace
        lots of info about the  stack trace
        lots of info about the  stack trace
        lots of info about the  stack trace|  
       09:52:03.260|Error| Stack Trace and other info removed here|
        lots of info about the  stack trace
        lots of info about the  stack trace
        lots of info about the  stack trace
         lots of info …
Run Code Online (Sandbox Code Playgroud)

linq

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

Google Maps API地图未显示

我在使用Google Maps API时无法显示地图.我正在尝试构建一个应用程序,它不会在那里工作,但它在我已经制作的测试页面中也被破坏了.有谁知道我做错了什么?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
    console.log("Initializing...");
  var latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
}
</script>
</head>

<body onload="initialize()">
<div id="map_canvas" style="height: 100%; width: 100%;"></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助.我很困惑!

javascript google-maps google-maps-api-3

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

在tuProlog中执行查询时出错

我下载了tuprolog,我无法得到以下查询的结果,而我在PROL ide中得到答案..有人可以帮忙吗?

verb(admit-1).
verb(work-4).
nsubjpass(admit-1, patient-2).
agent(admit-1, doctor-3).
nsubj(work-4, who-5).
aux(work-4, be-6).
rcmod(doctor-3, work-4).
prep_in(work-4, clinic-7).


aggregation('part of').
aggregation('belongs to').
aggregation('subdivision of').
aggregation('have').
aggregation('contain').
aggregation('comprise').
aggregation('include').
aggregation('define').
aggregation('consist of').
aggregation('compose of').
aggregation('denote by').
aggregation('identify by').
aggregation('make up of').
aggregation('record with').

attribute('have').
attribute('contain').
attribute('comprise').
attribute('include').
attribute('define').
attribute('consist of').
attribute('compose of').
attribute('denote by').
attribute('identify by').
attribute('make up of').
attribute('record with').

generalization('be').
generalization('kind of').
generalization('type of').
generalization('classify into').
generalization('consider').

object(X) :- noun(X).
relation(X) :-  verb(X).
rel(X,Y) :- nsubjpass(X,Y).
rel(X,Y) :- agent(X,Y).
rel(X,Y) :- …
Run Code Online (Sandbox Code Playgroud)

java prolog tuprolog

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

鼠标悬停时更改背景颜色,鼠标移除后将其删除

我有班级的班级forum.我的jquery代码:

<script type="text/javascript">
    $(document).ready(function() {
        $('.forum').bind("mouseover", function(){
            var color  = $(this).css("background-color");

            $(this).css("background", "#380606");

            $(this).bind("mouseout", function(){
                $(this).css("background", color);
            })    
        })    
    })
</script>
Run Code Online (Sandbox Code Playgroud)

它非常有效,但是没有它可以更有效地完成它var color = $(this).css("background-color");.刚mouseout离开之前的背景颜色并删除#380606?谢谢.

mouse jquery mouseover mouseout

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