w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to display a png file from a webpage on a tk label in Python?
You should use PIL (or pillow). You can find pillow windows binary here. Try following example after you install pillow: from io import BytesIO import urllib import urllib.request import tkinter as tk from PIL import Image, ImageTk root = tk.Tk() url = "http://imgs.xkcd.com/comics/python.png" with urllib.request.urlopen(url) as u: raw_data = u.read() im = Image.open(BytesIO(raw_data)) image = ImageTk.PhotoImage(im) label = tk.Label(image=image) label.pack() root.mainloop()

Categories : Python

Use a CSV file to populate a webpage that display the latest weather using flask?
I think you're looking for send_file(). The flask endpoint would look something like: from flask import Flask, send_file app = Flask(__name__) app.debug = True # Your get_information method @app.route("/weather.csv") def weather(): url = "http://api.wunderground.com/api/8d3b5d3fa03ddb6f/conditions/weather/q/China/Beijing.json" get_information(url) return send_file("out.csv") if __name__ == '__main__': app.run()

Categories : Python

How to display webpage in the webpage
You shoud change Main.aspx to a usercontrol(.ascx) then you can include it like this <%@ Register TagPrefix="uc" TagName="Main" Src="~/Controls/Main.ascx" %> <uc:Main id="main" runat="server" />

Categories : Asp Net

eclipse, not able to display webpage
Hope you are using eclipse indigo or juno. You should try and set the default browser by Windows-> Web Browser -> This will list something like this , where the internal browser is your eclipse default browser which opens the webpage within eclipse itself. You can set it to any other browser as well. Also, do check your web.xml file for welcome-file probably index.jsp and it should not be inside your WEB-INF. Sync your project with your tomcat server by adding the project to it and run your project directly on server. It will open up the welcome page. Try this out. See if that helps

Categories : Eclipse

webpage display issue in IE10
The frames/frameset is your issue for IE10. For some reason it doesn't support it but here is a link for the fix: http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx

Categories : HTML

How do I display a webpage in Windows Phone 8?
If you want to launch Inernet Explorer with a specified webpage, use the WebBrowserTask: WebBrowserTask webBrowserTask = new WebBrowserTask(); webBrowserTask.Uri = new Uri("http://www.google.com", UriKind.Absolute); webBrowserTask.Show(); If you want to embed a web browser in your app, use the WebBrowser control <phone:WebBrowser x:Name="webBrowser1" IsScriptEnabled="True" /> and in the code-behind: webBrowser1.Source = new Uri("http://www.google.com");

Categories : Windows Phone 8

Display "guest" on webpage if User is not logged in
Use JSTL tag libraries. JSP scriplets are deprecated almost a decade back. This is how you do it using JSTL: Welcome, <c:out value = "${sessionScope.username == null ? 'Guest' : sessionScope.username}" /> See also: Our JSTL tag Wiki. How to avoid Java Code in JSP-Files?

Categories : Java

Display content of browser status bar in webpage
I think your best bet is: window.status ... in javascript. But apparently most browsers don't support this. Do something like: var element = document.getElementById('someelement'); setInterval(function() { element.innerHTML = window.status; }, 50); When you upload a file, then clear the interval when you're done.

Categories : PHP

Display Chinese Japanese characters in WebPage
If you're using ISO character sets, you need to use the right one for these languages Character Sets Or you can just simply set character set to UTF-8 and not worry about the language on the page it self. If you're still seeing weird characters, might be that you somehow overwrite the encoding, or perhaps have a malformed HTML code. Cheers, Deadpool

Categories : Asp Net Mvc

Display list of files in webpage using servlet
A quote from the Javadoc of File.listFiles() returns null if this abstract pathname does not denote a directory, or if an I/O error occurs. So your path is not correct (as the current directory of your servlet container is undefined). You have these possibilities here: Use the absolute path (this is appropriate, if you store the PDF outside of your webapp) Use getRealPath() (this should be suitable for your use case; PDFs are part of webapp): File pdfFolder = new File(req.getSession().getServletContext().getRealPath("/pdf"));

Categories : Java

How to Display Directory Files on a PHP/HTML Webpage?
Depending on your web server, you can enable directory listing. For example, in apache, you can delete your index.html and index.php file and enable directory listing in your .htaccess file. If you're using PHP, use `scandir](http://php.net/manual/en/function.scandir.php) to read a list of files in the current directory and print them to the screen. $files = scandir( "MY_DIRECTORY" ); foreach( $files as $file ){ echo $file . "<br />"; }

Categories : PHP

Display information from MySQL Database on webpage
There doesn't seem to be any problem with your query, so if you want to just format it as a table, you could do echo "<table border=1>"; while ($row = mysql_fetch_array($result) { echo '<tr><td>'; echo $row['team1']; echo '</td><td>'; echo $row['team2']; echo '</td></tr>'; } mysql_close($con);

Categories : PHP

To display the webpage again, Internet Explorer needs to resend
This is the double-submit problem in browsers. When a page is loaded using POST request and you try to reload the page using location.reload(true);, the browser needs to send another POST request to the server and this may cause problems as POST is supposed to change state on the server. Therefore, the browser needs confirmation from the user. To solve this problem, we usually use POST-REDIRECT-GET pattern. In your case, just simply using location.href = location.href should solve the problem as this will reload the page using GET.

Categories : Javascript

Display the data onto webpage retrieved from mongodb using node.js
You can do this pretty easily with express and mongoose. First you would connect to mongoDB using mongoose, and then set up some of the variables used to interact with mongoDB from mongoose (i.e. mongoose.scheme & mongoose.model), and finally you simply send your mongoDB data to a web page through express's res.render function: mongoose.connect('mongodb://localhost/test', function(err){ if(!err){ console.log('connected to mongoDB'); } else{ throw err; } }); var Schema = mongoose.Schema, ObjectID = Schema.ObjectID; var Person = new Schema({ name : String }); var Person = mongoose.model('Person', Person); app.get('/', function(req, res){ Person.find({}, function(err, docs){ res.render('index', { docs: docs}); }); }); After se

Categories : Javascript

IIS Express Internet Explorer cannot display the webpage ... until restart
I have faced the same issue in a perticular scenario. It was like, Page_Load event of 1st page contains code to redirect response to 2nd page and Page_Load event of 2nd page contains code to redirect response back to 1st page. So due to this browser response fell into infinite loop and it shows message: "Internet Explorer cannot display the webpage". So I'll suggest you to check the response redirection logic which may be causing problem.

Categories : Asp Net

Display rows on a webpage from a function that uses mysqli to retrieve data
You are nearly there, you could go about doing it like this: function.php function get_users(){ $db = mysqli_connect("localhost", "root", "", "shop") or die("Error"); $query = "SELECT id, username FROM users"; $result = $db->query($query) or die("Error"); return $result->fetch_all(); } Display File <?php include_once('function.php'); $users = get_users(); foreach($users as $user) { echo '<p>' . $user['id'] . ' ' . $user['username'] . '</p>'; } ?> This has a more clear separation of concerns, no HTML in the function call so it can be reused multiple times reducing duplicate code.

Categories : PHP

Display a webpage if direct access, but an image if embed content
debug_backtrace() || die ("Direct access not premitted"); Add some HTML inside the die() command to display a webpage. I will go out on a limb and assume you don't want an entire webpage, just a message that indicates you can't use your images if requested. Source: Here

Categories : PHP

Firefox tells user they need a plugin to display an embedded webpage
Per spec, embed elements are only handled via plug-ins or an SVG renderer (and in the latter case behave just like iframe). You can do <object data="URL"></object>, but of course that will also behave like iframe...

Categories : HTML

Cannot read XLSX file - Exception with Stream "Cannot access Closed File
The difference is probably in the method: excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream); Can you show us that code and verify that you're not accidentally prematurely closing the stream?

Categories : C#

Incomplete lines written into txt file when the file is closed - Android
Try using flush before closing: public void stopSaving() { try { myPrintWriter.flush(); myPrintWriter.close(); } catch (IOException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } try { myOutWriter.flush(); myOutWriter.close(); } catch (IOException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } try { fOut.flush(); fOut.close(); } catch (IOException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } }

Categories : Android

can i display excel and word document from base64 encoded data to webpage?
Are you using embed for the word docs as well? Try using object as below: <object data="file:///C|/myfile.doc" type="application/msword" style="width:100%;height:100%;"></object>

Categories : PHP

How to dynamically copy selected ListItems from a ListBox to a DropDownList AND have it display correctly in a Webpage
I believe that, you need to add the trigger for the second UpdatePanel with ID as OptionsUpdater. Similar to the way you did for the first one. <asp:AsyncPostBackTrigger ControlID="GroupList" EventName="GroupList_SelectedIndexChanged" /> Please try updating the html. Also there is no partial update, while using update panel also, asp.net actually does all the work , but only a part of the page is updated and user feels like it is doing some thing on back end. Can I suggest you to achieve these kind of tasks using jQuery.

Categories : C#

Finalizing a Cursor that has not been deactivated or closed or database not closed error
When you are done with the cursor, you need to call Cursor.close(). Leaving it not closed leads to memory leaks. E.g.: Cursor cursor = null; try { cursor = getContentResolver().query(myUri, MY_PROJECTION, null, null, null); if (cursor != null && cursor.moveToFirst()) { // moar code } } finally { if (cursor != null) { cursor.close(); } }

Categories : Android

Bat file to open webpage with parameters to local file
I tested this and got the same result. I'm not really sure, but I guess this belongs to the question mark. The local file system of Windows can never have file names with ?, because this is a "wildcard" like *. I think it is possible that the file name is truncated there. The following codes also doesn't work or produces only error messages: start "file:///C:/Users/d92495j/Desktop/OracleCDs/WebLogic/template.html?wbt=1" start file:///"C:/Users/d92495j/Desktop/OracleCDs/WebLogic/template.html?wbt=1"

Categories : Windows

File being used by another process even if closed it before
When you are using using you don't need to close Stream because it automatically close the Stream after using; so try this code: using (FileStream fs = new FileStream(assemblyFile, FileMode.Open, FileAccess.Read, FileShare.Read)) { //read a file and write to memorystream. }

Categories : C#

Reopening closed file: Lua
So, now the problem is that the "LoadScript" function isn't doing what you expect: Because I'm psychic, i have divined that you're writing a Crysis plugin, and are attempting to use it's LoadScript API call. (Please don't assume everyone here would guess this, or be bothered to look for it. It's vital information that must form part of your questions) The script you're writing attempts to set Backup - but your script, as written - does not separate lines with newline characters. As the first line is a comment, the entire script will be ignored. Basicallty the script you've written looks like this, which is all treated as a comment. --[[ comment ]]--Backup="Hello!" You need to write a " " after the comment (and, I'd recommend in other places too) to make it like this. In fact, you d

Categories : Windows

Does the file need to be closed after modifying with 'sed'?
No. When sed exits, the file is closed. This is probably a permissions issue. Verify that your Windows user has write access to the file. If it's on a Windows partition, try running Notepad++ as administrator. If it's on a Linux shared fs, try chmod.

Categories : Windows

Cant open a closed file
You need to have all code that references fs inside of the using, otherwise you are attempting to access an object that has already been disposed. I would also do the same thing with the BinaryReader, since it also implements IDisposable: Dim data() As Byte Using fs As New FileStream(FileName, FileMode.Open, FileAccess.Read) data = New Byte(fs.Length) {} Using br As New BinaryReader(fs) br.Read(data, 0, data.Length) End Using End Using ...

Categories : Asp Net

Application gets closed when terminal is closed, how to stop this?
Use nohup to prevent child processes from being killed when the terminal closes. spawn nohup /usr/bin/firefox https://www.google.com/ I assume there's more to the script, since there's no need to use Expect just to start firefox.

Categories : Python

Using BackgroundUploadAsync to upload file to SkyDrive after WP8 app has been closed
You cannot upload files during the closing of the app in WP as you only have about 10 seconds to save state before it's shutdown You might be able to do it during de-activation but it would be a push as the timescales are the same. A better solution would be to have a background task (scheduled task) that runs and checks for files to upload and does so periodically. Another alternative depending on your use case would be to use the parse SDK rather than upload to SkyDrive unless there is a specific reason the file needs to be hosted on SkyDrive Hope this helps

Categories : C#

Check if a file that has been opened with fopen has been closed
May be it help you, just some suggestions: You can check file open by your process using process id. pid_t getpid(void);, return the process ID of the calling process. Next pass this PID to pfiles command. Second: You can call int fcloseall (void); before program terminates. This function causes all open streams of the process to be closed and the connection to corresponding files to be broken. All buffered data is written and any buffered input is discarded. The fcloseall function returns a value of 0 if all the files were closed successfully, and EOF if an error was detected.

Categories : C

Bring value from one webpage to another webpage in Ruby on Rails website without database
OK, after a night of research, I was able to pull together a few different sources that helped me get an answer to this one. The most helpful answers were here: pass parameter by link_to ruby on rails and Pass Variable between Views in Rails I learned how to use link_to to pass the parameters from one view to another view (one webpage to another, to a user). Here is how I did it: newmaps.html.erb <%= link_to 'Edit', maptry_path(:newsavedmap_id => newsavedmap.id) %> The above code uses the anchor text "Edit" and links the user to the maptry.html.erb view. It also brings over the newsavedmap_id. Then, I updated the maptry_controller maptry_controller.rb @newsavedmap = Newsavedmap.find(params[:newsavedmap_id]) With this in place, I can add any of the information from

Categories : Mysql

Directing to a webpage after comparing a input variable in perl webpage
You are looking for the redirect header CGI.pm: Generating a Redirection Header To elaborate, once you've computed the next URL, you add a redirect header to tell the browser to go there. There are two ways. The first way is to call redirect($new_url). The second is to call header('Location', $new_url). I've found that sometimes, the redirect() method doesn't work for me, and I have to resort to the header() method. But that may have been my old, old version of CGI.pm. The other thing to remember, is that neither of those methods end your request processing. They simply add a header to the response's header list. It's up to you to exit correctly from your script.

Categories : Forms

My webpage ignores changes in CSS file
You css is getting cached. If you clear your cache, you will see a difference. There are techniques you can apply to bust the cache, such as appending a timestamp or build number to your filename or link. If this is for development purposes and your production copy won't change much, I wouldn't bother, as clearing your browser's cache will suffice.

Categories : CSS

Get value from a cell in a closed workbook, file name made up of variables
You can get a value from a closed workbook in VBA: Debug.Print ExecuteExcel4Macro("'F:Documents and SettingsstudentMy Documents[AndysData7.xlsx]Staff List'!R6C4") The formula needs to be in R1C1 format. This is an undocumented feature though, and may not work in future Excel versions.

Categories : Excel

Delete that particular username from .txt file when browser of that user is closed
There's no sure-fire way to tell if the user has closed his or her web browser. Trying to catch such an action w/ JavaScript will undoubtedly lead to bugs. The only thing you can do is delete said usernames after a pre-defined period of inactivity. If the user hasn't carried out any actions within the pre-defined timeframe, assume that they are inactive.

Categories : PHP

Display webpage address in browser address field which is loaded into iframe
You can't. What if http://fakebanksitewithrealbanksiteiniframe.com could just display http://yourbank.com?

Categories : Asp Net

How to ensure a webpage's content extends to the bottom of a webpage using only CSS
Notice you specify header height in pixels and everything else in %'s also note the excess is exactly 155px over the page. The header was pushing everything downwards because you told content to take room already taken by the header new css: html, body, div, header { box-sizing:border-box; } html, body { .... height:100%; .... } #wrapper { height:100%; .... } header { height: 20%; width: 100%; .... /*Top Gradient Defined*/ ..... } #content { ..... height:80%; .... } Here's a jsFiddle example

Categories : HTML

Batch file to identify 0 from a txt file which contain file name(e.g.ABCDE01)and trigger message display that 0 found together with the file name/path
Assuming format is always 0.0000, this should do it: @echo off find "0.0000" <"C:UsersUserDesktopoutcome.txt" >nul && echo ERROR:FOUND ZERO SIZE IN THE FILE!!! & pause

Categories : Batch File

kml file properties overriden by css in webpage
better try using iframe like this <body> <iframe width="700" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=https:%2F%2Fraw.github.com%2Fthroughnothing%2Fgpx%2Fmaster%2F2012%2F20120629.kml&amp;t=h&amp;ie=UTF8&amp;output=embed"> </iframe><br /> </body> refer this link https://gist.github.com/throughnothing/3074654

Categories : HTML



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.