Daily Archives

Articles indexed Thursday May 6 2010

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

  • Howto ignore specific undefined variables in Pydev (eclipse)

    - by chris.nullptr
    I'm writing a crossplatform python script on windows using Eclipse with the Pydev plugin. The script makes use of the os.symlink() and os.readlink() methods if the current platform isn't NT. Since the os.symlink() and os.readlink() methods aren't available on the windows platform Pydev flags them as undefined variables--like so: Is there a way to explicitly ignore certain undefined variable name errors (e.g. os.symlink())?

    Read the article

  • C++ multidimensional dynamic array

    - by dmessf
    Let's say I have this to create a multidimensional array dynamically: int* *grid = new int*[gridSizeX]; for (int i=0; i<gridSizeX; i++) { grid[i] = new int[gridSizeY]; } Shouldn't be possible now to access elements like grid[x][y] = 20?

    Read the article

  • What do you do with GitHub repositories you no longer maintain?

    - by T. Stone
    What do you do with GitHub repositories you no longer maintain? For whatever reason a project is started with a GitHub repository and then sometime later it's abandoned Perhaps it was an experiment that didn't work out. Perhaps you replaced it with a commercial product. Or perhaps you found a similar project to what you were doing and joined their efforts instead. In the time your repository was alive, it attracted watchers and a few forks. What do you do with it at that point? Is there a way to nicely indicate that repository is no longer maintained and to either check out the forks or a different project?

    Read the article

  • html css image alignment

    - by computerpro007
    Hi All, I have a question regarding image alignment with CSS. For example I have created a css class as below: .link { background: url("images/image1.gif") scroll right; } and below is the markup <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <p class="link">This is a link</p> </head> <body> </body> </html> When I check in the browser I get the image on the text. I want it after the text i mean This is a link (this is where I want the image to appear)

    Read the article

  • c++ exceptions and program execution logic

    - by Andrew
    Hello everyone, I have been thru a few questions but did not find an answer. I wonder how should the exception handling be implemented in a C++ software so it is centralized and it is tracking the software progress? For example, I want to process exceptions at four stages of the program and know that exception happened at that specific stage: 1. Initialization 2. Script processing 3. Computation 4. Wrap-up. At this point, I tried this: int main (...) { ... // start logging system try { ... } catch (exception &e) { cerr << "Error: " << e.what() << endl; cerr << "Could not start the logging system. Application terminated!\n"; return -1; } catch(...) { cerr << "Unknown error occured.\n"; cerr << "Could not start the logging system. Application terminated!\n"; return -2; } // open script file and acquire data try { ... } catch (exception &e) { cerr << "Error: " << e.what() << endl; cerr << "Could not acquire input parameters. Application terminated!\n"; return -1; } catch(...) { cerr << "Unknown error occured.\n"; cerr << "Could not acquire input parameters. Application terminated!\n"; return -2; } // computation try { ... } ... This is definitely not centralized and seems stupid. Or maybe it is not a good concept at all?

    Read the article

  • Content-Length header not returned from Pylons response

    - by Evgeny
    I'm still struggling to Stream a file to the HTTP response in Pylons. In addition to the original problem, I'm finding that I cannot return the Content-Length header, so that for large files the client cannot estimate how long the download will take. I've tried response.content_length = 12345 and I've tried response.headers['Content-Length'] = 12345 In both cases the HTTP response (viewed in Fiddler) simply does not contain the Content-Length header. How do I get Pylons to return this header? (Oh, and if you have any ideas on making it stream the file please reply to the original question - I'm all out of ideas there.)

    Read the article

  • MongoDB lists with paginations?

    - by Timmy
    for documents with lists with pagination, is it better to embed or use reference? im reading the custom type "SONManipulator" and it appears to transform every thing on retrieval, even the sub docs. i want to keep the list in the document sorted, should this impact anything?

    Read the article

  • How to get my program to log the user into Windows?

    - by blood
    i have been working on a program that will enter usernames and passwords if someone plugs in a Usb, but i don't know how to enter a windows log in password. So the idea is to have my program running so it can find if the usb is plugged in if so it will use keybd_event to enter the password and to hit enter. how would i get my program to run so i can do this?

    Read the article

  • How is this modsec rule getting triggered?

    - by BipedalShark
    I made a GET request to the URL, http://domain.tld/test/docs/index.php?create_table=1&step=2 and got a 403 response code. It turns out this modsec rule is getting triggered: Access denied with code 403 (phase 2). Pattern match "(?:ogg|gopher|zlib|(?:ht|f)tps?)\:/" at ARGS:gltr_redir. [file "/opt/mod_security/10_asl_rules.conf"] [line "827"] [id "340153"] [rev "22"] [msg "Generic PHP code injection protection via ARGS 3"] [severity "CRITICAL"] I would assume ARGS refers to GET/POST data, but there's no gltr_redir in the query string. And, being a GET request, there's obviously no POST data. So how is this rule being triggered?

    Read the article

  • Is this build compatible?

    - by Jephir
    I am building a new computer with this configuration: Foxconn AM3 Micro ATX AMD Phenom II X6 A-DATA 4GB DDR3 Radeon HD 5870 OCZ Fatal1ty 550W Power Supply Cooler Master Elite 310 Red Mid Tower Case I am reusing my old SATA hard drive and DVD drive. Is this build compatible?

    Read the article

  • SQLAuthority News – SQL Server 2008 R2 Hosted Trial

    - by pinaldave
    This is a bit old news but for me but it will new for many of you know. SQLPASS, Dell, Microsoft and MaximumASP has come together and build hosted environment for free to all of us to use and experiment with. Register now to try out up to seven labs: SQL Server 2008 R2 – Multi Server Management SQL Server 2008 R2 – PowerPivot SQL Server 2008 R2 – Reporting Services SQL Server 2008 R2 – Master Data Services SQL Server 2008 R2 – StreamInsight SQL Server Integration Services – Introduction SQL Server Integration Services – Intermediate to Advanced Now this is indeed wonderful opportunity as you do not need to buy anything and get world class experience with this products. Register here. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: SQL PASS

    Read the article

  • How to wrap two unmannaged C++ functions into two managed C# functions?

    - by Gbps
    I've got two unmanaged C++ functions, Compress and Decompress. The arguments and returns go as followed: unsigned char* Compress (unsigned char*,int) unsigned char* Decompress (unsigned char*,int) Where all uchars are arrays of uchars. Could someone please help me lay out a way to convert these into managed C# code using the Byte[] array instead of unsigned char*? Thank you very much!

    Read the article

  • C# class type - How to determine whether it is a standard .net framework class

    - by HorstWalter
    C# / .net framework What is the most reliable way to determine whether a class (type) is a class provided by the .net framework and not any of my classes or 3rd party library classes. I have tested some approaches The namespace, e.g. starting with "System." The Codebase of the assembly, where the dll is located All this "feels" a little clumsy though it works. Question: What is the easiest and most reliable way to determine this?

    Read the article

  • Help with javascript form validation

    - by zac
    I am getting a headache with form validation and hoping that the kind folks here can give me a hand finishing this sucker up I have it basically working except the email validation is very simplistic (only alerts if it is blank but does not actually check it if is a valid email address) and I am relying on ugly alerts but would like to have it reveal a hidden error div instead of the alert. I have this all wrapped up with an age validation check too.. here are the important bits, minus the cookie scripts function checkAge() { valid = true; if ( document.emailForm.email.value== 0 ) { alert ( "Please enter your email." ); valid = false; } if ( document.emailForm.year.selectedIndex == 0 ) { alert ( "Please select your Age." ); valid = false; } var min_age = 13; var year = parseInt(document.forms["emailForm"]["year"].value); var month = parseInt(document.forms["emailForm"]["month"].value) - 1; var day = parseInt(document.forms["emailForm"]["day"].value); var theirDate = new Date((year + min_age), month, day); var today = new Date; if ( (today.getTime() - theirDate.getTime()) < 0) { var el = document.getElementById('emailBox'); if(el){ el.className += el.className ? ' youngOne' : 'youngOne'; } document.getElementById('emailBox').innerHTML = "<img src=\"emailSorry.gif\">" createCookie('age','not13',0) return false; } else { //this part doesnt work either document.getElementById('emailBox').innerHTML = "<img src=\"Success.gif\">" createCookie('age','over13',0) return valid; }; }; var x = readCookie('age'); window.onload=function(){ if (x=='null') { }; if (x=='over13') { }; if (x=='not13') { document.getElementById('emailBox').innerHTML = "<img src=\"emailSorry.gif\">"; }; } can someone please help me figure a better email validation for this bit: if ( document.emailForm.email.value== 0 ) { alert ( "Please enter your email." ); valid = false; } and how would I replace the alert with something that changes a class from hidden to visible? Something like? document.getElementById('emailError').style.display='block'

    Read the article

  • How to iterate all query paths within an image header namespace in WIC?

    - by muruge
    Hello All, I am using Windows Imaging Component to read/write image metadata in my WPF application. I would like to know if there is an efficient way to know if any paths exist within a namespace. For instance I would like to know if any paths within IPTC namespace exist and if not I want to delete the namespace from the image header. Any pointers would be greatly appreciated. Thanks, Murugesh.

    Read the article

  • what architecture to use with asp.net mvc vd web forms

    - by kacalapy
    please explain how to get high capacity architectures with both the default asp.net web forms and mvc models with regard to being able to serve millions of page views. i want to know how to set up each model from DB clustering, to caching, logical/ physical tiers, load balancing iis servers, scaling out or up, session state management and so on... is one more scalable than the other? thanks all.

    Read the article

  • Window bounds set on window using AppleScript in OS X are being ignored

    - by Jesse
    I am trying to create a small AppleScript to create and move some Terminal windows around my screen. The problem I am running into is that in some cases, it seems that OS X is ignoring the bounds I am setting. Using the AppleScript Editor: tell application "Terminal" to set the bounds of the first window to {0, 50, 600, 700} tell application "Terminal" to get the bounds of the first window Shows the following in the Event Log: tell application "Terminal" activate set bounds of window 1 to {0, 50, 600, 700} get bounds of window 1 --> {0, 22, 600, 672} end tell Result: {0, 22, 600, 672} Visually inspecting the window that is created when the script runs shows that Result bounds are the ones being used by the window. Any ideas?

    Read the article

  • selenium vs phpunit/lime?

    - by fayer
    i have seen the power of selenium and that it can give you the tests in different languages. so the question is, why should i use phpunit or lime (for symfony) when a solution like selenium is available? isn't it time-consuming to write all the tests by hand, when you can just use selenium? thanks.

    Read the article

  • UIView coordinate transforms on rotation during keyboard appearance

    - by SG
    iPad app; I'm trying to resize my view when the keyboard appears. It amounts to calling this code at appropriate times: CGRect adjustedFrame = self.frame; adjustedFrame.size.height -= keyboardFrame.size.height; [self setFrame:adjustedFrame]; Using this technique for a view contained in a uisplitview-based app works in all 4 orientations, but I've since discovered that a vanilla uiview-based app does not work. What happens is that apparently the uisplitview is smart enough to convert the coordinates of its subviews (their frame) such that the origin is in the "viewer's top left" regardless of the orientation. However, a uiview is not able to correctly report these coordinates. Though the origin is reported as (0,0) in all orientations, the view's effective origin is always as if the ipad were upright. What is weird about this is that the view correctly rotates and draws, but it always originates in the literal device top left. How can I get the view to correctly make its origin the "top left" to the viewer, not the device's fixed top left? What am I missing? Please, for something so trivial I've spent about 6 hours on this already with every brute force technique and research angle I could think of. This is the original source which doesn't work in this case: http://stackoverflow.com/questions/1951826/move-up-uitoolbar

    Read the article

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