07 2014 档案
摘要:As we saw in the video, redis can do more than just simple key-value pairs. We are going to be using redis lists later to add persistance to our live-
阅读全文
摘要:Let's start practicing using the redis key-value store from our node application. First require the redismodule, and then create a redis client that w
阅读全文
摘要:Clients can also answer each other questions, so let's build that feature by first listening for the'answer' event on the client, which will send us b
阅读全文
摘要:Below we've already created an express server, but we want to start building a real-time Q&A moderation service and we've decided to use socket.io. Re
阅读全文
摘要:Now let's create an express server which queries out for this search term and just returns the json. You'll need to do a few things: Require the expre
阅读全文
摘要:Let's create a page which calls the twitter search API and displays the last few results for Code School. The first step is to construct the proper UR
阅读全文
摘要:Instead of just writing out the quote to the response, instead render the quote.ejs template, passing in the quote name and quote body. Then finish th
阅读全文
摘要:Create a route that responds to a GET request '/quotes/<name>', then use the param from the URL to retrieve a quote from the quotes object and write i
阅读全文
摘要:Create an express route that responds to GET requests at the URL /tweets that responds with the filetweets.html located in the same directory as app.j
阅读全文
摘要:Update the versions on your dependencies to be a little more flexible, adding the ~ in front of your versions. package.json { "name": "My Awesome Node
阅读全文
摘要:Add two dependencies to your package.json file, connect and underscore. You'll want to useconnect version 2.2.1 and underscore version 1.3.3. package.
阅读全文
摘要:Even though we knowpipedoes all the heavy lifting for us when dealing with backpressure, it's still a good idea for us to know about what is going on....
阅读全文
摘要:We can use this built in $http Service to make requests to a server(or in our case a json file). Give our StoreController access to the products using...
阅读全文
摘要:After that we will need a way to encapusulate our directives in order to give our app access to them. We can use a module to do this! It is time for M...
阅读全文
摘要:Now that we've separated the Product Tabs, why not separate the Gallery too?Create an element directive called productGallery.Tell your new directive ...
阅读全文
摘要:We feel like the Product Tabs section could be better managed if it were a directive.Create an element directive called productTabs. app.directive('p...
阅读全文
摘要:As you probably have noticed, we have built out more information on the specs tab. Let's refactor the contents of our specs div into an attribute dire...
阅读全文
摘要:Instead of using ng-include, lets create a custom directive called productDescription.Create an Element Directive for our Description div that include...
阅读全文
摘要:Notice that we have created an empty html file called product-description.html. Separate out the Description Tab's content into the new html file. Inc...
阅读全文
摘要:It's time to show when a review was created using thecreatedOnproperty. Follow the task below to add this in.On review save, we're running theaddRevie...
阅读全文
摘要:Use the fancy directives you just learned to validate the new review form.Turn off default HTML validation.Mark stars & author as required fields. ...
阅读全文
摘要:Assign the review controller we just created to our form and use the aliasreviewCtrlto reference it inside the form. On submission of the form save th...
阅读全文
摘要:Create a ReviewController and inside of it an empty review ripe for the stuffing! Then below that create the functionality to create new reviews.Creat...
阅读全文
摘要:Flatlander Crafted Gems – an Angular store – {{product.name}} {{product.price | cu...
阅读全文
摘要:Displaying Reviews should seem repetitiveWe added reviews to all the products, as you can see in the js file. Inside our Reviews tab display ALL the r...
阅读全文
摘要:Now that we've got an awesomeGalleryController, let's wire it up to the page:1.AttachGalleryControllerto the.galleryelement that wraps our gallery; us...
阅读全文
摘要:Now that you're such a whiz with tabbed tab, can you apply what you've learned to our image gallery, too? Don't worry, we'll start slow… And there's a...
阅读全文
摘要:To connect our controller to our page, we're going to need a few directives. I hope you remember which ones. We've provided all the HTML for you. Try ...
阅读全文
摘要:We just learned, cramming a bunch of logic into our HTML is kinda bad. Let's start the Right Way with a Controller which will control our tabs.1.Creat...
阅读全文
摘要:Many times a product will be ready to sell, but won't have images yet (like our first one). In this case the images array will just be empty. Note the...
阅读全文
摘要:1.Make theli's repeat for eachimagein the image array. Use the variableimageas your identifier. 2.Now that we haveimageavailable from ourng...
阅读全文
摘要:1.We've added images to all products as well – like any self respecting store should have. Aproducthas an array ofimageswe can use in our html. Let's ...
阅读全文
摘要:1.Use an Angular filter to display the price as a currency.{{product.price | currency}}Also has limitTo,{{'octagon gem' | uppercase}}{{'1388123412323'...
阅读全文
摘要:1.In theapp.jsfile we changed things up a little with a newgemsarray. Assign gems to aproductsproperty insideStoreController.app.controller('StoreCont...
阅读全文
摘要:1.Use a directive to ensure that we can only see the "Add to Cart" button if thecanPurchaseproperty is true.Add to Cart2.Our firstgemis so popular tha...
阅读全文
摘要:1. Add a controller namedStoreControllerto ourgemStoreapplication.2. Attach theStoreControllerto thetag. Be sure to alias it asstore.3. Inapp.js, we'v...
阅读全文
摘要:Create a Module namedgemStoreso we can get started on this marketing journey.Attach thegemStoremodule to our HTML page with a Directive.Inindex.html, ...
阅读全文
摘要:var Appointment = Backbone.Model.extend({});var appointment = new Appointment();appointment.set('title', 'My knee hurts');var AppointmentView = Backbo...
阅读全文
摘要:1. Download the java.gz file from the website.2. Upload to the linux./root/itcast/jre-7u60-linux-x64.gz3. Change namejre-7u60-linux-x64.gz tojre-7u60-...
阅读全文
摘要:android:theme="@android:style/Theme.Translucent"
阅读全文
摘要:Content provider的作用:Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data s...
阅读全文