{"id":427411,"date":"2024-07-25T21:57:54","date_gmt":"2024-07-25T21:57:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=427411"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=427411","title":{"rendered":"<span>\u0421\u0442\u0430\u0440\u0442\u0435\u0440 \u043f\u0430\u043a \u0432 C: 3 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bed\/d5c\/d23\/bedd5cd23424951a182aa83807d5887f.png\" width=\"780\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bed\/d5c\/d23\/bedd5cd23424951a182aa83807d5887f.png\"\/><\/figure>\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/em><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 C, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041e\u043d\u0438 \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u0436\u0438\u0437\u043d\u044c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447, \u0430 \u043d\u0435 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u0440\u0435\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 C, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043d\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<h2>GNU Scientific Library (GSL)<\/h2>\n<p>GNU Scientific Library \u2014 \u044d\u0442\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430<\/strong><\/p>\n<p>GSL \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446 (LU, QR, Cholesky) \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_matrix.h&gt; #include &lt;gsl\/gsl_linalg.h&gt;  int main() {     gsl_matrix *m = gsl_matrix_alloc(3, 3);     gsl_vector *b = gsl_vector_alloc(3);     gsl_vector *x = gsl_vector_alloc(3);      \/\/ \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430     gsl_matrix_set(m, 0, 0, 1.0);     gsl_matrix_set(m, 0, 1, 2.0);     gsl_matrix_set(m, 0, 2, 3.0);     gsl_vector_set(b, 0, 1.0);      gsl_linalg_HH_solve(m, b, x);      gsl_matrix_free(m);     gsl_vector_free(b);     gsl_vector_free(x);      return 0; }<\/code><\/pre>\n<p><strong>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043c\u0435\u0442\u043e\u0434\u044b \u0413\u0430\u0443\u0441\u0441\u0430-\u041a\u0440\u043e\u043d\u0440\u043e\u0434\u0430 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043d\u0430 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_integration.h&gt;  double f(double x, void *params) {     return x*x; }  int main() {     gsl_integration_workspace *w = gsl_integration_workspace_alloc(1000);     double result, error;     gsl_function F;     F.function = &amp;f;     gsl_integration_qags(&amp;F, 0, 1, 0, 1e-7, 1000, w, &amp;result, &amp;error);     gsl_integration_workspace_free(w);     return 0; }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0445\u043e\u0440\u043e\u0448\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0441\u0438\u043d\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_rng.h&gt; #include &lt;gsl\/gsl_randist.h&gt;  int main() {     gsl_rng *r = gsl_rng_alloc(gsl_rng_default);     double x = gsl_ran_gaussian(r, 1.0);     gsl_rng_free(r);     return 0; }<\/code><\/pre>\n<p><strong>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0411\u0435\u0441\u0441\u0435\u043b\u044f, \u0433\u0430\u043c\u043c\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u044b \u041b\u0435\u0436\u0430\u043d\u0434\u0440\u0430 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_sf_bessel.h&gt;  int main() {     double x = 5.0;     double y = gsl_sf_bessel_J0(x);     printf(\"J0(%g) = %.18e\\n\", x, y);     return 0; }<\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u0415\u0449\u0435 \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0446\u0435\u043d\u043a\u0438, \u0442\u0435\u0441\u0442\u044b \u0433\u0438\u043f\u043e\u0442\u0435\u0437, \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u044f\u0434\u0430\u043c\u0438.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_statistics.h&gt;  int main() {     double data[] = {17.0, 15.0, 23.0, 7.0, 9.0, 13.0};     double mean = gsl_stats_mean(data, 1, 6);     double variance = gsl_stats_variance(data, 1, 6);     printf(\"Mean: %g, Variance: %g\\n\", mean, variance);     return 0; }<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u043b\u0435\u043c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0440\u0435\u0448\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0411\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GSL \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435:<\/p>\n<pre><code class=\"cs\">#include &lt;stdio.h&gt; #include &lt;gsl\/gsl_integration.h&gt; #include &lt;gsl\/gsl_matrix.h&gt; #include &lt;gsl\/gsl_linalg.h&gt; #include &lt;gsl\/gsl_statistics.h&gt;  double my_function(double x, void *params) {     return x*x; }  int main() {     \/\/ \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435     gsl_integration_workspace *workspace = gsl_integration_workspace_alloc(1000);     gsl_function F;     F.function = &amp;my_function;     double result, error;     gsl_integration_qags(&amp;F, 0, 1, 0, 1e-7, 1000, workspace, &amp;result, &amp;error);     printf(\"Integral result: %g, error: %g\\n\", result, error);     gsl_integration_workspace_free(workspace);      \/\/ \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439     gsl_matrix *m = gsl_matrix_alloc(2, 2);     gsl_vector *b = gsl_vector_alloc(2);     gsl_vector *x = gsl_vector_alloc(2);      gsl_matrix_set(m, 0, 0, 2.0);     gsl_matrix_set(m, 0, 1, 1.0);     gsl_matrix_set(m, 1, 0, 1.0);     gsl_matrix_set(m, 1, 1, 3.0);     gsl_vector_set(b, 0, 1.0);     gsl_vector_set(b, 1, 2.0);      gsl_linalg_HH_solve(m, b, x);      printf(\"Solution: x0 = %g, x1 = %g\\n\", gsl_vector_get(x, 0), gsl_vector_get(x, 1));      gsl_matrix_free(m);     gsl_vector_free(b);     gsl_vector_free(x);      \/\/ \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437     double data[] = {17.0, 15.0, 23.0, 7.0, 9.0, 13.0};     double mean = gsl_stats_mean(data, 1, 6);     double variance = gsl_stats_variance(data, 1, 6);     printf(\"Mean: %g, Variance: %g\\n\", mean, variance);      return 0; }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, GSL\u00a0\u2014 \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.gnu.org\/software\/gsl\/doc\/html\/index.html\">\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>SQLite<\/h2>\n<p>SQLite \u2014 \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0430\u044f, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f, \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0438 \u0431\u0435\u0437\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0430\u044f SQL-\u0434\u0438\u0441\u043a-\u0434\u0432\u0438\u0436\u043e<\/p>\n<p><strong>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SQLite<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0422\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440<\/strong>: \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043b\u044f \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u042d\u0442\u0430 \u0441\u0442\u0430\u0434\u0438\u044f \u0432\u0430\u0436\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 SQL-\u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0430\u0440\u0441\u0435\u0440<\/strong>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Lemon \u043f\u0430\u0440\u0441\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430<\/strong>: \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u042d\u0442\u043e\u0442 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u0437\u0430\u0442\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f VM SQLite.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430<\/strong>: \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 SQL-\u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>vdbe.c<\/code> \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 API, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>sqlite3_step()<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0411\u0414<\/strong>: SQLite \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 SQL-\u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p><strong>SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 SQL-\u043a\u043e\u043c\u0430\u043d\u0434, \u0432\u043a\u043b\u044e\u0447\u0430\u044f SELECT, INSERT, UPDATE, DELETE \u0438 JOIN.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong>: SQLite \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>abs()<\/code>, <code>length()<\/code>, <code>datetime()<\/code>, <code>coalesce()<\/code> \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0430\u0442\u0430 <code>ROLLBACK<\/code> \u0438 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 <code>COMMIT<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong>: \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 C, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0438\u0437 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/p>\n<pre><code class=\"cs\">#include &lt;stdio.h&gt; #include &lt;sqlite3.h&gt;  int main() {     sqlite3 *db;     char *err_msg = 0;      \/\/ \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435\/\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414     int rc = sqlite3_open(\"test.db\", &amp;db);     if (rc != SQLITE_OK) {         fprintf(stderr, \"Cannot open database: %s\\n\", sqlite3_errmsg(db));         return rc;     }      \/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b     char *sql = \"CREATE TABLE IF NOT EXISTS Friends(Id INT, Name TEXT);\"                 \"INSERT INTO Friends VALUES(1, 'Tom');\"                 \"INSERT INTO Friends VALUES(2, 'Rebecca');\"                 \"INSERT INTO Friends VALUES(3, 'Jim');\";      rc = sqlite3_exec(db, sql, 0, 0, &amp;err_msg);     if (rc != SQLITE_OK) {         fprintf(stderr, \"SQL error: %s\\n\", err_msg);         sqlite3_free(err_msg);         sqlite3_close(db);         return rc;     }      \/\/ \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445     sql = \"SELECT * FROM Friends\";     sqlite3_stmt *stmt;     rc = sqlite3_prepare_v2(db, sql, -1, &amp;stmt, 0);     if (rc != SQLITE_OK) {         fprintf(stderr, \"Failed to fetch data: %s\\n\", sqlite3_errmsg(db));         sqlite3_close(db);         return rc;     }      while (sqlite3_step(stmt) == SQLITE_ROW) {         printf(\"%s: %s\\n\", sqlite3_column_text(stmt, 0), sqlite3_column_text(stmt, 1));     }      \/\/ \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445     sqlite3_finalize(stmt);     sqlite3_close(db);      return 0; }<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.sqlite.org\/cintro.html\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>SDL<\/h2>\n<p>Simple DirectMedia Layer \u2014 \u043c\u043e\u0449\u043d\u0430\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0439\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0438\u0433\u0440. SDL \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0430\u0443\u0434\u0438\u043e, \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435, \u043c\u044b\u0448\u0438, \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0443 \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 SDL<\/strong><\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 SDL \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>SDL_Init<\/code>. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u043b\u0430\u0433\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0432\u0438\u0434\u0435\u043e, \u0430\u0443\u0434\u0438\u043e, \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0438 \u0438 \u0442.\u0434. <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_Quit<\/code>:<\/p>\n<pre><code class=\"cs\">if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0) {     printf(\"SDL_Init Error: %s\\n\", SDL_GetError());     return 1; } \/\/ \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b SDL_Quit();<\/code><\/pre>\n<p>SDL \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>SDL_CreateWindow<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u043a\u043d\u0430, \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432.  \u0414\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_CreateRenderer<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430:<\/p>\n<pre><code class=\"cs\">SDL_Window *win = SDL_CreateWindow(\"Hello SDL\", 100, 100, 640, 480, SDL_WINDOW_SHOWN); if (win == NULL) {     printf(\"SDL_CreateWindow Error: %s\\n\", SDL_GetError());     SDL_Quit();     return 1; }  SDL_Renderer *ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); if (ren == NULL) {     SDL_DestroyWindow(win);     printf(\"SDL_CreateRenderer Error: %s\\n\", SDL_GetError());     SDL_Quit();     return 1; }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_PollEvent<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438:<\/p>\n<pre><code class=\"cs\">SDL_Event e; while (SDL_PollEvent(&amp;e)) {     if (e.type == SDL_QUIT) {         break;     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 SDL \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u0438 \u0438\u0445 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_CreateTextureFromSurface<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0438\u0437 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430 <code>SDL_RenderCopy<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0451 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cs\">SDL_Surface *bmp = SDL_LoadBMP(\"image.bmp\"); if (bmp == NULL) {     printf(\"SDL_LoadBMP Error: %s\\n\", SDL_GetError());     SDL_DestroyRenderer(ren);     SDL_DestroyWindow(win);     SDL_Quit();     return 1; }  SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, bmp); SDL_FreeSurface(bmp); if (tex == NULL) {     printf(\"SDL_CreateTextureFromSurface Error: %s\\n\", SDL_GetError());     SDL_DestroyRenderer(ren);     SDL_DestroyWindow(win);     SDL_Quit();     return 1; }  SDL_RenderClear(ren); SDL_RenderCopy(ren, tex, NULL, NULL); SDL_RenderPresent(ren);<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u043a\u043d\u0430, \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<pre><code class=\"cs\">#include &lt;SDL.h&gt; #include &lt;stdio.h&gt;  int main(int argc, char **argv) {     if (SDL_Init(SDL_INIT_VIDEO) != 0) {         printf(\"SDL_Init Error: %s\\n\", SDL_GetError());         return 1;     }      SDL_Window *win = SDL_CreateWindow(\"Hello SDL\", 100, 100, 640, 480, SDL_WINDOW_SHOWN);     if (win == NULL) {         printf(\"SDL_CreateWindow Error: %s\\n\", SDL_GetError());         SDL_Quit();         return 1;     }      SDL_Renderer *ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);     if (ren == NULL) {         SDL_DestroyWindow(win);         printf(\"SDL_CreateRenderer Error: %s\\n\", SDL_GetError());         SDL_Quit();         return 1;     }      SDL_Surface *bmp = SDL_LoadBMP(\"image.bmp\");     if (bmp == NULL) {         printf(\"SDL_LoadBMP Error: %s\\n\", SDL_GetError());         SDL_DestroyRenderer(ren);         SDL_DestroyWindow(win);         SDL_Quit();         return 1;     }      SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, bmp);     SDL_FreeSurface(bmp);     if (tex == NULL) {         printf(\"SDL_CreateTextureFromSurface Error: %s\\n\", SDL_GetError());         SDL_DestroyRenderer(ren);         SDL_DestroyWindow(win);         SDL_Quit();         return 1;     }      SDL_RenderClear(ren);     SDL_RenderCopy(ren, tex, NULL, NULL);     SDL_RenderPresent(ren);      SDL_Event e;     while (1) {         if (SDL_PollEvent(&amp;e) &amp;&amp; e.type == SDL_QUIT) {             break;         }     }      SDL_DestroyTexture(tex);     SDL_DestroyRenderer(ren);     SDL_DestroyWindow(win);     SDL_Quit();     return 0; }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u043a\u043d\u043e, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0435\u0433\u043e \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u043e\u043a\u043d\u0430. <\/p>\n<blockquote>\n<p><a href=\"https:\/\/www.libsdl.org\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/a><\/p>\n<\/blockquote>\n<hr\/>\n<p>\u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0432\u0435\u0431\u0438\u043d\u0430\u0440 \u043f\u0440\u043e \u043e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0432 \u044f\u0437\u044b\u043a\u0435 C. \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/otus.pw\/fDJl\/\">\u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/827918\/\"> https:\/\/habr.com\/ru\/articles\/827918\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/em><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 C, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041e\u043d\u0438 \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u0436\u0438\u0437\u043d\u044c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447, \u0430 \u043d\u0435 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u0440\u0435\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 C, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043d\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<h2>GNU Scientific Library (GSL)<\/h2>\n<p>GNU Scientific Library \u2014 \u044d\u0442\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430<\/strong><\/p>\n<p>GSL \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446 (LU, QR, Cholesky) \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_matrix.h&gt; #include &lt;gsl\/gsl_linalg.h&gt;  int main() {     gsl_matrix *m = gsl_matrix_alloc(3, 3);     gsl_vector *b = gsl_vector_alloc(3);     gsl_vector *x = gsl_vector_alloc(3);      \/\/ \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430     gsl_matrix_set(m, 0, 0, 1.0);     gsl_matrix_set(m, 0, 1, 2.0);     gsl_matrix_set(m, 0, 2, 3.0);     gsl_vector_set(b, 0, 1.0);      gsl_linalg_HH_solve(m, b, x);      gsl_matrix_free(m);     gsl_vector_free(b);     gsl_vector_free(x);      return 0; }<\/code><\/pre>\n<p><strong>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043c\u0435\u0442\u043e\u0434\u044b \u0413\u0430\u0443\u0441\u0441\u0430-\u041a\u0440\u043e\u043d\u0440\u043e\u0434\u0430 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043d\u0430 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_integration.h&gt;  double f(double x, void *params) {     return x*x; }  int main() {     gsl_integration_workspace *w = gsl_integration_workspace_alloc(1000);     double result, error;     gsl_function F;     F.function = &amp;f;     gsl_integration_qags(&amp;F, 0, 1, 0, 1e-7, 1000, w, &amp;result, &amp;error);     gsl_integration_workspace_free(w);     return 0; }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0445\u043e\u0440\u043e\u0448\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0441\u0438\u043d\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_rng.h&gt; #include &lt;gsl\/gsl_randist.h&gt;  int main() {     gsl_rng *r = gsl_rng_alloc(gsl_rng_default);     double x = gsl_ran_gaussian(r, 1.0);     gsl_rng_free(r);     return 0; }<\/code><\/pre>\n<p><strong>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0411\u0435\u0441\u0441\u0435\u043b\u044f, \u0433\u0430\u043c\u043c\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u044b \u041b\u0435\u0436\u0430\u043d\u0434\u0440\u0430 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_sf_bessel.h&gt;  int main() {     double x = 5.0;     double y = gsl_sf_bessel_J0(x);     printf(\"J0(%g) = %.18e\\n\", x, y);     return 0; }<\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u0415\u0449\u0435 \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0446\u0435\u043d\u043a\u0438, \u0442\u0435\u0441\u0442\u044b \u0433\u0438\u043f\u043e\u0442\u0435\u0437, \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u044f\u0434\u0430\u043c\u0438.<\/p>\n<pre><code class=\"cs\">#include &lt;gsl\/gsl_statistics.h&gt;  int main() {     double data[] = {17.0, 15.0, 23.0, 7.0, 9.0, 13.0};     double mean = gsl_stats_mean(data, 1, 6);     double variance = gsl_stats_variance(data, 1, 6);     printf(\"Mean: %g, Variance: %g\\n\", mean, variance);     return 0; }<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u043b\u0435\u043c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0440\u0435\u0448\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0411\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GSL \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435:<\/p>\n<pre><code class=\"cs\">#include &lt;stdio.h&gt; #include &lt;gsl\/gsl_integration.h&gt; #include &lt;gsl\/gsl_matrix.h&gt; #include &lt;gsl\/gsl_linalg.h&gt; #include &lt;gsl\/gsl_statistics.h&gt;  double my_function(double x, void *params) {     return x*x; }  int main() {     \/\/ \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435     gsl_integration_workspace *workspace = gsl_integration_workspace_alloc(1000);     gsl_function F;     F.function = &amp;my_function;     double result, error;     gsl_integration_qags(&amp;F, 0, 1, 0, 1e-7, 1000, workspace, &amp;result, &amp;error);     printf(\"Integral result: %g, error: %g\\n\", result, error);     gsl_integration_workspace_free(workspace);      \/\/ \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439     gsl_matrix *m = gsl_matrix_alloc(2, 2);     gsl_vector *b = gsl_vector_alloc(2);     gsl_vector *x = gsl_vector_alloc(2);      gsl_matrix_set(m, 0, 0, 2.0);     gsl_matrix_set(m, 0, 1, 1.0);     gsl_matrix_set(m, 1, 0, 1.0);     gsl_matrix_set(m, 1, 1, 3.0);     gsl_vector_set(b, 0, 1.0);     gsl_vector_set(b, 1, 2.0);      gsl_linalg_HH_solve(m, b, x);      printf(\"Solution: x0 = %g, x1 = %g\\n\", gsl_vector_get(x, 0), gsl_vector_get(x, 1));      gsl_matrix_free(m);     gsl_vector_free(b);     gsl_vector_free(x);      \/\/ \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437     double data[] = {17.0, 15.0, 23.0, 7.0, 9.0, 13.0};     double mean = gsl_stats_mean(data, 1, 6);     double variance = gsl_stats_variance(data, 1, 6);     printf(\"Mean: %g, Variance: %g\\n\", mean, variance);      return 0; }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, GSL\u00a0\u2014 \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.gnu.org\/software\/gsl\/doc\/html\/index.html\">\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>SQLite<\/h2>\n<p>SQLite \u2014 \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0430\u044f, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f, \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0438 \u0431\u0435\u0437\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0430\u044f SQL-\u0434\u0438\u0441\u043a-\u0434\u0432\u0438\u0436\u043e<\/p>\n<p><strong>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SQLite<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0422\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440<\/strong>: \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043b\u044f \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u042d\u0442\u0430 \u0441\u0442\u0430\u0434\u0438\u044f \u0432\u0430\u0436\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 SQL-\u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0430\u0440\u0441\u0435\u0440<\/strong>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Lemon \u043f\u0430\u0440\u0441\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430<\/strong>: \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u042d\u0442\u043e\u0442 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u0437\u0430\u0442\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f VM SQLite.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430<\/strong>: \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 SQL-\u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>vdbe.c<\/code> \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 API, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>sqlite3_step()<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0411\u0414<\/strong>: SQLite \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 SQL-\u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p><strong>SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 SQL-\u043a\u043e\u043c\u0430\u043d\u0434, \u0432\u043a\u043b\u044e\u0447\u0430\u044f SELECT, INSERT, UPDATE, DELETE \u0438 JOIN.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong>: SQLite \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>abs()<\/code>, <code>length()<\/code>, <code>datetime()<\/code>, <code>coalesce()<\/code> \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0430\u0442\u0430 <code>ROLLBACK<\/code> \u0438 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 <code>COMMIT<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong>: \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 C, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0438\u0437 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/p>\n<pre><code class=\"cs\">#include &lt;stdio.h&gt; #include &lt;sqlite3.h&gt;  int main() {     sqlite3 *db;     char *err_msg = 0;      \/\/ \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435\/\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414     int rc = sqlite3_open(\"test.db\", &amp;db);     if (rc != SQLITE_OK) {         fprintf(stderr, \"Cannot open database: %s\\n\", sqlite3_errmsg(db));         return rc;     }      \/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b     char *sql = \"CREATE TABLE IF NOT EXISTS Friends(Id INT, Name TEXT);\"                 \"INSERT INTO Friends VALUES(1, 'Tom');\"                 \"INSERT INTO Friends VALUES(2, 'Rebecca');\"                 \"INSERT INTO Friends VALUES(3, 'Jim');\";      rc = sqlite3_exec(db, sql, 0, 0, &amp;err_msg);     if (rc != SQLITE_OK) {         fprintf(stderr, \"SQL error: %s\\n\", err_msg);         sqlite3_free(err_msg);         sqlite3_close(db);         return rc;     }      \/\/ \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445     sql = \"SELECT * FROM Friends\";     sqlite3_stmt *stmt;     rc = sqlite3_prepare_v2(db, sql, -1, &amp;stmt, 0);     if (rc != SQLITE_OK) {         fprintf(stderr, \"Failed to fetch data: %s\\n\", sqlite3_errmsg(db));         sqlite3_close(db);         return rc;     }      while (sqlite3_step(stmt) == SQLITE_ROW) {         printf(\"%s: %s\\n\", sqlite3_column_text(stmt, 0), sqlite3_column_text(stmt, 1));     }      \/\/ \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445     sqlite3_finalize(stmt);     sqlite3_close(db);      return 0; }<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.sqlite.org\/cintro.html\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>SDL<\/h2>\n<p>Simple DirectMedia Layer \u2014 \u043c\u043e\u0449\u043d\u0430\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0439\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0438\u0433\u0440. SDL \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0430\u0443\u0434\u0438\u043e, \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435, \u043c\u044b\u0448\u0438, \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0443 \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 SDL<\/strong><\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 SDL \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>SDL_Init<\/code>. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u043b\u0430\u0433\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0432\u0438\u0434\u0435\u043e, \u0430\u0443\u0434\u0438\u043e, \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0438 \u0438 \u0442.\u0434. <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_Quit<\/code>:<\/p>\n<pre><code class=\"cs\">if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0) {     printf(\"SDL_Init Error: %s\\n\", SDL_GetError());     return 1; } \/\/ \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b SDL_Quit();<\/code><\/pre>\n<p>SDL \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>SDL_CreateWindow<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u043a\u043d\u0430, \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432.  \u0414\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_CreateRenderer<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430:<\/p>\n<pre><code class=\"cs\">SDL_Window *win = SDL_CreateWindow(\"Hello SDL\", 100, 100, 640, 480, SDL_WINDOW_SHOWN); if (win == NULL) {     printf(\"SDL_CreateWindow Error: %s\\n\", SDL_GetError());     SDL_Quit();     return 1; }  SDL_Renderer *ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); if (ren == NULL) {     SDL_DestroyWindow(win);     printf(\"SDL_CreateRenderer Error: %s\\n\", SDL_GetError());     SDL_Quit();     return 1; }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_PollEvent<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438:<\/p>\n<pre><code class=\"cs\">SDL_Event e; while (SDL_PollEvent(&amp;e)) {     if (e.type == SDL_QUIT) {         break;     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 SDL \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u0438 \u0438\u0445 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>SDL_CreateTextureFromSurface<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0438\u0437 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430 <code>SDL_RenderCopy<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0451 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cs\">SDL_Surface *bmp = SDL_LoadBMP(\"image.bmp\"); if (bmp == NULL) {     printf(\"SDL_LoadBMP Error: %s\\n\", SDL_GetError());     SDL_DestroyRenderer(ren);     SDL_DestroyWindow(win);     SDL_Quit();     return 1; }  SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, bmp); SDL_FreeSurface(bmp); if (tex == NULL) {     printf(\"SDL_CreateTextureFromSurface Error: %s\\n\", SDL_GetError());     SDL_DestroyRenderer(ren);     SDL_DestroyWindow(win);     SDL_Quit();     return 1; }  SDL_RenderClear(ren); SDL_RenderCopy(ren, tex, NULL, NULL); SDL_RenderPresent(ren);<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u043a\u043d\u0430, \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<pre><code class=\"cs\">#include &lt;SDL.h&gt; #include &lt;stdio.h&gt;  int main(int argc, char **argv) {     if (SDL_Init(SDL_INIT_VIDEO) != 0) {         printf(\"SDL_Init <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-427411","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=427411"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427411\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}