Skip to content

Instantly share code, notes, and snippets.

View jerweb63's full-sized avatar

Jerry Webster jerweb63

View GitHub Profile
#include <stdio.h>
#define CAPACITY 10
typedef enum
{
false,
true
}
bool;
// linked list: inserting at the n'th position
#include "stdio.h"
#include "stdlib.h"
typedef struct Node
{
int data;
struct Node* next;
} Node;
@jerweb63
jerweb63 / forms.py
Last active April 1, 2016 10:54
DJango inlineformset_factory
from django import forms
from .models import Choice, Question
from django.forms.models import inlineformset_factory
#class QuestionForm(forms.Form):
# question_text = forms.CharField(label='Question Text', max_length=100, widget=forms.TextInput(attrs={'class':'vTextField'}))
ChoiceFormSet = inlineformset_factory(Question, Choice, fields=['choice_text'], can_delete=False)