问题列表 - 第36969页

如何使用Google Maps API v3获取客户位置?

How do you get Client location using Google Maps API v3? I tried the following code but kept getting the "google.loader.ClientLocation is null or not an object" error. Any ideas why ??

if (google.loader.ClientLocation) {
            alert(google.loader.ClientLocation.latitude+" "+google.loader.ClientLocation.longitude);
        }
Run Code Online (Sandbox Code Playgroud)

Thank You

javascript google-maps

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

What is the max level of inheritance in java?

I was wondering if there is a finite number of time that I can inherit a class? Or what are the factors that can influence this?

java oop

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

C#中的可读C++\CLI异常消息?

以下代码在C++中抛出异常并在C#C++中捕获

 throw std::exception ("a C++ exception");
Run Code Online (Sandbox Code Playgroud)

当我抓住C#时,它给了我以下内容:

[SEHException (0x80004005): External component has thrown an exception.]
Run Code Online (Sandbox Code Playgroud)

这是我如何调用C++代码

using Foo.Bar.Sample; //C++ library

....

Class1 class1 = new Class1(); //C++ class
class1.throwAnException();
Run Code Online (Sandbox Code Playgroud)

只是想知道如何在C#中获得"C++异常"

c# exception-handling c++-cli exception

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

佳能EOS 1000 /尼康+德尔福

我正在寻找一种能够从德尔福控制我的佳能或尼康相机的方法,基本上我需要找到一种方法来接收新的图像,同时相机与USB即时连接,即检测何时拍摄新照片,所以我可以在我的应用程序中采取行动,例如裁剪图像,调整亮度等

我看看佳能的主页,似乎他们没有为欧洲提供SDK.

请建议,任何人?

delphi camera

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

21
推荐指数
3
解决办法
5992
查看次数

指针作为虚拟参数

我对以下程序有些困惑

module test
   implicit none

   type TestType
      integer :: i
   end type

contains
   subroutine foo(test)
      type (TestType), intent(out) :: test
      test%i = 5 
   end subroutine

   subroutine bar(test)
      type (TestType), intent(out) :: test
      test%i = 6 
   end subroutine

end module

program hello
   use test
   type(TestType) :: t

   call foo(t)
   print *, t%i 
   call bar(t)
   print *, t%i 
end program hello
Run Code Online (Sandbox Code Playgroud)

及其衍生物。稍后再谈。正如我们所知,Fortran语言传递程序参数作为一个传递引用,这意味着实体出现在伪参数test两者foobar被许可的堆栈上相同的内存空间program hello。到现在为止还挺好。

假设我在program hello中定义type(TestType) :: t为一个指针,并分配它。

program hello
   use …
Run Code Online (Sandbox Code Playgroud)

pointers fortran90

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

前两页的popviewcontroller

导航控制器中的Popviewcontroller弹出当前页面并将我们发送到上一页.有没有办法弹出两个页面并返回上一页之前的页面(2页后面)或我必须将其推送到该页面.谢谢

iphone

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

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

如何在类中启动ob_start?

我正在做一些关于从PHP最小化html的研究.喜欢

class themeing
{
    function render( $file, $folder )
    {
        if ( COMPRESS ) {
            // this is the problem
            ob_start('compressor'); 
        }

        $get = VIEWS . $folder . '/' . $file . '.phtml';

        if ( COMPRESS ) {
            ob_end_flush();
        }

        return $get;
    }

    function compressor($buffer)
    {
        $search = array(
            '/<!--(.|\s)*?-->/',
            '/\>[^\S ]+/s',
            '/[^\S ]+\</s',
            '/(\s)+/s'
        );
        $replace = array(
            '',
            '>',
            '<',
            '\\1'
        );

        $buffer = preg_replace($search, $replace, $buffer);
        return $buffer;
    }
}
Run Code Online (Sandbox Code Playgroud)

问题是如何调用这个ob_start(函数)?我们可以像ob_start($ this-> compresssor())那样做吗?(好吧,我知道它失败了)在课堂上?任何人 ??

谢谢你的关注.

亚当拉马丹

php ob-start

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

asp.net mvc azure"访问数据存储时出错!"

我已经开始使用AspProviders代码将会话数据存储在我的表存储中.

我偶尔会收到以下错误:

说明:类型"System.Web.HttpException"引发的异常.INNER_EXCEPTION:访问数据存储时出错!INNER_EXCEPTION:处理此请求时发生错误.INNER_EXCEPTION: ConditionNotMet不满足使用HTTP条件标头指定的条件.RequestId:0c4239cc-41fb-42c5-98c5-7e9cc22096af时间:2010-10-15T04:28:07.0726801Z StackTrace:System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar)System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar )INNER_EXCEPTION:\ Azure\AspProviders\TableStorageSessionStateProvider.cs中的Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.ReleaseItemExclusive(HttpContext context,String id,Object lockId):line 484 System.Web.SessionState.SessionStateModule.GetSessionStateItem()System.Web .SessionState.SessionStateModule.PollLockedSessionCallback(对象状态)INNER_EXCEPTION:Microsoft.WindowsAzure.StorageClient.Tasks.Task1.get_Result() Microsoft.WindowsAzure.StorageClient.Tasks.Task1.ExecuteAndWait()Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImplWithRetry [T](Func`2 impl,RetryPolicy policy)Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.ReleaseItemExclusive(TableServiceContext svc,SessionRow session,Object lockId)in\Azure\AspProviders\TableStorageSessionStateProvider.cs:线603 Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.ReleaseItemExclusive(HttpContext的上下文中,串ID,对象lockId)在\天青\ AspProviders\TableStorageSessionStateProvider.cs:线480 INNER_EXCEPTION:System.Data.Services. Client.DataServiceContext.SaveResult.d__1e.MoveNext()

有人碰到这个吗?我发现的唯一有用的信息就是这个,我对此犹豫不决:

如果要绕过验证,可以打开TableStorageSessionStateProvider.cs,找到ReleaseItemExclusive,并修改以下代码:

svc.UpdateObject(会话);

至:

svc.Detach(会话);
svc.AttachTo("Sessions",session,"*");
svc.UpdateObject(会话);

这里开始

谢谢!

所以我决定改变这个:

svc.UpdateObject(会话); svc.SaveChangesWithRetries();

对此:

尝试{svc.UpdateObject(session);

svc.SaveChangesWithRetries();
Run Code Online (Sandbox Code Playgroud)

} catch {svc.Detach(session); svc.AttachTo("Sessions",session,"*"); svc.UpdateObject(会话);

svc.SaveChangesWithRetries();
Run Code Online (Sandbox Code Playgroud)

}

所以,我会看到它是如何工作的......

session azure asp.net-mvc-2

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