w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I recover files using git?
Simply use this: cd <specific_dir> git checkout . It will restore all files and directories in current directory which were tracked by git. Be aware that this will overwrite uncommitted changes to other files in current directory.

Categories : GIT

Recover ffdf from .ff files when .RData is missing
No, you need the .RData file because it contains the virtual part indicating what was in the bytes of the ff files and also contains levels of factors in your ff files. So I'm afraid you will have to read in the data again and try not to delete the .RData files ;)

Categories : R

How to recover files that have been deleted from shelf in tortoisehg program?
The best way to do this, as you alluded to, is to go into the .hg/Trashcan and copy the shelf file back into the .hg/shelves folder. Obviously if you order or list the trashcan folder by date you should be able to see which was the one you deleted by accident!

Categories : Misc

C# Upload Files on another partition of the server
Based on the documentation from http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.saveas.aspx, the String filename is the full path name of the location to save. Meaning you should be able to do so e.g: FileUpload.SaveAs("D:where_you_want_to_save") By the way what have you tried and what error did you get?

Categories : C#

Why Hive use file from other files under the partition table?
You are not getting error because you have created partition over your hive table but not assigning partition name during select statement. In Hive’s implementation of partitioning, data within a table is split across multiple partitions. Each partition corresponds to a particular value(s) of partition column(s) and is stored as a sub-directory within the table’s directory on HDFS. When the table is queried, where applicable, only the required partitions of the table are queried. Please provide partition name in your select query or use your query like this: select buyer_id AS USER_ID from hive_test where pt='20130805000000' limit 1; Please see Link to know more about hive partition.

Categories : SQL

Hoare partition : is this implementation more/less efficient than the standard partition algorithm?
I always prefer the standard Hoare's implementation. If you look at it, it is not very intuitive, but it has a visible advantage: Less number of swaps. While your implementation effectively always does exactly N comparisons and N swaps, the Hoare's implementation does only N comparisons, but it does not swap anything if it is not needed. The difference is significant in some scenarios. At first in a case you use environment where swaps or assignment of variables/objects is a costy operation. For example if you use C/C++ with arrays of objects. Another typical examples where Hoare's partition implementation performs better if when many of the items in your array are of the same value or when the array is almost sorted and needs just to swap a few items. In that cases Hoare's version perfor

Categories : Matlab

After new partition gets created insert partition info in another table through trigger
You can do it with DDL Trigers. Check out this link One important note from the author you should consider adding a partition is not DDL if Oracle decides to do it internally, it’s only DDL if it’s an end-user statement Implicit partition creation is a new feature of 11g and it reffers to the interval partition option.

Categories : Oracle

How to get to last NTFS MFT record?
The MFT location isn't always fixed on the volume. You should get the starting MFT offset from the boot sector (sector 0 of the volume, you can find the structure online). The first file in the MFT is the "$MFT" file which is the file record for the entire MFT itself. You can parse the attributes of this file like any other file and get it's data run list. When you know the size of each fragment in clusters, parse the last cluster for each 1024 byte record of the last fragment (although I believe a fragmented MFT is rare). The last record in the MFT is the last record in that particular cluster marked "FILE0", if you encounter a null magic number that would be 1024 bytes too far. Or you can just get the file size from it's attributes and calculate the offset to the end of the MFT based o

Categories : Windows

MySQL table Partition with FLOOR function (partition function not allowed)?
MySQL documents the partitioning functions here. The floor() function appears to have some special considerations. In this case, I think the issue might be that the division is returning a float/double result rather than a decimal result. This is easily fixed in your case because you do not need to do the division: CREATE TABLE `fact_events` ( `event_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_type_key` tinyint(3) unsigned NOT NULL, `analytic_file_id` bigint(20) unsigned NOT NULL, `sdk_session_id` bigint(20) unsigned NOT NULL, `virtual_button_create_id` bigint(20) unsigned NOT NULL, PRIMARY KEY (`event_key`), KEY `idx_events_event_type` (`event_type_key`) ) PARTITION BY RANGE(event_key) ( PARTITION p0 VALUES LESS THAN (0), PARTITION

Categories : Mysql

NTFS vs. File Share
Short answer: No. In Windows each file and directory has an ACL controlling access to it. Each file share also has an ACL controlling access to the share. When you access a remote file through a share you are doing so using the credentials used to login to the local computer. (You can connect using different credentials by entering a username/password when connecting). The remote computer tests the supplied credentials against the ACL on the share. Once you are past that, then every file you attempt to access on the remote machine through this connection will be checked using your credentials against the ACL on the file and the share. This allows a file share to offer more restricted access to some files than if the same user were attempt to access them locally. (So you could share file

Categories : Misc

What is the difference between HDFS and NTFS and FAT32?
... Because NTFS and FAT aren't Distributed. The advantage of HDFS is that it is. See the HDFS Introduction.

Categories : Hadoop

NTFS - file record size
It's not actually that much of a waste. You should try to look at what happens when the number of attributes stored in the file record exceeds 1 KB. (by adding additional file names, streams, etc.) It is not clear (to me at least) for different versions of NTFS if the additional attributes are stored in the data section of the volume or in another File Record. In previous versions of NTFS the size of a MFT File Record was equal to the size of a cluster (generally 4KB) which was a waste of space since sometimes all the attributes would take less than 1 KB of space. Since NT 5.0 (I may be wrong), after some research, Microsoft decided that all MFT File Records should be 1KB. So, one reason for storing that number may be backwards compatibility. Imagine you found an old hard drive which stil

Categories : File

As always with the USN, I expect you'll need to go through a bit of trial and error to get it to work right. These observations/guesses may, I hope, be helpful: When the last hard link to a file is deleted, the file is deleted; so if the last hard link has been removed you should see USN_REASON_FILE_DELETE instead of USN_REASON_HARD_LINK_CHANGE. I believe that each reference number refers to a file (or directory, but NTFS doesn't support multiple hard links to directories AFAIK) rather than to a hard link. So immediately after the event is recorded, at least, the file reference number should still be valid, and point to another name for the file. If the file still exists, you can look it up by reference number and use FindFirstFileNameW and friends to find the current links. Comparin

Categories : Windows

Viewing Ciphertext of Encrypted File on NTFS (EFS)
The way you open an encrypted file in order to read its raw encrypted contents (e.g. for a backup/restore application) is to use the: OpenEncryptedFileRaw, ReadEncryptedFileRaw, WriteEncryptedFileRaw, and CloseEncryptedFileRaw api functions. Writing the code on the fly, in a hypothetical hybrid language: void ExportEncryptedFileToStream(String filename, Stream targetStream) { Pointer context; res = OpenEncryptedFileRaw("C:UsersIanwallet.dat", 0, ref context); if (res <> ERROR_SUCCESS) RaiseWin32Error(res); try { res = ReadEncryptedFileRaw(exportCallback, null, context); if (res != ERROR_SUCCESS) RaiseWin32Error(res); } finally { CloseEncryptedFileRaw(context) } } function ExportCallback(pbData: PBYTE, pvCallbackCo

Categories : Windows

access to ntfs stream for a very long filename fails
As the very helpful page on CreateFile says referring to the lpFileName parameter which specifies the filename: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "?" to the path. Since you are contemplating BackupRead obviously you are wanting to access this stream programatically. If so, test things programatically. Trying all these operations from the command prompt is a crap-shoot and will not establish anything more than the ability to perform such operations from the command prompt. With that in mind, let's try this simple program - boilerplate code removed: #include "stdafx.h" int APIENTRY _tWinMain(HINSTANCE, HINSTAN

Categories : Windows

NTFS sparse file data runs ($UsnJrnl)
No, it means that $UsnJrnl occupies 2576 clusters on disk. Sparse clusters don't occupy any space on disk, if you'd try to read sparse cluster, e.g. cluster 10 in your example, NTFS just returns zeros. Generally, you can't determine start and end cluster of the file, since files can be fragmented - your example says that first 1408 clusters are not allocated on disk at all, then 128 clusters of that file occupy disk clusters 510119 - 510247, then 2448 clusters of the file occupy disk clusters 256 - 2704; so in this case you can't say that file begins by cluster X (on disk) and ends by cluster Y (on disk) - it's possible only if file is not fragmented (when it uses only one cluster run).

Categories : Windows

How does NTFS handle the conflict of short file names?
NTFS won't create two short names like that. The first will be THISIS~1.txt and the second will be THISIS~2.txt. For example, open a command prompt and from the root of C: drive type C:>dir prog* /x /ad<Enter> On a Windows 7 64-bit system you will see output similar to this 03/28/2013 12:24 PM <DIR> PROGRA~1 Program Files 07/31/2013 11:09 AM <DIR> PROGRA~2 Program Files (x86) 12/10/2012 05:30 PM <DIR> PROGRA~3 ProgramData

Categories : Windows

How to make Gradle stop trying to chmod MANIFEST.MF on an NTFS drive
Gradle is trying to set default permissions for that file, and I can't see a way to stop it from doing that. (You could make it set different permissions, but I guess that won't help.) Under Windows/NTFS this normally works just fine, so it might be a problem with you Linux NTFS driver or configuration.

Categories : Linux

Create a symbolic link (or other NTFS reparse point) in Windows Driver
There isn't direct API to create reparse points. You need to use ZwFsControlFileZwFsControlFile() to send FSCTL_SET_REPARSE_POINT ioctl with appropriate input buffers and parameters. Don't have example though!

Categories : Windows

Recover property key/value
It is not possible to do it in node.js because the current version of v8 hasn't implemented iteration as indicated in this bug report. We can confirm that by looking at the source code of v8's collection.js: InstallFunctions($Map.prototype, DONT_ENUM, $Array( "get", MapGet, "set", MapSet, "has", MapHas, "delete", MapDelete, "clear", MapClear )); But, as can be seen in ECMAScript 6 wiki, there should also be items(), keys(), and values(). v8 probably didn't implement these methods before, because it didn't support generators. But now it does since May of this year. It should be a just a matter of time until this is implemented. If you need to have this functionality now, you can use map-set-for-each which polyfills forEach. You will need to modify it to add case 'sy

Categories : Javascript

Unable to recover a value from MySQL
I don't think putting /test/test2.php in your script actually includes and run test2.php. Try this $("#course").autocomplete("<?php include '/test/test2.php'; ?>", {

Categories : PHP

How to recover Jenkins password
Login as root, do a passwd jenkins if you are not root, ask the administrator of your machine to do this. BTW: this is not really a jenkins question, I've removed the jenkins tag and added linux. Update: you might not have a root user with a password on your system, but your kumar user probably has sufficient rights using sudo. (sudo without specifying a user basically means 'do as root') sudo passwd jenkins now you have to pay attention, since the first password you have to type is the password of your kumar user, and only after that the system will ask you for the new jenkins user password.

Categories : Linux

Android cant recover state
Those two methods are only called if the activity is killed and restarted. The good news is, if your activity was not killed, there's no need to restore your state. It should still be just the way it was. If you do need to do something when switching back from another Activity, that's what onResume() is for. See the chart for more.

Categories : Android

Able to recover a deleted branch using git tag
Git objects are not immediately deleted after operations (for example, they can be recovered with git reflog). You have to explicitly use git gc (which calls git prune too) to manually delete them, or wait an amount of time controlled gc.pruneexpire to automatically prune them (if that's enabled by gc.auto). Besides, objects are permanently deleted only when there's no reference to them, and in this case, you still have a Tag on it, so the commit and its history is preserved. Check this command output: git log --oneline --decorate --graph --all It will give you an overview of your repository, the commits you see here won't be permanently deleted by garbage collector.

Categories : GIT

Recover from ProtocolException in HttpClient
There are a number of http.protocol.* configuration parameters that are defined here. You need to carefully look at each one of them and figure out what is the optimum leniency you need.

Categories : Java

How to recover tweet feed
The API that is supported is at that URL: http://api.twitter.com/1.1/statuses/user_timeline/XXXX.json?callback=twitterCallback2&count=10 UPDATE I invite you to check this thread, this looks like the same problem as yours http://stackoverflow.com/a/13416966/1683636

Categories : Javascript

Recover after bash trap
Instead of BASE=$(basename $FILE); Have this one instead: BASE=${FILE##*/} It's also a good idea to place your work functions on the background away from the interface that handles SIGINT. Just avoid asking for input within it. Also quote your variables properly always. #!/bin/bash # Register signal handler ABORT=0; trap ABORT=1 SIGINT; # Create temp dir TEMPDIR=$(mktemp -d -t $0); # Helper functions function do_other_stuff { true; } # Process files for ((COUNTER = 0; COUNTER < 3 && ABORT == 0; COUNTER++)); do ( FILE=/some/directory/$COUNTER.txt BASE=${FILE##*/} cp "$FILE" "$TEMPDIR" > "$FILE" do_other_stuff cp "$TEMPDIR/$BASE" "$FILE" rm "$TEMPDIR/$BASE" ) & CPID=$! # Handle SIGINT bu

Categories : Bash

Is there any way to recover from Psych::SyntaxError?
I'm not sure if there's a way to recover from this error, but I've created a rake task that ensures that a given YAML file is syntactically valid (run via a pre-commit git hook for any changed YAML files): namespace :yaml do desc "Check YAML syntax for errors." task :check_syntax do require 'YAML' require 'colorize' puts "Checking YAML files..." filenames = (ENV['FILENAMES'].split(',') || []).push(ENV['FILENAME']).uniq.compact fails = 0 filenames.each do |file| print "#{file}... " begin YAML.load_file(file) rescue Psych::SyntaxError => e fails += 1 print "Failed! ".red print "[#{e.message.sub(/A.*: /, '')}]" puts next end print "Success!".green puts end puts

Categories : Ruby

Recover plane from homography
If you have the calibration of the cameras, you can extract the normal of the plane, but not the distance to the plane (i.e. the transformation that you obtain is up to scale), as Wikipedia explains. I don't know any implementation to do it, but here you are a couple of papers that deal with that problem (I warn you it is not straightforward): Faugeras & Lustman 1988, Vargas & Malis 2005. You can recover the real translation of the transformation (i.e. the distance to the plane) if you have at least a real distance between two points on the plane. If that is the case, the easiest way to go with OpenCV is to first calculate the homography, then obtain four points on the plane with their 2D coordinates and the real 3D ones (you should be able to obtain them if you have a real measur

Categories : Opencv

Recover corrupted java file
It is not really programming question, but i had similar situation and "Mini Tool Power Data Recovery" tool helped me (it is paid tool, free version exists, but maybe you can search in this direction and find something open source). I tried some another tools then, but with no results.

Categories : Java

How to recover a Perl program from where it exited
You can use the concept of transactions and design the program around that, but having the user kill a process as an expected way of interacting with it doesn't sound like a good idea. Maybe giving better feedback to the user about the program state would solve this issue instead of dealing with hacky behaviour.

Categories : Perl

Stray end tag head - cannot recover when validating
It seems that I had used the rel=author tag incorrectly, and should have been <a rel="author" href="https://plus.google.com/108165491209678636768" /> (added self closing tag, and seems to have fixed it :))

Categories : HTML

Recover changes lost in a deleted git branch
Have you tried git cherry-pick SHA1-of-commit ? You can run cherry-pick while being on master, it will fetch the specific commit and apply it to the current branch. More info @ manpage

Categories : GIT

CakePHP TreeBehavior::recover() SQL error
AD7six was right and there was something interfering. I had a beforeFind() callback in my model which looked like this: public function beforeFind($queryData){ if ((!isset($queryData['exclude']) || $queryData['exclude']) && (empty($queryData['conditions']['Category.id']) || is_array($queryData['conditions']['Category.id']))){ $queryData['conditions'][] = array('NOT' => array('Category.id' => $this->exclude)); } return $queryData; } This callback was preventing TreeBehavior from finding the item that it wanted to find to carry on sorting out the data.

Categories : Cakephp

How to recover LOST WORK resulting from the use of git?
If the file has been staged (it looks like yours was), a snapshot will exist is Git's database. We can get it back! Git stores snapshots internally in the .git/objects/ direction in your repository. Each object is stored in a file named for its hash, split into directories by the first 2 characters. Snapshots will exist here until they are either packed into files in .git/objects/pack/ (which won't happen to a snapshot that was never part of a commit) or garbage collected (which will eventually happen to your missing file). The hard part will be figuring out which object it is. To find the object, run ls -lRt .git/object to get a list of all objects sorted by last modified time. Here's what my hypothetical repository looks like: $ ls -lRt .git/object .git/objects/22: total 4 -r--r--

Categories : GIT

How to recover the value from a DropDownList in SelectedIndexChanged CodeBehind
There are a couple of overloads to adding a list item programatically - and you're looking for this one: http://msdn.microsoft.com/en-us/library/7f7h2h8h.aspx

Categories : C#

Hacked Azure VM, how to recover data?
A virtual machine is based on an image in a storage container. It takes a bit to track down the right VHD, but if it is one that MS created for you, it should be something like name_of_your_CloudService_name_of_your_VM.vhd, and it will probably be in the VHDs container. You could download this VHD and bring it up in something like VirtualBox, or you could try spinning up another VM based on that image. Either way, your data should all still be there provided you are able to log into the machine. EDIT: As your link suggests, deleting your corrupt VM, spinning up a new VM and attaching the disk would be a good way to get access to your data. Simply click on the "Attach" button at the bottom of the virtual machines section of your dashboard of your new VM and choose existing disk. Brows

Categories : Azure

How to recover a corrupt SQLite3 database?
If there were any automatic method, SQLite would already be able to do it. Sometimes, the corruption is only or mostly in indexes, in which case it would be possible to get some or most records by trying to dump the entire database with .dump, and use those commands to create a new database: $ sqlite3 mydata.db ".dump" | sqlite3 new.db However, this is not always possible. The easiest and most reliable way is to restore the database file from the backup.

Categories : Database

How can I recover currupt database in magento?
In Magento most of the tables are innodb (except for those 19 you found in your new installation). For innodb tables you cannot just copy the table files from the data folder. See this for more explanations. If you cannot create a dump of the old db and restore it in your new xampp it may be lost.

Categories : Mysql

Recover a text file in linux
If the file is really important, than umount the related block device, and you can look into it with the strings command. If the file contains something relatively unique, you can grep it, and if you have a little chance you can save the most of the file. This can work with mounted block devices, but the chance of loosing the data is higher. But it works only under system's where you can access the block device directly.

Categories : Linux

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