Search Results

Search found 8664 results on 347 pages for 'lost with coding'.

Page 66/347 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • calling calloc - memory leak valgrind

    - by Mike
    The following code is an example from the NCURSES menu library. I'm not sure what could be wrong with the code, but valgrind reports some problems. Any ideas... ==4803== 1,049 (72 direct, 977 indirect) bytes in 1 blocks are definitely lost in loss record 25 of 36 ==4803== at 0x4C24477: calloc (vg_replace_malloc.c:418) ==4803== by 0x400E93: main (in /home/gerardoj/a.out) ==4803== ==4803== LEAK SUMMARY: ==4803== definitely lost: 72 bytes in 1 blocks ==4803== indirectly lost: 977 bytes in 10 blocks ==4803== possibly lost: 0 bytes in 0 blocks ==4803== still reachable: 64,942 bytes in 262 blocks Source code: #include <curses.h> #include <menu.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #define CTRLD 4 char *choices[] = { "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Choice 5", "Choice 6", "Choice 7", "Exit", } ; int main() { ITEM **my_items; int c; MENU *my_menu; int n_choices, i; ITEM *cur_item; /* Initialize curses */ initscr(); cbreak(); noecho(); keypad(stdscr, TRUE); /* Initialize items */ n_choices = ARRAY_SIZE(choices); my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); for (i = 0; i < n_choices; ++i) { my_items[i] = new_item(choices[i], choices[i]); } my_items[n_choices] = (ITEM *)NULL; my_menu = new_menu((ITEM **)my_items); /* Make the menu multi valued */ menu_opts_off(my_menu, O_ONEVALUE); mvprintw(LINES - 3, 0, "Use <SPACE> to select or unselect an item."); mvprintw(LINES - 2, 0, "<ENTER> to see presently selected items(F1 to Exit)"); post_menu(my_menu); refresh(); while ((c = getch()) != KEY_F(1)) { switch (c) { case KEY_DOWN: menu_driver(my_menu, REQ_DOWN_ITEM); break; case KEY_UP: menu_driver(my_menu, REQ_UP_ITEM); break; case ' ': menu_driver(my_menu, REQ_TOGGLE_ITEM); break; case 10: { char temp[200]; ITEM **items; items = menu_items(my_menu); temp[0] = '\0'; for (i = 0; i < item_count(my_menu); ++i) if(item_value(items[i]) == TRUE) { strcat(temp, item_name(items[i])); strcat(temp, " "); } move(20, 0); clrtoeol(); mvprintw(20, 0, temp); refresh(); } break; } } free_item(my_items[0]); free_item(my_items[1]); free_menu(my_menu); endwin(); }

    Read the article

  • What happens to running processes when I lose a remote connection to a *nix box?

    - by David Marble
    I occasionally lose my remote SSH connection to my VPS. I use screen for long-running processes, but am wondering what happens to the processes I had running aside from those run within a screen session if I lose the connection to the box. When I re-establish a connection to the box, what happened to the bash and sshd processes that were running when I lost the connection? Today I lost connection repeatedly and noticed many more bash and sshd processes than usual. If there are processes hanging around, do I need to kill them? How could I determine which processes were abandoned from my previous session? Thanks for any replies!

    Read the article

  • Mass renaming, *nix version

    - by Paolo B.
    I was looking for a way to rename a huge number of similarly-named files, much like this one (a Windows-related question) except that I'm using *nix (Ubuntu and FreeBSD, separately). Just to sum up, while using the shell (Bash, CSH, etc.) how do I mass-rename a number of files such that, for example, the following files: Beethoven - Fur Elise.mp3 Beethoven - Moonlight Sonata.mp3 Beethoven - Ode to Joy.mp3 Beethoven - Rage Over the Lost Penny.mp3 will be renamed like these? Fur Elise.mp3 Moonlight Sonata.mp3 Ode to Joy.mp3 Rage Over the Lost Penny.mp3 The reason I want to do this is that these collection of files will go under a directory named "Beethoven" (i.e. the filenames' prefix), and having this information on the filename itself will be redundant.

    Read the article

  • Frustration with superuser.com user interface (please migrate this to "meta")

    - by Randolf Richardson
    Can someone please migrate this question to "meta" for me? I'm unable to post there while I wait for OpenID to fix my password problems. Thanks. I'm having problems with superuser.com's interface -- when I provide an answer to a question, sometimes the buttons get locked and then I find out that the question was migrated. Usually I can go back and copy-and-paste my answer at whatever site it goes to, but on occasion my answer is lost and I have to re-type it. This is very time-consuming, and makes it quite frustrating to use the system. In addition, I find that I'm wasting a lot of time dealing with having to re-register on the other sites. My suggestion is to not de-activate the "Submit answer" button but to just forward that along to the migrated site automatically, thus ensuring that answers that people put a lot of effort into don't get lost. Thanks in advance.

    Read the article

  • Script to Change Pronunciations on Mac

    - by user106990
    So I've been looking around on how to change how my mac says things, I have found my answer but what I need is some help with the coding. Here is what I want to do: Create a list of word pairs. Create a script that substitutes words in its parameter list according to your word-pairs list, and passes the modified parameter list to "/usr/bin/say". I This is a quick copy of http://superuser.com/q/170041/106990 and I have very little coding know how and would like some help. I don't care in what language. Any help would be really appreciated. Thanks in advanced.

    Read the article

  • How to recover a MySQL InnoDB table?

    - by Kau-Boy
    When I try to launch the Plesk administration page of you server I get the following error: ERROR: PleskMainDBException MySQL query failed: MySQL server has gone away The MySQL Server is working well. Although it seems that the plesk database is somehow corrupt and any action on this database results in a restart of the mysql process, so even queries to other databases on the same MySQL server will be lost. If I try to connect to the plesk database using phpMyAdmin, I can only see the number of tables, the database had originally. But I am not able to open the tables listing. As soon as I try it, the mysql process crashes again. Trying to connect to the database using ssh works. I can even run a SELECT statement against any table an get a result. I don't know if it is an plesk error or an error of the psa database or even the MySQL server. Can you give me any tips on how to recover the plesk system. Should I try to repair the Plesk installation before. And if so, how can I do it and will all my settings get lost doing it? EDIT: Trying to dump the database, I get the following error: mysqldump: Got error: 2013: Lost connection to MySQL server during query when using LOCK TABLES EDIT: I could find out, that the table 'data_bases' is responsible for the crash of the MySQL server process. But trying to repair it using a REPAIR TABLE statement doesn't work. EDIT: I now dropped the whole database and restored it from a dump. But why I try to recover the data_bases table I get the following error: ERROR 1005 (HY000) at line 24: Can't create table './psa/data_bases.frm' (errno: 121) I am not able to create the table again. Somewhere in the MySQL system there is still some information about this table. I tested the same thing locally. If I just delete the table files and then try to create the table again I get the same error. If I drop the table through MySQL, I can create the table again afterwards. But trying to drop the table using MySQL the whole MySQL system crashed. Is there any way to solve that issue?

    Read the article

  • Iphone 3GS to laptop Syncing

    - by Chris
    I use my Iphone calender to store all my appointments and customer information etc rather than my Outlook calender on my laptop most of the time. To the best of my knowledge I have never lost any info before, but after syncing the two devices today my calender is now empty on both. I had thought that syncing would mean taking the information on both devices, amalgamating it and populating both devices with the same info? Two questions: a) Is there anyway of retrieving the lost information? (or am I sunk?) b) Is there any way of averting such disaster in the future? Whilst I suspect that "Read the manual - Idiot!" would be the correct response, any help really is greatly appreciated!

    Read the article

  • to measure throughput of testing device connect to server via AP

    - by samantha
    Description of project- I have a test tool to which DUT connects. The test tool has an access point in it and once DUT get connected to it via mac address we check RSSI and some other features of WiFi of DUT. Now I am wondering is there is any way I can measure throughput of Device under test via mac address of DUT from server side. Test-tool has LINUX fedora 11 in it and major coding is done in c/C++ and json command. Previously, I have tried to install ftp server on test-tool and DUT can connect to it and we can measure the throughput or data transfer rate, but this is not feasible solution as it requires lot of intervention from DUT. What I am interested in is 1) To run some script on server side /test tool and it gives me throughput of bandwidth of connected device may be via mac address of DUT OR 2) Server script transfer some files/packets to DUT and we can measure the throughput. Coding is not a major challenge at this stage , I just need some tool which requires minimum intervention from DUT.

    Read the article

  • postfix smtps issue

    - by DavidC
    Im currently experiencing the following issue with postfix over ssl (smtps) Apr 7 13:43:55 server88-208-248-147 postfix/smtpd[5777]: connect from xxxxxxxxxxxxxxx[xxx.xxx.xxx.xxx] Apr 7 13:45:09 server88-208-248-147 postfix/smtpd[5777]: lost connection after UNKNOWN from xxxxxxxxxxxxxxx[xxx.xxx.xxx.xxx] Apr 7 13:45:09 server88-208-248-147 postfix/smtpd[5777]: disconnect from xxxxxxxxxxxxxxx[xxx.xxx.xxx.xxx] my main.cf is as follows: smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_use_tls = yes smtp_use_tls = yes smtpd_tls_auth_only = no smtpd_tls_CAfile = /etc/postfix/caroot.crt smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_tls_loglevel = 1 when accessing smtp and running start tls i get the following: # telnet xxxxxxxxxxxxxxx 25 Trying xxxxxxxxxxxxxxx... Connected to xxxxxxxxxxxxxxx . Escape character is '^]'. 220 xxxxxxxxxxxxxxx ESMTP Postfix ehlo localhost 250-xxxxxxxxxxxxxxx 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN STARTTLS 220 2.0.0 Ready to start TLS please help as i'm lost of places to look now. os is Ubuntu 10.4 and the SSL is a wildcard SSL, imap/pop and apache work flawlessly with the same certificate.

    Read the article

  • strategy /insights for avoiding document content loss due to encryption

    - by pbernatchez
    I'm about to encourage a group of people to begin using S-Mime and GPG for digital signatures and encryption. I foresee a nightmare of encrypted documents which can no longer be recovered because of lost keys. The thorniest issue is archiving. The natural way to preserve privacy in an archive is to archive the encrypted document. But that opens us up to the risk of a lost key when time comes to unarchive a document, or a forgotten password. After all it will be a long way in the future. This would be equivalent to having destroyed the document. First thought is archiving keys with documents, but that still leaves the forgotten pass phrase. Archiving the passphrase too would be tantamount to archiving in the clear. No privacy. What approaches do you use? What insights can you offer on the issue?

    Read the article

  • Open application in background without losing current window focus. Fedora 17, Gnome 3

    - by Ishan
    I'm running a script in the background which loads an image with feh depending on which application is currently in focus. However, whenever the script opens the image, window focus is lost to feh. I was able to circumvent this by using xdotool to switch back to the application that was originally in focus, but this introduces a short annoying period of time where the focus is switched from feh to the application. My question is this: is there any way to launch feh in the background such that window focus is NOT lost? System: Fedora 17, Gnome 3, Bash Thanks a ton!

    Read the article

  • How to setup an Openvpn server with two gateways to internet

    - by fourat
    I have an openvpn server behind two wan interfaces: eth1 and eth2 where eth1 is the default gw and eth2 is where openvpn binds to. The problems my ovpn server is replying back to ovpn client via the default gw (through eth1) and the tcp negociation is lost before establishing any tunnel. Here's what's happening: wan client -----> eth2 ----> openvpn -----> eth1 ----> lost and not delivered back to client Is there a way to tell ovpn to stick on eth2 and consider it for all traffic ?

    Read the article

  • How do i keep a newly started program from taking focus?

    - by Jugglingnutcase
    Say i'm coding in emacs and want to start up a music program. Because it takes too long to start up i go back to coding and type away. When the music application starts up, the focus is stolen (gasp! stolen!) away from emacs and goes to the music application, often mid-thought. Is there any way to keep this from happening and have the newly started application not have focus until i see that it's up and ready to be used? Besides getting rid of my ADD of course. Or getting an impossibly fast computer that can keep up with my mind. i'm using a Windows XP system, but i will soon have a Windows 7 system, and i have Linux at home.

    Read the article

  • Started an application through SSH, command line now gone, what happens next?

    - by Chris Dutrow
    Context: This is a very basic question Using Putty and SSH for the first time to do some serious server setup and run into the situation where I have started a process that I do not want to stop. The process is the gunicorn WSGI HTTP Server (running on Centos 6.3). The command I used to start the process is (as per their Quick Start): gunicorn -w 4 myapp:app At this point in the work session, I have lost the command prompt. This must be such a non-issue that it doesn't even enter into an experienced user's consciousness. But unfortunately at my level of experience, I am left with several fundamental questions: Does the fact that I have lost the command prompt mean that the process is still running? How do I get back to the command prompt without killing the process? How do I come back and monitor the process later? How do I eventually kill the process? Any help is appreciated, thanks so much!

    Read the article

  • Logs show lots of user attempts from unknown IP

    - by rodling
    I lost access to my instance which I host on AWS. Keypairing stopped to work. I detached a volume and attached it to a new instance and what I found in logs was a long list of Nov 6 20:15:32 domU-12-31-39-01-7E-8A sshd[4925]: Invalid user cyrus from 210.193.52.113 Nov 6 20:15:32 domU-12-31-39-01-7E-8A sshd[4925]: input_userauth_request: invalid user cyrus [preauth] Nov 6 20:15:33 domU-12-31-39-01-7E-8A sshd[4925]: Received disconnect from 210.193.52.113: 11: Bye Bye [preauth] Where "cyrus" is changed by hundreds if not thousands of common names and items. What could this be? Brute force attack or something else malicious? I traced IP to Singapore, and I have no connection to Singapore. May thought is that this was a DoS attack since I lost access and server seemed to stop working. Im not to versed on this, but ideas and solutions for this issue are welcome.

    Read the article

  • LVM vs RAID0 vs RAID "linear" - Combine 2 disks as one, data recovery?

    - by leto
    Hi there, given two 2TB USB external disks that have to be combined to one 4TB volume and formatted with one big Filesystem (XFS), I have a small question to ask. Does LVM provide better Data recovery, should one disk be unplugged/damaged by being able to recover the data of the still working disk or is everything lost? I would appreciate a solution where only the data of one disk is lost and I can recover the content of the other with the usual filesystem/lvm/raid tools. Is that possible with LVM or RAID "linear"? This is for storing unimportant files that can be retrieved from backup, but I want to save time :) Thank you in advance

    Read the article

  • MS 2008 R2 Drops Remote Desktop Sessions in 10 seconds or less every time

    - by mike42
    I'm adding a new 64-bit server to our domain. Everything seems fine except when accessing the machine using remote desktop, after a few seconds the connection is lost. The error message is "This computer can't connect to the remote computer." "Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator." A similar result with Telnet on port 3389. I am able to connect but if I hit a key the connection to host lost. The event log shows the successful login. No errors. Any ideas?

    Read the article

  • What are the reasons why outlook looses configurations?

    - by jnroche
    Can't seem to establish any logic why outlook suddenly looses its profile coniguration settings intermittently. I work for an IT Contact Centre but it hurts when someone asks me why they loose their outlook profiles suddenly, and some most of the time. I know there are lots of reasons but I'm not sure which ones are the best. Could it be that the PC in a hurge corporate organization will not be connected to the network properly so the profile gets corrupted for outlook? But they don't usually shut down the PC after office hours due to the fact that its a 24 hours operations. On top of that, when users are migrated to Windows 7 / Office 2010 and then logs on to this pc, then opens outlook, then logs off then goes back to a Windows XP PC and opens outlook 2003 the profile is again lost. Again why is this? Is there anyone out there whose facing same connection/outlook profile issues getting lost for no apparent reason?

    Read the article

  • What popular "best practices" are not always best, and why?

    - by SnOrfus
    "Best practices" are everywhere in our industry. A Google search on "coding best practices" turns up nearly 1.5 million results. The idea seems to bring comfort to many; just follow the instructions, and everything will turn out fine. When I read about a best practice - for example, I just read through several in Clean Code recently - I get nervous. Does this mean that I should always use this practice? Are there conditions attached? Are there situations where it might not be a good practice? How can I know for sure until I've learned more about the problem? Several of the practices mentioned in Clean Code did not sit right with me, but I'm honestly not sure if that's because they're potentially bad, or if that's just my personal bias talking. I do know that many prominent people in the tech industry seem to think that there are no best practices, so at least my nagging doubts place me in good company. The number of best practices I've read about are simply too numerous to list here or ask individual questions about, so I would like to phrase this as a general question: Which coding practices that are popularly labeled as "best practices" can be sub-optimal or even harmful under certain circumstances? What are those circumstances and why do they make the practice a poor one? I would prefer to hear about specific examples and experiences.

    Read the article

  • What do we call to "non-programmers" ? ( Like "muggle" in HP ) [closed]

    - by OscarRyz
    Sometimes I want to refer to people without coding powers as Muggles. But it doesn't quite feel right. Gamers have n00b ( but still a n00b has some notion of gaming ) I mean, for all those who Windows in the only OS in the world ( what's an OS ? would they ask ) For project manager who can't distinguish between excel and a database. For those who exclaim "Wooow! when you show them the ctrl-right click to see the webpage source code. What would be a good word to describe to these "persons without lack of coding ability?" Background I didn't mean to be disrespectful with ordinary people. It's just, sometimes it drives me nuts seeing coworkers struggling trying to explain to these "people" some concept. For instance, recently we were asked, what a "ear" was (in Java). My coworker was struggling on how to explain what is was, and how it differ from .war, .jar, etc. and talking about EJB's application server, deployment etc, and our "people"1 was like o_O. I realize a better way to explain was "Think about it as an installer for the application, similar to install.exe" and he understood immediately. This is none's fault, it is sometimes our "poeple" come from different background, that's it. Is our responsibility to talk at a level they can understand, some coworkers, don't get it and try very hard to explain programming concepts ( like the source code in the browser ). But I get the point, we I don't need to be disrespectful. ... But, I'm considering call them pebkac's 1As suggested

    Read the article

  • OTN Developer Days (Review) - San Juan, PR - April 29, 2010

    - by dana.singleterry
    A quick update on the San Juan, PR event. First off it was a great success with the Keynote audience of 200+. Mickey Ralat, Managing Director Oracle Caribbean, kicked off the event with a quick introduction followed by me delivering the Keynote Message - The Fusion Development Platform which is the first session in the regular OTN DD events that we run in North America. Following this session was a partner, SDT, basically marketing their services which covers the Oracle stack and then following was a very brief presentation on APEX. After this we broke out into the various tracks of Java, (APEX) DB SQL Developer, .NET on Oracle. After the breakout we ran the following sessions in the Java track: Developing with JDBC, UCP, and Java in Database, Rich Internet Applications in Web 2.0, Development Made Simple Without Coding: Developing Reusable Business Components. As expected with the various tracks, we ended up with 50 - 70 in the various sessions within the JAVA track and the audience was very impressed with the power of JDeveloper/ADF 11g and we got a number of questions from licensing cost to upgrading / integrating from Forms. As for the Forms questions, I fielded a number of them and for those I couldn't, I pointed them towards Grants resources which seemed to suffice. They were all, for the most part, unaware of the recent 11.1.1.3 release which occurred only a couple of days prior to the event. The indication was that they were going to download it and use it for the lab that was included on the DVD which we did not have the time for them to even start on. For those of you that attended the event, you can download the updated presentations as follows: Keynote - The Fusion Development Platform Rich Internet Applications in Web 2.0 Development Made Simple Without Coding - Developing Reusable Business Components

    Read the article

  • Silverlight layout hack: Centered content with fixed maxwidth

    - by brainbox
     Today we need to create centered content with fixed maxwidth. It is very easy to implement it for fixed width, but is not clear how to achieve the same for maxwidth.The solution to the problem is Grid with 3 columns: <Grid>      <Grid.ColumnDefenitions>            <ColumnDefenition Width="0.01*" />             <ColumnDefenition Width="0.98*" MaxWidth="1280" />            <ColumnDefenition Width="0.01*" />      </Grid.ColumnDefenitions> </Grid>Huh... like html coding xaml coding is still full of dirty tricks =)

    Read the article

  • Time management and self improvement

    - by Filip
    Hi, I hope I can open a discussion on this topic as this is not a specific problem. It's a topic I hope to get some ideas on how people in similar situation as mine manage their time. OK, I'm a single developer on a software project for the last 6-8 months. The project I'm working on uses several technologies, mainly .net stuff: WPF, WF, NHibernate, WCF, MySql and other third party SDKs relevant for the project nature. My experience and knowledge vary, for example I have a lot of experience in WPF but much less in WCF. I work full time on the project and im curios on how other programmers which need to multi task in many areas manage their time. I'm a very applied type of person and prefer to code instead of doing research. I feel that doing research "might" slow down the progress of the project while I recognize that research and learning more in areas which I'm not so strong will ultimately make me more productive. How would you split up your daily time in productive coding time and time to and experiment, read blogs, go through tutorials etc. I would say that Im coding about 90%+ of my day and devoting some but very little time in research and acquiring new knowledge.

    Read the article

  • Nervous about the "real" world

    - by Randy
    I am currently majoring in Computer Science and minoring in mathematics (the minor is embedded in the major). The program has a strong C++ curriculum. We have done some UNIX and assembly language (not fun) and there is C and Java on the way in future classes that I must take. The program I am in did not use the STL, but rather a STL-ish design that was created from the ground up for the program. From what I have read on, the STL and what I have taken are very similar but what I used seemed more user friendly. Some of the programs that I had to write in C++ for assignments include: a password server that utilized hashing of the passwords for security purposes, a router simulator that used a hash table and maps, a maze solver that used depth first search, a tree traveler program that traversed a tree using levelorder, postorder, inorder, selection sort, insertion sort, bit sort, radix sort, merge sort, heap sort, quick sort, topological sort, stacks, queues, priority queues, and my least favorite, red-black trees. All of this was done in three semesters which was just enough time to code them up and turn them in. That being said, if I was told to use a stack to convert an equation to infix notation or something, I would be lost for a few hours. My main concern in writing this is when I graduate and land an interview, what are some of the questions posed to assess my skills? What are some of the most important areas of computer science that are prevalent in the field? I am currently trying to get some ideas of programs I can write in C++ that interest and challenge me to keep learning the language. A sodoku solver came to mind but am lost as to where to start. I apologize for the rant, but I'm just a wee bit nervous about the future. Any tips are appreciated.

    Read the article

  • How to explain my 5 burnt-out years off to a new employer?

    - by user17332
    Five years ago, I lost my ability to concentrate long-term, and therefore ability to code with professional efficiency. I know why it happened, I understood how it happened, and on top of being able to re-create my calm and thus relaxed focus, I overcame the original (rooted in childhood) reason why my mind tilted on the overall situation back then; My understanding isn't rooted in words that a psychologist told me, I actually grokked them first-hand. I'm pretty much confident to be able to churn out productivity, possibly even more so than pre-burnout. I also never lost my interest in code nor did I stray from trying to get my abilities back; I kept my knowledge up to date (I could always relatively painlessly learn things coding-related, just not apply them) and thus can say that I'm a better developer than before, even if my average LOC-count over those years is abysmally low. On the other hand, now I have a biography that includes more time on the dole than in a job. What would convince you, as an employer, to give my application a chance? I don't believe I should just keep the whole topic out of it.

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >