Tutorial by Examples: ect

The QSqlDatabase class provides an interface for accessing a database through a connection. An instance of QSqlDatabase represents the connection. The connection provides access to the database via one of the supported database drivers. Make sure to Add QT += SQL in the .pro file. Assume an SQ...
import shelve d = shelve.open(filename) # open -- file may get suffix added by low-level # library d[key] = data # store data at key (overwrites old data if # using an existing key) data = d[key] # retrieve a C...
When trying to open a Database Connection with QODBC please ensure You have QODBC driver available Your server has an ODBC interface and is enabled to (this depends on your ODBC driver installations) use shared memory access, TCP/IP connections or named pipe connection. All connections only ...
When you group CSS selectors, you apply the same styles to several different elements without repeating the styles in your style sheet. Use a comma to separate multiple grouped selectors. div, p { color: blue } So the blue color applies to all <div> elements and all <p> elements. Wit...
You can restrict the directions the user is able to scroll to using the following code: func scrollViewDidScroll(_ scrollView: UIScrollView) { if scrollView.contentOffset.x != 0 { scrollView.contentOffset.x = 0 } } Every time the user scrolls on the x-axis, the scrollView's c...
I get the file path from document directory and read that file in chunks of 1024 and save (append) to NSMutableData object or you can directly write to socket. // MARK: - Get file data as chunks Methode. func getFileDataInChunks() { let doumentDirectoryPath = NSSearchPathForDirectoriesI...
To prepare the ios build first we need to create the cordova project. lets create the project by the command line tool. cordova create hello com.example.hello "HelloWorld" Go to the project dir by cd hello. we are now in the project directory, lets check which platforms are availa...
Get the source code from the NopCommerce website and open it in Visual Studio In the plugins folder of NopCommerce solution, add a project of type class library with the plugin name prefixed by Nop.Plugin like Nop.Pugin.CategoryName.PluginName as the name. Then build the solution. Dele...
You can use list variable to form <select> elements <select th:field="*{countries}"> <option th:each="country: ${countries}" th:value="${country.id}" th:text="#{${'selected.label.' + country.name}}"/> <...
new Vue({ el: '#app', data:{ myArr : [ { name: 'object-1', nestedArr: ['apple', 'banana'] }, { name: 'object-2', nestedArr: ['grapes', 'orange'] } ] ...
<?php // if device exists, update timestamp $stmt = $mysqli->prepare("UPDATE new_devices SET nd_timestamp=? WHERE nd_deviceid=?"); $stmt->bind_param('ss', $now, $device); $stmt->execute(); //echo "Affected Rows: ".$stmt->affected_rows; // T...
using Newtonsoft.Json.Linq; using System.Collections.Generic; public class JsonFieldsCollector { private readonly Dictionary<string, JValue> fields; public JsonFieldsCollector(JToken token) { fields = new Dictionary<string, JValue>(); CollectFields...
Let's say Joe owns a website that allows you to log on, view puppy videos, and save them to your account. Whenever a user searches on that website, they are redirected to https://example.com/search?q=brown+puppies. If a user's search doesn't match anything, than they see a message along the lines ...
public class Equatable { public string field1; public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; var type = obj.GetType(); if (GetType() != type) re...
Ensure you met all requirements, as per Requirements Mount the temporary API filesystems: cd /location/of/new/root mount -t proc proc proc/ mount --rbind /sys sys/ mount --rbind /dev dev/ mount --rbind /run run/ (optionally) If you need to use an internet connection in the c...
Filter expressions cannot include Filter Objects. This is very important. If you decide to form your filters with Filter Expression, you use array of string arrays. The following syntax is wrong: // WRONG!!! var f1 = search.createFilter({ name: 'mainline', operator: searc...
Let's say that whenever someone visits a profile page in Bob's website, the following URL is fetched: https://example.com/api/users/1234/profiledata.json With a response like this: { "name": "Bob", "description": "Likes pie & security holes.&quot...
Depending on whether you have installed composer globally or locally. Locally: php composer.phar create-project slim/slim-skeleton {my-app-name} Globally: composer create-project slim/slim-skeleton {my-app-name} If you are running a webserver (ex. Apache or nginx) point your virtualho...
Create an Azure AD B2C Directory Note the Domain name, it'll be used as the tenantName. Register your application Follow the instructions to create an application and enable both Web App and Native client. Refer Register a web application and Register a mobile/native application Enter th...
let in Kotlin creates a local binding from the object it was called upon. Example: val str = "foo" str.let { println(it) // it } This will print "foo" and will return Unit. The difference between let and also is that you can return any value from a let block. also ...

Page 97 of 99