slices

Best way to list a Merb::Slices dependencies?

Hi, I'm creating a list of the Slices in my Merb app, like this: Merb::Slices.each_slice do |slice| I'd like to get the list of dependencies for each of this slice, any idea how to access it? I'm still reading merb code, solution might come soon ;) ...

Making A Graphic Pie Chart In C#

I'm trying to write a Windows Application that shows a pie chart with seven unequal slices (25%, 20%, 18%, 17%, 10%, 10%, 10%) all of them will be colored differently. So far I have made Pens and Brushes with colors attached and drawn a circle. This is what I have so far private void Form1_Paint(object sender, PaintEventArgs e) { ...

IE8 Web Slices problem when using RTL orientation

Web Slice icon appears on the far right when RTL orientation is used. As a result, users can't click and subscribe to the Web Slice. Any solution for this? ...

Is it bad practice to alter dynamic arrays that have references to them?

I looked a bit at dynamic arrays in D2, and I found them very difficult to understand. It also seems I'm interpreting the spec wrongly.. Working on a reference or slice of a dynamic array seems very error prone when changing the arrays... Or am I just not understanding the fundamentals? Referring to the same array only shares the actual...

How do I initialize values in a hash without a loop?

I am trying to figure out a way to initialize a hash without having to go through a loop. I was hoping to use slices for that, but it doesn't seem to produce the expected results. Consider the following code: #!/usr/bin/perl use Data::Dumper; my %hash = (); $hash{currency_symbol} = 'BRL'; $hash{currency_name} = 'Real'; print Dumper(%h...

How would I use a hash slice to initialize a hash stored in a data structure?

In an earlier question I asked how to initialize a Perl hash using slices. It is done like this: my %hash = (); my @fields = ('currency_symbol', 'currency_name'); my @array = ('BRL','Real'); @hash{@fields} = @array; Now let's imagine a more complex hash, and here is how it is initialized: my %hash = (); my $iso = 'BR'; $hash->{$iso}-...