Any questions from a PROFI to a SUPER PROFI - 1. - page 30

 

Here tell me, maybe anyone knows which of standard packers is capable of packing ( compressing) .ex4 type files with the purpose of making them more compact ( it is ruined that they should run in MT4). Thanks. This is close to the topic, always wanted to ask.

 

From the peculiarities of streaming output in C++. I've just discovered it.

What do you think the output of this simple code is. Only logically, without running the code. Then run it and you'll see that it's very different.

int Func()
 {
  static int i = -1;
  int anArray[4] = {1, 2, 3, 4};
  i++;
  if (i > 3) i = 0;
  return(anArray[i]);
 }
void _tmain(int argc, TCHAR* argv[])
 {
    std::cout << Func() << _T(" ") << Func() << _T(" ") << Func() << _T(" ") << Func() << _T(" ") << std::endl;
    // Контроль вывода.
    std::cout << Func() << _T(" ");
    std::cout << Func() << _T(" ");
    std::cout << Func() << _T(" ");
    std::cout << Func() << _T(" ") << std::endl;
  }
 
sergeev:

...................
But in second case I checked more interesting hypothesis.

A CreateFileMapping is created with an initial size (e.g. 2 bytes) and 4 bytes are written into it. And it automatically expands itself!

................


This is most likely due to the "granularity" of virtual memory


When reserving memory (CreateMappingFile; VirtualAlloc (MEM_PESERVE)) -- the system rounds up the required amount of memory to a multiple of 64 KB (upwards) and reserves it in the process address space. (but does not allocate physical RAM)

Then when allocating physical memory (MapViewOfFile; VirtualAlloc(MEM_COMMIT))-- it loads necessary memory pages multiple of 4KB.

This is probably just like this.

http://wm-help.net/books-online/book/59464/59464-6.html

http://wm-help.net/books-online/book/59464/59464-10.html

 

Does anyone have a link to read about transmitting sound from the microphone to the network? More precisely, how and how to read sound from a microphone?

Googled the topic today. I did not find anything.

 
sergeev:

Does anyone have a link to read about transmitting sound from the microphone to the network? More precisely, how and how to read sound from a microphone?
Googled the topic today. I did not find anything.

http://recmp3.sourceforge.net/
I suspect there are other example programs out there.

Is it so hard to google
voip open source
 

Thank you so much.

also the c++ project inside!

 
jartmailru:

Is it so hard to google
voip open source
It's already going to be fun for the weekend. thanks again.
 
sergeev:

Thank you so much

You're welcome.
... But I'd try to get a handle on the VoIp application at once )...
After all, there's already integration of audio stream with network transmission and playback there.
For example, the playback of these pkets is a secret for me :-).
 

Anyway, the problem is that the indicator takes data from a csv file... everything works without any problems... When I start to address this indicator from the Expert Advisor, the errors related to reading the file and the returned data are null:

invalid handle 0 in FileClose
invalid handle -1 in FileIsEnding
invalid handle -1 in FileReadString
invalid handle -1 in FileSeek

I've looked everywhere and no one has described this problem?????
 

dispel any doubts

if(OrderSelect(Ticket, SELECT_BY_TICKET) && OrderCloseTime() > 0){

is identical to the following

if(OrderSelect(Ticket, SELECT_BY_TICKET)){
   if(OrderCloseTime() > 0){
or is it correct to choose an order first ?