首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏鸿蒙开发笔记

    OpenHarmony应用ArkUI 状态管理开发案例

    @Componentexport struct DetailPage { @State currentLocation: string = ''}在父组件DetailPage中声明当前定位currentLocation 变量Panel(this.isPanel) { Location({ isPanel: $isPanel, currentLocation: $currentLocation })}将currentLocation 变量传给子组件Location@Componentexport struct Location { @Link currentLocation: string}子组件用@Link装饰的currentLocation @Builder cityList(city: any) { if (this.currentLocation === city.name) { List() { ForEach(city.city 变量改变会同步父组件中的currentLocation

    41020编辑于 2025-05-08
  • 来自专栏黄啊码【CSDN同名】

    .substring error: “is not a function”

    var currentLocation = document.location, muzLoc = currentLocation.substring(0,45), 这时候如果执行,总是无法输出muzLoc ,因为本来这个语法就出错了,document.location是一个对象,把一个对象当作字符串肯定是出错的 应该先currentLocation.toString()然后再用截取字符串

    1K00发布于 2020-05-31
  • 来自专栏千里行走

    skywalking-2:skywalking3.2.6性能压测与测试报告(历史总结)

    对应产生100万个/lbs/currentLocation/{userId} ,和100万个com.xxx.lbs.service.LBSService.currentLocation(long) 。 这个链路很简单:/lbs/currentLocation/{userId} -> com.xxx.lbs.service.LBSService.currentLocation(long) (*3).springboot 这个链路很简单:/lbs/currentLocation/{userId} -> com.xxx.lbs.service.LBSService.currentLocation(long) (*3).springboot 链路日志记录率ab结果skywalking-collector结果 /lbs/currentLocation/{userId}记录数 /lbs/currentLocation/{userId}记录率com.xxx.lbs.service.LBSService.currentLocation (long) 记录数 com.xxx.lbs.service.LBSService.currentLocation(long) 记录率ab qpsskywalking-collector qps (*4

    4K10发布于 2020-07-31
  • 来自专栏iOSDevLog

    ARKit和CoreLocation:第三部分

    Foundation import CoreLocation protocol LocationServiceDelegate: class { func trackingLocation(for currentLocation CLLocationManagerDelegate { var locationManager: CLLocationManager var delegate: LocationServiceDelegate var currentLocation locationManagerDidUpdateLocation(self, location: location) } currentLocation = manager.location updateLocationDidFailWithError(error: error as NSError) } func updateLocation(currentLocation CLLocation) { guard let delegate = delegate else { return } delegate.trackingLocation(for: currentLocation

    1.4K20发布于 2018-09-20
  • 来自专栏青玉伏案

    Objective-C中小怪兽的逻辑

    defense;   1.为了小怪兽的移动打基础,必须有个方法能够更新位置,也就是实现如果小怪兽要移动,那么必须有新的坐标产生,这个新的坐标就是小怪兽要移动的位置,移动时把原有的坐标更新成现在小怪兽在的地方,而currentLocation - (void) setCurrentLocation:(Location *)vCurrentLocation 3 { 4 //位置更新 5 originalLocation = currentLocation ; 6 currentLocation = vCurrentLocation; 7 }   2.小怪兽类要想快速的复制更多的小怪兽,必须得有便利初始化方法和便利构造函数,代码如下 1 //便利初始化方法 getLocationX]; 10 int oY = [originalLocation getLocationY]; 11 12 //获取现在的位置 13 int cX = [currentLocation getLocationX]; 14 int cY = [currentLocation getLocationY]; 15 16 //获取现在位置的坐标 17 NSLog

    80460发布于 2018-01-12
  • 纯前端实现:JavaScript通过IP地址获取用户精确位置(含完整代码)

    在地图上标记位置 updateMap(currentLocation.latitude, currentLocation.longitude); , 网络提供商: currentLocation.isp, 国家: currentLocation.country, 省份: currentLocation.region, 城市: currentLocation.city, 邮政编码: currentLocation.postal , 纬度: currentLocation.latitude, 经度: currentLocation.longitude, 时区: currentLocation.timezone, 货币: currentLocation.currency, 详细地址: currentLocation.detailedAddress

    1.9K30编辑于 2026-01-05
  • 来自专栏全栈程序员必看

    跟我学在高德地图——标注我的位置

    DialogFragment { public static final String KEY_MSG = "location msg"; private AMapLocation currentLocation Required empty public constructor } public static ShowLocationFragment newInstance(AMapLocation currentLocation new ShowLocationFragment(); Bundle args = new Bundle(); args.putParcelable(KEY_MSG,currentLocation = null) { currentLocation =getArguments().getParcelable(KEY_MSG); } } @Override ()+"\n" +currentLocation.getAddress()+"\n" +"当前经纬度: "+currentLocation.getLatitude()+"

    1.7K10编辑于 2022-08-25
  • 来自专栏移动开发面面观

    iOS学习笔记——LBS

    CLLocation *> *)locations{ printf("定位成功"); [_locationManager stopUpdatingLocation]; CLLocation *currentLocation lastObject]; CLGeocoder *geoCoder = [[CLGeocoder alloc]init]; //当前的经纬度 NSLog(@"当前的经纬度 %f,%f",currentLocation.coordinate.latitude ,currentLocation.coordinate.longitude); //这里的代码是为了判断didUpdateLocations调用了几次 有可能会出现多次调用 为了避免不必要的麻烦 在这里加个if判断 如果大于1.0就return NSTimeInterval locationAge = -[currentLocation.timestamp timeIntervalSinceNow 不再执行 return; } //地理反编码 可以根据坐标(经纬度)确定位置信息(街道 门牌等) [geoCoder reverseGeocodeLocation:currentLocation

    2.2K30发布于 2018-07-03
  • 来自专栏各类技术文章~

    构件flutter定位服务

    import 'package:location/location.dart'; ​ class LocationService { UserLocation _currentLocation; ​ UserLocation> getLocation() async { try { var userLocation = await location.getLocation(); _currentLocation on Exception catch (e) { print('Could not get location: ${e.toString()}'); } ​ return _currentLocation

    1.9K00发布于 2021-10-05
  • 来自专栏福大大架构师每日一题

    文心一言 VS 讯飞星火 VS chatgpt (217)-- 算法导论16.2 4题

    } // Gekko教授的水量 waterLimit := 2000 // 以毫升为单位,假设1公升=1000毫升 // 初始化Gekko教授的位置和剩余水量 currentLocation := "Fargo" remainingWater := waterLimit // 记录路线 route := []string{currentLocation} / / 开始规划路线 for remainingWater > 0 && currentLocation ! = "Williston" { // 假设Gekko教授在每个地点都需要补充水 if mapOfWaypoints[currentLocation].WaterAvailable { remainingWater -= mapOfWaypoints[currentLocation].Distance } // 如果水量不足以到达下一个地点

    34920编辑于 2024-03-18
  • 来自专栏鸿蒙开发笔记

    在HarmonyOS上使用ArkUI实现计步器应用

    CurrentSituation({ currentSteps:this.currentSteps, startPosition:this.startPosition, currentLocation :this.currentLocation})Row(){Button(this.isStart ? geoLocationManager.getAddressesFromLocation(reverseGeocodeRequest).then(data =>{if(data[0].placeName){this.currentLocation BackgroundUtil.stopContinuousTask(this.context);}else{if(this.stepGoal ===''||this.currentLocation ==

    55310编辑于 2024-06-30
  • 来自专栏个人路线

    Flutter 中获取地理位置[Flutter专题11]

    侦听器在用户位置发生变化时监听位置更新来获得连续回调,这是出租车应用程序、司机/骑手应用程序等的一个很好的用例: location.onLocationChanged.listen((LocationData currentLocation currentLocation; String address = ""; @override Widget build(BuildContext context) { return Scaffold mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ if (currentLocation = null) Text( "Location: ${currentLocation?. latitude}, ${currentLocation?.longitude}"), if (currentLocation !

    4.7K10发布于 2021-11-30
  • 来自专栏猿人谷

    iOS Programming – 触摸事件处理(2)

    (NSSet *)touches withEvent:(UIEvent *)event {     UITouch *touch = [touches anyObject];     CGPoint currentLocation  = [touch locationInView:self.view];     CGRect frame = self.view.frame;     frame.origin.x += currentLocation.x-originalLocation.x ;     frame.origin.y += currentLocation.y-originalLocation.y;       self.view.frame = frame; } 这里先在

    1.4K70发布于 2018-01-17
  • 来自专栏信数据得永生

    安卓应用安全指南 5.5.1 处理隐私数据 示例代码

    (); if (currentLocation ! = null) { String locationData = "Latitude:" + currentLocation.getLatitude() + ", (); if (currentLocation ! (); if (currentLocation ! (); if (currentLocation !

    2.5K20编辑于 2022-12-01
  • 来自专栏编程语言

    Swift 打开三方地图 腾讯地图、百度地图、高德地图、Apple 地图

    Double,destination:String) { let loc = CLLocationCoordinate2DMake(lat, lng) let currentLocation addressDictionary:nil)) toLocation.name = destination let boo = MKMapItem.openMaps(with: [currentLocation type=\(way)&from=&fromcoord=CurrentLocation&to=\(endAddress)&tocoord=\(lat),\(lng)&referer=腾讯需要申请APPkey

    4.2K20发布于 2020-09-11
  • 来自专栏全栈程序员必看

    touchesBegan:(NSSet*)touches withEvent:(UIEvent *)event使用

    withEvent:(UIEvent * ) event { UITouch * touch = [touches anyObject]; CGPoint currentLocation touch locationInView:self.view]; CGRect frame = self.view.frame; frame.origin.x += currentLocation.x – originalLocation.x; frame.origin.y += currentLocation.y – originalLocation.y;

    90220编辑于 2022-09-15
  • 来自专栏项勇

    笔记63 | 个人项目“易来”开发记录《一》

    返回正常的信息 JSONObject data = jsonObject.getJSONObject("result"); String currentLocation = data.getString("data"); JSONObject jsonObject1 = new JSONObject(currentLocation);

    73220发布于 2018-06-19
  • 来自专栏网络安全技术点滴分享

    Dexter恶意软件系统功能与架构分析

    TerminateProcess(hProcess,0); CloseHandle(hProcess); DeleteFileW(CurrentLocation LenInBytes; dwFilter = REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_LAST_SET; LenInBytes = lstrlenW(CurrentLocation =NULL) { RegSetValueExW(hKey[i],wUniq,0,REG_SZ,(const BYTE *)CurrentLocation,LenInBytes); =NULL) { RegSetValueExW(hKey[i],wUniq,0,REG_SZ,(const BYTE *)CurrentLocation,LenInBytes);

    29010编辑于 2025-06-16
  • 来自专栏TopFE

    CTT: CSDN文章迁移到头条自动化脚本

    hover{ color: #fff; background-color: #337ab7; border-color: #2e6da4; }` const currentLocation on('click', copyToTouTiao) // 设置文章数据 function setArticleData() { console.log(12) if (currentLocation

    62010编辑于 2022-01-24
  • 来自专栏乌龟哥哥默认学习专栏

    腾讯位置服务API接入教程详解

    drive 或 type=walk 或 type=bike from 否 起点名称 from=鼓楼 fromcoord 是 起点坐标,格式:lat,lng (纬度在前,经度在后,逗号分隔)功能参数值:CurrentLocation :使用定位点作为起点坐标 fromcoord=39.907380,116.388501fromcoord=CurrentLocation to 否 终点名称 to=奥林匹克森林公园 tocoord 是

    5.1K50发布于 2021-01-27
领券