Tutorial by Examples: c

var a = 11, b = 22; a = a ^ b; b = a ^ b; a = a ^ b; console.log("a = " + a + "; b = " + b);// a is now 22 and b is now 11
We can create dynamic component and get the instances of component into an array and finally rendered it on template. For example, we can can consider two widget component, ChartWidget and PatientWidget which extended the class WidgetComponent that I wanted to add in the container. ChartWidget.ts ...
The Roslyn Quoter A tool for converting an sample C# program to syntax tree API calls. The tool itself can be found here. Enhanced source viewer An easy way to view the Roslyn source code can be found here.
app = QApplication( sys.argv ) box = QMessageBox() # Window Title box.setWindowTitle( "Hello World." ) # Icon: Information, Warning, Question, Critical box.setIcon( QMessageBox.Information ) # Short version of the information box.setText( "Hello World!" ) # Inform...
This is especially useful if we have a class that we want to extend in the rule. See example below for a more convenient method. import org.junit.rules.TestRule; import org.junit.runners.model.Statement; public class AwesomeTestRule implements TextRule { @Override public Stateme...
JUnit has an abstract implementation of @TestRule that lets you write a rule in a more simpler way. This is called ExternalResource and provides two protected methods that can be extended like this: public class AwesomeTestRule extends ExternalResource { @Override protected void befor...
Add the hyperloop gem to your rails (4.0 - 5.1) Gemfile bundle install Add the hyperloop manifest to the application.js file: // app/assets/javascripts/application.js ... //= hyperloop-loader Create your react components, and place them in the hyperloop/components directory # app/hyperl...
class Hello < Hyperloop::Component # params (= react props) are declared using the param macro param :guest render do "Hello there #{params.guest}" end end # to "mount" Hello with guest = "Matz" say Hello(guest: 'Matz') # params can be giv...
# all react callbacks are supported using active-record-like syntax class SomeCallBacks < Hyperloop::Component before_mount do # initialize stuff - replaces normal class initialize method end after_mount do # any access to actual generated dom node, or window behaviors goes ...
To find your existing .cs files, right click on the project in your instance of Visual Studio, and click Open Folder in File Explorer. Visual Studio --> Your current project (Windows Form) --> Solution Explorer --> Project Name --> Right Click --> Add --> Existing Item --> ...
The TestProducerfrom this example produces Integerobjects in a given range and pushes them to its Subscriber. It extends the Flowable<Integer> class. For a new subscriber, it creates a Subscription object whose request(long) method is used to create and publish the Integer values. It is impor...
Step1 Message Flow: [![enter image description here][1]][1] Step 2: Databse Connector Configuration For this you need mysql-connector-java-5.1.40-bin.jar . Right click on Project -->build Path--> Add external archieve and add the jar(without jar it cannot be connected) Enter all the value...
Use Redirect to force users to connect to the secure URL. <VirtualHost *:80> ServerName example.com SSLProxyEngine on Redirect permanent / https://secure_example.com/ </VirtualHost> The rest of the configuration can be put in the ssl virtual host (port 443) since ever...
A simple SELECT query in Linq static void Main(string[] args) { string[] cars = { "VW Golf", "Opel Astra", "Audi A4", "Ford Focus", "Seat Leon&q...
Debugging starts with understanding the code you are trying to debug. Bad code: int main() { int value; std::vector<int> vectorToSort; vectorToSort.push_back(42); vectorToSort.push_back(13); for (int i = 52; i; i = i - 1) { vectorToSort.push_back(i *2); } ...
Static analysis is the technique in which on checks the code for patterns linked to known bugs. Using this technique is less time consuming than a code review, though, its checks are only limited to those programmed in the tool. Checks can include the incorrect semi-colon behind the if-statement (i...
In this example we use Tensorflow to count to 10. Yes this is total overkill, but it is a nice example to show an absolute minimal setup needed to use Tensorflow import tensorflow as tf # create a variable, refer to it as 'state' and set it to 0 state = tf.Variable(0) # set one to a constan...
#pragma strict import UnityEngine.Advertisements; #if !UNITY_ADS // If the Ads service is not enabled public var gameId : String; // Set this value from the inspector public var enableTestMode : boolean = true; // Enable this during development #endif function InitializeAds () // Example o...
To fetch large data we can use generators in pandas and load data in chunks. import pandas as pd from sqlalchemy import create_engine from sqlalchemy.engine.url import URL # sqlalchemy engine engine = create_engine(URL( drivername="mysql" username="user", ...
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Route, BrowserRouter as Router, Link } from 'react-router-dom'; class Home extends React.Component<any, any> { render() { return ( <div> <div>HOME</div> <d...

Page 763 of 826