Search Results

Search found 2155 results on 87 pages for 'mathematical expressions'.

Page 50/87 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • CAD/CAM without C++

    - by zaladane
    Hello, Is it possible to do CAD/CAM software without having to use C++? My company developed their software with c/C++ but that was more than 10 years ago. Today,there is a lot of legacy code that switching would force us to get rid of but i was wondering what the actual risks are. We have a lot of mathematical algorithms for toolpath calculations, feature recognition and simulation and 3D Rendering and i was wondering if C# can handles all of that without great performance loss. Is it a utopia to rewrite such algorithms in c# or should that language only deal with UI. We are not talking about game development here (Halo 3 or Call Of Duty) so how much processing does CAD/CAM really need? Can anybody enlighten me on this matter? Most of my colleagues are hardcore C++ programmers and although i program in c++ i love .NET but i am having a hard time selling .NET to them other than basic UI. Does it make sense to consider switching to .NET in such a field, or is it just not a wise idea? Thank you

    Read the article

  • What is the best way to find the digit at n position in a decimal number?

    - by Elijah
    Background I'm working on a symmetric rounding class and I find that I'm stuck with regards to how to best find the number at position x that I will be rounding. I'm sure there is an efficient mathematical way to find the single digit and return it without having to resort to string parsing. Problem Suppose, I have the following (C#) psuedo-code: var position = 3; var value = 102.43587m; // I want this no ? (that is 5) protected static int FindNDigit(decimal value, int position) { // This snippet is what I am searching for } Also, it is worth noting that if my value is a whole number, I will need to return a zero for the result of FindNDigit. Does anyone have any hints on how I should approach this problem? Is this something that is blaringly obvious that I'm missing?

    Read the article

  • How can I check with a regex that a string contains only certain allowed characters?

    - by Camran
    I need a special regular expression, have no experience in them whatsoever so I am turning to you guys on this one: I need to validate a classifieds title field so it doesn't have any special characters in it, almost. Only letters and numbers should be allowed, and also the swedish three letters å, ä, ö, and also not case sensitive. Besides the above, these should also be allowed: The "&" sign. Parenthesis sign "()" Mathematical signs "-", "+", "%", "/", "*" Dollar and Euro signs One accent signed letter: "é". //Only this one is required Double quote and singel quote signs. The comma "," and point "." signs Thanks

    Read the article

  • Storing expression template functors

    - by UncaughtException
    Hello guys, at the moment I'm really interested in expression templates and want to code a library for writing and differentiating mathematical functions with a lambda-style syntax. At the moment, I'm able to write (_x * _x)(2); and get the correct result 4. But I would really like to do something like MathFunction f = _x * _x; f(2);, but I don't have any ideas on how to cope with the recursive expression templates on the right side. Is it possible to achieve this without using the 'auto'-Keyword instead of MathFunction or having to make the operator() virtual? Thanks for your help!

    Read the article

  • Bouncing a ball off a surface

    - by Sagekilla
    Hi all, I'm currently in the middle of writing a game like Breakout, and I was wondering how I could properly bounce a ball off a surface. I went with the naive way of rotating the velocity by 180 degrees, which was: [vx, vy] -> [-vy, vx] Which (unsurprisingly) didn't work so well. If I know the position and veocity of the ball, as well as the point the ball would hit (but is going to instead bounce off of) how can I bounce it off that point? I don't need any language specific code. If anyone could provide a small, mathematical formula on how to properly do this that would work fine for me. I also need this to work with integer positions and velocity (I can't use floating point anywhere). Thanks!

    Read the article

  • MySQL Query involving column names containing math operators

    - by devil_fingers
    I'm a MySQL scrub, and I have asked around and checked around the internet for what I'm sure will turn out to be something obvious, but I'm very frustrated with what I thought would be a very, very simple query not working. So here goes. Please be gentle. Basically, in a large database, some of the column names contain mathematical operators like "/" and "+." (Don't ask, it's not my database, I can't do anything about it). Here is the "essence" of my query (I took out the irrelevant stuff for the sake of this question): SELECT PlayerId, Season, WPA/LI AS WPALI FROM tht.stats_batting_master WHERE Season = "2010" AND teamid > 0 AND PA >= 502 GROUP BY playerid ORDER BY WPALI DESC When I run this, it returns "Unknown column 'LI' in 'field list'," I assume because it sees the "/" in WPA/LI as a division sign. Like I said, I'm sure this is easy enough to work around (it must be given how much this database is used), but I haven't' been able to figure out how. Thanks in advance for any help.

    Read the article

  • How to calculate Centered Moving Average of a set of data in Hadoop Map-Reduce?

    - by 100gods
    I want to calculate Centered Moving average of a set of Data . Example Input format : quarter | sales Q1'11 | 9 Q2'11 | 8 Q3'11 | 9 Q4'11 | 12 Q1'12 | 9 Q2'12 | 12 Q3'12 | 9 Q4'12 | 10 Mathematical Representation of data and calculation of Moving average and then centered moving average Period Value MA Centered 1 9 1.5 2 8 2.5 9.5 3 9 9.5 3.5 9.5 4 12 10.0 4.5 10.5 5 9 10.750 5.5 11.0 6 12 6.5 7 9 I am stuck with the implementation of RecordReader which will provide mapper sales value of a year i.e. of four quarter. The RecordReader Problem Question Thread Thanks

    Read the article

  • algorithmes with no executable example code

    - by gcc
    [link] http://stackoverflow.com/questions/2932016/parsing-of-mathematical-expressions (problem has been told before) ** program is to create the infix tree for the given math expression.** if the expression is given completely paranthesized then the out put is fine but when there are no paranthesis or some part paranthesized then the out put is wrong. cant get the idea how to solve. my problem is told above. I have some algorithm to solve my problem, but I have no simple code which will be guide for me. Can anyone give me simple code (not working code) so that I will try working to understand.(for a 3 hours ,I have been searching and reading some text to understand algorithm which is told above.Actually,there is no example code investigating how it is working. Can anyone send me example which is written in c not other language.

    Read the article

  • Programming tutorials for people with zero experience

    - by www.aegisub.net
    A friend of mine is interested in learning how to program computers, but she knows nothing about programming. I suggested that Python might be a good language to start with, but after some googling, I couldn't find any tutorials that covered both programming and Python in an adequate way. I don't want her to go through the tiresome "learn algorithms in pseudocode first" routine. Instead, I'd like a tutorial that will explain the basic ideas while working towards a real goal, e.g. a very simple console game. Does anyone know of any such tutorials? Do you think that I'm mistaken in how I'm handling this? Is Python a bad choice? I know that something like C, C++ or Java won't work - too many details will be very counterproductive. On the other hand, I think that Lisp might be too mathematical and abstract. Python, on the other hand, will let her even do something like coding primitive graphical games in a short period of time.

    Read the article

  • Are there any well-known algorithms or computer models that computer scientists use to predict FIFA

    - by Khnle
    Occasionally I read news articles that mention about some computer models that computer scientists use to predict winners of some sporting events or the odds for betting which I think there must be a mathematical model behind it. I never bothered to think twice even though I am a "pseudo computer scientist" myself. With the 2010 FIFA World Cup just underway, and since I am also a "pseudo football/soccer player" myself, I just started to wonder about these calculations algorithms. For example, I know one factor is determining the strength of opponents, so that a win against a strong opponent can count more than a win against a weak opponent. But it now kind of gets in a circular loop, or at least how does one determine the strength of a team in the first place, before that team can be considered strong or weak? If it's based on a historical data then there's no way that could be accurate, because those players of the past are no longer on the fields so their impact is none (except maybe if they become coaches like Maradona) Anyway, long question short, if you're happen to be working in this field or have some knowledge, please shed some lights.

    Read the article

  • What is considered bleeding edge in programming these days?

    - by iestyn
    What is "bleeding edge" these days? has it all been done before us, and we are just discovering new ways of implementing mathematical constructs within programming? Functional Programming seems to be making inroads in all areas, but is this just marketing to create interest in a programming arena where it appears that the state of the art has climaxed too soon. have the sales men got hold of the script, and selling ideas that can be sold, dumbing down the future? I see very old ideas making their way into the market place....what are the truly new things that should be considered fresh and new in 2010 onwards, and not some 1960-1980 idea being refocused.

    Read the article

  • skipping certain number of frames on a timeline

    - by clamp
    hi, i have a mathematical problem which is a bit hard to describe, but i'll give it a try anyway. in a timeline, i have a number of frames, of which i want to skip a certain number of frames, which should be evenly distributed along the timeline. for example i have 10 frames and i want to skip 5, then the solution is easy: we skip every second frame. 10/5 = 2 if (frame%2 == 0) skip(); but what if the above division does result in a floating number? for example in 44 frames i want to skip 15 times. how can i determine the 15 frames which should be skipped? thanks!

    Read the article

  • Where can I find an array of the unassigned Unicode code points for a particular block?

    - by gitparade
    At the moment, I'm writing these arrays by hand. For example, the Miscellaneous Mathematical Symbols-A block has an entry in hash like this: my %symbols = ( ... miscellaneous_mathematical_symbols_a => [(0x27C0..0x27CA), 0x27CC, (0x27D0..0x27EF)], ... ) The simpler, 'continuous' array miscellaneous_mathematical_symbols_a => [0x27C0..0x27EF] doesn't work because Unicode blocks have holes in them. For example, there's nothing at 0x27CB. Take a look at the code chart [PDF]. Writing these arrays by hand is tedious, error-prone and a bit fun. And I get the feeling that someone has already tackled this in Perl!

    Read the article

  • Where can I find an array of the (un)assigned Unicode code points for a particular block?

    - by gitparade
    At the moment, I'm writing these arrays by hand. For example, the Miscellaneous Mathematical Symbols-A block has an entry in hash like this: my %symbols = ( ... miscellaneous_mathematical_symbols_a => [(0x27C0..0x27CA), 0x27CC, (0x27D0..0x27EF)], ... ) The simpler, 'continuous' array miscellaneous_mathematical_symbols_a => [0x27C0..0x27EF] doesn't work because Unicode blocks have holes in them. For example, there's nothing at 0x27CB. Take a look at the code chart [PDF]. Writing these arrays by hand is tedious, error-prone and a bit fun. And I get the feeling that someone has already tackled this in Perl!

    Read the article

  • algorithm to combine data for linear fit?

    - by BoldlyBold
    I'm not sure if this is the best place to ask this, but you guys have been helpful with plenty of my CS homework in the past so I figure I'll give it a shot. I'm looking for an algorithm to blindly combine several dependent variables into an index that produces the best linear fit with an external variable. Basically, it would combine the dependent variables using different mathematical operators, include or not include each one, etc. until an index is developed that best correlates with my external variable. Has anyone seen/heard of something like this before? Even if you could point me in the right direction or to the right place to ask, I would appreciate it. Thanks.

    Read the article

  • Is It Worth Using Bitwise Operators In Methods?

    - by user1626141
    I am very new to Java (and programming in general, my previous experience is with ActionScript 2.0 and some simple JavaScript), and I am working my way slowly and methodically through Java: A Beginner's Guide by Herbert Schildt. It is an incredible book. For one thing, I finally understand more-or-less what bitwise operators (which I first encountered in ActionScript 2.0) do, and that they are more efficient than other methods for certain sums. My question is, is it more efficient to use a method that uses, say, a shift right, to perform all your divisions/2 (or divisions/even) for you in a large program with many calculations (in this case, a sprawling RPG), or is it more efficient to simply use standard mathematical operations because the compiler will optimise it all for you? Or, am I asking the wrong question entirely?

    Read the article

  • Update someones birthday with javascript

    - by user2768038
    So far the only mathematical way I can think of doing it is this: var age = 18 var today = new Date(); var myDate = new Date(); myDate.setFullYear(2013,3,13); /* My birthday is april 13th */ var y = (today - myDate); var days = ( y / (1000*60*60*24)); if(days >= 360){ var age = age +1; } if(days >= 720){ var age = age +1; } //etc...... document.write(age); Is there a better way of doing the if statements? so that I don't have to write one out for every year? I can't think!

    Read the article

  • [perl] where can i find an array of the Unicode code points for a particular block?

    - by gitparade
    At the moment, I'm writing these arrays by hand. For example, the Miscellaneous Mathematical Symbols-A block has an entry in hash like this: my %symbols = ( ... miscellaneous_mathematical_symbols_a => [(0x27C0..0x27CA), 0x27CC, (0x27D0..0x27EF)], ... ) The simpler, 'continuous' array miscellaneous_mathematical_symbols_a => [0x27C0..0x27EF] doesn't work because Unicode blocks have holes in them. For example, there's nothing at 0x27CB. Take a look at the code chart [PDF]. Writing these arrays by hand is tedious, error-prone and a bit fun. And I get the feeling that someone has already tackled this in Perl!

    Read the article

  • Where can I find an array of the Unicode code points for a particular block?

    - by gitparade
    At the moment, I'm writing these arrays by hand. For example, the Miscellaneous Mathematical Symbols-A block has an entry in hash like this: my %symbols = ( ... miscellaneous_mathematical_symbols_a => [(0x27C0..0x27CA), 0x27CC, (0x27D0..0x27EF)], ... ) The simpler, 'continuous' array miscellaneous_mathematical_symbols_a => [0x27C0..0x27EF] doesn't work because Unicode blocks have holes in them. For example, there's nothing at 0x27CB. Take a look at the code chart [PDF]. Writing these arrays by hand is tedious, error-prone and a bit fun. And I get the feeling that someone has already tackled this in Perl!

    Read the article

  • Casting in mixed type calculations in C?

    - by yCalleecharan
    Hi, If I define these variables: double x0, xn, h; int n; and I have this mathematical expression: h = (xn - x0)/n; Is it necessary that I cast n into double prior doing the division for maximum accuracy like in h = (xn - x0)/ (double) n; I wrote a program to check the above but both expressions give the same answers. I understand that C will promote the integer to double type as variables xn and x0 are of type double but strangely enough in a book, the second expression with casting was emphasized. Thanks a lot...

    Read the article

  • Creating problem-sets with answers in Latex

    - by ARV
    Hello everyone. I want to typeset Mathematical problem-sets in Latex. My requirements are as follows: When I type them in, I want the questions and the answers to be next to each other in the source-code so that fixing errors, etc. can be done easily. However, when the document is typeset, I want the answers to appear in a separate "Answers" section just the way they do in textbooks. Does anyone know of a way to do this? Many thanks in advance!

    Read the article

  • SQL SERVER – Fix : Error 3623 – An invalid floating point operation occurred

    - by pinaldave
    Going back in time, I always had a problem with mathematics. It was a great subject and I loved it a lot but I only mastered it after practices a lot. I learned that mathematics problems should be addressed systematically and being verbose is not a trick, I learned to solve any problem. Recently one of reader sent me an email with the title “Mathematics problem – please help!” and I was a bit scared. I was good at mathematics but not the best. When I opened the email I was relieved as it was Mathematics problem with SQL Server. My friend received following error while working with SQL Server. Msg 3623, Level 16, State 1, Line 1 An invalid floating point operation occurred. The reasons for the error is simply that invalid usage of the mathematical function is attempted. Let me give you a few examples of the same. SELECT SQRT(-5); SELECT ACOS(-3); SELECT LOG(-9); If you run any of the above functions they will give you an error related to invalid floating point. Honestly there is no workaround except passing the function appropriate values. SQRT of a negative number will give you result in real numbers which is not supported at this point of time as well LOG of a negative number is not possible (because logarithm is the inverse function of an exponential function and the exponential function is NEVER negative). When I send above reply to my friend he did understand that he was passing incorrect value to the function. As mentioned earlier the only way to fix this issue is finding incorrect value and avoid passing it to the function. Every mathematics function is different and there is not a single solution to identify erroneous value passed. If you are facing this error and not able to figure out the solution. Post a comment and I will do my best to figure out the solution. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Imperative Programming v/s Declarative Programming v/s Functional Programming

    - by kaleidoscope
    Imperative Programming :: Imperative programming is a programming paradigm that describes computation in terms of statements that change a program state. In much the same way as the imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands for the computer to perform. The focus is on what steps the computer should take rather than what the computer will do (ex. C, C++, Java). Declarative Programming :: Declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. It attempts to minimize or eliminate side effects by describing what the program should accomplish, rather than describing how to go about accomplishing it. The focus is on what the computer should do rather than how it should do it (ex. SQL). A  C# example of declarative v/s. imperative programming is LINQ. With imperative programming, you tell the compiler what you want to happen, step by step. For example, let's start with this collection, and choose the odd numbers: List<int> collection = new List<int> { 1, 2, 3, 4, 5 }; With imperative programming, we'd step through this, and decide what we want: List<int> results = new List<int>(); foreach(var num in collection) {     if (num % 2 != 0)           results.Add(num); } Here’s what we are doing: *Create a result collection *Step through each number in the collection *Check the number, if it's odd, add it to the results With declarative programming, on the other hand, we write the code that describes what you want, but not necessarily how to get it var results = collection.Where( num => num % 2 != 0); Here, we're saying "Give us everything where it's odd", not "Step through the collection. Check this item, if it's odd, add it to a result collection." Functional Programming :: Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions.Functional programming has its roots in the lambda calculus. It is a subset of declarative languages that has heavy focus on recursion. Functional programming can be a mind-bender, which is one reason why Lisp, Scheme, and Haskell have never really surpassed C, C++, Java and COBOL in commercial popularity. But there are benefits to the functional way. For one, if you can get the logic correct, functional programming requires orders of magnitude less code than imperative programming. That means fewer points of failure, less code to test, and a more productive (and, many would say, happier) programming life. As systems get bigger, this has become more and more important. To know more : http://stackoverflow.com/questions/602444/what-is-functional-declarative-and-imperative-programming http://msdn.microsoft.com/en-us/library/bb669144.aspx http://en.wikipedia.org/wiki/Imperative_programming   Technorati Tags: Ranjit,Imperative Programming,Declarative programming,Functional Programming

    Read the article

  • Data Modeling Resources

    - by Dejan Sarka
    You can find many different data modeling resources. It is impossible to list all of them. I selected only the most valuable ones for me, and, of course, the ones I contributed to. Books Chris J. Date: An Introduction to Database Systems – IMO a “must” to understand the relational model correctly. Terry Halpin, Tony Morgan: Information Modeling and Relational Databases – meet the object-role modeling leaders. Chris J. Date, Nikos Lorentzos and Hugh Darwen: Time and Relational Theory, Second Edition: Temporal Databases in the Relational Model and SQL – all theory needed to manage temporal data. Louis Davidson, Jessica M. Moss: Pro SQL Server 2012 Relational Database Design and Implementation – the best SQL Server focused data modeling book I know by two of my friends. Dejan Sarka, et al.: MCITP Self-Paced Training Kit (Exam 70-441): Designing Database Solutions by Using Microsoft® SQL Server™ 2005 – SQL Server 2005 data modeling training kit. Most of the text is still valid for SQL Server 2008, 2008 R2, 2012 and 2014. Itzik Ben-Gan, Lubor Kollar, Dejan Sarka, Steve Kass: Inside Microsoft SQL Server 2008 T-SQL Querying – Steve wrote a chapter with mathematical background, and I added a chapter with theoretical introduction to the relational model. Itzik Ben-Gan, Dejan Sarka, Roger Wolter, Greg Low, Ed Katibah, Isaac Kunen: Inside Microsoft SQL Server 2008 T-SQL Programming – I added three chapters with theoretical introduction and practical solutions for the user-defined data types, dynamic schema and temporal data. Dejan Sarka, Matija Lah, Grega Jerkic: Training Kit (Exam 70-463): Implementing a Data Warehouse with Microsoft SQL Server 2012 – my first two chapters are about data warehouse design and implementation. Courses Data Modeling Essentials – I wrote a 3-day course for SolidQ. If you are interested in this course, which I could also deliver in a shorter seminar way, you can contact your closes SolidQ subsidiary, or, of course, me directly on addresses [email protected] or [email protected]. This course could also complement the existing courseware portfolio of training providers, which are welcome to contact me as well. Logical and Physical Modeling for Analytical Applications – online course I wrote for Pluralsight. Working with Temporal data in SQL Server – my latest Pluralsight course, where besides theory and implementation I introduce many original ways how to optimize temporal queries. Forthcoming presentations SQL Bits 12, July 17th – 19th, Telford, UK – I have a full-day pre-conference seminar Advanced Data Modeling Topics there.

    Read the article

  • JavaScript in different browsers

    - by PointsToShare
    Adventures with JavaScript rendered in IE 8, Chrome 15, and Firefox 8.0 I have written a little monogram about the advantages of Math and wrote a few JavaScript applications to demonstrate them. I was a bit careless and used elements on the page in my JavaScript without using any of the GetElementsByXXXX methods to identify them.  Say I had a text box named tbSeqNum into which I entered a number to be used in a computation. In my code I simply referred to its value by using it directly. Like here: Function Blah() {                 return tbSeqNum.value; } This ran fine in IE8. In IE, the elements are available as global variables. This is not the case in either Firefox or Chrome. In there one has to create the variable and only then use it. Assuming I also used tbSeqNum as the element’s ID, this works: Function Blah() {                 return GetElementById(“tbSeqNum”).value; } Naturally this corrected function also works in IE, so be warned. Also, coming from windows programming (I am long in the tooth and programmed long before the internet), I have a habit of putting an “Exit” button on my pages and setting their onclick to: onclick=”window.close()”. Again, this works fine in IE. In Firefox and chrome, it does not! There you can only close a window that you opened in the code. A window that was opened by navigation to a URL will not close.  Before I deployed mu code to my website, I painfully removed all my Exit buttons. But my greatest surprise came when I tested my pages in the various browsers. In my code I do a comparison on the performance of two algorithms used to solve the same problem. One is brute force, the other uses a mathematical formula. The compare functions runs each many times and displays the time it took for each and also the ratio. Chrome runs JavaScript between 5 and 10 times faster than Firefox and between 50 and 100 times faster that IE. Wow!!! This difference is especially remarkable when the code uses iteration. I suspect that the JS engines in Chrome and Firefox simply cache the result of a function and if it is called again with the same parameters, it returns the cached result. To see it in action play run the “How Many Squares” page in www.mgsltns.com/games.htm The host is running on Unix, so the link is case sensitive. Last Note: IE9 runs JS a bit faster, but still lags behind almost as badly. That’s All Folks!

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >