我设计了一个页面,其中有四个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)
请给我任何建议,
我可以从当前的经纬度获得完整的地址.但是如何才能从完整地址获取城市名称.这是我的代码.
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) 我在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)

在我使用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创建和运行我的第一个项目?
我花了很多时间在这上面!我的错!我无法解决这个问题.这是我使用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) 我正在练习 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)
有什么建议请!!
我在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
我的用户表单中有选择框的表单.我还需要在编辑模式下更新表单.我能够在编辑模式下获得选定的值.但我无法在编辑模式下设置所选值.
在这里,我可以从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)
有什么建议请!!
我需要以下格式的侧面板,因为我使用了列表,但我没有得到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) 我需要为我的应用程序安装SQLite插件.我的应用程序倾向于在Windows 7和Windows 8上运行.我尝试了许多插件,它们只支持Windows 8但不支持Windows 7手机.有没有支持Windows 7和8手机的SQLite插件?有什么建议请...
sqlite windows-phone-7 cordova windows-phone-8 cordova-plugins
cordova ×3
javascript ×3
jquery-ui ×3
android ×2
css ×2
css3 ×2
google-maps ×2
jquery ×2
spring ×2
alloy-ui ×1
geolocation ×1
html ×1
jpa ×1
jsonpath ×1
junit ×1
liferay ×1
liferay-6 ×1
liferay-aui ×1
mockmvc ×1
spring-data ×1
spring-mvc ×1
spring-rest ×1
sqlite ×1
toolbar ×1