Daily Archives

Articles indexed Wednesday April 4 2012

Page 12/19 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • CSS Style Element if it does not contain another specific type of Element [migrated]

    - by Chris S
    My CSS includes the following: #mainbody a[href ^='http'] { background:transparent url('/images/icons/external.svg') no-repeat top right; padding-right: 12px; } This places an "external" icon next to links that start with "http" (all internal site links are relative). Works perfectly except if I link an Image, it also get this icon. For example: <a href='http://example.com'><img src='whatever.jpg'/></a> would also get the "external" icon next to the image. I can live with this if necessary, but would like to eliminate it. This must be implement in CSS (no JS); must not require any special IDs, Classes, styling in the html for the image or anchor around the image. Is this possible?

    Read the article

  • Fast pixelshader 2D raytracing

    - by heishe
    I'd like to do a simple 2D shadow calculation algorithm by rendering my environment into a texture, and then use raytracing to determine what pixels of the texture are not visible to the point light (simply handed to the shader as a vec2 position) . A simple brute force algorithm per pixel would looks like this: line_segment = line segment between current pixel of texture and light source For each pixel in the texture: { if pixel is not just empty space && pixel is on line_segment output = black else output = normal color of the pixel } This is, of course, probably not the fastest way to do it. Question is: What are faster ways to do it or what are some optimizations that can be applied to this technique?

    Read the article

  • I am looking to make a spaceship tilt as it corners but I cant get it to return

    - by bobthemac
    I am using the TL game engine I am not allowed to use a physics engine but I need to make the spaceship lean as it corners, I can make it lean but cannot make it return to its starting position. I have looked at implementing some kind of spring physics but I don't understand it. Here is my code so far if(myEngine->KeyHeld(Key_A)) { car->RotateY(carSteer * frameTime); if(carSteer >= -carMaxSteer) { carSteer -= carSteerIncrement; car->RotateLocalZ(-(carSteer * frameTime)); } } if(!myEngine->KeyHeld(Key_A)) { if(carSteer < 0) { carSteer = 0; } } if(myEngine->KeyHeld(Key_D)) { car->RotateY(carSteer * frameTime); if(carSteer <= carMaxSteer) { carSteer += carSteerIncrement; car->RotateLocalZ(-(carSteer * frameTime)); } } if(!myEngine->KeyHeld(Key_D)) { if(carSteer > 0) { carSteer = 0; } } All the functions I am calling are built into the engine and I did not write them. Any Help Would Be Appreciated Thanks.

    Read the article

  • Best way to get elapsed time in miliseconds in windows

    - by XaitormanX
    I'm trying to do it using two FILETIMEs, casting them to ULONGLONGs, substracting the ULONGLONGs, and dividing the result by 10000. But it's pretty slow, and I want to know if there is a better way to do it.I use c++ with visual studio 2008 express edition. This is what I'm using: FILETIME filetime,filetime2; GetSystemTimeAsFileTime(&filetime); Sleep(100); GetSystemTimeAsFileTime(&filetime2); ULONGLONG time1,time2; time1 = (((ULONGLONG) filetime.dwHighDateTime) << 32) + filetime.dwLowDateTime; time2 = (((ULONGLONG) filetime2.dwHighDateTime) << 32) + filetime2.dwLowDateTime; printf("ELAPSED TIME IN MS:%d",(int)((time2-time1)/10000));

    Read the article

  • How do I find the angle required to point to another object?

    - by Ginamin
    I am making an air combat game, where you can fly a ship in a 3D space. There is an opponent that flies around as well. When the opponent is not on screen, I want to display an arrow pointing in the direction the user should turn, as such: So, I took the camera location and the oppenent location and did this: double newDirection = atan2(activeCamera.location.y-ship_wrap.location.y, activeCamera.location.x-ship_wrap.location.x); After which, I get the position on the circumferance of a circle which surrounds my crosshairs, like such: trackingArrow.position = point((60*sin(angle)+240),60*cos(angle)+160); It all works fine, except it's the wrong angle! I assume my calculation for the new direction is incorrect. Can anyone help?

    Read the article

  • OpenGL 2D Depth Perception

    - by Stephen James
    I have a 2D RPG game written in Java using LWJGL. All works fine, but at the moment I'm having trouble deciding what the best way to do depth perception is. So , for example, if the player goes in front of the tree/enemy (lower than the objects y-coordinate) then show the player in front), if the player goes behind the tree/enemy (higher than the objects specific y-coordinate), then show the player behind the object. I have tried writing a block of code to deal with this, and it works quite well for the trees, but not for the enemies yet. Is there a simpler way of doing this in LWJGL that I'm missing?

    Read the article

  • JMonkeyEngine display a spatial in a Nifty GUI interface

    - by Yanick Rochon
    I want to display a spatial (or the rendering of a spatial/scene) in my HUD interface. I'm really not sure how to go with this. I have search the documentation, but all the queries I search yields no result, and all I could find about images is that one can specify one with the setBackgroundImage method in the builder and setImage from the ImageRenderer class. The latter takes a String or a NiftyImage, but I'm not sure how to create one without loading an image file. Any help to understand this (if even possible) is appreciated. Thanks!

    Read the article

  • XNA - Error while rendering a texture to a 2D render target via SpriteBatch

    - by Jared B
    I've got this simple code that uses SpriteBatch to draw a texture onto a RenderTarget2D: private void drawScene(GameTime g) { GraphicsDevice.Clear(skyColor); GraphicsDevice.SetRenderTarget(targetScene); drawSunAndMoon(); effect.Fog = true; GraphicsDevice.SetVertexBuffer(line); effect.MainEffect.CurrentTechnique.Passes[0].Apply(); GraphicsDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2); GraphicsDevice.SetRenderTarget(null); SceneTexture = targetScene; } private void drawPostProcessing(GameTime g) { effect.SceneTexture = SceneTexture; GraphicsDevice.SetRenderTarget(targetBloom); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Opaque, null, null, null); { if (Bloom) effect.BlurEffect.CurrentTechnique.Passes[0].Apply(); spriteBatch.Draw( targetScene, new Rectangle(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height), Color.White); } spriteBatch.End(); BloomTexture = targetBloom; GraphicsDevice.SetRenderTarget(null); } Both methods are called from my Draw(GameTime gameTime) function. First drawScene is called, then drawPostProcessing is called. The thing is, when I run this code I get an error on the spriteBatch.Draw call: The render target must not be set on the device when it is used as a texture. I already found the solution, which is to draw the actual render target (targetScene) to the texture so it doesn't create a reference to the loaded render target. However, to my knowledge, the only way of doing this is to write: GraphicsDevice.SetRenderTarget(outputTarget) SpriteBatch.Draw(inputTarget, ...) GraphicsDevice.SetRenderTarget(null) Which encounters the same exact problem I'm having right now. So, the question I'm asking is: how would I render inputTarget to outputTarget without reference issues?

    Read the article

  • Import 3ds into JMonkeyEngine 3

    - by Yanick Rochon
    I have asked this question on SO, but I think it will be more suitable here. Basically, we are trying to import an animated character body (with skeleton) from 3D Studio Max to JMonkeyEngine 3, but while we succeeded at importing some animations, we cannot seem to export the skeleton to .skeleton.xml using OgreXML format. Since OgreXML seems to be the favored way to import models into JME, we dropped .obj files and such. Any help appreciated.

    Read the article

  • Camera Collision inside the room model

    - by sanddy
    I am having a problem in Calculating the camera collision for my Room model which consists of sofa, tables and other models. The users shall be moving the camera front, back, rotating so i need to make sure that the camera does not collide with any of the models with in the room. I have treated all my models inside the room by BoundingBox[] and the camera by BoundingSphere. So, far i have implemented collision by looking into the tutorial from http://www.toymaker.info/Games/XNA/html/xna_model_collisions.html which was great. But, I guess the problem lies in the Transformation part. I debugged and found some points to be at Vector(-XXX,-XXX,-XXX) where X is digit. Also i found my radius of some models where too large(in thousand, i just looked into its radius value before converting to BoundingBox). Do I need to scale the model for collision??? Below are my code:- On My LoadContent(): Matrix[] transforms = new Matrix[myModel.Bones.Count]; myModel.CopyAbsoluteBoneTransformsTo(transforms); int index = 0; box = new List<BoundingBox>(); BoundingBox worldModel = Utility.CalculateBoundingBox(myModel); foreach (ModelMesh mesh in myModel.Meshes) { Vector3[] obb = new Vector3[8]; worldModel.GetCorners(obb); Vector3[] asdf = (Vector3[])obb.Clone(); Vector3.Transform(obb, ref transforms[mesh.ParentBone.Index], obb); BoundingBox worldBox = BoundingBox.CreateFromPoints(obb); box.Add(worldBox); index++; } On CameraPosition Update: BoundingSphere bs = new BoundingSphere(this.cameraPos, 5.0f); if (RoomWalkthrough.Utility.CheckCollision(bs, bb)) { // Do Something } Please Help.

    Read the article

  • Slick2D, Nifty GUI listeners problem

    - by Patokun
    I'm trying to get Nifty GUI to work with Slick2D. So far everything is going great, except that I can't seem to figure out how to properly interact with the GUI. I'm trying the example in the nifty manual http://sourceforge.n....0.pdf/download but it doesn't seem to entirely work. The Element controller is being called for bind(...), init(...) and onStartScreen() as it should, as I can see their println output, but the next() method isn't being called when I click on the GUI element that I assigned the controller to, nor the screen controller as no output from println is shown. What's weird is, that the player is moving, so the mouse input is working. It's supposed to be called when I click the mouse button on it from the in the XML. Here is my code: My Element controller: public class ElementController implements Controller { private Element element; @Override public void bind(Nifty nifty, Screen screen, Element element, Properties parameter, Attributes controlDefinitionAttributes) { this.element = element; System.out.println("bind() called for element: " + element); } @Override public void init(Properties parameter, Attributes controlDefinitionAttributes) { System.out.println("init() called for element: " + element); } @Override public void onStartScreen() { System.out.println("onStartScreen() alled for element: " + element); } @Override public void onFocus(boolean getFocus) { System.out.println("onFocus() called for element: " + element + ", with: " + getFocus); } @Override public boolean inputEvent(NiftyInputEvent inputEvent) { return false; } public void next() { System.out.println("next() clicked for element: " + element); } } MyScreenController: class MyScreenController implements ScreenController { public void bind(Nifty nifty, Screen screen) {} public void onEndScreen() {} public void onStartScreen() {} public void next() { System.out.println("next() called from MyScreenController"); } } And my XML file: <?xml version="1.0" encoding="UTF-8"?> <nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://niftygui.sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd"> <screen id="start" controller="predaN00b.theThing.V0004.MyScreenController"> <layer childLayout="center" controller="predaN00b.theThing.V0004.ElementController"> <panel width="100px" height="100px" childLayout="vertical" backgroundColor="#ff0f"> <text font="aurulent-sans-16.fnt" color="#ffff" text="Hello World!"> <interact onClick="next()" /> </text> </panel> </layer> </screen> </nifty> My main class, in case it's needed: public class MainGameState extends BasicGame { public Nifty nifty; public MainGame() { super("Test"); } public void init(GameContainer container, StateBasedGame game) throws SlickException { nifty = new Nifty(new SlickRenderDevice(container), new NullSoundDevice(), new PlainSlickInputSystem(), new AccurateTimeProvider()); nifty.addXml("/xml/MainState.xml"); nifty.gotoScreen("start"); } public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException { nifty.update(); } public void render(GameContainer container, StateBasedGame game, Graphics graphics) throws SlickException { nifty.render(false); } public static void main(String[] args) throws SlickException { AppGameContainer app = new AppGameContainer(new MainGame()); app.setAlwaysRender(true); app.setDisplayMode( 1260 , 720, false); //window size app.start(); } }

    Read the article

  • iPhone crashing when presenting modal view controller

    - by Michael Waterfall
    I'm trying to display a modal view straight after another view has been presented modally (the second is a loading view that appears). - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // Show load LoadViewController *loader = [[LoadViewController alloc] init]; [self presentModalViewController: loader animated:NO]; [loader release]; } But when I do this I get a "Program received signal: "EXC_BAD_ACCESS"." error. The stack trace is: 0 0x30b43234 in -[UIWindowController transitionViewDidComplete:fromView:toView:] 1 0x3095828e in -[UITransitionView notifyDidCompleteTransition:] 2 0x3091af0d in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] 3 0x3091ad7c in -[UIViewAnimationState animationDidStop:finished:] 4 0x0051e331 in run_animation_callbacks 5 0x0051e109 in CA::timer_callback 6 0x302454a0 in CFRunLoopRunSpecific 7 0x30244628 in CFRunLoopRunInMode 8 0x32044c31 in GSEventRunModal 9 0x32044cf6 in GSEventRun 10 0x309021ee in UIApplicationMain 11 0x00002154 in main at main.m:14 Any ideas? I'm totally stumped! The loading view is empty so there's definitely nothing going on in there that's causing the error. Is it something to do with launching 2 views modally in the same event loop or something? Thanks, Mike Edit: Very strange... I have modified it slightly so that the loading view is shown after a tiny delay, and this works fine! So it appears to be something within the same event loop! - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // Show load [self performSelector:@selector(doit) withObject:nil afterDelay:0.1]; } - (void)doit { [self presentModalViewController:loader animated:YES]; }

    Read the article

  • Very different font sizes across browsers

    - by Yang
    Chrome/WebKit and Firefox have different rendering engines which render fonts differently, in particular with differing dimensions. This isn't too surprising, but what's surprising is the magnitude of some of the differences. I can always tweak individual elements on a page to be more similar, but that's tedious, to say the least. I've been searching for more systematic solutions, but many resources (e.g. SO answers) simply say "use a reset package." While I'm sure this fixes a bunch of other things like padding and spacing, it doesn't seem to make any difference for font dimensions. For instance, if I take the reset package from http://html5reset.org/, I can show pretty big differences (note the layout dimensions shown in the inspectors). [The images below are actually higher res than shown/resized in this answer.] <h1 style="font-size:64px; background-color: #eee;">Article Header</h1> With Helvetica, Chrome is has the shorter height instead. <h1 style="font-size:64px; background-color: #eee; font-family: Helvetica">Article Header</h1> Using a different font, Chrome again renders a much taller font, but additionally the letter spacing goes haywire (probably due to the boldification of the font): <style> @font-face { font-family: "MyriadProRegular"; src: url("fonts/myriadpro-regular-webfont.eot"); src: local("?"), url("fonts/myriadpro-regular-webfont.woff") format("woff"), url("fonts/myriadpro-regular-webfont.ttf") format("truetype"), url("fonts/myriadpro-regular-webfont.svg#webfonteknRmz0m") format("svg"); font-weight: normal; font-style: normal; } @font-face { font-family: "MyriadProLight"; src: url("fonts/myriadpro-light-webfont.eot"); src: local("?"), url("fonts/myriadpro-light-webfont.woff") format("woff"), url("fonts/myriadpro-light-webfont.ttf") format("truetype"), url("fonts/myriadpro-light-webfont.svg#webfont2SBUkD9p") format("svg"); font-weight: normal; font-style: normal; } @font-face { font-family: "MyriadProSemibold"; src: url("fonts/myriadpro-semibold-webfont.eot"); src: local("?"), url("fonts/myriadpro-semibold-webfont.woff") format("woff"), url("fonts/myriadpro-semibold-webfont.ttf") format("truetype"), url("fonts/myriadpro-semibold-webfont.svg#webfontM3ufnW4Z") format("svg"); font-weight: normal; font-style: normal; } </style> ... <h1 style="font-size:64px; background-color: #eee; font-family: Helvetica">Article Header</h1> I've tried a few resets/normalize packages to no avail. I just wanted to confirm here that this is indeed a fact of life (even omitting the more glaring offenders like IE and mobile) and I'm not missing some super-awesome solution to this mess.

    Read the article

  • Is there a work around for invalid octal digit in an array?

    - by sircrisp
    I'm trying to create an array which will hold the hours in a day so I can loop through it for a clock. I have: int hourArray[24] = {12, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11}; I am getting the error on the following numbers in order 08, 09, 08, 09. It tells me: Error: invalid octal digit I've never run into this before and I'm wondering if there is any way around it?

    Read the article

  • Ckeditor sends default content

    - by user1294101
    I use ckeditor with a default content. Then I initialize (replace textarea) CKEditor with jquery and I edit the text. The problem is that var data = $( 'textarea.editor' ).val(); returns default content and also getData(). What I have to do to grab the actual content? Thank you very much var ed = $( '#ed' ).ckeditor( {toolbar :[ { name: 'basicstyles', items : [ 'Bold','Italic' ] }, {name: 'link', items:['Link']}, { name: 'colors', items : [ 'TextColor' ] } ] } );

    Read the article

  • What should a Java/SOA developer be able to do?

    - by Regular Joe
    I got assigned the task to list the activities a Java Developer should be able to perform and create an estimate about the time it would take. I've came up with the following: Create JDBC CRUD backend ( S=1d, M=5d, H=10d ) Create JSP/Servlet frontend for a CRUD app ( S=1d, M=10d, H=20d ) Create Swing desktop frontend ( S=1d, M=15d, H=30d) Create ORM based CRUD etc. Create Webapp fronend with webframework etc Where.. S = Small complexity M = Medium complexity H = High complexity 1d = 1 day This is thought for a Java "enterprise" developer. The other profile I have is SOA Developer, but I could not pass beyond: Create webservice ( S=.5d, M=2d, H=7d ) Q.- What other activities should a Java Developer be able to do? Q.- What activities should a SOA Developer be able to do? Please, help me with this, I know this is in the limit of the kind of questions that could be asked here, but I really need a little push on this, and I don't want to go to Yahoo Answers for this.

    Read the article

  • JavaScript / HTML highlighting / debugging in Eclipse using PhoneGap

    - by Jason Hartley
    I am writing an app using PhoneGap for Android in Eclipse. Since the project is an Android project, it's in a Java perspective. For whatever reason, Eclipse won't highlight HTML and JavaScript for me while in an Android/Java project/perspective and switching to the JavaScript perspective doesn't highlight the code either. Without highlighting or debugging tools, the debug process is very slow. How do I tell Eclipse to highlight HTML and JavaScript for me while working in a Java Environment?

    Read the article

  • Assembly Resolver ignores PrivateBinPath

    - by user472875
    I have an assembly I would like to load from a sub-folder of the appbase. I set that sub-folder in the PrivateBinPath during AppDomain creation. The issue is that I have another version of the same DLL in the appbase. From the way it looks, the resolver detects the wrong version first, says that there is a mismatch and stops. As a result the correct version (located in the sub-folder) never gets loaded. I have tested this by removing those DLLs in the appbase and it fixed the problem. Is there any way to force the search even if the wrong version is found?

    Read the article

  • Executing a process in windows server 2003 and ii6 from code - permissions error

    - by kurupt_89
    I have a problem executing a process from our testing server. On my localhost using windows XP and iis5.1 I changed the machine.config file to have the line - I then changed the login for iis to log on as local system account and allow server to interact with desktop. This fixed my problem executing a process from code in xp. When using the same method on windows server 2003 (using iis6 isolation mode) the process does not get executed. Here is the code to execute the process (I have tested the inputs to iecapt through the command line and an image is generated) - public static void GenerateImageToDisk(string ieCaptPath, string url, string path, int delay) { url = FixUrl(url); ieCaptPath = FixPath(ieCaptPath); string arguments = @"--url=""{0}"" --out=""{1}"" --min-width=0 --delay={2}"; arguments = string.Format(arguments, url, path, delay); ProcessStartInfo ieCaptProcessStartInfo = new ProcessStartInfo(ieCaptPath + "IECapt.exe"); ieCaptProcessStartInfo.RedirectStandardOutput = true; ieCaptProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden; ieCaptProcessStartInfo.UseShellExecute = false; ieCaptProcessStartInfo.Arguments = arguments; ieCaptProcessStartInfo.WorkingDirectory = ieCaptPath; Process ieCaptProcess = Process.Start(ieCaptProcessStartInfo); ieCaptProcess.WaitForExit(600000); ieCaptProcess.Close(); }

    Read the article

  • MFMailComposeViewController configure mimetype for attachment

    - by user749918
    I need some help. I am trying to attach files to mail using, [mail addAttachmentData:attachmentData mimeType:@"image/png" fileName:fileName]; but the problem is that if i need to send a .jpeg image i need to repeat code just for setting mime type to "mimeType:@"image/jpeg". My question is that is there any general mimeType that can attach any kind of file irrespective of .doc,.ppt,.pdf or an audio or video file. is there any general mimeType: for an kind of attachment. Thanks in advance.

    Read the article

  • Defined variables and arrays vs functions in php

    - by Frank Presencia Fandos
    Introduction I have some sort of values that I might want to access several times each page is loaded. I can take two different approaches for accessing them but I'm not sure which one is 'better'. Three already implemented examples are several options for the Language, URI and displaying text that I describe here: Language Right now it is configured in this way: lang() is a function that returns different values depending on the argument. Example: lang("full") returns the current language, "English", while lang() returns the abbreviation of the current language, "en". There are many more options, like lang("select"), lang("selectact"), etc that return different things. The code is too long and irrelevant for the case so if anyone wants it just ask for it. Url The $Url array also returns different values depending on the request. The whole array is fully defined in the beginning of the page and used to get shorter but accurate links of the current page. Example: $Url['full'] would return "http://mypage.org/path/to/file.php?page=1" and $Url['file'] would return "file.php". It's useful for action="" within the forms and many other things. There are more values for $Url['folder'], $Url['file'], etc. Same thing about the code, if wanted, just request it. Text [You can skip this section] There's another array called $Text that is defined in the same way than $Url. The whole array is defined at the beginning, making a mysql call and defining all $Text[$i] for current page with a while loop. I'm not sure if this is more efficient than multiple calls for a single mysql cell. Example: $Text['54'] returns "This is just a test array!" which this could perfectly be implemented with a function like text(54). Question With the 3 examples you can see that I use different methods to do almost the same function (no pun intended), but I'm not sure which one should become the standard one for my code. I could create a function called url() and other called text() to output what I want. I think that working with functions in those cases is better, but I'm not sure why. So I'd really appreciate your opinions and advice. Should I mix arrays and functions in the way I described or should I just use funcions? Please, base your answer in this: The source needs to be readable and reusable by other developers Resource consumption (processing, time and memory). The shorter the code the better. The more you explain the reasons the better. Thank you PS, now I know the differences between $Url and $Uri.

    Read the article

  • JavaScript return method

    - by user1314034
    I'am new in javascript. I can't understand why the function returns T1 object (not just string 'hi') in the following example. function T1(){ return 'hi'; } function T(){ return new T1(); } T(); output: T1 And returns function in the following example function T1(){ return function(){ return 'hi'; } } function T(){ return new T1(); } T(); output: function (){ return 'hi' } Please explain this rethult. Thank you)

    Read the article

  • Join Where Rows Don't Exist or Where Criteria Matches...?

    - by Greg
    I'm trying to write a query to tell me which orders have valid promocodes. Promocodes are only valid between certain dates and optionally certain packages. I'm having trouble even explaining how this works (see psudo-ish code below) but basically if there are packages associated with a promocode then the order has to have one of those packages and be within a valid date range otherwise it just has to be in a valid date range. The whole "if PrmoPackage rows exist" thing is really throwing me off and I feel like I should be able to do this without a whole bunch of Unions. (I'm not even sure if that would make it easier at this point...) Anybody have any ideas for the query? if `OrderPromoCode` = `PromoCode` then if `OrderTimestamp` is between `PromoStartTimestamp` and `PromoEndTimestamp` then if `PromoCode` has packages associated with it //yes then if `PackageID` is one of the specified packages //yes code is valid //no invalid //no code is valid Order: OrderID* | OrderTimestamp | PackageID | OrderPromoCode 1 | 1/2/11 | 1 | ABC 2 | 1/3/11 | 2 | ABC 3 | 3/2/11 | 2 | DEF 4 | 4/2/11 | 3 | GHI Promo: PromoCode* | PromoStartTimestamp* | PromoEndTimestamp* ABC | 1/1/11 | 2/1/11 ABC | 3/1/11 | 4/1/11 DEF | 1/1/11 | 1/11/13 GHI | 1/1/11 | 1/11/13 PromoPackage: PromoCode* | PromoStartTimestamp* | PromoEndTimestamp* | PackageID* ABC | 1/1/11 | 2/1/11 | 1 ABC | 1/1/11 | 2/1/11 | 3 GHI | 1/1/11 | 1/11/13 | 1 Desired Result: OrderID | IsPromoCodeValid 1 | 1 2 | 0 3 | 1 4 | 0

    Read the article

  • git squash and preserve last commit's timestamp

    - by Crend King
    Consider I have commits ... -- A -- B -- C If I use git rebase -i to squash all three commits into one, we could pick A squash B squash C I see the resulted commit A has its original timestamp. How could make it inherit the timestamp of commit C (the last one)? What I can think of is git commit --amend --date=<new_time>, but I need to remember the timestamp of commit C before squash or from reflog. I find the timestamp of the latest timestamp is more reasonable, because it show when do I actually finish the work that are in the commits. Thanks.

    Read the article

  • Speed up dialog/page transitions in jQuery Mobile on iPhone?

    - by Crashalot
    There are other SO questions on speeding up jQuery Mobile for Android, but does anyone know how to accelerate page transitions on iPhones, specifically dialog transitions? We're on JQM 1.0. JQM 1.1 is supposed to speed up page transitions (though we haven't seen any demos yet), but we're wondering if anyone has done anything for JQM 1.0. Right now, there is a two second delay, which is too much to show a dialog. We resort to one of two options. Using no animation for the page transition, which provides instant feedback, or rolling our own by binding to "touchstart" and animating the dialog, which is really just a big DIV inside the current page. Neither is ideal. Suggestions?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >