Search Results

Search found 616 results on 25 pages for 'divide'.

Page 8/25 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Issues with time slicing

    - by user12331
    I was trying to see the effect of time slicing. And how it can consume significant amount of time. Actually, I was trying to divide a certain work into number of threads and see the effect. I have a two core processor. So two threads can run in parallel. I was trying to see if I have a work w that is done by 2 threads, and if I have the same work done by t threads with each thread doing w/t of the work. How much does time slicing play a role in it As time slicing is time consuming process, I was expecting that when I do the same work using a two thread process or by a t thread process, the amount of time taken by the t thread process will be more Any suggestions?

    Read the article

  • Vector normalization gives very imprecise results

    - by Kipras
    When I normalize vectors I receive very strange results. The lengths of the normalized vectors range from 1.0 to almost 1.5. The functions are all written by me, but I just can't find a mistake in my algorithm. When I normalize I just divide all components of the vector by the vector's length. public double length(){ return Math.sqrt(x*x + y*y); } public void normalize(){ if(length() > 0){ x /= length(); y /= length(); } } Is this supposed to happen? I mean I can see the length ranging from 0.9 to 1.1 at worst, but this is just overwhelming. Cheers

    Read the article

  • Architecture driven by users, or by actions/content?

    - by hugerth
    I have a question about designing MVC app architecture. Let's say our application has three main categories of views (items of type 1, items of type 2...). And we have three (or more in future) types of users - Admins, let's say Moderators and typical Users. And in the future there might be more of them. Admins have full access to app, Moderators can visit only 2/3 type of items, and Users can visit only basic type of items. Should I divide my controllers/views/whatever like this: Items "A", Items "B", Items "C", then make them 100% finished and at the end add access privileges? Pros: DRY option Cons Conditional expressions in views Or another options: Items "A" / Admin, Items "A" / Moderator / Items "B" Admin ...? Pros: Divided parts of application for specific user (is that pros?) Cons: A lot of repeated code I don't have great experience in planning such things so it would nice if you can give me some tips or links to learn something about it.

    Read the article

  • Is there a library or other way to do 128-bit math operations?

    - by samoz
    I am writing a cryptography application and need to work with 128 bit numbers. In addition to standard add, subtract, multiply, divide, and comparisons, I also need a power and modulo function as well. Does anyone know of a library or other implementation that can do this? If not 128-bit, is there a 64-bit option available?

    Read the article

  • How do I use try...catch to catch floating point errors?

    - by Peter Stewart
    I'm using c++ in visual studio express to generate random expression trees for use in a genetic algorithm type of program. Because they are random, the trees often generate: divide by zero, overflow, underflow as well as returning "inf" and other strings. I can write handlers for the strings, but the literature left me baffled about the others. If I understand it correctly, I have to set some flags first? Advice and/or a pointer to some literature would be appreciated.

    Read the article

  • Compute data between record of SQL database within Visual Studio

    - by Carl
    Hello, I am attempting to calculate the miles per gallon for logged fuel full-ups. My table consists of the flowing: FillUp(CarID, Date, ODReading, Gallons, StopGo, Highway, FillupID, MPG) I want to subtract the ODReading from the previous record and divide gallons by this computed value. How do I work between records to achieve this within Visual Studio 2008's column properties (formula) section? Thanks much, Carl

    Read the article

  • Frequently Asked Riddles in Job Interviews

    - by Faruz
    Were you asked any logic riddles in job interviews? Are you usually asking riddles in job interviews? What are they, and what are the answers? I was asked once how can you divide evenly 5 apples to 6 people without dividing any apple to 1/6 (or 1/12 or 1/18 etc.). (Would love to hear answers in the comments, I'm not sure my answer was the best)

    Read the article

  • Algorithm for dividing very large numbers

    - by pocoa
    I need to write an algorithm(I cannot use any 3rd party library, because this is an assignment) to divide(integer division, floating parts are not important) very large numbers like 100 - 1000 digits. I found http://en.wikipedia.org/wiki/Fourier_division algorithm but I don't know if it's the right way to go. Do you have any suggestions?

    Read the article

  • python simple function error ?

    - by abhilashm86
    Here's a simple function to do simple math operations, when i call this from other program using import, output i get is none. When i remove def function, everything is working fine. What's the problem with defining this function? I'm new to python. def calci(a, op, b): if op == '+': c = a + b elif op == '-': c = a-b elif op == '*': c= a*b elif op =='/': if(b == 0): print('can\'t divide') c = a/b print('value is',c) return c result = calci(12,'+', 12) print(result) nter code here

    Read the article

  • masm division overflow

    - by Help I'm in college
    I'm trying divide two numbers in assembly. I'm working out of the Irvine assembly for intel computers book and I can't make division work for the life of me. Here's my code .code main PROC call division exit main ENDP division PROC mov eax, 4 mov ebx, 2 div ebx call WriteDec ret divison ENDP END main Where WriteDec should write whatever number is in the eax register (should be set to the quotient after the division call). Instead everytime I run it visual studio crashes (the program does compile however).

    Read the article

  • XSL - Unknown Error in FF media:content/@url

    - by danit
    I keep getting "Unknow Error occurred" when i try this in my XSLT: <table class="TEDtalks"> <xsl:for-each select="/rss/channel/item"> <tr> <td><xsl:value-of select="title"/></td> <td> <xsl:value-of select="media:content/@url" /> </td> </tr> </xsl:for-each> </table> The XML <rss> <channel> <item> <title>TEDTalks : Karen Armstrong: Let's revive the Golden Rule - Karen Armstrong (2009)</title> <itunes:author>Karen Armstrong</itunes:author> <description>Weeks from the Charter for Compassion launch, Karen Armstrong looks at religion's role in the 21st century: Will its dogmas divide us? Or will it unite us for common good? She reviews the catalysts that can drive the world's faiths to rediscover the Golden Rule.&lt;img src="http://feeds.feedburner.com/~r/TEDTalks_video/~4/th6FBgvV22o" height="1" width="1"/&gt;</description> <itunes:subtitle>Karen Armstrong: Let's revive the Golden Rule</itunes:subtitle> <itunes:summary><![CDATA[Weeks from the Charter for Compassion launch, Karen Armstrong looks at religion's role in the 21st century: Will its dogmas divide us? Or will it unite us for common good? She reviews the catalysts that can drive the world's faiths to rediscover the Golden Rule.]]></itunes:summary> <link>http://feedproxy.google.com/~r/TEDTalks_video/~3/th6FBgvV22o/647</link> <guid isPermaLink="false">http://video.ted.com/talks/podcast/KarenArmstrong_2009G.mp4</guid> <pubDate>Tue, 29 Sep 2009 12:46:00 -0500</pubDate> <category>Higher Education</category> <itunes:explicit>no</itunes:explicit> <itunes:duration>00:09:54</itunes:duration> <itunes:keywords>TED</itunes:keywords> <media:content url="http://feedproxy.google.com/~r/TEDTalks_video/~5/XT8k_DqlzGc/KarenArmstrong_2009G.mp4" fileSize="33726021" type="video/mp4" />

    Read the article

  • Firefox extension file structure best practice

    - by user353969
    Is it a good practice to put js files of the "content" folders in inner folders representing their logical module? For example have a "datalayer" and "view" folders? I looked into some well known extensions, such as Firebug, and saw no such devision. I'm a Java developer so its seems much more natural to divide the files logically.

    Read the article

  • Date format error in vb.net ?

    - by ahmed
    I get this error when I run the application Incorrect syntax near 12, on debugging I found that this error is caused due to the # along with the date. Dim backdate as datetime backdate = DateTime.Now.AddDays(-1) on binding the data to the grid to filter the backdate records this error is caused Incorrect syntax near 12. myqry = " select SRNO,SUBJECT,ID where datesend =" backdate Now i am trying to extract only the date or shall I divide the date into day , month and year with DATEPART and take into a variable or convert the date or what should i do , Please help ???

    Read the article

  • Using NSPredicate to segment table by dates in iPhone

    - by pabloruiz55
    I have an array of dictionaries with several jobs. I want to have a table display these jobs sorted by month - year. How could i divide that array so i end up having for example: section: july 2009 and the amount of rows for each job in that date. section: august 2009 and the amount of rows for each job in that date. and so on. Thanks

    Read the article

  • Best way to keep a large number of hobby projects alive; open sourcing?

    - by Daan van Yperen
    Because my time is limited I can usually only focus on one or two of my hobby projects, while the others sit there wasting away. I am looking for a solution that would allow me to divide my time better. is open sourcing where I take the role of guiding the project realistic, or are there better solutions? In my case, one project has a reasonably sized community of users going for it but is currently closed source. There have been requests to open source it.

    Read the article

  • who wrote 250k unit tests for webkit?

    - by amwinter
    assuming a yield of 3 per hour, that's 83000 hours. 8 hours a day makes 10,500 days, divide by thirty to get 342 mythical man months. I call them mythical because writing 125 tests per person per week is unreal. can any wise soul out there on SO shed some light on what sort of mythical men write unreal quantities of tests for large software projects? thank you.

    Read the article

  • Sliding Response after a Point-Square Collision

    - by mars
    In general terms and pseudo-code, what would be the best way to have a collision response of sliding along a wall if the wall is actually just a part of an entire square that a point is colliding into? The collision test method used is a test to see if the point lies in the square. Should I divide the square into four lines and just calculate the shortest distance to the line and then move the point back that distance?If so, then how can I determine which edge of the square the point is closest to after collision?

    Read the article

  • How to maintain decimal percision in calculations

    - by Blankman
    I need to sum 2 decimal values together, then divide by 2 and convert to string. My calculation currently is trimming to 2 decimal places, but I want to keep as many decimals as I can. city.Latitude = ( (lat.North + lat.South) / 2 ).ToString(); the values for lat.North and lat.Souch are like: 55.32342322

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >