Posts

Showing posts from March, 2012

synchronization - SQL Azure Data Sysnc Issue -

the use case distributed deployment of web application on azure using paas. read azure documentation on sql azure database geo-replication, , seems none of services tiers best fit need. other option sql sync, in preview , cannot used in production.it seems microsoft azure not have way redundant database centric application using paas model. please how resolve issue or alternate solution. akanksha both sql data sync , geo-replication database redundant using. need know detailed scenarios, can 1 more fit. geo-replication db level data synchronization used dr. sql data sync table level data synchronization used reference data replication both azure db , on-prem db.

html - How to insert password as Hash to Ms SQL in coldfusion? -

i creating form saves user registration. want insert password database hash or md5. this html form few coldfusion codes: <form id="myform" class="ui form segment" method="post" action="registeraction.cfm"> <p>let's go ahead , signed up.</p> <div class="field"> <div class="field"> <label>name</label> <input placeholder="name" name="name" type="text"> </div> </div> <div class="field"> <div class="field"> <label>email</label> <input placeholder="email" name="email" type="email"> </div> </div> <div class="field"> <div class="field"> <label>password</label> <in

web services - Acessing windows schedules task from web -

i need expose scheduled tasks on windows server forecast tool. there way access tasks through webservice or service install? there nice powershell command get-winevent -logname "microsoft-windows-taskscheduler/operational" will avaliable log info

python - Django: Field 'X' doesn't have a default value -

the models.py of table : class testcaseglobalmetricdata(models.model): testrundata = models.foreignkey(testrundata) testcase = models.charfield(max_length=200) cvmtotalfree = models.integerfield(default=0) systemfree = models.integerfield(default=0) sharedmemory = models.integerfield(default=0) and part of code uses table testcaseglobalmetricdata(testrundata=testrundataobj, testcase=tokens['tc_name'], timestamp=tokens['timestamp'], cvmtotalfree=totalfree).save() when line executed following error seen, file "/web/memmon/eink-memmon/projects/process.py", line 382, in process_cvm_usage cvmtotalfree=totalfree).save() ..... warning: field 'sharedmemory' doesn't have default value i tried inserting table using python manage.py shell , works fine. the schema of table seen in mysql is +-----------------+--------------+------+-----+---------+---------

arrays - how to measure apperance frequency of words in a text with PHP -

this question has answer here: count word frequency in text? [duplicate] 1 answer given text (here, convenience, i've put text (text)file), want know how many time(s) each word appear in text. php provides useful function : str_word_count , which, $format argument set 1 , returns simple array of words contained in $string . this code : <?php $lines=array_map("findwords",file("words.txt")); $text=[]; foreach($lines $line) { $text=array_merge($text,$line); } $words=array_count_values($text); //order array values desc, preserving keys $words2=[]; ($i=0;$i<=count($words)-1;$i++) { $numof=max($words); $key=array_keys($words,$numof)[0]; $words2[$key]=$numof; unset($words[$key]); } echo '<pre>'; print_r($words2); echo '</pre>'; function findwords($str) { return str_word_count

ibm bluemix - Can user provided services be shared across multiple apps -

i creating logdrain service in bluemix apps: `cf cups myapps-logdrain -l <logdrain-endpoint>` can bind myapp-logdrain service multiple apps @ time? looked @ cloudfoundry documentation , played logdrain service cf cli. settings don't specify whether or not can shared. yes. log drain service(user provided service) can shared other service. you can differentiate logs different applications querying application guid and/or instance number. you may see logs similar following format: [date][log-service-name][application guid][app-instance-number][log-message] apr 21 00:35:44 bluemixlogs 3398064b-8de6-46dd-egf1-0dde35546496/[app/0]: sending logs 3rd party service : log info

c# - Unable to step-in to Recursive function breakpoint VS2013 -

i trying convert method loops recursion part of coding kata practices(trying solve problems recursive approach). there's nothing in logic the breakpoint not being hit anywhere in recursive method. i tried place logger(console output) check if method called nothing being logged. here's method definition(s): // original method loop public ienumerable<tuple<int, int>> getelementwithlargestdeltaontimeline(int[] a) { int runninglindex = 0; int currlvalue = a[0]; int runninghindex = 1; int currhvalue = a[1]; int currdelta = 0; (int = 1; < a.length - 1; i++) { if (a[i] < currlvalue) { currlvalue = a[i]; runninglindex = i; } (int j = runninglindex + 1; j < a.length; j++) { if ((a[j] - currlvalue) > currdelta) { currdelta = a[j] - currlva

java - Problems converting a csv file to flare.json -

i not programmer , new java. have searched method convert csv flare.json use in d3.js data visualisations. simplest method found here https://github.com/albertchang/csv-to-flare.json-d3-parser/blob/master/readme.md i tried keep receiving error message in command line (terminal on mac os x el capitan): command not found. java , javac programmes present , correct recent versions. here screenshot of working directory located in d3_projects sub folder. here first few rows of csv file type,ca1,ca2,ca3,ca4 customer,sales , marketing,marketing,market research, customer,sales , marketing,marketing,marketing communications, customer,sales , marketing,marketing,pricing, customer,sales , marketing,sales,sales planning , forecasting, customer,sales , marketing,sales,customer segmentation, customer,sales , marketing,sales,customer acquisition,opportunity management there empty flare.json file in working directory (i tried run programme without empty file). below copy of add

python - Exec function working for one method, and not the other -

context: part of code running inside of class called commands, within method called looper . idea code, when input python command line, if 1 word, runs method name. if greater 1 word, take takes first word, make method command, , else argument. cmd = input("user>>> ") cmdsplit = cmd.split() lencmd = len(cmdsplit) if (lencmd== 1): cmd = "commands." + cmd + "()" print(type(cmd)) logging.debug("this length of 1") try: exec (cmd) except: print ("not valid command.") it appears, when type chrome (one of methods posted below) line, exec breaks, , wont work. if use hearth (the other method, works fine). cant see reason chrome not work, hearth work. exec not word chrome? def chrome(): subprocess.popen("chrome.bat", cwd=r"c:\cmdcommands") def hearth(): subprocess.popen("hearth.bat", cwd=r"c:\cmdcommands") output program: user>>

syntax - nested let and if statements -

i having issues understanding sml's syntax nested let s , if s. example, why syntactically ill-formed? fun stuff = let val p = 2 in if = 1 let val r = p in = r end else 0 end if a 1 make a equal to r , if a not 1, not create r in first place , return 0. kinda stupid, o well... so, why syntactically incorrect? it not syntactically incorrect. type error. the problem both branches of if need have same type, whereas then -branch has type bool ( a = b comparison, not assignment, if assignment, it'd have type unit , wrong type) , else -branch has type int . can make code compile returning boolean in else branch this: fun stuff = let val p = 2 in if = 1 let val r = p in = r end else false end ps: note can assign ref s in sml, if wanted assign a in code, you'd need make int ref rather plain int .

JavaFX CSS Styling: Change Highlight color of Selected Tabs -

Image
i'm trying change highlighted color of selected tabs. seems standard blue , not -fx-border-color adds border on top of blue highlight. wondering property changes color. see images below: try this: .tab-pane:focused > .tab-header-area > .headers-region > .tab:selected .focus-indicator {-fx-border-color: red}

ERROR Trying to connect to MySQL in STS using Spring Framework and Hibernate -

[console output][1] [1]: http://i.stack.imgur.com/d79nj.png error trying connect database. ideas why? did research, went through code several times , still can't understand why not connect. web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <display-name>estore</display-name> <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener> <context-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/spring/*</param-value> </context-param> <servlet> <ser

How can I recursively nest XML nodes, based on an attribute value, using XSLT? -

i need transform xml using xlst 1.0 in visual studio 2013. i have following xml: <?xml version="1.0" encoding="utf-8"?> <root> <messagetemplates> <messagetemplate> <segment name="uno" cardinality="first"> <value>something</value> </segment> <segment name="dos" cardinality="second"> <value>something</value> </segment> <segment name="tres" cardinality="third"> <value>something</value> </segment> <segment name="quatro" cardinality="third"> <value>something</value> </segment> <segment name="cinco" cardinality="second"> <value>something</value> </segment> <segment name="seis" cardinality="third&q

ruby - Rails undefined method but method exists -

maybe i've been staring @ code long, i'm doing seems trivial, yet code still isn't working. i'm using modal submit parameters controller, should patch object, instead, i'm getting undefined method 'ignore_reason=' nil:nilclass . the modal <div class="modal fade" id="deferhostmodal" tabindex="-1" role="dialog" aria-labelledby="deferhostlabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="deferhostlabel">defer host</h4> </div> <div class="modal-body">

php - Using liip image filter outside of a twig -

i'm trying use liip outside of twig convert several images (100+) smaller size in cron job. can't seem find documentation on it. have experience this? the liipimaginebundle integrates standalone php " imagine library ". this library included in project dependency of liipimagebundle can use standalone example: $imagine = new imagine\imagick\imagine(); $imagine->open('/path/to/image.jpg') ->save('/path/to/image.jpg', array('jpeg_quality' => 50)) // 0 100 ->save('/path/to/image.png', array('png_compression_level' => 9)); // 0 9 read here docs , more example.

linux - After I deleted a directory, it always prompts "shell-init error retrieving current directory getcwd solve" when log on bash -

i know changing existing directory may solve problem. thing deleted was not home directory . deleted directory /home/desktop/zeno , created root, , $home variable /home/zeno . took @ ~/.bashrc , ~/.profile , /etc/profile , found no commands asking initialize bash @ /home/desktop/zeno . should examined next? appreciated. when opening new shell or xterm, it's started in working directory of process started it. if e.g. cd /proc && xterm , new terminal place in /proc . whatever's starting terminal had positioned in /home/desktop/zeno , , terminals trying start there. if make process change directory (by rebooting, example), terminals start in directory exists , no longer error.

excel - Call Application.OnTime with fully qualified path to sub? -

i have spreadsheet implemented timer in automatically update formula every 10 seconds. working great until open spreadsheet. assumption was still trying run timer() on wrong sheet. so, tried switching absolute calls. here full code: dim timeractive boolean sub starttimer() start_timer end sub private sub start_timer() timeractive = true application.ontime now() + timevalue("00:00:10"), "timetrack.xlsm!tracker.timer" end sub sub stop_timer() timeractive = false end sub sub timer() dim tracker worksheet set tracker = workbooks("timetrack.xlsm").sheets("tracker") tracker.range("o1").value = "timer stopped" 'on error resume next if timeractive tracker.range("o2").value = time application.ontime now() + timevalue("00:00:10"), "timetrack.xlsm!tracker.timer" tracker.range("n:n").calculate end if tracker.range(&qu

Do not want Html after php is executed -

i have following code: <?php ... ?> <script> .... </script> <html> ... </html> after displaying html form, javascript should validate , php should save in database , give confirmation message.. happens is, after php executed , success message echoed, html form displays below message.. can avoid this? i prefer set variable if form submission successful. following: <?php $success = false; if (isset($_post['submit'])) { // process form submission // if submission validates; set $success true } ?> <!doctype html> <html> <head> … </head> <body> <?php if ($success): ?> <p>thank submission!</p> <?php else: ?> <form action="" method="post"> … </form> <?php endif; ?> </body> </html>

c - Structure Alignment when Accessed by Pointer -

when accessing structure byte stream (file, network, etc...) alignment mean? for example, can understand why compiler want pad following structure bytes align int , short b @ word addresses (multiples of 4). however, mean when accessing memory @ random address via using pointer? using -> operator generate inefficient code? or missing something? typedef struct{ void* ptr; //4 bytes char c1; //1 byte int a; //4 bytes char c2; //1 byte short b; //2 byte char c3; //1 byte } odd_struct; //minimum needed = 13 bytes, actual (with padding) = 20 unsigned char buffer[128]; odd_struct odd_struct; odd_struct.a = 123456789; odd_struct.b = 12345; printf("sizeof(odd_struct): %d\n", sizeof(odd_struct)); memcpy(buffer+3, &odd_struct, sizeof(odd_struct)); odd_struct* testptr = (odd_struct*)(buffer+3); printf("testptr->a: %d\n", testptr->a); printf("testptr->b: %d\n", testptr->b);

javascript - Sticker Book style app to svg -

i have div relative position , several pngs in absolute position , different width/height + rotate values. need generate svg without using plugin. sticker book kids. update: i able make php script generate image. here's new problem: source container width: 700, height: ratio based. final container width: 1200, height: ratio based. icon 1 source: width=150px, height=80px, left=30px, top=40px icon 2 source: width=100px, height=100px, left=90px, top=20px ...and on. 6-7 stickers @ 1 time above config. all above details sent php script generate image. need calculate scaling of icons in final container using data above. not width , height x , y position final image looks source bigger version. appreciate of help/comments.

html - Why is text within a fieldset appearing sometimes larger on mobile devices? -

Image
this question has answer here: chrome on android resizes font 7 answers i found strange chrome “feature” don't understand. when using fieldset responsive design, text within fieldset appear bigger compared other contents of page. when remove few characters text, takes same size other block on page. for instance, following page generated chromium 49 using device mode . display similar on android smartphone running chrome. firefox in responsive design mode doesn't have glitch. this the corresponding code . there no external css files. <html> <head> <style> body{font-size:.8em;} </style> <body> <div> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit. morbi porta sus cipit ultricies. sed velit quam, viverra eget accumsan dapibus, finibus eu lorem. vestibulum aliquam, neque

unity3d - Cannot mute audiosource after returing to the scene (Unity C#) -

hello have menu scene have mute button , empty gameobject audiosource , dontdestroyonload script attached it. here code gameobject. using unityengine; using system.collections; using unityengine.ui; public class backgorund_music_manger : monobehaviour { audiosource ads; public gameobject backgroundmusic; bool play_sound = true; void awake() { ads = getcomponent<audiosource>(); if(scenemanager.music == true) { destroy(this.gameobject); } else { dontdestroyonload(this.gameobject); } scenemanager.music = true; } void update() { if(scenemanager.currentscene == 4) { ads.volume = 0.1f; } else { ads.volume = 1f; } } public void stop_sound() { ads = getcomponent<audiosource>(); if(play_sound == true) { ads.pause(); play

coded ui tests - Difference between "new WinWindow(UITestControl.Desktop)" and "new WinWindow()" -

when initializing winwindow in codedui, whats exact difference between var win = new winwindow(); and var win = new winwindow(uitestcontrol.desktop); in windows controls' root desktop, if no parent specified in winwindow constructor, search of control should start desktop anyway. there's no difference between results, second constructor although makes possible specify control parent of control. if use desktop or not.

Pandas Input/output error? -

i created multiindex .h5 file , use hdfstore store data. however, when try read dataframe file, turns out can read dataframes fail read several others. following error message get: hdf5-diag: error detected in hdf5 (1.8.9) thread 0: #000: h5dio.c line 174 in h5dread(): can't read data major: dataset minor: read failed #001: h5dio.c line 449 in h5d_read(): can't read data major: dataset minor: read failed #002: h5dcontig.c line 560 in h5d_contig_read(): contiguous read failed major: dataset minor: read failed #003: h5dselect.c line 275 in h5d_select_read(): read error major: dataspace minor: read failed #004: h5dselect.c line 210 in h5d_select_io(): read error major: dataspace minor: read failed #005: h5dcontig.c line 890 in h5d_contig_readvv(): can't perform vectorized sieve buffer read major: dataset minor: can't operate on object #006: h5v.c line 1457 in h5v_opvv(): can't perform operation maj

java - Click on an image which changes dynamically -

i have set of images properties change every time web app executed. need click 1 of them in particular, can't identify uniquely. here current code: list <webelement> listofimages =driver.findelements(by.classname("thumb")); (webelement image : listofimages) { system.out.println("image: " + image.getattribute("src")); } i'm getting of them in console see this: image : image : image : image : image : image : image : image : image : here html code: <label>selecciona tu imagen de seguridad.</label> <div class="aligncenter-img-carosal"> <div id="thumbs" class="margin0"> <div class="item active"> <ul class="thumbs noscript mrgn-lft-minus20"> <li> <a class="thumb" rel="history" href="#"> <img id="secimgtitle0" alt="/webteal/resources/common/images/sec

Convert Character to Integer in Swift -

i creating iphone app , need convert single digit number integer. my code has variable called char has type character, need able math it, therefore think need convert string, cannot find way that. with character can create string . , string can create int . let char: character = "1" if let number = int(string(char)) { // use number }

android - new intent after click callback -

i have listview , when clicks on option want create new intent. menu item. first time working list views, i'm missing right way this, there easy fix? private void registerclickcallback() { listview list = (listview) findviewbyid(r.id.mainlist); list.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view viewclicked, int position, long id) { textview textview = (textview) viewclicked; toast.maketext(main.this, position, toast.length_short).show(); if(textview.gettext().tostring() == "my profile"){ intent intent = new intent(this.getapplicationcontext(), myprofile.class); startactivity(intent); } } }); cannot resolve method 'getapplicationcontext' you can't use this.getapplicationcontext() since you're inside new adapterview.onitemclicklistener() , there, this doesn't have method.

entity relationship - One-to-one relations that only go one way in Laravel -

is possible/right have a relation between tables only goes 1 way ? have invoices table need reference in other tables likes commission_payments , membership_payments invoices table not need commission_payment_id or membership_payment_id . in other words, there different types of transactions can happen , may have invoice attached, invoice not need reference these transaction tables. invoices commission_payments membership_payments --------------- --------------------- --------------------- -id -id -id ... -invoice_id -invoice_id ... ... i have created eloquent models each table. added hasone relation invoices on other 2 models. class commissionpayment extends model{ public function invoice(){ return $this->hasone('app\models\invoice'); } } i tried accessing comission payment's attached invoice this: $com = commi

python - Dataframe PANDAS -

i want merge duplicate rows in particular column , rearranging data. instance, have following dataframe: cont id1 id2 id3 id4 id5 id6 id7 63309 89 101.3 na na na na na na 63309 89 na 102.3 na na na na na 63309 89 na na na 104 na na na 63309 90 na na 103 105.0 na na na 63309 89 na na na na na 107.1 na 63310 92 na 105.1 105.3 789.1 104 na na 63310 92 109 na na na na na na 63311 94 104 109 890 na na na 107 63309 89 na na na na 109 na 111 i want result in following format: cont id1 id2 id3 id4 id5 id6 id7 63309 89 101.3 na na na na na na 89 na 102.3 na na na na na 89 na na na 104 na

android - Array Adapter is not functioning Correctly -

i using array adapter populate listview user input. array adpter not work , crashes app. don't no why , appreciate if explain why. below class , error get. my class import android.content.intent; import android.os.bundle; import android.app.activity; import android.support.v7.app.appcompatactivity; import android.util.log; import android.view.view; import android.widget.arrayadapter; import android.widget.button; import android.widget.edittext; import android.widget.listview; import android.widget.toast; public class addscore extends appcompatactivity { private listview lv; private edittext player; private edittext description; private edittext winner; private edittext game; private button btn3; private string tag = "hannah"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_add_score); // mysqlitehelper db = new mysqliteh

Adding User Control (WPF) to Panel in Windows Form c# -

i'm making outlook add in when user launches add in, windows form comes up. within windows form, dynamically adding user controls based on user input. the problem i'm having adding control programmatically. works fine if add standard textbox when add user control, below exception; the best overloaded method match 'system.windows.forms.control.controlcollection.add(system.windows.forms.control)' has invalid arguments cannot convert 'outlookaddin.controls.rform' 'system.windows.forms.control' i tried casting control usercontrol new exceptions arose. main form: using system.windows.forms; namespace outlookaddin { public partial class main : form { public main() { initializecomponent(); } private void lblreactivemaintenance_click(object sender, eventargs e) { outlookaddin.controls.rform reactivemaintform = new outlookaddin.controls.rform(); reactiv

c - Dynamically allocating in main() VS in a funtion -

int foo(int *p){ p = malloc(sizeof(int)); *p = 20; } int main(){ int a; int *x; x = &a; foo(x); printf("%d \n", a); return 0; } so i'm trying point @ a , set value of x pointing 20. whenever allocate pointer in function random number being printed. know why happens compared allocating in main()? you don't want allocate in foo function @ all. doing: void foo(int p) { p = 2; printf("%d\n", p); } int main() { int a=1; foo(a); return 0; } and asking why didn't print 1. answer is, you're writing on pointer a, no longer have pointer when *p = 20; .

shell - Xsetwacom works fine, but won't run inside a bash script -

i decided set simple bash script automatically setup wacom tablet, i'm having issues. here's file: #!/bin/bash #used setup wacom tablet (intous draw) xsetwacom --list echo "setting wacom tablet..." sudo modprobe -r wacom sudo modprobe -r wacom_w8001 sudo modprobe wacom sudo modprobe wacom_w8001 echo "configuring pen buttons..." xsetwacom set "wacom intuos s 2 pen stylus" button 2 key +space echo "configuring tablet buttons..." xsetwacom set "wacom intuos s 2 pad pad" button 1 key +ctrl z -ctrl xsetwacom set "wacom intuos s 2 pad pad" button 3 key +ctrl xsetwacom set "wacom intuos s 2 pad pad" button 8 key +ctrl +shift z -shift -ctrl xsetwacom set "wacom intuos s 2 pad pad" button 9 key +alt +shift +ctrl k -ctrl -shift - alt echo "mapping tablet dvi-0..." xsetwacom set "wacom intuos s 2 pen stylus" maptooutput dvi-0 echo "done!" exit 0 if enter these commands ma

Mapping keys from 3 different jsons in python 3 from Survey Monkey. -

i'm working survey monkey's api , having included following keys in code. below respective json structures. trying map data every survey_id, can see every custom_id , custom_id's individual answers (survey details). after combining information, put in database. what's best way combine/map data? 1) survey_id: { "title": "my survey", "language": "en", "question_count": 0, "page_count": 0, "date_created": "2015-10-06t12:56:55+00:00", "date_modified": "2015-10-06t12:56:55+00:00", "id": "1234", "href": "http://api.surveymonkey.com/v3/surveys/1234", "buttons_text": { "done_button": "done", "prev_button": "prev", "exit_button": "exit", "next_button": "next" }, "custom_variables": { "name

ios - How do I constrain a UIStackView to the center of its parent view? -

Image
the goal 2 stack views side side horizontally, left 1 contained left , center, right 1 constrained right , center, automatically resize on each size device still maintain center border b/w each other (using interface builder). it sounds want 1 subview fill left half of superview, , other subview fill right half of superview. constrain left subview's top, leading, , bottom superview. constrain right subview's top, trailing, , bottom superview. constrain left subview's trailing right subview's leading. constrain widths of subviews equal. left subview's constraints right subview's constraints

javascript - Style.length and Style.width are not working -

console.log(document.getelementbyid("mycanvas").style.length); i have code in program. returns 0, despite length of canvas being 660. know why? you can width , height through this. var canvas = document.getelementbyid("mycanvas"); var width = canvas.width; var height = canvas.height;

Creating array of buttons gtk in c -

i need create array of buttons in c. not sure missing, please me. here array: gtkwidget *button[5]; int i; ( =1; i<5; i++) button[i] = gtk_button_new(); then creating rest of buttons... using button [i] , @ end i++; not best way, not sure when create array, how pass button 1, button 2 , etc in rest of statements? please appreciated. p.s. new in c, dont harsh on me, ty:) /* creates new button label "button 1". */ button[i] = gtk_button_new_with_label ("button 1"); /* when button clicked, call "callback" function * pointer "button 1" argiument */ g_signal_connect (button[i], "clicked", g_callback (callback), "run button 1"); /* instead of gtk_container_add, pack button invisible * box, has been packed window. */ gtk_box_pack_start (gtk_box (box1), button[i], true, true, 0); /* remember step, tells gtk our preparation * button complete, , can displayed. */ gtk_widget_show (button[i]

Symfony dom crawler with css selector is not finding all matches -

Image
given following html full html can found here: http://pastebin.com/b3jasxwx and using dom crawler code $pd->filter('.content > ul > li')->each(function(crawler $node, $i){}) when looping on results, it's stopping @ first <script> tag nested under <ul> element, , instead returning 9 elements, instead of 14 <li> elements. is bug, or design, , there me <li> items without resorting preg_match? i've implemented stripping out .* tags before feeding html symfony dom parser, seems have cured issue having. given tags contained dom modifying code, i'm guessing symfony parser incorrectly reading dom tags inside tags valid tags, , not javascript modifications. tl;dr - before passing raw html symfony, make sure strip out tags

what is "-idt" option means in docker run -

i had run few case of docker, run -idt appeared many times. but in docker doc , run options not include -idt wish figure out means? , for? that including 3 single level options 1 batch. -i interactive -d detached -t allocate tty

android - How to use DialogFragment for Date Picker in Fragment (onCreateDialog not used) -

i have done little research in dialogfragment , using fragment oncreate dialog not work. understand there documentation http://developer.android.com/reference/android/app/dialogfragment.html#alertdialog although new android programming , not easy understand code involved unless relates doing, below class have problems with: public class addfixture extends fragment { public addfixture() { } private datepicker datepicker; private calendar calendar; private textview dateview; private int year, month, day; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); sethasoptionsmenu(true); } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // inflate layout fragment return inflater.inflate(r.layout.add_fixture, container, false); } @override public void onviewcreated(view view, bundle savedinstancestate) { add_date = (button) view.findviewbyid(r.id.dat

oracle - SQL*Plus in Shell Script: Send COUNT(*) to Variable, Error to File -

i'm calling oracle sql*plus korn shell (ksh). my ultimate goal value sql statement's count(*) shell-script variable. however, if sql error raised, report sql exception in full , terminate script. i'm having hard time accounting both scenarios satisfaction. #!/bin/ksh test_count=$(sqlplus -s scott/tiger << eof1 whenever sqlerror exit 1 set pagesize 0 feedback off verify off heading off echo off select count(*) scott.emp empno > 7777; exit; eof1 ) sql_ret_code=$? if [ $sql_ret_code -ne 0 ] echo "error encountered." echo exit 1 fi echo "test_count = $test_count" exit 0 in "happy path" case, above works (in displays test_count = 8 ). if simulate sql error referencing nonexistent table (e.g., " scott.emp_bogus "), code above prints generic message "error encountered." prefer report full oracle exception, this: error encountered. select count(*) scott.emp_bogus empno