Search Results

Search found 3950 results on 158 pages for 'float'.

Page 9/158 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to mark empty in a single element in a float array

    - by Vineeth Mohan
    I have a large float (primitive) array and not every element in the array is filled. How can i mark a particular element as EMPTY. I understand this can be achieved by some special symbols but still i would like to know the standard way. Even if i am using some special symbol , how will i handle a situation where the actual data item is the value of special symbol. In short my question is how to implement the NULL feature in a primitive type array in java. PS - The reason why i am not using Float object is to achieve a high memory and speed performance. Thanks Vineeth

    Read the article

  • Getting SIGILL in float to fixed conversion

    - by foliveira
    I'm receiving a SIGILL after running the following code. I can't really figure what's wrong with it. The target platform is ARM, and I'm trying to port a known library (in which this code is contained) void convertFloatToFixed(float nX, float nY, unsigned int &nFixed) { short sx = (short) (nX * 32); short sy = (short) (nY * 32); unsigned short *ux = (unsigned short*) &sx; unsigned short *uy = (unsigned short*) &sy; nFixed = (*ux << 16) | *uy; } Any help on it would be greatly appreciated. Thanks in advance

    Read the article

  • Float multiple fixed-width / varible-height boxes into 2 columns

    - by Jeremy H
    I'll try to explain this as best I can. I have multiple divs that are fixed-width but variable height. I want to float these boxes into two columns inside a fixed-width container. What happens when a give them all a float: left value, I get something like this: ######### ######### # box 1 # # box 2 # ######### # ..... # ......... # ..... # ......... ######### ######### ######### # box 3 # # box 4 # # ..... # # ..... # ######### ######### ######### ######### # box 5 # # box 6 # # ..... # ######### # ..... # ######### (The periods are white space) What I really would really like is the top of box 3 to touch the bottom of box 1. Any easy way to acheive this?

    Read the article

  • How to manually (bitwise) perform (float)x? (homework)

    - by Silver
    Now, here is the function header of the function I'm supposed to implement: /* * float_from_int - Return bit-level equivalent of expression (float) x * Result is returned as unsigned int, but * it is to be interpreted as the bit-level representation of a * single-precision floating point values. * Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while * Max ops: 30 * Rating: 4 */ unsigned float_from_int(int x) { ... } We aren't allowed to do float operations, or any kind of casting. Now I tried to implement the first algorithm given at this site: http://locklessinc.com/articles/i2f/ Here's my code: unsigned float_from_int(int x) { // grab sign bit int xIsNegative = 0; int absValOfX = x; if(x < 0){ xIsNegative = 1; absValOfX = -x; } // zero case if(x == 0){ return 0; } //int shiftsNeeded = 0; /*while(){ shiftsNeeded++; }*/ unsigned I2F_MAX_BITS = 15; unsigned I2F_MAX_INPUT = ((1 << I2F_MAX_BITS) - 1); unsigned I2F_SHIFT = (24 - I2F_MAX_BITS); unsigned result, i, exponent, fraction; if ((absValOfX & I2F_MAX_INPUT) == 0) result = 0; else { exponent = 126 + I2F_MAX_BITS; fraction = (absValOfX & I2F_MAX_INPUT) << I2F_SHIFT; i = 0; while(i < I2F_MAX_BITS) { if (fraction & 0x800000) break; else { fraction = fraction << 1; exponent = exponent - 1; } i++; } result = (xIsNegative << 31) | exponent << 23 | (fraction & 0x7fffff); } return result; } But it didn't work (see test error below): Test float_from_int(-2147483648[0x80000000]) failed... ...Gives 0[0x0]. Should be -822083584[0xcf000000] 4 4 0 float_times_four I don't know where to go from here. How should I go about parsing the float from this int?

    Read the article

  • controling a float value with javascript

    - by kawtousse
    Hi, to control my input type and verify that its value is pretty a float in my form i deal with it in javascript like that: function verifierNombre () { var champ=document.getElementById("nperformed"); var str = champ.value; if(str.value==' '){champ.focus();} if (isNaN(str)) { alert("Invalid Valid! the field must be a number"); champ.focus(); return false; } return true; } but it still false because it doesn't accept really floats. so when entering a value like '11,2' the alert is declenched. I want to know how can I control float values with javascript. thanks.

    Read the article

  • float addition 2.5 + 2.5 = 4.0? RPN

    - by AJ Clou
    The code below is my subprogram to do reverse polish notation calculations... basically +, -, *, and /. Everything works in the program except when I try to add 2.5 and 2.5 the program gives me 4.0... I think I have an idea why, but I'm not sure how to fix it... Right now I am reading all the numbers and operators in from command line as required by this assignment, then taking that string and using sscanf to get the numbers out of it... I am thinking that somehow the array that contains the three characters '2', '.', and '5', is not being totally converted to a float... instead i think just the '2' is. Could someone please take a look at my code and either confirm or deny this, and possibly tell me how to fix it so that i get the proper answer? Thank you in advance for any help! float fsm (char mystring[]) { int i = -1, j, k = 0, state = 0; float num1, num2, ans; char temp[10]; c_stack top; c_init_stack (&top); while (1) { switch (state) { case 0: i++; if ((mystring[i]) == ' ') { state = 0; } else if ((isdigit (mystring[i])) || (mystring[i] == '.')) { state = 1; } else if ((mystring[i]) == '\0') { state = 3; } else { state = 4; } break; case 1: temp[k] = mystring[i]; k++; i++; if ((isdigit (mystring[i])) || (mystring[i] == '.')) { state = 1; } else { state = 2; } break; case 2: temp[k] = '\0'; sscanf (temp, "%f", &num1); c_push (&top, num1); i--; k = 0; state = 0; break; case 3: ans = c_pop (&top); if (c_is_empty (top)) return ans; else { printf ("There are still items on the stack\n"); exit (0); case 4: num2 = c_pop (&top); num1 = c_pop (&top); if (mystring[i] == '+'){ ans = num1 + num2; return ans; } else if (mystring[i] == '-'){ ans = num1 - num2; return ans; } else if (mystring[i] == '*'){ ans = num1 * num2; return ans; } else if (mystring[i] == '/'){ if (num2){ ans = num1 / num2; return ans; } else{ printf ("Error: cannot divide by 0\n"); exit (0); } } c_push (&top, ans); state = 0; break; } } } } Here is my main program: #include <stdio.h> #include <stdlib.h> #include "boolean.h" #include "c_stack.h" #include <string.h> int main(int argc, char *argv[]) { char mystring[100]; int i; sscanf("", "%s", mystring); for (i=1; i<argc; i++){ strcat(mystring, argv[i]); strcat(mystring, " "); } printf("%.2f\n", fsm(mystring)); } and here is the header file with prototypes and the definition for c_stack: #include "boolean.h" #ifndef CSTACK_H #define CSTACK_H typedef struct c_stacknode{ char data; struct c_stacknode *next; } *c_stack; #endif void c_init_stack(c_stack *); boolean c_is_full(void); boolean c_is_empty(c_stack); void c_push(c_stack *,char); char c_pop(c_stack *); void print_c_stack(c_stack); boolean is_open(char); boolean is_brother(char, char); float fsm(char[]);

    Read the article

  • two div boxes [1st float, 2nd clear], margin on 2nd doesn't seem to push off first

    - by mach77
    In the code below I have two div boxes. The first is float:left, the second has clear:left so that it sits below the first. My question is why does margin-top:20px not push off the first div? <head> <style> div { width:100px; height:100px; background-color:green; } #box1 { float:left; } #box2 { background-color:red; clear:left; margin-top:20px; } </style> </head> <body> <div id="box1"></div> <div id="box2"></div> </body>

    Read the article

  • C++ FBX Animation Importer Using the FBX SDK

    - by Mike Sawayda
    Does anyone have any experience using the FBX SDK to load in animations. I got the meshes loaded in correctly with all of their verts, indices, UV's, and normals. I am just now trying to get the Animations working correctly. I have looked at the FBX SDK documentation with little help. If someone could just help me get started or point me in the right direction I would greatly appreciate it. I added some code so you can kinda get an idea of what I am doing. I should be able to place that code anywhere in the load FBX function and have it work. //GETTING ANIMAION DATA for(int i = 0; i < scene->GetSrcObjectCount<FbxAnimStack>(); ++i) { FbxAnimStack* lAnimStack = scene->GetSrcObject<FbxAnimStack>(i); FbxString stackName = "Animation Stack Name: "; stackName += lAnimStack->GetName(); string sStackName = stackName; int numLayers = lAnimStack->GetMemberCount<FbxAnimLayer>(); for(int j = 0; j < numLayers; ++j) { FbxAnimLayer* lAnimLayer = lAnimStack->GetMember<FbxAnimLayer>(j); FbxString layerName = "Animation Stack Name: "; layerName += lAnimLayer->GetName(); string sLayerName = layerName; queue<FbxNode*> nodes; FbxNode* tempNode = scene->GetRootNode(); while(tempNode != NULL) { FbxAnimCurve* lAnimCurve = tempNode->LclTranslation.GetCurve(lAnimLayer, FBXSDK_CURVENODE_COMPONENT_X); if(lAnimCurve != NULL) { //I know something needs to be done here but I dont know what. } for(int i = 0; i < tempNode->GetChildCount(false); ++i) { nodes.push(tempNode->GetChild(i)); } if(nodes.size() > 0) { tempNode = nodes.front(); nodes.pop(); } else { tempNode = NULL; } } } } Here is the full function bool FBXLoader::LoadFBX(ParentMeshObject* _parentMesh, char* _filePath, bool _hasTexture) { FbxManager* fbxManager = FbxManager::Create(); if(!fbxManager) { printf( "ERROR %s : %d failed creating FBX Manager!\n", __FILE__, __LINE__ ); } FbxIOSettings* ioSettings = FbxIOSettings::Create(fbxManager, IOSROOT); fbxManager->SetIOSettings(ioSettings); FbxString filePath = FbxGetApplicationDirectory(); fbxManager->LoadPluginsDirectory(filePath.Buffer()); FbxScene* scene = FbxScene::Create(fbxManager, ""); int fileMinor, fileRevision; int sdkMajor, sdkMinor, sdkRevision; int fileFormat; FbxManager::GetFileFormatVersion(sdkMajor, sdkMinor, sdkRevision); FbxImporter* importer = FbxImporter::Create(fbxManager, ""); if(!fbxManager->GetIOPluginRegistry()->DetectReaderFileFormat(_filePath, fileFormat)) { //Unrecognizable file format. Try to fall back on FbxImorter::eFBX_BINARY fileFormat = fbxManager->GetIOPluginRegistry()->FindReaderIDByDescription("FBX binary (*.fbx)"); } bool importStatus = importer->Initialize(_filePath, fileFormat, fbxManager->GetIOSettings()); importer->GetFileVersion(fileMinor, fileMinor, fileRevision); if(!importStatus) { printf( "ERROR %s : %d FbxImporter Initialize failed!\n", __FILE__, __LINE__ ); return false; } importStatus = importer->Import(scene); if(!importStatus) { printf( "ERROR %s : %d FbxImporter failed to import the file to the scene!\n", __FILE__, __LINE__ ); return false; } FbxAxisSystem sceneAxisSystem = scene->GetGlobalSettings().GetAxisSystem(); FbxAxisSystem axisSystem( FbxAxisSystem::eYAxis, FbxAxisSystem::eParityOdd, FbxAxisSystem::eLeftHanded ); if(sceneAxisSystem != axisSystem) { axisSystem.ConvertScene(scene); } TriangulateRecursive(scene->GetRootNode()); FbxArray<FbxMesh*> meshes; FillMeshArray(scene, meshes); unsigned short vertexCount = 0; unsigned short triangleCount = 0; unsigned short faceCount = 0; unsigned short materialCount = 0; int numberOfVertices = 0; for(int i = 0; i < meshes.GetCount(); ++i) { numberOfVertices += meshes[i]->GetPolygonVertexCount(); } Face face; vector<Face> faces; int indicesCount = 0; int ptrMove = 0; float wValue = 0.0f; if(!_hasTexture) { wValue = 1.0f; } for(int i = 0; i < meshes.GetCount(); ++i) { int vertexCount = 0; vertexCount = meshes[i]->GetControlPointsCount(); if(vertexCount == 0) continue; VertexType* vertices; vertices = new VertexType[vertexCount]; int triangleCount = meshes[i]->GetPolygonVertexCount() / 3; indicesCount = meshes[i]->GetPolygonVertexCount(); FbxVector4* fbxVerts = new FbxVector4[vertexCount]; int arrayIndex = 0; memcpy(fbxVerts, meshes[i]->GetControlPoints(), vertexCount * sizeof(FbxVector4)); for(int j = 0; j < triangleCount; ++j) { int index = 0; FbxVector4 fbxNorm(0, 0, 0, 0); FbxVector2 fbxUV(0, 0); bool texCoordFound = false; face.indices[0] = index = meshes[i]->GetPolygonVertex(j, 0); vertices[index].position.x = (float)fbxVerts[index][0]; vertices[index].position.y = (float)fbxVerts[index][1]; vertices[index].position.z = (float)fbxVerts[index][2]; vertices[index].position.w = wValue; meshes[i]->GetPolygonVertexNormal(j, 0, fbxNorm); vertices[index].normal.x = (float)fbxNorm[0]; vertices[index].normal.y = (float)fbxNorm[1]; vertices[index].normal.z = (float)fbxNorm[2]; texCoordFound = meshes[i]->GetPolygonVertexUV(j, 0, "map1", fbxUV); vertices[index].texture.x = (float)fbxUV[0]; vertices[index].texture.y = (float)fbxUV[1]; face.indices[1] = index = meshes[i]->GetPolygonVertex(j, 1); vertices[index].position.x = (float)fbxVerts[index][0]; vertices[index].position.y = (float)fbxVerts[index][1]; vertices[index].position.z = (float)fbxVerts[index][2]; vertices[index].position.w = wValue; meshes[i]->GetPolygonVertexNormal(j, 1, fbxNorm); vertices[index].normal.x = (float)fbxNorm[0]; vertices[index].normal.y = (float)fbxNorm[1]; vertices[index].normal.z = (float)fbxNorm[2]; texCoordFound = meshes[i]->GetPolygonVertexUV(j, 1, "map1", fbxUV); vertices[index].texture.x = (float)fbxUV[0]; vertices[index].texture.y = (float)fbxUV[1]; face.indices[2] = index = meshes[i]->GetPolygonVertex(j, 2); vertices[index].position.x = (float)fbxVerts[index][0]; vertices[index].position.y = (float)fbxVerts[index][1]; vertices[index].position.z = (float)fbxVerts[index][2]; vertices[index].position.w = wValue; meshes[i]->GetPolygonVertexNormal(j, 2, fbxNorm); vertices[index].normal.x = (float)fbxNorm[0]; vertices[index].normal.y = (float)fbxNorm[1]; vertices[index].normal.z = (float)fbxNorm[2]; texCoordFound = meshes[i]->GetPolygonVertexUV(j, 2, "map1", fbxUV); vertices[index].texture.x = (float)fbxUV[0]; vertices[index].texture.y = (float)fbxUV[1]; faces.push_back(face); } meshes[i]->Destroy(); meshes[i] = NULL; int indexCount = faces.size() * 3; unsigned long* indices = new unsigned long[faces.size() * 3]; int indicie = 0; for(unsigned int i = 0; i < faces.size(); ++i) { indices[indicie++] = faces[i].indices[0]; indices[indicie++] = faces[i].indices[1]; indices[indicie++] = faces[i].indices[2]; } faces.clear(); _parentMesh->AddChild(vertices, indices, vertexCount, indexCount); } return true; }

    Read the article

  • 2D SAT Collision Detection not working when using certain polygons (With example)

    - by sFuller
    My SAT algorithm falsely reports that collision is occurring when using certain polygons. I believe this happens when using a polygon that does not contain a right angle. Here is a simple diagram of what is going wrong: Here is the problematic code: std::vector<vec2> axesB = polygonB->GetAxes(); //loop over axes B for(int i = 0; i < axesB.size(); i++) { float minA,minB,maxA,maxB; polygonA->Project(axesB[i],&minA,&maxA); polygonB->Project(axesB[i],&minB,&maxB); float intervalDistance = polygonA->GetIntervalDistance(minA, maxA, minB, maxB); if(intervalDistance >= 0) return false; //Collision not occurring } This function retrieves axes from the polygon: std::vector<vec2> Polygon::GetAxes() { std::vector<vec2> axes; for(int i = 0; i < verts.size(); i++) { vec2 a = verts[i]; vec2 b = verts[(i+1)%verts.size()]; vec2 edge = b-a; axes.push_back(vec2(-edge.y,edge.x).GetNormailzed()); } return axes; } This function returns the normalized vector: vec2 vec2::GetNormailzed() { float mag = sqrt( x*x + y*y ); return *this/mag; } This function projects a polygon onto an axis: void Polygon::Project(vec2* axis, float* min, float* max) { float d = axis->DotProduct(&verts[0]); float _min = d; float _max = d; for(int i = 1; i < verts.size(); i++) { d = axis->DotProduct(&verts[i]); _min = std::min(_min,d); _max = std::max(_max,d); } *min = _min; *max = _max; } This function returns the dot product of the vector with another vector. float vec2::DotProduct(vec2* other) { return (x*other->x + y*other->y); } Could anyone give me a pointer in the right direction to what could be causing this bug? Edit: I forgot this function, which gives me the interval distance: float Polygon::GetIntervalDistance(float minA, float maxA, float minB, float maxB) { float intervalDistance; if (minA < minB) { intervalDistance = minB - maxA; } else { intervalDistance = minA - maxB; } return intervalDistance; //A positive value indicates this axis can be separated. } Edit 2: I have recreated the problem in HTML5/Javascript: Demo

    Read the article

  • Function should return float, but it gets messed up!

    - by Andre
    Hi guys, I'm going crazy here. I have a function that should return a float number: - (float) getHue:(UIColor *)original { NSLog(@"getHue"); const CGFloat *componentColors = CGColorGetComponents(original.CGColor); float red = componentColors[0]; float green = componentColors[1]; float blue = componentColors[2]; float h = 0.0f; float maxChannel = fmax(red, fmax(green, blue)); float minChannel = fmin(red, fmin(green, blue)); if (maxChannel == minChannel) h = 0.0f; else if (maxChannel == red) h = 0.166667f * (green - blue) / (maxChannel - minChannel) + 0.000000f; else if (maxChannel == green) h = 0.166667f * (blue - red) / (maxChannel - minChannel) + 0.333333f; else if (maxChannel == blue) h = 0.166667f * (red - green) / (maxChannel - minChannel) + 0.666667f; else h = 0.0f; if (h < 0.0f) h += 1.0f; NSLog(@"getHue results: %f", h); return h; } The NSLog will trace it correctly (i.e: 0.005), but the actual return value of the function is NULL. I've tried getting that value in so many ways and it never works. float originalHue = [self getHue:original]; results in a building error, as it says: "incompatible types in initialization" float *originalHue = [self getHue:original]; results in a null return. I've tried other ways, but it never actually gets the value properly. Any thoughts? Cheers guys, Andre

    Read the article

  • Float a div in top right corner without overlapping sibling header

    - by Maxime R.
    Having a div and a h1 inside a section, how do i float the div in the top right corner without overlapping the text of the header ? The HTML code is the following: <section> <h1>some long long long long header, a whole line, 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6</h1> <div><button>button</button></div> </section> I tried an absolute position relative to the parent but the text is overlapped, http://jsfiddle.net/FnpS8/2/ Using this CSS code: section { position: relative; } h1 { display: inline; } div { position: absolute; top: 0; right: 0; } I tried floating the div to the right but it doesn't remain in the top right corner, http://jsfiddle.net/P6xCw/2/ Using this CSS code: h1 { display: inline; } div { float: right; } ? I know there is a lot of similar questions but I couldn't find one solving this case.

    Read the article

  • Float right is not working in IE 7 but works in FF IE8

    - by Mirage
    I have this code <div id="facebook_bar"> <div style="float:left;"> <img src="images/topbar_followus.png" width="70" height="25" /> <img src="images/topbar_twitIcon.png" width="30" height="25" /> <img src="images/topbar_fbicon.png" width="30" height="25" /> </div> <div id="newsletter_box"> <img src="images/topbar_subscribe.png" width="220" height="25" /> <input type="text" name="cm-ktkykk-ktkykk" id="ktkykk-ktkykk" /> <input type="image" src="images/btn_submit.png" width="55" height="25" /> </div> </div> css is #facebook_bar { background-color:#323334; height:30px; padding-top:15px; padding-left:20px; padding-right:20px; } #newsletter_box { float:right; /*margin-top:-30px;*/ } The right hand div is showing on next line after the first div not on the same line

    Read the article

  • Why won't this work; opencv Mat_<float>

    - by user1371674
    I can't seem to get this to work. I'm trying to get the pixel value of an image but first need to change the color of the image, but since I cannot use int or just Mat because the values are not whole numbers, I have to use and because of that errors pop up when I try to run this on the cmd. int main(int argc, char **argv) { Mat img = imread(argv[1]); ofstream myfile; Mat_<float> MatBlue = img; int rows1 = MatBlue.rows; int cols1 = MatBlue.cols; for(int x = 0; x < cols1; x++) { for(int y = 0; y < rows1; y++) { float val = MatBlue.at<cv::Vec3b>(y, x)[1]; MatBlue.at<cv::Vec3b>(y, x)[0] = val + 1; } } }

    Read the article

  • Dealing with Struts2 float conversion type

    - by Daniel Calderon Mori
    I have a question regarding float type conversion in Struts2. I have a form that contains a serie of normal input elements. A serie of textfields with an add button by the side of each one is included in the window. Clicking on one of this buttons has the effect of adding an input type "hidden" inside the form with the value of its correspondent textfield. That value will often be a float number that, this is very important, uses the point format (example: 1.34). The inputs created look like this: <input class="hidden_material" type="hidden" name="form[0].cantidad_formulacion" value='1.34'"> <input class="hidden_material" type="hidden" name="form[1].cantidad_formulacion" value='1.54'"> Anyway, the whole proccess is made correctly until the data is used by the server after the form submission. The numbers are present as if the point wouldn't have been placed in the number (using the example above, as 134). If a comma is used (as in 1,34), there wouldn't be a problem. But that will not be the case with the users of the system. How could I solve this problem?

    Read the article

  • css to display three coloumn content

    - by arpymastro
    I am trying to get three column output using <div> for each. Right now my div on the left is lined properly even the middle one, but when I try to put right it is just clipping down. CSS /* left div */ #left-sidebar, #right-sidebar { width:15%; height:700px; float: left; padding-left: 15px; padding-top: 20px; } /* middle div */ #mid-content { width:75%; padding-left: 30px; padding-top: 20px; } /* right div */ #right-sidebar { float:right; }

    Read the article

  • Convert methods from Java-actionscript to ObjectiveC

    - by eco_bach
    Hi I'm tring to convert the following 3 methods from java-actionscript to Objective C. Part of my confusion I think is not knowing what Number types, primitives I should be using. ie in actionscript you have only Number, int, and uint. These are the 3 functions I am trying to convert public function normalize(value:Number, minimum:Number, maximum:Number):Number { return (value - minimum) / (maximum - minimum); } public function interpolate(normValue:Number, minimum:Number, maximum:Number):Number { return minimum + (maximum - minimum) * normValue; } public function map(value:Number, min1:Number, max1:Number, min2:Number, max2:Number):Number { return interpolate( normalize(value, min1, max1), min2, max2); } This is what I have so far -(float) normalize:(float*)value withMinimumValue:(float*)minimum withMaximumValue:(float*)maximum { return (value - minimum) / (maximum - minimum); } -(float) interpolate:(float*)normValue withMinimumValue:(float*)minimum withMaximumValue:(float*)maximum { return minimum + (maximum - minimum) * normValue; } -(float) map:(float*)value withMinimumValue1:(float*)min1 withMaximumValue1:(float*)max1 withMinimumValue2:(float*)min2 withMaximumValue2:(float*)max2 { return interpolate( normalize(value, min1, max1), min2, max2); }

    Read the article

  • Slider Not Behaving As I Would Expect

    - by Adam Waite
    I have a slider that changes a float from 1 to 10 but I want to save this value and use it across all view controllers so I have saved that float as an NSNumber in a model class (settingsData.sensitivitySliderSettingValue). I am trying to output the updated slider value to the console every time that it is changed however it just gets set to 0 rather than 0 to 10. I don't understand why this is... Here's my code: -(IBAction)sensitivitySliderValueChanged:(id)sender { [self updateSensitivity]; } -(void)updateSensitivity{ settingsData.sensitivitySettingValue = [NSNumber numberWithFloat:sensitivitySlider.value]; NSLog(@"The Slider Value is: %1.1f", [settingsData.sensitivitySettingValue floatValue]); }

    Read the article

  • Centralizing a floating element :(

    - by 2x2p1p
    Hi guys :| My "div" element have a relative width, it isn't absolute so I can't use exact numbers to centralize. A nice solution is to use "display: inline-block": body { text-align: center; } #myDiv { border: 1px solid black; display: inline-block; padding: 50px; } But this element NEEDS to float, I tried this: #myDiv { border: 1px solid black; display: inline-block; float: left; padding: 50px; } And this: #myDiv { border: 1px solid black; display: inline-block; padding: 50px; position: absolute; } Without any success, can somebody help me ? Thanks

    Read the article

  • Workaround for Outlook 2007 for wrapping text around image with margin?

    - by DavidW
    As we all know, Outlook 2007 uses the Word 2007 rendering engine, causing endless grief when designing HTML email message. [Insert rant here] In particular, float, margin, and padding are - shall we say? - poorly supported. To simulate float so that text wraps around an image, apparently we can simply use: <img src="foo.png" align="right"> The issue is padding/margin. Without padding/margin, the wrapped text butts up against the image which looks goofy. One workaround is to edit the image and add transparent framing that simulates margin. Does anyone know any other workarounds?

    Read the article

  • What is the cost in bytes for the overhead of a sql_variant column in SQL Server?

    - by Elan
    I have a table, which contains many columns of float data type with 15 digit precision. Each column consumes 8 bytes of storage. Most of the time the data does not require this amount of precision and could be stored as a real data type. In many cases the value can be 0, in which case I could get away with storing a single byte. My goal here is to optimize space storage requirements, which is an issue I am facing working with a SQL Express 4GB database size limit. If byte, real and float data types are stored in a sql_variant column there is obviously some overhead involved in storing these values. What is the cost of this overhead? I would then need to evaluate whether I would actually end up in significant space savings (or not) switching to using sql_variant column data types. Thanks, Elan

    Read the article

  • css coding on Myspace - Problem

    - by Frederik Wessberg
    Hey Folks. I've read what I could, and I'm certainly no master, but I'm fixing up a colleagues profile on myspace.com, and im working with 2 divs in each side of the screen, and I want them to align so that they are next to each other. I've tried float: left; and float: right;, and I've tried margin: right; on div 1 and such. Could you help? Here's the site: http://www.myspace.com/jonasjohansen This is info for div1: <div class="textBox" align="left" style="width: 290px; word-wrap:break-word"> <span class="orangetext15"> BANDS </span> <b>MOVE</b><br /> Fredrik ....balbalbalbla </div> <style> .textBox { position: relative; left:-320px; top:0px; width: 290px; height: 350px; overflow-y: visible; overflow-x: visible; top: YYYpx; z-index: 3; background-color: transparent; border:none; } </style> This is info for div2: <style>.i {display:none;}{!-eliminate bio header!-}table table td.text table td.text {display:none;}{!-recover in shows and friends-!}table table td.text div table td.text,table table td.text table.friendSpace td.text {display:inline;}{! move up our custom section. You may change px value !}div.myDivR {position:relative; top:0px; margin-bottom:-300px; }{! you can apply style to the custom div !}div.myDivR {background-color:white; border:2px solid; border-color:darkgreen; float: right;}</style></td></tr></table></td></tr></table><span class="off">Re-Open Bio Table give it our own Class </span><table class="myBio" style="width:435px;"><tr><i class="i"></i><td class="myBioHead" valign="center" align="left" width="auto" bgcolor="ffcc99" height="17"> &nbsp;&nbsp;<span class="orangetext15"> ABOUT JONAS JOHANSEN</span> </td></tr><tr><td><table class="myBioI"><tr><td><span class="off"></span> blalbalbalbalbla <span class="off">END Bio Content </span>

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >