Dechin's Blog
Welcome to my blog. Subscribe and get my latest blog post in your inbox.
Installation of PyMiner
PyMiner is a software can be used to do simulation or emulation.
Read more →
Usage of git flow in pull requests
This is an introduction of how to use git commands to push pull requests into remote projects.
Read more →
Run Python Function By String Name
Here is a short introduction of using string format function or module name to import or run function or module, which may benefit a lot for the efficiency. And the website to make a beautiful code image you can site this url: https://carbon.now.sh/
Read more →
The Performance of Python Multiprocessing Module Concurrent
There are many tools of python multiprocessing we can use. But there are many different problems when using these modules. So we need to know the base line and performance for each tool. Here a package named concurrent is tested which is no need to install agian after you got a version of python.
Read more →
Using Pickle to Store Python Objects
At last time we introduce a method by using json formula file to store python objects like a list or a dictionay. But what about the arbitrary cases? For example you may need to define a python class by yourselves. And here we introduce a tool named pickle. It can be used to store any type of python objects and here we will give some running time benchmarking of pickle toward a networkx graph type.
Read more →
Decision Diagram Based Quantum Computing Simulation
There are many kinds of quantum computing simulation tools, for example ProjectQ by ETH, qiskit by IBM or Cirq by google. They are mostly based on matrix multiplications or tensor contractions. Here we can study a new representation method which is called Decision Diagram based quantum computing simulation.
Read more →
Write Python Objects Into Json File
In many cases we need a global arguments or open many files in different processes of multiprocess calculations. Here we can use the python package json to strore arguments such as list, dictionary or other string types into a json file and also we can read it as python arguments.
Read more →
The Effect of Tensor Treewidth to Running Time
In last blog we discuss about the relationship between tensor contraction order and tensor contraction treewidth, or means the contraction complexity of a tensor network. In this blog we will do some tests to know that how much the tensor complexity will effect on the running time of tensornetwork contraction.
Read more →
Tensor Contraction Order
Tensornetwork technology has been widely used in many body physics. Here we consider if the tensor cut can be used to optimize the tensor contraction complexity.
Read more →
Sin in loop or out?
You may be confused why we should focus on code optimization. In our realization of algorithms, different code style will cause different running time. Maybe 1s vs 5s, maybe 5s vs 1year. The difference will be large when the problem size go larger. For example you can see the optimization of sin function using in python.
Read more →
Multi-processes & threads
By using the opensource python package multiprocessing we can do our tasks parallelly.
Read more →
Multiprocessing Test
By using the opensource python package multiprocessing we can do our tasks parallelly.
Read more →
Networkx Test
By using the opensource python package networkx we can efficiently solve some graph problems like TSP. This article mainly includes the usage of networkx.
Read more →
Cupy Test
By using the cupy we can see if there is any advantage compare to pure cpu calculations, which is based on gpu multiprocess calculation and numpy-like.
Read more →
Pycuda Test
By using the pycuda we can see if there is any advantage compare to pure cpu calculations, which is based on gpu multiprocess calculation.
Read more →


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.engine.InOut jass.patches.CombReverb
public class CombReverb
CombReverb as Moorers reverb. See e.g.
| Field Summary | |
|---|---|
protected float |
a
|
protected AllPass |
allPass
|
protected float |
allpassDelay
|
protected float[] |
combDelays
|
protected float |
dryToWet
|
protected Mixer |
endMixer
|
protected float[] |
g
|
protected LowPassComb[] |
lpCombs
|
protected Mixer |
mixer
|
protected int |
nchannels
|
protected int |
nCombs
|
protected float[] |
R
|
protected float |
srate
|
| Fields inherited from class jass.engine.InOut |
|---|
sourceContainer, sourcePassivity, srcBuffers |
| Fields inherited from class jass.engine.Out |
|---|
buf, bufferSize, bufOld, lock |
| Constructor Summary | |
|---|---|
CombReverb(int bufferSize)
Create. |
|
CombReverb(int bufferSize,
float srate,
int nCombs)
Create. |
|
CombReverb(int bufferSize,
float srate,
int nCombs,
int nchannels)
Create. |
|
CombReverb(int bufferSize,
int nchannels)
Create. |
| Method Summary | |
|---|---|
java.lang.Object |
addSource(Source s)
Add source to Sink. |
protected void |
computeBuffer()
Compute the next buffer and store in member float[] buf. |
protected void |
init()
Init and allocate. |
void |
setA(float a)
Set allpass coeff. |
void |
setAllParameters()
Set all filter parameters |
void |
setDryToWet(float d)
Set dryToWet ratio |
void |
setG(float g,
int k)
Set one pole lowpass coefficient g; H(z) = 1/(1-g/z)) |
void |
setL(float del,
int k)
Set comb delay. |
void |
setM(float del)
Set allpass delay: H(z) = (z^_{m} + a)/(1 + a*z^{-m}) Make sure is not snaller than buffersize |
void |
setNChannels(int n)
|
void |
setR(float r,
int k)
Set feedback of filter k |
| Methods inherited from class jass.engine.InOut |
|---|
addSource, getBuffer, getSources, removeSource, resetTime |
| Methods inherited from class jass.engine.Out |
|---|
clearBuffer, copyToOld, getBuffer, getBufferSize, getTime, peekAtBuffer, setBufferSize, setTime, setTimeAndNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int nchannels
protected float srate
protected int nCombs
protected float[] combDelays
protected float allpassDelay
protected float a
protected float[] R
protected float[] g
protected float dryToWet
protected LowPassComb[] lpCombs
protected AllPass allPass
protected Mixer mixer
protected Mixer endMixer
| Constructor Detail |
|---|
public CombReverb(int bufferSize)
bufferSize
- Buffer size used for real-time rendering.public CombReverb(int bufferSize, int nchannels)
bufferSize
- Buffer size used for real-time rendering.nchannels
- 1 for monopublic CombReverb(int bufferSize, float srate, int nCombs)
bufferSize
- Buffer size used for real-time rendering.srate
- sampling rate in HznCombs
- number of comb filterspublic CombReverb(int bufferSize, float srate, int nCombs, int nchannels)
nchannels
- 1 for monobufferSize
- Buffer size used for real-time rendering.srate
- sampling rate in HznCombs
- number of comb filters| Method Detail |
|---|
public void setNChannels(int n)
protected void init()
public void setAllParameters()
public void setR(float r, int k)
r
- feedbackk
- index of comb filterpublic void setG(float g, int k)
g
- lowpass filter coefficientk
- index of comb filterpublic void setDryToWet(float d)
d
- dry to wet. 1 is dry onlypublic void setA(float a)
a
- allpass coeffpublic void setM(float del)
del
- allpass delay in secondspublic void setL(float del, int k)
del
- allpass delay in secondsk
- index of comb filterpublic java.lang.Object addSource(Source s) throws SinkIsFullException
addSource
in interface Sink
addSource
in class InOut
s
- Source to add.
SinkIsFullException
protected void computeBuffer()
computeBuffer
in class Out
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


This table contains entries for SV40 viral proteins in the UniProt databases, with links to view the original protein entries. There is also a list of some of the proteins known to interact with, be induced by or repressed by SV40 proteins.
|
|
UniProt
|
Protein name |
Organism |
Function |
|
|
Coat protein
VP1 |
Simian virus
40 (SV40) |
Forms part of viral capsid |
|
|
|
Coat protein
VP2 (contains Coat protein VP3) |
Simian virus
40 (SV40) |
Forms part of viral capsid |
|
|
|
Coat protein
VP3 |
Simian virus
40 (SV40) |
Forms part of viral capsid |
|
|
|
DNA-binding
protein (Agnoprotein) |
Simian virus
40 (SV40) |
May have regulatory role in nucleic acid-protein
interactions |
|
|
|
Large T
antigen |
Simian virus 40 (SV40) |
Initiates DNA unwinding and replication |
|
|
|
Small T antigen |
Simian
virus 40 (SV40) |
|
|
|
|
Early leader protein (SELP) |
Simian virus
40 (SV40) |
|
|
|
SV40-induced |
Neutrophil gelatinase-associated lipocalin [Precursor]
(SV-40 induced 24P3 protein) |
Mus musculus Mouse |
SV-40 induced |
|
|
|
Neurogenic locus notch homolog protein 1 [Precursor] (NOTCH1) |
Homo sapiens |
Receptor
for membrane-bound ligands; affects differentiation, proliferation and apoptosis |
|
|
|
Hepatocyte growth factor receptor [Precursor] (Met proto-oncogene; HGF receptor) |
Homo sapiens |
Receptor
for hepatocyte growth factor; tyrosine protein kinase activity (EC <IP_ADDRESS>) |
|
|
|
Insulin-like growth factor IA [Precursor] (IGF-IA) |
Homo sapiens |
Growth-promoting
activity |
|
|
|
Insulin-like growth factor IB [Precursor] (IGF-IB) |
Homo sapiens |
Growth-promoting
activity |
|
|
|
Telomerase
reverse transcriptase |
Homo sapiens |
Elongates telomeres |
|
|
SV40-suppressed |
Retinoblastoma-associated protein (RB) |
Homo sapiens |
Transcription co‑regulator,
tumour suppressor; cell-cycle regulator
|
|
|
|
Cellular tumor
antigen p53 |
Homo sapiens |
Tumour suppressor, induces growth arrest or apoptosis; cell-cycle regulator |
|
|
|
Serine/threonine protein phosphatase 2A, 65 KDa regulatory subunit A, alpha isoforms (PP2A, subunit A, alpha isoforms) |
Homo sapiens |
Regulatory subunit of PP2A |
|
|
|
Ras association domain family 1 isoform A (RASSF1A) |
Homo sapiens |
Tumour
suppressor |
|
|
|
P107 (Retinoblastoma-like protein 1) |
Homo sapiens |
Cell cycle regulation |
|
|
|
P130 (Retinoblastoma-like protein 2) |
Homo sapiens |
Cell cycle regulation |
|
|
|
CREB-binding protein (CBP) |
Homo sapiens |
Histone acetyltransferase
(EC <IP_ADDRESS>) |
|
|
|
P300 (E1A-associated
protein p300) |
Homo sapiens |
Histone acetyltransferase |
|
|
Interact with SV40 |
DNA topoisomerase
I |
Homo sapiens |
Converts DNA from one topological
isomer to another
|
|
|
|
Replication protein A 70 kDa DNA-binding subunit (RP-A) |
Homo sapiens |
Involved in initiation steps
|
|
|
|
Replication protein A 32 kDa subunit (RP-A) |
Homo sapiens |
Involved in initiation steps |
|
|
|
Replication protein A 14 kDa subunit (RP-A) |
Homo sapiens |
Involved in initiation steps |
|
|
|
Replication protein A 30 kDa subunit (RP-A) |
Homo sapiens |
Involved in initiation steps |


--- layout: post title: MultiRuby The MacPorts Way. Testing Your Rails Apps With Ruby 1.9 disqus_id: /2009/01/20/multiruby-the-macports-way-testing-your-rails-apps-with-ruby-1-9/ categories: - apple-os - heuristics - ruby-rails - workflow ---
Ruby 1.9.1, the stable release, is just around the corner and if your like me, maybe you want to start playing around with it and perhaps test a few projects using 1.9 with edge rails 2.3. If so, and your on a Mac, then perhaps this installation method might appeal to you. I'll break this article up in two parts, the first will be on installing multiple versions of ruby and how to switch between them while the other will be some things I noticed when testing ruby 1.9 with edge rails on my favorite pet project HomeMarks.
I love MacPorts and recommend using it even though OS X comes with ruby pre-installed. Doing so simply keeps things clean and separated in the /opt
directory vs mixing things in /usr where they might be clobbered by Apple during a system update. So no to dependency hell! This article assumes you already have ruby 1.8 installed via MacPorts, if not change some of the paths in the provided code below. Now... thanks to MacPorts it is easier than ever to get ruby 1.9 preview release 2 installed in it's own separate space.
$ sudo port install ruby19
MacPort has just added these ruby 1.9 binaries to your PATH in /opt/local/bin
. Nice and clean egh? From here you can start "playing" with 1.9 by just executing either ruby1.9
or irb1.9
, but that gets boring quick.
Let's hack up your setup so that you can quickly switch your whole ruby install back and forth transparently. The first step is to move the corresponding ruby 1.8 binaries to the same naming convention as their 1.9 counterparts. We will then use symlinks to change which one gets executed. Step one:
$ sudo mv /opt/local/bin/erb /opt/local/bin/erb1.8 $ sudo mv /opt/local/bin/gem /opt/local/bin/gem1.8 $ sudo mv /opt/local/bin/irb /opt/local/bin/irb1.8 $ sudo mv /opt/local/bin/rake /opt/local/bin/rake1.8 $ sudo mv /opt/local/bin/rdoc /opt/local/bin/rdoc1.8 $ sudo mv /opt/local/bin/ri /opt/local/bin/ri1.8 $ sudo mv /opt/local/bin/ruby /opt/local/bin/ruby1.8 $ sudo mv /opt/local/bin/testrb /opt/local/bin/testrb1.8
So now that we have two versions of ruby installed, each in their own path suffix. So to switch back and forth without using these suffixes, we will need to create a symlink for each binary that points to the version we want to use. The users of the local ruby group 757rb came up with this ZSH function below. Place it into your .zshkit or dotfile of choice and it will create/change symlinks for your ruby, irb, rake, etc.. that each point to the version you want to use. Calling it multiple times will simply toggle your ruby versions.
{% highlight bash %} chruby () { ree=`ruby -e "puts RUBY_DESCRIPTION.include?('Ruby Enterprise Edition')"` if [ $ree = "true" ]; then echo "NOOP: Currently using REE in your path." else v=`ruby -e "puts RUBY_VERSION.split('.')[0,2].join('.')"` if [ $v = "1.9" ]; then cv="1.8" else cv="1.9" fi rubyexes=(erb gem irb rake rdoc ri ruby testrb autotest unit_diff rails) for i in $rubyexes; do sudo unlink "/opt/local/bin/${i}" sudo ln -s "/opt/local/bin/${i}${cv}" "/opt/local/bin/${i}" done echo "Now Running: "`ruby -v` fi } {% endhighlight %}$ chruby Now Running: ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9] $ chruby Now Running: ruby 1.9.1 (2008-12-01 revision 20438) [i386-darwin9]
This works amazingly well at first. The one big gotcha is that you have to remember you have two gems directories. Any gem you installed under 1.8 will have to be installed again under 1.9. There are ways around this with some clever symlinking, but I'd recommend against it. Note too, this also applies to any site/vendored libs or bundles, for instance ruby odbc.
If you install a gem under a certain version of ruby that places an executable in say /opt/local/bin then you are going to want to watch out for a bad she bang. For instance if you install the ZenTest gem while running under ruby1.9 suffix, then the she bang for /opt/local/bin/autotest
would be incorrectly set to this #!/opt/local/bin/ruby1.9 -ws
. The simple fix is to just change it to the true sym link.
So far my HomeMarks project does not have any major issues with ruby 1.9. I'm not surprised, it's very very slim ruby code due to the AJAX head design pattern. I did however find a few new things about the changes an app will need when moving from 2.2 to 2.3.
class Test::Unit::TestCase
to class ActiveSupport::TestCase
. I'm sure this change is related to future abstraction to choose Minitunit vs Test::Unit.app/controllers/application.rb
to app/controllers/application_controller.rb
. Finally their hacks on that bad name are now gone. I found that I had to do this change manually on my own.Past that, about the only interesting thing I found in Ruby 1.9 was that Test::Unit is gone and is actually loading Miniunit. So things in rails that were requiring test/unit/error are going to fail.


SUBJECT
Algebra
STUDENT ID
63130500094
NAME
Phumin C.
TIMER
28:13 minutes
Instruction
Subject
Time
Date
Pages
INT103 Advanced Programming
Time
9.30 - 11.30 (2 hrs.)
Date
Thuesday, 16 March 2021
Pages
There are 11 PAGES
Answer Sheet
Place some text
here


Mysterious beans are found on the market stalls of the East, to which ancient superstition lends the power of favouring the birth of male children. When a French entomologist obtains a few of these beans, he worries that the world has entered a critical phase of its history.


Tired of setting up mining softwares in your computers to mine cryptocurrencies?
Ever thought of having a single place to mine any cryptocurrencies you want?
Ever thought of having a single place to mine any cryptocurrencies you want?
Presenting you the Easy Pool Miner,
which allows you to mine any cryptocurrencies* into any mining pools you want!
And best part is you dont have to set up any softwares! Everything is purely online!
*Any Cryptocurrencies that follows Stratum Protocol can be mined using this site.


Bold
Italic
Underline
Get text properties
Change Element Text Style
Resize and Position Elements
Align Elements Text
Resize and Position as Master
Set Alignment as Master
Predict Bold or Not
Predict Italic or Not
Predict Underlined or Not
Predict Font size
Fix Position
Translate sample by Google


Billiat’s Message To The Amakhosi Faithful…
by Soccer LadumaKhama Billiat could play a big role for Kaizer Chiefs on Sunday afternoon when they battle Maritzburg United for a spot in the Telkom Knockout final, and he’s got a message for the fans.
Read: Screws Removed As Chiefs Player Attempts Recovery
Billiat is yet to win any silverware since joining the Glamour Boys from Mamelodi Sundowns, and for a man who is used to accolades he will be eager to progress into the final and take on step closer to adding a new medal to his collection.
Chiefs’ form has seen a big increase in the number of fans making the trip to the stadium to watch them play over the course of this season so far, and a big crowd is expected at Mbombela Stadium tomorrow when they go up against Maritzburg United.
Speaking to the Amakhosi faithful ahead of the tie, the attacker told Chiefs’ official website, “Our supporters add extra motivation for the team, and they have come out in big numbers to watch us which has been a big boost.
“They have been missing this form from the team. The more we win, they will certainly stop watching the games at home and come to the stadium. We have a good connection with the fans, and it is because of them urging us on that we have won difficult games.”
Read: Inside Chiefs - Amakhosi With Tough Decisions To Make
The 29-year-old is expected to start in Nelspruit tomorrow against a Team of Choice side that are on a seven-game unbeaten run of their own, but he’s confident they can get a good result.


Match History
{{name}}
Current Rank Tier
Current Rank ELO
ELO Change
Game Outcome
Competitive Movement
Game Data
{% for match in posts %}
{{match.lp_change}}
{{match.game_outcome}}
{{match.movement}}
{{match.date}}
{% endfor %}


| DOSE: T+ 0:00 |
2 hits |
oral |
LSD |
(liquid) |
| T+ 0:20 |
1 bowl |
smoked |
Cannabis |
(plant material) |
| |
repeated |
smoked |
Cannabis |
(plant material) |
My experiences with acid have each been special and enlightening in their own ways. Initially, my experience with drugs was merely marijuana, and I was content with its effects. Then the idea of Acid became more and more enticing, until I tried it. I have done it several times since, but the most recent trip I took was without question the most amazing.
My 3 friends and I planned our trip early on in the week, each of us building our own vision of what our Friday trip would entail. I feel I have a good control on acid when I take it, and I was sure my trip would be beautiful and spiritual. Friday came, and we had many possibilities of where we would get it, yet we feared all would fall through and it would be strictly a smoking night. Fortunately, that was not the case, and we each purchased 2 mints, blessed with acid.
We all dropped them and began ingesting vitamin C candies and chewing Vitamin C gum, both of which you can find pretty much anywhere. We smoked a bowl about 20 minutes later, and after about 10 more minutes, I felt my journey begin. I was on the deck with my 2 friends and my friend, Nikki, got our lighter to work merely by touching it. With that said, she began raving and we could feel the trip from each other's hands. (A side note... Nikki and I had always wanted to trip together, because we both respect the drug and realize the depths to which it can go. Also, we have incredible conversations while high, so tripping seemed like it would be sensational, which it was...)
We went inside and my mother's classical music CD came on, Nikki and I insisted it remain, feeling its supreme beauty. Then we put some Lords of Acid on and Nikki commenced her incredible raving.
My two guy friends came over at this point, and each dropped a Pez adorned with acid. Honestly, I was not pleased with their presence, because I felt we had our own little tripping heaven as it was. Later, they proved to be essential elements in the 'tripping heaven.' Then more weed came, and my mother came home. Simultaneously mind you. This created humor and intensity, elements I find essential to an enlightening trip. So it was on...
We stayed indoors for a little while, watching basic TV, and my visuals began. This was the first time I had ever seen such intense images, and it was quite welcomed. We decided to go to a park nearby and smoke more to heighten the trip. We arrived and I found beauty unlike any I had ever known. The 6 of us were in the snowy park, secluded from others, but close enough that we were well aware of them. Some of my friends became somewhat paranoid, but I was more concerned with smoking more. They insisted outsiders knew we were there, and I proceeded to tell them, 'Our entire world is not part of their reality'. This was just one of my quotes that my friends enjoyed.
When I trip, I am emotion. In my 'normal' life, I somewhat fear it, and do not know how to handle it. I often enjoy being by myself while doing acid, because I find I get to know myself better. I feel I have grown more after each time. Smoking also heightens it, but makes it more of a 'fucked up' feeling, less surreal. Vitamin C most definitely did something that evening. It was the most incredible night of my life, and forever close to my soul.
I must say, however, be careful. My experiences are quite intense, and for some this intensity may create life changing ideas and self-reflections.
Thank you for reading my story and good luck finding inner peace and satisfaction.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


--- title: Converting A Library (Tutorial) keywords: fastai sidebar: home_sidebar summary: "Learn how to use `lib2nbdev` to convert your existing Python libraries to `nbdev` ones" description: "Learn how to use `lib2nbdev` to convert your existing Python libraries to `nbdev` ones" nb_path: "02_tutorial.ipynb" ---
When converting your library, the end result will look very similar to other nbdev-created libraries, such as this one or the fastai library. This being your repository will have a place for your notebooks, a settings.ini file, and potential Github actions.
Before converting your library, you should consider:
lib2nbdev
will ask where you want your notebooks to be located. Generally we recommend answering withnbs
, so they all get placed in anbs
folder
nbdev
's default Github CI?
lib2nbdev
can generate a Github Actions CI for you to use specifically designed for nbdev. It will check that the notebooks were cleaned, there's no differences between the notebooks and the exported library, and that your tests all pass
fastrelease
allows for quick pip
and conda
releases, however you need to have a setup.py
that's similar to nbdev's. This will require manual adjustments after the library conversion process is over, as all the information needed for the setup.py
will live in the newly generated settings.ini
fileConverting any library to the nbdev
format is extremely simple. From your linux CLI, go to the home directory of your existing repository or library, and run:
convert_lib
In your terminal.
{% include note.html content='If you are using a Windows terminal and don’t want to use WSL, you should enter the python interpreter and run from lib2nbdev.convert import convert_lib; convert_lib()
' %}
You will then see a series of questions pop up, similar to below.
Afterwards lib2nbdev
will convert your .py
files into notebooks and store them away in wherever you specified:
Finally you will be prompted as to whether you want to use the nbdev
Github workflow template.
Notice:If you choose yes (1), you should make sure to explicitly add the workflow located in
.github/workflows/main.yml
to git on your next commit
And you are done! Your entire library has been converted into Jupyter Notebooks, and you are now setup to work with the nbdev
workflow. When modifying the library you should be working directly out of those Jupyter Notebooks, and be making new ones as you progress.
It should be noted that these are blank notebook templates, so you should modify the opening headers and descriptions that are autogenerated in each notebook with a relevant title.
Also, if you want to use nbdev
generated documentation, you should think about how to bring in your existing documentation and tutorials into these notebooks. You can also just link directly to your existing Markdown files by adjusting the sidebar.json
located in the docs
folder. (You need to run nbdev_build_docs
at least once for this to show up).


Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on a word:
Example 1:
Input: word1 = "horse", word2 = "ros"
Output: 3
Explanation:
horse -> rorse (replace 'h' with 'r')
rorse -> rose (remove 'r')
rose -> ros (remove 'e')
Example 2:
Input: word1 = "intention", word2 = "execution"
Output: 5
Explanation:
intention -> inention (remove 't')
inention -> enention (replace 'i' with 'e')
enention -> exention (replace 'n' with 'x')
exention -> exection (replace 'n' with 'c')
exection -> execution (insert 'u')
DP.
Define f(i, j)
to be the min edit distance from word1[0...i)
to word2[0...j)
.
f(0, 0) = 0
f(0, j) = f(0, j-1) + 1 // can only insert
f(i, 0) = f(i-1, 0) + 1 // can only delete
f(i, j) = min(
f(i, j-1) + 1 // insert
f(i-1, j) + 1 // delete
f(i-1, j-1) + (word1[i-1] !== word2[j-1] ? 1 : 0) // replace or do nothing
)
/**
* @param {string} word1
* @param {string} word2
* @return {number}
*/
var minDistance = function(word1, word2) {
const len1 = word1.length
const len2 = word2.length
if(len1 <= 0 || len2 <= 0) {
return len1 + len2
}
const dp = []
for (let i = 0; i <= len1; i++) {
dp[i] = [i]
}
for (let j = 0; j <= len2; j++) {
dp[0][j] = j
}
for (let i = 1; i <= len1; i++) {
for (let j = 1; j <= len2; j++) {
dp[i][j] = Math.min(
dp[i][j-1] + 1,
dp[i-1][j] + 1,
dp[i-1][j-1] + (word1[i-1] === word2[j-1] ? 0 : 1)
)
}
}
return dp[len1][len2]
};
Template generated via Leetmark.


Adebayo Kehinde
Abiyamo
Changes every year
Software Developer
Male
| row1 cell1 | row1 cell2 | row1 cell3 | row1 cell4 | row1 cell5 | row1 cell6 | row1 cell7 |
| row2 cell1 | row2 cell2 | row2 cell3 | row2 cell4 | row2 cell5 |
| Number | Hobby | Rather not | Whatever |
| 1 | Watching Youtube | Don't interrupt | Not many of them |
| 2 | Playing Guitar | Eating something | Not many of them |
| 3 | Young mentoring | Don't put down any of them | Not many of them |


Theory
Overview
People are centrally concerned with motivation — how to move themselves or others to act. Everywhere, parents, teachers, coaches, and managers struggle with how to motivate those that they mentor, and individuals struggle to find energy, mobilize effort and persist at the tasks of life and work. People are often moved by external factors such as reward systems, grades, evaluations, or the opinions they fear others might have of them. Yet just as frequently, people are motivated from within, by interests, curiosity, care or abiding values. These intrinsic motivations are not necessarily externally rewarded or supported, but nonetheless they can sustain passions, creativity, and sustained efforts. The interplay between the extrinsic forces acting on persons and the intrinsic motives and needs inherent in human nature is the territory of Self-Determination Theory.
Self-Determination Theory (SDT) represents a broad framework for the study of human motivation and personality. SDT articulates a meta-theory for framing motivational studies, a formal theory that defines intrinsic and varied extrinsic sources of motivation, and a description of the respective roles of intrinsic and types of extrinsic motivation in cognitive and social development and in individual differences. Perhaps more importantly SDT propositions also focus on how social and cultural factors facilitate or undermine people’s sense of volition and initiative, in addition to their well-being and the quality of their performance. Conditions supporting the individual’s experience of autonomy, competence, and relatedness are argued to foster the most volitional and high quality forms of motivation and engagement for activities, including enhanced performance, persistence, and creativity. In addition SDT proposes that the degree to which any of these three psychological needs is unsupported or thwarted within a social context will have a robust detrimental impact on wellness in that setting.
The dynamics of psychological need support and need thwarting have been studied within families, classrooms, teams, organizations, clinics, and cultures using specific propositions detailed within SDT. The SDT framework thus has both broad and behavior-specific implications for understanding practices and structures that enhance versus diminish need satisfaction and the full functioning that follows from it. These many implications are best revealed by the varied papers listed on this website, which range from basic research on motivational micro-processes to applied clinical trials aiming at population outcomes.
Meta-Theory: The Organismic Viewpoint
SDT is an organismic dialectical approach. It begins with the assumption that people are active organisms, with evolved tendencies toward growing, mastering ambient challenges, and integrating new experiences into a coherent sense of self. These natural developmental tendencies do not, however, operate automatically, but instead require ongoing social nutriments and supports. That is, the social context can either support or thwart the natural tendencies toward active engagement and psychological growth, or it can catalyze lack of integration, defense, and fulfillment of need-substitutes. Thus, it is the dialectic between the active organism and the social context that is the basis for SDT’s predictions about behavior, experience, and development.
Within SDT, the nutriments for healthy development and functioning are specified using the concept of basic psychological needs for autonomy, competence, and relatedness. To the extent that the needs are ongoingly satisfied people will develop and function effectively and experience wellness, but to the extent that they are thwarted, people more likely evidence ill-being and non-optimal functioning. The darker sides of human behavior and experience, such as certain types of psychopathology, prejudice, and aggression are understood in terms of reactions to basic needs having been thwarted, either developmentally or proximally.
Formal Theory: SDT’s Five Mini-Theories
Formally SDT comprises five mini-theories, each of which was developed to explain a set of motivationally based phenomena that emerged from laboratory and field research. Each, therefore, addresses one facet of motivation or personality functioning.
- Cognitive Evaluation Theory (CET) concerns intrinsic motivation, motivation that is based on the satisfactions of behaving “for its own sake.” Prototypes of intrinsic motivation are children’s exploration and play, but intrinsic motivation is a lifelong creative wellspring. CET specifically addresses the effects of social contexts on intrinsic motivation, or how factors such as rewards, interpersonal controls, and ego-involvements impact intrinsic motivation and interest. CET highlights the critical roles played by competence and autonomy supports in fostering intrinsic motivation, which is critical in education, arts, sport, and many other domains.
- The second mini-theory, Organismic Integration Theory (OIT), addresses the topic of extrinsic motivation in its various forms, with their properties, determinants, and consequences. Broadly speaking extrinsic motivation is behavior that is instrumental—that aims toward outcomes extrinsic to the behavior itself. Yet there are distinct forms of instrumentality, which include external regulation, introjection, identification, and integration. These subtypes of extrinsic motivation are seen as falling along a continuum of internalization. The more internalized the extrinsic motivation the more autonomous the person will be when enacting the behaviors. OIT is further concerned with social contexts that enhance or forestall internalization—that is, with what conduces toward people either resisting, partially adopting, or deeply internalizing values, goals, or belief systems. OIT particularly highlights supports for autonomy and relatedness as critical to internalization.
- Causality Orientations Theory (COT), the third mini-theory, describes individual differences in people’s tendencies to orient toward environments and regulate behavior in various ways. COT describes and assesses three types of causality orientations: the autonomy orientation in which persons act out of interest in and valuing of what is occurring; the control orientation in which the focus is on rewards, gains, and approval; and the impersonal or amotivated orientation characterized by anxiety concerning competence.
- Fourth, Basic Psychological Needs Theory (BPNT) elaborates the concept of evolved psychological needs and their relations to psychological health and well-being. BPNT argues that psychological well-being and optimal functioning is predicated on autonomy, competence, and relatedness. Therefore, contexts that support versus thwart these needs should invariantly impact wellness. The theory argues that all three needs are essential and that if any is thwarted there will be distinct functional costs. Because basic needs are universal aspects of functioning, BPNT looks at cross-developmental and cross-cultural settings for validation and refinements.
- The fifth mini-theory, Goal Contents Theory (GCT), grows out of the distinctions between intrinsic and extrinsic goals and their impact on motivation and wellness. Goals are seen as differentially affording basic need satisfactions and are thus differentially associated with well-being. Extrinsic goals such as financial success, appearance, and popularity/fame have been specifically contrasted with intrinsic goals such as community, close relationships, and personal growth, with the former more likely associated with lower wellness and greater ill-being.
Other Topics of Interest
As SDT has expanded both in terms of breadth and depth, both theoretical developments and empirical findings have led SDT researchers to examine a plethora of processes and phenomena integral to personality growth, effective functioning, and wellness. For example, SDT research has focused on the role of mindfulness as a foundation for autonomous regulation of behavior, leading to both refined measurement and theorizing about awareness. The study of facilitating conditions for intrinsic motivation led to a theory and measurement strategy regarding vitality, an indicator of both mental and physical wellness. Work on vitality also uncovered the remarkable positive impact of the experience of nature on well-being. Some research within SDT has more closely examined the forms personal passions can take, with individuals being obsessive or harmonious as a function of internalization processes. And cross-cultural tests of SDT have led to an increased understanding of how economic and cultural forms impact the invariant aspects of human nature. Research on wellness has also led to new theory and research on the assessment of well-being itself, including the distinction between hedonic and eudaimonic forms of living. Specific topics such as autonomy versus controlled motivation has led to greater understanding of internalized control such as ego-involvement and contingent self-esteem and of the differences between them and autonomous self-regulation. Indeed these few examples supply just a taste of how the generative framework of SDT has enhanced research on a variety of processes of interest to the field.
Applications
In addition to formal theory development, research has applied SDT in many domains including education, organizations, sport and physical activity, religion, health and medicine, parenting, virtual environments and media, close relationships, and psychotherapy. Across these domains research has looked at how controlling versus autonomy-supportive environments impact functioning and wellness, as well as performance and persistence. In addition, supports for relatedness and competence are seen as interactive with volitional supports in fostering engagement and value within specific settings, and within domains of activity. This body of applied research has led to considerable specification of techniques, including goal structures and ways of communicating that have proven effective at promoting maintained, volitional motivation.
The varied articles on this website demonstrate the many types of inquiry associated with the SDT framework, as well as its generative capacity with respect to practical issues in human organizations of all kinds. Relevant research reports and theoretical discussion are listed in the Publications section, organized by topic.
By focusing on the fundamental psychological tendencies toward intrinsic motivation and integration, SDT occupies a unique position in psychology, as it addresses not only the central questions of why people do what they do, but also the costs and benefits of various ways of socially regulating or promoting behavior. Overviews of the theory can be found in Ryan and Deci (2000) and in Deci and Ryan (1985, 2000), as well as numerousother articles and chapters identified on this website.
References
Deci, E. L., & Ryan, R. M. (1985). Intrinsic motivation and self-determination in human behavior. New York: Plenum.
Deci, E. L., & Ryan, R. M. (2000). The “what” and “why” of goal pursuits: Human needs and the self-determination of behavior. Psychological Inquiry, 11, 227-268.
Ryan, R. M., & Deci, E. L. (2000). Self-determination theory and the facilitation of intrinsic motivation, social development, and well-being. American Psychologist, 55, 68-78.


A. Dolenc
A. Lemmke
[+]
and
D. Keppel
[+]
A few words about the intended audience before we begin. This document is mainly for those who have never ported a program to another platform -- a specific hardware and software environment -- and, evidently, for those who plan to write large systems which must be used across different vendor machines.
If you have done some porting before you may not find the information herein very useful.
We suggest that [Can89] be read in conjunction with this document[+]. Submitters to the News group comp.lang.c have repeatedly recommended [Hor90, Koe89][+].
Disclaimer: The code fragments presented herein are intended to make applications ``more'' portable, meaning that they may fail with some compilers and/or environments.
This file can be obtained via anonymous ftp from sauna.hut.fi [<IP_ADDRESS>] in ~ftp/pub/CompSciLab/doc. The files portableC.tex, portableC.bib and portableC.ps.Z are the LaTeX, BibTeX and the compressed PostScript, respectively.
The aim of this document is to collect the experience of several people who have had to write and/or port programs in C to more than one platform.
In order to keep this document within reasonable bounds we must restrict ourselves to programs which must execute under Unix-like operating systems and those which implement a reasonable Unix-like environment. The only exception we will consider is VMS.
A wealth of information can be obtained from programs which have been written to run on several platforms. This is the case of publicly available software such as developed by the Free Software Foundation and the MIT X Consortium.
When discussing portability one focuses on two issues:
We include in our discussions the standardization efforts of the language and the environment. Special attention will be given to floating-point representations and arithmetic, to limitations of specific compilers, and to VMS.
Our main focus will be boiler-plate problems. System programming[+] and twisted code associated with bizarre interpretations of [X3J88] - henceforth refered to as the Standard - will not be extensively covered in this document[+].
All standards have a good and an evil side. Due to the nature of this document we are forced to focus our attention on the later.
The American National Standards Institute (ANSI) has recently approved of a standard for the C programming language [X3J88]. The Standard concentrates on the syntax and semantics of the language and specifies a minimum environment (the name and contents of some header files and the specification of some run-time library functions).
Copies of the ANSI C Standard can be obtained from the following address:
American National Standards Institute
Sales Department
1430 Broadway
New York, NY 10018
(Voice)<PHONE_NUMBER>
(Fax)<PHONE_NUMBER>
We first bring to attention the fact that the Standard states some environmental limits. These limits are lower bounds, meaning that a correct (compliant) compiler may refuse to compile an otherwise correct program which exceeds one of those limits[+].
Below are the limits which we judge to be the most important. The ones related to the preprocessor are listed first.
It is really unfortunate that some of these limits may force a programmer to code in a less elegant way. We are of the opinion that the remaining limits stated in the Standard can usually be obeyed if one follows ``good'' programming practices.
However, these limits may break programs which generate C code such as compiler-compilers and many C++ compilers.
The following are examples of unspecified and undefined behaviour:
The list is long. One of the main reasons for explicitly defining what is not covered by the Standard is to allow the implementor of the C environment to make use the most efficient alternative.
The objective of the POSIX working group P1003.1 is to define a common interface for UNIX. Granted, the ANSI C standard does specify the contents of some header files and the behaviour of some library functions but it falls short of defining a usefull environment. This is the task of P1003.1.
We do not know how far P1003.1 addresses the problems presented in this document as at the moment we lack proper documentation. Hopefully, this will be corrected in a future release of this document.
Preprocessors may present different behaviour in the following:
#define D define #D this that
The Standard does not allow such a syntax (see section 3.8.3 §20 in [X3J88]).
The #pragma directive should pose no problems even to old preprocessors if it comes indented[+]. Furthermore, it is advisable to enclose them with #ifdef's in order to document under which platform they make sense:
#ifdef <platform-specific-symbol> #pragma ... #endif
#ifdef __STDC__ # define GLUE(a,b) a##b #else # define GLUE(a,b) a/**/b #endif
If needed, one could define similar macros to GLUE several arguments [+].
#ifdef __STDC__ # define MAKESTRING(s) # s #else # define MAKESTRING(s) "s" #endif
There are good publicly available preprocessors which are ANSI C compliant. One such preprocessor is the one distributed with the X Window System developed by the MIT X Consortium.
Take note of #pragma directives which alter the semantics of the program and consider the case when they are not recognized by a particular compiler. Evidently, if the behaviour of the program relies on their correct interpretation then, in order for the program to be portable, all target platforms must recognize them properly.
Finally, we must add that the Standard has fortunately included a #error directive with obvious semantics. Indent the #error since old preprocessors do not recognize it.
The syntax defined in the Standard is a superset of the one defined in K&R. It follows that if one restricts oneself to the former there should be no problems with an ANSI C compliant compiler. The Standard extends the syntax with the following:
We encourage the use of the reserved words const and volatile since they aid in documenting the code. It is useful to add the following to one's header files if the code must be compiled by an non-conforming compiler as well:
#ifndef __STDC__ # define const # define volatile #endif
However, one must then make sure that the behaviour of the application does not depend on the presence of such keywords.
The syntax does not pose any problem with regard to interpretation because it can be defined precisely. However, programming languages are always described using a natural language, e.g. English, and this can lead to different interpretations of the same text.
Evidently, [KR78] does not provide an unambiguous definition of the C language otherwise there would have been no need for a standard. Although the Standard is much more precise, there is still room for different interpretations in situations such as f(p=&a, p=&b, p=&c). Does this mean f(&a,&b,&c) or f(&c,&c,&c)? Even ``simple'' cases such as a[i] = b[i++] are compiler-dependent [Can89].
As stated in the Introduction we would like to exclude such topics.
The reader is instead directed to the USENET news group comp.std.c
or comp.lang.c
where such discussions take place and from where the above example
was taken. The Journal of C Language Translation[+] could, perhaps,
be a good reference. Another possibility is to obtain a clarification
from the Standards Committee and the address is:
X3 Secretariat, CBEMA
311 1st St NW Ste 500
Washington DC, USA
A long time ago (1969), Unix said ``papa'' for the first time at AT&T (then called Bell Laboratories, or Ma Bell for the intimate) on a PDP-11. Everyone liked Unix very much and its widespread use we see today is probably due to the relative simplicity of its design and of its implementation (it is written, of course, mostly in C).
However, these facts also contributed for each one to develop their own dialect. In particular, the University of Berkeley at California distribute the so-called BSD[+] Unix whereas AT&T distribute (sell) System V Unix. All other vendors are descendants of one of these major dialects.
The differences between these two major flavours should not upset most application programs. In fact, we would even say that most differences are just annoying.
BSD Unix has an enhanced signal handling capability and implements sockets. However, all Unix flavours differ significantly in their raw i/o interface (that is, ioctl system call) which should be avoided if possible.
The reader interested in knowing more about the past and future of Unix can consult [Man89, Int90].
Many useful system header files are in different places in different systems or they define different symbols. We will assume henceforth that the application has been developed on a BSD-like Unix and must be ported to a System V-like Unix or VMS or an Unix-like system with header files which comply to the Standard.
In the following sections, we show how to handle the most simple cases which arise in practice. Some of the code which appears below was derived from the header file Xos.h which is part of the X Window System distributed by MIT. We have added changes, e.g. to support VMS.
Many header files are unprotected in many systems, notably those derived from BSD version 4.2 and earlier. By unprotected we mean that an attempt to include a header file more than once will either cause compilation errors (e.g. due to recursive includes) or, in some implementations, warnings from the preprocessor stating that symbols are being redefined. It is good practice to protect header files.
They provide the same functionality in all systems except that some symbols must be renamed.
#ifdef SYSV # define _ctype_ _ctype # define toupper _toupper # define tolower _tolower #endif
Note however that the definitions in <ctype.h> are not portable across character sets.
Many files which a BSD systems expects to find in the sys directory are placed in /usr/include in System V. Other systems, like VMS, do not even have a sys directory[+].
The symbols used in the open function call are defined in different header files in both types of systems:
#ifdef SYSV # include <fcntl.h> #else # include <sys/file.h> #endif
The semantics of the error number may differ from one system to another and the list may differ as well (e.g. BSD systems have more error numbers than System V). Some systems, e.g. SunOS, define the global symbol errno which will hold the last error detected by the run-time library. This symbol is not available in most systems, although the Standard requires that such a symbol be defined (see section 4.1.3 of [X3J88]).
The most portable way to print error messages is to use perror.
System V has more definitions in this header file than BSD-like systems. The corresponding library has more functions as well. This header file is unprotected under VMS and Cray, and that case we must do-it-ourselves:
#if defined(CRAY) || defined(VMS) # ifndef __MATH__ # define __MATH__ # include <math.h> # endif #endif
Some systems cannot be treated as System V or BSD but are really a special case, as one can see in the following:
#ifdef SYSV #ifndef SYSV_STRINGS # define SYSV_STRINGS #endif #endif #ifdef _STDH_ /* ANSI C Standard header files */ #ifndef SYSV_STRINGS # define SYSV_STRINGS #endif #endif #ifdef macII #ifndef SYSV_STRINGS # define SYSV_STRINGS #endif #endif #ifdef vms #ifndef SYSV_STRINGS # define SYSV_STRINGS #endif #endif #ifdef SYSV_STRINGS # include <string.h> # define index strchr # define rindex strrchr #else # include <strings.h> #endif
As one can easily observe, System V-like Unix systems use different names for index and rindex and place them in different header files. Although VMS supports better System V features it must be treated as a special case.
When using time.h one must also include types.h. The following code does the trick:
#ifdef macII # include <time.h> /* on a Mac II we need this one as well */ #endif #ifdef SYSV # include <time.h> #else # ifdef vms # include <time.h> # else # ifdef CRAY # ifndef __TYPES__ /* it is not protected under CRAY */ # define __TYPES__ # include <sys/types.h> # endif # else # include <sys/types.h> # endif /* of ifdef CRAY */ # include <sys/time.h> # endif /* of ifdef vms */ #endif
The above is not sufficient in order for the code to be portable since the structure which defines time values is not the same in all systems. Different systems have vary in the way time_t values are represented. The Standard, for instance, only requires that it be an arithmetic type. Recognizing this difficulty, the Standard defines a function called difftime to compute the difference between two time values of type time_t, and mktime which takes a string and produces a value of type time_t.
In some systems the definitions in both header files are contradictory. For instance, the following will produce compilation errors under VMS[+]:
#include <varargs.h> #include <stdio.h>
This is because <stdio.h> includes <stdarg.h> which in turn redefines all the symbols (va_start, va_end, etc.) in <varargs.h>. The solution we adopt is to always include <varargs.h> last and not define in the same module functions which use <varargs.h> and functions which use the ellipsis notation.
In other words, it is not that you should not use them but be careful if you do. Furthermore, the behaviour of a longjmp invoked from a nested signal handler[+] is undefined.
Finally, the symbols _setjmp and _longjmp are only defined under SunOS, BSD, and HP-UX.
In practice, much too frequently one runs into several, unstated compiler limitations:
To say that the implementation of numerical algorithms which exhibit the same behaviour across a wide variety of platforms is difficult is an understatement. This section provides very little help but we hope it is worth reading. Any additional suggestions and information is very much appreciated as we would like to expand this section.
One problem when writing numerical algorithms is obtaining machine constants. Typical values one needs are:
On Sun's they can be obtained in <values.h>. The ANSI C Standard recommends that such constants be defined in the header file <float.h>.
Sun's and standards apart, these values are not always readily available, e.g. in Tektronix workstations running UTek. One solution is to use a modified version of a program which can be obtained from the network called machar. Machar is described in [Cod88] and can obtained by anonymous ftp from the netlib[+].
It is straightforward to modify the C version of machar to generate a C preprocessor file which can be included directly by C programs.
There is also a publicly available program called config.c which attempts to determine many properties of the C compiler and machine that it is run on. This program was submitted to comp.sources.misc[+].
In the days of K&R[KR78] one was ``encouraged'' to use
float and double
interchangeably[+] since all expressions with
such data types where always evaluated using the double representation
- a real nightmare for those implementing efficient numerical algorithms
in C. This rule applied, in particular, to floating-point arguments and
for most compiler around it does not matter whether one defines the argument
as float or double.
According to the ANSI C Standard such programs will continue to exhibit the same behaviour as long as one does not prototype the function. Therefore, when prototyping functions make sure the prototype is included when the function definition is compiled so the compiler can check if the arguments match.
Be careful when using the == and != operators when comparing
floating types. Expressions such as
if (float_expr1 == float_expr2)
will seldom be satisfied due to rounding errors.
To get a feeling about rounding errors, try evaluating the following
expression using your favourite C compiler[KM86]:
(image not reproduced)
Most computers will produce zero regardless if one uses float or double. Although the absolute error is large, the relative error is quite small and probably acceptable for many applications.
It is rather better to use expressions such as (image not reproduced) or (image not reproduced) (if (image not reproduced)), where 0 < K < 1 is a function of:
Other possibilities exist and the choice depends on the application.
The development of reliable and robust numerical algorithm is a very difficult undertaking. Methods for certifying that the results are correct within reasonable bounds must usually be implemented. A reference such as [PFTV88] is always useful.
Floating-point exceptions (overlow, underflow, division by zero, etc) are not signaled automatically in some systems. In that case, they must be explicitly enabled.
Always enable floating-point exceptions since they may be an indication that the method is unstable. Otherwise, one must be sure that such events do not affect the output.
In this section we will report some common problems encountered when porting a C program to a VMS environment and which we have not mentioned in the previously.
Under VMS one can use two flavours of command interpreters: DCL and DEC/Shell. The syntax of file specifications under DCL differs significantly from the Unix syntax.
Some C run-time library functions in VMS which take file specifications as arguments or return file specifications to the caller will accept an additional argument indicating which syntax is preferred. It is useful to use these run-time library functions via macros as follows:
#ifdef VMS #ifndef VMS_CI /* Which Command Interpreter flavour to use */ # define VMS_CI 0 /* 0 for DEC/Shell, 1 for DCL */ #endif # define Getcwd(buff,siz) getcwd((buff),(siz),VMS_CI) # define Getname(fd,buff) getname((fd),(buff),VMS_CI) # define Fgetname(fp,buff) fgetname((fp),(buff),VMS_CI) #else # define Getcwd(buff,siz) getcwd((buff),(siz)) # define Getname(fd,buff) getname((fd),(buff)) # define Fgetname(fp,buff) fgetname((fp),(buff)) #endif /* of ifdef VMS */
More pitfalls await the unaware who accept file specifications from the user or take them from environment values (e.g. using the getenv function).
The easiest solution is to force the linker to add the module using the /INCLUDE command modifier. Of course, there is the possibility that the command line may exceed 256 characters...(*sigh*).
long int str[2] = {0x41424344, 0x0}; /* ASCII ``ABCD'' */ printf (``%s\n'', (char *)&str);
A little-endian (e.g. VAX) will print ``DCBA'' whereas a big-endian (e.g. MC68000 microprocessors) will print ``ABCD''.
int *p = (int *) malloc(...); ... free(p);
This code may malfunction in architectures where int* and char* have different representations because free expects a pointer of the latter type.
A null pointer of a given type will always convert to a null pointer of another type if implicit or explicit conversion is performed. (See item 4 above.)
The contents of a null pointer may be anything the implementor wishes and dereferencing it may cause strange things to happen...
We are grateful for the help of Antti Louko (HTKK/Lsk) and Jari Helminen (HTKK) in commenting and correcting a previous draft of this document. We thank all the contributors of USENET News groups comp.std.c and comp.lang.c from where we have taken a lot of information. Some information within was obtained from [Hew88].
DEC, PDP-11, VMS and VAX are trademarks of Digital Equipment Corporation.
HP is a trademark of Hewlett-Packard, Inc.
MC68000 is a trademark of Motorola.
PostScript is a registred trademark of Adobe Systems, Inc.
Sun is a trademark of Sun Microsystems, Inc.
UNIX is a registred trademark of AT&T.
X Window System is a trademark of MIT.
Notes On Writing Portable Programs In C
(June 1990, 5th Revision)
This document was generated using the LaTeX2HTML translator Version 96.1-h (September 30, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html portableC.tex.
The translation was initiated by Christopher Lott on Thu Mar 13 13:33:05 EST 1997
Document processed by Christopher Lott, Thu Mar 13 13:33:05 EST 1997.


First appearing in 1991, Python is a general-purpose, high-level, interpreted programming>
Beautiful is better than ugly.
Explicit is better than implicit;
Simple is better than complex;
Complex is better;
than complicated;
Readability counts;
The Zen of Python
Python can be easy to pick up whether you’re a first time programmer or you’re experienced with other languages. The following pages are a useful first step to get on your way writing programs with Python!
The Python Package Index (PyPi) hosts thousands of third-party modules for Python. Both Python’s standard library and the community-contributed modules allow for endless possibilities.


{% extends "global/Page.html" %} {% load otree %} {% block title %} Control questions {% endblock %} {% block content %}
Please answer the following three questions.
{% formfield player.CQ_maxA label="Maximum amount A can receive" %} If Participant A chooses Option R and Participant B1 chooses Option L and Participant B2 chooses Option R, how much does Participant B2 receive? {% formfield player.CQ_payoff label="How much does B2 receive" %} {% formfield player.CQ_sumtask label="What is the sum of 3+8" %} {% next_button %} {% include Constants.instructions_decision %} {% endblock %}


Pot
You can see four circular pots
Clicking and dragging vertically changes the value of the pot
Double clicking the pot resets it to zero


Visit our site at http://www.entertainmentcruises.com
Our best offers of the year start today!
BLACK FRIDAY SPECIALS HAVE ARRIVED
Plan an incredible NYE celebration and achieve gifting greatness
while you save big bucks. And don’t miss the bonus deal valid today
only.
Save BIG on NYE Book now to save 20% on all cruises Dec. 30 –
Jan. 1.
This Way to Gifting Greatness… Up your gifting game with 25% off all gift certificates.
See Black Friday Deals
(http://www.mysticbluecruises.com/chicago/cruises/cyber-14) We’ll see you on the water!
Black Friday Specials Have Arrived!
Mystic
Cruises
Photos
Menus
Connect:
*Promotions are not valid on previously purchased tickets and may not
be combined with any other offer. No exchanges or refunds. Not all
seats are discounted. Up to 19 per reservation.
Safely Unsubscribe
http://localapp/unsub.cfm?tempid=e18bd67615ca48d8b801eb6f30de375e&mailId=52e165471d4e49dfa7ffeb6f30de375e
Send this mail to your friend.
http://localapp/send_friend.cfm?template=e18bd67615ca48d8b801eb6f30de375e&mailid=52e165471d4e49dfa7ffeb6f30de375e
Powered by SubscriberMail http://www.subscribermail.com
Entertainment Cruises NBC Tower 455 N. Cityfront Plaza Drive, Suite 2600 Chicago, IL 60611


--- layout: post title: 'How it''s Made: Baozi' date: 2013-05-25 03:31:30.000000000 -04:00 type: post published: true status: publish categories: - chinese - dinner - how it's made - tutorial tags: - baozi - buns - chinese - tutorial meta: _edit_last: '1' author: login: sophie email<EMAIL_ADDRESS>display_name: Pika first_name: '' last_name: '' ---
Baozi or Bao aka Stuffed/Steamed Buns are a staple of Chinese cuisine, especially (according to the authoritative source on Chinese food, my mom) Northern cooking, which is wheat-based rather than rice based and has a lovely assortment of all kinds of doughy goods.
But did you ever wonder how those pretty little pleats are formed? Well, wonder no more! Check out this little clip of my mom folding up vegetarian baozi (filled with tofu skin, candied carrots, ginger and scallion) for dinner in record time!
Happy Eating!
xoxo Pika


<script src="RGraph.common.core.js"></script> <script src="RGraph.common.key.js"></script> <script src="RGraph.bar.js"></script>Put this where you want the chart to show up:
<div style="padding-left: 35px"> <canvas id="cvs" width="650" height="250">[No canvas support]</canvas> </div>This is the code that generates the chart - it should be placed AFTER the canvas tag(s):


{% load i18n static %}
{% trans "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." %}


Moving company director who scrimped on disposal fees fined for illegal dumping
SINGAPORE: A moving services company director who tried to scrimp on disposal fees ended up paying far more for illegally dumping bulky furniture.
The man was fined S$9,000 last Thursday (Nov 7) for dumping more than 20 pieces of bulky furniture along Jalan Terusan in Jurong, said the National Environment Agency (NEA) on Tuesday.
NEA officers found the illegally dumped furniture during "routine surveillance", and traced it to the director.
Investigations found that the man had provided moving services on Sep 30 last year to a customer. Instead of sending the unwanted furniture to a second-hand dealer or recycler, he decided to save on the disposal fee and dumped the furniture along Jalan Terusan.
A photo provided by the NEA showed a pile of haphazardly stacked office chairs by the roadside.
The man was charged with dumping waste from a vehicle in a public place under the Environmental Public Health Act.
He could have been fined up to S$50,000 and jailed for up to 12 months. For repeat offenders, the fine may be as high as S$100,000.
"Illegal dumping of waste in a public place is a serious offence as it causes pollution and public health hazards," said NEA in a media release.
In response to CNA's queries, NEA declined to provide details on the identities of the company and director involved.
The agency said it welcomes tip-offs from members of the public on illegal dumping activities.
The number of illegal dumping cases fell from 160 in 2000 to 53 cases last year, it added.


A project that looked at how to brand
nostalgia.
Sometimes good things get left behind
Memory is visceral through the senses
of the body. A curated experience that recreates
a connection through a sense can be a powerful/
playful way to revisit memory.
The concept fot ATG included a store, a
gallery and a cafe. Each being a space that invited
a creator's imagination to express an idea or a
theme for a public audience.


|
| string | GenerateToken (Role role=Role.PUBLISHER, double expireTime=0, string data=null) |
| |
Represents an OpenTok session. Use the CreateSession() method of the OpenTok class to create an OpenTok session. Use the Id property of the Session object to get the session ID.
| string OpenTokSDK.Session.GenerateToken |
( |
Role |
role = Role.PUBLISHER , |
|
|
double |
expireTime = 0 , |
|
|
string |
data = null |
|
) |
| |
Creates a token for connecting to an OpenTok session. In order to authenticate a user connecting to an OpenTok session that user must pass an authentication token along with the API key.
- Parameters
-
| role | The role for the token. Valid values are defined in the Role enum:
-
Role.SUBSCRIBER — A subscriber can only subscribe to streams.
-
Role.PUBLISHER — A publisher can publish streams, subscribe to streams, and signal. (This is the default value if you do not specify a role.)
-
Role.MODERATOR — In addition to the privileges granted to a publisher, in clients using the OpenTok.js 2.2 library, a moderator can call the forceUnpublish() and forceDisconnect() method of the Session object.
|
| expireTime | The expiration time of the token, in seconds since the UNIX epoch. Pass in 0 to use the default expiration time of 24 hours after the token creation time. The maximum expiration time is 30 days after the creation time. |
| data | A string containing connection metadata describing the end-user. For example, you can pass the user ID, name, or other data describing the end-user. The length of the string is limited to 1000 characters. This data cannot be updated once it is set. |
- Returns
- The token string.
| int OpenTokSDK.Session.ApiKey |
|
getset |
| string OpenTokSDK.Session.ApiSecret |
|
getset |
Defines whether the session is automatically archived (ArchiveMode.ALWAYS
) or not (ArchiveMode.MANUAL
).
| string OpenTokSDK.Session.Id |
|
getset |
The session ID, which uniquely identifies the session.
| string OpenTokSDK.Session.Location |
|
getset |
The location hint IP address.
Defines whether the session will transmit streams using the OpenTok Media Router (MediaMode.ROUTED
) or attempt to transmit streams directly between clients (MediaMode.RELAYED
).
The documentation for this class was generated from the following file:


Installation¶
Python 3.7.0 or higher is required. Using pip:
python -m pip install algorithmx
Jupyter Widget¶
In classic Jupyter notebooks, the widget will typically be enabled by default. To enable it manually, run:
python -m jupyter nbextension enable --sys-prefix --py algorithmx
with the appropriate flag. To enable in JupyterLab, run:
python -m jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
python -m jupyter lab build


Upload an excel file with a list of emails. The first row of the excel file must be column headers. The bulk invite function will look for the column labeled "email". Any additional data in the file will be ignored.
Please confirm that the following data is accurate:
Analytic Report
Summary Report
URL will be genereated when changes are saved {{ host }}/join?aid={{ item.ambassador_uid }}
{{ changePasswordStatus.message }}


Impulse
Home
(current)
About Application
Contact Us
Impulse
Sign in
Phone number
Password
Forgot Password ?
Join now
Login


A path expression is a sequence of steps separated by the /
or //
operator.
For example, ../@desc
selects the desc
attribute of the parent of the context
node.
In XPath 2.0, path expressions have been generalized so that any expression can be used as an operand
of /
, (both on the left and the right), so long as its value is a sequence of nodes. For
example, it is possible to use a union expression (in parentheses) or a call to the id()
or key()
functions. The right-hand operand is evaluated once for each node in the sequence
that results from evaluating the left-hand operand, with that node as the context item. In the result
of the path expression, nodes are sorted in document order, and duplicates are eliminated.
In practice, it only makes sense to use expressions on the right of /
if they depend
on the context item. It is legal to write $x/$y
provided both $x
and
$y
are sequences of nodes, but the result is exactly the same as writing ./$y
.
Note that the expressions ./$X
or $X/.
can be used to remove duplicates
from $X
and sort the results into document order. The same effect can be achieved by writing
$X|()
The operator //
is an abbreviation for /descendant-or-self::node()/
.
An expression of the form /E
is shorthand for root(.)/E
, and the expression
/
on its own is shorthand for root(.)
.


{% extends "base.html" %} {% block header %}
Click the icon below to sign in with your Google account
{{form.remember_me}} Remember Me


Rob Booth
Software Engineer
- Region
- California
iOS Development (Master): iOS, Swift, Objective-C, CocoaTouch, CoreData
APIs (Master): REST, JSON, Design
Web Development (Intermediate): C#, PHP, Javascript, CSS, HTML
Support (Intermediate): SQL, Python, XML
2021-09-01 to Present
Staff Software Engineer at Flipboard Inc
Joined the Flipboard iOS development team and worked to modernize the 10+ year old code base while also implementing new features.
Converted large portions of the old Obj-C code base to Swift.
Rewrote the settings implemention to be dynamic and code driven instead of plist based.
Implemented the highly requested scroll back feature to help users return to were they were after accidentally scrolling back to the top of their feed.
2020-01-01 to 2021-08-31
Staff Software Engineer at Walmart
Worked on various teams within Walmart as they took on the audacious task of re-writing their existing online and in-store apps into a single cohesive whole. I eventually landed as the Team Lead for the iOS Cart development team. Since we are a shopping app Cart was an integral part and I divided my time between coding, mentoring, and interfacing with external teams that utilized our offering.
Tracked down and identified a tricky race condition that had to do with when the internal webkit browser code reported that it finished loading and when it was actually finished with rendering SVG content that we needed to interact with.
Mentored multiple developers who moved on to become Team Leads on there own teams.
Took on the responsibility of being the Team Lead for Cart after employee attrition left the team with only a couple of months of total experience on the code base.
Worked to make the team a cohesive unit that supported one another.
Was the main point of contact for various features around the cart experience.
2016-11-15 to 2020-01-01
Staff Software Engineer at Intuit Inc
Re-joined the TurboTax Universal team and grew into the role of team lead providing direction and mentorship to the team. Spent my time implementing new features while helping to re-design the code base to be better situated for the future direction of TurboTax.
Rewrote the companies tax estimation/forecasting tool TaxCaster from the ground up in Swift using current best practices and even building cross platform reusable data structures.
Built the Drivers License import process to remove the tedium and error prone process of manually entry of the users personal information. Build a AAMVA data parser to work across all currently published versions of the spec.
Mentored many junior developers as well as Interns and Co-ops helping them learn how to work at an actual company as well as to advance their skills.
Worked on cross functional teams to keep back and front end teams coordinated and working towards the same eventual goals.
2016-03-30 to 2016-11-15
Senior Software Engineer at ResMed Inc
Helped ResMed bring their newest sleep apnea machine to market using mobile devices as the interface for control and information gathering. Pulling the interface out of the device and putting it in a mobile application allows us to create a much richer interface than any device with limited buttons and a VFD display.
Built a rules engine to convert between raw data and user interface elements allowing for clear separation between the two, and placing of rules in a data file instead of littering the code with fragile validation tests.
Helped redesign and refactor various pieces of the codebase to be easier to maintain and extend.
2015-08-10 to 2016-03-25
Software Engineer - Contractor at Intuit Inc
Joined the TurboTax Universal team to help support shipping the 2015 Tax Year product. I jumped right in helping the team to close out bugs and implement features. Worked closely with the team sharing my knowledge and even helped mentor some interns and co-ops.
Took it on myself to redesign the layout engine for displaying tax forms on iPad devices to be more robust and easily understood.
Help spearhead the efforts to remove warnings from the code base and cleaning up unit tests for a more robust code base.
2014-09-01 to 2015-08-01
Software Engineer at Brain Corporation
Took ownership of the application interface to Brain Corporation's flagship product BrainOS. I was responsible for designing and developing the application that roboticists will use to interface and train their BrainOS enabled robots. Worked with a small team to identify the weaknesses in current Robotic Operating Systems (ROS) and design and build a more robust and developer friendly replacement. Worked to cross-compile and embed a C++ application into iOS devices making them a 1st class citizen in the distributed robotic environment that is BrainOS.
Redesigned training interface to be more understandable.
Squashed many bugs and memory leaks that prevented training application from running more that 5 minutes at a time.
2008-01-01 to 2014-09-01
Principal Software Engineer / Solutions Architect at Bridgepoint Education Inc
Was tasked with building a mobile application on apples iOS devices (iPhone,iPad, iPod) to allow students access to there online classroom while on the go. I took the project from a simple idea to a completed project in just under 6 months by leading a team of 5 developers. Built server interfaces to both mobile devices and with 3rd party vendors. Worked with vendors to design and build solutions to bring their tools to our students and employees in a timely and consistent manor. Worked closely with principal members of the business to bring quality solutions to everyday problems and automate tasks giving employees more time to focus on other aspects of their jobs.
Lead team designing and building a mobile access platform on iOS devices using Objective-C/Cocoa, CoreData, and some CoreAnimation.
Worked within the iOS framework to get the best possible performance out of our application, making web calls on background threads, caching data, etc.
Held architectural oversight of Android version of application
Built C# and PHP interfaces to 3rd party APIs to manage student data.
2006-09-01 to 2007-08-01
Software Engineer - Contractor at Intertune
Helped build, design, and debug web based applications used by brokers in the vehicle transportation industry.
Updated existing PHP4 applications to PHP5
Converted procedural code to object oriented
2005-09-01 to 2006-09-01
Owner / Operator at RKB Enterprises, LLC.
Owned and operated a local Irish pub. Managed up to 6 employees. Handled inventory, purchasing, payroll, marketing, and day-to-day operations.
Doubled the daily revenue.
2003-03-01 to 2005-08-31
Software Engineer at Indyme Electronics Inc.
Used .Net, C#, SOAP, and PHP to design, build and implement a Web Service based tool used to configure remote machines. Designed and built web based reporting solution.
Modified MySQL database design to be better normalized and efficient.
Built PHP based Web Service for interaction with a C# client and the MySQL database.
Worked on a C# client for the PHP Web Service.
Built a PHP client for the PHP Web Service for real time delivery and display of reporting data.
2001-07-01 to 2003-03-01
Software Engineer II at Intuit Inc.
Took ownership of internal database applications that tracked the release cycle of consumer products. Worked with my users to make the tools more efficient and reliable. Worked with users to bring tools into engineering standards while maintaining functionality.
Ported Access database to PostgreSQL.
Updated Access client application to access new PostgreSQL database using ODBC.
Worked on plans and requirements gathering to redesign tools for better efficiency.
Built web based reporting mechanisms for real time access to data via web pages or sent email.
2000-12-01 to 2001-07-01
Senior Programmer at SeminarSource.Com
Developed an Application Service Provider platform used to incorporate 3rd party web applications into a single web interface with a uniform look and feel.
Designed XML file transmission method for 3rd party web applications to talk with the platform.
Designed web based application that would talk via HTTP to a 3rd party web application.
Designed a Template engine that would use data gathered from a 3rd party and display it in a uniform environment.
Designed a CSS engine for modifying the way a template would be displayed no matter what the data.
2000-03-01 to 2000-09-01
Senior Programmer / Director of Technology Solutions at Solutions Media Inc.
I managed 12 people in developing and maintain web based applications and dynamic web sites. Using PHP to connect to an Oracle database on a Solaris UNIX box I designed and built, or helped build many of the backend structures needed to keep the system running smoothly.
1999-08-01 to 2000-03-01
Programmer / DBA / MIS at Grant & Associates
Working on my own I developed a method of automatically transferring Xbase (.dbf) files from a Windows based system into a Linux based system. These files were then loaded into a MySQL database for use with PHP programs and web display of the data. I set up Apache to parse the PHP files that connected to the MySQL database to retrieve and display the data to the user.
1998-07-01 to 1999-08-01
Programmer at Financial Database Services
With only an outline and instructions about what technologies I could and couldn’t use I built a system to maintain a source code tree. This system connected to SCCS to manage the archiving and versioning of the files, but gave the programmers an easy to use interface for checking out code and working on it. The system maintained a queue of file requests, removing the tedious task of a programmer having to keep checking to see if a file they needed was available. This code streamlined the programmer’s workday and speeded up production.
1986-09-01 to 1990-06-01
Grossmont High School
General Education
- English
- Native speaker