找到并替换整个directoray问题的命令(find and replace command for whole directoray issue)
看到我有一个jig.c文件,我有这样的声明
mkvFree(jig);
现在我已经使用下面的命令来查找和替换
find /home/jeegar/jig.c -type f -exec sed -i 's/mkvFree(/mkvFree((void**)&/g' {} \;
通过这个命令我想得到输出
mkvFree((void**)&jig);
但我得到的输出像
mkvFree((void**)mkvFree(jig);
我的命令有什么问题?
编辑:
我从https://superuser.com/questions/324428/find-and-replace-command-for-whole-directory取得了这个命令
see i have one jig.c file in that i have statement like
mkvFree(jig);
Now i have used following command for find and replace
find /home/jeegar/jig.c -type f -exec sed -i 's/mkvFree(/mkvFree((void**)&/g' {} \;
By this command i want to get output as
mkvFree((void**)&jig);
But i get output like
mkvFree((void**)mkvFree(jig);
whats wrong with my command ?
Edit :
i have taken this command from https://superuser.com/questions/324428/find-and-replace-command-for-whole-directory
原文:https://stackoverflow.com/questions/7684947
最满意答案
组件的x和y值是相对于它的父级的。 Flex称之为内容坐标系; contentToGlobal应该为您提供所需的答案。
阅读定位组件,它解释了内容,本地和可查看的坐标:
http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_2.html
并阅读Flex坐标系:
http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html#254752
如果你有一个工作的例子,可能更容易给出一个具体的答案。
A component's x and y values are relative to it's parent. Flex calls this the content coordinate system; and the contentToGlobal should give you the answers you need.
Read up on positioning components, which explains the content, local, and viewable coordinates:
http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_2.html
And read up on the Flex coordinate system:
http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html#254752
If you had a working example it may be easier to give a specific answer.
相关问答
更多-
Python:重新加载使用'从X导入Y'导入的组件Y?(Python: reload component Y imported with 'from X import Y'?)[2022-05-13]
如果Y是一个模块(和X一个包) reload(Y)将会很好 - 否则,你会看到为什么好的Python风格指南(如我的雇主)说绝对不会导入任何东西, 除了一个模块(这是一个很多很大的原因 - 但是人们仍然直接继续进口功能和课程,无论我多么解释这不是一个好主意;-)。 If Y is a module (and X a package) reload(Y) will be fine -- otherwise, you'll see why good Python style guides (such as my ... -
使用X,Y和Z查找Y角(Finding Y angle using X, Y & Z)[2023-01-26]
假设,在你的CalcAngles方法中,x是偏航,y是俯仰: vec3_t CalcAngle(vec3_t src, vec3_t dst) { vec3_t angles; vec3_t delta = Subtract(dst, src); angles.x = -(float)std::atan2(delta.x, delta.y) / PI * 180.0f + 180.0f; //zero out the z to get the *horizontal* dis ... -
假设为了矛盾,存在一些x和一些y (mod 2 n ),使得 ~(x+y) == ~x + ~y 通过二号补码*,我们知道, -x == ~x + 1 <==> -1 == ~x + x 注意到这个结果,我们有, ~(x+y) == ~x + ~y <==> ~(x+y) + (x+y) == ~x + ~y + (x+y) <==> ~(x+y) + (x+y) == (~x + x) + (~y + y) <==> ~(x+y) + (x+y) == -1 + -1 ...
-
查找组件的x,y位置(Finding component's x,y location)[2023-11-04]
组件的x和y值是相对于它的父级的。 Flex称之为内容坐标系; contentToGlobal应该为您提供所需的答案。 阅读定位组件,它解释了内容,本地和可查看的坐标: http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_2.html 并阅读Flex坐标系: http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html#25 ... -
这是由启用自动布局引起的。 如果您不是特别关注使用自动布局,请禁用IB中的“使用自动布局”和“使用大小类”选项。 如果要继续使用自动布局,可以尝试添加缺少的约束。 可以通过IB中的“解决自动布局问题”按钮访问该选项 This is caused by Auto layout being enabled. If you are not particular about using Auto layout, then disable the 'Use Auto Layout' and 'Use size cla ...
-
在缩放视图上获取触摸位置的不同x和y坐标(Getting different x and y coordinates for touched location on a zoomed view)[2022-03-11]
好吧,我终于得到了我的错误。 我忘了这样一个事实:当我在一个图层上添加一个精灵然后引用它的位置时,它总是显示相同的点。 所以例如,如果我添加一个精灵并将其位置设置为100,100,然后平移或缩放图层并最终得到精灵的位置,我仍将得到100,100,即使精灵不在该范围内屏幕暂时。 因此,当我在平移或缩放图层后触摸精灵时,我触摸到不同的位置,而不是100,100。 这让我感到困惑。 为了处理这个问题,我只是从触摸位置的x,y中减去了图层位置的x,y。 通过这种方式,我可以得到两个点 - 精灵的位置和触摸的位置 - ... -
在一个列表中找到最接近的x,y位置到另一个列表中的x,y位置?(finding closest x,y position in one list to an x,y position in another?)[2023-11-14]
你错误地使用了zip ,因为它不会为你创建一个二维列表: >>> s_x = ([1.0,2.0,3.0]) >>> s_y = ([1.5,2.5,3.5]) >>> list1_broken = zip([s_x],[s_y]) >>> print list1_broken [([1.0, 2.0, 3.0], [1.5, 2.5, 3.5])] >>> list1 = zip(s_x,s_y) >>> print list1 [(1.0, 1.5), (2.0, 2.5), (3. ... -
沿x和y轴旋转(rotation along x and y axis)[2024-04-20]
Wahoo,让这个工作! 我用X旋转矩阵旋转了视图矩阵(由LookAt方法创建)。 我用Y旋转矩阵旋转了模型视图矩阵。 这是修改后的Update方法: - (void)update { PVRTVec3 vFrom, vTo, vUp; VERTTYPE fFOV; // We can get the camera position, target and field of view (fov) with GetCameraPos() fFOV = m_Sce ... -
这不是实现它的最佳方式,但它是一个解决方案...... 创建一个类扩展您的父视图组。 比较RelativeLayout或其他一些ViewGroups。 在覆盖onFinishInflate()中找到自己的视图。 覆盖onLayout()方法并在调用super onLayout()后手动布局自己的视图。 最后每次要刷新自己视图的位置时,只需调用requestLayout()即可。 这是以下示例... private AwesomeView mMyView; private int mYourDesiredX; ...
-
Geocoder确实提供了这样的范围: # venues within 10 miles of 'Omaha, NE, US' Offering.near('Omaha, NE, US', 10) # venues within 10 miles of [40.71, 100.23] Offering.near([40.71, 100.23], 10) 在这里 Geocoder does provide such kind of scopes: # venues within 10 mi ...