Search Results

Search found 5881 results on 236 pages for 'junction points'.

Page 155/236 | < Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >

  • Problem while compiling the code

    - by Atul
    Can someone points me the problem in the code when compiled with gcc 4.1.0. #define X 10 int main() { double a = 1e-X; return 0; } I am getting error:Exponent has no digits. When i replace X with 10, it works fine. Also i checked with g++ -E command to see the file with preprocessors applied, it has not replaced X with 10. I was under the impression that preprocessor replaces every macro defined in the file with the replacement text with applying any intelligence. Am I wrong? I know this is a really silly question but I am confused and I would rather be silly than confused :). Any comments/suggestions.

    Read the article

  • Change IP where domain is pointing

    - by Christian Sciberras
    This is probably a very strange request. I need to programmaticaly (via code) change the IP where a domain name is pointing to. IE: xyz.com points to 100.100.100.100 setIP('xyz.com','100.100.100.100'); I know this [code] is practically impossible, however, what I need is to do this via domain host API etc or other possible ways you might think of. I'd be happy even if it weren't anything more then sending an email to the DNS owner/host. Do you know of anything the like or which might help? (nb: considered throwing this at ServerFault, but felt it more at home here ;) ) Cheers!

    Read the article

  • Android show driving direction route between two geopoints

    - by kendrelaxman
    I have googled for 2-3 days now, but I am not able to get the perfect solution for my problem. I need to show the route between two geo points (Not a straight line but need to show driving direction kind of route) but I am not able to find any solution to this. I had come across the solution in this question. But I guess the solution also not working. If you can help me out that will be great. I found the solution Look for answer bellow...

    Read the article

  • Why does this C program compile?

    - by AdmiralJonB
    I've just come across someone's C code that I'm confused as to why it is compiling. There are two points I don't understand. First, the function prototype has no parameters compared to the actual function definition. Secondly, the parameter in the function definition doesn't have an type. #include <stdio.h> int func(); int func(param) { return param; } int main() { int bla = func(10); printf("%d",bla); } Could someone please explain to me why this works? I've tested it in a couple of compilers and it works fine.

    Read the article

  • Problem with sending "SetCookie" first in php code

    - by Camran
    According to this manual: http://us2.php.net/setcookie I have to set the cookie before anything else. Here is my cookie code: if (isset($_COOKIE['watched_ads'])){ $expir = time()+1728000; //20 days $ad_arr = unserialize($_COOKIE['watched_ads']); $arr_elem = count($ad_arr); if (in_array($ad_id, $ad_arr) == FALSE){ if ($arr_elem>10){ array_shift($ad_arr); } $ad_arr[]=$ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } } else { $expir = time()+1728000; //20 days $ad_arr[] = $ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } As you can see I am using variables in setting the cookie. The variables comes from a mysql_query and I have to do the query first. But then, if I do, I will get an error message: Cannot modify header information - headers already sent by ... The error points to the line where I set the cookie above. What should I do?a

    Read the article

  • Issues with installing PHPUnit

    - by user1045696
    So I've installed PHP Unit via PEAR (all the files are there, I've checked). However, when I try to run a test I get: Warning: require_once(PHPUnit/Framework.php) [function.require-once]: failed to open stream: No such file or directory in C:\WAMP\www\ExampleTests\arraytest.php on line 2 I'm guessing this has something to do with my PHPUnit installation not updating the include_path properly, but I'm not too sure what to update it to? I'm on Windows (7), using WAMP. Cheers! EDIT: The bottom of PHP.ini contains: ;***** Added by go-pear include_path=".;C:\WAMP\bin\php\php5.3.10\pear" ;***** I also get the error: Fatal error: require_once() [function.require]: Failed opening required 'PHPUnit/Framework.php' (include_path='.;C:\php\pear') However, after looking in PHP.ini, there's no include path that points to C:\php\pear?

    Read the article

  • Can I modify an ASP.NET AJAX History Point?

    - by Nick
    I'm using ASP.NET 3.5 with AJAX and have enabled history on the Script Manager. I have 2 pages, Default.aspx and Default2.aspx. I'm using the AJAX History on the Default.aspx page and saving history points on the server-side. There are some dropdowns on Default.aspx that I don't want to save a history point for each change but would like to save the latest state so that when I click on a link on Default.aspx that navigates to Default2.aspx, when I click the back button on Default2.aspx to return I want the dropdowns to reflect what they were prior to clicking on the hyperlink. So what I'd like to do is modify the history point that I originally set on one of my ajax async postbacks on the client-side before the page navigates away to Default2.aspx. There is a location.hash javascript property that looks like it may do what I want but when I modify the value the Script Manager Navigate event is firing. Is there a way to prevent this event from firing? And would this then do the job?

    Read the article

  • Java: Is it possible to take a GUI Panel and output it into a picture?

    - by user369748
    So I have this chart that's a little special. Kind of like an XY plot of points but my boss wanted to look like a bunch of boxes rather than dots connected by lines. And I basically made a chart using gridlayout and a whole bunch of cells that I'll be colouring in black or white depending on the data. Now he sorta wants it to be outputted to a image file. Is there any way to save a Panel into a picture? He wants to display not only the data but also save a visual representation of the data into an image file.

    Read the article

  • Subtracting months/years from boost::posix_time::ptime

    - by Zack
    I have a boost::posix_time::ptime that points to March 31st 2010 like this: ptime p(date(2010, Mar, 31)); I would like to subtract a month (and possibly years) from this date. From the docs I see these two operators: ptime operator-(time_duration) and ptime operator-(days) but none of them can work with months/years. If I try and do: time_duration duration = hours(24 * 30); ptime pp = p - duration; I'm getting March 1st and if I'm trying: ptime pp = p - days(30); I'm still getting March 1st, while I'd like to get February 28th. How can I achieve my desired result? (I would like to get the desired result also when subtracting a month from March 28, 29, 30)

    Read the article

  • How do I swap triangle icons when doing expanding/collapsing divs with Javascript/CSS

    - by SL
    I have a div that I want to toggle between displaying or not when a user clicks on a piece of text. I have a javascript function that toggles a div on or off. That works fine. What I don't know how to do is to have a triangle that points to the right or down depending on whether the div is open. My HTML looks like this: <a onclick="toggleDiv('myDiv');">Click here to expand or close div</a> <div id="myDiv" style="display:none"> ... </div> How do I add one of those triangles and have it point the right way, ideally with just HTML, Javascript, and CSS? The triangle would appear to the left of the "Click here..." string. Thanks.

    Read the article

  • How do I write a Guice Provider that doesn't explicitly create objects?

    - by ripper234
    Say I have a ClassWithManyDependencies. I want to write a Guice Provider for this class, in order to create a fresh instance of the class several times in my program (another class will depend on this Provider and use it at several points to create new instances). One way to achieve this is by having the Provider depend on all the dependencies of ClassWithManyDependencies. This is quite ugly. Is there a better way to achieve this? Note - I certainly don't want the Provider to depend on the injector. Another option I considered is having ClassWithManyDependencies and ClassWithManyDependenciesProvider extend the same base class, but it's butt ugly.

    Read the article

  • JUnit Theories: Why can't I use Lists (instead of arrays) as DataPoints?

    - by MatrixFrog
    I've started using the new(ish) JUnit Theories feature for parameterizing tests. If your Theory is set up to take, for example, an Integer argument, the Theories test runner picks up any Integers marked with @DataPoint: @DataPoint public static Integer number = 0; as well as any Integers in arrays: @DataPoints public static Integer[] numbers = {1, 2, 3}; or even methods that return arrays like: @DataPoints public static Integer[] moreNumbers() { return new Integer[] {4, 5, 6};}; but not in Lists. The following does not work: @DataPoints public static List<Integer> numberList = Arrays.asList(7, 8, 9); Am I doing something wrong, or do Lists really not work? Was it a conscious design choice not to allow the use Lists as data points, or is that just a feature that hasn't been implemented yet? Are there plans to implement it in a future version of JUnit?

    Read the article

  • Location inheritInChildApplications kill debugger?

    - by chobo2
    Hi I am wondering is this normal when you add this into your web.config <location path="." inheritInChildApplications="false"> </location> The debugger should stop working. Like when I add this to my site and try to run in debug mode it won't activate any of my debug points nor will it lock up Visual studios 2008. I can have it running and still make edits to my C# code. I take the line away and I get the debug mode back and it locks up VS2008.

    Read the article

  • Using directory traversal attack to execute commands

    - by gAMBOOKa
    Is there a way to execute commands using directory traversal attacks? For instance, I access a server's etc/passwd file like this http://server.com/..%01/..%01/..%01//etc/passwd Is there a way to run a command instead? Like... http://server.com/..%01/..%01/..%01//ls ..... and get an output? EDIT: To be clear here, I've found the vuln in our company's server. I'm looking to raise the risk level (or bonus points for me) by proving that it may give an attacker complete access to the system

    Read the article

  • Entity diagram with tables that have foreign keys that point to a non-PK column do not show relation

    - by Jason Coyne
    I have two tables parent and child. If I make a foreign key on child that points to the primary key of parent, and then make an entity diagram, the relationship is shown correctly. If I make the foreign key point to a different column, the relationship is not shown. I have tried adding indexes to the column, but it does not have an effect. The database is sqlite, but I am not sure if that has an effect since its all hidden behind ADO.net. How do I get the relationship to work correctly?

    Read the article

  • What do I need to know before working on an IM application?

    - by John
    I'm looking into building an IM-type application using Java stack (for the server at least). I'd be interested to see any information/advice on how applications like Skype/AIM/MSN work, as well as know any technologies/APIs that might be relevant. Without giving away the idea itself, it's perhaps more akin to Google Wave than Skype, but information useful for either is very welcome. Specific points I have already thought of include: Server Vs P2P... for reasons of logging my system will require all communication to go through a central server. Is this how other IM tools work... especially when audio/video comes into the equation? Cross-communication with other systems. Are there APIs for this or do all IM providers work hard to keep their protocol secret? The nature of what I'm designing means integration could probably only be limited, but it definitely seems worthwhile from a business perspective

    Read the article

  • What key concepts and nuances in C++ you know?

    - by Narek
    What kind of key points and concepts should a person know from C++ (and from programming in general) to be considered that he/she possesses C++ (and programming, in general) skills good. e.g. //Even if sizeof(T) may not be equal to 1, this code steps over array elements T v[]; for(T *p = v ; *p != 0 ; p++) cout<<*p<<endl; P.S. I hope by exchanging this info we will help each other to know C++ and programing thechnics better by doing explicit our notion that we got from practice.

    Read the article

  • (iphone) Does it make difference to provide more images when the object is moving in a straight line?

    - by Eugene
    Hi. Among many animation scenarios, there are times when I want an object to move a straight line then change direction, move another straight line and so forth. Assuming I would use either UIImageView or CABasicAnimation with image arrays. Does it make difference to provide more images when the object is moving in a straight line? For example, point1 ---------point2 ------- point3 (all points are in a straight line) Providing an image at point2 to UIImageView or CABasicAnimation, gives any better animation result, assuming I don't need to change the animation speed along the course? If I were flashing each image myself, yes it would make the animation look smooth, but I'm giving the images to UIImageView/CABasicAnimation, and wonder what they do. Thank you

    Read the article

  • Determine an object's class returned by a factory method (Error: function does not take 1 arguments

    - by tzippy
    I have a factorymethod that either returns an object of baseclass or one that is of derivedclass (a derived class of baseclass). The derived class has a method virtual void foo(int x) that takes one argument. baseclass however has virtual void foo() without an argument. In my code, a factory method returns a pointer of type bar that definetly points to an object of class derivedclass. However since this is only known at runtime I get a compiler error saying that foo() does not take an argument. Can I cast this pointer to a pointer of type derivedclass? std::auto_ptr<baseclass> bar = classfactory::CreateBar(); //returns object of class derivedclass bar->foo(5); class baseclass { public: virtual void foo(); } class derivedclass : public baseclass { public: virtual void foo(int x); }

    Read the article

  • Cartesian Plane

    - by NuNu
    I'm trying to define a function in Haskell that takes an integer argument c and returns the list of all points on the cartesian plane of the form (x/c,y/c) where x and y are integers. x/c is between -2 and 1 and y/r is between -1 and 1 This is what I've gotten so far which I'm almost sure is right but I'm getting a parse error on input = when I run it particularly at this line: cart xs ys c = [(y/c,x/c) | x <- xs, y <- ys] plane :: Int -> [a] plane c = cart [-1*c .. 1*c] [-2*c .. 1*c] c cart xs ys c = [(y/c,x/c) | x <- xs, y <- ys] A sample output would be: plane 1 would generate: [(-2.0, -1.0), (-1.0, -1.0), ( 0.0, -1.0), ( 1.0, -1.0), (-2.0, 0.0), (-1.0, 0.0), ( 0.0, 0.0), ( 1.0, 0.0), (-2.0, 1.0), (-1.0, 1.0), ( 0.0, 1.0), ( 1.0, 1.0)] Anyone have any idea how I can fix this! Thanks

    Read the article

  • Cadr of a list involving assoc function

    - by user3619045
    I have looked around on the net and cant find an answer to my query. I would really appreciate if someone could provide a good answer without down rating this post. In Lisp car, cdr are used on data mode like '(whatever here) which makes sense to me. Now, in the book Land of Lisp the author is explaining how to build a text engine and suddenly he uses the following description to make a function. (defun describe-location (location nodes) (cadr (assoc location nodes))) Can I ask why is he doing a cadr on a list and how come it provides a response and not an error? shouldn't it be a data mode i.e with a quote in front of the opening bracket '(whatever here)? and also why is he using assoc as in (assoc location nodes) and not (assoc 'garden *nodes*) Isn't the second correct way to use assoc ? I may be missing the big picture and as such would really appreciate someone explaining these key points please. Many thanks!

    Read the article

  • Nesting arrays into NSDictionary object (Objective-C)

    - by antalbud
    I would like to define tasks using NSDictionary, which I'd like to save in a plist file (I didn't have much luck with Core Data so far), but got stuck at two points: -- When using initWithObjectsAndKeys: I can change the data type to number or boolean, using NSDate's numberWithInt: and numberWithBool: methods, respectively. I can't seem to find the method to change the type to date though. I couldn't find anything like that in the documentation. -- The second problem I ran into was with the nested arrays. How can I add them to the dictionary? I have uploaded a picture to here of what I am trying to achieve. Thank you in advance!

    Read the article

  • Understanding a lighttpd.conf file?

    - by AP257
    Hi all, I've been given a lighttpd.conf that someone else wrote and need help working out how to serve it. I'm 90% of the way there but stuck... The index.html page appears, but links and CSS files don't point to the right place. To clarify, the links and CSS files are all pointing to a 'file:///' URL. So styles.css in the HTML header points to file:///html/styles.css, whereas it should be going to http://url.com/styles.css Maybe url.rewrite or url.redirect isn't working properly? server.document-root = "~/html" server.port = 28001 mimetype.assign = ( ".html" => "text/html", ".txt" => "text/plain", ".jpg" => "image/jpeg", ".png" => "image/png" ) url.rewrite = ( "^(.*)/($|\?.*)" => "$1/index.html", "^(.*)/([^.?]+)($|\?.*)$" => "$1/$2.html" ) $HTTP["scheme"] == "http" { url.redirect = ( "^/platform/index.html$" => "/platform", "^/about/company.html$" => "/about/company",, ) }

    Read the article

  • jQuery: Load body of page into variable

    - by Nathan G.
    I'm using jQuery to load the result of a PHP script into a variable. The script is passed something that the user typed with a GET request. I want to take just what the script spit out into its <body> tag. Here's what I've tried: JS: function loader() { var typed = $('#i').val(); //get what user typed in $.get("script.php", {i: typed}, function(loaded) {dataloaded = loaded;}); alert($(dataloaded).find('body')) } But it just displays [Objec object]. How can I get a useful value that is just the contents of the body of a loaded page? I know the PHP works, I just need the JS. The script echos something like 1!!2 (two numbers separated by two exclamation points). Thanks!

    Read the article

  • How can I select the first child of all the children of a jQuery object?

    - by sawa
    I have a <tr> which includes several <td>s, each of which includes exactly one <div>, which may have further structure: <tr id="foo"> <td><div>...</div></td> <td><div>...</div></td> ... <td><div>...</div></td> </tr> Given a jQuery selector obj = $('#foo'), how can I get a selector that points to all the <div>s directly under a <td> under the <tr> (but nothing within the <div>s)? Probably chldren() and/or find() may be relevant, but I am not sure.

    Read the article

< Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >