linear

Android - Nested layout question

Consider a VideoView added to a Linear Layout with parameteres FILL_PARENT, FILL_PARENT. The Linear Layout gets added to the root layout which is a Relative Layout, with parameters WRAP_CONTENT, WRAP_CONTENT. Which parameters take precedence here? ...

Android Linear Layout - Difference between weight and FILL_PARENT

According to documentaion, FILL_PARENT basically lets the view take up the entire extra space. Weight also dictates how much of the extra space can be taken by the view. What is the difference? For eg: What happens when I use, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1.0f) ...

Android dynamic background

Hi, I am somewhat of a new android developer and have a question regarding changing the background dynamically at runtime. What I want to do is set a background color in a LinearLayout Tag, and later change that background color in my activity class. This code below is not working. Am I missing something or is this the wrong approach...

How to see scaling matrices from a geometric perspective

I'm using XNA but it doesn't matter too much for this example. So let's say I have a sprite. I then apply a scaling matrix before anything. Is the scaling matrix applied scaling the local axis of the sprite or just moving the points down? In other words, is applying a scaling matrix of 0.5f in the world space to my sprite at the world or...

Python function to solve Ax = b by back substitution.

Okay, for my numerical methods class I have the following question: Write a Python function to solve Ax = b by back substitution, where A is an upper triangular nonsingular matrix. MATLAB code for this is on page 190 which you can use as a pseudocode guide if you wish. The function should take as input A and b and return x. Your functio...

Linear Model with Constraints, [R]

Hi all, I'm quite new to R and I have a following problem: I have a simple 2-factor linear model: Rate~factor1 + factor2 //factor1 has 8 categorical values, factor2 has 6 categories; model1 <- lm(Rate~factor1+factor2, data=myData) And want to put constraints SUM of factor1 coefficients = 0, the same for factor2. None of the manual...

is there any efficient way to get node by key (better than linear hashing or btree)?

Hi! I'm looking for efficient algorithm for storing and fetching data by key. I've already read about Litvin linear dynamic hash and another methods, but still, i wonder is there some way to get (search, calculate) key in VERY large binary file (consider more than 100 gb)? I'm just curios is there ANY algorithm which works without perf...