Search Results

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

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

  • Run Google-apps-script on Google-Spreadsheet event?

    - by jdk
    If I create a Google apps script, can I hook it up to Google spreadsheet to run based on an event, or must I manually invoke it? I don't know if Google spreadsheet supports any events. For example: a Google app script that strikes out rows in the spreadsheet that have been marked completed by way of a column having the digit 1 beside completed rows. I would like this to run whenever a row is modified, or even when the spreadsheet is first loaded.

    Read the article

  • Given year, month and day, all in int, how would I generate an NSDate

    - by BU
    I think the solution is really simple, I just haven't come across it online. Suppose I am given int year, int month, int day, int hour, int min, int sec.. how do I generate NSDate out of it? I know we can use [NSDate initWithString:] but I think it gets complicated if month/day/hour/min/sec are one digit numbers. Thanks in advance for your help.

    Read the article

  • Facebook publishActivity: No error, but no activity published

    - by carlo.capocasa
    Hi, implementing publishActivity in PHP using the REST API using this code: $activity = array( 'message' => '{*actor*} did something.', 'action_link' => array( 'text' => 'Play Travians', 'href' => WEBROOT ) ); $activity = $facebook->api_client->dashboard_publishActivity($activity); I get a 15-digit number returned and no errors, however no activity appears in the logged in account or friends of this account. Help appreciated. Carlo

    Read the article

  • Haskell: Left-biased/short-circuiting function

    - by user2967411
    Two classes ago, our professor presented to us a Parser module. Here is the code: module Parser (Parser,parser,runParser,satisfy,char,string,many,many1,(+++)) where import Data.Char import Control.Monad import Control.Monad.State type Parser = StateT String [] runParser :: Parser a -> String -> [(a,String)] runParser = runStateT parser :: (String -> [(a,String)]) -> Parser a parser = StateT satisfy :: (Char -> Bool) -> Parser Char satisfy f = parser $ \s -> case s of [] -> [] a:as -> [(a,as) | f a] char :: Char -> Parser Char char = satisfy . (==) alpha,digit :: Parser Char alpha = satisfy isAlpha digit = satisfy isDigit string :: String -> Parser String string = mapM char infixr 5 +++ (+++) :: Parser a -> Parser a -> Parser a (+++) = mplus many, many1 :: Parser a -> Parser [a] many p = return [] +++ many1 p many1 p = liftM2 (:) p (many p) Today he gave us an assignment to introduce "a left-biased, or short-circuiting version of (+++)", called (<++). His hint was for us to consider the original implementation of (+++). When he first introduced +++ to us, this was the code he wrote, which I am going to call the original implementation: infixr 5 +++ (+++) :: Parser a -> Parser a -> Parser a p +++ q = Parser $ \s -> runParser p s ++ runParser q s I have been having tons of trouble since we were introduced to parsing and so it continues. I have tried/am considering two approaches. 1) Use the "original" implementation, as in p +++ q = Parser $ \s - runParser p s ++ runParser q s 2) Use the final implementation, as in (+++) = mplus Here are my questions: 1) The module will not compile if I use the original implementation. The error: Not in scope: data constructor 'Parser'. It compiles fine using (+++) = mplus. What is wrong with using the original implementation that is avoided by using the final implementation? 2) How do I check if the first Parser returns anything? Is something like (not (isNothing (Parser $ \s - runParser p s) on the right track? It seems like it should be easy but I have no idea. 3) Once I figure out how to check if the first Parser returns anything, if I am to base my code on the final implementation, would it be as easy as this?: -- if p returns something then p <++ q = mplus (Parser $ \s -> runParser p s) mzero -- else (<++) = mplus Best, Jeff

    Read the article

  • ORA-00904: "FORMAT": invalid identifier

    - by gary A.K.A. G4
    I am trying to format a date: FORMAT(table.TCKT.TCKT_ISS_DATE, 'YYYY') AS TICKETYEAR but I am getting the following error: ORA-00904: "FORMAT": invalid identifier Right now the date show the complete timestamp. Any suggestions on how to fix this problem, or any other way to format the date to just show the four digit year?

    Read the article

  • Fixed number format in ANTLR

    - by sarav
    How to specify a fixed digit number in antlr grammar? I want to parse a line which contains fields of fixed number of characters. Each field is a number. 0034|9056|4567|0987|-2340| +345|1000 The above line is a sample line. | indicates field boundaries. The fields can include blank characters +/-

    Read the article

  • How can I detect short phone numbers in iPhone web views?

    - by Pedro
    G'day All Most Australian phone numbers are 10 digits with the 1st 2 optional if they're a local area code. For those setting... viewer.dataDetectorTypes = UIDataDetectorTypePhoneNumber; on a web view works. We also have a range of 6 digit phone numbers (usually written xxx xxx or xx xxxx) which aren't being detected in my app. Is there a way to detect those phone numbers as well? Cheers & TIA, Pedro :)

    Read the article

  • iPhone web views - detecting short phone numbers

    - by Pedro
    G'day All Most Australian phone numbers are 10 digits with the 1st 2 optional if they're a local area code. For those setting... viewer.dataDetectorTypes = UIDataDetectorTypePhoneNumber; on a web view works. We also have a range of 6 digit phone numbers (usually written xxx xxx or xx xxxx) which aren't being detected in my app. Is there a way to detect those phone numbers as well? Cheers & TIA, Pedro :)

    Read the article

  • Google Docs not importing CSVs consistently

    - by nick
    Hey everyone, I'm trying to import some csv data into google docs spreadsheet. The data I am entering is all made up of 16 digit integers. About 90% of them are imported perfectly but 10% are rewritten automatically into scientific notation. How do I turn this feature of. I just want all the numbers kept in their standard form. Kind Regards Nick

    Read the article

  • Compare double till precision 2

    - by Ram
    Hi, I want to compare two double values till the second digit from decimal point. I am using following statement but I think it is not working properly. dbl1.ToString("g2", CultureInfo.InvariantCulture).Equals( dbl2.ToString("g2", CultureInfo.InvariantCulture)) Am I missing anything here?

    Read the article

  • Alternatives to requiring users to register for an account?

    - by jamieb
    I'm working on a side project to build a new web app idea of mine. For the sake of discussion, let's say this app displays a random photograph of a famous work of art. On a scale of 1 to 5, users are asked to rate how well they like each piece of art, and then are shown the next photo. Eventually, the app is able to get an sense of the person's style and is able to recommend artwork that he/she may find pleasing. The whole concept is similar to Netflix. I understand how to do all the preference matching logic (although not as sophisticated as Netflix). But I'd like to find a way to do this without requiring that users create an account first. This is a novelty website that a typical user might use only a handful of times. Requiring registration is overkill and will likely drastically reduce it's utility. I'd like to allow people to begin rating artwork within five seconds of their initial pageview, yet maintain the integrity of the voting (since recommendations are predicated on how other people have rated the various pieces of artwork). Can it be done? Some ideas: OpenID. The perfect solution except for the fact that it's not wildly used and my target audience isn't the most technically adept demographic. Text message. User inputs phone number and is texted a four digit code to key into the web app. Quick, easy, and great way to limit abuse. However, privacy concerns abound... people are probably even less likely to give me their phone number than their email address. Facebook login. I personally don't have a Facebook account due to privacy concerns. And I'd really hate to support such a proprietary platform. Hash code/Bookmark. Vistor's initial pageview generates a 5 or 6 digit alphanumeric code that is embedded in each subsequent URL. They can bookmark any page to save their state. Good: Very simple system that doesn't require any user action. Bad: Very easy to stuff the ballot box, might be difficult to account for users sharing the link containing their ID code via email or social networking sites.

    Read the article

  • image viewer website

    - by ehab refaat
    i asked to make a website to view images and manage it's actions like max, min, autofit,..... (some thing like picasa but as a web application ) what is the suitable tool for that. JSF, JBoos Seam, dojo, digit ? and if any reference to enhance my skills on that branch will be appreciated.

    Read the article

  • What's the best way to do base36 arithmetic in perl?

    - by DVK
    What's the best way to do base36 arithmetic in Perl? To be more specific, I need to be able to do the following: Operate on positive N-digit numbers in base 36 (e.g. digits are 0-9 A-Z) N is finite, say 9 Provide basic arithmetic, at the very least the following 3: Addition (A+B) Subtraction (A-B) Whole division, e.g. floor(A/B). Strictly speaking, I don't really need a base10 conversion ability - the numbers will 100% of time be in base36. So I'm quite OK if the solution does NOT implement conversion from base36 back to base10 and vice versa. I don't much care whether the solution is brute-force "convert to base 10 and back" or converting to binary, or some more elegant approach "natively" performing baseN operations (as stated above, to/from base10 conversion is not a requirement). My only 3 considerations are: It fits the minimum specifications above It's "standard". Currently we're using and old homegrown module based on base10 conversion done by hand that is buggy and sucks. I'd much rather replace that with some commonly used CPAN solution instead of re-writing my own bicycle from scratch, but I'm perfectly capable of building it if no better standard possibility exists. It must be fast-ish (though not lightning fast). Something that takes 1 second to sum up 2 9-digit base36 numbers is worse than anything I can roll on my own :) P.S. Just to provide some context in case people decide to solve my XY problem for me in addition to answering the technical question above :) We have a fairly large tree (stored in DB as a bunch of edges), and we need to superimpose order on a subset of that tree. The tree dimentions are big both depth- and breadth- wise. The tree is VERY actively updated (inserts and deletes and branch moves). This is currently done by having a second table with 3 columns: parent_vertex, child_vertex, local_order, where local_order is an 9-character string built of A-Z0-9 (e.g. base 36 number). Additional considerations: It is required that the local order is unique per child (and obviously unique per parent), Any complete re-ordering of a parent is somewhat expensive, and thus the implementation is to try and assign - for a parent with X children - the orders which are somewhat evenly distributed between 0 and 36**10-1, so that almost no tree inserts result in a full re-ordering.

    Read the article

  • Handling equals sign and question mark in URL

    - by Ron
    Hello, I am new to regex and am trying to extract from a database a list of URLs that match xyz.asp? followed by any eight digit RequestID numbers. I can't figure out what is wrong with my expression: /abcd/..asp\?\w+=.?[0-9]*? Example: http://domain.com/abcd/xyz.asp?RequestID=20100401 Do I have it wrong with 1) not starting/ending with ^$ 2) escaping the dot 3) escaping the question mark 4) matching the equals sign 5) or something else? Thank you

    Read the article

  • function parameter used to store value

    - by user248247
    Hi, I have to define an interface. The API in my homework is stated below: int generate_codes(char * ssn, char * student_id); int denotes 0 or 1 for pass or fail. studentid is an output param should return a 6 digit id. ssn is a 9 digit input param they school program will take ssn's and use my code to generate the student id. now from an API perspective should I not be using const char * for both parameters. should the studentid not be passed in by reference? rather than by pointer? can someone tell me how i can easily use the pointer in my test app which uses my api to get the pointer such that it prints a std::string from a char *? my app code looks something like const char * ssn = "987098765" const char * studnt_id = new char [7]; int value = -1; value = generate_codes(ssn,studnt_id); std::string test(studnt_id); std::cout<<"student id= "<<test<<" Pass/fail= "<<value<<std::endl; delete [] studnt_id; return 0; I basically got an error about << not being compatible with the right hand side of the operand. When i changed the code to std::cout<<"student id= "<<test.c_str()<<" Pass/fail= "<<value<<std::endl; then it worked but i get garbage for the value. not sure how to do get the value form the pointer. THe value inside the function prints just fine. but when i try to print it outside of the function it prints garbage. Inside the above function I do set the studndt_id like so std::string str_studnt_id = studnt_id; should that make the address of the str_studnt point to the address of studnt_id and thus any changes I make to the value that its pointing to it should reflect outside the function?

    Read the article

  • How to update multiple rows with different values in mysql?

    - by user210481
    I have a table with a column 'A'. Some rows have 14 digits for the column 'A' and some have only 12. I need to transform all the entries to 14 digits. The datatype is varchar I would like to update all the rows at once (one query), adding zeros before the first digit, so an entry like 012345678910 would become 00012345678910. Is it possible to do it in one single query? Thanks

    Read the article

  • javascript number split

    - by Jaron787
    Can anyboyd help me split up this date number in javascript so that when it is outputted to the screen it has slashes between the 4th and 5th number and the 6th and 7th number, so that it can be understood by a vxml voice browser. The number can be any value so i need it to work for any eight digit number. Like so: 20100820 2010/08/20 Many thanks

    Read the article

  • Year dropdown range - when do we stop?

    - by Andrew Heath
    I attended a payroll software demo yesterday wherein the year dropdowns throughout the software ran from 2000 to 2200. Now, we've all been down this road before with 2 digit shortsight, but honestly - a 200 year service life for a Java & Oracle payroll system? Our Board of Directors would be thrilled if the company was even solvent for 1/4th that long. When forced to use a dropdown year select, where do you draw the line?

    Read the article

  • Possible loss of precision; extracting char from string

    - by Troy
    I am getting a string from the user and then doing some checking to make sure it is valid, here is the code I have been using; char digit= userInput.charAt(0) - '0'; This had been working fine until I did some work on another method, I went to compile and have been receiving a 'possible loss of precision' error since then. What am I doing wrong?

    Read the article

  • help with .htaccess RewriteRule

    - by FFish
    What is the rewrite rule for following URL mysite.com/001234-some-keywords.html I want to capture the 6 digit reference number something like ([0-9]{6}) my indexed file is templates/default/index.php?ref=001234 One day I do a crashcourse regex.. I promise.

    Read the article

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