197 Topics
|
|
|
I am completely new at Python and I am not sure where to start with this task. Basically, I want to search for a word in each line; if the word is there, output the entire line to another file (Excel or Text). The lines look like this: PA,IAV protein,AC0T9,DHP … |
Hi guys. I am having issues with the output of this program. Can somebody tell me what I have to do to make this work correctly? Here is the code I have so far: import java.util.Scanner; //text scanner to parse primitive types and strings using regular expressions. public class Operations … |
|
Hello, I need to write a program to take in a name (max 101 characters) and out store in into an array so that I can output it like a list. These 2 programs are apart of a bigger program that keeps asking if you want to add another name … |
|
#include<iostream> #include<fstream> #include<string.h> using namespace std; int main() { //system("clear"); cout<<"\npls input the file where you want to read the data from\n"; string loc; getline(cin,loc); ifstream g; g.open (loc.c_str(),ios::in); string data; g>>data; cout<<"\n\n\n\n"; cout<<"\nthe data read from the file is\n"; cout<<endl<<data; return 0; } > even if fiole being read … |
|
Hi. So I have this HTML file that tests the user's screen resolution, and plugins installed using Javascript. So when the user accesses the page it sees: (e.g.) Your current screen resolution is 1024x768 and you have the following plugins installed: Plug-in No.2- Java Deployment Toolkit 7.0.10.8 [Location: npdeployJava1.dll], Plug-in … |
|
We can run Python2 script in most simple cases if we just use the 2to3.py script found in recent Python versions: F:\Python27\Tools\Scripts>copy \test\output_window_tk.py \test\output_window_tk2.py 1 tiedosto(a) on kopioitu. F:\Python27\Tools\Scripts>2to3.py -w \test\output_window_tk.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: … |
|
Hello everyone! I want to monitor my network using wireshark 's tshark command line tool. What i want to accomplish is to redirect tshark's output to a c++ application, so i can examine data and output a more comprehensive analysis without keeping a huge amount of data. I am working … |
|
Hi, I would like to the code below to search the contents of file1 in file2 and then output results arranged according to file1 contents. At the moment the code outputs are according to the order of elemnts in file2. I need some help to get this code working as … |
|
Hi All, I am writing a program to find the number between 1 and 100 that has the greatest number of distinct divisors. Below is my code for the same. It is returning an erroneous answer, i.e. 8 for greatest number of distinct divisors and 4 as the number for … |
|
Hi All, I am writing a program to find the smallest positive integer that has n or more divisors. My program gives me correct answer for input values upto 4 but it produces erroneous answers for input values above 4. For example, it gives 10 as integer having 5 divisors. … |
|
Hello, I'm working on an assignment that requires me to do the following: "A file contains 6 numbers per line and contains several records. Another file contains 3 numbers per line and several records. Write a program to input each of the numbers, find the highest number, the lowest number, … |
|
Hi all, I have written a program to find the reciprocal of an input number by using newton rhapson iterative method. Below is the algorithm implementation in C: #include<stdio.h> #include<stdlib.h> #include<math.h> int main() { double guess,newguess,input,error=1.0; printf("Enter the input number"); scanf("%f",&input); printf("Enter the guess for the reciprocal of the input … |
|
I think I have a relatively simple problem, but forgive me, I'm new at this. I'm trying to take output from a dynamically created checkbox in php to a foreach statement to make a new string that I can use to request an update from mysql. In the foreach loop, … |
|
Hello, I am having trouble with a program I am writing. The problem is that I need to take information from a text file, read it, and then output the information into another text file. I keep getting this output: > <ProductSummary>0015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A0 </ProductSummary> I need it to output something like … |
|
Hi, I am quite new to C++, Currently, I'm learning how to do a problem which will take a text file of thousand most common words in the english dicatonary with another text file. After finding how many words are in said text file show the percentage of which are … |
|
I am having trouble formatting my output into columns. Some of the the names are longer than others so it pushes the whole line out instead of lining up evenly. I cannot use the printf function, we haven't learned this in class yet, I'm only familiar with setw and setfill. … |
|
[CODE]<html> <head> <script> "use strict"; function hexidecimal() { var num = document.getElementsByName('number')[0].value; var hex = num.toString(16); alert(hex); alert(num.toString(2)); } </script> </head> <body> <form id="form"> <input type="text" name="number" /> <input type="button" value="Hex" onClick="hexidecimal();" /> </form> </body> </html>[/CODE] Above is the current code I have, I expect it to output the contents … |
|
Hi all I have to write code that ask the user to input a current (that will be split into two currents) and then the output from the code should display the two resulting currents given two input resistors. That part I can do but my problem is I have … |
|
I have 9 decimal numbers in A3, i need to output them 3 at a time and I'm not sure how. EX) A3 holds '14 8 6 8 5 4 6 4 4' [INDENT]It should display[/INDENT] 14 8 6 8 5 4 6 4 4 |
|
hi, another question here. i'm a beginner at php and i need a php script to automatically retrieve data from a database and fill in a form. all the data is in the database and I already have a script to search and return the results. I just don't know … |
|
Hello all, I found a thread similar, but it was closed... so here is the code and my question... I am wondering how to change the code from creating files to creating variables? this is the code from the thread on here.... and below it is the code that i … |
|
Hello all, I have an assignment in which I need to subclass and implement an abstract method (java.io.OutputStream) to create an output stream called NumStream. The NumStream class converts digits to strings. We are given most of the code it seems and I need to only implement one area. It … |
|
So im trying to create a times table: Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print and how high the table should go. The output should look something like this: Which multiplication table would you … |
|
[CODE] import os; def callAS(cmd): os.system(cmd); def selectFile(): callAS("""osascript -e 'tell application "Finder" to return choose file "Select the file:"'""") def fixPath(raw): arr = raw.split(' '); return(str(arr[1])); thePath = selectFile() thePath = fixPath(thePath); print(thePath); [/CODE] When the above code is run in IDLE, it just gives an error. But, when … |
|
1. I did try without trying to read output or trying to read only first line of the output - both of these were successful. 2. However when I try to display full output, it just gets stuck and does nothing. 3. Even more crazy stuff - when I close … |
|
I am unable to figure out how to check to see if there is more data in the file. I have a input file, where the last two lines are just new lines with new data. When I run my code, I get the last line of data in the … |
|
I got a file downloaded named "Rybka v2.3.2a.mp.w32.exe". In GUI chess software you are able to add this as a chess engine, but I have no clue how the input/output of that engine works. As I understand the program sends the engine current position and the engine returns some output. … |
|
For a (homework) project, I have a class ComplexNumber that needs to be printed. I have a number of operations that can be done on objects of the class (addition, subtraction, multiplication, division). Each operation returns a new ComplexNumber to be printed. How exactly do I print this? Do I … |
|
|
Hi guys, I was doing my project when i came across this error: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at Screen.screenRunner(Screen.java:84) at Screen.main(Screen.java:90) I am also having problems getting my program to accept user input(height and width). [CODE]import java.util.Scanner; public class Screen { … |
Alright, so basically I have this program going, it reads the text file perfectly, I also have some arrays created. Now I need it to store each team's rebounds, assists, and points separately. From there I need to get the mean, median, mode for each section (which will be completed … |
The End.