Daily Archives

Articles indexed Thursday March 22 2012

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

  • Is it possible to run the GNOME user manager from XFCE4?

    - by Chris Moore
    If I run 'gnome-control-center' and click on the 'User Accounts' icon, the gnome-control-center crashes. I built it from source to see what's going on, and it turns out it's doing a if (strcmp(getenv("XDG_CURRENT_DESKTOP"), "GNOME")) in panels/user-accounts/um-password-dialog.c, line 690. I don't have an environment variable "XDG_CURRENT_DESKTOP", so the getenv is returning NULL, and the strcmp is segfaulting Where is XDG_CURRENT_DESKTOP meant to be defined? And shouldn't gnome-control-center check the pointer returned by getenv before passing it to strcmp? Does xfce4 have its own 'User Accounts' tool for creating new users?

    Read the article

  • Gnome 3 panel and menus are all gone?

    - by Hannes
    I am running Ubuntu 11.10 using gnome 3 shell. I have set my pc to automatically log into gnome shell so I do not see the login screen. Today I installed some updates and now the gnome panel is gone. When my pc logs in I ONLY see the background. There are no menus, nothing! Even the exit, minimize and maximise buttons in the top tight corner of the windows are gone. Also, alt+f2 also does not work. Any ideas how to fix this? I have a Nvidia Geforce 7900GTO with the Nvidia proprietary drivers installed. I have also used the recovery mode and removed some packages that apparently were broken. Still does not work.

    Read the article

  • Reboot to fail safe mode when root file system is full

    - by Richard
    I have a system running on a 4GB Nandrive. When the drive is full, Ubuntu will not boot :( and I have to plug in a rescue thumbdrive to delete files. The problem is the hardware is not easily accessible except via network. Is there a sure-fire way to boot Ubuntu, say, to RAM or other means when the disk is full or on any other errors in the normal boot process? In other words, is there a fallback rescue boot mode with networking? Thanks for any advice.

    Read the article

  • 11.10 desktop alerts (volume change and terminal bell) stopped working but all other audio still works

    - by FlabbergastedPickle
    All, My sound works just fine in 11.10 64-bit install on HP dm1-4050 Sandy Bridge notebook (e.g. audio works in Banshee, flash, games, browser, Thunderbird email notification, etc.), but the core desktop notifications (e.g. pressing a tab in a terminal where there is more than one option should trigger a terminal bell, or changing volume using volume keys should be accompanied with the supporting "quack" that the volume app makes) do not work. I've intentionally disabled login sound as explained here on ask ubuntu but even enabling it back makes no difference. These notifications did work before just fine and I am not sure when did the actually stop working but it must've been fairly recently. Only things I did were trying to install some ppa edge xorg drivers for my intel card (a separate issue) but also reverted them all with ppa-purge once I discovered they did not improve anything. Other thing I did was check volume settings with alsamixer and did alsactl store for the soundcard after I did some experimenting with volume settings for PCM (on my laptop PCM at 100% crackles so I had to lower it and make pulseaudio ignore its setting as per ask ubuntu's page). That said, neither of these should have any bearing on the said notifications since the volume is up and they clearly work everywhere else but the core desktop events. The system ready drum sound when Ubuntu boots and user reaches the login screen also does not work. The guest login behaves exactly same as mine. Audio works (including the login sound since I've not disabled it for the guest account), but no quacks when changing the volume or terminal bell sounds... I've tried copying ubuntu sounds to /usr/share/sounds/ as suggested on ask ubuntu and that did not work. I also tried using dconf-editor to check sound theme settings and tried both freedesktop (which is what it was set to) and ubuntu, as suggested on ask ubuntu. This did not work either. I tried purging the ~/.pulse folder and the /tmp/*pulse* entries, rebooting and restarting pulseaudio with -D flag. While audio came back on and behaved just fine in all aspects (e.g. one can adjust volume levels, play music, games, in-browser sound stuff, and other app alerts) except for the system ready drum sound (at the login screen), and any system event (terminal bell and volume change quack sound). It is interesting that the quack sound works inside system settings-sound when adjusting levels there, but it does not when volume is changed via top bar's volume settings... I do recall that at one point yesterday when I was restarting pulseaudio the quacks that accompany volume change did start working but I have no idea what caused that. This was also when I first realized those alerts were not working. After rebooting it was again gone. I did compile my own 3.0.14-rt31 kernel a little while ago as instructed on one of the wiki's for the 11.10 rt kernel. Everything works as before except for the said sound alerts. I am not sure if this began happening since I started using the rt kernel though and yesterday's momentary ability to hear those quacks while changing the volume make me believe that the kernel is not one responsible for this problem. One more thing I can think of is that I used alsoft-conf tool to configure buffering on the OpenAL (due to TA Spring's choppy audio) and changed in there default audio device to ALSA. I also tried reverting it to Pulseaudio as the only allowed output but the bottom part of the Backend tab always reverts to ALSA even when I select Pulseaudio. The pulseaudio does remain as the only active choice on top. This, however, once again does not make any sense in terms of preventing desktop audio alerts when everything else including OpenAL games plays sound just fine... So, there you have it, as verbose as I could make it :-). I tried all I could find on this issue and had no luck so far... Any ideas?

    Read the article

  • Hide debug information when running apps from the command line

    - by tutuca
    Most of the time running a gtk application from the command line it starts dumping debug information to the stdio even though I put them in background. Example: ~$ gedit test.html # and ctrl+z to suspend zsh: suspended gedit .zshrc ~$ bg [1] + continued gedit .zshrc ~$ # do some editing (gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (whoosh), this should not happen! (gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (haystack), this should not happen! I want to note that the error, or warning, changes according to what I'm doing at the moment. The GtkSourceView-WARNING shown here is one of the cases. Anyway... Do you know if it's at all possible to avoid getting that information printed out?

    Read the article

  • How do you enable wobbly windows in ubuntu 11.04 without using compiz?

    - by Tripod Smurf
    I'm curious if there's a way to enable the more fun UI features in Ubuntu 11.04 that were available in previous versions. The effects I'm most curious about is the wobbly windows and the alt tab program switcher that looked like a rolodex. Those things were delightful. I've been reading about the compiz tool and since I'm a pretty noob user, I don't think I want to risk destroying my desktop for a chance to get these effects back. Any help would be appreciated. Thanks

    Read the article

  • How do you setup Postfix/Dovecot/MySQL to not look for local accounts?

    - by thiesdiggity
    I am having an issue with one of my Postfix/Dovecot mail servers and I'm unsure how to fix the problem. I will try to explain it in detail, here it goes: I have an Ubuntu server setup using Virtual hosting with Postfix, Dovecot and MySQL. We have one domain setup as a virtual domain, for this example I am going to use mail.example.com. Under that domain we have one email address. I have another server (MS Exchange) setup using another one of my sub-domains, ex.example.com. The problem is that when I SMTP into the account on mail.example.com and try to send an email to an account on ex.example.com, I get the email returned back to us with an "unknown host" error. Now, I know that the mail.example.com server can resolve the ex.example.com domain because I can ping/dig while SSH'd into it. I can also log into Postfix via Telnet and send an email to an ex.example.com mailbox. I'm guessing that it has something to do with Postfix/Dovecot looking locally for the domain in the virtual domain list because of the tld domain (example.com)? If that's the case, how do I get Postfix/Dovecot to only look locally for the entire URL (mail.example.com) and if it doesn't find it, send it to the correct server by looking up the MX/A records (which I know exist and are setup correctly)? I have been working on this all day and any guidance would be GREATLY appreciated! Thanks for your time!

    Read the article

  • Ralink rt3090 driver installed and wireless doesn't work on Ubuntu 10.04

    - by Marcus Rene
    I have a LG A-410 lap-top (64 bits) with rt 3090 wireless card. Searching the problem I discover that I already have a rt 3090-dkms installed, but my wireless doesn't work. *-network UNCLAIMED description: Network controller product: RT3090 Wireless 802.11n 1T/1R PCIe vendor: RaLink physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 32 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list configuration: latency=0 resources: memory:e5400000-e540ffff

    Read the article

  • How to run Virtualbox on bridged and host-only networks?

    - by ril44
    I wish to run VirtualBox with my Ubuntu laptop on the home network (so the desktop PC can access it through the router) and also be able to ssh into the VirtualBox from host on the go (different network or with no internet). Previously, the only network adapter on the VB instance was a 'bridged connection' adapter. This allowed me to access the internet on the guest VB and for the other computers on the LAN + host to access it. However, whenever I took my laptop off the network, I could no longer access the guest from host. I read that I needed to enable a host-only adapter to access it off the network and a NAT adapter is used to access the internet from guest. My question is can I run a host-only adapter + a NAT adapter alongside a bridged network adapter in VirtualBox? I am confused what I would put inside /etc/hosts? Would I put both IP's (host-only and bridged) with the same servername in /etc/hosts?

    Read the article

  • Changing read-write permissions on my external Seagate hard drive

    - by Anthony_JKenn
    I have an external hard drive (Seagate Free Agent) that I normally download files to. I have a dual boot Ubuntu 11.10 along with Windows 7-64 bit. I can read all of my files in my external HD perfectly, but when I attempt to do a download of a file to this drive, I get an "unable to write because of read only" disk error. When I attempt to change the permissions of the disk through the "Properties" bar, I still get an error that I don't have the proper permissions to change permissions. I have heard of "mounting" the disk, but I am afraid of mistakenly reformatting and destroying all the data that I have currently on that drive. How best should I safely change the permissions on that drive so that I can write and download files to the drive?? The drive is listed under /dev/sdc1.

    Read the article

  • How can I email a vCard to users who are unable to download it?

    - by Zachary Lewis
    I have created vCards for the people in my business, and they are great for users on standard browsers; however, users browsing on a mobile device (notably iPhone) are unable to download and view my vCard. Is there a service that I can direct them to that will allow them to receive an email containing my vCard, or is there a simple way I can set this up myself? I am running my site on WordPress, and initial attempts have failed spectacularly. I'd like for them to be given the option to perform either action, but have the predominant action more prominently visible (probably via user agent detection). Something along the lines of: It looks like you're on an iPhone! It's a bummer they can't download vCards, but if you enter your email address, we'll wrap one up and send it your way! Don't worry, we won't send you junk email. Heck, we don't even save your email address! [email protected] Think you've got it all figured out? Fine, download the vCard instead! If you know of a service or simple-to-implement PHP library (or WordPress plug-in), please let me know! If not, let me know what the best solution to this problem is!

    Read the article

  • Does anyone know anything about .com.au domains?

    - by Paul
    I have a website that allows people to search for instructors. It's currently working in the USA and UK. I'm wanting to start marketing the website to the Australian market, and so have been looking at registering a .com.au domain name. What is the best way about doin this as it doesn't seem particularly simple? Apparently I need an ABN or an Australian company but as I'm not an Australian citizen this presumably would be impossible?

    Read the article

  • How to proxy with apache site from same domain but another port as a subfolder?

    - by myWallJSON
    So I have a problem - I have my main site on apache web server on debian on port 80; I develop a web server (in some C++ or C#) and it currently runs on port 6666. But some people are living under firewalls and can access only port 80. I wonder if it is possible via apache map all requests to say mysite.com:80/6666/url as if they were to mysite.com:6666/url, not map via redirection, but really make apache stream content from my site to user as if it were in some folder?

    Read the article

  • More information about worldwide nodes how to get?

    - by Aubergine
    The context: Six hosts across worldwide were traced over week from UK. Ten thousands of lines to be parsed and analysed. And then I try to find any clue of geographical information and path - from where it jumps where. Then after Austria or Germany(each time different) I have mysterious 62.208.72.6 which in GEO LOC gives me Falklands Islands (which is where my target host is by the way, but before target host I still have 5 other nodes) Then I do whois for this 62.208.72.6 route: 62.208.0.0/16 descr: DE-ECRC-62-208-0-0 origin: AS1273 mnt-by: CW-EUROPE-GSOC source: RIPE # Filtered Why it says Europe now? How to understand this enigma code? I want to confirm more or less whether this is in europe or in falkland islands? But it can't be in FK yet as after next two hosts I get New York? Could you also tell me what does this CW-EUROPE-GSOC abbreviation means. (To preserve your sanity better not google, unless you already know it :-D) And the actual whois for the destination/target host, which completely destroys my head: route: 195.248.193.0/24 descr: HORIZON descr: Cable and Wireless Falkland Islands descr: Via Cable and Wireless Communications UK origin: AS5551 mnt-by: AS5551-MNT source: RIPE # Filtered How is it Via Cable and Wireless Communications UK if two nodes before I was in New York? Thank you guys,

    Read the article

  • How can I host a website on a dynamically-assigned IP address?

    - by nick
    I recently upgraded my internet to the point that it is much faster and more reliable than my current webhost. I would like to move my current domain to be hosted at home, but my IP address is dynamic. As far as I know, I only get a new IP when I restart my modem and or router (which is almost never) or when cable one (my ISP) pushes out a firmware update (rarely). There are a few ways I can see doing this: Convince my ISP to give me a static IP Assign my router my current IP to force a static IP (which might work?) Set my DNS record to my current IP address and update it on the rare occasions that it changes. Obviously I'm hoping that the first one works, but I don't want to pay a lot of extra money (if that's what it takes) to get a static IP address. Which of these options will work most reliably?

    Read the article

  • 3Ds Max is exporting model with more normals than vertices

    - by Delta
    I made a simple teapot with the "Create Standard Primitives" option and exported it as a collada file, ended up with this: < float_array id="Teapot001-POSITION-array" count="1590" < float_array id="Teapot001-Normal0-array" count="9216" For what I know there should be only one normal per vertex, am I wrong? What am I supposed to do with that much normals? Just put them on the normal buffer all at once normally?

    Read the article

  • I can't scroll my tilemap ... HELP!

    - by Sri Harsha Chilakapati
    Hello and I'm trying to make my own game engine in Java. I have completed all the necessary ones but I can't figure it out with the TileGame class. It just can't scroll. Also there are no exceptions. Here I'm listing the code. TileGame.java @Override public void draw(Graphics2D g) { if (back!=null){ back.render(g); } if (follower!=null){ follower.render(g); follower.draw(g); } for (int i=0; i<actors.size(); i++){ Actor actor = actors.get(i); if (actor!=follower&&getVisibleRect().intersects(actor.getBounds())){ g.drawImage(actor.getAnimation().getFrameImage(), actor.x - OffSetX, actor.y - OffSetY, null); actor.draw(g); } } } /** * This method returns the visible rectangle * @return The visible rectangle */ public Rectangle getVisibleRect(){ return new Rectangle(OffSetX, OffSetY, global.WIDTH, global.HEIGHT); } @Override public void update(){ if (follower!=null){ if (scrollHorizontally){ OffSetX = global.WIDTH/2 - Math.round((float)follower.x) - tileSize; OffSetX = Math.min(OffSetX, 0); OffSetX = Math.max(OffSetX, global.WIDTH - mapWidth); } if (scrollVertically){ OffSetY = global.HEIGHT/2 - Math.round((float)follower.y) - tileSize; OffSetY = Math.min(OffSetY, 0); OffSetY = Math.max(OffSetY, global.HEIGHT - mapHeight); } } for (int i=0; i<actors.size(); i++){ Actor actor1 = actors.get(i); if (getVisibleRect().contains(actor1.x, actor1.y)){ actor1.update(); for (int j=0; j<actors.size(); j++){ Actor actor2 = actors.get(j); if (actor1.isCollidingWith(actor2)){ actor1.collision(actor2); actor2.collision(actor1); } } } } } but the problem is that all the actors are working, but it just won't scroll. Help Please.. Thanks in Advance.

    Read the article

  • Distributing an Android game with plugins via the market

    - by Peter Serwylo
    I'm new to Android development, and was wondering how the following could be achieved within the confines of the Android market as a distribution channel: One main application, which handles the main menu, networking, high scores, etc. Several games which can be launched from the main menu, which all work within the same eco system. The main application is not just a pseudo launcher for other games, these different games will share high scores and other achievements/preferences. In a traditional package management system such as apt, pacman or yum, this could be handled quite happily through dependencies. This does not appear to be possible via the Android market. The closest I've seen is when apps scan to check if the required app is installed, and if not, launches the market and asks the user to download the app. This sounds like a very messy solution. It also begs the question, would they download the game (plugin) first, which then downloads the main shell application? Or would they download the main shell application, and when they navigate to a menu item which says "Play game", then it scans for any installed games, and if none exist, redirects to the market? Also, I'm not even sure if it is possible to dig up the package from another application on the device, and start invoking classes from within (e.g. when you want to launch the game (plugin)) A final option is just to have a 3rd component which is a .jar that each game includes, which effectively contains the entire shell application. Then each game would appear to have the same menu, but it would become a nightmare as soon as you want to update the menu component and have to re-release each game. It would be especially worse if other people released games (plugins) based on the same framework and didn't update them. Is there any other options which I haven't thought of? Has anyone else solved this or seen a solution in any apps they've installed (doesn't have to be games)? cheers.

    Read the article

  • Bukkit inventory saving: crashing somewhere

    - by HcgRandon
    I'm working on a command for a bukkit plugin that lets you transfer worlds. In the section about saving the player's inventory, I'm getting a runtime error. My question is: Why is the error happening, and how can I prevent it? The plugin code public void savePlayerInv(Player p, World w){ File playerInvConfigFile = new File(plugin.getDataFolder() + File.separator + "players" + File.separator + p.getName(), "inventory.yml"); FileConfiguration pInv = YamlConfiguration.loadConfiguration(playerInvConfigFile); PlayerInventory inv = p.getInventory(); int i = 0; for (ItemStack stack : inv.getContents()) { //increment integer i++; String startInventory = w.getName() + ".inv." + Integer.toString(i); //save inv pInv.set(startInventory + ".amount", stack.getAmount()); pInv.set(startInventory + ".durability", Short.toString(stack.getDurability())); pInv.set(startInventory + ".type", stack.getTypeId()); //pInv.set(startInventory + ".enchantment", stack.getEnchantments()); //TODO add enchant saveing } i = 0; for (ItemStack armor : inv.getArmorContents()){ i++; String startArmor = w.getName() + ".armor." + Integer.toString(i); //save armor pInv.set(startArmor + ".amount", armor.getAmount()); pInv.set(startArmor + ".durability", armor.getDurability()); pInv.set(startArmor + ".type", armor.getTypeId()); //pInv.set(startArmor + ".enchantment", armor.getEnchantments()); } //save exp if (p.getExp() != 0) { pInv.set(w.getName() + ".exp", p.getExp()); } } The offending line The stack trace complains about line 130, which is this line. pInv.set(startInventory + ".amount", stack.getAmount()); The stack trace 2012-03-21 13:23:25 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'wtp' in plugin Needs v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:461) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:818) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:778) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:761) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:112) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NullPointerException at com.devoverflow.improved.needs.commands.CommandWorldtp.savePlayerInv(CommandWorldtp.java:130) at com.devoverflow.improved.needs.commands.CommandWorldtp.onCommand(CommandWorldtp.java:60) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more

    Read the article

  • Representing heightmaps, on disk and when drawing

    - by gardian06
    This is a conglomeration question when answering please specify which part you are addressing. I am looking at creating a maze type game that utilizes elevation. I have a few features I would like to have, but am unsure as to some of the implementation. I have done work doing fileIO maze generation (using a key to read the file, and then generate the level based on that file), but I am unsure how to think about this with elevation in the mix. I think height maps might be a good approach, but don't know how to represent them effectively. for a height map which is more beneficial XML(containing h[u,v] data and key definition), CSV (item1 is key reference, item2 is elevation), or another approach that I have not thought of yet? When it comes to placing the elevation values themselves what kind of deltah values are appropriate to have it noticeable at about a 60degree angle while not really effecting gravity driven physics (assuming some effect while moving up/down hill)? I am thinking of maybe going to procedural generation at some point, but am wondering if it is practical to have a procedurally generated grid (wall squares possibly same dimensions as the open space squares), or if designing to a thin wall open spaces is better? this decision will effect the amount of work need on the graphics end for uniform vs. irregular walls. EDIT: Game will be a elevation maze shooter. Levels/maps will be mazes with elevation the player has to negotiate. Elevations will have effects on "combat" vision, and movement.

    Read the article

  • iPad javascript scrolling

    - by davids
    I'd like to get the same behaviour of the native javascript scrollTo function in iPad, just attaching a function to the swipe event and scrolling the content a specific number of pixels. That doesn't work in iPad using scrollTo or several different jquery plugins, like scrollTo or iScroll. I think I'm having problems because I'm working with an iframe, as I have another html document in it, with its body divided in columns, but I'm just showing the first one. The point of all this is that, after swiping, it should show the next/prev column, and I tried scrolling the iframe window or the inner's html body, which actually works in chrome, but it doesn't in iPad.

    Read the article

  • Can I use MPI_Probe to probe messsages sent by any collective operation?

    - by takwing
    In my code I have a server process repeatedly probing for incoming messages, which come in two types. One type of the two will be sent once by each process to give hint to the server process about its termination. I was wondering if it is valid to use MPI_Broadcast to broadcast these termination messages and use MPI_Probe to probe their arrivals. I tried using this combination but it failed. This failure might have been caused by some other things. So I would like anyone who knows about this to confirm. Cheers.

    Read the article

  • sequential mandelbrot image creation

    - by visanio_learner
    can anyone tell me what is wrong in this code? i am getting an error in the main function, when i am calling the 'file_write' method function inside the main function, it says 'y' is not declared in this scope, but actually it was an argument that i have passed it in the method function earlier. is it a serious error? #include <stdio.h> #include <stdlib.h> #include <time.h> unsigned int width = 1500; unsigned int height = 1500; unsigned int max_iterations = 30000; unsigned int **color = NULL; double threshold = 4; double min_re = -2.0; double max_re = 1.0; double min_im = -1.2; double max_im = min_im+(max_re-min_re)*height/width; double x_factor = (max_re-min_re)/(width-1); double y_factor = (max_im-min_im)/(height-1); int file_write(int x, int y, double min_re, double max_im, double x_factor, double y_factor) { FILE *fractal = fopen("mandelbrot_imageSequential.ppm","w+"); if(fractal != NULL) { fprintf(fractal,"P6\n"); fprintf(fractal,"# %s\n", "Mandelbrot_imageSequential.ppm"); fprintf(fractal,"%d %d\n", height, width); fprintf(fractal,"255\n"); unsigned int R = 0, G = 0, B = 0; for(unsigned y = 0; y < height; ++y) { double c_im = max_im - y*y_factor; for(unsigned x = 0; x < width; ++x) { double c_re = min_re + x*x_factor; double Z_re = c_re, Z_im = c_im; bool image_inside = true; R = 0, G = 0, B = 0; for(unsigned n=0; n<max_iterations; ++n) { double Z_re2 = Z_re*Z_re, Z_im2 = Z_im*Z_im; if(Z_re2 + Z_im2 > threshold) { image_inside = false; G = n; if(G == 10) { G = 25, R = 10, B = 5; } break; } Z_im = 2 * Z_re * Z_im + c_im; Z_re = Z_re2 - Z_im2 + c_re; } if(image_inside) { putc(R, fractal); putc(G, fractal); putc(B, fractal); } else { putc(R, fractal); putc(G, fractal); putc(B, fractal); } } } fclose(fractal); return 0; } } int main(int argc, char *argv[]) { if(argc != 9) { printf("There is an error in the input given.\n"); return 0; } else { height = atoi(argv[1]); width = atoi(argv[2]); max_iterations = atoi(argv[3]); min_re = atof(argv[4]); max_re = atof(argv[5]); min_im = atof(argv[6]); max_im = atof(argv[7]); threshold = atoi(argv[8]); } color = (unsigned int**)malloc(height*sizeof(unsigned int*)); printf("height = %d\twidth = %d\tmaximum_iterations = %d\tminimum_x-value = %.2f\tmaximum_x-value = %.2f\tminimum_y-value = %.2f\tmaximum_y-value = %.2f\tthreshold_value = %.2f\t\n",height,width,max_iterations,min_re,max_re,min_im,max_im,threshold); int x; for(x = 0; x < height; x++) { color[x] = (unsigned int*)malloc(width*sizeof(unsigned int)); } time_t ts,te; time(&ts); file_write(x,y,min_re,max_im,x_factor,y_factor); time(&te); double diff = difftime(te,ts); printf("Total Time elapsed: %f\n",diff); for(x = 0; x < height; x++) { free(color[x]); } free(color); return 0; }

    Read the article

  • Unable to upload large files on FTP using Apache commons-net-3.1

    - by Nitin
    I am trying to upload the one large file ( more than 8 MB) using storeFile(remote, local) method of FTPClient but it results false.It get uploaded with some extra bytes.Following is the code with Output: public class Main { public static void main(String[] args) { FTPClient client = new FTPClient(); FileInputStream fis = null; try { client.connect("208.106.181.143"); client.setFileTransferMode(client.BINARY_FILE_TYPE); client.login("abc", "java"); int reply = client.getReplyCode(); System.out.println("Received Reply from FTP Connection:" + reply); if(FTPReply.isPositiveCompletion(reply)){ System.out.println("Connected Success"); } client.changeWorkingDirectory("/"+"Everbest"+"/"); client.makeDirectory("ETPSupplyChain5.3-EvbstSP3"); client.changeWorkingDirectory("/"+"Everbest"+"/"+"ETPSupplyChain5.3-EvbstSP3"+"/"); FTPFile[] names = client.listFiles(); String filename = "E:\\Nitin\\D-Drive\\Installer.rar"; fis = new FileInputStream(filename); boolean result = client.storeFile("Installer.rar", fis); int replyAfterupload = client.getReplyCode(); System.out.println("Received Reply from FTP Connection replyAfterupload:" + replyAfterupload); System.out.println("result:"+result); for (FTPFile name : names) { System.out.println("Name = " + name); } client.logout(); fis.close(); client.disconnect(); } catch (SocketException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } o/p: Received Reply from FTP Connection:230 Connected Success 32 /Everbest/ETPSupplyChain5.3-EvbstSP3 Received Reply from FTP Connection replyAfterupload:150 result:false

    Read the article

  • .NET Free memory usage (how to prevent overallocation / release memory to the OS)

    - by Ronan Thibaudau
    I'm currently working on a website that makes large use of cached data to avoid roundtrips. At startup we get a "large" graph (hundreds of thouthands of different kinds of objects). Those objects are retrieved over WCF and deserialized (we use protocol buffers for serialization) I'm using redgate's memory profiler to debug memory issues (the memory didn't seem to fit with how much memory we should need "after" we're done initializing and end up with this report Now what we can gather from this report is that: 1) Most of the memory .NET allocated is free (it may have been rightfully allocated during deserialisation, but now that it's free, i'd like for it to return to the OS) 2) Memory is fragmented (which is bad, as everytime i refresh the cash i need to redo the memory hungry deserialisation process and this, in turn creates large object that may throw an OutOfMemoryException due to fragmentation) 3) I have no clue why the space is fragmented, because when i look at the large object heap, there are only 30 instances, 15 object[] are directly attached to the GC and totally unrelated to me, 1 is a char array also attached directly to the GC Heap, the remaining 15 are mine but are not the cause of this as i get the same report if i comment them out in code. So my question is, what can i do to go further with this? I'm not really sure what to look for in debugging / tools as it seems my memory is fragmented, but not by me, and huge amounts of free spaces are allocated by .net , which i can't release. Also please make sure you understand the question well before answering, i'm not looking for a way to free memory within .net (GC.Collect), but to free memory that is already free in .net , to the system as well as to defragment said memory. Note that a slow solution is fine, if it's possible to manually defragment the large heap i'd be all for it as i can call it at the end of RefreshCache and it's ok if it takes 1 or 2 second to run. Thanks for your help! A few notes i forgot: 1) The project is a .net 2.0 website, i get the same results running it in a .net 4 pool, idem if i run it in a .net 4 pool and convert it to .net 4 and recompile. 2) These are results of a release build, so debug build can not be the issue. 3) And this is probably quite important, i do not get these issues at all in the webdev server, only in IIS, in the webdev i get memory consumption rather close to my actual consumption (well more, but not 5-10X more!)

    Read the article

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