Search Results

Search found 591 results on 24 pages for 'taylor hill'.

Page 19/24 | < Previous Page | 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • query mysql table and fetch rows posted in 3 days

    - by Mac Taylor
    Hey guys how can i query my mysql database and fetch rows which are posted in earlier 3 days i know how to fetch todays's rows but not 3 days ago time will save in my table like this : 2010-01-20 19:17:49 and this is what i know : SELECT id FROM pages WHERE date=now() but i need to show posts in 3days and im looking for a simple and straight solution ,because i know how to do so in long php codes

    Read the article

  • pathogen#infect not updating the runtimepath

    - by Taylor Price
    I have started working with pathogen.vim with gvim on Windows, following Tim Pope's setup guide at his github repository here. However, I'm running into the problem that pathogen#infect() does not seem to be modifying the runtimepath (as seen by running :echo &runtimepath in gvim). The simple test case _vimrc that I came up with is as follows. Please note that pathogen gets loaded just fine. "Set a base directory. let $BASE_DIR='H:\development\github\vimrc' "Source pathogen since it's not in the normal autoload directory. source $BASE_DIR\autoload\pathogen.vim "Start up pathogen call pathogen#infect() "call pathogen#infect('$BASE_DIR\functions') Neither running pathogen#infect() without an argument (which should add the bundles directory under the vimfiles directory) nor specifying a directory to contain files works. Substituting the pathogen#infect() call with pathogen#runtime_prepend_subdirectories('$BASE_DIR\functions'), which is what pathogen#infect() does fails to change the runtimepath as well. Any ideas that I've missed? Any more information that would be helpful? My repository with the non-trivial example is here.

    Read the article

  • Write a program for a report derived from the data in the data file JEWELRY. The data is to be input

    - by Taylor
    here is the JEWELRY file 0011 Money_Clip 2.000 50.00 Other 0035 Paperweight 1.625 175.00 Other 0457 Cuff_Bracelet 2.375 150.00 Bracelet 0465 Links_Bracelet 7.125 425.00 Bracelet 0585 Key_Chain 1.325 50.00 Other 0595 Cuff_Links 0.625 525.00 Other 0935 Royale_Pendant 0.625 975.00 Pendant 1092 Bordeaux_Cross 1.625 425.00 Cross 1105 Victory_Medallion 0.875 30.00 Pendant 1111 Marquis_Cross 1.375 70.00 Cross 1160 Christina_Ring 0.500 175.00 Ring 1511 French_Clips 0.687 375.00 Other 1717 Pebble_Pendant 1.250 45.00 Pendant 1725 Folded_Pendant 1.250 45.00 Pendant 1730 Curio_Pendant 1.063 275.00 Pendant this is the program i have used #include <iostream> #include <string> #include <iomanip> #include <fstream> using namespace std; struct productJewelry { string name; double amount; int itemCode; double size; string group; }; int main() { // declare variables ifstream inFile; int count=0; int x=0; productJewelry product[50]; inFile.open("jewelry.txt"); // file must be in same folder if (inFile.fail()) cout << "failed"; cout << fixed << showpoint; // fixed format, two decimal places cout << setprecision(2); while (inFile.peek() != EOF) { // cout << count << " : "; count++; inFile>> product[x].itemCode; inFile>> product[x].name; inFile>> product[x].size; inFile>> product[x].amount; inFile>> product[x].group; // cout << product[x].itemCode << ", " << product[x].name << ", "<< product[x].size << ", " << product[x].amount << endl; x++; if (inFile.peek() == '\n') inFile.ignore(1, '\n'); } inFile.close(); string temp; bool swap; do { swap = false; for (int x=0; x<count;x++) { if (product[x].name>product[x+1].name) { //these 3 lines are to swap elements in array temp=product[x].name; product[x].name=product[x+1].name; product[x+1].name=temp; swap=true; } } } while (swap); for (x=0; x< count; x++) { //cout<< product[x].itemCode<<" "; //cout<< product[x].name <<" "; //cout<< product[x].size <<" "; //cout<< product[x].amount<<" "; //cout<< product[x].group<<" "<<endl; } system("pause"); // to freeze Dev-c++ output screen return 0; } // end main

    Read the article

  • To copy data from a webpage into an array of structs and sorted by“name” before producing the data.

    - by Taylor
    include include include include using namespace std; struct productJewelry { string name; double amount; int itemCode; double size; string group; }; int main() { // declare variables ifstream inFile; int count=0; int x=0; productJewelry product[50]; inFile.open("jewelry.txt"); // file must be in same folder if (inFile.fail()) cout << "failed"; cout << fixed << showpoint; // fixed format, two decimal places cout << setprecision(2); while (inFile.peek() != EOF) { // cout << count << " : "; count++; inFile product[x].itemCode; inFile product[x].name; inFile product[x].size; inFile product[x].amount; inFile product[x].group; // cout << product[x].itemCode << ", " << product[x].name << ", "<< product[x].size << ", " << product[x].amount << endl; x++; if (inFile.peek() == '\n') inFile.ignore(1, '\n'); } inFile.close(); string temp; bool swap; do { swap = false; for (int x=0; xproduct[x+1].name) { //these 3 lines are to swap elements in array temp=product[x].name; product[x].name=product[x+1].name; product[x+1].name=temp; swap=true; } } } while (swap); for (x=0; x< count; x++) { //cout<< product[x].itemCode<<" "; //cout<< product[x].name <<" "; //cout<< product[x].size <<" "; //cout<< product[x].amount<<" "; //cout<< product[x].group<<" "<<endl; } system("pause"); // to freeze Dev-c++ output screen return 0; } // end main THE FILE THAT NEEDS TO PRINT AND BE SORTED IN ALPHABETICAL ORDER 0011 Money_Clip 2.000 50.00 Other 0035 Paperweight 1.625 175.00 Other 0457 Cuff_Bracelet 2.375 150.00 Bracelet 0465 Links_Bracelet 7.125 425.00 Bracelet 0585 Key_Chain 1.325 50.00 Other 0595 Cuff_Links 0.625 525.00 Other 0935 Royale_Pendant 0.625 975.00 Pendant 1092 Bordeaux_Cross 1.625 425.00 Cross 1105 Victory_Medallion 0.875 30.00 Pendant 1111 Marquis_Cross 1.375 70.00 Cross 1160 Christina_Ring 0.500 175.00 Ring 1511 French_Clips 0.687 375.00 Other 1717 Pebble_Pendant 1.250 45.00 Pendant 1725 Folded_Pendant 1.250 45.00 Pendant 1730 Curio_Pendant 1.063 275.00 Pendant

    Read the article

  • What is the point of Convert.ToDateTime(bool)?

    - by Paul Alan Taylor
    I was doing some type conversion routines last night for a system I am working on. One of the conversions involves turning string values into their DateTime equivalents. While doing this, I noticed that the Convert.ToDateTime() method had an overload which accepted a boolean parameter. First question? Under what circumstances could this ever be useful? I went a little further and tried to execute the method in QuickWatch. Either way ( true or false ), the routine returns an InvalidCastException. Second question? Why is this method even here?

    Read the article

  • String Array and ConvertTo-HTML

    - by Taylor Gibb
    I cant for the life of me get the contents of a string array (well its not strictly typed but all the items in the array are strings) to become a table, i am trying to use ConvertTo-HTML. For example: $arr = @("One", "Two") $arr | ConvertTo-HTML I have tried -As List, using fragments, even using InputObject, is it even possible ? Edit: i simply want to know if there is anyway to use an array as the input for the ConvertTo-HTML cmdlet, all it does is make a table with the length property of the strings.

    Read the article

  • switching on and off in jquery

    - by Mac Taylor
    hey my friends i wrote a code to switch on or off the status of a story ( activate or deactivate ) this is my html part : $status_link = $active==1 ? "active.gif" : "inactive.gif"; <span id='status_link'> <a class='change_status' href='javascript:void(0)' id='$pid'> <img src='images/$status_link' class='active_status' id='$active'></a> </span> and this is my jquery code : <script type="text/javascript">$(function(){ $('.change_status').each(function(){ var pid=$(this).attr('id'); $('.active_status').each(function(){ var type=$(this).attr('id'); .click(function(){ $.post("change_status.php"+"&type="+type+"&pid="+pid, function(data){ $('#status_link').html(data).fadeIn("slow"); }); return false; }); }); </script> and a php function that is easy, i dont think its needed i myself think there is a problem with my jquery code how can i change the picture of that image by clicking on it

    Read the article

  • Confusing alias mySQL

    - by Taylor
    I keep getting the same number outputted for the Total Sales, Minimum Sale, Largest Sale and Average Sale. The Total Invoices is working perfectly, but I cant seem to figure out how to fix the other ones. Here's the query: SELECT SUM( b.`Number of Invoices`) AS `Total Invoices`, SUM( b.`Total Customer Purchases`) AS `Total Sales`, MIN( b.`Total Customer Purchases`) AS `Minimum Sale`, MAX( b.`Total Customer Purchases`) AS `Largest Sale`, AVG( b.`Total Customer Purchases`) AS `Average Sale` FROM (SELECT a.CUS_CODE, COUNT(a.`Number of Invoices`) AS `Number of Invoices`, SUM(a.`Invoice Total`) AS `Total Customer Purchases` FROM ( SELECT CUS_CODE, LINE.INV_NUMBER AS `Number of Invoices`, SUM(LINE.LINE_UNITS * LINE.LINE_PRICE) AS `Invoice Total` FROM `ttriggs`.`INVOICE`, `ttriggs`.`LINE` WHERE INVOICE.INV_NUMBER = LINE.INV_NUMBER GROUP BY CUS_CODE, LINE.INV_NUMBER ) a ) b GROUP BY b.CUS_CODE; Heres the database diagram https://www.dropbox.com/s/b8cy5l29jwh8lyv/1_edit.jpg Subquery generates: CUS_CODE 10011 Number of Invoices 8 Total Customer Purchases 1119.03 Any help is greatly appreciated, Thanks!

    Read the article

  • how to change a while sql query loop into an array loop

    - by Mac Taylor
    hey guys i record number of queries of my website and in page the below script runs , 40 extra queries added to page . how can I change this sql connection into a propper and light one function tree_set($index) { //global $menu; Remove this. $q=mysql_query("select id,name,parent from cats where parent='$index'"); if(mysql_num_rows($q) === 0) { return; } // User $tree instead of the $menu global as this way there shouldn't be any data duplication $tree = $index > 0 ? '<ul>' : ''; // If we are on index 0 then we don't need the enclosing ul while($arr=mysql_fetch_assoc($q)) { $subFileCount=mysql_query("select id,name,parent from cats where parent='{$arr['id']}'"); if(mysql_num_rows($subFileCount) > 0) { $class = 'folder'; } else { $class = 'file'; } $tree .= '<li>'; $tree .= '<span class="'.$class.'">'.$arr['name'].'</span>'; $tree .=tree_set("".$arr['id'].""); $tree .= '</li>'."\n"; } $tree .= $index > 0 ? '</ul>' : ''; // If we are on index 0 then we don't need the enclosing ul return $tree; } i heard , this can be done by changing it into an array , but i don't know how to do so thanks in advance

    Read the article

  • Entity Framework 5 not updating navigation properties in both entities

    - by Taylor
    I have updated a project to use the new Entity framework shipped with VS2012, however I have run into some of my code throwing exceptions. In the VS10 version of EF I was able to create or modify and Entity and use its navigation properties before calling SaveChanges() For example: A Navigation property of a client having a collection of Invoices. Client c = new Client(); Invoice I = new Invoice(); c.Invoices.Add(I); I would then be able to use Invoice.Client somewhere in my code before actually saving it without issue. Now Invoice.Client == null. Similarly in setting I.Client = C, I does not show up under C.Invoices What am I missing here or is this just simply how EF5 is?

    Read the article

  • What does the $1$2$4 mean in this preg_replace?

    - by Taylor
    Got this function for ammending the query string and was wondering what the replacement part of the pre_replace meant (ie- $1$2$4). function add_querystring_var($url, $key, $value) { $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&'); $url = substr($url, 0, -1); if (strpos($url, '?') === false) { return ($url . '?' . $key . '=' . $value); } else { return ($url . '&' . $key . '=' . $value); } } Not too familiar with regular expression stuff. I get the various parts to preg_replace but not 100% about the use of '$1$2$4' in the replacement part.

    Read the article

  • To copy data from a webpage into an array of structs and sorted by"name" before producing the data.

    - by Taylor
    include include include include using namespace std; struct productJewelry { string name; double amount; int itemCode; double size; string group; }; int main() { // declare variables ifstream inFile; int count=0; int x=0; productJewelry product[50]; inFile.open("jewelry.txt"); // file must be in same folder if (inFile.fail()) cout << "failed"; cout << fixed << showpoint; // fixed format, two decimal places cout << setprecision(2); while (inFile.peek() != EOF) { // cout << count << " : "; count++; inFile product[x].itemCode; inFile product[x].name; inFile product[x].size; inFile product[x].amount; inFile product[x].group; // cout << product[x].itemCode << ", " << product[x].name << ", "<< product[x].size << ", " << product[x].amount << endl; x++; if (inFile.peek() == '\n') inFile.ignore(1, '\n'); } inFile.close(); string temp; bool swap; do { swap = false; for (int x=0; xproduct[x+1].name) { //these 3 lines are to swap elements in array temp=product[x].name; product[x].name=product[x+1].name; product[x+1].name=temp; swap=true; } } } while (swap); for (x=0; x< count; x++) { //cout<< product[x].itemCode<<" "; //cout<< product[x].name <<" "; //cout<< product[x].size <<" "; //cout<< product[x].amount<<" "; //cout<< product[x].group<<" "<<endl; } system("pause"); // to freeze Dev-c++ output screen return 0; } // end main

    Read the article

  • PHP - post data ends when '&' is in data.

    - by Phil Jackson
    Hi all, im posting data using jquery/ajax and PHP at the backend. Problem being, when I input something like 'Jack & Jill went up the hill' im only recieving 'Jack' when it gets to the backend. I have thrown an error at the frontend before that data is sent which alerts 'Jack & Jill went up the hill'. When I put die(print_r($_POST)); at the very top of my index page im only getting [key] => Jack how can I be loosing the data? I thought It may have been my filter; <?php function filter( $data ) { $data = trim( htmlentities( strip_tags( mb_convert_encoding( $data, 'HTML-ENTITIES', "UTF-8") ) ) ); if ( get_magic_quotes_gpc() ) { $data = stripslashes( $data ); } //$data = mysql_real_escape_string( $data ); return $data; } echo "<xmp>" . filter("you & me") . "</xmp>"; ?> but that returns fine in the test above you &amp; me which is in place after I added die(print_r($_POST));. Can anyone think of how and why this is happening? Any help much appreciated. Regards, Phil.

    Read the article

  • Why does adding Crossover to my Genetic Algorithm gives me worse results?

    - by MahlerFive
    I have implemented a Genetic Algorithm to solve the Traveling Salesman Problem (TSP). When I use only mutation, I find better solutions than when I add in crossover. I know that normal crossover methods do not work for TSP, so I implemented both the Ordered Crossover and the PMX Crossover methods, and both suffer from bad results. Here are the other parameters I'm using: Mutation: Single Swap Mutation or Inverted Subsequence Mutation (as described by Tiendil here) with mutation rates tested between 1% and 25%. Selection: Roulette Wheel Selection Fitness function: 1 / distance of tour Population size: Tested 100, 200, 500, I also run the GA 5 times so that I have a variety of starting populations. Stop Condition: 2500 generations With the same dataset of 26 points, I usually get results of about 500-600 distance using purely mutation with high mutation rates. When adding crossover my results are usually in the 800 distance range. The other confusing thing is that I have also implemented a very simple Hill-Climbing algorithm to solve the problem and when I run that 1000 times (faster than running the GA 5 times) I get results around 410-450 distance, and I would expect to get better results using a GA. Any ideas as to why my GA performing worse when I add crossover? And why is it performing much worse than a simple Hill-Climb algorithm which should get stuck on local maxima as it has no way of exploring once it finds a local max?

    Read the article

  • Why does adding Crossover to my Genetic Algorithm give me worse results?

    - by MahlerFive
    I have implemented a Genetic Algorithm to solve the Traveling Salesman Problem (TSP). When I use only mutation, I find better solutions than when I add in crossover. I know that normal crossover methods do not work for TSP, so I implemented both the Ordered Crossover and the PMX Crossover methods, and both suffer from bad results. Here are the other parameters I'm using: Mutation: Single Swap Mutation or Inverted Subsequence Mutation (as described by Tiendil here) with mutation rates tested between 1% and 25%. Selection: Roulette Wheel Selection Fitness function: 1 / distance of tour Population size: Tested 100, 200, 500, I also run the GA 5 times so that I have a variety of starting populations. Stop Condition: 2500 generations With the same dataset of 26 points, I usually get results of about 500-600 distance using purely mutation with high mutation rates. When adding crossover my results are usually in the 800 distance range. The other confusing thing is that I have also implemented a very simple Hill-Climbing algorithm to solve the problem and when I run that 1000 times (faster than running the GA 5 times) I get results around 410-450 distance, and I would expect to get better results using a GA. Any ideas as to why my GA performing worse when I add crossover? And why is it performing much worse than a simple Hill-Climb algorithm which should get stuck on local maxima as it has no way of exploring once it finds a local max?

    Read the article

  • [Ruby] Object assignment and pointers

    - by Jergason
    I am a little confused about object assignment and pointers in Ruby, and coded up this snippet to test my assumptions. class Foo attr_accessor :one, :two def initialize(one, two) @one = one @two = two end end bar = Foo.new(1, 2) beans = bar puts bar puts beans beans.one = 2 puts bar puts beans puts beans.one puts bar.one I had assumed that when I assigned bar to beans, it would create a copy of the object, and modifying one would not affect the other. Alas, the output shows otherwise. ^_^[jergason:~]$ ruby test.rb #<Foo:0x100155c60> #<Foo:0x100155c60> #<Foo:0x100155c60> #<Foo:0x100155c60> 2 2 I believe that the numbers have something to do with the address of the object, and they are the same for both beans and bar, and when I modify beans, bar gets changed as well, which is not what I had expected. It appears that I am only creating a pointer to the object, not a copy of it. What do I need to do to copy the object on assignment, instead of creating a pointer? Tests with the Array class shows some strange behavior as well. foo = [0, 1, 2, 3, 4, 5] baz = foo puts "foo is #{foo}" puts "baz is #{baz}" foo.pop puts "foo is #{foo}" puts "baz is #{baz}" foo += ["a hill of beans is a wonderful thing"] puts "foo is #{foo}" puts "baz is #{baz}" This produces the following wonky output: foo is 012345 baz is 012345 foo is 01234 baz is 01234 foo is 01234a hill of beans is a wonderful thing baz is 01234 This blows my mind. Calling pop on foo affects baz as well, so it isn't a copy, but concatenating something onto foo only affects foo, and not baz. So when am I dealing with the original object, and when am I dealing with a copy? In my own classes, how can I make sure that assignment copies, and doesn't make pointers? Help this confused guy out.

    Read the article

  • Interesting conversation about the nature of info-wars

    - by Malcolm Anderson
    Over at Schlock Mercenary, Howard Taylor has started a facinating conversation on the nature of Info-Wars. As Howard puts it:   Somebody (I forget who) tweeted that the Wikileaks fight right now is the first infowar in history. I disagree. I think we've fought numerous infowars in the last fifteen years. And that's really what I want to see discussed in the comments. We can argue right and wrong until the eCows come 127.0.0.1 but nobody is going to walk away convinced. I want to see a list of information-age conflicts that you feel qualify as "infowar." Me, I think the RIAA vs file-sharing qualifies. My buddy Rodney suggested RBLs vs Spammers (the spammers won that one.) Somebody pointed out that the Secret Service raid on Steve Jackson Games back in the 80's might qualify.

    Read the article

  • Ipython and Matplotlib in Ubuntu 13.10

    - by LuizAngioletti
    I've recently updated my Ubuntu to the 13.10 version. To my surprise, Ipython and Matplotlib are available only in versions prior to those I had in my previous 12.04 LTS install. When with the 12.04, I had the Julian Taylor PPA set up in my repositories, and that's why (I think) I had most up-to-date versions from both packages. The versions currently in 13.10 are: Matplotlib: 1.2.1 (http://matplotlib.org/index.html, most current version is 1.3.1) Ipython: 0.13.2 (http://ipython.org, most current version is 1.1.0 – September 2013) Is there any PPA available for the 13.10? The JTaylor ppa covers only as far as 12.10 (Quantal, link not available due to reputation rank in stack exchange) Should I install those packages outside apt? Isn't that troublesome?

    Read the article

  • JavaOne Kicks Off with Sunday Keynotes

    - by Yolande Poirier
    The Java Strategy, Partner, and Technical keynotes will be held on Sunday, September 22, beginning at 4:00 p.m. like last year, to free up time for session slots on Monday and Tuesday. The keynotes will again take place at the historic Masonic Auditorium on Nob Hill. That same evening at 7:00 p.m., attendees are invited to the official JavaOne Welcome Reception at the Taylor Street Café @ the Zone. Sunday will also feature User Group meetings (at Moscone West) and Java University courses (Hilton San Francisco Union Square). On Thursday, the Java Community keynote will start the wrap up of the conference. Register before July 19, 2013 and save US$400. Click here for information on registration packages, including the low-cost Discover pass alternative.

    Read the article

  • How To Get a Better Wireless Signal and Reduce Wireless Network Interference

    - by Chris Hoffman
    Like all sufficiently advanced technologies, Wi-Fi can feel like magic. But Wi-Fi isn’t magic – it’s radio waves. A variety of things can interfere with these radio waves, making your wireless connection weaker and more unreliable. The main keys to improving your wireless network’s signal are positioning your router properly — taking obstructions into account — and reducing interference from other wireless networks and household appliances. Image Credit: John Taylor on Flickr How To Get a Better Wireless Signal and Reduce Wireless Network Interference How To Troubleshoot Internet Connection Problems 7 Ways To Free Up Hard Disk Space On Windows

    Read the article

  • DIY Touch Screen Mod Makes Regular Gloves Smartphone-friendly

    - by Jason Fitzpatrick
    Smartphone-friendly winter gloves are expensive (and often ugly). Skip shelling out for store-bought gloves when, armed with a needle and thread, you can turn any gloves into smartphone-friendly ones. Over at Popular Science, Taylor Kubota shares the simple trick: 1. Order silver-plated nylon thread (silver conducts electricity). This can be difficult to find in stores, but major online retailers carry it. 2. Pick a pair of gloves to modify. Although leather works, it’s harder to push a needle through. 3. Stitch the figure of a star or other solid shape onto the glove’s index finger with the thread, making sure it will contact both the touchscreen and your skin. Our Geek Trivia App for Windows 8 is Now Available Everywhere How To Boot Your Android Phone or Tablet Into Safe Mode HTG Explains: Does Your Android Phone Need an Antivirus?

    Read the article

  • Flex remoting and progress events?

    - by Cambiata
    Is there a way to monitor the loading progress (percent progress bar style) when using Flex remoting? I'm trying out Flash Builder 4 with it's new data services features, but I can't find any pgrogress event stuff somewhere. This article by Robert Taylor http://www.roboncode.com/articles/144 indicates that it might not be possible...

    Read the article

  • Scared of Calculus - Required to pass Differential Calculus as part of my Computer science major

    - by ke3pup
    Hi guys I'm finishing my Computer science degree in university but my fear of maths (lack of background knowledge) made me to leave all my maths units til' the very end which is now. i either take them on and pass or have to give up. I've passed all my programming units easily but knowing my poor maths skills won't do i've been staying clear of the maths units. I have to pass Differential Calculus and Linear Algebra first. With a help of book named "Linear Algebra: A Modern Introduction" i'm finding myself on track and i think i can pass the Linear Algebra unit. But with differential calculus i can't find a book to help me. They're either too advanced or just too simple for what i have to learn. The things i'm required to know for this units are: Set notation, the real number line, Complex numbers in cartesian form. Complex plane, modulus. Complex numbers in polar form. De Moivre’s Theorem. Complex powers and nth roots. Definition of ei? and ez for z complex. Applications to trigonometry. Revision of domain and range of a function Working in R3. Curves and surfaces. Functions of 2 variables. Level curves.Partial derivatives and tangent planes. The derivative as a difference quotient. Geometric significance of the derivative. Discussion of limit. Higher order partial derivatives. Limits of f(x,y). Continuity. Maxima and minima of f(x,y). The chain rule. Implicit differentiation. Directional derivatives and the gradient. Limit laws, l’Hoˆpital’s rule, composition law. Definition of sinh and cosh and their inverses. Taylor polynomials. The remainder term. Taylor series. Is there a book to help me get on track with the above? Being a student i can't buy too many books hence why i'm looking for a book that covers topics I need to know. The University library has a fairly limited collection which i took as loan but didn't find useful as it was too complex.

    Read the article

  • Smooth terrain rendering

    - by __dominic
    I'm trying to render a smooth terrain with Direct3D. I've got a 50*50 grid with all y values = 0, and a set of 3D points that indicate the location on the grid and depth or height of the "valley" or "hill". I need to make the y values of the grid vertices higher or lower depending on how close they are to each 3D point. Thus, in the end I should have a smooth terrain renderer. I'm not sure at all what way I can do this. I've tried changing the height of the vertices based on the distance to each point just using this basic formula: dist = a² + b² + c² where a, b and c are the x, y, and z distance from a vertex to a 3D point. The result I get with this is not smooth at all. I'm thinking there is probably a better way. Here is a screenshot of what I've got for the moment: https://dl.dropbox.com/u/2562049/terrain.jpg

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24  | Next Page >