Memoization of the default kwarg in Python

 3r3147. 3r3-31. This is how you can memorize the Python function: 3r3133.  3r3147.
 3r3147. 3r33112. 3r3113. def memo_square (a, cache = {}):
if a not in cache:
cache[a]= a * a
return cache[a] 3r3122.
 3r3147. The reception is undeservedly little known, so under the cut we will analyze how it works and what it is for.
 3r3147. @ functools.lru_cache . The decorator from the functools module, which remembers the last function calls. Reliably and simply, but uses all the parameters of a function as keys, which means that it requires their hashing and cannot notice that two formally different values ...[/a][/a]
+ 0 -

The rules of gentlemanly behavior in IT: the history of ITIL

3r3141. In early 201? the library of information technology infrastructure ITIL waiting for the most serious update since 2011. For almost 30 years, it has been used all over the world - both in private business and in government structures. Recall what ITIL was created for and how it changed. 3r3146. 3r3190.  
The rules of gentlemanly behavior in IT: the history of ITIL
3r33140. 3r3141. Image Jonathan Mueller 3r3144. CC
3r3146. 3r3147. 3r3190.  
3r33170. Creation of ITIL: training the zoo solutions
The first set of best practices for the organization ...
+ 0 -

Friday programmer, or as I wrote a library for lexical and parsing code

 3r3408. 3r3-31. Hello! As a programmer, I am always looking for ways to improve my skills. One Friday evening, the thought struck my head - “But wouldn’t I write a compiler?” 3r33394.  3r3408. 3r33394.  3r3408. Who is interested to know what came of it, welcome under cat. 3r33394.  3r3408. Tyk 3r33394.  3r3408. → Classical compiler theory 3r3404. 3r3408. 3r3408. 3r3013. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type ...[/o][/o]
+ 0 -

Data Verification - Java & Spring Validation

Validation of class data (bean) in java is not a new topic, but it’s relevant here. I’ll combine various aspects: validation of data in JSR-30? show you how to do this purely in Java and using Spring, how to do it in a standard application and on the Web.
 3r313319. Content: Data Validation (JSR-303) in 3r31310.  3r313319. - standard Java application 3r31310.  3r313319. - using Spring
 3r313319. - association Java + Spring
 3r313319. - Spring MVC 3r31310.  3r313319. Null , @DecimalMin, @Digits, Pattern , Email and others. 3r3405...
+ 0 -

Device management by bluetooth

 3r3149. 3r3-31. This article is a continuation of the previous article “The smartphone controls a toy car” and should help users who decided to repeat the project to control their device using bluetooth using the BASIC programming environment! 3r3346.  3r3149.
 3r3149. Voice control is a spectacular, but not very reliable means of control, especially when the distance to the control object is more than 2 meters. The attenuation and reverberation of the sound and extraneous noise interfere, besides you need constant access to the Internet. More reliable management by bluetooth.
+ 0 -

How Vim stole my heart

I think it is clear from the name that today we will talk about Vim! What it is? Why do you need it? How to use it? 3r33232.  3r3308. 3r33232.  3r3308.
How Vim stole my heart 3r3309. 3r311.
3r33232.  3r3308. Many who read my past could exclaim:
 3r3308. 3r33232.  3r3308. 3r33232.  3r3308. 3r33232.  3r3308. Indeed, this practice can be considered unnecessary. To my deepest regret, and now there are people who think the same way. For those who do not know, I will explain: Vim is an old-fashioned text editor that works in the terminal and has a non-standard approach to editing and typing. 3r33232.  3r3308. 3r33232.  3r3308. 3r33232.  3r3308. 3r33232...
+ 0 -

Symbolic solution of linear differential equations and systems using the Laplace transform method using SymPy

 3r31228. 3r3-31.
Symbolic solution of linear differential equations and systems using the Laplace transform method using SymPy  3r31228. The implementation of algorithms in Python using symbolic calculations is very convenient when solving problems of mathematical modeling of objects defined by differential equations. To solve such equations, the Laplace transformations are widely used, which, to put it simply, allow us to reduce the problem to the solution of the simplest algebraic equations.
 3r31228. In this publication, I propose to consider the functions of the direct and inverse Laplace transform from the SymPy library, which allow using the Laplace method to solve differential equations and systems ...
+ 0 -

Is it time to upgrade?

 3r3186. 3r3-31. It is no secret that many citizens believe that updating key systems is evil, working — do not touch.
 3r3186. Some reach in an effort to keep everything as it was to a very high level of antiquity - domain controllers with server 2003 and the appropriate level of domain and forest, Exchange 2010 without SP, past-generation antiviruses, instead of Next Generation (from well-known TRAPS), flat networks, SMB ? the list goes on.
 3r3186. All of the above was aggravated by the abominable organization
 3r3186. 20 Years of the First Chechen War: Part II. Morituri: ...
+ 0 -

Cogear.JS - a modern static site generator

3r33434. Hi, Habr! 3r33430. 3r33427.  
3r33434. I want to present to the attention of habrovchan an open source static website generator written in
which is based on
. 3r33430. 3r33427.  
3r33434. The project is inspired by the same 3r317. Jekyll
, but basically uses a modern technological stack. For example, it provides the ability to "hot upload" (without reloading the page) modified scripts and styles. 3r33430. 3r33427.  
3r33434. Cogear.JS - a modern static site generator 3r33430. Vue.JS , 3r3165. React
, Angular , Ember etc. 3r33418...
+ 0 -

Improving online programs

Improving online programsIn the era of native programs, users could only use them within the configuration settings allowed by the developer. Nowadays, in the era of Internet applications, the user can quite easily change at his discretion not only the external presentation of the program, but also its behavior.
This article describes ways to make web applications more convenient, beautiful, expand their functionality, customize.
This is ) Or write your own simple one with the same goals as your choice. After that, the programmer is a little closer to the level of "Year".
Almost everyone knows about it, but ...
+ 0 -