python opencv VideoWriter results in invalid video file
Label:
something isn't quite right,
thingy
/
Comments: (0)
Little did I know that OpenCV's VideoWriter could not handle saving into oddball-frame-sized video files. Python's not so verbose output doesn't help at all. Your program will still run fine like nothing wrong is happening, in the end it produces not-supposed-to-be file size like 578 kB or sth.
I bumped into similar SO articles [1, 2] which mentioned the case. I confirmed that VideoWriter works nicely when the frame dimensions (both height and width) is multiple of 8.
I bumped into similar SO articles [1, 2] which mentioned the case. I confirmed that VideoWriter works nicely when the frame dimensions (both height and width) is multiple of 8.
byte offset to pointer (C/C++)
Label:
I take it personally,
thingy
/
Comments: (0)
I had the same question as this guy. I need to add some byte offset to a variable of
struct something dataypes.struct something data, *ptr.
char *helper;
ptr= &data;
helper= ptr;
&helper +offset ; // these two will do the same:
& helper[offset] ; // advances the helper by offset byte
*ptr + 1 will advance by the whole sizeof(struct someting)
openezx
Label:
ezx,
something isn't quite right,
thingy
/
Comments: (0)
openezx.org used to be a place to share things development of EZX phones. The project was active mostly from 2004 to 2008. Went under in 2011/2012, just to be archived on Github and Open Source Mobile Communication Consortium earlier this year.
The original openezx.org now is a lesbian porn site. D'oh. The time of registration is somewhat close to the date the Github and OSMCOM went up.
The original openezx.org now is a lesbian porn site. D'oh. The time of registration is somewhat close to the date the Github and OSMCOM went up.
pidof
Label:
I take it personally,
something isn't quite right,
thingy
/
Comments: (0)
I am still doing
instead of pkill <the thing>
Am I old shool already?
kill `pidof <some thing>`instead of pkill <the thing>
Am I old shool already?
100 years
Label:
I take it personally,
see hear feel enjoy
/
Comments: (0)
Some associated this song with 100 years mark of women in UK being able to cast ballot or #MeToo.
I find this song telling about amidst whatsoever conflict happening in the society; people having different stances; our protagonist is trying his/her best to survive, allegedly being helped/manipulated by hands. Well, arts... are always open for multiple interpretations.
My mom has always been a strong woman. Dad passed away when I was five, she has raised me then on.
I cannot get you close enough
A hundred arms, a hundred years
You can always find me here.
I've been married for a year this day. She said she's gonna cook some chicken soup tonight. Last night, it marked the fist time she recorded 0.7 kg heavier than me, being 6" shorter. We fight quite often, I guess that's just the way we are. :D
And, Lord, don't let me break this
Let me hold it lightly
Give me arms to pray with
Instead of ones that hold too tightly
Also, I will listen to this song together with my kid.
We have no need to fight
We raise our voices and let our hearts take flight
Get higher than those planes can fly
Where the stars do not take sides
4 days: JRM
Label:
I take it personally,
something isn't quite right
/
Comments: (0)
DOI:10.20965/jrm.2019.p0671
[Received September 19, 2019; accepted September 22, 2019]
That. was. quick.
[Received September 19, 2019; accepted September 22, 2019]
That. was. quick.
linux-related music parody
Label:
I take it personally,
see hear feel enjoy,
thingy
/
Comments: (0)
Nostalgic feeling hits me hard.
I've used linux since I was twelve-ish.
Slackware's Pat having financial issues last year.
I am running only Ubuntu boxes.
Windows10 is on my daily laptop.
Zenwalk is on my second laptop, not being used, dual-booted with Windows7.
Time often passes faster than we grow up.
I've used linux since I was twelve-ish.
Slackware's Pat having financial issues last year.
I am running only Ubuntu boxes.
Windows10 is on my daily laptop.
Zenwalk is on my second laptop, not being used, dual-booted with Windows7.
Time often passes faster than we grow up.
academia is skwd in many ways
Label:
I take it personally,
something isn't quite right
/
Comments: (0)
Some reading for food for thought:
Renewal model in academic knowledge systems
The cited papers in the paper are also worth following.
This is why things like sci-hub is worth keeping: keep academic knowledge open (at least monetarily: no paywall), one-layered (a bit anarchist you might say), and keeping things identifiable.
I am not saying that academic publishing contributes nothing to the academic knowledge system itself, but everyone can actually learn to establish their academic publishing-indexing service themselves for their academic materials. There shall be no thing such as publish or perish, it should be publish for greater good.
Practical C++ Sockets
Label:
I take it personally,
thingy
/
Comments: (0)
Good read:
http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/practical/
I used the code for sending images between computers. Initially header information using a struct worked just ok, a day later it stopped working. I had to use simple array of ints to do so.
It reflected in my github commit:
http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/practical/
I used the code for sending images between computers. Initially header information using a struct worked just ok, a day later it stopped working. I had to use simple array of ints to do so.
It reflected in my github commit:
0cff14c
2e7ba9a
passing argument to scilab
Label:
I take it personally,
thingy
/
Comments: (0)
I've used scilab quite a while now, but never properly know to do basic things with it. Here's some redemption.
Then you can run it from console liek:
The output:
Knowing the argument sequence can be a bit of guesswork if the way you pass argument is inconsistent between runs, though.
>> file argument.sceargs= sciargs(); for argc= 1:size(args,2) do printf("%d %s\n", argc, args(argc)); endexitThen you can run it from console liek:
$ scilab-cli -f argument.sce -args 1 a b $ scilab-adv-cli -f argument.sce -args 1 a b The output:
1 /usr/bin/scilab-cli-bin 2 -f 3 wa.sce 4 -args 5 1 6 a 7 bKnowing the argument sequence can be a bit of guesswork if the way you pass argument is inconsistent between runs, though.
kite runner
Label:
I take it personally,
see hear feel enjoy
/
Comments: (0)
...[we] cherish custom but abhor rules...
--Khaled Hoseeini, Kite Runner
--Khaled Hoseeini, Kite Runner
Building LinuxCNC
Label:
I take it personally,
something isn't quite right,
thingy
/
Comments: (0)
LinuxCNC (formerly emc, and emc2) is a great tool to control your CNC controller, in my case a ST-V3.
Documentation on building the software is here, but it barely tells the whole dependency list and the automated dependency checker script simply wouldn't run on my Ubuntu 16.04 /LinuxMint 18.3 machine.
So far, here's it is for you
Go to the source directory and invoke:
Should've read these first:
https://forum.linuxcnc.org/9-installing-linuxcnc/32193-complete-how-to-linux-mint-18-1-32-64-rtai-or-preempt-with-rip-install-or-debhttps://forum.linuxcnc.org/9-installing-linuxcnc/32193-complete-how-to-linux-mint-18-1-32-64-rtai-or-preempt-with-rip-install-or-deb
https://forum.linuxcnc.org/9-installing-linuxcnc/33521-building-linuxcnc-dev-on-ubuntu-16-04-preempt-rt-kernel
Documentation on building the software is here, but it barely tells the whole dependency list and the automated dependency checker script simply wouldn't run on my Ubuntu 16.04 /LinuxMint 18.3 machine.
So far, here's it is for you
apt-get installautoconf
libmodbus-dev
yapps2
libxenomai
intltool
libtk-img
tclx
libreadline6-dev
libxmu-headers
libxmu-dev
tcl-dev
tk8.6-dev
python3-tk
python-tkGo to the source directory and invoke:
./configure --with-realtime=uspace Should've read these first:
https://forum.linuxcnc.org/9-installing-linuxcnc/32193-complete-how-to-linux-mint-18-1-32-64-rtai-or-preempt-with-rip-install-or-debhttps://forum.linuxcnc.org/9-installing-linuxcnc/32193-complete-how-to-linux-mint-18-1-32-64-rtai-or-preempt-with-rip-install-or-deb
https://forum.linuxcnc.org/9-installing-linuxcnc/33521-building-linuxcnc-dev-on-ubuntu-16-04-preempt-rt-kernel
Ahilavati
She's my current daily ride. She's the first bike I own since coming to study in Japan. We had some on-and-off relationship for a while: I'd been going with another bikes for times, and she'd been with other guys too. Well, no jealousy here. She was also in another city for a while I was involved in a rural revitalization project, which in the end I went home with another bicycle [in addition to her still in my possession] by the time the project concluded.
I use the bottle cage for a light rain jacket as I rarely do any ride which requires me to bring some water bottle. The pannier rack is for grocery and other weird things I transport on errands. Saddle isn't that high as I often ride her with pair of slippers/crocs rather than proper shoes. The stem is slammed to the bottom 'cause the clampable portion of the fork is already so short, even without spacers and stuff.
The fork she originally came with was broken, she once had a suspension fork, but now I settled with 700c fork with V-brake bosses. V-brake is nice that you can fit a wider tire. But with lever designed for dual pivot caliper brake, you need to true your rim really nice to avoid rubbing, or just ignore it as long as it isn't so serious. She sports 25c at the moment which is getting duller everyday, I am a broke student.
The fork she originally came with was broken, she once had a suspension fork, but now I settled with 700c fork with V-brake bosses. V-brake is nice that you can fit a wider tire. But with lever designed for dual pivot caliper brake, you need to true your rim really nice to avoid rubbing, or just ignore it as long as it isn't so serious. She sports 25c at the moment which is getting duller everyday, I am a broke student.
I am learning to bunny-hop with her. I can now lift my front wheel, I can lift my rear wheel, but linking the latter while the front wheel is still on the air is not in my curriculum vitae, yet. Neither is proper manual.
Sorry for the chain, I am such a poser T_T
Ikigai is (even) cruel
Label:
I take it personally,
something isn't quite right
/
Comments: (0)
Ikigai is occupation-centric, hands down.
A mother might say that her reason to live is to watch/nurture/care her kid growing up. Well, she loves the cause (the kid); she may be either a good or bad parent; in the big picture, the world might not need that particular kid; and parenting costs bunch of money, time, energy, understanding, patience: all kind of resources, in short.
So, parenting is either mere love or passion. But I will take "my kid is my reason to keep on living" as wholly valid reason--not an excuse--to live your life.
A mother might say that her reason to live is to watch/nurture/care her kid growing up. Well, she loves the cause (the kid); she may be either a good or bad parent; in the big picture, the world might not need that particular kid; and parenting costs bunch of money, time, energy, understanding, patience: all kind of resources, in short.
So, parenting is either mere love or passion. But I will take "my kid is my reason to keep on living" as wholly valid reason--not an excuse--to live your life.
Ikigai isn't even complete
Label:
I take it personally,
something isn't quite right
/
Comments: (0)
You perhaps once stumbled upon this Venn diagram portraying Ikigai: "reason for being", "purpose of life", "reason to live", or whatchamacallit raison d'être. The word is represented by the character (生) which means disciple, livelihood, potential, unripe, or things along this line.

The "purpose" is divided into four dimensions: whether one is adept at it, whether one is paid to do the task, whether the thing is something others actually need (hence beneficial), and whether one is enjoying it. But somehow, the depiction of this "purpose" using this Venn diagram kinda incomplete albeit you can still dwelve deep into it, make an essay out of it, and give TED-style talks on it. Still, technically the diagram with four circles here only features fourteen sections (including negative value for all factors), while permutations of four factors yield sixteen different values in total. So where are the remaining two?

This oval-ey diagram is definitely better. But two sections are left unexplained: "good job" (what you love and earns money, but you aren't necessarily good at it nor others need you to do it) and "contribution" (what you are good at for precisely what others need, but you kinda loathe it and doesn't get paid). The first definitely sounds wasted and the later sounds like one is being "used".
So what may these two be in real life?
So what's the take on this, or at least, my take on this?
Your raison d'être doesn't have to be wholesome and "complete" with love, money, talent, and acceptance of others at once. You can always define it yourself, being content with the moment, but always open up your mind for changes you are working on for the better or changes simply imposed by constraints, as things are often not quite right.
Kudos to guys at dreamstime/Toronto Star Graphic, Mark Winn, Dan Buettner, David McCandles for the wonderful graphs.

The "purpose" is divided into four dimensions: whether one is adept at it, whether one is paid to do the task, whether the thing is something others actually need (hence beneficial), and whether one is enjoying it. But somehow, the depiction of this "purpose" using this Venn diagram kinda incomplete albeit you can still dwelve deep into it, make an essay out of it, and give TED-style talks on it. Still, technically the diagram with four circles here only features fourteen sections (including negative value for all factors), while permutations of four factors yield sixteen different values in total. So where are the remaining two?

This oval-ey diagram is definitely better. But two sections are left unexplained: "good job" (what you love and earns money, but you aren't necessarily good at it nor others need you to do it) and "contribution" (what you are good at for precisely what others need, but you kinda loathe it and doesn't get paid). The first definitely sounds wasted and the later sounds like one is being "used".
So what may these two be in real life?
- prostitution is a good job: screw, hump, get paid; you don't need to be a proper porn star and definitely doing solicit sexual act isn't socially desirable conduct. If you are getting good at it, it is now either your passion or profession (or both, which is your now self-imposed ikigai). If somehow society accepts it, it is now your ikigai imposed by others, unfortunately, by being a prostitute.
- being altruistic as a matter of contribution: do good samaritan out of good will, you are quite adept at it, then you are getting tired, experiencing burnout, later running out of resources (time, energy, money, etc) to do so. Your way out being this miserable is either to start to love it for good or get some money out of it (which makes you an entrepreneur at this stage)
- entrepreneur: you aren't necessarily good at it but people needs you, you don't necessarily love it but somehow you get paid to continue doing it. So how you manage to do it? Let others with proper passion on it to do so and use others' resource to do your case, you connects will and energy, resource and passion, talent and demand.
So what's the take on this, or at least, my take on this?
Your raison d'être doesn't have to be wholesome and "complete" with love, money, talent, and acceptance of others at once. You can always define it yourself, being content with the moment, but always open up your mind for changes you are working on for the better or changes simply imposed by constraints, as things are often not quite right.
Kudos to guys at dreamstime/Toronto Star Graphic, Mark Winn, Dan Buettner, David McCandles for the wonderful graphs.
You... and (perhaps) me
Label:
I take it personally
/
Comments: (0)
Isn't it beautiful, to lead and to protect your cherished one?
Still, who shall I be? Renshaw, Hincapie, Rogers, or Martin?
migrating to larger SSD with GPT partitioning
Label:
I take it personally,
thingy
/
Comments: (0)
My daily driver is Acer Aspire Switch 11, a convertible laptop with SSD on the tablet and 2.5" drive beneath the snap-on keyboard. Mine came configured with Lite-On 64 GB M.2 SSD (L8T-64L9G) and 500 GB hard drive. Soon I swapped the disk drive for 1 TB model from HGST (HTS 721010A9E630) when I got it for quite a good deal. But the SSD got to wait, I am a poor student.
The laptop comes with Windows 8.1 (later upgraded to Windows 10) with UEFI configured which spells GPT partitioning.
Then the time for the SSD upgrade came, it wasn't that difficult. You just need the right tools for the job: replacement SSD, a bootable USB drive with Linux Mint 18 (Sarah, Ubuntu 16.04), USB 3.0 adapter for M.2 drive, and AOMEI Partition Assistant. The laptop would get a nice upgrade to 256GB SSD (Transcend TS256GMTS800)
The laptop comes with Windows 8.1 (later upgraded to Windows 10) with UEFI configured which spells GPT partitioning.
Then the time for the SSD upgrade came, it wasn't that difficult. You just need the right tools for the job: replacement SSD, a bootable USB drive with Linux Mint 18 (Sarah, Ubuntu 16.04), USB 3.0 adapter for M.2 drive, and AOMEI Partition Assistant. The laptop would get a nice upgrade to 256GB SSD (Transcend TS256GMTS800)
- plug the new SSD to USB adapter
- boot the laptop to LinuxMint which you can create with rufus for UEFI booting
- dd the whole old SSD into the new one. 64 Mb block size is nice, I got 250 MB/s.
- out with the old SSD, in with the new
- reboot into Windows 10
- install AOMEI Partition Assistant
- move and resize your partition
dd if=/dev/sda of=/dev/sdd bs=64M
- EASEUS wasn't able to detect my not-so-matching partition table
- MiniTool wasn't able to move the partition (perhaps it wasn't recognizing the end of disk address properly just as EASEUS)
- lastly, AOMEI works just great with moving Windows recovery partition (located to the end of the disk) and resizing my system (C:) drive to its full size.