Tutorial by Examples: c

using System; using System.IO; using System.Security.Cryptography; namespace Aes_Example { class AesExample { public static void Main() { try { string original = "Here is some data to encrypt!"; ...
using System; using System.Security.Cryptography; using System.Text; public class PasswordDerivedBytesExample { public static void Main(String[] args) { // Get a password from the user. Console.WriteLine("Enter a password to produce a key:"); by...
Registration in AppDelegate import UserNotifications in didFinishLaunchingWithOptions method, UNUserNotificationCenter.current().requestAuthorization(options: [.alert,.sound,.badge]) { (granted, error) in // Here you can check Request is Granted or not. } Create and Schedule notificat...
Firebase provides backend as a service, as applciation developer you do not have an option to have backend code. This example shows how using firebase queue, create backend which will operate on the top of firebase database and serve as a backend for your frontend application. Before getting into ...
This is an example of Viz-Charts with line-chart with filters. There are a lot of techniques this is one to solve the filtering issue. Point to be noted is that you need to bind the Dataset of VizFrame by its ID and then apply the filtering on the FlattenedDataset   In the controller: // defining...
Class can implement multiple traits. In case if one trait defines method with the same signature like another trait, there is a multiple inheritance problem. In that case the method from last declared trait is used: trait Foo { def hello() {'Foo'} } trait Bar { def hello() {'Bar'} } cla...
Sliding window algorithm is used to perform required operation on specific window size of given large buffer or array. Window starts from the 1st element and keeps shifting right by one element. The objective is to find the minimum k numbers present in each window. This is commonly know as Sliding w...
public class SlidingWindow { public static int[] MaxSlidingWindow(int[] input, int k) { int[] result = new int[input.Length - k + 1]; for (int i = 0; i <= input.Length - k; i++) { var max = input[i]; for (int j = 1; j < k; j++) ...
class Post < ActiveRecord::Base belongs_to :user has_many :comments validates :user, presence: true validates :title, presence: true, length: { in: 6..40 } scope :topic, -> (topic) { joins(:topics).where(topic: topic) } before_save :update_slug after_create :send_wel...
Open a chat with @BotFather in Telegram and click the /start command. After you get a list of commands Select the command /newbot to get this Message: Alright, a new bot. How are we going to call it? Please choose a name for your bot. Enter a name for your bot, which can be anything, and sen...
Numeric operators are the easiest and almost the same as in other languages. +, -, * and /. Addition, subtraction, multiplication and division operators (in VFP there is no integer division, you can convert a result to integer with functions INT(), CEILING() and FLOOR()). % Modulus operator. ^ ...
Logical operators in VFP, in their order of precedence are: OperatorDescription( )Parentheses, groups expressionsNOT, !Logically negate the expression. NOT or ! has no difference.ANDLogically AND the expressionsORLogically OR the expressions<>, !=, #Check for inequality. Thus same as logical ...
The first step to fix this issue I found was to download PSTools and extract the tools to a convenient location on the build server (e.g. c:\Programs\PSTools is there I extracted mine).
First open the Command prompt and "Run as Administrator". Once the command prompt is open navigate to the PSTools directory. From the command prompt we need to run git-bash using PSExec or PSExec64 as the Local Service, which Jenkins is running on the build server as by default. We wi...
The hard part is over! Now just create the credentials to be used in Jenkins. Use your own Username and the passphrase used to create the SSH Key. This is what it should look like now (with your own private github repo and user name:
The Maya GUI toolkit creates a variety of UI elements in a simple, imperative form. There are basic commands to create and edit GUI widgets; the widgets are identified by a unique string name. All gui commands take the same basic form: you supply a command type and the string name of the object yo...
A C program that wishes to accept network connections (act as a "server") should first create a socket bound to the address "INADDR_ANY" and call listen on it. Then, it can call accept on the server socket to block until a client connects. //Create the server socket int servsoc...
POSIX.1-2008 Given the name of a server as a string, char* servername, and a port number, int port, the following code creates and opens a socket connected to that server. The "name" of the server can either be a DNS name, such as "www.stackoverflow.com," or an IP address in sta...
Even when sockets are in "blocking" mode, the read and write operations on them do not necessarily read and write all the data available to be read or written. In order to write an entire buffer into a socket, or read a known quantity of data from a socket, they must be called in a loop. ...
This is a very basic example how to load a pyqt ui file to maya with pyqt libs. In this solution you really don't need to convert your pyqt ui file a python file. You can simply load your pyqt ui. from PyQt4 import QtCore, QtGui, uic import maya.OpenMayaUI as mui import sip baseUI ...

Page 626 of 826