w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Namenode recovery, How does namenode recovery works?
There are 2 things to be considered here, 1- Recovery through SecondaryNameNode 2- Recovery through redundant NameNode In hadoop-1.x we have the concept on SecondaryNameNode which holds a copy of the NameNode metadata. If your NameNode goes down you can take the metadata copy stored with SecondaryNameNode and use it to resume your work, once your NameNode is up again. With hadoop-2.x(HA) you can have more than 1 NameNode. In case primary NameNode goes down, the redundant NameNode can take over so that your cluster doesn't stop working(either manual or automatic). In this implementation there is a pair of NameNodes in an active/standby configuration. In the event of the failure of the active namenode, the standby takes over its duties to continue servicing client requests. In order to

Categories : Hadoop

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

Jetbrains Compare Tool as a Standalone tool
You can't use the one from TeamCity, but diff from IDEA can be used from the command line as described in the documentation. If you are looking for the similar cross platform tool implemented in Java, try SmartSynchronize.

Categories : Intellij Idea

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

Git repository recovery
if you did not use some special repo management software, you can just copy the files over. check that the file ownerships are set to the user you use. if the new server is reachable via another domain or you changed the username or the location of the git repo on the server you may need to update the remote(s) in .git/config.

Categories : GIT

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#

How to recovery Ubuntu 12.04 just from the .iso file, without CD-ROM
if you have installed GRUB 2, Grub2/ISOBoot may helps. it permits the user to boot and install Ubuntu directly from an ISO on the hard drive

Categories : Ubuntu

Recovery after accidental `git am` and `git am --abort`
Sorry, if they were unstaged then they were just ordinary files whose contents are outside of git's view. Unless your filesystem has some form of continuous data protection setup (git annex?) setup in it, I think you are out of luck. Possibly it's time to alias am to something else.

Categories : GIT

Git revert screwup - recovery?
On how to avoid this in the future: set push.default to upstream and only ever run git push without further arguments, unless you explicitly want to push to a different branch (which I personally never did). Do not push to other branches. Check out master, merge refactor, push. You might also want to think about the parent order in merges. Your workflow causes a total mess there. On fixing your problem: You guessed right: You are merging your revert commit in, so that is what git does. Here’s how to prevent that: Create a new branch master-fix-revert of master and check it out: git checkout -b master-fix-revert master Revert you revert: git revert **SHA-of-revert-commit** check out your refactor branch and merge your master-fix-revert: git checkout refactor git merge master-fix-

Categories : GIT

Linux file deleted recovery
You can use lsof to recover deleted files (sometimes)... > lsof | grep testing.txt less 4607 juliet 4r REG 254,4 21 8880214 /home/juliet/testing.txt (deleted) Be sure to read the original article for full details before attempting this, unless you're a Maveric like me. > ls -l /proc/4607/fd/4 lr-x------ 1 juliet juliet 64 Apr 7 03:19 /proc/4607/fd/4 -> /home/juliet/testing.txt (deleted) > cp /proc/4607/fd/4 testing.txt.bk http://www.linuxplanet.com/linuxplanet/tips/6767/1 Enjoy

Categories : Linux

is there any account recovery gem for ruby on rails that uses SMS?
Not that I am directly aware of, but https://www.ruby-toolbox.com/search?utf8=%E2%9C%93&q=sms gives some gems for SMS interaction. That is one of the first places I look, as well as searching on github.com directly. RubyForge is another good source of information for finding gems. https://rubyforge.org/search/?type_of_search=soft&words=sms&Search=Search

Categories : Ruby

How to do SQL Server database back up and recovery in MVC 4
you can use Microsoft.SqlServer.Management.Smo for back up and restore database Code Project example using .Net 2.0 .Hope this will match your requirement Also look the same type of question Restore SQL Database using C#

Categories : C#

Recovery of the hash avatar on XMPP for facebook
Can you post the XMPP trace of what you send to the server after receiving that presence update? If your client doesn't recognise the hash, it should be querying the server for it. Is this happening? Is it possible that you're calculating the hash against the base64 encoded data rather than the raw data itself?

Categories : Facebook

Django South error recovery: no such index
It turn out that SQLite doesn't create an index for one-to-one field in the first place, but South assumes it does. I suspect database type is the culprit for many other errors I encountered when using South. Solution is simple though. I go into the migration file and remove index part in both forward and backward functions. That's it.

Categories : Django

Script to automate recovery of MySQL password
Here is a start: service mysql stop vi /etc/my.cnf # In the server section add skip-grant-tables service mysql start mysql use mysql; insert into user (Host, User, Password) values ('localhost','root',''); update user set Select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y',Create_Event_priv='Y', Trigger_priv='Y', Create_tablespace_priv='Y' where user='root'; quit; vi /etc/my.cnf # remove skip-grant-tables mysqladmin shutdown service mysql start mysqladmin -u root password XXXXXXXXXX You should recognise the code, it's pretty much what you asked. The missing bits are for you to separate the MySQL commands from the shell commands, or to wrap them as an invocation of mysql: mysql -D mysql ... Also, consider placing the password in a suitably protected file or passing it as

Categories : Shell

Visual Studio password recovery without email
Protected Sub PasswordRecovery1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles PasswordRecovery1.SendingMail e.Cancel = True; PasswordRecovery1.SuccessText = e.Message.Body; Link: http://forums.asp.net/t/1138927.aspx/2/10

Categories : C#

Corrupt quicktime movie repair or recovery of some content
Depends what do you call 'corrupted video'. If there's no indexing, because of which usually most video players refuses to play the video, this can be done with mencoder or ffmpeg. For example this command fixed video indexing issue: mencoder -idx input.avi -ovc copy -oac copy -o output.avi There are plenty of video issues out there and you need to know how to handle each of them. I'm sure you'll find plenty of topic on web for recovering videos with these tools. So all you need is ffmpeg or mencoder wrappers if you want to write tools with python

Categories : Python

How to find who deleted a view from DB with SIMPLE recovery model
You can capture drop view events from the default trace, assuming they happened recently: DECLARE @path NVARCHAR(260); SELECT @path = REVERSE(SUBSTRING(REVERSE([path]), CHARINDEX(CHAR(92), REVERSE([path])), 260)) + N'log.trc' FROM sys.traces WHERE is_default = 1; SELECT LoginName, HostName, StartTime, ObjectName FROM sys.fn_trace_gettable(@path, DEFAULT) WHERE EventClass = 47 AND ObjectName = N'MyView'; (As an aside, this method doesn't have any dependencies on recovery model; however you should be aware that content in the default trace will roll out eventually, so you are unlikely to find out who dropped an object 6 months ago. How long it stays around depends on a lot of variables for each instance.)

Categories : SQL

SolrCloud hash range set to null after recovery from index corruption
I ended up fixing it by uploading a new clusterstate.json to Zookeeper, using the Zookeeper CLI tool, with the correct hash ranges set (they were easily deducible since they were sorted by shard name).

Categories : Solr

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

Ubuntu 12.04.2 server auto enter root shell in recovery mode
After further study, I thought I had figured it out. Two changes are needed: (1) update the grub.cfg to customize recovery mode - open /boot/grub/grub.cfg - revise the menuentry "linux ...... ro recovery nomodest ...... " to "linux ...... ro single ...... " (2) There is known issue of GRUB in the 12.04 64bits, where the change of timeout is not converged into final grub.cfg (/etc/grub). You have to revise "set timout=-1" to "set timeout=0" in the auto generated grub.cfg or do below, §/etc/grub.d/00_header –In the make_timeout() function: replace the if/else/if block with "set timeout=${2}“ before executing update-grub. Actually, you should do step (2) first and then step (1)

Categories : Linux

Along with my hosted Windows service's installer, is it possible to set the recovery options when errors occur?
You can set recovery options using sc.exe from the command line. This answer has a good example of how to do this using C#: Install Windows Service with Recovery action to Restart

Categories : C#

Guide to implementing spring security password recovery with dynamic URL sent to email
The problem doesn't really have much to do with Spring Security. Provided you know the structure of the user database and the password encoder used, it's really just implementing a workflow involving data access, web controllers and sending an email. The link should contain a random token string (use SecureRandom and a base64 encoder, for example) and it should be stored in a database with the userId and a timestamp (for validating the window within which the link is valid). The controller would simply extract the token from the incoming request, load the data from the database using the token. It would check the timestamp and then forward the user to a password entry form. Depending on requirements, you might also want them to answer some other security questions too. You'd then validate

Categories : Java

Wait on the Database Engine recovery handle failed!! SQL Server 2012 installation
Ok, after 6 hours of struggle and 'googling' I could finally get this work. The problem was due to some account name conflict. Here are the steps I followed to set it right 1) Un-installed the SQLserver 3) Re-installed it back with following changes In the server configuration section, I changed the account name details to "NT AUTHORITY/LOCALSERVICE" (during the installation process) Please remember to set it as "NT AUTHORITY/NETWORKSERVICE" if LOCAL SERVICE is not allowed.

Categories : Sql Server

How to send recovery mails from our domain address (mine@xxtech.com) to any user email using JavaMail API
This should be no big Problem: http://www.mkyong.com/java/javamail-api-sending-email-via-gmail-smtp-example/

Categories : Java

"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#

How to recovery data when delete data indexing in solr
You can pass the rollback command to revert all the changes done. e.g. <rollback/> The rollback command rollbacks all add/deletes made to the index since the last commit. It neither calls any event listeners nor creates a new searcher. This is an expert-level API that should only be used if the application is taking complete responsibility for update concurrency, replication, and sharding.

Categories : Solr

Android App state recovery from launch - resume state
Save the state of your application inside the onPause() of the Activity. Place your code to restore the state of your application inside of onResume() inside of the Activity. This is part of the Activity lifecycle. Just don't let the onResume() misleading language confuse you. The thing that resumes is the UI thread in this case, so this method will get called even when the application initially begins (when the UI appears). If you have trouble fixing this, just post your Activity code in your question.

Categories : Android

How can I recovery mysql data which there is no data backup and no bin-log?
If you define table type as InnoDB, you can use transactions (see the link below). You will need set AUTOCOMMIT=0, and after you can issue COMMIT or ROLLBACK at the end of query or session to submit or cancel a transaction. ROLLBACK -- will undo the changes that you have made

Categories : Mysql

Tag 'h1' not closed
Try adding space: <h1> @employee.Name </h1> Take a look at this question

Categories : Asp Net Mvc

How to use Squish tool for Qml
I ran into the exact same problem, If you are using Squish under Ubuntu you have to apply a patch to your QT build and that should fix the problem, you can get the patch from here http://download.froglogic.com/snapshots/qt-dynlist-pt2.patch. I hope this helps

Categories : Qt

richfaces 4 tool tip
(Have to copy the whole example next time …) You're missing <h:head> and so the JS for the tooltip isn't being loaded (this should throw an error in the console), it can be empty but it has to be there. You also need <h:form> for ajax to work.

Categories : JSF

C indentation tool
Since you plan on extending existing code, why not use astyle? Once you have the correct flags it formats your code accordingly so that the results will always be the same. I (sadly) haven't found any dry-run flags, but a diff of your original file and the newly created astyle file should give you all violations.

Categories : C

spam tool in vb.net
if don't wanna open the browser then use webbrowser control like so Private webbrows As New WebBrowser private sub form_load(snder...... dim _url as string = "your url that mostly wont work" webbrows.Navigate(_url) ' if you use vb2010 then you have lambada expressions AddHandler webbrows.DocumentCompleted, Sub(sd As Object, e4 As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) ' a check that the page fully loaded If e4.Url.ToString <> _url Then Exit Sub sd.dispose() End Sub end sub

Categories : Vb.Net

Tool Tip CSS not showing
http://jsfiddle.net/NYmTL/ This fiddle seems to look fine with your code. I changed color: #000 to #FFF. Black on black isn't very visible.

Categories : HTML

Detecting whether .exe was closed
Use the Exited event (note: you need to set EnableRaisingEvents to true) e.g. : private void button1_Click(object sender, EventArgs e) { string openexe= @"C:UsersmarekDocumentsVisual Studio 2012Projects ours oursinDebug etpokl.exe"; var proc = new Process(); proc.StartInfo = new ProcessStartInfo(openexe); proc.EnableRaisingEvents = true; proc.Exited += new EventHandler(proc_Exited); proc.Start(); } private void proc_Exited(object sender, EventArgs e) { // the process has exited... } This is the asynchronous way, for a synchronous approach you can use the WaitForExit method : private void button1_Click(object sender, EventArgs e) { string openexe= @"C:UsersmarekDocumentsVisual Studio 2012Projects ours oursinDebug etpokl.exe"; var proc = new Proces

Categories : C#

get the information on the last closed iOS App
It is not possible to get the last closed iOS app, but if you have two apps and you want to be able to move between the apps you may be able to use URL schemes. URL Schemes Documentation Here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW18

Categories : IOS

How do I tell if an HttpResponse is already closed?
Stab in the dark here, but would connectionInfo being null mean that the HttpResponse has finished? Otherwise, I guess you could set a "closed" bool variable from the Future returned by done, and test whether it's set before processing the response? HttpResponse response = ...; bool closed = false; response.done.then((_) => closed = true); if (!closed) { ... } But I'm not sure whether you could ever do this early enough, would depend on the scenario.

Categories : Dart

Is this inputstream being closed?
You re doing some wierd stuff it seems? For each archieve entry while your reading your archieve you re recursively calling your read archieve method which results in opening the next archieve while your parent code is still handling your previous archieve. You should loop entirely through your archieve entry before handling any new archieve entry in your compressed file. Something like ArArchiveEntry entry = (ArArchiveEntry) arInput.getNextEntry(); byte[] content = new byte[entry.getSize()]; LOOP UNTIL entry.getSize() HAS BEEN READ { arInput.read(content, offset, content.length - offset); } as stated in the examples on the apache site

Categories : Java

When is FileDescriptor closed?
I belive you are right. A small test shows that the FileDescriptor becomes invalid after its FileInputStream is closed. Note that, in case of more than one FileInputStream for the same FileDescriptor, the FileDescriptor becomes invalid as soon as its first FileInputStream is closed, i.e. it does not matter if you close first fis1 and then fis2 or the other way around: FileInputStream fis1 = new FileInputStream("/tmp/adb.log"); FileDescriptor fd = fis1.getFD(); FileInputStream fis2 = new FileInputStream(fd); System.out.println(fd.valid()); fis1.close(); System.out.println(fd.valid()); fis2.close(); System.out.println(fd.valid()); Output is: true false false Do not forget to close the stream in a finally block, to make sure you close it also in case of an I/O (read/write) error.

Categories : Java



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