Daily Archives

Articles indexed Thursday April 1 2010

Page 8/126 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Formatting and pretty printing dates with jquery

    - by Tauren
    I need to display dates in a couple different ways in an app built with jquery. In some situations, I need the typical "yyyy-mm-dd hh:mma" type of formatting, with all of it's different permutations. In other cases, I need to show dates "pretty printed" similar to how StackOverflow does them: 5 seconds ago 12 minutes ago 3 hours ago yesterday 2 days ago My application already uses JQuery UI DatePicker which includes a formatDate() function, but as far as I can tell, there is no way to use it outside of the datepicker. I want to format dates that aren't associated with a datepicker. Is it possible to do this using DatePicker? The DateJS library can parse dates like "12 minutes ago", but as far as I can tell, it cannot take a Date object and format strings like this. It can format the typical "yyyy-mm-dd" types of formats. This library seems pretty heavy as well. John Resig's Pretty Dates looks like it can provide the pretty printing ("2 hours ago"), but it doesn't do the standard formatting. Is there not a single plugin that can do all of this? Is there a way to leverage the DatePicker code so I don't have to load multiple codebases that do the same things?

    Read the article

  • Long-running transactions structured approach

    - by disown
    I'm looking for a structured approach to long-running (hours or more) transactions. As mentioned here, these type of interactions are usually handled by optimistic locking and manual merge strategies. It would be very handy to have some more structured approach to this type of problem using standard transactions. Various long-running interactions such as user registration, order confirmation etc. all have transaction-like semantics, and it is both error-prone and tedious to invent your own fragile manual roll-back and/or time-out/clean-up strategies. Taking a RDBMS as an example, I realize that it would be a major performance cost associated with keeping all the transactions open. As an alternative, I could imagine having a database supporting two isolation levels/strategies simultaneously, one for short-running and one for long-running conversations. Long-running conversations could then for instance have more strict limitations on data access to facilitate them taking more time (read-only semantics on some data, optimistic locking semantics etc). Are there any solutions which could do something similar?

    Read the article

  • What programs should I write to truly experience this fancy new language ?

    - by privatehuff
    Tried Scheme at one point, just built up half of a "math" and "string" library before getting bored... Similar experience with Java, but stopped early because I was appalled at the lack of operator overloading. When you try out a new language, is there a program/game/function/exercise/problem that you use to get into the hot meaty center and really EXPERIENCE the language? I've been wanted to try Python, Ruby, some lisps, etc but can't seem to find any meaningful work to do with them, or any reason to use them for anything over languages I already know. Sorry this is a discussion, but you are EXACTLY the people I want to get input from on this

    Read the article

  • seam Concurrent call to conversation

    - by bhargav
    seam Concurrent call to conversation . what is that about ? I have a button that takes 5 min to process. i get this error within 2. i have set the concurrent-request-timeout to 10 min. does not seem to work. is there a way to block all other requests until the first one has completed its response ?.

    Read the article

  • Ray-Box Intersection during Scene traversal with matrix transforms

    - by Myx
    Hello: There are a few ways that I'm testing my ray-box intersections: Using the ComputeIntersectionBox(...) method, that takes a ray and a box as arguments and computes the closest intersection of the ray and the box. This method works by forming a plane with each of the faces of the box and finding an intersection with each of the planes. Once an intersection is found, a check is made whether or not the point is on the surface of the box by checking that the intersection point is between the corner points. When I look at rays after running this algorithm on two different boxes, I obtain the correct intersections. Using ComputeIntersectionScene(...) method without using the matrix transformations on a scene that has two spheres, a dodecahedron (a triangular mesh), and two boxes. ComputeIntersectionScene(...) recursively traverses all of the nodes of the scene graph and computes the closest intersection with the given ray. This test in particular does not apply any transformations that parent nodes may have that also need to be applied to their children. With this test, I also obtain the correct intersections. Using ComputeIntersectionScene(...) method WITH the matrix transformations. This test works like the one above except that before finding an intersection between the ray and a node in the scene, the ray is transformed into the node's coordinate frame using the inverse of the node's transformation matrix and after the intersection has been computed, this intersection is transformed back into the world coordinates by applying the transformation matrix to the intersection point. When testing with the third method on the same scene file as described in 2, testing with 4 rays (thus one ray intersects the one sphere, one ray the the other sphere, one ray one box, and one ray the other box), only the two spheres get intersected and the two boxes do not get intersections. When I debug looking into my ComputeIntersectionBox(...) method, it actually tells me that the ray intersects every plane on the box but each intersection point does not lie on the box. This seems to be strange behavior, since when using test 2 without transformations, I obtain the correct box intersections (thus, I believe my ray-box intersection to be correct) and when using test 3 WITH transformations, I obtain the correct sphere intersections (thus, I believe my transformed ray should be OK). Any suggestions where I could be going wrong? Thank you in advance.

    Read the article

  • Converting Unicode strings to escaped ascii string

    - by Ali
    How can I convert this string: This string contains the unicode character Pi(p) into an escaped ascii string: This string contains the unicode character Pi(\u03a0) and vice versa ? The current Encoding available in C#, converts the p character into "?". I need to preserve that character.

    Read the article

  • How do you decide which API function documentations to read and how seriously?

    - by Uri
    Suppose that you are writing or maintaining a piece of code that uses some API that you are not 100% familiar with. How do you decide whether to read the documentation of a certain call target, and how much time to spend reading it? How do you decide not to read it? (Let's assume you can read it by opening the HTML documentation, inspecting the source code, or using the hover mechanism in the IDE).

    Read the article

  • Why wouldn't a flex remoteobject be able to work within a custom component?

    - by Gary
    Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint. When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence. How could this be? No spelling errors, or anything like that. What can I do to figure it out? mxml code: < mx:RemoteObject id="myService" destination="remoteService" endpoint="$(Application.application.home}/messagebroker/amf" > < /mx:RemoteObject > function call is just 'myService.getlist();' when I move it to a custom component, I import mx.core.Application; so the compiler doesn't yell my child component: child.mxml <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" > <mx:Script> <![CDATA[ import mx.core.Application; public function init():void { helloWorld.sayHello(); } ]]> </mx:Script> <mx:RemoteObject id="helloWorld" destination="helloService" endpoint="$(Application.application.home}/messagebroker/amf" /> <mx:Label text="{helloWorld.sayHello.lastResult}" /> </mx:Panel> my main.mxml: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" xmlns:test="main.flex.*" > <mx:Script> <![CDATA[ [Bindable] public var home:String; [Bindable] public var uName:String; public function init():void { //passed in by wrapper html home = Application.application.parameters.appHome; uName = Application.application.parameters.uName; } ]]> </mx:Script> <test:child /> </mx:Application>

    Read the article

  • Web Apps for Source Code Discussion

    - by Wilco
    Are there any web apps that allow for source code collaboration? I'm thinking of something that could look at an SVN repo/local folder/etc. and publish the code with support for threaded discussions under each file or class. Ideally I want to find something that I could deploy/host myself, so being based in PHP would be a huge plus.

    Read the article

  • VS2010 method comment block pretty format.

    - by camelCase
    I have just installed the lastest RC of VS2010, which for me represents a shift from VS2008. A new comment formatting feature that I was looking forward to appears to be missing. About 6 months ago I read a Scott Gu blog post that mentioned a new VS2010 feature that would format /// style method comment blocks into more readable formatted regions inline with other code. The Scott Gu blog did not provide a screen shot but I was expecting the VS2010 editor to remove the XML tags from the /// method comment block and render just the essential text comment. Was this feature pulled during the Beta, or is there an option switch urking somewhere?

    Read the article

  • Making a mini paint area in AS3/Flex4

    - by Parris
    So below is the code I have so far. For now I simply want to make it draw a square and have it show up. Right now when I click the area defined in MXML as <components:PaintArea width="100%" height="100%" id="paint-a"></PaintArea> it shows nothing; however, the actionlistener is getting triggered and an element is being added to the group. Not sure exactly what is going on... perhaps for some reason it doesn't think the element is drawable? Anyways thanks for the help! public class PaintArea extends SkinnableContainer { private var canvas:Group; public function PaintArea() { super(); canvas = new Group(); canvas.clipAndEnableScrolling = true; canvas.percentHeight = 100; canvas.percentWidth = 100; canvas.addEventListener(MouseEvent.MOUSE_UP,drawRectangle); this.addElement(canvas); } private function drawRectangle(e:MouseEvent):void{ var r:Rect = new Rect(); r.fill = new SolidColor(0x00ff00,.5); canvas.addElement(r); } }

    Read the article

  • How important is PhD research topic to getting a job?

    - by thornate
    EDIT: This has been closed and I realise that I may not have been specific enough with the original title. I ask two questions here: The general one (Does a PhD help get a job?) which has been asked elsewhere, and the specific one (Is it possible to get work outside of the specific research field?). Assume I've already decided going to do the phd. I'm just stressing about the research topic. Well, I'm one year out of university (Mechatronics engineering and Software Eng double bachelors), worked for a few months then got retrenched (yay economy!). It's looking less and less likely that I'll get a job worth having with the job market as it is, so I'm thinking about going back to uni to do a PhD. I figure that by the time I'm done, the job market will have improved and hopefully I'll have something on my resume that is more attractive than spending three years doing customer support for accounting software. So, my question is to people who've done PhD's. Would you say that they were worth the effort? How important is the research topic to future job-seeking success? The idea I have is a computer-sciencey/neural-networks/data-mining thing which I think is very interesting, but not a field I want to be in forever. My potential supervisor claims that employers don't care so much about the topic of the research but rather the peripheral skills that are developed through a PhD; time managment, self-restraint, planning and whatnot. How does this mesh with people's real world experience? I'd appreciate any advice before signing my life on the line for the next three years. See also: Should developers go to grad school? Best reason not to hire a PhD? How to find an entry-level job after you already have a graduate degree?

    Read the article

  • In vim is there a way to delete without putting text in the register?

    - by Edward Tanguay
    Using vim I often want to replace a block of code with a block that I just yanked. But when I delete the block of code that is to be replaced, that block itself goes into the register which erases the block I just yanked. So I've got in the habit of yanking, then inserting, then deleting what I didn't want, but with large blocks of code this gets messy trying to keep the inserted block and the block to delete separate. So what is the slickest and quickest way to replace text in vim? is there a way to delete text without putting it into the register? is there a way to say e.g. "replace next word" or "replace up to next paragraph" or is the best way to somehow use the multi-register feature?

    Read the article

  • FBI, DOJ Falling Short on Identity Theft: Report

    <b>eSecurityPlanet:</b> "An audit by the Justice Department's Office of the Inspector General reveals that while the FBI and Justice Department have made "various efforts" to fight identity theft crimes in recent years, these initiatives have "faded as priorities" mainly because the agencies have failed to develop a coordinated plan to deal with what's become an epidemic of cybercrimes."

    Read the article

  • Justifying a memory upgrade

    - by AngryHacker
    My employer has over a thousand servers (running SQL Server 2005 x64 and a couple of other apps) all across the country. And in my opinion they are all massively underpowered for what they need to do. Specifically, I feel that the servers simply do not have enough RAM for the amount of volume the machines are asked to do. All the servers currently have 6GB of RAM. The users are pretty much always complaining about performance (mostly because, immo, the server dips into the paging file quite often). I finally convinced the powers that be to at least try out a memory upgrade on one box and see the results. However, they want before and after metrics, so that they can see that the expense will be justified. My question is what metrics should I collect to see whether the performance truly improves on the box? I am a dev, so I am not sure how and what to collect (i have a passing knowledge of Perfmon).

    Read the article

  • GUI softwares/netbeans-plugins for creating branches/tags in svn?

    - by ajsie
    hi i wonder if there are some GUI softwares to administrate a svn repo? or do you actually have to log into the ubuntu server with ssh and use all the svn commands to copy the trunk to a branch, merge the data back and forth, copy to a tag, delete and so on. im using netbeans in mac. i think it's only handling the communication between a local project and the repo. not the flows between trunc, branch and tag (creating, deleting, viewing differences etc)

    Read the article

  • Weird interview question from MS

    - by didxga
    There are two numbers, which are both between 1 and 30 inclusive. Person A knew the addition of the two numbers; Person B knew the multiplication of the two numbers; A said:"do you know what numbers are they?" B replied:"I don't know, do you know?" A:"I don't know either" then B said:"so, I knew already" then A said:"I knew either" What are the two numbers?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >