Free Essay

More Descriptive

In:

Submitted By vishaltahiliani
Words 352
Pages 2
Nustache - Logic-less templates for .NET

*NOTICE*:

I haven't used Nustache in a while and don't have enough bandwidth to responsibly maintain it.
If you depend on Nustache and want committ access, please contat me!

For a list of implementations (other than .NET) and editor plugins, see http://mustache.github.com/. Installation:

- Pull from GitHub or download the repository and build it.
- Or, install via NuGet (search for Nustache).
- If you're using MVC, you'll want to build/install the Nustache.Mvc3 project, too.

Usage:

For non-MVC projects:

- Add a reference to Nustache.Core.dll (done for you if you used NuGet).
- Import the Nustache.Core namespace.
- Use one of the static, helper methods on the Render class.

var html = Render.FileToString("foo.template", myData);

- Data can be object, IDictionary, or DataTable.
- If you need more control, use Render.Template.
- See the source and tests for more information.
- For compiled templates:

var template = new Template(); template.Load(new StringReader(templateText)); var compiled = template.Compile(null);

var html = compiled(fooInstance);

For MVC projects:

- Add a reference to Nustache.Mvc3.dll (done for you if you used NuGet).
- Add NustacheViewEngine to the global list of view engines.
- See Global.asax.cs in the Nustache.Mvc3.Example project for an example.

nustache.exe:

- Command-line wrapper around Render.FileToFile.
- Parameters are templatePath, dataPath, and outputPath.
- Reads JSON or XML from dataPath for data. - If extension is .js or .json, assumes JSON. Must wrap with { }. - If extension is .xml, assumes XML. Initial context is the document element.

nustache.exe foo.template myData.json foo.html

- External templates are assumed to be in the same folder as the template mentioned in templatePath.
- Extension is also assumed to be the same as the template in templatePath.

Syntax:

- The same as Mustache with some extensions.
- Support for defining internal templates:

{{foo}} You can define templates inside sections. They override templates defined in outer sections which override external templates.

Development:

- Build with VS2012 or MSBuild.
- To run the tests that use Mustache specs, run this command from your Nustache clone:

git submodule update --init
Status API Training Shop Blog About

Similar Documents

Free Essay

More Descriptive Title

...COMMONWEALTH OF MASSACHUSETTS BUNKER HILL COMMUNITY COLLEGE CHARLESTOWN, MASSACHUSETTS COMPUTER TECHNOLOGY DEPARTMENT CIT1xx SUPPORT NETWORK ASSIGNMENT BACKGROUND: Support Network helps each student connect to College People & Services. DIRECTIONS PART I: The tools available in this section will allow you to explore College Resources 1. Go To http://www.bhcc.mass.edu/portal/ Log In… Explore Each Of the Support Network Links as follows: Computer Lab More than 382 student computers in several locations. College Connection Work with coaches to build your reading comprehension and vocabulary skills. Language Lab Access tutors and technology to enhance your language skills. Math Lab Utilize technology to strengthen your math skills. Student Activities Join a student club and become more involved with your peers. Student Disability Services Tutoring and technology available for students with documented disabilities Student Success Program Participants have access to a wide range of support services. Chelsea Campus Center for Student Success and Access The hub of student support services offered at the Chelsea Campus. Tutoring and Academic Support Center (TASC) Access tutors and technology for help in your course. Veterans Center Supports and resources available for veterans. Library and Learning Commons Learning Commons delivers services crucial for student success, including Information Literacy instruction, quality resource selection...

Words: 551 - Pages: 3

Premium Essay

More Descriptive Title

...My study skills are horrible but this time around I plan on trying to focus more and try not to study all at the last minute so that ill have plenty of time to review all material.   My time-management skills are pretty good. I don't like rushing to get things done, so I set a schedule so that everything gets completed.   I already have some college level experience so I know what my papers and assignments should look like.   With my first school I lacked the motivation. I was just going to school just because. I didnt have no real purpose either. This time around im more motivated because I want to complete this so that my son will see that he can do it to!   This is definitely not an obstacle for me because I love to write papers, and just doing my assignments. It motivates me more when I know I got it done and its college-level and on time.   Math is my weaker subject. So I plan to over come this by studying harder and receiving help from a couple of tutors and my instructors.   Test taking is also a strong skill for me so I tend not to worry that much about big test or test at all.   This obstacle is not really an obstacle for me. I am knowledgeable when it comes to computer and computer programs.   This is always an obstacle because I really do not like school, but I know I need school to get a better career. I plan to overcome this by staying positive, and working hard so that I do not fall behind or get...

Words: 280 - Pages: 2

Free Essay

Hey a More Descriptive

...Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf fjdks Sup dude hey man what u doing a a a a a a v v v d d e dd s;oakj klj ijfkl;asf...

Words: 286 - Pages: 2

Free Essay

A More Descriptive Title

...My second shift starts in fortyfive minutes. The ones with dimentia could be called the reason I got into this business. That and the fairly simple job requirements. When I was getting out of the Army a fairly grey~area opportunity was presented to me. I was looking to secure my future and point my life in the right direction. The guy next to me in the mandatoy class we all had to go theough to end our contacts told me about his wife. I hadnt met her but her story had inspired my corrupt and eager mind. This woman* laura* had gotten into hospice care. For those of you unfamiliar with the field* generally hospice deals with terminally ill and very elderly patients. At that point which was about two years into her contract* she had been left a several thousand dollars* a BMW* and a the bedroom two bathroom HOUSE on the emerald coast. It was mindblowing. So manyu families just give up near the end and the one the patient cares about is the one who seems to care. I dont know Lauras motives. Nobody goes into this soul wrenching practice hoping to make some easy money. Nobody but me. Every Day I put on my plain white uniform and go to work as a sort of bouncer. I dont work at a ritzy night club or private security. The government signs my checks. I dont kick rich kids out of bars. I am often tasked to make sure our clients DONT leave. Hired muscle and a pretty face. Fouty two minutes. I might not have time to get to the gas station to take my morning redbull dosage. This is going...

Words: 1069 - Pages: 5

Free Essay

A More Descriptive Title

...NAME ___ANSWER KEY_____________________________________ CH. 10 STUDY GUIDE-REGULAR SECTION 1: MEIOSIS In your textbook, read about meiosis I and meiosis II. Label the diagrams below. Use these choices: |anaphase I |anaphase II |interphase |metaphase I |metaphase II | |prophase I |prophase II |telophase I |telophase II | | |1. prophase I |2. prophase II |3. telophase II |4. interphase |5. anaphase I | |6. telophase I |7. anaphase II |8. metaphase I |9. metaphase II | 10. Using the pictures & phases above, describe what is happening in each phase: a. Interphase: G1 – cell grows; S-DNA is duplicated; G2 – cells grows & makes sure all the organelles are duplicated. b. Prophase I: nuclear membrane breaks down; nucleolus disappears; centrioles begin to migrate to opposite sides of the cell; spindle fibers begin to form; homologous chromosomes form; crossing over occurs c. Metaphase I: homologous chromosomes are lined up down the middle of the cell d. Anaphase I: homologous chromosomes are pulled apart & sister chromatids are pulled to opposite sides of the cell, cell has gone from diploid to haploid e. Telophase I: nuclear membrane reforms, nucleolus reappears; spindle fibers disappear;...

Words: 1200 - Pages: 5

Premium Essay

Breaking the Social Norm

...lives by. If there were no standards, then society would not be able to be maintained correctly. People have freedoms and liberty, but they know their limits. To have these social norms help us to live comfortably in a society together. I decided to break the norm by standing up the whole time in my history class, even though there were plenty of seats available. First of all I discussed it with my teacher, so he would understand what I was doing. Except I told him that I did not want anyone knowing about it. I entered the classroom, then sat my things at my desk, and then stood up with my notebook and pen. When the teacher came into the room and put up our notes to copy, I started writing. Which, by the way, was very difficult. More students began entering the classroom, their responses to what I was doing at first, were just weird looks. I did not mind the looks, because I was laughing on the inside. It seemed to blow the students minds because I was standing up. It was amazing to me that I was doing just a little thing out of the normal routine, and everyone acted as if I were doing something wrong. After about 10 minutes into class, I started hearing little whispers between the students. They were asking each other what I was doing. I actually done a lot better than I thought that I would be able to do, because when the students started...

Words: 442 - Pages: 2

Free Essay

Gone Baby Gone

...This film explores the concepts of the complexities of legal ethics and grey areas. There were many situations in this film that displayed “grey area cases”. The first example was when Remmy Bressant admitted to planting evidence. Though this is legally wrong, morally, he did what he thought was the best for the child. He said that he only did it because he wanted to give the child another chance at life. Another situation that dealt with legal ethics was when Patrick shot and killed the man who molested Johnny. Obviously, you cannot kill someone who raises both of their arms. However, morally, he did what he wanted to. Morally, he thought that he deserved to die. And finally, the most “grey” of all situations was when Lieutenant Doyle and Remmy Bressant teamed up together. Doyle kidnapped a child. It is against the law to kidnap a child. Just because morally, it may have been the best for Amanda, it does not make it legal. I think that there is a very fine line between always adhering to the rules and going with our morals. The thing is that, our moral are somewhat based on the rules set by society. We form our morals based off societal norms thus, most of the time, by adhering to your morals, you are also adhering to the laws. However, we can see that in some cases this is not true. Therefore, I believe that you should adhere to the rules. Everyone’s morals are different. So, if everyone were to follow their morals over the law, it would all become too chaotic. People would...

Words: 763 - Pages: 4

Premium Essay

Cultural Foundations Ii

...of people. The dictionary definition of “right” is something that is “morally or socially correct or acceptable,” but there is a conflict that arises between the two factors of the word. General morality may derive from a universal set of principles, while social mores are laws and standards that are relative to groups of people. This conflicting definition enables the meaning of “right” to be ambiguous. Thus, an act can be morally wrong, but socially right, or vice versa. The ambiguity of justice has influenced philosophers such as Sophocles to explore the true definition of justice by writing tragedies such as Antigone, where a clash between the morally correct and the socially correct is purposefully staged to spark questions on the true meaning of justice, morality, and ethics. Sophocles’ writing can also be analyzed through the ideas of other philosophers such as Confucius and Nagel in order to see how the overarching ideas of philosophers from different cultures and eras converge to challenge the same ideas. Ultimately, through Antigone, I want to try to show that the definition of right and wrong can be more focused if one eliminates or challenges law and takes the human natural intuition to act morally into more...

Words: 254 - Pages: 2

Premium Essay

Examples Of Informal Norms

...Norms are based on your behavior. Norms can be put into many groups. Informal norms are everyday behavior. They aren’t written down and can be as common as saying “good morning” and washing your hands or saying a prayer before you eat. Formal norms are written down into a law, which, if broken you will face a punishment. Examples of formal norms are do not steal from a store or do not speed. We enforce norms by sanctions. Sanctions can be positive or negative. Positive sanctions could be as simple as smiling at somebody or as formal as receiving a raise. Negative sanctions could be a frown or going to prison. Society adapts the norms to the world around them. For example, people in Texas don’t need to wear the same winter apparel as people in Colorado. Norms are important in society because they regulate our everyday life. Our days are based on norms. I broke the norm of how I greet my friends every day. I did it by simply walking up to my friends, shaking their hand and saying, “Hey, How’s it going?” This took place on future freshmen day, which was on September 29, 2017. This took place at Saxony Lutheran High School in the science and math hallway. Most people who was around was my friends and other students at my school that I didn’t know. People were reacting by looking at their friends and laughing. They would ask me why I was doing this. They would give their friends a weird look. They would respond to my question, but hesitate before answering. Despite the...

Words: 549 - Pages: 3

Premium Essay

Marketing Research

...(with rating scales if appropriate)). The questionnaire should be formatted that is inclusive of all the prescribed parts of a marketing research questionnaire starting with opening comments that should be verbalized when approaching fishermen who are launching their boats. (35 points) RESEARCH QUESTIONNAIRE Thank you for your help with our research. The following questions serve as a guide to collect information as you test our exciting new product. We are very interested in your experience and your opinions. At the end of these, please feel free to add your own comments. We realize there may be no definitive answers to any of these questions, but as an experienced fisherman, you have a very good general idea. We are looking more for trends and opinions based on your expertise. 1. What time of day were you fishing? Before 6:00 am 12:00pm – 4:00 pm 6:00 am - 8:00 am 4:00 pm – 6:00 pm 8:00 am - 10:00 am 6:00 pm – 8:00 pm 10:00 am – 12:00 pm After 8:00 pm 2. What would you pay for something that increased your catch 300-800%? Would you pay P500.00? Would you pay P200.00? Would you pay P400.00? Other P_____________ Would you pay P300.00? 3. Do you prefer…: Gold Silver Metallic Red Metallic Green Clear Other ______________ Why? _____________________________________________________________________ 4. In a scale of 1 to 10, where 1 being poor and ten being excellent, how would you rate...

Words: 1669 - Pages: 7

Premium Essay

Social Norms

...The social norm I chose to violate was to sit in an empty chair at an otherwise occupied table. I chose a table occupied by three people in a coffee shop in Portland, Oregon. There was not much of a reaction to the social norm violation I committed. The people at the table just looked at me for a moment. After an awkward moment of silence the people at the table said hello and made small talk with me. They were very friendly and easy going. They did not seem to mind that I sat at their table uninvited. After speaking for a few minutes I explained to them that this was a psychology assignment and let them read the assignment. The people at the table were somewhat confused as to why such a thing would be assigned by a college professor. They explained that they felt it was inappropriate for a teacher to ask students to put themselves into any of the listed situations. All the people stated they were not offended by someone actually doing these things. They were bothered that students were required to violate any of the “so-called social norms on the list”. I found my actions to be rude and inconsiderate. I would not like it if someone came over and sat at my table uninvited. Maybe someone wants to have a private conversation with the others at the table. Maybe someone is on a date and wants to be alone. Maybe the people at the table are criminals. Maybe the people do not care if someone sits at their table uninvited. The bottom line is that for me it was uncomfortable...

Words: 429 - Pages: 2

Free Essay

Selling Starbucks in the Forbidden City

...Philosophy 484 Professor Neiman 3/22/12 “Selling Starbucks in the Forbidden City” Ever since the Starbucks retail outlet has opened in the “Forbidden City” of Beijing, China, there has been a huge controversy over whether this store deserves to be in this sacred area of China’s history. I believe that Starbucks has a moral obligation to operate a retail store in the “Forbidden City.” The first objection from some Chinese citizens is that Starbucks is highly considered an American brand, and that American commerce is destroying Chinese culture that they claim goes back 5000 years. In some cases, people may believe that the Chinese have the cultural right to maintain their culture in places of great history, which would definitely apply to the Forbidden city Museum. This claim against Starbucks contradicts this statement somewhat since there are already thousands of stores in the museum. If the Chinese would have wanted to keep the Forbidden City sacred, you would think that they would have not allowed any stores in the area to keep it original so everyone could see the real history behind the place. Some may counter by saying that Chinese stores should only be allowed simply because it is already part of the Chinese Culture. In the case, it states that there are shops that sell American products, such as coke, cookies, and other merchandise. Wouldn’t this be considered American products and upset some Chinese citizens since it is considered American and not part...

Words: 829 - Pages: 4

Premium Essay

Ethical Relativism

...Ethical relativism Ethical relativism is when an action that is being practiced is thought to be moral in one country but can be immoral and made illegal in another country. Whether it is right or wrong depends on the social norm in that culture or part of the world. There is no universal moral standard or global law that the world has to abide by at all times. Ethical relativism can also be based on personal moral beliefs based on emotion rather than reason. The reason why ethical relativism is so pervasive in American society is because the United States is occupied with many different races and culture from all around the world. It is also a country where you have the freedom to do what you want within reason. You have a country where people are going to bring their beliefs here whether right or wrong. Also, people who were born here were taught a certain way growing up. I believe that this goes back to personal beliefs you have as a person. As people grow up, they tend to think for themselves and start to have personal beliefs and emotions whether they are right or wrong on something. I believe that people eventually will do what they even thought they know it’s morally wrong. For example, serial killers kill people and they know it morally wrong and illegal to do so but they still do it because personally they feel the act is justified for whatever reason. Another example is in a show called “Dexter”, where the main character Dexter is a serial killer. His...

Words: 329 - Pages: 2

Premium Essay

B Reaking Social Norms

...Charmaine Williams Professor Mitchell Sociology 1101 September 8, 2014 Breaking a Social Norm When asked to write a response paper on breaking a social norm, it was very hard for me to choose one that wouldn’t get me arrested or in a lot of trouble. I eventually came up with an idea an experiment to see people’s reactions to something that society considers a social norm. According to society social norms are the rules that we live by that dictate right and wrong behavior within our society. The social norms are also subject to some sort of punishment. In order to understand why my actions were considered to be breaking a social norm, I obtained permission from the general manager at The AMC Sony Imax Movie Theater in Stonecrest Mall to conduct an experiment. I will explain why, ringing cell phones, and telling other patrons the movie, or holding conversations with others is considered breaking a social norm not to mention an embarrassing experience when you get put out of the theater. On Friday September 5, 2014 I took my kids to the movies to see the movie LUCY. While there I sat next to some patrons while my cell phone rang and echoed through the theater, then I proceeded to answer my phone and carry on a conversation with the other person on the phone. The next thing I did was get up and move my seat next to another patron and began telling him everything that was about to happen in the movie. I laughed really loud and obnoxiously at parts of the movie that weren’t...

Words: 663 - Pages: 3

Premium Essay

Joys of Motherhood

...Term Paper The novel ‘joys of motherhood’ has brought different questions to light, with its clever plot of flash back on flash back and the clear illustration of themes and morals in the novel. The novel is said to be the best of the author, Buchi Emecheta’s collection. Nnu ego, the main character of the novel shows us the unfamiliar side where the relationship of females to motherhood, and how our cultural norms provide basics for judgement by humans. The novel rejects the feminist codes normally associated with motherhood. In the world we live in, we come across different societal cultures and norms, in this very essay we discuss the negative aspects of women adhering to societal norms and how women all round the world are likely to end up like Nnu Ego. Nigeria is a larger country with different cultures where some believe the first born child must be a girl, while others also believe in sending off their female children as soon as their ready for marriage. Such actives have been responsible for many societal problems faced in Nigeria. The novel by Buchi Emecheta shows us the violence that our culture causes makes people to develop some kind of violence against people who do not follow cultural norms, a good example was when it was time for Agunwa to be buried, Nwokocha Agbadis eldest wife who is said to have died due to the unpleasant scene of her husband and Ona. It’s a culture in their land that the personal slaves of Agunwa be buried with her as she will need them...

Words: 2021 - Pages: 9