分类 技术 下的文章

用Java实现Math的pow方法,具体实现如下: public double myPow(double x, int n) { if (x == 0 && n == 0) { throw new IllegalArgumentException(); } // 指数正负标记 boolean isNegative = false; // 求n的绝对值 if (n < 0) { n = -n...

阅读全部

关于谷歌地图实现地图路线规划的功能,具体实现代码如下:Html代码:<body onload="initMap()"> <div id="map_canvas" style="height:90%;top:30px"></div> </body>JS代码:<script language="javascript" type="text/javascript"> function initMap() { var initAddr = {lat: 31.230416, lng: 121.473701...

阅读全部

Google地图经纬度纠偏:通常在项目中,GPS经纬度不会直接使用,需要进行一些经纬度的纠偏才可以在对应的地图上使用。/** * gps纠偏算法,适用于google,高德体系的地图 * @author Administrator */ public class GpsCorrect { final static double pi = 3.14159265358979324; final static double a = 6378245.0; final static double ee = 0.0066934216229659432...

阅读全部

CSS3实现旋转,下面是CSS3实现 图片img、块元素div、字体font 等旋转特效的代码:.spinner{ -webkit-animation:spinner 2s infinite linear; animation: spinner 2s infinite linear; } @-webkit-keyframes spinner{ 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359...

阅读全部

Linux系统没有自带的压缩解压工具;需要我们自己安装;当用到zip或者unzip如果没有安装就会出现unzip: Command Not Found 或 zip: Command Not Found;出现这个是因为没有安装unzip和zip。1、yum安装:[root@WCUfJM105714 /]# yum install -y unzip zip2、apt-get安装:[root@WCUfJM105714 /]# apt-get install zip以上是两种安装unzip/zip的方式。下面是一些具体的实例操作命令演示:1、把/home目录下面的mydata目录压缩为mydat...

阅读全部

以前的一个老项目中的一个模块近期在拆分成为一个独立项目时,出现了java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 的问题。项目配置个人感觉没有什么问题。严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframewo...

阅读全部

在使用redis-cli停止Redis服务时,出现如下错误信息:[root@WCUfJM105714 bin]# redis-cli shutdown (error) NOAUTH Authentication required.检测6379端口后,看到端口还在监听[root@WCUfJM105714 bin]# netstat -lntp |grep 6379 tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      14505/./redis-serve解决办法:在redis-c...

阅读全部