w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to stop Socket to send a lot of useless data when closed?
I think you should use a delimiter character, to tell the Server your Client it's about to die. Add that character of code in onPause method of your Android Activity/Fragment. Then in your Server, just get the String or byte and compare it against your Delimiter String/Character and stop the Server listening for the Connection.

Categories : Android

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

SQL Server DB stop from being copied
Considering it's SQL server I am assuming you are using Windows environment. The ideal situation would be to have it on a separate server where only few people have access. If it's a smaller setup then restrict unwanted access to folders by applying security and only allowing yourself and trusted users access to the folders.

Categories : Sql Server

Stop YouTube video when div is closed with jQuery
As you're using iFrame, you can just clear its src: $( document ).ready(function() { $("#close_box1").on("click", function () { $(".full_page_overlay1").fadeOut(); $(".cart_over1").fadeOut().find("iframe").attr("src", ""); }) }); If you're using the jQuery UI Dialog, you could set this to be done on the close event.

Categories : Jquery

progress bar showing data being copied
You can check out my SignalR library Install using nuget Install-Package SignalR.EventAggregatorProxy Follow the few steps needed to set it up here https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy/wiki You also need to implement a Event aggregator on your service. Caliburn micro has a small one, install usting nuget Install-Package Caliburn.Micro.EventAggregator Update your service with foreach (var rows in EmpTable) { EmpEntity EmpDetail= _EmpRepository.FirstOrDefault(x => x.EmpId== EmpId ); EmpDetail.RowCount = saveEmp.CreatEmployees(); _EmpRepository.Update(EmpDetail); eventAggregator.Publish(new EntitySavedMessage(EmpDetail)); } On client MyViewModel = funct

Categories : Jquery

How do I stop an Azure website from using CPU time when it is already suspended?
This is very odd, and not what I would expect to see happen. You have a few options to try: Attempt to use PowerShell to stop the web site. You can download the Windows Azure PowerShell Cmdlets at http://www.windowsazure.com/en-us/downloads/. The Stop-AzureWebsite cmdlet is what you'll want to use. If you are unfamiliar with the PowerShell cmdlets there are some examples and info on Microsoft's website. Put in a support ticket if you have a support plan. If you don't have a support plan you can also put in a post on the MSDN Forums which is seen by support folks more than they are here I think. There is no SLA or such with the free accounts, but they see these and do investigate. Just might take some time. If you for sure want to stop it one option is to attempt to delete it if th

Categories : Azure

Why my Scrapy project stop scraping, but still scrawling website well
Out of your 800 url, you are writing with ticker name as the file. Are the ticker names distinct in all urls? If they are not distinct, you might be overwriting the files. Instead of writing into a file, you can use the export option. You can read the following thread to know about exporting the data. Scrapy : storing the data

Categories : Python

Halt batch file until website stop is complete?
Does appcmd return immediately no matter what? This might work, depending on how appcmd behaves. start /wait "site stop" appcmd stop sites "siteName" If appcmd is a script, you could probably fix it so that it doesn't return immediately. What web server are you using?

Categories : Windows

How to stop google to craw/index duplicate and non existing page in website
If the URLs are actually invalid, you should return a 404 response, which should prevent Google from indexing the page. If the URL leads to duplicate content, then you should make sure the page has a canonical URL on it. That will help Google to recognize that it is a duplicate

Categories : PHP

website to pull data from another website and return it
This is a really expansive answer, to do this, you have to have a piece of software to read in an API from a live score site and display it. It cant be answered in one answer, to know more about APIs take this course. Hope that helps you, check the course syllabus (on the same page), there is a unit called How to Connect which will help you. Leave a comment to tell me if it helps or if i can do anything else to make it more helpful...

Categories : C#

Ruby: get the website data after logging into website
There are plenty of examples here mechanize example If you are looking at http authentication then a similar post is here basic-and-form-authentication-with-mechanize-ruby Use mechanize to make life easier.

Categories : Ruby On Rails

Adding objects (copied through Defensive copying using BeanUtils) in ArrayList giving stale data: Spring 3
You're using the wrong tools. Your problem is that you mixed up Spring beans with Java beans. A Spring bean is a singleton and therefore you only have one CustomerDTO in your Spring context. The Spring context is not a replacement for a real DAO. Either use aMap or a database in your DAO and don't try to use the Spring context for data storage and retrieval operations.

Categories : Java

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

How to save data when a program is closed
I typically create XML files to store parameter fields that require saving. http://www.dotnetperls.com/xmlwriter It works well enough when you've not got sensitive material and you need to get parameters back without much heavy parsing.

Categories : Visual Studio 2010

retrieve excel data from closed workbook with ado
When you attempt to CopyFromRecordset you are already at the end-of-file (EOF) so there is no data to copy. Move the CopyFromRecordset statement earlier in your code, before looping through it. And the argument for this method is a RecordSet object: .CopyFromRecordset objrecordset

Categories : Excel

HttpClient Connection closed in between while data is transferring
finally solved the issue, setting the following header worked for me. method.setRequestHeader("Accept-Encoding", "gzip, deflate"); and postResponse = IOUtils.toString(new GZIPInputStream(method.getResponseBodyAsStream()));

Categories : Java

Select Data From Closed Excel Sheet Using ADO
You should use Excel 12.0 for .xlsx files. Example: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:myFoldermyExcel2007file.xlsx; Extended Properties="Excel 12.0 Xml;HDR=YES"; from connectionstrings

Categories : Excel

Is the vim clipboard a stack? If yes, how can I paste copied data from that stack?
I wouldn't say it is a stack. it works like stack ( for deletion) . I think you need to take a look "numbered registers". Vim has 0-9 numbered registers. If you think it as a stack, the size of the stack is 9 (1-9) for deletion. Yanked things were stored in register 0 and "", no stack structure. I said it works "stack like" but not stack (for deletion) because, with stack data structure, you could not randomly fetch element. you can just pop or push. but with vim's register, you could get any (0-9) element by "1 "3 "5 for example, and keep the "stack" without changing. read :h registers for detail.

Categories : Vim

Why does Angular not databind data when an object is copied from another object?
I have never worked with AngularJS before, but I think what is going on here is that your parameter p is not your simple key/value object but a more complex AngularJS object. By assigning your prod to it you are overriding it instead of changing specific parts of the object. Maybe the following code snippet will help you out: for(var key in prod) { p[key] = prod[key]; }

Categories : Javascript

GUI Save Feature so that when the GUI is closed, when it reopens it has the same data visible
You'll want to attach a WindowListener to the FutureValueFrame and monitor for the windowClosing event. When this occurs, you will want to write the settings you want to keep. When the application is loaded, you would simply read these settings in and apply them to your application Check out How to write Window Listeners for more details As for the actual storage, you have a number of options... You could use the Properties API which has save and load functionality, but is based on a simple key/value pair API. You could also use the Preferences API, which has a little more functionality (store primitives), but you lose control over where the data is stored (more or less) The choice will come down to what it is you want to achieve and the amount of work you want to go to

Categories : Java

how to clean the data when the popup window is closed in jquery
You can do $('#popup_box').empty(); to empty the div. if you want to do it after fade animation is over then: $('#popup_box').fadeOut("slow", function(){ $(this).empty(); });

Categories : Javascript

extracting all data from database but "attempt to re-open an already-closed object"
You have to close your cursor in get_All_Ex_Data(), after your loop. The thing you open and close in onPreExecute and onPostExecute is the db helper. Edit : is your database helper a singleton ? You have an example of a singleton here: Using Singleton design pattern for SQLiteDatabase

Categories : Android

How can I show a PyQt modal dialog and get data out of its controls once its closed?
Here is simple class you can use to prompt for date: class DateDialog(QDialog): def __init__(self, parent = None): super(DateDialog, self).__init__(parent) layout = QVBoxLayout(self) # nice widget for editing the date self.datetime = QDateTimeEdit(self) self.datetime.setCalendarPopup(True) self.datetime.setDateTime(QDateTime.currentDateTime()) layout.addWidget(self.datetime) # OK and Cancel buttons buttons = QDialogButtonBox( QDialogButtonBox.Ok | QDialogButtonBox.Cancel, Qt.Horizontal, self) buttons.accepted.connect(self.accept) buttons.rejected.connect(self.reject) layout.addWidget(buttons) # get current date and time from the dialog def dateTime(self):

Categories : Python

VBA Copy data from an unopened CSV file to worksheet without opening closed CSV
Assuming that you want to just grab the data and put it in your current workbook. I recorded a macro using the Data -> Import Data method and in VBA and it seems to work with the CSV file closed: Print to consecutive column: Sub Macro1() Dim MyDocuments, strFileName, myToday, file, strConnection As String MyDocuments = Environ$("USERPROFILE") & "My Documents" myToday = Format(Date, "mmddyy") strFileName = "DataFile" & myToday & ".csv" strConnection = "TEXT;" & MyDocuments & "DataFolder" & strFileName With ActiveSheet.QueryTables.Add(Connection:= _ strConnection, Destination:=Range("$A$1")) .Name = "temp" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatt

Categories : Csv

Windows Phone 8: Updating Live Tile data when app is closed
Does this mean I need to have separate instantiations of this class, one for the main application and the background agent? Yes. You must think of the background agent as a separate application. Though there is ways to share data between your application and your background agent, but the extra complexity isn't worth it in your case. Note that you can share the implementation of your class between the application and the background agent by putting it in a third project (and referencing this project from both the application and the agent).

Categories : Windows Phone 8

mySQL: column data to be copied into another column
Probably only minor typos: missing ) and you write the affectation in reverse order: UPDATE `Census`.`Merged` SET `1901Age` = `Age` -- Copy from `Age` to `1901Age` WHERE `Age` >= 0 -- Compare on integers AND `1901Age` = 0 -- Here again -- (BTW, would probably have been better to -- use NULL to denote "non-existent" data) AND `BothCensusStatus` = '1901Only'

Categories : Mysql

Why does my Datagram socket stop recieving data, even though it recieved data perfectly fine?
It looks like your Server class is designed to be used as the Runnable of some worker thread. I suspect that the problem is that the run() method is dying due to an uncaught exception, and that the worker thread is simply terminating. I recommend that you configure a default uncaught exception handler to (at least) log the stack trace for the fatal exception. Refer to the Thread javadocs for details.

Categories : Java

Is there a way to make the form stop loading data from file after specific data has been found
you can read all the lines of the file, and exit when you find the info you need. Something like this might work for you: StreamReader reader = new StreamReader("YOUR PATH GOES IN HERE"); while(reader.Peek()>=0) { string yourString = reader.ReadLine(); if(yourString == "WHATHEVER YOU NEED") { //YOUR CODE HERE break; } } reader.Dispose(); reader.Close(); I hope that helps you!

Categories : C#

Client prints Half Data Before Connection is Closed By Server on Socket
try flush data after sent. it needs if you use socket with fdopen FILE *fdsock = fdopen(sock, "a+"); ... fwrite(fdsock, 1, 1 "A"); fflush(fdsock); ... fclose(fdsock); and to finish socket, close with shutdown(sock, SD_SEND); UPDATE Take memset out of loop

Categories : C

How to draw closed spline 3D (closed curve 3d) through unordered list of points3D. How to arrange points3D?
It sounds like you're looking for the Concave Hull of the data set. Unfortunately, I don't know of any pre-canned algorithms, but the link references a paper that another developer was starting from, as well as some sample code, so maybe that'll help you in the right direction.

Categories : C#

Storing Data on and accessing data from a website
JSON JSON JSON! JSON is awesome, and is IMO the easiest way to communicate between the web and any other platform. You can look here and here for more info on the android side. Depending on what platform you are using for your website, there are many awesome libraries to help export your info to JSON. Happy Coding!

Categories : Android

The underlying connection was closed: The connection was closed unexpectedly wcf service
The first thing i will do is, instead of returning the full list of candidates i will return an empty list. If that works fine, then it is very clear that the size of the data is a problem. To modify the size play with your binding parameters.

Categories : Wcf

Not being able to get data from website
This line is the clue... java.lang.NoClassDefFoundError: org.jsoup.Jsoup Your application can not find the Jsoup libraries when it runs. Unfortunately I can tell you why with what I can see, but here's a link that has many good reasons and fixes... Android java.lang.NoClassDefFoundError: org.jsoup.Jsoup

Categories : Java

ASP.Net Report Viewer- SSRS Express - Unable to read data from the transport connection—The connection was closed
I have resolved this by removing the ReportViewer UI control and we are now creating a pdf of the report using ReportViewer.ServerReport.Render() and opening with Process.Start(). The client only wants a pdf or a print out so we don't need the report viewer as such. I'm not sure why the connection was closed at times, maybe it's network related as I couldn't replicate on a machine located physically next to the server. Either way this is resolved, onto the next project!

Categories : Reporting Services

Pulling data from another website
You can use javascript to make a GET request for the data. Some links for doing this with jQuery: http://api.jquery.com/load/ (see http://api.jquery.com/load/#loading-page-fragments) http://api.jquery.com/jQuery.ajax/ http://api.jquery.com/jQuery.get/ Note that relative links to assets may be broken, and if you're loading a whole page including etc you should have it in an iframe. I don't see how this method is any better than using an iframe as it still won't work if the URL of the content changes.

Categories : Javascript

Showing data from a Website
You can use an HTTPClient to execute a POST function to return the html data from a webpage. You would only have to provide login credentials if the page you're trying to access is username/password protected. A simple tutorial on this can be found here http://argillander.wordpress.com/2011/11/23/get-web-page-source-code-in-android/

Categories : Android

Extract data from a website using VBA
You can use MSXML2.XMLHTTP60 to get page, example for address. ' Add reference to MS XML, v6.0 and MS HTML Object Library Public Sub test() Dim xmlObject As New MSXML2.XMLHTTP60 Dim htmlDocumentObject As Object With xmlObject Call .Open("GET", "http://www.fdci.org/Member.aspx?mid=-1634884325&cat=1", False) Call .send If (.Status = 200) Then Set htmlDocumentObject = New HTMLDocument htmlDocumentObject.Open htmlDocumentObject.write .responseText htmlDocumentObject.Close Dim address As String address = htmlDocumentObject.getElementById("ctl00_ContentPlaceHolder1_lblAdd1").innerText [a1] = address ' and so on ... End If End With End Sub

Categories : HTML

Process stop getting network data
It is going to be very difficult to answer specifically, -- without knowing what exactly is your process/application about, -- whether it is a network chat application, or a file server/client, or ...... -- without other details about your process how it is implemented, what libraries it uses, if relevant to problem. Also you haven't mentioned what OS and environment you are running this process under, there is very little anyone can help . It could be anything, a busy wait loopl in your code, locking problems if its a multi-threaded code,.... Nonetheless , here are some options to check: If its linux try below commands to debug and monitor the behaviour of the process and see what could be problem- top Check top to see ow much resources(CPU, memory) your process is usi

Categories : Networking

"The underlying connection was closed: The connection was closed unexpectedly"
The first request does not utilize a header that indicates the length of the result. It closes the connection when it finishes. The second request utilizes the length header, reads the designated number of bytes, then closes the connection gracefully. (under the client side control instead of server driven disconnection) -or- The url you sent caused an error on the server. Is there an error in the server log or event viewer?

Categories : C#

No data found when access the website
You do not provide enough info to get help. You need to troubleshoot your system by looking into the logs. "Mostly while working with Magento, you end up with serious errors or broken stuffs. So, Magento Error Logs come to the rescue here. Whenever you have a serious error on your site, you can just view your error logs and debug the error and get rid of that situation. As simple as it is. Many of you may be wondering, how to switch on Magento Error Logs or view it. So,here are the simple steps : 1) Turn on your logging: Admin > Configuration > Developer > Log Settings > Enabled = Yes 2) Watch your var/log/system.log and var/log/exception.log for raw information from this. You may run into file permission errors, so you might need to set your folder permissions appropriately. Source : ht

Categories : Magento



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