Tutorial by Examples: ect

You could describe variable affectation in different ways. Typed int a = 1 int a := 1 let int a = 1 int a <- 1 No type a = 1 a := 1 let a = 1 a <- 1
You can COPY table and paste it into a file. postgres=# select * from my_table; c1 | c2 | c3 ----+----+---- 1 | 1 | 1 2 | 2 | 2 3 | 3 | 3 4 | 4 | 4 5 | 5 | (5 rows) postgres=# copy my_table to '/home/postgres/my_table.txt' using delimiters '|' with null as 'null_s...
Suppose, that we have three users : The Administrator of the database > admin The application with a full access for her data > read_write The read only access > read_only With below queries, you can set access privileges on objects created in the future in specified schema. ALTER ...
Creating a connection According to PEP 249, the connection to a database should be established using a connect() constructor, which returns a Connection object. The arguments for this constructor are database dependent. Refer to the database specific topics for the relevant arguments. import MyDBA...
Assuming a default server running on localhost with the default port, the command to connect to that Redis server would be: $redis = new Redis(); $redis->connect('127.0.0.1', 6379);
If you enable prettyUrl in your yii2-app, your redirect_uri will be: http://<base_url>/web/site/auth And disable pretty url: http://<base_url>/web/index.php?r=site%2Fauth Example:
When calling driver.Navigate().GoToUrl(url);, the code execution stops until the page is fully loaded. This is sometimes unnecessary when you just want to extract data. Note: The code samples below could be considered hacks. There is no "official" way of doing this. Create a new thread...
Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more c...
I used C# language to implement Selection sort algorithm. public class SelectionSort { private static void SortSelection(int[] input, int n) { for (int i = 0; i < n - 1; i++) { var minId = i; int j; for (j = i + 1; j < n; j++...
To find the largest items in a collection, heapq module has a function called nlargest, we pass it two arguments, the first one is the number of items that we want to retrieve, the second one is the collection name: import heapq numbers = [1, 4, 2, 100, 20, 50, 32, 200, 150, 8] print(heapq.nl...
The most interesting property of a heap is that its smallest element is always the first element: heap[0] import heapq numbers = [10, 4, 2, 100, 20, 50, 32, 200, 150, 8] heapq.heapify(numbers) print(numbers) # Output: [2, 4, 10, 100, 8, 50, 32, 200, 150, 20] heapq.heappop(numbers) # 2...
The default Django project template is fine but once you get to deploy your code and for example devops put their hands on the project things get messy. What you can do is separate your source code from the rest that is required to be in your repository. You can find a usable Django project templ...
To connect to a mongo database from node application we require mongoose. Installing Mongoose Go to the toot of your application and install mongoose by npm install mongoose Next we connect to the database. var mongoose = require('mongoose'); //connect to the test database running on defau...
With Mongoose, everything is derived from a Schema. Lets create a schema. var mongoose = require('mongoose'); var Schema = mongoose.Schema; var AutoSchema = new Schema({ name : String, countOf: Number, }); // defining the document structure // by default the collection...
A frequent reason why your read operation may not work is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the Console output. But it's ...
When creating the project You should check "Include UI Tests" in the project creation dialog. After creating the project If you missed checking UI target while creating project, you could always add test target later. Setps: While project open go to File -> New -> Target Fi...
After you have a running cluster you can manage it with the kubectl command. Most of the commands you can get with the kubectl --help command, but I show you the most common commands, for manage and getting info about your cluster, nodes, pods, services and labels. For getting information about t...
Blog.html <div data-bind="visible: isLoading()"> Loading... </div> <div data-bind="visible: !isLoading(), foreach: blogs"> <br /> <span data-bind="text: entryPostedDate"></span> <br /> <h3> ...
In the build.sbt file (or where the project is defined if it is in another location), add the following setting: scalacOptions += "-language:experimental.macros" For instance, a project might be defined like this: lazy val main = project.in(file(".")) // root project .se...

Page 75 of 99