Search Results

Search found 8959 results on 359 pages for 'bad decisions'.

Page 74/359 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • subfig package in latex

    - by Tim
    Hi, When I am using subfig package in latex, it gives some errors: Package subfig Warning: Your document class has a bad definition of \endfigure, most likely \let\endfigure=\end@float which has now been changed to \def\endfigure{\end@float} because otherwise subsequent changes to \end@float (like done by several packages changing float behaviour) can't take effect on \endfigure. Please complain to your document class author. Package subfig Warning: Your document class has a bad definition of \endtable, most likely \let\endtable=\end@float which has now been changed to \def\endtable{\end@float} because otherwise subsequent changes to \end@float (like done by several packages changing float behaviour) can't take effect on \endtable. Please complain to your document class author. (/usr/share/texmf/tex/latex/caption/caption.sty `rotating' package detected `float' package detected ) LaTeX Warning: You have requested, on input line 139, version `2005/06/26' of package caption, but only version `1995/04/05 v1.4b caption package (AS)' is available. ! Undefined control sequence. l.163 \DeclareCaptionOption {listofformat}{\caption@setlistofformat{#1}} How can I solve it? Thanks and regards!

    Read the article

  • Seg Fault when using std::string on an embedded Linux platform

    - by Brad
    Hi, I have been working for a couple of days on a problem with my application running on an embedded Arm Linux platform. Unfortunately the platform precludes me from using any of the usual useful tools for finding the exact issue. When the same code is run on the PC running Linux, I get no such error. In the sample below, I can reliably reproduce the problem by uncommenting the string, list or vector lines. Leaving them commented results in the application running to completion. I expect that something is corrupting the heap, but I cannot see what? The program will run for a few seconds before giving a segmentation fault. The code is compiled using a arm-linux cross compiler: arm-linux-g++ -Wall -otest fault.cpp -ldl -lpthread arm-linux-strip test Any ideas greatly appreciated. #include <stdio.h> #include <vector> #include <list> #include <string> using namespace std; ///////////////////////////////////////////////////////////////////////////// class TestSeg { static pthread_mutex_t _logLock; public: TestSeg() { } ~TestSeg() { } static void* TestThread( void *arg ) { int i = 0; while ( i++ < 10000 ) { printf( "%d\n", i ); WriteBad( "Function" ); } pthread_exit( NULL ); } static void WriteBad( const char* sFunction ) { pthread_mutex_lock( &_logLock ); printf( "%s\n", sFunction ); //string sKiller; // <----------------------------------Bad //list<char> killer; // <----------------------------------Bad //vector<char> killer; // <----------------------------------Bad pthread_mutex_unlock( &_logLock ); return; } void RunTest() { int threads = 100; pthread_t _rx_thread[threads]; for ( int i = 0 ; i < threads ; i++ ) { pthread_create( &_rx_thread[i], NULL, TestThread, NULL ); } for ( int i = 0 ; i < threads ; i++ ) { pthread_join( _rx_thread[i], NULL ); } } }; pthread_mutex_t TestSeg::_logLock = PTHREAD_MUTEX_INITIALIZER; int main( int argc, char *argv[] ) { TestSeg seg; seg.RunTest(); pthread_exit( NULL ); }

    Read the article

  • Why should I prepend my custom attributes with "data-"?

    - by Horace Loeb
    So any custom data attribute that I use should start with "data-": <li class="user" data-name="John Resig" data-city="Boston" data-lang="js" data-food="Bacon"> <b>John says:</b> <span>Hello, how are you?</span> </li> Will anything bad happen if I just ignore this? I.e.: <li class="user" name="John Resig" city="Boston" lang="js" food="Bacon"> <b>John says:</b> <span>Hello, how are you?</span> </li> I guess one bad thing is that my custom attributes could conflict with HTML attributes with special meanings (e.g., name), but aside from this, is there a problem with just writing "example_text" instead of "data-example_text"? (It won't validate, but who cares?)

    Read the article

  • What is an Ontology (Database?) ?

    - by Robert Gould
    I was just reading this article and it mentions that some organization had an Ontology as(?) their database(?) layer, and that the decision to do this was bad. Problem is I hadn't heard about this before, so I can't understand why it's bad. So I tried googling about databases and ontology, and came about quite a few pdfs from 2006 that we're full of incomprehensible content (for my mind). I read a few of these and at this point still have absolutely no idea what they are talking about. My current impression is that it was some crazy fad of 2006 that some academics were trying to sell us, but failed miserably due to the wording of their ideas. But I'm still curious if anyone actually knows what this is actually all about.

    Read the article

  • fstream - correct error checking after output

    - by Truncheon
    What's the correct way to check for a general error when sending data to an fstream? I have the following code, which seems a bit overkill. int Saver::output() { save_file_handle.open(file_name.c_str()); if (save_file_handle.is_open()) { save_file_handle << save_str.c_str(); if (save_file_handle.bad()) { x_message("Error - failed to save file"); return 0; } save_file_handle.close(); if (save_file_handle.bad()) { x_message("Error - failed to save file"); return 0; } return 1; } else { x_message("Error - couldn't open save file"); return 0; } }

    Read the article

  • stopping a cherrypy server over http

    - by d.c
    I have a cherrypy app that I'm controlling over http with a wxpython ui. I want to kill the server when the ui closes, but I don't know how to do that. Right now I'm just doing a sys.exit() on the window close event but thats resulting in Traceback (most recent call last): File "ui.py", line 67, in exitevent urllib.urlopen("http://"+server+"/?sigkill=1") File "c:\python26\lib\urllib.py", line 87, in urlopen return opener.open(url) File "c:\python26\lib\urllib.py", line 206, in open return getattr(self, name)(url) File "c:\python26\lib\urllib.py", line 354, in open_http 'got a bad status line', None) IOError: ('http protocol error', 0, 'got a bad status line', None) is that because I'm not stopping cherrypy properly?

    Read the article

  • Sysadmin 101: How can I figure out why my server crashes and monitor performance?

    - by bflora
    I have a Drupal-powered site that seems to have neverending performance problems. It was butt-slow about 5 months ago. I brought in some guys who installed nginx for anonymous visitors, ajaxified a few queries so they wouldn't fire during page load, and helped me find a few bottlenecks in the code. For about a month, the site was significantly faster, though not "fast" by any stretch of the word. Meanwhile, I'm now shelling out $400/month to Slicehost to host a site that gets less than 5,000/uniques a day. Yes, you read that right. Go Drupal. Recently the site started crashing again and is slow again. I can't afford to hire people to come in, study my code from top to bottom, and make changes that may or may not help anymore. And I can't afford to throw more hardware at the problem. So I need to figure out what the problem is myself. Questions: When apache crashes, is it possible to find out what caused it to crash? There has to be a way, right? If so, how can I do this? Is there software I can use that will tell me which process caused my server to die? (e.g. "Apache crashed because someone visited page X." or "Apache crashed because you were importing too many RSS items from feed X.") There's got to be a way to learn this, right? What's a good, noob-friendly way to monitor my current apache performance? My developer friends tell me to "just use Top, dude," but Top shows me a bunch of numbers without any context. I have no clue what qualifies as a bad number or a good number in Top, or which processes are relevant and which aren't. Are there any noob-friendly server monitoring tools out there? Ideally, I could have a page that would give me a color-coded indicator about how apache is performing and then show me a list of processes or pages that are sucking right now. This way, I could know when performance is bad and then what's causing it to be so bad. Why does PHP memory matter? My apparently has a 30MB memory foot print. Will it run faster if I bring that number down? Thanks for any advice. I spent a year or so trying to boost my advertising income so I could hire a contractor to solve my performance woes. I didn't want to have to learn all this sysadmin voodoo. I'm now resigned to the fact that might not have a choice.

    Read the article

  • Java Compiler: Optimization of "cascaded" ifs and best practices?

    - by jens
    Hello, does the Java Compiler optimize a statement like this if (a == true) { if (b == true) { if (c == true) { if(d == true) { //code to process stands here } } } } to if (a == true && b==true && c==true && d == true) So thats my first question: Do both take exactly the same "CPU Cycles" or is the first variant "slowlier". My Second questin is, is the first variant with the cascaded if considered bad programming style as it is so verbose? (I like the first variant as I can better logically group my expressions and better comment them (my if statements are more complex than in the example), but maybe thats bad proramming style?) and even slowlier, thats why I am asking... Thanks Jens

    Read the article

  • jQuery drag drop slower for more DIV items

    Hi there, I have got a hierarchichal tags (with parent child relationship) in my page and it will account to 500 - 4500 (can even grow). When i bound the draggable and droppable for all i saw very bad performance in IE7 and IE6. The custom helper wont move smoothly and was very very slow. Based on some other post i have made the droppable been bound/unbound on mouseover and mouseout events (dynamically). Its better now. But still i dont see the custom helper move very smoothly there is a gap between the mouse cursor and the helper when they move and gets very bad when i access the site from remote. Please help me to address this performance issue. Am totally stuck here.. :(

    Read the article

  • Can you let users upload Sinatra apps and run them inside Rails as middleware?

    - by Brian Armstrong
    I want to let users write small custom apps (think themes or plugins on Wordpress) and upload/run them on my site. I'm thinking about using Sinatra apps for this since it would give the users a lot of flexibility, and then running them as middleware inside my rails app. But I can't figure out the security implications of this. I tried creating a simple sinatra app as middleware, and it has access to all the rails models and everything - so that is bad. Is there a way for rack to keep these separate so that the sinatra apps are effectively sandboxed and can't do any bad things (outside of an API or some specific way I setup for them to communicate)? There may be an easier way to accomplish this that I haven't thought of too, so ideas welcome. Thanks!

    Read the article

  • Java JSpinner Looks Ugly

    - by ikurtz
    GUI i am trying to use JSpinner but as you can see from the attached image that it looks bad. i am on windows 7. i was wondering if anyone knows how to make it look good? just for clarity. bad means the edges dont line up and good means the spin control edges line up correctly. thank you. EDIT: maybe there is no cure for this? because i checked site and all their examples look like this!

    Read the article

  • Throw a long list of exceptions vs throw an Exception vs throw custom exception?

    - by athena
    I have an application which uses two methods of an API. Both these methods throw more than five exceptions each. So, if I just add a throws declaration then it becomes a list of more than ten. (My method cannot handle any of the ten exceptions) I have read that throwing a long list of exceptions is a bad practice. Also throwing (the umbrella) Exception is a bad practice. So, what should I do? Add a try catch block, and log and exit in the catch block? (Current approach) Create a custom exception class, wrap every exception and throw the custom exception? Add a throws declaration for all exceptions? Throw Exception?

    Read the article

  • XML databinding to TreeView (or Tab control), bind attribute based on different attribute

    - by Number8
    Hello, I have some xml: <Test> <thing location="home" status="good"/> <thing location=work" status="bad"/> <thing location="mountains" status="good"/> </Test> The leaves on the TreeView are the values of the status attribute; the nodes will be the value of the location attribute. +--bad ¦.....+--work +--good .......+--home .......+--mountains Currently, I populate the TreeView (or Tab control) manually, iterating through the xml, adding the nodes to the appropriate leaf. Can this be done via databinding? I'm guessing a Converter will be involved... Thanks for any advice.

    Read the article

  • GoTo statements, and alternatives (help me please im new) (VB.net)

    - by qais
    Basically I posted a code snippet on a forum asking for help and people pointed out to me that using GoTo statements is very bad programming practise so I'm just wondering, why is it bad? And also what alternative is there to use, like for example in this program ive done for homework the user has to input their date of birth and if the month/date/year are invalid or unrealistic(using if statements checking the integer inputs size, if theres any better way to do this i'd appreciate if you could tell me that also :D) then how would i be able to loop back to ask them again? heres a little extract of my code retryday: Console.WriteLine("Please enter the day you were born : ") day = Console.ReadLine If day > 31 Or day < 1 Then Console.WriteLine("Please enter a valid day") GoTo retryday End If

    Read the article

  • RSA Encrypt in PHP to decrypt in .NET

    - by user312904
    In PHP I am RSA encrypting a message to be decrypted by .NET application... but I keep getting a "Bad Key" exception from .NET.... For RSA encryption, I am using PEAR class Crypt_RSA- encrypting with the public key (which is a modulus, exponent pair) I get from working encryption system in .NET... I guess the easiest question would be- does "Bad Key" mean it is not able to decrypt the message whatsoever? IE, it is not encrypted correctly? The harder question is- Is there anything specific about RSA encryption that causes quirks between .NET and PHP?

    Read the article

  • How to change the value of None in Python?

    - by michael
    I'm currently reading chapter 5.8 of Dive Into Python and Mark Pilgrim says: There are no constants in Python. Everything can be changed if you try hard enough. This fits with one of the core principles of Python: bad behavior should be discouraged but not banned. If you really want to change the value of None, you can do it, but don't come running to me when your code is impossible to debug. I tried this in the interpreter None = "bad" I get a SyntaxError: assignment to None Just out of curiosity how do you change None?

    Read the article

  • Why is x86 ugly? aka Why is x86 considered inferior when compared to others?

    - by claws
    Hello, recently I've been reading some SO archives and encountered statements against x86 architecture. http://stackoverflow.com/questions/2667256/why-do-we-need-different-cpu-architecture-for-server-mini-mainframe-mixed-cor says "PC architecture is a mess, any OS developer would tell you that." http://stackoverflow.com/questions/82432/is-learning-assembly-language-worth-the-effort says "Realize that the x86 architecture is horrible at best" http://forums.anandtech.com/showthread.php?t=976577 says "Most colleges teach assembly on something like MIPS because it's much simpler to understand, x86 assembly is really ugly" and many more comments like Compared to most architectures, X86 sucks pretty badly. It's definitely the conventional wisdom that X86 is inferior to MIPS, SPARC, and PowerPC x86 is ugly I tried searching but didn't find any reasons. I don't find x86 bad probably because this is the only architecture I'm familiar with. Can someone kindly give me reasons for considering x86 ugly/bad/inferior compared to others.

    Read the article

  • Using pointers in PHP.

    - by Babiker
    I ask this question because i learned that in programming and designing, you must have a good reason for decisions. I am php learner and i am at a crossroad here, i am using simple incrementation to try to get what im askin across. I am certainly not here to start a debate about the pros/cons of pointers but when it comes to php, which is the better programming practice: function increment(&$param) { $param++; } Or function increment($param){ return $param++; } $param = increment($param);

    Read the article

  • Implementing OFX specification with javascript

    - by John Langston
    Hey all, I am working on a personal project and need to retrieve financial data. After looking around how this is normally done it seems you can pay lots of money and license a service like Yodlee to get this data for you or you can implement a OFX client like wesabe has to communicate with financial institutions. Seeing as I don't have lots of money and wouldn't mind the challenge I decided to try to implement the ofx spec (unless one of you can suggest a cheap/free alternative!). I looked around for some ofx libraries other people have already written for use but didn't find anything that looked too great. I was wondering if anyone knew if it would be a bad idea to attempt this in Javascript (using XMLSocket from actionscript to handle the actual socket communication). If there is some really bad reason why I shouldn't do this please bring it up. If there is I'll just do it in Java but I think it would be neat to have it completely in javascript so it runs client-side. Anyways I was hoping for some helpful input, thanks.

    Read the article

  • Store web content in XML using wiki markup

    - by Mike
    Does anyone have an XML style sheet that'll convert wiki-like markup to HTML? Or is that a bad idea? I only found one style sheet that'll convert HTML to wiki-like markup, view-source:http://mozile.mozdev.org/0.8/demos/html2wiki.xsl . Or is this a bad idea? Basically, instead of following strict rules with my XML tags to format my content, I thought it'd be best to have something like this: <content> \## This is my heading </content> That way I'm free to display my content however I feel without having to modify my style sheet. Any ideas?

    Read the article

  • jQuery-Ui Ajax Tabs bug?

    - by vsync
    I have a JSON that returns from the server which tabs to build, so I init them in my JS like this: $('#tabs').tabs( 'ajaxOptions', { timeout: 20000, error: function(xhr, status, index, anchor){ console.log( status, index, anchor ); } }) .tabs('add', item.CategoryLink, item.CategoryName); Thing is, when I click a tab, and before it is done loading I click another tab, the previous request is aborted and never called again when I click that first one again! this is very bad, because it obviously didn't fetch the request, so what gives? I tried bypassing this by setting: .tabs({ cache: false }) but this is a bad thing to do, because I don't want to have a request each time again... it should be cachced if response was sent. using jquery-ui 1.8.1

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >