size

Decrease the size of Rating Bar in Android 2.1

Hi guys, I am currently working on a Mobile App project for Ford company, and I am a newbie in Java Android. I am just wondering, is there any way to decrease the size of rating bar in Android 2.1? I want to preserve more spaces for other buttons and edittexts. Thank you in advance for you help ...

To increase a button's size when it is pressed in Android

Hi, How can I make my button's size to increase slightly when it is pressed and decrease again when it is released? This is for highlighting the pressed button, by using size in addition to a different color. Regards, Kiki ...

jquery find number of 'li' items in a 'ul' and apply some math to calculate height of 'ul'

Jquery/programming newb here. I'm trying to dynamically assign a height to a ul to force some scrolling. My method is to detect how many items are in the list and then apply some math to calculate a height of my ul (I have tried height(); but it was not giving the right number; the ul is a grid of thumbnail images, displayed inline, show...

ActionScript 3 Loader - swf disappears as soon as loader.width is set

Hi, I'm using a Loader object to load an external swf: var swfLoader:Loader = new Loader(); stage.addChild(swfLoader); var bgURL:URLRequest = new URLRequest("sometestfile.swf"); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete); swfLoader.x = 240; swfLoader.y = 210; // Resize here? swfLoader.load(bgURL);...

SWT Composite maximum size

I have a ScrolledComposite, the contents of which are being truncated. I have Googled and am aware that it is a known issue on Windows. The only suggested workaround I can find is to use the canvas.scroll functionality: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java?view=mar...

How can I change the size of an array in C?

I am experimenting a little bit with gamestudio. I am making now a shooter game. I have an array with the pointer's to the enemies. I want. to when an enemy is killed. remove him from the list. And I also want to be able to create new enemies. Gamestudio uses a scripting language named lite-C. It has the same syntax as C and on the webs...

Using size of one array in another array

// sizeofarray.cpp #include <iostream> template <typename T,int N> int size(T (&Array)[N]) { return N; } int main() { char p[]="Je suis trop bon, et vous?"; char q[size(p)]; // (A) return 0; } I heard that an array size in C++ must be a constant expression. So char q[size(p)] is invalid, am I right? But I got no errors when...

Recommended max data size for internal web app?

We're building an internal web app used by about 50 users. Our users will access the app from accross the internet (not by local LAN). What are some current guidelines for how much data can be transferred while providing good load time and a generally positive client experience? Accessing Gmail it seems Gmail downloads almost 900K wor...

How to set size of a select drop down menu in jquery

The normal way to do this would be: var resultSelect = document.getElementById("resultSelect"); resultSelect.size = 3; How do i do this in jQuery? Thanks in advance ...

Java Swing: How do I define one minimal dimension (of the two) for components?

To define minimal size successfully, I have to do the following: // setting minimal width AND height Dimension min = new Dimension(100, 100); comp.setMinimumSize(min); comp.setPreferredSize(min); comp.setSize(min); When I left one line out it doesn't work, which is strange, but it's not the point. What do I do to limit just one of tw...

image size with jquery without pre-defined in tag then pass to CSS

Is there a way to find out the width and height of the follow image with Jquery? <div id="imgBox"><img id="imgID" src="images/koala.gif" /></div> Then pass it into CSS? <style type="text/css"> #imgBox, #imgBox img { width:imageWidth; height:imageHeight } </style> I'm guessing... <script type="text/javascript"> $(document).r...

Display directory structure with size in Powershell

Trying to have "dir" command that displays size of the sub folders and files. After googling "powershell directory size", I found thew two useful links Determining the Size of a Folder http://technet.microsoft.com/en-us/library/ff730945.aspx PowerShell Script to Get a Directory Total Size http://stackoverflow.com/questions/809014/pow...

SQL Server - what is the size of my database if this is the output from sp_spaceused

I ran the command: EXEC sp_spaceused The output was: So what is the size of my database? Is it - 4768.25 - 4076.57 = 691.68 MB (1st table) OR 19896 KB (2nd table)? EDIT I'm using SQL Server 2005 Express which has a "database size" limit of 4 GB. So in this context of "database size", if I were to calculate how far up to the spa...

objective c finding pixel width of a string

I have a UIButton of fixed width and I want to place text in it. Since the size of the String is unknown in advance, I will have to resize the font as I read the String from a flat file. How can I do that? A function similar to the following will be great: UIFont resizeFontAs:(UIFont)initialFont andStringAs:(NSString*)string andWidthA...

Converting a number of bytes into a file size in C

Hello, I want to convert a single number of bytes, into a file size (that has .KB, .MB and .GB). If the number is 0, I don't want to have any unit. If the number is exactly divisible by a multiple of 1024 (not a floating point), then I will print: x . Otherwise, I want to print a floating point with one degree precision. I made some c...

C macro computing the number of bytes that a given compile-time constant requires

Often I have some compile-time constant number that is also the upper limit of possible values assumed by the variables. And thus I'm interested in choosing the smallest type that can accomodate those values. For example I may know that variables will fit into <-30 000, 30 000> range, so when looking for a suitable type I would start wit...

350GB SVN repo creates atleast 1MB revision for even a simplest task like branch/tag

This all started when I noticed that my repository size is increasing at a daily rate of 1GB. I did a simple test. Created a branch/tag of an existing folder that had a size of 35KB. I took note of revision number and went to $REPO/db/revs/<K-rev>/rev-number/ and checked the size of the revision. It was 1 mega byte. That sounds fishy. An...

JBoss envers and huge audit tables

All, I am auditing my JEE application with JBoss Evers and the nature of my application causes the audit table to grow very fast. The historic data is queried infrequently and access time is not really an issue, apart from the data from the last week. This data IS queried frequently and access needs to be fast. Ideally, I would split th...

Choosing the most suitable integer size/range to use for variables

stdint.h in C99 provides many options for integer sizes, types and ranges - so many I don't know what ones to choose! I know how to use size_t and ptrdiff_t when appropriate, and I use fixed size types for storage and transmission. My question concerns values that will only be stored in memory of the host machine. For example, a struct...

How do I reduce the size of a Mac application bundle?

I have a 120MB bundle that when is compressed (zip) is only 30MB. I, however, so not want to distribute a zip file. I want to distribute a bundle in a dmg. Are there any tools I can use that will enable me to compress my bundle, but also preserve the bundle file structure so that no 'unzip' tool is needed by end-users? ...