Rāda ziņas ar etiķeti bullshit. Rādīt visas ziņas
Rāda ziņas ar etiķeti bullshit. Rādīt visas ziņas

2019-02-18

555 timer examples in falstad circuits

Few 555 timer chip examples built digitally in falstad circuit builder.

This one is Schmitt trigger with 2/3 and 1/3 Vcc hysteresis.
Check out extra sliders and see how current through led changes.

Simulation is here - http://tinyurl.com/y4rnjs4o


Another one - LDR logic board. Similar, but without hysteresis as threshold pin is connected to stationary 10k resistor, so the output is passed on at strict threshold level chosen by adjusting the variable resistor.

And the simulation - http://tinyurl.com/y6l7blt2


Here is a monostable circuit. Use switch as a push button and the LED will stay turned on for a certain time.

http://tinyurl.com/y6o47oxw

2015-11-29

How to download videos from facebook or vimeo (or youtube or any other service)

I hate long "how to" videos.
So here are my versions of how to easily save videos using just a web browser


Facebook video download steps:
1)open video page
2)change to mobile version
3)play the video and save it using right mouse button option


Vimeo (youtube and many more service) download steps
1)copy the video link
2)paste it in some service (keepvid or ssyoutube or savefrom.net)
3)download it

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.


2013-01-11

Telephone number representation in ... one pixel..

Lets say I have a telephone number which consists of 8 numbers - "29945987"
How to shorten it? Well.. one could convert it to different numeral system with base greater than 10.. The most popular would be hex numeral system with base-16. In that case the number would be "1C8F083" with only 7 symbols in it. My friend tried to convert it as an ASCII but didn`t do it mathematecally correctly :D so he has to rework it.

Ok, but - how to get it on a ... pixel? Well, what exactly is pixel? Working with different imagery software (starting with most popular and simplest Microsoft Paint and ending with complex Adobe Photoshop, Gimp, etc) users can "paint" or do whatever they are doing with custom made colors chosen from software color palette. The color "consists" of three "base channels" representing colors - red, green and blue each having a value from 0 to 255. So each pixel has these three values. Even better, there is some "pixel formats" with additional alpha channel for opacity. 

What does it mean? It means, that in the one pixel there can be stored value, which doesn`t exceed 255^4 =4`228`250`625 - numerical information with 9 characters is safe to save in one pixel. Even better - in two pixels we can safely save information about 19 numbers or the maximum value stored in two pixels is 1.78781033478129 × 10^19 or 17878103347812900000.

The next thing is - how to encode and decode such an information?

Lets try to encode my number "29945987" in pixel step by step. Despite maybe there are another approaches how to do it, this one is mine:

The main rule is I have to split the number in 4 parts with values from 0 to 255.

The first part will be the alpha channel.
The value of alpha channel is calculated as the floor value from division of my number and the value 255^3

floor(29945987;255^3)=floor(29945987;16581375)=1 (alpha)

The second part will calculate the value for the red channel. For that we firstly need to calculate with remainder (first) of difference between given telephone number and 255^3. 

mod(29945987;255^3)=mod(29945987;16581375)=13364612

Lets see is this number dividable with 255? Not really, there will be again some remainder (second) left. In such a case this second remainder can be any value from 0 to 255. Let us this value be the value for red channel

mod(13364612;255)=62

From here everything tangles, could be hard to follow.
What else we can do with the remainders we have? Previously we got second remainder with value 62. Subtracting it from first remainder, can this value be divided with 255^2?

13364612-62=13364550

In this case no, there is third remainder with value 34425.

mod(13364550;255^2)=mod(13364550;65025)=34425

Again, we are calculating the difference between second and third remainders getting the number which can be divided with 255^2 without remainder value=0.

13364550-34425=13330125
The division between calculated difference and 255^2 will be the value for third - green - channel. The calculated value will be lower than 255^3.

13330125/255^2=13330125/65025=205


And the last - blue - fourth channel value will be the division between third remainder and 255^1

34425/255 = 135

Does this all seems familiar? Well, this is my today`s empirical approach how to get values.
Actually - the similar approach could be done using base-x algorithm where x is any integer. In my case it should be 255.

And this is the RGBA color of my telephone number
And here it is in one small pixel:





2012-07-19

Proper homepage representation inside facebook.

Ok, here it goes.
There are two, TWO things what must be done to properly represent blog through "like" or just using hyperlink in facebook or whatever you are doing.

Firstly, must be sure about does the blog have meta keyword with content description
read here - http://www.bloggerplugins.org/2012/03/add-meta-description-tags-to-blogger.html

Secondly, must insert facebook code snippet in blogger source.
could be done in different ways. read here - http://blog.xmlgadgets.com/blogger/facebook-like-button-for-blogger/ and also read comments.

Also check the source of this page, try to find that damn meta tag.

Guess, what!


decode with webcam here

2012-03-02

Canoscan 8400f error 2 178 0

Bad FAU (film adapter unit) cable.
The scanner worked fine while scanning some documents and stuff. When I tried to scan some diapositive films, i got an error 2 178 0. In some forums people say it is because of cable. Tried to find some schemes, but unsuccessfully. Got another, working cable and additionally I made the scheme of the cable.

In my case the wires 8 and 9 was broken. The interesting part was that it was possible to avoid the error by putting the FAU in the start position manually by hand. When I launched preview, the error was gone and i got a preview of my diapositive. And then it stuck in the end - servo motor didn`t put the FAU in the start position. I realized that something is wrong with 1)electronics or 2)cable. With other cable scanner worked fine, so it is not electronics. And here it is - the wire 8 which eventually was broken is FAU (go) HOME. But still I have another wire - 9, which is FAU (gives) POWER. Could it be that FAU doesn`t get the power from it and takes power from wire 10? It seems possible, because I got it working with broken cable when I manually put the FAU in start position. The lamp was shining and the unit worked ... till it had to "go home" :D


2012-02-06

populārzinātniskas piezīmes

Stāsts, šķiet, sākās ar to - vai ģeomagnētiska vētra iespaido cilvēku? Jautājums laikmetīgs, aizķēra arī mani. kā nekā, 2012 gads ir 11 gadu solārā cikla maksimums vai kāviņtur. Balstoties uz iepriekšējām zināšanām par fiziku un... neiroloģiju, kas iegūtas .... fizmatos, optometrijas un redzes zinātņu nodaļā, pirmais, kas ienāca prātā - nē, noteikti nē. Taču varbūt, ej nu sazin, ir kādi izņēmumi. Turpinot diskusiju nolēmu paskatīt dziļāk tēmu.
Lai vieglāk būtu gan lasītājam, gan man sevi saprast un izsekot, izveidoju pseidointerviju ar sevi.

-Kā tad īsti ir? Vai ģeomagnētiskā vētra iespaido cilvēku?
-Jā un nē. Pārāk plašs jautājums, patiesībā. Ir dažādi aspekti un elementi. tāpēc - mazliet pirms gala atbildes - par elementiem atsevišķi. Kā arī varbūt kāda diskusija un papildus jautājumi radīsies. Tātad - iesākumā bija nervu šūna.

Pati par sevi tā ir šūna ar konkrētu funkciju. Galvenie uzdevumi - saņemt un padot. Nu, un arī parēķināt.
-Parēķināt - ko īsti?
-Par to vēlāk. Tātad šūna, kas saņem... Ķīmiju.
-Ķīmiju?! No kurienes? 
-No citas šūnas...
-Pa taisno?
-Nē. Starp divām nervu šūnām ir... sprauga. Sinapse...

-Nu un kur tad elektriskie nervu impulsi spēlē lomu?
-Ne tik ātri. Tātad - iedomājies tādu situāciju - trīs šūnas pēc kārtas. Pirmā šūna ir receptors, kas spēj sajust.. nu, piemēram, gaismu. Savukārt nākamās divas pēc kārtas - divas nervu šūnas. Receptors, pēc būtības ir sensors. Sensors saņem informāciju ārējā formā (mehāniskā, termiskā, elektromagnētiskā- piemēram acī nūjiņas un vālītes).

Tātad - receptors, kurš spēj sajust gaismu darbojas pēc principa: receptorā ienākošā gaisma paveic ķīmisku reakciju. Viena viela pārtop par citu vielu, tādā veidā iedarbinot receptoru - tas ir izveidojis elektroķīmisku Signālu. Receptors ir savienots ar nervu šūnas aksonu. Savienojuma vietu sauc par sinapsi. Sinapse patiesībā ir telpa, kur notiek ķīmiska reakcija. Nosacīti, nervu šūnas sinapsēs nav savienotas.
-Ķīmija, ķīmija.. bet kur tad "nervi pārvada elektrisko impulsu"?
-Tieši šeit arī rodas neirālā signāla elektriskā daba. Sensors sinapsē izdala ķīmiju - neirotransmiterus, mediatorus.

Savukārt nervu šūnas aksons šo "ķīmiju" monitorē un uztver. Sinapses ir bezgala sarežģītas un ķīmiskās reakcijas dažādas, bet galvenā ideja - nervu šūnas aksonam, uztverot "ķīmiju", šajā nervu šūnas galā izmainās elektriskais potenciāls...
-ēm.. pret ko? elektriskais potenciāls jau nevar būt viens pats... tāpat kā baterijai ir pluss un mīnuss..
-Jā, tieši tā. Šajā nervu šūnas galā ienākošā "ķīmija" ir radījusi atšķirīgu vidi, nekā otrā nervu šūnas galā - dendrītā. Šī elektriskā potenciāla atšķirība dendrītam "ieslēgties" un... atbrīvot ķīmiju nākošajā sinapsē.

-Skaidrs. Tātad ķīmija ar elektrību smadzenēs iet roku rokā.
-Ne tikai smadzenēs. Visā organismā.
-Bet kā ar kalkulāciju? Kā nervu šūnas zina, ko uz kurini sūtīt?
-Nu, tas ir smags jautājums šim brīdim. Ir vairākas lietas, kam nepieciešams pievērst uzmanību - nervu šūnu veidi - vienkārši un īsi sakot - pelēkās un baltās šūnas. Baltajās ir gari aksoni un dendrīti, galvenokārt nodarbojas ar signālu pārvadīšanu, pelēkās - tajās ir īsi aksoni un dendrīti, kas ļauj tām atrasties vienkopus veidojot sarežģītus tīklus. Pēc šīm īpašībām arī ir šie klasiskie nosaukumi - "kustini pelēkās šūniņas". Nu redzi, smadzenes lielos vilcienos ir "pelēkas".

Taču nākamā lieta - kā šīs šūnas grupējas smadzeņu ietvaros......

-Nu skaidrs, cik saprotu, tad lai šito apgūtu, jāiet studēt medicīna. Izskatās arī, ka kopumā esam pamatīgi novirzījušies no tēmas - ģeomagnētiskās vētras iespaids uz cilvēka organismu.
-...Otrā lieta, kam vēlētos pieskarties - kas īsti ir ģeomagnētiska vētra. Nu, tu zini, ka zemei apkārt ir magnētiskais lauks, vai ne? Magnetosfēra. Principā, šī ģeomagnētiska vētra ir zemes magnētiskā lauka normālas pastāvēšanas traucējumi.

Zemi nepārtraukti apspīd Saule. Bet Saule ne tikai uz zemi sūta gaismu, bet arī elektronus un protonus, kas ietekmē magnētisko lauku. Vispazīstamākā parādība - ziemeļblāzma. Šīs daļiņas magnetosfēras klātbūtnē jonizē atmosfēras augšējos slāņos atrodamos skābekļa un slāpekļa savienojumus, un tie, saņemot enerģiju no protona, izstaro gaismas daļiņu - kvantu... Tāpēc ģeomagnētiskās vētras laikā novērojama pastiprināta ziemeļblāzma, jo no Saules tie elektroni un protoni mazliet vairāk, nekā vajadzētu, atnāk. Attēlā pievērs uzmanību, kādā virzienā nāk daļiņas. "Along magnetic lines in the polar regions"

-Vai tam ir kāds sakars ar kosmisko starojumu?
-Jā. Saules vējš - protoni un elektroni, neitrino un visādas citādas kodoldaļiņas ir tiešs kosmiskais starojums.

-Kāds spektrs ir kosmiskajam starojumam?
-Nu, te nu nevajadzētu jaukt kosmisko starojumu ar elektromagnētisko starojumu. Neesmu nekāds tur astrofiziķis, bet cik sanācis atrast - kosmiskais starojums kādreiz ir ticis uzskatīts par elektromagnētisko starojumu, taču tā kā tās ir daļiņas, tad drīzāk ir jārunā par enerģijas daudzumu, ko šāds kosmiskais starojums (kurš pēc būtības nav starojums) pārnes.

-Tātad, kosmiskais starojums var ietekmēt Zemes magnētisko lauku?
-Jā. Un tas to arī nepārtraukti dara.
-Un Zemes magnētiskā lauka izmaiņas var ietekmēt cilvēka nervu sistēmu?
-Pētījumi saka, ka slimam cilvēkam var ietekmēt. Pie tam riska grupā atrodas tādi cilvēki, kuriem ir kardiovaskulāras - sirds un asinsvadu slimības.
-Un kāpēc veselu cilvēku tas neietekmē?
-To es nezinu. Pētījumi nav atraduši būtisku ietekmi uz nervu sistēmu. Kā arī ir aizdomas, ka patiesībā šīs kardiovaskulārās problēmas izraisa pati ziņa, ka būs gaidāma magnētiskā vētra. Cilvēks satraucas un patiesībā sacepj pats sevi. Cik nu tas ir patiesi, neņemos spriest, bet tādas idejas arī virmo gaisā.
-Bet pats kosmiskais starojums pēc būtības ir bīstams cilvēkam?
-Jā, protams. Jebkurš starojums attiecīgās devās ir bīstams cilvēkam. Mobīlie telefoni, dažādas iekārtas, kas izstaro elektromagnētisko starojumu. Links. Vēlviens links. Un, piemēram, kosmosā kosmonautiem/astronautiem pastāv augsts risks saslimt ar vēzi, jo starojums atklātā kosmosā ir intensīvs. Mūs uz Zemes aizsargā.... atmosfēra roku rokā ar magnetosfēru. Ultravioletie stari pazūd ozona slānī, nu.. vismaz tur, kur vēl nav caurumi, jau pieminētie elektroni un protoni enerģiju atdod, veidojot, piemēram, ziemeļblāzmu. Nē, nu, pašlaik gaišā dienas laikā arī notiek enerģijas atdeve atmosfērā un magnetosfērā. Sīkumos neiedziļināšos jo neesmu tik gudrs, bet to, ka tas notiek, to varu droši galvot. Vien neitrino tāda jancīga daļiņa-  viņai viss vienalga, skrien visam cauri...
-Miljons dolāru jautājums - vai elektromagnētiskais starojums ietekmē cilvēka veselību?
-Jā, protams. Kā jau minēju, jebkurš starojums kaut kādā frekvenču diapazonā attiecīgās devās ietekmē cilvēku. Bet atkal - ir jāizšķir divas lietas - ietekmē cilvēku izmainot tā fizioloģisko struktūru, vai ietekmē cilvēku interferējot ar cilvēkā novērotajiem elektromagnētiskajiem procesiem, piemēram, smadzeņu neirālo oscilāciju. Pēc kārtas un tātad pirmais variants - izmainot fizioloģisko struktūru. Tikai aklam no dzimšanas nav priekšstata, kas ir gaisma. Gaisma ir elektromagnētiskais (EM) starojums. Vai gaisma mums var izdarīt kaut ko ļaunu? Un aizverot acis un neskatoties virsū? Nē? Nu un kā ar lāzeru? Daudzi zin lāzera pointerīšus - redzamā gaisma. Bet ar lāzeru var griezt metālu un operēt un ko tik vēl visu ne. Tātad - brutāli sakot - ar redzamo gaismu pareizos apstākļos cilvēku uz pusēm šodien pārgriezt  nogalināt var, pat ar konkrētu izdalītu redzamās gaismas viļņa garumu. Viss slēpjas enerģijā, intensitātē, ko šī gaisma nes. Pie tam, jo mazāks viļņa garums - augstāka frekvence - jo mazāk enerģijas vajadzīgs, lai izdarītu ļaunumu. Kāpēc Malaizijā cilvēki peldēties iet peldkostīmos, kas apsedz daudz ķermeni? Daudz saulītes skaistā vasaras dienā nevajag, lai nākošajā dienā mocītos ar sūrstošu ādu. Vēl tālāk uz mazāku viļņa garumu - rengena starojums - slimnīcās svina plāksnes un.. pie zobārsta apkaklītes un kas tik vēl ne. Gamma stari - Fukušima un Černobiļa. Pat nav nekas jādara, no tiem vaļā tik viegli netikt. Nu un uz otru pusi - frekvence mazāka, viļņa garums lielāks - siltumstarojums (infrasarkanais), mikroviļņi... esi kādreiz jaucis mikroviļņu krāsni? Tur iekšā mežonīgi liels transformators. Un jo tālāk uz šo otru galu, jo vairāk enerģijas nepieciešams. Nu un otra lieta- interference. Pēc manas saprašanas nekāds elektromagnētisks starojums netraucē un neiespaido cilvēka neirālo darbību caur interferenci.
-Nu, paga paga, jau pašā sākumā stāstīji, ka nervos ir elektroķīmisks signāla pārvades veids... Ir taču izpētīti alfa, beta, gamma, delta, theta un mju smadzeņu oscilāciju tipi....

-Jā, tieši tā. Ir tādi svārstību tipi. Pie tam visi tipi ietilpst ar frekvenci 0-100 Hz robežās. Taču - kas tās ir par svārstībām? Vai tās ir elektromagnētiskas svārstības? Patiesībā tās ir neironu (nervu šūnu) elektroķīmisko svārstību svārstības... Jā, neirālās oscilācijas - alfa, beta un pārējie viļņi ir centrālās nervu sistēmas aktivitātes ritmiskas un atkārtotas svārstības. Beigās atgriežoties pie tā, kur sākām - signāls jeb neirālā aktivitāte tiek radīta elektroķīmiskā ceļā. Bioķīmija ir neirālās aktivitātes cēlonis, savukārt elektriskie impulsi - neirālās aktivitātes manifestācija.
 -Tātad vienā teikumā atbildot uz šo pseidointervijas galveno jautājumu tu saki, ka ģeomagnētiskā vētra ietekmē neirālās aktivitātes mērījuma rezultātus, nevis pašu neirālo darbību.
-Jā. Tu (es) pareizi esi mani (esmu sevi) sapratis.


Iespējams, ka ir dažādas nekorektas nianses šajā pseidoStāstā. Komentāri atvērti piezīmēm, niansēm, labojumiem, ieteikumiem, norādēm uz kļūdām.

//Sveiciens Viesturam.

2012-01-24

Gasoline price charts, upgraded



Upgraded version of gasoline price charting.
Added two dropdown boxes, similarly like in gasoline price mapper.

Repaired the gasoline "extrapolation" from last date in the database till present moment.

2012-01-17

2011-08-22

Ryanair B738, flight FR-8085 incident

Landing gear problem.

Simon Hradecky writes in the Aviation Herald:

A Ryanair Boeing 737-800, registration EI-DWT performing flight FR-8085 from Brussels Charleroi (Belgium) to Riga (Latvia), was on approach to Riga when the crew reported a gear unsafe indication, performed a low approach which confirmed one of the main gear struts was not down. The aircraft climbed back to 6000 feet and entered a holding to trouble shoot the problem. About 45 minutes after aborting the first approach the crew managed to lower and lock all gear and landed safely on Riga's runway 18.
Riga Airport reported that there were already considerations to have the aircraft ditch in the Gulf of Riga just north of the aerodrome.
Latvia's Directorate General of Civil Aviation confirmed the aircraft had a problem with the landing gear. The aircraft subsequently entered a holding area to work the problem, then performed another overflight (according to radar data at 2500 feet MSL) for another visual check by experts from the ground which confirmed all gear had reached the fully down position and commenced a safe landing immediately thereafter.

Media (www.apollo.lv) reports unusual pilot activities asking for passengers to pray God.

Digging in the internet it seems that mostly there are no fatalities in landing gear accidents. So, the most interesting question here is why there were some profesional thoughts about ditching in the sea...

And here is that baby




This is my favorite comment from avherald:

Combine the vivid imagination and crap english knowledge of people flying once in 2-3 years and that is what you get when you interview them. You could also tell that a moon landing was considered.. :)

1) Final announcement about landing was made on approach which is over the gulf - here you have ditching.

2) At some moment passengers were asked to assume brace position. To some "brace" may sound like "pray". The position itself sparks some associations - here's the praying part. 

2011-01-19

Publication

In SPIE proceedings, about mesopic vision, its characteristics.
Last year, along masters studies in geography, I studied Ph.D in University of Latvia, Physics, mechanics and astronomics program, about psychophysics. And only thing I`d done was I, my proffesor and another collegue, we were going to this lab in France, Clermont-Ferrand to make psychophysical related experiments in fog chamber.

2009-10-30

what else google can do?

I wanted to see weather forecast for Milano, and I though, using google I`ll be able to find some weather forecasting homepage... But google did it quicker and gave me forecast directly.
Wanna try? Write in the google search textbox weather city name and you`ll get direct forecast for chosen city. Nice, isn`t it?

2009-10-13

last night`s movie



fucking awesome movie!
no politics, no anti-military.
damn good and scary.
sometimes kicked shit out of me...

2009-10-12

sci-fi and uni-paperworks

I was doing my geo-report and was looking some info about Thomas Malthus, and i found some forgotten characters from "Lost" :D

Latvian wap`edia site

some friends of him looked familiar :D

2009-09-13

Dell Latitude d800 and Inspiron 8600

It is so simple to repair these kinda notebooks. All parts are like plug`n`play. And so easy and simple changing them. Even replacing the motherboard seems so simple.
But there`s one bad thing - screws are in different length. And that makes a problem remembering in which part should I use one or another screw length.

next level? fixing notebooks... hahah!