If everything whas been set up correctly, the following snippet will show a window titled "SFML works!" with a green circle:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f...
Visitor pattern allows you to add new operations or methods to a set of classes without modifying the structure of those classes.
This pattern is especially useful when you want to centralise a particular operation on an object without extending the object Or without modifying the object.
UML diag...
Database connections are set up using the CF Administrator tool. See Database Connections for how to connect a datasource.
To execute queries all you need is the <cfquery> tag. The <cfquery> tag connects to and opens the database for you, all you need to do is supply it with the name of...
Lambda expressions are similar to anonymous functions in other languages.
Lambda expressions are open formulas which also specify variables which are to be bound. Evaluation (finding the value of a function call) is then achieved by substituting the bound variables in the lambda expression's body, ...
You cam amend the time of a commit using
git commit --amend --date="Thu Jul 28 11:30 2016 -0400"
or even
git commit --amend --date="now"
If you make a commit as the wrong author, you can change it, and then amend
git config user.name "Full Name"
git config user.email "[email protected]"
git commit --amend --reset-author
[TimeStamp] attribute can be applied to only one byte array property in a given Entity class. Entity Framework will create a non-nullable timestamp column in the database table for that property. Entity Framework will automatically use this TimeStamp column in concurrency check.
using System.Compon...
For an instance, if the html source code of an html view or element is wrapped by an iframe like this:
<iframe src="../images/eightball.gif" name="imgboxName" id="imgboxId">
<p>iframes example</p>
<a href="../images/redball.gif" t...
Now that you have an object, it might be good to figure out what it is. You can use the Get-Member cmdlet to see what an object is and what it contains:
Get-Item c:\windows | Get-Member
This yields:
TypeName: System.IO.DirectoryInfo
Followed by a list of properties and methods the object ha...
The Leaflet package is designed to integerate with Shiny
In the ui you call leafletOutput() and in the server you call renderLeaflet()
library(shiny)
library(leaflet)
ui <- fluidPage(
leafletOutput("my_leaf")
)
server <- function(input, output, session){
out...
For the common case of having one Flask application all you have to do is to create your Flask application, load the configuration of choice and then create the SQLAlchemy object by passing it the application.
Once created, that object then contains all the functions and helpers from both sqlalchem...
When programming in Prolog, we must pick two kinds of names:
names of predicates
names of variables.
A good predicate name makes clear what each argument means. By convention, underscores are used in names to separate the description of different arguments. This is because underscores_keep_ev...
Prior to C++17, template deduction cannot deduce the class type for you in a constructor. It must be explicitly specified. Sometimes, however, these types can be very cumbersome or (in the case of lambdas) impossible to name, so we got a proliferation of type factories (like make_pair(), make_tuple(...
Rename the remote named <old> to <new>. All remote-tracking branches and configuration settings for the remote are updated.
To rename a remote branch name dev to dev1 :
git remote rename dev dev1
Let's see MVP in action using a simple Login Screen. There are two Buttons—one for login action and another for a registration screen; two EditTexts—one for the email and the other for the password.
LoginFragment (The View)
public class LoginFragment extends Fragment implements LoginContract.Prese...
Flyweight is one of structural design patterns. It is used to decrease the amount of used memory by sharing as much data as possible with similiar objects. This document will teach you how to use Flyweight DP properly.
Let me explain the idea of it to you on a simple example. Imagine you're working...
Create a new class implementing IXposedHookLoadPackage and implement the handleLoadPackage method:
public class MultiPatcher implements IXposedHookLoadPackage
{
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable
{
...