自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 资源 (14)
  • 收藏
  • 关注

转载 架构选型之Nodejs与Java

架构选型之Nodejs与Java前言:身边越来越多的同事谈论Nodejs,谈其异步IO、事件回调、前后台统一一门语言,创业的朋友的第一个创业项目也选择了Nodejs,期望能够使用一种语言节省成本快速完成需求开发。与其他项目组的同事聊项目选型Java时被他们嘲笑了一把,怎么这么不与时俱进怎么还在用Java。而且发现,越来越多的前端同事通过Nodejs轻松上手后端功能开发,作为后端开发工程师倍感压力。借新项目的机会系统了解了下Nodejs的知识体系,本文对了解到的Nodejs技术作了总结,同时将

2022-04-26 19:15:55 2188 1

原创 CentOS 6 EOL如何切换源?

CentOS 6 EOL如何切换源?CentOS 6操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。建议您升级操作系统至CentOS 7及以上,如果您的业务过渡期仍需要使用CentOS 6系统中的一些安装包,请根据下文切换CentOS 6的源。背景信息2020年11月30日CentOS 6 EOL。按照社区规则,CentOS 6的源地址http://mirror.centos.org/centos-6/内容已移除,目前第三方的镜像站中均已移除CentOS 6的源

2022-03-26 08:50:10 178

原创 关于Nginx的入门技巧ABC

动态与静态资源的访问分离# 动态资源,直接转发到其它的端口号location = / { proxy_pass http://localhost:8080/index }########################################### 静态文档,表达方式一location ^~ /static/ { root /webroot/static/;}# 静态文档,表达方式二location ~* \.(gif|jpg|jpeg|png|css|js

2022-02-03 21:20:52 1844

原创 CenOS7.6 使用 Docker安装 PostgresSQL 和 PaAdmin

CenOS7.6 使用 Docker安装 PostgresSQL 和 PaAdmin亲测通过!########################################################################################yum配置阿里云镜像基础docker########################################################################################.

2021-01-30 12:49:18 103

原创 ThinkPHP 5.1.40 安装笔记

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/composer config -l -gcomposer config -lcomposer create-project topthink/think=5.1.40 tp5.1.40composer create-project topthink/think=5.1.35 tp5.1.35// public fold.

2021-01-30 12:38:25 145

2BizBox-V5.0-ERP软件十分钟快速入门教程

2BizBox历经十多年的发展,目前官网开放V5.0试用版下载。 本教程是来自官网的权威学习指南。带您用10分钟时间梳理BOM清单,销售单,采购单,工单,库存收发料,财务应收应付一个完整的生命周期。 适合广大的2BizBox自学者。 官方的中文论坛:http://www.2bizbox.cn/forum/

2022-03-09

Head First Python , Second Edition by Paul Barry 2016年出版 英文版

Head First Python, Second Edition by Paul Barry Table of Contents (Summary) 1 The Basics: Getting Started Quickly 1 2 List Data: Working with Ordered Data 47 3 Structured Data: Working with Structured Data 95 4 Code Reuse: Functions and Modules 145 5 Building a Webapp: Getting Real 195 6 Storing and Manipulating Data: Where to Put Your Data 243 7 Using a Database: Putting Python’s DB-API to Use 281 8 A Little Bit of Class: Abstracting Behavior and State 309 9 The Context Management Protocol: Hooking into Python’s with Statement 335 10 Function Decorators: Wrapping Functions 363 11 Exception Handling: What to Do When Things Go Wrong 413 113⁄4 A Little Bit of Threading: Dealing with Waiting 461 12 Advanced Iteration: Looping like Crazy 477 A Installing: Installing Python 521 B Pythonanywhere: Deploying Your Webapp 529 C Top Ten Things We Didn’t Cover: There’s Always More to Learn 539 D Top Ten Projects Not Covered: Even More Tools, Libraries, and Modules 551 E Getting Involved: The Python Community 563

2016-12-08

Foundations for Analytics with Python O-Reilly-2016-Clinton W. Brownley

Foundations for Analytics with Python by Clinton W. Brownley Copyright © 2016 Clinton Brownley. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. Overview of Chapters Chapter 1, Python Basics We’ll begin by exploring how to create and run a Python script. This chapter focuses on basic Python syntax and the elements of Python that you need to know for later chapters in the book. For example, we’ll discuss basic data types such as numbers and strings and how you can manipulate them. We’ll also cover Preface | xvii the main data containers (i.e., lists, tuples, and dictionaries) and how you use them to store and manipulate your data, as well as how to deal with dates, as dates often appear in business analysis. This chapter also discusses programming concepts such as control flow, functions, and exceptions, as these are important elements for including business logic in your code and gracefully handling errors. Finally, the chapter explains how to get your computer to read a text file, read multiple text files, and write to a CSV-formatted output file. These are important techniques for accessing input data and retaining specific output data that I expand on in later chapters in the book. Chapter 2, Comma-Separated Values (CSV) Files This chapter covers how to read and write CSV files. The chapter starts with an example of parsing a CSV input file “by hand,” without Python’s built-in csv module. It transitions to an illustration of potential problems with this method of parsing and then presents an example of how to avoid these potential problems by parsing a CSV file with Python’s csv module. Next, the chapter discusses how to use three different types of conditional logic to filter for specific rows from the input file and write them to a CSV output file. Then the chapter presents two dif‐ ferent ways to filter for specific columns and write them to the output file. After covering how to read and parse a single CSV input file, we’ll move on to discus‐ sing how to read and process multiple CSV files. The examples in this section include presenting summary information about each of the input files, concate‐ nating data from the input files, and calculating basic statistics for each of the input files. The chapter ends with a couple of examples of less common proce‐ dures, including selecting a set of contiguous rows and adding a header row to the dataset. Chapter 3, Excel Files Next, we’ll cover how to read Excel workbooks with a downloadable, add-in module called xlrd. This chapter starts with an example of introspecting an Excel workbook (i.e., presenting how many worksheets the workbook contains, the names of the worksheets, and the number of rows and columns in each of the worksheets). Because Excel stores dates as numbers, the next section illustrates how to use a set of functions to format dates so they appear as dates instead of as numbers. Next, the chapter discusses how to use three different types of condi‐ tional logic to filter for specific rows from a single worksheet and write them to a CSV output file. Then the chapter presents two different ways to filter for specific columns and write them to the output file. After covering how to read and parse a single worksheet, the chapter moves on to discuss how to read and process all worksheets in a workbook and a subset of worksheets in a workbook. The exam‐ ples in these sections show how to filter for specific rows and columns in the worksheets. After discussing how to read and parse any number of worksheets in a single workbook, the chapter moves on to review how to read and process mul‐tiple workbooks. The examples in this section include presenting summary infor‐ mation about each of the workbooks, concatenating data from the workbooks, and calculating basic statistics for each of the workbooks. The chapter ends with a couple of examples of less common procedures, including selecting a set of contiguous rows and adding a header row to the dataset. Chapter 4, Databases Here, we’ll cover how to carry out basic database operations in Python. The chapter starts with examples that use Python’s built-in sqlite3 module so that you don’t have to install any additional software. The examples illustrate how to carry out some of the most common database operations, including creating a database and table, loading data in a CSV input file into a database table, updat‐ ing records in a table using a CSV input file, and querying a table. When you use the sqlite3 module, the database connection details are slightly different from the ones you would use to connect to other database systems like MySQL, Post‐ greSQL, and Oracle. To show this difference, the second half of the chapter dem‐ onstrates how to interact with a MySQL database system. If you don’t already have MySQL on your computer, the first step is to download and install MySQL. From there, the examples mirror the sqlite3 examples, including creating a database and table, loading data in a CSV input file into a database table, updat‐ ing records in a table using a CSV input file, querying a table, and writing query results to a CSV output file. Together, the examples in the two halves of this chapter provide a solid foundation for carrying out common database operations in Python. Chapter 5, Applications This chapter contains three examples that demonstrate how to combine techni‐ ques presented in earlier chapters to tackle three different problems that are rep‐ resentative of some common data processing and analysis tasks. The first application covers how to find specific records in a large collection of Excel and CSV files. As you can imagine, it’s a lot more efficient and fun to have a computer search for the records you need than it is to search for them yourself. Opening, searching in, and closing dozens of files isn’t fun, and the task becomes more and more challenging as the number of files increases. Because the problem involves searching through CSV and Excel files, this example utilizes a lot of the material covered in Chapters 2 and 3. The second application covers how to group or “bin” data into unique categories and calculate statistics for each of the categories. The specific example is parsing a CSV file of customer service package purchases that shows when customers paid for particular service packages (i.e., Bronze, Silver, or Gold), organizing the data into unique customer names and packages, and adding up the amount of time each customer spent in each package. The example uses two building blocks, creating a function and storing data in a dictionary, which are introduced in Chapter 1 but aren’t used in Chapters 2, 3, and 4. It also introduces another new technique: keeping track of the previous row you processed and the row you’re currently processing, in order to calculate a statistic based on values in the two rows. These two techniques—grouping or binning data with a dictionary and keeping track of the current row and the previous row—are very powerful capabilities that enable you to handle many common analysis tasks that involve events over time. The third application covers how to parse a text file, group or bin data into cate‐ gories, and calculate statistics for the categories. The specific example is parsing a MySQL error log file, organizing the data into unique dates and error messages, and counting the number of times each error message appeared on each date. The example reviews how to parse a text file, a technique that briefly appears in Chapter 1. The example also shows how to store information separately in both a list and a dictionary in order to create the header row and the data rows for the output file. This is a reminder that you can parse text files with basic string oper‐ ations and another good example of how to use a nested dictionary to group or bin data into unique categories. Chapter 6, Figures and Plots In this chapter, you’ll learn how to create common statistical graphs and plots in Python with four plotting libraries: matplotlib, pandas, ggplot, and seaborn. The chapter begins with matplotlib because it’s a long-standing package with lots of documentation (in fact, pandas and seaborn are built on top of matplot lib). The matplotlib section illustrates how to create histograms and bar, line, scatter, and box plots. The pandas section discusses some of the ways pandas simplifies the syntax you need to create these plots and illustrates how to create them with pandas. The ggplot section notes the library’s historical relationship with R and the Grammar of Graphics and illustrates how to use ggplot to build some common statistical plots. Finally, the seaborn section discusses how to cre‐ ate standard statistical plots as well as plots that would be more cumbersome to code in matplotlib. Chapter 7, Descriptive Statistics and Modeling Here, we’ll look at how to produce standard summary statistics and estimate regression and classification models with the pandas and statsmodels packages. pandas has functions for calculating measures of central tendency (e.g., mean, median, and mode), as well as for calculating dispersion (e.g., variance and stan‐ dard deviation). It also has functions for grouping data, which makes it easy to calculate these statistics for different groups of data. The statsmodels package has functions for estimating many types of regression and classification models. The chapter illustrates how to build multivariate linear regression and logistic classification models based on data in pandas DataFrames and then use the mod‐ els to predict output values for new input data. Chapter 8, Scheduling Scripts to Run Automatically This chapter covers how to schedule your scripts to run automatically on a rou‐ tine basis on both Windows and macOS. Until this chapter, we ran the scripts manually on the command line. Running a script manually on the command line is convenient when you’re debugging the script or running it on an ad hoc basis. However, it can be a nuisance if your script needs to run on a routine basis (e.g., daily, weekly, monthly, or quarterly), or if you need to run lots of scripts on a routine basis. On Windows, you create scheduled tasks to run scripts automati‐ cally on a routine basis. On macOS, you create cron jobs, which perform the same actions. This chapter includes several screenshots to show you how to cre‐ ate and run scheduled tasks and cron jobs. By scheduling your scripts to run on a routine basis, you don’t ever forget to run a script and you can scale beyond what’s possible when you’re running scripts manually on the command line. Chapter 9, Where to Go from Here The final chapter covers some additional built-in and add-in Python modules and functions that are important for data processing and analysis tasks, as well as some additional data structures that will enable you to efficiently handle a variety of complex programming problems you may run into as you move beyond the topics covered in this book. Built-ins are bundled into the Python installation, so they are immediately available to you when you install Python. The built-in mod‐ ules discussed in this chapter include collections, random, statistics, iter tools, and operator. The built-in functions include enumerate, filter, reduce, and zip. Add-in modules don’t come with the Python installation, so you have to download and install them separately. The add-in modules discussed in this chapter include NumPy, SciPy, and Scikit-Learn. We also take a look at some additional data structures that can help you store, process, or analyze your data more quickly and efficiently, such as stacks, queues, trees, and graphs.

2016-12-08

Python 核心编程 (第3版) 中文版 Wesley Chun 高清完整PDF版

本书是经典畅销图书《Python 核心编程(第二版)》的全新升级版本,总共分为 3 部分。 第 1 部分讲解了 Python 的一些通用应用,包括正则表达式、网络编程、Internet 客户端编程、 多线程编程、GUI 编程、数据库编程、Microsoft Office 编程、扩展 Python 等内容。第 2 部分 讲解了与 Web 开发相关的主题,包括 Web 客户端和服务器、CGI 和 WSGI 相关的 Web 编程、 Diango Web 框架、云计算、高级 Web 服务。第 3 部分则为一个补充/实验章节,包括文本处 理以及一些其他内容。 本书适合具有一定经验的 Python 开发人员阅读。

2016-12-08

Web开发敏捷之道:应用Rails进行敏捷Web开发 第5版 英文版 2016年9月出版

Agile Web Development with Rails 5 Sam Ruby Dave Thomas David Heinemeier Hansson Copyright © 2016 The Pragmatic Programmers, LLC. Book version: P1.0—September 2016 Web开发敏捷之道:应用Rails进行敏捷Web开发 第5版 英文版 2016年9月出版

2016-10-08

Laraboot: Laravel 5 For Beginners

Laravel 5.2 初学者指南 Laraboot: Laravel 5 For Beginners Bill Keck This book is for sale at http://leanpub.com/laravel-5-for-beginners-laraboot This version was published on 2016-04-04 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. © 2015 - 2016 Bill Keck Contents Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 What Makes The Laravel Framework Special? . . . . . . . . . . . . . . . . . . . . . . . . 3 Upsides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Downsides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Why I chose Laravel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Why I’m Writing This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Artisan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 MySql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Minimum PHP Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 W3 Schools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 MInimum HTML and CSS skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Minimum Javascript Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Contact Bill Keck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Laraboot on Github . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Chapter 2: The Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 The Fun Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 MAC or Windows? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 MAMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Composer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Minimum Version of PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Homebrew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Command Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 3: Installation of Laravel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Composer install of Laravel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 CONTENTS Create Project in IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Setup Local Host file: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Vhost Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 httpd.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 MOD Rewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Restart Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Chapter 4: Let’s Get Started With Laravel . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Set Up The Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Initial Commit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Diving Into Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Setup the DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 .env . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Application Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Basic Stitching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 The Style Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Creating a Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Creating a Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Artisan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 RESTful pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Namespaces and Use Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Index Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Blade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Creating A Master Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 CDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 View Partials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Full Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Chapter 5: User Registration And Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 User Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Migrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Installing the Dbal Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Make Auth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 AuthController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Gravatar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Facades . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 CONTENTS Bootstrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Pages Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 New Nav . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Auth Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Auth Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 emails view folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 password.blade.php. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Config Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 passwords view folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 email.blade.php view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 reset.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Auth View Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 register.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 login.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Chapter 6: Working with the RESTful Pattern . . . . . . . . . . . . . . . . . . . . . . . . . 121 Sweet Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Model Factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Route Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 RESTful Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Collective HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Errors List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Store Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Die and Dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Index Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Datatables Jquery Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Datatables CDN Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Datatables CSS CDN Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 The API Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Api/Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Test the API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Index View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Datatable Partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Datatable-script Partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Slugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Changing the Store Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Create the Slug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Changing the Create Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Add Auth Use Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 CONTENTS Change $fillable Property on Widget Model . . . . . . . . . . . . . . . . . . . . . . . . . 171 Basic Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Change widgetData Method on ApiController . . . . . . . . . . . . . . . . . . . . . . . . 173 Change datatable.blade Headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Change datatable-script.blade.php to Add Columns . . . . . . . . . . . . . . . . . . . . . 174 Add Middleware to WidgetController . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Change Routes to Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Show Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Accessors and Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Edit Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Update Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Destroy Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 404.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Nav . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Chapter 7: Access Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 OwnsRecord Trait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Modify User Table Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 User $fillable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Admin Middleware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 AllowIfAdmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 isAdmin Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Admin Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 NoActiveAccountException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Modifying the Auth Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 AuthController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Update Users Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Registration Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 register.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Users Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Update User $fillable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 AuthController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Create Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Terms Of Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Chapter 8: Socialite - One Click Facebook Login . . . . . . . . . . . . . . . . . . . . . . . . 261 Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Modify Users Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 CONTENTS Mass Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Social Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 session.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 InvalidStateException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Set up Facebook App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Step 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Step 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Step 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Step 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Step 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Step 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Step 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Step 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Step 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Step 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Integrating Socialite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 AuthController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Navigation To Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Chapter 9: Profile, Settings and Admin Dash . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 my-profile and show-profile Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Add Profile to Nav . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Profile Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 Show View - Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 Index View - Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 Edit View - Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 API Route for Profile: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 profileData Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Datatable-script - Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Datatable View - Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 Users For Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 UserController.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 UserRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 User Model changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 HasModelTrait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Index View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Datatable View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Datatable-script View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 CONTENTS Show View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 Edit View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 Navigation to Users & Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 Settings Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 SettingsController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Create Settings View Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Edit View For Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Add Settings To Nav . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Admin Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Add Facebook sign in buttons to Login and Register Views . . . . . . . . . . . . . . . . . 388 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 Chapter 10: Working With Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Create imgs, marketing-images, and thumbnails folder. . . . . . . . . . . . . . . . . . . . 392 Create Image Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Show Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 Add Accessor Methods to MarketingImage Model . . . . . . . . . . . . . . . . . . . . . . 423 show view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 Edit view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 Edit Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 Edit Image Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 Update method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 Destroy Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 Api route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 API Controller Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 Index method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 index view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 datatable view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 datatable-script.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Add Nav To Marketing Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 Carousel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Pages Index View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Update slider.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 image_weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 Modify MarketingImageController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 CreateImageRequest and EditImageRequest . . . . . . . . . . . . . . . . . . . . . . . . . 463 Marketing Image Create and edit Views . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 MarketingImage Show View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 marketingImageData API Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Datatable View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 datatable-script.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 PagesController Index Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 CONTENTS grid.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 nav.blade.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 Chapter 11: Making a Custom Artisan Command . . . . . . . . . . . . . . . . . . . . . . . 470 Make Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Handle Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 makeTraitDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

2016-09-05

Learning Laravel's Eloquent

What this book covers Chapter 1, Setting Up Our First Project, will discuss how to deal with Composer and Homestead. We will also cover the installation process of our very first Laravel project. Chapter 2, Building the Database with the Schema Builder Class, will discuss the Schema Builder Class. We will analyze everything you can do with the class, look at different types of indexing, and learn about the methods that the Schema class provides. [ v ]Preface Chapter 3, The Most Important Element – the Model!, will help us implement some "create," "read," "update," and "delete" logic for our items. We will also explore some useful methods and features of the model class. Chapter 4, Exploring the World of Relationships, will help us discover how to work with different types of relationships and how to query and use them in a comfortable and clean way. Also, we will learn how to insert and delete related models in our database, or update existing ones. Chapter 5, Using Collections to Enhance Results, will talk about collections. We will work with some results transformation methods and with the elements that make up a collection. Chapter 6, Everything under Control with Events and Observers, will allow us to learn everything about the events in the context of Eloquent models. Right after, we will cover model events and model observers. Chapter 7, Eloquent... without Laravel!, will explore the structure of the database package and see what is inside it. After that, we will learn how to install the "illuminate/database" package separately for your project and how to configure it for its first use. Yes, exactly: Eloquent without Laravel! Chapter 8, It's Not Enough! Extending Eloquent, Advanced Concepts, will explore two different ways to extend Eloquent, and move on to learn about the Repository pattern.

2016-04-11

Easy.Laravel.5.2015.6.pdf

2016-04-07

Easy E-Commerce Using Laravel and Stripe - 2015.pdf

使用laravel/stripe构建电子商务网站。英文版。W. Jason Gilmore, Eric L. Barnes

2016-04-07

Laravel 5.1 Beauty

Laravel 5.1 Beauty

2016-04-07

英文版Programming.Microsoft.SQL.Server.2012.pdf

英文版Programming.Microsoft.SQL.Server.2012.pdf

2012-12-08

SCJP6 英文原版学习指南全(含SCJD内容)第二部分(共2部分)

Sun Certificated Programmer for Java 6 Study Guide (Exam 310-065)

2008-11-15

SCJP6 英文原版学习指南全(含SCJD内容)第一部分(共2部分)

Sun Certificated Programmer for Java 6 Study Guide (Exam 310-065)

2008-11-15

SCJP6 Sun Certificated Programmer for Java 6 Study Guide (Exam 310-065) 英文原版

Sun Certificated Programmer for Java 6 Study Guide (Exam 310-065) 1 Declarations and Access Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Object Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 3 Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 4 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 5 Flow Control, Exceptions, and Assertions . . . . . . . . . . . . . . . . . . . . 327 6 Strings, I/O, Formatting, and Parsing . . . . . . . . . . . . . . . . . . . . . . . . 425 7 Generics and Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 8 Inner Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 9 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 10 Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789

2008-11-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除