小编Vin*_*nod的帖子

如何自动调整所有手机/平板电脑显示格式的div大小?

我设计了一个页面,其中有四个div标签.如果我在手机上测试页面(5英寸),它完全适合页面,如果我在平板电脑上测试同一页面,页面适合30%的屏幕.那么如何设置div尺寸以使其适合所有类型的屏幕.

小提琴链接

HTML:

  <div class="bubble0" align="center">
     <h3>Three  Levels </h3> 
  </div>
  <div class="bubble"  align="center"> </div><br/><br/>
  <div class="bubble1" align="center"> </div><br/><br/>
  <div class="bubble2" align="center"> </div><br/><br/>
  <button>Play</button>
Run Code Online (Sandbox Code Playgroud)

请给我任何建议,

html css jquery-ui css3 jquery-mobile

20
推荐指数
4
解决办法
14万
查看次数

如何从手机间隙的纬度和经度获取城市名称?

我可以从当前的经纬度获得完整的地址.但是如何才能从完整地址获取城市名称.这是我的代码.

var geocoder;
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(latitude, longitude);
//alert("Else loop" + latlng);
geocoder.geocode({
    'latLng': latlng
}, function(results, status) {
    //alert("Else loop1");
    if (status == google.maps.GeocoderStatus.OK) {
        if (results[0]) {
            var add = results[0].formatted_address;
            alert("Full address is: " + add);
        } else {
            alert("address not found");
        }
    } else {
        //document.getElementById("location").innerHTML="Geocoder failed due to: " + status;
        //alert("Geocoder failed due to: " + status);
    }
});
Run Code Online (Sandbox Code Playgroud)

javascript android google-maps geolocation cordova

10
推荐指数
2
解决办法
4万
查看次数

如何在工具栏菜单中包含列表项?

我在ios手机上安装了工具栏.现在我想在"更多"工具栏下添加项目列表.如何在单击"更多"工具栏时包含列表.所以单击"更多"时,列表应该弹出.

我的工具栏事件代码如下,

var tabBar = cordova.require("cordova/plugin/iOSTabBar");
tabBar.init();
tabBar.create({selectedImageTintColorRgba: "255,40,0,255"});
tabBar.createItem("More", "More", "tabButton:More", {
onSelect: function() {
     // Here I want to add the list
 }
});
tabBar.createItem("About us", "About us", "/www/pixeden-tab-bar-icons-ios-7/line__0000s_0126_info.png", {
onSelect: function() {
      aboutus();
  }
 })

 tabBar.show();
  tabBar.showItems("About us", "More");
  window.addEventListener("resize", function() { tabBar.resize() }, false);
Run Code Online (Sandbox Code Playgroud)

我需要列出如下列表,

<ul>  
   <li class="newsfeed"><a href="#" title="Home">News Feed</a></li>  
   <li class="profile"><a href="#" title="Profile">Profile</a></li>  
   <li class="setting"><a href="#" title="Setting">Setting</a></li>  
   <li class="logout"><a href="#" title="Logout">Logout</a></li>  
   <li class="report"><a href="#" title="Report">Report Bug</a></li>  
</ul>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

javascript jquery jquery-ui toolbar jquery-mobile

9
推荐指数
1
解决办法
263
查看次数

在phonegap 3.5.0中缺少Cordova jar

在我使用phonegap 2.7.0之前.所以对于phonegap更新,我使用node.js安装了phonegap版本3.5.0,但在phonegap文件夹中没有cordova jar文件.如果我在ADT中创建项目,我该如何添加cordova.jar和cordova.js?我无法在phonegap文件夹中看到任何jar文件.即使我从命令提示符创建项目,我也没有在我创建的项目中看到任何phonegap jar文件和js文件.

任何人都可以帮助我如何使用phonegap 3.5.0创建和运行我的第一个项目?

android phonegap-plugins cordova

7
推荐指数
1
解决办法
1万
查看次数

在Spring Data JPA中没有找到类型存储库的限定bean以用于依赖

我花了很多时间在这上面!我的错!我无法解决这个问题.这是我使用spring MVC的第一个Spring Data JPA练习.在tomcat上部署.ear文件时,我收到以下错误.

更新日志

 Caused by: org.springframework.beans.factory.BeanCreationException: Could not au
    towire field: com.demo.controller.customerRepository com.demo.controller.HomeCon
    troller.repository; nested exception is org.springframework.beans.factory.NoSuch
    BeanDefinitionException: No qualifying bean of type [com.demo.controller.custome
    rRepository] found for dependency: expected at least 1 bean which qualifies as a
    utowire candidate for this dependency. Dependency annotations: {@org.springframe
    work.beans.factory.annotation.Autowired(required=true)}
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
    ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
    ava:561)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject
    (InjectionMetadata.java:88)
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
    ostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java
    :331)
            ... 68 more
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No q
    ualifying bean of type [com.demo.controller.customerRepository] found for depend
    ency: expected at least …
Run Code Online (Sandbox Code Playgroud)

spring jpa spring-mvc spring-data spring-data-jpa

7
推荐指数
1
解决办法
1万
查看次数

使用 MockMVC 的 JsonPath OR 条件

我正在练习 MockMVC 进行休息呼叫单元测试。我们如何测试布尔值以便结果是 true 还是 false 我需要通过测试,我尝试如下,

mockMvc.perform(get("/student/{Id}", 1L)).
.andExpect(status().isOk())
.andExpect(jsonPath("$.isPass", is(true  || false)));
Run Code Online (Sandbox Code Playgroud)

我还有包含 6 个值的列表,如何使用包含各种方法的列表,

.andExpect(jsonPath("$.subjectList", hasSize(5)))
.andExpect(jsonPath("$.subjectList.name", Matchers.contains("English", "Hindi", "France", "Tamil", "Bengali"))
Run Code Online (Sandbox Code Playgroud)

有什么建议请!!

junit spring jsonpath mockmvc spring-rest

7
推荐指数
1
解决办法
5341
查看次数

更改Google地图方向中的各个标记

我在Google Maps API中添加单个标记时遇到问题.我搜索了很多像以下链接,在谷歌地图方向api V3中更改个别标记.但我无法在我的代码上实现相同的功能.在suppressMarkers: true我的帮助下,我能够阻止默认标记.现在只显示根方向.现在我该如何为起点和终点添加制造商.以下是我的代码.

   function GoogleMap_selected(){

        var lattitude_value= document.getElementById('slectedLat').value;
        var longitude_value= document.getElementById('slectedLon').value;

        var from = new google.maps.LatLng(mylatitude, mylongitude);
        var to = new google.maps.LatLng(lattitude_value, longitude_value);

         var directionsService = new google.maps.DirectionsService();
         var directionsRequest = {
           origin: from,
           destination: to,
           travelMode: google.maps.DirectionsTravelMode.DRIVING,
           unitSystem: google.maps.UnitSystem.METRIC
         };

        this.initialize = function(){
        var map = showMap_selected();

         directionsService.route(
                  directionsRequest,
                  function(response, status)
                  {

                    if (status == google.maps.DirectionsStatus.OK)
                    {
                      new google.maps.DirectionsRenderer({
                        map: map,
                        directions: response,
                        suppressMarkers: true

                      });
                    }
                    else
                        {
                         alert("Unable to retrive route"); …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps google-maps-api-3 google-maps-markers

6
推荐指数
1
解决办法
1万
查看次数

如何在aui:select框中设置所选值

我的用户表单中有选择框的表单.我还需要在编辑模式下更新表单.我能够在编辑模式下获得选定的值.但我无法在编辑模式下设置所选值.

在这里,我可以从db中获取所选值.<%=user.getTitle() %>现在我如何在选择框中设置所选值.

<aui:select name="title">
    <aui:option label="Dr" value="dr" />
    <aui:option label="Mr" value="mr" />
    <aui:option label="Mrs" value="mrs" />
    <aui:option label="Ms" value="ms" />
</aui:select>
Run Code Online (Sandbox Code Playgroud)

示例I为此输入字段设置所选值,

<aui:input name="emailAddress" value=""></aui:input>
Run Code Online (Sandbox Code Playgroud)

有什么建议请!!

liferay liferay-6 liferay-theme alloy-ui liferay-aui

5
推荐指数
2
解决办法
1万
查看次数

问题与Jquery幻灯片显示格式?

我需要以下格式的侧面板,因为我使用了列表,但我没有得到require格式.我需要使用哪个标签来获取以下格式.另外我需要面板应该在标题下方打开,如下图所示,

我的代码如下,

<div data-role="panel" id="navpanel" data-display="reveal" data-position="left">
    <a href="#" class="ui-btn ui-shadow ui-btn-icon-left ui-custom-icon ui-about ui-nodisc-icon" onClick='test()'>test</a>
    <a href="#" class="ui-btn ui-shadow ui-btn-icon-left ui-custom-icon ui-privacy ui-nodisc-icon" onClick='test1()'>test1</a>
    <a href="#" class="ui-btn ui-shadow ui-btn-icon-left ui-custom-icon ui-reset ui-nodisc-icon" onClick='test2()'>test2</a>
    <a href="#" class="ui-btn ui-shadow ui-btn-icon-left ui-custom-icon ui-feedback ui-nodisc-icon" onClick='test3()'>tets3</a>
</div>

<a href="#navpanel" id="bars-button" data-role="button" data-icon="bars" data-iconpos="notext">Menu</a>
Run Code Online (Sandbox Code Playgroud)

css jquery jquery-ui css3 jquery-mobile

3
推荐指数
1
解决办法
361
查看次数

适用于Windows 7和Windows 8手机的Phonegap/Cordova SQLite插件?

我需要为我的应用程序安装SQLite插件.我的应用程序倾向于在Windows 7和Windows 8上运行.我尝试了许多插件,它们只支持Windows 8但不支持Windows 7手机.有没有支持Windows 7和8手机的SQLite插件?有什么建议请...

sqlite windows-phone-7 cordova windows-phone-8 cordova-plugins

3
推荐指数
1
解决办法
589
查看次数