I want to create a program for generating the series for the given base-n. ,
for example if my input is 2,then series shuould be, 00,01,10,11,etc.,(binary)
if my input is 10,then series shuould be,1,2,3,4,5,etc.,(decimal)
is there any general mechanism to find these numbers so that I can program for base-n.,
Hello, My TeamCity's nightly build produces more than 130Mb java doc as Build Configuration artifact.
I have to share these artifact for other teams(developers), but javadoc every time has another one URL(I know that it's possible to get it like .lastFinished), and get's new place on Build Machine.
Is it possible on each build replace old artifact with new one because I don't need need previous versions? And have independent from build version URL for accessing.
I know the standard Major.Minor.Build.Revision but there's several considerations for us that are somewhat unique
-We do internal releases almost daily, occasionally more than once a day.
-Windows Installer doesn't check Revision so that's almost moot for our purposes.
-Major and Minor numbers ideally are only updated for public releases and should be done manually.
-That leaves the Build # that needs to be automatically updated.
-We want internal releases to be able to be performed from any developer's machine so that leaves out using x.x.* in Visual Studio because different numbers could be generated from different machines and each build isn't guaranteed to be larger than the previous.
-We have about 15 or so projects as part of the product so saving the version numbers in SVN isn't ideal since every release we'd have commit all those files.
Given those criteria I can't really come up with a good versioning scheme. The last 2 criteria could be dropped but meeting all of those seems ideal. A date stamp is insufficient because we might do more than one a day, and given the max size of Uint32 (around 64000) (Actually using WiX it complains about numbers higher than Int32.MaxValue) a date/time won't fit.
Hi,
In Python if I have 2 lists say:
l1 = ['a', 'b', 'c', 'd']
l2 = ['c', 'd', 'e']
is there a way to find out how many elements they have the same. In the case about it would be 2 (c and d)
I know I could just do a nested loop but is there not a built in function like in php with the array_intersect function
Thanks
Hi all,
I have this query:
SELECT DISTINCT brand_name FROM masterdata WHERE in_stock = '1' ORDER BY brand_name
It works well, except that I get far too many results. How do I limit this such that rather than just looking for distinct entries, it will only give me distinct entries that exist a minimum of 3 times (for example)?
Basically, if the column had this data...
brand_name
==========
apple
banana
apple
apple
orange
banana
orange
orange
...my current query would return "apple, banana, orange". How do I get it such that it only returns "apple, orange" (ignoring banana because it has less than three occurrences)?
I'm using PHP to build the query, if it matters.
Thanks!
Is there a way to set a limit on how many menu items users can add to Primary Links menu? I'm working on a Drupal site and I have a horizontal primary links nav bar. There is only room for no more than 7-8 links in the nav bar. I don't want the future maintainer of the site to add more than 8 items to the menu. Is there a way I can set a limit on that? Some module or override function?
Thanks,
I have a variable with the following value
$month = 201002;
the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name eg. Feb
My code looks like this
<?php echo date('M',substr($month,4,6)); ?>
I can I go about to obtain the month name
Given this table:
Order
custName description to_char(price)
A desa $14
B desb $14
C desc $21
D desd $65
E dese $21
F desf $78
G desg $14
H desh $21
I am trying to display the whole row where prices have the highest occurances, in this case $14 and $21
I believe there needs to be a subquery. So i started out with this:
select max(count(price))
from orders
group by price
which gives me 3.
after some time i didn't think that was helpful. i believe i needed the value 14 and 21 rather the the count so i can put that in the where clause. but I'm stuck how to display that. any help?
I want to insert n elements into a map where n is known ahead of time. I do not want memory allocation at each insertion. I want all memory allocation at the beginning. Is there a way to do this? If so, how? Will writing some sort of memory allocator help?
I know of an Eclipse feature to show revision information (gradual coloring, more info like revisionnumber, date and author on mouseover) for the last changes in a line in the linenumbers-view.
Does anyone know how to activate this feature for a file, or even better, by default? I accidently hit some shortcut lately which made it show in one file, it does not show up in the others, though.
Hi,
I am trying to get access to the AssemblyVersion and AssemblyFileVersion numbers in the assembly information using the post build event command line in visual studio 2008. Is there a way to get access to that information similar to how $(TargetName) gets its macro definition from the project title.
I'd like to know whether it's possible to have phone numbers converted
into international format when a call is outgoing.
For instance, if a french user (sorry it's the only format i know i
won't make a mistake :-) try to call with the national format :
01.47.12.34.56 then a method will convert it into international format
like this : +33.1.47.12.34.56
I've looked into the doc of the PhoneNumberUtils but i don't know if
there is a method doing what i want.
When I change the assembly information to lets say 1.0.0.1 i thought that i could read the version with $(Version) but it seems that it does not change?
I want to use lua (that internally uses only doubles) to represent a integer that can't have rounding errors between 0 and 2^64-1 or terrible things will happen.
Is it possible to do so?
I've used boost::gregorian::date a bit now.
I can see that there are the related months & years & weeks duration types.
I can see how to use known durations to advance a given date.
Qu: But how can I get the difference between two dates in months (or years or weeks) ?
I was hoping to find a function like:
template<typename DURATION>
DURATION date_diff<DURATION>(const date& d1,const date& d2);
There would need to be some handling of rounding too.
hello,
suppose I have a text list in emacs like this:
a
b
c
...
d
Is there a way to assign numbers to those items in Emacs, by selecting the region? End results should look like:
1. a
2. b
3. c
j. ...
n. d
Thanks.
can any one please let me know, i need to set the "Total Price" value to be in two decimal point value like "56.35". Now its showing more fraction values like "56.3566666". I need it to be format it by musql "SELECT" query.
I want to convert 8 digit value to date time how can I do it for example if user enter 08082010 then it should convert it to 08/08/2010, using C#
hope you understand my question, if you need any further info about it please do tell me thanks in advance ,
I have 2 worksheets, one with company data and the other with a min max and answer column.
What i need to do is find out if value in column D in the company data is between the min/max in worksheet 2 output answer in worksheet 2.
Please can someone help. This is clearly a vlookup question but i haven't got a clue how to do the min/max.
Any help will be greatly appreciated.
worksheet 1
NAME TYPE NUMBEROFEMPLOYEES Output
Wetland Plants Ltd Client 4
Capital Management LLP Clients 3
College ltd Clients 156
Worksheet 2
max min output
100000000 60000 big
59999 15000 medium
14999 0 small
Cheers guys
here is the script does what i want but not exactly,
my question is, how can i stop user entering text once it reached the lmit of 255 characters?
var limit = 255;
var txt = $('textarea[id$=txtPurpose]');
$(txt).keyup(function() {
var len = $(this).val().length;
if (len > limit) {
//this.value = this.value.substring(0, 50);
$(this).addClass('goRed');
$('#spn').text(len - limit + " characters exceeded");
return false;
}
else {
$(this).removeClass('goRed');
$('#spn').text(limit - len + " characters left");
}
});
if there is a better way please let me know.