This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
machine: | |
python: | |
version: 2.7.8 | |
dependencies: | |
pre: | |
- sudo apt-get update -qq | |
- sudo apt-get install -qq python-apt python-pycurl | |
- pip install ansible==1.8.2 |
machine: | |
ruby: | |
version: 2.1.3 | |
environment: | |
CODECLIMATE_REPO_TOKEN: 6bd8d374b120a5449b9a4b7dfda40cc0609dbade48a1b6655f04a9bc8de3a3ee | |
ADAPTER: active_record | |
ADAPTER: mongoid | |
dependencies: | |
pre: | |
- gem install bundler |
language: ruby | |
rvm: | |
- 2.1.2 | |
before_install: | |
- gem update --system | |
- gem install bundler | |
- gem --version |
class CompanyInviteView(LoginRequiredMixin, FormView): | |
template_name = 'companies/invite.html' | |
form_class = CompanyInviteForm | |
def form_valid(self, form): | |
name = form.cleaned_data['name'] | |
email = form.cleaned_data['email'] | |
company = self.request.user.companyuser_set.filter( |
class CompanyInviteView(LoginRequiredMixin, FormView): | |
template_name = 'companies/invite.html' | |
form_class = CompanyInviteForm | |
def form_valid(self, form): | |
name = form.cleaned_data['name'] | |
email = form.cleaned_data['email'] | |
company = self.request.user.companyuser_set.filter( | |
company__slug=self.request.kwargs['slug'] |
terminate called after throwing an instance of 'std::logic_error' | |
what(): basic_string::_S_construct null not valid |
def create_key(cls): | |
k = get_random_string(64).lower() | |
while CompanyInvitation.objects.filter(key=k).exists(): | |
k = get_random_string(64).lower() | |
else: | |
return k |
%include <pybuffer.i> | |
#ifdef SWIGPYTHON | |
%pybuffer_string(std::sring temp); | |
%typemap(in) std::string& (std::string temp) { | |
temp = std::string((char*)PyBytes_AsString($input)); | |
$1 = &temp; | |
} | |
bool getFieldName( int field, std::string& name ) const | |
{ | |
FieldToName::const_iterator i = m_fieldNames.find( field ); | |
if(i == m_fieldNames.end()) return false; | |
name = i->second; | |
return true; | |
} | |
bool getFieldTag( const std::string& name, int& field ) const | |
{ |