How to check if any words in a list contain a partial string?

You can use the Enumerable.Any method:

bool contained = alist.Any( l => l.Contains("somestring"));

This is checking each element using String.Contains, which checks substrings. You previously were using ICollection<string>.Contains(), which checks for a specific element of the list.


I think you want Any:

if (myList.Any(str => str.Contains("Mdd LH")))

It’s well worth becoming familiar with the LINQ standard query operators; I would usually use those rather than implementation-specific methods (such as List<T>.ConvertAll) unless I was really bothered by the performance of a specific operator. (The implementation-specific methods can sometimes be more efficient by knowing the size of the result etc.)


Specific Wine Applications don’t have Internet Access

There is a solution suggested in this post: How to configure wine to install Evernote?, explained further here: instalar-evernote-en-linux (is in Spanish but it has a lot of images)

You could install playonlinux. Once PlayOnLinux is installed, goto manage wine versions, and install wine 1.4.1 32bit.

Then click install program -> install a non-listed program -> Install a program in a new virtual drive.

Give a name for your application virtual drive (“evernote” or whatever you like), then mark Use another version of wine and select the 1.4.1 that you’ve just installed. Kind of virtual drive I choose32bit windows installation.

Browse for the installer in your drive, wait for the installation to finish and close Evernote, so PlayOnLinux can notice that the installation has finished.

This works for Evernote_5.8.13.8152 in Ubuntu 15.04.

shareimprove this answer

Install wine on arch linux

Installing wine on arch linux is very simple
just enter following command in terminal

#sudo pacman -S wine wine_gecko wine-mono

wine_gecko and wine-mono are for applications that need support for Internet Explorer and .NET, respectively.

To create a default prefix without running a Windows program or other GUI tool you can use:

$ env WINEPREFIX=~/.customprefix wineboot -u

To have them permanently defined for bash configuration ~/.bashrc do:

export WINEPREFIX=$HOME/.config/wine/
export WINEARCH=win32

Some applications (e.g. Office 2003/2007) require the MSXML library to parse HTML or XML, in such cases you need to install lib32-libxml2.

$ sudo pacman -S libxml2
$ WINEARCH=win32 WINEPREFIX=~/win32 winetricks -q msxml6 msxml3 vcrun2010 corefonts

Using fonts from a Windows partition
If there is a Windows partition mounted , its fonts can be used by linking to them.
Example, where the Windows partition is as /windows:

# ln -s /windows/Windows/Fonts /usr/share/fonts/WindowsFonts
Then regenerate the fontconfig cache:

# fc-cache

find your windows apps shortcuts in ~/.wine/drive_c/users/your-user-name/Desktop

enjoy folks 🙂

How to install Skype in Arch-based Antergos Linux

Sources: here and here.

Skype is in multilib repo. Enable it first by editing pacman.conf. In Terminal:

sudo gedit /etc/pacman.conf

Edit file by uncommenting below lines

Include = /etc/pacman.d/mirrorlist

Then, to update sources and install Skype:

sudo pacman -S skype

shareimprove this answer