#tech-related-help
1 messages · Page 26 of 1
what column has repeating groups?
Normalization is a design technique that is widely used as a guide in designing relation database. Tutorial for First Normal Form, Second Normal Form, Third Normal Form, BCNF and Fourth Normal Form.
i dm you
this is just an activity though
ik but you still have to do it
its something you can use in your future development
hey guys, not sure if anyone can help but i keep getting an error saying that maximum call stack size exceeded. I think this is a problem with infinite recursion calls, but i'm not sure what im doing wrong. The context of this code is a merge sort, and i created a separate splice function instead of using the splice method, and i think that's where things went wrong. i would appreciate the help, thanks!
Oh
change let left = mergeSort(splice(arr, 0, mid)); to let left = mergeSort(splice(arr, 0, mid+1));
Also change to newArr[i-start] = arr[i];
Also, to clarify, yes your error is due to infinite recursion, as every time you make a call, you put a call frame on the stack, which takes up space, so if you make infinite calls, you will at some point run out of stack
remove the ; on line 12 on your html --> Personitas();
same thing on line 1 ;
indent your code that is inside the function - it would still work but just a pet peeve of mine
anyone have a good resource to learn html and css?
who has mySQL downloader?
https://www.codecademy.com/catalog/language/html-css
https://www.freecodecamp.org/
https://www.w3schools.com/html/
tysm it worked
Thanks so much! This helps a lot
hey guys im sorry to bother but can someone pls explain to me what is this error? and how can i make this work? its c sharp
thank you, it did work but honestly i dnt know what a index is i will try to search it up thx but like why does this work if its like this tho?
i dnt get why it works if i put a specific position in the array like 0 in this example but not if i put the i, cause the i is changing and will be i++ so it should give me all the characters no?
im sorry if im asking too much and i know my grammar isnt very good rn cause i dnt know the correct terms in english for programming but like here how could i put it working?
so like this it should work?
oh really? i really should check out the meaning tysm
ohh
thank you!!
i did get it but im gonna take the advice and do it on paper thank you everything works now! ^-^
o index vai de 0 a caract.length - 1
caract é um ponteiro para o início de um bloco de memória
o operador [n] é equivalente a fazeres *(caract + n)
Um array nada mais é que um ponteiro, eu recomendo perceberes primeiro como é que os ponteiros funcionam, vai te ajudar a perceber melhor o problema que estavas a ter @quiet vault
Ah não percebi isto
Pois vou pesquisar obrigada (sorry im not talking in english guys)
Ent no meu exercício ficava caract(caract + i) ?
Não, tens as duas sintaxes possíveis:
caract[i]
// ou
*(caract + i)
São equivalentes
O * está a aceder ao valor no endereço (caract + i)
normalmente a sintaxe com [] é preferida pela sua simplicidade
can anyone help me with react typescript?
this is the object, and the console log's is what i want but the value should be dynamic
but i get this error
i have no idea how to solve it, but i understood the error
Ah obrigada!
Ah acabei de tentar e não funcionou provavelmente fiz algo de errado
as i remember, you cant sum the array[] and int in C#, but you can convert char[] into int with ParseInt and sum it
oh okay thank you
hi guys
does anyone know the difference beetween
the computers with cpu and the ones without it (I think they are call all in one and are just the monitor i guess)
I will buy a computer soon for college and Im planning to use it for adobe, programs like stata or R, coding and more 😄
hi, so this function has two while loops, and in the first loop i declared a 'mid' value, which i then use in the condition for the second while loop. does the value of mid transfer to the second while loop? or are variable only local in the loop that they are declared in?
this is javascript btw
no it doesnt because you only declared the variable mid in the first while loop
so mid is present inside the first while loop block
okay thank you
Is that C#?
@quiet vault Bem, o C# lida com ponteiros de uma forma muito... estranha
Eu particularmente não aprecio nada, mas isso é outro assunto, em C# eles não gostam de dar esse controlo com ponteiros como tens em C ou C++
Usa mesmo a sintaxe do [] para indexar no array
Sim é
Pois, eu só percebo um pouco de c# não sei programar nas outras linguagens
Ok obrigada!
I'm learning python and I came across a problem that I'm a bit lost on how I approach or solve it. It deals with ASCII art where it has a core and also its 'ring' ``` If I were to input the ring size as 1 and the core size as 0 the result would be:
/
/
and if the ring size was 2 and the core size was 2 it would be
/--
//--\
|| ||
|| ||
\--//
--/ when the ring and core are above 1 it introduces hyphens for the ring and spaces for the core and I'm stuck on how I implement a loop that tackles that... any help or advice would be appreciated ```
Break the problem down into it's lines since that's what python would do. In the first line what changes between the differen inputs and how would can implement that change. I would give it a shot but can't atm
Hello, sorry for my bad english (im not confident enough)
Can anyone help me to give me an ideas about a new big data technology that could be useful in this pandemic situation?
please
😦
In Data Science it is used extensively
# /--\
#//--\\
#|| ||
#|| ||
#\\--//
# \--/
#This would be the output for the ascii art
#if the input for core_size and the ring_size was 2
if ring_Size == 1:
print('/' * 1 + '\\' * 1)
print('\n')
elif ring_Size > 1:
print('/' * ring_Size + '-' * ring_Size + '\\' * ring_Size)
print('\n')
#Core of ASCII
if core_Size == 1:
print('|' * 1 + ' ' * 1 + '|' * 1)
print('\n')
elif core_Size > 1:
print(print('|' * core_Size + ' ' * core_Size + '|' * core_Size))
print('\n')
#Bottom portion
if ring_Size == 1:
print('\\' * 1 + '/' * 1)
print('\n')
elif ring_Size > 1:
print('\\' * ring_Size + '-' * ring_Size + '/' * ring_Size)
print('\n')
def main():
while True:
ring_Size = int(input('Rings: '))
core_Size = int(input('Cores: '))
if ring_Size == 0 and core_Size == 0:
break
ascii()
This is what I tried to do, it executes but doesn't even go thru main. I'm still learning python, not sure what I can do so that the main() executes and at least goes thru the while loop so I can debug
anyone know what might solve this problem?
You call the function without inputs
ASCII() should have two inputs ring and core size
Pass in the variables
I passed them in to ascii within main "ascii(ring_Size, core_Size)" it executes but still doesn't ask for the user input
I know it'll have accessed the while loop if it asks for the inputs but it hasn't
Ohh
Try getting rid of the whole loop
Or just hard code the values and pass them in
figured it out I needed ```if name == "main":
main()
anyone know how to solve this?
I recommend reading this: https://www.datacamp.com/community/tutorials/python-dictionary-comprehension to help you understand dictionary comprehension.
Solution:
||{k:len([val for val in v if val < 60]) for (k,v) in IS_gradebooks.items()}||
hello can i ask something?
yes you can
how can i read manga on kindle?
Any suggestions for softwares for making posters, designs etc
ps -aef or ps –eaf can someone help explain what this command does i cant find it
hello! can i ask something :'D? So we have this research project and we need to embed a .exe (a vbasic exe file) into a website (google sites). Is it even possible?
as in have the exe run in the browser
hello:) can someone help me out with a db browser? I have several tables and have to find out in how many movies someone specific acted, but I dont know with which SQL query I can find that out 😄 best regards EDIT: NEVERMIND I GOT IT:)
Hi, I study Biomed but have a module in computational bio currently, am really struggling with my python project - was wondering if someone may be able to guide me a little? I would be most grateful - if you have some time please msg me? Thanks
can someone check my assignment
II. PSEUDOCODE
Start
Status = 0
Read n
Declare, create, initialize array (name[n], height [n])
i = 0
While (i< n)
Read name [i]
Read height [i]
i = i + 1
input search
i=0
while (i<n)
if (search = height [i])
status =1
print name [i], height [i], i
end if
i = i+1
if (status = 0)
print “player now no longer found”
end if
End while
Stop
flowchart
its java programming
if I could get some help figuring out what is wrong with my logic I would be eternally grateful :D
Everything that I type comes out as "not a city in Michigan", and if I set the variable foundIt to true in the if statement then it all comes out as "city found"
I figured it out (kinda), disregard 🤝
so at the very bottom of this, i'm trying to keep the order inside the brackets as firstNames, lastNames, uids, titles. but they are all parallel-sorted, and i'm calling it 4 times because i want to parallel sort by firstNames, parallel sort by lastNames, etc. however, i still want to keep the order, just retaining the value. i tried making a function to reorder it, but it's not working. could anyone help?
can someone help me with questions 4 and 5 please?
Anyone know old old language of Visual Basic? Specifically how to use timers and interval
ask here and if somebody knows they can answer :)
Does anyone have an idea of how to remove the bright-spot duplication in this image? As you can see, every bright spot has a corresponding duplicate shifted towards the right
for reference, this is the fourier transform of the image
cheers m9, i did something similar to scanline, and it worked 😁
how would i code to solve the polynomial by just using addition and subtraction
would the exponents require me to have a nested for loop?
@orchid pier Hi!, if you are using python there is a exponential method that you can use to perform exponent operations, so you don't need a loop for doing an exponent. What language are you using may I ask?
java
solving a fourth degree polynomial is quite difficult and has a very complex formula. by solve did you mean finding the value of y for a given value of x?
@orchid pier
yes
so you would be given x to be the value of 2 lets say
and you solve for y
its just im not too sure how to solve for the powers using addition only
yes I think nested loops is the way to go
do you know how about i would go making this nested loop?
im having a hard time visualizing being able to code to calculate something 3^4
well for inner loop you can add x for x number of times and in the outer loop fix the index of the exponent
and for this you can use recursion
can i dm?
who could i ask a question in DM about a python-programming related question? :)
Let’s see your question first, may I?
yes, can I DM you?
Sure
is anyone familiar with Generics in java?
how would i store the final iteration of my for loop to a variable in java?
if you're using recursion, you could use the base case to get out at the final iteration
my peeps i need some help
i need to learn js fast, does anyone have any good tips on how i can go about doing so
This complete 134-part JavaScript tutorial for beginners will teach you everything you need to know to get started with the JavaScript programming language.
⭐️Curriculum⭐️
This is a stand-alone video but it follows the JavaScript curriculum at freecodecamp.org. Access the curriculum here:
🔗 Basic JavaScript: https://learn.freecodecamp.org/javas...
why thank you
Just ask
return 3*pow(x, 4) + 2*pow(x, 3) - 6*pow(x,2) + 8*x -2;
}```
Is that what you wanted ?
The pow(x, y) function returns the value of x^y
I think it's Math.pow or sth like that instead of just 'pow', but I let you look it up
Btw, finding the value of a polynomial at a certain x is not called "solving" the polynomial
you can use ** instead to clean code
now i remember why i dont want to study java
hahahahha
I really dislike Java
So is JavaScript, doesn't make it a good language... just practical i guess
Agree to disagree
Java the way it works internally is very restrictive and... ugly honestly
Plus it gives away efficiency open handed
I would
Java is good if you wanna code something quickly
Besides that... it sucks
For starters, for a OOP language, not allowing operator overloads is just ridiculous
Also, no real way of saying if a object is destroyed or not, rather "leave it to this entity, let's call it garbage collector, and eventually it will clean out the memory"
PAHAHAHAHA
Dude, that's what java is for
it's meant for OOP
wtf
are you saying
Who said anything about classes as in school?
In that it sucks
that's it
I did, a few of them
If you ignore what i type its not really my problem
What
You asked "How so", I named a few things, and then you say that
I used the language
That's as much experience you need to give your opinion about something
Dude scroll up
also, the geniuses that made Java didn't even make static initialisation thread safe
Like, bruh
I will, cause that's dumb, I should be able to control when and how my object dies
And matlab
I do
hi could someone help me understanding this. I'am reading a program but for now i'm just used to basic c++ languague and honestly i do not understand this type of instructions: st[st_i++] = s[i]; s[++e] st_i++; st[st_i] = '\0';
I suggest this course to learn javascript, it covers different aspects : https://javascript.info/
yeah java was taught in my 1st year at my first university, and 2nd year at my current university
its a pretty common language to be taught, and i have to agree that i just don't like it
hey does anyone here know how to return the time of an insertionsort algorithm in code?
Depends on what language you're using but every language has a library for time related functions
For example, in C
You can use the structs and functions in the 'time' library to measure the time between the start and end of a function
how do i exchange the keys and values in python dictionary?
dict = {'a': 1, 'b': 2, 'c': 3}
print(dict)
dict = {value:key for key, value in dict.items()}
print(dict)
can someone help me with event simulation problem ?
is it possible to create a khan-academy like website using github pages?
wdym by using github pages?
oh i mean this https://pages.github.com/
https://medium.com/pan-labs/dynamic-web-apps-on-github-pages-for-free-ffac2b776d45
@proven cairn You can read this article, it may help you.
thanks!
i have another question, which is better in creating website from scratch, bootstrap or github pages?
yes, you can do that
you create the code, github pages helps to host it
Not a question, just need to rant a little.
I've spent my whole day just trying to install CUnit (unit tests library for C, though I guess it's popular) on Windows and man what a journey that was. I had to go through MinGW and two different virtual boxes just to realise it was actually possible via Ubuntu on Windows, provided I uninstalled vs code and installed it again (which I didn't know I had to)
Programming on Windows is such a nightmare
And especially when you know nothing about it and every website offers a different, obscure way of installing CUnit
lol this is why I use linux and macOS
this is for a password generator code, i'm not sure what i'm supposed to do here because my class never really went over char or what unicode is. anyone help pls?
is there anyone can give me some advice about logistic regression in 2-dim? i implemented it using python but its accuracy is only about 50%..🥺
Have you tried to change the learning rate?
yeah i tried 0.01, 0.05, 0.1, 0.3..... etc but it doesnt work😭😭😭
When you try those, do you have the loss keep on increasing or unstable?
oh i found that i didn't use loss function! can i ask your help after modify my code?
I can assist you, yes, just put them here so anyone can help you too and let's see
hi i tried hard to find errors in my code and it turns out that the implementatiom was perfect and i calculated the accuracy in a wrong way
thx for your help and attention have a good day🥰
Awesome! Sure, have a great day
Is that java? Java uses unicode chars by default iirc
Unicode just means that It can represent more characters than ASCII
It also takes twice as much memory space tho, since unicode needs a type bigger than 1 byte (2 bytes)
has anyone here used python to connect to SQL
not ||without me||
hi yall. someone knows what this colon thing is in python? i cant seem to look it up.. thanks
ohhh right thanks a bunch
any way to fix syntax highlighting ?
on line 7- [], : , '' are all supposed to be purple
happened because I used text centralization with :^5
guys i want to run this on my pc
but i have no idea how this stuff works
anyone willing to help me plsss uwu
does anyone else know that it is now possible to get linux on bare metal m1 macbooks????
how did they do this is beyond me
Someone want to join and help? Haha
uhh can someone help me please??? T_T
looks like no default constructor for method addDailySteps so you have to manually add value on line 13, line 14 looks like you forgot to make the method .addDailySteps (you put .addDaily).. not sure what object you are using but double check method call (if .addDaily is a method), and on line 15 i assume .activeDays doesn't take any arguments so remove the 0. Is this the type of help you were looking for?
Why is the time complexity of Quicksort (eg using Lomuto) when the input list is a list of equal values (eg [0, 0, 0, 0, 0, 0]): O(n^2) and not O(n) ?
Wikipedia mentions it here - https://en.wikipedia.org/wiki/Quicksort#Worst-case_analysis
Quicksort is an in-place sorting algorithm. Developed by British computer scientist Tony Hoare in 1959 and published in 1961, it is still a commonly used algorithm for sorting. When implemented well, it can be somewhat faster than merge sort and about two or three times faster than heapsort.Quicksort is a divide-and-conquer algorithm. It works b...
"This may occur if the pivot happens to be the smallest or largest element in the list, or in some implementations (e.g., the Lomuto partition scheme as described above) when all the elements are equal."
what am i doing wrong here
why does the serial monitor not output what i want it to
arduino btw
Hey everyone, I am struggling a bit on coding stuff (learning c++ btw). I flunked last semester and I've decided to improve myself to be better. The resources given by my uni is not bad but I can't seem to relate with the examples they give from their pdf slides. Can anyone recommend any websites that is friendlier towards those who starts c++ from zero? (I'm learning more on Object Oriented Programming this semester but most of the examples are given in code and I find it hard to understand since my basics in c++ is considered as lower than average, I have the passion to learn but somehow it's hard to find resources other than my uni's pdf slides.)
http://www.cplusplus.org/
https://www.w3schools.com/CPP/default.asp
https://www.tutorialspoint.com/cplusplus/index.htm
https://youtu.be/8jLOx1hD3_o
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
C++ Tutorial, C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Ma
Learn modern C++ 20 programming in this comprehensive course.
💻 Source code: https://github.com/rutura/The-C-20-Masterclass-Source-Code
✏️ Course developed by Daniel Gakwaya. Check out his YouTube channel: https://www.youtube.com/channel/UCUYUFiuJ5XZ3JYtbq5dXRKQ
🐦 Twitter: https://twitter.com/learnqtguide
🔗 Want more from Daniel? https://www.l...
Yoooooo!! Thanks a lot @idle dew
Good morning I want to ask a question about Java
When you create a variable:
float pi = 3.14F;
What does the F represent at the end?
Good morning! By adding the F, you're fixing the decimal part of the number instead of any small difference in the decimal part. You can check this using the conditional operator whether 3.14 is actually stored as 3.14 or not with and without the f
It explicitly indicates the compiler that the number is a floating point number instead of a double
But still it makes no sense decimal is a way to convert the meaning of a value not to change the value. I don't get the meaning of using the word "decimal" here, I mean 3.14 is a decimal number.
besides the grammer and spelling can someone look at my gaming profile website it was kinda rushed but https://whoskorus.netlify.app/
As I understand it
3.14 as an immediate, is of the datatype double. This means that the variable float pi can't hold it, because it will only hold a float. In order to actually get a float variable to hold your double number, is to convert it to a float, by using the suffix F
I wonder if it has something to do with your while-loop. Try to use the form
void loop(){
Serial.println(msg);
if(serial.available() > 0){
// Actually do something here
}
}
I haven't programmed for arduino, so I'm not sure if the while-loop actually is the issue, but might be worth a shot
its cool, but why are the games blurred, also linking the equipment, or linking the discord could be cool, i think, rest is clean
thank you i plan on adding the game photos soon, didnt think of linking the equipment and the discord ill do that iswell
Okay. All numbers containing the point "." are assumed to of the type double. So while the format of using this statement is syntactically correct the semantics is not. This will lead to conversion of a double literal into float literal which leads to loss of precision. Using of F avoids this conversion by explicitly stating this is a floating point literal.
Now that's what I am talking about !! Thank you so much God bless you
You're most welcome :))
What’s the best Linux OS for a pentium 4 2gb ram hardware ?
dont know if this is the chat to ask --- but im thinking about getting a thinkpad (vintage shell kinda like james) dont need it to be fast or like todays laptops mainly for programming or just messing around notes and stuff does anybody have any helpful tips? (i have a macbook pro so again probably looking at the X-- series would wanna be able to customize it but have an old shell)
C++
JOSEPHUS FLAVIUS Task
One of the talents that Josephus Flavius possessed was the mathematical skill, which according to legend saved his life. When the Romans trapped 40 of Flavius's followers and him, they made a death pact in which the Romans would not get them, they rather be dead. They took deadly counts in a circle of soldiers. Each third was killed. The count continued until one man was left. It was man who took 31st place in that circle. Yes, It was Flavius. He had another opinion about life, death and his special assignment in this war. Below you see the tool, which can calculate for you any amount of numbers for any picked out number and for any number left (less than total, of course). Just remember, Flavius quickly solved such a problem in his head without any computer program. Hopefully you will never be at needs to use this tool for saving your life but maybe you'll find another reason to use it.
Task: find the location(index) of the single person who remained alive.
HELP PLEASE)
use recursion or circular array concept using (%)
hello anyone up for pair programming data structures and algorithms in python. i am currently solving questions on binary trees and i do have resources and questions to refer.
GMT +5:30 hours
Heya! Do you guys know some websites where I can download HD private videos on Facebook?
I think that the bot that downloads the videos won't be able to access them if they're private
Uhh I've actually downloaded HD private videos when they are uploaded as one video, but if there are like 3 videos uploaded, it only recognizes 1 video when I try to download the other one.
I was using private facebook downloader
could someone help me with where im going wrong
Can't tell what programming language this is (Python?), but the feedback you're getting is saying that you're currently trying to do a "true/false" test with your Series
What type is 'mycursor'?
Can you type in your console 'type(mycursor)'?
Right I see so it's its own class (I don't know what I expected haha). Okay well the debugger there says that the problem is happening on your line 25, when you try and execute your variable. Hopefully someone who knows this package here can help you but if not, I would find the documentation for the package and work with it
thank youu
anyoneeee knows a software for downloading private videos on faceboooook?
hey does anyone know what im doing wrong i want to make an multiplication table but i want it to work for the parameters im calling now it just adds everything to a big string but i only want it to work for the spevific parameters heres my code python btw ```def table(n, m):
global final
l = 1
while l <= m:
if n == 3:
final += str(n) + " x " + str(l) + ' = ' + str(l*n) + '\n'
elif n == 4 and n != 3:
final += str(n) + " x " + str(l) + ' = ' + str(l*n) + '\n'
l += 1
final = ''
table(4, 5)
table(3, 10)
print()
i dont know what i tried with the if statements but i was trying to figure it out
Hey @idle dew , do you have a pic of the output?
the output for the first call should be '4␣x␣1␣=␣4\n4␣x␣2␣=␣8\n4␣x␣3␣=␣12\n4␣x␣4␣=␣16\n4␣x␣5␣=␣20\n' and for the second call it should be '3␣x␣1␣=␣3\n3␣x␣2␣=␣6\n3␣x␣3␣=␣9\n3␣x␣4␣=␣12\n3␣x␣5␣=␣15\n3␣x␣6␣=␣18\n3␣x␣7␣=␣21\n3␣x␣8␣=␣24\n3␣x␣9␣=␣27\n3␣x␣10␣=␣30\n'
but now when i call it the second time its '4␣x␣1␣=␣4\n4␣x␣2␣=␣8\n4␣x␣3␣=␣12\n4␣x␣4␣=␣16\n4␣x␣5␣=␣20\n3␣x␣1␣=␣3\n3␣x␣2␣=␣6\n3␣x␣3␣=␣9\n3␣x␣4␣=␣12\n3␣x␣5␣=␣15\n3␣x␣6␣=␣18\n3␣x␣7␣=␣21\n3␣x␣8␣=␣24\n3␣x␣9␣=␣27\n3␣x␣10␣=␣30\n'
how about the global variable final? you added your previous result in final and it was not cleared when you call table() second time, so its result is all gathered
clear the value of final before calling table(3,10)
Thank you so much it worked 🙂
hey guys is someone here that has proteus 7 installed and can open a file for me?
does anyone know why it doenst add 3 to the string? ```def count(a, b):
print()
if a >= b:
return ''
else:
partial = count(a+1, b-1)
return str(a) + partial + str(b)
a = 0
b = 6
s = count(a, b)
print() ```
When i get rid of the equal sign it gives me an error
nvm
Hallo i have a problem.
because of return ''
when a and b become 3, it returns nothing
and i dont know what error was occurred, because you didnt attach the error message,
but it seems that it has an ambiguous condition to finish its recursion.
we know your intention was 0123456 but your computer doesnt know that.. it keeps calculating a=4, a=5...so on and returning ''. MAYBE this is the reason of your error
Hey Bois I am a bit confused with Java, what exactly is a class and a constructor?
a class is just a way of organizing methods/variables in their own instance, and a constructor is a way you can specify the creation of a class
like
class C {
int x;
}
has its own variable called x
and you could specify the value of x if you add a constructor:
class C {
int x;
public C(int y) {
x = y;
}
}
so if I were to make 2 instances of C
C first = new C(5);
C second = new C(6);
first.x = 5
second.x = 6
so, "first" and "second" are defined as the same type of thing (the same class), but they can have different values for their variables
with constructor you create an object of that class
you can create many of them
If you know lists think about them
ArrayList<String> list = new ArrayList<>;
basically you create an arraylist object
God bless you brotheman!!!
Thank you brother!!
expired_A = []
name = input ("Please input your name")
import datetime
#date_string = input("Input date of joining. It must be in the format: DD-MM-YYYY")
format = "%d-%m-%Y"
current_date = str(datetime.date.today())
print("Today is: ", current_date)
current_year,current_month, current_day = current_date.split("-")
current_day = int(current_day)
current_month = int(current_month)
current_year = int(current_year)
#Gets and validates the date of joining
join_date = input ("Enter the date of joining in the format DD-MM-YYYY ")
correct_join_date = False
while correct_join_date == False:
try:
datetime.datetime.strptime(join_date, format)
print ("This is the correct date format.")
correct_join_date = True
except ValueError:
print("This is not the correct date format.")
join_date = input ("Enter the date of joining in the format DD-MM-YYYY ")
#Splits both dates up into their day, month, and year
join_day, join_month, join_year = join_date.split("-")
join_day = int(join_day)
join_month = int(join_month)
join_year = int(join_year)
#Compares them and outputs whether the date means they have expired or not
if join_year == current_year or (join_year == current_year -1 and join_month > current_month)or (join_year == current_year -1 and join_month == current_month and join_day > current_day):
print ("not expired")
else:
print("expired")
The name of the user who's membership has expired should be appended to a list. This list contains names of user who's membership has also expired. How do make this happen?
Please ping in reply.
...
if join_year == current_year or (join_year == current_year -1 and join_month > current_month)or (join_year == current_year -1 and join_month == current_month and join_day > current_day):
print("not expired")
else:
print("expired")
expired_A.append(name) # Add this line
Can someone help me? How to trace someone who hacked my account on facebook? 😭
wdym by trace?
trace the location
focus on getting your account first
after getting it you can just check the log history
ooo alright, thank youuuu
does anyone know how to resolve this
i checked stackoverflow but i can't seem to find anything that works
Thank you!

based on the website
they will only see the analytics if they share the recordings externally or internally
she might know that someone recorded but based on user privacy, she won't know that you're the one recorded
You are probably using 'and', 'or' in a pandas apply function. Change it to '&', '||'.
PS: Best to give more details like what you are trying to do and a bit of context when asking questions.
Any cis/cs/it students? If so , can someone tell me what kind of jobs a network specialist/network engineer can have?(soz my eng is bad)
anyone has experience with pandas(python)
Hey thanks, i've resolved it now. Turns out it was because it needed to be in a tuple
Can anyone give me some advice on Computer Science degree? I've been thinking of taking it.... Opportunity, Growth and Salary wise what do you guys think about it?
Also advices for me while studying on it?
what you want to ask
is there any way to undo the groupby
i groupby to filter some rows (and as u know group use the column that you grouped by as a indexes ) i want to remove the indexing (i used the reset_index it worked for removing the index but the df stayed grouped by the column that i chose)
hey ace! i am a current undergrad studying computer science. depending on how much you know already (have you ever written code vs. what kind of tech interests you), one thing is probably chase what you are interested in within the computer science field. I knew nothing about the field a year ago, but now I've evaluated what I love to do personally and I was able to direct that towards topics such as software engineer as well as data retention concentration within the computer science "umbrella". Thinking that through has really helped me in my journey for a degree and a career afterwords. As for growth/salary etc I don't know too much about that.
I'm a computer science graduate from University of California and applying for jobs rn
be ready for sleepless nights to debug your program and doing many labs
Must understand algorithms (data structures and OOP) and many math behind it.
You will need internships and software portfolio to back up why companies should hire you
Be sure to attend hackathons to make projects and network with recruiters
Sometimes it will be fun and hard, but after getting a job it is much easier to land future jobs
Depends which company you work for, the work life balance is different.
Your salary will be competitive, but it depends how many company offers you get.
You can use your offers to leverage negotiations to increase your salary.
There will be a lot of opportunities after you land a few jobs because of your experience
@rocky briar @solemn mesa Thanks for your insights guys! ❤️
@rocky briar what do you think about emerging blockchain tech?
is anyone here good at c++ programming? im trying to finish a lab for my class and I am struggling to figure out how to write one line that I think would fix all of it
Hi
Ask the question
I have some python code that I'm supposed to "translate" into pseudocode. The python code contains (is.alpha). What should I do? Do I keep it as it is in the pseudocode or do I just input the name without is.alpha validation?
Please ping in reply.
I also have the function (.split) and "import datetime"
Do I include those in pseudocode?
And I also have a "while..try...except structure". What do I do with that one?
same for me lol
lmao
hi guys any good resources to learn stata?
btw i dont understand what is egen for.... 😦
The same thing happens with char arrays. When you write cout<<charArray; what you have stored in the string is written and not the memory address of the first element of the array as it happens with integer type arrays
#include <iostream>
using namespace std;
int main(){
char name[20] = "Albert Einstein";
cout<<name<<endl; //Console shows Albert Einstein
int _array[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
cout<<_array<<endl; //Console shows the memory address owned by the first element of the array.
cout<<*_array<<endl; //Console shows the data stored in the memory address of the first element. Writes 1.
return 0;
}
Hope this can help you!
Can anybody tell me, why the loop is repeated one more time than it should be?
I know it has something to do with the stream and its buffering, but i dont know exactly why
std::string sd;
while (std::cin){
std::cin >> sd;
strstr << sd << " ";
}```
Me and a friend is doing our thesis on webbdesign and we would kindly ask if you could spend 2-3 minutes on our form, it would really mean a lot!
At least you have to create an English form if you want to ask in international server
it's both swedish and english instructions
Guys I have a question
Can anybody help me ?
Let's say You are a government and You have an exam website and it takes lots applications from students and there is a place that students wants to take their exam and someone reaches that govermental exam web site's main server and makes himself registered that place Can somebody answer ?
Is it possible
count = 1 #my counter and its first value
sum = 0 #accumulator and its first value
while count <= 10:
sum = sum + count
count = count + 1 #increment the count by one
print(str(sum) + " is the sum of one to ten.")
how do i make it so that it prints the sum after each number?
HELP
Try to put print below the sum variable. It will be like:
count = 1 #my counter and its first value
sum = 0 #accumulator and its first value
while count <= 10:
sum = sum + count
print(str(sum) + " is the sum of one to ten.")
count = count + 1 #increment the count by one
The output will look like:
1 is the sum of one to ten.
3 is the sum of one to ten.
6 is the sum of one to ten.
10 is the sum of one to ten.
15 is the sum of one to ten.
21 is the sum of one to ten.
28 is the sum of one to ten.
36 is the sum of one to ten.
45 is the sum of one to ten.
55 is the sum of one to ten.
If that's what you're looking for
Oh i already solved it but thanks
same output
# A series of marks is to be entered and averaged.
# Before you enter the series you are to have the
# program ask you how many marks there are in the series then
# read it in. Test your program to see that it works for a series of
# different lengths, say four marks or six marks.
im having trouble doing this oneee
i can do it with for loop but not while
@wheat silo (sorry for pinging you)
Why while? have you tried it yourself? (I'm asking this since it seems like an assignment from your class) ping me again with your lines of code in it so I can assist you
homework
its an activity which composes of tasks that we're asked to code using the while loop
The series in array 1D?
its beginner python so i dont know what that is lol
Ah, my apology, give me 3 mins
its all good
Can you elaborate on which part the while you want to use in this case?
While will be use to count the length or to average? it sounds like it has 2 problems: size of the series and find the average
for lenght (i think)
but the output might look something like this
thats for my for loop
u there?
Ah, this is how you want it to looks like, I was thinking it looks like a list as series [95, 99, 80] as input
oh not list
So you have done it this way, you basically already solved it, just change for loop into while use the number of marks
n_mark = int(input("input number of the marks:"))
sum = 0
count = 1
while count <= n_mark:
input_mark = int(input("Please enter mark number: "))
sum += input_mark
count += 1
avg_mark = sum / n_mark
print(str(avg_mark))
i kinda dont get the sum part
but thanks
sum is just add each mark, since the while doing the loop until it satisfied by the n_mark
let's say we fiil n_mark by 2, then we add 11, sum = 11
then back to the top again, we add 11, sum = current sum + sum just added, sum = 22
sum += input_mark is another way of writing sum = sum + input_mark
some help here.....there's a bug in my code....
can you give more detail than that....
it's not printing anything
def fractional_part(numerator, denominator):
number = 0
if type(numerator) is int and denominator != 0:
number = (numerator/denominator)-(numerator/denominator)
else: print("Seems like numerator isn't int and denominator is zero.")
return number
is , a keyword in python to check the object is the same or not.
Also, in python we don't have to define the type of the variable all the time unless we need it to do it in explicit way.
The output of 5, 5:
0.0
5 BUKU YANG IMPROVE HIDUPKU | BOOK REVIEW 2022
https://youtu.be/3DU_AMLYMrc
Berikut adalah 5 buku yang aku baca dari tokoh-tokoh hebat di dunia, pelajaran yang ku ambil dan opini aku tentang buku tersebut. Simak videonya dan aku harap video ini dapat menginspirasi dan memotivasi semuanya. Hard work, works...
😎ABOUT ME😎
My name is Jhavier and I'm a 16 year-old digital creator. I am currently a high-school student and wi...
oh srry i forgot to reply. It is very powerful. I attended a hackathon recently that is blockchain focused. Def read about blockchain itself and about bitcoin (eliminating the middle man and only need trust from two parties now)
Later in your life, blockchain can be used for many things
Making agreements for goods or services
Concrete evidences for purchases etc
Can somebody answer its possibility
government websites won't let them to do that easily, because otherwise it's really easy with injections and stuff. Probably you will need physical access for that, but in any way it's a crime lol
It totally depends on the security of the system
you mean infinite loop of x^2?
can someone help with this problem
isnt the whole point to check whether a[i] - a[i-1] is less than b[i]-a[i-1] if its less than then dont swap but if its greater than then you swap a[i] with b[i]
ad hoc problems be like
!!!SOS!!! Does anyone know OCaml here?
If you know a good tutorial that how to search, filter in txt files in python, please share. I know how to write and read but dont know how to search and work with them
you mean search a text in files or search a files
Write a program that outputs the sum from 5 to 15 inclusive.
what does it mean by inclusive??
count = 5
sum = 0
while count <= 15:
sum = sum + count
count = count + 1
print(f"The sum from 5 to 15 is {sum}.")
HELPPPP
Is there a way I can write a function in c where a user inputs multiple inputs in the command line? For example inputting a char command and an integer separated by a space. (i <space> 6)
so basically what will happen is i is a function called insert, and 6 is the value that'll be inserted
i think it means to add up all of the numbers from 5 to 15
i.e. sum = (5 + 6 + 7 + 8 + ... + 15)
thanks
i have one more question
# Ask the user for an integer at which to start counting.
# Ask the user for an integer at which to stop counting.
# Count from start up to stop by 1s. Also try to make it count by 2.
startValue = int(input("Enter the starting number: "))
stopValue = int(input("Enter the stopping number: "))
while startValue <= stopValue:
print(startValue)
start = startValue + 1
how do i make it count by 2s
in the print statement
i know in for loop you could just
for i in range(1,10,2):
print(i)
@strange zodiac
i believe you can just ask for another input of how much it could count by
so you can just replace that line in your while loop start = startValue + countBy
oh not in the print statement?
wdym in the print statement?
i dont think so
cause that print statement is there to print out the values at which it is counting by
so it displays the numbers startValue = 1 stopValue = 5 it will display
1
2
3
4
5
alright i get it thanks
yeah if you want you can make it so that if the user doesnt input a value for the countValue make it default to 1
how
i only know a little bit about python but i believe this should work
oh lol i think its alright now
btw i noticed you have the philippine flag in your bio....im just wondering, are you a filipino?
yes sirr
Search a text in files
f = open('demofile.txt', 'r')
for x in f.read():
if x == 'a':
print(x)
does anyone know haskell and also how an idea about binary trees?
Also, you can use in
f = open("demofile.txt", "r")
for line in f.read():
if "cat" in line:
print("file contains the word 'cat'")
I wanna upload a pdf of 20kb but apparently the minimum file size should be 50kb...what shloud i do to increase my file size??
the only thing i know of might be increasing content within the pdf... maybe add a few images? hmmm
Kk thank you
:)
Create a two-dimensional dynamic array of size n by m
swap the last encountered row whose sum of elements is zero with the first encountered row, all elements of which are positive and odd if there are none, do not change
input
6 4
1 -8 2 5
1 4 8 -9
3 -2 -3 2
1 9 3 5
9 -4 4 -9
7 9 3 5
output
6 4
1 -8 2 5
1 4 8 -9
3 -2 -3 2
9 -4 4 -9
1 9 3 5
7 9 3 5
There may be problems with translation, but i think it is clear
C++
Help please
Anyone good at coding kindly ping me : )
Ask for a student’s name. Then repeatedly ask the user for a mark,
and it calculates the sum at the same time. You can print
out the current sum as you go to test if the sum is working
properly. If the mark entered is less than or equal to negative 2, or
greater than 100, then it will say “invalid input” and it is NOT added to the
sum. When the input is -1, it finishes asking for the marks and outputs the
student’s name plus how many valid marks were entered and the sum.
name = str(input("Please provide your name: "))
sum = 0
while True:
mark = int(input("Enter the mark: "))
sum += mark
if mark <= -2 or mark > 100:
print("invalid input")
continue
elif mark == -1:
print(f"{name}{mark}.")
break
NVM solvedit
how to improve the accuracy of svc ?
check your dataset if they're fit well with your training model
I managed to do it by changing the gamma to auto and C to 14
Hi.. anyone has knowledge in LabVIEW to Arduino Interface? can someone please explain to me this code? Thank you!
hey
i need to edit something on my computer that is greyed out (i guess because of administrator permissions) but i am logged in as administrator and even if i log in separately as administrator, it wont work. is there a solution to it?
Hi guys
@everyone I'm going to start my studies with html, does anyone have knowledge of this language?
bro really tried tagging everyone
yes
hey
I have this old hp compaq 6910p. The screen started doing this a few years ago and I thought that the flex cable had a problem, but I checked it and it was ok. Is there any other way to fix it or should I just buy a new screen.
@proud sequoia - Your probably going to want an invest in a new screen. Have you applied abnormal pressure to the screen recently?
@void halo No I don't think so. This started to happen a few years ago so I don't remember clearly.
polska gurom🇵🇱
ow it can work in grep, you use something beyond the basic pattern syntax, which you can enable with -E or -P (depending where this syntax falls under), on grep
https://fabianlee.org/2021/01/09/bash-grep-with-lookbehind-and-lookahead-to-isolate-desired-text/ (so grep -P it is, and grep -Po if you only want the capture)
gotacha thanks
Who can help me solve this problem? When I go to the task manager, I find that the program is still in the state of execution even if I press the end task, the problem is temporarily resolved, with just a slight modification to the code, the problem returns again
Always stop running the application before your rebuild
You can't. There is always something in the array. In some cases it will be junk data, in other cases it will be initialized to 0 (or respective 0-value for data type), depending on scope.
i think you missunderstood between [ ] and []. space letter is a string, it don't present any kind of empty or null value. If you want to check an array is empty, use includes(arr) when arr = []
Hi! Does anyone knows how to use COMSOL multiphysics or have resources for beginners in COMSOL?
total noob at learning javascript, however I am familiar with python and java. Can anyone explain what this line would mean? :
const counter = (month, day, year, num)
like I believe its a constant variable called counter but are the parenthesis enum types or...?
Is it just a declaration of multiple constants?
is there any data scientist student here? i have a issue concerning data preparation
May I know what kind of data? I'm familiar with images
time series
anyone here used the Crypto.PublicKey package before
im having an error
when i try to install pycryptor it gives this error
ERROR: Failed building wheel for pycrypto
Sorry I haven't tried to work with that data
Does someone knows django ?
my computer is so slow. I run arch linux on it but don't know how to speed it up
me :)
we could vc if you'd like. I'm guessing you use arch linux or something?
anyone here that could help me with my Java project?
Depends, can you shoot me a dm about it
What language?
ik in cpp there is a member function for arrays, empty, which will return true if empty and false if not
not sure of other languages
quick question to u guys, what laptops do u recommend to run linux on?
i want to run arch like as a daily os and have been wondering what laptop would be best for it, i was thinking of getting a system76 laptop so it was like a fully fledged linux laptop but not sure what exactly works best
Does anyone know how can I divide a picture box of windows forms with c#? I need to divide the image and then if I enter the mouse on the image it would detect which part is
hello
i tried to solve this, my code is working same input and output but when i submit it's saying wrong. can anyone tell me what i did mistake?
here is the code
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a >= 1 && a <= 9 && b >= 1 && b <= 9 && c >= 1 && c <= 9 )
{
if (a == b)
{
if (b != c)
{
printf("Yes\n");
return 0;
}
}
else {
if (a == c)
{
printf("Yes\n");
return 0;
}
}
}
printf("No\n");
return 0;
}
what is a,b,c. As i understand it a,b,c, is 0 atm
@idle dew I think you are missing the case where b and c are the same
Heyy guys I need some help in coding for OOP for C or C++
How do I write a program for the solution of heat or wave equations. Using at least one object oriented programming concept.
Thinkpads are probably your best bet, what kind of work?
Is anyone able to help me with some programming? Or could anyone direct me to some programming discords where I would be able to ask for help? I currently need help with Java data structures
anyone here familiar with LOGO
or anything similar
is there a way to add temp sensory onto this?
jus computer engineering coursework and some youtube videos and stuff
i wanna run arch
I don't know if I can share a link to the server here. Just search coding den
Probably a t460 thinkpad they're pretty cheap
Hello can someone help me to do a working summary? i don't even know how to start (in html/css/java)
(ping me pls)
`You will be given a list of tuples where each tuple indicates a point i.e. (x, y) in a 2-dimensional coordinate system. You need to write a python program to find the minimum distance and the point that is
closest to the origin i.e. (0,0)
Hint: The formula of distance = √((Δx)2+(Δy)2 )
As you are calculating the distance from the origin (0,0), you can simply use distance = √(x2+y2 )
You can create a list of distances from each point and sort that list using your personal
favorite sorting algorithm.
Sample Input 1 points = [(5,3), (2,9), (-2,7), (-3,-4), (0,6), (7,-2)] Sample Output 1 Minimum distance = 5.0
Here the closest point is (-3,-4) which has a distance of 5.0 from the origin.
Sample Input 1 points = [(1,7), (4,5), (-1,7), (-2,0), (1,1), (5,-1)] Sample Output 1 Minimum distance = 1.4142135623730951 Here the closest point is (1,1) which has a distance of 1.4142135623730951 from the origin.`
Can anyone help me with this problem? I have to use selection sort or bubble sort to solve this problem. I tried to use sort in nested list but was generally error
`points = [(5,3), (2,9), (-2,7), (-3,-4), (0,6), (7,-2)]
list1 = []
for i in points:
sum = (i[0]**2+i[1]**2)**0.5
list1.append(sum)
for i in range(0,len(list1)-1):
for j in range(len(list1)-i-1):
if list1[j] > list1[j+1]:
temp = list1[j]
list1[j] = list1[j+1]
list1[j+1] = temp
print(list1)
print("Here the closest point is ""which has a distance of",list1[0],"from the origin.")`
This is the code I wrote but couldn't able to print the tuple
What was the error?
Tried to use selection sort in nested list got error int type not subscrible tried to fix it but couldn't able to do it
I solved it without using sort but want to solve it with selection or bubble sort
This code worked for me:
>>> [5.0, 5.830951894845301, 6.0, 7.280109889280518, 7.280109889280518, 9.219544457292887]
Yes it works but I have to print the tuple
Output 1 Minimum distance = 1.4142135623730951 Here the closest point is (1,1) which has a distance of 1.4142135623730951 from the origin.
I see, in that case you could use a dictionary, or alternatively also modify the points list in respect to to the sorted one
That would be 2 swap operations in the bubblesort
Tried to do both but unfortunately not worked the code i wrote
Thanks! I will try it again
No problem
How would you do if you use dictionary?
Key:value sort ?
Okayy
what actuators are in a smoke detector??
my head
on a serious note, try to think of a related problem that you solved before and use that knowledge
Is there any formula to find prime numbers in python?
hi guys, in this group can i ask of coding?
I'm kinda beginner so that's why struggling 😅 I created the dictionary key is the points and value is the distance couldn't able to use selection or bubble to sort the dict
Is an i5-3570, gtx 750, 16 gb ddr3 ram enough for programming
lmao my ram is 4gb and have a processor of 1.75 gigahertz and coding is working perfectly fine
what are you using? Visual studio?
Really
yes
Pycharm
oh never heard of that
But I do also use visual
wait are you new to programming?
pycharm is like a notebook type beat
oh hey
can you help me with python?
Yea
I dint know if I should buy a new computer for coding
that wasnt meant for you lol
but yeah im new as well
So what "language" are you learning?
Just python
ohhh same
wouldnt really recommend that but what r u using?
what you trying to do
you using it rn with discord?
yea
like
from graphics import *
nah soz
ok 
hey doods anyone here knows why pip install pycrypto gives an error
;-;
tried easy_install but i still get this ModuleNotFoundError: No module named 'Crypto'
have you seen this?
yeap just fixed it
but pycryptodome doesnt work for me
pip install pycryptodomex
had to use this to work
instead of
pip install pycryptodome
https://github.com/pycrypto/pycrypto follow the steps from Installation topic
rip nvm
i solved all these then realised the chrome update killed what i wanted to do
💀
what a waste of time
never is a waste of time
now you know what not to do
If there is anything with Unity and C#, I will help
If there is anything with web-developing, html/css/js/reacr.js, I will help ❤️
How do you actually learn your cs classes, algorithms or programming in general? I feel its like only memorising lines of code by heart and isn't really intuitive most of the time
Just try writing it by yourself in any online compiler and try to be persistent and focus. Try to understand the code if you are unable to make one yourself and then code it.
Trust me, this helped me try codes myself and the feeling that you get after getting that right output when you write the code yourself... damn man
It takes time but hope you will get there soon.
All the best !
is there any free coding online classes for begginers?
Yeah thats what I've been experimenting with. Thanks though !
No worries dude
Take your time as much as you want and never give up.
All the best
Which programming language you are looking for ?
Python
You should check out Corey Schafer in youtube, he's best python instructor in yt
With his videos I finished University of Helsinki Mooc Introduction to programming with python course, which is free and great resource.
Indian ?
?
Where are you from ?
🇳🇵
You can follow Code With Harry Playlist of Python
In this Python tutorial I will show you how to get started with python and install required tools and setup to write python code fast!
This video is a part of my python for absolute beginners playlist - https://www.youtube.com/playlist?list=PLK8cqdr55Tss0puRoHDBagvj7Qjin9axl
Thx guys
Nw dude
Happy Learning 😇
canvas
Hi all, for DT I'm designing a product that solves an issue regarding outdoor living, please would you fill out the form and give feedback.
https://forms.office.com/Pages/ResponsePage.aspx?id=KnCM0kpQHE-bTQcQXr9pSbK0x2_XvmNAtjVIPQwJCd1URjNKQlpXM1VZVk1PNlhBRlJEWTVJVkJNSy4u
anyone here uses jupyter hub
Do y'all guys defrag the disk ?
depends bro , for hdd is good but its harmful for ssd so know which one you are having first
I've hdd
then its good to do
Nice
dont need to conciously think about defragging it doe cause many people dont do it and its still fine
Nice thanks for info bro
Hiiii I'am a little bit confused of why my program doesn't print a string("x2") .Could someone please help me with it ? ```c++
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
void minuscolizza(string &s);
int main()
{
string x;
cout<<"inserire il messaggio"<<endl;
getline(cin,x);
for(int i=0;i<x.length();i++){
if((x[i]<'A' || x[i]>'Z') && (x[i]<'a' || x[i]>'z')){
x.erase(i,1);
}else if((x[i]=='k') || (x[i]=='K')){
x.replace(i,1,"c");
}
}
minuscolizza(x);
cout<<x<<endl;
char mat[5][5];
int c=97;
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
mat[i][j]=c;
c++;
if(c==107){
c++;
}
}
}
string x2;
for(int p=0;p<x.length();p++){
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
if(mat[i][j]==x[p]){
int temp=0,temp2=0;
do{
x2=x2+'.';
temp++;
}while(temp!=i);
x2=x2+' ';
do{
x2=x2+'.';
temp2++;
}while(temp2!=i);
}
}
}
}
cout<<x2<<endl;
return 0;
}
void minuscolizza(string &s)
{
for(int i=0;i<s.length();i++){
if(s[i]>='a'&& s[i]<='z'){
s[i]=s[i]-32;
}
}
}
Please explain what your code should be doing when submitting a question, and add comments where needed
I don't know C++, but consider this code
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
void minuscolizza(string &s);
int main()
{
string x;
cout<<"inserire il messaggio"<<endl;
getline(cin,x);
for(int i=0;i<x.length();i++){
if((x[i]<'A' || x[i]>'Z') && (x[i]<'a' || x[i]>'z')){
x.erase(i,1);
}else if((x[i]=='k') || (x[i]=='K')){
x.replace(i,1,"c");
}
}
minuscolizza(x);
cout<<x<<endl;
char mat[5][5];
char c=65; // <= Look at this line, and consider the implications
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
mat[i][j]=c;
c++;
if(c==107){
c++;
}
}
}
string x2 ="";
for(int p=0;p<x.length();p++){
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
if(mat[i][j]==x[p]){
int temp=-1,temp2=-1;
while(temp!=i){
x2=x2+'.';
temp++;
}
x2=x2+' ';
while(temp2!=i){
x2=x2+'.';
temp2++;
}
}
}
}
}
cout<<x2<<endl;
return 0;
}
void minuscolizza(string &s)
{
for(int i=0;i<s.length();i++){
if(s[i]>='a'&& s[i]<='z'){
s[i]=s[i]-32;
}
}
}```
does anyone got any guides or hacks to cracking dating apps? i see some SWE using auto swipe bots and response AI's, i need something like that.
Does anyone know a tool for converting HTML to XHTML 1.0 Strict?
There are some general style points that I would make:
With the use of an additional string for holding processed input, you could use a range-based for-loop to process the input. Also, there are inbuilt functions that will handle a lot of the processing you want, e.g., isalpha(character) is a lot cleaner and clearer than (x[i]<'A' || x[i]>'Z') && (x[i]<'a' || x[i]>'z'). Replacement of K's with C's can be done with the conditional operator.
string temp_input_string{};
string input_string{};
cout << "inserire il messaggio" << endl;
getline(cin, temp_input_string);
for (auto character : temp_input_string) {
if (isalpha(character)) {
character = toupper(character);
input_string += character != 'K' ? character : 'C';
}
}
This is C++, not C, so use a vector unless you have a good reason not to. You can replace your 5x5 C style array with a 5 element vector of strings. Also, replace the magic numbers with what you actually mean 'A' and 'K' (or 'a' and 'k') not 65 and 75 (or 97 and 107), this is quite an important point since your mistake would have been easier to spot if you wrote it this way. A good rule of thumb here is "say what you mean".
vector<string> mat(5, string(5, ' '));
char c = 'A';
for (auto& row : mat) {
for (auto& character : row) {
character = c;
c++;
if (c == 'K') {
c++;
}
}
}
I'm not sure if I got the last part right, because, I'm not entirely sure what this was supposed to be doing. However, the redefinition of mat above allows use range-based for-loops again, and using strings in mat allows us to use the find function from <algorithm> to find the index of any place in the row that matches the current character in the input string.
string dot_string{};
for (auto input_character : input_string) {
for (auto row : mat) {
int idx = row.find(input_character);
if (idx != string::npos) {
dot_string += string(idx, '.') + ' ' + string(idx, '.');
}
}
}
Does anyone here have access to IEEE articles? I need this one but it's not available on schi-hub and I'm running out of time. https://ieeexplore.ieee.org/document/9509714
In this paper, we propose a system that will analyze the speech signals and gather the emotion from the same efficient solution based on combinations. This system solely served to identify emotions present in the signal or speech using concepts of deep learning and algorithms of machine learning (ML). Using the above mentioned, the system will d...
oh hello, i have 🙂
Anyones good in c++ and can help me with a problem?
can somebody tell me why I have margins to the left and right. I want my navbar to go from one end of the screen to another. here is my code. Don't mind the commented parts.
<template>
<v-app id="inspire">
<v-app-bar app flat color="white">
<v-container
class="py-0 fill-height"
position="absolute"
style="border-bottom: 0.5px solid; border-color: #828282"
>
<!-- <img class="mr-0 pa-0" src="./assets/Migaku.png" height="100" /> -->
<v-spacer></v-spacer>
<!-- <v-avatar class="mr-10" color="grey darken-1" size="32"></v-avatar>
<v-btn v-for="link in links" :key="link" text>
{{ link }}
</v-btn> -->
<v-btn icon color=" #828282" to="/">
<v-icon>mdi-home-outline</v-icon>
</v-btn>
<v-btn icon color=" #828282" to="/map">
<v-icon>mdi-map-marker-outline</v-icon>
</v-btn>
<v-btn icon color=" #828282">
<v-icon>mdi-plus-circle-outline</v-icon>
</v-btn>
<v-btn icon color=" #828282" to="/account">
<v-icon>mdi-account-circle-outline</v-icon>
</v-btn>
<!-- <v-responsive max-width="260">
<v-text-field
dense
flat
hide-details
rounded
solo-inverted
></v-text-field>
</v-responsive> -->
</v-container>
</v-app-bar>
I tried px-0 and mx-0 but it doen't work
a friend of mine has been facing this error in the server since yesterday, he had left the server a day ago but on joining again, he isnt able to access the general chat room, I did tell him to do a lot of stuff but none of it seems to work
does anyone here have any clue? thank you in advance.
these are the only available rooms in the server for him.
- Check all the "mute" roles, waiting a few seconds between each check, then uncheck them all.
- Leave the server and get invited again
Those seem like basic steps, but last time I answered a question like that, the dude hadn't tried those 🤦♂️
thanks mate.
Hey guys,
I'm trying to write a program in C, but I just can't figure out how to use pointers in order for everything to work properly. The program is supposed to be a snake game, but I can't even run it sadly. I've been stuck on this problem for a long time now if anybody could help me some way it would be greatly appreciated. Please note that the program is incomplete, that's why some parts seem unnecessary.
does anyone know how cplex works in java? Need help
I've found a couple of issues with your code:
In the function moveLeft you are calling the positionSnake function as:
positionSnake(snake.bodyX[i] - 1, snake.bodyY[i], slots);
This should be:
positionSnake(snakeptr->bodyX[i] - 1, snakeptr->bodyY[i], slots)
In the positionSnakeHead and positionSnake functions your input to the functions is char* slots however in the function you call this as slots[x][y]. If you send the 2D array slots to this function as char* then the function does not know the size or shape of the array, thus slots[x][y] means nothing to it. You can either modify the function to take a 2D array or keep the char* by indexing it as you do in printGame.
Throughout the move functions you use: snakeptr->bodyX[SIZE] and snakeptr->bodyY[SIZE] repeatedly. SIZE is defined as 2, and you appear to be using this to access the last element in each array. But 2 is the size of the arrays bodyX and bodyY, the last element has the index of 1. Because indexing in C starts from zero, the last element is always N-1, where N is the size of the array.
You should replace every instance of snakeptr->bodyX[SIZE] with snakeptr->bodyX[SIZE-1], and every instance of snakeptr->bodyY[SIZE] with snakeptr->bodyY[SIZE-1].
After all of the changes made above the code compiles for me.
I really appreciate your help!
man deserves a free coffee
fr 🤣
:flushed: only 13+ :flushed: are allowed to look at my about me :smirk_cat:
hi, I've just made a program to count the number of prime numbers in a given sequence of integers. it's written in c++, and I'd really appreciate it if someone could help me check whether it's okay. thx a lot, happy studying guys 
here's code: (N is for the number of inputted integers, c is for the total count at the end, d is the number of divisors of a given number in the array)
#include <bits/stdc++.h>
using namespace std;
int N, n, i, c=0, d;
long long a[100000];
int main()
{
cin >> N;
for (i = 0; i < N; i++)
{
cin >> a[i];
d = 0;
for (n = 2; n <= a[i]; n++)
{
if (a[i] % n == 0)
d++;
}
if (d == 1)
c++;
}
cout << c;
}
the logic for your code is fine, but you don't need to count the number of divisors
once the condition if a[i] % n == 0 you already know it isn't a prime number
so you just can do c++ immediately and move on
the variable d doesn't do anything given what you want to do
didnt start learning C++ yet and it already hurts my brain lol
You don't need to check all the way to a[i], if you haven't found any factors less than or equal to sqrt(a[i]) then there won't be any factors greater than sqrt(a[i]). Also, you can check for divisibility by 2 separately, if a[i] is divisible by two then it is not prime. If a[i] is not divisible by 2 then it won't be divisible by any even number, so you don't have to check for divisibility by any other even numbers.
I’m a bit rusty so don’t take this as gospel truth, but here is how I would approach solving this problem. First, substitute the given C and k into the definition of what it means for f to be O(g).
|x^2 -8x + 26| <= C|x^2|, for all natural numbers x > k.
As an example, for question 2(e) part i., with C = 1 and k = 4, this gives:
|x^2 -8x + 26| <= |x^2|, for all natural numbers x > 4.
For this equality to hold, -8x+26 would need to be:
• less than or equal to 0 (to make f(x) less than or equal to x^2), but also
• greater than or equal to -2x^2 (so that you don’t end up with negative values so large that their absolute value is greater than x^2).
You can split this into two cases that you prove separately:
-2x^2 <= -8x+26, and
-8x + 26 <= 0
You must show that both of these inequalities hold as long as x > k, which for this question means natural numbers x > 4.
When I worked through this, I found that the first holds for all real values of x. The second holds for values of x greater than or equal to 3.25. Both of these sets of values include all natural numbers greater than 4, which would mean that this one is true.
thx for the suggestion. i have tried that but then i realised that what i want to count is prime numbers, not non-prime numbers which can be counted using if a[i] % n == 0 XD can i do something like c = N - c at the end instead?
my teacher also guided me to do it like this. yet i couldnt understand it so i just tried making a code by the very definition of prime numbers which can only be divided by 1 and itself lol
You could also consider moving your primality test into a separate function that takes the number you want to check and returns true if it is prime and false otherwise. Then, in your main function, the prime counting would reduce to:
if (is_prime(a[i])) {
c++;
}
You could then have conditional returns from this function that return false when a factor is found that is not equal to the number itself. And, from a software development standpoint, having the implementation of the primality test in its own function would make it easier to optimise and reuse.
wow that seems so much better tbh. learned something new today XD. tysm ❤️
Hi everyone, I'm trying to make a Pokedex in C++ as an assignment, but I can't figure out how to read pokemon data from a .txt file, create objects of a "pokemon" class and then save them to a vector.
My .txt file looks like this:
1 Bulbasaur 6.9 0.7 1 Both Grass Poison;
2 Ivysaur 13.0 1.0 2 Both Grass Poison;
etc.,
basically constructor looks like (number, name, weight, height, numberOfEvolution, gender, type and secondaryType). I would like to know how to create objects using this data in my main() function (it's empty as of now cuz all my ideas didn't work). I'll really appreciate some help <3
Could you post an example of your Pokemon class, and something you tried that didn't work, so that we have something more to work from?
struct pokemon
{
int number;
float weight;
float height;
int evolutionNumber;
std::string name;
std::string gender;
std::string type;
std::string type2;
pokemon (int Number, std::string Name, float Weight, float Height, int EvolutionNumber, std::string Gender, std::string Type, std::string Type2);
};
This is my Pokémon structure
int countPokemon(std::string fileName = "/Users/kuba/Desktop/Projekt/Projekt/Database.txt")
{
int pokemonNumber = 0;
std::string line;
std::ifstream read(fileName);
while(std::getline(read, line))
pokemonNumber++;
std::cout<<"Number of Pokemons: "<<pokemonNumber;
return pokemonNumber;
}
And this is my other function that counts how many Pokémon are there
My main() is completely empty
One of the things I tried is something like this (test version that didn’t work):
std::ifstream test("/Users/kuba/Desktop/Projekt/Projekt/Database.txt");
std::string name, gender, type, type2, number, evoNumber, height, weight;
int number1, evoNumber1;
float weight1, height1;
for (int i = 0; i < 7; i++)
{
getline(test, number, ' ');
getline(test, name, ' ');
getline(test, weight, ' ');
getline(test, height, ' ');
getline(test, evoNumber, ' ');
number1 = stoi(number);
evoNumber1 = std::stoi(evoNumber);
height1 = std::stof(height);
weight1 = std::stof(weight);
getline(test, gender, ' ');
getline(test, type, ' ');
getline(test, type2, ' ');
pokemon test (number1, name, weight1, height1, evoNumber1, gender, type, type2);
}
Do you also have the implementation of the pokemon constructor?
I have this in my pokemon.cppfile:
pokemon::pokemon(int Number, std::string Name, float Weight, float Height, int EvolutionNumber, std::string Gender, std::string Type, std::string Type2)
{
number = Number;
weight = Weight;
height = Height;
evolutionNumber = EvolutionNumber;
name = Name;
gender = Gender;
type = Type;
type2 = Type2;
}
@everyone Fellow programmers do you have any forums for the Minimax thingy, I kind of need to make an AI.
First, change the names of the ifstream and the pokemon objects that you are creating, these shouldn’t have the same name and there are much better names than “test” for both of these objects.
Second, make sure that your file is actually being read. If your ifstream is called file_in, then this can be done by calling: file_in.is_open() if this comes back as false then the program cannot find the file.
Third, check the line: getline(file_in, type2, ' '); You will notice that type2 becomes something like “Poison;\n2”. This getline is reading all of the way to the next space, which it is finding in the line for the Ivysaur, after the pokemon number. This is the reason for the 2 at the end of “Poison;\n2”. The next time the loop runs it will read up the next space, which means that “Ivysaur” is loaded into the string number. The program then crashes when you try to convert the string “Ivysaur” to an integer with number1 = stoi(number);
A quick and dirty fix for this problem is to change the last getline to:
getline(file_in, type2, ';');
This will read up to the semicolon that you have at the end of each line, and then you can use:
getline(file_in, some_other_string_variable)
This will bring you on to the next line, ready to read the next pokemon.
Thanks, I managed to make it work as intended!
You could try the maths thread for this, but I don't think e^x would work in the first case. e^x is one to one for R to R, but not from R to Z, as there are a lot of real numbers x that f(x) = e^x wouldn't map into the integers. I think that the answer for the first one would be that no such function exists, since every distinct element must be mapped to a distinct element, but I don't think this can be done since Z is countable but R is uncountable.
For the second part, f(x) = x works (I think) as every distinct x in Z gets a distinct f(x) in R (so it is one-to-one) but not every element in R has an associated x in Z (so it is not onto). Also, e^x would work too in this case, in fact, probably a lot of functions would work if my reasoning is sound.
Hello everyone, I am trying to predict which products are more successful in comparison to another, and how much should be ordered per season. I have no idea where to start as I only have information of the end stock per week. Is it a good idea to make an new column 'sales' by subtracting the end stock of each following week?
if number of sales makes a product successful yes that's a good idea
and then you can combine weeks into seasons
Thankyou! 🙂
hey guys, im a beginner in programming, and I wanna learn python, which is the best source for learning that online/any recommendations?
good luck
thanks!
how can help me to find a lesson(Or a video) on language c/c+/c++ and a practice website
im very beginner on this language
i recommend the app sololearn, im learning python with it and it has a lot of other languages there too
^
thanks
Hey! does anyone know some kind of exercises for design patterns? like pair situations to a patterns? thx
Anybody got expierience with gnome extensions?
Im not good at javascript or css, is there any good tutorial
check freecodecamp
What language are you using?
anyone here knows about John Zelle's graphics module? pls help me with it
i'm genuinely confused with the sort
the question says output should be sorted by primary key. but doesn't tell me if the order is ascending or descending.
so does anyone know why it says ascending in the mark scheme?
please ping in reply.
Hello! Does anyone have any idea on the Internet of Things?
c#
I do, what exactly are you interested in learning more about?
I have a 3hr coding exam in a month - I’m a beginner, what’s the best way to practice?
That entirely depends, do you have any idea what is going to be on the test? Is this as part of an interview for a job or as part of a taught course?
Do you guys think that HP envy x360 is worth it for $800 USD?
It’s Intel i7, 15.6 inch screen, 512 SSD + 32 GB Oprah’s, 12GB RAM
I don’t want to regret spending that much money so I need help deciding.
How do i add sound or any music to my python graphics program? I need it because i want to put a sound that triggers when it meets the condition
Good day, people. Does anyone here knows how to use MatLab?
it depends on what you are planning it for and when you need it
are those the specs you MUST have?
how much research have you done and are you are willing to wait for sales
can i ask for you help on getting the values for 10 unknowns using 10 equations? maybe via call?
I'm not available for calls, you can ask your question here, and I'll try my best to help
is it really ok with you? it's not quite few
All I really need to know is are the equations linear or not, please give me an example of a couple of equations in the system.
Anyone who can help me in editing videos
The way to do this is using fsolve which is described in the Matlab documentation here: https://www.mathworks.com/help/optim/ug/fsolve.html. Basically you create a function that contains your system of equations which you write in the form F(x) = 0. For example:
function F = equations(x)
P_MH = 3.43e-4;
P_MM = 5.55e-5;
P_F = 500;
P_R = 500;
P_P = 20;
A_M = 3595;
n_F=550;
n_HF = 495;
n_MF = 55;
% Equation (1)
% n_HF = n_HR + n_HP
% 0 = n_HR + n_HP - n_HF
F(1) = x(1) + x(2) - n_HF;
% Equation (2)
% n_MF = n_MR + n_MP
% 0 = n_MR + n_MP - n_MF
F(2) = x(3) + x(4) - n_MF;
% Equation (3) - Dalton’s Law of Partial Pressures
% P_F = p_HF + p_MF
% 0 = p_HF + p_MF - P_F
F(3) = x(5) + x(6) - P_F;
where the vector x contains the unknowns you are trying to solve for.
You then solve for this by creating a function handle to your function:
fun_handle = @equations;
and then run it using fsolve(fun_handle, x0) where x0 is a vector containing initial values for your unknowns.
Unfortunately, when I run this it tells me that there is no solution, which I think means there is either a problem with the way I have typed in all of the equations or the equations you provided contained an error. Either way you should try this method for yourself and see if you get a better result.
thank you so much! i'll try it now
There is indeed an error in the solution. I still haven't got the solution though.
I just want it for college. I’m gonna to have online exams
I edited the file 🙂
anyone know about VisualStudio?
what help do you need?
Im tryna run a graphics code just for testing but it wont run
did you look up on the internet on how to do it?
Cant find any solutions
which language?
Python
Im using john zelle's module
do you have the required packages installed to run it?
Yes
It works perfectly fine when im using idle
maybe there' some fault in the code you trying then?
does it not show any error when you build?
No
Sorry gotta go to sleep
Just dm about this. Ill look into it tomorrow
goodnight, I don't have anything else to say 😅
I can't see any difference, but the problem may be in equations (4) and (5). These two equations define that P_R and P_P are equal, but the given values say that they are not.
Oh, I see. I'll have to recheck the equations on that. Thanks for still helping. I really appreciate it. 😌
Hello everyone, I'm trying to follow an instruction in programming but I'm not understanding it. Please help my simplified the instruction for me.
`Given an array, write a function that prints values that are greater than its 2nd value in the array.
For example, given [1,3,5,7,9,13], it should print/log 5, 7, 9, and 13. Assume that the array has at least 2 values. Have the function also return the sum of the numbers that were printed/logged.`
I understand the
Have the function also return the sum of the numbers that were printed/logged.
But the rest , I don't.
@ember hinge hey
hello...
Hi~
I'm still trying to understand the instruction. 😅
It's okay
I think I understand it now.
[1,3,5,7,9,13]
The second value was 3. And 5,7,9,13 was greater than 3, so print them.
I just want it for college I’m gonna to
I want to write a code that asks the user the amount of meow they want to print on the screen in c language, where do i go wrong?
put line 7 in a loop from 1 to n
so im asked to do a whole game using C++ as a project, any suggestions on what game should i work on? Game engines?
i got exactly 2 weeks
thanks ^^
Pong
yeah forgot to mention that it has to be kid-friendly, or more like math inclusive game, in which the kid/user has to calc some math problems in order to do a specific action
also i don't even know where to start
how hard/easy do the mathematics problems have to be?
elementary kinda math
addition sub and at max multiplying and dividing
create a interactive math quiz thing
since its c++ use sfml for ui
thought about that but our professor just had to make things harder by mentioning that it has to be a GAME not a just a quiz of some sort
If she allows it you can put your logic in unreal engine, it uses c++ either way
but isn't unreal a bit complex to learn in 2 weeks? is it possible? cuz if so then hell yeah
Yeah idk about that haha really has to do with how much work you can put in
Also really what does the teacher want out of the project
If she wants to see you writing complex logic then you shouldnt think of things such as using unreal
Given ofc that you have 2-3 weeks
If she’s looking to see an actual working game given that it was coded with c++ then definitely unreal is a good idea
You get me?
well yeah that's probably what's going on through her devilish brain
but anyways
if it's possible within 2 weeks(no matter how much time it takes) then i shall take it as a challenge upon mysekf
myself*
Thank ya'll for the help ❤️
I think if you take a day or two to plan what to do not only is it the right way to go about it but it’s required
So if after a couple of hours of research you realize it’s not realistic to go with unreal it’s completely okay
Hey guys, I'm trying to write a function which takes command line arguments(argv,argc) and an array allocated on heap memory as parameter, and it should check if there is a number entered as command line argument and if yes, it assigns it to N as a value, otherwise it asks for a number from the user. Then it should proceed to fill the array with numbers which I did with a for loop. My problem is that it just doesn't seem to work, pointers are the main problem I think. Any help would be appreciated!
int N = 0;
int *array = (int *) malloc(N * sizeof(int));
Scan(argv,argc,&array,N);```
```void Scan(char *argv[], int argc, int **array, int N){
if(argc != 2){
printf("Enter a number!\n");
scanf("%d",&N);
} else{
N = *argv[1];
}
*array = (int *) realloc(array,N * sizeof(int));
for(int i = 0;i < N;i++){
*array[i] = i+1;
}
for(int i = 0; i < N;i++){
printf("%d ",*array[i]);
}
}```
hey I have a little question about data structures in Python. Im trying to create a binary tree that contains the data of a struct I made previously. Can I assign more than one kind of value in a single Node? I want a node to contain data like Name=''Jake'', Year=3, Grade=5. How do I do that?
you need to create multiple objects in that node to store all that info
okay I'll try to do that. Thank you!
guys
it keeps becoming a right angle triangle
how do i make it form in the centre?
like this:
just change number so you can input as you wanted and it should work
the same way you did it here
can some one help me with an user interface in c++ error?
IDLE 😫
ofc lolol 🤤
tysm
N is always zero so why would you allocate memory of size zero?
Can someone help me with my homework question that is related to MOSFETs and explain it to me?
Anya wants some help 😦
you should ask in #science-help or #math-help . This channel most likely for programming development
oh okay, thanks
Hi, folks. Does anybody of you know how to avoid sites from knowing that you've switched tabs?
When a convolutional neural network executes convolution, is this typically done in the spatial or the frequency domain?
can someone help me with a c++ issue? it quite big it would be better discussed in dm
Has anyone received a Bad System Config Info error after booting from another device? I can't do a restore through Windows, I get the error message that iCloud Drive can't be restored and so it aborts the whole operation. I am really getting desperate
I tried about several troubleshooting guides none worked really and I can’t work while I have this issue.
cheers 👌
Hey does anyone has any idea about linux or ubuntu , currently I am using ubuntu but these days it stays much hotter than usual around 55 - 60 C in idle conditions . Has anyone faced this issue before ?
install lm_sensors and see which component is responsible for that
check the documentation of the compiler you're using (and make sure it can target risc-v), gcc or clang would do it
oh you live in Canada by any chance?
i need help with visual studio code
my graphics codes wouldnt run for whatever reason
oh nvm i see that it says EU in one of your roles.....just asking cuz ive had that lesson before
i also asked it here lol
oh XDD
send an sc of the settings
been a while since i used it
been using visual studio professional ever since i've found alot of errors happening while coding on vs code
you there? l
ichanged it to manual but i still have the same issue
oh mb,i thought something was off about my pc so i went to check but it turns out that i just left the pan on the stove
F
anyways
good stuff
and as i said try running the program without debugging
dont kno w how to
the code??
just had to cover some stuff LMAO..
there are two options
run for python file and debig python file
.
nvm just read ur message 💀
oi
Pardon me tomodachi, im just studying rn so my replies are a bit late
But if you can’t find it
Search it up, on where it is
Matter of fact, if none of the solutions work for you just search it up on google
You’ll find everything you need related to coding in general
You’ll probably stumble upon a website called “stackoverflow” which probably has a solution to all your problems, shee might even have solutions for life problems lmao
no, i clicked where the arrow is pointing at and there are two options thats tays python file and debug python file
i did but cant seem to anything related to my problem
I have already done that
are you on the python server?
the people there are rly helpful and knowledgeable, most likely will be able to help you
No
Already solved it anyways
Actually i was in that serve b4 but may have to rejoin again cuz i badly need help with graphics
God, i hate coding
have you guys used azure before??
JavaScript developers average:
does anyone know how and where to get started with learning open source?
at what time should i wake up?????????
Depends in what you want to achieve. 🙂
<@&942391219206647828>
where can ı see how long ım ın a chat?
Hi, is anyone familiar with the program R?
I have some issues and don't know how to solve them
The count variable is still split, and I don't know how to fix it and afterwards I would have to make it into proportions.
So the current dataframe is 2x3 but not in the correct way
Hey did u tried stackoverflow?
as in searching for an answers yes, as in posting my question no
Some body help me make bottom bar in react native?
I want the bottom of this tab when clicked can switch to another screen
I try using createBottomTabNavigator() but it doesn't work, No error log but can't access main screen
"expo": "^45.0.0", "@react-navigation/bottom-tabs": "^6.3.1",
Oh i see, so did u got it ?
so it look a bit more like the table that it should look like, but there is this 1 that is not supposed to be there (under count) and I don't know how to add the rate (which would be M/(B+M) from the previous output)
😅 I am not that experienced in R but maybe that 1 is the column number 🤔
yes I am also not very experienced with it.
I don't really think it is the column number, earlier it had the number of the complete sample
569 or something:D
Hey are why don't u convert it into vector and then convert it into 2d matrix like this https://www.geeksforgeeks.org/creating-a-data-frame-from-vectors-in-r-programming/
because vectors there are used to make data. I already have data given and am not supposed to use c-vector.
I tried to make myself a column with the CancerRate, but that one gave me an error and two is hardcoding which I am not supposed to do -.-
I see 🥲 I hope you are able to solve it Good luck 👍
Yes, I hope so too🥲 🤞 Thank you !!
Does anybody has any experience of increasing the size of EFI partion ?
is anyone free to help me out with something
I got some issue with my laptop :( with suddently frozen the. The screen blackout even i turn off then open it again it wont shown anything even booting logos :(
Everythong works except the screen is blackout @@
Sure
can someone please help with with john zelle's graphics module plss
plsss give me a DM i really need help
Anyone familiar with C that can help explain what the dereference down below means. I kinda know that it is a dereference to a function but I don't understand the (**). Feel free to dm or ping me
void irq_handler ( void )
{
//...stuff
}
*((void (**)(void) ) 0x2001C060 ) = irq_handler
i have a quick question in python:
when doing
m, n = n, m%n
The "m" in "m%n" is the m before we affected it the value of n or after ?
The m is the unaffected value
The explanation is simple, because we assign the value in a continuity and not separately the value of m does not change until the program has been executed.
For example :-
m=n
n=m%n
In this case we assign the values separately so the value has changed.
nah, the program executes the line at the same time
: )
thank you very much!
thanks!
😂 😂
#include <stdio.h>
#define PI 3.14159
int main(void)
{
double radius, volume ;
printf("Enter radius: ");
scanf("%f", &radius);
volume = (4/3)3.14radiusradiusradius ;
printf("volume is : %f ", volume );
return 0;
}
whats wrong in this code
the output is always 0.00000
use %lf instead of %f when passing values to double variables with scanf
yep , thank you
also, in the volume calculation, 4/3 will evaluate to 1, so write "4./3" or "4/3." or "4./3." or cast it to double with "(double)4/3" to get the correct volume
yeah that works too
: )
hello, I'm working on a high school project on the topic of school diary, I enter the student's name and grades in the program, I have the option to show his current grades but I also have the option to change the grade from the subject we choose, there is a problem, when I want to add a new grade and replace it with the existing one and to display it the program shows only 0, can anyone help me? c++
the Codewars has discord server, too. maybe someone will help you (I'm junior and do java, that's all I can suggest at first @plain plover
@idle dew thank you, i will ask for help there too
can you send the code ?
@old lance can I send you the code in dm?
yup ill take a look
a DSPACE(nˆr) complexity is a polinomical complexity? for r in naturals
can sm1 give me an algo for "ask for name , //user enter name(x), welcome(x)...."
in C
yes
#include <stdio.h>
#include <math.h>
int main(void)
{
double radius, volume ;
printf("Enter radius: ");
scanf("%lf", &radius);
volume = (4./3)* M_PI * pow(radius,3) ;
printf("volume is : %f ", volume );
return 0;
}
you can find the value PI in the library "math.h"
instead of "radiusradiusradius", use the pow(Basis,Exponent)-function
Thank you
is it easy to learn python?
very
do u have a recommended book for beginners?
In my view, every progamming languages got itself a documents written by it's developed team
None of those book i'd recommended better than original document. Because tutorials you seen on Internet are variant of these documents
oh wow thank you so much! this is so cool
im almost done with my accountancy undergrad and thought i should learn something
Performance wise, writing radius * radius * radius is probably faster than calling the pow function. Not that it matters much here, just saying :)
Hello.
Could somebody help me with C++ code?
- What's going on? - I want to edit a specific line in a file (.txt), and i've tried using TempFile, but I can't get it to work, for some reason.
For example:
User enters Line 17 (Line which will be changed) - It asks User which text they want to replace it with and it gets replaced
But, I just can't seem to get the code working.
Have you opened it in write+read mode
Can You elaborate, please?
When you open file using fopen(filename,mode)
In "mode" you should declare wether you want to write , read, append,write and read, or maybe all three
I'm using "Ifstream" and "Ofstream".
I need to open the file, and open a TempFile, which will have everything copied in it.
User will input a line which they want to rewrite, and everything below, and above that line will be copied into the TempFile.
When it comes to the line that user has chosen, replacement string will be written, instead of reading it from the file.
Original at the end gets deleted, and that TempFile becomes the Original.
The issue is - I can't seem to get it to work.
It's possible, since the file is small, to write it all into the memory at once - and just replace the line I need, but I do not know how to execute that.
GUYS i need help
with an app/website idea-- something new (that does not exist) OR something already exiting but not good enough (does not have perfect features)!
i'm an art major so i have to design the app/website after but idk which channel to ask for the idea
i've been thinking about it for a week now and i don't have time
what do you need
app/website idea- something people would use- i have to do a presentation about it too so it has to be convening
oh you need an idea suggestion?
yes
mmm, you can design an app or site that helps people set appointments for a doctor (which benefits both sides), this idea isn't used in my country but idk about other places in the world, used it for a project once and the instructor liked the idea
omg i like the idea 😳 tysm!!
i'll consider it!
no problem!
Anyone good with nginx servers?
Anyone knows Mainframe?
CAN SOMEONE PLEASE HELP ME GET THESE FILES BACK