Questions tagged [dynamic-sizing]

29 questions
31
votes
4 answers

Angular Material Side Bar with "Half" side mode

I am working on the dynamic side bar for our project, basically what we want to do is to set up a dynamic side bar when user click on the side bar it will spread when user click back sidebar should collapse and show only icons (but not totally…
Terry Zhang
  • 4,541
  • 8
  • 23
  • 29
5
votes
3 answers

Pure HTML/CSS solution for aligning 3 elements when 2 are dynamically sized?

This question takes a bit of explaining. Please bear with me: A few months ago, I set up a three-part header for a section on a website. On the left side of this header there is a Title, the contents of which can change. To the right side is a…
4
votes
6 answers

Proper way to declare a variable length two dimensional array in C++

I would like to get a two dimensional int array arr that I can access via arr[i][j]. As far as I understand I could declare int arr[10][15]; to get such an array. In my case the size is however variable and as far as I understand this syntax doesn't…
Christian
  • 25,249
  • 40
  • 134
  • 225
4
votes
1 answer

Why can't I write a function with the same type as Box::new?

If I write a function that takes one argument of type [f32] (as opposed to e.g. &[f32]), I get an error: the trait bound `[f32]: std::marker::Sized` is not satisfied The docs say this is because [f32] does not have a compile-time-known size. A…
apt1002
  • 969
  • 6
  • 15
3
votes
1 answer

Embedding dynamically sized webpage with javascript

Okay, so first some background info: I am trying to embed a webpage within another page. The sub-page is basically a small web application written in javascript and html that takes in several screens of input (radio buttons, text boxes, etc.) and…
Chris Usher
  • 169
  • 7
3
votes
6 answers

CSS float and height issue

I am trying to create a two column webpage. The both columns have dynamic height, but I want both of them to extend 100% of the page. What I mean is if you have a page +------------------------+ | Header …
austinbv
  • 9,297
  • 6
  • 50
  • 82
2
votes
4 answers

Implementing incremental array in C++

I want to implement an array that can increment as new values are added. Just like in Java. I don't have any idea of how to do this. Can anyone give me a way ? This is done for learning purposes, thus I cannot use std::vector.
Jayanga Kaushalya
  • 2,674
  • 5
  • 38
  • 58
2
votes
1 answer

Why is ?Sized required to pass a reference to a generic type parameter?

When I run the following code on Rust playground... fn take_part_1<'a>(s: &'a str) -> &'a str { s.split(':').next().unwrap() } fn take_part_2<'a, T: 'a + AsRef>(s: &'a T) -> &'a str { let b = s.as_ref().split(':').next().unwrap(); …
slipheed
  • 7,170
  • 3
  • 27
  • 38
1
vote
3 answers

jQuery dynamically change height of element according to the height of another

I know this question has been answered but I still need help for my specific situation I have
  • blah blah
  • blah blah blah
I have managed to insert a div after each li using $('
')…
morktron
  • 915
  • 4
  • 17
  • 31
1
vote
0 answers

Determine collection view height inside table view iOS

I have a static table view which has UITableViewAutomaticDimension for automatic sizing for cells. I want to insert a collection view inside a table view cell which also has dynamically sized cells. What is the correct way to return the height of…
prabhu
  • 1,158
  • 1
  • 12
  • 27
1
vote
2 answers

Changing UILabel text length in UITableViewCell with dynamic height does not resize it correctly

I have an UITableViewCell with UILabel which correctly resizes its height according to text length. To accomplish this I have correctly set AutoLayout constraints and specified tableView.rowHeight = UITableViewAutomaticDimension The problem I am…
Fabrizio Prosperi
  • 1,398
  • 4
  • 18
  • 32
1
vote
1 answer

Make a TextBlock use all available height before expand the width

I have a "hero/vertical" button (with an image inside) defined by this Style:
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
1
vote
0 answers

UITableView choppy up scroll W/O images

After returning from a detail controller. I call scrollToRowAtIndexPath and it works as expected returning me to the row. If i continue to scroll down the tableview everything is fine, but scrolling up is extremely choppy no matter how slowly i…
1
vote
3 answers

Dynamic Integer Size: int64_t, int32_t, uint32_t, etc

I am programming an app that allows a user to select the bit-size of an integer storage and do math with it. They can select 8, 16, 32, or 64 bit storage as signed or unsigned. This is set and changed at runtime, and the app will do math with the…
The Lone Fellow
  • 305
  • 1
  • 2
  • 9
1
vote
2 answers

dynamically-sized text object with a copy constructor, a trivial assignment operator, and a trivial destructor

I've been shown that a std::string cannot be inserted into a boost::lockfree::queue. boost::lockfree::queue is too valuable to abandon, so I think I could use very large, fixed length chars to pass the data according to the requirements (assuming…
user1382306
1
2