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 <stdio.h> | |
#define CAPACITY 10 | |
typedef enum | |
{ | |
false, | |
true | |
} | |
bool; |
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
// linked list: inserting at the n'th position | |
#include "stdio.h" | |
#include "stdlib.h" | |
typedef struct Node | |
{ | |
int data; | |
struct Node* next; | |
} Node; |
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
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) |