Search Results

Search found 6031 results on 242 pages for 'imaginary numbers'.

Page 122/242 | < Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >

  • Ignoring certain chars globally

    - by shi kui
    Consider it that '_'s in a number doesn't change that number's value so 1000==1_000==10_00. The Problem: given numbers like 1_244_23 1412_2 1_1111 etc..., how could I decide whether certain number appears in that collection? For example: 1244_23 yes, 11_111 yes, 1412_1 no. How could using regex to solve this? I mean, if I could tell the regex engine just ignore these '_''s when matching then this problem becomes trivial? How could I do so?

    Read the article

  • How to centre list-items in a column

    - by unknowndomain
    Hey all, I am trying to centre page numbers at the bottom of this test blog... http://jocelynwarner.com/test/ in the centre between the previous and next buttons however I cannot think how to do it, I tried a few different tutorials but they didn't really seem to help with this. Any hints on how to make them sit centrally in the left column (the width of the blog content - sidebar) would be greatly appreciated.

    Read the article

  • Font Size Based on Char or Number Data

    - by debaucheryx
    I am trying to find a way to display numerical digits as a larger font size than chars on a website (not my idea!). The reason for this is to make the numbers stand out. I have looked for a font that would satisfy this without coding but I could not find any. Also, I don't want to slow down the website by having the font coverted to an image. Does anyone have a solution to this ridiculous problem?

    Read the article

  • Is there a way to check if a var is using setInterval() ?

    - by chadley
    For instance, I am setting an interval like timer = setInterval(fncName, 1000); and if i go and do clearInterval(timer); it does clear the interval but is there a way to check that it cleared the interval? I've tried getting the value of it while it has an interval and when it doesn't but they both just seem to be numbers.

    Read the article

  • Money vs. Decimal vs. Float Performance issues (SQL data types for Currency value)?

    - by urz shah
    What data type should be selected in case of Currency value column in SQL server. I have read some where on web Working on customer implementations, we found some interesting performance numbers concerning the money data type. For example, when Analysis Services was set to the currency data type (from double) to match the SQL Server money data type, there was a 13% improvement in processing speed (rows/sec). Is it true??

    Read the article

  • matrices&searching [closed]

    - by gcc
    question 1) between different characters&real numbers , finding specific one how could i do question 2) myfriend asked me a good question : can we divide two matrices to each other // in math , we havenot learned but maybe someone knows where we find the answer

    Read the article

  • Contact picker with search function

    - by tiex
    This question1 describes a way how to show list of phone numbers and select one of them if my app needs a phone number. But image if I have a huge contact list, it is not enough to just show list but possibility for filtering (by contact's name) is also needed. Is there a standard way to show phones list with picking possibility and with filtering possibility? (I wouldn't like to invent my own) Is there a solution for the problem for sdk 2.0 and lower?

    Read the article

  • Add a + sign to a +ve number in PHP

    - by user318466
    I need to design a function to return -ve numbers unchanged but should add a + sign at the start of the number if its alreay no present. Example: Input Output ---------------- +1 +1 1 +1 -1 -1 It will get only numeric input. function formatNum($num) { # something here..perhaps a regex? } This function is going to be called several times in echo/print so the quicker the better.

    Read the article

  • I need a dictionary-like mapping between characters and other kinds of objects. Which class would be

    - by nullPointerException
    This is in Squeak/Pharo. If I want to have a mapping between Character objects like $a and $b to other kinds of objects, and want to look up those other objects based on the Character, what is the best class to use? Dictionary is an obvious choice, but seems wasteful to be hashing character objects which are basically already numbers. I guess what I want is a kind of array where the character value (number) is used as an index/offset, but I am not sure if this is possible with Unicode.

    Read the article

  • How to find pythagorean triplets in an array faster than O(N^2)?

    - by SS
    Can someone suggest an algorithm that finds all Pythagorean triplets among numbers in a given array? If it's possible, please, suggest an algorithm faster than O(n2). Pythagorean triplet is a set {a,b,c} such that a2 = b2 + c2. Example: for array [9, 2, 3, 4, 8, 5, 6, 10] the output of the algorithm should be {3, 4, 5} and {6, 8, 10}.

    Read the article

  • Implementing GetHashCode

    - by dotnetdev
    Hi, What constitutes a good implementation of the GetHashCode method? I did some googling, and found some goodlines (MSDN) but it seems like the logic just manipulates two numbers stored as fields in the class. Is the actual logic this simple to implement this method?

    Read the article

  • Easy Regex question

    - by Aaron
    Trying to replace the first 12 digits of credit card numbers with X's in a predictable blob of text that contains the string: Credit Card Number: 1234123412341234 Here's my PHP function: preg_replace('/Credit Card Number: ([0-9]{12})/','Credit Card Number: XXXXXXXXXXXX',$str); Help?

    Read the article

  • ActionScript Binding Array Objects?

    - by TheDarkIn1978
    i would like to update the numbers i've added to an array from variables, when those variables change. is it possible change these variables and have the array update automatically? var first:Number = 1; var second:Number = 2; var myArray:Array = new Array(first, second); first = 3; second = 4; trace(myArray) //outputs 1,2

    Read the article

  • The fundamentals of Hash tables?

    - by kylex
    I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array? Basically if someone answered this question I think all my questions would be answered: If I had 100 randomly generated numbers (as keys), how would I implement a hash table and why would that be advantageous over an array? Psuedo-code or Java would be appreciated as a learning tool...

    Read the article

  • Why does this crash: stringByAppendingFormat

    - by Emil
    Hey. My code crashes at this function (at the stringByAppendingFormat: with error objc_msgSend() selector name: stringByAppendingFormat). This is that line: // imagesPath = ...iPhone Simulator/4.0/Applications/NUMBERS/Documents/images UIImage *image = [[UIImage alloc] initWithContentsOfFile:[imagesPath stringByAppendingFormat:@"/%d.png", [[self.postsArrayID objectAtIndex:row] intValue]]]; Could it have something to do with the retaining of objects? Thanks :)

    Read the article

  • Random number in a loop

    - by Sam
    Hi all, having an issue generating random numbers in a loop. Can get around it by using Thread.Sleep but after a more elegant solution. for ... Random r = new Random(); string += r.Next(4); Will end up with 11111... 222... etc. Suggestions?

    Read the article

  • C++ Euler-Problem 14 Program Freezing

    - by Tim
    I'm working on Euler Problem 14: http://projecteuler.net/index.php?section=problems&id=14 I figured the best way would be to create a vector of numbers that kept track of how big the series was for that number... for example from 5 there are 6 steps to 1, so if ever reach the number 5 in a series, I know I have 6 steps to go and I have no need to calculate those steps. With this idea I coded up the following: #include <iostream> #include <vector> #include <iomanip> using namespace std; int main() { vector<int> sizes(1); sizes.push_back(1); sizes.push_back(2); int series, largest = 0, j; for (int i = 3; i <= 1000000; i++) { series = 0; j = i; while (j > (sizes.size()-1)) { if (j%2) { j=(3*j+1)/2; series+=2; } else { j=j/2; series++; } } series+=sizes[j]; sizes.push_back(series); if (series>largest) largest=series; cout << setw(7) << right << i << "::" << setw(5) << right << series << endl; } cout << largest << endl; return 0; } It seems to work relatively well for smaller numbers but this specific program stalls at the number 113382. Can anyone explain to me how I would go about figuring out why it freezes at this number? Is there some way I could modify my algorithim to be better? I realize that I am creating duplicates with the current way I'm doing it: for example, the series of 3 is 3,10,5,16,8,4,2,1. So I already figured out the sizes for 10,5,16,8,4,2,1 but I will duplicate those solutions later. Thanks for your help!

    Read the article

  • NULL value in :conditions =>

    - by Horace Ho
    Contract.all(:conditions => ['voided == ?', 0]).size => 364 Contract.all(:conditions => ['voided != ?', 0]).size => 8 Contract.all.size => 441 the 3 numbers does not added up (364 + 8 != 441). What's the proper way write the :conditions to count the rows which the voided column value is NULL or equal to zero?

    Read the article

  • Converting a string into a double

    - by Koning Baard
    I am trying to convert a string (const char* argv[]) to a double precision floating point number: int main(const int argc, const char *argv[]) { int i; double numbers[argc - 1]; for(i = 1; i < argc; i += 1) { /* -- Convert each argv into a double and put it in `number` */ } /* ... */ return 0; } Can anyone help me? Thanks

    Read the article

< Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >