rotation

How can I get log4j to delete old rotating log files?

柔情痞子 提交于 2020-01-09 04:15:07
问题 How can I get log4j to delete old rotating log files? I know I can set up automated jobs (cron for UNIX and scheduled task for Windows), but I want it cross platform, and I want it in our application's log configuration as a part of our application, rather than in separate code outside in OS specific scripting languages. Our application is not written in OS scripting languages, and I don't want to do this part of it in them. 回答1: RollingFileAppender does this. You just need to set

How can I get log4j to delete old rotating log files?

拥有回忆 提交于 2020-01-09 04:14:08
问题 How can I get log4j to delete old rotating log files? I know I can set up automated jobs (cron for UNIX and scheduled task for Windows), but I want it cross platform, and I want it in our application's log configuration as a part of our application, rather than in separate code outside in OS specific scripting languages. Our application is not written in OS scripting languages, and I don't want to do this part of it in them. 回答1: RollingFileAppender does this. You just need to set

CSS rotate property in IE

五迷三道 提交于 2020-01-08 09:32:28
问题 I want to rotate the DIV to a certain degree. In FF it functions but in IE I am facing a problem. For example in the following style I can set rotation=1 to 4 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); This means that the DIV will be rotated to 90 or 180 or 270 or 360 degree. But if I need to rotate the DIV only 20 degrees, then it doesn't work anymore. How may I solve this problem in IE? 回答1: To rotate by 45 degrees in IE, you need the following code in your stylesheet

draw square and rotate it?

こ雲淡風輕ζ 提交于 2020-01-07 09:50:13
问题 how come this doesn't work? does rotate only work with images? context.moveTo(60,60); context.lineTo(200,60); context.lineTo(200,200); context.lineTo(60,200); context.lineTo(60,60); context.stroke(); context.rotate(45 * Math.PI / 180); context.restore(); 回答1: You are rotating the whole canvas when you use context.rotate , and since the pivot point is defaulted at the coordinates (0, 0), your square sometimes will be drawn out of bounds. By moving the pivot point to the middle of the square,

Switch chirality of a quaternion in code?

限于喜欢 提交于 2020-01-07 06:44:32
问题 I have quaternion data that I am trying to switch from a right-handed Y-up coordinate space, to a left-handed Z-up coordinate space. From reading up on this, what I need to do is switch the chirality . The only info i can find is this And i cannot wrap my head around it. Say that I have my Quaternion as: public static float[] quat= new float[4](0.70711,0.70711,0,0); In c# code, how do i switch the chirality? I have tried negating the axis, and simply swapping the Z and Y values. I have tried

Rotating a NSString in drawRect

半腔热情 提交于 2020-01-07 01:59:56
问题 I want to rotate my NSString that's at a set location so that it reads from bottom to up. I know the issue lies in the CGContextTranslateCTM, but I'm not sure how to fix it. If I comment this line, I see my text where I want it, just not rotated. This must be moving my NSString to where it is not visible. Thoughts? Here's what I have tried: NSString * xString = [NSString stringWithFormat:@"%@", self.xStringValue]; CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(), [[UIColor

Rotating a NSString in drawRect

可紊 提交于 2020-01-07 01:59:27
问题 I want to rotate my NSString that's at a set location so that it reads from bottom to up. I know the issue lies in the CGContextTranslateCTM, but I'm not sure how to fix it. If I comment this line, I see my text where I want it, just not rotated. This must be moving my NSString to where it is not visible. Thoughts? Here's what I have tried: NSString * xString = [NSString stringWithFormat:@"%@", self.xStringValue]; CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(), [[UIColor

Rotate 3D vectors on 2D plane

南笙酒味 提交于 2020-01-06 23:50:10
问题 I have two Vec3s, Camera Forward and Turret Forward. Both of these vectors are on different planes where Camera Forward is based on a free-look camera and Turret Forward is determined by the tank it sits on, the terrain the tank is on, etc. Turret Up and Camera Up are rarely ever going to match. My issue is as follows: I want the turret to be able to rotate using a fixed velocity (44 degrees per second) so that it always converges with the direction that the camera is pointed. If the tank is

Hide a face of a 3D shape behind another,Android canvas?

怎甘沉沦 提交于 2020-01-06 20:00:43
问题 Suppose that I have to draw two faces of a 3D shape in a canvas.In OpenGL,we use clockwise and non clockwise ordering of vertices to detect what face is front face and what is behind face,but I can not use OpenGL and I would to use canvas.It seems that if we draw behind face and then draw front face,it hides behind face,but my 3D shape rotates and each face some times must be front and some times must be behind. My question is : When shape is rotating,how I can detect witch face is front?Or

How to prevent automatic re-centering when scene is loaded on Gear VR?

混江龙づ霸主 提交于 2020-01-06 15:50:55
问题 I'm using Unity 5 and OVR utilities, I'd like to avoid the scene being recentered every time I load a new scene. Basically, I'd like the player to be able to sit down and even if he's looking at his right at the moment of a new scene loading, I'd like him to be able to continue playing without having to use some manual recentering or having to change his sitting position. I've found 2 other posts with the same question but only for other VR platforms and they didn't solve my problem: Persist