Avoid a string to be treated as protocol in url bar

I use url bar to search with google and other engines.
If I want to use the "site:" string to search keyword in only one site firefox tells me that protocol (site) is not associated
I just want use google, firefox should not interfere.
How to do that?

Placing ''site:'' first in the location bar will get you that error. Alternatives are:
*place entire search string in quotations (i.e., ''"site:mozilla.org download firefox"'')
*place ''site:'' later in the search string without quotations (i.e., ''download firefox site:mozilla.org'')
I generally use quotation marks when including ''site:'' as in the first example.
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

Similar Messages

  • Avoid duplicate strings

    I am trying to avoid duplicate string a set of values. Instead of collecting strings in a string array and then going through the loop to find out whether the string exists already in the list or not, I am looking for another possibility. I am sure that arrayList allows duplicate strings. Is there any other possibility which doesn't allow duplicte strings or entry? Thanks.

    enter_name wrote:
    Aakash wrote:
    Hi,
    You can still do this by using ArrayList class.
    Have a look at it's contains(java.lang.Object) method which will return true if it finds the same Object in the ArrayList.
    RegardsI'm not sure if that would work, as two Strings of equal value doesnt mean the are equal. The object reference between the two Strings would still be different no matter the value.It would work since the contains method uses the equals method, and doesn't look at the object references. (But it would possibly be slow as hell if you have a large number of data)
    Kaj

  • TMG / WPAD and protocol relative URLs

    We are using a TMG Cluster (TMG2010 SP3) as a proxy.
    We use wpad auto discover for our clients and that is working fine except that protocol relative urls are not sent to the proxy but use the direct route.
    More and more websites are using a protocol-relative url (eg: script src=//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js ) when we use the "automatically detect settings" option in IE these URL's aren't redirected to the proxyservers.
    And because our clients do not have direct internet access the page doesn't load the script and isn't displayed correctly.
    I probably have to alter the wpad.dat file but I'm stuck in how to do so.

    Hi,
    Thank you for your post here.
    How did you judge that the packets have been directly routed to gateway?
    Could you please configure your proxy to manually point your web proxy server address? Please test it to see if traffic is still routed directly.
    Network Monitor 3.4 is a very useful tool to help us capture the network packets. We need to check if the request you send is packaged in HTTP or HTTPs since just HTTP or HTTPs can be proxy direct to proxy server.
    Best Regards
    Quan Gu

  • How to avoid NullPointerException---String array created from JTextArea

    Hi,
    I use the method getText() to put the contents of a JTextArea into a String object. Then I use split("\\s+") on that String object to get a String array. Before the contents of the String array are output, I get a NullPointerException. How do I avoid this exception? My code is below.
    //: net/mindview/util/SwingConsole.java
    package net.mindview.util;
    import javax.swing.*;
    public class SwingConsole {
      public static void
      run(final JFrame f, final int width, final int height) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            f.setTitle(f.getClass().getSimpleName());
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(width, height);
            f.setVisible(true);
    } ///:~
    //: gui/Charts.java
    package gui;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import net.mindview.util.SwingConsole;
    public class Charts extends JFrame {
        private int[] numbers;
        private JTextArea input = new JTextArea();
        private JScrollPane areaScrollPane = new JScrollPane(input);
        private JButton b1 = new JButton("Submit");
        private JButton b2 = new JButton("Clear");
        public Charts() {
            add(areaScrollPane);
            areaScrollPane.setPreferredSize(new Dimension(250, 250));
            b1.addActionListener(a1);
            b2.addActionListener(a2);
            add(b1);
            add(b2);
        private ActionListener a1 = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                String data = input.getText();
                String[] stringArray = data.split("\\s+");
                for (String s:stringArray)
                    System.out.print(s + " ");
                int i = 0;
                for (String s:stringArray)
                    numbers=Integer.parseInt(s);
    i++;
    private ActionListener a2 = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    input.setText("");
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    SwingConsole.run(new Charts(), 400, 400);
    Edited by: gluedtothecomputer on Feb 1, 2009 7:59 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    don't forget to init your int array:
          String[] stringArray = data.split("\\s+");
          numbers = new int[stringArray.length];

  • Https protocol based URL reading Program

    This is the simple code to read through a java program from a simple http based procot URL
    import java.net.*;
    import java.io.*;
    public class URLReader {
    public static void main(String[] args) throws Exception {
         URL yahoo = new URL("http://mail.yahoo.com/");
         BufferedReader in = new BufferedReader(
                        new InputStreamReader(
                        yahoo.openStream()));
         String inputLine;
         while ((inputLine = in.readLine()) != null)
         System.out.println(inputLine);
         in.close();
    But if i use the url https://mail.yahoo.com/ instead of http://mail.yahoo.com/ then i have an exception given below
    Exception in thread "main" java.io.IOException: HTTPS hostname wrong: should be
    <mail.yahoo.com>
    at sun.net.www.protocol.https.HttpsClient.b(DashoA12275)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
    (DashoA12275)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:626)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Dash
    oA12275)
    at java.net.URL.openStream(URL.java:913)
    at URLReader.main(URLReader.java:7)
    Now i want this program based on https to run. SO can anybody help me running the same program by using https? Or can anybody give me the code to run a url based on https protocol?

    Here is a code which works for me.
    import java.net.*;
    import java.io.*;
    public class URLConnectionReader {
        public static void main(String[] args) throws Exception {
            URL myurl = new URL("https://my.app.com/");
            URLConnection yc = myurl.openConnection();
            BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    yc.getInputStream()));
            String inputLine;
            while ((inputLine = in.readLine()) != null)
                System.out.println(inputLine);
            in.close();
    }Output:
    <html><head>
    <script>location.replace("/my/app?action=homeActionId");</script>
    </head></html>

  • Protocol in URL constructor

    I'm trying to draw an image on a jscrollpane and somewhere in my code I have to create a URL of image that I want to draw.All URL constructors require protocol as a parameter and I don't know what to put for this simple use.

    google url and protocol
    URL (protocol://host:port/ (file or folder)
    Read the second paragraph of URL in the java 6.0 API
    [In general, a URL can be bro...|http://java.sun.com/javase/6/docs/api/java/net/URL.html]
    Edited by: gtRpr on 2008/07/28 09:11

  • Does Oracle allows zero length string

    Hi,
    I tried to insert zero length string ('') into an Oracle table, a null value and a non-empty string. But I found that zero length string and null are stored as NULL in the column.
    Create table test (col1 number(2), col2 varchar(10));
    Insert into test values (1, 'hi');
    Insert into test values (2, NULL);
    Insert into test values (3, '');
    Select * from test where col2 is null;
    Result: 2 rows
    Select * from test where col2 = '';
    Result: 0 rows
    Is this to do with some environment setting in SQL* Plus or does oracle doesn't allow zero length string?

    Oracle treats '' as NULL.
    There are frequent murmurs that some new version of Oracle is going to change this behaviour (I believe it's not ANSI-compliant) but I doubt that they will, as it will break too many old applications.
    Cheers, APC

  • Varchar2, empty strings and NULL

    Hi all,
    When inserting an empty string into a column of type varchar2 - is a NULL value stored in the column by the database? I've seen conflicting reports, and I know that the SQL 1992 spec specifies that empty strings not be treated as a NULL value, but that Oracle has traditionally treated zero length strings stored in a varchar2 column as NULL.
    So, is there a way to store an empty string in a varchar2 column as an empty string and not a NULL value?
    TIA,
    Seth

    It can be even more complicated or annoying than NULL not equal to ASCII NULL.
    example:
    create table test_null
    (fld1 varchar2(10),
    fld2 varchar2(10),
    fld3 varchar2(20));
    insert into test_null values (chr(0),null, 'chr(0) and null');
    insert into test_null values (null, null, 'null and null');
    insert into test_null values ('', chr(0), ''''' and chr(0)');
    insert into test_null values ('', null, ''''' and null');
    select * from test_null;
    FLD1       FLD2       FLD3
                          chr(0) and null
                          null and null
                          '' and chr(0)
                          '' and null
      1  DECLARE
      2  BEGIN
      3   for c1 in (select fld1, fld2, fld3 from test_null) loop
      4      if c1.fld1 = c1.fld2 then
      5         dbms_output.put_line(c1.fld3||' Are equal'||
      6                '  Length fld1 = '||to_char(length(c1.fld1))||
      7                ' Length fld2 = '||to_char(length(c1.fld2)));
      8      else
      9         dbms_output.put_line(c1.fld3||' Are NOT equal'||
    10                '  Length fld1 = '||to_char(length(c1.fld1))||
    11                ' Length fld2 = '||to_char(length(c1.fld2)));
    12      end if;
    13      dbms_output.put_line(' ');
    14   end loop;
    15*  END;
    SQL> /
    chr(0) and null Are NOT equal  Length fld1 = 1 Length fld2 =
    null and null Are NOT equal  Length fld1 =  Length fld2 =
    '' and chr(0) Are NOT equal  Length fld1 =  Length fld2 = 1
    '' and null Are NOT equal  Length fld1 =  Length fld2 =
    PL/SQL procedure successfully completed.

  • Using Bridgeview with the IAK/IAS Server, I was able to read and write several registers using a string tag. In DSC using the Lookout Protocal Driver, I do not see a way to read/write string tags.

    In the tag configuration I can select for a string tag, but I do not see a way to set up the Lookout Protocal Driver for a string tag.

    That's right - The old IAK/IAS Servers from National Instruments were a tighten developement with BridgeVIEW together - so that they implement the string data type. Since NI recommends to use the LPD drivers instead of the IAK Servers there is no way to configure string tags in the Lookout protocol drivers. The LPDs or Lookout does not really handle arrays/strings at all - that's a limitation for the Lookout protocol drivers.
    Roland

  • Changing connection string host from localhost to IP address produces error

    Hi all,
    First of all, thanks in advance for your help. Second, I know next to nothing about Oracle database administration, so please be patient, but I want to understand things, rather than just running down the Google rabbit hole with guess-and-check until things happen to work and I don't know why.
    I've got a connection string that I'm using to connect to a local Oracle database I'm using for testing. I have the 11g installed and the 11.1.0.7 64-bit client (as my application is a 64-bit application) installed, both locally on my development machine. I've got a connection working using the following connection string:
    Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = mywindowslogin.path.to.me)));User Id=********;Password=********;However, when I change "localhost" to my IP address, my computer name, or anything else, I get "ORA-12541: TNS:no listener".
    The tnsnames.ora in my database home is as follows - it was set up for me automatically when I installed the database. mywindowslogin.path.to.me doesn't point to anywhere, which I assume is correct, but my computer is on the path.to.me domain.
    LISTENER_MYWINDOWSLOGIN =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
    MYWINDOWSLOGIN =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = mywindowslogin.path.to.me)
      )How can I resolve this issue?
    Edited by: Don on Jul 14, 2010 8:31 AM

    Does setting the environment variable affect all installations? Only two of my four Oracle Homes have a tnsnames.ora file, or event a NETWORK/ADMIN location, so I'm not sure where to put tnsnames.ora in those Homes. I copied the tnsnames.ora for my database to the one other Home that had a NETWORK/ADMIN location, but I'm still getting "ORA-12541: TNS:no listener" if I don't use "localhost" as the host.
    Thanks!
    Edited by: Don on Jul 14, 2010 12:08 PM

  • User Agent Strings for Office 365 Install and Updates

    In my organization, we restrict internet access to a specific list of approved applications by user agent string; however, it seems the user agent string for Office 365 (2013) applications has changed over time causing installs and updates of Office 365
    on client PCs to fail.
    Is there a repository of user agent strings used by Office 365 applications?
    Thanks in advance.

    Hi,
    Please refer to this link:
    http://technet.microsoft.com/en-us/library/jj219420.aspx
    As mentioned under Ports, protocols and URLs used by Click-to-Run, 
    Download, installation from the portal
    Automatic updates
    TCP
    80
    http://officecdn.microsoft.com
    I hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • Problem using java String.split() method

    Hi all, I have a problem regarding the usage of java regular expressions. I want to use the String.split() method to tokenize a string of text. Now the problem is that the delimiter which is to be used is determined only at runtime and it can itself be a string, and may contain the characters like *, ?, + etc. which are treated as regular expression constructs.
    Is there a way to tell the regular expression that it should not treat certain characters as quantifiers but the whole string should be treated as a delimiter? I know one solution is to use the StringTokenizer class but it's a legacy class & its use is not recommended in Javadocs. So, does there exist a way to get the above functionality using regular expressions.
    Please do respond if anyone has any idea. Thanx
    Hamid

    public class StringSplit {
    public static void main(String args[]) throws Exception{
    new StringSplit().doit();
    public void doit() {
    String s3 = "Dear <TitleNo> ABC Letter Details";
    String[] temp = s3.split("<>");
    dump(temp);
    public void dump(String []s) {
    System.out.println("------------");
    for (int i = 0 ; i < s.length ; i++) {
    System.out.println(s);
    System.out.println("------------");
    Want to extract only string between <>
    for example to extract <TitleNo> only.
    any suggestions please ?

  • Regex or String methods

    Hi
    Im wondering how more experienced Java developers would approach this.
    I have a parser which receives Strings according to the irc-protocol.
    servername PRIVMSG #channel :Hello worldAlmost every message is defined by the second word in the String. So its easy to just do String.split(" ") ... check the messagetype and start working with the other elements. Of course things gets a bit out of hand with compareTo(), IndexOf(), Substring() ... and all the other String methods.
    How would u use regex for this if u had to? I see this as exercise ... slower code, more work ... doesnt matter and its a plus learning more about regex.
    Example ... the line above, how would u use regex to check the messagetype "privmsg" ... channel "#channel" and the messagepart after the ':' etc ...
    many thanks in advance

    I wouldn't use regex, but split indeed, since I'd
    have very easy access to each part of the message.
    Anyway, since you want to learn regex: why don't you
    grab the Pattern API and read and try a little
    yourself? Nothing teaches you better than finding out
    yourself.Well yes regexes are nice easy and clean. And a wevy usefull if you learn them cos it gives you unlimited power of string manipulation.
    But at a high cost.
    It is verry important to make the right choice (regex or string methods) becouse it will decide how good your code looks and work.
    If the pattern that need to be parsed is simple and cam be done using string methods (including string tokenizer) regex is not the way to go.
    Normally when handling simple text patterns like above the string methods will perform about 5 times faster than regexes.
    So my recomendation is.
    If you are doing this for learning do it both ways and practice both regexes and string methods. Becouse in the industry you have know the both well.
    If you are doing this for some sort of a project and performance is a significant quality factor you need to use string methods in this perticuler situation.
    Above pattern can easilly broaken down using a combination of substring, index of and string tokenizer.

  • Spliting a utf-16 string using jstl

    Hey guys, I've been trying to find the best posible method to detect a uft-16 character in a string and then treating it as one character, then reprinting it so that a new string i create has a maximum of 20 characters for example... here's what i have so far:
    <core:set var="str" value="${item2}"/>
                <core:set var="delim" value="&"/>                
                <core:set var="array" value="${fn:split(str, delim)}"/>          
                <div id="cam_name2">
                <core:forEach begin="0" end="15" var="token" items="${array}">
                    <core:choose>
                    <core:when test="${fn:startsWith(token, '#')}">
                        &<core:out value="${token}"/>
                    </core:when>
                    <core:otherwise>
                        <core:out value="${token}"/>
                    </core:otherwise>
                    </core:choose>
                </core:forEach>
                </div>For example lets say i have a string:
    &.#20018;hel lo&.#20018;one&.#20018;&.#20018;
    I want to split this up into a new array that contains:
    &#20018;
    h
    e
    l
    // This is a space that is considered a character
    l
    o
    &#20018;
    o
    n
    e
    &#20018;
    &#20018;
    This new array would be 12 items (which i would put all together and print out as one string). Is there a much more "efficient" way I can approach this?
    Message was edited by:
    homerpsu

    Write a bean or utility class which returns String#toCharArray().

  • How do I avoid this OData limitation?

    For the url:
    http://services.odata.org/Northwind/Northwind.svc/Employees?$expand=Territories,Orders,Orders/Order_Details&$top=5
    I'm getting:
    Microsoft.Data.OData.ODataException occurred
    Message=The maximum number of bytes allowed to be read from the stream has been exceeded. After the last read operation, a total of 1049051 bytes has been read from the stream; however a maximum of 1048576 bytes is allowed.
    Source=Microsoft.Data.OData
    StackTrace:
    at Microsoft.Data.OData.MessageStreamWrapper.MessageStreamWrappingStream.IncreaseTotalBytesRead(Int32 bytesRead)
    at Microsoft.Data.OData.MessageStreamWrapper.MessageStreamWrappingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
    at Microsoft.Data.OData.BufferingReadStream.Read(Byte[] userBuffer, Int32 offset, Int32 count)
    at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
    at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
    at System.Xml.XmlTextReaderImpl.ReadData()
    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    at System.Xml.XmlTextReaderImpl.ParseElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at Microsoft.Data.OData.Atom.BufferingXmlReader.ReadInternal(Boolean ignoreInStreamErrors)
    at Microsoft.Data.OData.Atom.BufferingXmlReader.ReadNextAndCheckForInStreamError()
    at Microsoft.Data.OData.Atom.BufferingXmlReader.ReadInternal(Boolean ignoreInStreamErrors)
    at Microsoft.Data.OData.Atom.BufferingXmlReader.Read()
    at System.Xml.XmlReader.SkipSubtree()
    at System.Xml.XmlReader.Skip()
    at Microsoft.Data.OData.Atom.ODataAtomEntryAndFeedDeserializer.FindTypeName()
    at Microsoft.Data.OData.Atom.ODataAtomReader.ReadEntryStart()
    at Microsoft.Data.OData.Atom.ODataAtomReader.ReadAtEntryEndImplementation()
    at Microsoft.Data.OData.ODataReaderCore.ReadImplementation()
    at Microsoft.Data.OData.ODataReaderCore.ReadSynchronously()
    at Microsoft.Data.OData.ODataReaderCore.InterceptException[T](Func`1 action)
    at Microsoft.Data.OData.ODataReaderCore.Read()
    at WindwardReportsDrivers.net.windward.datasource.odata.ODataUtilities.ReadEntryList(String uri, WrCredentials credentials, CONNECT_MODE protocol, IEdmModel model, ODataVersion oDataVersion)
    InnerException:
    Any ideas how to get this data?
    thanks - dave
    Who will win
    The International Collegiate Programming Championships?

    No - this limit is meant to guard the client from malicious servers. It is possible to send valid OData feed which will consume lot of memory to parse. This can be done on the XML level or on the OData level. This limit guards against both.
    Servers have other ways to limit amount of data returned to the client, the reason there is to guard against expensive query execution
    In general a good way to look at OData is to think about it as the "minimum necessary protocol" to do what is needed. We try to keep it that way anyway. It's also stateless (REST...). So the more coupling between client and server, the worse... so to say.
    I can imagine having an HTTP header for this purpose, but I don't think that lot of clients would be interested in it.
    I think you should approach this limit from the security point of view (that's what it's for). Set it to the maximum amount of memory you're willing to give up to process the response. At least roughly (the memory consumption should be linear to the size
    of the input, cases where it's not are guarded by the other options on the MessageQuotas).
    Thanks,
    Vitek Karas [MSFT]

Maybe you are looking for