Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
//Shortcode with Custom Post | |
<?php | |
function accordion_list_shortcode($atts){ | |
extract( shortcode_atts( array( | |
'category' => '', | |
'count' => '5', | |
), $atts, 'wishlist' ) ); | |
$q = new WP_Query( |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
{ | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": "<", | |
"selector": "text.html" | |
}, | |
{ | |
"characters": ".", | |
"selector": "source.js" |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-16"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>invoice copy {% if customers.customer_name %}Customer Name:{{customers.customer_name}}{% else %} |
context = {'customers': customers, | |
'sys_type': sys_type, | |
'area': area, | |
'site_credit': site_credit, | |
'site_name': 'Moon Telecom', | |
'sys_type': sys_type, | |
'due_taka_track': due_taka_track, | |
'total_paid_taka': total_paid_taka, | |
'payment_message': payment_message, | |
'time_now': time_now, |
import codecs | |
from weasyprint import HTML, CSS | |
from django.template import loader,RequestContext | |
from django.template.loader import render_to_string | |
from .forms import AdvanceCustomerForm |
#include<stdio.h> | |
int main(){ | |
int a,b,i=0,x,y; | |
char c; | |
scanf("%d",&y); | |
for(x=0;x<y;x++){ | |
i++; | |
scanf("%d %d %c", &a, &b, &c); | |
if(c=='+'){ | |
printf("Case %d: %d\n",i,a+b); |
class StdCommon(models.Model): | |
pub_date=models.DateTimeField(auto_now=True) | |
update_date = models.DateTimeField(auto_now_add=True) | |
class StdSubject(StdCommon): | |
subject_name = models.CharField('Subject Name', max_length=100) | |
subject_full_marks = models.DecimalField( | |
'Full Marks', max_digits=5, decimal_places=2, default=100) | |
subject_pass_marks = models.DecimalField( |
from django.forms import ModelForm | |
from django import forms | |
class ChildInlineFormSet(BaseInlineFormSet): | |
''' | |
def __init__(self, *args, **kwargs): | |
super(ChildInlineFormSet, self).__init__(*args, **kwargs) | |
# Now we need to make a queryset to each field of each form inline | |
self.queryset = Marks.objects.filter(subject_name__subjet_class=10).order_by('-subject_name') | |
print(self.queryset) | |
''' |
class MarksSubjectInstanceInline(admin.TabularInline): | |
model = Marks | |
fk_name = 'std_name' | |
extra = 2 | |
exclude = ['subject_gradepoint', 'subject_gpa','subject_gpa_sub', 'subject_marks', 'subject_total_marks'] | |
def formfield_for_foreignkey(self, db_field, request, **kwargs): | |
if db_field.name == "subject_name": | |
kwargs["queryset"] = StdSubject.objects.filter(std_subject_class__std_class_name_N__exact=<problem in here I want to math student study class info math>) | |