Hello, Self taught guy here. Thanks for reading my post. I've made a app to track the sales of floating rubber ducks for a duck race. I have a database which contains data similar to this: id soldby package ------------------------ 1 John 6 2 John 25 3 John 1 4 John 6 5 John 25 6 John 1 7 Tammy 6 8 Tammy 25 9 Tammy 1 10 Tammy 1 11 Tammy 6 12 Tammy 25 13 Tammy 25 The number in the package field refers to the number of ducks purchased. Each package 1,6 and 25 has a dollar …

Member Avatar
Member Avatar
+0 forum 8

I've been reading through this introductory book on Python, and I've been following along fairly well. Compared to C++, Python seems to make more sense to me. That is, until I reached a section on Logical Operators. I don't completely understand what I just typed in to IDLE, and the results that were returned. Here's what I read: Python provides three logical operators: and, or, and not. Both and and or use short-circuit logic and return the operand that determined the result—they do not return a Boolean (unless they actually have Boolean operands). Let’s see what this means in practice: …

Member Avatar
Member Avatar
+0 forum 5

Hi. I have a noobish UNIX question. I have a password-protected section of my website for testing (named 'sandbox') and I'm trying to write output to a plain text file in that directory. But I'm getting the following error due to permissions settings. `Warning: file_put_contents(testdb.txt) [function.file-put-contents]: failed to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/sandbox/dbtest1.php on line 5` I'm sure it's something simple, but what could I be overlooking?

Member Avatar
Member Avatar
+0 forum 5

hi, Please can anybody help me with this problem, i am creating an application that outputs to a notepad file on windows 7, i would like to know if there is a python module that i can use to invoke a notepad file(example trial.txt) to output into.THanks

Member Avatar
Member Avatar
+0 forum 3

I am using the following code to write to the file out1.txt: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter out = new BufferedWriter(fostream); out.write("jlsdfjdlsfhsdkjf"); out.close(); }catch (Exception e){ System.err.println("Error: " + e.getMessage()); } Now i want to write to multiple files in the same code (let us say 2 files). Do i need to define a new object other than fostream to write to another file out2.txt or i could use the same object to write to out2.txt after i close it once? I will try to explain it through a code perhaps: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter …

Member Avatar
Member Avatar
+0 forum 8

When using the Grep command to find a search string in a set of files, is there a way to dump the results to a text file? Also is there a switch for the Grep command that provides cleaner results for better readability, such as a line feed between each entry? Perhaps there is a Grep script that outputs cleaner results Thanks

Member Avatar
Member Avatar
+0 forum 4

anyone can help me? i have a task from my teacher. He asked me to make a simple image processing program that can process 2D image with this feature: -the program can make a translation, rotation (an angle of rotation with arbitrary), scaling, and shearing. -the program can make an input with "browse input image" feature. -result of processed image can be saved. addition: it will be better if the program support a clipping process. 2D objects that processed is prepared on a number of line segments in the world coordinate system. Data on these objects are presented in a …

Member Avatar
Member Avatar
+0 forum 7

Hello, Has anyone ever repeatedly wrote to the same text file, using the append mode, and when examining the text file, several lines were missing? Here are the specifics to my code: 1. Each line in the output, the text file, contains data from one experimental session (e.g. the session time, experimenter name, session #, a series of responses to variables being tested) 2. When I first write to the text file, I create a string variable that starts with "\n". Here's an example of the code: sessioninfo = "\n" + "," + string_variables + "," fp=open("data.txt", "a") fp.write(sessioninfo) fp.close() …

Member Avatar
Member Avatar
+0 forum 3

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

I'm still a bit of a newbie and have what is probably a minor issue, but for some reason I can't wrap my mind around it. I have a program that does a whole bunch of stuff to text from an input file. The input looks like this: MArch 9, 1971. SPace the finAL fronitIER! "TheSe aRe the voyAges of the staRship enTERprIse"? With the current result looking like: March 9, 1971. Space the final fronitier! "These are the voyages of the starship enterprise"? But what I need to do is get rid of all of the spaces and format …

Member Avatar
Member Avatar
+0 forum 1

How would I put the output is rows of ten? public static void main(String[] args) { int count = 1; int j = 0; // for (the numbers from 100 to 200) for (int i = 100; i <= 200; i++) // if (this number is divisible by 5 or 6, but not both) if (((i % 5 == 0 ? 1 : 0) ^ (i % 6 == 0 ? 1 : 0)) != 0) // Display this number (ten per line): System.out.print System.out.print(i + " "); j++; if (j % 10 == 0) { System.out.println("\n"); j = 0; …

Member Avatar
Member Avatar
+0 forum 3

I hate being a perfectionist it's driving me crazy. I can get it to resize to the words, but when I replace them with small 3 letter words, the design messes up and everything gets out of place. I'm a beginner and you guys are probably going to laugh at my code because I know I am making this harder than it should be, and most likely doing it completely wrong. My main goal is to have it where I can re-use the code and only have to replace the title for each column, and it automatically make me a …

Member Avatar
Member Avatar
+0 forum 3

Hi again! So, I have an object that gets appended to a linked list now. Now I need to have all of that item's data output in a formatted manner - something similar to this: CD Artist CD Title CD Length Track Name Track Length Arist name here Title here hh:mm:ss Track name here mm:ss Track name here mm:ss Track name here mm:ss The problem with this is that the output for this is all in the overloaded << operator for my CD object and I'm having trouble figuring out how to append the track names and track lenghts, which …

Member Avatar
Member Avatar
+0 forum 6

Hi all. I have two tables (question and answer) with q_id as the link. I would like to output the data that each table holds alternately like this: [Question 1] [Question 1 Choice of Answers] [Question 2] [Question 2 Choice of Answers] ...and so on. I've managed to filter the answer sets by q_id but now they do not tally with the question. I attached an image of the output. The $id alternates between the questions and answer sets. Commenting out the $id++; line has the same outcome. ![question3](/attachments/large/3/question3.png "question3") I hope someone can point me in the right direction. …

Member Avatar
Member Avatar
+0 forum 20

new to I.T. need help about the problem analysis ,algorithm design, formatting the output package gasolinestation; import javax.swing.JOptionPane; public class GasolineStation { public static void main(String[] args) { float total, money; String yesno; JOptionPane.showMessageDialog(null, "Welcome to Gasoline Station!"); do { String select = JOptionPane.showInputDialog(null, "1 = Diesel .................... $ 39.00\n" + "2 = Unleaded .................... $ 49.95\n" + "3 = Extreme ................ $ 51.95\n" + "4 = Kerosene ................ $ 00.00\n\n" + "Enter the number of your choice:"); if("1".equals(select)) { String liter = JOptionPane.showInputDialog(null, "How many liters of Diesel?"); total = (float)(39.00*Float.parseFloat(liter)); JOptionPane.showMessageDialog(null, "Total price: $ "+total); String pera = …

Member Avatar
Member Avatar
+0 forum 3

the book is title a guide to c++ progtraming by Tim Corica Write a program that accepts a two digit number and displays the digits each on a single line. The program output should looke similar to : Enter a two digitnumber :27 The frst digit is 2 The second dihit is 7

Member Avatar
Member Avatar
+0 forum 1

Hello! I'm new here, so correct me if this is the wrong location... but I'm trying to make a program for the Minecraft server I'm on, and it requires that if someone wants to make a map that is used on the server, that there's a .xml file that shows all the information, like items the person spawns with, etc. I wrote the majority of the program recently, so I can remember almost all of what happens when :P Here's my program: #include <iostream> #include <string> #include <stdlib.h> #include <fstream> using namespace std; int screen() { cout << ".-------------------------------." << …

Member Avatar
Member Avatar
+0 forum 7

Hello everyone, I am working on one program that generates a lot of data...eventually it can be in GB range. And the way I am doing it now is just by writing to ascii file everything time... like this: ofstream flowC("outputfile.out"); // declared at the start flowC << prevsid << ", " << threadid << endl; // inside working block - repeats many many times However, this is not very efficient. First because I am writing ascii and because I am writing to dick every single time. To improve this.. I want to write 2nd line above to a buffer …

Member Avatar
Member Avatar
+0 forum 4

Well Guys! I was learning how to read and write class objects from & to file respectivily. And here is a small code that i made...... As far as the code goes its all well.... And i am getting what i want.... But what i want to know is, **where is the file that i am using saved??** Here the file is BLAHBLAH.dat. I cannot find it in any of the folders in the solution folder. And even a system full search didn't help. So where is it saved..... I use Microsoft Visual C++ 2010 Express Edition. Here is the …

Member Avatar
Member Avatar
+2 forum 7

Hello guys! Please help me with a little problem. I have one table(Person) where are some values. My current syntax is: SELECT Status, COUNT(Name) AS Number FROM Person WHERE Status = 'Married'; Result: Status_________Number --------------------- Married__________3 But I want to get the result for each status. That would be something like this: Result: Status_________Number ------------------- Married__________3 Divorced_________2 Single___________4 Widowed_________1 How to conclude my SQL syntax and get this result? Any help is the most welcome.

Member Avatar
Member Avatar
+0 forum 1

I need to do the following: input First and Last name Output initials. Output however many letters Input Middle name Output Full initials. then redo the process. input First and Last name Output initials. Output however many letters Input Middle name. Output Full initials. Example: Enter your first and last name with a space between: Melvin Mathew Your initials are MM. Your name has 12 letters. What's your middle name: TOM Your full Initials are MTM. Enter your first and last name with a space between: Melvin Mathew Your initials are MM. Your name has 12 letters. What's your middle …

Member Avatar
Member Avatar
+0 forum 3

I have a template in a 1-file .h file, and I need it to be adjusted and modified to work properly with only a partial amount of the items in it used. The testArray.cpp file I include is how I test if it works properly. As it is now, it displays garbage data for the first 5-6 runs through, then it properly displays numbers. I just need it to work 100%. A lot of the problem is within the += operator I feel, I don't know how to properly amend it. Here's the .h: // File: Array.h // Template array …

Member Avatar
Member Avatar
+0 forum 4

I need help and thank you in advance for any advice. I'm new to Php and Mysql. I've put three drop down menus in one cell of a table and I want to display results of a simple query (4 fields per record) in another cell of the table. Only one selection (one drop down) is in play for each search. There should be about 10 results for each search. In tests, I've been able to open the database. This is as far as I have been able to proceed so far (Also, I'm also not sure if I need …

Member Avatar
Member Avatar
+0 forum 10

Hi I am attempting to build my own cms (although very basic) using php and mysql. Instead of having a static homepage, I want the content displayed to be dynamic. In other words, I want the homepage to be flexible/changeable based on whatever the latest 'content' entry into the database is. I currently have two tables: 'user', and 'homepage'. My homepage table is structured as follows: home_id (int) user_id (index, fk) title_cont (varchar) home_cont (varchar) home_date (timestamp) I want to be able to display the latest 'title_cont', and the 'latest home_cont' entry. I am assuming that the date of when …

Member Avatar
Member Avatar
+0 forum 4

Thanks for the support! I have been working on a program with 7 classes, one the main and one starts the program, and I have been troubleshooting for a few hours trying to see why for one of the output constructors I'm not getting the classes to update the output. A class called OfficeVisit calls the class Appointment, which then calls the classes MyDate and MyTime to output their data input by the user back through OfficeVisit's output cosntructors. But I'm not getting the right output for some detail(s) that I can't find. While other classes that use MyDate and …

Member Avatar
Member Avatar
+0 forum 1

I have installed php mysql and apache but when I run my php program browser ask me to download that file. but required output is not appear.

Member Avatar
Member Avatar
+0 forum 4

I'm causing input letters to write ones into variables through an array. I'm trying to count the occurences of ones in a variable. Lets say I input aaaaa. The count output displays 12345. Instead of outputting the whole count of numbers, I want to output the biggest number in the count. How can I do that?

Member Avatar
Member Avatar
+0 forum 2

Hey everyone, I was wondering if there was a way to cycle through the individual bits of a port without having to write each one out individually i.e. P1.0, P1.1..etc. I need to light up some LEDs and just wanted to save myself from lengthy code. I'd be particularly interested in some sort of "variable" I could define to equate to each bit like say P1.port and then just increment port. Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, I am wondering if there is a somewhat simple way to output extended ascii values in c. Basically I am thinking actually about unicode characters, stored in ints. Is there an easy way to do this, or would it require a custom gui console?

Member Avatar
Member Avatar
+0 forum 2

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 of IAV,2znl-A+z327-A PPM1B,IHP of IAV,MAGEA2B,DHP of IAV,2p8e-A+z097-a So, if the line contains IAV protein, I would like to copy the whole first line. I don't need someone to just give me a code that works (although I won't refuse it...) but if you could point me in the right direction, …

Member Avatar
Member Avatar
+0 forum 3

The End.