Search Results

Search found 5070 results on 203 pages for 'algorithm'.

Page 143/203 | < Previous Page | 139 140 141 142 143 144 145 146 147 148 149 150  | Next Page >

  • Too much data for RSA block fail. What is PKCS#7?

    - by Tom Brito
    Talking about javax.crypto.Cipher; I was trying to encrypt data using Cipher.getInstance("RSA/None/NoPadding", "BC"); but I got the exception: ArrayIndexOutOfBoundsException: too much data for RSA block Looks like is something related to the "NoPadding", so, reading about padding, looks like CBC is the best approach to use here. I found at google something about "RSA/CBC/PKCS#7", what is this "PKCS#7"? And why its not listed on sun's standard algorithm names?

    Read the article

  • How do I implement graphs and graph algorithms in a functional programming language?

    - by brad
    Basically, I know how to create graph data structures and use Dijkstra's algorithm in programming languages where side effects are allowed. Typically, graph algorithms use a structure to mark certain nodes as 'visited', but this has side effects, which I'm trying to avoid. I can think of one way to implement this in a functional language, but it basically requires passing around large amounts of state to different functions, and I'm wondering if there is a more space-efficient solution.

    Read the article

  • Akima interpolation of an array of doubles

    - by David Rutten
    Assuming I have an array of doubles, what's a good algorithm to sample this series using Akima interpolation? I'm too stupid to translate that mathematical description into code. // values is an array of doubles // idx is the index of the left-hand value for the current interpolation // t is the normalized parameter between values[idx] and values[idx+1] // Don't worry about array bounds, I'll handle that separately. public double InterpolateAkima(double[] values, int idx, double t) { ...? }

    Read the article

  • Is there an encoding method that is mutual to flash and php?

    - by Gus
    I'm base64 encoding a JPG in AS3 and passing it to PHP where it would be decoded. It appears that AS3's encodeToBase64String() function and and PHP's base64_decode() function do not use the same algorithm. Is there a library or API for either language that would allow it to interface with the other? Alternatively, does anyone even know what PHP's default base64 map is? My Google searching is not yielding results.

    Read the article

  • Google image Swirl - interactive information visualization

    - by skyde
    I have seen this image swirl effect on a visual thesaurus. Is there any open source code for this? Or research paper explaining how they made it. I don't care about the algorithm to match similar objects. I only am wondering about the effects. From what i understand they are called recursive orbital diagram. Screenshot: google Wonder Wheel google image swirl

    Read the article

  • Determine the relative compliment of two IEnumerable<T> sets in .net

    - by SFun28
    Hi! Is there an easy way to get the relative compliment of two sets? Perhaps using LINQ? http://en.wikipedia.org/wiki/Complement_(set_theory) I have to find the relative compliment of a set A relative to B. Both A and B are of type HashSet but I think the algorithm could be made more generation (IEnumerable or even ISet)? I could use a solution in either vb.net or C#.

    Read the article

  • segmented reduction with scattered segments

    - by Christian Rau
    I got to solve a pretty standard problem on the GPU, but I'm quite new to practical GPGPU, so I'm looking for ideas to approach this problem. I have many points in 3-space which are assigned to a very small number of groups (each point belongs to one group), specifically 15 in this case (doesn't ever change). Now I want to compute the mean and covariance matrix of all the groups. So on the CPU it's roughly the same as: for each point p { mean[p.group] += p.pos; covariance[p.group] += p.pos * p.pos; ++count[p.group]; } for each group g { mean[g] /= count[g]; covariance[g] = covariance[g]/count[g] - mean[g]*mean[g]; } Since the number of groups is extremely small, the last step can be done on the CPU (I need those values on the CPU, anyway). The first step is actually just a segmented reduction, but with the segments scattered around. So the first idea I came up with, was to first sort the points by their groups. I thought about a simple bucket sort using atomic_inc to compute bucket sizes and per-point relocation indices (got a better idea for sorting?, atomics may not be the best idea). After that they're sorted by groups and I could possibly come up with an adaption of the segmented scan algorithms presented here. But in this special case, I got a very large amount of data per point (9-10 floats, maybe even doubles if the need arises), so the standard algorithms using a shared memory element per thread and a thread per point might make problems regarding per-multiprocessor resources as shared memory or registers (Ok, much more on compute capability 1.x than 2.x, but still). Due to the very small and constant number of groups I thought there might be better approaches. Maybe there are already existing ideas suited for these specific properties of such a standard problem. Or maybe my general approach isn't that bad and you got ideas for improving the individual steps, like a good sorting algorithm suited for a very small number of keys or some segmented reduction algorithm minimizing shared memory/register usage. I'm looking for general approaches and don't want to use external libraries. FWIW I'm using OpenCL, but it shouldn't really matter as the general concepts of GPU computing don't really differ over the major frameworks.

    Read the article

  • Programming With Markov Algorithms.

    - by Bubba88
    Hello! I Wonder if someone has used Markov Algorithm-based programming system or embedded facility in production or for scientific purpose. I know about 'REFAL' programming language invented a thousand years ago, but it all seems to be dead, so.. Ref: http://en.wikipedia.org/wiki/Markov_algorithm

    Read the article

  • Questions about .NET CollectionEditor type

    - by smwikipedia
    Who can tell me the internal working mechanism of a CollectionEditor in plain English? I have implemented every virtual function and step into each of them. Still got no clue of its intended algorithm. I searched the web and found tons of compaints about the CollectionEditor type, and even bugs. I am kind of thinking of the CollectionEditor as a total mess.

    Read the article

  • Get pixel color with Rails or anything else

    - by ulf
    I'd like to build a webapp in Rails in which I'd like to determine every pixel's color of a given image (JPEG). Is there any possibility to do that with Rails or JavaScript? The goal is to write an algorithm which determines the "middle color" of the image and uses it for background color of the site. Any suggestion would be appreciated.

    Read the article

  • perl: generating permutations from a regular expression

    - by wibble
    I know you can generate all permutations from a list, using glob or Algorithm::Permute for example - but how do you generate all possible permutations from a regular expression? i want to do like: @perms = permute( "/\s[A-Z][0-9][0-9]/" ); sub permute( $regex ) { # code - put all permutations of above regex in a list return @list; }

    Read the article

  • The difference between triangulation and mesh

    - by xiao
    I have done some computer graphical programming recently, and I have no experience before. I used the library call CGAL(computer geometry algorithm library). Also, I noticed that there is class for triangulation and also class for mesh. Is mesh just a kind of triangle net? Do they have any differences? Thanks!

    Read the article

  • Convert to valid lat/long codes

    - by Henk
    Hi all, My source gave me the following lat and long codes from Amsterdam. But I can't get them working with Google Maps. Is there some logic behind it, or some kind of algorithm to convert them? 5,237,300,539,279,090 | 489,290,714,263,916 Should be something like this: 52.378268, 4.888859 How can one tell where the dots should be? Thanks!

    Read the article

  • How to get LSB bit in MIPS?

    - by israkir
    Is there a short way to check/get for least significant bit in a 32-bit integer, in MIPS? It is obviously set for the odd numbers and an algorithm which checks for the whole number is odd or even can decide for this. But I just wonder is there a better way to do this...

    Read the article

  • Will this static class break in a multi user scenario ?

    - by Perpetualcoder
    Say I make a static class like following with an extension method: public static class MyStaticExtensionClass { private static readonly Dictionary<int, SomeClass> AlgoMgmtDict = new Dictionary<int, SomeClass>(); public static OutputClass ToOutput(this InputClass input) { // clears up the dict // does some kind of transform over the input class // return an OutputClass object } } In a multi user system, will the state management dictionary fail to provide correct values for the transform algorithm? Will a regular class be a better design or shoving the Dictionary inside the method a better design?

    Read the article

  • python: a way to get an exhaustive, sorted list of keys in a nested dictionary?

    - by saidimu
    exhaustive: - all keys in the dictionary, even if the keys are in a nested dictionary that is a value to a previous-level dictionary key. sorted: - this is to ensure the keys are always returned in the same order The nesting is arbitrarily deep. A non-recursive algorithm is preferred. level1 = { 'a' : 'aaaa', 'level2_1' : {'b': 'bbbbb', 'level3': {'c': 'cccc', 'd': 'dddddd'} }, 'level2_2' : { 'z': 'zzzzzzz' } }

    Read the article

  • Hi Quality texturing.

    - by Tigran
    Hi all. I'm completely new in Open GL, so have a question. I need to apply hi quality texturing on the surface rendered via triangles . But on zooming i continue see the triangle's under the skin, it's not smooth. I use OpenGL built-in minMapping. So I wonder (lookig at other products) do i need to implement my own mipMapping algorithm or I'm doing something wrong ? This is what I want , more ore less, like a quality:

    Read the article

  • ViewState MAc Problem...

    - by Mitesh
    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    Read the article

  • What is a good way of Enhancing contrast of color images?

    - by erjik
    I split color image for 3 channels and made a contrast enhancement of each channel. Then merged them together, I like the image at the result, but it has different colors. Black objects became yellow and so on... EDIT: The algorithm I used is to calculate the 5th percentile and the 95th percentile as min and max values, and then expand the values of image so that it will have min and max values as 0 and 255. If there is a better approach please tell me.

    Read the article

  • about Sorting Algorithms

    - by matin1234
    Hi I want to know that we always use Sorting algorithm like (Insertion Sort or Merge Sort,...) just for lists and arrays?? and we do not use these algorithms for stack or queue ??? thanks

    Read the article

< Previous Page | 139 140 141 142 143 144 145 146 147 148 149 150  | Next Page >