What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-02 17:25:21
how to implement binders and decorators on c++ lik python?
#include <iostream> #include <functional> /* Decorator function example, returns negative (! operator) of given function */ template <typename T> auto reverse_func(T func) { auto r_func = [=](auto ...args) { retu... Add solution -
Other 2022-02-28 18:55:05
django forms views.py
from django.http import HttpResponseRedirect from django.shortcuts import render from .forms import NameForm def get_name(request): # if this is a POST request we need to process the form data if request.method == 'POST': # create a form... Add solution -
Other 2022-02-26 13:30:03
complex pattern in c
#include /* * nos = Num. of spaces required in the triangle. * i = Counter for the num. of characters to print in each row * skip= A flag for check whether to * skip a character in a row. * */int triangle(int nos, int i, int skip) { char prnt = '*... Add solution -
Java 2022-02-26 09:45:05
box layout java
JScrollPane listScroller = new JScrollPane(list); listScroller.setPreferredSize(new Dimension(250, 80)); listScroller.setAlignmentX(LEFT_ALIGNMENT); ... //Lay out the label and scroll pane from top to bottom. JPanel listPane = new JPanel(); listPane.setLa... Add solution -
Html 2022-02-22 14:10:04
html details tag
<!DOCTYPE html> <html> <body> <h1>The details tag</h1> <details> <summary>(Summary)</summary> <p>(Details)</p> </details> <!-- Details + Summary tag works well together, details i... Add solution -
Java 2022-02-20 07:35:23
encapsulation in java
Encapsulation in Java is a mechanism to wrap up variables and methods together as a single unit. It is the process of hiding information details and protecting data and behavior of the object. It is one of the four important OOP concepts. The encapsulat... Add solution