Search Results

Search found 94 results on 4 pages for 'terry dunford'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Bash variable kills script execution

    - by Kyle Terry
    Sorry if this is better suited at serverfault, but I think it learns more towards the programming side of things. I have some code that's going into /etc/rc.local to detect what type of touch screen monitor is plugged in and changes out the xorg.conf before launching X. Here is a small snippet: CURRENT_MONITOR=`ls /dev/usb | grep 'egalax_touch\|quanta_touch'` case $CURRENT_MONITOR in '') CURRENT_MONITOR='none' ;; esac If one of those two touch screens is plugged in, it works just fine. If any other monitor is plugged in, it stops at the "CURRENT_MONITOR=ls /dev/usb | grep 'egalax_touch\|quanta_touch'." For testing I touched two files. One before creating CURRENT_MONITOR and one after CURRENT_MONITOR and only file touched before is created. I'm not a bash programmer so this might be something very obvious.

    Read the article

  • Python, implementing proxy support for a socket based application (not urllib2)

    - by Terry Felkrow
    Hey guys, I am little stumped: I have a simple messenger client program (pure python, sockets), and I wanted to add proxy support (http/s, socks), however I am a little confused on how to go about it. I am assuming that the connection on the socket level will be done to the proxy server, at which point the headers should contain a CONNECT + destination IP (of the chat server) and authentication, (if proxy requires so), however the rest is a little beyond me. How is the subsequent connection handled, specifically the reading/writing, etc... Are there any guides on proxy support implementation for socket based (tcp) programming in Python? Thank you

    Read the article

  • Decorator Module Standard

    - by Kyle Terry
    I was wondering if it's frowned upon to use the decorator module that comes with python. Should I be creating decorators using the original means or is it considered okay practice to use the module?

    Read the article

  • What's your favorite implementation of producing the fibonacci sequence?

    - by Terry Donaghe
    Best, most creative, most clever, fastest, smallest, written in weirdest language, etc etc. For those not familiar with this staple of programming exam question / interview question, check this out: Fibonacci Sequence at Wikipedia The question would be, write a simple program which will spit out the first n digits of the Fibonacci sequence. So, if n == 12, we produce: 0 1 1 2 3 5 8 13 21 34 55 89 144 Your implementation becomes more interesting when you set n to larger values. How long does it take your implementation to return a 25 digit sequence? How about 100?

    Read the article

  • What Visual C++ references are worth a look for a Java programmer looking to get up to speed?

    - by Terry V.
    I have a lot of experience with Java/OO. There are tons of C++ tutorials/references out there, but I was wondering if there are a few key ones that a Java programmer might find useful when making the transition. I will be moving from server-side J2EE to Windows Visual C++ desktop programming. I have googled and found tons of resources, but am overwhelmed and don't know where to best spend my time. I have only a few days to get a good start. Is Visual Studio Express / Microsoft Visual C++ the best IDE for me to start with? Also, any words of wisdom from others who know and work with both languages?

    Read the article

  • How do we simplify this kind of code in Java? Something like macros in C?

    - by Terry Li
    public static boolean diagonals(char[][] b, int row, int col, int l) { int counter = 1; // because we start from the current position char charAtPosition = b[row][col]; int numRows = b.length; int numCols = b[0].length; int topleft = 0; int topright = 0; int bottomleft = 0; int bottomright = 0; for (int i=row-1,j=col-1;i>=0 && j>=0;i--,j--) { if (b[i][j]==charAtPosition) { topleft++; } else { break; } } for (int i=row-1,j=col+1;i>=0 && j<=numCols;i--,j++) { if (b[i][j]==charAtPosition) { topright++; } else { break; } } for (int i=row+1,j=col-1;i<=numRows && j>=0;i++,j--) { if (b[i][j]==charAtPosition) { bottomleft++; } else { break; } } for (int i=row+1,j=col+1;i<=numRows && j<=numCols;i++,j++) { if (b[i][j]==charAtPosition) { bottomright++; } else { break; } } return topleft + bottomright + 1 >= l || topright + bottomleft + 1 >= l; //in this case l is 5 } After I was done posting the code above here, I couldn't help but wanted to simplify the code by merging the four pretty much the same loops into one method. Here's the kind of method I want to have: public int countSteps(char horizontal, char vertical) { } Two parameters horizontal and vertical can be either + or - to indicate the four directions to walk in. What I want to see if possible at all is i++; is generalized to i horizontal horizontal; when horizontal taking the value of +. What I don't want to see is if or switch statements, for example: public int countSteps(char horizontal, char vertical) { if (horizontal == '+' && vertical == '-') { for (int i=row-1,j=col+1;i>=0 && j<=numCols;i--,j++) { if (b[i][j]==charAtPosition) { topright++; } else { break; } } } else if (horizontal == '+' && vertical == '+') { for (int i=row+1,j=col+1;i>=0 && j<=numCols;i++,j++) { if (b[i][j]==charAtPosition) { topright++; } else { break; } } } else if () { } else { } } Since it is as tedious as the original one. Note also that the comparing signs for the loop condition i>=0 && j<=numCols; for example, >= && <= have correspondence with the value combination of horizontal and vertical. Sorry for my bad wording, please let me know if anything is not clear.

    Read the article

  • Another Nim's Game Variant

    - by Terry Smith
    Given N binary sequence Example : given one sequence 101001 means player 0 can only choose a position with 0 element and cut the sequence from that position {1,101,1010} player 1 can only choose a position with 1 element ans cut the sequence from that position {null,10,101000} now player 0 and player 1 take turn cutting the sequence, on each turn they can cut any one non-null sequence, if a player k can't make a move because there's no more k element on any sequence, he lose. Assume both player play optimally, who will win ? I tried to solve this problem with grundy but i'm unable to reduce the sequence to a grundy number because it both player don't have the same option to move. Can anyone give me a hint to solve this problem ?

    Read the article

  • How many databases to support eCommerce?

    - by Terry Lorber
    I have a system with two databases, one that the customer-facing website uses, the second that is used by the "backroom" order-fulfillment system. I've been asked to run queries from the website to the backroom system. I'd rather not, it seems risky to allow web-based request to run unheeded on the internal system. Additionally, this means opening up routing in the firewall to allow external connections to the internal server. What's the best practice for eCommerce? Run the entire company off of one database? Or individual databases for each system, and middleware to connect them? Sometimes it might be necessary for the web application to pull date from the internal system, but not based on an HTTP request from the internet. I'm sure the best answer is "it depends!" So, if people have a rule of thumb for when to use middleware and when not to, I'd like to here it.

    Read the article

  • Why this mouseout will be called when i move out of li instead of ul?

    - by terry
    i want to call mouseout of ul tag, but it looks it will call mouseout as well when i move between two li tags, what's wrong? how can i make it work when i move mouse out of the ul? thanks a lot! $(document).ready(function(){ $("#info").live("mouseout", function(){ console.log('mouseout'); }); }); HTML <div id="latest"> <ul id="info"> <li>test1</li> <li>test2</li> </ul> </div>

    Read the article

  • Null reference for first memory address between 0 - 65535

    - by Terry
    I would like to understand a bit more about memory and I was unable to find it from Google, please forgive me if this is silly question. How come the following code, accessing memory address 0(and up to 65535) in C# would throw NullReferenceException byte* pointer = (byte*)0; byte test = *pointer; Thanks a lot in advance!

    Read the article

  • whether rand_r is real thread safe?

    - by terry
    Well, rand_r function is supposed to be a thread safe function. However, by its implementation, I cannot believe it could make itself not change by other threads. Suppose that two threads will invoke rand_r in the same time with the same variable seed. So read-write race will occur. The code rand_r implemented by glibc is listed below. Anybody knows why rand_r is called thread safe? int rand_r (unsigned int *seed) { unsigned int next = *seed; int result; next *= 1103515245; next += 12345; result = (unsigned int) (next / 65536) % 2048; next *= 1103515245; next += 12345; result <<= 10; result ^= (unsigned int) (next / 65536) % 1024; next *= 1103515245; next += 12345; result <<= 10; result ^= (unsigned int) (next / 65536) % 1024; *seed = next; return result; }

    Read the article

  • How do I prevent Window resizing when the Workstation is Locked then Unlocked?

    - by Terry
    We have an application that is run in multi-monitor environments. Users normally have the application dialog spread out to span multiple mointors. If the user locks the workstation, and then unlocks it, our application is told to resize. Our users find this behavior frustrating, as they then spend some time restoring the previous layout. We're not yet sure whether it is the graphics driver requesting the resize or Windows. Hopefully through this question, it will become clearer which component is responsible, Popular applications like (File) Explorer and Firefox behave the same way in this setup. To replicate just: open Explorer (Win+E) drag the Explorer window to being horizontally larger than 1 screen lock workstation (Win+L), unlock the application should now resize to being solely on 1 screen How do I prevent Window resizing when the Workstation is Locked then Unlocked? Will we need to code in checks for (un)locking? Is there another mechanism we're not aware of?

    Read the article

  • Big-Oh running time of code in Java (are my answers accurate

    - by Terry Frederick
    the Method hasTwoTrueValues returns true if at least two values in an array of booleans are true. Provide the Big-Oh running time for all three implementations proposed. // Version 1 public boolean has TwoTrueValues( boolean [ ] arr ) { int count = 0; for( int i = 0; i < arr. length; i++ ) if( arr[ i ] ) count++; return count >= 2; } // Version 2 public boolean hasTwoTrueValues( boolean [ ] arr ) { for( int i = 0; i < arr.length; i++ ) for( int j = i + 1; j < arr.length; j++ ) if( arr[ i ] && arr[ j ] ) return true; } // Version 3 public boolean hasTwoTrueValues( boolean [ ] arr ) { for( int i = 0; i < arr.length; i++ if( arr[ i ] ) for( int j = i + 1; j < arr.length; j++ ) if( arr[ j ] ) return true; return false; } For Version 1 I say the running time is O(n) Version 2 I say O(n^2) Version 3 I say O(n^2) I am really new to this Big Oh Notation so if my answers are incorrect could you please explain and help.

    Read the article

  • Google I/O 2010 - Keynote Day 1

    Google I/O 2010 - Keynote Day 1 Google I/O 2010 - Keynote Day 1 Video footage from Day 1 keynote at Google I/O 2010 Vic Gundotra, Engineering Vice President, Google Sundar Pichai, Vice President, Product Management, Google Charles Pritchard, Founder, MugTug Jim Lanzone, CEO, Clicker Mike Shaver, VP Engineering, Mozilla Corporation Håkon Wium Lie, CTO, Opera Software Kevin Lynch, CTO, Adobe Systems Terry McDonell, Editor, Sports Illustrated Group Lars Rasmussen, Manager, Google Wave David Glazer, Engineering Director, Google Paul Maritz, President & CEO, VMware Ben Alex, Senior Staff Engineer, SpringSource Division of VMware, Bruce Johnson, Engineering Director, Google Kevin Gibbs, Software Engineer, Google For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 2 1 ratings Time: 02:05:08 More in Science & Technology

    Read the article

  • weblogs.asp.net! I am here now!

    - by kaushalparik27
    Hello all webloggers!! Finally after much wait I got my blog space approved here. I really want to thank moderators (specially Terry for mail follow up) helping me out creating my weblog here. I; usually; blog about things and situation that I come across while development or something on which I succeeded to have some study/reading. Till now, I was maintaining my blog here (which I am still going to maintain in future as well!). Wishing for the best and thanks all future readers!

    Read the article

  • IHRIM's Latest Workforce Solutions Review Focuses on Risk!

    - by Jay Richey, HCM Product Marketing
    IHRIM's latest edition of the Workforce Solution's Review magazine (in print and online) has some really compelling features and articles focused on HCM risk and compliance management.  Check out this line-up and sign up if you aren't already a member.  It's well worth it.  http://www.ihrimpublications.com/WSR_about.php Three to Watch: HR's Growing Compliance Responsibilities for Data Security, Genetic Nondiscrimination, and Anti-Bribery Laws     By W. Scott Blackmer and Richard Santalesa, InfoLawGroup, LLP Global HR and International Background Check Best Practices     By Terry Corley, Aletheia Consulting Group Compliance: Old Wine in New Wineskins?     By Ursula Christina Fellberg, Ph.D., UCF-StrategieBeraterin Join the HR/HR technology professionals who have subscribed for so many years to IHRIM’s publications and become a reader today by visiting  http://www.ihrimpublications.com/amember/signup.php.  

    Read the article

  • Serving wildcard subdomains from the mulitple servers.

    - by user489176
    I have a web application to which I want users to login only through their unique sub-domain (the sub-domain will be chosen at signup). So that I can scale the application across a number of servers, what would be the best way to set up Apache to always serve the same subdomains from the same server? For instance: matt.yyy.com, helen.yyy.com, terry.yyy.com are always served from server with ip of xxx.xxx.xxx.xxx suzi.yyy.com, fred.yyy.com, tom.yyy.com are always served from server with ip of xxx.xxx.xxx.xxx

    Read the article

  • The Shearin Group Real Estate Brokers: Projektets blå Zone i strand byer

    - by user224103
    Jeg kan virkelig godt lide hvad de blå Zone projekt gør: det er folkesundheden initiativledes af strand byer sundhed District, at gøre livet bedre i vores lokale samfund. BlåZone anmoder lokale South Bay beboere til at tænke om genbrug, grøn-levende, ogvirkningen deres handlinger og daglige living har på miljøet og dem omkring dem. Kast begivenheder og kampagner omkring strand byer, og har haft en stor indflydelsepå Hermosa Beach i særdeleshed. For eksempel, holder de en workshop på 18 januar2014 kaldet Power of Purpose på Redondo Beach Performing Arts Center. Workshoppen vil bliver alt om hvordan formål vedrører vores personlige værdier,overbevisninger og prioriteter og køre byKathleen Terry af lederskab fra ManhattanBeach og lederskab Redondo og formand for Manhattan Beach Rotary Club.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >