LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

IBM AS400 DB2 SQL Tricks

Posted 02-08-2013 at 10:20 AM by NullTerminator

set schema mySchema

Select x,y,z from w
fetch first 20 rows only

reset an auto counter that got hosed
alter table T alter TheColumn restart with 123

grab the first non null value
select a,b,c, coalesce(z,y,z) as FirstGoodValue from T

Case
select A, case when x < 0 then 'Negative' else 'Positive' end from T

TIMESTAMP format is 'YYYY-MM-DD-hh.mm.ss.uuuuuu'

get month from a date...
LQ Newbie
Posted in Uncategorized
Views 548 Comments 0 NullTerminator is offline
Old

Why and how to use condition variables? - Pthreads

Posted 02-06-2013 at 01:40 AM by TheIndependentAquarius
Updated 02-06-2013 at 05:55 AM by TheIndependentAquarius

  • Q: What is a condition variable?
    A: A condition variable is a variable of type `pthread_cond_t`. It is
    used to suspend the thread execution until some condition is true.

  • Q: Is a condition variable dependent on a mutex lock to work properly? Why?
    A: Explaining with an example:

    Assumptions:
    1. There is a variable `x` whose current value is 0.
    2. There is a thread `threadA` whose task is to start some job once the
      variable `x` reaches the value 1000.
    3. There
...
Senior Member
Posted in PThreads
Views 752 Comments 0 TheIndependentAquarius is offline
Old

#! toddler just like me (:

Posted 01-31-2013 at 08:26 AM by jamison20000e
Updated 06-03-2014 at 10:38 AM by jamison20000e

My nephew JJ is almost two: so of course I'm setting him up a (literally this (now on Xfce; LibreOffice Writer; Iceweasel; Google Drive) computer (vaio-pcv-r556ds | Linux-Debain-Crunchbangcrun\#!-Openbox\*). For the first year I will lock it down with baby-friendly programs mostly only icons and widgets (e.g: solar system, bouncing ball, sliding block puzzle, moon and stuff) so no taskbar on WMs like: Educational Desktops(most *nix flavors offer free Edu-D-tops i.g. Sugar or educational-desktop-lxde...
Senior Member
Posted in Newbie++
Views 3162 Comments 2 jamison20000e is online now
Old

C++ had lambda functions!

Posted 01-31-2013 at 01:21 AM by hydraMax (Bits and Pixels)

I'm doing a CS class which forces me to use C++. I was not very excited about this. However, I have recently be greatly encouraged by the discovery that C++ does, in fact, have lambda functions (or, more properly, anonymous functions) at least in the C++11 standard:

https://en.wikipedia.org/wiki/Anonym...ctions#C.2B.2B

Basically, the big deal here is that I can construct new functions /inside/ of other functions, and even capture variables from the context. This,...
Member
Posted in Uncategorized
Views 416 Comments 0 hydraMax is offline
Old

Controlling VLC via openbox key bindings... and wget(!)

Posted 01-28-2013 at 10:21 AM by the dsc (linux-related notes)
Updated 01-28-2013 at 06:10 PM by the dsc (fixing some stuff, redirection didn't work that way)

On openbox' rc.xml, in the corresponding section:

Code:
    <keybind key="W-z">
      <action name="Execute">
<execute>wget http://127.0.0.1:8080/requests/status.xml?command=pl_previous -O /dev/null</execute> 
      </action>
    </keybind>
    <keybind key="W-x">
      <action name="Execute">
	<execute>wget http://127.0.0.1:8080/requests/status.xml?command=pl_next
...
Member
Posted in Uncategorized
Views 614 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration