Daily Archives

Articles indexed Saturday October 13 2012

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

  • Dowloaded Wubi.exe but it doesn't run on my asus 1005p ee pc running windows 7

    - by Manoj
    I want to install ubuntu 12.04 LTS along side windows 7 on my Asus 1005P Eee PC. I tried to install it with the Live USB created with the "Universal-USB-Installer-1.9.0.2.exe" but failed. Alternatively, I downloaded the "wubi.exe" installer from www.ubuntu.com, but it does not run on my pc. Is this version of ubuntu incompatible for the given hardware for side by side installation with windows 7?

    Read the article

  • xrandr shows VGA1 as disconnected

    - by Felix
    I have a Thinkpad W520 with Nvidia Optimus graphics. I have disabled the Nvidia card in BIOS (by selecting "integrated graphics"), so I'm running only on the integrated Intel graphics. I get full 3D acceleration, which would suggest the drivers are properly installed. However, I'm not able to use an external monitor. With the external monitor connected and turned on, running xrandr always gives: $ xrandr Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm 1920x1080 60.0*+ 59.9 50.0 1680x1050 60.0 59.9 1600x1024 60.2 1400x1050 60.0 1280x1024 60.0 1440x900 59.9 1280x960 60.0 1360x768 59.8 60.0 1152x864 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) What gives? It sees the VGA1 port (to which the external display is connected), but it appears disconnected. I have tried forcing a resolution as per these instructions, but when I do that X becomes unresponsive and I have to Ctrl-Alt-F1 and restart it.

    Read the article

  • One site being on a subdirectory of another. Does google count this againt you?

    - by Mick
    I have created two similar websites (relating to monetary systems). So far, one appears to be loved by Google and the other hated. I'm struggling to work out why. This is a mystery to me because both sites were created by me with the same design philosophy, both in pure html. Both are packed to the rafters with references to, and information about, their respective subjects. One issue I'm worried may be the cause is to do with the location of the sites. I got a web hosting package from hostmonster.com for the successful one, but less liked one is just an "add-on" which sits on a subdirectory of the successful one. I wonder if Google somehow detects this and treats it as a less significant website? EDIT: Just to clarify, even though one site is an add-on that sits on a subdirectory of the other, the URL is arranged to look like it is a root. I.e. the unpopular site can be accessed directly with a simple www.myunpopularsite.com name, without specifying any subdirectory.

    Read the article

  • Inexplicable low ranking [closed]

    - by Mick
    I have created two similar websites relating to monetary systems. So far, one appears to be loved by Google and the other hated. I'm struggling to work out why. The successful one is fullreservebanking.com. If you type in "full reserve banking" into Google, my site appears 2nd in the list behind Wikipedia. The unsuccessful one is fractionalreserves.com. If you type in "fractional reserve banking" into Google, it's nowhere to be seen. This is a mystery to me because both sites were created by me with the same design philosophy, both in pure html. Both are packed to the rafters with references to, and information about, their respective subjects. One issue I'm worried may be the cause is to do with the location of the sites. I got a web hosting package from hostmonster.com for fullreservebanking, but fractionalreserves is just an "add-on" which sits on a subdirectory of fullreservebanking. I wonder if Google somehow detects this and treats it as a less significant website?

    Read the article

  • Making a collision detection system

    - by Sri Harsha Chilakapati
    I'm very new to game development (just started 3 months ago) and I've learning through creating a game engine. It's located here. In terms of collision, I know only brutefoce detection, in which case, the game slows down if there are a number of objects. So my question is How should I program the collisions? I want them to happen automatically for every object and call the object's collision(GObject other) method on each collision. Are there any new algorithms which can make this fast? If so, can anybody6 sh6ed some light on this topic? And I think of making it like the game maker Thanks

    Read the article

  • Which game library/engine to choose?

    - by AllTheThingsSheSaid
    I'm not a programming beginner at all. I've tried 2 libraries/engines so far, allegro and Unity. For allegro. i think its not good if i wanna make a career in gaming industry since its not powerful enough. I don't feel comfortable with unity. Its more like a software like photoshop or flash. You can do almost everything with pre-defined functions, tools and with less coding. I need something which offers less tools and pre defined functions and more coding work. It would be awesome if its free and c/c++ based. I need both 2D/3D. and please, don't tell me to make my own library, i am not "that" advance. Any other information about gaming industry would be greatly appreciated.

    Read the article

  • Any 3D, Isometric, RPG oriented engines?

    - by Don Quixote
    I was wondering if there are any game engines out there that are oriented towards isometric, 3D RPGs such as Diablo 3, Torchlight, Magika, etc.. Most engines I found so far are either oriented towards FPS, such as Cry Engine and UDK, or are far too generic, such as the Irrlicht engine, which will add what I think is unnecessary work on the engine instead of the game. Any chance there are any engines out there that are crafted to be more suitable for RPGs? I would prefer they be in Java, since it's more my forte, but beggars can't be choosers, so C++ is great as well! Thank you.

    Read the article

  • Game programming and quantity of timers

    - by andresjb
    I've made a simple 2D game engine using C# and DirectX and it's fully functional for the demo I made to test it. I have a Timer object that uses QueryPerformanceCounter and I don't know what's the better choice: use only one timer in the game loop to update everything in the game, or an independent timer in every object that needs one. My worry is that when I try to implement threads, what will happen with timers? What happens with the sync?

    Read the article

  • Wheel Joint Implementation in AndEngine

    - by Siddharth
    I am currently developing car game in AndEngine. In which I was using revolute joint for car wheel and chassis attachment. But my friend suggest me that use wheel joint for that purpose for better behavior of the car. In AndEnginen I didn't found the wheel joint implementation. So what I have to do for wheel joint implementation. I think I have to manually update the box2d library for this purpose but I don't know how many things get updated. Please suggest me some guidance on achieving better car behavior in AndEngine.

    Read the article

  • Rendering projectiles

    - by Chris
    I'm working on a simple game that has the user control a space ship that shoots small circular projectiles. However, I'm not sure how to render these. Right now I know how to make a LPDIREC3DSURFACE for a sprite and render it onto a LPDIRECT3DDEVICE9, but that's only for a single sprite. I assume I don't need to constantly create new surfaces and devices. How should projectile generation/rendering be handled? Thanks in advance.

    Read the article

  • UIImage for UIImageView is nil

    - by yeesterbunny
    I'm having problem displaying UIImage in UIImageView. I looked all over stackoverflow for similar questions, but none of the fixes helped me. The image is indeed in my bundle File Inspector - Target Membership is checked for the image IBOutlet is connected (I have tried both using IBOutlet and doing it programmatically) Both png nor jpg works Here's the code for using Interface Builder - //@property and @synthesize set for IBOutlet UIImageView *imageView - (void)viewDidLoad { [super viewDidLoad]; NSAssert(self.imageView, @"self.imageView is nil. Check your IBOutlet connection"); UIImage *image = [UIImage imageNamed:@"banner.jpg"]; NSAssert(image, @"image is nil"); self.imageView.image = image; } This code will terminate with NSAssert, printing in the console that 'image is nil'. I also tried selecting the Image directly from the attributes inspector: However it still doesn't show the image (still terminates with NSAssert - 'image is nil'). Any help or suggestions will be greatly appreciated. Thanks

    Read the article

  • What's a good design to handle multiple global hotkeys?

    - by Alex
    I'm struggling to think of a good design to handle multiple global hotkeys. Say I have three different functions bound to three different global hotkeys... Play Song | Ctrl + P Skip Song | Ctrl + N Increase Volume | Ctrl + V What's a good, effective way to check if the hotkey pressed conforms to a certain function? I'm using a class very similar to this: http://www.liensberger.it/web/blog/?p=207 Should I create a new instance of the hotkey class for each hotkey? Hotkey hotkey = new Hotkey(); hotkey.RegisterHotkey(Shortcut.ModifierKeys.Control, Keys.F10); hotkey.KeyPressed += ((s, args) => { //Do Something! }); Or should I have an enum with different hotkey functions and manage it from within the hotkey class to prevent multiple instances (seems wasteful but easy). Thanks for any advice / help in advance.

    Read the article

  • python gui generate math equation

    - by Nero Dietrich
    I have a homework question for one specific item with python GUIs. My goal is to create a GUI that asks a random mathematical equation and if the equation is evaluated correctly, then I will receive a message stating that it is correct. My main problem is finding out where to place my statements so that they show up in the labels; I have 1 textbox which generates the random equation, the next textbox is blank for me to enter the solution, and then an "Enter" button at the end to evaluate my solution. It looks like this: [randomly generated equation][Empty space to enter solution] [ENTER] I've managed to get the layout and the evaluate parameters, but I don't know where to go from here. This is my code so far: class Equation(Frame): def __init__(self,parent=None): Frame.__init__(self, parent) self.pack() Equation.make_widgets(self) Equation.new_problem(self) def make_widgets(self): Label(self).grid(row=0, column=1) ent = Entry(self) ent.grid(row=0, column=1) Label(self).grid(row=0, column=2) ent = Entry(self) ent.grid(row=0, column=2) Button(self, text='Enter', command=self.evaluate).grid(row=0, column=3) def new_problem(self): pass def evaluate(self): result = eval(self.get()) self.delete(0, END) self.insert(END, result) print('Correct')

    Read the article

  • Issue with ko.observableArray

    - by user1574860
    I am using Knockout plugin. The following is my code. In this i am making getting the ceremony list from the server and then save that list in the array. But the problem is in IniitialCallForCeremonies(). The array is not initializing with the returned array from IniitialCallForCeremonies() function. function CeremonyViewModel() { var self = this; self.Ceremonies = ko.observableArray(InitialCallForCeremonies()); } $(document).ready(function () { ko.applyBindings(new CeremonyViewModel()); }); function InitialCallForCeremonies() { var request = $.ajax({ url: "address", type: "GET", async: false, dataType: "JSON" }).success(function (data) { var tempArray = new Array(); $.each(data, function (index, value) { tempArray.push(new Ceremony(value)); }); return tempArray; }); } function Ceremony(val) { this.Id = val.Id; this.Event = val.Event; this.Date = val.Date; this.Guest = val.Guest; }

    Read the article

  • jquery replaceWith implications

    - by Vlad Ioffe
    I am using replaceWith for input type=file to handle changes of the file the user wants to upload. I have this code: $('#add_cv_input').change(function() { // here is some code else { alert('put one of this: pdf doc docx'); $("#add_cv_input").replaceWith('<input id="add_cv_input" type="file"/>'); } }); now the problem is that this jquery changed event does not being called after the first time that the user had uploaded the wrong extension. I don't have a clue why this is happening. Everything works fine if at the first time the user uploads a valid extension and then he changes it to other valid extension.

    Read the article

  • how to add an ajax jQuery code, that return a row from php file [DB] and then change the value of input text?

    - by Nisreen KH
    //this is a code in php which is fetch a record from database <?php include("dbconn.inc"); $data=mysql_query("SELECT `subtitle`, `mian-title`, `page_num`, `note_path`, `flash_path` FROM `main-page` WHERE `page_num` =".$r." LIMIT 1"); echo $data; if (mysql_num_rows($data) == 0) { echo "No rows found, nothing to print so am exiting"; exit; } while ($row = mysql_fetch_assoc($data)) { echo $row['page_num']; } include("close.php"); ?> //and this is a code in html <form method="post" action="data.php"> <input name="Button1" type="submit" value="&lt;&lt;" /> <input name="test" style="width: 31px; height: 23px" type="text" /> // this is a value of page_num in DB. <input name="Button2" type="submit" value="&gt;&gt;" > </form> //i want to add an ajax code to retrieve the record from php code, and then change the input values depends on returned data ,and also to prevent refreshing the page always!!

    Read the article

  • c#: RedirectStandardOutput prevents exit exception?

    - by user1743977
    All I want is to redirect standard output of a process to a file. Sounds easy, but everything I tried doesn't work: 1) putting a dos-style redirection in the list of arguments (e.g. "param1 param2 output.txt") doesn't work, 2) using RedirectStandardOutput = true works, BUT, apparently the process does not through an exception when it exists. So the handler defined via process.Exited += ... doesn't catch anything. To be clear, once I remove the 'RedirectStandardOutput = true ' statement, it DOES catch an exception. What am I doing wrong ? Thanks, Ofer

    Read the article

  • Strange "cache" effect between client and server

    - by mark
    I use a Socket-based connection between Client and server with ObjectOutputStream. The objects serialized and exchanged have this structure: public class RichiestaSalvataggioArticolo implements Serializable { private ArticoloDati articolo; public RichiestaSalvataggioArticolo(ArticoloDati articolo) { this.articolo = articolo; } @Override public void ricevi(GestoreRichieste gestore) throws Exception { gestore.interpreta(this); } public ArticoloDati getArticolo() { return articolo; } } the issue is that when I try to exchange messages between C/S with incapsulated content very similar (ArticoloDati whom differ only in 2 fields out of 10), the Client sends an ArticoloDati, but the Server receives the previous one. Does the ObjectOutputStream implement some kind of cache or memory between the calls, that fails to recognize that my 2 objects are different because they are very similar?

    Read the article

  • PHP-OOP extending two classes?

    - by user1292810
    I am very beginner to OOP and now I am trying to write some PHP class to connect with FTP server. class ftpConnect { private $server; private $user; private $password; private $connection_id; private $connection_correct = false; public function __construct($server, $user = "anonymous", $password = "[email protected]") { $this->server = $server; $this->user = $user; $this->password = $password; $this->connection_id = ftp_connect($this->server); $this->connection_correct = ftp_login($this->connection_id, $this->user, $this->password); if ( (!$this->connection_id) || (!$this->connection_correct) ){ echo "Error! Couldn't connect to $this->server"; var_dump($this->connection_id); var_dump($this->connection_correct); return false; } else { echo "Successfully connected to $this->server, user: $this->user"; $this->connection_correct = true; return true; } } } I reckon that body of the class is insignificant at the moment. Main issue is that I have some problems with understanding OOP idea. I wanted to add sending emails every time, when the code is run. I have downloaded PHPMailer Class and extended my class with it: class ftpConnect extends PHPMailer {...} I have added some variables and methods and everything works as expected to that point. I thought: why not to add storing everything in database. Everytime user runs above code, proper information should be stored in database. I could edit my ftpConnect class and add database connecting to the constructor, and some other methods to updating tables. But database connecting and all that stuff could be used by other classes in the future, so it definitely should be implemented in seperate class. But my "main" ftpConnect class already extends one class and could not extend not a single one more. I have no idea how can I resolve this problem. Maybe my ftpConnect class is to complex and I should somehow divide it into couple smaller classes? Any help is much appreciated.

    Read the article

  • Why does my program crash after running this particular function?

    - by Tux
    Whenever I type the command to run this function in my program, it runs and then crashes saying: "The application has requested the Runtime to terminate it in an unusal way." Why does it do this? Thanks in advance, Johnny void showInventory(player& obj) { // By Johnny :D std::cout << "\nINVENTORY:\n"; for(int i = 0; i < 20; i++) { std::cout << obj.getItem(i); i++; std::cout << "\t\t\t" << obj.getItem(i) << "\n"; i++; } } std::string getItem(int i) { return inventory[i]; }

    Read the article

  • Can we call methods of non-static classes without an object in Java?

    - by ask
    In Java, the wrapper class Integer has the static method parseInt() which is used like this: Integer.parseInt(). I thought only methods of static classes could be called like this (ie. Class.doMethod()). All non-static classes need objects to be instantiated to use their methods. I checked the API, and apparently Integer is declared as public final Integer - not static. Someone please help me understand this.

    Read the article

  • javascript split() array contains

    - by Mahesha999
    While learning JavaScript, I did not get why the output when we print the array returned of the Sting.split() method (with regular expression as an argument) is as explained below. var colorString = "red,blue,green,yellow"; var colors = colorString.split(/[^\,]+/); document.write(colors); //this print 7 times comma: ,,,,,,, However when I print individual element of the array colors, it prints an empty string, three commas and an empty string: document.write(colors[0]); //empty string document.write(colors[1]); //, document.write(colors[2]); //, document.write(colors[3]); //, document.write(colors[4]); //empty string document.write(colors[5]); //undefined document.write(colors[6]); //undefined Then, why printing the array directly gives seven commas. Though I think its correct to have three commas in the second output, I did not get why there is a starting (at index 0) and ending empty string (at index 4). Please explain I am screwed up here.

    Read the article

  • Removing repeated characters, including spaces, in one line

    - by Thumper
    I currently have a string, say $line='55.25040882, 3,,,,,,', that I want to remove all whitespace and repeated commas and periods from. Currently, I have: $line =~ s/[.,]{2,}//; $line =~ s/\s{1,}//; Which works, as I get '55.25040882,3', but when I try $line =~ s/[.,\s]{2,}//; It pulls out the ", " and leaves the ",,,,,,". I want to retain the first comma and just get rid of the whitespace. Is there a way to elegantly do this with one line of regex? Please let me know if I need to provide additional information.

    Read the article

  • Inserting Records in Ascending Order function- C homework assignment

    - by Aaron McRuer
    Good day, Stack Overflow. I have a homework assignment that I'm working on this weekend that I'm having a bit of a problem with. We have a struct "Record" (which contains information about cars for a dealership) that gets placed in a particular spot in a linked list according to 1) its make and 2) according to its model year. This is done when initially building the list, when a "int insertRecordInAscendingOrder" function is called in Main. In "insertRecordInAscendingOrder", a third function, "createRecord" is called, where the linked list is created. The function then goes to the function "compareCars" to determine what elements get put where. Depending on the value returned by this function, insertRecordInAscendingOrder then places the record where it belongs. The list is then printed out. There's more to the assignment, but I'll cross that bridge when I come to it. Ideally, and for the assignment to be considered correct, the linked list must be ordered as: Chevrolet 2012 25 Chevrolet 2013 10 Ford 2010 5 Ford 2011 3 Ford 2012 15 Honda 2011 9 Honda 2012 3 Honda 2013 12 Toyota 2009 2 Toyota 2011 7 Toyota 2013 20 from the a text file that has the data ordered the following way: Ford 2012 15 Ford 2011 3 Ford 2010 5 Toyota 2011 7 Toyota 2012 20 Toyota 2009 2 Honda 2011 9 Honda 2012 3 Honda 2013 12 Chevrolet 2013 10 Chevrolet 2012 25 Notice that the alphabetical order of the "make" field takes precedence, then, the model year is arranged from oldest to newest. However, the program produces this as the final list: Chevrolet 2012 25 Chevrolet 2013 10 Honda 2011 9 Honda 2012 3 Honda 2013 12 Toyota 2009 2 Toyota 2011 7 Toyota 2012 20 Ford 2010 5 Ford 2011 3 Ford 2012 15 I sat down with a grad student and tried to work out all of this yesterday, but we just couldn't figure out why it was kicking the Ford nodes down to the end of the list. Here's the code. As you'll notice, I included a printList call at each instance of the insertion of a node. This way, you can see just what is happening when the nodes are being put in "order". It is in ANSI C99. All function calls must be made as they are specified, so unfortunately, there's no real way of getting around this problem by creating a more efficient algorithm. #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_LINE 50 #define MAX_MAKE 20 typedef struct record { char *make; int year; int stock; struct record *next; } Record; int compareCars(Record *car1, Record *car2); void printList(Record *head); Record* createRecord(char *make, int year, int stock); int insertRecordInAscendingOrder(Record **head, char *make, int year, int stock); int main(int argc, char **argv) { FILE *inFile = NULL; char line[MAX_LINE + 1]; char *make, *yearStr, *stockStr; int year, stock, len; Record* headRecord = NULL; /*Input and file diagnostics*/ if (argc!=2) { printf ("Filename not provided.\n"); return 1; } if((inFile=fopen(argv[1], "r"))==NULL) { printf("Can't open the file\n"); return 2; } /*obtain values for linked list*/ while (fgets(line, MAX_LINE, inFile)) { make = strtok(line, " "); yearStr = strtok(NULL, " "); stockStr = strtok(NULL, " "); year = atoi(yearStr); stock = atoi(stockStr); insertRecordInAscendingOrder(&headRecord,make, year, stock); } printf("The original list in ascending order: \n"); printList(headRecord); } /*use strcmp to compare two makes*/ int compareCars(Record *car1, Record *car2) { int compStrResult; compStrResult = strcmp(car1->make, car2->make); int compYearResult = 0; if(car1->year > car2->year) { compYearResult = 1; } else if(car1->year == car2->year) { compYearResult = 0; } else { compYearResult = -1; } if(compStrResult == 0 ) { if(compYearResult == 1) { return 1; } else if(compYearResult == -1) { return -1; } else { return compStrResult; } } else if(compStrResult == 1) { return 1; } else { return -1; } } int insertRecordInAscendingOrder(Record **head, char *make, int year, int stock) { Record *previous = *head; Record *newRecord = createRecord(make, year, stock); Record *current = *head; int compResult; if(*head == NULL) { *head = newRecord; printf("Head is null, list was empty\n"); printList(*head); return 1; } else if ( compareCars(newRecord, *head)==-1) { *head = newRecord; (*head)->next = current; printf("New record was less than the head, replacing\n"); printList(*head); return 1; } else { printf("standard case, searching and inserting\n"); previous = *head; while ( current != NULL &&(compareCars(newRecord, current)==1)) { printList(*head); previous = current; current = current->next; } printList(*head); previous->next = newRecord; previous->next->next = current; } return 1; } /*creates records from info passed in from main via insertRecordInAscendingOrder.*/ Record* createRecord(char *make, int year, int stock) { printf("CreateRecord\n"); Record *theRecord; int len; if(!make) { return NULL; } theRecord = malloc(sizeof(Record)); if(!theRecord) { printf("Unable to allocate memory for the structure.\n"); return NULL; } theRecord->year = year; theRecord->stock = stock; len = strlen(make); theRecord->make = malloc(len + 1); strncpy(theRecord->make, make, len); theRecord->make[len] = '\0'; theRecord->next=NULL; return theRecord; } /*prints list. lists print.*/ void printList(Record *head) { int i; int j = 50; Record *aRecord; aRecord = head; for(i = 0; i < j; i++) { printf("-"); } printf("\n"); printf("%20s%20s%10s\n", "Make", "Year", "Stock"); for(i = 0; i < j; i++) { printf("-"); } printf("\n"); while(aRecord != NULL) { printf("%20s%20d%10d\n", aRecord->make, aRecord->year, aRecord->stock); aRecord = aRecord->next; } printf("\n"); } The text file you'll need for a command line argument can be saved under any name you like; here are the contents you'll need: Ford 2012 15 Ford 2011 3 Ford 2010 5 Toyota 2011 7 Toyota 2012 20 Toyota 2009 2 Honda 2011 9 Honda 2012 3 Honda 2013 12 Chevrolet 2013 10 Chevrolet 2012 25 Thanks in advance for your help. I shall continue to plow away at it myself.

    Read the article

  • Codeigniter Image Library Cropping an Image with 2 sets of coordinates to make square anywhere?

    - by chris
    Spending time reading through the docs, and searching for examples. I understand cropping an image from top 0, and left 0 is pretty straight forward. However. I would like to pass 2 sets of coordinates, a starting point and an ending point. Four Points, a Square that is defined anywhere. However from the examples I am finding, and from what I gather the rendition is not going to let me do this. codeigniter so I am seeking confirmation on this thought, is it true that I can only provide end points from 0, and it crops a square based on said end points or can I actually specify an x start, an x end, and similar for y? Or is there some other technique I can use within codeigniter that will allow me to pass for coordinates for starting and ending points?

    Read the article

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