I'd like to generate an array of Random numbers with defined Min, Max, Mean and Stdev with given number of elements and error level. Is there such a library in C, C++, PHP or Python to do so? Please kindly advise. Thanks!
I need to find all strings without a given string before it.
For Instance:
Find: "someValue"
**All results with "function(" before them should be ignored
The Visual Studio regular expression would find this:
value = someValue
And Ignore something looking like this:
function(someValue)
What is the best way to go about this?
Thanks for the help!
I am writing a small windows script in javascript/jscript for finding a match for a regexp with a string that i got by manipulating a file.
The file path can be provided relative or absolute. How to find whether a given path is absolute/relative and convert it to absolute for file manipulation?
I noticed most 3d voxel models are actually pretty low resolution, but then are rendered all smoothed out with some sort of interpolation.
Given its ray traced, what is the algorithm used to render it smoothly? Could anybody suggest a book on the topic?
Suppose I have a given Object (a string "a", a number - let's say 0, or a list ['x','y'] )
I'd like to create list containing many copies of this object, but without using a for loop:
L = ["a", "a", ... , "a", "a"]
or
L = [0, 0, ... , 0, 0]
or
L = [['x','y'],['x','y'], ... ,['x','y'],['x','y']]
I'm especially interested in the third case.
Thanks!
Hi, how do I compute the business days in a week given the parameters: start date, end date and current week? The duration of the range for the start date and end date may go over a year.
Given:
DateTime.UtcNow
How do I get a string which represents the same value in an ISO 8601 compliant format?
Note that ISO 8601 defines a number of similar formats: (Wikipedia). The specific format I am looking for is:
yyyy-MM-ddTHH:mm:ssZ
Lets say I have a integer result and an array of integers, lets say [a,b,c] (not a fixed length). I need to detect if result=a*i +b*j + c*k, with i,j,k=0.
I prefer a solution in C/C# if it is possible.
PS The problem is from a reservation system, a trip can be sold if its durations is a combination of given durations.
Thanks!
I need to get an estimate for the number of unique visitors, given a domain name. I want to use this value in a calculation, so unfortunately a traffic rank, as in an Alexa rank will not work.
Is there any way, using AWIS or any other such web service to get an estimate of the number of visitors? It doesn't have to be particularly accurate.
I want to get automatically to the positions of the results in Vim after grepping, on command line. Is there such feature?
Files to open in Vim on the lines given by grep:
% grep --colour -n checkWordInFile *
SearchToUser.java:170: public boolean checkWordInFile(String word, File file) {
SearchToUser.java~:17: public boolean checkWordInFile(String word, File file) {
SearchToUser.java~:41: if(checkWordInFile(word, f))
Can I get somehow(from a database or other source) a percentage of the phones that would support a J2ME Midlet application given all the JSR's it uses ?
I'm trying to design a program that draws graphs given a set of points (x, y), and it also should recognize the curve (straight line, hyperbole, parabola), with only the help of the points.
Is there an algorithm to do that?
I.e.
Month Returns
January 1
February 2
March 3
April 4
May 5
June 6
July 7
August 8
September 9
October 10
November 11
December 12
I've seen examples using mktime when given the number of the month and returning the month string, but not the reverse.
I am looking for a service that can tell me if a given name is Male or Female. I have a list of names (possibly geo-tagged) and I want to filter out the Males/Females out of them. Any thoughts?
Type mismatch. Expecting a LexBuffer but given a LexBuffer The type 'char' does not match the type 'byte'
This is the error message that I am getting while using fslex. I have tried manually checking every single occurrence of lexbuf and its type. It's LexBuffer everywhere. But still the compiler is giving me the above error. Can you please tell me why this error occurs and how to go about resolving it.
Thanks,
chandrasekhar
I need to get the exact start and end dates (month, day and year) of a given year.
E.g., 2008
Jan. 1, 2008
Mar, 30, 2008
Any thoughts on how to do this?
array = [2007, 2008, 2009, 2010]
array.each do |a|
#code to get array of date for a (year)
end
Hi, I was wondering if some of you know about a library in php so that I can pass a date and a cron expression and it tells me wether the date satisfies the cron expression or not. The java Quartz library is able to do that (and more like getting the next valid date for a given cron expression) but I was wondering if this is possible using php.
Thank you!
Write a program which, given a list of up to 10 integer numbers and a sum, will display a subset of the numbers whose total is that sum if one exists or indicate that none exists otherwise. For example, for the list: 5,13,24,9,3,3 and sum = 28, your program should display 13, 9, 3, 3.
How to do this in C++ using a recursive function?
Hi,
I need mySQL timestamp for start of current week or any given date, if week starts with monday?
I'm trying something like:
SELECT UNIX_TIMESTAMP(CONCAT( DATE_SUB(CURDATE(), INTERVAL WEEKDAY(DATE_SUB(CURDATE(), INTERVAL 7 DAY)) DAY), ' 00:00:00')) as start
XML based serializers have variable size output for a given class. I can't use them to append data to my Memcached list, since I won't be able to retrieve that information later.
But if I knew my serializer produced a fixed size output (N bytes), I could retrieve my data by splitting my list in N bytes chunks and then deserializing those chunks individually.
I have created my own serializer for my class, but what other serializers I could use?
Like the title says, I'm trying to find out if I need to include a script library that my ASP.net UserControl needs to work. I don't want to include it multiple times per page, but I want my control to be able to be used multiple times on the same page.
How can I, in the codebehind of my control, check to see if a given <script/> tag is present?
This is .Net 2.0, no LINQ.
Given the Following Code how Would i Change/Set my Silverlight WCF Service URI in code?
mySvc.InsertPOCompleted += new EventHandler<SalesSimplicityPO_SL.POSvc.InsertPOCompletedEventArgs>(mySvc_InsertPOCompleted);
mySvc.InsertPOAsync(InitialsTextBox.Text.ToString(), DescTextBox.Text.ToString(), ClientTextBox.Text.ToString());