Search Results

Search found 2134 results on 86 pages for 'numeric limits'.

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

  • Boost Python - Limits to the number of arguments when wrapping a function

    - by Derek
    I'm using Boost Python to wrap some C++ functions that I've created. One of my C++ functions contains 22 arguments. Boost complains when I try to compile my solution with this function, and I'm trying to figure out if it is just because this function has too many arguments. Does anyone know if such a limit exists? I've copied the error I'm getting below, not the code because I figure someone either knows the answer to this or not - and if there is no limit then I'll just try to figure it out myself. Thanks very much in advance! Here is a copy of the beginning of the error message I receive... 1>main.cpp 1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): error C2780: 'boost::mpl::vector17<RT,most_derived<Target,ClassT>::type&,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> boost::python::detail::get_signature(RT (__thiscall ClassT::* )(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile const,Target *)' : expects 2 arguments - 1 provided 1>c:\cpp_ext\boost\boost_1_47\boost\python\signature.hpp(236) : see declaration of 'boost::python::detail::get_signature' And eventually I get about a hundred copies of error messages very much resembling this one: 1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): error C2784: 'boost::mpl::vector17<RT,ClassT&,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> boost::python::detail::get_signature(RT (__thiscall ClassT::* )(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile const)' : could not deduce template argument for 'RT (__thiscall ClassT::* )(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile const' from 'std::string (__cdecl *)(const std::string &,jal::date::JULIAN_DATE,const std::string &,const std::string &,int,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,int,const std::string &,const std::string &,int,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,int,const std::string &)' 1> c:\cpp_ext\boost\boost_1_47\boost\python\signature.hpp(218) : see declaration of 'boost::python::detail::get_signature' 1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): error C2780: 'boost::mpl::vector17<RT,most_derived<Target,ClassT>::type&,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> boost::python::detail::get_signature(RT (__thiscall ClassT::* )(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile,Target *)' : expects 2 arguments - 1 provided 1> c:\cpp_ext\boost\boost_1_47\boost\python\signature.hpp(236) : see declaration of 'boost::python::detail::get_signature'

    Read the article

  • LabVIEW: converting numeric array to string array

    - by JaysonFix
    Using LabVIEW 2009, I have a VI that outputs an array of U64 integers. I'd like the user to be able to perform discrete selection from among the elements of this array. I'm thinking of accomplishing this by programmatically populating a Menu Ring (as shown at http://digital.ni.com/public.nsf/allkb/FB0409491FAB16FA86256D08004FCE7E). However, I apparently need to convert my array of U64 ints to an array of strings, as it is an array of strings that is used to populate the Menu Ring. My question: how can I convert the array of U64 ints to an array of strings?

    Read the article

  • Django ORM and PostgreSQL connection limits

    - by bennylope
    I'm running a Django project on Postgresql 8.1.21 (using Django 1.1.1, Python2.5, psycopg2, Apache2 with mod_wsgi 3.2). We've recently encountered this lovely error: OperationalError: FATAL: connection limit exceeded for non-superusers I'm not the first person to run up against this. There's a lot of discussion about this error, specifically with psycopg, but much of it centers on older versions of Django and/or offer solutions involving edits to code in Django itself. I've yet to find a succinct explanation of how to solve the problem of the Django ORM (or psycopg, whichever is really responsible, in this case) leaving open Postgre connections. Will simply adding connection.close() at the end of every view solve this problem? Better yet, has anyone conclusively solved this problem and kicked this error's ass?

    Read the article

  • Reading numeric Excel data as text using xlrd in Python

    - by Brian
    Hi guys, I am trying to read in an Excel file using xlrd, and I am wondering if there is a way to ignore the cell formatting used in Excel file, and just import all data as text? Here is the code I am using for far: import xlrd xls_file = 'xltest.xls' xls_workbook = xlrd.open_workbook(xls_file) xls_sheet = xls_workbook.sheet_by_index(0) raw_data = [['']*xls_sheet.ncols for _ in range(xls_sheet.nrows)] raw_str = '' feild_delim = ',' text_delim = '"' for rnum in range(xls_sheet.nrows): for cnum in range(xls_sheet.ncols): raw_data[rnum][cnum] = str(xls_sheet.cell(rnum,cnum).value) for rnum in range(len(raw_data)): for cnum in range(len(raw_data[rnum])): if (cnum == len(raw_data[rnum]) - 1): feild_delim = '\n' else: feild_delim = ',' raw_str += text_delim + raw_data[rnum][cnum] + text_delim + feild_delim final_csv = open('FINAL.csv', 'w') final_csv.write(raw_str) final_csv.close() This code is functional, but there are certain fields, such as a zip code, that are imported as numbers, so they have the decimal zero suffix. For example, is there is a zip code of '79854' in the Excel file, it will be imported as '79854.0'. I have tried finding a solution in this xlrd spec, but was unsuccessful.

    Read the article

  • Numeric comparison difficulty in R

    - by Matt Parker
    I'm trying to compare two numbers in R as a part of a if-statement condition: (a-b) >= 0.5 In this particular instance, a = 0.58 and b = 0.08... and yet (a-b) >= 0.5 is false. I'm aware of the dangers of using == for exact number comparisons, and this seems related: (a - b) == 0.5) is false, while all.equal((a - b), 0.5) is true. The only solution I can think of is to have two conditions: (a-b) > 0.5 | all.equal((a-b), 0.5). This works, but is that really the only solution? Should I just swear off of the = family of comparison operators forever?

    Read the article

  • PHP Curl and Loop based on a numeric value

    - by danit
    Im using the Twitter API to collect the number of tweets I've favorited, well to be accurate the total pages of favorited tweets. I use this URL: http://api.twitter.com/1/users/show/username.xml I grab the XML element 'favorites_count' For this example lets assume favorites_count=5 The Twitter API uses this URL to get the favorties: http://twitter.com/favorites.xml (Must be authenticated) You can only get the last 20 favorties using this URL, however you can alter the URL to include a 'page' option by adding: ?page=3 to the end of the favorites URL e.g. http://twitter.com/favorites.xml?page=2 So what I need to do is use CURL (I think) to collect the favorite tweets, but using the URL: http://twitter.com/favorites.xml?page=1 http://twitter.com/favorites.xml?page=2 http://twitter.com/favorites.xml?page=3 http://twitter.com/favorites.xml?page=4 etc... Some kind of loop to visit each URL, and collect the Tweets and then output the cotents. Can anyone help with this: - Need to use CURL to authenticate - Collect the number of pages of tweets (Already scripted this) - Then use a loop to go through each page URL based on the pages value?

    Read the article

  • Binning a numeric variable in R

    - by McPeterson
    I have a vector X that contains positive numbers that I want to bin/discretize. For this vector, I want the numbers [0, 10) to show up just as they exist in the vector, but numbers [10,∞) to be 10+. I'm using: x <- c(0,1,3,4,2,4,2,5,43,432,34,2,34,2,342,3,4,2) binned.x <- as.factor(ifelse(x > 10,"10+",x)) but this feels klugey to me. Does anyone know a better solution or a different approach? mcpeterson

    Read the article

  • Graphics/Bitmap Limits?

    - by Dean
    Im having some weird problems with Graphics and Bitmap. I have a Graphics Object that is displayed on a PictureBox and im capturing the MouseMove and MouseClick Events that give X and Y Position of the Mouse on the Image but if the Y Position goes Bigger then 32775 it then goes into Negatives which means everything breaks. And if the Image is Bigger then 65535 it then stops displaying the Image. Any Ideas how these problems can be fixed? Thanks Example Code: http://pastebin.com/YEX0XD1q Just Click Make 10,000 Bigger about 4 times then scroll down and on the right it will show the mouse X and Y position and as you move down through the image and hover over the Red Area if you go down enough it will go into Negative Y.

    Read the article

  • A database of questions with unambiguous numeric answers.

    - by dreeves
    I (and co-hackers) are building a sort of trivia game inspired by this blog post: http://messymatters.com/calibration. The idea is to give confidence intervals and learn how to be calibrated (when you're "90% sure" you should be right 90% of the time). We're thus looking for, ideally, thousands of questions with unambiguous numerical answers. Also, they shouldn't be too boring. There are a lot of random statistics out there -- eg, enclosed water area in different countries -- that would make the game mind-numbing. Things like release dates of classic movies are more interesting (to most people). Other interesting ones we've found include Olympic records, median incomes for different professions, dates of famous inventions, and celebrity ages. Scraping things like above, by the way, was my reason for asking this question: http://stackoverflow.com/questions/2611418/scrape-html-tables So, if you know of other sources of interesting numerical facts (in a parsable form) I'm eager for pointers to them. Thanks!

    Read the article

  • Parsing specific numeric data from csv file using python

    - by KJ Lim
    Good morning. I have series of data in cvs file like below, 1,,, 1,137.1,1198,1.6 2,159,300,0.4 3,176,253,0.3 4,197,231,0.3 5,198,525,0.7 6,199,326,0.4 7,215,183,0.2 8,217.1,178,0.2 9,244.2,416,0.5 10,245.1,316,0.4 I want to extract specific data from second column for example 217.1 and 245.1 and have them concatenated into a new file like, 8,217.1,178,0.2 10,245.1,316,0.4 I use cvs module to read my cvs file, but, I can't extract specific data as I desire. Could anyone kindly please help me. Thank you.

    Read the article

  • Yahoo Web Scrapes: What are the limits?

    - by bvandrunen
    We are using a web scraper and have it set up to have a sleep function which has a random function set up (so that it isn't the same time between each scrape) but we are still getting blocked from Yahoo after 20-30 requests. Does any one know if there is a limit (i.e: 20 requests per minutes, 200 an hour) Right now our average between each request is around 3-6 seconds. Thanks for any help

    Read the article

  • Numeric operations over SHA-1 generated keys in C#

    - by webdreamer
    I'm trying to implement a Chord distributed hash table. I want to use SHA-1 as the hash function to generate node ids and map values to the DHT. However, I'll need to use numerical operations on the SHA-1 generated key, such as a modulo, for example. I wonder in which type of variable should I put the array of bytes I get, and how can I convert from one to another.

    Read the article

  • Reading numeric Date value from CSV file to data.frame in "R"

    - by Dick Eshelman
    D <- read.csv("sample1.csv", header = FALSE, sep = ",") D V1 V2 V3 V4 1 20100316 109825 352120 239065 2 20100317 108625 352020 239000 3 20100318 109125 352324 241065 D[,1] [1] 20100316 20100317 20100318 In the above example how do I get the data in D[,1] to be read, and stored as date values: 2010-03-16, 2010-03-17, 2010-03-18 ? I have lots of data files in this format. TIA,

    Read the article

  • Database: Storing Dates as Numeric Values

    - by Chin
    I'm considering storing some date values as ints. i.e 201003150900 Excepting the fact that I lose any timezone information, is there anything else I should be concerned about with his solution? Any queries using this column would be simple 'where after or before' type lookups. i.e Where datefield is less than 201103000000 (before March next year). currently the app is using MSSQL2005. Any pointers to pitfalls appreciated.

    Read the article

  • Calculate date from numeric value

    - by elias
    The number 71867806 represents the present day, with the smallest unit of days. How can I calculate the currente date from it? (or) convert it into an Unix timestamp? Solution shouldn't use language depending features. Thanks!

    Read the article

  • update columns when value is numeric in tsql

    - by knittl
    i want to normalize date fields from an old badly designed db dump. i now need to update every row, where the datefield only contains the year. update table set date = '01.01.' + date where date like '____' and isnumeric(date) = 1 and date >= 1950 but this will not work, because sql does not do short circuit evaluation of boolean expressions. thus i get an error "error converting nvarchar '01.07.1989' to int" is there a way to work around this? the column also contains strings with a length of 4, which are not numbers (????, 5/96, 70/8, etc.) the table only has 60000 rows

    Read the article

  • Is it possible to read infinity or NaN values using input streams?

    - by Drise
    I have some input to be read by a input filestream (for example): -365.269511 -0.356123 -Inf 0.000000 When I use std::ifstream mystream; to read from the file to some double d1 = -1, d2 = -1, d3 = -1, d4 = -1; (assume mystream has already been opened and the file is valid), mystream >> d1 >> d2 >> d3 >> d4; mystream is in the fail state. I would expect std::cout << d1 << " " << d2 << " " << d3 << " " << d4 << std::endl; to output -365.269511 -0.356123 -1 -1. I would want it to output -365.269511 -0.356123 -Inf 0 instead. This set of data was output using C++ streams. Why can't I do the reverse process (read in my output)? How can I get the functionality I seek? From MooingDuck: #include <iostream> #include <limits> using namespace std; int main() { double myd = std::numeric_limits<double>::infinity(); cout << myd << '\n'; cin >> myd; cout << cin.good() << ":" << myd << endl; return 0; } Input: inf Output: inf 0:inf See also: http://ideone.com/jVvei Also related to this problem is NaN parsing, even though I do not give examples for it.

    Read the article

  • Comparing numeric strings

    - by Kiren Siva
    From the question PHP Type-Juggling and (strict) Greater/Lesser Than Comparisons I know PHP interpret strings as numbers whenever it can. "10" < "1a" => 10 less than 1 expecting false "1a" < "2" => 1 less than 2 expecting true "10" > "2" => 10 greater than 2 expecting true But in the case of "10" < "1a" php returns true. I am not understanding the concept please help me to clarify it. Edit: But when I add "10" + "1a" it returns 11 that means php interprets "10" as 10 and "1a" as 1. Is that correct?

    Read the article

  • Eliminate subquery for average numeric value

    - by Dave Jarvis
    Quest A query selects locations that begin with Vancouver, which are in a 5 minute radius from one another. SQL Code The following SQL abomination does the trick: SELECT NAME FROM STATION WHERE DISTRICT_ID = '110' AND NAME LIKE 'Vancouver%' AND LATITUDE BETWEEN (SELECT round((min(LATITUDE) + max(LATITUDE)) / 2)-5 FROM STATION WHERE DISTRICT_ID = '110' AND NAME LIKE 'Vancouver%') and (SELECT round((min(LATITUDE) + max(LATITUDE)) / 2)+5 FROM STATION WHERE DISTRICT_ID = '110' AND NAME LIKE 'Vancouver%') AND LONGITUDE BETWEEN (SELECT round((min(LONGITUDE) + max(LONGITUDE)) / 2)-5 FROM STATION WHERE DISTRICT_ID = '110' AND NAME LIKE 'Vancouver%') and (SELECT round((min(LONGITUDE) + max(LONGITUDE)) / 2)+5 FROM STATION WHERE DISTRICT_ID = '110' AND NAME LIKE 'Vancouver%') ORDER BY LATITUDE Question How can this query be simplified to remove the redundancy, without using a view? Restrictions The database is MySQL, but ANSI SQL is always nice. Thank you!

    Read the article

  • mysql custom sorting first alpha then numeric using case when

    - by Nizzy
    How can you sort a query using ORDER BY CASE WHEN REGEXP? or other alternatives? I don't want to use UNION. Thank you mysql> SELECT `floor_id`, `floor_number` FROM `floors`; +----------+--------------+ | floor_id | floor_number | +----------+--------------+ | 1 | 4 | | 2 | 7 | | 3 | G | | 4 | 19 | | 5 | B | | 6 | 3 | | 7 | A | +----------+--------------+ Expected result: +----------+--------------+ | floor_id | floor_number | +----------+--------------+ | 7 | A | | 5 | B | | 3 | G | | 6 | 3 | | 1 | 4 | | 2 | 7 | | 4 | 19 | +----------+--------------+

    Read the article

  • mysql procedure to update numeric reference in previous rows when one is updated

    - by markcial
    There's a table like this one ______________________ | id | title | order | |----------------------| | 1 | test1 | 1 | |-----|--------|-------| | 2 | test2 | 2 | |-----|--------|-------| | 3 | test3 | 3 | |-----|--------|-------| | 4 | test4 | 4 | '----------------------' when i introduce in my mysql shell a single update to a row $sql UPDATE `table` SET order=1 WHERE id=3; And then procedure or method resamples order column in the before update lower values to get its order renewed like this ______________________ | id | title | order | |----------------------| | 1 | test1 | 2 | |-----|--------|-------| | 2 | test2 | 3 | |-----|--------|-------| | 3 | test3 | 1 | |-----|--------|-------| | 4 | test4 | 4 | '----------------------' Any help would be appreciated, thanks!

    Read the article

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