## 2014-12-06

### Sharing more than one main folder in Dropbox?

No. I haven`t found how to do that.

But why would anybody do that? Does it make any sense? Why it is not enough with only one main Dropbox folder?

There are some cases related with programming, when it is easier to have all scripts in some specific place, e.g. C:/scripts, instead of some complicated Dropbox folder path like C:/Documents and Settings/whatever/user/space in folder/name creates problems/Dropbox/specific folder for scripts/any programming language/scripts...

But how about duplicating the contents in the main Dropbox folder? You can still work in your C:/scripts, and all updates will be synced in your specific folder inside Dropbox main folder.

Synchronising between folders. That`s the key. DSynchronize.

Features include - real time sync and bidirectional sync.

## 2014-09-07

### Harmonic oscillations

 Mathematics which explains the distance at time for harmonic oscillations.
Harmonic oscillations and the representation of distance, speed and acceleration over time. So, if we derive the distance over time, we get the speed. If we derive that, we get acceleration.

This distance at time is composite function which has inner and outer parts and constant. Which parts in the formula are constants? Amplitude, angular frequency and phase shift. Firstly we see that its a multiplication of constant (amplitude) and composite function (frequency, time and phase within the sine). So we leave amplitude intact and will multiply it with derivative of outer function which keeps the inner function. So, cosine becomes negative sine, and then multiply it with derivative of inner function. Inner function is the first order polynome, so phase dissapears and frequency loses time. So, the derivative of inner function is pure angular frequency. So, recall, how far we are - we multiply amplitude with negative sine of intact inner function and multiply it with derivative of inner function - angular frequency. To get rid of negative sign, we can change sine to cosine by adding pi/2 inside of  this trigonometric function. Remember that sine of angle is equal to cosine of angle plus pi/2.

## 2014-06-30

### My students

In the last five months I have studied good practice of being a teacher in university. One (most important) task was to create a portfolio. In my experience I have heard this word describing The Face of different modern artists, mostly web designers and programmers, who are promoting their achievements; accumulating all their work in a world wide web thus showing their potential for their future employers.

Eventually during the course I took I realized that my blog/webpage is also a portfolio. I started this blog with the main idea to have a notes; pretty specific ones, maybe I am the only one who will need them, but I nailed myself that  time by time I am looking for some older posts to refresh myself - "how I solved that particular problem, what are the keywords, etc"

Even more, I organized my web not only for myself, not only for some five people in the world who are fighting similar problems I had, but I have also specified a part of the blog for... my work. As I work with students, they have to understand some complicated problems pretty often. I realized that Internet is full of ... well.. shit, but there are pearls hidden. Now I have specific part, where I am accumulating those pearls which explain those particular problems. Either it is some image, video, audio or just a explanatory text - this part has its value - all necessary things in one place.

This course I had - well, despite I already had some ideas in my mind how to organize and structure the work with my students - in the end it putted the dot on "i".

## 2014-01-23

### Array to object in php

I could say that I`m settled down with such a programming techniques - object oriented programming, PDO for database access, JSON as nice client-server communication, Slim framework as RESTful server, jQuery-Backbone as MV* client side solution.

This is short note about database-php-javascript communication. PHP is receiving data from both, but the trick is - one, coming from javascript is JSON string, another one, coming from database is array. PHP has nice function converting JSON string to pure object -
json_decode
But how about converting array to object? It should be so simple, right? But as it appears, there`s no native functions for doing that. One way is to cast an array to object as such
\$newObject =(object) \$array;
but ... the trick is that only the outer dimension will be transformed to an object. There definetely are some recursive functions flyin around in internet, but .. how about firstly encoding array to JSON using json_encode, and then decoding it using json_decode? Ok, I admit it could be much more memory inefficient than some recursive function, but, it definetely is much more simple.