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…
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…
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…
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…
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?
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 =…
Hey,
Lets say I have a table Y with column X.
There is one row of "X" with the string "abcdefg", and another row with "qwerty".
Can I make a SELECT query in sqlite to choose the row which contains the substring "abcd" ?
Thanks in advance.
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…
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…
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…
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(){
…
If A1 is [Jones,Mike], how can I get it to seperate but still use the first name as text in the other cell? Yes, text to columns would work greatly, but it does let me use the first name in a formula.
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 =…
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…
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…
I am building a winforms application, i have two comboboxes which have the same datasource, the datasource is a DataTable. Now, when I select a value in one comboBox, the value of another comboBox is changed too. Is there a way make it change without affecting the other?
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.…
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…
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…
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…
I'm trying to execute a SELECT statement that includes a column of a static string value. I've done this in Access, but never with raw SQL. Is this possible?
Example:
Name Status
John Unpaid
Terry Unpaid
Joe Unpaid
In the above example, the "Status" column…
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…
I would like to be able to port some new site pages over to PHP using the same db as in the coldfusion site. Is it possible to have PHP run pages in say other directory and go back and forth ?
Many thanks for your reply.
Terry
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…