- Shortcuts let you expose the capabilities of your apps to Siri
- Siri surfaces intents that people do with your apps in Search, Watch, and on Lock screen
- Tapping on a shortcut can open it up inline with rich preview
- It can also be used with Siri directly and can show a custom view screen
- Apps can provide custom response dialog
- It'll say things such as “how long it will take for your coffee to be ready”
- Users can choose a custom phrase when adding a shortcut to Siri
- Developers can suggest what phrase to use such as “Coffee time”
2018-02-23T23:01:04.629848+00:00 app[api]: Starting process with command `bundle exec rake evening` by user [email protected]
2018-02-23T23:01:07.320730+00:00 heroku[scheduler.4494]: Starting process with command `bundle exec rake evening`
2018-02-23T23:01:08.010493+00:00 heroku[scheduler.4494]: State changed from starting to up
2018-02-23T23:01:10.974965+00:00 heroku[scheduler.4494]: State changed from up to complete
2018-02-23T23:01:10.960542+00:00 heroku[scheduler.4494]: Process exited with status 0
2018-02-24T02:10:07.539069+00:00 app[worker.1]: error sending the telegram notification
2018-02-24T02:10:07.539118+00:00 app[worker.1]: Telegram API has returned the error. (error_code: "502", uri: "https://api.telegram.org/bot{BOT_TOKEN}/getUpdates")
2018-02-24T02:10:07.539122+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/telegram-bot-ruby-0.8.6.1/lib/telegram/bot/api.rb:76:in `call'
2018-02-24T02:10:07.539124+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/telegram-bot-ruby-0.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Some points to mention... | |
## | |
##The model knows nothing about the view or the controller. | |
##The view knows nothing about the controller or the model. | |
##The controller understands both the model and the view. | |
## | |
##The model uses observables, essentially when important data is changed, | |
##any interested listener gets notified through a callback mechanism. | |
## | |
##The following opens up two windows, one that reports how much money you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Assume there are two collection views: collectionViewA and collectionViewB and both have the same dataSource (although, they probably shouldn't...) | |
collectionViewA has registered a UICollectionViewCell class with the reuseIdentifier "CellA". | |
collectionViewB has registered a UICollectionViewCell class with the reuseIdentifier "CellB". | |
When dequeueing a cell with a given reuseIdentifier, you should be confident that the collectionView has the reuseIdentifier | |
you're attempting to dequeue registered to it. That is, ONLY collectionViewA can dequeue a cell with reuseIdentifier "CellA" and ONLY collectionViewB can do the same for "CellB" | |
Otherwise, a crash will occur. | |
Notice, how one of the arguments is a collectionView in the UICollectionViewDataSource method below? That is the collectionView that is asking the datasource for a cell which |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import Tkinter as Tk | |
class ResizeableEntry(Tk.Entry): | |
""" | |
Class that adds resizing functionality to the Tkinter Entry class. | |
Makes callbacks to the delegate on whether it should resize and how much it should. | |
""" | |
def __init__(self, parent=None, delegate=None, **options): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc; clear all; close all; | |
res = 512; % # of pixel lines in each dimension | |
mri_img = zeros(res, res, res); % initialize image 3D vector | |
file_names = dir; | |
file_idx = 1; | |
for i = 1:length(file_names) | |
name = file_names(i).name; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc; clear all; close all; | |
file_names = dir; | |
file_idx = 1; | |
desired_string = 'slice'; | |
for i = 1:length(file_names) | |
name = file_names(i).name; | |
if findstr(desired_string, name) | |
% Do stuff with name here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' <param name="matrix">The matrix to be tiled</param> | |
''' <param name="row">The row dimension of result matrix</param> | |
''' <param name="column">The column dimension of result matrix</param> | |
''' <returns>The tiled and replicated matrix.</returns> | |
Function repmat(ByVal matrix As Matrix(Of Double), ByVal row As Integer, ByVal column As Integer) As Matrix(Of Double) | |
' Initialize the proper dimensions of the new matrix | |
Dim result As Matrix(Of Double) | |
result = New DenseMatrix(matrix.RowCount * row, matrix.ColumnCount * column) |