Search Results

Search found 592 results on 24 pages for 'digit'.

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

  • Extract german zipcode from line in Java

    - by tzippy
    hello! I need to extract the zipcode from file's line. each line contains an adress and is formatted in a different way. eg. "Großen Haag 5c, DE-47559 Kranenburg" or "Lange Ruthe 7b, 55294 Bodenheim" the zipcode is always a five digit number and sometimes follows "DE-". I use Java. Thanks a lot!

    Read the article

  • Regular Expression question

    - by Mohammad Kotb
    Hi, In my academic assignment, I want make a regular expression to match a word with the following specifications: word length greater than or equal 1 and less than or equal 8 contains letters, digits, and underscore first digit is a letter only word is not A,X,S,T or PC,SW I tried for this regex but can't continue (My big problem is to make the word not equal to PC and SW) ([a-zA-Z&&[^AXST]])|([a-zA-Z][\w]{0,7}) But in the previous regex I didn't handle the that it is not PC and SW Thanks,

    Read the article

  • Tweet's xml format

    - by Anand Kulkarni
    I get ' top tweets ' from twitter as an RSS feed in xml format . There is a guid field in that xml format. There is a long 11 digit number at the end of guid field , is it unique for every tweet ?

    Read the article

  • How to find files according RegEx in C#

    - by bao
    I need to get list of files on some drive with paths that matches specific pattern, for example FA\d\d\d\d.xml where \d is digit (0,1,2..9). So files can have names like FA5423.xml. What is the most efficient name to do this?

    Read the article

  • How to convert binary, OCT, HEX to calculate in Java?

    - by user316751
    Write an application that inputs one number consisting of FIVE digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 12345, the program should print 1 2 3 4 5 The following screen dump of result is for your reference. Input a digit: 12345 Digits in 12345 = 1 2 3 4 5 How to convert binary, OCT, HEX to calculate the question?

    Read the article

  • Base 62 conversion in Python

    - by mikl
    How would you convert an integer to base 62 (like hexadecimal, but with these digits: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'). I have been trying to find a good Python library for it, but they all seems to be occupied with converting strings. The Python base64 module only accepts strings and turns a single digit into four characters. I was looking for something akin to what URL shorteners use.

    Read the article

  • Drupal: Renumbering node ids

    - by AK
    Having spent some time migrating old data into a new drupal site, my first node id is already into the 4 digit territory. Has anyone had any experience in this position of renumbering node ids starting from #1? Maybe using direct queries on the database, or a module that traverses and renumbers all the nodes? Of course, nodereferences have to be preserved... are there any other potential hangups if I try to script this?

    Read the article

  • How to check for palindrome using Python logic

    - by DrOnline
    My background is only a 6 month college class in basic C/C++, and I'm trying to convert to Python. I may be talking nonsense, but it seems to me C, at least at my level, is very for-loop intensive. I solve most problems with these loops. And it seems to me the biggest mistake people do when going from C to Python is trying to implement C logic using Python, which makes things run slowly, and it's just not making the most of the language. I see on this website: http://hyperpolyglot.org/scripting (serach for "c-style for", that Python doesn't have C-style for loops. Might be outdated, but I interpret it to mean Python has its own methods for this. I've tried looking around, I can't find much up to date (Python 3) advice for this. How can I solve a palindrome challenge in Python, without using the for loop? I've done this in C in class, but I want to do it in Python, on a personal basis. The problem is from the Euler Project, great site btw. def isPalindrome(n): lst = [int(n) for n in str(n)] l=len(lst) if l==0 || l==1: return True elif len(lst)%2==0: for k in range (l) ##### else: while (k<=((l-1)/2)): if (list[]): ##### for i in range (999, 100, -1): for j in range (999,100, -1): if isPalindrome(i*j): print(i*j) break I'm missing a lot of code here. The five hashes are just reminders for myself. Concrete questions: 1) In C, I would make a for loop comparing index 0 to index max, and then index 0+1 with max-1, until something something. How to best do this in Python? 2) My for loop (in in range (999, 100, -1), is this a bad way to do it in Python? 3) Does anybody have any good advice, or good websites or resources for people in my position? I'm not a programmer, I don't aspire to be one, I just want to learn enough so that when I write my bachelor's degree thesis (electrical engineering), I don't have to simultaneously LEARN an applicable programming language while trying to obtain good results in the project. "How to go from basic C to great application of Python", that sort of thing. 4) Any specific bits of code to make a great solution to this problem would also be appreciated, I need to learn good algorithms.. I am envisioning 3 situations. If the value is zero or single digit, if it is of odd length, and if it is of even length. I was planning to write for loops... PS: The problem is: Find the highest value product of two 3 digit integers that is also a palindrome.

    Read the article

  • Dos SET command advanced /A features resource

    - by user66001
    Have done quite a bit of searching for a guide (of any substance) for the above to no avail. Can anyone refer me to one? In the present tense however, I am trying to understand the below code example, which returns a two digit representation of the month, that corresponds to the 3 character month name set in v: SET v=May SET map=Jan-01;Feb-02;Mar-03;Apr-04;May-05;Jun-06;Jul-07;Aug-08;Sep-09;Oct-10;Nov-11;Dec-12 CALL SET v=%%map:*%v%-=%% SET v=%v:;=&rem.% ECHO.%v%

    Read the article

  • How to generate a random but unique number and display that number within the source of my image tag

    - by Matthew
    Hello guys, I have done some searching but really haven't found what I'm looking for. What I would like to do is generate a random BUT unique 5 digit number and push whatever number into an img tag on my page. For example when people come to my page this number would generate and get pushed into this image tag: <img src="http://www.sample.com?randomNUM=12345" height="1" width="1" /> I have a mySQL DB and am looking to do this in PHP. Thank, Matt

    Read the article

  • Change Number Format

    - by gsembilan
    I have a lot lines contains XXXXXXXXX number format. I want change number XXXXXXXXX to XX.XXX.XXX.X XXXXXXXXX = 9 digit random number Anyone can help me? Thanks in advance

    Read the article

  • Delphi - Read File To StringList, then delete and write back to file.

    - by Jkraw90
    I'm currently working on a program to generate the hashes of files, in Delphi 2010. As part of this I have a option to create User Presets, e.g. pre-defined choice of hashing algo's which the user can create/save/delete. I have the create and load code working fine. It uses a ComboBox and loads from a file "fhpre.ini", inside this file is the users presets stored in format of:- PresetName PresetCode (a 12 digit string using 0 for don't hash and 1 for do) On application loading it loads the data from this file into the ComboBox and an Array with the ItemIndex of ComboBox matching the corrisponding correct string of 0's and 1's in the Array. Now I need to implement a feature to have the user delete a preset from the list. So far my code is as follows, procedure TForm1.Panel23Click(Sender : TObject); var fil : textfile; contents : TStringList; x,i : integer; filline : ansistring; filestream : TFileStream; begin //Start Procedure //Load data into StringList contents := TStringList.Create; fileStream := TFileStream.Create((GetAppData+'\RFA\fhpre.ini'), fmShareDenyNone); Contents.LoadFromStream(fileStream); fileStream.Destroy(); //Search for relevant Preset i := 0; if ComboBox4.Text <> Contents[i] then begin Repeat i := i + 1; Until ComboBox4.Text = Contents[i]; end; contents.Delete(i); //Delete Relevant Preset Name contents.Delete(i); //Delete Preset Digit String //Write StringList back to file. AssignFile(fil,(GetAppData+'\RFA\fhpre.ini')); ReWrite(fil); for i := 0 to Contents.Count -1 do WriteLn(Contents[i]); CloseFile(fil); Contents.Free; end; However if this is run, I get a 105 error when it gets to the WriteLn section. I'm aware that the code isn't great, for example doesn't have checks for presets with same name, but that will come, I want to get the base code working first then can tweak and add extra checks etc. Any help would be appreciated.

    Read the article

  • Help in C with integers

    - by inferno2991
    You need to use division and remainder by 10. Consider this example: 163 divided by 10 is 16 remainder 3 16 divided by 10 is 1 remainder 6 1 divided by 10 is 0 remainder 1 You'll notice the remainder is always the last digit of the number that's being divided. Now figure out a way to do this in C... How do i do it in c Help :(

    Read the article

  • How can I create a Zerofilled value using JavaScript?

    - by Wilco
    What is the recommended way to zerofill a value in JavaScript? I imagine I could build a custom function to pad zeros on to a typecasted value, but I'm wondering if there is a more direct way to do this? Note: By "zerofilled" I mean it in the database sense of the word (where a 6-digit zerofilled representation of the number 5 would be "000005").

    Read the article

  • Use Awk to Print every character as its own column?

    - by wizkid84
    Hi there, I am in need of reorganizing a large CSV file. The first column, which is currently a 6 digit number needs to be split up, using comma's as the field separator. For example, I need this: 022250,10:50 AM,274,22,50 022255,11:55 AM,275,22,55 turned into this: 0,2,2,2,5,0,10:50 AM,274,22,50 0,2,2,2,5,5,11:55 AM,275,22,55 Let me know what you think! Thanks!

    Read the article

  • Haskell - interpreting a number

    - by Abstract
    I have a number 9877342931235. Using Haskell, I need to show it as: 987-734293-123-5 i've tried interspersing the list but of course that puts '-' between every digit. How would I do it to yield the actual result?

    Read the article

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