w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I retrieve the modified date for the file?
Here is one way I figured out to get it (that actually works): client.getFilesManager().getFile(file.getId(), null).getModifiedAt() This, however, is somewhat slow, so I would greatly appreciate it if someone else knows a faster solution.

Categories : Java

GridView field modified in RowDataBound is not sorted
I think you can use this natively in GridView without needing TemplateFields: <asp:GridView ID="gvOpenOrders" runat="server" CssClass="gridview" AutoGenerateColumns="false" AllowSorting="true" OnSorting="gvOpenOrders_Sorting" OnRowDataBound="gvOpenOrders_RowDataBound"> <AlternatingRowStyle CssClass="altrow" /> <Columns> <asp:HyperLinkField DataNavigateUrlFormatString="<<URL removed for post>>{0}{1}" DataNavigateUrlFields="csono, crevision" > <asp:TemplateField> <HeaderTemplate> <asp:LinkButton ID="lbCustno" runat="server" CommandName="Sort" CommandArgument="ccustno" Text="Cust No.">

Categories : C#

Retrieve all contacts phone numbers in iOS
Sure you can. First you'll need to get the user permission for doing so. If you won't the user will have to manually authorize your app from the settings. There's a great example on how to retrieve all phone numbers, names, addresses etc' here: http://sugartin.info/2011/09/07/get-information-from-iphone-address-book-in-contacts/

Categories : IOS

Unable to retrieve email from contacts
You need to perform another query to retrieve the email address. Check this answer (bottom part about email address), it is the same issue : get contact info from android contact picker EDIT : Code example @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); startActivityForResult(intent, 0); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // ADD IF STATEMENTS HERE TO CHECK the requestCode, resultCode and data Uri contactData = data.getData(); Cursor c = getContentResolver().query(contactData, null, null, null, null); // has result if (c.moveToFirst()) { String name = c

Categories : Android

How can I retrieve only Android contacts that have an entry in the People app?
Probably you should filter cr.query to contacts with phone number (ContactsColumns.HAS_PHONE_NUMBER): http://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns.html#HAS_PHONE_NUMBER

Categories : Android

is it possible to retrieve google contacts informations in one with url Json or XML?
I think you may be using the google example code. The information you need is retrived by this url, part of the example code is wrong, it seems like the information is not retrived. You'll find these stackoverflow links useful: Google Contacts API XML parsing with PHP Fetch Contacts from google

Categories : Misc

Android facebook contacts birthday details retrieve
Use the OpenGraph API in whatever environment you use to retrieve the information. The birthday is in the user information object, see docs: http://developers.facebook.com/docs/reference/api/user see this link too. Also check your date format is correct is not ? the correct date format to be used is SimpleDateFormat formatter = new SimpleDateFormat("MM/dd"); Are you getting null for all birthdays or just some? Some birthdays will be null, since some FB users have chosen not specify their birthday.

Categories : Android

batch command to copy a file when modified date is same as current date
i got the answer . "" will not be there and the braces will start from the same line of if like below : if %filedatetime:~0, 10% == %currentDate% (ROBOCOPY C:Documents and Settings302444Desktop C:Documents and Settings302444DesktopIMP\%date:~-4,4%%date:~-10,2%%date:~-7,2% inventory.txt ) and also the current date will set as currentdate=%date:~-10%. It is working. thanks for your time .

Categories : Windows

Batch script to delete files older than X days (based on creation date, not modified date)
See if this helps - Keep the 5 *.config files (skip=5) with the most recent creation date Test it on sample files. @echo off pushd "d:folder" del file2.tmp 2>nul for /f "delims=" %%a in ('dir *.config /b /a-d ') do call :getcreationdate "%%~fa" sort /r <file2.tmp >file.tmp for /f "skip=5 tokens=1,*" %%a in (file.tmp) do del "%%~b" del file.tmp file2.tmp popd pause goto :EOF :getcreationdate set "file=%~1" set "file=%file:=\%" WMIC DATAFILE WHERE name="%file%" get creationdate | find "." >file.tmp for /f %%b in (file.tmp) do set dt=%%b set dt=%dt:~0,8%_%dt:~8,6% del file.tmp >>file2.tmp echo %dt% "%~1"

Categories : Windows

if modified date is same as current date then it will copy one file to a location
The starting (has to be on the same line as the if: if %filedatetime:~0,10% == %currentDate% pause ( ROBOCOPY C:UsersANIDesktopIMP C:downloads\%date:~-4,4%%date:~-10,2%%date:~-7,2%,RetailEmp.txt pause ) should look like: if %filedatetime:~0,10% == %currentDate% ( pause ROBOCOPY C:UsersANIDesktopIMP C:downloads\%date:~-4,4%%date:~-10,2%%date:~-7,2%,RetailEmp.txt pause )

Categories : Batch File

Amazon S3, Syncing, Modified date vs. Uploaded Date
When listing objects in an S3 bucket, the API response received from S3 will always return them in alphabetical order. The S3 API does not allow you to filter or sort objects based on the LastModified value. Any such filtering or sorting is done exclusively in the client libraries that you use to connect to S3. http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html As for the accuracy of the LastModified value and it's possible use to sort the list of objects based on the time they were uploaded, to my knowledge, the LastModified value is set to the time the upload finishes (when the server returns a 200 OK response) and not the time the upload was started. This means that if you start upload A that's 100MB in size and a second later you start upload B that's only 1K in si

Categories : C#

Getting last modified date of a file not the last created date in Java
I got Creation date of a document using apache tika in java Here is my java code to get creation date of document: public class tikaExample { public static void main(String[] args) throws SAXException, TikaException { InputStream is = null; try { is = new BufferedInputStream(new FileInputStream(new File("/home/rahul/Downloads/darknet5.doc"))); Parser parser = new AutoDetectParser(); BodyContentHandler handler = new BodyContentHandler(); Metadata metadata = new Metadata(); parser.parse(is, handler, metadata, new ParseContext()); System.out.println("creation date "+metadata.get(Metadata.CREATION_DATE)); System.out.println("last modify date "+metadata.get(Metadata.LAST_MODIFIED));

Categories : Java

Retrieve keys from hash-table, sorted by the values, efficiently
Basically, you solution is correct: you need to collect the keys into a list: (defun hash-table-keys (hash-table) (let ((keys ())) (maphash (lambda (k v) (push k keys)) hash-table) keys)) and then sort the list: (sort (hash-table-keys hash-table) (lambda (k1 k2) (< (second (gethash k1 hash-table)) (second (gethash k2 hash-table))))) Combining key collection with sorting is possible: you need to collect the keys into a tree and then "flatten" the tree. However, this will only matter if you are dealing with really huge tables. Also, since Emacs Lisp compiles to bytecodes, you might find that using the sort built-in is still faster than using a tree. Consider also the development cost - you will need to write code whose value will be mostly educatio

Categories : Emacs

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

Google Guava TreeMultimap -- retrieve values based on sorted ordering?
TreeMultimap isn't going to support this in quite the way you're looking for, I'm fairly certain. What you could do is a TreeMultimap<Integer, String> -- swapping the role of the keys and the values -- and then TreeMultimap.asMap().lastEntry() would get you a Map.Entry<Integer, Collection<String>>, corresponding to the greatest Integer and all the Strings associated with it. The one thing definitely not supported by TreeMultimap is looking at the combined values for all keys as a single sorted collection. (You can look at them as an unsorted collection with values(), of course.)

Categories : Java

How to get Created By and Last Modified Date using V2 Box iOS SDK
If you add the fields paramater and separate the items you want returned by comma, Box's response will return created_by and modifed_at. You can also retrieve modifed_by. http://developers.box.com/docs/#fields ?fields=created_by,modified_at

Categories : Iphone

How to lock "last modified" date?
You can't "freeze" them, but you can record them, and then re-apply them using touch. That said: using a version control system as suggested by Marc is definitely the way to go.

Categories : Linux

how to retrieve data from json when user selects the date from date picker option in my application
you can find help regarding DatePicker from here and TImePicker from here Than make date in your desire format as per in your JSON (from here) now you can easily filter your data. Thanks!

Categories : Android

How to insert date and retrieve records based on that entered date
Though it is not best to have functions in the fields in the where clause (performance wise) this will do the job. "SELECT id,today FROM tbl_demo WHERE CONVERT(DATETIME,CONVERT(VARCHAR,today,120)) = CONVERT(DATETIME,CONVERT(VARCHAR,'" & Ddate.ToString() & "',120))" An alternative would be providing the Date directly to ISO format: "SELECT id,today FROM tbl_demo WHERE CONVERT(DATETIME,CONVERT(VARCHAR,today,120)) = CONVERT(DATETIME,CONVERT(VARCHAR,'" & Ddate.ToString("yyyyMMdd") & "',120))" I am not sure if it is yyyyMMdd or yyMMdd for SQL CE, so better try both. According to this MSDN article it should be "yyMMdd" but it could be a typo...

Categories : Database

When will a last-modified date indicate some time in the future?
It can't mention it, because it's completely up to the server how resources are implemented. As a primitive example, consider a server that serves a file system, and encounters a file with a timestamp from the future.

Categories : Http

Display modified date outside the loop
You can do like this orderby posts with post_modified <?php $args = array( 'numberposts' => '5', 'orderby' => 'post_modified', 'post_status' => 'publish', 'category__not_in' => array(523) ); $recent_posts = get_posts( $args ); foreach( $recent_posts as $recent ){ echo '<li><b>'.$recent->post_modified.'</b> <a href="' .get_permalink($recent->ID) . '" title="'.esc_attr($recent->post_title).'" >' . $recent->post_title.'</a> </li> '; } ?>

Categories : PHP

Getting file last modified date (explorer value not cmd value)
It looks like this is ultimately an OS issue that you'd have to work around, like has been shown, especially since you've edited your code to account for DST. But you could also use the FileDateTime function. The help article for this points out that the result of this function is based on your system's locale settings. The help article for the DateLastModified property doesn't provide any such caveats, at least for Excel online help. To modify an exerpt from your edited code above: '1st row for path title, 2nd row for column headings loopCount = 3 For Each objFile In objFolder.Files Range("A" & loopCount).Value = objFile.Name 'use the full path name Range("B" & loopCount).Value = FileDateTime(objFile_fullpathname) Range("D" & loopCount).Value = objFile.Name

Categories : Excel

How to sort file with modified date?
Either change your list to contain File objects or change your comparator to operate on String objects. I would recommend the former option. This allows you to establish the files exist before passing them into the comparator. Note that File.lastModified() returns 0 if the file does not exists (which might be unexpected). As mentioned in the comments, you can sort a list using Collections.sort() so you have no need to convert to an array.

Categories : Java

How to use RecursiveDirectoryIterator with a Modified Date filter?
Ok you may try this example: class FilesystemDateFilter extends RecursiveFilterIterator { protected $earliest_date; public function __construct(RecursiveIterator $it, $earliest_date) { $this->earliest_date = $earliest_date; parent::__construct($it); } public function accept() { return ( ! $this->isFile() || $this->getMTime() >= $this->earliest_date ); } public function getChildren() { return new static ( $this->getInnerIterator ()->getChildren (), $this->earliest_date ); } } $directory = new RecursiveDirectoryIterator("c:\www"); $filter = new FilesystemDateFilter($directory, strtotime('2012-12-31')); foreach(new RecursiveIteratorIterator($filter) as $filename => $file) { echo $filename . PHP_EOL; } Not

Categories : PHP

FTP: Can I overwrite a file and maintain it's modified date?
You should be able to set the modified time with touch: http://php.net/manual/en/function.touch.php This requires PHP > 5.3 and the user running the script (probably your web user unless you run it from the cli) needs to have write permission on the file. You have two options for implementation: Store the filenames and their mtimes in temporary storage (either a file or a database table). When you finish the upload, run through all of the files and use touch to reset the mtime. As you upload the files, check to see if the file already exists. If it does, grab the mtime in a temporary variable, overwrite the file, then touch it with the correct mtime.

Categories : PHP

Is max age relative to last-modified date or request time?
RFC 2616 section 14.9.3: When the max-age cache-control directive is present in a cached response, the response is stale if its current age is greater than the age value given (in seconds) at the time of a new request for that resource. The max-age directive on a response implies that the response is cacheable (i.e., "public") unless some other, more restrictive cache directive is also present. It is always based on the time of request, not the last modified date. You can confirm this behavior by testing on the major browsers.

Categories : Misc

Get filename and file modified date to use for listview
Try using a Hasmap instead of ArrayList. public class MainActivity extends Activity { ArrayList<Contact> imageArry = new ArrayList<Contact>(); ContactImageAdapter adapter; File folder; int j = 0; Hashmap<String,String> FilesInFolder; //Filename:ModificationDate pairs @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); folder = new File(Environment.getExternalStorageDirectory() + "/tc/"); FilesInFolder = GetFilesData(folder.getAbsolutePath()); for (Map.Entry<String, String> current_file:FilesInFolder.entrySet()) { // imageArry.add(new Contact(R.drawable.ic_launcher, current_file.getKey(), curren

Categories : Java

Append ddmmyy and update Date Modified
copying a file does not modify the "last modified" date. You need to touch the file. Read this SO Question Windows version of the Unix touch command and try copy %%a +,, copy %%a "import\%%~na_%All%.csv" Apart of that, I can give you a couple of suggestions for improvement.. you could just use the %DATE% environment variable instead of copying/parsing the output of DATE command. if the format of %DATE% does not fit your requirements, take a look at this SO answer http://stackoverflow.com/a/11183896/30447. you could use MOVE instead of COPY if you want to move the file (as you state in your Question). @echo off for %%a in (*.txt) do ( copy "%%a" +,, move "%%a" "import\%%~na_%DATE%.csv" )

Categories : Batch File

Post Modified date in a formated way in WordPress
You can use PHP's strtotime() along with date(). It converts the given date into a timestamp and then back. Code: <?php $date = "2013-07-11 01:45:40"; $timestamp = strtotime($date); echo date('F d, Y', $timestamp); //output: July 11, 2013 ?>

Categories : PHP

importing contacts from gmail using contacts gem and doing authentication at email client site
I have that feature working using the omnicontacts gem gem 'omnicontacts' I basically followed the instructions to set it up, you need to specify (in a initializer) the importer, and then the needed data, like Rails.application.middleware.use OmniContacts::Builder do importer :gmail, GMAIL_CONFIG['client_id'], GMAIL_CONFIG['client_secret'] end and then I have something like this in routes.rb: match '/contacts/:importer/callback' => 'mailer_contacts#callback' Lastly you setup your MailerContactsController with the callback action (for example redirecting where you need it to go).

Categories : Ruby On Rails

Android native Contacts application deletes every account contacts
So after more meticulous search I found the way to retrieve data for any RAW_CONTACT in my application independently of was it deleted from some other application or not. Using of RawContacts.Entity API does this job. Previously I tried to retrieve contact's data using such logic: public Cursor getContactData(long rawContactId) { return getContentResolver().query(ContactsContract.Data.CONTENT_URI, null, ContactsContract.Data.RAW_CONTACT_ID + "=" + rawContactId, null); } And this method always returned null for deleted contact. But using RawContacts.Entity such way: public Cursor getContactData(long rawContactId) { Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, id); rawContactUri = Uri.withAppendedPath(rawContactUri, RawContacts.Entity

Categories : Android

vbscript to get the files in a format from ftp with today's modified date
The general approach is described in this answer to a similar question. You just need to modify the filename pattern, e.g. like this: timestamp = Right("0" & Day(Now), 2) & Right("0" & Month(Now), 2) & Year(Now) .WriteLine "mget VarList12" & timestamp & "*.csv" .WriteLine "mget VarList10" & timestamp & "*.csv" .WriteLine "mget VarList11" & timestamp & "*.csv" .WriteLine "mget VarList22" & timestamp & "*.csv"

Categories : Batch File

How to move all files from one directory to another whose Last modified date was less than today
you can do this by using the find command find . -newermt "2013-09-11 00:00:00" or in your case (for between) find . -newermt "2000-01-01 00:00:00" ! -newermt "2013-09-11 00:00:00"

Categories : Ubuntu

Sharepoint client GetFolderByServerRelativeUrl folder modified date
I don’t think there is any direct way to get the folder's modified data. But you can get the folder related item first, and then get the item’s modified data. But you still cannot get the folder related item using JavaScript Object Model. You can try to get the items which content type is folder by caml query, then fetch the item whose related file's server relative url is equal to the folder's server relative url, then you can get the detailed information from the item. var folder = rootweb.GetFolderByServerRelativeUrl("/Shared Documents/test2"); var query = new SP.CamlQuery(); query.set_folderServerRelativeUrl(“/Shared Documents”); var items = list.getItems(query); context.load(items, “Include(Title, FileSystemObjectType, File)”); context.executeQueryAsync(function(){

Categories : C#

script to move folder based on modified date
You can use -exec along with find. Something like: find /mnt/STStorage/ -type d -mtime +14 -exec mv {} /mnt/LTStorage/ ; -type d will ensure only directories are moved. Another option is to use xargs find /mnt/STStorage/ -type d -mtime +14 | xargs -I '{}' mv {} /mnt/LTStorage/ Update: To add what is being moved, you can set the verbose mode option for mv find /mnt/STStorage/ -type d -mtime +14 -exec mv -v {} /mnt/LTStorage/ ; Since this will print everything on standard out. You can redirect it to a log file. find /mnt/STStorage/ -type d -mtime +14 -exec mv {} /mnt/LTStorage/ ; > /mnt/STStorage/log.file For emailing you can do something like - uuencode /mnt/STStorage/log.file /mnt/STStorage/log.file | mail -s "this is my subject line" chip@email.com

Categories : Bash

Copy/move all files which last modified date are in a given month
You can easily select files whose modification times are in a time range with the find command. Here's an example with gnu find, which makes this fairly simple: find . -newermt 'Apr 1, 2013 00:00' -not -newermt 'May 1, 2013 00:00' -exec mv -t /path/to/April_2013/directory '{}' '+' man find for all the gory details.

Categories : Bash

Do a find on the latest N items from tables X, Y, and Z sorted by date created?
Use the UNION operator like so: SELECT * FROM ( SELECT id, created, modified, "Favorite" as ST FROM Favorite UNION SELECT id, created, modified, "Comment" as ST FROM Comment UNION SELECT id, created, modified, "Listing" as ST FROM Listing ) WHERE .... LIMIT ... ;

Categories : PHP

Android Cursor on Contacts shows more contacts than the People app
This is because the contacts comes from different accounts. For example when contacts are sync from two different email accounts, some contact may have exactly the same info. The contacts table store them as different items.

Categories : Android

Find files on windows modified after a given date using the command line
Don't think you will find it using dir. You can use PowerShell to do this, try: get-childitem -recurse | where-object {$_.lastwritetime -gt "12/07/2013"}

Categories : Windows

How to sort files by list elements by date modified, in Python?
from datetime import datetime strfmt = '%a, %d %b %Y %H:%M:%S +0000' res = sorted(files, key=lambda e: datetime.strptime(e['modified'], strfmt)) For the reverse, use the optional boolean reverse argument: rev = sorted(files, key=..., reverse=True) See sorted() for more information.

Categories : Python



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