last day (14 days later) » 

4:36 AM
0
Q: C++ Code to Generate Permutations

sidy3dI am trying to code a program that will generate permutations with the characters repeated. So far I have 3 loops: for (int f = 0; f < n; f++) for (int s = 0; s < n; s++) for (int t = 0; t < n; t++) newString = characters[f] + characters[s] + characters[t]; This approac...

 
No, you are not trying. You just trying to find someone who will solve the problem for you.
 
I don't know any of the math for it, I am just starting algorithmic programming. This is for the USACO training pages.
 
you do not need any math for it. Also if you do not know anything to start solving problems, does not it sound obvious to start learning some prerequisites before doing harder things?
 
I am still in high school. Prerequisites?
 
Yes, if you told you do not know any math to solve problem - learn math and then start solving problems. The argument that you are in high school is absolutely irrelevant to this discussion.
 
4:36 AM
Sorry but I wasn't trying to waste your time. I just don't have the resources to learn it by myself. An aggressive tone isn't necessary.
 
There is no aggressiveness in my tone. I am trying to tell you that you have to try something before posting the question. If you tried - you have to clearly show what exactly have you tried and what is the problem.
 
SO generally requires that you show what you have tried when asking a question, otherwise it looks like someone asking for help.
you aren't actually looking for permutations
 
Sorry, I didn't know what else to do.
 
and it's not combinations with replacement
your edit included the code, but prior to that it was too broad
 
Yes I understand :)
 
4:38 AM
permutations with replacement?
 
Also if you see that you do not know some of the prerequisites (the problem about dynamic programming and you have no idea what does this mean) you have to at least try to understand them.
 
You said you're new to programming, and this is a common theme
if you start coding without understanding the solution you're trying to make, you'll come up short
 
Not new to programming, new to competitive programming
 
ah my mistake
 
4:40 AM
*Algorithmic
 
algorithmic as opposed to what?
 
in your case you told you do not know math. Math has nothing to do with it, it is about recursion.
 
Making apps, websites, etc.
 
sounds like event-driven programming
 
Yes
@SalvadorDali no need to be extremely rude and as a result give StackOverflow a bad reputation, just because you instantly know the answer doesn't mean that you should blame the other person for not "trying". You said "Yes, if you told you do not know any math to solve problem - learn math and then start solving problems. The argument that you are in high school is absolutely irrelevant to this discussion."
 
4:44 AM
a bit blunt
 
Can you explain me what was rude here? In my opinion SO currently decrease its reputation due to the hoard of people who try to do something with no prior experience.
 
I learnt that programming by myself because our school didn't teach it and I didn't have and people to ask.
 
you would be surprised to know this, but majority of people learnt programming in such a way. Reading books, forums, solving problems by themself. The same with me and with majority of people whom I know.
 
And where do I get the experience. You must of learnt all of this from somewhere. If everyone acted like you nobody would be asking questions. No need to project blame to people online, that's pretty low.
Yes and do I not have the right to ask questions?
 
I just explained you that the way you ask a question is not suitable here. You have right, but if you will be asking them in such a way - you will be downvoted and your questions will be closed.
 
4:49 AM
So should I have just made something up to show that I did "something".
 
If you include an attempt and enough of an explanation that someone reading it can tell you what you are misunderstanding then it's a valid question
 
Too much cyberbullying on SO, even if I was wrong you could of responded in a more constructive way not in a way that makes you feel superior.
 
With code included I think the question is decent
 
@RyanHaining ok thanks, il'l keep that in mind for next time
 
it takes time to get a feel for where the middle ground is between too much and not enough
 
4:52 AM
no, you should really tried to do something and then asked the question. How hard was it for you to insert "generate permutations c++" in google and click on the first link? http://www.cplusplus.com/reference/algorithm/next_permutation/ Does it requires a lot of knowledge to do this? I highly doubt that.

After that it is not hard to read the link and try to understand the code. Only after that you should ask the question.
 
a lot of people (if not most) make their first post with either little-to-no actual attempt, or they just dump everything
 
I can say - too much people with no attempt to do something on SO.
 
@Salvador Dali Okay now how about you re read my question. Your loosing this argument.
 
@SalvadorDali the question needs permutations with repetition though
 
if the question need permuations with repetitions - you can read permutations with repetitions on google.
 
4:55 AM
Again if everyone thought like you nobody would ask questions.
 
Please look at questions on SO - majority of them are well researched with a decent attempt.
 
"No, you are not trying. You just trying to find someone who will solve the problem for you." You always take the negative approach. Your just a mad person, quit finding people online to project blame on.
 
also look at some of the questions asked by me (stackoverflow.com/q/21177387/1090562). They do not sound like here is my problem - solve it for me. I tried this, I read this and have not found anything.
 
4
Q: link PHP with Octave or Matlab

Salvador DaliSuppose I have a lot of math calculations which are quite tedious to implement in php. Is it possible to somehow link PHP and Octave on the server in such a way, that php sends parameters to Octave and receives answers back. Has anyone tried anything similar?

this could be closed as asking for a library or off-site resource
 
First of all I am not mad. Your first iteration of the question had nothing at all. Looked like homework question with no attempt - just "solve it for me". And I showed it to you.
 
5:00 AM
Homework?
 
without any attempt it looks like a homework question, yeah
that's a bigger problem on SO, people posting homework questions trying to not do their own work
 
It's extra curricular stuff.
This isn't related to school it's the USACO training pages.
 
right, but it looks the same when you don't show an attempt
 
@RyanHaining sorry for this question. I agree that it is not good. And right now it should have been closed as off-topic.
 
@SalvadorDali it's more an example of how the community has changed. it's really hard for new users to feel comfortable asking questions
I just finished TAing for three semesters, and talking to students, many of them are afraid to ask SO questions because they feel like they'll mess it up
or they try once and get downvoted into oblivion and closed
 
5:03 AM
yes, and I tried to show him what has he done wrong.
 
not really, you're telling him (her?) to just google it
 
And every day on SO I see tens of questions with no attempt from people who do not care about being downvoted. They created lots of accounts and post their homework questions again and again.
 
after the edit, to me this looks like someone trying to solve a programming challenge, who is maybe shaky on the math, with code that isn't providing the expected output, asking what they're doing wrong
I do too, and I vote to close them
pre-edit I would vote to close this one too
 
this is sad, that you can pass a lot of CS courses by posting questions on SO
 
I don't really have that problem
that happens a bit with intro CS courses but anything past that people can't get away with it
they problems quickly become too big for an SO question, the bigger problem is students cheating off of each other, but that's beside the point
 
5:08 AM
I don't even understand what results are wanted ...
 
permutations with replacement
 
Isn
 
just for fun you can check questions with algorithm tag here during the programming competitions. At that time it is flooded with questions which are just copied from competions.
 
er. Isn't that called combinations, and shouldn't there be separate samples of actual and desired output?
 
@SamB no because ABA and AAB are the same combination
@SalvadorDali yeah that does suck
 
5:11 AM
Oh, right... I'm pretty rusty at this.
 
my grandfather posed for the real Salvador Dali btw. funfact
 
@RyanHaining Wow, that is cool.
 
almost everyone in this
 
hmm, I think I've understood what's wanted now; I've edited the question accordingly and voted to reopen
 
looks better
 

last day (14 days later) »