Форум программистов, компьютерный форум, киберфорум
С++ для начинающих
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.83/18: Рейтинг темы: голосов - 18, средняя оценка - 4.83
В астрале
Эксперт С++
 Аватар для ForEveR
8049 / 4806 / 655
Регистрация: 24.06.2010
Сообщений: 10,562

Создание ZIP архива

30.11.2011, 14:49. Показов 3818. Ответов 7
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Есть несколько xml файлов. Надо их засунуть в 1 архив. Есть-ли подходящая либа на плюсах? Про zlib знаю, но не очень бы хотелось писать напрямую через нее.
0
Лучшие ответы (1)
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
30.11.2011, 14:49
Ответы с готовыми решениями:

Создание архива rar/zip на C++
Народ, такая ситуация, мне необходимо создать архив rar или zip (желательно rar, запароленный) при помощи консольной программы на C++. ...

Распаковка zip-архива средствами С++
Помогите считать из zip-архива файлы в кодировке Unicode (UTF-8). Долго копался в ресурсах на эту тему, но так и не нашел решения. Среди...

Создание своего архива и работа с ним
Здравствуйте форумчане! Вопрос таков: можно ли создать свой архив, наподобе какого-нибудь *.pak, чтобы работать с ним могла только моя...

7
Кошковед
 Аватар для co6ak
521 / 509 / 63
Регистрация: 12.04.2010
Сообщений: 1,390
30.11.2011, 14:56
а ZipForge не подходит?
0
В астрале
Эксперт С++
 Аватар для ForEveR
8049 / 4806 / 655
Регистрация: 24.06.2010
Сообщений: 10,562
30.11.2011, 15:02  [ТС]
co6ak, Это ж Builder компонент, нэ?
0
Автор FAQ
 Аватар для -=ЮрА=-
6614 / 4256 / 401
Регистрация: 08.08.2009
Сообщений: 10,325
Записей в блоге: 24
30.11.2011, 15:03
Цитата Сообщение от ForEveR Посмотреть сообщение
Есть несколько xml файлов. Надо их засунуть в 1 архив. Есть-ли подходящая либа на плюсах? Про zlib знаю, но не очень бы хотелось писать напрямую через нее.
- регайся там и качай проект ссылка
0
Эксперт С++
 Аватар для fasked
5045 / 2624 / 241
Регистрация: 07.10.2009
Сообщений: 4,310
Записей в блоге: 5
30.11.2011, 15:26
Цитата Сообщение от -=ЮрА=- Посмотреть сообщение
регайся там и качай проект ссылка
Винда же
0
В астрале
Эксперт С++
 Аватар для ForEveR
8049 / 4806 / 655
Регистрация: 24.06.2010
Сообщений: 10,562
30.11.2011, 15:27  [ТС]
Ммм. Подозреваю я выразился не совсем точно.

1) Программа генерирует xml-ки. Каждая функция возвращает корректную xml-строку.
2) Мне нужно зазиповать эти строки в разные файлы, но в один архив. На python-е это выглядело примерно так:
Python
1
self._zip_insert(self.savefile, "content.xml", self._ods_content())
Где self.savefile - zip-архив. content.xml - имя файла. self._ods_content - функция, возвращающая xml-ку в виде строки.
В итоге должен получится zip-архив такого вида.
content.xml styles.xml meta.xml settings.xml mimetype META_INF/manifest.xml Configurations/accelerator/current.xml

3) Мне нужно кроссплатформенное решение. Если такого нет - буду писать сам через zlib.
0
Автор FAQ
 Аватар для -=ЮрА=-
6614 / 4256 / 401
Регистрация: 08.08.2009
Сообщений: 10,325
Записей в блоге: 24
30.11.2011, 15:29

Не по теме:

Цитата Сообщение от fasked Посмотреть сообщение
Винда же
- ForEveR, не указал что кроссплатформенную разработку надо, как вариант "поковырять" ссылку дал8-)



Добавлено через 59 секунд
Цитата Сообщение от ForEveR Посмотреть сообщение
Мне нужно кроссплатформенное решение. Если такого нет - буду писать сам через zlib.
- теперь понятней суть задания
0
В астрале
Эксперт С++
 Аватар для ForEveR
8049 / 4806 / 655
Регистрация: 24.06.2010
Сообщений: 10,562
02.12.2011, 16:59  [ТС]
Лучший ответ Сообщение было отмечено ForEveR как решение

Решение

Не особо отрефакторенная, но рабочая версия либы. Создает зип архивы из нужным данных.

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef __ZIP_HPP__
#define __ZIP_HPP__
 
#include <boost/shared_ptr.hpp>
 
#include "zip_impl.hpp"
 
class Zip
{
public:
   Zip(const std::string& filename):impl(new ZipImpl(filename))
   {
   }
   void insert(const std::string& filename, const std::string& content)
   {
      impl->insert(filename, content);
   }
   void close()
   {
      impl->close();
   }
private:
   boost::shared_ptr<ZipImpl> impl;
};
 
#endif
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
#ifndef __ZIP_IMPL_HPP__
#define __ZIP_IMPL_HPP__
 
#include <fstream>
#include <sstream>
#include <string>
 
#include <zlib.h>
 
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
 
#include <boost/filesystem.hpp>
#include <arpa/inet.h>
 
bool is_littleendian()
{
   unsigned short x = 1;
   if (*((unsigned char*)(&x)) != 0)
   {
      return true;
   }
   return false;
}
 
bool need_convert_endian(char endian)
{
   return ((endian == '<' && !is_littleendian()) ||
   (endian == '>' || endian == '!') && is_littleendian);
}
 
template<class T>
std::string pack(char endian, const T& value);
 
template<class T>
std::string pack_internal(const T& value)
{
   std::stringstream ss;
   ss.write((char*)&value, sizeof(T));
   return ss.str();
}
 
template<>
std::string pack_internal(const std::string& value)
{
   std::stringstream ss;
   ss.write(value.data(), value.length());
   return ss.str();
}
 
template<>
std::string pack(char endian, const unsigned int& value)
{
   bool need_conv = need_convert_endian(endian);
   unsigned int val = value;
   if (need_conv)
   {
      val = htonl(value);
   }
   return pack_internal(val);
}
 
template<> 
std::string pack(char endian, const unsigned short& value)
{
   bool need_conv = need_convert_endian(endian);
   unsigned short val = value;
   if (need_conv)
   {
      val = htons(val);
   }
   return pack_internal(val);
}
 
template<>
std::string pack(char endian, const std::string& value)
{
   return pack_internal(value);
}
 
template<>
std::string pack(char endian, const unsigned char& value)
{
   return pack_internal(value);
}
 
template<> 
std::string pack(char endian, const unsigned long& value)
{
   return pack(endian, static_cast<const unsigned int&>(value));
}
 
template<class T>
std::string pack(const T& value)
{
   return pack('<', value);
}
 
const unsigned long ZIP64_LIMIT = (1U << 31) - 1;
const size_t ZIP_FILECOUNT_LIMIT = 1 << 16;
const size_t FLAG = 0x08;
 
struct ZipInfo
{
public:
   ZipInfo(const std::string& fn, const boost::posix_time::ptime& time = boost::posix_time::ptime()):
      filename(fn), reversed(0), flag_bits(0), create_version(20),
      extract_version(20), filesize(0), compress_size(0), CRC(0),
      internal_attr(0), external_attr(0), create_system(3)
   {
      boost::posix_time::ptime now = time;
      if (now.is_special())
      {
         now = boost::posix_time::second_clock::local_time();
      }
      const boost::gregorian::date& dt = now.date();
      date[0] = dt.year();
      date[1] = dt.month();
      date[2] = dt.day();
      const boost::posix_time::time_duration& tm = now.time_of_day();
      date[3] = tm.hours();
      date[4] = tm.minutes();
      date[5] = tm.seconds();
   }
   std::string file_header()
   {
      const std::string string_file_header("PK\3\4");
      const unsigned char feature_version = 45;
 
      unsigned short dosdate = ((date[0] - 1980) << 9) | (date[1] << 5) | date[2];
      unsigned short dostime = date[3] << 11 | date[4] << 5 | (date[5] / 2);
      unsigned int crc = 0, compress = 0, file_size = 0;
      if (!(flag_bits & FLAG))
      {
         crc = CRC;
         compress = compress_size;
         file_size = filesize;
      }
      std::string ext = extra;
      if (file_size > ZIP64_LIMIT || compress > ZIP64_LIMIT)
      {
         // File is larger than what fits into a 4 byte integer,
         // fall back to the ZIP64 extension.
         // TODO: extra = extra + pack(params).
         file_size = std::numeric_limits<unsigned int>::max();
         compress = std::numeric_limits<unsigned int>::max();
         extract_version = std::max(feature_version, extract_version);
         create_version = std::max(feature_version, create_version);
      }
      // TODO: Function that encode and set flags.
      std::string header;
      header += pack(string_file_header);
      header += pack(extract_version);
      header += pack(reversed);
      header += pack(flag_bits);
      header += pack(compress_type);
      header += pack(dostime);
      header += pack(dosdate);
      header += pack(crc);
      header += pack(compress);
      header += pack(file_size);
      header += pack((unsigned short)filename.length());
      header += pack((unsigned short)ext.length());
      // TODO: header = pack(params).
      return header + filename + ext;
   }
   const std::string get_filename() const
   {
      return filename;
   }
 
   std::string filename;
   std::string comment;
   std::string extra;
   unsigned char reversed;
   unsigned short flag_bits;
   long date[6];
   unsigned char create_version;
   unsigned char extract_version;
   unsigned long long filesize;
   unsigned long long compress_size;
   std::streampos header_offset;
   unsigned long CRC;
   unsigned short internal_attr;
   unsigned long external_attr;
   unsigned char create_system;
   static const unsigned short compress_type = Z_DEFLATED;
};
 
const unsigned short ZipInfo::compress_type;
 
namespace fs = boost::filesystem;
 
class ZlibError : public std::logic_error
{
public:
   ZlibError(const std::string& msg, int error):std::logic_error(msg), error_code(get_error(error))
   {
   }
   ~ZlibError() throw()
   {
   }
   const char* what() const throw()
   {
      return (std::string(std::logic_error::what()) + error_code).c_str();
   }
private:
   std::string get_error(const int err)
   {
      std::string result;
      switch (err)
      {
      case Z_MEM_ERROR:
         result = "No memory";
         break;
      case Z_STREAM_ERROR:
         result = "Inconsistent stream state";
         break;
      case Z_DATA_ERROR:
         result = "Invalid input data";
         break;
      case Z_BUF_ERROR:
         result = "Buffer error";
         break;
      default:
         break;
      }
      return result;
   }
   std::string error_code;
};
 
class ZipImpl
{
public:
   ZipImpl(const std::string& arch_name)
   {
      file_stream.open(arch_name.c_str());
   }
   ~ZipImpl()
   {
      close();
   }
   void insert(const std::string& f_name, const std::string& content)
   {
      // TODO: utf-8 encode content.
      ZipInfo zinfo(f_name);
      zinfo.filesize = content.length();
      zinfo.header_offset = file_stream.tellp();
      zinfo.CRC = crc(content) & std::numeric_limits<unsigned int>::max();
      std::string compressed = compress(content);
      zinfo.compress_size = compressed.length();
      file_stream << zinfo.file_header() << compressed;
      file_stream.flush();
      if (zinfo.flag_bits & FLAG)
      {
         // Write CRC and file sizes after the file data
         std::string temp;
         temp += pack((unsigned int)zinfo.CRC);
         temp += pack((unsigned int)zinfo.compress_size);
         temp += pack((unsigned int)zinfo.filesize);
         file_stream << temp;
         file_stream.flush();
         // TODO: file_stream << pack(params).
      }
      files_info.push_back(zinfo);
   }
   void close()
   {
      if (!file_stream.is_open())
      {
         return;
      }
      std::streampos pos1 = file_stream.tellp();
      for (std::vector<ZipInfo>::iterator iter = files_info.begin(); iter != files_info.end(); ++iter)
      {
         const ZipInfo& cur_info = *iter;
         const unsigned char feature_version = 45;
         const std::string cent_dir_header("PK\1\2");
 
         unsigned short dosdate = (cur_info.date[0] - 1980) << 9 | cur_info.date[1] << 5 | cur_info.date[2];
         unsigned short dostime = cur_info.date[3] << 11 | cur_info.date[4] << 5 | (cur_info.date[5] / 2);
         std::vector<unsigned long long> extra;
         unsigned long file_size = cur_info.filesize;
         unsigned long compress_size = cur_info.compress_size;
         if (file_size > ZIP64_LIMIT || compress_size > ZIP64_LIMIT)
         {
            extra.push_back(file_size);
            extra.push_back(compress_size);
            file_size = std::numeric_limits<unsigned int>::max();
            compress_size = std::numeric_limits<unsigned int>::max();
         }
         std::streampos header_offset = cur_info.header_offset;
         if (header_offset > ZIP64_LIMIT)
         {
            extra.push_back(header_offset);
            header_offset = std::numeric_limits<unsigned int>::max();
         }
         std::string extra_data = cur_info.extra;
         unsigned char extract_version = cur_info.extract_version;
         unsigned char create_version = cur_info.create_version;
         if (!extra.empty())
         {
            // Append a ZIP64 field to extra`s.
            // TODO: extra_data = pack(params) + extra_data.
            extract_version = std::max(feature_version, extract_version);
            create_version = std::max(feature_version, create_version);
         }
         // TODO: encode data and set flag_bits.
         std::string centDir;
         centDir += pack(cent_dir_header);
         centDir += pack(create_version);
         centDir += pack(cur_info.create_system);
         centDir += pack(extract_version);
         centDir += pack(cur_info.reversed);
         centDir += pack(cur_info.flag_bits);
         centDir += pack(cur_info.compress_type);
         centDir += pack(dostime);
         centDir += pack(dosdate);
         centDir += pack(static_cast<unsigned int>(cur_info.CRC));
         centDir += pack(compress_size);
         centDir += pack(file_size);
         centDir += pack(static_cast<unsigned short>(cur_info.filename.length()));
         centDir += pack(static_cast<unsigned short>(extra_data.length()));
         centDir += pack(static_cast<unsigned short>(0));
         centDir += pack(static_cast<unsigned short>(0));
         centDir += pack(cur_info.internal_attr);
         centDir += pack(cur_info.external_attr);
         centDir += pack(static_cast<unsigned int>(header_offset));
         // TODO: centdir = pack(params).
         file_stream << centDir << cur_info.filename << extra_data;
         file_stream.flush();
      }
      
      const std::string end_record_header("PK\5\6");
 
      std::streampos pos2 = file_stream.tellp();
      unsigned short centDirCount = files_info.size();
      unsigned long long centDirSize = pos2 - pos1;
      unsigned long long centDirOffset = pos1;
      if (centDirCount > ZIP_FILECOUNT_LIMIT || centDirOffset > ZIP64_LIMIT || centDirSize > ZIP64_LIMIT)
      {
         // Need to write ZIP64 end-of-archive records.
         std::string zip64_endrec;
         // TODO: zip_64_endrec = pack(params).
         file_stream << zip64_endrec;
         std::string zip64_locrec;
         // TODO: zip64_locrec = pack(params).
         file_stream << zip64_locrec;
         centDirCount = std::min(centDirCount, std::numeric_limits<unsigned short>::max());
         centDirSize = std::min(centDirSize, static_cast<unsigned long long>(std::numeric_limits<unsigned int>::max()));
         centDirOffset = std::min(centDirOffset, static_cast<unsigned long long>(std::numeric_limits<unsigned int>::max()));
      }
      // check for valid comment length. no comments now.
      std::string endrec;
      endrec += pack(end_record_header);
      endrec += pack(static_cast<unsigned short>(0));
      endrec += pack(static_cast<unsigned short>(0));
      endrec += pack(centDirCount);
      endrec += pack(centDirCount);
      endrec += pack(static_cast<unsigned int>(centDirSize));
      endrec += pack(static_cast<unsigned int>(centDirOffset));
      endrec += pack(static_cast<unsigned short>(0));
      // TODO: endrec = pack(params).
      file_stream << endrec;
      file_stream.flush();
      file_stream.close();
   }
private:
   unsigned long crc(const std::string& data) const
   {
      const size_t maxlen = 1024 * 5;
      Bytef* buffer = reinterpret_cast<Bytef*>(const_cast<char*>(data.data()));
      size_t len = data.length();
      unsigned long crc32_val = 0;
      unsigned long result = 0;
      if (len > maxlen)
      {
         const size_t uint_max = static_cast<size_t>(std::numeric_limits<unsigned int>::max());
         while (len > uint_max)
         {
            crc32_val = crc32(crc32_val, (Bytef*)buffer, uint_max);
            buffer += uint_max;
            len -= uint_max;
         }
         result = crc32(crc32_val, (Bytef*)buffer, len);
      }
      else
      {
         result = crc32(0, (Bytef*)buffer, len);
      }
      return result;
   }
   std::string compress(const std::string& data)
   {
      const std::string& comp_st = compress_begin(data);
      return comp_st + compress_end();
   }
   std::string compress_begin(const std::string& data)
   {
      const size_t start_buffer_size = 10000;
      const int default_memory_level = 8;
      const int unspecified_in_documentation_magic = -15;
 
      std::stringstream error_stream;
      std::vector<char> buffer(start_buffer_size);
      c_stream.zalloc = Z_NULL;
      c_stream.zfree = Z_NULL;
      c_stream.opaque = Z_NULL;
      c_stream.next_in = 0;
      c_stream.avail_in = 0;
 
      int err = deflateInit2(&c_stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
      unspecified_in_documentation_magic, default_memory_level, Z_DEFAULT_STRATEGY);
      if (err != Z_OK)
      {
         error_stream << "deflateInit() failed: ";
         throw ZlibError(error_stream.str(), err);
      }
 
      unsigned long start_total_out = c_stream.total_out;
      c_stream.next_in = reinterpret_cast<Bytef*>(const_cast<char*>(data.data()));
      c_stream.avail_in = data.size();
      c_stream.avail_out = buffer.size();
      c_stream.next_out = reinterpret_cast<Bytef*>(&buffer[0]);
      err = deflate(&c_stream, Z_NO_FLUSH);
      while (err == Z_OK && c_stream.avail_out == 0)
      {
         size_t old_buf_size = buffer.size();
         buffer.resize(buffer.size() + start_buffer_size);
         c_stream.avail_out = old_buf_size;
         c_stream.next_out = reinterpret_cast<Bytef*>(&buffer[0] + old_buf_size);
         err = deflate(&c_stream, Z_NO_FLUSH);
      }
      if (err != Z_OK && err != Z_BUF_ERROR)
      {
         error_stream << "deflate() failed: ";
         deflateEnd(&c_stream);
         throw ZlibError(error_stream.str(), err);
      }
      buffer.resize(c_stream.total_out - start_total_out);
      return std::string(buffer.begin(), buffer.end());
   }
   std::string compress_end()
   {
      const size_t start_buffer_size = 10000;
 
      std::stringstream error_stream;
      std::vector<char> buffer(start_buffer_size);
      unsigned long start_total_out = c_stream.total_out;
      c_stream.total_in = 0;
      c_stream.avail_out = buffer.size();
      c_stream.next_out = reinterpret_cast<Bytef*>(&buffer[0]);
 
      int err = deflate(&c_stream, Z_FINISH);
      while (err == Z_OK && c_stream.avail_out == 0)
      {
         size_t old_buf_size = buffer.size();
         buffer.resize(buffer.size() + start_buffer_size);
         c_stream.avail_out = old_buf_size;
         c_stream.next_out = reinterpret_cast<Bytef*>(&buffer[0] + old_buf_size);
         err = deflate(&c_stream, Z_FINISH);
      }
      if (err != Z_STREAM_END && err != Z_OK && err != Z_BUF_ERROR)
      {
         error_stream << "deflate() failed: ",
         deflateEnd(&c_stream);
         throw ZlibError(error_stream.str(), err);
      }
 
      buffer.resize(c_stream.total_out - start_total_out);
      err = deflateEnd(&c_stream);
      if (err != Z_OK)
      {
         error_stream << "deflateEnd() failed: ";
         throw ZlibError(error_stream.str(), err);
      }
      return std::string(buffer.begin(), buffer.end());
   }
 
   z_stream c_stream;
   std::ofstream file_stream;
   std::vector<ZipInfo> files_info;
};
 
#endif
4
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
02.12.2011, 16:59
Помогаю со студенческими работами здесь

Чтение архива RAR или ZIP (возможно с предварительно установленным паролем)
Доброго всем времени суток! такая вот задача: создать программу чтения фаилов из архива (ZIP,RAR), установить пароль на архив, пароль...

Создание ZIP архива
У меня есть несколько папок с файлами, надо из каждой папки создать ZIP архив. Как это сделать? Добавлено через 1 час 9 минут Мне...

Создание архива (ZIP)
Доброго времени суток, Если кто-то знает, как в VBS проводить архивацию папок в zip, подскажите, пожалуйста :) Мой поиск был...

Создание zip/rar архива
Очень много смотрел, читал и так и не нашёл как создать архив с файлами на c# NET.2.0 Помогите :)

ZipTV создание zip архива
Есть компонент ZipTV Никак не могу понять, как с помощью него создать zip архив. Архивировать должен папку и все файлы в ней, в том...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
8
Ответ Создать тему
Новые блоги и статьи
Новый ноутбук
volvo 07.12.2025
Всем привет. По скидке в "черную пятницу" взял себе новый ноутбук Lenovo ThinkBook 16 G7 на Амазоне: Ryzen 5 7533HS 64 Gb DDR5 1Tb NVMe 16" Full HD Display Win11 Pro
Музыка, написанная Искусственным Интеллектом
volvo 04.12.2025
Всем привет. Некоторое время назад меня заинтересовало, что уже умеет ИИ в плане написания музыки для песен, и, собственно, исполнения этих самых песен. Стихов у нас много, уже вышли 4 книги, еще 3. . .
От async/await к виртуальным потокам в Python
IndentationError 23.11.2025
Армин Ронахер поставил под сомнение async/ await. Создатель Flask заявляет: цветные функции - провал, виртуальные потоки - решение. Не threading-динозавры, а новое поколение лёгких потоков. Откат?. . .
Поиск "дружественных имён" СОМ портов
Argus19 22.11.2025
Поиск "дружественных имён" СОМ портов На странице: https:/ / norseev. ru/ 2018/ 01/ 04/ comportlist_windows/ нашёл схожую тему. Там приведён код на С++, который показывает только имена СОМ портов, типа,. . .
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Programma_Boinc 20.11.2025
Сколько Государство потратило денег на меня, обеспечивая инсулином. Вот решила сделать интересный приблизительный подсчет, сколько государство потратило на меня денег на покупку инсулинов. . . .
Ломающие изменения в C#.NStar Alpha
Etyuhibosecyu 20.11.2025
Уже можно не только тестировать, но и пользоваться C#. NStar - писать оконные приложения, содержащие надписи, кнопки, текстовые поля и даже изображения, например, моя игра "Три в ряд" написана на этом. . .
Мысли в слух
kumehtar 18.11.2025
Кстати, совсем недавно имел разговор на тему медитаций с людьми. И обнаружил, что они вообще не понимают что такое медитация и зачем она нужна. Самые базовые вещи. Для них это - когда просто люди. . .
Создание Single Page Application на фреймах
krapotkin 16.11.2025
Статья исключительно для начинающих. Подходы оригинальностью не блещут. В век Веб все очень привыкли к дизайну Single-Page-Application . Быстренько разберем подход "на фреймах". Мы делаем одну. . .
Фото: Daniel Greenwood
kumehtar 13.11.2025
Расскажи мне о Мире, бродяга
kumehtar 12.11.2025
— Расскажи мне о Мире, бродяга, Ты же видел моря и метели. Как сменялись короны и стяги, Как эпохи стрелою летели. - Этот мир — это крылья и горы, Снег и пламя, любовь и тревоги, И бескрайние. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2025, CyberForum.ru