Ilya
else if (status=='P')
{
printf("Part-Time\n");
if (Year_serviced < 5)
{
new_salary= (0.025*salary) + salary;
printf("your new salary is %.2f\n", new_salary);
}
if(Year_serviced >= 5)
{
new_salary= (0.03*salary) + salary;
printf("your new salary is %.2f\n", new_salary);
}
}
™
i,j,k,x,y,o,N; main(){float z[1760],a #define R(t,x,y) f=x;x-=t*y\ ;y+=t*f;f=(3-x*x-y*y)/2;x*=f;y*=f; =0,e=1,c=1,d=0,f,g,h,G,H,A,t,D;char b[1760];for(;;){memset(b,32,1760);g=0, h=1;memset(z,0,7040);for(j=0;j<90;j++){ G=0,H=1;for(i=0;i<314;i++){A=h+2,D=1/(G* A*a+g*e+5);t=G*A *e-g*a;x=40+30*D *(H*A*d-t*c);y= 12+15*D*(H*A*c+ t*d);o=x+80*y;N =8*((g*a-G*h*e) *d-G*h*a-g*e-H*h *c);if(22>y&&y> 0&&x>0&&80>x&&D>z[o]){z[o]=D;b[o]=(N>0 ?N:0)[".,-~:;=!*#$@"];}R(.02,H,G);}R( .07,h,g);}for(k=0;1761>k;k++)putchar (k%80?b[k]:10);R(.04,e,a);R(.02,d, c);usleep(15000);printf('\n'+( " donut.c! \x1b[23A"));}} /*no math lib needed .@a1k0n 2021.*/
Tommaso
Hi all, I have a problem with accessing a semaphore: if I use sem_timedwait it always times out, even if the semaphore is free, instead if I use sem_wait it accesses. I emphasize that it is the same semaphore.
Tommaso
In this case it doesn't work, even if it's the same semaphore, waiting for the seconds set in ts. : clock_gettime(CLOCK_REALTIME, &ts);
ts.tv_sec+=TEMPO;
if(sem_timedwait(&bacchette[destra], &ts)==-1){
Manav
I can't understand operator overloading
Think of operators as they're functions then you can overload them just like how you do with functions
add(int a, int b);
add(T a, int b); // T is some custom class you defined.
The same you do with operators
operator+(int a, int b);
operator+(T a, int b);
👆non members functions
Here like add is the function name, operator+ is the function name
So for T a;
These are all valid expressions
add(a, 1); // call add(T, int)
a + 1; // call operator+(T, int)
operator+(a, 1);
itsmanjeet
Do anyone using LLVM on windows, I am writing LLVM backend for my language srclang. I installed llvm package via winget install LLVM.LLVM but the required cmake configuration file llvmConfig.cmake is missing on C:/Program Files/LLVM/lib/cmake on llvmConfigExtensions.cmake, I tried googling the issue but they ask to compile llvm from source code, uhh, LLVM toolchain is a Big project take a lot of time to compilation and space.