Posts

linux - java string regex head not contains -

i have string : [root@slave1 ~]# test -d /root/workspace/servers || echo not found [root@slave1 ~]# test -d /root/workspace/servers || echo not found not found [root@slave1 ~]# test -d /root/workspace/servers || echo not found [root@slave1 ~]# test -d desktp || echo not found not found and want find word not found without echo @ first as can see , in string , there 2 match how can ?? use negative lookbehind. "(?<!\\becho )not found(?=\\s|$)" you use same regex in grep. grep -op '(?<!\becho )not found(?=\s|$)' file (?<!\becho ) - don't lookafter echo<space> not found(?=\s|$) - match not found strings must followed space or line end.

vlc - Stdout to memory python -

i wanted stream raspivid using vlc. followed below link raspivid -o - -t 9999999 -w 1280 -h 1024 -b 500000 -fps 20|cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8080/}' :demux=h264 now wanted record streamed result in vlc cvlc -vvv stream:///rtsp://0.0.0.0:8554/}' --sout=file/ps:record.mpg am doing right? alternative approach/methods appreciated.

delphi - Why do literals of the form [...] have meaning that appears to depend upon context? -

consider following program: {$apptype console} type tmyenum = (enum1, enum2, enum3); var arr: tarray<tmyenum>; enum: tmyenum; begin arr := [enum3, enum1]; // <-- array enum in arr writeln(ord(enum)); writeln('---'); enum in [enum3, enum1] // <-- looks array above writeln(ord(enum)); writeln('---'); readln; end. the output is: 2 0 --- 0 2 --- why 2 loops produce different output? because array contains order information , set not. explanation use of documentation: the internal data format of static or dynamic array : is stored contiguous sequence of elements of component type of array. components lowest indexes stored @ lowest memory addresses. walking on these indices for in loop is done in incremental order : the array traversed in increasing order, starting @ lowest array bound , ending @ array size minus one. on other side, internal data format of set : is bit array each bi...

javascript - CSS display inline-block and fill all spaces with elements -

i have elements display:inline-block, , these's 1 elements that's bigger rest causing space between elements, in picture. here's fiddle example. http://jsfiddle.net/uu64hyed/ note: expand result window width see full problem. css .calendermonth_header { height:35px; line-height:35px; text-align:center; background-color: rgba(221,221,221,1); border-bottom: 1px solid rgba(221,221,221,1); } .calendermonth { height: 160px; width:160px; margin:10px; border-radius:2px; background-color: rgba(238,238,238,1); border: 1px solid rgba(221,221,221,1); display:inline-block; vertical-align:top; cursor:pointer; } .activemonth { height:340px; width:340px;} .calendermonth:hover { border: rgba(0,153,204,1) 1px solid} js $(document).ready(function(e) { var months = [ {month:'january', state:''}, {month:'feburary', state:''}, {month:'march', state:''}, ...

java - Holding multiple values at same index in array -

my code retrieves number of steps, output instruction @ each step via loop. there title, description, video, , audio. however, trying think of way store each variable structure. came with, don't think array can store multiple values @ same index. for(int = 0; < qrdata.number_steps; i++){ system.out.println("inside loop"); array[i].settitle(btn_instructions.get(i)); array[i].setdescription(instruction_row.get(i)); array[i].setinstructionvideo(videos.get(i)); array[i].setaudioinstruction(audio.get(i)); } what better way store these values, easy retrieve later? i'm pretty sure method doesn't work. you should create object like: public class datastorage{ private string title; private string description; private file audiofile; private file videofile; public datastorage(string title, string description, file audiofile, file videofile){ this.title = title; this.description = description...

python - Show Progress Bar during a system call in tkinter -

i try input user. make system call , pass input argument on button press (next in case). during time add indeterminate progress bar widget in current window until system call return , gets next function. somehow progress bars doesn't shows , see next window itself. below code same. from tkinter import * import ttk class app: def __init__(self, master): #copy root self.master = master #label root self.title_frame = frame(self.master) self.title_label= label(self.title_frame, text="my application") #position title label self.title_frame.pack(fill=x) self.title_label.pack() #create frame containing details self.detail_frame1 = frame(self.master) self.detail_frame2 = frame(self.master) #create entry input details self.input1 = entry(self.detail_frame1) self.function() def function(self): #copy root wind...

google play - How to find out if chat support is human or bot -

i did not know ask question. try here ( if doesn't fit here, let me know i'll remove it ) well, having contact support chat google developer console 'guy' called artemis. made me quite skeptical because of name ( there chat bot out there called artemis ) , additionally support bad. guess bot. but well, email support not work either, have try support chat again. how can find out ( ideally in polite way artemis being human ) if bot? there turig-test question can ask?