Daily Archives

Articles indexed Thursday November 15 2012

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

  • unstripped binary or object creating debian package

    - by Jaime
    I'm new to package creation and I'm trying to create a .deb package and keep getting 'unstripped-binary-or-object' on all my libraries and executables. I have everything setup in the directory tree where I want them to end up (and a DEBIAN folder with the control file) and then do fakeroot dpkg-deb --build ./mypackage when I lint with lintian mypackage.deb I get that error. Any ideas or suggestions? Thanks

    Read the article

  • Formatting and installing Ubuntu over Windows 7 without admin password

    - by Emiliano Pasqualetti
    A borrowed a friend workstation with Windows 7 and Ubuntu 10.10. I do not have the administrator password and I would like to format everything and install Ubuntu 12.04. I have put the iso on the usb using PendriveLinux and restarted the machine. At the boot I am presented with several options but those Ubuntu ones simply load my friends Ubuntu 10.10 OS (for which I have no password). edit: I fixed this by pressing F12 at the boot before it gave me that prompt (called GRUB). I clicked USB and finally install.

    Read the article

  • Unable to install libcairo2:i386 on ubutu 12.10 X86_64

    - by user63726
    I get the following error. I think it is a bug. Is there a workaround? There is mismatch between the 32 and 64 bit version of this package. apt-get install libcairo2:i386 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. The following information may help to resolve the situation: The following packages have unmet dependencies: libatk-wrapper-java-jni : Depends: libgtk2.0-0 (= 2.12.0) but it is not going to be installed Depends: libatk-wrapper-java (= 0.30.4-0ubuntu4) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

    Read the article

  • Fullscreen Still Has Taskbars at Top and Bottom

    - by MugenDraco
    I'm using Ubuntu 12.04 and running the Gnome Classic desktop. Whenever I go fullscreen, the taskbars at the top and bottom which hold the menus, notifications, etc. are still visible. This only happens when I'm in a browser or trying to play a game. I've tried it in both Firefox and Chromium, and get the same result no matter which one I use. Videos I watch using VLC however do not have the bars at the top and bottom. I found only one post about this in the questions, but there were no answers that worked for me. I wasn't sure if commenting my problem into the 5 month old post would move it to the top where it could be seen, so I made this one.

    Read the article

  • Installation problem: What does"Add this path and evaluate require" mean?

    - by PENG TENG
    I'm installing a software from github:OPEN-VRP It is said that : ~$ git clone git://github.com/mck-/Open-VRP.git Add this path and evaluate require: (push "/path/to/Open-VRP/" asdf:*central-registry*) (require 'open-vrp) (in-package 'open-vrp) What does "Add this path and evaluate require:" mean? I have followed the instruction and the termianl said peng@peng-ThinkPad-SL410:~/??/VRP$ push "/home/peng/??/VRP/Open-VRP" asdf:*central-registry* push: getaddrinfo(/home/peng/??/VRP/Open-VRP): Name or service not known

    Read the article

  • Failed to get i915 symbols, graphics turbo disabled

    - by Optimus Prime
    I'm getting "Failed to get i915 symbols, graphics turbo disabled" error message after installing following softwares and few updates from Ubuntu. Django, Mysql server 5.5 Mysql benchmark And i have installed few updates for ubuntu. It was showing as Security Updates for Ubuntu. After installing Updates the update manager showed that i should restart the system. On restart i got following error message. " failed to get i915 symbols, graphics turbo disabled". So i tried the work around mentioned here (using the Live CD) ie add intel_ips to the blacklist echo "blacklist intel_ips" /etc/modprobe.d/blacklist.conf add i915 and intel_ips to /etc/modules echo -e "i915/nintel_ips" /etc/modules Now when start the system it freezes at Ubuntu splash screen. I'm using Ubuntu 12.04 LTS, on Dell inspiron N1040. I need to boot the system as i have spend lot of days configuring. Python and Django. Please help EDIT : OK when i restarted the system yesterday it magically turned on. Now i can view my desktop. But one problem, i can't mount any of the drives. It says failed to mount Drive. I'm also frequently getting "Ubuntu System Failure" Error Message.

    Read the article

  • Problem with ATI Radeon HD 7670M on Ubuntu 12.10

    - by Aniket
    I updated from Ubuntu 12.04 to 12.10 a couple of days back. My machine is a Dell Inspiron 15R with a Radeon HD 7670M Graphic Driver. When I was using 12.04, I was able to install the propriety driver using the notification you usually get. But after the upgrade, the graphic driver is not getting installed. I am not getting the notification to install the driver And I also tried to follow the steps given - What is the correct way to install ATI Catalyst Video Drivers (fglrx)? I tried the legacy as well as the usual installation procedure Both ways I failed and my graphics went to the fallback, disabling Unity Note: My laptop is getting heated to 80 degrees and can shut down at any point. Please help.

    Read the article

  • When installing Ubuntu (with Unity), I can't select the keyboard layout.

    - by Pascual
    I can select language, (I wanted English), but I wanted to select "international (with dead tilde)" and I cannot find an option to do it unlike Xubuntu or Lubuntu. Usually, in previous editions, before unity, there were two columns ... one for selecting language and other to select the kind of layout and there was a box so you can test the keyboard. Now, there is only one column and I need the dead tilde. How can I do it? Why is Ubuntu hiding these options? Thanks

    Read the article

  • Eclipse Juno, need root access everytime I change the configuration

    - by veepsk
    I am trying to install eclipse Juno on 12.04. I did all the things instructed in this link. But whenever I install any new software (Say CDT or Pydev) on Eclipse, the new softwares are gone upon opening the Eclipse app again. I then have to open Eclipse again with root privileges to install all the software. I also ran into many problems with linking the include library for Eclipse CDT. Can anyone help me with installing Juno in a way that I do not need root access every time I change configurations in Eclipse?

    Read the article

  • How can I reinstall XRandR without serious disruption to 12.04?

    - by broiyan
    This is the sequence that leads to xrandr going missing: Installed 12.04 on a system with a motherboard using the Intel G45 chipset and the E8400 Core 2 Duo and AMD Radeon HD 5450 video card. Installed fglrx when ubuntu prompted via Additional Drivers. Ran Catalyst (Administrative) to select multi-desktop and rebooted. Ran Catalyst (Administrative) to select Xinerama and rebooted. Answer yes to about 3 prompts that request to send bug reports to ubuntu. At this point Settings > Appearances no longer offers the widget that allows you to resize the Unity Launcher icons. Also Settings > Displays says randr extension is not present. BTW: This same sequence is repeatable, including the issues with the missing icon resizer and xrandr, so there is clearly bug fixing potential here. How can I get xrandr reinstalled without un-installing a large set of dependencies? I realize that if I un-install xrandr I will have the chance to re-install but the number of dependencies is large and so an un-install will cause many systems to be un-installed and I am afraid that will ruin Ubuntu 12.04. Hence, I'm looking for a more direct fix. I thought rebooting the .ISO disk and reinstalling would be a good fix but obviously not since this problem is repeatable.

    Read the article

  • Google crawled all our RSS links - how do I remove these from their index? [closed]

    - by ElHaix
    Possible Duplicate: How to Remove URLs from Google Search Engine We added a RSS link to our site for our content. Since then, our site visits have diminished. If a user is viewing the RSS feed, the link itself does not go to the actual article/content. Instead, each link goes to a main index - where the content may have changed, and the article they clicked on COULD be on that page, depending on its age. The RSS link structure is as follows: www.oursite.com/[search term]/rsslink/[title of the rss link they clicked on] I'm not trying to do anything black-hat here, but wondering if we're getting penalized for this somehow. If this is the case, could I do something like permanently-removed on all /rsslink/ pages?

    Read the article

  • Is it a good idea to add robots "noindex" m tags deep, low content pages, e.g. product model data

    - by Cognize
    I'm considering adding robots "noindex, follow" tags to the very numerous product data pages that are linked from the product style pages in our online store. For example, each product style has a page with full text content on the product: http://www.shop.example/Product/Category/Style/SOME-STYLE-CODE Then many data pages with technical data for each model code is linked from the product style page. http://www.shop.example/Product/Category/Style/SOME-STYLE-CODE-1 http://www.shop.example/Product/Category/Style/SOME-STYLE-CODE-2 http://www.shop.example/Product/Category/Style/SOME-STYLE-CODE-3 It is these technical data pages that I intend to add the no index code to, as I imagine that this might stop these pages from cannibalizing keyword authority for more important content rich pages on the site. Any advice appreciated.

    Read the article

  • Testing for Auto Save and Load Game

    - by David Dimalanta
    I'm trying to make a simple app that will test the save and load state. Is it a good idea to make an app that has an auto save and load game every time the newbies open the first app then continues it on the other day? I'm trying to make a simple app with a simple moving block sprite, starting at the center coordinate. Once I moved the sprite to the top by touch n' drag, I touch the back key to close the app. I expected that once I re-open the app and the block sprite is still at the top. But instead, it goes back to the center instead. Where can I find more ways to use the preferences or manipulating by telling the dispose method to dispose only specific wastes but not the important records (fastest time, last time where the sprite is located via coordinates, etc.). Is there really an easy way or it has no shortcuts but most effective way? I need help to expand more ideas. Thank you. Here are the following links that I'm trying to figure it out how to use them: http://www.youtube.com/watch?v=gER5GGQYzGc http://www.badlogicgames.com/wordpress/?p=1585 http://www.youtube.com/watch?v=t0PtLexfBCA&feature=relmfu Take note that these links above are codes. But I'm not looking answers for code but to look how to start or figure it out how to use them. Tell me if I'm wrong.

    Read the article

  • UV texture mapping with perspective correct interpolation

    - by Twodordan
    I am working on a software rasterizer for educational purposes and I am having issues with the texturing. The problem is, only one face of the cube gets correctly textured. The rest are stretched edges: You can see the running program online here. I have used cartesian coordinates, and all I do is interpolate the uv values along the scanlines. The general formula I use for interpolating the uv coordinates is pretty much the one I use for the z-buffering interpolation and looks like this (in this case for horizontal scanlines): u_Slope = (right.u - left.u) / (triangleRight_x - triangleLeft_x); v_Slope = (right.v - left.v) / (triangleRight_x - triangleLeft_x); //[...] new_u = left.u + ((currentX_onScanLine - triangleLeft_x) * u_Slope); new_v = left.v + ((currentX_onScanLine - triangleLeft_x) * v_Slope); Then, when I add each point to the pixel buffer, I restore z and uv: z = (1/z); uv.u = Math.round(uv.u * z *100);//*100 because my texture is 100x100px uv.v = Math.round(uv.v * z *100); Then I turn the u v indexes into one index in order to fetch the correct pixel from the image data (which is a 1 dimensional px array): var index = texture.width * uv.u + uv.v; //and the rest is unimportant imagedata[index].RGBA bla bla The interpolation formula is correct considering the consistency of the texture (including the straight stripes). However, I seem to get quite a lot of 0 values for either u or v. Which is probably why I only get one face right. Furthermore, why is the texture flipped horizontally? (the "1" is flipped) I must get some sleep now, but before I get into further dissecting of every single value to see what goes wrong, Can someone more experienced guess why might this be happening, just by looking at the cube? "I have no idea what I'm doing" (it's my first time implementing a rasterizer). Did I miss an important stage? Thanks for any insight. PS: My UV values are as follows: { u:0, v:0 }, { u:0, v:0.5 }, { u:0.5, v:0.5 }, { u:0.5, v:0 }, { u:0, v:0 }, { u:0, v:0.5 }, { u:0.5, v:0.5 }, { u:0.5, v:0 }

    Read the article

  • Ambient occlusion shader just shows models as all white

    - by dvds414
    Okay so I have this shader for ambient occlusion. It loads to world correctly, but it just shows all the models as being white. I do not know why. I am just running the shader while the model is rendering, is that correct? or do I need to make a render target or something? If so then how? I'm using C++. Here is my shader: float sampleRadius; float distanceScale; float4x4 xProjection; float4x4 xView; float4x4 xWorld; float3 cornerFustrum; struct VS_OUTPUT { float4 pos : POSITION; float2 TexCoord : TEXCOORD0; float3 viewDirection : TEXCOORD1; }; VS_OUTPUT VertexShaderFunction( float4 Position : POSITION, float2 TexCoord : TEXCOORD0) { VS_OUTPUT Out = (VS_OUTPUT)0; float4 WorldPosition = mul(Position, xWorld); float4 ViewPosition = mul(WorldPosition, xView); Out.pos = mul(ViewPosition, xProjection); Position.xy = sign(Position.xy); Out.TexCoord = (float2(Position.x, -Position.y) + float2( 1.0f, 1.0f ) ) * 0.5f; float3 corner = float3(-cornerFustrum.x * Position.x, cornerFustrum.y * Position.y, cornerFustrum.z); Out.viewDirection = corner; return Out; } texture depthTexture; texture randomTexture; sampler2D depthSampler = sampler_state { Texture = <depthTexture>; ADDRESSU = CLAMP; ADDRESSV = CLAMP; MAGFILTER = LINEAR; MINFILTER = LINEAR; }; sampler2D RandNormal = sampler_state { Texture = <randomTexture>; ADDRESSU = WRAP; ADDRESSV = WRAP; MAGFILTER = LINEAR; MINFILTER = LINEAR; }; float4 PixelShaderFunction(VS_OUTPUT IN) : COLOR0 { float4 samples[16] = { float4(0.355512, -0.709318, -0.102371, 0.0 ), float4(0.534186, 0.71511, -0.115167, 0.0 ), float4(-0.87866, 0.157139, -0.115167, 0.0 ), float4(0.140679, -0.475516, -0.0639818, 0.0 ), float4(-0.0796121, 0.158842, -0.677075, 0.0 ), float4(-0.0759516, -0.101676, -0.483625, 0.0 ), float4(0.12493, -0.0223423, -0.483625, 0.0 ), float4(-0.0720074, 0.243395, -0.967251, 0.0 ), float4(-0.207641, 0.414286, 0.187755, 0.0 ), float4(-0.277332, -0.371262, 0.187755, 0.0 ), float4(0.63864, -0.114214, 0.262857, 0.0 ), float4(-0.184051, 0.622119, 0.262857, 0.0 ), float4(0.110007, -0.219486, 0.435574, 0.0 ), float4(0.235085, 0.314707, 0.696918, 0.0 ), float4(-0.290012, 0.0518654, 0.522688, 0.0 ), float4(0.0975089, -0.329594, 0.609803, 0.0 ) }; IN.TexCoord.x += 1.0/1600.0; IN.TexCoord.y += 1.0/1200.0; normalize (IN.viewDirection); float depth = tex2D(depthSampler, IN.TexCoord).a; float3 se = depth * IN.viewDirection; float3 randNormal = tex2D( RandNormal, IN.TexCoord * 200.0 ).rgb; float3 normal = tex2D(depthSampler, IN.TexCoord).rgb; float finalColor = 0.0f; for (int i = 0; i < 16; i++) { float3 ray = reflect(samples[i].xyz,randNormal) * sampleRadius; //if (dot(ray, normal) < 0) // ray += normal * sampleRadius; float4 sample = float4(se + ray, 1.0f); float4 ss = mul(sample, xProjection); float2 sampleTexCoord = 0.5f * ss.xy/ss.w + float2(0.5f, 0.5f); sampleTexCoord.x += 1.0/1600.0; sampleTexCoord.y += 1.0/1200.0; float sampleDepth = tex2D(depthSampler, sampleTexCoord).a; if (sampleDepth == 1.0) { finalColor ++; } else { float occlusion = distanceScale* max(sampleDepth - depth, 0.0f); finalColor += 1.0f / (1.0f + occlusion * occlusion * 0.1); } } return float4(finalColor/16, finalColor/16, finalColor/16, 1.0f); } technique SSAO { pass P0 { VertexShader = compile vs_3_0 VertexShaderFunction(); PixelShader = compile ps_3_0 PixelShaderFunction(); } }

    Read the article

  • Do 2D games have a future? [closed]

    - by Griffin
    I'm currently working on a 2D soft-body physics engine (since none exist right now -_-), but I'm worried that there's no point to spending what will most likely be years on it. Although I love working on it, I doubt such an engine would get any income considering anyone willing to pay money for the library will likely to be working in 3D. Do 2D games have any sort of future in the game industry? Should I just drop my engine and find something meaningful to work on? Bonus: I've been trying to think of a unique way to implement my physics engine in a 2d game by looking at games that are multiple dimensions, but still in 2d perspective like Paper Mario. Any ideas?

    Read the article

  • Sending variable to $.getScript

    - by oshirowanen
    Is it possible to send a variable to the script loaded using $.getScript? At the moment I have: $.getScript( "js/my_script.js", function() { // do something here after script has loaded }); But I want to send a variable to the loaded script. Is this possible, if yes, how? For example // this is a variable set outside of the script loaded via `$.getScript` var my_variable = 1 // how do I get that variable sent to `my_script.js` $.getScript( "my_script.js", function() { // do something here after script has loaded });

    Read the article

  • Is there any JavaScript Library to intelligently truncate strings?

    - by j0ker
    I need to truncate strings in a side menu to make the fit into a div without a linebreak. The divs have a fixed width. I'm looking for a library to do that for me. If a string is too long to fit into the div, it should be truncated like: <div>This string is too long</div> == <div>This string is...ong</div> As you can see, the string is not only truncated by an ellipsis but the last three letters are also visible. This is meant to increase readability. The truncation should not care about spaces. Does anyone know of a library that includes such functionality? We're mainly using jQuery throughout the project. Thanks in advance!

    Read the article

  • SQL using with clause not working

    - by user1290467
    My question is why this query does not work? Cursor c = db.rawQuery("SELECT * FROM tbl_staff WHERE PMajor = '%" + spin.getSelectedItem().toString() + "%'", null); Cursor c: it is a cursor for handling my query tbl_staff: my table that consist of PName,PMajor,PCert spin: is spinner that has values which I need for my database query. When I use: if (c.moveToNext()) else (log.d("error query","couldn't do the query!");) It goes to else statement and moveToNext() doesn't work.

    Read the article

  • Using UUIDs for cheap equals() and hashCode()

    - by Tom McIntyre
    I have an immutable class, TokenList, which consists of a list of Token objects, which are also immutable: @Immutable public final class TokenList { private final List<Token> tokens; public TokenList(List<Token> tokens) { this.tokens = Collections.unmodifiableList(new ArrayList(tokens)); } public List<Token> getTokens() { return tokens; } } I do several operations on these TokenLists that take multiple TokenLists as inputs and return a single TokenList as the output. There can be arbitrarily many TokenLists going in, and each can have arbitrarily many Tokens. These operations are expensive, and there is a good chance that the same operation (ie the same inputs) will be performed multiple times, so I would like to cache the outputs. However, performance is critical, and I am worried about the expense of performing hashCode() and equals() on these objects that may contain arbitrarily many elements (as they are immutable then hashCode could be cached, but equals will still be expensive). This led me to wondering whether I could use a UUID to provide equals() and hashCode() simply and cheaply by making the following updates to TokenList: @Immutable public final class TokenList { private final List<Token> tokens; private final UUID uuid; public TokenList(List<Token> tokens) { this.tokens = Collections.unmodifiableList(new ArrayList(tokens)); this.uuid = UUID.randomUUID(); } public List<Token> getTokens() { return tokens; } public UUID getUuid() { return uuid; } } And something like this to act as a cache key: @Immutable public final class TopicListCacheKey { private final UUID[] uuids; public TopicListCacheKey(TopicList... topicLists) { uuids = new UUID[topicLists.length]; for (int i = 0; i < uuids.length; i++) { uuids[i] = topicLists[i].getUuid(); } } @Override public int hashCode() { return Arrays.hashCode(uuids); } @Override public boolean equals(Object other) { if (other == this) return true; if (other instanceof TopicListCacheKey) return Arrays.equals(uuids, ((TopicListCacheKey) other).uuids); return false; } } I figure that there are 2^128 different UUIDs and I will probably have at most around 1,000,000 TokenList objects active in the application at any time. Given this, and the fact that the UUIDs are used combinatorially in cache keys, it seems that the chances of this producing the wrong result are vanishingly small. Nevertheless, I feel uneasy about going ahead with it as it just feels 'dirty'. Are there any reasons I should not use this system? Will the performance costs of the SecureRandom used by UUID.randomUUID() outweigh the gains (especially since I expect multiple threads to be doing this at the same time)? Are collisions going to be more likely than I think? Basically, is there anything wrong with doing it this way?? Thanks.

    Read the article

  • Image Drawing on UIView

    - by user1180261
    I'm trying to create an application where I can draw a lot of pictures at a specific point (determined for each image) on one view. I have a coordinates where I need draw a picture, width and height of it For example: I have 2 billion jpeg's images. for each images I have a specific origin point and size. In 1 second I need draw on view 20-50 images in specific point. I have already tryid solve that in the next way: UIGraphicsBeginImageContextWithOptions(self.previewScreen.bounds.size, YES, 0); [self.previewScreen.image drawAtPoint:CGPointMake(0, 0)]; [image drawAtPoint:CGPointMake(nRect.left, nRect.top)]; UIImage *imagew = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [self.previewScreen setImage:imagew]; but in this solution I have a very big latency with displaying images and big CPU usage WBR Maxim Tartachnik

    Read the article

  • Why is my PHP query executing twice on page load?

    - by user1826238
    I am newish to PHP and I seem to be having an issue with an insert statement that executes twice when I open this page to view a document. In the database the 2nd insert is 1 second later. It happens in google chrome only and on this page only. IE has no issue, I dont have firefox to check. view_document.php <?php require_once($_SERVER['DOCUMENT_ROOT'] . '/../includes/core.php'); require_once($_SERVER['DOCUMENT_ROOT'] . '/../includes/connect.php'); $webusername = $_SESSION['webname']; if (isset($_GET['document'])) { $ainumber = (int) $_GET['document']; if (!ctype_digit($_GET['document']) || !preg_match('~^[0-9]+$~',$_GET['document']) || !is_numeric($_GET['document'])) { $_SESSION = array(); session_destroy(); header('Location: login.php'); } else { $stmt = $connect->prepare("SELECT s_filename, s_reference FROM dmsmain WHERE s_ainumber = ?") or die(mysqli_error()); $stmt->bind_param('s', $ainumber); $stmt->execute(); $stmt->bind_result($filename, $reference); $stmt->fetch(); $stmt->close(); $file = $_SERVER['DOCUMENT_ROOT'] . '/../dms/files/'.$filename.'.pdf'; if (file_exists($file)) { header('Content-Type: application/pdf'); header('Content-Disposition: inline; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . filesize($file)); header('Accept-Ranges: bytes'); readfile($file); $stmt = $connect->prepare("INSERT INTO dmslog (s_reference, s_userid, s_lastactivity, s_actiontype) VALUES (?, ?, ?, ?)") or die(mysqli_error()); date_default_timezone_set('Africa/Johannesburg'); $date = date('Y-m-d H:i:s'); $actiontype = 'DL'; $stmt->bind_param('ssss', $reference, $webusername, $date, $actiontype); $stmt->execute(); $stmt->close(); } else { $missing = "<b>File not found</b>"; } } } ?> My HTTP access records I assume [15/Nov/2012:10:14:32 +0200] "POST /dms/search.php HTTP/1.1" 200 5783 "http://www.denso.co.za/dms/search.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" [15/Nov/2012:10:14:33 +0200] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" [15/Nov/2012:10:14:34 +0200] "GET /dms/view_document.php?document=8 HTTP/1.1" 200 2965 "http://www.denso.co.za/dms/search.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" [15/Nov/2012:10:14:35 +0200] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" I have checked my <img src=''> links and I dont see a problem with them. The records indictate there is a favicon.ico request so I created a blank favicon and placed it in my public_html folder and linked it in the page like so <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" /> Unfortunately that did not work as the statement still executes twice. I am unsure if it is a favicon issue as my upload page uses an insert query and it executes once. If someone could please tell me where I am going wrong or point me in the right direction I would be very grateful

    Read the article

  • moment.js work out time left

    - by user1503606
    I am trying to get my head around the moment.js library as it seems more stable than the jquery one and the jquery date one is output console errors. http://momentjs.com/docs/#/manipulating/ What i am trying to do is do a countdown to work out the time left from now. example i have var countDownTill = '2012-11-19 00:00:00 +0000'; document.write(moment(countDownTill).diff(moment(), 'months') + " months<br>"); document.write(moment(countDownTill).diff(moment(), 'weeks') + " weeks<br>"); document.write(moment(countDownTill).diff(moment(), 'days') + " days<br>"); which will output 0 months 1 weeks 4 days but its not working out overall its doing it individuals for each value (days,weeks,months) so if i up the date by say 12 months like below. var countDownTill = '2013-11-19 00:00:00 +0000'; document.write(moment(countDownTill).diff(moment(), 'months') + " months<br>"); document.write(moment(countDownTill).diff(moment(), 'weeks') + " weeks<br>"); document.write(moment(countDownTill).diff(moment(), 'days') + " days<br>"); it outputs. 12 months 53 weeks 369 days where as i am trying to get it to output 12 months 2 weeks 5 days example here http://jsfiddle.net/fDmWH/3/

    Read the article

  • adding only odd numbers

    - by Jessica M.
    So the question I'm trying to solve the user is supposed to enter any positive number. Then I'm trying to write a program that adds only the odd numbers up to the number the user enters and displays the total. So for example if the user enters 4 my program should add four odd numbers. 1 + 3 + 5 + 7 = 16. The only tools I have available are for statement, if, if/else if,while loop and println. I can only figure out how to print out the odd numbers. I know I want to create a variable named total to store the value of adding up all the odd numbers but I don't know how that fits into the program. import acm.program.*; public class AddingOddNumbers extends ConsoleProgram { public void run() { int n = readInt("enter a positive nunber: "); int total = 0; for (int i = 0; i < n; i++) { if (n == 1) { println(1); } else { println((i * 2) + 1); } } } }

    Read the article

  • java arraylist : same values to a new arraylist

    - by j0hns3n
    public static void rechnung(List<String> array) { for (int i = 0; i < array.size(); i++) { for (int j = 0; j < array.size(); j++) { if (i != j) { System.out.println(array.get(i) + " gleich " + array.get(j) + " " + (array.get(i).substring(0, 9).equals(array.get(j) .substring(0, 9)))); } } } } My Intension is to put the same values with the same date from a List in a new List. At the end I've for example three new Lists. List content: 03.07.2007 00001.tif 03.07.2007 00002.tif 18.02.2008 00003.tif 18.02.2008 00004.tif 18.02.2008 00005.tif 11.03.2009 00004.tif 11.03.2009 00005.tif

    Read the article

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