CGPoint旋转改变距离原点的距离(CGPoint rotation changes distance from origin)
我想围绕另一个CGPoint(蓝色矩形)旋转一个CGPoint(红色矩形),但它改变距离原点的距离(蓝色矩形)...当我给出270°的角度时,它会在原点上方创建点,但是当我给出90时作为角度值它降低了原点但是改变距离几乎是原来的三倍....我想保持距离相同并且想要围绕另一个旋转CGPoint。 请指导任何旋转cgpoints的方法......
distance = 100; angle = 270*M_PI/180; rotatedPoint.x = initialPoint.x+distance*cos(angle); rotatedPoint.y = initialPoint.y+distance*sin(angle); //rotatedPoint.x = initialPoint.x+tan(angle); [test setCenter:rotatedPoint]; [test setBackgroundColor:[UIColor redColor]];
谢谢
I want to rotate a CGPoint(red rect) around another CGPoint(blue rect) but it changes distance from the origin(blue rect)...when i give 270 in angle it creates the point right above the origin but when i give 90 as angle value it comes down the origin BUT CHANGES THE DISTANCE ALSO almost three times more....I want to keep the distance same and want to rotate CGPoint around another. Please guide any approach for rotation of cgpoints...
distance = 100; angle = 270*M_PI/180; rotatedPoint.x = initialPoint.x+distance*cos(angle); rotatedPoint.y = initialPoint.y+distance*sin(angle); //rotatedPoint.x = initialPoint.x+tan(angle); [test setCenter:rotatedPoint]; [test setBackgroundColor:[UIColor redColor]];
Thanks
原文:https://stackoverflow.com/questions/10661030
最满意答案
在服务器配置XML中,在服务器标签内添加
<security> <ldap uri="ldap://DOMAIN_CONTROLLER_URL" managerDn="CN=USER_THAT_CAN_LOGIN,OU=GROUP,DC=example,DC=com" managerPassword="PASSWORD" searchBase="OU=GROUP,DC=example,DC=com" searchFilter="(sAMAccountName={0})" /> </security
最重要的部分是searchFilter =“(sAMAccountName = {0})” 。
managerDn是可以搜索其他用户的用户
OU是用户所属的组
DC是域
In the server config XML, within the server tag, add
<security> <ldap uri="ldap://DOMAIN_CONTROLLER_URL" managerDn="CN=USER_THAT_CAN_LOGIN,OU=GROUP,DC=example,DC=com" managerPassword="PASSWORD" searchBase="OU=GROUP,DC=example,DC=com" searchFilter="(sAMAccountName={0})" /> </security
The most important part is the searchFilter="(sAMAccountName={0})" .
The managerDn is the user that can search for other users
The OU is the group that user belongs to
The DC is the domain
相关问答
更多-
Cruise vs. TeamCity与CruiseControl.net [关闭](Cruise versus TeamCity versus CruiseControl.net [closed])[2022-05-21]
我们在我们公司使用TeamCity,我们对此非常满意。 配置简单,界面简洁,管理简单。 此外,VS-Addin非常舒适。 只有'成功构建后自动提交'才能正常工作。 我也使用CC.Net,但我错过了 - 简单的配置 - 身份验证 - 清洁用户界面 也许atlassians'Bamboo'是另一个可能的CI-Server。 一探究竟。 We use TeamCity in our company and we are very satisfied with it. It's easy to configure, ... -
最后,我通过下载go服务器的zip来运行手动安装,然后我使用HTTP和HTTPS运行服务器而无需任何额外的努力。 这个答案将是有用的是安装有Windows安装程序的问题。 使用拉链。 谢谢。 普利文 Finally I run the manual installation by downloading the zip for the go server and then I got the server running with both HTTP and HTTPS without any additi ...
-
尝试等待元素可点击 ,然后单击它。 您可以使用以下代码: //Wait for 20 seconds to detect that the element is clickable, and then clicking on it try{ WebDriverWait wait = new WebDriverWait(driver, 20); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By. ...
-
Cruise Control .net:使用包并显示NUnit结果(Cruise Control .net: Using packages and showing NUnit results)[2021-12-09]
最好的方法是直接从您的Cruise Control中调用Nunit:C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe D:\Compil\src\net-3.5\MyProject\trunk MyProject.sln ... -
Thoughtworks Cruise(Thoughtworks Cruise)[2022-08-29]
在服务器配置XML中,在服务器标签内添加曾经有一个用于巡航控制网的插件。 来自codeplex的TFS插件 但是,代码在几年内没有更新,而较新版本的cc.net使用不同版本的NetReflector.dll。 为了实现这一点,您需要: - 从codeplex上的 source下载tfs for cc.net插件源代码 - 在VS 2008中打开解决方案 - 删除解决方案中的NetReflector.dll。 - 从cc.net服务器路径IE添加NetReflector.dll:C:\ Program Files \ CruiseControl.N ...找不到类'com.thoughtworks.xstream.XStream'(Could not find class 'com.thoughtworks.xstream.XStream')[2022-04-17]
该项目由某人完成,并提供给我进一步实施。 所以,经过这么多头疼,我发现该项目包含Android私有库,其中包含XStream jar文件。 你可以看到下图 我通过检查订单和导出中的Android私有库来解决此问题。 这个链接帮助我解决了这个问题。 希望它节省一些时间.... This project is done by somebody and given to me for further implementation. So, After so much headache, i find that t ...尽管networks.selenium是最初的Selenium(又名Selenium 1,或Selenium-RC)。 openqa.selenium是Selenium 2又名Selenium WebDriver。 thoughtworks.selenium is the original Selenium (aka Selenium 1, or Selenium-RC). openqa.selenium is Selenium 2 aka Selenium WebDriver.我只是将服务器URL存储在一个变量中。 如果有多个,则数组可能很有用。 您可以将它们存储在一个文件中( YAML格式很流行)。 你想解决的问题是什么? 网址正在发生很大变化? I store server URLs simply in a variable. If there are more than one, array could be useful. You can store them in a file (YAML format is popular). What is the problem ...这只是第一次猜测,但元素中的配置可能会被破坏。 尝试这个: E:\DevTools\nant\bin\NAnt.exe E:\Builds\buildingsolution\WebForm.build NAnt.Core.XmlLogger 300 ... 相关文章
更多- 微信lbs---返回两个经纬度坐标点的距离
- solr实现满足指定距离范围条件的搜索
- (转载)solr实现满足指定距离范围条件的搜索
- mysql 查询距离当前6个月、本周、上周、当天、本月、上月语句
- solr:关于spell的优化效果
- Diffusion Particle Resolver
- 7 个免费的 jQuery 图片 360 度旋转插件
- 操作标签-git入门教程
- 7个改变世界的Java项目
- 7个改变世界的Java项目
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)