Search Results

Search found 5192 results on 208 pages for 'random forests'.

Page 82/208 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • How do I optimize searching for the nearest point?

    - by Rootosaurus
    For a little project of mine I'm trying to implement a space colonization algorithm in order to grow trees. The current implementation of this algorithm works fine. But I have to optimize the whole thing in order to make it generate faster. I work with 1 to 300K of random attraction points to generate one tree, and it takes a lot of time to compute and compare distances between attraction points and tree node in order to keep only the closest treenode for an attraction point. So I was wondering if some solutions exist (I know they must exist) in order to avoid the time loss looping on each tree node for each attraction point to find the closest... and so on until the tree is finished.

    Read the article

  • Calculating the rotational force of a 2D sprite

    - by Jon
    I am wondering if someone has an elegant way of calculating the following scenario. I have an object of (n) number of squares, random shapes, but we will pretend they are all rectangles. We are dealing with no gravity, so consider the object in space, from a top down perspective. I am applying a force to the object at a specific square (as illustrated below). How do I calculate the rotational angle, based on the force being applied, at the location being applied. If applied in the center square, it would go straight. How should it behave the further I move from the center? How do I calculate the rotational velocity?

    Read the article

  • Advice Required Regarding Creating a Self Learning, Self Organizing Programming Team....

    - by tGilani
    Hello I'm a senior student at my university and chairperson of IEEE Student Branch there. Recently I was thinking of some idea to acquaint students with the professional environment, how software is produced in the industry and get a practical experience.. Obviously trips to software houses are not enough and we cannot provide this many internships. So the idea of simulating a software house within the university popped in. Resources at my disposal are students with their own laptops, university UPS and lan network with internet access, and a reasonably sized room with a whiteboard and three hours free time daily.. :) However, I have absolutely no idea where to begin with. Milestones or whatever it may be called, are Requirements Document generation, sharing of resources, delegation of tasks, version controlling etc... I'd really appreciate some advice, programming tools (for JAVA), communication tools etc and other things used in a decent software house... Technologies to be targeted shall be random possibly starting with J2EE Spring Hibernate and Later Visual Programming in .NET C# and ASP.NET MVC as well as Android or iPhone development....

    Read the article

  • Looking for a non-cryptographic hash function that returns a single character

    - by makerofthings7
    Suppose I have a dictionary of ASCII words stored in uppercase. I also want to save those words into separate files so that the total word count of each file is approximately the same. By simply looking at the word I need to know which file it should be in (if it's there at all). Duplicate words should go into the same file and overwrite the last one. My first attempt at solving this problem is to use .NET's object.GetHashCode() function and .Trim() to get one of the "random" characters that pop up. I asked a similar question here If I only use one character of object.GetHashCode() I would get a hash code character of A..Z or 0..9. However saving the result of GetHashCode to disk is a no-no so I need a substitute. Question: What algorithm (or subset of an algorithm) is appropriate for pigeonholing strings into a single character or range of characters (Like hex 0..F offers 16 chars)? Real world usage: I'll use this answer to modify the Partition key used in Azure Table storage as described here

    Read the article

  • How and when is old-releases.ubuntu.com updated?

    - by muru
    The old-releases.ubuntu.com mirror hosts the repositories for EOL Ubuntu releases. The main page currently lists up to 11.10 (or 12.04.3 if you count point upgrades), but the dists page lists up to 13.04. Why the discrepancy? When will the main page be updated? When will the newest EOL release (13.10) be shifted here? I'd like documentation backing up answers, please. Priority of documentation: Statements by Mark Shuttleworth (on his blog or other public statements) Pages from the Official Ubuntu documentation Ubuntu mailing list discussions, Launchpad bug reports (or questions) or blueprints, etc. IRC discussion logs for official Ubuntu channels Random gossip on the street Community Wiki.

    Read the article

  • Why are UUID / GUID's in the format they are?

    - by Xeoncross
    Globally Unique Identifiers (GUID) are a grouped string with a specific format which I assume has a security reason. A GUID is most commonly written in text as a sequence of hexadecimal digits separated into five groups, such as: 3F2504E0-4F89-11D3-9A0C-0305E82C3301 Why aren't GUID/UUID strings just random bytes encoded using hexadecimal of X length? This text notation contains the following fields, separated by hyphens: | Hex digits | Description |------------------------- | 8 | Data1 | 4 | Data2 | 4 | Data3 | 4 | Initial two bytes from Data4 | 12 | Remaining six bytes from Data4 There are also several versions of the UUID standards. Version 4 UUIDs are generally internally stored as a raw array of 128 bits, and typically displayed in a format something like: uuid:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

    Read the article

  • What is the best way to launch a website to make it go viral?

    - by Talvi Watia
    Say for example I have a website that has finished BETA and is ready for full launch. I'm at the stage now I want it to be very visible to start getting traffic. Right now, I am just getting some random search engine hits, word of mouth and a few referrals. How do I break out of this and really get some serious traffic to my site? Do I need to launch a huge ad-campaign? If so, what is the best/most cost effective way to do this? I have tried google adwords but at $0.45+ a click this jsut isn't practical for what I have.

    Read the article

  • Why does Facebook convert PHP code to C++?

    - by user72245
    I read that Facebook started out in PHP, and then to gain speed, they now compile PHP as C++ code. If that's the case why don't they: Just program in c++? Surely there must be SOME errors/bugs when hitting a magic compiler button that ports PHP to c++ code , right? If this impressive converter works so nicely, why stick to PHP at all? Why not use something like Ruby or Python? Note -- I picked these two at random, but mostly because nearly everyone says coding in those languages is a "joy". So why not develop in a super great language and then hit the magic c++ compile button?

    Read the article

  • Why doesn't cron complete my script?

    - by brickinthewall
    I have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab) 0 2 * * * root /bin/bash --login /opt/aebackup/sshbackup.sh If I run it as logged in root like following it runs prefectly fine. root@server:~# /opt/aebackup/sshbackup.sh If I run it via cron it would just stop after a while (not always on the same task in the script.. it seems pretty random, like the process is killed at some point randomly) Does anyone have an idea why my cron would do that? thanks for anything... I'm desperate!

    Read the article

  • Proper password handling for login

    - by piers
    I have read a lot about PHP login security recently, but many questions on Stack Overflow regarding security are outdated. I understand bcrypt is one of the best ways of hashing passwords today. However, for my site, I believe sha512 will do very well, at least to begin with. (I mean bcrypt is for bigger sites, sites that require high security, right?) I´m also wonder about salting. Is it necessary for every password to have its own unique salt? Should I have one field for the salt and one for the password in my database table? What would be a decent salt today? Should I join the username together with the password and add a random word/letter/special character combination to it? Thanks for your help!

    Read the article

  • When tracking which elements were clicked e.target.id is sometimes empty [migrated]

    - by Ivan
    I am trying to test the following JavaScript code, which is meant to keep track of the timing of user responses on a multiple choice survey: document.onclick = function(e) { var event = e || window.event; var target = e.target || e.srcElement; //time tracking var ClickTrackDate = new Date; var ClickData = ""; ClickData = target.id + "=" + ClickTrackDate.getUTCHours() + ":" + ClickTrackDate.getUTCMinutes() + ":" + ClickTrackDate.getUTCSeconds() +";"; document.getElementById("txtTest").value += ClickData; alert(target.id); // for testing } Usually target.id equals to the the id of the clicked element, as you would expect, but sometimes target.id is empty, seemingly at random, any ideas?

    Read the article

  • Abstract skill/talent system implementation

    - by kiliki
    I've been making small 2D games for about 3 years now (XNA and more recently LWJGL/Slick2D). My latest idea would involve some form of "talent tree" system in a real time game. I've been wracking my brain but can't think of a structure to hold a talent. Something like "Your melee attack is an instant kill if behind the target" I'd like to come up with an abstract object rather than putting random conditionals into other methods. I've solved some relatively complex problems before but I don't even know where to begin with this one. Any help would be appreciated - Java, pseudocode or general concepts are all great.

    Read the article

  • How to speed up rsync/tar of large Maildir

    - by psusi
    I have a very large Maildir I am copying to a new machine ( over 100 BaseT ) with rsync. The progress is slow. VERY SLOW. Like 1 MB/s slow. I think this is because it is a lot of small files that are being read in an order that essentially is random with respect to where the blocks are stored on disk, causing a massive seek storm. I get similar results when trying to tar the directory. Is there a way to get rsync/tar to read in disk block order, or otherwise overcome this problem?

    Read the article

  • How to define a natural id in database?

    - by gcc
    There are a lot of manuals. I am trying to create an database to hold information of these documents. But, there is a small problem. How can I give meaningful id to the manuals? Are there any standard or logic behind the giving meaningful id to the documents? If there is no standard, can you tell me how I should do that? example: table : manual id | manual name EDIT: Not Meaningful ID 1 or M1 or foo 2 C2 bar 3 P123 name ... ... ... (i) (ii) (iii) (i) Not meaningful for me because if some item deleted, there can be gap. ex 1 33 100. (ii) random character can be confusing when one try to give a name to new manual (iii) Why giving name is not preferred is because finding a name to the manual as ID is hard after 500 manuals. Meaningful : New ID * Can be easily produced even if after 1000 manuals * Should not be so complicated

    Read the article

  • How To Deliberately Hide Bugs In Code (for use in a Novel I'm writing) [closed]

    - by Dennis Murphy
    I'm writing a novel in which an evil programmer wants to include subtle errors in his code that are likely to go unnoticed by his supervisor during a code review and unlikely to be caught by a compiler, yet cause damage at possibly random times when the program is executed by an end-user. I only need a couple of examples, which may be exotic but which have to be easily explainable to non-technical readers. Procedural or object-oriented examples would be equally helpful. (It's been a VERY long time since I've written any code.) Thanks for your help.

    Read the article

  • Circle physics and collision using vectors

    - by Joe Hearty
    This is a problem I've been having, When making a set number of filled circles at random locations on a JPanel and applying a gravity (a negative change in the y), each of the circles collide. I want them to have collision detection and push in the opposite direction using vectors but I don't know how to apply that to my scenario could someone help? public void drawballs(Graphics g){ g.setColor (Color.white); //displays circles for(int i = 0; i<xlocationofcircles.length-1; i++){ g.fillOval( (int) xlocationofcircles[i], (int) (ylocationofcircles[i]) ,16 ,16 ); ylocationofcircles[i]+=.2; //gravity if(ylocationofcircles[i] > 550) //stops gravity at bottom of screen ylocationofcircles[i]-=.2; //Check distance between circles(i think..) float distance =(xlocationofcircles[i+1]-xlocationofcircles[i]) + (ylocationofcircles[i+1]-xlocationofcircles[i]); if( Math.sqrt(distance) <16) ...

    Read the article

  • What are the disadvantages of naming things alphabetically?

    - by JoJo
    Let me give you an example of how I name my classes alphabetically: Car CarHonda (subclass of Car) CarHondaAccord (subclass of CarHonda) There are two reasons why I put the type of the class earlier in its name: When browsing your files alphabetically in a file explorer, related items appear grouped together and parent classes appear above child classes. I can progressively refine auto-complete in my IDE. First I type the major type, then the secondary type, and so on without having to memorize what exactly I named the last part of the thing. My question is why do I hardly see any other programmers do this? They usually name things in reverse or some random order. Take the iOS SDK for example: UIViewController UITableViewController What are the disadvantages of my naming convention and the advantages of their convention?

    Read the article

  • Why are only some of my objects being rendered?

    - by BleedObsidian
    Every time I create a new asteroid the previous one is no longer rendered? I did some debugging and printed out the size of Array-List 'Small' and when a new asteroid is created it doesn't go down, so the thread is still there it's just not being rendered, Why? StatePlay: package me.bleedobsidian.astroidjump; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.SlickException; import org.newdawn.slick.state.BasicGameState; import org.newdawn.slick.state.StateBasedGame; public class StatePlay extends BasicGameState { int stateID = 10; Player player; Asteroids asteroids; StatePlay(int stateID) { this.stateID = stateID; } @Override public int getID() { return stateID; } @Override public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { ResManager.loadImages(); player = new Player(); asteroids = new Asteroids(); } @Override public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { g.setAntiAlias(true); player.render(g); asteroids.render(g); g.drawString("Asteroids: " + Asteroids.small.size(), 10, 25); } @Override public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { player.update(gc, delta); asteroids.update(delta); } } Asteroids: package me.bleedobsidian.astroidjump; import java.util.ArrayList; import java.util.Timer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; import org.newdawn.slick.SpriteSheet; public class Asteroids { public static ArrayList<Asteroid_Small> small = new ArrayList<Asteroid_Small>(); static SpriteSheet small_sprites = new SpriteSheet(ResManager.asteroids_small_ss, 32, 32); static Image small_1 = small_sprites.getSubImage(0, 0); static Image small_2 = small_sprites.getSubImage(1, 0); static Image small_3 = small_sprites.getSubImage(2, 0); static Image small_4 = small_sprites.getSubImage(3, 0); static boolean asteroids = true; static int diff = 0; Asteroids() { Task_Asteroids TaskA = new Task_Asteroids(); Timer timer = new Timer("Asteroids"); if(diff == 0) { timer.schedule(TaskA, 0, 4000); } else if(diff == 1) { timer.schedule(TaskA, 0, 3000); } } public static Image chooseSmallImage(int i) { if(i == 0) { return small_1; } else if(i == 1) { return small_2; } else if(i == 2) { return small_3; } else if(i == 3) { return small_4; } else { return small_1; } } public static void level_manager(float x) { if(x < 1000) { diff = 0; } else if(x < 2000) { diff = 1; } else if(x < 3000) { diff = 2; } else if(x < 5000) { diff = 3; } else if(x < 10000) { diff = 4; } else { diff = 5; } } public void update(int delta) { for(int s = 0; s < small.size(); s++) { Asteroid_Small as = small.get(s); as.update(delta); } } public void render(Graphics g) { for(int s = 0; s < small.size(); s++) { Asteroid_Small as = small.get(s); as.render(g); } } public static void setAsteroids(boolean tf) { asteroids = tf; } } Asteroid_Small: package me.bleedobsidian.astroidjump; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; public class Asteroid_Small { private static Image me; private static float x = 0; private static float y = 0; private static float speed = 0; private static float rotation = 0; private static float rotation_speed = 0; Asteroid_Small(Image i, float x, float y, float rs, float sp) { me = i; Asteroid_Small.x = x; Asteroid_Small.y = y; Asteroid_Small.rotation_speed = rs; Asteroid_Small.speed = sp; } public void update(int delta) { x -= speed * delta; rotation += rotation_speed * delta; me.setRotation(rotation); } public void render(Graphics g) { g.drawImage(me, x, y); } } Task_Asteroid: package me.bleedobsidian.astroidjump; import java.util.TimerTask; public class Task_Asteroids extends TimerTask { public void run() { if(Asteroids.diff == 0) { int randImage = (int) (Math.random() * 4); int randHeight = (int) (Math.random() * 480); Asteroids.small.add(new Asteroid_Small(Asteroids.chooseSmallImage(randImage), Player.x + 960, randHeight, 0.05f, 0.04f)); } } }

    Read the article

  • Youtube ENTIRELY crashes the computer

    - by begtognen
    About a week ago a regular Synaptic update ran in the background. Ever since, when I try to watch a Youtube video (just hitting "play" on the video) the monitor goes black for a moment, then there are just random bars of colour flashing. The only way to fix it is to turn the computer off using the power button and then restarting the computer. I'm using Ubuntu 10.04. It looks like a lot of people have had troubles since that update (red videos, videos that just don't work) but I haven't found anybody with this kind of spectacular crash. I've tried both Firefox and Chromium, same results. Any ideas?

    Read the article

  • how to give meaningful id to the things in database

    - by gcc
    There are a lot of manuals. I am trying to create an database to hold information of these documents. But, there is a small problem. How can I give meaningful id to the manuals? Are there any standard or logic behind the giving meaningful id to the documents? If there is no standard, can you tell me how I should do that? example: table : manual id | manual name EDIT: Not Meaningful ID 1 or M1 or foo 2 C2 bar 3 P123 name ... ... ... (i) (ii) (iii) (i) Not meaningful for me because if some item deleted, there can be gap. ex 1 33 100. (ii) random character can be confusing when one try to give a name to new manual (iii) Why giving name is not preferred is because finding a name to the manual as ID is hard after 500 manuals. Meaningful : New ID * Can be easily produced even if after 1000 manuals * Should not be so complicated

    Read the article

  • Blocked Sites at work (that aren't even bad)

    - by Mercfh
    So here recently, i've been using google to look up information for basically random programming things (i was just hired on a month or so ago). So here recently I was actually looking up some information about RAW_SOCKETS (but thats beside the point) Anyways some of the tutorials sites/explaining how to use them and explaining the protocol sites are actually blocked. (and our manager sent out an email saying that if u run into a site just to email her just in case). Now obviously...w/e sys admins probably see these 'blocked' sites in their reports. But should I be worried? I mean....I literally am not trying to be devious Im just trying to learn stuff. I guess programming websites are sometimes labeled as "hacking". sometimes blogs get labeled like that, but alot of the time blogs have USEFUL information. This apparently happens alot of my other co-workers and they don't even bother emailing our manager.....but should I be worried? Or has this happened to you guys before?

    Read the article

  • How are you keeping abreast with latest HPC trends?

    - by Fanatic23
    For those of you primarily working on high performance computing for non-scientific purposes (as in no fortran) what are the ways by which you keep yourself abreast of the latest trends out there? Industry gossip? Random blogs from google? Search SO? I am into HPC recently and looking for the high level architectural landscape. Given that everyone from GPGPU coders to FPGA folks to Erlang developers claim they are into HPC, how are you keeping up with so much information?

    Read the article

  • why doesn't cron complete script

    - by brickinthewall
    i have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab) 0 2 * * * root /bin/bash --login /opt/aebackup/sshbackup.sh if i run it as logged in root like following it runs prefectly fine. root@server:~# /opt/aebackup/sshbackup.sh if i run it via cron it would just stop after a while (not always on the same task in the script.. it seems pretty random, like the process is killed at some point randomly) does anyone have an idea why my cron would do that? thanks for anything.. i'm desperate!

    Read the article

  • What made you contribute to that open source project? [closed]

    - by Ermin
    I'm interested in real experience and personal answers not just those standard worn out "benefits of contributing to open source" that we all memorized by heart by now. I've met many people who contribute to open source project and almost never did this topic come up: why did they contribute to this open source project. So, if you've contributed to an open source project before in any way, can you please pause for a second and try to remember what really made you decide to contribute to that particular project. Was it a random decision, was it because you were bored, was it because the company you worked for was already using it and you contributed as part of your job, was it because the project was too big you wanted to get contracts, or the project was too small you wanted to build it, or because your prof or co-worker asked you to help with his open source project, or..... To substantiate your reasons, please mention the project name and rate your involvement (heavy, occasional, light, once).

    Read the article

  • How does thumbnail preview in Ubuntu differ from that of Windows? [closed]

    - by Forbidden Overseer
    Possible Duplicate: How does Ubuntu know what file type a file without extension is I thought this question might get a better response in AskUbuntu, as it seems to have more to do with Ubuntu than Windows at a glance. Let's say I have a foo.mkv file. Thumbnail previews work in both Windows 7 and Ubuntu. When I change the filename to anything random like foo.bar or when I remove the extension itself (making it just foo), Nautilus shows thumbnails normally like if it can recognize what type of files they are - without looking at file extension. This however, doesn't happen in Windows 7. Windows starts asking me things like which application I want to use to open that file as soon as I remove file extension (forget thumbnails...) etc. So, How does this thumbnail preview work in Windows 7 and Ubuntu? What makes Ubuntu recognize files "out of the box" unlike Windows 7?

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >