Search Results

Search found 18677 results on 748 pages for 'current'.

Page 289/748 | < Previous Page | 285 286 287 288 289 290 291 292 293 294 295 296  | Next Page >

  • Pass value to another jsp

    - by Rozer
    I have come in a situation where I need to create a hiperlink for each entry in collection following is my code.. <td><a href="#" onclick="javascript:openWindow(--------)">Click How can i get ${current.product_id} value in blank space... so that i can pass my value to next jsp for internal processing....

    Read the article

  • Recurssion Question : Revision

    - by stan
    My slides say that A recurssive call should always be on a smaller data structure than the current one There must be a non recurssive option if the data structure is too small You need a wrapper method to make the recurssive method accessible Just reading this from the slides makes no sence, especially seeing as it was a topic from before christmas! Could anyone try and clear up what it means please? Thank you

    Read the article

  • How to find same-value rectangular areas of a given size in a matrix most efficiently?

    - by neo
    My problem is very simple but I haven't found an efficient implementation yet. Suppose there is a matrix A like this: 0 0 0 0 0 0 0 4 4 2 2 2 0 0 4 4 2 2 2 0 0 0 0 2 2 2 1 1 0 0 0 0 0 1 1 Now I want to find all starting positions of rectangular areas in this matrix which have a given size. An area is a subset of A where all numbers are the same. Let's say width=2 and height=3. There are 3 areas which have this size: 2 2 2 2 0 0 2 2 2 2 0 0 2 2 2 2 0 0 The result of the function call would be a list of starting positions (x,y starting with 0) of those areas. List((2,1),(3,1),(5,0)) The following is my current implementation. "Areas" are called "surfaces" here. case class Dimension2D(width: Int, height: Int) case class Position2D(x: Int, y: Int) def findFlatSurfaces(matrix: Array[Array[Int]], surfaceSize: Dimension2D): List[Position2D] = { val matrixWidth = matrix.length val matrixHeight = matrix(0).length var resultPositions: List[Position2D] = Nil for (y <- 0 to matrixHeight - surfaceSize.height) { var x = 0 while (x <= matrixWidth - surfaceSize.width) { val topLeft = matrix(x)(y) val topRight = matrix(x + surfaceSize.width - 1)(y) val bottomLeft = matrix(x)(y + surfaceSize.height - 1) val bottomRight = matrix(x + surfaceSize.width - 1)(y + surfaceSize.height - 1) // investigate further if corners are equal if (topLeft == bottomLeft && topLeft == topRight && topLeft == bottomRight) { breakable { for (sx <- x until x + surfaceSize.width; sy <- y until y + surfaceSize.height) { if (matrix(sx)(sy) != topLeft) { x = if (x == sx) sx + 1 else sx break } } // found one! resultPositions ::= Position2D(x, y) x += 1 } } else if (topRight != bottomRight) { // can skip x a bit as there won't be a valid match in current row in this area x += surfaceSize.width } else { x += 1 } } } return resultPositions } I already tried to include some optimizations in it but I am sure that there are far better solutions. Is there a matlab function existing for it which I could port? I'm also wondering whether this problem has its own name as I didn't exactly know what to google for. Thanks for thinking about it! I'm excited to see your proposals or solutions :)

    Read the article

  • How many keys are too many in memcached?

    - by jack
    I currently have about 650,000 items in memcached (430MB memory used) and the number is still increasing. It's expected to exceed 1,000,000 items before going flat. Current hit/miss ratio is 25:1 so the efficiency is pretty good. I just wanted to ask is one million items in memcached on single server too many? If no, how many is too many?

    Read the article

  • Mysql query to get distict hotel id with minimum price and star?

    - by user1325929
    Current table hotel_id | price | star 1100 | 1999 | 3 1100 | 1565 | 3 1100 | 2000 | 3 1101 | 2010 | 4 1101 | 2050 | 4 1102 | 5599 | 5 1102 | 6599 | 5 Required result: distinct hotels with minimum price and it's star hotel_id | price | star 1100 | 1565 | 3 1101 | 2010 | 4 1102 | 5599 | 5 I wrote query as SELECT DISTINCT hotel_id, min(price),star FROM MyTable. It is giving only 1 row instead of 3

    Read the article

  • emacs: interactively search open buffers

    - by Data
    Is there a way to search all the open buffers for a particular pattern. C-s interactively searches current buffer. Similarly, is there something, that searches all the open buffers. I know I can use "occur", but "Occur" brings a new buffer and changes/messes the buffer organization.

    Read the article

  • Can java do a timer on command line?

    - by javaLearner.java
    HI I am a new java programmer (very new). What I want to do/test is (not sure if its recommendable or doable?), we know that System.out.println("Message"); will output the "Message" in command prompt. Is it possible to display the current time, without having to repeatly use the system.out.println()? Name, like instead of displaying: 10:00:01 10:00:02 10:00:03 I wand to have liek this: 10:00:0X where X will continue counting

    Read the article

  • Redirect to login page automatically after some time

    - by ASD
    How can we redirect to login page automatically after some time? I have a requirement to redirect to login page if the current page is idle for 10 minutes in Java/JSP. I tried to use <meta http-equiv="refresh" content="120;url=./login.html"> tag. This works only when I click on any link but not automatically after 2 mins(120secs). Can anyone tell me how to redirect to login page automatically?

    Read the article

  • javascript: browser size (width and height)

    - by dono
    I'm trying to detect the browser's current size (width and height). I know it's super easy in jquery with $(document).width and $document.height, but I don't want to add the size of the jquery lib to the project, so I'd rather just use built in javascript. What would be the short and efficient way to do the same thing with javascript?

    Read the article

  • How would I write this shell script as a Windows batch script?

    - by Jeremy Banks
    I haven't had a chance to test this script, I'm just using it as a suitable pseudocode. It's just supposed to copy all files in the current directory into a timestamped subdirectory. ID="$(date +%Y%b%d%H%M%S)" COMMITABLE="$(ls | egrep --invert-match ^(STATES|PARENT)\$)" STATE_PATH="$(pwd)/STATES/$ID" mkdir --parents "$STATE_PATH" cp $COMMITABLE "$STATE_PATH" ln -s "$STATE_PATH" PARENT

    Read the article

  • insert exclusive locking

    - by Markus
    Hi, I have thought about the following SQL statements: INSERT INTO A(a1, a2) SELECT b1, udf_SomeFunc(b1) FROM B Where udf_SomeFunc makes a select on table A. As I understand, first, a shared lock is set on A (I am talking just about table A now), then, after this lock is released, an exclusive lock is obtained to insert the data. The question is: is it possible, that another transaction will get the exclusive lock on table A, just before the current transaction takes its exclusive lok on A?

    Read the article

  • Target Framework Mismatch

    - by Si Keep
    When adding a reference to a project I sometimes see the message... "The Target Framework version for the project is higher than the current project Target Framework version. Would you like to add this reference to your project anyway?" I understand what the message is indicating but can anyone explain what issues might arise from saying 'Yes'?

    Read the article

  • Drupal, Views: using AJAX to load the complete node ?

    - by Patrick
    hi, I've a View page with all the content of my website (the node headers). When I click on one of these header I would like to load the complete node without refreshing the page and display it on the left. Can I do this with Views (I mean.. does it have a functionality to load a complete node and add it to the current page ? thanks

    Read the article

  • How do I make defensive copy of an object?

    - by kunjaan
    How do I make defensive copies of a Mutable Object which contains a mutable field in an Immutable Object? class ImmutableObject { private final MutableObject immutable_field; ImmutableObject(MutableObject y) { this.immutable_field = y; } MutableObject return_immutable_field() { return immutable_field; } } class MutableObject { public int mutable_field; } The MutableObject does not have a constructor that lets me set the field. The MutableObject's current state should be captured in the Immutable Object and never changed.

    Read the article

  • Change -- to . for all files in a directory

    - by Larry
    Hello, I need to rename all the files in a directory. Some examples of the source filenames are: alpha--sometext.381928 comp--moretext.7294058 The resultant files would be renamed as: alpha.sometext.381928 comp.moretext.7294058 The number of characters before and after the -- is not consistant. The script needs to work on current installations of Ubuntu and FreeBSD. These are lean LAMP servers so only the necessary packages have been installed. Thanks

    Read the article

  • using 2 different jquery releases on the same page

    - by Nat
    I am using this jquery plugin for a carousel controller http://sorgalla.com/projects/jcarousel/, it is based on jquery release 1.2.1 I also need to have tabs on the page, but when including the current jquery release in the page, the carousel stops working. Is there a way to have them both live together on the same page, or is there a way to have tabs work under realease 1.2.1? I rather not rebuild the carousel on another plugin, since this one is already skinned and works just as needed.

    Read the article

  • how to configure jetty 7 to use syslog or log4j

    - by egemen ozden
    I am looking for a way to direct all the jetty 7 logging to syslog. My current configuration dumps everything to JETTY_HOME/logs/.. After some initial ivestigation, it seems I should change JETTY_HOME/etc/jetty-logging.xml, but this does not look straightforward. It looks like I should create a new PrintStream implementation which sends its output to syslog and redirecting stderr and stdout to that class in jetty-logging.xml. any easier way to do that or to make jetty log directly to log4j ? Thanks

    Read the article

  • Use subform record set as domain argument in DAvg()

    - by harto
    Is it possible to use a subform's 'current' record set as the domain argument to DAvg() (etc.)? Basically, I have a subform that displays a subset of records from a query. I would like to run DAvg() over this subset. This is how I've gotten around it: =DAvg([FieldToAvg], [SubformQuery], "ChildField=Forms.MasterForm.MasterField And FieldToAvg > 0") but what I actually want is something like: =DAvg([FieldToAvg], [SubformCurrentlyDisplayedData], "FieldToAvg > 0") Is this possible in Access 2007?

    Read the article

  • iphone app time counter

    - by Sam
    I would like to create a time counter in my app that shows the user how many minutes the app has been running the current session and total. How do I create such time counter and how do I save the value to the phone? I'm new to app developement.

    Read the article

< Previous Page | 285 286 287 288 289 290 291 292 293 294 295 296  | Next Page >