Tutorial by Examples: di

A generalization of std::condition_variable, std::condition_variable_any works with any type of BasicLockable structure. std::cv_status as a return status for a condition variable has two possible return codes: std::cv_status::no_timeout: There was no timeout, condition variable was notified st...
Installing The Node Module You can install this module by running the command below in your project directory: npm install twilio Sending Your Message const accountSID = ''; // Obtained from the Twilio Console const authToken = ''; // Obtained from the Twilio Console const client = requi...
An example of implementation which give a possibility to detect if user single or double tap on UITableViewCell. override func viewDidLoad() { viewDidLoad() let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(sender:))) double...
An example of implementation UITableView which allows to detect if cell has been tapped single or double time. override func viewDidLoad() { viewDidLoad() let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(sender:))) doubleTa...
To create a background with a gradient you can use the CAGradientLayer class: Swift 3.1: func createGradient() { let caLayer = CAGradientLayer() caLayer.colors = [UIColor.white, UIColor.green, UIColor.blue] caLayer.locations = [0, 0.5, 1] caLayer.bounds = self.bounds self...
To add a custom image for the thumb of the slider, simply call the setThumbImage method with your custom image: Swift 3.1: let slider = UISlider() let thumbImage = UIImage slider.setThumbImage(thumbImage, for: .normal)
This example show you how you add new sounds to your MOD and play them. First of all you need a sound file which has the format *.ogg. Any other format is not allowed by the Minecraft application and will be rejected. The soundfile has the name: sound1.ogg Put the sound file under the following pa...
display dialog "Password" default answer "" set w to text returned of the result if w = "Password" then display notification "Correct" end if
CREATE INDEX first_name_idx ON user_data (UPPER(first_name)); SELECT * FROM user_data WHERE UPPER(first_name) = 'JOHN2'; Function based index means, creating index based on a function. If in search (where clause), frequently any function is used, it's better to create index based on ...
Angular 4 is now available! Actually Angular uses semver since Angular 2, which requires the major number being increased when breaking changes were introduced. The Angular team postponed features that cause breaking changes, which will be released with Angular 4. Angular 3 was skipped to be able to...
If we want to disable all the actions like Copy, Paste, Replace, Select, etc from UITextField then we can use following custom text field: class CustomTextField: UITextField { var enableLongPressActions = false required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder)! } o...
%TYPE: Used to declare a field with the same type as that of a specified table's column. DECLARE vEmployeeName Employee.Name%TYPE; BEGIN SELECT Name INTO vEmployeeName FROM Employee WHERE RowNum = 1; DBMS_OUTPUT.PUT_LINE(vEmp...
Once you're up with a new project with the basic template provided in the Introduction, you should be able to add a LUISRecognizer like so - var model = '' // Your LUIS Endpoint link comes here var recognizer = new builder.LuisRecognizer(model); Now, recognizer is a LUISRecognizer and can pa...
Md2Collapse : Collapse is a directive, it's allow the user to toggle visiblity of the section. Examples A collapse would have the following markup. <div [collapse]="isCollapsed"> Lorum Ipsum Content </div> Md2Accordion : Accordion it's allow the user to toggle vis...
DirectByteBuffer is special implementation of ByteBuffer that has no byte[] laying underneath. We can allocate such ByteBuffer by calling: ByteBuffer directBuffer = ByteBuffer.allocateDirect(16); This operation will allocate 16 bytes of memory. The contents of direct buffers may reside outside ...
This example shows you different ways to execute 'commands' for Minecraft from code: EntityPlayerSP player = Minecraft.getMinecraft().player; player.sendChatMessage("/Command here"); to send a command in SinglePlayer
The GEODIST command allows a user to determine the distance between two members within a geospatial index while specifying the units. To find the distance between two meetup cities: GEODIST meetup_cities "San Francisco" "Denver" mi
This is the most basic example, with the easiest calculations. Let's assume your input and kernel are: When you your kernel you will receive the following output: , which is calculated in the following way: 14 = 4 * 1 + 3 * 0 + 1 * 1 + 2 * 2 + 1 * 1 + 0 * 0 + 1 * 0 + 2 * 0 + 4 * 1 6 = 3 * 1 ...
Padding is just a fancy name of telling: surround your input matrix with some constant. In most of the cases the constant is zero and this is why people call it zero padding. So if you want to use a padding of 1 in our original input (check the first example with padding=0, strides=1), the matrix wi...
Now we will apply a strided convolution to our previously described padded example and calculate the convolution where p = 1, s = 2 Previously when we used strides = 1, our slided window moved by 1 position, with strides = s it moves by s positions (you need to calculate s^2 elements less. But in...

Page 155 of 164