miercuri, decembrie 31, 2008
marți, noiembrie 04, 2008
How to change ROOT password when it is lost on Red Hat
2. When GRUB bootloader appear select "e" to edit boot options
3. Select to boot with following options: kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/ single , the word single need to be added at the end so you will boot in singlemode
4. When command shell appears go to: cd /etc
5. Using vi or other editors avilable select to edit passwd file, vi passwd
6. Look in the file for the line root:x:0:0:root:/root:/bin/bash and replace it with root::0:0:root:/root:/bin/bash, replace "x" with empty
7. Reboot in normal mode
8. When asking to enter the username, enter root username it will login without password, now useing command passwd enter the new password
9.
miercuri, octombrie 22, 2008
vineri, octombrie 17, 2008
vineri, octombrie 03, 2008
O metoda de a migra datele din Mysql Latin1 in Mysql utf8
--
-- Structura de tabel pentru tabelul `latin1`
--
CREATE TABLE IF NOT EXISTS `latin1` (
`id` int(10) unsigned NOT NULL auto_increment,
`n` varchar(45) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5 ;
-- ------------------------------
--
-- Structura de tabel pentru tabelul `utf8`
--
CREATE TABLE IF NOT EXISTS `utf8` (
`id` int(10) unsigned NOT NULL auto_increment,
`n` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=48 ;
header('Content-type: text/html; charset="utf-8"');
$link=mysql_connect (server, user, pass);
mysql_select_db (database);
$charset1 = mysql_client_encoding($link);
mysql_query("SET CHARACTER SET utf8", $link);
mysql_query("SET NAMES 'utf8'", $link);
$charset2 = mysql_client_encoding($link);
//test posting
$n=$_POST["name"];
$s="insert into latin1(n) values('".$n."')";
mysql_query("SET NAMES 'latin1'");
mysql_query($s);
$s="insert into utf8(n) values('".$n."')";
mysql_query("SET NAMES 'utf8'");
mysql_query($s);
}
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
echo "<head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n";
echo "</head>\n";
echo "<body>\n";
echo "<form method=\"post\" name=\"form\" action=\"utf8.php\">\n";
echo "<input type=text name=name>";
echo "<input type=submit>";
echo "</form>";
echo "<table border=1>";
echo "Setul de caractere pina la SET CHARSET este: $charset1<br>";
echo "Setul de caractere dupa SET CHARSET este: $charset2<br>";
echo "<table border=1>\n";
$s="select * from latin1";
mysql_query("SET NAMES 'latin1'");
$r=mysql_query($s);
while ($row=mysql_fetch_assoc($r)){
echo "<tr><td>".$row["n"]."</td></tr>";
$s="insert into utf8(n) values('".$row["n"]."')";
mysql_query("SET NAMES 'utf8'");
mysql_query($s);
}
echo "</table>";
echo "</body>\n";
echo "</html>\n";
?>
miercuri, octombrie 01, 2008
Invitatia la Nunta
joi, septembrie 25, 2008
Problema Diacriticilor sau cum sa Internationalizam site-urile in php
header('Content-type: text/html; charset="utf-8"');
$link=mysql_connect (server, user, pass);
mysql_select_db(dbtest);
$charset = mysql_client_encoding($link);
mysql_query("SET CHARACTER SET 'utf8'", $link);
echo "<html>\n";
echo "<head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n";
echo "</head>\n";
echo "<body>\n";
echo "Setul de caractere curent este: $charset\n";
$sql = "select * from tbtest";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
echo $row["text"]."<br>\n";
}
echo "</body>\n";
echo "</html>\n";
miercuri, septembrie 24, 2008
luni, septembrie 22, 2008
SELECT SUM(of varchar type) FROM ...
CREATE FUNCTION getName (@latlng varchar(510) )
RETURNS varchar(4000)
AS
BEGIN
declare @t as varchar(2000)
--SET @latlng='48.2016667|27.4158333'
SET @t = ''
select top 4 @t = @t + ' ' + full_name_nd from geocode_md_unicode1 where fc='P' and lat+'|'+long=@latlng
return @t
END
select latlng,dbo.getName(latlng) as nume1 from (
select lat+'|'+long as latlng from geocode_md_unicode as t1 where fc='P'
group by lat+'|'+long) as t2
vineri, septembrie 05, 2008
miercuri, iulie 09, 2008
Intr-o Cafenea din Statia de autobuse Zatoca - Ucraina :)
luni, octombrie 16, 2006
Banc :)
Vrei cea mai tare masina de pe piata?
Vrei vila la mare?
Vrei sa iti petreci vacantele pe Coasta de Azur?
... Magazinul nostru iti ofera o gama variata de cuie in care sa iti pui pofta.
miercuri, octombrie 11, 2006
joi, octombrie 05, 2006
Cigars and sex 'boost Cuba lives'

Cuba's high number of centenarians say their longevity is down to laying off alcohol, but indulging in coffee, cigars and sex.
The findings are the result of a study that looked into the lives of 54 out of the more than 100 centenarians who live in Villa Clara province.
More than 60% of them had parents who also lived to be over 100.
The results of the study were reported to the National Geriatrics and Social Work workshop in
In the study, the lives of the centenarians were found to be disciplined, but not austere.
None was alcoholic, and they said they loved coffee and cigars, which they consumed in large quantity.
They had a healthy interest in a number of areas, including sex, said Dr Nancy Nepomuceno, who carried out the study.
Most of the centenarians were mentally alert, had a good lifestyle and did manual labour in rural areas.
Almost all ate a diet which included fish, eggs, milk, white meat and vegetables, cooked with little salt and natural seasonings.
The life expectancy in
luni, octombrie 02, 2006
vineri, septembrie 29, 2006
USM - O mare forjerie de cadre
interviu cu Gheorghe Rusnac








