wtorek, 3 maja 2022

Dźwięk - głuche wyjście w Ubuntu 22.04

Problem braku dźwięku w ubuntu 22.04 po instalacji. Należy wywołać terminal (Ctrl-Alt-T lub Super - terminal) i wpisać polecenia: echo "options snd-hda-intel dmic_detect=0" | sudo tee -a /etc/modprobe.d/alsa-base.conf echo "blacklist snd_soc_skl" | sudo tee -a /etc/modprobe.d/blacklist.conf Dokonać restartu komputera To wyżej to porady z pkt2 #2 Fix PCI/internal sound card not detected (dummy output) with Ubuntu kernel 5.3.0-41 and -42 in Ubuntu 19.10 / 18.04 https://www.linuxuprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html

czwartek, 29 kwietnia 2021

Jak uruchomić testy dla Javy pod NetBeans

 Generalnie NetBeans włącza biblioteki testowania z sygnaturą 5.****. Te biblioteki NIE DZIAŁAJĄ z Antem. 

https://stackoverflow.com/questions/54161715/netbeans-10-junit-jar-not-found


I'm running netbeans 10 as well, in xubuntu if that helps. I have no idea what is going on, so I had to revert to junit4. EDIT: To be perfectly clear, ant needs junit.jar which is nowhere to be found in the default netbeans 10 installation. Until someone brings a better solution, revert to junit4:

1) in your test libraries, right click and import the junit 4.1.2 ones.

2) remove the junit 5.3 ones.

3) scrap all the imports in your test file and use the junit4 ones. ie your imports will look like:

import static junit.framework.Assert.assertEquals;
import org.junit.Test;
import org.junit.*;
/*import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;*/

4) scrap the beforeAll and other test tags. Only leave the @Test one.

5) save all, close and re-open the project. It will complain that the hamcrest libraries for junit4 are not imported. Allow netbeans to fix it for you.

With that done, I was able to test successful and failing tests. I guess when you generate the junit tests with the template generator, it will generate the junit5 ones, so, a bit annoying. But you'll have tests!

niedziela, 18 kwietnia 2021

Jak ustawić własne kolory w Zim-wiki pod Windows10

 Jak ustawić własne kolory w Zim-wiki pod Windows10


1. Utworzyć w ~\AppData|\Local\gtk-3.0\
plik: gtk.css

Wpisać do tego pliku:

#zim-pageview text {
    background-color: #1A2E38;  /* changes the background color of the Zim's page editor */
    color: #BABABA; /* foreground text color */
  }

 

 2. Utworzyć w ~\AppData|\Local\gtk-3.0\
plik: settings.ini

Wpisać do tego pliku:

[Settings]

gtk-application-prefer-dark-theme=1


Źródło: https://www.zim-wiki.org/manual/Help/Config_Files.html

poniedziałek, 6 kwietnia 2020

piątek, 21 czerwca 2019

Jak odświerzyć zdjęcie tekstu z bloga na facebooku?

1.
Wejść na stronę facebook debug tool
Wprowadzić adres strony ze swoim tekstem
Kliknąć Scrape again


https://www.yokoco.com/control-facebook-share-link/

2.
Wejść na stronę: https://developers.facebook.com/tools/debug/og/object/
Wprowadzić adres tekstu
Kliknąć Fetch new scrape information

czwartek, 8 listopada 2018

calendar disappeared from thunderbird

Ubuntu 16.04. Thunderbird 60.2.1 (64 bits) Calendar has disappeared.

That change in Thunderbird, which is automatically updated, costed me 1 hour of research and work. How many hours these guys took from ppl around the world? Is seems they just don't care. Because, maybe, they become big.

For now: 
1. Remove Lighting from Thunderbird.
2. Close Thunderbird
3. sudo apt install xul-ext-lightning
4. Start Thunderbird again.

Calendar is here again.

Or... you may try to download and install appropriate version of Lighting:
- versions: https://developer.mozilla.org/en-US/docs/Mozilla/Calendar/Calendar_Versions#Stable_Releases
- downloads: https://ftp.mozilla.org/pub/calendar/lightning/candidates/

For tomorrow, seriously consider different pim tool, because you may find yourself in not comfortable situation.

czwartek, 25 października 2018

Codility FibFrogg

Idea: This is a search graph task. A used this explanation of the algorithm LINK.

In first step you check all possible single jumps from start point. This creates a new "row" of starting positions.
In next step you check all possible single jumps from every start position in the "row".
Sum of found new positions create another row.
You skip if you find a possible jump to the position which was "visited" previously, because there is a shorter or equal path to that position.
You stop when any jump will reach "end position" or you cant find a position to jump anymore. Code: