Daily Archives

Articles indexed Tuesday July 10 2012

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

  • no boot menu or / mount point after installing Ubuntu 12.04

    - by Liz Kaiser
    I've installed Ubuntu 12.04 using a Live CD to a new Gateway computer with Windows 7. I used "Install Alongside Windows" option. But on restart there was no boot menu. It only starts into Windows. I looked at partitions using GParted (with Live CD) and it shows my new Ext 4 partition for Ubuntu as follows sda4 Extended, sda5 Ext 4, sda6 linux-swap But there is no / Mount Point listed for the sda5 partition. I did try Boot-Repair but it did nothing. So I've got 2 problems: no GRUB menu and no / Mount Point for my ext 4 partition. I'm so exasperated. Do I have to edit the fstab file to create a / mount point? (And that prospect really scares me.) And if I do, could someone give me step by step instructions. In order to avoid this detailed and scary stuff in the Terminal (which I really do not know very much about), I deleted the ubuntu partitions and started all over installing 12.04 again. But I'm left in the exact same situation now. Thanks for any help you all can provide. Is there an easy way out of this?

    Read the article

  • How do I select a field/column from the output of `ls -l`?

    - by soandos
    My goal is deceptively simple (at least to me). I wish to take the output of ls -l or ls -lh and select just one field. I am looking for this to be as bulletproof as possible, by which I mean, assume that filenames can have a variable number of spaces, not everything in the field has the same length, etc. Bonus points for having a script that will take the name of the the field (or even just a field number), and then return the contents of the field. I want to turn into:

    Read the article

  • Problem in shared folder

    - by alsadi90
    I followed the steps for sharing folders between windows 7 and Ubuntu in virtual box. but the folder appear with X sign and give me the following message when open it "the folder conent could not be displayed" and when choose "shared folder" from "Device" menu the following is written below "on the system page , you have asigned more than 50% of your computer's memory (2.93) to the virtual machine ...

    Read the article

  • Ubuntu 12.04 takes too long to boot

    - by msPeachy
    I've recently encountered the following error message: mount: mounting /dev/disk/by-uuid/3f7f5cd9d-6ea3-4da7-b5ec-**** on /root failed: Invalid argument mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory Target file system doesn't have /sbin/init. No init found. Try passing init= bootarg. Busybox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) _ I run sudo fsck /dev/sda2 which is the Ubuntu ext4 root partition via LiveCD. It checked and fixed the file system. The next time I boot, Ubuntu started to load with the Ubuntu logo and the dots underneath for several hours (with the mouse pointer active on the screen), I even let the computer on overnight but still it did not successfully boot or got to the login screen in the morning. I booted again with the LiveCD and checked the NTFS partitions with ntfsfix and again the NTFS partitions was checked and fixed successfully. I also edited my fstab and commented out the lines that auto-mounts the NTFS partitions. The next time I boot, it took almost 20 minutes for Ubuntu to get to the login screen, after typing the password it took an additional 10 minutes for Ubuntu to get to the desktop. On the desktop, it take several minutes to open any program, displaying the Dash alone takes 5 minutes! Is there a fix for this without having to reinstall Ubuntu? I don't see or get any errors, Ubuntu is just taking too long to boot and to run programs. Please help!

    Read the article

  • Boot time seems unusually long on MSI GX660R (bootchart included)

    - by Sman789
    After upgrading (clean install) to Ubuntu 12.04, the speed issue when running programs has reduced on my MSI GX660R laptop. However, the boot time is still much longer (over a minute, even after BIOS) than on the many less powerful laptops I have encountered running the same OS, and I was wondering if anyone could help me improve it. I use the FGLRX driver, if that makes any difference. I have uploaded a boot chart, it can be found here http://imageshack.us/photo/my-images/4/bootchartl.png/ As you can see, the boot time is over a minute even after BIOS. A 'designed for Vista' laptop from ages ago which I installed Ubuntu on boots in around thirty seconds, so I think it's a bit strange. Output of dmesg: http://paste.ubuntu.com/1081359/ Output of /var/log/kern.log : http://paste.ubuntu.com/1081363/ Output of /var/log/syslog : http://paste.ubuntu.com/1081365/

    Read the article

  • 12.04 GPU lockup

    - by soandos
    I was able to install Ubuntu 12.04 using the alternative version of the image, (64 bit) but when I start the system it tells me the GPU locked up, and instead presents a text only screen. I understand that this site is not for bug reports, but at the same time, I know that there are some versions of the installer than have to be compatible with my graphics card (Nvidia GTS 360M). I assumed that the mere fact that the alternative installer ran was an indication that I could get some sort of graphical interface running after the install. Is there some way of getting some type of graphical interface running on my machine? Even better would be is there a way to get the rest of the system running as normal (i.e. GPU up and running)? If an internet connection is required to download driver support or something similar, directions for how to configure a wireless connection with WPA2-Personal protection from the text-only interface (bash). Any help would be appreciated. Note: I was able to find this which tells me that the card is supported. Note 2: In the install software stage of the install, I was unable to install anything (no internet connection) Update: The exact error message is [8.591394] [drm] 0000:01:00.0: GPU Lockup - switching to software fbcon Update 2: If I try to install with the regular version of Ubuntu, the screen goes staticy. This also happens if I install with Wubi (distasteful I know) and then try to use Ubuntu. Update 3: I've tried xforcevesa, nomodeset and xforcevesa nomodeset as my wubi boot options. Update 4: Thanks to jokerdino, I can now connect to the internet, so internet tools would now be a possibility.

    Read the article

  • How can I strip down Ubuntu?

    - by Thomas Owens
    I'm trying to fix what I consider a bloated install of Ubuntu. When I install Ubuntu on a machine, I get things that I don't want - web browsers, office applications, media players, accessibility utilities, Ubuntu One, and so on. My goal is to create a way that I can have an install of Ubuntu that contains only the most minimal packages - the administrative tools and package manager, a GUI (my preference would be GNOME), a text editor, core drivers (video cards, network cards - wired and wireless, input devices), and anything else that I have to have to run a stable distribution. From there, I would like to pick and choose which packages I install to create my own customized system. After playing around with other distros like Arch and Slackware, like how they provide a barebones install by default. However, I get trapped in a "configuration hell" - right now, I tried moving away from Ubuntu and to Arch, but after spending 6 hours with it, I still don't have a usable system. It's half configured and I don't have any usable software packages to enable me to work. Is anything that can help me available? Either something like the OpenSUSE builder that lets you choose applications and packages for the CD, an advanced installation mode where I can choose the packages to install and which to ignore, or a guide on how to strip Ubuntu down to its bare bones? And I suppose a natural follow up to this is once I have a stripped down Ubuntu, will this affect updating at all? When Canonical releases the next version of Ubuntu, I don't want any bloatware reinstalled. And yes, most of the applications that come with Ubuntu, I simply don't use. Ever.

    Read the article

  • robots.txt, how effective is it and how long does it take?

    - by Stefan
    We recently updated the site to a single page site using jQuery to slide between "pages". So we now have only index.php. When you search the company on engines such as Google, you get the site and a listing of its sub pages which now lead to outdated pages. Our plan doesn't allow us to edit the .htaccess and the old pages are .html docs so I cannot use PHP redirects either. So if I put in place a robots.txt telling the engines to not crawl beyond index.php, how effective will this be in preventing/removing crawled sub pages. And rough guess, how long before the search engines would update?

    Read the article

  • Managing text-maps in a 2D array on to be painted on HTML5 Canvas

    - by weka
    So, I'm making a HTML5 RPG just for fun. The map is a <canvas> (512px width, 352px height | 16 tiles across, 11 tiles top to bottom). I want to know if there's a more efficient way to paint the <canvas>. Here's how I have it right now. How tiles are loaded and painted on map The map is being painted by tiles (32x32) using the Image() piece. The image files are loaded through a simple for loop and put into an array called tiles[] to be PAINTED on using drawImage(). First, we load the tiles... and here's how it's being done: // SET UP THE & DRAW THE MAP TILES tiles = []; var loadedImagesCount = 0; for (x = 0; x <= NUM_OF_TILES; x++) { var imageObj = new Image(); // new instance for each image imageObj.src = "js/tiles/t" + x + ".png"; imageObj.onload = function () { console.log("Added tile ... " + loadedImagesCount); loadedImagesCount++; if (loadedImagesCount == NUM_OF_TILES) { // Onces all tiles are loaded ... // We paint the map for (y = 0; y <= 15; y++) { for (x = 0; x <= 10; x++) { theX = x * 32; theY = y * 32; context.drawImage(tiles[5], theY, theX, 32, 32); } } } }; tiles.push(imageObj); } Naturally, when a player starts a game it loads the map they last left off. But for here, it an all-grass map. Right now, the maps use 2D arrays. Here's an example map. [[4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 1, 1, 1, 1], [1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 1, 13, 13, 1, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 1, 13, 13, 1, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 1, 13, 13, 1, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 13, 13, 13, 1, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 13, 13, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 1], [13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 1], [1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1]]; I get different maps using a simple if structure. Once the 2d array above is return, the corresponding number in each array will be painted according to Image() stored inside tile[]. Then drawImage() will occur and paint according to the x and y and times it by 32 to paint on the correct x-y coordinate. How multiple map switching occurs With my game, maps have five things to keep track of: currentID, leftID, rightID, upID, and bottomID. currentID: The current ID of the map you are on. leftID: What ID of currentID to load when you exit on the left of current map. rightID: What ID of currentID to load when you exit on the right of current map. downID: What ID of currentID to load when you exit on the bottom of current map. upID: What ID of currentID to load when you exit on the top of current map. Something to note: If either leftID, rightID, upID, or bottomID are NOT specific, that means they are a 0. That means they cannot leave that side of the map. It is merely an invisible blockade. So, once a person exits a side of the map, depending on where they exited... for example if they exited on the bottom, bottomID will the number of the map to load and thus be painted on the map. Here's a representational .GIF to help you better visualize: As you can see, sooner or later, with many maps I will be dealing with many IDs. And that can possibly get a little confusing and hectic. The obvious pros is that it load 176 tiles at a time, refresh a small 512x352 canvas, and handles one map at time. The con is that the MAP ids, when dealing with many maps, may get confusing at times. My question Is this an efficient way to store maps (given the usage of tiles), or is there a better way to handle maps? I was thinking along the lines of a giant map. The map-size is big and it's all one 2D array. The viewport, however, is still 512x352 pixels. Here's another .gif I made (for this question) to help visualize: Sorry if you cannot understand my English. Please ask anything you have trouble understanding. Hopefully, I made it clear. Thanks.

    Read the article

  • What sort of leaderboard for my game?

    - by Martin
    I recently published a word game for Windows Phone and I am really happy to have some players. The game is entirely offline and at the end of a game, the player's score is published to a server. I'm collecting the scores to build a leaderboard. Right now, I don't believe that the leaderboard I offer to my users is appropriate. I essentially accumulate the score of all the games of a user for a given day and that becomes their score. So if Player 1 plays 3 games and gets 100, 150 and 200 points, its score for the day is 450 points. I would like to get your ideas and opinion. How do I keep my game challenging and engaging with a good leaderboard? Should I continue accumulating the score for a day? Should I just keep the best score? Thanks!

    Read the article

  • Deferred rendering with both Clockwise and CounterClockwise culling

    - by user1423893
    I have a deferred rendering system that works well with objects that appear solid and drawn using CounterClockwise culling. I have a problem with Clockwise culled objects that are supposed to represent hollow that display their inside faces only. The image below shows a CounterClockwise culled object (left) Clockwise culled object (right). The Clockwise culled object faces display what would be displayed on the CounterClockwise face. How can I get the lighting to light the inner faces for Clockwise culled objects and continue lighting the outer CounterClockwise faces as normal? My lighting method is below private void DeferredLighting(GameTime gameTime) { // Set the render target for the lights game.GraphicsDevice.SetRenderTarget(lightMap); // Clear the render target to (0, 0, 0, 0) game.GraphicsDevice.Clear(Color.Transparent); // Set the render states game.GraphicsDevice.BlendState = BlendState.Additive; game.GraphicsDevice.DepthStencilState = DepthStencilState.None; game.GraphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; // Set sampler state to Point as the Surface type requires it in XNA 4.0 game.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; // Set the camera properties for all lights BaseLight.SetCameraProperties(game.ActiveCamera); // Draw the lights int numLights = lights.Count; for (int i = 0; i < numLights; ++i) { if (lights[i].Diffuse.W > 0f) { lights[i].Render(gameTime, ref normalMap, ref depthMap, ref sgrMap); } } // Resolve the render target game.GraphicsDevice.SetRenderTarget(null); } I have tried adjusting the render states but no combination works for both objects.

    Read the article

  • How does sprite customization in 2D games work?

    - by Alouette
    I´m working on the design of a new game concept at the moment and I would like to know how to handle a customization of sprites. (In 2D that is, hence the topic.) This is my scenario: The player will have a tower containing 3 floors (or more). Each floor can be replaced by another "piece", i.e. a blue floor, a fire floor, a stone floor. With the little knowledge of game development I have, creating a sprite for each possible combination is probably not a good idea, since the size of the game file will be HUGE. So, how does developers solve this? Do you put a standard position and just replace the sprite itself? Any advice or information about this would be great. Regards.

    Read the article

  • HTML5 Canvas Converting between cartesian and isometric coordinates

    - by Amir
    I'm having issues wrapping my head around the Cartesian to Isometric coordinate conversion in HTML5 canvas. As I understand it, the process is two fold: (1) Scale down the y-axis by 0.5, i.e. ctx.scale(1,0.5); or ctx.setTransform(1,0,0,0.5,0,0); This supposedly produces the following matrix: [x; y] x [1, 0; 0, 0.5] (2) Rotate the context by 45 degrees, i.e. ctx.rotate(Math.PI/4); This should produce the following matrix: [x; y] x [cos(45), -sin(45); sin(45), cos(45)] This (somehow) results in the final matrix of ctx.setTransform(2,-1,1,0.5,0,0); which I cannot seem to understand... How is this matrix derived? I cannot seem to produce this matrix by multiplying the scaling and rotation matrices produced earlier... Also, if I write out the equation for the final transformation matrix, I get: newX = 2x + y newY = -x + y/2 But this doesn't seem to be correct. For example, the following code draws an isometric tile at cartesian coordinates (500, 100). ctx.setTransform(2,-1,1,0.5,0,0); ctx.fillRect(500, 100, width*2, height); When I check the result on the screen, the actual coordinates are (285, 215) which do not satisfy the equations I produced earlier... So what is going on here? I would be very grateful if you could: (1) Help me understand how the final isometric transformation matrix is derived; (2) Help me produce the correct equation for finding the on-screen coordinates of an isometric projection. Many thanks and kind regards

    Read the article

  • error in implementing static files in django

    - by POOJA GUPTA
    my settings.py file:- STATIC_ROOT = '/home/pooja/Desktop/static/' # URL prefix for static files. STATIC_URL = '/static/' # Additional locations of static files STATICFILES_DIRS = ( '/home/pooja/Desktop/mysite/search/static', ) my urls.py file:- from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^search/$','search.views.front_page'), url(r'^admin/', include(admin.site.urls)), ) urlpatterns += staticfiles_urlpatterns() I have created an app using django which seraches the keywords in 10 xml documents and then return their frequency count displayed as graphical representation and list of filenames and their respective counts.Now the list has filenames hyperlinked, I want to display them on the django server when user clicks them , for that I have used static files provision in django. Hyperlinking has been done in this manner: <ul> {% for l in list1 %} <li><a href="{{STATIC_URL}}static/{{l.file_name}}">{{l.file_name}}</a{{l.frequency_count</li> {% endfor %} </ul> Now when I run my app on the server, everything is running fine but as soon as I click on the filename, it gives me this error : Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: ^search/$ ^admin/ ^static\/(?P<path>.*)$ The current URL, search/static/books.xml, didn't match any of these. I don't know why this error is coming, because I have followed the steps required to achieve this. I have posted my urls.py file and it is showing error in that only. I'm new to django , so Please help

    Read the article

  • Approaching this case with ABDPDF

    - by Younes
    We have ABCPDF 8 available to work with for this case. We need to rebuild an existing PDF with markup and texts in it with text that comes from a CMS. What we basicly want to do is use an existing PDF and replace blocks of text and images with the ones our content editors specify in Sitecore. I have been looking at the documentation of ABCPDF but it's kind of overwelming at this point, cause it's the first time I'm trying to do anything with dynamically building a PDF. I found that it's possible to read text from an existing PDF document using the .GetText(""); method. This Method will accept 4 parameters and I've tried the SVG one (returns xml). When I load the xml in an XmlDocument I find that alot of textblocks which I assumed to be one block of text is split up in different parts. For example: <text xml:space="preserve" x="215.4312" y="48.9478" font-size="9" font-family="Arial-BoldMT" fill="rgb(237, 106, 0)" textLength="94.032" transform="translate(215.4312, 48.9478) translate(-215.4312, -48.9478)">wijkverpleegkundige?</text> <text xml:space="preserve" x="215.4312" y="61.9438" font-size="9" font-family="ArialMT" textLength="5.652" transform="translate(215.4312, 61.9438) translate(-215.4312, -61.9438)">&#8226;&#9;</text> <text xml:space="preserve" x="223.9362" y="61.9438" font-size="9" font-family="ArialMT" textLength="49.509" transform="translate(223.9362, 61.9438) translate(-223.9362, -61.9438)">Lichamelijke</text> <text xml:space="preserve" x="273.4452" y="61.9438" font-size="9" font-family="ArialMT" textLength="2.502" transform="translate(273.4452, 61.9438) translate(-273.4452, -61.9438)">&#9;</text> <text xml:space="preserve" x="275.9472" y="61.9438" font-size="9" font-family="ArialMT" textLength="32.013" transform="translate(275.9472, 61.9438) translate(-275.9472, -61.9438)">controle</text> <text xml:space="preserve" x="307.9602" y="61.9438" font-size="9" font-family="ArialMT" textLength="2.502" transform="translate(307.9602, 61.9438) translate(-307.9602, -61.9438)">&#9;</text> <text xml:space="preserve" x="310.4622" y="61.9438" font-size="9" font-family="ArialMT" textLength="10.008" transform="translate(310.4622, 61.9438) translate(-310.4622, -61.9438)">op</text> <text xml:space="preserve" x="320.4702" y="61.9438" font-size="9" font-family="ArialMT" textLength="2.502" transform="translate(320.4702, 61.9438) translate(-320.4702, -61.9438)">&#9;</text> <text xml:space="preserve" x="322.9722" y="61.9438" font-size="9" font-family="ArialMT" textLength="42.021" transform="translate(322.9722, 61.9438) translate(-322.9722, -61.9438)">bloeddruk,</text> <text xml:space="preserve" x="364.9932" y="61.9438" font-size="9" font-family="ArialMT" textLength="2.502" transform="translate(364.9932, 61.9438) translate(-364.9932, -61.9438)">&#9;</text> <text xml:space="preserve" x="223.9362" y="74.9398" font-size="9" font-family="ArialMT" transform="translate(223.9362, 74.9398) translate(-223.9362, -74.9398)" My first idea was to get all blocks of text and just replace them with my own text that comes from the CMS, but this doesn't seem to be the way to go. I'm now completely lost and don't know how to approach this issue. Is there any way to get the following XML to be accessible in objects in ABCPDF or am I doing things wrong? What will be the best approach on making this happen?

    Read the article

  • Connecting to SQL Database from another computer

    - by yomayne
    I'm new to SQL Server, and have been following this tutorial I carefully followed all the steps, but when I try to connect to the database from the other computer, I get the error "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452)" What steps do I need to take to fix this? Thanks (I'm using SQL Server 2008 R2 on both the machines)

    Read the article

  • Is this possible? Overflow-y:visible with overflow-x:scroll/auto

    - by Kostrzak
    We have a problem in our team which we cannot solve :/ We made our own Grid control. When you click on the icon next to column name, the pop-up div (call it divFilter) appears and you can set filtering there. There can be dynamically generated div for each column so we can have f.e 5 divFilters in 5 different places. It works, but the only problem is that when there is for example 1-2 records on the Grid, the pop-up div will be displayed under horizontal scroll of div. We've tried with z-index but it looks like that won't work. We can set overflow:visible but we also need that horizontal scroll(our grids have up to 50 columns). We thought that we can solve it buy setting overflow-y visible and overflow-x:scroll but according to our tests and that page: http://www.brunildo.org/test/Overflowxy2.html it isn't possible(for IE7,IE8). I've also found this similar question CSS overflow-y:visible, overflow-x:scroll ,but our pop-up div must be position:absolute, because we need to position them under columns. Any ideas or workaround to it? Is it even possible to set it only with CSS without using Javascript(for dynamically changing gridview hight etc.). Thanks!!

    Read the article

  • user_objects oracle

    - by mysticfalls
    I would just like to ask what is the difference between user_constraints and user_objects. I have this two database. I run a script on both DB that resulted a unique constraint error. To solve the problem I delete the constraint on user_constraint table for both DB. After that DB1 run without error.. DB2 however failed, I checked the user_constraint for both db and the constraints was deleted. I was asked to check the user_objects.. and found that DB2 has that same constraint_name as the object_name in user_objects table.. Any info regarding their relationship, use, similarites, etc will be appreciated ... Thanks..

    Read the article

  • Android Round Button and Spinner inside Activity Group

    - by vaishali
    I have a Spinner and 2 buttons in an Activity Group. I want to apply rounded corner to the buttons. I have created shape xml resource file for round button in Android. I have assigned this resource file as background to the button while creating the button in Layout. But the change is not reflected after executing the application. I have set the ContentView for that screen as : setContentView(LayoutInflater.from(getParent()).inflate(R.layout.textmessage,null)); This has to be done to make spinner work in an Activity Group. How can I make the Button as round corner in an Activity Group having Spinner? Any help would be appreciated. Thanks in Advance.

    Read the article

  • Add up values from a text file

    - by Stanley
    Hi Guys I have a text file that contains Amounts at Substring (34, 47) of each line. I need to sum Up all the Values to the End of the File. I have this code that I had started to build but I do not know how to proceed from here: public class Addup { /** * @param args the command line arguments */ public static void main(String[] args) throws FileNotFoundException, IOException { // TODO code application logic here FileInputStream fs = new FileInputStream("C:/Analysis/RL004.TXT"); BufferedReader br = new BufferedReader(new InputStreamReader(fs)); String line; while((line = br.readLine()) != null){ String num = line.substring(34, 47); double i = Double.parseDouble(num); System.out.println(i); } } } The output is like this: 1.44576457E4 2.33434354E6 4.56875685E3 The Amount is in two decimal Places and I need the result also in the Two decimal Places. What Is the Best way to achieve this?

    Read the article

  • Android png images big in memory

    - by taivo
    i have an application in android that has an imageflipper. Problem is, after about 8 images loaded to memory, i get an out of memory error. Well, i tried to do dynamic image loading, so that if the user flips 2 images, i'll load next 2 to memory and delete 2 first ones. It kind of works, but it ugly and i have trouble when user flips images back(imageflipper.showprevious()), i can't really shift all images and place new images to the beginning. My question is, is there a better way to do this kind of stuff? Resizing images didn't really help.

    Read the article

  • qmake library reordering

    - by user1095108
    I put this into a qmake file: QTPLUGIN += component LIBS += -L../lib -lmodule -lcomponent -lnetworking But qmake reorders the libraries behind my back: g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro -o testb .obj/constants.o .obj/main.o .obj/qrc_application.o -L/usr/lib -L../lib -lmodule -lnetworking -lcomponent -lQtGui -lQtNetwork -lQtCore -lpthread Probably because component is a static plugin. But it has a static dependency on the networking library and hence the reordering causes a link error. It is a static dependency and hence is ok in my opinion. How to work around this? I'm using qt 4.8.1.

    Read the article

  • Loading a CSV file using jQuery GET returns the header but no data

    - by Cees Meijer
    When reading a CSV file from a server using the jQuery 'GET' function I do not get any data. When I look at the code using FireBug I can see the GET request is sent and the return value is '200 OK'. Also I see that the header is returned correctly so the request is definitely made, and data is returned. This is also what I see in Wireshark. Here I see the complete contents of the CSV file is returned as a standard HTTP response. But the actual data is not there in my script. Firebug shows an empty response and the 'success' function is never called. What could be wrong ? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>New Web Project</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="jquery.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> var csvData; $(document).ready(function() { $("#btnGET").click(function() { csvData = $.ajax({ type: "GET", url: "http://www.mywebsite.com/data/sample_file.csv", dataType: "text/csv", success: function () { alert("done!"+ csvData.getAllResponseHeaders()) } }); }); }) </script> </head> <body> <h1>New Web Project Page</h1> <button id="btnGET">GET Data</button> </body> </html>

    Read the article

  • Json / Jsonp not connecting to php (Phonegap + jquerymobile)

    - by Madhulika Mukherjee
    I am trying to make - an android WEB application with phonegap layout with JqueryMobile What Im doing - An html form that takes ID, name, and address as input 'Serialize's this data using ajax makes a json object out of it Should send it to a file called 'connection.php' Where, this data is put into a database (MySql) Other details - My server is localhost, Im using xampp I have already created a database and table using phpmyadmin The problem - My html file, where my json object is created, does not connect to the php file which is hosted by my localhost Here is my COMPLETE html file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <!-- Change this if you want to allow scaling --> <meta name="viewport" content="width=default-width; user-scalable=no" /> <meta http-equiv="Content-type" content="text/html;charset=utf-8"> <title>Trial app</title> <link rel="stylesheet" href="thestylesheet.css" type="text/css"> <script type="text/javascript" charset="utf-8" src="javascript1.js"></script> <script type="text/javascript" charset="utf-8" src="javascript2.js"></script> <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script> <script> $(document).ready(function () { $("#btn").click( function() { alert('hello hello'); $.ajax({ url: "connection.php", type: "POST", data: { id: $('#id').val(), name: $('#name').val(), Address: $('#Address').val() }, datatype: "json", success: function (status) { if (status.success == false) { alert("Failure!"); } else { alert("Success!"); } } }); }); }); </script> </head> <body> <div data-role="header"> <h1>Heading of the app</h1> </div><!-- /header --> <div data-role="content"> <form id="target" method="post"> <label for="id"> <input type="text" id="id" placeholder="ID"> </label> <label for="name"> <input type="text" id="name" placeholder="Name"> </label> <label for="Address"> <input type="text" id="Address" placeholder="Address"> </label> <div id="btn" data-role="button" data-icon="star" data-theme="e">Add record</div> <!--<input type="submit" value="Add record" data-icon="star" data-theme="e"> --> </form> </div> </body> </html> And here is my 'connection.php' hosted by my localhost <?php header('Content-type: application/json'); $server = "localhost"; $username = "root"; $password = ""; $database = "jqueryex"; $con = mysql_connect($server, $username, $password); if($con) { echo "Connected to database!"; } else { echo "Could not connect!"; } //or die ("Could not connect: " . mysql_error()); mysql_select_db($database, $con); /* CREATE TABLE `sample` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, `Address` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) ) */ $id= json_decode($_POST['id']); $name = json_decode($_POST['name']); $Address = json_decode($_POST['Address']); $sql = "INSERT INTO sample (id, name, Address) "; $sql .= "VALUES ($id, '$name', '$Address')"; if (!mysql_query($sql, $con)) { die('Error: ' . mysql_error()); } else { echo "Comment added"; } mysql_close($con); ?> My doubts: No entry is made in my table 'sample' when i view it in phpmyadmin So obviously, i see no success messages either I dont get any errors, not from ajax and neither from the php file. Stuff Im suspecting: Should i be using jsonp instead of json? Im new to this. Is there a problem with my php file? Perhaps I need to include some more javascript files in my html file? I assume this is a very simple problem so please help me out! I think there is just some conceptual error, as i have only just started with jquery, ajax, and json. Thank you.

    Read the article

  • Screenshot Of webView with full image quality

    - by iPhone Developer
    I am trying to take a screenshot of a webView and change it to PDF. I have used this method: http://www.ioslearner.com/wp-content/uploads/2012/01/HtmlToPdfDemo.zip I mean the code in this project. It works fine for iPad but it doesn't covers full width for iPhone. I have used -sizeThatFits: for the webView, but that gives unreadable images for large html pages. I have searched a lot but all I could find out was in Android.. not iPhone. Please help me.Thanks!

    Read the article

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