Tutorial by Examples

① the concepts used in this Example : ClassUsageURLRequest + Loader + EventLoading atlas map (sprite) from external path.BitmapData + Sprite + beginBitmapFill +Matrix + stageWidth & stageHeightdrawing loaded resources to bitmapdata, using tiled bitmaps, drawing with transformation.MovieClip + s...
Expressions in Java are the primary construct for doing calculations. Here are some examples: 1 // A simple literal is an expression 1 + 2 // A simple expression that adds two numbers (i + j) / k // An expression with multiple operations (flag) ? c : d // An...
If you have more than 1 task to execute repeatedly in different intervals, use this example as a starting point: unsigned long intervals[] = {250,2000}; //this defines the interval for each task in milliseconds unsigned long last[] = {0,0}; //this records the last executed time for each ...
Some times you see a signal is emitted in sender thread but connected slot doesn't called (in other words it doesn't receive signal), you have asked about it and finaly got that the connection type Qt::DirectConnection would fix it, so the problem found and everything is ok. But generaly this is ba...
Native implementations The <template> element is implemented in every modern browsers: Chrome, Edge, Firefox, Opera, Safari, ... Custom Elements customElements.define(), Shadow DOM attachShadow() and HTML Imports <link rel="import"> are implemented in the latest ver...
Show or hide invisible characters To show invisible characters: :set list To hide invisible characters: :set nolist To toggle between showing and hiding invisible characters: :set list! Default symbol characters SymbolCharacter^ITab$New Line Customize symbols To set the tab characte...
Go to the repository you want to clone (something like: https://bitbucket.org/username/repo) On the top menu, choose Repository -> Import repository In the Old repository section, enter the source (CodePlex, Git, Google Code, Mercurial, Source Code, Subversion) and the URL In the New reposi...
Swift does not support multiple inheritance. That is, you cannot inherit from more than one class. class Animal { ... } class Pet { ... } class Dog: Animal, Pet { ... } // This will result in a compiler error. Instead you are encouraged to use composition when creating your types. This can b...
import org.apache.spark.sql.functions._ // Create a function that uses the content of the column inside the dataframe val code = (param: String) => if (param == "myCode") 1 else 0 // With that function, create the udf function val myUDF = udf(code) // Apply the udf to a column in...
This a sample code which will show you how you can create dynamic code which will generate a bootstrap model at run time. This also includes deciding modal title body content and buttons in footer. HTML code <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css&...
set oDic = CreateObject("Scripting.Dictionary") oDic.add "USA", "United States of America" oDic.add "UK", "United Kingdom" oDic.add "CAN", "Canada" For Each obj in oDic.Items Msgbox obj Next Set oDic = Nothing *Out...
set oDic = CreateObject("Scripting.Dictionary") oDic.add "USA", "United States of America" oDic.add "UK", "United Kingdom" oDic.add "CAN", "Canada" For Each obj in oDic.keys Msgbox "Key: " & obj & &quo...
set oDic = CreateObject("Scripting.Dictionary") oDic.add "USA", "United States of America" oDic.add "UK", "United Kingdom" oDic.add "CAN", "Canada" ' Delete only if Key exists If oDic.Exists("UK") Then oDic.R...
UseExceptionHandler can be used to handle exceptions globally. You can get all the details of exception object like Stack Trace, Inner exception and others. And then you can show them on screen. You can easily implement like this. app.UseExceptionHandler( options => { options.Run( as...
You can test sending messages using the FCM REST API by sending a request through cURL. curl --header "Authorization: key=<API_KEY>" \ --header Content-Type:"application/json" \ https://fcm.googleapis.com/fcm/send \ -d "{\"registration_ids...
How do you detect them? If the same variable/resource/memory location is accessible by multiple threads and at least of the thread is changing the value of variable/resource/memory location, then Race Condition can occurred. Because if a thread is changing the value of variable/resource/memory ...
Higher-order functions take other functions as arguments and/or return them as results. They form the building blocks of functional programming. Most functional languages have some form of filter function, for example. This is a higher-order function, taking a list and a predicate (function that ret...
Overview Openssl consists of 2 libraries: libcrypto and libssl. Before openssl API can be used in an application, mandatory initialization procedures are expected to be performed. Once application is done with openssl related work, it is expected to cleanup allocated resources. Code below does com...
iOS 10 Now Requires User Permission to Access Media Library, Photos, Camera and other Hardware like these. The solution for this is to add their keys into info.plist with description for user that how we are using their data , iOS already required permissions to access microphone, camera, and m...
From Xcode menu open: Product > Scheme > Edit Scheme. On your Environment Variables set OS_ACTIVITY_MODE = disable

Page 1064 of 1336