Tutorial by Examples: c

Here i am going to explain the ajax custom pagination in cakephp 3.2. This one is easier to use and understandable. Do this code inside any function and any controller you need. Make an ajax call for the pagination <script type="text/javascript"> $(document).ready(function ()...
Azure SQL Database has different editions and performance tiers. You can find version, edition (basic, standard, or premium), and service objective (S0,S1,P4,P11, etc.) of SQL Database that is running as a service in Azure using the following statements: select @@version SELECT DATABASEPROPERTYEX...
You can scale-up or scale-down Azure SQL database using ALTER DATABASE statement: ALTER DATABASE WWI MODIFY (SERVICE_OBJECTIVE = 'P6') -- or ALTER DATABASE CURRENT MODIFY (SERVICE_OBJECTIVE = 'P2') If you try to change service level while changing service level of the current database is sti...
You can create a secondary replica of database with the same name on another Azure SQL Server, making the local database primary, and begins asynchronously replicating data from the primary to the new secondary. ALTER DATABASE <<mydb>> ADD SECONDARY ON SERVER <<secondaryserver&gt...
You can put your azure SQL Database in SQL elastic pool: CREATE DATABASE wwi ( SERVICE_OBJECTIVE = ELASTIC_POOL ( name = mypool1 ) ) You can create copy of an existing database and place it in some elastic pool: CREATE DATABASE wwi AS COPY OF myserver.WideWorldImporters ( SERVICE_OBJECTIV...
The predicate setup_call_cleanup/3, which is currently being considered for inclusion in the Prolog ISO standard and provided by an increasing number of implementations, lets us ensure that resources are correctly freed after an exception is thrown. A typical invocation is: setup_call_cleanup(open...
gem 'any gem',git: 'any repo',branch: 'specific branch of that repo',ref: 'reference no.' ref specifies individual commit. branch specifies the git branch to pull from.
CLR procedures are not enabled by default. You need to run the following queries to enable CLR: sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'clr enabled', 1; GO RECONFIGURE; GO In addition, if some CLR module need external access, you should set TRUSTWORTHY pr...
Procedures, functions, triggers, and types written in .Net languages are stored in .dll files. Once you create .dll file containing CLR procedures you should import it into SQL Server: CREATE ASSEMBLY MyLibrary FROM 'C:\lib\MyStoredProcedures.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS PERM...
If you have created .Net function, compiled it into .dll, and imported it into SQL server as an assembly, you can create user-defined function that references function in that assembly: CREATE FUNCTION dbo.TextCompress(@input nvarchar(max)) RETURNS varbinary(max) AS EXTERNAL NAME MyLibrary.[Nam...
If you have create .Net class that represents some user-defined type, compiled it into .dll, and imported it into SQL server as an assembly, you can create user-defined function that references this class: CREATE TYPE dbo.Point EXTERNAL NAME MyLibrary.[Name.Space.Point] You need to specify name...
If you have created .Net method in some class, compiled it into .dll, and imported it into SQL server as an assembly, you can create user-defined stored procedure that references method in that assembly: CREATE PROCEDURE dbo.DoSomethng(@input nvarchar(max)) AS EXTERNAL NAME MyLibrary.[Name.Space....
Consider a base class Vehicle and its derived class Car as follows: #import <Foundation/Foundation.h> @interface Vehicle : NSObject { NSString *vehicleName; NSInteger vehicleModelNo; } - (id)initWithName:(NSString *)name andModel:(NSInteger)modelno; - (void)print; @end ...
Stereoscopy is a technique for creating or enhancing the illusion of depth in an image by stereopsis for binocular vision. Two individual displays are rendered and displayed individually to each of the user's eyes. The offset of an object is altered based on the intended depth displayed. This techn...
Given a text txt and a pattern pat, the objective of this program will be to print all the occurance of pat in txt. Examples: Input: txt[] = "THIS IS A TEST TEXT" pat[] = "TEST" output: Pattern found at index 10 Input: txt[] = "AABAACAADAABAAABAA" ...
Mixins can be passed a block of SASS compliant code, which then becomes available within the mixin as the @content directive. @mixin small-screen { @media screen and (min-width: 800px;) { @content; } } @include small-screen { .container { width: 600px; } } And this wou...
public void Screenshot() throws Throwable{ final byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES); scenario.embed(screenshot, "image/png"); // ... and embed it in the report. Thread.sleep(1000); } Alternately public static void captureSc...
It's not the best way of iterating through the pixels; however, it's better than cv::Mat::at<T>. Let's assume you have a color image in your folder and you want to iterate each pixels of this image and erase green and red channels(Note that this is an example, you can do this in more optimize...
Range.CurrentRegion is a rectangular range area surrounded by empty cells. Blank cells with formulas such as ="" or ' are not considered blank (even by the ISBLANK Excel function). Dim rng As Range, lastCell As Range Set rng = Range("C3").CurrentRegion ' or Set rng = Shee...
#include <iostream> #include <map> #include <string> using namespace std; class A { public: map<string, string> * mapOfStrings; public: A() { mapOfStrings = new map<string, string>(); } void insertEntry(string const & key, st...

Page 595 of 826