[Solved] Searching in folder

Good one, but it is a more clear to use listFiles(FileFilter filter) public class MyFileFilter implements FileFilter { public boolean accept(File pathname) { if (pathname.isDirectory()) return false; else { String temp[] = pathname.getName().split(“.”); if (temp[1].equals(“a”)) return true; } } } solved Searching in folder

[Solved] Output in another file [closed]

The first issue is that the temp, temp2, and temp3 are int, but you are assigning double values to them, and then re-assigning these values back to double variables. You should make these double. You might want to consider using qsort() to sort these objects. #include <stdlib.h> // for qsort int compare_products(const void *p1, const … Read more

[Solved] Processing Input file in c

I am unsure what problems you are having exactly but I can see the following errors in the code: In the initialise_list() function the for loop will be iterating too many times and going beyond the bounds the of array: for(int i = 0; i < sizeof(list); i++) { as sizeof(list) will return the number … Read more

[Solved] program to delete certain text which is predefined in another file from a file in c++

Show some research effort when you post a question here. #include <iostream> #include <unordered_set> #include <fstream> int main() { std::unordered_set<std::string> mySet; std::string word; std::ifstream file1(“myFile1.txt”); if(file1.is_open()) { while(file1 >> word) mySet.emplace(word); file1.close(); } std::ifstream file2(“myFile2.txt”); if(file2.is_open()) { while(file2 >> word) { auto look = mySet.find(word); if(look != mySet.cend()) mySet.erase(look); } file2.close(); } std::ofstream outputFile(“Out.txt”); if(outputFile.is_open()) … Read more

[Solved] Why the weird language? [closed]

Because DLLs are compiled. You’re looking at binary data (machine code instructions, plus various bits of data) with a text editor. While some programs are distributed as source code (bash scripts, JavaScript/HTML/CSS Windows Universal Apps, several others), many others (probably “most” on Windows) are distributed as compiled machine code. solved Why the weird language? [closed]

[Solved] I want to read from and write to a file in C#

You can use File.AppendAllText() as an exact drop-in (but you’ll need to append Environment.NewLine to your text). Make sure that you delete the file if it exists before your foreach loop, possibly prompting the user for confirmation depending on your requirements. solved I want to read from and write to a file in C#

[Solved] File upload not working in IE [closed]

It means that IE send the png with another MIME type than “image/png” which is what you are expecting. Try to add to your array of accepted values: image/x-png Also see this What is the difference between “image/png” and “image/x-png”?. solved File upload not working in IE [closed]

[Solved] Finding repeated lines in Python [duplicate]

I assume you have read in the lines and stored them in an array lines Then, set(lines) gives you a set that contains all unique lines. If every line is unique the length of lines and set(lines) will be the same. Ergo: if len(lines) == len(set(lines)): print ‘all lines are unique’ else: print ‘not all … Read more