Creating an application for Math Practice with ASP.NET [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am trying a develop a Math Practice web application using ASP.NET (not MVC), which allows Users to perform Multiple choice or simply type an answer, click a button and see answer.
The first idea that comes to mind is simply get permission to use a book, grab all the questions and answers using a DB and display the right answer. But how would I display the answer or the show me how the answer was derived.
My confusion is; how does this work?:
Do I have to write all the formulas and answer myself?
Are there programs for this?
I do not even know where to start.
What I would like to do is have the user select an answer, if the answer is wrong, they can click the show me button.
I am looking to either write this in C#, Visual Basic using JQuery on the front end.
Just need some direction.
Thanks my friends.

When I was in college I had to do something very similar.
What I did is stored expressions 4 + 5; 1 * 6 in database and then pushed those expressions to evaluate on run-time because it is pretty easy in C#.
It takes expression from database 2 + 2
It evaluates the expression on run-time producing result 4
You get your result and show it to user or do whatever with it
More info on how exactly to do that: http://www.c-sharpcorner.com/UploadFile/mgold/CodeDomCalculator08082005003253AM/CodeDomCalculator.aspx

I don't think you need to evaluate a stored expression. Since you just want the user to enter multiple choice or the answer itself, just set up your database as follows:
QuestionAnswers:
ID (uniqueidentifier) (primary)
QuestionText (varchar)
QuestionAnswer (varchar)
ShowMeHowEquation (varchar)
Then, display the ShowMeHowEquation via jQuery like so:
Show Me How
<div class="showMeHowEquation">Database driven contents here...</div>
<script>
$(document).ready(function() {
$('.showMeHow')click(function() {
$(this).next('.showMeHowEquation').slideDown();
});
});
</script>

Related

How do I find influenced program,when i add a column.Oracle & C# [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a question.
I need the table A add a column, its name is called "A1" then happed a program of company is not working,because it programs use Merge into method, let this program not run, until I add "A1" and Related code write into this Program.
This Program is C# Program.
Now, I will add a new column in the table B.
But my company has many program access in table B, and I don't know how many program access the table B...
So, how to do that, let me can advance find influenced program?
or
How to know which C# programs are using oracle operating table b ,
let me can get these programe name & path
Thinks!
Unless your code is inside the database itself (as stored procedures) there is nothing in oracle that can tell you. And since you said your code is in C#, that appears to be the case. This is where you have to rely an a search with whatever facilities are available in your source code control system.
I am not sure what do you mean by program here. But If you want to know which all PL/SQL objects are using TABLE_A then you can use the USER_DEPENDENCIES view as follows:
SELECT REFERENCED_OWNER,
NAME,
TYPE
FROM USER_DEPENDENCIES
WHERE REFERENCED_OWNER = 'SCHEMA_NAME_OF_TABLE_A'
AND REFERENCED_NAME = 'TABLE_A';

C# Windows Form - access code [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need to know where I can access the basic code, for example a "NumericUpDown" Element.
What I want to do:
Add Code to my NumericUpDown Element, for example:
Set the "Maximum"-Value to a variable embedded inside my Formclass code.
The Reason why I cant to it right now:
I just can access the NumericUpDown Element just in the Design View right now. There I can Input a value, but can't set it to the amount stored in a variable.
I just know, that If I double click the field, I get a "ValueChanged" Method into my code. But what I need to know: How can I access the "basic" Code of the NumericUpDown Element, where I could set the "Maximum"-Property?
I'm relatively new to programming. And I'm quite overwhelmed with a lot of things... So I COULD google for the problem but it would just take me way to much time.
Since I guess it's an easy answer for you guys, I post it here.
Thanks a lot!
You can access the Control's objects attributes by it's name.
For example:
NumericUpDown1 <- It's the name of your Control
In your C# code you can access all of it's attribtes and methods by puttin a period after it's name:
NumericUpDown1.Maximun = 100;
NumericUpDown1.Width = 250;
NumericUpDown1.Height = 10;
etc. You can serach it by "Control Properties" in google. Luck and effort! :P Remember to try and search a bit before asking. Don't wait for others to make your job. Luck! ^.^
You can access source code of components, but it won't help you. every component has interface and you can use it's interface to interact with it. Also you can override some methods of component to change their behavior.

Mysql and c# updating [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I currently have a mysql data table that fills up when people complete a form. I then have my visual studio c# bot pull this data and do what I want. The table numbers the table using integers that increase by 1 each time. My bot looks in the table for id 1 and adds it.
The problem I have is that once my bot completes what someone wants and deletes the data, it does not recognize to go onto the next one since that id is not 1 and something else, like 2. I tried to have my c# bot add 1 to a variable each time and then have that variable represent the id so that every time the bot completed something it would go onto the next id. The problem with this was that every time the bot completed with one person the variable was reset back to 1. I am stuck now and can't figure out what to do. Any help would be great.
This is currently the string I use "select name from names where id = 1". If I can somehow instead of having the id = 1 and have it look for the next lowest id in my table then that would work.
Edit: Actually I think I figured out how to have the last added id be used. I will post it if I find it.
In MySQL, if you want the lowest ID then you could do something like this:
SELECT
Name
FROM
Names
ORDER BY ID
Limit 1
Is that what you are looking for?

Writing Multiple Fields to one textbox [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Just need a little help with a program i have been working on. basically i work in a call centre and i am going to use this to record my notes during calls, i have everything worked out besides on feature. So i when filling out the fields i need it to show up in a specific textbox, and i need to structure this data to specific lines. I also want to try do this without having to store the data to txt file or a database, i want to try do it all within strings if possible. any help would be greatly appreciated guys.
thanks in advance
So in short.. you just created a button and some fields and have no idea how to proceed.. try selecting one programming language as #TheKingDave suggested. For example, if you go for C#..
try to read up on the below links to get yourself started:
system.windows.controls.textbox
system.windows.controls.combobox
but just, if I understand your question correctly, because let's face it, it's far from clear, you want to grab information you added into several textboxes and comboboxes etc and format them into one multiline textbox? If so...
Create a on_click event for your button in which you want to add stuff like..
string Example1 = this.mytextbox1.text;
string Example2 = this.mytextbox2.text;
string Example3 = this.mycombobox.SelectedItem;
...
afterwards you want to add all these strings together, for example
string MyResult = "Example1: " + Example1 + "\r\n" + "Example2" + ... ;
and then show this in your resulting textbox
this.myresulttextbox.text = MyResult;
Hope this answers your question somewhat but I strongly advise reading up on this before going any further..
What is actually your programming language?
Not sure about your question but if your goal is to concatenate everything into a single string, just read the text value from every *boxes you have and add them into the text value of your destination using a special joker character that is unused in your edited fields like '¤' for example to separate every string. It's easy then to process it later. The brutal way is to hard code every copy. A slightly more refined one would be to have a list of interesting components and for the copy to loop on them and according their type, chose the right access method to get the information.

badges / achievements [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i'm looking to implement a similar thing to stackoverflow badges. you could also equate them to achievements in games.
but am not sure how to design the database/code/tracking for them.
i get what i should do for badges such as:
Altruist × 1456 First bounty you manually awarded on another person's question
because they are a one time event, but how to handle others such as:
Analytical × 16389 Visited every section of the FAQ
Electorate × 1783 Voted on 600 questions and 25% or more of total votes are on questions
Outspoken × 188 Posted 10 messages in chat that were starred by 10 different users
etc...
how to handle them, how to keep track of progress for each, etc... is there a tutorial or something that can help me figure out a design pattern for them?
For the given examples, there are essentially two mechanisms you are going to need.
I don't know how it's done on SO, this is just a suggestion of a solution.
Let's look at 'Analytical' first. You are going to have to record by means of a simple flag when a user visits a particular area in the FAQ. Let's envisage a DB table with a field for each FAQ section and a user ID. This starts off as "N" (or 0, or however you want to represent your flag). When a user visits that area, you call code to flip that field to "Y". When all fields are "Y" then you can award that badge.
As for 'electorate' and 'Outspoken', you can retrieve this information by means of a query on your existing data, assuming the queries themseves are not too burdensome. You are going to need to consider when to run these checks. This essentially boils down to two options.
1) When the an action is performed that might get a badge awarded (i.e. visit section of FAQ, Vote on a Question, Question starred by someone else)
2) Periodically (hourly, daily, etc) run a check for all your badges against current data.
Bear in mind that badges are one-way in Stackoverflow, so if you are wanting to be equivalent then you don't have to consider logic to 'un-award' badges.

Categories