This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User(models.Model): | |
name = models.CharField(max_length=200) | |
address = models.CharField(max_length=1000, null=True) | |
login = models.CharField(max_length=16) | |
password = models.CharField(max_length=128) | |
def __unicode__(self): | |
return self.name | |
class SuperUser(User): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hessiancln::DataSourceBrowser browser("https://127.0.0.1/api"); | |
hessiancln::net_item_info_list list; | |
try{ | |
list = browser.networkDiscovery("network"); | |
}catch(hessiancln::invoke_exception& ex){ | |
qDebug() << "DSClientConfigurationMaps::populateGroup" << "Caught Exception: " << QString::fromStdString(ex.what()); | |
} | |
foreach(hessiancln::net_item_info item_info, list){ | |
qDebug() << "DSClientConfigurationMaps::populateGroup" << QString::fromStdString(item_info.name) << " " << item_info.type; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QtCore/QCoreApplication> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <windows.h> | |
#include <lm.h> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct AbstractBucketPrinter{ | |
protected: | |
std::ostream& _stream; | |
public: | |
AbstractBucketPrinter(std::ostream& stream): _stream(stream){} | |
std::ostream& stream() const{return _stream;} | |
}; | |
template <typename T, int DepthN> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
namespace meta{ | |
template <int Begin, int End, bool done = false> | |
struct iterator{ | |
template<typename F> | |
static void iterate(F f){ | |
f(); | |
iterator<Begin, End-1, Begin == End-1>::iterate(f); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace util{ | |
template <class Type, class Param> | |
class has_operator_round_brackets_with_parameter{ | |
public: | |
BOOST_CONCEPT_USAGE(has_operator_round_brackets_with_parameter){ | |
_t(_p); | |
} | |
private: | |
Type _t; | |
Param _p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "config.h" | |
#include <iostream> | |
Config::Config(int data):_pimpl(new Impl(data)){ | |
} | |
Config::Impl::Impl(int data): _data(data){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "config.h" | |
#include <iostream> | |
Config::Config():_pimpl(new Impl), _refCount(1){ | |
} | |
Config::Config(const Config& config): _pimpl(config._pimpl), _refCount(1){ | |
config.ref(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var core = { | |
clone: function(o){ | |
var c; | |
if(typeof o != 'object'){ | |
c = o; | |
}else{ | |
c = {}; | |
for(i in o){ | |
c[i] = this.clone(o[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
U2FsYSBCb2thY2hvZGEgSGFyYW1pIFN1b3JlciBCYWNoY2hhLiBHYXJlIGVrIExhdGhpIE1hcmJl | |
IEdhbmR1IGVraG9uIHRvciBHaHVtIFBhY2hjaGhlID8gYm9sIG5hIGtha2UgYWRkcmVzcyBrb3Jl | |
IExpa2hsaSA/Pw== |