thank you, JamesCherrill))
Hi)
Guys , please tell me - which java graphic (which make you able to work with winforms) library should be studied at first?
I started with SWT , but that i heared that it isn't "standart"......
thanks in advance for help.
firstPerson , if you can - give couple of code lines for example)
hi there)
my brothers-programmers) please tell me - how to get double type character by character - i need make custom realization of fprintf - so it's necessary for me to show double type numder on the screen.
(For integer type this problem could be solved by subtracting 32 - and after that putchar() can be used.)
big thanks in advance)
It relies on the format string for this information. That's why nothing bad happens if you provide more arguments than the format string uses, but it's undefined behavior if you provide fewer
thanks deceptikon ! i've understood you))
guys tell me - how does fprintf() get know - when the list of parameters is ended ?
we not pass Null or 0 parameter as last one. - but everything works.
Hi there!)
Guys please tell me - where can I see the realization (or custom realization) of fprintf in C++ ?
I'm especially interesed in working with no fixed number of passed parameters.
I need to made somethings like fpintf() by myself but i don't know how....
big thanks in advance)
thank you L7Sqr )
thank you robea but my problem is related to Linux)
ok)) i'll try
Hi there))
Guys - I have this error =
umount is not in the fstab (and you are not root)
on local PC during trying to unmount fuse-based filesystem - please tell me - how tp unmount system/
My mount point is tmp folder so - when i try =
vedro@myone:~/fuse$ umount tmp
the system show this =
umount: it seems /home/vedro/fuse/tmp is mounted multiple times
when try
vedro@myone:~/fuse$ umount /dev/fuse
this -
umount: /dev/fuse is not in the fstab (and you are not root)
using fusermount also doesn't give result =
vedro@myone:~/fuse$ umount tmp
umount: it seems /home/vedro/fuse/tmp is mounted multiple times
Please help = tell - what should i do or read unmount this filesystem.
big thanks in advance))
thank you friend) mandatory means mandatory )
thank you, L7Sqr )
Hi there)
Guys - if anybody know about a good articles (or something like that - what will be usefull to read) on the topic "file system driver creation - C language" - please give link or advice).
I need something not too sophisticate for begining.
big thanks in advance)
in windows there's WaitForMultipleObjects () function - it can solve this problem, but in linux....can't))
This sort of defeats the purpose of multithreading...
yes - you're right - but what about this -
this situation needs that at least the third thread will be stoped just after creation
you said =
A semaphore or a conditional variable would do it much better.
so - there's no way to stop comparision thread safety using signals ?
your intuition is good)
I would like to use signals .
Yes - to be concrete - for example - i have 3 threads (list) =
1) the first one reads first txt file into memory
2) the second reads second txt file into memory
3) and the third thread compare each other arrays , which had been made by the previous two threads
I need perform all operations in such order as in list , because all of them(threads)))) use console to show some notifications about own work.
In the general case this situation needs that at least the third thread will be stoped just after creation.
Hello everyone))
Guys please tell me - is there any way to create thread in lunux , which will not executed itself (at all) - until will get SIGCONT signal?
I can't thread self stopping after creation , because in this case - we cann't be sure that the thread will be stopped exactly before (not after) parent process will send SIGCONT to it - that's possible that the thread will be find in not active state after getting SIGCONT from another one (because of multithreading)
So I need to be sure that the thread has been stoped by the moment the other thread send the SIGCONT to the first one.
If someone know - how to do this - please help.
big thanks in advance))
thank you , DeanMSands3 )
DeanMSands3 I use windows API .
thanks for references, but how can I use GetExitCodeThread function for example - to
return int i =2
?
ok)) thank you , rubberman))
Hi there))
I know that one of the ways to pass variables values into thread -is to create a special structure which includes all needed parameters/
But what about getting values from thread? Is it any way to get value after modification from the thread ?
I know only one - use global variables , but may be there's another one or more that one?
Guys, please tell me about this - if there's something more)
big thanks in advance))
The whole point of the web root is that web accessible content should be in the web root or lower.
Content above the web root, e.g the server OS and other important files are protected. You can access these protected files via other scripts within the web directory, but you can never access them via the browser directly.
this's full answer)) thank you, blocblue _))
thanks for answer))
echo file_get_contents('../../text.txt');
yes)) this variant work in my case too )) - I also have access to all directories , but what about to load page - some file.php from (c:\) (when site root as in your example is on C:\xampp\htdocs\mysite\ folder )
what path you'll see in browser?
to be more concrete - i need to make reference , from (for example) on index.php to some file file.php which is on more higher level that site root (as always - index.php is in site root) -
if you can do thit (make such ref) - please post here pease of HTML with link and path which you'll have in browser adress line after visiting file.php
Hi there))
Guys please tell me - how to make reference to directory which is on higher level that site root (by php - site is on local machine) -
may by this situation need some aliases in apache .conf file?
As I see the server(apache) don't want to understand path like "..\scripts"....
what should i do?
big thanks in advance))
hi mysql athlets!))
Guys, please tell me - how to solve problem like this =
I have sql-query like this one (imagine that all this tables and fileds exists - and error can't be in its adsence) =
select NAME from (TAB1 left join TAB2 on TAB1.ID = TAB2.ID) as NEWTAB where NEWTAB.NUMBER= TAB3.NAMBER;
there is some unidentified for me problem in as
NEWTAB
- is this syntax impossible in MySQL - if so - what could be use instead ?
big thanks in advance)
Hi there)
I'm trying to install PHPUnit - does anypne know how to solve this problem ? =
Failed opening required 'PHPUnit/Framework.php'
I can find the solution ib the internet!
big thanks in advance)
so - as i understand there isn't any way to write code without any temporary assignments ? am i right?)
hi there)
guys, please tell me - is it any way to make associative array in php without assignment values to the arrays elements?
in my situation i need to read indexes names from txt-file -so i can't immediatly give them values.....what will you advice in this situation?
Is there any way to avoid NULL assignment ?
big thanks in advance)
ok. may be as i said) thank your)
the problem is same on the second pc (the first one - win XP the second -win 7)
, if the letter that were assigned to the card previously are now used by another device, then it could cause the SD card not to get a letter, hence not showing up under My Computer.
hm. as i understand problem isn't in this. if to connect the adapter without memory SD card -all'll be ok - the adapter will show as empty usb-device, but with the memory card it was showing only for one second and then dissapear from "my computer" window.
Could the problem be in the data, which is stored by card?
But i also have another microSD (kingston 1gb) , wich is also from mobile phone - and this one also wasn't showed up in the explorer (my comp.)
but the third card (transcend 1gb) was showed up correctly.
Originally my first card which i need to connect to PC was in complect to sony erricsson mobile phone , so i think that the problem can't be in disparity between microSD adapter and memory card models.
hi there)
guys please tell me - how to solve this problem - open get access to data on the microSD usb adapter which doesn't want to shoe itself in my computer window (to be useful for ordinary windows user )))
big thanks in advance)
And you found a way to do it then. Please post your solution so we all can learn from it...
i'm not so clever to understand you ) as you can understand from previous messages - i don't know the solution)
yea but you left out this =
ok. let's see ) =
Imagine that we have a very simple console menu function <strong>"mainmenu()"</strong> - something like this =
int mainmenu(void) { int ch; char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1} \n * Specify \"0\" to exit\n" ; char* errmes = " Error(!) = Main menu does not support this command.\n Make sure that your task number is from menu set of commands and try again. " ; while (getchar() != '\n'); /*here we are cleaning the input = fflush(stdin) isn't cool variant;or use while (getchar() != '\n'); - but this'll stop program*/ printf("\n%s",mtext ); ch = getchar() ; /*user choose an item*/ switch(ch) { case '0': printf("\n%s","you choise is item1 \n" ); /*menu item = just put here the name of your function instead of printf()*/ break; case '1': printf("\n%s","you choise is item2 \n" ); /*menu item = here the name of your function instead of printf()*/ break; default: printf("\n%s\n", errmes); } return 0; }
There are 2 situations of mainmenu() work =
1) We get the first when the stdin wasn't empty at the moment we call this function =int main() { char ch; printf("\n%s","please specify a one symbol" ); /* but user've put "dgfhj3 \n" */ ch = getchar(); /*in buffer we have "gfhj3 \n"*/ mainmenu(); return 0; }
And in this situation all will we ok, because line
while (getchar() != '\n');
will …
fgets() also stop program if the buffer is clear)
ok! so if we use construction
#ifdef
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#define IN_WINDOWS 1
#endif
#ifdef IN_WINDOWS
// code
#else
// code
#endif
we check stdin for both of windows and linux? how to do this?)
or where can i read about it?) tell please)
hkdani you isn't right - it's design for using with ONE \n - and then only after user've specify the value
in terms of programming philosophy you're really right.....i even haven't thought about it....but still - is there any good(with standard behaviour in different compilers and platforms) way to do this?
ok. let's see ) =
Imagine that we have a very simple console menu function <strong>"mainmenu()"</strong> - something like this =
int mainmenu(void)
{
int ch;
char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1} \n * Specify \"0\" to exit\n" ;
char* errmes = " Error(!) = Main menu does not support this command.\n Make sure that your task number is from menu set of commands and try again. " ;
while (getchar() != '\n'); /*here we are cleaning the input = fflush(stdin) isn't cool variant;or use while (getchar() != '\n'); - but this'll stop program*/
printf("\n%s",mtext );
ch = getchar() ; /*user choose an item*/
switch(ch)
{
case '0': printf("\n%s","you choise is item1 \n" ); /*menu item = just put here the name of your function instead of printf()*/
break;
case '1': printf("\n%s","you choise is item2 \n" ); /*menu item = here the name of your function instead of printf()*/
break;
default: printf("\n%s\n", errmes);
}
return 0;
}
There are 2 situations of mainmenu() work =
1) We get the first when the stdin wasn't empty at the moment we call this function =
int main()
{
char ch;
printf("\n%s","please specify a one symbol" ); /* but user've put "dgfhj3 \n" */
ch = getchar();
/*in buffer we have "gfhj3 \n"*/
mainmenu();
return 0;
}
And in this situation all will we ok, because line
while (getchar() != '\n');
will …
hm. but may be I should reformulate the question - if there's no universal way to check that the stdin is empty - may be there's a way to detect , that the getchar() - or something like it (fgets() for ex.) wait an user action and break it ?
find the source code for getchar()
in C ? hkdani , how can I get it - tell please)
as I uderstand from hkdani example the way th check stdin is =
if (!sizeof(stdin))
but the compiler this code is unreachable =
if (!sizeof(stdin)) while (getchar() != '\n');
In my situation i what to get stdin (stream from console) in empty condition , it is possible to use
fflush();
, but I've heared that it has nonstandart behavior. So to clean console input buffer I use =
while (getchar() != '\n');
- but this code 'll stop program when the input was empty primordially.
This stopping - isn't a good moment - so I need to check the buffer condition.
As I understand - i should check is the pointer in stream structure NULL ?))
my compiler - is Pelles C . I need code for both of linux and windows (and the standart behavior - what a beautiful word.....)
code example =
int main()
{
char ch;
printf("\n%s","please specify a one symbol" ); /* but user've put "dgfhj3 \n" */
ch = getchar();
/*in buffer we have "gfhj3 \n"*/
mainmenu();
/*in buffer we have "gfhj3 \n"*/
return 0;
}
int mainmenu(void)
{
char ch;
char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1} \n * Specify \"0\" to exit\n" ;
char* errmes = " Error(!) = Main menu does not support this command.\n Make sure that your task number is from menu set of commands and try again. " ;
fflush(stdin); /* clear the input - stdin or use while (getchar() != '\n'); - but this'll stop program*/
printf("\n%s",mtext );
ch = getchar();
switch(ch)
{
case '0': …
hi there)
guys , please tell me - is there any way to check that the standart input is empty or no.
big thanks in advance)
as i learned from here the standart entry point for windows console program is main() function - not WinMain() - it makes the situation more clear and it means that i don't understand the c att all ))) .
big thanks you Ancient Dragon and you diwakar wagle ))
my previous example is the same as yours one...... - but problem isn't in this point - the problem is in fact that the compiler demands main() func for win23 console program when it should use WinMain() func. instead of main()
I don't understand - why compiler allows such code =
#include <stdio.h>
#include <stdlib.h>
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#define WINDOWSS 1
#endif
#if defined WINDOWSS
int main()
{
char* mtext = " it's WinMain() code \n" ;
printf("\n%s",mtext );
return TRUE;
}
#else
int main()
{
char* mtext = " it's main() code \n" ;
printf("\n%s",mtext );
return TRUE;
}
#endif
but doesn't allow such =
#include <stdio.h>
#include <stdlib.h>
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#define WINDOWSS 1
#endif
#if defined WINDOWSS
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE qwe,LPSTR qwer, int ss)
{
char* mtext = " it's WinMain() code \n" ;
printf("\n%s",mtext );
return TRUE;
}
#else
int main()
{
char* mtext = " it's main() code \n" ;
printf("\n%s",mtext );
return TRUE;
}
#endif
diwakar wagle thanks - I've understande understood you idea of using external winapi faciities to get the console window , but I more need to write code which can be compiled under linux OS - so i need main() func - because it's standart entry point for unox (as i know)))
he gave incomplete code and asked -
what are exactly p1,p,p2?
i don't know - has he got the complete variant and does he understan't the idea upon the whole.....
It does show the console window. It executes main(), not WinMain().
if build as win32 console program (exe) - yes ,
but if build as win32 program (exe) - no