# Categorias Category.delete_all Category.create(:name => %{Books}) Category.create(:name => %{Kindle Store}) Category.create(:name => %{Electronics}) Category.create(:name => %{Computers and Accessories}) Category.create(:name => %{Software}) Category.create(:name => %{Office Products}) # Produtos Product.delete_all Product.create(:name => %{Code}, :description => %{Crossing over into general-interest non-fiction from his popular programming manuals, Charles Petzold has written Code: The Hidden Language of Computer Hardware and Software. It's a carefully written, carefully researched gem that will appeal to anyone who wants to understand computer technology at its most essential levels. Readers learn about number systems(decimal, octal, binary and all that) through Petzold's patient (and frequently entertaining) prose, then discover the logical systems that are used to process them. There's loads of historical information, too. From Louis Braille's development of his eponymous raised-dot code to Intel Corporation's release of its early microprocessors, Petzold presents the stories of people trying to find ways to communicate with (and by means of) mechanical and electrical devices. It's a fascinating progression of technologies and the author presents a clear statement of how they fit together. The real value of Code is in its explanations of technologies that have been obscured for years behind fancy user interfaces and programming environments that, in the name of rapid application development, insulate the programmer from the machine. In a section on machine language, Petzold dissects the instruction sets of the genre-defining Intel 8080 and Motorola6800 processors. He walks the reader through the process of performing various operations with each chip, explaining which op codes poke which values into which registers along the way. Petzold knows that the hidden language of computers exhibits real beauty. In Code, he helps his readers appreciate it. --David Wall Topics covered: Mechanical and electrical representations of words and numbers, number systems, logic gates, performing mathematical operations with logic gates, microprocessors, machine code, memory and programming languages. --This text refers to an out of print or unavailable edition of this title.}, :price => 7.15, :category_id => Category.find_by_name("Books").id ) Product.create(:name => %{Computer Science Illuminated}, :description => %{Revised and updated with the latest information in the field, the Fourth Edition of Computer Science Illuminated continues to engage and enlighten students on the fundamental concepts and diverse capabilities of computing. Written by two of today's most respected computer science educators, Nell Dale and John Lewis, the text provides a broad overview of the many aspects of the discipline from a generic view point. Separate program language chapters are available as bundle items for those instructors who would like to explore a particular programming language with their students. The many layers of computing are thoroughly explained beginning with the information layer, working through the hardware, programming, operating systems, application, and communication layers, and ending with a discussion on the limitations of computing. Perfect for introductory computing and computer science courses, the fourth edition's thorough presentation of computing systems provides computer science majors with a solid foundation for further study, and offers non-majors a comprehensive and complete introduction to computing.}, :price => 24.19, :category_id => Category.find_by_name("Books").id ) Product.create(:name => %{The C Programming Language (2nd Edition)}, :description => %{An indisputably classic computing text, Kernighan and Ritchie's The C Programming Language, 2nd Edition , is the standard reference for learning and using ANSI C. Written by the co-inventors of C, this concise tutorial has a well-deserved reputation for clarity and precision as it defines one of the most successful programming languages of all time. It's an essential reference, which will be useful for beginners and experienced programmers alike. This masterful tour of C features concentrates on essential programming constructs, from the basics--such as data types, variables, operators and flow control--to more advanced topics. Short, effective programming samples are the rule here. (Many samples work with strings and text files). Along the way, the authors don't shy away from the thornier C topics. For example, when discussing pointers, they look at pointers to pointers and even pointers to functions. Later in the book, they offer useful code for a flexible memory allocation scheme and a binary tree. The text concludes with the formal specification for C and a compact listing of the functions in the C standard header files. C is still a great first programming language, and its influence is felt in Java and C++, both of which support many programming constructs based on C, while adding support for objects. The C Programming Language is still an excellent reference to one of our most successful and efficient programming languages. It's a book that deserves a place on the bookshelf of any C/C++ developer, regardless of your experience with the language. --Richard Dragan, Amazon.com Topics covered: overview of ANSI C introductory language tutorial data types variables arrays operators and operator precedence flow control functions header files recursion macros and the C pre-processor pointers and arrays advanced pointer types (pointers to pointers, pointers to functions) multidimensional arrays structures and unions dynamic memory allocation console and file I/O UNIX file functions Formal description of the standard C language Reference to C standard library header files and functions}, :price => 23.03, :category_id => Category.find_by_name("Books").id ) Product.create(:name => %{Algorithmic Problem Solving}, :description => %{An entertaining and captivating way to learn the fundamentals of using algorithms to solve problems The algorithmic approach to solving problems in computer technology is an essential tool. With this unique book, algorithm guru Roland Backhouse shares his four decades of experience to teach the fundamental principles of using algorithms to solve problems. Using fun and well–known puzzles to gradually introduce different aspects of algorithms in mathematics and computing. Backhouse presents you with a readable, entertaining, and energetic book that will motivate and challenge you to open your mind to the algorithmic nature of problem solving. Provides a novel approach to the mathematics of problem solving focusing on the algorithmic nature of problem solving Uses popular and entertaining puzzles to teach you different aspects of using algorithms to solve mathematical and computing challenges Features a theory section that supports each of the puzzles presented throughout the book Assumes only an elementary understanding of mathematics Let Roland Backhouse and his four decades of experience show you how you can solve challenging problems with algorithms!}, :price => 28.44, :category_id => Category.find_by_name("Books").id ) # Photos Photo.delete_all Photo.create(:path => "http://ecx.images-amazon.com/images/I/31GBgcA5PML._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU02_.jpg", :product_id => Product.find_by_name(%{Code}).id ) Photo.create(:path => "http://ecx.images-amazon.com/images/I/51W-YaXNAVL._SL500_AA240_.jpg", :product_id => Product.find_by_name(%{Computer Science Illuminated}).id ) Photo.create(:path => "http://ecx.images-amazon.com/images/I/51TGEPRTDNL._SL500_AA240_.jpg", :product_id => Product.find_by_name(%{The C Programming Language (2nd Edition)}).id ) Photo.create(:path => "http://ecx.images-amazon.com/images/I/41k9iBLxsqL._SL500_AA240_.jpg", :product_id => Product.find_by_name(%{Algorithmic Problem Solving}).id ) # Produtos relacionados SimilarProduct.delete_all SimilarProduct.create(:product_id => Product.find_by_name(%{Code}).id, :similar_product_id => Product.find_by_name(%{Computer Science Illuminated}).id ) SimilarProduct.create(:product_id => Product.find_by_name(%{Code}).id, :similar_product_id => Product.find_by_name(%{The C Programming Language (2nd Edition)}).id ) SimilarProduct.create(:product_id => Product.find_by_name(%{Code}).id, :similar_product_id => Product.find_by_name(%{Algorithmic Problem Solving}).id )