Java Downloading file from .txt placed on URL and unzip that file in specify destination - auto-update

How can i make that after when you press button named "BUTTOR" it will download a .zip file to specify location and unzip a .zip file from .txt placed on URL to specify location, and in my .txt i will have for example line in other URL where zip folder is uploaded for example in my .txt file placed on "http://mysite/update.txt" there will be on the first line "number" and on the second line "http://mysite/download.zip".
And there will be making a file in specify destination folder named "version.txt" where i will have that "number" which was in previous .txt file And during that process i will get information on my label named "info_info" how many percent left to end of download.
And after that process i will get info on my "info_info" that i need to press button one more time to for example say pop up another window which say "HELLO".
And when i will open one more time that program it will check if i have the same "number" in my "version.txt" like in "update.txt" in the first line, if yes than program will say on "info_info" laber to press butoon to start, if the "number" in my "version.txt" is different than number in "update.txt" it will delete all old files and download new one from "update.txt" url which is inside on the second line. AAfter that it will say to press button to for example say "Hello".
Sorry for my english but i am still learning that language. I hope that someone understand me.

Related

How to create a new html file in windows 10?

I want to create a file called "home.html". Since i am using windows, i tried to first create a text file and then rename it to home.html. But after doing so, when i right click and check the properties of home.html, it shows "Type of file" - text(.txt). I want to create a file with html extension. Kindly help me. I am new to html
The file is renamed home.html.txt because by default the file extension is hidden on windows.
You must start by displaying the extension of the files to rename them correctly.
if you use windows 8,10,11
1. Open File Explorer (open any folder).
2. Click the View tab.
3. Select "File name extensions."
4. Optionally, you can enable Hidden items.
5. File extensions will now be visible.
If you use windows 7
1. In the Start menu search, type folder options.
2. In the Folder Options window, click the View tab.
3. Remove the check from "Hide extensions for known file types."
4. Click OK.
SOURCE : https://knowledge.autodesk.com
You can create that file using CMD,
Open CMD
Tape the following command in the location you want to create the file
type nul > file.html
Had same issue . What you need to do is that you gonna go to your editor be it NotePad or Sublime . Press ctrl N for a new page and Ctrl S to save the file and you will need to choose your file type to be html
In the desktop window of your PC create a new folder ( with any name) double click on the folder to enter, then right click and create a new txt file. After creating a txt file, right click on it, then select rename and change the .txt to .html to make it a HTML file.
You need to open notepad on your PC and write your HTML code.
Then go in 'File', 'Save as',write the file name with the .html example: name.html.
Now change .txt to 'all files'.

Error when opening project on Construct 2

I'm getting this error when I open the project on Construct 2, How can i solve this problem?
This error is indicating that the file within the project is no longer available to load. Therefore it must have been deleted or moved.
You will need to go to the games directory and place biru.png within the texture directory.
This should help with the error, once the project is opened you can then delete the object or try find where the original file is.
You can fix this,
Open the layouts folder.
Open each xml file and search for Keyword "biru.png"
Once you located that, remove this event where it exists.
Save the XML and close editor.
Go back and open the "New project.caproj"
If the Porject extension isn't ".caproj"
First make a backup copy of this project file.
Right click on project and name it as .zip file.
Unzip the file
Navigate into Layouts folder
Open each xml file and search for Keyword "biru.png"
Once you located that, remove this event where it exists.
Save the XML and close editor.
Go back and open the "New project.caproj"

How can I reformat Source Code for files without file extension in WebStorm 2016.1.3?

How can I reformat Source Code for files without file extension in WebStorm 2016.1.3 ?
Example: I've a automated_generated_json_file_without_extension in one line and the name of the files are always different. I don't want to configure all these file names in "File Types" Dialog and register new patterns.
In Sublime you can change the file type at the right bottom corner, is there a similar function in WebStorm?
Unfortunately you cannot change file type of the file on the fly in WebStorm.
Possible workarounds:
Have a set of files (e.g. test.json, test.js etc) somewhere in a project where you can copy-paste this file content, reformat it there and copy it back.
Use "Scratch files" functionality (Tools | New Scratch File...) and then the same copy-paste content to reformat.

Chm file displaying Page can not be displayed

I have created compiled html (chm) file using the Microsoft html Help Workshop. when I tried to open the generated chm file, it is showing message "Page Can not be displayed". But when I click on content topic only then I am able to see corresponding page content.
Do I need to set any thing so show the selected page by default.
The short way:
If the CHM help file resides on a network drive please copy this file to a local hard drive first and try again. You'll find some additional and troubleshooting information at:
http://www.help-info.de/en/xml/maml_troubleshooting_hh.xml
http://www.grainge.org/pages/authoring/chm_mspatch/896358.htm
Problem: The help file will appear, but instead of the topic text you will see an error message "this page cannot be displayed".
Cause: Microsoft released some security patches that makes it impossible to view CHM files that are stored on a network drive (as opposed to CHM files stored on your own computer).
Solution: There is a work-around to allow viewing across a network as discussed on the following links:
http://west-wind.com/weblog/posts/2928.aspx
http://www.helpscribble.com/chmnetwork.html
The problems can also occur if the CHM file name or the path to the file contains a number sign (#). If the CHM file name contains the # symbol, then the topics in the table of contents do not appear. If the path contains the # symbol, then you may receive an access violation error message.
To work around this issue, remove the # symbol from the file name or from the path to the file.
If you have a compiled collection of CHM's (so called "merged CHM") some other problems are possible.
If you are new in using HTMLHelp Workshop:
Question: Is there a way to set a default page to be displayed when a .chm file is opened? I would like to display the page associated with the first item in the Table of Contents.
Answer: You can do this with Microsoft HTMLHelp Workshop.
Open your HHP file with HH Workshop
Click the first icon "Change project options" on the "Project" tab
Set the "Default file" from the file list of the combo box
Compile your project
HHP file example (open with notepad):
\\\
..
[OPTIONS]
Binary TOC=No
Binary Index=Yes
Compiled File=Help_Coding-Example_VB6.chm
Contents File=Help_Coding-Example_VB6.hhc
Index File=Help_Coding-Example_VB6.hhk
Default Window=main
Default Topic=index.htm
..
///
There is a solution:
In your HTML Help Workshop go to the "Project" tab
Press button "Change project options"
In the "Default file" field put the name of your default file which is already exist in your project. File should have .htm extension (for example about.htm)
Compile project again and you will see that problem is fixed

turn folder into a zip file

I have a folder on my desktop and i want to convert it into a .zip file. It shouldnt ask me were to save it but just save it straight to my desktop or any folder i specified.
I tried ASZip, fZip etc. but i can't get it to work. There isn't any of them that seem to let me just add a folder and zip it.
I was only able to create a byteArray wit ASZip but when i saved it, it left me with a file that was not able to be opened.
Would it be possible to achieve what i want without the use of an external library?
Any help would be appreciated.
You can't actually zip a folder but you can zip all the contents inside the folder. You would have to use FileReferenceList to load in flash all the files inside the folder.
FileReferenceList allows you to have multiple selection in the browse window.
Then you would have to pass all these files to the zip managing library and get a ByteArray from it.
This byte array you would localy dump inside a "yourFileName.zip" by using FileReference.save().
The application cannot save the file to a predetermined location. The user has to pick the location using the "save to" prompt.