Capacitor Discharging Calculation
http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capdis.html
1-Wire protocal
http://en.wikipedia.org/wiki/1-Wire
Saturday, December 29, 2012
Sunday, December 16, 2012
How to unpack a tar file in windows
http://www.haskell.org/haskellwiki/How_to_unpack_a_tar_file_in_windows
Wednesday, December 12, 2012
Geometric Interpretation of Trace
It should be emphasised that the trace really is a property of an
operator between vector spaces, not a property of the matrix used to
represent them. Again, this is not quite "geometric" -- it is really
more "spectral" -- but it does I think make the trace seem more natural.
http://mathoverflow.net/questions/13526/geometric-interpretation-of-trace
http://mathoverflow.net/questions/13526/geometric-interpretation-of-trace
Friday, December 7, 2012
Bank Conflict and Warp Serializing
One can use the warp_serialize flag when profiling CUDA applications to determine whether shared memory bank conflicts occur in any kernel. In general, this flag also reflects use of atomics and constant memory.
NVIDIA CUDA Example for Matrix Transpose
http://docs.nvidia.com/cuda/samples/6_Advanced/transpose/doc/MatrixTranspose.pdf
Tuesday, November 27, 2012
difference between fprintf, printf, sprintf
http://stackoverflow.com/questions/4627330/difference-between-fprintf-printf-sprintf
fprintf
writes formatted text to the output stream you specify.printf
is equivalent to writing fprintf(stdout, ...)
and writes formatted text to wherever the standard output stream is currently pointing.sprintf
writes formatted text to an array of char
, as opposed to a stream.Sunday, November 25, 2012
How to install Readline/libreadline in Ubuntu
Search different package
$ apt-cache search readline
http://linuxprograms.wordpress.com/2010/10/19/install-readline-linux/
Saturday, November 24, 2012
Polynomial Order
The highest order power in a univariate polynomial is known as its order (or, more properly, its polynomial
degree). For example, the polynomial
is of order
, denoted
.
Debugging in Octave
http://techlogbook.wordpress.com/2008/04/08/debugging-in-octave/
this is to enter debug mode in Octave whenever a warning or error occurs.
To add a breakpoint, use
where 1 is the line number where you want to stop.
To go to next line, type
To step into type
To continue running, type
to see the variable value, just type the name of the variable.
debug_on_warning(1);
debug_on_error(1);
this is to enter debug mode in Octave whenever a warning or error occurs.
To add a breakpoint, use
dbstop('yourfunctionname',1)
where 1 is the line number where you want to stop.
To go to next line, type
dbnext
To step into type
dbstep
To continue running, type
dbcont
to see the variable value, just type the name of the variable.
Dotfiles/Octave startup files and .octaverc templates
GNU Octave set PATH variable
http://bitonic.org/blog/?tag=octaverc
"can't open terminal"
Environment Setting?
http://osdir.com/ml/gnu.octave.maintainers/2005-04/msg00135.html
Octave documents
Startup files
http://www.gnu.org/software/octave/doc/interpreter/Startup-Files.html
Another example
http://www.leancrew.com/all-this/2011/11/my-octaverc/
Keywords: dotfiles
http://dotfiles.org/
Escape Character:
In computing and telecommunication, an escape character is a character which invokes an alternative interpretation on subsequent characters in a character sequence.
http://en.wikipedia.org/wiki/Escape_character
Bash Initialization Files:
http://www.solipsys.co.uk/new/BashInitialisationFiles.html?HN0811
(Chinese link)
http://sns.linuxpk.com/home.php?mod=space&uid=55617&do=blog&id=16477
edit editor "gvim %s"
edit editor "xterm -e vim %s"
edit editor "gnome-terminal -e \"vim %s\""
edit editor "gedit %s"
http://bitonic.org/blog/?tag=octaverc
"can't open terminal"
Environment Setting?
http://osdir.com/ml/gnu.octave.maintainers/2005-04/msg00135.html
Octave documents
Startup files
http://www.gnu.org/software/octave/doc/interpreter/Startup-Files.html
Another example
http://www.leancrew.com/all-this/2011/11/my-octaverc/
Keywords: dotfiles
http://dotfiles.org/
Escape Character:
In computing and telecommunication, an escape character is a character which invokes an alternative interpretation on subsequent characters in a character sequence.
http://en.wikipedia.org/wiki/Escape_character
Bash Initialization Files:
http://www.solipsys.co.uk/new/BashInitialisationFiles.html?HN0811
(Chinese link)
http://sns.linuxpk.com/home.php?mod=space&uid=55617&do=blog&id=16477
edit editor "gvim %s"
edit editor "xterm -e vim %s"
edit editor "gnome-terminal -e \"vim %s\""
edit editor "gedit %s"
Friday, November 23, 2012
set terminal foreground/background color
setterm -term linux -back blue -fore white -clear
http://superuser.com/questions/248299/how-to-change-background-foreground-color-on-all-existing-terminals
http://matt-linux-log.blogspot.com/2010/09/change-tty-text-and-background-colour.html
Bash Prompt HOWTO
http://www.faqs.org/docs/Linux-HOWTO/Bash-Prompt-HOWTO.html
Well explanation on Colors & Prompts in BASH
http://systhread.net/texts/200703bashish.php
Other references and resource
Xterm Control Sequences
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
Xterm
http://en.wikipedia.org/wiki/Xterm
Terminal Color configuration:
http://www.pixelbeat.org/docs/terminal_colours/
More Detail visual examples:
https://wiki.archlinux.org/index.php/Color_Bash_Prompt
Modified:
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[32m\]\$
Thursday, November 22, 2012
FPGA Design and Verification in Mechatronic Applications
VHDL-AMS
The System Designer’s Guide to VHDL-AMS: Analog, Mixed-Signal, and Mixed-Technology Modeling.
http://eetimes.com/design/automotive-design/4011419/Virtual-prototyping-boosts-model-driven-Design-for-Six-Sigma-methodology-Part-3-of-3--Design-example-Electronic-throttle-control
The System Designer’s Guide to VHDL-AMS: Analog, Mixed-Signal, and Mixed-Technology Modeling.
http://eetimes.com/design/automotive-design/4011419/Virtual-prototyping-boosts-model-driven-Design-for-Six-Sigma-methodology-Part-3-of-3--Design-example-Electronic-throttle-control
Tuesday, November 20, 2012
Multi-dimensional Fourier Transform and separability
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT4/node2.html
Simple Separability Proof
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fwww.cs.unm.edu%2F~williams%2Fcs530%2Fft2d.pdf&ei=zN2rUMjxAa3biwKzuIDgCQ&usg=AFQjCNE7HhwvVkAK8c9JyjpWT0x8EIlJsA
N dimensional Fourier Transfrom (Stanford SEE)
n-dimensional Fourier Transform
Simple Separability Proof
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fwww.cs.unm.edu%2F~williams%2Fcs530%2Fft2d.pdf&ei=zN2rUMjxAa3biwKzuIDgCQ&usg=AFQjCNE7HhwvVkAK8c9JyjpWT0x8EIlJsA
N dimensional Fourier Transfrom (Stanford SEE)
n-dimensional Fourier Transform
Sunday, November 18, 2012
Memory Organization and multi-dimensional logic
http://jemooo.com/memory-part-one/
Memory Organization:
www.cs.pitt.edu/~childers/CS1541/lectures/MemOrg.pdf
RAM Structure:
http://tams-www.informatik.uni-hamburg.de/applets/hades/webdemos/40-memories/40-ram/ram.html
Buffer
http://www.allaboutcircuits.com/vol_4/chpt_3/3.html
Memory Organization:
www.cs.pitt.edu/~childers/CS1541/lectures/MemOrg.pdf
RAM Structure:
http://tams-www.informatik.uni-hamburg.de/applets/hades/webdemos/40-memories/40-ram/ram.html
Buffer
http://www.allaboutcircuits.com/vol_4/chpt_3/3.html
Dailly Reading: Open collector
Applications of open-collector devices
Because the pull-up resistor is external and need not be connected to the chip supply voltage, a lower or higher voltage can be used instead.
Open collector circuits are therefore sometimes used to interface different families of devices that have different operating voltage levels. The open-collector transistor can be rated to withstand a higher voltage than the chip supply voltage. Such devices are commonly used to drive devices such as Nixie tubes, and vacuum fluorescent displays which require higher operating voltages than the usual 5-volt logic supply.
Another advantage is that more than one open-collector output can connect to a single line.
If all outputs attached to the line are in the high-impedance state, the pull-up resistor will hold the wire in a high voltage(logic 1) state.
If one or more device outputs are in the logic 0 (ground) state, they will sink current and pull the line voltage toward ground.
Open-collector devices are commonly used to connect multiple devices to a bus (i.e., one carrying interrupt or write-enable signals). This enables one device to drive the bus without interference from the other inactive devices - if open-collector devices are not used, then the outputs of the inactive devices would attempt to hold the bus voltage high, resulting in unpredictable output.
By tying the output of several open collectors together, the common line becomes a "wired AND" (positive-true logic) or "wired OR" (negative-true logic) gate.
A "wired OR" behaves like the boolean OR for negative-true logic, where the output is LOW if any one of its inputs is low. Such circuit constructions are termed "wired-AND" and "wired-OR",
Hardware Porting Solution:
SCSI-1 devices use open collector for electrical signaling. [1] SCSI-2 and SCSI-3 may use EIA-485.
SCSI Parallel Interface??
Because the pull-up resistor is external and need not be connected to the chip supply voltage, a lower or higher voltage can be used instead.
Open collector circuits are therefore sometimes used to interface different families of devices that have different operating voltage levels. The open-collector transistor can be rated to withstand a higher voltage than the chip supply voltage. Such devices are commonly used to drive devices such as Nixie tubes, and vacuum fluorescent displays which require higher operating voltages than the usual 5-volt logic supply.
Another advantage is that more than one open-collector output can connect to a single line.
If all outputs attached to the line are in the high-impedance state, the pull-up resistor will hold the wire in a high voltage(logic 1) state.
If one or more device outputs are in the logic 0 (ground) state, they will sink current and pull the line voltage toward ground.
Open-collector devices are commonly used to connect multiple devices to a bus (i.e., one carrying interrupt or write-enable signals). This enables one device to drive the bus without interference from the other inactive devices - if open-collector devices are not used, then the outputs of the inactive devices would attempt to hold the bus voltage high, resulting in unpredictable output.
By tying the output of several open collectors together, the common line becomes a "wired AND" (positive-true logic) or "wired OR" (negative-true logic) gate.
A "wired OR" behaves like the boolean OR for negative-true logic, where the output is LOW if any one of its inputs is low. Such circuit constructions are termed "wired-AND" and "wired-OR",
Hardware Porting Solution:
SCSI-1 devices use open collector for electrical signaling. [1] SCSI-2 and SCSI-3 may use EIA-485.
SCSI Parallel Interface??
Dailly reading: Tri-state logic and high impedence
Three-state logic
http://en.wikipedia.org/wiki/Three-state_logic
high impedance:
http://en.wikipedia.org/wiki/High_impedance
Digital electronics
High Impedance: Low current, high voltage
Low Impedance: Low voltage, High current
In digital circuits, a high impedance (also known as hi-Z, tri-stated or floating) output is not being driven to any defined logic level by the output circuit. The signal is neither driven to a logical high nor low level; this third condition lead to the description "tri-stated". Such a signal can be seen as an open circuit (or "floating" wire) because connecting it to a low impedance circuit will not affect that circuit; it will instead itself be pulled to the same voltage as the actively driven output. The combined input/output pins found on many ICs are actualy tri-state capable outputs which have been internally connected to inputs. This is the basis for bus-systems in computers, among many other uses.
The high-impedance state of a given node in a circuit cannot be verified by a voltage measurement alone.
A pull-up resistor can be used to try to pull the wire to high and low voltage levels. If the nodes is not in a high-impedance state, extra current from the resistor will not significantly affect its voltage level.
Analog electronics:
The high impedance node is one that does not have any low impedance paths to any other nodes.
Three-state logic
3 state logic allows an output port to assume a high impedance state, effectively removing the output from the circuit. This allows multiple circuits to share the same output line or lines.
Such as a bus which cannot listen to more than one device at a time.
Active low (OE output enable) which dictates whether the outputs should be held in high-impedance state or drive their respective loads (to either 0- or 1-level)
The whole concept of the third state is to effectively remove the device's influence from the rest of the circuit. If more than one device is electrically connected, putting an output into the Hi-Z state is often used to prevent short circuits, or one device driving high (logic 1) against another device driving low (logical 0).
In particular, they are essential to the operation of a shared electronic bus.
Output enable vs. chip select
If CS is not asserted, the outputs are high impedance.
The difference lies in the time needed to output the signal. When chip select is deasserted, the chip does not operate internally, and there will be a significant delay between providing an address and receiving the data (An advantage of course, is that the chip consumes minimal power in this case.)
When chip select is asserted, the chip internally performs the access, and only the final output drivers are disabled by deasserting output enable. This can be done while the bus in use for other purposes.
Circuit designers will often use pull-up or pull-down resistors (usually within the range of 1-100kohm) to influence the circuit when the output is tri-stated. For example, I2C bus protocol (a bi-directional communication bus protocol often used between devices) specifies the use of pull-up resistors on the two communication lines. When devices are inactive, they "release " the communication lines and tri-state their outputs, thus removing their influence on the circuit. When all the devices on the bus have "released" the communication lines, the only influence on the circuit is the pull-up resistors, which pull the lines high. When a device wants to communicate, it comes out of the Hi-Z state and drives the line low. Devices communicating using this protocol either let the line float high, or drive it low-- thus preventing any bus contention situation where one device drives a line high and another low.
The PCI local bus provides pull-up resistors, but they would require several clock cycles to pull a signal high given the bus's large distributed capacitance. To enable high-speed operation, the protocol requires that every device connecting to the bus drive the important control signals high for at least one clock cycle before going to the Hi-Z state. This way, the pull-up resistors are only responsible for maintaining the bus signals in the face of leakage current.
Hardware configuration solution:
http://en.wikipedia.org/wiki/Three-state_logic
high impedance:
http://en.wikipedia.org/wiki/High_impedance
Digital electronics
High Impedance: Low current, high voltage
Low Impedance: Low voltage, High current
In digital circuits, a high impedance (also known as hi-Z, tri-stated or floating) output is not being driven to any defined logic level by the output circuit. The signal is neither driven to a logical high nor low level; this third condition lead to the description "tri-stated". Such a signal can be seen as an open circuit (or "floating" wire) because connecting it to a low impedance circuit will not affect that circuit; it will instead itself be pulled to the same voltage as the actively driven output. The combined input/output pins found on many ICs are actualy tri-state capable outputs which have been internally connected to inputs. This is the basis for bus-systems in computers, among many other uses.
The high-impedance state of a given node in a circuit cannot be verified by a voltage measurement alone.
A pull-up resistor can be used to try to pull the wire to high and low voltage levels. If the nodes is not in a high-impedance state, extra current from the resistor will not significantly affect its voltage level.
Analog electronics:
The high impedance node is one that does not have any low impedance paths to any other nodes.
Three-state logic
3 state logic allows an output port to assume a high impedance state, effectively removing the output from the circuit. This allows multiple circuits to share the same output line or lines.
Such as a bus which cannot listen to more than one device at a time.
Active low (OE output enable) which dictates whether the outputs should be held in high-impedance state or drive their respective loads (to either 0- or 1-level)
The whole concept of the third state is to effectively remove the device's influence from the rest of the circuit. If more than one device is electrically connected, putting an output into the Hi-Z state is often used to prevent short circuits, or one device driving high (logic 1) against another device driving low (logical 0).
In particular, they are essential to the operation of a shared electronic bus.
Output enable vs. chip select
If CS is not asserted, the outputs are high impedance.
The difference lies in the time needed to output the signal. When chip select is deasserted, the chip does not operate internally, and there will be a significant delay between providing an address and receiving the data (An advantage of course, is that the chip consumes minimal power in this case.)
When chip select is asserted, the chip internally performs the access, and only the final output drivers are disabled by deasserting output enable. This can be done while the bus in use for other purposes.
Circuit designers will often use pull-up or pull-down resistors (usually within the range of 1-100kohm) to influence the circuit when the output is tri-stated. For example, I2C bus protocol (a bi-directional communication bus protocol often used between devices) specifies the use of pull-up resistors on the two communication lines. When devices are inactive, they "release " the communication lines and tri-state their outputs, thus removing their influence on the circuit. When all the devices on the bus have "released" the communication lines, the only influence on the circuit is the pull-up resistors, which pull the lines high. When a device wants to communicate, it comes out of the Hi-Z state and drives the line low. Devices communicating using this protocol either let the line float high, or drive it low-- thus preventing any bus contention situation where one device drives a line high and another low.
The PCI local bus provides pull-up resistors, but they would require several clock cycles to pull a signal high given the bus's large distributed capacitance. To enable high-speed operation, the protocol requires that every device connecting to the bus drive the important control signals high for at least one clock cycle before going to the Hi-Z state. This way, the pull-up resistors are only responsible for maintaining the bus signals in the face of leakage current.
Hardware configuration solution:
A three-state bus is typically used between chips on a single printed circuit board (PCB), or sometimes between PCBs plugged into a common backplane.
An open-collector bus is often used between PCBs plugged into a common backplane, or connected over longer cables.
Friday, November 16, 2012
How to grep word
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_04_02.html
If you want to get a list of all five-character English dictionary words starting with "c" and ending in "h" (handy for solving crosswords):
For matching multiple characters, use the asterisk. This example selects all words starting with "c" and ending in "h" from the system's dictionary:
If you want to get a list of all five-character English dictionary words starting with "c" and ending in "h" (handy for solving crosswords):
cathy ~> grep '\<c...h\>' /usr/share/dict/words
catch
clash
cloth
coach
couch
cough
crash
crush
For matching multiple characters, use the asterisk. This example selects all words starting with "c" and ending in "h" from the system's dictionary:
cathy ~> grep '\<c.*h\>' /usr/share/dict/words caliph cash catch cheesecloth cheetah --output omitted--
Thursday, November 15, 2012
vimdiff Tutorial
http://amjith.blogspot.com/2008/08/quick-and-dirty-vimdiff-tutorial.html
- If you load up two files in splits (:vs or :sp), you can do :diffthis on each window and achieve a diff of files that were already loaded in buffers
- :diffoff can be used to turn off the diff mode.
How to use non-blocking sends and receives to great effect
http://www.cs.ucsb.edu/~hnielsen/cs140/mpi-deadlocks.html
The send and receive calls are almost exactly the same as the blocking versions, with two differences. The first (which is conceptually important) is that the function will return immediately, regardless of whether the send or receive has finished. The second (which is important for the implementation) is that they take an MPI_Request pointer as the final parameter. This is later used to verify that the send or receive has been completed by calling MPI_Wait().
It is important to note that you can use any combination of blocking and non-blocking receives!
Concept: Race Condition
electronics
Computing
Filesystem
http://en.wikipedia.org/wiki/Race_condition
The send and receive calls are almost exactly the same as the blocking versions, with two differences. The first (which is conceptually important) is that the function will return immediately, regardless of whether the send or receive has finished. The second (which is important for the implementation) is that they take an MPI_Request pointer as the final parameter. This is later used to verify that the send or receive has been completed by calling MPI_Wait().
It is important to note that you can use any combination of blocking and non-blocking receives!
Concept: Race Condition
electronics
Computing
Filesystem
http://en.wikipedia.org/wiki/Race_condition
Summary
- Use the calls MPI_Isend() or MPI_Irecv() to initiate a non-blocking transfer.
- Always include an MPI_Wait() after a non-blocking call. The buffer you specified in the send or receive doesn't contain modifiable (in the case of sending) or even readable data (in the case of receiving) until this call completes.
- You can use a non-blocking call with a blocking call. Most of the example code does this.
- Be very careful about race conditions in the data. Don't write to data that is being sent, and don't read or write to data that is being received.
Wednesday, November 14, 2012
Dailly Reading: Asynchronous_I/O (wiki)
http://en.wikipedia.org/wiki/Asynchronous_I/O
Asynchronous I/O (non-blocking I/O),
Keywords/Concept map:
Hardware device status polled
hardware interrupts
Multitasking operating systems
Spooling?
multithreading
Forms:
All forms of asynchronous I/O open applications up to potential resource conflicts and associated failure. Careful programming often using
mutual exclusion, semaphores, etc)
Signals (Interrupts)
Available in BSD and POSIX Unix. I/O is issued asynchronously, and when it is complete a signal (interrupt) is generated. As in low-level kernel programming, the facilities structures as seen by the signal handler. The signal handler is usually not able to issue further asynchronous I/O by itself.
IO Synchronous Asynchronous Blocking IO Non Blocking IO (In chinese) http://blog.csdn.net/historyasamirror/article/details/5778378
Richard Stevens:
Unix Network Programming Volume 1, Third Edition: The Sockets Networking.
Section 6.2 I/O Models
Asynchronous I/O (non-blocking I/O),
Keywords/Concept map:
Hardware device status polled
hardware interrupts
Multitasking operating systems
Spooling?
multithreading
Forms:
All forms of asynchronous I/O open applications up to potential resource conflicts and associated failure. Careful programming often using
mutual exclusion, semaphores, etc)
Signals (Interrupts)
Available in BSD and POSIX Unix. I/O is issued asynchronously, and when it is complete a signal (interrupt) is generated. As in low-level kernel programming, the facilities structures as seen by the signal handler. The signal handler is usually not able to issue further asynchronous I/O by itself.
IO Synchronous Asynchronous Blocking IO Non Blocking IO (In chinese) http://blog.csdn.net/historyasamirror/article/details/5778378
Richard Stevens:
Unix Network Programming Volume 1, Third Edition: The Sockets Networking.
Section 6.2 I/O Models
Reducing Thermocouple Noise to Improve Measurements (NI)
http://digital.ni.com/public.nsf/allkb/9B99C4C98952F38486256298005A236D
Field Wiring and Noise Considerations for Analog Signals
http://www.ni.com/white-paper/3344/en
Field Wiring and Noise Considerations for Analog Signals
http://www.ni.com/white-paper/3344/en
Thermocouples Vs. Thermistors (Temperature Measurement)
http://www.veriteq.com/validation/thermocouples-vs-thermistors.htm
Measuring Temperature: Managing Errors & Calibration:
Signal Errors & Noise
Measuring Temperature: Managing Errors & Calibration:
Signal Errors & Noise
Monday, November 12, 2012
assert() Function Example Program in C
http://www.java-samples.com/showtutorial.php?tutorialid=595
The macro assert() can diagnose program bugs. It is defined in ASSERT.H, and its prototype is
The argument expression can be anything you want to test-a variable or any C expression. If expression evaluates to TRUE, assert() does nothing. If expression evaluate to FALSE, assert() displays an error message on stderr and aborts program execution.
How do you use assert()? It is most frequently used to track down program bugs (which are distinct from compilation errors). A bug doesn't prevent a program from compiling, but it causes it to give incorrect results or to run improperly (locking up, for example).
Analysis:
The action of assert() depends on another macro named NDEBUG (which stands for "no debugging"). If the macro NDEBUG isn't defined (the default), assert() is active. If NDEBUG is defined, assert() is turned off and has no effect. If you placed assert() in various program locations to help with debugging and then solved the problem, you can define NDEBUG to turn assert() off. This is much easier than going through the program and removing the assert() statements (only to discover later that you want to use them again). To define the macro NDEBUG, use the #define directive. You can demonstrate this by adding the line
#define NDEBUG
Note that NDEBUG doesn't need to be defined as anything in particular, as long as it's included in a #define directive.
The macro assert() can diagnose program bugs. It is defined in ASSERT.H, and its prototype is
The argument expression can be anything you want to test-a variable or any C expression. If expression evaluates to TRUE, assert() does nothing. If expression evaluate to FALSE, assert() displays an error message on stderr and aborts program execution.
How do you use assert()? It is most frequently used to track down program bugs (which are distinct from compilation errors). A bug doesn't prevent a program from compiling, but it causes it to give incorrect results or to run improperly (locking up, for example).
Analysis:
The action of assert() depends on another macro named NDEBUG (which stands for "no debugging"). If the macro NDEBUG isn't defined (the default), assert() is active. If NDEBUG is defined, assert() is turned off and has no effect. If you placed assert() in various program locations to help with debugging and then solved the problem, you can define NDEBUG to turn assert() off. This is much easier than going through the program and removing the assert() statements (only to discover later that you want to use them again). To define the macro NDEBUG, use the #define directive. You can demonstrate this by adding the line
#define NDEBUG
Note that NDEBUG doesn't need to be defined as anything in particular, as long as it's included in a #define directive.
Sunday, November 11, 2012
SPMD
We compiled a single program -- we didn't compile a different program for each process-- and we did this in spite of the fact that process 0 is doing something fundamentally different from the other process. This is quite common in parallel programming. In fact, most MPI programs are written in this way. That is, single program is written so that different processes carry out different actions, and this is achieved by simply having the processes branch on the basis of their process rank. (SPMD) Single Program multiple data.
--An introduction to Parallel Programming,
Peter S. Pacheco
University of San Francisco
--An introduction to Parallel Programming,
Peter S. Pacheco
University of San Francisco
Monday, November 5, 2012
Extreme programming
Extreme Programming (XP) is a software development methodology which is intended to improve software quality and responsiveness to changing customer requirements. As a type of agile software development,[1][2][3] it advocates frequent "releases" in short development cycles (timeboxing), which is intended to improve productivity and introduce checkpoints where new customer requirements can be adopted.
Other elements of Extreme Programming include: programming in pairs or doing extensive code review, unit testing of all code, avoiding programming of features until they are actually needed, a flat management structure, simplicity and clarity in code, expecting changes in the customer's requirements as time passes and the problem is better understood, and frequent communication with the customer and among programmers.[2][3][4] The method takes its name from the idea that the beneficial elements of traditional software engineering practices are taken to "extreme" levels, on the theory that if a little is good, more is better.[clarification needed]
------Wiki
Other elements of Extreme Programming include: programming in pairs or doing extensive code review, unit testing of all code, avoiding programming of features until they are actually needed, a flat management structure, simplicity and clarity in code, expecting changes in the customer's requirements as time passes and the problem is better understood, and frequent communication with the customer and among programmers.[2][3][4] The method takes its name from the idea that the beneficial elements of traditional software engineering practices are taken to "extreme" levels, on the theory that if a little is good, more is better.[clarification needed]
------Wiki
Thursday, November 1, 2012
Ubuntu 12.04 cannot login, bounces back to login splash
Press CTRL+ALT+F1 and log in there and run:
sudo chown -R $USER:$USER $HOME
Then press CTRL+ALT+F7 and try to log in
Sunday, October 28, 2012
Cache Mapping
Cache to Ram Ration
A processor might have 512 KB of Cache and 512 MB of RAM.
There may be 1000 times more RAM than cache.
The cache algorithms have to carefully select the 0.1% of the memory that is likely to be most accessed.
A cache line contains two fields
Data from RAM
The address of the block is called the tag field.
Mapping:
The memory system has to quickly determine if a given address is in the cache.
Three popular methods of mapping addresses to cache locations.
-- Fully Associative
Search the entire cache for an address.
--Direct
Each address has a specific place in the cache.
--Set Associative
Each address can be in any of a small set of cache locations.
Searching Problem
Knowledge of searching
Linear Search O(n)
Binary Search O(log2 (n))
Hashing O(1)
Parallel Search O(n/p)
Associative Mapping
The data from any location in RAM can be stored in any location in cache.
When the processor wants an address, all tag fields in the cache as checked to determine if the data is already in the cache.
Each tag line requires circuitry to compare the desired address with the tag field.
All tag fields are checked in parallel.
Set Associative Mapping
Set associative mapping is a mixture of direct and associative mapping.
The cache lines are grouped into sets.
Replacement policy
When a cache miss occurs, data is copied into some location in cache.
With Set Associative of Fully Associative mapping, the system must decide where to put the data and what values will be replaced.
Cache performance is greatly affected by properly choosing data that is unlikely to referenced again.
Replacement Options
First In First Out (FIFO)
Least Recently Used (LRU)
Pseudo LRU
Random
Comparison of Mapping Fully Associatve
Associate mapping works the best, but is complex to implement. Each tag line requires circuitry to compare the desired address with the tag field.
Some special purpose $, such as the virtual memory Translation Lookaside Buffer (TLB) is an associative cache.
Comparison of Mapping Direct.
Has the lowest performance, but is easiest to implement. Direct is often used for instruction cache.
Sequential addresses fill a cache line and then go to the next cache line.
A processor might have 512 KB of Cache and 512 MB of RAM.
There may be 1000 times more RAM than cache.
The cache algorithms have to carefully select the 0.1% of the memory that is likely to be most accessed.
A cache line contains two fields
Data from RAM
The address of the block is called the tag field.
Mapping:
The memory system has to quickly determine if a given address is in the cache.
Three popular methods of mapping addresses to cache locations.
-- Fully Associative
Search the entire cache for an address.
--Direct
Each address has a specific place in the cache.
--Set Associative
Each address can be in any of a small set of cache locations.
Searching Problem
Knowledge of searching
Linear Search O(n)
Binary Search O(log2 (n))
Hashing O(1)
Parallel Search O(n/p)
Associative Mapping
The data from any location in RAM can be stored in any location in cache.
When the processor wants an address, all tag fields in the cache as checked to determine if the data is already in the cache.
Each tag line requires circuitry to compare the desired address with the tag field.
All tag fields are checked in parallel.
Set Associative Mapping
Set associative mapping is a mixture of direct and associative mapping.
The cache lines are grouped into sets.
Replacement policy
When a cache miss occurs, data is copied into some location in cache.
With Set Associative of Fully Associative mapping, the system must decide where to put the data and what values will be replaced.
Cache performance is greatly affected by properly choosing data that is unlikely to referenced again.
Replacement Options
First In First Out (FIFO)
Least Recently Used (LRU)
Pseudo LRU
Random
Comparison of Mapping Fully Associatve
Associate mapping works the best, but is complex to implement. Each tag line requires circuitry to compare the desired address with the tag field.
Some special purpose $, such as the virtual memory Translation Lookaside Buffer (TLB) is an associative cache.
Comparison of Mapping Direct.
Has the lowest performance, but is easiest to implement. Direct is often used for instruction cache.
Sequential addresses fill a cache line and then go to the next cache line.
Interleaving & Memory Interleaving
Computer Memory, Communication system, error correction,
http://en.wikipedia.org/wiki/Interleaving
http://fourier.eng.hmc.edu/e85/lectures/memory/node2.html
http://en.wikipedia.org/wiki/Interleaving
http://fourier.eng.hmc.edu/e85/lectures/memory/node2.html
Issues Related to Cache Memory
- Load-ThroughWhen the CPU needs to read a word from the memory, the block containing the word is brought from MM to CM, while at the same time the word is forwarded to the CPU.
- Store-ThroughIf store-through is used, a word to be stored from CPU to memory is written to both CM (if the word is in there) and MM. By doing so, a CM block to be replaced can be overwritten by an in-coming block without being saved to MM.
CUDA Shared Memory broadcast
Multiple addresses map to same memory bank
Accesses are serialized
Hardware splits request into as many separate conflict-free requests as necessary
Exception: if all access the same address: broadcast
However, recent large improvements in CUBLAS and CUFFT performance were achieved by avoiding shared memory in favor of registers -- so try to use registers whenever possible.
If all threads read from the same shared memory address then a broadcast mechanism is automatically invoked and serialization is avoided. Shared memory broadcasts are an excellent and high-performance way to get data to many threads simultaneously.
It is worthwhile trying to exploit this feature whenever you use shared memory.
----Rob Farber
www.drdobbs.com/parallel/cuda-supercomputing-for-the-masses-part/208801731
CUDA, Supercomputing for the masses: Part 5
Accesses are serialized
Hardware splits request into as many separate conflict-free requests as necessary
Exception: if all access the same address: broadcast
However, recent large improvements in CUBLAS and CUFFT performance were achieved by avoiding shared memory in favor of registers -- so try to use registers whenever possible.
If all threads read from the same shared memory address then a broadcast mechanism is automatically invoked and serialization is avoided. Shared memory broadcasts are an excellent and high-performance way to get data to many threads simultaneously.
It is worthwhile trying to exploit this feature whenever you use shared memory.
----Rob Farber
www.drdobbs.com/parallel/cuda-supercomputing-for-the-masses-part/208801731
CUDA, Supercomputing for the masses: Part 5
Vim cheatsheet
http://www.worldtimzone.com/res/vi.html
Tuesday, October 23, 2012
Sunday, October 21, 2012
Friday, October 19, 2012
5.1 Cost of Solving a System of Linear Equations Using Gaussian Elimination
http://ceee.rice.edu/Books/CS/chapter5/cost1.html
Thursday, October 18, 2012
Cost of Solving a System of Linear Equations Using Gaussian Elimination
http://ceee.rice.edu/Books/CS/chapter5/cost1.html
Monday, October 15, 2012
Today's reading: Computer Architecture: Appendix B1
Reviews of Memory Hierarchy
Palt When the processor references an item within a page that is not present in cache or main memory.
Palt occurs.
Palt When the processor references an item within a page that is not present in cache or main memory.
Palt occurs.
Syntax error: Bad for loop variable
With sh or ksh, you must use a while statement.
Jean-Pierre.
http://www.unix.com/shell-programming-scripting/60860-loop-syntax-trouble.html
chmod 755 xxxxx.sh
./xxxxx
Jean-Pierre.
http://www.unix.com/shell-programming-scripting/60860-loop-syntax-trouble.html
chmod 755 xxxxx.sh
./xxxxx
Bash/Shell Programming – Binary Operator Expected
http://digitalvectorz.wordpress.com/2009/12/10/bashshell-programming-binary-operator-expected/
if [[ -n `ls | grep something` ]]; then
echo "Success";
fi
Nested if/then condition:
http://tldp.org/LDP/abs/html/nestedifthen.html
if [ "$a" -gt 0 ]
then
if [ "$a" -lt 5 ]
then
echo "The value of \"a\" lies somewhere between 0 and 5."
fi
fi
Linux C exit function
http://en.wikipedia.org/wiki/Exit_%28operating_system%29
http://linux.about.com/library/cmd/blcmdl3_exit.htm
http://stackoverflow.com/questions/2007558/exit-function-on-linux
include
stdlib
cstdlib (C++)
http://linux.about.com/library/cmd/blcmdl3_exit.htm
http://stackoverflow.com/questions/2007558/exit-function-on-linux
include
stdlib
cstdlib (C++)
Sunday, October 14, 2012
How to use string as data for plotting in Matlab?
http://stackoverflow.com/questions/3672637/how-to-use-string-as-data-for-plotting-in-matlab
x = yourXdata;
y = yourYdata;
labels = {'A' 'B' 'C'};
plot(x, y); set(gca, 'XTick', 1:3, 'XTickLabel', labels);
How to Set the Tick Locations and Labels
http://www.math.ufl.edu/help/matlab/tec2.10.html
Thread Subject: convert matrix (double) to cell array (string) without for loop
a = 1:3 ;
b = strread(num2str(a),'%s')
http://www.mathworks.com/matlabcentral/newsreader/view_thread/156758
x = yourXdata;
y = yourYdata;
labels = {'A' 'B' 'C'};
plot(x, y); set(gca, 'XTick', 1:3, 'XTickLabel', labels);
How to Set the Tick Locations and Labels
http://www.math.ufl.edu/help/matlab/tec2.10.html
Thread Subject: convert matrix (double) to cell array (string) without for loop
a = 1:3 ;
b = strread(num2str(a),'%s')
http://www.mathworks.com/matlabcentral/newsreader/view_thread/156758
Inside Nehalem: Intel’s Future Processor and System
http://www.realworldtech.com/nehalem/7/
L1D Cache?
Inclusive caches are forced by design to replicate data, which implies certain relationships between the sizes of the various levels of the cache. In the case of Nehalem, each core contains 64KB of data in the L1 caches and 256KB in the L2 cache (there may or may not be data that is in both the L1 and L2 caches).
This means that 1-1.25MB of the 8MB L3 cache in Nehalem is filled with data that is also in other caches. What this means is that inclusive caches should only really be used where there is a fairly substantial size difference between the two levels. Nehalem has about an 8X difference between the sum of the four L2 caches and the L3, while Barcelona’s L3 cache is the same size as the total of the L2 caches.
Nehalem’s cache hierarchy has also been made more flexible by increasing support for unaligned accesses.
As a result, an unaligned SSE load or store will always have the same latency as an aligned memory access, so there is no particular reason to use aligned SSE memory accesses.
L1D Cache?
Inclusive caches are forced by design to replicate data, which implies certain relationships between the sizes of the various levels of the cache. In the case of Nehalem, each core contains 64KB of data in the L1 caches and 256KB in the L2 cache (there may or may not be data that is in both the L1 and L2 caches).
This means that 1-1.25MB of the 8MB L3 cache in Nehalem is filled with data that is also in other caches. What this means is that inclusive caches should only really be used where there is a fairly substantial size difference between the two levels. Nehalem has about an 8X difference between the sum of the four L2 caches and the L3, while Barcelona’s L3 cache is the same size as the total of the L2 caches.
Nehalem’s cache hierarchy has also been made more flexible by increasing support for unaligned accesses.
As a result, an unaligned SSE load or store will always have the same latency as an aligned memory access, so there is no particular reason to use aligned SSE memory accesses.
Saturday, October 13, 2012
TLB Translation Lookaside Buffer
A TLB has a fixed number of slots that contain page table entries, which map virtual addresses to physical addresses. The virtual memory is the space seen from a process. This space is segmented in pages of a prefixed size. The page table
(generally loaded in memory) keeps track of where the virtual pages are
loaded in the physical memory. The TLB is a cache of the page table; that is, only a subset of its contents are stored.
The TLB references physical memory addresses in its table.
The TLB references physical memory addresses in its table.
bash for loop exampe
http://www.thegeekstuff.com/2011/07/bash-for-loop-examples/
General solution of output redirection
http://askubuntu.com/questions/75327/redirection-doesnt-work
http://www.mathinfo.u-picardie.fr/asch/f/MeCS/courseware/users/help/general/unix/redirection.html
>> Append standard output
Sometimes shell redirecting does not work (specifically - when one shell spawns another shell, I think:). Above is the generic solution that simply grabs all the shell output and places it into the file. In your case this should work as well, since you're expecting output on stdout/stderr.
http://www.mathinfo.u-picardie.fr/asch/f/MeCS/courseware/users/help/general/unix/redirection.html
>> Append standard output
Sometimes shell redirecting does not work (specifically - when one shell spawns another shell, I think:). Above is the generic solution that simply grabs all the shell output and places it into the file. In your case this should work as well, since you're expecting output on stdout/stderr.
|
Wire Parameter Calculator
http://circuitcalculator.com/wordpress/2007/09/20/wire-parameter-calculator
Friday, October 12, 2012
zssh and scp solution
http://www.hypexr.org/linux_scp_help.php
zssh
http://askubuntu.com/questions/13382/download-a-file-over-an-active-ssh-session
scp
http://www.howtogeek.com/66776/how-to-remotely-copy-files-over-ssh-without-entering-your-password/
zssh
http://askubuntu.com/questions/13382/download-a-file-over-an-active-ssh-session
scp
http://www.howtogeek.com/66776/how-to-remotely-copy-files-over-ssh-without-entering-your-password/
Wednesday, October 10, 2012
Matlab libc.so.6 permission deny
cannot mmap file
http://www.turnkeylinux.org/forum/support/20110216/cannot-mmap-file
rm /usr/lib/libGuestLib.so
ln -s /usr/lib/vmware-tools/lib32/libvmGuestLib.so/libvmGuestLib.so /usr/lib/libGuestLib.so
http://www.mathworks.com/support/solutions/en/data/1-ONA55/index.html?solution=1-ONA55
http://www.turnkeylinux.org/forum/support/20110216/cannot-mmap-file
rm /usr/lib/libGuestLib.so
ln -s /usr/lib/vmware-tools/lib32/libvmGuestLib.so/libvmGuestLib.so /usr/lib/libGuestLib.so
http://www.mathworks.com/support/solutions/en/data/1-ONA55/index.html?solution=1-ONA55
chmod 755 libc.so.6
Matlab
http://www.gatsby.ucl.ac.uk/~qhuys/matlab.html
Symbolic Link
http://www.mathworks.com/matlabcentral/answers/10134-usr-local-matlab-r2011a-bin-util-oscheck-sh-605-lib64-libc-so-6-not-found
http://askubuntu.com/questions/189318/missing-lib-libc-so-6
Tuesday, October 9, 2012
Homework LaTeX Template I use
https://gist.github.com/1278588
http://tex.stackexchange.com/questions/31183/class-file-for-homework-assignments
Saturday, October 6, 2012
Update Manager error : Requires installation of untrusted packages
http://ubuntuforums.org/showthread.php?t=1828748
sudo rm -r /var/lib/apt/lists
sudo mkdir -p /var/lib/apt/lists/partial
sudo aptitude update
sudo rm -r /var/lib/apt/lists
sudo mkdir -p /var/lib/apt/lists/partial
sudo aptitude update
Friday, October 5, 2012
Drawing Sexy graphs in Matlab
http://quantombone.blogspot.com/2012/01/drawing-sexy-graphs-in-matlab.html
From Tombone's blog
(Tomasz Malisiewicz)
MatLab GraphViz Interface
http://www.mathworks.com/matlabcentral/fileexchange/4518
From Leon Peshkin
2-D line plot
http://www.mathworks.com/help/matlab/ref/plot.html
Setting Properties
Making pretty graphs
http://blogs.mathworks.com/loren/2007/12/11/making-pretty-graphs/
Setting figure size:
http://stackoverflow.com/questions/5183047/matlab-setting-graph-figure-size
From Tombone's blog
(Tomasz Malisiewicz)
MatLab GraphViz Interface
http://www.mathworks.com/matlabcentral/fileexchange/4518
From Leon Peshkin
Drawing Beautiful Explicite and Implicite Functions using Matlab
http://www.falkoschindler.de/pub/2011/08/20-drawing-beautiful-explicite-and-implicite-functions-using-matlab/2-D line plot
http://www.mathworks.com/help/matlab/ref/plot.html
Setting Properties
Improving Your MATLAB Figures
Micah Kimo Johnson
http://www.mit.edu/~kimo/blog/improving_figures.htmlMaking pretty graphs
http://blogs.mathworks.com/loren/2007/12/11/making-pretty-graphs/
Setting figure size:
http://stackoverflow.com/questions/5183047/matlab-setting-graph-figure-size
hFig = figure(1); set(hFig, 'Position', [x y width height])
Infinite Geometric Series
http://www.intmath.com/series-binomial-theorem/3-infinite-geometric-series.php
If−1<r<1 , then the infinite geometric series
This value is given by:
If
a1 + a1r + a1r2 + a1r3 + ... + a1rn-1converges to a particular value.
This value is given by:
The series converges because each term gets smaller and smaller (since -1 < r < 1).S∞=a11−r (|r|<1)
Thursday, October 4, 2012
Daily Reading: Software stack
http://www.pcmag.com/encyclopedia_term/0,2542,t=software+stack&i=51702,00.asp
PC Mag
A set of programs that work together to produce a result; for example, an operating system and its applications. It may refer to any group of applications that work in sequence toward a common result or to any set of utilities or routines that work as a group.
Solution Stack
http://en.wikipedia.org/wiki/Solution_stack
A comprehensive definition from IBM:
http://pic.dhe.ibm.com/infocenter/tivihelp/v28r1/index.jsp?topic=%2Fcom.ibm.tivoli.tpm.scenario.doc%2Fsoftware%2Fcsfm_sftstack.html
Discussion on differences between OS and software stack
http://stackoverflow.com/questions/10283725/what-is-difference-between-software-stack-and-os-why-android-is-not-an-os-but
PC Mag
A set of programs that work together to produce a result; for example, an operating system and its applications. It may refer to any group of applications that work in sequence toward a common result or to any set of utilities or routines that work as a group.
Solution Stack
http://en.wikipedia.org/wiki/Solution_stack
A comprehensive definition from IBM:
http://pic.dhe.ibm.com/infocenter/tivihelp/v28r1/index.jsp?topic=%2Fcom.ibm.tivoli.tpm.scenario.doc%2Fsoftware%2Fcsfm_sftstack.html
Discussion on differences between OS and software stack
http://stackoverflow.com/questions/10283725/what-is-difference-between-software-stack-and-os-why-android-is-not-an-os-but
How to find/display your MAC address
Unix/Linux
http://www.coffer.com/mac_info/locate-unix.html
ifconfig -a
HWaddr
http://www.jonathanmoeller.com/screed/?p=3420
ifconfig | grep HWaddr
http://www.coffer.com/mac_info/locate-unix.html
ifconfig -a
HWaddr
http://www.jonathanmoeller.com/screed/?p=3420
ifconfig | grep HWaddr
Monday, October 1, 2012
Keeping a reading journal
http://cseweb.ucsd.edu/classes/fa12/cse260-b/Summaries.html
How to read a research paper:
In addition to summarizing the basic facts, your writeup
should
- discuss the contributions of the paper, reflecting, analyzing or criticizing the ideas presented
- offer insight into the authors' motivation
- explore open issues or ideas that you are wondering about after reading the paper
How to read a research paper:
with contributions of Bill Griswold, Gail Murphy, Cristina Conati, Erica Melis
http://www.cs.brandeis.edu/~cs227b/papers/introduction/howToRead.txt
What are motivations for this work?
The paper should describe why the problem is important and why it does not have a trivial solution; that is, why a new solution may be required.
What is the proposed solution?
There should also be an argument about why the solution solves the problem better than previous solutions. There should also be a discussion about how the solution is achieved (designed and implemented) or is at least achievable. Are all concepts and notations introduced before their first usage?
What is the evaluation of the proposed solution?
What argument and/or experiment is made to make a case for the value of the ideas? What benefits or problems are identified? Are they convincing?
What alternative solutions exist? Read a paper critically. What are the contributions? The contributions in a paper may be many and varied. Ideas, software, experimental techniques, and area survey are a few key possibilities. What are future directions for this research? Not only what future directions do the authors identify, but what ideas did you come up with while reading the paper?
You may find it productive to try to answer each question in turn, writing your answer down. In practice, you are not done reading a paper until you can answer all the questions.
Exascale Computing
Friday, September 28, 2012
Pressure Release Boundary Condition, Llyod-mirror
Geophysics Modeling Explanation:
WAVE TRANSMISSION THROUGH RANDOM LAYERING WITH
PRESSURE RELEASE BOUNDARY CONDITIONS
http://www.math.uci.edu/~ksolna/research/67_pulse_layered.pdf
Classical surface-image, Lloyd-mirror
Definition:
http://en.wikipedia.org/wiki/Lloyd%27s_mirror
WAVE TRANSMISSION THROUGH RANDOM LAYERING WITH
PRESSURE RELEASE BOUNDARY CONDITIONS
http://www.math.uci.edu/~ksolna/research/67_pulse_layered.pdf
Classical surface-image, Lloyd-mirror
Definition:
http://en.wikipedia.org/wiki/Lloyd%27s_mirror
Friday, September 21, 2012
5 Hiring Secrets You Need To Know Before Your Next Job Interview
http://www.businessinsider.com/5-hiring-secrets-you-need-to-know-before-your-next-job-interview-2012-9
Sunday, August 19, 2012
Tamiya technicraft
http://www.tamiya.com/english/products/list/technicraft/kit72001.htm
Saturday, August 11, 2012
Free electrons Embedded Linux Expert
http://free-electrons.com/
Roadmap to Linux driver beginner:
http://stackoverflow.com/questions/2683682/new-to-linux-kernel-driver-development
Roadmap to Linux driver beginner:
http://stackoverflow.com/questions/2683682/new-to-linux-kernel-driver-development
Wednesday, August 1, 2012
Possible solution something is missing problem of natbib
A sample document generated using the latex style file for csuf thesis
CSUF
CSUF
Saturday, July 28, 2012
Writing a Linux device driver module for kernel 3.0 or 2.6 with udev
http://pete.akeo.ie/2011/08/writing-linux-device-driver-for-kernels.html
Thursday, July 19, 2012
How to deal with 4 insanely tough interview questions
http://www.thedailymuse.com/job-search/4-insanely-tough-interview-questions-and-how-to-nail-them/
Sunday, July 1, 2012
Loading and unloading modules in Linux
# /sbin/lsmod
List of modules and the programs /kernel use
http://www.techrepublic.com/article/loading-and-unloading-modules-in-linux/5031591
rmmod ppp
List of modules and the programs /kernel use
http://www.techrepublic.com/article/loading-and-unloading-modules-in-linux/5031591
rmmod ppp
Friday, June 22, 2012
Wiki Transimission Line
Wikipedia Transmission Line
http://en.wikipedia.org/wiki/Transmission_line
"However, when the voltage changes in a time interval comparable to the time it takes for the signal to travel down the wire, the length becomes important and the wire must be treated as a transmission line. Stated another way, the length of the wire is important when the signal includes frequency components with corresponding wavelengths comparable to or less than the length of the wire."
"A common rule of thumb is that the cable or wire should be treated as a transmission line if the length is greater than 1/10 of the wavelength. At this length the phase delay and the interference of any reflections on the line become important and can lead to unpredictable behavior in systems which have not been carefully designed using transmission line theory."
http://en.wikipedia.org/wiki/Transmission_line
"However, when the voltage changes in a time interval comparable to the time it takes for the signal to travel down the wire, the length becomes important and the wire must be treated as a transmission line. Stated another way, the length of the wire is important when the signal includes frequency components with corresponding wavelengths comparable to or less than the length of the wire."
"A common rule of thumb is that the cable or wire should be treated as a transmission line if the length is greater than 1/10 of the wavelength. At this length the phase delay and the interference of any reflections on the line become important and can lead to unpredictable behavior in systems which have not been carefully designed using transmission line theory."
What is stray capacitance?
What is stray capacitance?
http://www.edaboard.com/thread179679.html
Wiki
http://en.wikipedia.org/wiki/Capacitance#Stray_capacitance
http://www.edaboard.com/thread179679.html
Wiki
http://en.wikipedia.org/wiki/Capacitance#Stray_capacitance
Tuesday, June 19, 2012
Convert .gif to png under Linux
convert image.gif image.png
http://superuser.com/questions/71028/batch-converting-png-to-jpg-in-linux
http://superuser.com/questions/71028/batch-converting-png-to-jpg-in-linux
Friday, June 15, 2012
ubuntu backup solution
help center
https://help.ubuntu.com/community/BackupYourSystem
rsync and grsync
https://help.ubuntu.com/community/rsync#Grsync
https://help.ubuntu.com/community/BackupYourSystem
rsync and grsync
https://help.ubuntu.com/community/rsync#Grsync
CUDA 4.2 install in 12.04
CUDA 4.2 install in 12.04
http://forums.nvidia.com/index.php?showtopic=231150
undefined reference to 'gluErrorString' trouble installing cuda on ubuntu 12.04:
Solution
http://forums.nvidia.com/index.php?showtopic=224163
cannot open libcudart.so.4
solution:
http://laurencedawson.com/upgrading-to-cuda-4.0
ldconfig
http://forums.nvidia.com/index.php?showtopic=231150
undefined reference to 'gluErrorString' trouble installing cuda on ubuntu 12.04:
Solution
http://forums.nvidia.com/index.php?showtopic=224163
cannot open libcudart.so.4
solution:
http://laurencedawson.com/upgrading-to-cuda-4.0
ldconfig
How to install LAMP in Ubuntu
http://ubuntublog.org/installing-lamp-ubuntu.htm
Tuesday, June 12, 2012
Customizing the sidebar in beamer
Marburg beamer
http://tex.stackexchange.com/questions/46874/customizing-the-sidebar-in-beamer
How to hide other SubSubsections in sidebar of beamerclass
http://tex.stackexchange.com/questions/51889/how-to-hide-other-subsubsections-in-sidebar-of-beamerclass
http://tex.stackexchange.com/questions/46874/customizing-the-sidebar-in-beamer
How to hide other SubSubsections in sidebar of beamerclass
http://tex.stackexchange.com/questions/51889/how-to-hide-other-subsubsections-in-sidebar-of-beamerclass
Monday, May 28, 2012
How to install LaTeX/Packages/Extra Packages
http://en.wikibooks.org/wiki/LaTeX/Packages/Installing_Extra_Packages
1. Extract the files:
Run LaTeX on the .ins file. That is, open the file in your editor and process it as if it were a LaTeX document.
Or type : latex xxx.ins in terminal window.
2. Create the documentation
Run LaTeX on the .dtx file. You might need to run it twice or more. to get the cross-references right (just like any other LaTeX document). This will create a .dvi file of documentation explaining what the package is for and how to use it. If you prefer to create PDF then run pdfLaTeX instead. If you created a .idx as well, it means that the document contains an index, too. .glo (glossary) file has been produced. Run the following command instead:
3. Install the files While the documentation is printing, move or copy the package files from your temporary directory to the right places in your TeX local installation directory tree, Packages installed by hand should always be placed in your "local" directory tree, not in the directory tree containing all the pre-installed packages.
Unix-type systems: Usually ~/texmf/ or ~/texmf-texlive
The "right place" sometimes causes confusion, especially if your TeX installation is old or does not conform to the TeX Directory Structure. For a TDS-conformant system, the "right place" for a LaTeX .sty file is suitably-named subdirectory of texmf/tex/latex/.
TDS?
http://www.tex.ac.uk/tex-archive/info/beginlatex/html/chapter5.html#TDS
4. Update your index Finally, run your TeX indexer program to update the package database.
texhash
mktexlsr
.....
Easy installatin/removal of a LaTeX package
http://askubuntu.com/questions/72803/easy-installation-removal-of-a-latex-package
1. Extract the files:
Run LaTeX on the .ins file. That is, open the file in your editor and process it as if it were a LaTeX document.
Or type : latex xxx.ins in terminal window.
2. Create the documentation
Run LaTeX on the .dtx file. You might need to run it twice or more. to get the cross-references right (just like any other LaTeX document). This will create a .dvi file of documentation explaining what the package is for and how to use it. If you prefer to create PDF then run pdfLaTeX instead. If you created a .idx as well, it means that the document contains an index, too. .glo (glossary) file has been produced. Run the following command instead:
makeindex -s gglo.ist -o name.gls name.glo
3. Install the files While the documentation is printing, move or copy the package files from your temporary directory to the right places in your TeX local installation directory tree, Packages installed by hand should always be placed in your "local" directory tree, not in the directory tree containing all the pre-installed packages.
Unix-type systems: Usually ~/texmf/ or ~/texmf-texlive
The "right place" sometimes causes confusion, especially if your TeX installation is old or does not conform to the TeX Directory Structure. For a TDS-conformant system, the "right place" for a LaTeX .sty file is suitably-named subdirectory of texmf/tex/latex/.
TDS?
http://www.tex.ac.uk/tex-archive/info/beginlatex/html/chapter5.html#TDS
4. Update your index Finally, run your TeX indexer program to update the package database.
texhash
mktexlsr
.....
This step is utterly essential, otherwise nothing will work.http://theoval.cmp.uea.ac.uk/~nlct/latex/novices/installsty.html
Easy installatin/removal of a LaTeX package
http://askubuntu.com/questions/72803/easy-installation-removal-of-a-latex-package
Sunday, May 27, 2012
LaTeX Classes or Styles for Schedules and /or Calendars/ Other LaTeX Templates
Stackexchange:
http://tex.stackexchange.com/questions/843/latex-classes-or-styles-for-schedules-and-or-calendars
Evan Sultanik:
LaTeX calendar style
http://www.sultanik.com/LaTeX_calendar_style
Gantt chart:
http://www.martin-kumm.de/tex_gantt_package.php
http://jldiaz.wikidot.com/en-tikz-example%3agantt
Other Latex templates for project management tasks:
http://tex.stackexchange.com/questions/1333/latex-templates-for-project-management-tasks
More stuff can be found in TikZ and PGF examples:
http://www.texample.net/tikz/examples/
LaTeX Templates
http://www.latextemplates.com/
CTAN Templates
http://www.ctan.org
LaTeX Edit Office (In Chinese)
http://zzg34b.w3.c361.com/index.htm
Books and templates.
http://tex.stackexchange.com/questions/843/latex-classes-or-styles-for-schedules-and-or-calendars
Evan Sultanik:
LaTeX calendar style
http://www.sultanik.com/LaTeX_calendar_style
Gantt chart:
http://www.martin-kumm.de/tex_gantt_package.php
http://jldiaz.wikidot.com/en-tikz-example%3agantt
Other Latex templates for project management tasks:
http://tex.stackexchange.com/questions/1333/latex-templates-for-project-management-tasks
More stuff can be found in TikZ and PGF examples:
http://www.texample.net/tikz/examples/
LaTeX Templates
http://www.latextemplates.com/
CTAN Templates
http://www.ctan.org
LaTeX Edit Office (In Chinese)
http://zzg34b.w3.c361.com/index.htm
Books and templates.
LaTeX Bibliography Management
http://www.usm.edu/zxzhou/tools/referencing/LaTex_Bibliography_Management.pdf
LyX and LaTeX
thesis templates:
http://www.thesis-template.com/
LyX and LaTeX
thesis templates:
http://www.thesis-template.com/
Wednesday, May 9, 2012
Can I use a binary literal in C or C++?
http://stackoverflow.com/questions/2611764/can-i-use-a-binary-literal-in-c-or-c
If you are using GCC then you can use GCC extension for this:
http://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
C operator precedence
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence
If you are using GCC then you can use GCC extension for this:
int x = 0b00010000;
http://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
Binary constants using the '0b' prefixhttp://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
C operator precedence
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence
Monday, May 7, 2012
How to measure time in NVIDIA CUDA?
Ivan's blog
http://ivanlife.wordpress.com/2011/05/09/time-cuda/
CUDA Developer Forum Discussion:
cudaEvent timer vs. Host timers
http://forums.developer.nvidia.com/devforum/discussion/7541/cudaevent-timers-vs-host-timers/p1
Parallel Nsight, NVIDIA Visual Profiler, CUDA profiler, and the CUPTI SDK provide the most accurate methods to measure the execution time of a kernel. The measured time does not include the overhead to launch the kernel.
cudaEventRecord is the most accurate method to measure the setup and execution time of a kernel.
A high percision CPU timer can be used to measure the overhead of the launch, the execution of the kernel, and the completion notification. If you use this method I recommend that you call cudaDeviceSynchronize() before the first clock to make sure there is no outstanding work that might delay the launch of the kernel. This method will have the highest variance as OS context switching and other applications using the GPU will show up in this method.
Greg Simth
http://ivanlife.wordpress.com/2011/05/09/time-cuda/
CUDA Developer Forum Discussion:
cudaEvent timer vs. Host timers
http://forums.developer.nvidia.com/devforum/discussion/7541/cudaevent-timers-vs-host-timers/p1
Parallel Nsight, NVIDIA Visual Profiler, CUDA profiler, and the CUPTI SDK provide the most accurate methods to measure the execution time of a kernel. The measured time does not include the overhead to launch the kernel.
cudaEventRecord is the most accurate method to measure the setup and execution time of a kernel.
A high percision CPU timer can be used to measure the overhead of the launch, the execution of the kernel, and the completion notification. If you use this method I recommend that you call cudaDeviceSynchronize() before the first clock to make sure there is no outstanding work that might delay the launch of the kernel. This method will have the highest variance as OS context switching and other applications using the GPU will show up in this method.
Greg Simth
Wednesday, May 2, 2012
Remarks on Gflops Measurement and Code Profiling
http://stackoverflow.com/questions/7875607/how-to-calculate-gflops-of-a-kernel
The presentation:
Analysis-Driven Optimization
by Paulius Micikevicius from NVIDIA
The presentation:
Analysis-Driven Optimization
by Paulius Micikevicius from NVIDIA
Tuesday, May 1, 2012
Copy file through Linux Shell Script
http://erpschools.com/articles/shell-script-tutorial
http://codeformatter.blogspot.com/
Another copy file script example
http://bash.cyberciti.biz/decision-making/copy-file-script/
SRC=~/Desktop/Blahblah.bmp
DST=~/Desktop/test/
cp ${SRC} ${DST}
Blogger Source Code Formatterhttp://codeformatter.blogspot.com/
Another copy file script example
http://bash.cyberciti.biz/decision-making/copy-file-script/
Saturday, April 28, 2012
include source code in latex
http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
http://stackoverflow.com/questions/3175105/how-to-insert-code-into-a-latex-doc
LaTeX Sample with professional look
http://stackoverflow.com/questions/741985/latex-source-code-listing-like-in-professional-books
http://stackoverflow.com/questions/3175105/how-to-insert-code-into-a-latex-doc
LaTeX Sample with professional look
http://stackoverflow.com/questions/741985/latex-source-code-listing-like-in-professional-books
Daily Reading: Locality of reference
Spatial Locality, Temporal Locality, relevant knowledge of cache. (wiki)
http://en.wikipedia.org/wiki/Locality_of_reference#Use_of_spatial_and_temporal_locality:_hierarchical_memory
http://en.wikipedia.org/wiki/Locality_of_reference#Use_of_spatial_and_temporal_locality:_hierarchical_memory
Texture memory speed test
Speed test program
http://forums.nvidia.com/index.php?showtopic=181432&st=0
"On Fermi, global memory loads are cached in L1 and L1 cache has higher bandwidth than the texture cache"
http://stackoverflow.com/questions/9893086/why-in-my-case-the-texture-memory-is-slower-than-the-global
Spatial Locality of texture memory usage.
http://forums.nvidia.com/index.php?showtopic=181432&st=0
"On Fermi, global memory loads are cached in L1 and L1 cache has higher bandwidth than the texture cache"
http://stackoverflow.com/questions/9893086/why-in-my-case-the-texture-memory-is-slower-than-the-global
Spatial Locality of texture memory usage.
Subscribe to:
Posts (Atom)