Server Hunter – Easily browse thousands of virtual and dedicated servers from hundreds of vendors

Server Hunter is an online platform for finding and comparing virtual and dedicated server packages from hundreds of hosting providers. Offers and prices are automatically retrieved and updated every 24 hours. Visit us at serverhunter.com.

Now you can easily search and compare thousands of virtual, hybrid and dedicated servers from hundreds of vendors. Learn more about Server Hunter: https://www.serverhunter.com/about/.

performance – The best and most efficient way to browse files using Excel VBA

I have a procedure to browse all the files of folders and subfolders from a folder that the user can select. The user can select both source and target folders. I use Excel VBA for this. Spreadsheets contain all or some of the file names to look for.

It works like this. I have function GetFiles which returns a string (including the path) separated by a pipeline (|). Then, I browse all the cells in column A containing the file name (or part of it) to search for. the GetFiles browses all the folders and subfolders of the selected source path. It takes longer if a high level of the source folder is selected.

The main function looks like this:

Under MoveFilesToFolder ()

Dim filePath As String: filePath = ""
Dim moveToPath As String: moveToPath = ""
Dim filename as a string
Dim fileNameFront As String
Dim fileNameRear As String
Dim currentFileName As String
Dim cell As Range
Dim fileCopied As Boolean: fileCopied = False
Dim i as an integer
Sun J also long
Dim StartTime As Double
Dim SecondsElapsed As Double
Dim result As String
Dim ws as sheet sheet
Dim frm As ufImageSearcher

ExactMatch = True
OverwriteExistingFile = False

Application.DisplayAlerts = False
Application.ScreenUpdating = False

On Error GoTo ErrorHandling

If (wsExists ("Images")) then

fileNameString = ""

& # 39; filePath = InputBox ("File Path, Close with Backslash ()", "Source Folder", ActiveWorkbook.Path)
& # 39; moveToPath = InputBox ("File copy path in! Close with backslash ()", "Target folder", ActiveWorkbook.Path & " copy ")

filePath = GetFolderPath ("Bron directory")
If (IsStringEmpty (filePath)) then
Output under
End if
moveToPath = GetFolderPath ("Doel directory")
If (IsStringEmpty (moveToPath)), then
Output under
End if

If not (IsStringEmpty (filePath) or IsStringEmpty (moveToPath)), then

If ((FolderExists (filePath)) And _
(FolderExists (moveToPath))) And (filePath <> moveToPath) Then

If Right (moveToPath, 1) <> "" Then
moveToPath = moveToPath & ""
End if

If (Dir (moveToPath & "*. *") <> ""), Then
result = MsgBox (moveToPath & "contains files! Choose an empty folder!" & _
vbCrLf & vbCrLf & "Go to the folder:" & moveToPath & "?", vbYesNo + vbQuestion, "Result!")
If (result = vbYes) Then
OpenFolderInExplorer (moveToPath)
End if
Output under
End if

wsActivate ("Images")
Set frm = New ufImageSearcher

With frm
.lblSource.Caption = file_path
.lblTarget.Caption = moveToPath
.Show

If .Tag <> "Canceled" Then
ExactMatch = .cbxExactMatch.Value
OverwriteExistingFile = .cbxOverwrite.Value
Other
Output under
End if
Finish by

Start time = Timer

& # 39; Retrieves all files, including the path, separated by a pipeline.
GetFiles (filePath)

If not (IsStringEmpty (fileNameString)), then
Dim imgArray As Variant: imgArray = Split (fileNameString, "|")
& # 39; Column A contains all the strings used to compare the files found from the GetFiles function
For each cell in ActiveSheet.Range ("A1: A" & Range ("A1"). End (xlDown) .row)
Events
fileCopied = False
filename = Mid (cell.Value, lastpositionOfChar (cell.Value, "/") + 1, Len (cell.Value))

Application.StatusBar = "(File Nbr:" & CStr (UBound (imgArray)) & ")"


If not (IsStringEmpty (filename)), then
For i = LBound (imgArray) to UBound (imgArray)
Events
If not (IsStringEmpty (CStr (imgArray (i)))), then
If ExactMatch Then
If (GetFileName (imgArray (i)) = file name), then
If DoesFileExist (moveToPath & GetFileName (imgArray (i))) and do not overwrite the existing file
FileCopy imgArray (i), moveToPath & GetFileName (imgArray (i)) & "-" & Format (now, "yyyymmddhhmmss")
Other
FileCopy imgArray (i), moveToPath & GetFileName (imgArray (i))
End if
fileCopied = True

If fileCopied then
ActiveSheet.Range ("B" & cell.row) .Value = imgArray (i)

For J = 2 to 15
Dim newFileName As String
newFileName = CreateFileName (CStr (imgArray (i)), LeadingZeroString (J))
If not (IsStringEmpty (newFileName)), then
If (DoesFileExist (newFileName)), then
If not (IsFileOpen (newFileName)), then
FileCopy newFileName, moveToPath & Right (newFileName, Len (newFileName) - lastpositionOfChar (newFileName, "") + 1)
ActiveSheet.Range (GetColLetter (J + 1) & cell.row) .Value = newFileName
ActiveSheet.Range (GetColLetter (J + 1) & cell.row) .Font.Color = RGB (0, 102, 0)
End if
Other
ActiveSheet.Range (GetColLetter (J + 1) & cell.row) .Value = "(Niet aanwezig)" & Right (newFileName, Len (newFileName) - lastpositionOfChar (newFileName, "") + 1)
ActiveSheet.Range (GetColLetter (J + 1) & cell.row) .Font.Color = RGB (255, 153, 51)
End if
End if
Next J
End if
End if
Other
If (InStr (1, GetFileName (imgArray (i)), filename, vbTextCompare)> 0), and then
If not (IsFileOpen (CStr (imgArray (i)))), then
If DoesFileExist (moveToPath & GetFileName (imgArray (i))) and do not overwrite the existing file
FileCopy imgArray (i), moveToPath & GetFileName (imgArray (i)) & "-" & Format (now, "yyyymmddhhmmss")
Other
FileCopy imgArray (i), moveToPath & GetFileName (imgArray (i))
End if
fileCopied = True

& # 39; Find the first empty columnid.

lCol = Cells (cell.row, Columns.Count) .End (xlToLeft) .Column
ActiveSheet.Cells (cell.row, lCol + 1) .Value = imgArray (i)
End if
End if

End if
End if
Then I
If not copied then
ActiveSheet.Range ("B" & cell.row) .Value = "** NOT FOUND **"
ActiveSheet.Range ("B" & cell.row) .Font.Color = RGB (250, 0, 0)
End if
End if
following
End if

Sheets ("Images"). Columns ("B: Z"). Automatic adjustment
SecondsElapsed = Timer - Start Time

Application.DisplayAlerts = True
Application.ScreenUpdating = True

result = MsgBox ("Date Exported in:" & moveToPath & vbCrLf & "This was done in:" & Format (SecondsElapsed / 86400, "hh: mm: ss") & "seconds." & _
vbCrLf & vbCrLf & "Go to the folder:" & moveToPath & "?", vbYesNo + vbQuestion, "Result!"
If (result = vbYes) Then
OpenFolderInExplorer (moveToPath)
End if
Other

If not (FolderExists (filePath)) then
MsgBox (filePath & ": the path is niet gevonden!")
End if
If not (FolderExists (moveToPath)), then
MsgBox (moveToPath & ": Path is niet gevonden!")
End if
End if
Other
MsgBox ("No source and / or target selected" & vbCrLf & _
"Source:" & filePath & vbCrLf & _
"Target:" & moveToPath)
End if
Other
MsgBox ("This procedure expects a worksheet" Images & # 39; "& vbCrLf & _
"and the name or part of the name of the image to be found in column A")
End if
Completed:
If (IsObject (ws)) Then
Set ws = Nothing
End if

Application.DisplayAlerts = True
Application.ScreenUpdating = True
Output under
Error handling:
MsgBox ("An error has occurred! (" & Err.Description & ")")
End Sub

The GetFiles function looks like:

Sub GetFiles (ByVal path as a string)

On Error GoTo ErrorHandling
Dim fso As Object: Define fso = CreateObject ("Scripting.FileSystemObject")
Dim As Object folder: Set folder = fso.GetFolder (path)

Dim subfolder as object
Dim file as object

For each subfolder in folder.SubFolders
Events
GetFiles (subfolder.path)
Subfolder next

For each file in folder.Files
fileNameString = fileNameString & file.path & "|"
Next file

Completed:
Set fso = Nothing
Define the folder = nothing
Set the subfolder = Nothing
Set file = Nothing

Output under

Error handling:
MsgBox ("An error has occurred! (" & Err.Description & ")")
End Sub

Everything works, but the execution can take a long time, especially when the selected source folder contains a lot of folders and subfolders.

To give you an idea, it takes 13 minutes to compare 100 rows of column A with 10 000 files found. The average loop 100 x 10,000 = 1 million times.

I have two questions:

  1. Is there a more efficient way to do this with Excel VBA?
  2. Is the DoEvents function used correctly?

Is it possible to browse HSTS sites via the SOCKS5 proxy?

I can not browse HSTS websites with the SOCKS5 proxy in a Chrome browser.

This site is inaccessible. The webpage at
https://www.instagram.com/accounts/login/?hl=en might be temporarily unavailable or
it may have been moved permanently to a new web address.
ERR_SOCKS_CONNECTION_FAILED

intellij – Does any one work on a Gradle debugger able to browse the DSL code?

We use a lot of Gradle in my work with IntelliJ, and the lack of built-in debugging of DSL code "step by step" harms our productivity. None of us is a "Gradle Masters" and it seems ridiculous to resort to println instructions for debugging.

Do other IDEs provide this "step-by-step" debugging of the DSL code?

If no, does anyone work on the same?

I've heard that if you go to Kotlin, you can check the DSL code in IntelliJ; Is it correct?

c # – Browse the Microsoft UI Automation Elements with the help of TreeWalker

I've written a method that finds a child element in a menu based on a condition. The code works, but in case I search for more items that were well down the tree, it would take a lot of time.

Usually when I write tests that use this method, the items I am looking for are close to each other. So I think it's useless to start looking over again. I want to somehow start from the position of the last element found and do a search nearby (that is, look first at the parent node of the element found and the other children of the parent node) of this position and if fails to execute the method that I wrote that starts from the root.

The code looks like this:

static AutomationElement protected FindAutomationElement (parent TmUIElementBase, Condition condition) {
var walker = TreeWalker.ControlViewWalker;
var worklist = new queue();
worklist.Enqueue (parent.SearchFrom);
while (worklist.Any ()) {
var element = worklist.Dequeue ();
child var = walker.GetFirstChild (element);
while (child! = null) {
var result = child.FindFirst (TreeScope.Element, condition);
if (result! = null) {
return the result;
}
worklist.Enqueue (child);
child = walker.GetNextSibling (child);
}
}
throw a new exception ("FindAutomationElement: item not found");
}

php – how to use IFrames on my site to browse Ads by Site users without risking?

How to use the ip Iframe on my website without risking to browse ads by site users, without issue?

Is IFrame a good way?

<iframe src = "http://security.stackexchange.com/"sandbox =" ??? ">

What methods can be used for security?

View ads (surfer) like EvolutionScript.

The security of the site and the security of the users of the site are both important.

Browse the best MLM plans with a free demo – MLM & Network Marketing

For revenue management and to check the MLM business figure, you need the MLM software. Get ready-made business plans: binary plan, board plan, matrix plan, generation plan, single plan, party plan, and more. You can also customize plans to suit your needs.

For more details, please visit the website.

.

sharepoint online – Ability to browse the site with permissions only for a library

When working with SharePoint Online, we have a team site configuration and a set of document libraries.

Permissions have been set at the site level and inherited from all libraries. For one of the subfolders (Folder1), we broke the inheritance and gave a new group (Group1) read access only.

Group1 was not included at the site level. However, SharePoint has automatically granted limited site-level access once the permissions for Folder 1 have been granted.

Group1 users can access Folder1 if the direct URL is used, but can not navigate through the main page of the site and the navigation bar.

From what I understand of limited access, users will be able to browse the site and access the resource for which they have superior access permissions.

Is it possible to grant additional read-only permissions to the main site's resources to allow browsing, but only for resources in which they have permissions greater than limited access?

Java 8 – Browse the list, change if found, otherwise add

Good night

In a shopping cart application, I have the following attribute in the shopping cart class:

Listing items = new ArrayList <> ();

And a method of adding articles, which receives a product, its unit value and its quantity. The function searches in the list of tables the elements if the product passed as a parameter is already in the basket. If the element is, it changes its value and if it does not, it adds a new element.

I'm trying to solve only with the feed feature, but I think I'm doing too much treatment for that. The method has the following code:

                public void addItem (product Product, BigDecimalUnitvalue, int quantity) {

items.stream (). filter (item -> item.getProduct () .equals (product)) findAny ()
.map (item -> {
item.setQuantity (item.getQuantity () + quantity);
item.setUnitValue (UnitValue);
return the article;
}) orElseGet (() -> {

itens.add (new article (product, unit value, quantity));
return null;

});
}

Does anyone know of a way to do this digitization without having to go through so many processes? thank you so much

Browse and clean Gitlab page files

How can I browse and clean Gitlab page files?

NB: I intend to create Gitlab pages for each branch (hosting CI reports). I want to trigger a cleanup step when a branch is merged or deleted.