博文

Mål i ur och skur

Verksamheten ska sträva efter att varje barn: 活动争取使每个孩子都能: Utvecklar intresse för och kunskaper om naturen samt utvecklar en naturkänsla 开发对大自然的兴趣和知识,并且建立一种大自然的感觉 Utvecklar kunskap om en hållbar livsstil 开发对可持续的生活方式的知识 Utvecklar kunskap om och praktiskt handlande efter allemansrätten 发展对于allemansrätten的知识和实际做法 Får stöd och stimulans i hela sin utveckling genom vistelse i naturen 通过沉浸在大自然中来支持和刺激发展 Får möjlighet till rörelse och gemenskap på ett lustfyllt sätt i naturen 在大自然中以一种有趣的方式来活动和参与群体 Får utveckla grunden till ett livslångt intresse för friluftsliv 建立对户外活动终生兴趣的基础 Ref: https://www.friluftsframjandet.se/detta-gor-vi/forskolor-och-skolor/i-ur-och-skur/mal-i-ur-och-skur/

Quick perl syntax walkthrough

datatype and variables Perl maintains every variable type in a separate namespace. So you can, without fear of conflict, use the same name for a scalar variable, an array, or a hash. This means that $foo and @foo are two different variables. array @names = ("John Paul", "Lisa", "Kumar"); print "$names[0]\n"; @array = (1, 2, 'Hello'); # populate using qw operator @array = qw/This is an array/; hash %data = ('John Paul', 45, 'Lisa', 30, 'Kumar', 40); print "$data{'John Paul'}"; special literal print "File name ". __FILE__ . "\n"; print "Line Number " . __LINE__ ."\n"; print "Package " . __PACKAGE__ ."\n"; perldebug open debugger on command line iwth perl -de1 private variables in sub-routine with 'my' keyword tempoary value to give global variable via local keyword reference to variables and subroutine $s...

How to install pydev on nsight eclipse

You need to have jdk version 1.7 on your machine. You need to manuall install the plugin pydev 2.8.2 version Download pydev from http://sourceforge.net/projects/pydev/files/ and upzip it. Drop the unzipped files in respect eclipse plugin folders. Note PyDev will not appear in Eclipse despite you have Java 7 on your machine. The solution is to run eclipse with -clean argument. On ubuntu, you need to run it with root - sudo nsight -clean with nsight you need /usr/local/cuda-7.0/libnsight $ sudo ./nsight -clean Configure pydev to use correct interpreter and libs from pyenv first use command "pyenv versions" and "which python" to find which python is used in your environment set the interpreter to: ~/.pyenv/shims/python2.7 set the system libs to: ~/.pyenv/versions/2.7.11/envs/DrivePX/lib/python2.7/site-packages/ (if you don't take the pythonpath from virutalenv, you do not have access to these site-packages which are required to run the code) R...

What is the use of code if __name__ == '__main__'?

What is the use of code if __name__ == '__main__'? When the Python interpreter reads a source file, it executes all of the code found in it. Before executing the code, it will define a few special variables. For example, if the python interpreter is running that module (the source file) as the main program, it sets the special __name__ variable to have a value "__main__". If this file is being imported from another module, __name__ will be set to that module's name. In the case of your script, let's assume that it's executing as the main function, e.g. you execute something like python threading_example.py on the command line. After setting up the special variables, it will execute the import statement and load those modules. It will then evaluate the def block, creating a function object and creating a variable called myfunction that points to the function object. It will then read the if statement and see that __name__ does equal "__main__...

What is __init__.py used for?

Files named __init__.py are used to mark directories on disk as Python package directories. For example, suppose you have these files: dir/spam/__init__.py dir/spam/module.py and dir is on your python path, then you can import the module.py as import spam.module or from spam import module If you remove the __init__.py file, Python will no longer look for submodules inside that directory, so attempts to import the module will fail. The __init__.py file is usually empty, but can be used to export selected portions of the package under more convenient name, hold convenience functions, etc. Given the example above, the contents of the init module can be accessed as import spam Reference http://effbot.org/pyfaq/what-is-init-py-used-for.htm

C++ constness and reference

Case 1: Make function const vs. non-const const Track& ScoreTableElement::getTrackLeft() const {     return left_; } vs. const Track& ScoreTableElement::getTrackLeft() {     return left_; } The difference is, if the function is not marked const, then we can not call this function on a const variable or const reference variable, because this function could change the content of the object, so the const variable/reference will not allow the calling of this function. Example: sf::of::ScoreTableElement element(track_left, track_right, 4.5F); scoretable.push_back(element); const sf::of::ScoreTableElement element_out = scoretable.back(); // or const sf::of::ScoreTableElement & element_out = scoretable.back(); element_out.getTrackLeft(); // compiler error getTrackLeft() is not const function Case 2: Assign return const reference to const vs. non-const reference const Track& ScoreTableElement::getTrackLeft() const {   ...

The problem with partially finished user story

Problem description: When a sprint finishes, some unfinished user stories have a status in which some of the work, or sometimes even most of the work is claimed to be finished already. The remaining work to be done will naturally be rolled over to the next sprint and get its size re-estimated. However, the question remains when it comes to how to handle the credits that lies partially in these user stories. Should the story points be extracted and summed up as finished story points in the previous sprint?  There is some discussion on stackoverflow The solution could be this one: Do not take partial credit for semi-finished user stories, based on splitting the big user stories into smaller ones as mush as possible. Here is a good article that explains this: https://www.mountaingoatsoftware.com/blog/dont-take-partial-credit-for-semi-finished-stories