This set outlines how to construct a filter for the User Object Filter and Group Object Filter attributes in an LDAP configuration.
(&(objectClass=user)(cn=Mark*))
This means: search for all entries that have objectClass=user AND cn that start with the word 'Mark'.
A C# method can be called with invalid arguments, this may cause an ArgumentException.
ArgumentException indicates that a method was called with an invalid argument. This can help improve program quality.
ArgumentException is thrown when a method is invoked and at least one of the passed arguments does not meet the parameter specification of the called method. The ParamName property identifies the invalid argument.
When using the ArgumentNullException constructor, you can pass a string literal indicating the null argument.
The time service in Windows can be reset to a default state by running the following inside an elevated Command Prompt (CMD):
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
To verify the time server, follow these steps:
timedate.cpl
time.windows.com
)Scrum is an empirical process control framework.
Empirical means to runs experiments to improve the product.
Meetings in Scrum
Additional meetings
You can use the following code snippets to get a class's public methods using reflection. The class name is provided as typeName
.
MethodInfo[] methodInfos = typeof(Class).GetMethods();
Variant with filter using BindingFlags
MethodInfo[] methodInfos = Type.GetType(typeName)
.GetMethods(BindingFlags.Public | BindingFlags.Instance);
You can use this code to get only the methods decorated with a custom attribute.
MethodInfo[] methodInfos = assembly.GetTypes()
.SelectMany(t => t.GetMethods())
.Where(m => m.GetCustomAttributes(typeof(CustomAttribute), false).Length > 0)
.ToArray();
Here’s an example of how to invoke a private method using reflection in .NET:
MyClass myClass = new MyClass();
Type classType = myClass.GetType();
MethodInfo methodInfo = classType.GetMethod("MethodName",
BindingFlags.Instance | BindingFlags.NonPublic);
// Make an invocation:
var result = await (dynamic)methodInfo.Invoke(myClass, null);
Sometimes, we want to change an HTML5 input’s placeholder color with CSS.
To change an HTML5 input’s placeholder color with CSS, we use the ::placeholder
selector.
For instance, to set the input placeholder’s color to #909 we write:
::placeholder {
color: #909;
}
HTTP response status codes indicate whether a specific HTTP request has been successfully completed.
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is, no side effect), whereas successive identical POST requests may have additional effects, akin to placing an order several times.
It is possible to use PUT without a body like
PUT /example HTTP/1.0
Content-Type: text/plain
Content-Length: 0
A sample would be the github starring API, which uses PUT with an empty body to turn on a star and DELETE to turn off a star.
You can get private property like so:
Class class = new Class();
var privateProperty = class.GetType().GetProperty("privateProperty", BindingFlags.Instance | BindingFlags.NonPublic);
int propertyValue = (int) privateProperty.GetValue(class);
var privateField = class.GetType().GetField("privateField", BindingFlags.Instance | BindingFlags.NonPublic);
int fieldValue = (int) privateField.GetValue(class);
In the example below, we have a list of numbers. The ForEach method is called on the list and a lambda expression num => Console.WriteLine(num) is passed as the argument. This lambda expression takes each element num from the list and prints it using Console.WriteLine. The lambda acts as the action to be performed on each element in the list.
var numbers = new List<int> { 1, 2, 3, 4, 5 };
numbers.ForEach(num => Console.WriteLine(num));
The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected.
Spread operator doing concat
let arrayOne = [1, 2, 3];
let arraryTwo = [4, 5];
arrayCombined = [...arrayOne,...arrayTwo];
Add item using spread operator
let arrayOne = [1, 2, 3];
arrayNew = [...arrayOne, 3];
R452b ist ein nichtozonabbauendes, Hydrofluorolefine (HFOs)-basiertes Kältemittel
Eine zukunftssichere und nachhaltige Investition ist heute nur noch mit natürlichen Kältemitteln, die bereits seit mehr als hundert Jahren erfolgreich eingesetzt werden, möglich.
Systeme mit natürlichen Stoffen mit niedrigem Treibhauspotential, wie Kohlenwasserstoffe, Kohlendioxid oder Ammoniak, können sowohl die Einträge von TFA deutlich verringert als auch das Klima geschützt werden.
Auf europäischer Ebene gibt es Bestrebungen HFO-Kältemittel aufgrund ihrer starken Umweltschädigung schnellstmöglich zu verbieten!
R 410A gehört zu den synthetischen Kältemitteln, die in Kälte- und Klimaanlagen und Wärmepumpen verwendet werden.
R 410A ist zwar nicht ozonschädlich, jedoch mit einem GWP (Global Warming Potential)-Wert von 2088 ein Treibhausgas.
Natürliche Kältemittel
Kältemittel | Toxizität | Brenbarkeit | |
R-290 Propan | 3 | Gering | Hoch |
R-717 Ammoniak | 0 | Hoch toxisch | Gering |
R-1270 Propen | 3 | Gering | Hoch |
R-744 CO2 | 1 | Gering | Nicht brennbar |
Synthetische, in der Luft stabile Kältemittel
Kältemittel | GWP | Toxizität | Brenbarkeit |
R32 | 675 | Gering | Gering |
R-407 C | 1770 | Gering | Nicht brennbar |
R-410 A/C | 2090 | Gering | Nicht brennbar |
R-452 B | 698 | Gering | Gering |
R-454 A/C | 466 | Gering | Gering |
Generell wird zwischen natürlichen und synthetischen Kältemitteln unterschieden. Zu den natürlichen Kältemitteln zählt man z. B. Kohlenwasserstoffe, Kohlenstoffdioxid, Ammoniak, Wasser und Luft – also Stoffe, die es so in der Natur gibt. Natürliche Kältemittel haben demnach auch geringe Auswirkungen auf die Umwelt.
Synthetische Kältemittel dagegen werden künstlich hergestellt. Sie werden chemisch auch als halogenierte Kohlenwasserstoffe bezeichnet und eignen sich ebenfalls hervorragend für den Einsatz in Klimaanlagen und Wärmepumpen.
Alle Kältemittel haben ihre Berechtigung, denn jedes Kältemittel hat andere Merkmale und Eigenschaften. Manche eignen sich für den Heizbetrieb besonders gut, andere eignen sich vor allem zum Kühlen. Die Wahl des Kältemittels bestimmt den Energieverbrauch, die Aufstellmöglichkeiten und die Kosten der jeweiligen Anlage.
Opteon™ XL20 (R-454C) ist ein leicht entflammbares Kältemittel mit einem Erderwärmungspotenzial (GWP) von weniger als 150.
Für viele Haustechnikprodukte wie z.B. lokale Kompakt-Klimageräte gilt bereits ein gesetzlich vorgeschriebener maximaler GWP-Wert von 150 (super low GWP). R454C unterschreitet diesen Grenzwert. Mit einem GWP von 148 hat R454C ein ca. 14-fach geringeres Treibhauspotential als das bisher übliche Kältemittel R410A.
Weitere Informationen
C# expression operators are fundamental tools for performing computations and evaluating conditions in code.
By understanding and utilizing these operators, you gain powerful tools to perform calculations, make decisions, and control the behavior of your C# programs.
C# Lambda expression operator (=>) is a shorthand syntax for defining anonymous functions. It allows you to write compact and inline functions without the need to declare a separate method. Lambdas are commonly used in LINQ queries, event handlers, and functional programming. They improve code readability, enable concise operations on collections, and provide a flexible way to work with data and delegates.
In lambda expressions, the lambda operator =>
separates the input parameters on the left side from the lambda body on the right side.
Here's an example that calculates the square of each number in a list:
List<int> numbers = new List<int> { 1, 2, 3, 4, 5 };
List<int> squaredNumbers = numbers.Select(x => x * x).ToList();
// squaredNumbers will be [1, 4, 9, 16, 25]
In this code, we have a list of numbers. Using the Select
method and a Lambda expression x => x * x
, we square each number in the list. The Lambda expression takes an input x
and returns its square x * x
. Finally, we have a new list squaredNumbers
containing the squared values of the original numbers. Lambda expressions are versatile and enable concise operations on collections, making code more expressive and readable.
To align content like buttons to the right you can use CSS flexible box layout.
<div class='align-right'>
<button>Cancel</button>
<button type='submit'>Create</button>
</div>
The CSS to align the buttons on the right uses two properties.
.align-right {
display: flex;
justify-content: flex-end;
}
References
A callback is a function passed as an argument to another function. This technique allows a function to call another function. A callback function can run after another function has finished.
Example
Using a callback, you could call the calculator function (myCalculator) with a callback (myCallback), and let the calculator function run the callback after the calculation is finished:
function myDisplayer(some) {
document.getElementById("demo").innerHTML = some;
}
function myCalculator(num1, num2, myCallback) {
let sum = num1 + num2;
myCallback(sum);
}
myCalculator(5, 5, myDisplayer);
In the example above, myDisplayer is a called a callback function.
It is passed to myCalculator() as an argument.
Note
When you pass a function as an argument, remember not to use parenthesis.
Right: myCalculator(5, 5, myDisplayer);
Wrong: myCalculator(5, 5, myDisplayer());
Question: How can I check if a string is empty?
Option 1: Check using ""
if (str === "") {
}
Note: to know if it's an empty string use === instead of ==. This is because === will only return true if the values on both sides are of the same type, in this case a string. for example: (false == ""
) will return true, and (false === ""
) will return false.
Option 2: Check length of string
if (!str || str.trim().length === 0) {
}
Question: How do you convert a nullable bool? to a bool in C#?
Solution:
You can use the null-coalescing operator: x ?? something
, where something
is a boolean value you want to use if x
is null
.
Example:
bool? nullBool = null;
bool convertedBool = nullBool ?? false; // convertedBool will be false
The null-coalescing operator ?? returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result.
Azure Key Vault is a cloud-based secrets store for holding app secrets, including configuration values like passwords and connection strings that must always remain secure. It keeps secrets in a single central location and provides secure access, permissions control, and access logging.
Use Azure Key Vault to store secrets like Passwords, Shared Access Signature (SAS) tokens, Application Programming Interface (API) keys, and Personal Access Tokens (PAT).
The definition of the CSS class
.rotate{
width:80px;
height:80px;
animation: rotation infinite 3s linear;
}
Here we added an animation property with a value rotation infinite 3s linear, which is.
rotation
: this is the name of the animation.infinite
: the animation should play infinitely.3s
: animation duration.linear
: play the animation at the same speed from start to end.Source: How to rotate an image continuously in CSS | Reactgo