Search Results

Search found 6674 results on 267 pages for 'pin numbers'.

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

  • Unable to Export contents of Data table (with French formatted Numbers ) to XML

    - by Ananth
    I have a data Table with numbers formatted according to the current regional settings. ie ( in French decimal separators are ',' instead of '.' in English). I need to export it to XML. Numbers in XML needs to be formatted according to the current regional settings.But now numbers in XML are formatted in English.Is there any way to make the number formatting in XML according to current regional settings ( or based on the locale of the Data Table) during the exporting process ?

    Read the article

  • Javascript Number Random Scrambler

    - by stjowa
    Hi, I need a Javascript random number scrambler for my website. Seems simple, but I can not figure out how to do it. Can anyone help me out? I have the following array of numbers: 1 2 3 4 5 6 7 8 9 I would like to be able to have these numbers scrambled randomly. Like the following: 3 6 4 2 9 5 1 8 7 or 4 1 7 3 5 9 2 6 8 So, specifically, I would like a function that takes in an array of numbers (1 - n) and then returns that same array of numbers - scrambled randomly with different calls to the function. Maybe a noob function, but can't seem to figure it out. Thanks!

    Read the article

  • Five unique, random numbers from a subset

    - by tau
    I know similar questions come up a lot and there's probably no definitive answer, but I want to generate five unique random numbers from a subset of numbers that is potentially infinite (maybe 0-20, or 0-1,000,000). The only catch is that I don't want to have to run while loops or fill an array. My current method is to simply generate five random numbers from a subset minus the last five numbers. If any of the numbers match each other, then they go to their respective place at the end of the subset. So if the fourth number matches any other number, it will bet set to the 4th from the last number. Does anyone have a method that is "random enough" and doesn't involve costly loops or arrays? Please keep in mind this a curiosity, not some mission-critical problem. I would appreciate it if everyone didn't post "why are you having this problem?" answers. I am just looking for ideas. Thanks a lot!

    Read the article

  • Using a set of numbers inside a database without creating a temporary table

    - by Zizzencs
    I have a set of numbers and a table in a database with the id (primary key) and text (not null) columns. I would like to create a query that returns all the numbers in the set and the associated text from the table. Unfortunately not all numbers exist in the database's id column, so this won't work: select id, text from table where id in (<set of numbers>) For the non-existing ids the best would be to return null as the text from the query. Is there a way to produce the desired output without first creating a temporary table from the set inside the database? The database engine in use is a Microsoft SQL Server 2008 SP1 but I'd be interested in any solution with any database engine.

    Read the article

  • Haskell. Numbers in binary numbers. words

    - by Katja
    Hi! I need to code words into binary numbers. IN: "BCD..." OUT:1011... I have written already funktion for coding characters into siple numbers IN: 'C' OUT: 3 IN: 'c' OUT: 3 lett2num :: Char -> Int lett2num x | (ord 'A' <= ord x) && (ord x <= ord 'Z') = (ord x - ord 'A') + 1 | (ord 'a' <= ord x) && (ord x <= ord 'z') = (ord x - ord 'a') +1 num2lett :: Int -> Char num2lett n | (n <= ord 'A') && (n <= ord 'Z') = chr(ord 'A'+ n - 1) | (n <= ord 'a') && (n <= ord 'Z') = chr(ord 'A'+ n - 1) I wrote as well function for codind simple numbers into binary. num2bin :: Int->[Int] num2bin 0 = [] num2bin n | n>=0 = n `mod` 2 : (num2bin( n `div` 2)) | otherwise = error but I donw want those binary numbers to be in a list how can I get rid of the lists? Thanks

    Read the article

  • Find numbers that equals a sum in an array

    - by valli-R
    I want to find the first set of integers in an array X that the sum equals a given number N. For example: X = {5, 13, 24, 9, 3, 3} N = 28 Solution = {13, 9, 3, 3} Here what I have so far : WARNING, I know it uses global and it is bad,that's not the point of the question. <?php function s($index = 0, $total = 0, $solution = '') { global $numbers; global $sum; echo $index; if($total == 28) { echo '<br/>'.$solution.' = '.$sum.'<br/>'; } elseif($index < count($numbers) && $total != 28) { s($index + 1, $total, $solution); s($index + 1, $total + $numbers[$index], $solution.' '.$numbers[$index]); } } $numbers = array(5, 13, 24, 9, 3, 3); $sum = 28; s(); ?> I don't get how I can stop the process when it finds the solution.. I know I am not far from good solution.. Thanks in advance

    Read the article

  • Best way to associate phone numbers with names

    - by Horace Loeb
    My application stores lots of its users friends' phone numbers. I'd like to allow users to associate names with these phone numbers, but I don't want to make users manually type in names (obviously). I'm curious what the best overall approach is here, as well as the best way to implement it Overall approach-wise, I imagine using Gmail / Yahoo / Windows Live contacts is best (the Facebook API doesn't let you access phone numbers), though the gems I've found for interacting with these contacts APIs (this and this) only give you access to the names and email addresses of each contact.

    Read the article

  • Extract string that is delimited with constant and ends with two numbers (numbers have to be included)

    - by Edmon
    I have a text that contains string of a following structure: text I do not care about, persons name followed by two IDs. I know that: a person's name is always preceded by XYZ code and that is always followed by two, space separated numbers. Name is not always just a last name and first name. It can be multiple last or first names (think Latin american names). So, I am looking to extract string that follows the constant XYZ code and that is always terminated by two separate numbers. You can say that my delimiter is XYZ and two numbers, but numbers need to be part of the extracted value as well. From blah, blah XYZ names, names 122322 344322 blah blah I want to extract: names, names 122322 344322 Would someone please advise on the regular expression for this that would work with Python's re package.

    Read the article

  • How computer multiplies 2 numbers?

    - by ckv
    How does a computer perform a multiplication on 2 numbers say 100 * 55. My guess was that the computer did repeated addition to achieve multiplication. Of course this could be the case for integer numbers. However for floating point numbers there must be some other logic. Note: This was asked in an interview.

    Read the article

  • C# program for finding how many numbers are devidable by 5 in give range

    - by user1639735
    My task is: Write a program that reads two positive integer numbers and prints how many numbers p exist between them such that the reminder of the division by 5 is 0 (inclusive). Example: p(17,25) = 2. Console.Write("Enter min: "); int min = int.Parse(Console.ReadLine()); Console.Write("Enter max: "); int max = int.Parse(Console.ReadLine()); Console.WriteLine("The numbers devidable by 5 without remainder from {0} to {1} are: ",min,max); for (int i = min; i <= max; i++) { if (i % 5 == 0) { Console.WriteLine(i); } } This prints out the numbers that are devidable by 5 in the range...How do I count how many are there and print the count in the console? Thanks.

    Read the article

  • Convert String containing several numbers into integers

    - by GobiasKoffi
    I realize that this question may have been asked several times in the past, but I am going to continue regardless. I have a program that is going to get a string of numbers from keyboard input. The numbers will always be in the form "66 33 9" Essentially, every number is separated with a space, and the user input will always contain a different amount of numbers. I'm aware that using 'sscanf' would work if the amount of numbers in every user-entered string was constant, but this is not the case for me. Also, because I'm new to C++, I'd prefer dealing with 'string' variables rather than arrays of chars.

    Read the article

  • Sorting a list of numbers with modified cost

    - by David
    First, this was one of the four problems we had to solve in a project last year and I couldn’t find a suitable algorithm so we handle in a brute force solution. Problem: The numbers are in a list that is not sorted and supports only one type of operation. The operation is defined as follows: Given a position i and a position j the operation moves the number at position i to position j without altering the relative order of the other numbers. If i j, the positions of the numbers between positions j and i - 1 increment by 1, otherwise if i < j the positions of the numbers between positions i+1 and j decreases by 1. This operation requires i steps to find a number to move and j steps to locate the position to which you want to move it. Then the number of steps required to move a number of position i to position j is i+j. We need to design an algorithm that given a list of numbers, determine the optimal (in terms of cost) sequence of moves to rearrange the sequence. Attempts: Part of our investigation was around NP-Completeness, we make it a decision problem and try to find a suitable transformation to any of the problems listed in Garey and Johnson’s book: Computers and Intractability with no results. There is also no direct reference (from our point of view) to this kind of variation in Donald E. Knuth’s book: The art of Computer Programing Vol. 3 Sorting and Searching. We also analyzed algorithms to sort linked lists but none of them gives a good idea to find de optimal sequence of movements. Note that the idea is not to find an algorithm that orders the sequence, but one to tell me the optimal sequence of movements in terms of cost that organizes the sequence, you can make a copy and sort it to analyze the final position of the elements if you want, in fact we may assume that the list contains the numbers from 1 to n, so we know where we want to put each number, we are just concerned with minimizing the total cost of the steps. We tested several greedy approaches but all of them failed, divide and conquer sorting algorithms can’t be used because they swap with no cost portions of the list and our dynamic programing approaches had to consider many cases. The brute force recursive algorithm takes all the possible combinations of movements from i to j and then again all the possible moments of the rest of the element’s, at the end it returns the sequence with less total cost that sorted the list, as you can imagine the cost of this algorithm is brutal and makes it impracticable for more than 8 elements. Our observations: n movements is not necessarily cheaper than n+1 movements (unlike swaps in arrays that are O(1)). There are basically two ways of moving one element from position i to j: one is to move it directly and the other is to move other elements around i in a way that it reaches the position j. At most you make n-1 movements (the untouched element reaches its position alone). If it is the optimal sequence of movements then you didn’t move the same element twice.

    Read the article

  • Help constructing query - Compare columns and replace numbers

    - by Tommy
    I have a feeling that this query is pretty easy to construct, I just can't figure it out. I want to replace all numbers in table X column C, with numbers in table Z column A, where numbers from table X column C matches numbers in table Z column B. I hope that makes sense. Perhaps a little background information will make it clearer. I've converted from one CMS to another, and the module I used to convert mapped the ids to the new database. Table X column A is the new id's. Table X column B is the old id's. Table Z is the table for an image gallery that I migrated, and column C contains the id's of the images owners. Can anyone crack this nut?

    Read the article

  • Create numbers within an array that add up to a set amount

    - by RussellDias
    I'm fairly new to PHP - programming in general. So basically what I need to accomplish is, create an array of x amount of numbers (created randomly) who's value add up to n: Lets say, I have to create 4 numbers that add up to 30. I just need the first random dataset. The 4 and 30 here are variables which will be set by the user. Essentially something like x = amount of numbers; n = sum of all x's combined; create x random numbers which all add up to n; $row = array(5, 7, 10, 8) // these add up to 30 Also, no duplicates are allowed. I need the values with an array. I have been messing around with it sometime, however, my knowledge is fairly limited. Any help will be greatly appreciated. Cheers

    Read the article

  • finding the numbers in a given range?

    - by Jamis
    Hi Friends, kindly tel me the concept to write a perl program behind this ? 167 GATCAAAATACTTGCTGGA 185 192 TAGTAGATAGATAGATAGTAGTAG 228 in a fileA i ve a range from 167 to 185 as given as above and also 192 to 228 in another fileB i ve set of numbers 2 3 4 5 6 7 8 168 169 179 185 193 1000 now from the above set of numbers in file B, i need to find out which are the numbers present between the range of 167 to 185 and print those numbers in the output. so, output will be 168,169,179,185, 193 what will be the concept behind writing this program?

    Read the article

  • Scaling range of values with negative numbers

    - by Pradeep Kumar
    How can I scale a set of values to fit a new range if they include negative numbers? For example, I have a set of numbers (-10, -9, 1, 4, 10) which have to scaled to a range [0 1], such that -10 maps to 0, and 10 maps to 1. The regular method for an arbitrary number 'x' would be: (x - from_min) * (to_max - to_min) / (from_max - from_min) + to_min but this does not work for negative numbers. Any help is appreciated. Thanks!!

    Read the article

  • Extracting numbers from a url using javascript?

    - by stormist
    var exampleURL = '/example/url/345234/test/'; var numbersOnly = [?] The /url/ and /test portions of the path will always be the same. Note that I need the numbers between /url/ and /test. In the example URL above, the placeholder word example might be numbers too from time to time but in that case it shouldn't be matched. Only the numbers between /url/ and /test. Thanks!

    Read the article

  • Microphones not working on Apple macbook Air 1,1 (Early 2008) under Linux

    - by jj_p
    I'm running Linux on an mba. I can't make the microphones (neither external nor internal) work. I test using alsamixer and arecord -d 5 test-mic.waw together with aplay test-mic.waw It seems there is a problem with kernel trying to decipher Apple (intentionally) corrupted 'bios', in particular the mic pins are wrongly assigned. As far as we are concerned here, is there any difference between using EFI and BIOS-compatibility mode? (see https://wiki.archlinux.org/index.php/MacBook where they claim to have everything working out of the box on mba1,1) A nice proposal would be to compile the latest Linux kernel and run hda-jack-retask to find the right configuration (in the case of Realtek codec, the missing things I'm supposed to check are either some vendor-specific COEF verbs, EAPD or GPIO setup.), and then come up with a kernel patch to address the issue. Since I'm not that familiar with this last part of the story, can anyone help me through this process? Some useful data: The output from alsa script run as root http://www.alsa-project.org/db/?f=adae8ebee1007043fe83414ac4972319e02255fa The command hda-jack-sense-test -a (with external mic in) Pin 0x14 (Internal Speaker): present = No Pin 0x15 (Green HP Out): present = Yes Pin 0x16 (Not connected): present = No Pin 0x17 (Not connected): present = No Pin 0x18 (Not connected): present = No Pin 0x19 (Not connected): present = No Pin 0x1a (Not connected): present = No Pin 0x1b (Not connected): present = No Pin 0x1c (Not connected): present = No Pin 0x1d (Not connected): present = No Pin 0x1e (Not connected): present = No Pin 0x1f (Not connected): present = No Most likely the chip is Realtek ALC885 (compare also ALC889A) http://guide-images.ifixit.net/igi/bBTSqaeK5JpQ1AWe.large , although at the moment alsa reads it as ALC889A Takashi Iwai's tutorial https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt Some people researched the original files from a running OS X installation on this same model (I think the relevant files are AppleHDA.kext/Contents/MacOS/AppleHDA AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.p????list AppleHDA.kext/Contents/Resources/layout12.xml.zlib AppleHDA.kext/Contents/Resources/Platforms.xml.zlib) http://www.insanelymac.com/forum/topic/220090-alc889a-pin-configuration/#entry1554954 Datasheet http://www.realtek.info/pdf/ALC885_1-1.pdf (from the same Realtek, one can also try to download Linux driver, but this is just taken from ALSA project, as stated in the readme file.) Compare with this Arch guy http://www.alsa-project.org/db/?f=3ca8243c0626844f0264a3faad0aa72018bc14f4 Here for the first time support to audio (except mics) for mba1,2 (which is morally the same as 1,1) is patched into the kernel http://www.alsa-project.org/pipermail/alsa-devel/2010-February/025511.html The same jack supposedly works both for HP and ext MIC, I think it's called TRRS, and it's the same as the one used e.g. for iphones This guy might have done a similar job, though to a more recent version and for sound globally, not just mics: http://blogs.aerys.in/jeanmarc-leroux/2013/09/15/fixing-2013-macbook-air-ubuntu-sound-issue/ (this is mirror to http://unix.stackexchange.com/questions/73044/microphones-not-working-on-apple-macbook-air-1-1-early-2008-under-linux )

    Read the article

  • Asterisk - Trying to use call files to create a conference call between two dynamic numbers

    - by Hank
    I'm trying to setup an Asterisk system that will allow me to create a conference call between two dynamic numbers. It seems I can use 'call files' to make Asterisk initiate the call without needing an incoming call - http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out This example seems to be what I'd need: Channel: SIP/mytrunk/12345678 MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: callme Extension: 800 Priority: 2 I can generate this file with some scripting language and then place it into the Asterisk Call File folder. The problem I'm having is: How do I call out to two numbers and join them in a conference call? The MeetMe plugin/extension seems to be what I need in terms of conference calling, I'm just unsure as to how I'd use the two together and join them. Also, is it possible to have multiple 2-person conference calls at the same time? Is setting this up as simple as setting aside X amount of 'channels' in the meetme.conf?

    Read the article

  • Asterisk - Trying to use call files to create a conference call between two dynamic numbers

    - by Hank
    I'm trying to setup an Asterisk system that will allow me to create a conference call between two dynamic numbers. It seems I can use 'call files' to make Asterisk initiate the call without needing an incoming call - http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out This example seems to be what I'd need: Channel: SIP/mytrunk/12345678 MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: callme Extension: 800 Priority: 2 I can generate this file with some scripting language and then place it into the Asterisk Call File folder. The problem I'm having is: How do I call out to two numbers and join them in a conference call? The MeetMe plugin/extension seems to be what I need in terms of conference calling, I'm just unsure as to how I'd use the two together and join them. Also, is it possible to have multiple 2-person conference calls at the same time? Is setting this up as simple as setting aside X amount of 'channels' in the meetme.conf?

    Read the article

  • Using international phone numbers on iPhone [closed]

    - by Cawas
    Spin off question Is it possible to hack a SIM card to add a javacard application on it (to properly format international numbers)? If yes, how? Original Question In my previous phone carrier I could just dial +55 11 99883655 and it would just work. Now I moved to a new carrier and it doesn't work anymore! When I dial the same international number it keeps saying the number isn't formated correctly. How can I get my iPhone to understand international numbering back again? I've got over 100 contacts with numbers stored in this format already, and I want to keep them that way. edit: I originally asked this question here, moved it to apple stackexchange and now I'm bringing a new one (hopefuly).

    Read the article

  • Context is Hindi when printing line numbers in Word 2007

    - by Lessan Vaezi
    I'm trying to print a Word 2007 document with Line Numbering turned on, and in Word the document looks fine but when I print the document, the line numbers appear in Hindi script. See screenshots here: http://www.lessanvaezi.com/context-is-hindi-when-printing-line-numbers-in-word-2007/ I tried deleting my Normal template and allowing Word to create a new one, and testing using that, with no change. I also tried using different printers. The problem goes away if I choose Arabic instead of Context under Word Options - Advanced - Show Document Content / Numeral. However, I would like to keep this setting as Context. The question is, why is the default context of my document Hindi script? Is there a way to change this context?

    Read the article

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