Anonymous
airlines just raised ticket prices x5 times lol
Anonymous
gotta write some private price scrapping engine
Sk
How do i get nth term of fibonacci series with while loop and for loop?
Sk
Cpp
²
How do i get nth term of fibonacci series with while loop and for loop?
https://www.programiz.com/cpp-programming/examples/fibonacci-series
Anonymous
Anyone tried to fill the repeated field in protobuf with multiple threads? 1. pre allocate 10k entries, each returned a row ptr 2. dispatch the ptr to multiple workers that call add_values and fill in the value will this action incur other performance overhead that newbies are not aware of?
Well that depends. How big is the repeated field? Can it fill a cache line? If not, then you will have false sharing issues with data writes jumping across from the store buffers to the caches in other cores which takes a lot of time on architectures that have TSO model or Relaxed Memory models.
Anonymous
Bot Rose has 1/3 warnings; be careful! Reason: sticking her nose.
Anonymous
i have came across a useful app for sip - it saying it can be compiled on windows
Anonymous
however libs it want seems to be Linux only'
Anonymous
maybe i am missing something?
Anonymous
app name is baresip
Anonymous
baresip supported platforms windows (mingw and VS2015)
Anonymous
when i am trying to tell mingw to compile it - it starts complaing
Anonymous
about no rules to make target
klimi
about no rules to make target
you sure you are running it correct?
Anonymous
yes
Anonymous
mingw32-make path to a dir
Anonymous
TheAcelot can you suggest some nice open source windows clients?
Anonymous
sip
Anonymous
voip
Kaashᅠ
sure, I'll go for it
Anonymous
does this channel included c sharp?
Anonymous
or nah?
Anonymous
ok
klimi
Sleeves
Hey guys can someone look it this
Sleeves
I’m having troubles compiling and the code is from the internet. I’m beginning to understand that maybe nullptr is deprecated as the cold is from 2015, will switching nullptr to NULL work ?
Sleeves
new3.c(24): error C2065: 'nullptr': undeclared identifier
Sleeves
I’m confused then isn’t printf() only in C then ?
Sleeves
Because the code has printf() statements and I assumed it was C
Sleeves
I see
Sleeves
So the code is actually C++
Sleeves
Thanks
Void
guys
klimi
guys
ya?
Void
#include <stdio.h> int main() { double a,b; scanf("%d %d",&a,&b); printf("%d+%d=%d\n",a,b,a+b); printf("%d-%d=%d\n",a,b,a-b); printf("%d*%d=%d\n",a,b,a*b); printf("%d/%d=%d\n",a,b,a/b); return 0; }
Void
I want to know how to keep three decimal places in each number?
²
%.3f
Sk
Question - Given an integer array nums of length n where all the integers of nums are in the range [1, n] and each integer appears once or twice, return an array of all the integers that appears twice.
Sk
Approach?
Void
%.3f
But when I put %.3f into the code, it all turns out to be 0.000
Sk
If you put 1 after decimal you will get out like 9.6
Sk
If that’s what you are asking
Void
yeah i know but
Sk
But?
Void
It's like if I enter 4 and 2, it should output 4.000+2.000=6.000, but he outputs 0.000+0.000 ......
Sk
Show code
Sk
Or simple use float
Void
Void
i'm so dumb
Subhadeep
Hello, anyone help to solve this problem: Write a c program using while loop to check if a number entered is an Armstrong number.
novice
#include <stdio.h> #include <math.h> int main() { printf("Enter the number\n"); int number; scanf("%d",&number); int number_of_digits = ((int)log10(number))+1; int sum_arm = 0; int temp = number; while(temp!=0) { sum_arm = sum_arm + ((int)pow(temp%10,number_of_digits)); temp = temp/10; } if (sum_arm == number) printf("Yes, an Armstrong number\n"); else printf("No\n"); return 0; }
novice
i get it from net , but i don't completely understand this 😅
Sleeves
please can anyone explain what the keywords in caps are doing there. I dont quite understand these and i see them alot in code, are they supposed to be variable declarations ?
Sleeves
void CALLBACK WinEventProc( HWINEVENTHOOK hook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD idEventThread, DWORD time)
Anonymous
halo
Sleeves
halo
hi, can you help me with my question ?
Anonymous
hi, can you help me with my question ?
I don't know much about programming, I'm here to learn I'm sorry I can't help you
Sleeves
void CALLBACK WinEventProc( HWINEVENTHOOK hook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD idEventThread, DWORD time)
i did some research and i guess its a structures? But then again DWORD isnt a chatacter time
ssun
i did some research and i guess its a structures? But then again DWORD isnt a chatacter time
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nc-winuser-wineventproc
Veronika
If you think you know all the ways to shoot yourself in the foot in C++ - you could be wrong. Let's embark upon an exciting journey along the perilous paths of our favourite programming language. We'll see hidden traps, navigate around UB-filled pits, and see how cruel the Standard can be. https://youtu.be/zu1bk340jgo
Sleeves
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nc-winuser-wineventproc
thank you that is where i got the code from but my question is what is that? I dont know why the function WinEventProc is having (DWORD event) inside it. I’ve not seen anything like that in any other languages. Do you understand ?
Sleeves
Are they parameters that should be passed? What are they. That is what I do not understand
Sleeves
void CALLBACK WinEventProc( HWINEVENTHOOK hook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD idEventThread, DWORD time)
my question remains tho, if this is a function and those are parameters. Why then is this declaration made in code. obviously the function knows what parameters it takes as specified in the docs. Ive seen this happen in alot of open source material and im wondering why.
Sleeves
its part of the code i can show you another example. The code is usually internet code
𝑪𝒐𝒃𝒓𝒂
I have exam of cpp tomorrow but I don't know inline function etc all I'm in panic
𝙰.𝚁.𝚂 (𝙳𝙽𝙳)
Hi everyone. I have a question. I asked in stackoverflow but got downvoted and I couldn't explain it any further... I figured that I could get some explanation here.