我正在考虑编写一个执行以下操作的API:
{ name: “Quotes”, attributes: [“quote”, “author"] }){ quote: "...", author: "..." })我会像这样构建查询:
// return the name and id of all the user's maps
maps(authToken="…") {
name,
id
}
// return all the items of a single map
maps(authToken="…") {
map(name=“Quotes") {
items
}
}
// OR by using the map_id
maps(authToken="…") {
map(id=“…") {
items
}
}
Run Code Online (Sandbox Code Playgroud)
所以,我的问题是,这是正确的还是我需要以不同的方式构建它?
现在我得到了:
@directories = collection.directories.all.asc(:name)
Run Code Online (Sandbox Code Playgroud)
但它区分大小写,我如何进行不区分大小写的排序?
所以,是的,我开始接受这个测试!
但我不知道该用什么= /
Rspec + Shoulda?
Rspec +牛排?
MINITEST?
黄瓜?
水豚?
本应该?(与Shoulda混合的黄瓜)
Mini_shoulda?(使用Shoulda混合的最小)
唉,这么多选择!我很困惑<.<我知道我想要一些小而简单的东西来测试我未来的宝石和sinatra&rails应用程序.你们用什么人,为什么?
我基本上需要加载整个XML文件,添加一个包含内容的新行,然后保存它.但我想知道哪一个更快.. XMLWriter还是SimpleXML?哦,而且,它主要是大型XML文件,超过10MB.
谢谢!
目标:
我想找出哪个顶点/顶点最接近我点击的点.
建立:
代码我已经有了点击处理程序:
mouse = new THREE.Vector2();
mouse.x = (event.clientX / renderer.domElement.clientWidth) * 2 - 1;
mouse.y = - (event.clientY / renderer.domElement.clientHeight) * 2 + 1;
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObject(icosahedron);
// 3D point: intersects[0].point
// Object face: intersects[0].face
Run Code Online (Sandbox Code Playgroud)
谢谢!