Search Results

Search found 1544 results on 62 pages for 'weight'.

Page 4/62 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • CSS specificity: Why isn't CSS specificity weight of 10 or more class selectors greater than 1 id selector? [migrated]

    - by ajc
    While going through the css specificity concept, I understood the fact that it is calculated as a 4 parts 1) inline (1000) 2) id (100) 3) class (10) 4) html elments (1) CSS with the highest rule will be applied to the corresponding element. I tried the following example Created more than 10 classes <div class="a1"> .... <div class="a13" id="id1"> TEXT COLOR </div> ... </div> and the css as .a1 .a2 .a3 .a4 .a5 .a6 .a7 .a8 .a9 .a10 .a11 .a12 .a13 { color : red; } #id1 { color: blue; } Now, even though in this case there are 13 classes the weight is 130. Which is greater than the id. Result - JSFiddle CSS specificity

    Read the article

  • Lightest weight ubuntu desktop for text editing in big terminal windows?

    - by Kevin Pauli
    I have an older windows laptop onto which I'm installing ubuntu within a VM. My goal is just to use terminal-based linux tools such as vim and shell scripting. I don't give a hoot about any gui for this box. So I first installed ubuntu minimalcd and chose "Basic Ubuntu Server". Upon boot, the text-based terminal came up and I logged in, but the problem is it only gives me 80 columns. I want to do terminal mode vim but have a couple hundred columns to take advantage of my large monitor. If you happen to know how to do that, please see my question here . This post is assuming that the other question is not answerable, and that I will need a desktop to get more than 80 columns in a terminal window. So if that is the case, I want the lightest weight one possible, because this is older hardware and all I want is the ability to have nice big text-based terminal windows for editing text. From the ubuntu minimal CD, I see options for Edubuntu, Kubuntu, etc. Which one of the available desktops would be a good choice for my needs?

    Read the article

  • Changing the admin edit window display values

    - by Henri
    I have a database table with e.g. a weight value e.g. CREATE TABLE product ( id SERIAL NOT NULL, product_name item_name NOT NULL, . . weight NUMERIC(7,3), -- the weight in kg . . CONSTRAINT PK_product PRIMARY KEY (id) ); This results is the model: class Product(models.Model): . weight = models.DecimalField(max_digits=7, decimal_places=3, blank=True, null=True) . I store the weight in kg's, i.e. 1 kg is stores as 1, 0.1 kg or 100g is stored as 0.1 To make it easier for the user, I display the weight in the Admin list display in grams by specifying: def show_weight(self): if self.weight: weight_in_g = self.weight * 1000 return '%0f' % weight_in_g So if a product weighs e.g. 0.5 kg and is stored in the database as such, the admin list display shows 500 Is there also a way to alter the number shown in the 'Change product' window. This window now shows the value extracted from the database, i.e. 0.5. This will confuse a user when I tell him with the help_text to enter the number in g, while seeing the number of kgs. Before saving the product I override save as follows: def save(self): if self.weight: self.weight = self.weight / 1000 This converts the number entered in grams to kgs.

    Read the article

  • Stata Nearest neighbor of percentile

    - by Kyle Billings
    This has probably already been answered, but I must just be searching for the wrong terms. Suppose I am using the built in Stata data set auto: sysuse auto, clear and say for example I am working with 1 independent and 1 dependent variable and I want to essentially compress down to the IQR elements, min, p(25), median, p(75), max... so I use command, keep weight mpg sum weight, detail return list local min=r(min) local lqr=r(p25) local med = r(p50) local uqr = r(p75) local max = r(max) keep if weight==`min' | weight==`max' | weight==`med' | weight==`lqr' | weight==`uqr' Hence, I want to compress the data set down to only those 5 observations, and for example in this situation the median is not actually an element of the weight vector. there is an observation above and an observation below (due to the definition of median this is no surprise). is there a way that I can tell stata to look for the nearest neighbor above the percentile. ie. if r(p50) is not an element of weight then search above that value for the next observation? The end result is I am trying to get the data down to 2 vectors, say weight and mpg such that for each of the 5 elements of weight in the IQR have their matching response in mpg. Any thoughts?

    Read the article

  • FluentNHibernate: Not.Nullable() doesn't affect output schema

    - by alex
    Hello I'm using fluent nhibernate v. 1.0.0.595. There is a class: public class Weight { public virtual int Id { get; set; } public virtual double Value { get; set; } } I want to map it on the following table: create table [Weight] ( WeightId INT IDENTITY NOT NULL, Weight DOUBLE not null, primary key (WeightId) ) Here is the map: public class WeightMap : ClassMap<Weight> { public WeightMap() { Table("[Weight]"); Id(x => x.Id, "WeightId"); Map(x => x.Value, "Weight").Not.Nullable(); } } The problem is that this mapping produces table with nullable Weight column: Weight DOUBLE null Not-nullable column is generated only with default convention for column name (i.e. Map(x = x.Value).Not.Nullable() instead of Map(x = x.Value, "Weight").Not.Nullable()), but in this case there will be Value column instead of Weight: create table [Weight] ( WeightId INT IDENTITY NOT NULL, Value DOUBLE not null, primary key (WeightId) ) I found similiar problem here: http://code.google.com/p/fluent-nhibernate/issues/detail?id=121, but seems like mentioned workaround with SetAttributeOnColumnElement("not-null", "true") is outdated. Does anybody encountered with this problem? Is there a way to specify named column as not-nullable?

    Read the article

  • Social Business Forum Milano: Day 1

    - by me
    div.c50 {font-family: Helvetica;} div.c49 {position: relative; height: 0px; overflow: hidden;} span.c48 {color: #333333; font-size: 14px; line-height: 18px;} div.c47 {background-color: #ffffff; border-left: 1px solid rgba(0, 0, 0, 0.098); border-right: 1px solid rgba(0, 0, 0, 0.098); background-clip: padding-box;} div.c46 {color: #666666; font-family: arial, helvetica, sans-serif; font-weight: normal} span.c45 {line-height: 14px;} div.c44 {border-width: 0px; font-family: arial, helvetica, sans-serif; margin: 0px; outline-width: 0px; padding: 0px 0px 10px; vertical-align: baseline} div.c43 {border-width: 0px; margin: 0px; outline-width: 0px; padding: 0px 0px 10px; vertical-align: baseline;} p.c42 {color: #666666; font-family: arial, helvetica, sans-serif} span.c41 {line-height: 14px; font-size: 11px;} h2.c40 {font-family: arial, helvetica, sans-serif} p.c39 {font-family: arial, helvetica, sans-serif} span.c38 {font-family: arial, helvetica, sans-serif; font-size: 80%; font-weight: bold} div.c37 {color: #999999; font-size: 14px; font-weight: normal; line-height: 18px} div.c36 {background-clip: padding-box; background-color: #ffffff; border-bottom: 1px solid #e8e8e8; border-left: 1px solid rgba(0, 0, 0, 0.098); border-right: 1px solid rgba(0, 0, 0, 0.098); cursor: pointer; margin-left: 58px; min-height: 51px; padding: 9px 12px; position: relative; z-index: auto} div.c35 {background-clip: padding-box; background-color: #ffffff; border-bottom: 1px solid #e8e8e8; border-left: 1px solid rgba(0, 0, 0, 0.098); border-right: 1px solid rgba(0, 0, 0, 0.098); cursor: pointer; margin-left: 58px; min-height: 51px; padding: 9px 12px; position: relative} div.c34 {overflow: hidden; font-size: 12px; padding-top: 1px;} ul.c33 {padding: 0px; margin: 0px; list-style-type: none; opacity: 0;} li.c32 {display: inline;} a.c31 {color: #298500; text-decoration: none; outline-width: 0px; font-size: 12px; margin-left: 8px;} a.c30 {color: #999999; text-decoration: none; outline-width: 0px; font-size: 12px; float: left; margin-right: 2px;} strong.c29 {font-weight: normal; color: #298500;} span.c28 {color: #999999;} div.c27 {font-family: arial, helvetica, sans-serif; margin: 0px; word-wrap: break-word} span.c26 {border-width: 0px; width: 48px; height: 48px; border-radius: 5px 5px 5px 5px; position: absolute; top: 12px; left: 12px;} small.c25 {font-size: 12px; color: #bbbbbb; position: absolute; top: 9px; right: 12px; float: right; margin-top: 1px;} a.c24 {color: #999999; text-decoration: none; outline-width: 0px; font-size: 12px;} h3.c23 {font-family: arial, helvetica, sans-serif} span.c22 {font-family: arial, helvetica, sans-serif} div.c21 {display: inline ! important; font-weight: normal} span.c20 {font-family: arial, helvetica, sans-serif; font-size: 80%} a.c19 {font-weight: normal;} span.c18 {font-weight: normal;} div.c17 {font-weight: normal;} div.c16 {margin: 0px; word-wrap: break-word;} a.c15 {color: #298500; text-decoration: none; outline-width: 0px;} strong.c14 {font-weight: normal; color: inherit;} span.c13 {color: #7eb566; text-decoration: none} span.c12 {color: #333333; font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 18px} a.c11 {color: #999999; text-decoration: none; outline-width: 0px;} span.c10 {font-size: 12px; color: #999999; direction: ltr; unicode-bidi: embed;} strong.c9 {font-weight: normal;} span.c8 {color: #bbbbbb; text-decoration: none} strong.c7 {font-weight: bold; color: #333333;} div.c6 {font-family: arial, helvetica, sans-serif; font-weight: normal} div.c5 {font-family: arial, helvetica, sans-serif; font-size: 80%; font-weight: normal} p.c4 {font-family: arial, helvetica, sans-serif; font-size: 80%; font-weight: normal} h3.c3 {font-family: arial, helvetica, sans-serif; font-weight: bold} span.c2 {font-size: 80%} span.c1 {font-family: arial,helvetica,sans-serif;} Here are my impressions of the first day of the Social Business Forum in Milano A dialogue on Social Business Manifesto - Emanuele Scotti, Rosario Sica The presentation was focusing on Thesis and Anti-Thesis around Social Business My favorite one is: Peter H. Reiser ?@peterreiser social business manifesto theses #2: organizations are conversations - hello Oracle Social Network #sbf12 Here are the Thesis (auto-translated from italian to english) From Stress to Success - Pragmatic pathways for Social Business - John Hagel John Hagel talked about challenges of deploying new social technologies. Below are some key points participant tweeted during the session. 6hRhiannon Hughes ?@Rhi_Hughes Favourite quote this morning 'We need to strengthen the champions & neutralise the enemies' John Hagel. Not a hard task at all #sbf12 Expand Reply Retweet Favorite 8hElena Torresani ?@ElenaTorresani Minimize the power of the enemies of change. Maximize the power of the champions - John Hagel #sbf12 Expand Reply Retweet Favorite 8hGaetano Mazzanti ?@mgaewsj John Hagel change: minimize the power of the enemies #sbf12 Expand Reply Retweet Favorite 8hGaetano Mazzanti ?@mgaewsj John Hagel social software as band-aid for poor leadtime/waste management? mmm #sbf12 Expand Reply Retweet Favorite 8hElena Torresani ?@ElenaTorresani "information is power. We need access to information to get power"John Hagel, Deloitte &Touche #sbf12http://instagr.am/p/LcjgFqMXrf/ View photo Reply Retweet Favorite 8hItalo Marconi ?@italomarconi Information is power and Knowledge is subversive. John Hagel#sbf12 Expand Reply Retweet Favorite 8hdanielce ?@danielce #sbf12 john Hagel: innovation is not rational. from Milano, Milano Reply Retweet Favorite 8hGaetano Mazzanti ?@mgaewsj John Hagel: change is a political (not rational) process #sbf12 Expand Reply Retweet Favorite Enterprise gamification to drive engagement - Ray Wang Ray Wang did an excellent speech around engagement strategies and gamification More details can be found on the Harvard Business Review blog Panel Discussion: Does technology matter? Understanding how software enables or prevents participation Christian Finn, Ram Menon, Mike Gotta, moderated by Paolo Calderari Below are the highlights of the panel discussions as live tweets: 2hPeter H. Reiser ?@peterreiser @cfinn Q: social silos: mega trend social suites - do we create social silos + apps silos + org silos ... #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @cfinn A: Social will be less siloed - more integrated into application design. Analyatics is key to make intelligent decisions #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @MikeGotta - A: its more social be design then social by layer - Better work experience using social design. #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser Ram Menon: A: Social + Mobile + consumeration is coming together#sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser Q: What is the evolution for social business solution in the next 4-5 years? #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @cfinn Adoption: A: User experience is king - no training needed - We let you participate into a conversation via mobile and email#sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @MikeGotta A:Adoption - how can we measure quality? Literacy - Are people get confident to talk to a invisible audience ? #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser Ram Meno: A:Adoption - What should I measure ? Depend on business goal you want to active? #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser Q: How can technology facilitate adoption #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser #sbf12 @cfinn @mgotta Ram Menon at panel discussion about social technology @oraclewebcenter http://pic.twitter.com/Pquz73jO View photo Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser Ram Menon: 100% of data is in a system somewhere. 100% of collective intelligence is with people. Social System bridge both worlds Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser #sbf12 @MikeGotta Adoption is specific to the culture of the company Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @cfinn - drive adoption is important @MikeGotta - activity stream + watch list is most important feature in a social system #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @MikeGotta Why just adoption? email as 100% adoption? #sbf12 Expand Reply Delete Favorite 2hPeter H. Reiser ?@peterreiser @MikeGotta Ram Menon respond: there is only 1 questions to ask: What is the adoption? #sbf12 @socialadoption you like this ? #sbf12 Expand Reply Delete Favorite 3hPeter H. Reiser ?@peterreiser @MikeGotta - just replacing old technology (e.g. email) with new technology does not help. we need to change model/attitude #sbf12 Expand Reply Delete Favorite 3hPeter H. Reiser ?@peterreiser Ram Menon: CEO mandated to replace 6500 email aliases with Social Networking Software #sbf12 Expand Reply Delete Favorite 3hPeter H. Reiser ?@peterreiser @MikeGotta A: How to bring interface together #sbf12 . Going from point tools to platform, UI, Architecture + Eco-system is important Expand Reply Delete Favorite 3hPeter H. Reiser ?@peterreiser Q: How is technology important in Social Business #sbf12 A:@cfinn - technology is enabler , user experience -easy of use is important Expand Reply Delete Favorite 3hPeter H. Reiser ?@peterreiser @cfinn particiapte in panel "Does technology matter? Understanding how software enables or prevents participation" #sbf #webcenter

    Read the article

  • Do certain corporations hold more weight on a resume?

    - by Ryan
    Would a developer/tester position at Google, Apple, Microsoft, etc. (any large tech. company of which most people have heard) be more valuable on a resume than working as a developer/tester somewhere where tech. isn't the main objective (shipping company, restaurant chain, insurance company, etc.)? Let's say you have two offers, and you only plan to stay with whichever company for 5 years, before trying to get a better position at a different company. One at Google that has a starting salary of $60,000, and one at some insurance company that has a starting salary of $80,000. I guess what I'm trying to say is... with university's, if someone graduates from MIT or Carnegie Mellon, they can pretty much get a job anywhere. Does someone seem more valuable after having worked at a company like Google, Apple, Microsoft, etc.? In other words, would taking the lower paying job be better in the long run since it's at Google, or would it be better to take the higher paying job at the insurance company?

    Read the article

  • What is a light-weight "slideshow" script that could integrate w/ CMS?

    - by aslum
    I'm looking to reduce the footprint of my Strict html 4.01 front page. One possible way is to combine much of the "upcoming events" into a single small box, and have them automagically switch which one is displayed every few seconds. I'm sure there are a bunch of this kind of thing written already, and surely an open source one exists, but I haven't had much luck find one. I'd prefer javascript to jQuery as installing jQuery might not be an option, but if the best-fit script requires jQuery I'd certainly be willing to investigate that route. If it can display content from Wordpress that would be ideal.

    Read the article

  • Code contracts and inheritance

    - by DigiMortal
    In my last posting about code contracts I introduced you how to force code contracts to classes through interfaces. In this posting I will go step further and I will show you how code contracts work in the case of inherited classes. As a first thing let’s take a look at my interface and code contracts. [ContractClass(typeof(ProductContracts))] public interface IProduct {     int Id { get; set; }     string Name { get; set; }     decimal Weight { get; set; }     decimal Price { get; set; } }   [ContractClassFor(typeof(IProduct))] internal sealed class ProductContracts : IProduct {     private ProductContracts() { }       int IProduct.Id     {         get         {             return default(int);         }         set         {             Contract.Requires(value > 0);         }     }       string IProduct.Name     {         get         {             return default(string);         }         set         {             Contract.Requires(!string.IsNullOrWhiteSpace(value));             Contract.Requires(value.Length <= 25);         }     }       decimal IProduct.Weight     {         get         {             return default(decimal);         }         set         {             Contract.Requires(value > 3);             Contract.Requires(value < 100);         }     }       decimal IProduct.Price     {         get         {             return default(decimal);         }         set         {             Contract.Requires(value > 0);             Contract.Requires(value < 100);         }     } } And here is the product class that inherits IProduct interface. public class Product : IProduct {     public int Id { get; set; }     public string Name { get; set; }     public virtual decimal Weight { get; set; }     public decimal Price { get; set; } } if we run this code and violate the code contract set to Id we will get ContractException. public class Program {     static void Main(string[] args)     {         var product = new Product();         product.Id = -100;     } }   Now let’s make Product to be abstract class and let’s define new class called Food that adds one more contract to Weight property. public class Food : Product {     public override decimal Weight     {         get         {             return base.Weight;         }         set         {             Contract.Requires(value > 1);             Contract.Requires(value < 10);               base.Weight = value;         }     } } Now we should have the following rules at place for Food: weight must be greater than 1, weight must be greater than 3, weight must be less than 100, weight must be less than 10. Interesting part is what happens when we try to violate the lower and upper limits of Food weight. To see what happens let’s try to violate rules #2 and #4. Just comment one of the last lines out in the following method to test another assignment. public class Program {     static void Main(string[] args)     {         var food = new Food();         food.Weight = 12;         food.Weight = 2;     } } And here are the results as pictures to see where exceptions are thrown. Click on images to see them at original size. Violation of lower limit. Violation of upper limit. As you can see for both violations we get ContractException like expected. Code contracts inheritance is powerful and at same time dangerous feature. Although you can always narrow down the conditions that come from more general classes it is possible to define impossible or conflicting contracts at different points in inheritance hierarchy.

    Read the article

  • Django: How can I add weight/ordering to a many to many relationship?

    - by Klaas van Schelven
    I'm having Pages with TextBlocks on them. Text Blocks may appear on different pages, pages may have several text blocks on them. Every page may have these blocks in an ordering of it's own. This can be solved by using a separate through parameter. Like so: class TextBlock(models.Model): title = models.CharField(max_length=255) text = models.TextField() class Page(models.Model): textblocks = models.ManyToManyField(TextBlock, through=OrderedTextBlock) class OrderedTextBlock(models.Model): text_block = models.ForeignKey(TextBlock) product_page = models.ForeignKey(ProductPage) weight = models.IntegerField() class Meta: ordering = ('weight',) But I'm not very enthousiastic about the violations of DRY for my app. (There's a lot of ordered ManyToMany relations). Is there a recommended way to go about this?

    Read the article

  • Jquery: is there a VERY light-weight lightbox available?

    - by ExodusNicholas
    I'm looking for an extremely light-weight lightbox for jquery. i'm trying to create my own but i suck and my fist is about to go through the screen.... i'm talking like 5kb or less.. i know it can be done, and if i knew what i was doing i'd do it... but i'm just done for the day. So, does anyone know of one? something just for images, and nothing else, no fancy crap, no extra weight, one that simply centers the lightbox in the center of the screen with whatever picture was loaded by the link. my screen will thank you...

    Read the article

  • Finding the maximum weight subsequence of an array of positive integers?

    - by BeeBand
    I'm tring to find the maximum weight subsequence of an array of positive integers - the catch is that no adjacent members are allowed in the final subsequence. The exact same question was asked here, and a recursive solution was given by MarkusQ. He provides an explanation, but can anyone help me understand how he has expanded the function? How does this solution take into consideration non-adjacent members?

    Read the article

  • Picking apples off a tree

    - by John Retallack
    I have the following problem: I am given a tree with N apples, for each apple I am given it's weight and height. I can pick apples up to a given height H, each time I pick an apple the height of every apple is increased with U. I have to find out the maximum weight of apples I can pick. 1 = N = 100000 0 < {H, U, apples' weight and height, maximum weight} < 231 Example: N=4 H=100 U=10 height weight 82 30 91 10 93 5 94 15 The answer is 45: first pick the apple with the weight of 15 then the one with the weight of 30. Could someone help me approach this problem?

    Read the article

  • How to find minimum weight with maximum cost in 0-1 Knapsack algorithm?

    - by Nitin9791
    I am trying to solve a spoj problem Party Schedule the problem statement is- You just received another bill which you cannot pay because you lack the money. Unfortunately, this is not the first time to happen, and now you decide to investigate the cause of your constant monetary shortness. The reason is quite obvious: the lion's share of your money routinely disappears at the entrance of party localities. You make up your mind to solve the problem where it arises, namely at the parties themselves. You introduce a limit for your party budget and try to have the most possible fun with regard to this limit. You inquire beforehand about the entrance fee to each party and estimate how much fun you might have there. The list is readily compiled, but how do you actually pick the parties that give you the most fun and do not exceed your budget? Write a program which finds this optimal set of parties that offer the most fun. Keep in mind that your budget need not necessarily be reached exactly. Achieve the highest possible fun level, and do not spend more money than is absolutely necessary. Input The first line of the input specifies your party budget and the number n of parties. The following n lines contain two numbers each. The first number indicates the entrance fee of each party. Parties cost between 5 and 25 francs. The second number indicates the amount of fun of each party, given as an integer number ranging from 0 to 10. The budget will not exceed 500 and there will be at most 100 parties. All numbers are separated by a single space. There are many test cases. Input ends with 0 0. Output For each test case your program must output the sum of the entrance fees and the sum of all fun values of an optimal solution. Both numbers must be separated by a single space. Example Sample input: 50 10 12 3 15 8 16 9 16 6 10 2 21 9 18 4 12 4 17 8 18 9 50 10 13 8 19 10 16 8 12 9 10 2 12 8 13 5 15 5 11 7 16 2 0 0 Sample output: 49 26 48 32 now I know that it is an advance version of 0/1 knapsack problem where along with maximum cost we also have to find minimum weight that is less than a a given weight and have maximum cost. so I have used dp to solve this problem but still get a wrong awnser on submission while it is perfectly fine with given test cases. My code is typedef vector<int> vi; #define pb push_back #define FOR(i,n) for(int i=0;i<n;i++) int main() { //freopen("input.txt","r",stdin); while(1) { int W,n; cin>>W>>n; if(W==0 && n==0) break; int K[n+1][W+1]; vi val,wt; FOR(i,n) { int x,y; cin>>x>>y; wt.pb(x); val.pb(y); } FOR(i,n+1) { FOR(w,W+1) { if(i==0 || w==0) { K[i][w]=0; } else if (wt[i-1] <= w) { if(val[i-1] + K[i-1][w-wt[i-1]]>=K[i-1][w]) { K[i][w]=val[i-1] + K[i-1][w-wt[i-1]]; } else { K[i][w]=K[i-1][w]; } } else { K[i][w] = K[i-1][w]; } } } int a1=K[n][W],a2; for(int j=0;j<W;j++) { if(K[n][j]==a1) { a2=j; break; } } cout<<a2<<" "<<a1<<"\n"; } return 0; } Could anyone suggest what am I missing??

    Read the article

  • is Boost Library's weighted median broken?

    - by user624188
    I confess that I am no expert in C++. I am looking for a fast way to compute weighted median, which Boost seemed to have. But it seems I am not able to make it work. #include <iostream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/median.hpp> #include <boost/accumulators/statistics/weighted_median.hpp> using namespace boost::accumulators; int main() { // Define an accumulator set accumulator_set<double, stats<tag::median > > acc1; accumulator_set<double, stats<tag::median >, float> acc2; // push in some data ... acc1(0.1); acc1(0.2); acc1(0.3); acc1(0.4); acc1(0.5); acc1(0.6); acc2(0.1, weight=0.); acc2(0.2, weight=0.); acc2(0.3, weight=0.); acc2(0.4, weight=1.); acc2(0.5, weight=1.); acc2(0.6, weight=1.); // Display the results ... std::cout << " Median: " << median(acc1) << std::endl; std::cout << "Weighted Median: " << median(acc2) << std::endl; return 0; } produces the following output, which is clearly wrong. Median: 0.3 Weighted Median: 0.3 Am I doing something wrong? Any help will be greatly appreciated. * however, the weighted sum works correctly * @glowcoder: The weighted sum works perfectly fine like this. #include <iostream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/sum.hpp> #include <boost/accumulators/statistics/weighted_sum.hpp> using namespace boost::accumulators; int main() { // Define an accumulator set accumulator_set<double, stats<tag::sum > > acc1; accumulator_set<double, stats<tag::sum >, float> acc2; // accumulator_set<double, stats<tag::median >, float> acc2; // push in some data ... acc1(0.1); acc1(0.2); acc1(0.3); acc1(0.4); acc1(0.5); acc1(0.6); acc2(0.1, weight=0.); acc2(0.2, weight=0.); acc2(0.3, weight=0.); acc2(0.4, weight=1.); acc2(0.5, weight=1.); acc2(0.6, weight=1.); // Display the results ... std::cout << " Median: " << sum(acc1) << std::endl; std::cout << "Weighted Median: " << sum(acc2) << std::endl; return 0; } and the result is Sum: 2.1 Weighted Sum: 1.5

    Read the article

  • Advice on reconciling discordant data

    - by Justin
    Let me support my question with a quick scenario. We're writing an app for family meal planning. We'll produce daily plans with a target calorie goal and meals to achieve it for our nuclear family. Our calorie goal will be calculated for each person from their attributes (gender, age, weight, activity level). The weight attribute is the simplest example here. When Dad (the fascist nerd who is inflicting this on his family) first uses the application he throws approximate values into it for Daughter. He thinks she is 5'2" (157 cm) and 125 lbs (56kg). The next day Mom sits down to generate the menu and looks back over what the bumbling Dad did, quietly fumes that he can never recall anything about the family, and says the value is really 118 lbs! This is the first introduction of the discord. It seems, in this scenario, Mom is probably more correct that Dad. Though both are only an approximation of the actual value. The next day the dear Daughter decides to use the program and sees her weight listed. With the vanity only a teenager could muster she changes the weight to 110 lbs. Later that day the Mom returns home from a doctor's visit the Daughter needed and decides that it would be a good idea to update her Daughter's weight in the program. Hooray, another value, this time 117 lbs. Now how do you reconcile these data points? Measurement error, confidence in parties, bias, and more all confound the data. In some idealized world we'd have a weight authority of some nature providing the one and only truth. How about in our world though? And the icing on the cake is that this single data point changes over time. How have you guys solved or managed this conflict?

    Read the article

  • How do I set default values on new properties for existing entities after light weight core data migration?

    - by Moritz
    I've successfully completed light weight migration on my core data model. My custom entity Vehicle received a new property 'tirePressure' which is an optional property of type double with the default value 0.00. When 'old' Vehicles are fetched from the store (Vehicles that were created before the migration took place) the value for their 'tirePressure' property is nil. (Is that expected behavior?) So I thought: "No problem, I'll just do this in the Vehicle class:" - (void)awakeFromFetch { [super awakeFromFetch]; if (nil == self.tirePressure) { [self willChangeValueForKey:@"tirePressure"]; self.tirePressure = [NSNumber numberWithDouble:0.0]; [self didChangeValueForKey:@"tirePressure"]; } } Since "change processing is explicitly disabled around" awakeFromFetch I thought the calls to willChangeValueForKey and didChangeValueForKey would mark 'tirePresure' as dirty. But they don't. Every time these Vehicles are fetched from the store 'tirePressure' continues to be nil despite having saved the context.

    Read the article

  • How do I make my page respect h1 css addition? [migrated]

    - by Adobe
    I add h1 { margin-top:100px; } to the end of the css, but the page doesn't change. But if I add to the html of some h1: <h1 style="margin-top:100px;"><a class="toc-backref" href="#id4">KHotKeys</a><a class="headerlink" href="#khotkeys" title="Permalink to this headline">¶</a></h1> Then it does. I'm not css pro, and I guess the problem is somewhere in the css file. Here it is: div.clearer { clear: both; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar input[type="text"] { width: 160px; } div.sphinxsidebar input[type="submit"] { width: 30px; } img { border: 0; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable dl, table.indextable dd { margin-top: 0; margin-bottom: 0; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- general body styles --------------------------------------------------- */ a.headerlink { visibility: hidden; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .field-list ul { padding-left: 1em; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; background-color: #ffe; width: 40%; float: right; } p.sidebar-title { font-weight: bold; } /* -- topics ---------------------------------------------------------------- */ div.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } div.admonition dl { margin-bottom: 0; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- tables ---------------------------------------------------------------- */ table.docutils { border: 0; border-collapse: collapse; } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } table.field-list td, table.field-list th { border: 0 !important; } table.footnote td, table.footnote th { border: 0 !important; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } dl { margin-bottom: 15px; } dd p { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } dt:target, .highlighted { background-color: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .refcount { color: #060; } .optional { font-size: 1.3em; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa; } table.highlighttable { margin-left: 0.5em; } table.highlighttable td { padding: 0 0.5em 0 0.5em; } tt.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } tt.descclassname { background-color: transparent; } tt.xref, a tt { background-color: transparent; font-weight: bold; } h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } } body { font-family: sans-serif; font-size: 100%; background-color: #11303d; color: #000; margin: 0; padding: 0; } div.document { background-color: #d4e9f7; } div.documentwrapper { float: left; width: 100%; } div.bodywrapper { margin: 0 0 0 230px; } div.body { background-color: #ffffff; color: #222222; padding: 0 20px 30px 20px; } div.footer { color: #ffffff; width: 100%; padding: 9px 0 9px 0; text-align: center; font-size: 75%; } div.footer a { color: #ffffff; text-decoration: underline; } div.related { background-color: #191a19; line-height: 30px; color: #ffffff; } div.related a { color: #ffffff; } div.sphinxsidebar { top: 30px; bottom: 60px; margin: 0; position: fixed; overflow: auto; height: auto; } div.sphinxsidebar h3 { font-family: 'Trebuchet MS', sans-serif; color: #3a3a3a; font-size: 1.4em; font-weight: normal; margin: 0; padding: 0; } div.sphinxsidebar h3 a { color: #3a3a3a; } div.sphinxsidebar h4 { font-family: 'Trebuchet MS', sans-serif; color: #3a3a3a; font-size: 1.3em; font-weight: normal; margin: 5px 0 0 0; padding: 0; } div.sphinxsidebar p { color: #3a3a3a; } div.sphinxsidebar p.topless { margin: 5px 10px 10px 10px; } div.sphinxsidebar ul { margin: 10px; padding: 0; color: #3a3a3a; } div.sphinxsidebar ul li { margin-top: .2em; } div.sphinxsidebar a { color: #3a8942; } div.sphinxsidebar input { border: 1px solid #3a8942; font-family: sans-serif; font-size: 1em; } /* -- body styles ----------------------------------------------------------- */ a { color: #355f7c; text-decoration: none; } a:hover { text-decoration: underline; } div.body p, div.body dd, div.body li { text-align: left; line-height: 130%; margin-top: 0px; margin-bottom: 0px; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: 'Trebuchet MS', sans-serif; background-color: #f2f2f2; font-weight: normal; color: #20435c; border-top: 2px solid #cccccc; border-bottom: 1px solid #cccccc; margin: 30px -20px 20px -20px; padding: 3px 0 3px 10px; } div.body h1 { margin-top: 0; font-size: 200%; } div.body h2 { font-size: 160%; } div.body h3 { font-size: 140%; padding-left: 20px; } div.body h4 { font-size: 120%; padding-left: 20px; } div.body h5 { font-size: 110%; padding-left: 20px; } div.body h6 { font-size: 100%; padding-left: 20px; } a.headerlink { color: #c60f0f; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } a.headerlink:hover { background-color: #c60f0f; color: white; } div.body p, div.body dd, div.body li { text-align: left; line-height: 110%; } div.admonition p.admonition-title + p { display: inline; } div.note { background-color: #eee; border: 1px solid #ccc; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } div.warning { background-color: #ffe4e4; border: 1px solid #f66; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } pre { padding: 0px; background-color: #ffffff; color: #000000; line-height: 120%; border: 0px solid #ffffff; border-left: none; border-right: none; white-space: pre-wrap; /* word-wrap: break-word; */ /* width:100px; */ } tt { background-color: #ecf0f3; padding: 0 1px 0 1px; font-size: 110%; } .warning tt { background: #efc2c2; } .note tt { background: #d6d6d6; } body { width:150%; }

    Read the article

  • N2Cms, Adding a new property to a ContentPageBase class, corrupts the already entered data.

    - by Nour Sabouny
    i want to modify the ContentPageBase, in a functional site, i tried to add a property called for example (weight), but if there is an existing page in the database, the site will malfunction, and throws an Exception, of (Object reference not set to an instance of an object). how can i correct the already entered data ? public abstract class ContentPageBase : PageBase, ICommentable { [EditableTextBox("Weight", 10, ContainerName = Tabs.Details)] //newly added property. public virtual int Weight { get { return (int)GetDetail("Weight"); } set { SetDetail("Weight", value); } } }

    Read the article

  • Selecting rows distinctively

    - by noway
    Lets assume my database table structure is something like | items | weight | |============|==========| | item_1 | 50 | | item_2 | 90 | | item_2 | 45 | | item_2 | 60 | | item_3 | 40 | In the select statement, I want to show an item only for once with the highest weight also ordered by height. So the result should be : | items | weight | |============|==========| | item_2 | 90 | | item_1 | 50 | | item_3 | 40 | I tried something like SELECT DISTINCT items, weight FROM mytable ORDER BY weight DESC but it didn't work because the results are actually distinct. How can I make that selection?

    Read the article

  • Selecting records in SQL that have the minimum value for that record based on another field

    - by Ryan
    I have a set of data, and while the number of fields and tables it joins with is quite complex, I believe I can distill my problem down using the required fields/tables here for illustration regarding this particular problem. I have three tables: ClientData, Sources, Prices Here is what my current query looks like before selecting the minimum value: select c.RecordID, c.Description, s.Source, p.Price, p.Type, p.Weight from ClientData c inner join Sources s ON c.RecordID = s.RecordID inner join Prices p ON s.SourceID = p.SourceID This produces the following result: RecordID Description Source Price Type Weight ============================================================= 001002003 ABC Common Stock Vendor 1 104.5 Close 1 001002003 ABC Common Stock Vendor 1 103 Bid 2 001002003 ABC Common Stock Vendor 2 106 Close 1 001002003 ABC Common Stock Vendor 2 100 Unknwn 0 111222333 DEF Preferred Stk Vendor 3 80 Bid 2 111222333 DEF Preferred Stk Vendor 3 82 Mid 3 111222333 DEF Preferred Stk Vendor 2 81 Ask 4 What I am trying to do is display prices that belong to the same record which have the minimum non-zero weight for that record (so the weight must be greater than 0, but it has to be the minimum from amongst the remaining weights). So in the above example, for record 001002003 I would want to show the close prices from Vendor 1 and Vendor 2 because they both have a weight of 1 (the minimum weight for that record). But for 111222333 I would want to show just the bid price from Vendor 3 because its weight of 2 is the minimum, non-zero for that record. The result that I'm after would like like: RecordID Description Source Price Type Weight ============================================================= 001002003 ABC Common Stock Vendor 1 104.5 Close 1 001002003 ABC Common Stock Vendor 2 106 Close 1 111222333 DEF Preferred Stk Vendor 3 80 Bid 2 Any ideas on how to achieve this? EDIT: This is for SQL Compact Edition.

    Read the article

  • ldirectord ipvsadm not show reals ip and not work wtih pacemaker and corosync

    - by miguer27
    first thanks for your time. I'm having a problem with ldirectord that I can not solve, I comment my situation: I have two nodes with pace maker and corosync and configure somes resources: root@ldap1:/home/mamartin# crm status Last updated: Tue Jun 3 12:58:30 2014 Last change: Tue Jun 3 12:23:47 2014 via cibadmin on ldap1 Stack: openais Current DC: ldap2 - partition with quorum Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff 2 Nodes configured, 2 expected votes 7 Resources configured. Online: [ ldap1 ldap2 ] Resource Group: IPV_LVS IPV_4 (ocf::heartbeat:IPaddr2): Started ldap1 IPV_6 (ocf::heartbeat:IPv6addr): Started ldap1 lvs (ocf::heartbeat:ldirectord): Started ldap1 Clone Set: clon_IPV_lo [IPV_lo] Started: [ ldap2 ] Stopped: [ IPV_lo:1 ] root@ldap1:/home/mamartin# crm configure show node ldap2 \ attributes standby="off" node ldap1 \ attributes standby="off" primitive IPV-lo_4 ocf:heartbeat:IPaddr \ params ip="192.168.1.10" cidr_netmask="32" nic="lo" \ op monitor interval="5s" primitive IPV-lo_6 ocf:heartbeat:IPv6addrLO \ params ipv6addr="[fc00:1::3]" cidr_netmask="64" \ op monitor interval="5s" primitive IPV_4 ocf:heartbeat:IPaddr2 \ params ip="192.168.1.10" nic="eth0" cidr_netmask="25" lvs_support="true" \ op monitor interval="5s" primitive IPV_6 ocf:heartbeat:IPv6addr \ params ipv6addr="[fc00:1::3]" nic="eth0" cidr_netmask="64" \ op monitor interval="5s" primitive lvs ocf:heartbeat:ldirectord \ params configfile="/etc/ldirectord.cf" \ op monitor interval="20" timeout="10" \ meta target-role="Started" group IPV_LVS IPV_4 IPV_6 lvs group IPV_lo IPV-lo_6 IPV-lo_4 clone clon_IPV_lo IPV_lo \ meta interleave="true" target-role="Started" location cli-prefer-IPV_LVS IPV_LVS \ rule $id="cli-prefer-rule-IPV_LVS" inf: #uname eq ldap1 colocation LVS_no_IPV_lo -inf: clon_IPV_lo IPV_LVS property $id="cib-bootstrap-options" \ dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \ cluster-infrastructure="openais" \ expected-quorum-votes="2" \ no-quorum-policy="ignore" \ stonith-enabled="false" \ last-lrm-refresh="1401264327" rsc_defaults $id="rsc-options" \ resource-stickiness="1000" The problem is in the ipvsadm only show a one real IP, when i configured two now, show the ldirector.cf: root@ldap1:/home/mamartin# ipvsadm IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags - RemoteAddress:Port Forward Weight ActiveConn InActConn TCP ldap-maqueta.cica.es:ldap wrr - ldap2.cica.es:ldap Route 4 0 0 TCP [[fc00:1::3]]:ldap wrr - [[fc00:1::2]]:ldap Route 4 0 0 root@ldap1:/home/mamartin# cat /etc/ldirectord.cf checktimeout=10 checkinterval=2 autoreload=yes logfile="/var/log/ldirectord.log" quiescent=yes #ipv4 virtual=192.168.1.10:389 real=192.168.1.11:389 gate 4 real=192.168.1.12:389 gate 4 scheduler=wrr protocol=tcp checktype=on #ipv6 virtual6=[[fc00:1::3]]:389 real6=[[fc00:1::1]]:389 gate 4 real6=[[fc00:1::2]]:389 gate 4 scheduler=wrr protocol=tcp checkport=389 checktype=on and in the logs I see nothing clear: root@ldap1:/home/mamartin# ldirectord -d /etc/ldirectord.cf start DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.11:389 -g -w 0) Running system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.11:389 -g -w 0) DEBUG2: Quiescent real server: 192.168.1.11:389 (192.168.1.10:389) (Weight set to 0) Quiescent real server: 192.168.1.11:389 (192.168.1.10:389) (Weight set to 0) DEBUG2: Disabled real server=on:tcp:192.168.1.11:389:::4:gate:\/: (virtual=tcp:192.168.1.10:389) DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.12:389 -g -w 0) Running system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.12:389 -g -w 0) DEBUG2: Quiescent real server: 192.168.1.12:389 (192.168.1.10:389) (Weight set to 0) Quiescent real server: 192.168.1.12:389 (192.168.1.10:389) (Weight set to 0) DEBUG2: Disabled real server=on:tcp:192.168.1.12:389:::4:gate:\/: (virtual=tcp:192.168.1.10:389) DEBUG2: Checking on: Real servers are added without any checks DEBUG2: Resetting soft failure count: 192.168.1.12:389 (tcp:192.168.1.10:389) Resetting soft failure count: 192.168.1.12:389 (tcp:192.168.1.10:389) DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.12:389 -g -w 4) Running system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.12:389 -g -w 4) Destination already exists root@ldap1:/home/mamartin# cat /var/log/ldirectord.log [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Quiescent real server: 192.168.1.11:389 (192.168.1.10:389) (Weight set to 0) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Quiescent real server: 192.168.1.12:389 (192.168.1.10:389) (Weight set to 0) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Resetting soft failure count: 192.168.1.12:389 (tcp:192.168.1.10:389) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] system(/sbin/ipvsadm -a -t 192.168.1.10:389 -r 192.168.1.12:389 -g -w 4) failed: [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Added real server: 192.168.1.12:389 (192.168.1.10:389) (Weight set to 4) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Resetting soft failure count: 192.168.1.11:389 (tcp:192.168.1.10:389) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Restored real server: 192.168.1.11:389 (192.168.1.10:389) (Weight set to 4) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Resetting soft failure count: [[fc00:1::2]]:389 (tcp:[[fc00:1::3]]:389) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] system(/sbin/ipvsadm -a -t [[fc00:1::3]]:389 -r [[fc00:1::2]]:389 -g -w 4) failed: [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Added real server: [[fc00:1::2]]:389 ([[fc00:1::3]]:389) (Weight set to 4) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Resetting soft failure count: [[fc00:1::1]]:389 (tcp:[[fc00:1::3]]:389) [Tue Jun 3 09:39:29 2014|ldirectord.cf|19266] Restored real server: [[fc00:1::1]]:389 ([[fc00:1::3]]:389) (Weight set to 4) do not know if this is a bug or a configuration error, can anyone help? Regards.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >