Posts

Showing posts from June, 2015

c++ - Make QDialog modal to operating system -

is possible if qdialog instance exec() uted, entire operating system blocked until user closes dialog? in following minimal example dialog blocks parent widget not os elements outside of qt application. rootwindow.h #ifndef rootwindow_h #define rootwindow_h #include <qapplication> #include <qmainwindow> #include <qtdebug> #include <qdialog> #include <qpushbutton> #include <qmessagebox> #include <qboxlayout> class rootwindow : public qmainwindow { q_object private: qwidget *widgetcentral; qboxlayout *layoutmain; qpushbutton *button; qdialog *dialog; public: rootwindow(qwidget *parent = 0, qt::windowflags flags = 0); ~rootwindow(); private slots: void slotclicked(); }; #endif // rootwindow_h rootwindow.cpp #include "rootwindow.h" rootwindow::rootwindow(qwidget *parent, qt::windowflags flags): qmainwindow(parent, flags) { setcentralwidget( widgetcentral = new qwidget ); widge...

asp.net mvc - how to enable a button in mvc razor based on radio button -

i have following code: in model: <div class="line"></div> <div class="clearfix"></div> @html.radiobuttonfor(x => x.vehicle.car, "car") @html.labelfor(x => x.vehicle.car) <div class="clearfix"></div> @html.radiobuttonfor(x => x.vehicle.van, "van") @html.labelfor(x => x.vehicle.van) <div class="line"></div> <div class=".col-md-6 .col-sm-4 text-center"> <button type="button" class="btn btn-primary" disabled >submit</button> </div> i enable submit button if either of radio button selected. since using htmlhelper method, not sure of using jquery method on it. highly appreciated. you can in client side. below example assumes have jquery library included in page. assuming views' view model has vehicle property of type vehicle enum this public enum vehic...

JavaScript array length is incorrect -

i have array of data called 'plotdata' consists of number of 'rows' of data, 4-element arrays. array 'plotdata' appended using $.post() script few lines down on in code. '...' of variables shown in post request loaded. console.log("plotdata (before update): ", plotdata); console.log("plotdata length: ", plotdata.length); ... ... ... $.post( "/csvgen", {node_num: nodes.tostring(), start_time: starttime.tostring(), end_time: endtime.tostring()}, function(data){ var nodedata = $.csv.toarrays(data); nodedata.foreach(function(element){ plotdata.push(element); }); }, "text" ); i logging array , array.length in console, believing these 2 method calls should execute sequentially. when @ console output, console log of array shows there 28 entries, console log of plotdata.length 14. array appended, turns out actual length of plotdata 14 greater plotdata.l...

asp.net mvc - Jquery components not working with Telerik JQuery(false) -

i add telerik treeview page , noticed treeview not expanding. noticed in _layout file, had line @html.telerik().scriptregistrar().defaultgroup(group => group.combined(true).compress(true)).ondocumentready( @<text> prettyprint(); </text>).jquery(false); i removed .jquery(false) in line , treeview works fine,but other components on page use jquery (like date picker) stopped working. how can ensure works?

bash - Conditional Parameter Substitution while using cat -

i'm using cat create file environment variable. cat <<eof > config environment = ${environment:-dev} eof i need dev, if development or develop . cannot trim because, has other possible values qa , demo , staging etc. please note: cannot use if statement, in environment. used in jenkins execute shell, have parameterized build, using if require me repeat above cat, multiple times any easy way guys.. regards, shan try this: cat <<eof > config environment = $([[ "${environment}" =~ ^dev ]] && environment=dev && echo $environment) eof

ImageJ add watermark -

imagej: best way add watermark image? i use 2 images original image , watermark image. problem (in watermark image)is cannot change opacity of text without changing opacity of background. note: background transparency 100% if did not change opacity of text my recommendation use tool: http://www.paintshoppro.com/en/pages/watermark-photos/ add watermark photos, because watermarks can make photos safer, can removed, started. if tool , make transparent watermark, wouldn't disturb concept of photo, harder remove.

ios - Set colored border for UITableViewCell -

Image
i want tableview cell have colored border , rounded corners. thats tried: // color [cell.contentview.layer setbordercolor:[uicolor colorwithhexstring:@"dbd7d7"].cgcolor]; // rounded corners [cell.layer setcornerradius:7.0f]; [cell.layer setmaskstobounds:yes]; [cell.layer setborderwidth:2.0f]; cell.layer.bordercolor = [uicolor colorwithhexstring:@"dbd7d7"].cgcolor; however, there odd "white triangles" on right , left borders. please take look: how fix that? make sure table view's background color clear , check cell.opaque = no;

Varnish caching - age gets reset -

i have simple site , setting varnish cache on it. server nginx. the cache seems automatically purged after 120 seconds when go on site see age header being reset. can point me towards remove , have pages cached indefinitely or until manually purge varnish? you did not mention os or distribution, example on centos /etc/sysconfig/varnish sets defaults varnish. amongst defaults varnish_ttl=120 , sets default ttl 120 seconds. if wish set high ttl objects, can edit default 1 in /etc/sysconfig/varnish .

ios - Parse: Caught "NSInternalInconsistencyException" -

i'm new parse , need help. have created user not passing through. keep getting following error: 2016-01-05 16:42:13.306 twitterlike[5850:867865] [error]: caught "nsinternalinconsistencyexception" reason "user cannot saved unless signed up. call signup first.": can me understand how solve? to sign user in parse.com pfuser *newuser = [pfuser user]; newuser.username = username; newuser.password = password; newuser.email = email; [newuser signupinbackgroundwithblock:^(bool succeeded, nserror *error){ if (error) { } else { }

php - CodeIgniter 3.0.3 ci_session not saving session data to ci_sesstion table -

i'm new codeigniter , i'm having issues login \ logout ci_session data saving @ all. have setup standard ci_session table using script in codeigniter docs , have setup config file allow session stored in relevant table, nothing is. config.php settinh sessions: $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_encrypt_cookie'] = true; $config['sess_use_database'] = true; $config['sess_expire_on_close'] = true; $config['sess_table_name'] = 'ci_session'; $config['sess_expiration'] = 60 * 30; $config['sess_save_path'] = null; $config['sess_match_ip'] = false; $config['sess_match_useragent'] = true; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = true; here login form mvc files: model login <?php if ( ! defined('basepath')) exit('no direct script access allowed'); ...

How can I use neo4j OGM with idiomatic Scala classes? -

i use neo4j's new ogm library idiomatic (ie, case classes, immutable) scala classes domain objects. are there additional annotations can use make following class work neo4j ogm? country defined below not persisted because @graphid isn't found. if add mutable graph id member var (already undesirable, but...) object persisted without name property. @nodeentity case class country ( val name: string, @graphid val id: java.lang.long = 0 ) am stuck using java-like classes mutable properties now? thanks! steve graphids should never have values assigned them manually. reason why entity not save expected. other i'm not familiar scala related thread on neo4j-ogm , scala neo4j ogm example scala

c# - .Net service receive SERVICE_CONTROL_TIMECHANGE -

i'm writing windows service using vb.net , built-in system.serviceprocess.servicebase class uses onsessionchange function track when users log in , out. can determine how time each user spends on computer. i detect when system time changes, not affect accuracy of data collected, , looks microsoft has added message purpose: service_control_timechange , of windows 7. however, built-in servicebase class not support message, , doesn't seem extensible can add full support message. note can receive message (stripped of it's parameter) using code: public class timemanager public sub new() initializecomponent() 'modify base class' field... enabletimechange() end sub private sub enabletimechange() try dim acceptedcommands reflection.fieldinfo = me.gettype().basetype.getfield("acceptedcommands", reflection.bindingflags.nonpublic or reflection.bindingflags.instance or reflection.bindingflags.ignorec...

c# - How to move a rectangle in a Canvas? -

if want move rectangle in canvas, have modify top , left properties? thats way see possible. making tile-based game, , rectangles want move filled images of enemies , hero. you can use rendertransform on rectangle. <window x:class="wpfapplication2.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525"> <canvas> <rectangle width="10" height="10" fill="red"> <rectangle.rendertransform> <translatetransform x="10" y="10"/> </rectangle.rendertransform> </rectangle> </canvas> </window>

Building subproject requiring installed files of another subproject with cmake -

i wonder if possible without magic tricks build in 1 super project 2 subprojects 1 requires files installation of another? as example: there project a needs file b project b generated @ installation process. both projects cmake-based. real example: i've tried build kcoreaddons extra-cmake-modules (both available here ). kcoreaddons requires cmake files generated @ installation step of extra-cmake-modules . is possible? approach? edit let me simplify go right point: my project (let's call project x ) needs project a needs installed before can used. i've added project a externalproject_add download, configure, build , install steps project x . problem find script project a cannot find when run cmake in fresh clean build directory. that's obvious project a built , installed @ build step of project x . if make project a optional project x project a installed , next time run cmake project x , project a found.

javascript - Chrome extension how to detect that domain has changed in specific tab -

i trying detect when specific tab has domain change - example, leave facebook.com go stackoverflow.com. want detect given tab - not if go facebook.com in 1 tab , stackoverflow.com in another. when event happens, need know domain unloaded. if in specific tab navigate facebook.com stackoverflow.com need event trigger , "facebook.com" stored in variable. i thought following work, tab id changes (and think loading new tab id vs 1 unloaded page??) it's not working. ideas? in content script: window.onbeforeunload = function () { var host = location.host; chrome.runtime.sendmessage({unloadevent : host}, function(response){ if(response.issuccess){ console.log('unload message sent'); } }); } in background: chrome.runtime.onmessage.addlistener( function(request, sender, sendresponse) { console.log('request ', request); ... else if (request.unloadevent){ ...

git - Configuring a TFS 2015 Project - Multiple types of Source Control -

is possible configure tfs 2015 in order have: 1 project in different teams working under using different versions of source control. the structure aiming described in blog post . 1 project entire company, teams slotted underneath that. say company cyclingawesome has 2 teams working under project: cyclingawesome. will team able configure tfs use git (say run website) - , @ same time, team b able configure tfs use tfs source control (say have backend processes)? how affect setting automated builds either team? this available part of tfs 2015.1 , live in vsts @ moment, if want experiment. the workflow supports addition of git repositories team project tfvc start with, not many people go git tfvc ;). with xaml builds, there 2 templates (one tfvc , 1 git), select 1 need build teams code. task (vnext) builds can select source control provider part of repository options.

javascript - Submit Form using ESC Key HTML -

i have form doesn't need submit button. want user press esc key submit form. how can submit form using esc key? if want use $(document).keyup(function(e) { if (e.keycode == 27) $('#your_form').submit(); });

ios - Is there a way to run XCTest(UI) against an archived build(.ipa)? -

i investigating how use xctest close our automation test gap. developer document, see this: xcodebuild test -project myappproject.xcodeproj -scheme myapp https://developer.apple.com/library/tvos/documentation/developertools/conceptual/testing_with_xcode/chapters/08-automation.html#//apple_ref/doc/uid/tp40014132-ch7-sw1 i know if there way run xctest(ui test) against archived build (.ipa)? or can seperate build , test can build first , test against build later? thanks

c++ - HMAC_GOST341194 value mismatch -

i'm not sure place right choise kind of issues(it's rather crypto related), there no other hope spot error, unfortunately. so, here code use compute hmac_gost341194: hmac hmac; string step1, step2, step3; ipad.assign(blocksize, 0x36); opad.assign(blocksize, 0x5c); (size_t = 0ul, e = length; < e; ++i) { ipad.replace(i, 1, 1, secret[i] ^ 0x36); opad.replace(i, 1, 1, secret[i] ^ 0x5c); } step1 = ipad + text; hmac.hash(step1, step1.length(), step2); step3 = opad + step2; hmac.hash(step3, step3.length(), mac); hash function double checked - there no errors , test values equal other sources. my block size 256. i use following s-boxes(cryptopro param set): const unsigned char s[8][16] = { { 10, 4, 5, 6, 8, 1, 3, 7, 13, 12, 14, 0, 9, 2, 11, 15 }, { 5, 15, 4, 0, 2, 13, 11, 9, 1, 7, 6, 3, 12, 14, 10, 8 }, { 7, 15, 12, 14, 9, 4, 1, 0, 3, 11, 5, 2, 6, 10, 8, 13 }, { 4, 10, 7, 12, 0, 15, 2, 8, 14...

java - How to get data on a reference first before executing other code? -

i need data specific location on firebase , put data inside arraylist before processing it. have this: final arraylist<string> data = new arraylist<string>(); firebase ref = rootref.child("data"); ref.addlistenerforsinglevalueevent(new valueeventlistener() {} @override public void ondatachange(datasnapshot snap) { (object obj : snap.getchildren) { data.add(obj.getvalue().tostring()); } } ); processdata(data); i'm newbie kind of stuff, think not if there's tons of data read , if user's connectivity slow. any idea on how solve problem? i not familiar firebase shocked if did not have sort of equivalent android loader callback "onloadfinished(){...}". should find similar in firebase, , call "processdata(data)" within it.

bash - How to insert a pipe and command into the end of the current input? -

i found nice command called espeak. can read stdin , speak result. $ du -sh . | espeak $ ls -a | grep foobar | espeak etc anyway, works fine think putting | espeak end of line every time isn't efficient. want insert automatically without typing hand. there way achieve this? assuming want see output, this: exec > >(tee >(espeak)) that redirects stdout tee process sends espeak process, sending on console or whatever stdout sending before. (for following along @ home, stdout tee process hasn't yet been redirected when starts up, still same before exec command.) have fun. to turn off: exec > /dev/tty

javascript - unable to remove padding -

i'm having issue wordpress site, visual composer , raw html module. i'm new javascript , using raw html module. i'm using raw html module call youtube video in specific way. however, extra padding added top of row can't seem remove. i've tried adding negative margins bottom of "boost chair" row , top of 2 columns below it, nothing seems work. space there. lays out fine if remove raw html module , use regular text or video module. http://0cb.1d0.myftpupload.com extra padding between rows example here offending selector: .vc_row-has-fill+.vc_row-full-width+.vc_row>.vc_column_container>.vc_column-inner try putting in css: .vc_row-has-fill+.vc_row-full-width+.vc_row>.vc_column_container>.vc_column-inner {padding-top: 0 !important;}

javascript - get distance using google maps distance matrix api JSON output -

i developed following code distance of given 2 cities through 2 textfields , want send them google maps distance matrix api using following url. send cities , got json output file. problem how can specific attribute(distance) json file , display on textfield. function m() { var x = document.getelementbyid("autocomplete").value; var y = document.getelementbyid("autocomplete1").value; var url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=" + x + "&destinations=" + y + "&key=aizasyd5kx6vron6yq0vu4s6gsnavzazrwg8wrc"; window.location=url; // go above url , display json output file on browser. dont want shown. processing , should display distance form file on textfield! } the json output file http://pastebin.ca/3318529 please solve this. new json. if have other ideas tell me. many :) if use javascript in browser, need use google maps api. check example:...

jquery - How can i display the data after few seconds? -

i know shouldn't want make spinner longer user. because moment ajax request quick user not able see spinner. is there anyway put @ least 5 secondes instance, after these 5 second data displayed. $.ajax({ type: "post", url: $('#ajaxmorestatus').attr("data-url"), datatype: "html", beforesend: function() { $('.spinner').show(); }, complete: function() { $('.spinner').hide(); }, success: function (data) { $('#ajaxmorestatus').append(data); } }); just use settimeout fake delays: $.ajax({ type: "post", url: $('#ajaxmorestatus').attr("data-url"), datatype: "html", beforesend: function() { $('.spinner').show(); }, complete: function() { settimeout(function () { $('.spinner').hide(); }, 5000); // 5 seconds. }, success: function (data) { $('#ajaxmorestatus').append(data); } }); i...

dictionary - Python / Pandas - Turning a list with inner dictionaries into a DataFrame -

i'm new pandas , need turn list inner dictionaries dataframe below example of list: [('fwd1', {'score': 1.0, 'prediction': 7.6, 'mape': 2.37}), ('fwd2', {'score': 1.0, 'prediction': 7.62, 'mape': 2.57}), ('fwd3', {'score': 1.0, 'prediction': 7.53, 'mape': 2.54})] i this: prediction mape score date fwd1 7.6 2.37 1 fwd2 7.62 2.57 1 fwd3 7.53 2.54 1 anyone available enlight journey? you can convert list of tuples dict first , create dataframe. unfortunately, in structure, index , columns need swapped desired output, need transpose it. assume x list: in [18]: dict(x) out[18]: {'fwd1': {'mape': 2.37, 'prediction': 7.6, 'score': 1.0}, 'fwd2': {'mape...

mysql - Different Value from first select and second select (UNION WITH GROUP BY) -

i have table users : user_id | ui_id --------+------- 4 | 16 --------+------- 5 | 17 --------+------- 9 | 21 user_info : ui_id | fname | lname ------+-----------------+-------------- 16 | joanalyn | lalicon ------+-----------------+-------------- 17 | jose allan | dela cruz ------+-----------------+-------------- 21 | steve | dela cruz overtime : ot_id | approve_by ------+------------ 3 | 4 ------+------------ 6 | 9 ------+------------ 8 | 5 ------+------------ 9 | 9 ------+------------ 16 | 4 and loa : loa_id| approve_by ------+------------ 4 | 9 ------+------------ 6 | 4 i want full name , qty , , qty2 field in 1 query. can't working. can sum of ot_id count , loa_id count can't value separated. my query: select name,qty2 <---- value second select (select concat(ui.fname,' ',ui.lname) name, count(o.ot_id)...

c# - How to debug code compiled with Roslyn in a Visual Studio extension inside current Visual Studio host? -

i have visual studio extensions use roslyn project in current opened solution, compile , run methods it. project can modified programmer. i have compiled project in visual studio extension current visualstudioworkspace. private static assembly compileandload(compilation compilation) { using (memorystream dllstream = new memorystream()) using (memorystream pdbstream = new memorystream()) { emitresult result = compilation.emit(dllstream, pdbstream); if (!result.success) { ienumerable<diagnostic> failures = result.diagnostics.where(diagnostic => diagnostic.iswarningaserror || diagnostic.severity == diagnosticseverity.error); string failuresexception = "failed compile code generation project : \r\n"; foreach (diagnostic diagnostic in failures) { failuresexception += $...

node.js - File and folders create if not exist -

is there fs.create(path) if path not exist create it. for example, fs.create('d:/test/a.txt') , create test folder , a.txt file if a.txt not exist. i know how create file if not exist how folder's'? think simple problem. lib can that? or need parse path , create it? the answer @thefourtheye, use fs-extra module's createfile

php - creating a table using $_POST parameters -

i'm trying create table wich name parameter. possible? this: $result = pg_query("create table '$_post[nome_arquivo_software]' ( id serial constraint pk_'$_post[nome_arquivo_software]' primary key, nome varchar (80), email varchar (80), estado varchar (80), acessos numeric )"); the table name not string literal identifier -> change single-quote double-quotes -> quoted identifier. the name of id field not pk_+string literal whole thing identifier -> "pk_...." // <--- intensive checks on $_post[nome_arquivo_software] , $_post[nome_arquivo_software] here $result = pg_query(" create table \"$_post[nome_arquivo_software]\" ( id serial constraint \"pk_$_post[nome_arquivo_software]\" primary key, nome varchar (80), email varchar (80), estado varchar (80), acessos numeric ) ");

sorting - How to sort text/string in solr using a natural sort order? -

i sort list of values along lines of: 4 5xa 8kdjfew454 9 10 999cc b c9 c10cc c11 in other words, referred "natural sorting", text sorted alphabetically/lexicographically there text, numerically there numbers, if both mixed in same string. i can't find anyway in solr (4.0 atm). there standard way or @ least workable "recipe" ? the closest thing can achieve described in this article from article: to force numbers sort numerically, need left-pad numbers zeroes: 2 becomes 0002, 10 becomes 0010, 100 becomes 0100, et cetera. lexical sort arrange values this: title no. 1 title no. 2 title no. 10 title no. 100 the field type this alphanumeric sort field type converts numbers found 6 digits, padded zeroes. (if expect numbers larger 6 digits in field values, need increase number of zeroes when padding.) the field type removes english , french leading articles, lowercases, , ...

Prevent write to Firebase after back from offline [Android] -

i understood firebase has capability store data locally during offline, , perform write when device online. however disable feature writes in application, prevent users spam database. thanks. all writes queued until there connection firebase servers again. there no api control writes queued , not. the loophole transactions not persisted disk , lost when application restarted.

Can we send Desktop notification or email notification using Google Sheet? -

i have google sheet employees update mileage reading everyday manually (individual sheets). has date column , mileage column. want if don't update mileage column on particular date before 10.00 am, have notification mail or message or desktop. how can that? how google sheets addon? looks you'll need have e-mail included in sheet though. https://chrome.google.com/webstore/detail/add-reminders/heaonogefgelopikfimfllmifhbohdbn?hl=en edit: if isn't comprehensive enough, there pretty write here: http://www.withoutthesarcasm.com/automating-google-spreadsheets-email-reminders/

running sqlite3 script inside bash -

i trying run multiple commands bash file of sqlite3 on ubuntu 15.10. code pull passwords user's google chrome , email them. have sqlite3 part down. i'm trying make simple , easy use them possible. don't know sqlite3 , it's kicking tail. how produce bash file using sqlite3 code? sqlite3 'login data' .mode csv .headers on .separator "," .output userspw.csv select * logins; .exit the answer simple enough. inside batch can echo large data << eof structure. sqlite3 'login data' << eof .mode csv .headers on .separator "," .output userpw.csv select * logins; .exit eof this created results needing.

php Path not found. Include expression is not resolved -

Image
the website javascript , css not working because included path seems not work, phpstorm shows path not found. path correct image 1: i think problem app_dir, removed , phpstorm did not highlight path anymore. as image 2: but cannot remove app_dir because link many files including css. been trying 3 days , have no idea, me please. for debugging purposes please try if ( !defined('app_dir') ) { trigger_error('app_dir not defined', e_user_error); } if ( substr(app_dir, -1)!=='/' && substr(app_dir, -1)!=='\\' ) { trigger_error("app_dir has no trailing slash. app_dir.'conf/....' wont work, app_dir.'/conf/...' might"); } /** configuration of si */ include_once app_dir.'conf/site.php';

javascript - customize images and different text in Highcharts -

i'm new subject of highcarts. have message says "label" , figure categories. need customize individual image or text. how can this? i have code: http://jsfiddle.net/u3o416xb/ labels: { x: -5, y: -20, usehtml: true, format: '<div style="position: absolute; left: 40px"> label </div> <img style="height: 30px; width: 30px; margin-top: 10px" src="https://cdn2.iconfinder.com/data/icons/free-3d-printer-icon-set/512/plastic_model.png"></img>' } you can give label following way. formatter: function () { return "<div style='position: absolute; left: 40px'>'"+ this.value + "'</div> <img style='height: 30px; width: 30px; margin-top: 10px' src='https://cdn2.iconfinder.com/data/icons/free-3d-printer-icon-set/512/plastic_model.png'></img>"; and custom image following way: var categoryimgs = { 'number1...

regex - Python regular expression to exclude the end with string -

i have file rows like from david.horwitz@uct.ac.za fri jan 4 06:08:27 2008 received: (from apache@localhost) return-path: <postmaster@collab.sakaiproject.org> <source@collab.sakaiproject.org>; i trying read each line , use regular expression find domain name, portion after sign @. here code wrote if re.search('[@]\s+?', line) : org = re.findall('@(\s+)',line)[0] but returns following results uct.ac.za localhost) collab.sakaiproject.org> collab.sakaiproject.org>; is there smart way keep domain , not include ')', '>' or '>;' followed domain name? slight correction - fqdn can include numbers also... so regex needs slight adjustment to [@][a-za-z0-9.-]+ full domain rules @ https://en.wikipedia.org/wiki/uniform_resource_locator

javascript - Stop embedded youtube iframe? -

i'm using youtube iframe embed videos on site. <iframe width="100%" height="443" class="yvideo" id="p1qgnf6j1h0" src="http://www.youtube.com/embed/p1qgnf6j1h0?rel=0&controls=0&hd=1&showinfo=0&enablejsapi=1" frameborder="0" allowfullscreen> </iframe> and have multiplie videos on same page. i want stop of them or 1 of them in click of button using javascript or so. is possible? update: i tried talvi watia said , used: $('#mystopclickbutton').click(function(){ $('.yvideo').each(function(){ $(this).stopvideo(); }); }); i'm getting: uncaught typeerror: object [object object] has no method 'stopvideo' you may want review through youtube javascript api reference docs. when embed video(s) on page, need pass parameter: http://www.youtube.com/v/video_id?version=3&enablejsapi=1 if want stop videos bu...

javascript - Calling prototype method inside function not working -

trying create 1 gallery class using javascript , jquery . i have prototype function gallery class, when try access functions inside class shows error. uncaught typeerror: gallery.start not function my jsfiddle link here javascript: /** * * @param options should object of following * options.images array of gallery images url * options.start slide starting point * options.autoplay option false default * */ function gallery(options) { var _this = this; var galleryoptions = options; function randomstring(len, charset) { var ranstring = ''; var randompoz; charset = charset || 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789'; (var = 0; < len; i++) { randompoz = math.floor(math.random() * charset.length); ranstring = ranstring + charset.substring(randompoz, randompoz + 1); } return ranstring; } function addthumbnail(imgsrc) { return '<li class="thumbnail__list">...

python - Extracting new errors from log file and emailing result -

the following python 2.5 script works beginner wonder if there blatant mistakes or perhaps better way trying achieve? the aim open current day's log - '/library/application support/perceptive automation/indigo 5/logs/' , extract lines have word error , email new errors. after error lines extracted number of lines counted ( prenumlines ) in tmp.txt . extracted lines written tmp.txt file , lines counted again ( postnumlines ). line numbers greater prenumlines printed 'thebody' , emailed. from datetime import date import linecache filedate = str(date.today()) thebody = [] tmpfile = open('/library/application support/perceptive automation/indigo 5/logs/tmp.txt') prenumlines = sum(1 line in tmpfile) log= open( '/library/application support/perceptive automation/indigo 5/logs/' + filedate + ' events.txt', 'r' ) tmpfile = open('/library/application support/perceptive automation/indigo 5/logs/tmp.txt', 'w...

Oracle MCS-Storage -

i have created storage collection in oracle mcs. can access collection using roles assigned ,but want know whether possible access collection "anonymous user(without credentials)" in oracle maf. storage not yet support anonymous access. answer question no. frank

android - Select text inside edittext in Espresso -

i want select text inside edittext can check copy , paste option using espresso. have tried , onview(withtext("text")).perform(longclick()); this perform long click in edittext. text not selected. for simple "catching" part of text use hamcrest matchers containsstring() , startswith() , endswith() . although,as said, need match specific text copy , paste in place. i think might pretty impossible test espresso. may need take action ui testing tool called uiatomator . uiatomator , great tools made google allows test android system functions notifications, screen lock or copy , paste operations. it's working pretty espresso test framework. for finding more info, please read article: http://qathread.blogspot.com/2015/05/espresso-uiautomator-perfect-tandem.html and uiautomator documentation, find here . hope help.

c# - How to use new window instead of new tab display gridview data on click event in .net? -

here code: response.write("window.open('loginfo.aspx?id=" + btn.commandargument "','height=200,width=200,alwaysraised=yes')"); but still didn't work new window instead of new tab. now got shows data in gridview in new tab, need show new window. for should do? update: <asp:templatefield headertext="log info"> <itemtemplate> <asp:button runat="server" id="btnloginfo" text="log-info" commandargument='<%# eval("book_id") %>' onclick="loginfo_click"/> </itemtemplate> <controlstyle backcolor="#ff0066" forecolor="white" /> </asp:templatefield> cs: protected void loginfo_click(object sender, eventargs e) { button btn = (button)(sender); scriptmanager.registerstartupscript( this, get...

android - Undefined variable in php script -

Image
seriously , have no idea what's wrong php script. i'm want update data android mysql through php script. all column value can updated except timein . can't figure out what's wrong in code. updatedetails.php <?php if($_server['request_method']=='post'){ //getting values $id =$_post['id']; $project =$_post['project']; $description =$_post['description']; $progress =$_post['percentage']; $timein =$_post['timein']; $timeout = $_post['timeout']; require_once('dbconnect.php'); $sql = "update work_details set project = '$project', work_description = '$description', percentage = '$progress', timein = '$timein' , timeout ='$timeout' id = $id;"; //updating database table if(mysqli_query($con,$sql)){ echo ' updated successfully'; }else{ echo 'could not update. try again'; } //closing conne...

delphi - tool to show bpl entry points? -

trying see why we're getting "entry point not found" when know should in there. aside map, there tool that'll "explore" .bpl or .dll , show entry points? delphi comes a command-line program called tdump print, among other things, lists of imported , exported symbols binary. bpl file dll specially formatted function names. the documentation says tdump unmangle names -um option, think might apply c++ name mangling, not changes delphi makes identifiers. try , see. if names remain mangled, it's not too hard recognize names you're looking for.

Getting each anchor value with Jquery -

i'm trying build list of emails webpage formatted so: <div class="somediv"> <div class="email-popdown"> <a href="mailto:sue@domain.com">sue@domain.com</a> </div> </div> <div class="somediv"> <div class="email-popdown"> <a href="mailto:mark@domain.com">mark@domain.com</a> </div> </div> <div class="somediv"> <div class="email-popdown"> <a href="mailto:jane@domain.com">jane@domain.com</a> </div> </div> here javascript isn't working: $('.email-popdown').each(function(i, obj) { $('body').append($(this).child('a').attr('href') + '<br>'); }); any getting list emails as: sue@domain.com <br> mark@domain.com <br> jane@domain.com thanks! use .find() instead of .child , , .replace(...

php - Laravel framework tutorial -

i'm php developer , want learn php laravel framework . helpful website learn laravel framework ?! thanks helping 😊 jeffery way has great site @ www.laracasts.com he has series free on fundamentals of laravel: https://laracasts.com/series/laravel-5-fundamentals

sql - IN vs ANY operator in PostgreSQL -

what difference between in , any operator in postgresql? working mechanism of both seems same. can explain example? there 2 variants of in , 2 variants of any construct. details: how use instead of in in clause rails? the in () variant taking set equivalent = any() taking set , demonstrated here: postgresql - in vs any but second variant of each not equivalent other . second variant of any construct takes array (must actual array type), while second variant of in takes comma-separated list of values . leads different restrictions in passing values , can lead different query plans in special cases: index not used =any() used in pass multiple sets or arrays of values function the any construct far more versatile, can combined various operators, not = . example like : select 'foo' any('{foo,bar,%oo%}'); for big number of values, providing set scales better each: optimizing postgres query large in related: can p...

ruby on rails - Do actions that are not defined in the controller need authorization such as before_action nevertheless? -

my userscontroller not have actions destroy , index , show defined, won't needed. i'll delete users out of database , users page or user index page won't available in application. however, necessary secure actions nonetheless filter such before_action :correct_user provide maximum security or there no way potential attacker somehow manipulate actions in order view or destroy users? besides that, create , new action of postscontroller need protected filter well? read: possible people time on hands create posts id of other users? also, ways make sure actions bulletproof? using tdd -- alternatives? i rather new authorization , security – there resources on topic? books, articles, screencasts do. you can restrict resource routes actions not available. full details available in routing guide: http://guides.rubyonrails.org/routing.html#restricting-the-routes-created something it: resources :users, except: [:index, :show, :destroy]

ios - Debugging of Linea pro 5 using iPhone5s for credit card swiping -

i working on swiping credit card using linea pro 5. there way debug code when iphone 5s connected linea pro. using linea pro4 able debug. use linea pro 4 , connect iphone 5 using iphone 4 adapter.

c# - ORDER BY year and date in mysql and gridview -

im having salary table,in im storing salary details corresponding month , year , payment date.im displaying these data in gridview in asp.net c# application. want display data latest in first page. below sample salary database: +------------+-------+----------+------+----------+------+-------------+ | employeeid | gross | totalded | net | month | year | paymentdate | +------------+-------+----------+------+----------+------+-------------+ | 2066 | 2219 | 3750 | 1531 | january | 2016 | 30.01.2016 | | 2023 | 2218 | 1649 | 570 | january | 2016 | 30.01.2016 | | 2001 | 2219 | 3750 | 1531 | october | 2015 | 30.10.2015 | | 2023 | 2218 | 1649 | 570 | october | 2015 | 30.10.2015 | | 2034 | 2328 | 5728 | 3400 | october | 2015 | 30.10.2015 | | 2023 | 2218 | 1649 | 570 | november | 2015 | 30.11.2015 | | 2030 | 2219 | 1550 | 669 | november | 2015 | 30.11.2015 | | 2047 | 2218 | 1649 | 5...

javascript - Find address recursively from latitudes and longitudes in google map api -

i have latitudes , longitudes want find out addresses. function onsuccess(response) { showlatlng(0, json.parse(response.d).table, json.parse(response.d).table.length); } where json.parse(response.d).table contains result set. function showlatlng(index, resultset, totallen) { var lat = resultset[index].x; var lng = resultset[index].y; var latlng = new google.maps.latlng(lat, lng); new google.maps.geocoder().geocode({ 'latlng': latlng }, function (results, status) { if (status == google.maps.geocoderstatus.ok) { if (results[0]) { var z = " <tr>" + "<td>" + results[0].formatted_address + "</td>" + "</tr>"; $("#result").append(z); if (index < totallen) { showlatlng(index + 1, resultset, totallen); ...

java - How to do test on Item selected In JCombobox -

i want refomuler subject clearly, because not clear. so have 2 jcombobox. if choice item in first second display items. the first , second jcombobox fill request mysql, i create 2 methode, one fill first jcombobox : code : public void filljcboxprj( ) { connexion c = new connexion(); statement s ; resultset rs ; try { s = c.createstatement(); rs =c.selection("select distinct(idprojet),idpro,nomprojet projet projet.iduser='"+this.getid()+"' "); while(rs.next()) { string num = rs.getstring("idpro"); string nom = rs.getstring("nomprojet"); string ref = rs.getstring("idprojet"); jcombobox1.additem(new rf(nom,ref,num)); } } catch (exception ex) { ex.printstacktrace(); } } the sconde methode : fill seconde jcombobox dependent on selected item in first jcombobox code : public ...