Před 60 lety, 1. května 1964, byl představen programovací jazyk BASIC (Beginners' All-purpose Symbolic Instruction Code).
Byla vydána nová verze 12.0 minimalistické linuxové distribuce (JeOS, Just enough Operating System) pro Kodi (dříve XBMC) a multimediálního centra LibreELEC (Libre Embedded Linux Entertainment Center). Jedná se o fork linuxové distribuce OpenELEC (Open Embedded Linux Entertainment Center). LibreELEC 12.0 přichází s Kodi 21.0 "Omega".
Microsoft vydal novou velkou aktualizaci 2404.23 v září 2019 pod licencí SIL Open Font License (OFL) zveřejněné rodiny písma Cascadia Code pro zobrazování textu v emulátorech terminálu a vývojových prostředích.
OpenTofu, tj. svobodný a otevřený fork Terraformu vzniknuvší jako reakce na přelicencování Terraformu z MPL na BSL (Business Source License) společností HashiCorp, bylo vydáno ve verzi 1.7.0. Přehled novinek v aktualizované dokumentaci. Vypíchnout lze State encryption.
Spouštět webový prohlížeč jenom kvůli nákupu kávy? Nestačí ssh? Stačí: ssh terminal.shop (𝕏).
Yocto Project byl vydán ve verzi 5.0. Její kódové jméno je Scarthgap. Yocto Project usnadňuje vývoj vestavěných (embedded) linuxových systémů na míru konkrétním zařízením. Cílem projektu je nabídnou vývojářům vše potřebné. Jedná se o projekt Linux Foundation.
Operační systém 9front, fork operačního systému Plan 9, byl vydán v nové verzi "do not install" (pdf). Více o 9front v FQA.
Svobodná webová platforma pro sdílení a přehrávání videí PeerTube (Wikipedie) byla vydána v nové verzi 6.1. Přehled novinek i s náhledy v oficiálním oznámení a na GitHubu. Řešeny jsou také 2 bezpečnostní chyby.
Lennart Poettering na Mastodonu představil utilitu run0. Jedná se o alternativu k příkazu sudo založenou na systemd. Bude součástí systemd verze 256.
Hudební přehrávač Amarok byl vydán v nové major verzi 3.0 postavené na Qt5/KDE Frameworks 5. Předchozí verze 2.9.0 vyšla před 6 lety a byla postavená na Qt4. Portace Amaroku na Qt6/KDE Frameworks 6 by měla začít v následujících měsících.
Diskuse byla administrátory uzamčena.
FAQ: Proč byl uzamčen/smazán můj dotaz v Poradně?
Compiling...Kód:
main.cpp
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(183) : error C2146: syntax error : missing ';' before identifier 'fd'
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(358) : error C2065: 'SOCKET' : undeclared identifier
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(358) : error C2146: syntax error : missing ')' before identifier 's'
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(359) : error C2059: syntax error : ')'
c:\documents and settings\martin\dokumenty\visual studio 2008\projects\vyuka\procvicovani\main.cpp(15) : error C2146: syntax error : missing ';' before identifier 'res'
c:\documents and settings\martin\dokumenty\visual studio 2008\projects\vyuka\procvicovani\main.cpp(18) : warning C4018: '<' : signed/unsigned mismatch
#include <stdio.h>
#include <mysql/mysql.h>
#include <string.h>
int main()
{
int i = 1;
MYSQL mysql;
MYSQL_RES *res;
MYSQL_ROW row;
char *query="SELECT * FROM user";
mysql_init(&mysql);
mysql_real_connect(&mysql,"localhost","root","6g8j2","test",0,NULL,0);
mysql_real_query(&mysql,query,(unsigned int) strlen(query))
res=mysql_store_result(&mysql);
printf("Pocet sloupcu %d, pocet radku: %d \n",mysql_num_fields(res),mysql_num_rows(res));
while(row=mysql_fetch_row(res)) {
for(i=0;i<mysql_num_fields(res);i++) printf(row[i]);
putchar('\n');
}
mysql_free_result(res);
mysql_close(&mysql);
mysql_close(&mysql);
return 0;
}
Mohl byste mi prosím poradit kde dělám chybu ? Děkuju.
#include <stdio.h&rt; #include <mysql/mysql.h&rt; #include <string.h&rt; int main() { int i = 1; MYSQL mysql; MYSQL_RES *res; MYSQL_ROW row; char *query="SELECT * FROM user"; mysql_init(&mysql); mysql_real_connect(&mysql, "localhost", "root", "6g8j2", "test", 0, NULL, 0); mysql_real_query(&mysql,query,(unsigned int) strlen(query)); //tu chybal strednik res=mysql_store_result(&mysql); printf("Pocet sloupcu %d, pocet radku: %d \n", mysql_num_fields(res), mysql_num_rows(res)); while (row=mysql_fetch_row(res)) { for (i=0; i<mysql_num_fields(res); i++) printf(row[i]); putchar('\n'); } mysql_free_result(res); mysql_close(&mysql); mysql_close(&mysql); return 0; }Tento kod mi ide skompilovat a zlinkovat. Ci aj funguje, to uz neviem.
g++ -o nazev_programu nazev_programu.cpp -lmysqlclientJo a taky by se hodilo uvest jakou mas verzi knihovny libmysqlclient a distro pokud si ho neuvedl uz predtim.
#include <winsock2.h>
C:\Program Files\MySQL\MySQL Server 5.0\include\mysql_com.h(183) : error C2146: syntax error : missing ';' before identifier 'fd'A používám tento kód:
C:\Program Files\MySQL\MySQL Server 5.0\include\mysql_com.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\MySQL\MySQL Server 5.0\include\mysql_com.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\MySQL\MySQL Server 5.0\include\mysql_com.h(358) : error C2065: 'SOCKET' : undeclared identifier
C:\Program Files\MySQL\MySQL Server 5.0\include\mysql_com.h(358) : error C2146: syntax error : missing ')' before identifier 's'
C:\Program Files\MySQL\MySQL Server 5.0\include\mysql_com.h(359) : error C2059: syntax error : ')'
.\main.cpp(19) : warning C4018: '<' : signed/unsigned mismatch
#include <iostream>
#include <string>
#include <mysql/mysql.h>
#include <winsock2.h>
using namespace std;
int main()
{
int i = 1;
MYSQL mysql;
MYSQL_RES *res;
MYSQL_ROW row;
string query="SELECT * FROM user";
mysql_init(&mysql);
mysql_real_connect(&mysql,"localhost","root","6g8j2","test",0,NULL,0);
mysql_real_query(&mysql,query.c_str(), query.size());
res=mysql_store_result(&mysql);
cout << "Pocet sloupcu:" << mysql_num_fields(res) << " pocet radku:" << mysql_num_rows(res) << endl;
while(row=mysql_fetch_row(res)) {
for(i=0;i<mysql_num_fields(res);i++) cout << row[i];
cout << endl;
}
mysql_free_result(res);
mysql_close(&mysql);
return 0;
}
include <winsock2>musis hodit uplne na zacatek
main.obj : error LNK2019: unresolved external symbol _mysql_close@4 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_free_result@4 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_fetch_row@4 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_num_fields@4 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_num_rows@4 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_store_result@4 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_real_query@12 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_real_connect@32 referenced in function _main main.obj : error LNK2019: unresolved external symbol _mysql_init@4 referenced in function _main C:\Documents and Settings\Martin\Dokumenty\Visual Studio 2008\Projects\Vyuka\Debug\Procvicovani.exe : fatal error LNK1120: 9 unresolved externals
#include <iostream> #include <string> #include <mysql/mysql.h> using namespace std; int main() { int i = 1; MYSQL mysql; MYSQL_RES *res; MYSQL_ROW row; string query="SELECT * FROM user"; mysql_init(&mysql); mysql_real_connect(&mysql,"localhost","root","6g8j2","test",0,NULL,0); mysql_real_query(&mysql,query.c_str(), query.size()); res=mysql_store_result(&mysql); cout << "Pocet sloupcu:" << mysql_num_fields(res) << " pocet radku:" << mysql_num_rows(res) << endl; while(row=mysql_fetch_row(res)) { for(i=0;i<mysql_num_fields(res);i++) cout << row[i]; cout << endl; } mysql_free_result(res); mysql_close(&mysql); mysql_close(&mysql); return 0; }
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(183) : error C2146: syntax error : missing ';' before identifier 'fd'
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(358) : error C2065: 'SOCKET' : undeclared identifier
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(358) : error C2146: syntax error : missing ')' before identifier 's'
c:\program files\mysql\mysql server 5.0\include\mysql_com.h(359) : error C2059: syntax error : ')'
c:\documents and settings\martin\dokumenty\visual studio 2008\projects\vyuka\procvicovani\main.cpp(18) : warning C4018: '<' : signed/unsigned mismatch
syntax error : missing ';' before identifier 'res'Upravit zdrojak, riadok zacinajuci
mysql_real_query
treba ukoncit bodkociarkou (cesky strednik
Tiskni Sdílej: