Diff Merge is a great tool for any developer for Diffing and merging code. I have used it and found it to be in dispensable.
I would strongly recommend this tool. The company behind the tool is SourceGear, they are generous to distribute this gem for no cost to developers :). They also have other useful tools FORTRESS and VAULT, check it out at their website – @ www.sourcegear.com
Feature Highlights for time challenged :
- Diff Graphically shows the changes between two files. Includes intra-line highlighting and full support for editing.
- Merge Graphically shows the changes between 3 files. Allows automatic merging (when safe to do so) and full control over editing the resulting file.
- Folder Diff Performs a side-by-side comparison of 2 folders, showing which files are only present in one file or the other, as well as file pairs which are identical or different.
- Windows Explorer Integration. Right-click on any two files in Windows Explorer to diff them immediately.
- Configurable. Rulesets and options provide for customized appearance and behavior.
- International. Compatible with 42 different character encodings.
- Cross-platform. Identical feature set on Windows, Mac OS X, and Unix.
1. Open your website with logged in experience. Look at network waterfall, copy text of cookie from the base page request headers.
2. Save the following as a genWPTScript.sh file (update it to use your assigned website
instead of netflix.com
3. In shell, run:
echo “<copied cookie from step 1>” | sh getWPTScript.sh
4. Copy output and paste in the script section of webpagetest.org
, make sure you mark script is sensitive, then run the test
//start the app
adb shell am start -n com.myapp.android/.packagename.LaunchActivity
//send to background
adb shell am start com.android.calculator2
//kill the app
adb shell am force-stop com.myapp.android
Important Facts about Memory Mapped files in Java – thanks to Java Revisited @ Blogspot
- Java supports Memory mapped IO with
- Memory mapped files is used in performance sensitive application, e.g. high frequency electronic trading platforms.
- By using memory mapped IO, you can load portion of large files in memory.
- Memory mapped file can result in page fault if requested page is not in memory.
- Ability to map a region of file in memory depends on addressable size of memory. In a 32 bit machine, you cannot access beyond 4GB or 2^32.
- Memory mapped IO is much faster than Stream IO in Java.
- Memory used to load File is outside of Java heap and reside on shared memory which allows two different processes to access File.
- Reading and writing on memory mapped file is done by operating system, so even if your Java program crashes after putting content into memory, it will make to File until OS is fine.
- Prefer Direct Byte buffer over Non Direct Buffer for faster performance.
- Don’t call
MappedByteBuffer.force() method too often, this method is meant to force operating system to write content of memory into disk, So if you call force() method each time you write into memory mapped file, you will not see true benefit of using mapped byte buffer, instead it will be similar to disk IO.
- In case of power failure or host failure, there is slim chance that content of memory mapped file is not written into disk, which means you could lose critical data.
Most modern computers today operate with multiple processors and the processor in-turn have multiple cores. Below is a breakdown of the architecture of a modern computer / processor. I took these notes so that it’s easy for me to understand and I hope it helps others.
Motherboards have sockets that can fit Microprocessors ( usually 2 )
Each Microprocessor has multiple computing components, which are actual independent central processing units also known as “Cores” ( usually 6 per socket ) . These cores share some computing functions like floating point calculations, while performing integer calculations independently.
Intel introduced the concept of Hyper-Threading. For each processor core that is physically present, the operating system addresses two virtual or logical cores, and shares the workload between them when possible. ( usually there are 2 Hyper-Threads per core ).
When you issue the command like “procinfo” to list the number of CPU’s in a server (Linux/Unix ) . The number of CPU might be misleading as the command identifies each Hyper-Thread as a core. Hence A server with 2 sockets and 6 core processor in each socket will be reported to have 24 CPU’s. This is correct from OS perspective as OS treats each Hyper-Thread as a CPU.
Depending on the hardware architecture there can be multiple levels of caches based. The block diagram below describes the association of cache/memory to processing units in a server.
Filed under Hardware, JVM, Linux