Search Results

Search found 5180 results on 208 pages for 'outside'.

Page 74/208 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • riched32.dll or riched20.dll sourcode

    - by genesys
    Is the sourcecode of riched32.dll or riched20.dll available somewhere If not - what could I do if i want to create a richedit textfield that behaves slightly different (like changing the control for the scrollbars, such that i can change the size and positions of them from outside) thanks

    Read the article

  • Incorrect output on changing sequence of declarations

    - by max
    Writing C++ code to implement Sutherland-Hodgeman polygon clipping. This order of declaration of these 2 statements gives correct output, reverse does not. int numberOfVertices = 5; Point pointList[] = { {50,50}, {200,300}, {310,110}, {130,90}, {70,40} }; I am passing the polygon vertex set to clippers in order - LEFT, RIGHT, TOP, BOTTOM. The exact error which comes when the declarations are reversed is that the bottom clipper, produces an empty set of vertices so no polygon is displayed after clipping. Correct: Incorrent: Confirmed by outputting the number of vertices produced after each pass: Correct: Incorrect: What is the reason for this error? Code: #include <iostream> #include <GL/glut.h> #define MAXVERTICES 10 #define LEFT 0 #define RIGHT 1 #define TOP 2 #define BOTTOM 3 using namespace std; /* Clipping window */ struct Window { double xmin; double xmax; double ymin; double ymax; }; struct Point { double x; double y; }; /* If I interchange these two lines, the code doesn't work. */ /**************/ int numberOfVertices = 5; Point pointList[] = { {50,50}, {200,300}, {310,110}, {130,90}, {70,40} }; /**************/ const Window w = { 100, 400, 60, 200 }; /* Checks whether a point is inside or outside a window side */ int isInside(Point p, int side) { switch(side) { case LEFT: return p.x >= w.xmin; case RIGHT: return p.x <= w.xmax; case TOP: return p.y <= w.ymax; case BOTTOM: return p.y >= w.ymin; } } /* Calculates intersection of a segment and a window side */ Point intersection(Point p1, Point p2, int side) { Point temp; double slope, intercept; bool infinite; /* Find slope and intercept of segment, taking care of inf slope */ if(p2.x - p1.x != 0) { slope = (p2.y - p1.y) / (p2.x - p1.x); infinite = false; } else { infinite = true; } intercept = p1.y - p1.x * slope; /* Calculate intersections */ switch(side) { case LEFT: temp.x = w.xmin; temp.y = temp.x * slope + intercept; break; case RIGHT: temp.x = w.xmax; temp.y = temp.x * slope + intercept; break; case TOP: temp.y = w.ymax; temp.x = infinite ? p1.x : (temp.y - intercept) / slope; break; case BOTTOM: temp.y = w.ymin; temp.x = infinite ? p1.x : (temp.y - intercept) / slope; break; } return temp; } /* Clips polygon against a side, updating the point list (called once for each side) */ void clipAgainstSide(int sideToClip) { int i, j=0; Point s,p; Point outputList[MAXVERTICES]; /* Main algorithm */ s = pointList[numberOfVertices-1]; for(i=0 ; i<numberOfVertices ; i++) { p = pointList[i]; if(isInside(p, sideToClip)) { /* p inside */ if(!isInside(s, sideToClip)) { /* p inside, s outside */ outputList[j] = intersection(p, s, sideToClip); j++; } outputList[j] = p; j++; } else if(isInside(s, sideToClip)) { /* s inside, p outside */ outputList[j] = intersection(s, p, sideToClip); j++; } s = p; } /* Updating number of points and point list */ numberOfVertices = j; /* ERROR: In last call with BOTTOM argument, numberOfVertices becomes 0 */ /* all earlier 3 calls have correct output */ cout<<numberOfVertices<<endl; for(i=0 ; i<numberOfVertices ; i++) { pointList[i] = outputList[i]; } } void SutherlandHodgemanPolygonClip() { clipAgainstSide(LEFT); clipAgainstSide(RIGHT); clipAgainstSide(TOP); clipAgainstSide(BOTTOM); } void init() { glClearColor(1,1,1,0); glMatrixMode(GL_PROJECTION); gluOrtho2D(0,1000,0,500); } void display() { glClear(GL_COLOR_BUFFER_BIT); /* Displaying ORIGINAL box and polygon */ glColor3f(0,0,1); glBegin(GL_LINE_LOOP); glVertex2i(w.xmin, w.ymin); glVertex2i(w.xmin, w.ymax); glVertex2i(w.xmax, w.ymax); glVertex2i(w.xmax, w.ymin); glEnd(); glColor3f(1,0,0); glBegin(GL_LINE_LOOP); for(int i=0 ; i<numberOfVertices ; i++) { glVertex2i(pointList[i].x, pointList[i].y); } glEnd(); /* Clipping */ SutherlandHodgemanPolygonClip(); /* Displaying CLIPPED box and polygon, 500px right */ glColor3f(0,0,1); glBegin(GL_LINE_LOOP); glVertex2i(w.xmin+500, w.ymin); glVertex2i(w.xmin+500, w.ymax); glVertex2i(w.xmax+500, w.ymax); glVertex2i(w.xmax+500, w.ymin); glEnd(); glColor3f(1,0,0); glBegin(GL_LINE_LOOP); for(int i=0 ; i<numberOfVertices ; i++) { glVertex2i(pointList[i].x+500, pointList[i].y); } glEnd(); glFlush(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(1000,500); glutCreateWindow("Sutherland-Hodgeman polygon clipping"); init(); glutDisplayFunc(display); glutMainLoop(); return 0; }

    Read the article

  • Directory name "cache" in IIS 5.

    - by Chuck Conway
    In IIS 5 one of the directories off the root has a leading underscore. All files under the directory are unreachable (404) from the browser. I have verified that the paths are correct. Other javascript files outside the directory comedown fine. Any thoughts? Example: http://fm74g4rndmu02.corp.com/_cache/softwarecommunity/api.js

    Read the article

  • Storing images for multiple web sites

    - by Orkun Balkanci
    I've got two web sites (written in c#) which are pretty common: One is an admin site (cms) where you add images into content as needed, through editor pages. Second is the site where the content with images is shown. Images should be stored outside these two sites but where and how?

    Read the article

  • getJSON and variable scope in javascript

    - by nillls
    Hi! In order to make function calls to our back-end php code we've implemented something called an ActionProxy like this: function ActionProxy(action, input, callback){ $.post("ActionProxy.php?method="+action, { data: input}, function(data, textStatus, XMLHttpRequest){ //return data.ResponseWhatever } }); The problem we're having is that using data outside the ActionProxy is impossible due to variable scope limitations (we assume), setting var res = data.ResponseWhatever or return data.ResponseWhatever is pretty futile. How would one handle these responses most appropriately so that functions calling the actionproxy can access the response values?

    Read the article

  • Should all the using directives for namespaces be inside the namespace?

    - by Sajeev SL
    Microsoft StyleCop provided a warning when the using directives for namespaces are provided outside of the namespace. Is this really required as my view on this is that using dircetives for namespaces is for providing a alias name for namespace and for removing the need for providing the namespace name when a class/interface is used. I dont think it will be used for loading the assembly.

    Read the article

  • Visual SVN host remotely

    - by George
    I am currently using subversion with visual SVN to manage and host my repo across my local subnet. i.e. https://WIN-NU2CCXWBFDF/svn/ How can I configure Visual SVN to host outside of my subnet, i.e. https://www.mysite.com/svn

    Read the article

  • Easy command line Java compile

    - by Nash0
    So I have to send a java project to someone outside our company who has no experience with java and they need to compile it. Is there an easy way to do it on the windows command line that does not require writing out lists of the files? Personally I think javac should be smart enough to handle javac * when in the folder just under the root of the package hierarchy. Is there anything in this ballpark?

    Read the article

  • resignFirstResponder when tapping UITableView?

    - by Canada Dev
    I have a UITableView with two custom cells and each of them has a subview with a UITextField inside it. I have tried adding a UIButton on top of the UITableView and have it resignFirstResponder but that just means you won't be able to tap anywhere else - not even on the UITextFields to enter text. How do I make it so if I tap outside those two UITextFields, I can call resignFirstResponder, so the user can get back to the other cells? Thanks

    Read the article

  • Membership provider

    - by Adonis L
    What would be the best way to store additional information outside of active directory? I will be utilizing AD authentication as well as WIndowsTokenRoleProvider but I will also need to store some additional information about a user that will be used for authorizations purposes. This is a ASP.net application with a SQL backend, I am looking for suggestions or perhaps some articles that can provide direction.

    Read the article

  • Undefined function in php

    - by Bidyut
    I wrote three methods in a class and one is calling another, but when I call the function outside through the object, it is showing an undefined function error for the second function. Here's my code: function resize_image(){ } function image_resize(){ $a = resize_image(); } When I run this, it shows resize_image() as undefined. Here's the error: Fatal error: Call to undefined function resize_image() in /home/vacayge/public_html/Major/Alpha1/classes/cUserImages.php on line 2090

    Read the article

  • How to parse the AndroidManifest.xml file inside an .apk package

    - by jnorris
    This file appears to be in a binary XML format. What is this format and how can it be parsed programmatically (as opposed to using the aapt dump tool in the SDK)? This binary format is not discussed in the in the documentation here: http://developer.android.com/guide/topics/manifest/manifest-intro.html Note: I want to access this information from outside the Android environment, preferably from Java.

    Read the article

  • I'm trying to match some numbers in a string using a regexpressions and am having difficulty with th

    - by Ryan
    here is the line i'm trying to parse [\\?\Volume{d3f7f470-526b-11df-92eb-001a647802d2}\] 85 90 NotFound I'm basically just trying to get the numbers that are outside of the brackets and ignore anything in between the brackets. My original syntax worked until I realized that sometimes there would be numbers in the brackets (I was just using "([0-99]{2})") any help would be greatly appreciated. Thanks

    Read the article

  • When Something Occurs in a BackgroundWorker, Trigger Code on a Different Thread?

    - by Soo
    I have a background worker that runs and looks for stuff, and when it finds stuff, I want to update my main WinForm. The issue that I'm having is that when I try to update my WinForm from my background worker, I get errors that tell me I can't modify things that were made outside of my background worker (in other words, everything in my form). Can someone provide a simple code example of how I can get my code to work the way I want it to? Thanks!

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >