You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🐢
418 I'm a teapot
straybro
straybro
🐢
418 I'm a teapot
Boogieman with a boring life. I hate people standing behind me when I code. I'm worried they will discover how much I actually copy and paste from stackoverflow
A simple example of using a Lazy Loading Proxy object in PHP. It is useful when attempting to work with legacy code for logging and memory savings when working with global objects..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Little Schemer vs. regular Clojure versions of the Collatz function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
Post explaining why objects often use less memory than arrays (in PHP)
Why objects (usually) use less memory than arrays in PHP
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
There are 3 plugins for generating to create a JAR-File in maven:
maven-jar-plugin
maven-assembly-plugin
maven-shade-plugin
maven-jar-plugin:This plugin provides the capability to build and sign jars.But it just compiles the java files under src/main/java and /src/main/resources/.It doesn't include the dependencies JAR files.
<!--exclude all xml files from the jar-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters