Quickest way to see if a city (52000 records) is inside a string

Hi,
I am reading emails lines  in c# and interop.outlook, and I need to know if in that line there is a city. The table is around 52000 records! Sql Server 2012
Thks in advance

think table with 52000 cities  with field name as primary key
seq ,  name
1     Lisbon,
2     London
3      Paris
4     Venice
5     Istanbul
6      Prague
7      Florence,
52000  Setubal
Now I read one email line that says
"I will be at Prague the 20 June. Get me at Airport"
another line read
"I will arrive at Lisbon the 25 June"
I want the Quickest way to  get the city Prague after reading the first line and
Lisbon after reading  the second.
Thks
N

Similar Messages

  • What is quickest way to see desktop when a lot of windows open?

    Often I have a lot of windows open and want to see my files on the desktop. I minimize windows one at a time. That works, but there must be a single function that will do that.

    Pressing F11 will do what you want.

  • What is the quickest way of moving a itunes music library from a windows 7 machine to an apple Macbook pro?

    What is the quickest way of moving an itunes music library from a windows 7 machine to an apple Macbook pro?

    If you wany Everything from your PC itunes on your MBP... Then... See Here...
    Move iTunes Library from PC to MAC
    http://www.macworld.com/article/146958/2010/03/move_itunes_windows_mac.html

  • Most efficient/quickest way to set NTFS permissions in PowerShell

    Hello all,
    Trying to figure out what the most efficient/quickest way to set NTFS permissions via PowerShell is. I am currently using ICACLS but it is taking FOREVER as I can't figure out how to make inheritance work with this command.
    This has prompted me to begin looking at other options for setting NTFS permissions in PowerShell, and I wondered what everyone here likes to use for this task in PowerShell?

    Ah ok. Unfortunately, my ICACLS is taking FOREVER. Here is the code I'm using:
    ICACLS "C:\users\[user]\Desktop\test" /grant:r ("[user]" + ':r') /T /C /Q
    However:
    1.  I can't figure out how to make the inheritance parameter work with ICACLS
    2. If I do make the inheritance parameter work with ICACLS, I still need a way to add the permission to child objects that aren't inheriting.
    Any tips on how to improve performance of ICACLS?
    1. icacls folder /grant GROUPNAME:(OI)(CI)(F)  (i will post corrected code later, this works in CMD but not powershell couse of bracers)
    2.  get-childitem -recurse -force |?{$_.psiscontainer} |%{icacls ....}  (or u can list only folders where inheritance is disabled and apply icacls just on them)
    I think jrv and Mekac answered the first question about inheritance flags. I would just add that you probably don't want to use the /T switch with icacls.exe because that appears to set an explicit entry on all child items (that's probably why it's taking
    so long).
    For your second question, I'd suggest using the Get-Acl cmdlet. It throws terminating errors, so I usually wrap it in a try/catch block. Something like this might work if you just wanted the paths to files/folders that aren't inheriting permissions:
    dir $Path -Recurse | ForEach-Object {
    try {
    Get-Acl $_.FullName | where { $_.AreAccessRulesProtected } | ForEach-Object { Convert-Path $_.Path }
    catch {
    Write-Error ("Get-Acl error: {0}" -f $_.Exception.Message)
    return
    If you're looking for speed/performance, you don't want to just use the PowerShell Access Control (PAC) module that Mike linked to above by itself. It's implemented entirely in PowerShell, so it's incredibly slow right now (unless you use it along with Get-Acl
    / see below for an example). I'm slowly working on creating a compiled version that is much faster, and I think I'm pretty close to having something that I can put in the gallery.
    Since I wasn't sure which command would give you the best results, I used Measure-Command to test a few different ones. Each of the following four commands should do the exact same thing. Here are my results (note that I just ran the commands a few times
    and averaged the results on a test system; this wasn't very rigorous testing):
    # Make sure that this folder and user/group exist:
    $Path = "D:\TestFolder"
    $Principal = "TestUser"
    # Native PowerShell/.NET -- Took about 15 ms
    $Acl = Get-Acl $Path
    $Acl.AddAccessRule((New-Object System.Security.AccessControl.FileSystemAccessRule(
    $Principal,
    "Read", # [System.Security.AccessControl.FileSystemRights]
    "ContainerInherit, ObjectInherit", # [System.Security.AccessControl.InheritanceFlags]
    "None", # [System.Security.AccessControl.PropagationFlags]
    "Allow" # [System.Security.AccessControl.AccessControlType]
    (Get-Item $Path).SetAccessControl($Acl)
    # PAC Module 3.0 w/ PowerShell/.NET commands -- Took about 35 ms
    $Acl = Get-Acl $Path | Add-AccessControlEntry -Principal $Principal -FolderRights Read -PassThru
    (Get-Item $Path).SetAccessControl($Acl)
    # icacls.exe -- Took about 40ms
    icacls.exe $Path /grant "${Principal}:(OI)(CI)(R)"
    # PAC Module 3.0 w/o Get-Acl -- Took about 350 ms
    Add-AccessControlEntry -Path $Path -Principal $Principal -FolderRights Read -Force
    Unless I messed something up, it looks like the native PowerShell/.NET commands are faster than icacls.exe, at least for modifying a single folder's DACL.

  • I have a 4 month long text message thread conversation. What's the quickest way to get to the very beginning of the conversation?

    I have a 4 month long text message thread conversation. What's the quickest way to get to the very beginning of the conversation?

    The startup.exe file is locate in the \NI-RT\STARTUP directory. 'cd NI-RT' then 'cd STARTUP' should get you to the right place after making the connection with ftp. I don't recognize PH_EXEC.EXE. Logging in as anonymous is fine. I don't recall seeing documentation on the file structure and locations on the module but I'm sure there is some. I just wandered around w/ftp.
    The program to update the node should be below. Enter the IP address, the green light will confirm the node is found.
    The version function scans the existing startup.exe for a string beginning and ending with " RU Version " and prints everything in between as the version.
    The autostart function will copy the existing ni-rt.ini file to your computer, mod
    ify the autostart as requested, then put the file back. Leaves the copy on the PC, which can be handy.
    Send file will request a file of the format startup*.dat which will be renamed startup.exe and ftp'd to the module. Lets you keep version numbers in the filename on the PC side. Your directory structure probably won't match mine so you'll have to browse for your file.
    Reboot module reboots the module.
    Hope this is useful, let me know if anything doesn't make sense. Thanks.
    Matt
    Attachments:
    RNconfig.exe ‏855 KB

  • HT1417 What's the quickest way to delete duplicates without going song by song?

    What is the quickest way to delete duplicates from i tunes library without going song by song?  I just transferred my music from my ipod classic to my computer and now I have a lot of duplicate music.  Most is from CD's I reburned or music I was able to get back on my new computer through I tunes.  It is from my personal i pod (one of 4).  I finally figured out how to get it off the ipod and back onto my newer computer. I made sure to go to advanced setting and check "keep i tunes folder organized" but it still saved all duplicates.

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • What Is Quickest Way To Add More Auxs?

    What Is Quickest Way To Add More Auxs?
    and my 2nd question is, by adding extra auxs, bus, audio inst and audio tracks, does that alone use up memory even though they are not being used?
    thanks

    1. In the Environment window, scroll until you can see your AUX 1 and 2 (which you should have by default).
    2. As you would to copy a "region", highlight AUX 2.
    3. Now, while holding down the option key, drag and drop the channel to the left.
    4. Go to the values on the left of your screen, and set the channel input to AUX 3.
    5. Repeat with AUX 4,5,6,7,8, etc...
    Message was edited by: apostol13
    Message was edited by: apostol13

  • What's the quickest way to put edit points around a selection?

    In the timeline (TL) I have made a selection inside a clip (using the Range Selection tool):
    What is the quickest way to make this selection a separate clip (as below)?:
    PS Saying 'put edit points around' and 'make separate clip', I guess are always the same thing, so I have mixed my terms!?
    PS I have currently been using: CMD + X, CMD + V, but this is a hack, not a method, so there has to be a way, right?

    Thanks to you all for quick replies, especially Andy for quickly understanding me.
    Yup, I used the Range Selection tool. It's a great tool, when for e.g. you want to lift ambient room tone from a portion of an audio clip to paste elsewhere.
    Anyway, I am just experimenting thoroughly with all the tools and workflows, to find quickest ways of doing things. To answer your question(s): an example in which you would want to do what I mention above is if you wanted to quickly apply particular Effects/Parameters/Settings to a portion of a clip, like a sepia tint, and wanted to be able to easily click back to that portion later,  see e.g. below:
    Thanks again

  • Quickest way to resizing 30 documents

    I have 30 documents (all in all 400 odd pages) that all need completely re artworking to a smaller size - but not one that is the same proportions height and width. As a starting point I want to resize all documents to 50% - is there an apple script or similar software that will make this task simple.
    Any help would be welcome.
    Thanks

    I would hesitate to let any script run rampage on this.
    By far the easiest way is one of printing the document to PDF and placing that, or directly placing the original ID document as image, into a new document of the correct size. But that restraints you to proportional sizing only -- your 50% should work fine, but if you enter a different scale for horizontal and vertical, you will see text and images distort. And (since you might ask), no, a script would not help here.
    There are a couple of scripts that place entire PDFs automatically (search in the script repository).
    There is no easy way to reformat a document. The only help you can get is by enabling Layout Adjustment, and its use is very limited. It does its work flawless when done with plain text only (say, a novel), but as soon as you have images and/or tables in floating boxes, it does resize them (in a haphazard way -- tables are not re-fitted) but no way it can keep them "on the same page as the reference", or something like that.
    If you are looking for the quickest way, and don't care about quality, go for proportionally resized PDFs (using a script). If you do care for some quality, do not resize them out of proportion -- and you can still use a script. But if you want to do any editing at all -- no matter how tiny -- you will have to resize and reformat the document manually, no way around it.

  • Any way to see ICONS in Open and Close Dialog boxes?

    Is there any way to see ICONS in Open and Close Dialog boxes, instead of just lists of items names?
    I know you can preview one at a time, but I'd love to see all my artwork as picture icons, just as you can in a finder window.
    Windows does this, but not OSX that I know of. Is there a third party app that enables you to see icon view in the Open and Close Dialogs?

    Thank you Steve Jobs. I guess that feature has been added in Leopard. Now there really is nothing that I'll miss from Windoze.

  • They changed the way we see our appointments. That's awful! Is there a way to chnage back to the "old" way when you could see all your appointments at a glance????

    They changed the way we see our appointments. That's awful! Is there a way to chnage back to the "old" way when you could see all your appointments at a glance????

    Maybe I'm fool, but how I get the "day view"? I have three options on the top line, an icon that seems a computer (a square and two lines), a magnifying glass to search a especific item and a "plus" to add appointments. The "day view" isn't any more there - that's the point!!! Using the first icon a get the full month-that uses 2/3 of the screen- and two lines of appointments...To see the rest I have to slide up and down the two lines taking care to not touch the month...

  • Is there a way of seeing music that isn't in a playlist

    Hi there, Im new to itunes so please be gentle with me...
    i am trying to put all music in to playlist but am getting a bit confused as to what ive put in a playlist and not.
    i know you can right click on a track and see what playlist that one song is in but with over 20000 tracks imported i would be very impractical so was wondering if there was a way of seeing everything that is un-playlisted??
    thanks for all your help in advance
    Dougie

    You can order/buy music from whomever you like.
    You can request from itunes:  http://www.apple.com/feedback

  • In ICal is there a way to see all of the text in all day events on the month view of the calendar.  Seems to wrap text only if there is a time on the event

    In ICal is there a way to see all of the text in all day events on the month view of the calendar?  Seems to wrap text only if there is a time on the event

    The paths won't agree on the two OSs so a simple XML import isn't likely to work.
    See Sync iPod/iPad/iPhone with two computers and, if needed, Make a split library portable. The techniques in the first link will work when moving the library between Windows and OS X as long as the library is "portable", but iTunes takes quite some time checking the database when the library is opened under a different OS.
    tt2

  • The Way I See It!

    I am part of a group of Mac users. We each have a desktop model and a laptop computer as well as Airport Extreme base stations. I think many Mac users have this kind of arrangement. In every case the printers can not be networked so that we can print from both without having to change the cable arrangement. As well as the provided printer drivers we have tried Gutenprint, PrintFab, and PowerRIP drivers with no success. I use my family's computers as examples.
    Example1:
    I have a MacBook Pro and a G5 Quicksilver desktop both are running Leopard (10.5.2). I have an Epson Photo 2200 printer. I can print from the MacBook wirelessly with the printer attached to the Airport. However, the G5 will not print with it connected that way. I have to unplug the printer from the Airport and attach it to the USB port on the G5. That being done, you then can't print from the MacBook.
    Example 2
    My sister has a MacBook and an iMac (ppc) both running Leopard (10.5.2). She has a Canon ip4500 and has exactly the same problem.
    It is frustrating! Why can't Apple and the manufacturers of printers get these problems resolved in a reasonable time frame.
    It appears that they are both just interested in selling their new products and not resolving these obvious issues. at least, that's the way I see it!

    I believe we are expected to use Effects for things like your lighting change. There are several in the Effects browser under Lighting that may accomplish what you are after; Bloom, Glow, Aura, etc. I presume the theory is that these should give you greater control and a richer effect than a simple exposure control.
    And if they don't do what you need, it is not difficult to whip up your own in Motion. Creating a simple exposure control should be ... simple. That is, if you are into Motion. Which with Final Cut Pro X seems to be an increasingly valuable skill.
    Regarding requests 2 and 3, they do not seem approachable in Motion.

  • How can I see my reminders in my Mac in the same way I see them in my iPad and iPhone

    How can I see my reminders in my Mac in the same way I see them in my iPad and iPhone, I is easier to work with reminders in Ipad and Iphone rather to see them like a list on ICal

    The calendar seems to be the only way to see reminders right now. I'm aware of no 3rd party program that deals with just reminders...but I'd like to find one.

Maybe you are looking for