Jump to content

newcoder1010

Members
  • Posts

    526
  • Joined

  • Last visited

Posts posted by newcoder1010

  1. Hello, 

    <div class="views-field views-field-title"><span class="field-content"><a href="/minus cost" hreflang="en">minus cost</a></span></div>
    
    views-field views-field-title::nth-letter(5){
    color:red}

    How to style first 5 letters or the first word? Above css did not work for me. Thanks!

  2. Hello,

    My site does not have even and odd classes for rows in table. I am having problem giving odd and even classes. I like to know how I can style odd and even rows when <tr> do not have any classes?

    <table class="table">
    <thead>
    <tr>
    <th id="view-field-address1-table-column" class="views-field views-field-field-address1" scope="col">Address</th>
    <th id="view-field-f-table-column" class="views-field views-field-field-f" scope="col">First Name</th>
    </tr>
    </thead>
    <tbody>
    <tr><td headers="view-field-address1-table-column" class="views-field views-field-field-address1"> </td> <td headers="view-field-address1-table-column" class="views-field views-field-field-address1"> </td></tr>
    <tr><td headers="view-field-address1-table-column" class="views-field views-field-field-address1"> </td> <td headers="view-field-address1-table-column" class="views-field views-field-field-address1"> </td> </tr>
    </tbody>
    </table>

    Please advise!

  3. Hello,

    <div data-mediasize="992" class="responsive-menus responsive-menus-0-0-0 absolute responsified">
    <span class="toggler"></span>
    <ul class="responsive-menus-simple" id="rm-removed">
    <li class="first">
    <a href="/" data-drupal-link-system-path="<front>" class="is-active">Home</a>
    </li>
    <li>
    <a href="/about_us" data-drupal-link-system-path="node/6">About</a>
    </li>
    </ul>
    </div>
    .responsive-menus.responsified span.toggler {
        color: #ffffff;
    }

    I expected menu bars to be white. When I visit the site on laptop for mobile screen, I see the bars white as expected. However, andriod phone shows dark menu bars. Its been a long time I am dealing with the issue. How can I fix it?

    Please advise!

  4. Hello,

    HTML:

    <p class="text-center media"><a href="https://www.facebook.com">f</a>   <a href="https://www.twitter.com"> t</a></p>

    CSS:

    .media a {
        padding: 0;
        /* margin-bottom: 40px; */
        /* border-radius: 40px; */
        height: 40px;
        width: 40px;
        color: white;
        font-size: 20px;
        padding: 10px;
        background: blue;
        line-height: 40px;
    }
    
    a:hover{background:red;}

    I like to circle anchor text with blue background. On hover, I like to have red background. Instead of circle, I am getting rectangle background.

    Please advise!

  5. HTML:

    <section data-quickedit-entity-id="block_content/43" id="block-acquisitionpractices" class="col-lg-6 col-md-6 col-sm-6 col-xs-12>
    <div> one </div>
    <div> two </div>
    <div> three </div>
    </section>
    
    <section data-quickedit-entity-id="block_content/43" id="block-acquisitionpractices" class="col-lg-6 col-md-6 col-sm-6 col-xs-12>
    <div> one </div>
    <div> two </div>
    <div> three </div>
    <div> four </div>
    
    </section>
    
    <section data-quickedit-entity-id="block_content/43" id="block-acquisitionpractices" class="col-lg-6 col-md-6 col-sm-6 col-xs-12>
    <div> one </div>
    <div> two </div>
    
    </section>
    
    <section data-quickedit-entity-id="block_content/43" id="block-acquisitionpractices" class="col-lg-6 col-md-6 col-sm-6 col-xs-12>
    <div> one </div>
    <div> two </div>
    <div> three </div>
    <div> one </div>
    <div> two </div>
    <div> three </div>
    </section>

    As you can see, different blocks have different sizes of strings. However, I like to set the height equal. Height:650px works but some devices do not fit the contents, some devices show too much padding in the bottom, etc. What would be the best way to set the height equal(html plus css)  in all devices when blocks may not have equal number of characters?

     

    Thanks!

  6. Hello,

    HTML:

    <div class="text-inner text-left text-white">
                      
    <h1>MULTI-FAMILY</h1>
    <h1>REAL ESTATE INVESTMENTS</h1>
    <p><span style="font-size: 140%;">x x x x x  x x.</span></p>
    <a href="http://examplesite.com/" target="_self" class="button secondary">
        <span>xxx With us</span>
      </a>
    
    <a href="http://examplesite.com/" target="_self" class="button white is-outline">
        <span>xxx Portal</span>
      </a>
    
                  </div>

    CSS:

    .text-white {
        color: #ffffff;
        background: #0808f3;
        opacity: .5;
    }

    Opacity now applied to the texts as well. I only like to apply opacity to background class only. How can I do it?

    Thanks!

  7. Hello,

    I am practicing java from this link. 

    https://www.w3schools.com/java/java_strings.asp

    JAVA

            String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            System.out.println("The length of the txt string is: " + txt.length());
    Quote

    Type mismatch: cannot convert from java.lang.String to DataTypesCasting.String

    Fixed it using the suggested fix:

            java.lang.String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    Can you please tell me why I had to replace String by   java.lang.String? 

    Thanks!

  8. Hello,

    I am just playing around with the Java abstraction. 

    I did follow the steps in this link and I am able to understand what it is doing. But I am not able to understand the concept of "Data abstraction is the process of hiding certain details and showing only essential information to the user.
    "

    If you could provide me a real example of how does abstraction hide certain details of an object, it would be helpful. 

    Thanks!

     

  9. Hello,

    I am trying to do a task. I have a list of people’s names “John”,”Mike”,”Sam”. How can I remove all the names named “Mike”? Can you please help me?

    I am getting few errors in the below code:

    package QA1;
    
    import java.awt.List;
    import java.util.ArrayList;
    import java.util.Scanner;
    
    public class JavaRemoveNameArray {
    	String[] myStrArray = {"John","Mike","Sam"};
    	
    	System.out.println("Before: "+Arrays.toString(myStrArray));
    	
    	List<String> myList = new ArrayList<String>(Arrays.asList(myStrArray));
    	myList.remove("Mike");
    	
    	myStrArray = myList.toArray(new String[0]);
    	
    	System.out.println("After: "+Arrays.toString(myStrArray));
    }

    Thanks!

  10. Hi,

    "select *  from seleniumuser where firstname = 'John'";

    Returns 

    fitstname | email

    John John@aa.jj

    Works just fine.

    I like to have an IF statement to validate the first name. 

    ...
    //Query to Execute		
    String query = "select *  from seleniumuser where firstname = 'John'";	
    
    //Create Statement Object		
    Statement stmt = con1.createStatement();					
    
    // Execute the SQL Query. Store results in ResultSet		
    ResultSet rs= stmt.executeQuery(query);	
    
    // While Loop to iterate through all data and print results		
    while (rs.next()){
     		String myName = rs.getString("firstname");								        
            System. out.println(myName);		
                        
            if (myName == "John") {
               	System.out.println("Matched");
             } else {
               	System.out.println("Not matched");
             }
    ...
    }		
    		
    	

    Result I am getting:

    John

    Not matched.

    It should return "Matched" instead. Please advise!

×
×
  • Create New...