CakePHP Cookbook 4.x
); $articles = $this->Paginator->paginate($this->Articles- >find()); $this->set(compact('articles')); } } By defining function index() in our ArticlesController, users can now access view($slug = null) { $article = $this->Articles->findBySlug($slug)->firstOrFail(); $this->set(compact('article')); } While this is a simple action, we’ve used some powerful CakePHP features. We start >find()); $this->set(compact('articles')); } public function view($slug) { $article = $this->Articles->findBySlug($slug)->firstOrFail(); $this->set(compact('article')); }0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 3.x
); $articles = $this->Paginator->paginate($this->Articles- >find()); $this->set(compact('articles')); } } By defining function index() in our ArticlesController, users can now access view($slug = null) { $article = $this->Articles->findBySlug($slug)->firstOrFail(); $this->set(compact('article')); } While this is a simple action, we’ve used some powerful CakePHP features. We start >find()); $this->set(compact('articles')); } public function view($slug) { $article = $this->Articles->findBySlug($slug)->firstOrFail(); $this->set(compact('article')); }0 码力 | 1244 页 | 1.05 MB | 1 年前3
Falcon v0.3.0.1 Documentationan object storage service instead, such as Cloud Files or S3). Edit your images.py file and add the following to the resource: def __init__(self, storage_path): self.storage_path = storage_path Then return str(uuid.uuid4()) class Resource(object): def __init__(self, storage_path): self.storage_path = storage_path def on_post(self, req, resp): image_id = _generate_id() _media_type_to_ext(req.content_type) filename = image_id + '.' + ext image_path = os.path.join(self.storage_path, filename) with open(image_path, 'wb') as image_file: while True:0 码力 | 126 页 | 345.09 KB | 1 年前3
Falcon v0.2.0 Documentationan object storage service instead, such as Cloud Files or S3). Edit your images.py file and add the following to the resource: def __init__(self, storage_path): self.storage_path = storage_path Then return str(uuid.uuid4()) class Resource(object): def __init__(self, storage_path): self.storage_path = storage_path def on_post(self, req, resp): image_id = _generate_id() _media_type_to_ext(req.content_type) filename = image_id + '.' + ext image_path = os.path.join(self.storage_path, filename) with open(image_path, 'wb') as image_file: while True:0 码力 | 188 页 | 358.44 KB | 1 年前3
Computer Programming with the Nim Programming Language
text to the terminal window Option types Serialization — storing data permanently on external storage Streams and files String processing Arrays and sequences Random numbers Timers Hash tables which point a file system (FS) is created. These two steps create an internal structure on the storage device, which allows us to store and retrieve individual data blocks like programs, text files, contacts. The devices can contain all necessary elements, i.e., the CPU, some RAM, and persistent storage that can store programs and data when no electric power supply is available. Although these devices0 码力 | 865 页 | 7.45 MB | 1 年前3
Computer Programming with the Nim Programming Language
text to the terminal window Option types Serialization — storing data permanently on external storage Streams and files String processing Arrays and sequences Random numbers Timers Hash tables which point a file system (FS) is created. These two steps create an internal structure on the storage device, which allows us to store and retrieve individual data blocks like programs, text files, contacts. The devices can contain all necessary elements, i.e., the CPU, some RAM, and persistent storage that can store programs and data when no electric power supply is available. Although these devices0 码力 | 784 页 | 2.13 MB | 1 年前3
CakePHP Cookbook Documentation 5.xpublic function index() { $articles = $this->paginate($this->Articles); $this->set(compact('articles')); } } By defining function index() in our ArticlesController, users can now access view($slug = null) { $article = $this->Articles->findBySlug($slug)->firstOrFail(); $this->set(compact('article')); } While this is a simple action, we’ve used some powerful CakePHP features. We start ); $this->set(compact('articles')); } public function view($slug) { $article = $this->Articles->findBySlug($slug)->firstOrFail(); $this->set(compact('article')); }0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook 2.x
but we imagine that most applications will utilize one. CakePHP supports a variety of database storage engines: MySQL (4 or greater) PostgreSQL Microsoft SQL Server SQLite Note All built-in drivers $conditions = $this->postConditions($this->request->data); $orders = $this->Order->find('all', compact('conditions')); $this->set('orders', $orders); } If $this->request->data['Order']['destination'] 'num_items' => '>=', 'referrer' => 'LIKE' ) ); $orders = $this->Order->find('all', compact('conditions')); The third parameter allows you to tell CakePHP what SQL boolean operator to use between0 码力 | 1096 页 | 958.62 KB | 1 年前3
Falcon v1.0.0 Documentationan object storage service instead, such as Cloud Files or S3). Edit your images.py file and add the following to the resource: def __init__(self, storage_path): self.storage_path = storage_path Then import mimetypes import falcon class Resource(object): def __init__(self, storage_path): self.storage_path = storage_path def on_post(self, req, resp): ext = mimetypes.guess_extension(req filename = '{uuid}{ext}'.format(uuid=uuid.uuid4(), ext=ext) image_path = os.path.join(self.storage_path, filename) with open(image_path, 'wb') as image_file: while True:0 码力 | 249 页 | 406.22 KB | 1 年前3
Flask Documentation (1.1.x)color: #cc2f2e; } input[type=submit] { align-self: start; min-width: 10em; } You can find a less compact version of style.css in the example code [https://github.com/pallets/flask/tree/1.1.4/examples/ InsufficientStorage(werkzeug.exceptions.HTTPException): code = 507 description = 'Not enough storage space.' app.register_error_handler(InsufficientStorage, handle_507) raise InsufficientStorage() ict class MyRequest(Request): """Request subclass to override request parameter storage""" parameter_storage_class = ImmutableOrderedMultiDict class MyFlask(Flask): """Flask subclass using0 码力 | 428 页 | 895.98 KB | 1 年前3
共 561 条
- 1
- 2
- 3
- 4
- 5
- 6
- 57













