- A recent version of Node.js
npm install -g create-react-app
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
""" | |
User authentication test cases | |
""" | |
from rest_framework.test import APIClient | |
from rest_framework import status | |
from django.core.urlresolvers import reverse | |
class UserAuth(TestCase): |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
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
// A type may have a method set associated with it. The method set of an interface type is its interface. | |
// type T | |
// The method set of any other type T consists of all methods declared with receiver type T. | |
package main | |
import ( | |
"fmt" | |
) |
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
// type *T | |
// The method set of the corresponding pointer type *T is the set of all methods declared with receiver *T or T (that is, it also contains the method set of T). | |
package main | |
import ( | |
"fmt" | |
) | |
type Person struct { |
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
//NOte you can easily swap the storage for your database without changing much of the code | |
package main | |
import ( | |
"fmt" | |
) | |
type user struct { | |
first string | |
} |
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
//create a file `file-01.txt` in the same directory with some content to get started | |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { |
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
// Given an array of integer numbers, we need to find | |
// maximum size of a subset such that sum of each pair | |
// of this subset is not divisible by K. | |
// Examples : | |
// Input : arr[] = [3, 7, 2, 9, 1] | |
// K = 3 | |
// Output : 3 | |
// Maximum size subset whose each pair sum | |
// is not divisible by K is [3, 7, 1] because, |
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
package main | |
import ( | |
"context" | |
"fmt" | |
) | |
type key int | |
var userKey key = 0 |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
) | |
func main() { | |
ctx := context.Background() |
OlderNewer