Soluții

Cum convertesti diferite formate ( JPEG, PNG, TIFF ) pe Mac

Aplicatia ,,Preview’’ din Mac OS este mult mai mult decat un instrument de vizualizare a imaginilor. De exemplu, poate converti si exporta aproape orice imagine intr-un format diferit. Acestea sunt: PNG, JPEG, TIFF, HEIC si PDF. Aplicatia accepta noul format HEIC de la Apple. Daca descarcati imagini de pe IPhone sau IPad pe Mac si constatati ca ele au format HEIC, le puteti incarca in program si converti in JPEG pentru a le putea partaja usor cu prietenii.

[mai mult...]

Reset Your Ubuntu Password Easily from the Live CD

Our last article on how to reset your Ubuntu password easily through the grub menu was quite popular, so I’ve decided to make a series on all the different ways to reset your password on either Linux or Windows… today’s lesson is how to use the Live CD to reset the password.

Note that we’ll also cover how to protect yourself against somebody else resetting your password, so stay tuned!

image

Of course, this method will also work if you’ve installed your Ubuntu Live CD to a thumb drive.

Resetting the Password

You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.

image

Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:

sudo fdisk -l

This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.

image

Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.

sudo mkdir /media/sda1

The next command will mount the hard drive in the /media/sda1 folder.

sudo mount /dev/sda1 /media/sda1

Now it’s time for the command that actually does the magic: chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.

sudo chroot /media/sda1

Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

passwd geek

Note that you’ll have to type your username after the passwd command in order to change the right password.

image

Now you should be able to reboot your system and log yourself in with your new password.

[mai mult...]

Install the Firestarter Firewall on Ubuntu Linux

Firestarter is an easy to use firewall for Ubuntu that includes a GUI administration tool. Installation of this firewall is as easy as using it. In this HowTo we will cover how to install the firewall.

Open a terminal window, and type in the following command:

sudo apt-get install firestarter

After the installation is finished, you can find the administration GUI at System \ Administration \ Firestarter:

When you launch the GUI for the first time, it will take you through a setup wizard:

Click forward, and you will be able to select the network device. If you are using DHCP for your machine, make sure you select that checkbox here:

Click Forward, and then Forward again. You will see the final screen of the wizard:

Click the save button and you will see the normal GUI screen:

This GUI is accessible from the tray icon, shown here:

The firewall is now installed. The firewall will continue running whether or not you are running the GUI, but the GUI will not be started up automatically unless you add it to the startup list using this path:

sudo /usr/sbin/firestarter

[mai mult...]

Cleaning Up Your Mac’s Storage

Start the cleanup process with the easiest methods first, and move on to ones that may be more difficult to perform.

Empty the Trash – The Mac’s trash is actually a folder used to temporarily store files you have deleted. All those files you have moved to the trash haven’t been erased, they are still taking up space on your drive. The idea is that if you made a mistake and need a file you trashed, you can easily retrieve it.

The disadvantage is that it is easy to forget to manually empty the trash resulting in a large number of files taking up space. Emptying the trash will permanently remove all files within the Mac’s trash. If you would like to check what is in the trash first, move your cursor to the trash icon in the Mac’s Dock, right-click and select Open from the popup menu.

If there are any files you need, you can drag them out of the trash or right click on a file in the trash and select Put Back from the popup menu to move the file back where it came from.

Once you have the trash containing only unwanted items, right-click on the trash icon in the Dock and select Empty Trash from the popup menu.

[mai mult...]

Problema c#

– se declara numerele intregi ab si rez de tip int, reprezentand operatii si rezultatul;
– se declara caracterul op de tip char, reprezentand operatia care se va executa;
– se declara variabila ok de tip short, care va ramana 1 daca operatia se termina cu succes, astfel i se va atribui 0;
– avand in vedere ca va trebui sa comparam valoarea retinuta de variabila op cu mai multe valori, folosind instructiunea de selectie switch. Avem 4 randuri case, una pentru fiecare dintre valorile +, -, *, / si ramura default pentru cazurile in care op are orice alta valoare inafara celor 4 enumerate anterior, moment in care ok ia valoarea 0.
In cazul in care op are una din valorile +, -, * se efectueaza operatia corespunzatoare, iar rezultatul se depune in variabila rez. In cazul in care op are valoarea /, prima data se va testa cu ajutorul unei instructiuni if, valoarea celui al doilea operand, deoarece daca el este 0, impartirea nu se poate realiza, caz in care se va afisa pe ecran un mesaj corespunzator. Daca valoarea lui b este diferita de 0, se procedeaza ca si in cazul operatiilor +, -, *.
La final, in cadrul unei instructiuni if se testeaza valoarea variabilei ok.
Daca ok a ramas 1, atunci se va afisa operatia efectuata impreuna cu rezultatul, altfel se va tipari un mesaj ca operatorul introdus de la tastatura nu este unul valid.

[mai mult...]