Search Results

Search found 1506 results on 61 pages for 'ben shelock'.

Page 4/61 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Android Development Eclise - Cant Create a New Android Project - Mac OS

    - by Ben Diamant
    I have an issue creating a new android project using the eclipse wizard, everything worked fine by yesterday. had a few project working. Now, when i press "Finish" on the final step of the wizard it remain open and an empty project with white-marked packages is added to the work branch, I tried to reinstall eclipse and it's sdk+plug, still nothing. Would really appreciate your assistance, Thank you in advance Ben

    Read the article

  • Click event keeps firing

    - by Ben Shelock
    I have absolutely no idea why this is happening but the following code seems to be executed a huge ammount of times in all browsers. $('#save_albums').click(function(){ for(var i = 1; i <= 5; i++){ html = $('#your_albums ol li').eq(i).html(); alert(html); } }); Looks fairly innocent to me... Here's the code in it's entirety $(function(){ $('#query').keyup(function(){ var text = encodeURI($(this).val()); if(text.length > 3){ $('#results').load('search.php?album='+text, function(){ $('.album').hover(function(){ $(this).css('outline', '1px solid black') },function(){ $(this).css('outline', 'none') }); $('.album').click(function(){ $('#fores').remove(); $('#yours').show(); if($('#your_albums ol li').length <= 4){ albumInfo = '<li><div class="album">' + $(this).html() + '</div></li>'; if($('#your_albums ol li').length >= 1){ $('#your_albums ol li').last().after(albumInfo); } else{ $('#your_albums ol').html(albumInfo); } } else{ alert('No more than 5 please'); } }); $('#clear_albums').click(function(e){ e.preventDefault; $('#your_albums ol li').remove(); }); $('#save_albums').click(function(){ for(var i = 1; i <= 5; i++){ html = $('#your_albums ol li').eq(i).html(); alert(html); } }); }); } else{ $('#results').text('Query must be more than 3 characters'); } }); });

    Read the article

  • setTimeout() not executing

    - by Ben Shelock
    I've got this simple function which displays a message to the user. If I add the timeout parameter it will slide back up automatically if not the user has to click it to get rid. But the timeout bit isn't working. function feedback(text, timeout){ $('#feedback').text(text).slideDown('fast'); $('#feedback').click(function(){ $(this).slideUp(); }); if(timeout){ setTimeout(function(){ $('#feedback').slideup(); }, timeout); } }

    Read the article

  • Javascript event detection

    - by Ben Shelock
    I can't find any good documentation on this suprisingly so I'm posting it here. What's the raw javascript equivilent to this: $(elem).click(function(){ alert(this.text()); }); All I can find is this <elem onlick="func()" /> which is not what I want, I want to be able to do it just with javascript not within the context of an element.

    Read the article

  • Add New Gist using the Github API

    - by Ben Shelock
    I'm making a small app in Adobe Air which I need to interact with the Github Gist API. However I'm kind of stuck. If you're not familiar with Adobe Air you can still help, the XMLHttpRequest javascript object can do cross domain requests, as there is no domain as such. So theres nothing Adobe Air specific here. Where I'm stuck is I think I need to authenticate myself then make the POST. I just don't understand it

    Read the article

  • Undefined variable error when parsing json

    - by Ben Shelock
    I'm trying to parse the json grabbed from here. Basically what I do is iterate over the items, sort them, then display them. But I get an error saying data.data.children[i] is undefined. I can't think why it's doing it though? var json = 'http://www.reddit.com/reddits/mine/.json'; GM_xmlhttpRequest({ method: "GET", url: json, onload: reddits }); function reddits(response){ var txt = response.responseText; var data; var suggested = document.getElementById('suggested-reddits'); if(window.JSON && JSON.parse){ data = JSON.parse(txt); } else{ data = eval("("+txt+")"); } suggested.innerHTML += '<span>reddits you\'re subscribed to </span> <ul id="rsub"></ul>'; GM_addStyle('#rsub{width: 500px;}'); var reddits = new Array(); var rsub = document.getElementById('rsub'); for(i = 0; i <= data.data.children.length; i++){ var r = data.data.children[i].data.display_name; reddits.push(r); } sort(reddits); for(i = 0; i <= reddits.length; i++){ rsub.innerHTML += '<li><a href="#" onclick="set_sr_name(this); return false">' + reddits[i] + '</a></li>'; } }

    Read the article

  • Finding the most common values from given data

    - by Ben Shelock
    I have some data that looks something like this... +----------+----------+----------+ | Column 1 | Column 2 | Column 3 | +----------+----------+----------+ | Red | Blue | Green | | Yellow | Blue | Pink | | Black | Grey | Blue | +--------------------------------+ I need to go through this data and find the 3 most common colours. The raw data is in CSV and there's likely to be thousands more rows. (link) What's the best way of doing this?

    Read the article

  • Javascript Canvas Element - Array Of Images

    - by Ben Shelock
    I'm just learning JS, trying to do things without jQuery, and I want to make something similar to this however I want to use an array of images instead of just the one. My image array is formed like this var image_array = new Array() image_array[0] = "image1.jpg" image_array[1] = "image2.jpg" And the canvas element is written like this. (Pretty much entirely taken from the Mozilla site) function draw() { var ctx = document.getElementById('canvas').getContext('2d'); var img = new Image(); img.src = 'sample.png'; img.onload = function(){ for (i=0;i<5;i++){ for (j=0;j<9;j++){ ctx.drawImage(img,j*126,i*126,126,126); } } } } It uses the image "sample.png" in that code but I want to change it to display an image from the array. Displaying a different one each time it loops. Apoligies if I've not explained this well.

    Read the article

  • Seamlessly use large background images on webpages

    - by Ben Shelock
    I want to have huge background images on my site but without giving the user a hard time downloading them and the site looking ugly as the background loads. They would be no bigger than 1920 X 1080 in size, however it's hard to say in terms of kilobytes/megabytes. What are my options here and which are most effective? I'm not too bothered about bandwidth, just want to user to think everything looks nice ;)

    Read the article

  • Loop not working when I try to traverse a Simple XML Object

    - by Ben Shelock
    I'm trying to loop through the results from the Last.fm API but it's not working. function get_url($url){ $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5); $content = curl_exec($ch); curl_close($ch); return $content; } $xml = get_url('http://ws.audioscrobbler.com/2.0/?method=album.search&album=kid%20a&api_key=b25b959554ed76058ac220b7b2e0a026'); $doc = new SimpleXMLElement($xml); $albums = $doc->results->albummatches; foreach($albums as $album){ echo $album->album->name; } This just shows the first album. If I change the code within the foreach loop to echo $album->name; it shows nothing at all. What am I doing wrong?

    Read the article

  • Pi/Infinite Numbers

    - by Ben Shelock
    I'm curious about infinite numbers in computing, in particular pi. For a computer to render a circle it would have to understand pi. But how can it if it is infinite? Am I looking too much into this? Would it just use a rounded value?

    Read the article

  • Classes. Whats the point?

    - by Ben Shelock
    I'm fairly new to OOP in PHP, I've made a couple of basic scripts but nothing impressive. All I've really taken from it is that it would probably be easier just make a collection of functions and include them. The structure of classes seems to just confuse what was otherwise a simple process. And in collating everything into a class it doesn't really add any functionality. So I'm clearly missing something. Could someone explain what functionality is added by creating classes

    Read the article

  • Bind event to shape on canvas

    - by Ben Shelock
    How can I bind an event to a shape drawn on a canvas? I presumed this would work but I get an error. <html> <head> <script type="application/javascript"> function draw() { var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.fillStyle = "rgb(200,0,0)"; var rec = ctx.fillRect (0, 0, 55, 50); rec.onclick = function(){ alert('something'); } } </script> </head> <body onLoad="draw()"> <canvas id="canvas" width="300" height="300"></canvas> </body> </html>

    Read the article

  • Useful Excel keyboard shortcuts

    - by Ben Lings
    What keyboard shortcuts do you use in Excel? Things I've discovered recently and found very useful are: Shift + Space - select the current row Ctrl + Space - select the current column Ctrl + Shift + Space - select the block of contiguous cell Ctrl + + - Insert (as in the context menu). If the current row is selected, will insert a new row. Ctrl + - - Delete (as in the context menu). If the current row is selected, will delete entire row. What (apart from the normal cut, copy, paste, etc) do you use? Ctrl + 1 to open the Format dialog. Shift + F2 to add/edit a cell comment. Shift + F2, followed by Esc to select the current cell comment, which can then be moved around with the arrow keys (????) or deleted by pressing Del. Ctrl + ???? to move to the last non-blank cell in a series. This is usually the edge of a table, but not if you have blank cells in the path. Pressing End followed by an arrow key does the same thing. Alt + F11 to open the VBA editor. Alt + = to start a SUM() formula and go straight to selecting cells to be summed. Ctrl + G or F5 to jump to a cell by typing its coordinates (e.g. C3) Ctrl + Home to jump to the top left, usually A1 unless you you are in a frozen split view, in which case it will jump to the top left of the "data" area. Ctrl + ; and Ctrl + Shift + ; to insert the current date and time, respectively. I know Ben Lings already posted this one, but I find it indispensable.

    Read the article

  • Probelms Intstalling Trac using apt-get Ubuntu Jaunty

    - by Ben Waine
    Hi, I'm having some issues getting apt to install trac correctly on my Ubuntu Jaunty Box. Using the command 'apt-get install trac' I get the following output: root@myserver:~# apt-get install trac Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: trac: Depends: python-setuptools (> 0.5) but it is not installable Depends: python-pysqlite2 (>= 2.3.2) but it is not going to be installed Depends: python-subversion but it is not installable Depends: libjs-jquery but it is not installable Recommends: python-pygments (= 0.6) but it is not installable or enscript but it is not installable Recommends: python-tz but it is not installable E: Broken packages I have successfully used the command on my karmic kola desktop machine and am able to create new projects etc. I thought I might be able to solve the problem by installing all python related extensions. This produced a very similar output. I have Main, universe and multi-verse repositories enabled. Its a remote machine and I have no access to the gui. Hope someone can help, googleing failed to solve the issue or find a solution! Thanks, Ben

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >