By default the agent is triggered every 30 minutes.
This interval value can be changed from the puppet.conf file.
Linux- /etc/puppet/puppet.conf
Windows - %PROGRAMDATA%\PuppetLabs\puppet\etc\puppet.conf
Set the runinterval to the wanted interval.
runinterval=xxx
The agent can be trigge...
Sometimes it is helpful to get more output on puppet agent run.
It is very useful for debugging.
Run puppet agent with verbose and debug parameters:
debug - Enable full debugging.
verbose - Turn on verbose reporting.
puppet agent -t --verbose --debug
No Java variable represents an object.
String foo; // NOT AN OBJECT
Neither does any Java array contain objects.
String bar[] = new String[100]; // No member is an object.
If you mistakenly think of variables as objects, the actual behavior of the Java language will surprise you.
For...
Castle enables to register components also via XML Registration.
//To install from the app/web.config
container.Install(Configuration.FromAppConfig());
//To install from an xml file
Configuration.FromXmlFile("relative_path_to_file.xml");
Read Castle's documentation for "What ...
It is possible to run windeployqt and macdeployqt from CMake, but first the path to the executables must be found:
# Retrieve the absolute path to qmake and then use that path to find
# the binaries
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bi...
Background: The Household entity includes a set of options, each of which is an entity that is managed in an admin backend. Each option has a boolean enabled flag. If a previously enabled option is set to disabled it will need to be persisted in later Household edits, but cannot be edited away. T...
In a simple case statement, one value or variable is checked against multiple possible answers. The code below is an example of a simple case statement:
SELECT CASE DATEPART(WEEKDAY, GETDATE())
WHEN 1 THEN 'Sunday'
WHEN 2 THEN 'Monday'
WHEN 3 THEN 'Tuesday'
WHEN 4 THEN 'Wednes...
It's possible to make a simple lazily-evaluated list using mutable types and closures. A lazily-evaluated list is a list whose elements are not evaluated when it's constructed, but rather when it is accessed. Benefits of lazily evaluated lists include the possibility of being infinite.
import Base:...
# encode/decode UTF-8 for files and standard input/output
use open qw( :encoding(UTF-8) :std );
This pragma changes the default mode of reading and writing text ( files, standard input, standard output, and standard error ) to UTF-8, which is typically what you want when writing new application...
boost::replace_all():
#include <iostream>
#include <string>
#include <boost/algorithm/string.hpp>
using namespace std;
int main()
{
// String to replace characters in
string str = "Darn you, Darn you to the 5th power!!!";
// Replace "Da...
to_upper():
#include <iostream>
#include <string>
#include <boost/algorithm/string.hpp>
using namespace std;
int main()
{
// String to convert characters to uppercase
string str = "ThIS iS SUpPoSEd tO Be UpPeR CAsE.";
// Convert characters i...
The typical Visitor example in Java would be:
interface ShapeVisitor {
void visit(Circle c);
void visit(Rectangle r);
}
interface Shape {
void accept(ShapeVisitor sv);
}
class Circle implements Shape {
private Point center;
private double radius;
public Circl...
Objective-C
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"Hello. That is a test attributed string."];
[str addAttribute:NSBackgroundColorAttributeName value:[UIColor yellowColor] range:NSMakeRange(3,5)];
[str addAttribute:NSForegroundColorAttrib...
// Create the request.
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]];
// Specify that it will be a POST request
request.HTTPMethod = @"POST";
// This is how we set header fields
[request setValue:@&...
// Create the request.
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]];
// Specify that it will be a POST request
request.HTTPMethod = @"POST";
// Setting a timeout
request.timeoutInterval = 20.0;
//...
Note
I assume you know
Webcomponent Specifications
Polymer from Google
What if, we could just have one custom element, say
<tool-bar></tool-bar>
and it magically did everything that messy Modal markup could?
Tempting eh!
How do you specify which Modal belongs to which project...