- List all databases:
db.getMongo().getDBNames();
show databases
show dbs| ########################################################## | |
| # Relationship: One-to-One | |
| # Tables: Instructor - Spree::User | |
| # User has one Instructor | |
| ########################################################## | |
| # in app/models/instructor.rb | |
| class Instructor < ActiveRecord::Base | |
| belongs_to :spree_user, :class_name => 'Spree::User' | |
| end | |
| # in migration file: |
api guide link: https://guides.spreecommerce.com/api/
useful link: https://guides.spreecommerce.com/user/configuring_taxonomies.html
Taxonomies are the Spree system’s approach to category trees. The heading of a tree is called a Taxonomy. Any child branches are called Taxons. Taxons themselves can have their own branches.
Taxonomy represents an entire tree, whereas Taxons are the nodes that make up that tree.
| // File: Tut1.java | |
| // Every java program must have at least on class | |
| public class Tut1 { | |
| // Every every Java program must have just one main | |
| public static void main(String[] args) { | |
| // "123 ana programmer" is a String | |
| // Java is case-sensitive | |
| // ("123 ana programmer") now the string is passed as an argument |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>Cafe Pizza</title> | |
| <style> | |
| body{ | |
| margin-left: 30px; | |
| } | |
| #el9ora1{ | |
| height: 250px; |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>Cafe Pizza</title> | |
| </head> | |
| <body> | |
| <h1>Cafe Pizza</h1> | |
| <h3>Coffee and Pizza. Allah!</h3> | |
| <p>Menu:</p> | |
| <ul> |
| <!DOCTYPE HTML> | |
| <html> | |
| <head></head> | |
| <body> | |
| <h1>Cafe Pizza</h1> | |
| <h3>Coffee and Pizza. Allah!</h3> | |
| <p>Menu:</p> | |
| <ul> | |
| <li>Turkish Coffee 5KD</li> | |
| <li>Pizza 10KD</li> |
| import glob | |
| import re | |
| import fileinput | |
| # will insert/inject this | |
| code = "\n\t\t\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\n" | |
| #code += "\t\t\t\tgetSupportActionBar().setCustomView(R.layout.custom_actionbar);\n" | |
| #code += "\t\t\t\tActionBar actionBar = getSupportActionBar();\n" | |
| #code += "\t\t\t\tactionBar.setHomeButtonEnabled(true);\n" |
| # this is a comment | |
| a = 1 | |
| print a | |
| print "value of a is: "+ str(a) | |
| # define function, take no arguments, just print | |
| def func1(): |