Search Results

Search found 31 results on 2 pages for 'sandro livaja'.

Page 2/2 | < Previous Page | 1 2 

  • Jquery events on CKeditor

    - by Sandro Antonucci
    Hello in a form with a textarea with id "ckeditor_input" $("#ckeditor_input").ckeditor(); $("#ckeditor_input").html(); // can get the value ("#ckeditor_input").click/blur/keydown/keypressed( function(){ alert("OK"); } ); //doesn't work! the problem is ckeditor! If I don't start an instance of ckeditor on the textarea all events work fine! What is the right way to get events on a ckeditor instance? Thank you

    Read the article

  • How to pick a chunksize for python multiprocessing with large datasets

    - by Sandro
    I am attempting to to use python to gain some performance on a task that can be highly parallelized using http://docs.python.org/library/multiprocessing. When looking at their library they say to use chunk size for very long iterables. Now, my iterable is not long, one of the dicts that it contains is huge: ~100000 entries, with tuples as keys and numpy arrays for values. How would I set the chunksize to handle this and how can I transfer this data quickly? Thank you.

    Read the article

  • Fastest Way to generate 1,000,000+ random numbers in python

    - by Sandro
    I am currently writing an app in python that needs to generate large amount of random numbers, FAST. Currently I have a scheme going that uses numpy to generate all of the numbers in a giant batch (about ~500,000 at a time). While this seems to be faster than python's implementation. I still need it to go faster. Any ideas? I'm open to writing it in C and embedding it in the program or doing w/e it takes. Constraints on the random numbers: A Set of numbers 7 numbers that can all have different bounds: eg: [0-X1, 0-X2, 0-X3, 0-X4, 0-X5, 0-X6, 0-X7] Currently I am generating a list of 7 numbers with random values from [0-1) then multiplying by [X1..X7] A Set of 13 numbers that all add up to 1 Currently just generating 13 numbers then dividing by their sum Any ideas? Would pre calculating these numbers and storing them in a file make this faster? Thanks!

    Read the article

  • Jquery, how to escape quotes

    - by Sandro Antonucci
    I'm using a simple jquery code that grabs html code form a tag and then puts this content into a form input <td class="name_cat" ><span class="name_cat">It&#039;s a &quot;test&quot; </span> (5)</td> jquery gets the content into span.name_catand returns it as It's a "test". So when I print this into an input it becomes <input value="It's a "test"" /> which as you can imagine will only show as It's a , the following double quote will close the value tag. What's the trick here to keep the original string while not showing utf8 code in the input? Jquery code $(".edit_cat").click(function(){ tr = $(this).parents("tr:first"); id_cat = $(this).attr("id"); td_name = tr.find(".name_cat"); span_name = tr.find("span.name_cat").html(); form = '<form action="/admin/controllers/edit_cat.php" method="post" >'+ '<input type="hidden" name="id_cat" value="'+id_cat+'" />'+ '<input type="text" name="name_cat" value="'+span_name+'" />'+ '<input type="submit" value="save" />'+ '</form>'; td_name.html(form); console.log(span_name); } ); I basically need html() not to decode Utf8

    Read the article

  • Is it possible to Hide Text through a Style?

    - by Sandro
    I currently have a JTextPane that will be displaying text coming in from different streams. The way that the user can tell which stream the text came from is that the text from each stream has a different Style to it. Is there a way to make a Style that will hide the text so that I can filter out different pieces of text? Thank you.

    Read the article

  • Why is my logic not working correctly for SPOJ TOPOSORT?

    - by Kavish Dwivedi
    The given problem is http://www.spoj.com/problems/TOPOSORT/ The output format is particularly important as : Print "Sandro fails." if Sandro cannot complete all his duties on the list. If there is a solution print the correct ordering, the jobs to be done separated by a whitespace. If there are multiple solutions print the one, whose first number is smallest, if there are still multiple solutions, print the one whose second number is smallest, and so on. What I am doing is simply doing dfs by reversing the edges i.e if job A finishes before job B, there is a directed edge from B to A . I am maintaining the order by sorting the adjacency list I created and storing the nodes which don't have any constraints separately so as to print them later in correct order . There are two flag arrays used , one for marking discovered node and one for marking the node whose all neighbors have been explored. Now my solution is http://www.ideone.com/QCUmKY (the important function is the visit funtion ) and its giving WA after running correct for 10 cases so its really hard to figure out where am I doing it wrong since it runs for all of the test cases which I have done by hand.

    Read the article

< Previous Page | 1 2