Hello everyone. I have been trying to get desired output since last 4 days and so far very near to it. I am really stucked in the logic. Please help me or help me in writing proper logic. Open the attached zip file for whole eclipse project. No need to touch any file except **com.designimplementation.elevator.controllers.ElevatorController** So far I am able to get **Average cycles per customer trip: 42.35841100754549** But I must be **Average cycles per customer trip: 30** Please help me asap. Thank in advance.

Member Avatar
Member Avatar
-4 forum 1

command name can be APP_COMMAND_NAME as const Friend Module Program Private CurrentString As String = String.Empty Public Const APP_RUNNING As String = "Running" Public Const APP_TITLE As String = "Console" Public State_Output As String Public State_List As List(Of String) = New List(Of String) Private commandlist_ As Dictionary(Of String, Action) Private State As String = String.Empty Public APP_USER As String Event Command_Run() Sub Main() APP_USER = String.Empty Program.State_Output = "App is " & State.ToString & CStr(Program.APP_RUNNING) 'Program.State_List = New List(Of String) Console.Title = APP_TITLE AddHandler Command_Run, AddressOf RunCommand Program.commandlist_ = New Dictionary(Of String, Action) Program.commandlist_.Add("Notepad", New Action(AddressOf Notepad)) Console.Write(">>") 'Program.CurrentString = …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am working on a blackjack game as a person learning swift. Due to my need to learn the basics of swift before jumping into learning how the view controllers and other mobile-app specific details work, I am making this game in a playground. I wrote a function that is intended to get a user's input from the console, but the function does not wait for the user to enter his input. Instead, it returns an empty string and lets the program go on without letting the user enter in the appropriate input. Here is my function (that gets …

Member Avatar
Member Avatar
+0 forum 1

Actually, I owe a website where a particular set of inner pages is not getting indexed in Google and other Search engines. I have checked sitemap.xml, robots.txt file and also the meta robots tag and I have never found any issues. Then, I did a Google Fetch with the help of Google Search Console, but the result with 404 page not found. So, I need a proper guidance to rectify this issue. Thanks!!

Member Avatar
Member Avatar
+0 forum 11

hello, this is the part of the code I'm having a problem with if(a1==r1a || a2==r1b) {//REPLACING for(p=0;p<8;p++) { for(r=0;r<8;r++) { if( i[p][r]==1) { i[p][r]=0; } if(p==a1 && r==a2) { i[p][r]=1; r1a=p; r1b=r; } } } } I have only 2 units in the board of my chess game, intiger i is a 2D array (which is the board), there are unit 1 and unit 2 on it, unit 2 is placed in i[r2a][r2b]. and unit 1 previous position is in i[r1a][r2b] this code change the position of rook 1 from place to another if there are no units in …

Member Avatar
+0 forum 0

This is a small one. Some time ago this table came in handy, testing out low level multiplication. And I just love multiplication tables. We all do, now don't we? :)

Member Avatar
+0 forum 0

Hello to all, I have a console executable file that I run from DOS console passing some options and an input file. I'd like to give to this exe file a GUI. I'd like that the GUI was a new exe file that could contain inside my console exe file and run the console exe from the GUI, having the console exe file inside of the GUI file. Is possible to do this with C++? Please suggestions. Thanks in advance. Regards

Member Avatar
Member Avatar
+0 forum 8

I accidentally posted a lower version of the game that had more flaws, and a few less features. This one has a few more minor bugs fixed, and a power attack instead of a normal attack.

Member Avatar
Member Avatar
+0 forum 14

Have a program I am writing for class using the pseudocode given. I have written it in a flowchart program successfully, but cannot get it to work properly in VB. It is supposed to show the C for Celsius and F for Fahrenheit, and list the matching equivalents below up to 100 for Celsius when the loop will end. It shows the C and F in but no numbers...I am stumped. I have attached the zipped file. Thanks!

Member Avatar
Member Avatar
+0 forum 2

Program runs without errors, unfortunately it will not calculate the days overdue. Any Suggestions? I have attached the code as a pdf, i have also done this as an IF, THEN, ELSE statement with the exact same results, but it will not let me upload it. Help! Private Sub calculateFees (ByVal intDays As Integer, ByRef decTotalDue As Decimal) If intDays <= 3 Then decTotalDue = dec Fee Else If intDays > 3 Then decTotalDue = CDec((intDays - 3) * 1.5 + decFee) End If

Member Avatar
Member Avatar
+0 forum 11

Having a problem. Wrote program originally as VB Console using Sub procedures, had to change it to Function. It worked as sub procedures, but now as function it won't calculate correctly, I actually have two that are doing the same thing because of the procedure switch! Grr! Any suggestions? Sub Main() 'Declarations Dim dblMidTerm As Double = 0 Dim dblFinal As Double = 0 Dim dblAvgTotal As Double = 0 'Calculate Average dblAvgTotal CalculateTotalAverage(dblMidTerm, dblFinal) ‘Display Average displayTotalAverage(dblAvgTotal) terminateProgram() End Sub Private Sub getExamGrades(ByRef dblMidTerm As Double, ByVal dblFinal As Double) Console.Write("What was your midterm exam numerical grade? ") dblMidTerm …

Member Avatar
Member Avatar
+0 forum 8

Saw [this](http://www.daniweb.com/software-development/cpp/code/216430/add-a-little-graphics-to-your-console) and decided to make a little spinoff with some physics of mine. Enjoy!

Member Avatar
Member Avatar
+1 forum 2

/* Made in code::blocks 12.11 -randomly generated terrain mirrored to be equal for bought players - - */ #include <iostream> #include <windows.h> #include <stdio.h> #include <string.h> #include <ctype.h> #include <fstream> #include <cstring> #include <string> #include <cstdlib> #include <ctime> #include <sstream> #include <cctype> using namespace std; //Public functions char printMap(char terraniValue); int spawnUnit(int positionOfPiece, int unitType); int createBoard(int xLenght, int yLenght); string OutputCharacterWithColor(string character); void black(); void red(); void green(); void blue(); void white(); //Pubic variables int Gold = 300; int rowLength, columnLenght; string board; int main() { createBoard(10, 8); printf("1.Infantry(Defence=6, Attack=1)\n"); printf("2.Sniper\n"); printf("3.Artillery\n"); printf("4.Tank\n"); printf("5.General\n"); printf("Enter pieces you want to …

Member Avatar
Member Avatar
+0 forum 11

How exactly do I add images to a console application?

Member Avatar
Member Avatar
+0 forum 12

Just started learning c++ and ive got a bit stuck :L Im making a console application that injects a file into a process. The file name and process name are both specified at the start of the code using char FileToInject[] = "File_Name.xxx"; char ProcessName[] = "Process_Name.exe"; The console works fine, however the process name and file name are now fixed once ive compiled the console, and I am unable to change the file/process later on. What I would like to do is have the console ask for file name, and the process name, so I dont need to create …

Member Avatar
Member Avatar
+0 forum 2

Hi I am New to PHP and my question looks stupid but i am stuck I want to search operation register to search by id and print out put of perticular id my first file has this code: <form action="printotreport2.php" method="POST" target="_blank"> <tr> <td>Ot Reg ID of Patient </td> <td> <input type="text" name="otid" id="otid" size='15' class="select_class2" > <td colspan="2" align="center"> <input type="submit" name="stat_submit" value="Submit" class="but_class2" /> </td> </tr> </form> Second file code $db_host = "localhost";$db_user = "user";$db_pass = "pwd";$db_name = "obgyn_db";$db_table = "masterot"; mysql_connect("localhost", "obgyn_user", "pwd"); `` $id = $_POST['otid']; $q1 = mysql_query("select * from masterot where id like'$id'"); but …

Member Avatar
Member Avatar
+0 forum 1

Hi, I studied Java last year in university but I found it rather difficult - mainly because I made it difficult for myself by not studying as much - but hey. I've been working on a console-based "game" with the language and I've just had a hit of inspiration to start it up again. However, I was just wondering if - being new to programmer and the world of phone development - it would be possible to do it as a console based, or whether I would have to make a simple GUI? I've got the start of the app …

Member Avatar
Member Avatar
+0 forum 3

Greetings. Is there an easy way for an app to find out at runtime, if it is a console app or a form app? Any answer would be greatly appreciated.

Member Avatar
Member Avatar
+0 forum 2

Hi guys. I am beginner at developing and currently learning c#. I was asked for developing a console based snake game by my knowlage of c#. So i have to develop the game by using classes( not structs etc) arrays methods.. I can use any ideas on that matter. Thanks.

Member Avatar
Member Avatar
+0 forum 3

The luxuries we now have in the amount of pixels on a screen to draw some amazing graphs with, were lacking in the early days of computing. Most of the time you had to resort to rude printed output. It wasn’t that bad always. Sometimes it was and still is sufficient; just to have a quick preview of what a function would look like. Here I present some code that does just that. It plots a function to the console. I included a screen dump(which passed through Paint) just to show what it looks like. You could also use the …

Member Avatar
Member Avatar
+1 forum 2

Pretty neat text-based RPG that I made. Currently my first game.

Member Avatar
Member Avatar
+0 forum 17

Hello! I am having a bit of a hard time figure out how to code this thing.. I have just started coding by using windows form application and need some help.. I have successfully coded so that I can open a txt file without any problem, but it is reading it and giving the text in the file some values to use for this windows app.. What I have done so far is to make a window with a Combobox and adding 4x textbox. I have added the following into the comboBox: Item Name Thing The text.txt file contains: Item …

Member Avatar
Member Avatar
+0 forum 14

Hello to all, I'm have been porgramming console applicactions in C# to learn the language. Today I was curious in windows forms, and started a project. After searching in the web/youtube I see people putting all the code on the button code(when doubble click), BUT I saw there the same program.cs file that consoles apps have.My questions: -Where does the code actually goes?code to solve math, connect to database, write something to a txt file etc? -Shouldn't it go to the program.cs file? In a console app I usually put my code there and depending on the project I create …

Member Avatar
Member Avatar
+2 forum 4

Many situations arise when you have to choose between two options: true/false, male/female etc. This short snippet will only allow two chars to pass through: capital 'Y' or capital 'N'. The Read and ReadLine methods can serve also, but have the side effect you have to use Upper and Lower case methods if-statements, or (with ReadLine) testing if only 1 char is input etc. Notice that the condition in the do - while has to be **false**.

Member Avatar
+0 forum 0

Hello, I am making a Java IRC bot and it all works fine. I connect via a socket and there is a while loop that will output whatever comes through the IRC. But, I also want to accept console input while the program is running. So far I can only find help that will wait for console input and not one that will accept it in the background. Any help would be appreciated, thanks.

Member Avatar
Member Avatar
+0 forum 1

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. Here are some very basic examples on how to do for-loops in BASH. Edit: Fixed per Watael's suggestions.

Member Avatar
Member Avatar
+0 forum 1

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. Here are some very basic examples on how to do for-loops in BASH.

Member Avatar
Member Avatar
+0 forum 3

This is another useful script I came across. It prints a color-code chart in your terminal. It can help you find the color-code you are looking for, or view the current color-scheme you are using (people use it on reddit/r/unixporn to show off their system's theme, I use it to grab color codes). I figure someone may get some use out of this, and there aren't many "Shell Scripting" code-snippets, so I'll put it here.

Member Avatar
+0 forum 0

I didn't write this, the credits are in the code. It's a code-golf version, and I'm sorry about that. I am trying to 'decode' it but I don't have the skills, so the 'decoded' version doesn't have the right colors. This is an example of what you can do with BASH, or possibly other shells, and it's just a neat thing to see. So I offer this up for your amusement, I've tested it and combed through it to make sure there's no hidden tricks. As far as I can tell it only uses a few commands like `echo`, `printf`, …

Member Avatar
+0 forum 0

I am writting a simple C++ programm and I want to generate outputs to the console but with the functions 'fwrite' and 'printf'. However, I can't print special characters like 'á', 'é', ... Here is a simple code: printf("Special character: 'ñ'"); Were the output was `±` I found that those characters are printed as ascii but they were encoded in Utf8. I don't know how to make this output visible correctly, I'm using the Microsoft Visual Studio. Any help?

Member Avatar
Member Avatar
+0 forum 3

The End.