Search Results

Search found 633 results on 26 pages for 'mathematical equations'.

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

  • If you need more than 3 levels of indentation, you're screwed?

    - by jokoon
    Per the Linux kernel coding style document: The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. What can I deduct from this quote? On top of the fact that too long methods are hard to maintain, are they hard or impossible to optimize for the compiler? I don't really understand if this quote encourages better coding practice or is really a mathematical / algorithmic sort of truth. I also read in some C++ optimizing guide that dividing up a program into more function improves its design is a common thing taught at school, but it should be not done too much, since it can turn into a lot of JMP calls (even if the compiler can inline some methods by itself).

    Read the article

  • Why isn't functional language syntax more close to human language?

    - by JohnDoDo
    I'm interested in functional programming and decided to get head to head with Haskell. My head hurts... but I'll eventually get it... I have one curiosity though, why is the syntax so cryptic (in lack of another word)? Is there a reason why it isn't more expressive, more close to human language? I understand that FP is good at modelling mathematical concepts and it borrowed some of it's concise means of expression, but still it's not math... it's a language.

    Read the article

  • "more than 3 levels of indentation, you're screwed" How should I understand this quote ?

    - by jokoon
    The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. What can I deduct from this quote ? On top of the fact that too long methods are hard to maintain, are they hard or impossible to optimize for the compiler ? I don't really understand if this quote encourages better coding practice or is really a mathematical/algorithmic sort of truth... I also read in some C++ optimizing guide that dividing up a program into more function improves its design is a common thing taught at school, but it should be not done too much, since it can turn into a lot of JMP calls (even if the compiler can inline some methods by itself).

    Read the article

  • Is it correct to add booleans in order to count the number of true values in a vector?

    - by gerrit
    Is it conceptually correct to sum a vector of booleans? From a mathematical point of view, I would argue it's not: True + True != 2. But it's quite practical to do so still! Example using the vectorised Python library numpy: In [1]: X = rand(10) In [2]: large = X>0.6 In [3]: large.dtype Out[3]: dtype('bool') In [4]: large.sum() Out[4]: 7 I don't like it, but it's very practical. Is this a good practice? Update: the aim is to count the number of true values in a vector.

    Read the article

  • What is meant by namespaced content and what advantages does it have?

    - by Geek
    I was reading this blog by James Bennett regarding HTML vs XHTML . He writes : I don’t have any need for namespaced content; I’m not displaying any complex mathematical notation here and don’t plan to, and I don’t use SVG for any images. So that’s one advantage of XHTML out the window. I also don’t have any need for XML tools; all the processing I need to do can be handled by HTML-parsing libraries like BeautifulSoup. That’s the other advantage gone. What does he mean by namespaced content and what advantage does it provide us ?

    Read the article

  • If you need more than 3 levels of indentation, you're screwed?

    - by jokoon
    Per the Linux kernel coding style document: The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. What can I deduce from this quote? On top of the fact that too long methods are hard to maintain, are they hard or impossible to optimize for the compiler? I don't really understand if this quote encourages better coding practice or is really a mathematical / algorithmic sort of truth. I also read in some C++ optimizing guide that "dividing up a program into more functions improves its design" is frequently taught in CS courses, but it should be not done too much, since it can turn into a lot of JMP calls (even if the compiler can inline some methods by itself).

    Read the article

  • Offloading to HLSL/GPU without displaying?

    - by George R
    As far as I know, certain mathematical functions like FFTs and perlin noise, etc. can be much faster when done on the GPU as a pixel shader. My question is, if I wanted to exploit this to calculate results and stream to bitmaps, could I do it without needing to actually display it in Silverlight or something? More specifically, I was thinking of using this for large terrain generation involving lots of perlin and other noises, and post-processing like high passes and deriving normals from heightmaps, etc, etc.

    Read the article

  • How to embed AsciiMathML in Google Sites?

    - by Joannes Vermorel
    We would need to embed mathematical formulas through AsciiMathML into Google Sites pages (internal wiki for a research team). I am stuck with the limitation of Google Sites. Any idea how to do that? (ps: I have finally found a poorly practical work-around, but better ideas would still be appreciated)

    Read the article

  • What is missing from the Java API?

    - by Jack
    I started using Java years ago and I've always found almost everything I need inside the standard API provided with JDK SE, with the exception of specific things that don't fit well inside a generic API, like GUI elements (graphs or so on) or advanced mathematical API.. So I was wondering: Which are the most important things that the Java API is missing? When I say "important", I mean either things that you have often needed, but have had to rely on custom libraries, or things that are usually are included in APIs, but not in Java's.

    Read the article

  • Derivative of a program

    - by kokoloco
    Let us assume you can represent a program as mathematical function, that's possible. How does the program representation of the first derivative of that function look like? Is there a way to transform a program to its "derivative" form, and does this make sense at all?

    Read the article

  • How do I convert integers to characters in C#?

    - by Mike Webb
    I am trying to convert an index of 1 to 27 into the corresponding uppercase letter. I know that in C++ I could type this: char letter = 'A' + (char)(myIndex % 27); This same code does not work in C#. How can I accomplish this task in C#? EDIT: I'd rather not have to encode an enum or switch statement for this if there is a better mathematical solution like the one above.

    Read the article

  • hibernate sybase db power function

    - by Vipin Thomas
    We are trying to use sybase function power to do mathematical calculation for one of the DB columns. The hibernate is generating power function as pow(?, xyzo0_.AmtScale) whereas sybase supports power function as Syntax POWER( numeric-expression-1, numeric-expression-2 ) We have tried modifying the hibernate.dialect. Have tried org.hibernate.dialect.SybaseASE15Dialect org.hibernate.dialect.Sybase11Dialect org.hibernate.dialect.SybaseAnywhereDialect but all dialects generate the power function as pow(?, xyzo0_.AmtScale). Is this hibernate issue or are we missing something?

    Read the article

  • Drawing lattices online

    - by lavabo
    This isn't really a programming question but... Is there any way to draw online a lattice for a material, like a compound? i.e. a 3D gridlike pattern? I know there are some applications for drawing mathematical lattices, but the notation to me is unfamiliar - are there simply programs or applets or something for drawing lattices like in a compound?

    Read the article

  • lr parsing table

    - by flufferok
    Could any1 explain how can i transform ll(1) parsing table to lr(1) parsing table? Or are there any tables already for lr1 mathematical parsing(+,-,/,*,^)?

    Read the article

  • Opengl Coordinate System

    - by praveen
    Say I am using an Identity Matrix for my modelViewTransformation Matrix on an Open GL ES2.0 program. The Co-ordinate system in this case is the canonical opengl co-ordinate system which extends from (-1,-1,-1) to (1,,1,1). My question is, is this coordinate system right-handed or left-handed? A broader question: Is there a document with OpenGL which can list all the mathematical conventions followed by the API?

    Read the article

  • How can i interpret a time value in ascii into a numerical value?

    - by Bilal
    I have a file which is as follows: 15:03:21 II 0.88 0.64 15:03:31 II 0.88 0.64 15:03:42 II 0.40 0.40 etc. after loading the file in matlab, I want to be able to read the first column (which corresponds to time) and interpret them as numerical values. At the moment, they are interpreted as a string of ascii characters and i can't perform any mathematical operations on them. Does anyone have any suggestions as to how i can read the time as numbers instead of a string of ascii characters?

    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

  • P-NP-Problem: What are the most promising methods?

    - by phimuemue
    Hello everybody, I know that P=NP has not been solved up to now, but can anybody tell me something about the following: What are currently the most promising mathematical / computer scientific methods that could be helpful to tackle this problem? Or are there even none such methods known to be potentially helpful up to now? Is there any (free) compendium on this topic where I can find all / most of the research done in this area?

    Read the article

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