Search Results

Search found 3 results on 1 pages for 'liton'.

Page 1/1 | 1 

  • C# to loop through folder until it finds the correct files

    - by Liton Uddin
    I’m running a batch to do an update to my sql table. I’m using windows scheduler to run the batch file. Each day files come in at different time. Sometime they come in after my scheduled time therefore the batch file doesn’t run when there’s no file before the scheduled task in the folder. I want to create a c# program where it will loop through the folder until it finds the files and then move to the next step in the batch file. Basically my goal is to create a program that will look for those particular files and once they finds the correct files then it will start the update. I’m new to programming and need some direction. Can someone please help me with this? Thanks.

    Read the article

  • CreateFile2 returns access denied error in Windows 8

    - by Liton
    I have written the following lines of code to open a file under InstalledFolder directory: Platform::String^ locationPath = Platform::String::Concat(Package::Current->InstalledLocation->Path, "\\Assets\\Logo.png"); CREATEFILE2_EXTENDED_PARAMETERS extendedParams = {0}; extendedParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); extendedParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; extendedParams.dwFileFlags = FILE_FLAG_SEQUENTIAL_SCAN; extendedParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; extendedParams.lpSecurityAttributes = nullptr; extendedParams.hTemplateFile = nullptr; Wrappers::FileHandle file( CreateFile2( locationPath->Data(), GENERIC_READ, 0, OPEN_EXISTING, &extendedParams ) ); DWORD e = GetLastError(); if (file.Get() == INVALID_HANDLE_VALUE) { throw ref new Platform::FailureException(); } The CreateFile2 returns access denied error. Can anyone please help me out? Thanks,

    Read the article

  • how do i search from php file ?

    - by Tum Bin
    Dear Friends, im totally new in php. Just learning. I got 2 Assingment with php and html. Assignment 01: I have to mansion some pplz name and all of them some friends name. and I have to print common friend if there have common friend. Bt there have a prob that I got also msg which dnt have any common friend like “Rana has 0 friends in common with Roni.” I want to stop this and how can i? Assignment 02: I made a html form to search a person from that php file. Like: when I will search for Rana php form will b open and and print : Rana have 4 friends and he has a common friend with Nandini and Mamun. when I will search for Tanmoy the page will be open and print: Tonmoy is Rana’s friend who have 4 friend and common friends with Nandini and Mamun. for this I have to use the function “post/get/request” Plz plz plzzzzzzzzzz help me! Here im posting my codes; <?php # Function: finfCommon function findCommon($current, $arr) { $cUser = $arr[$current]; unset($arr[$current]); foreach ($arr As $user => $friends) { $common = array(); $total = array(); foreach ($friends As $friend) { if (in_array($friend, $cUser)) { $common[] = $friend; } } $total = count($common); $add = ($total != 1) ? 's' : ''; $final[] = "<i>{$current} has {$total} friend{$add} in common with {$user}.</i>"; } return implode('<br />', $final); } # Array of users and friends $Friends = array( "Rana" => array("Pothik", "Zaman", "Tanmoy", "Ishita"), "Nandini" => array("Bonna", "Shakib", "Kamal", "Minhaj", "Ishita"), "Roni" => array("Akbar", "Anwar", "Khakan", "Pavel"), "Liton" => array("Mahadi", "Pavel"), "Mamun" => array("Meheli", "Tarek", "Zaman") ); # Creating the output value $output = "<ul>"; foreach ($Friends As $user => $friends) { $total = count($friends); $common = findCommon($user, $Friends); $output .= "<li><u>{$user} has {$total} friends.</u><br /><strong>Friends:</strong>"; if (is_array($friends) && !empty($friends[0])) { $output .= "<ul>"; foreach ($friends As $friend) { $output .= "<li>{$friend}</li>"; } $output .= "</ul>"; } $output .= "{$common}<br /><br /></li>"; } $output .= "</ul>"; # Printing the output value print $output; ?>

    Read the article

1