How to save image from computer client to server using java?? Give me the source code..

Member Avatar
Member Avatar
-2 forum 2

Hi, I haven't been on this community forum for quite a while. I have been getting an annoying problem with my file uploads (i.e. pdf documents), to my remote server. The upload_file form was working great for a long time, but just recently it stopped working. The problem there, was, once I clicked on the 'submit' button to send the file to the 'remote uploads folder' nothing happened, not even an error message. I then logged into the website cPanel Admin Page , then opened file manager to access the 'uploads' folder in 'backend' section, and proceeded to upload a …

Member Avatar
+0 forum 0

I'm trying to compare 2 different CSV files, mark those differences respectively, then produce it as an output. However, my code seems to be only reading the last part of the lines from sample1.csv and sample2.csv as you can see below: Sample1.csv Planet,Account,Name,Station,City Earth,1234,Pete,Nebula,Phoenix Earth,1234,Pete,Nebula,Phoenix Earth,1234,Pete,Nebula,Phoenix Sample2.csv Planet,Account,Name,Station,City Earth,1234,Pete,Nebula,Wakanda Earth,1234,Pete,Nebula,Montgomery Earth,1234,Pete,Nebula,Carlo Current Output History,Planet,Account,Name,Station,City Changed,Earth,1234,Pete,Nebula,Carlo Expected Output History,Planet,Account,Name,Station,City Changed,Earth,1234,Pete,Nebula,Wakanda Changed,Earth,1234,Pete,Nebula,Montgomery Changed,Earth,1234,Pete,Nebula,Carlo Here is the code I have: import csv with open('old.csv', newline='') as f_old: csv_old = csv.reader(f_old, delimiter=',') header = next(csv_old) old_data = {row[0] : row for row in csv_old} with open('new.csv', newline='') as f_new: csv_new = csv.reader(f_new, delimiter=',') header …

Member Avatar
Member Avatar
+0 forum 6

I want the method to append a new person object according to the form each time the save button is clicked, and read the new content of the file each time the retrieve button is clicked, unfortunately it only reads the last entered person. am now here for help package sample; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.DatePicker; import javafx.scene.control.Label; import javafx.scene.control.TextField; import java.io.*; import java.net.URL; import java.time.LocalDate; import java.util.ResourceBundle; public class Controller implements Initializable { @FXML private Button save, retrieve; @FXML private TextField first, last; @FXML private Label saved, retrieved; @FXML private DatePicker date; @Override public void initialize(URL …

Member Avatar
Member Avatar
+0 forum 1

Does all .apk files can be decompiled no matter on how they are protected and secured, and recompile back in apk file? I have an apk file which i need the source code to change something a little bit. I tried using [javadecompilers](http://www.javadecompilers.com) but i did not get the main files with code i need. Is there any alternative to this site or is there any possible way of achiving this? Thank you.

Member Avatar
Member Avatar
+0 forum 4

##vbScript - Identify File by Perceived Type Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. There are times when you want to operate on all files of a given type. For example, you may want to enumerate all files in a folder or a drive that are recognized by Windows as video or audio. But how would you do that? There are so many video file types that it would be difficult to test for even the more common file extensions. Better to ask Windows to do the identification. The Windows Registry contains an key …

Member Avatar
+1 forum 0

##vbScript - Browse for Folder or File Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. Some scripts need input (other than from the command line) from the user. This can be read from the console (StdIn) or from a pop-up textbox (InputBox). This is fine for simple input but you certainly wouldn't want to have to type a folder or file name, especially when it might include a lengthy path. There are several ways to avoid typing a long folder or file name. If you create a shortcut to your script on the desktop you …

Member Avatar
+0 forum 0

hello there. i needed a little help in writing coding for reading multiple lines of data from a .txt file that are seperated by commas. Student Name, Student ID, Mark Ada Lovelace , S001 , 99 Barbara Liskov , S0123 , 44 Carol Shaw, S0023 , 55 Donna Dubinsky , S8333 , 33 Shafi Goldwasser , S934 , 77 Sophie Wilson , S11813 , 22 Frances Elizabeth Allen , S8254 , 66 After reading the data, the data has to be graded and sorted by name, id and grade. i would very much appreciate your guys help in this

Member Avatar
Member Avatar
+0 forum 7

Is there a way to transfer multiple files using sockets from client to server? i was able to send 1 file , but sending multiple doesnt work.

Member Avatar
Member Avatar
+0 forum 1

Write a Marie subroutine that take a range of numbers and prints the prime numbers of this range.

Member Avatar
Member Avatar
-2 forum 1

Hello, all. I am trying to calculate entropy, and I cannot get the calculations correct, or match the results with the assigned if-statements. I get a number that differentiates a bit from the answer that I want. So far, this is my code: #include <iostream> using namespace std; float Entropy(float z, float z1, float e1, float z0, float e0){ float e; e= e0 + (e1-e0)*((z-z0)/(z1-z0)); return e; } int main() { float z,e,z1,e1,z0,e0; cout << "Enter temp between 150 - 500: "; cin >> z; if(z==150){ e=7.2810; } else if(z==200){ e=7.5081; } else if(z==250){ e=7.7710; } else if(z==300){ e=7.8941; } …

Member Avatar
Member Avatar
+0 forum 4

Hi, I’m currently looking to write a program, most likely in Python. Now, I have an odd question. Is it possible to limit this program to running on specific hardware? Could I prevent it from running on a computer that doesn’t have a certain piece of hardware?

Member Avatar
Member Avatar
+0 forum 3

Hey how do you install pyHook with pip? pip installs everything for me but pyHook, when trying to install pyHook it says: Could not find a version that satisfies the requirement pyhook (from versions: ) No matching distribution found for pyhook How can i fix this? i have got windows 10 and a 64 bit pc with python 3.6.3 and this pyHook: pyHook-1.5.1-cp36-cp36m-win_amd64 Thanks for helping

Member Avatar
Member Avatar
+0 forum 1

Have two CSV files containing client records and need to compare the two and then output to a third file those rows where there are differences to the values within the record (row) as well as output those records (rows) on the second file that are not on first file . Example: File 1: KeyField,Name,City, Zip,Location 123,Fred,Chicago,60558,A2 234,Mary,Orlando,12376,4L6 345,George,Pittsburgh,40567, 22 456,Peter,Topeka,00341,234 567,Doc,Birmingham,76543,H86 File 2: KeyField,Name,City,Zip,Location 123,Fred,Chicago,60558,A2 234,Mary,Orlando,12376,4L6 345,George,Boston, 40567,22 456,Peter,Topeka,00341,234 567,Doc,Birmingham,7654,H86 678,Isabel,Guadalajara,87654,M111 The results should create a file containing : 345,George,Boston,40567,22 678,Isabel,Guadalajara,87654,M111 The following code gets me in the neighborhood as a visual check: import os import difflib f=open('original.csv','r') #open …

Member Avatar
Member Avatar
+0 forum 7

I'm about to make code that read the text file line by line, then store it to stucture, then use quicksort. But my code doesn't print anything. Here is my code and text file. #include <stdio.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> struct city{ char nation[2]; char region[10]; char name[50]; int population; double latitude; double longitude; }; struct city p1[100]; int compare_with_name(const void *a, const void *b) { struct city* ptr_a = (struct city*)a; struct city* ptr_b = (struct city*)b; if (ptr_a->name < ptr_b->name) return 1; else if (ptr_a->name == ptr_b->name) return 0; else return -1; } int compare_with_population(const void …

Member Avatar
Member Avatar
+0 forum 4

numbers = [2,3,1,5,7,8,9,5,4,6] print(numbers) tool_1 = int(input()) tool_2 = int(input()) x = numbers.index (tool_1) y = numbers.index (tool_2) numbers[x] = (tool_2) numbers[y] = (tool_1) print(numbers) So I want this code to run until the numbers list is in this exact order 1,2,3,4,5,6,7,8,9 Is there a Do until loop or someway I can do this?

Member Avatar
Member Avatar
+0 forum 2

define an array with 12 month/rows and 31 days/columns for a year's temperature data in a main function. One subtask is to write a function and call it from main reading a text file with mean temperature data of one year and store read data into this array. For example, when you read the temperature 15.4 degrees at date 23.11.2017 you can store double value 15.4 in array row 11 and column 23 as index. how i can make the program know thiss the temperature value even in the file seems like this 23.11.2017,15.4

Member Avatar
Member Avatar
+0 forum 2

Hi guys, This is my first post and basically i require some help editing my current code to help display number of students with a mark of 40 or above specifically. And also i am having difficulty generating a average i thought i done it but it remained constant a 4.0 with every test. This work is on going so i will be constantly updating the page each time i run into more troubles. Thanks guys below is a copy of my code and how far i got... package histogram1; import java.util.Scanner; public class Histogram1 public static void main(String[] args) …

Member Avatar
Member Avatar
+0 forum 2

We have a flex project which called from browser by using a swf file. After flash update the swf file is disabled. Here are the list of flash versions and browsers that we used in windows 7 OS. * Installed Firefox 56.0 - NPAPI 25.0.0.170 version in Firefox . - Issue exist * Installed Firefox 56.0 - NPAPI 25.0.0.127 version in Firefox . - Working Fine * Installed Firefox 56.0 - NPAPI 24.0.0.221 version in Firefox . - Working Fine * Installed Firefox 56.0 - NPAPI 24.0.0.194 version in Firefox . - Issue exist. * Installed Chrome 61.0.3163.100 - PPAPI …

Member Avatar
Member Avatar
+0 forum 1

So I have to write a program that takes the amount and weight of pumpkins entered by a person and then outputs them back with their corrisponding weight class that i specify. I keep getting a syntax error on the elif statement and I was wondering if i could have some guidance as to what I'm doing wrong. The code is listed below, Thank you in advance ! def intro(): print("Program to calculate the average of a") print("group of pumpkin weights.") print("You will be asked to entr the number of") print("pumpkins, followed by each pumpkin weight.") print("Written by Gregory Navestad.") …

Member Avatar
Member Avatar
+0 forum 2

Hi, I need to import a video file into an audio editor called Steinberg Nuenbdo. (on daily basis). In Nuendo, best format for video is avi. But my video converter only allow mp3 for avi files, not wave. In Nuendo, wave is best to import. Could anyone please tell me which video converter is best for my need or which video format is supporting wave audio. Thanks in advance. -Vinod Chandran

Member Avatar
Member Avatar
+0 forum 2

Hello, so I have this program which should be creating a file called output and appending some content from another file,data.txt, accordingly. Creating file called output works but then the output file is empty. what am i doing wrong? Oh and Im suppose to use method print() but that gives me a bunch of errors that says its not applicable. import java.io.File; import java.io.FileReader; import java.io.PrintWriter; import java.io.IOException; import java.io.FileWriter; class TestFile2{ public static void main(String[] args) { try { PrintWriter out = new PrintWriter(new FileWriter("output", true)); File f1 = new File("c://Java/Lab 1/MyDocument/data.txt"); File f2 = new File("MyDocument", "data.txt"); File …

Member Avatar
Member Avatar
+0 forum 6

i have this piece of code that coppies a file to another: my question is, how do i change the name of the created output file ? for example if the file that i run this code on is "text.txt" how do i add the ending ".something" to the file's name created so it'll be "text.txt.something" ? #include<stdio.h> int main(int argc, char *argv[]) { FILE *fp; void filecopy(FILE *, FILE *); char *prog = argv[0]; if(argc ==1) filecopy(stdin, stdout); else while(--argc > 0) if((fp = fopen(*++argv, "r")) == NULL) { fprintf(stderr, "%s: can't open %s\n", prog, *argv); exit(1); } else …

Member Avatar
Member Avatar
+0 forum 11

im intending to write a code that reads words and the lines that it appears at from a file and sort the words alphabetically in a linked list then prints them. so far i've made out this... but it doesn't print them in alphabetic order and it prints duplicates as well (which it shouldn't be doing so) any help ? #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define SIZE 1023 #define LENSTR_(x) #x #define LENSTR(x) LENSTR_(x) #define LEN 7 /* Struct for word and lines that appears in */ struct wordStruct { char *word; char *lines; struct wordStruct *next; …

Member Avatar
Member Avatar
+0 forum 1

i have wrote this program which uses binary search to search for a desired word and which displays the word along with the meaning of that particular word.but each time i print the data that the arraylist contains it just print the word being search but not the meaning of that word.. i have attached the textfile from which i am taking the in post. an example would be when i search robot it should display robot along with the meaning of robot but it wont print the meaning.. it just print the work all the time. private void jButton1ActionPerformed(java.awt.event.ActionEvent …

Member Avatar
Member Avatar
+0 forum 4

I am learning to code and found interesting task, but i do not know where to start in solving it. So i have a file with some titles and comments which need to be placed under the right title. So the first line of the input contains a number N which determines the quantity of the titles. Each row starts with a unique article id (integer), followed by the title in quotation marks. After there is no more titles, comments are given. At the beginning there is Title ID and comment (one word), but comments may recur for the same …

Member Avatar
Member Avatar
+0 forum 5

Good day, I have to make a data scraper and after I take the informations I have to get them in a CSV file.This is the original request:For the final java academy test you have to create a small crawler. What do I mean by "crawler"? A crawler it is a small java program that scans everything from a website. It is similar to what google is doing when it is indexing the whole world wide web. So here are the details. Your crawler must crawl all the products found in the website www.reifen.com When you enter this website the …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone, I've been searching through these forums to find a way to transfer my program output [including the user's input] to a .txt file. The program basically gets the user's name and their choice of ingredients and then prints out a receipt of their order. Below I've attached what I've done using some of the answers I've seen on here. Whenever I come to run the program, I get a file named "output.txt" but nothing is in it. Do I need to be putting the code for file output somewhere else? Perhaps before all the methods to get the …

Member Avatar
Member Avatar
+0 forum 3

`1ph ## and I need you guys to explait it into detailt ## `

Member Avatar
Member Avatar
-5 forum 2

Hello everyone! I have created an editable list control (report style) with numbers. I want to save the content in a text file (each number below the other) and I used void CDataDialog::OnBnClickedOk() { CStdioFile file("test.txt", CFile::modeCreate); int nCount = m_List.GetItemCount();//m_List is control variable declared about list control for (int x = 0; x < nCount; x++) { CString strText = m_List.GetItemText(x, 0); // first column file.WriteString(strText); } file.Close(); } but although it is compiled, it crashes. Could someone help please?

Member Avatar
Member Avatar
+0 forum 3

The End.