size

adding icon between back button & title of navigation bar

最后都变了- 提交于 2019-12-23 03:14:20
问题 I want to put an icon by side of the title of my navigation bar. I'd prefer not to implement it as a custom titleView, because then i'll need to create a custom titleView for each controller i put on the stack (and I have pretty deep nesting). I'm adding currently as an UIImageView to a navigationBar. My problem is to calculate exactly this icon's horizontal position. It depends on the width of the back button, which has each time another title. How do I calculate this back button frame?

How can I set a size limit for files uploaded in Alfresco 4.2.c?

大兔子大兔子 提交于 2019-12-22 18:30:32
问题 I think the title is pretty self-explanatory, now... I have been looking for a way of limiting the size of files uploaded in Alfresco 4.2.c through Share. I'm surprised there isn't any mechanism provided out-of-the-box, looks to me a pretty basic feature. After some investigation the only way I see to make it possible is by implementing custom policy or behavior, according to what's discussed here: http://forums.alfresco.com/forum/developer-discussions/web-content-services/limit-file-upload

Dynamically change cell's height while typing text, and reload the containing tableview for resize

穿精又带淫゛_ 提交于 2019-12-22 18:22:16
问题 I'm trying to have a UITableView with several cells types. One of my cells needs to dynamically change his height while typing text in it . Here is the code for change the cell's height (in the cell's class), which works good: func textViewDidChange(_ textView: UITextView) { var newFrame:CGRect = noteTextView.frame newFrame.size.height = noteTextView.contentSize.height noteTextView.frame = newFrame self.frame = CGRect(x: self.frame.origin.x, y: self.frame.origin.y, width: self.frame.width,

C Windows buffer size

半世苍凉 提交于 2019-12-22 12:18:23
问题 In windows lets say i'm using the recv function to receive data from a socket. I'm curious how big would an optimal buffer be? I could make it 1024 bytes or I could make it 51200 bytes, or bigger. I'm wondering which one would be better for performance. This doesn't only apply to the recv function, lets say im reading a large text file, do i want a very large buffer, or a smaller buffer? 回答1: THe operating system performs its own buffering, so the size of your buffer does not really matter.

Google cloud storage - how to limit size of user uploads?

老子叫甜甜 提交于 2019-12-22 10:53:06
问题 I'm building a service where users can upload images. I want to prevent users from uploading files bigger than 5mb. Right now I create a 'signed url' for cloud storage user PUT and GET requests. Is there any way I can limit the size of a user upload? I don't want users to start uploading extremely large files by mistake or with malicious intent. 回答1: There are three ways to control access to Google Cloud Storage buckets and objects: Access Control Lists (ACLs), which provide a way to specify

How to trim down custom Skobbler offline map app size

做~自己de王妃 提交于 2019-12-22 10:06:09
问题 I'm integrating Skobbler maps in my iOS app. Right now, the app is 160Mb in size, which is way too much. But I notice that there are bunch of maps integrated already. I would like to erase all maps and let the user download the ones he would need. Right now, when I include SKMaps.framework, there is SKMaps document in it, that's 95Mb in size. Is there any way to make this document smaller or downloadable after initial app is downloaded. I have to make my app as small as possible. Also, as I

How to change size of Android ScrollView

∥☆過路亽.° 提交于 2019-12-22 09:13:33
问题 I have a layout like this (abstracted): Scrollview - fill_parent LinearLayout - wrap_content ImageView 1 - wrap_content ImageView 2 - ... ImageView 3 ... In the course of user interaction some images are replaced by larger or smaller ones, shortening or lenghtening the area to be scrolled. And that is the problem. The Scrollview (SV) does not know about the change, so either it scrolls over a lot of empty space at the bottom, or cuts off a picture or two at the bottom. Question 1: Can I

How do I make the black bars on the side of an HTML5 Video on iPad disappear?

给你一囗甜甜゛ 提交于 2019-12-22 08:57:57
问题 I'm working on a WebApp that is supposed to run mostly on iPads. The App plays several videos and has some interactive components as well. My problem is cosmetic: even though the HTML5 Video Tag works fine, the custom controls that I've created control the video/audio playback just fine, for the life of me I can't figure out how to make the black bars on the side of the video disappear. The embedding is completely standard: <video id="video" src="./video/video.mp4" width="1024"></video> I

Small font size in Android emulator

谁说我不能喝 提交于 2019-12-22 08:55:23
问题 Sometimes I notice the Android emulator starts with a very small font size. This seems to happen randomly. Other times it has a normal font size. I use ADT 10.0.1. Do you know what is the problem? 回答1: This happens very often, and although I'm not sure about the exact reason behind this, it seems that somehow the wrong density was detected for this and resources for a lower dpi is loaded inside a higher dpi emulator. That's why everything is smaller, but the layout works properly and aligns

Why Facebook SDK for android is so large?

一个人想着一个人 提交于 2019-12-22 08:37:01
问题 Currently I am developing android application using Facebook SDK. And now, the actual size is more than 35 mb, where 22 of them is Facebook SDK library. Is there any way to decrease it's size? or can I use facebook api without actual sdk? 回答1: You don't need any SKDs in order to use Graph API. They just make things easier when working with Facebook, having a lot of stuff already done for you. 来源: https://stackoverflow.com/questions/16241890/why-facebook-sdk-for-android-is-so-large