代码搜索:singleton
找到约 4,696 项符合「singleton」的源代码
代码结果 4,696
www.eeworm.com/read/142793/12918956
cpp singletonpattern.cpp
//: C10:SingletonPattern.cpp
// From "Thinking in C++, Volume 2", by Bruce Eckel & Chuck Allison.
// (c) 1995-2004 MindView, Inc. All Rights Reserved.
// See source code use permissions stated in t
www.eeworm.com/read/142793/12918980
cpp singletonpattern2.cpp
//: C10:SingletonPattern2.cpp
// From "Thinking in C++, Volume 2", by Bruce Eckel & Chuck Allison.
// (c) 1995-2004 MindView, Inc. All Rights Reserved.
// See source code use permissions stated in
www.eeworm.com/read/329331/12960109
m min.m
%列状数据最小值
%例如
% A=[11 4 0.2;22 3 0.5;0 3 0.4];
% min(A)
%
%MIN Smallest component.
% For vectors, MIN(X) is the smallest element in X. For matrices,
% MIN(X) is a row vector contain
www.eeworm.com/read/329331/12960645
m max.m
%列状数据最大值
%例如
% A=[11 4 0.2;22 3 0.5;0 3 0.4];
% max(A)
%
%MAX Largest component.
% For vectors, MAX(X) is the largest element in X. For matrices,
% MAX(X) is a row vector containin
www.eeworm.com/read/329331/12960711
m diff.m
function X = diff(X,order,dim)
%1.数值差分
% 对向量n维X,diff(X)返回[X(2)-X(1) X(3)-X(2) ... X(n)-X(n-1)]
% 例 x=[1 3 8];diff(x)
%
%2.符号导函数
% diff(s)符号表达式s的导数.
% diff(s,v)符号表达式s关于变量v的导数.
www.eeworm.com/read/140545/13076867
cpp curioussingleton.cpp
//: C10:CuriousSingleton.cpp
// Separates a class from its Singleton-ness (almost)
#include
using namespace std;
template
class Singleton {
public:
static T& instance()
www.eeworm.com/read/140545/13076888
cpp singletonpattern.cpp
//: C10:SingletonPattern.cpp
#include
using namespace std;
class Singleton {
static Singleton s;
int i;
Singleton(int x) : i(x) { }
Singleton& operator=(Singleton&); // Di
www.eeworm.com/read/140545/13076891
cpp singletonpattern2.cpp
//: C10:SingletonPattern2.cpp
// Meyers' Singleton
#include
using namespace std;
class Singleton {
int i;
Singleton(int x) : i(x) { }
void operator=(Singleton&);
Singleton
www.eeworm.com/read/238749/13327101
cpp main.cpp
#include "Singleton.h"
#include
using namespace std;
int main(int argc,char* argv[])
{
Singleton* sgn = Singleton::Instance();
return 0;
}
www.eeworm.com/read/313005/13599592
java regsingletontest.java
package com.javapatterns.singleton.demos;
public class RegSingletonTest
{
public static void main(String[] args)
{
//(1) Test eager
//System.out.println( EagerSinglet