FAQ Database Discussion Community


Android weightsum not working as expected

android,weight
I have one horizontal Linear Layout with Width = match_parent and weightsum=5. If i insert 5 vertical Linear Layouts with each width=0 and weight=1 everything looks as expected, the layouts each get the same width. If i add only 2 vertical with each width=0 and weight=1 they take more space...

What do browser do when a font weight is unavailable

css,fonts,cross-browser,webfonts,weight
If I load a google font that comes with 400 and 700 weights, but in my CSS I use font-weight:550; what does the browser do ?

Picturebox Height/Width using textbox…How?

textbox,resize,height,picturebox,weight
I want to control picture using textbox and button for submit, but ... private void button_Click(object sender, EventArgs e) { int height = int.Parse(textbox1.Text); height = PublicImage.Height; int width = int.Parse(textbox1.Text); width = PublicImage.Width; } ...

dplyr - summarise weighted data

r,dplyr,summary,weight
Is there a possibility to use weights with dplyr summarise function ? Let us imagine I want to calculate a weighted table dta = structure(list(PHHWT14 = c(530, 457, 416, 497, 395, 480, 383, 420, 499, 424, 504, 497, 449, 406, 492, 470, 418, 407, 403, 362, 393, 368, 423, 448,...

R Shiny - set reactive width of a plot output

plot,shiny,reactive-programming,weight
I am filtering a tbale and a heat-map simultaneously. During filtering, the width of the table is changing such that width of particular columns remains the same. Width of the heat-map remains the same during filtering. I want the heat-map to change its weight in the same way as the...

Super Thin Arial Font CSS?

html,css,fonts,weight
I am working on the header of my website and I really like the look of the thin font used in the second part of the title here: http://tympanus.net/Development/AnimatedHeaderBackgrounds/ I downloaded the source and have been playing around with it. The title used Arial font (although it isn't defined) anywhere...

Opencv mlp Same Data Different Results

c++,opencv,machine-learning,neural-network,weight
Let Me simplify this question. If I run opencv MLP train and classify consecutively on the same data, I get different results. Meaning, if I put training a new mlp on the same train data and classifying on the same test data in a for loop, each iteration will give...

How do I apply CSS style to ASCII character

html,css,styles,ascii,weight
I'd like to reduce the weight of a my ascii degree character &deg; in my html document. Does anybody know how? HTML: <html> <body> <table> <tr> <td> <div style="position:absolute; top: 70; right: 0;"> 72 <span>&deg;</span> F </div> </td> </tr> </table> </body> </html> CSS: body { height: 100%; font-weight: 400; color:...

Surface view and scaling

android,height,scale,surfaceview,weight
Before all, I apologies for my English. I'm a newbie in programming of Android App and I recently discovered the Canvas and Bitmap, so I decided to make a "Game" that can only use landscape. I discovered too the SurfaceView and how implement a background on my SurfaceView, but the...

Subset data with a weighting factor

r,subset,weight
I am trying to subset a data frame and use a column value as the weighting factor. For example, lets say we have these data. set.seed(123) Data <- data.frame(x1 = sample(c(0,1),100, replace = T), x2 = round(runif(100, min=0, max=100),0), Prob = round(runif(100),2)) head(Data) > head(Data) x1 x2 Prob 1 0...

How do I convert font style to font weight in Java?

java,fonts,javafx,styles,weight
I want to set a specific ont to a Text within a TextFlow in JavaFx. However, Font has only static .font() methods, which expects a FontWeight instance. How do I convert a font style like "Regular" to a FontWeight instance? There is no "Regular" in the final fields of Font....

R: Weight parameter in array based on other parameters

r,lapply,weight,sapply
I've got this table/array in csv: GroupID Channel Daysbeforelast 1 A 35 1 B 31 1 C 29 1 D 17 1 E 15 1 D 5 1 C 0 2 B 66 2 E 17 2 D 15 2 A 2 2 C 0 2 F 0 2 A...

Swift, change image memory footprint

ios,image,swift,weight
My app downloads images from web site. How can I scale and change each image's memory footprint? I have a preview gallery, when I load 40-50 photos the RAM increases up to 800-900MB and the app crashes. Or I should use flash memory to save these photos? ...

Random permutation of numbers in MATLAB with weights

matlab,random,weight,markov-chains
How to randomize the numbers in a vector a, with weights assigned in such a way that I can control what numbers 'follow' other numbers? Let's say a = [ 1 2 3 4] I would like to obtain something like this: 1 2 1 3 4 2 1 4...

Is there a way to adjust decimal points on weight in magento?

magento,decimal,weight
The default decimal points are 4 digits "1.0000" is there a way i can adjust it on front end that would only show 2 decimal points? like: "1.00" Thanks!...

Android LinearLayout is not redisplayed after changing weights programmatically

android,android-linearlayout,weight,setcontentview
I am able to construct a LinearLayout of dozens of Views programmatically and to display it as the content view of an Activity. I am able to walk the LinearLayout tree and change the backgroundcolors of the Views. And I am able to walk the tree and adjust the relative...