series

Elegant way to remove items from sequence in Python?

When I am writing code in Python, I often need to remove items from a list or other sequence type based on some criteria. I haven't found a solution that is elegant and efficient, as removing items from a list you are currently iterating through is bad. For example, you can't do this: for name in names: if name[-5:] == 'Smith': ...

WMEncoder issue

I have an instance of a WMEncoder class THis is .NET so basic interop , what I mean is the WMEncoder is actually generated by the runtime like so namespace WMEncoderLib { [Guid("632B6081-BBC6-11D2-A329-006097C4E476")] [CoClass(typeof(WMEncoderClass))] public interface WMEncoder : IWMEncoder2, _IWMEncoderE...

Find the last value in a "rolled-over" sequence with a stored procedure?

Suppose I had a set of alpha-character identifiers of a set length, e.g. always five letters, and they are assigned in such a way that they are always incremented sequentially (GGGGZ --> GGGHA, etc.). Now, if I get to ZZZZZ, since the length is fixed, I must "roll over" to AAAAA. I might have a contiguous block from ZZZAA through AAAA...

Optional series in a SSRS chart?

Hi, is it possible to make a series in a chart optional (i.e. only rendered when the user clicks a checkbox, in case the corresponding query takes a while and may not be required)? Or are there any alternative solutions where users can incrementally select the data series/charts they would like to see? ...

Flex bar chart label function with multiple series?

Hello all, I have a Flex bar chart with two data series in a clustered format. The series are called RequiredFunding and ApprovedFunding, so they're plotted next to each other. The problem I am having is trying to format the label function on the Funding axis. I have several thousands of dollars being displayed and it needs to be for...

cannot load custom tooltips in silverlight

Hi,, I have created a custoom tooltip for a lineseries chart. however my problem is that this custom tooltip is never loaded..(I still get the default tooltip i.e. X-value) Is there something I should be doing differently?? page.xaml <Style x:Key="ttip" TargetType="chartingToolkit:LineDataPoint"> <Setter Property="Tem...

How to do I change a Series color in Excel using C#?

I have written a program in C# whereby it automatically generates a graph for me from a CSV file and puts it onto a new XLS file. However, I need to change the color of the Line (as it is a Line Chart) to red rather than the default blue. I am finding this extremely difficult to do and the stuff I've found online has not worked. Please ...

Generate all the continous intervals from a series

I have this problem I can't quite solve. I can get the missing numbers interval, but I can't piece them back together to from my continous series. So if I have a series defined as [1000,1001,1002,1003,1005,1006,1008] I want to extract the three continuous series [1000,1001,1002,1003] and [1005,1006] and [1008]. Using a simple CTE I got ...

C#/Excel: Working Around Maximum Series Size On Chart

I need help programatically graphing more points than can fit in a single Excel series. According to http://office.microsoft.com/en-us/excel/HP100738491033.aspx the maximum number of points displayable on an Excel 2007 chart is 256000. Given that each series caps out at 32000 points, 8 series are required to plot the full 256000 points...

Excel C# Com Chart Multiple Series Problem

Hello All, Please can someone help me with this as it's driving me nuts! I'm creating an excel chart using C# and the COM interface pragmatically. I've created the chart using the chart wizard. I want to then add more series to this chart. I can add the series but the extra data is on new columns and they are not automatically create...

Sum of series: 1^1 + 2^2 + 3^3 + ... + n^n (mod m)

Can someone give me an idea of an efficient algorithm for large n (say 10^10) to find the sum of above series? Mycode is getting klilled for n= 100000 and m=200000 #include<stdio.h> int main() { int n,m,i,j,sum,t; scanf("%d%d",&n,&m); sum=0; for(i=1;i<=n;i++) { t=1; for(j=1;j<=i;j++) t=((long long)t*i)%...

Grouping data points into series

I have a series of data points (tuples) in a list with a format like: points = [(1, 'a'), (2, 'b'), (2, 'a'), (3, 'd'), (4, 'c')] The first item in each tuple is an integer and they are assured to be sorted. The second value in each tuple is an arbitrary string. I need them grouped in lists by their first value in a series. So give...

sum of series 1*3-3*5+5*7

please help to print series as well sum of series like 1*3-3*5+5*7 up to n terms i have used code like this in php class series { function ser(){ $i = 0; $k = 3; $m = 0; for($j = 1; $j < 3; $j++) { if($j % 2 == 0 ) { $m = $i + ($i * $k); } else { ...

Flex Charts -- How can I change the color of a chartItem on rollover?

Hi guys, Is there a way to set a rollover color for each series in a chart? For instance, I have a column chart with two series: one series is set to blue and the second series is set to gold. When the user mouses over the blue series, I would like the blue to turn to bright blue. And when the user mouses over the gold series, I would...

Create barchart using jfreechart with bars of same category together

I want to make bar chart using jfreechart such that the bars which belong to the same category should be displayed adjacent without any gaps. The categories should be displayed with gaps. Also each category may have different number of bars. How it can be achived using Jfreechart library? Following image is the sample of what I require....

Quarter as a Count variable in SAS.

Hye Guys, I'm busy working on a time series and am trying to find the commands that allow me to insert a quarter count variable. To keep things simple, the third quarter of 1995 (date my observations start) should be quarter -2, the fourth quarter of 1995 should be -1 etc etc uptill 2006 (should be somewhere around 45 by then). My dates...

Which programming language or a library can process Infinite Series ?

Which programming language or a library is able to process infinite series (like geometric or harmonic)? It perhaps must have a database of some well-known series and automatically give proper values in case of convergence, and maybe generate an exception in case of divergence. For example, in Python it could look like: sum = 0 sign =...

Need multiple series in a reporting services column chart and can't get more than one to show

I have a sql query based report that returns multiple rows - typically 5 - each one having different values in the main data columns (8 off) and a column called type. Effectively for each different type there will be a different set of values in the corresponding 8 values columns. The report works perfectly but I cannot get more than one...

How to display two series via Google Chart API?

I can't get the two series of numbers to scale together. Here is sample code that you can paste into... http://code.google.com/intl/en/apis/chart/docs/chart_playground.html cht=lxy chs=400x300 chd=t:20,30,40|1,4,2|24,34,44|3,7,1 chds=20,40,1,4,24,44,1,7 chxr=0,20,54,2|1,0,7,1 chxt=x,y chxs=0,ff0000,12,0,lt 1,0000ff,10,1,lt chco=FF...

Flex: Can I assign propertiy of multi-layer object to Chart's xField or yField?

Hi, I have a question about how to assign property of a multi-layer object to Chart's xField or yField. For example: var obj:Object = new Object(); var store:Object = new Object(); store.store1 = 300; store.store2 = 200; store.store3 = 250; obj.date = "2010/04/26"; obj.count = 2; obj.store = store; Because I have t...