Posts

Showing posts from April, 2011

html - Add an image on top of a header image (Wordpress) -

i'm using wordpress theme "illdy" ( https://colorlib.com/illdy/ ) i add image on top of "jumbotron" header image. image should in center of jumbotron header, responsive. if give me advice on how this, appreciate it! thank you! an example: example image you this, , of course need change top , left right positioning want. .images { position: relative; top: 0; } .image_1 { position: relative; top: 0; left: 0; } .image_2 { position: absolute; top: 150px; left: 200px; text-align: center; } <div class="images"> <img class="image_1" src="http://placehold.it/1500x600/ff0000/" alt=""> <img class="image_2" src="http://placehold.it/700x300/000000/" alt=""> </div>

Refresh parent window from child with multiple parent window using javascript -

i have tree window (first-> second -> third). want reload second closing third one. after closing third 1 first 1 getting refresh. had written following script. window.onunload = refreshparent; self.close(); function refreshparent() { window.opener.location.reload(); } apply script in third window's html file , see if works. also, make sure give unique name windows. <script> window.onunload = closemeandrefreshopener; function closemeandrefreshopener() { window.opener.location.reload(); self.close(); } </script>

How to build a source histogram (Anylogic)? -

i´m new anylogic. my question is: how can build histogram of source-distribution? (i want visualize set arrival-specifications) add histogram data object , link histogram. then, in "on exit" code box of source object, add myhistogramdata.add(time()); add current time (when source created agent).

apache - mod_rewrite rule matched, but chain is not left -

please me find solution behavior strange me. here htaccess <ifmodule mod_rewrite.c> rewriteengine on rewriterule ^emltr\.gif$ aaa.html [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php [l,qsa] </ifmodule> note l flag, when "gif" rule matched chain left. not. the requested url "emltr.gif" if "catch-all" rule , conditions commented, "gif" rule correctly taken. ("aaa.html" not exists, test prevent unwanted circular behavior.) if "catch-all" rule uncommented, taken, rather first rule. why second 1 taken rather first? or else: why isn't chain left though l flag, , second rule evaluated? thank you this documented in manual l|last the [l] flag causes mod_rewrite stop processing rule set. in contexts , means if rule matches, no further rules processed. if using rewriterule in e...

How to remove paragraph spacing with CSS? -

this question has answer here: how remove space between inline-block elements? 32 answers i working on project needs aligned letter grid. must peppered tags can mess individual words using css classes. this i've tried far: @import 'https://fonts.googleapis.com/css?family=fira+mono'; .clockcontainer { margin: auto; color: black; letter-spacing: 5px; } .clockletter { font-family: 'fira mono', monospace; display: inline-block; margin: 0; padding: 0; } .clockletter::after { display: none; margin: 0; padding: 0; } .clockletter::before { display: none; margin: 0; padding: 0; } <div class="clockcontainer"> <!-- first row --> <div class="clockletter" id="clockits">its</div> <div class="clockletter" id="clockigno...

How to load the any panorama images from url into android devices? -

explanation: want load panorama image url , load fragment or other view in android.i new android don't know how load image url.i tried lot of demos restriction.in of demos must height divide 2 , width of image double height. has restriction. fact image on server it's of size. description panorama image: panorama images image rotate 360 degree horizontally , 180 degree vertically. problem don't have initial idea load panorama image url. there's no official support showing panoramic images in android.i haven't tried myself can try using library 1 here .

android - public static variable has the value , but when i try to show it to textview(in another class) it has no value -

my activity flow , login page->mainpage(in have button go userprofile has onclick method)-> button onclick method "startactivity(userprofile)" have onclick method loads activity userprofile . want load details of user, have static variables no luck. public class userprofile extends appcompatactivity { textview textview , textview1 , textview2 ; context context_userprofile; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_userprofile); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); func_userprofile_show(); } public void func_userprofile_show(){ string type = "linkuser"; databaselink databaselink = new databaselink(this); databaselink.execute(type); context_userprofile = getapplicationcontext(); textview = (textview)findviewbyid(r...

Finding parameters values given the solution with two non-linear equations in R -

i have 2 equations describe moments (mean , variance) of truncated gaussian distribution. built following function compute them: trunc_moments <- function(moments, a, b){ require(truncnorm) mu <- moments[1] sigma <- moments[2] alpha <- (a - mu) / sigma; beta <- (b - mu) / sigma mu_trunc <- mu + sigma* ((dnorm(alpha, mu, sigma) - dnorm(beta, mu, sigma)) / (pnorm(beta, mu, sigma) - pnorm(alpha, mu, sigma))) sigma_trunc <- sigma^2 * (1 + ((alpha*dnorm(alpha, mu, sigma) - beta*dnorm(beta, mu, sigma)) / (pnorm(beta, mu, sigma) - pnorm(alpha, mu, sigma))) - ((dnorm(alpha, mu, sigma) - dnorm(beta, mu, sigma)) / (pnorm(beta, mu, sigma) - pnorm(alpha, mu, sigma)))^2) return(c(mu_trunc, sigma_trunc)) } given mu , sigma , function returns mu_trunc , sigma_trunc . trunc_moments(c(0.25, 0.02), a=0, b=1) now, reverse results: given function, mu_trunc , sigma_trunc , can obtain values of mu , sigma ?...

html - How to give 2 different Hyperlinks in css different colors -

my aim hyperlink displayed in green color. have given hyperlink class .ueberschrift_name . i tried change color css , html no luck. want change color of existing hyperlink white green. hope can give me hint how solve problem me. add "ueberschrift_name" class html element. add following: css: .ueberschrift_name{ color: red; } html: <a href="default.asp" class="ueberschrift_name" target="_blank">this link</a> jsfiddle: http://jsfiddle.net/zlofsecl/ or - can use inline styles: <a href="default.asp" style="color: red;" target="_blank">this link</a>

linux - How to make Raspberry Pi accessible as local web server? -

i installed apache, php, mysql , phpmyadmin on raspberry pi. i'm seeing okay , working, i'm able run commands mac using ssh. local on raspberry pi, 127.0.0.1 works, i'm unable access raspberry pi mac in same wifi-network. ip-address correct, don't know, issue. thanks lot. have checked apache configuration file? located in /etc/apache2/apache2.conf provide details need. also, apache running? try sudo apache2 service start

ubuntu 14.04 - linphone-android "Error while using running prepare.py" -

i building linphone-android on ubuntu 14.04. according the readme file, finish pre-installation, run check_tools.sh, , find no problem. but, running prepare.py, meet below problem(in cmake/cmakefiles/cmakeerror.log): determining if c compiler works failed following output: change dir: /home/joelly/downloads/linphone-android/work/android-arm/cmake/cmakefiles/cmaketmp run build command:/usr/bin/make "cmtrycompileexec3545077747/fast" /usr/bin/make -f cmakefiles/cmtrycompileexec3545077747.dir/build.make cmakefiles/cmtrycompileexec3545077747.dir/build make[1]: entering directory `/home/joelly/downloads/linphone-android/work/android-arm/cmake/cmakefiles/cmaketmp' /usr/bin/cmake -e cmake_progress_report /home/joelly/downloads/linphone-android/work/android-arm/cmake/cmakefiles/cmaketmp/cmakefiles 1 building c object cmakefiles/cmtrycompileexec3545077747.dir/testccompiler.c.o /opt/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -dandroid -fpie -isystem /o...

ruby on rails - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed -

i using authlogic-connect third party logins. after running appropriate migrations, twitter/google/yahoo logins seem work fine facebook login throws exception: ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed the dev log shows openssl::ssl::sslerror (ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed): app/controllers/users_controller.rb:37:in `update' please suggest.. i ran similar problem when trying use jquery generator rails 3 i solved this: get curl certificate authority (ca) bundle. can with: sudo port install curl-ca-bundle [if using macports] or pull down directly wget http://curl.haxx.se/ca/cacert.pem execute ruby code trying verify ssl certification: ssl_cert_file=/opt/local/etc/certs/cacert.pem rails generate jquery:install . in case, want either set environment variable somewhere server picks or add env['ssl_cert_file'] = /path/to/you...

best xml format for store it in sql server database -

i have workflow in xml format this: ... <workflow> <tasks> <task type="start" id="task_038517r" name="addrequest"> <form id="form_3y245d1"/> </task> ... <task type="final" id="task_1sytah6" name="confirmationrequest"> <form id="form_3y245d1"/> </task> </tasks> </workflow> ... and can change format: ... <workflow> <tasks> <task> <type>start</type> <id>task_038517r</id> <name>addrequest</name> <form> <id>from_3jfu845</id> </form> </task> ... <task> <type>final</type> <id>task_1sytah6</id> <name>confirmationrequest</name> <form> <id>form_3y245d1</id> </form> ...

how to display sql query out in bit-by-bit in form of list (<li>). php codeigniter -

i have sql query: select count(*) tot_std `login` `login_account_type` = 'student' , `login_account_status` = 'active' the out of query 3910. want display result bit bit, not whole number. example want output this: 3 9 1 0 note using php codeigniter. please help. use str_split() split 3910 as $str = "3910"; $arr2 = str_split($str, 1); echo "<ul>"; foreach($arr2 $number) { echo "<li>". $number."</li>" ; } echo "</ul> ";

javascript - Filtering function: use KO struggling -

try convert code: js: self.filter = function() { var s = $('#searchfield').val(); console.log(s.tolowercase().replace(/\b[a-z]/g,"kc")); s = s.tolowercase().replace(/\b[a-z]/g, function(self) { console.log(self.touppercase()); return self.touppercase(); }); $(".locationlist > li").each(function() { console.log(this); $(this).text().search(s) > -1 ? $(this).show() : $(this).hide(); }); for(var = 0; < self.placelist().length; i++) { console.log(self.map); self.placelist()[i].marker.setmap(self.placelist()[i].marker.title.search(s) > -1 ? map : null); } }; }; html: <span class="glyphicon glyphicon-search" aria-hidden="true"></span> <input id="searchfield" data-bind="event: {keyup: filter}" type="text" placeholder='search name or city' value=""> <hr> <ul class="locationli...

excel - Find and Replace Logic -

hi have specific excel sheet list of 100+ queries in column. queries of format below: select mkt_id,sum(nrx) $$current_quarter_table datamonth = $$current_quarter_datamonth the $$ variables parameters intend replace on runtime. have mapping of these variables actual values in separate sheet in excel. like variable|value $$current_quarter_table|bs_q3_sales $$current_quarter_datamonth|201606 now how should find , replace in vba? doing achieve this: dim rng range set rng = config_params.range("c5:q17") 'range of variable value mapping cnt = 38 each cl in rng 'rng2.replace what:= cl.value, replacement:= replacestr = trim(config_params.cells(cl.row, 2) & "_" & config_params.cells(4, cl.column)) debug.print qry debug.print replacestr debug.print cl tmp = replace(cstr(qry), cstr(replacestr), cstr(cl)) cnt = cnt + 1 next the values of variable used follows sel count(distinct customer_id) $$ihc_curr_raw_dump cus...

api - How to add new Payment Gateway in bigcommerce? -

in bigcommerce , how can add new payment gateway if not found required payment gateway in list: https://support.bigcommerce.com/articles/public/available-payment-gateways/ unfortunately, gateways on list have been added bigcommerce requires changes our core app. possible customize blueprint checkout in workaround support gateway not on list. how can integrate third party payment gateway in bigcommerce store?

Remove .NET Framework -

removing framework using tool installing framework error i have remove .net framework computer (windows 10), used tool 'dotnet_cleanup_tool.exe' microsoft. after removing .net framework , restarting pc, when reinstall .net framework using net 4.6.1(ndp461-kb3102438-web).exe , error saying can't install because installed. in control panel > programs > programs , features on left panel select > view installed updates can find "update microsoft windows (kb3102438)" in list ? this place right way uninstall .net framework you find guide : http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx

java - Custom authorization depending on user property -

in application, after user has been logged first time, has change default password. process have changepassword.xhtml page can change password. restrict access page , redirect him changepassword.xhtml until has changed default password. user class has firsttime property have register if first time logged or not. can manage in config class? i think have add user_need_change_password_role role user , give him access password change page. need stored in base of flag of password change , implement authentication-success-handler-ref = "my_handler" . when user has held first authorization, check status of flag. if flag requires password change redirect password change page. after changing password redirect him login page.

ibm mobilefirst - Unable to connect to adapter -

i have following code called when loading page: var resourcerequest = new wlresourcerequest( "adapters/adapter-name/rest/init/" + timestamp, wlresourcerequest.get ); however returns error in console: get http://localhost:10080/project-name/adapters/adapter-name/rest/init/0 404 (not found) while code works: function wlenvinit() { console.log("connecting 1111"); wl.client.connect({c onsuccess: function(){ console.log("connected 2222"); }, onfailure: function(error) { console.log("error in connection"); console.log(error); } }); } how troubleshoot this? make sure adapter deployed visiting console make sure application pointing ip address of host machine mobilefirst server deployed to make sure adapter call correct example calling: client side: https://github.com/mobilefirst-platform-developer-center/resourcerequestco...

c# - Close WPF window that host Pages -

im learning c# wpf. im trying understand how navigation works. i have created test app includes 2 buttons. 1 navigates next page , open new window. navigation between pages not problem. able navigate page1 page2 using button. code below written in page1.xaml.cs private void button_click(object sender, routedeventargs e) { page2 p2 = new page2(); this.navigationservice.navigate(p2); } the problem when try open new window , close previous 1 button, doesnt work. (i wrote on page1.xaml.cs) private void button_copy_click(object sender, routedeventargs e) { window1 win1 = new window1(); win1.show(); this.close(); } its giving me error code cs1061 , telling me not contain definition 'close' ..... here complete code of page1.xaml.cs: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.windows; using system.windows.controls; using syste...

php - Codeigniter Fatal Error Call to a member function result() on boolean -

i have been having problem query results in following error php fatal error: call member function result() on boolean on line 200 i'v had no problems other queries , on 1 have query within query , following: $this->load->helper('date'); $datestring = "%y-%m-%d"; $time = strtotime('yesterday'); $date= mdate($datestring, $time); $db = $this->load->database('macs', true); $query = $db->query("select temp1.user packer, count(temp1.[order]) orders (select audit.user, audit.[order] audit audit.date > '$date' , (audit.type='i11' or audit.type =' 11') group audit.date, audit.type, audit.user, audit.[order]) temp1 group temp1.user order count(temp1.[order]) desc"); return $query->result(); $macsdb->close(); this works correctly in access (the above conversion of access query). query starts work (incorrectly however) when referencing user is removed , works when user replaced field...

c# - Is there any platform/Office store to publish COM outlook Add-in (Desktop App Version) -

Image
i want publish com outlook addin compatible office outlook 2010,1013,2016 desktop version, project has been created using visual studio (c#). after research found there microsoft store platform publish different variants of project (office , sharepoint add-ins , office 365 web apps) unfortunately can't find option publish com addin can publish public access. reference have attached seller dashboard screen asks type of app want publish. no, com addins not allowed app store.

android - I can't understand why addresslist value is null -

edittext location_tf = (edittext) findviewbyid(r.id.mapsearchaddress); string location = location_tf.gettext().tostring(); //geocoder geocoder = new geocoder(context, locale.getdefault()); list<address> addresslist = null; if (location != null || !location.equals("")) { geocoder geocoder = new geocoder(context, locale.getdefault()); try { addresslist = geocoder.getfromlocationname(location, 1); } catch (ioexception e) { toast.maketext(mapsactivity.this, "addess not found", toast.length_short).show(); } if (addresslist != null && addresslist.size() > 0) { address address = addresslist.get(0); latlng latlng = new latlng(address.getlatitude(), address.getlongitude()); mmap.addmarker(new markeroptions().position(latlng).title("marker")); mmap.animatecamera(cameraupdatefactory.newlatlng(latlng)); } else { toast.maketext(mapsactivity.this, "can...

python - insert numpy.float64 element in a numpy array -

i trying insert numpy float in numpy ndarray. code , output is: dos = np.sum(atom[:, :, 1:],axis=0) print("type(dos)") print(type(dos)) print("dos.shape") print(dos.shape) print("dos[15] before") print(dos[15]) print("type(atom[1,0,0])") print(type(atom[1,0,0])) print("atom[1,0,0]") print(atom[1,0,0]) in range(301): dos2=np.insert(dos, 0, atom[1,0,0]) print("dos[15] after ") print(dos2[15]) print("type(dos2)") print(type(dos2)) and corresponding output is: type(dos) <class 'numpy.ndarray'> dos.shape (301, 18) dos[15] before [ -9.75080030e-02 -8.37110240e-02 -3.13760517e-03 -2.70089494e-03 -2.07915835e-03 -1.77532740e-03 -2.03548911e-03 -1.73346437e-03 -1.98000973e-04 -1.64015415e-04 -1.99115166e-04 -1.65569761e-04 -9.07381374e-05 -7.37546825e-05 -1.48250176e-04 -1.22108731e-04 -1.18854648e-04 -9.70416840e-05] type(atom[1,0,0]) <class 'numpy.float64'> atom...

excel - #Value error while accessing user defined function in VBA -

code works fine when access function vba when call same function in excel cell ( postalcode("23.0776120,72.6538530") , #value error. code is: function postalcode(latlng string) string dim xmldoc msxml2.domdocument60 dim xempdetails msxml2.ixmldomnode dim xparent msxml2.ixmldomnode dim xchild msxml2.ixmldomnode dim col, row integer set xmldoc = new msxml2.domdocument60 xmldoc.async = false xmldoc.validateonparse = false ' use xml string create dom, on error show error message if not xmldoc.load("https://maps.googleapis.com/maps/api/geocode/xml?latlng=" & latlng) err.raise xmldoc.parseerror.errorcode, , xmldoc.parseerror.reason end if set xempdetails = xmldoc.documentelement set xparent = xempdetails.firstchild row = 1 col = 1 dim xmlnodelist ixmldomnodelist set xmlnodelist = xmldoc.selectnodes("//formatted_address") worksheets("sheet1").cells(1, 6).value = xmlnodelist.item(0).text dim xyz string postalcode = xmlnodelist...

Using matlab to add contacts to outlook -

i have .xls file containing large amount of emails, want add outlook via matlab. processing .xls file no problem. i found possible send mails via matlab using h = actxserver('outlook.application' and figured might able use purpose. i'm unfamiliar activex/com interface, , how use it. i tried use get(h) did not give me useful information. two questions. 1) how can use matlab add contacts. and secondly, more general, how able find out can 'h' in case? see people using h.subject or h.to how able find out possible things (like subject or to) can h? to add contact need create contactitem object through activex control: h = actxserver('outlook.application'); newcontact = h.createitem('olcontactitem'); newcontact.firstname = 'john'; newcontact.lastname = 'smith'; newcontact.email1address = 'john.smith@email.email'; newcontact.save(); % newcontact.display; % check work h.release; % close activex int...

javascript - two way data binding using dynamic component loader in angular2 -

i want know how 1 can establish 2 way data binding components loaded using dynamic component loader in angular2.for ex. ngafterviewinit() { //console.log('generic component...' + this.componentname + " loading"); let componentindex = this.keysregister.indexof(this.componentname); this.dcl.loadnexttolocation(this.typesregister[componentindex],this.target) .then(ref => { ref.instance.componentmodel = this.componentmodel; }); console.log('generic component...' + this.componentname + " loaded"); } so if making changes componentmodel in dynamically loaded component , should reflect in generic component & vice versa. inputs? first: dynamiccomponentloader deprecated couple of versions now, private in next version or after. @ implementation , copy it's quite simple. resolve component using componentresolver , returns factory used viewcontainer create component. the main difference dynamiccomponentloader u...

linux - Why does systemd keep killing my service -

i start interactive script systemd after getty.target has been reached. works far, however, systemd kills script after couple of seconds. systemd unit looks following: [unit] description = interactive script requires = getty@tty1.service after = getty@tty1.service [service] type = oneshot execstart = /usr/local/bin/my-script standardinput = tty standardoutput = tty ttypath = /dev/tty1 ttyreset = yes ttyvhangup = yes [install] wantedby = multi-user.target within script there calls dialog , mount etc. nothing special interactive script. systemd keeps killing script , don't understand why. output of systemctl status interactive-script.service looks like: ● interactive-script.service - interactive script loaded: loaded (/etc/systemd/system/interactive-script.service; enabled) active: inactive (dead) since tue 2016-06-28 10:18:07 utc; 14min ago main pid: 364 (code=killed, signal=hup) and log output gotten journalctl -b -u interactive-script.service empty: -- lo...

rtf - repeating header in BI publisher template -

i trying design template in bi publisher xml file generated oracle bi publisher. i want header part repeat on pages if data printed across pages header portion related data should printed on pages. i tried include repeating group in header , end tag in body, not working me. header section related body , each group can have different headers can 1 me on this? assuming have 2 level hierarchy in xml, want value level1 repeated across pages, if data in level2 overflows. can achieved <?for-each@section:level?> command <?for-each@section:level1?> <?for-each:level2?> <?name?> <?end for-each?> <?end for-each?> now need give <?level1?> in header. printed across pages when level2 records overflow.

Grails: Error while applying criteria Query -

i applying criteria query find sum of columns , save result in long format. when there data in table, working fine, in case no match records found, following error thrown: cannot cast object 'null' class 'null' class 'long'** my code is: long referralpoints = referraldetail.createcriteria().get { eq('referredby', user) projections { sum('referralpoints') } } use long instead of long . primitives cannot null.

jquery - TD :contains String but not within a span Element -

i want check wether td contains string if string not within span. let's want check tds "treasure": <td> treasure <span>water</span> </td> -> yes <td> water <span>treasure</span> </td> -> no <td> treasure </td> -> yes <td> <div>treasure</div> <span>water</span> </td> -> yes so far have tried different things exclude span elements search wasn't successful. $('table tr td:contains("treasure")').not('span').each(function() { $(this).addclass('found'); }); thanks lot! :) edit: additionally following case should work: <td> treasure <span>treasure</span> </td> -> yes you can use :not() pseudo-class selector (or not() method) :has() pseudo-class selector. $('table tr td:contains(treasure):not(:has(span:contains(treasure)))').addclass('found'); // or...

android - ViewPager with PagerAdapter/Fragments does not show anything -

in fragmentactivity on android below sdk 23, many fragments added transaction. inside of 1 of these shouldt appear simple viewpager few images. "images fragment" creates pageradapter custom array list. in case below, no view rendered within viewpager. no other threads , research helped me. trimed down code here, maybe can help. identations: wrong context, hidden content, false view return, ive found nothing , tried lot. instantiateitem() called, no destroy , remove methods called , empty widget red background shown. ive tried functions update list or rerender pager. original code not use image ressources there textview too! main activity xml: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:padd...

javascript - Speed up drawing image in canvas -

i have draw multiple images on 1 canvas. make program works, though, have speed display. see images appear 1 one: var ctx = document.getelementbyid('images_tiles').getcontext('2d'); function handler() { var = this.i; ctx.drawimage(this.img_src, this.r * tilesize, this.c*tilesize, tilesize * tilelist[i].qw, tilesize * tilelist[i].qh); } //draw tiles in spiral (i=0; i<tilelist.length; i++) { var o = { img_src: new image, c: tilelist[i].y, r: tilelist[i].x, i: }; o.img_src.onload = handler.bind(o); o.img_src.src = './viewer/images/'+path+'/lod'+glod+'/tiles_'+ o.c + '_' + o.r +'.jpeg'; } i see webworker can make parallelization not display. have solution or/and trick.

javascript - How to use Docx.js? -

Image
i have use docx.js generate docx file, generaeted docx doenot open. generated docx file output is i have included following js file html page <script type="text/javascript" src="js/docx/jszip.js"></script> <!-- include main js lib --> <script type="text/javascript" src="js/docx/docx.js"></script> and javascript function is function test() { //alert("test fn call"); var doc = new docxjs(); doc.text('docx.js free open source library generating microsoft word documents using pure client-side javascript.'); //doc.text('it developed james hall @ snapshot media.'); var output = doc.output('datauri'); } when click button function calling, , want add datatable content of word document how add content using docx.js? probably trying use docx.js without server, not work because can't load necessary files. if executing ...

php - Balance is not showing -

Image
here code: <table width="50%" border="2" bordercolor="green"> <tr> <th>itemname</th> <th>balance</th> </tr> <?php if($qw="select distinct(itemname) details date(date)<='$date' order date desc"){ $qq = mysqli_query($con,$qw); while($r=mysqli_fetch_array($qq,mysqli_assoc)) { ?> <tr> <td><?php echo $r['itemname']; ?></td> <td><?php echo $r['balance']; ?></td> </tr> <?php } } ?> </table> the given code fetch product itemname balance not fetch database. your query not include 'balance' field. change query include it: select distinct itemname, balance details ...

swift2 - Reorder UicollectioView items using RealmSwift on drag and drop -

i'm trying reorder uicollectionviewcell images on drag , drop using realmswift database, ui not updating on drag , drop , strange behaviour, images duplicating , code this realmmodel as class storyalbumdm: object { dynamic var id = 0 dynamic var type = "" dynamic var isimage: int = 0 dynamic var textdata = "" dynamic var imagedata: nsdata? = nil dynamic var rowid: int = 0 dynamic var position: int = 0 dynamic var storyid: int = 0 dynamic var iscoverimage: int = 0 dynamic var imagepath = "" let allstories = list<storyalbumdm>() } on drag , drop i'm doing this func collectionview(collectionview: uicollectionview, atindexpath: nsindexpath, didmovetoindexpath toindexpath: nsindexpath) { print("moveitematindexpath") let fromindexpath: int = atindexpath.row print("from", fromindexpath) let toindexpathint: int = toindexpath.row pr...

python - set list as value in a column of a pandas dataframe -

let's have dataframe df , create new column filled 0, use: df['new_col'] = 0 this far, no problem. if value want use list, doesn't work: df['new_col'] = my_list valueerror: length of values not match length of index i understand why doesn't work (pandas trying assign 1 value of list per cell of column), how can avoid behavior? (if isn't clear every cell of new column contain same predefined list) note: tried: df.assign(new_col = my_list) , same problem you'd have do: df['new_col'] = [my_list] * len(df) example: in [13]: df = pd.dataframe(np.random.randn(5,3), columns=list('abc')) df out[13]: b c 0 -0.010414 1.859791 0.184692 1 -0.818050 -0.287306 -1.390080 2 -0.054434 0.106212 1.542137 3 -0.226433 0.390355 0.437592 4 -0.204653 -2.388690 0.106218 in [17]: df['b'] = [[234]] * len(df) df out[17]: b c 0 -0.010414 [234] 0.184692 1 -0.818050 ...

windows - Visual Studio 2015: access denied on FeedCache -

when try open project in vs 2015 error "access denied" on file located in ‪c:\users\xy\appdata\roaming\microsoft\visualstudio\14.0\feedcache . the german message "c:\users\xy\documents\visual studio 2015\projects\app1\app1\app1.csproj : error : der zugriff auf den pfad "c:\users\xy\appdata\roaming\microsoft\visualstudio\14.0\feedcache\feed-969ff52c4894c164-file.xml" wurde verweigert." some hours ago restarted computer system updates , after installed english language pack vs. so navigated feedcache folder. folder have permissions security settings grant me al privileges inherited files , folders ( screenshot ). when i, example, try rename file inside feedcache folder, access denied message. me seems matter of wrong previlegs. i've tried disable inheritance feedcache folder , re-enable it. error during enableing ( screenshot ). kim

How to access a two dimensional array value and assing value to a int in C -

i have problem 2 dimensional array in c. 2d array board[d][d] ( d=7 ) , want assign value of board[d-1][d-2] int . when error, if printf board[d-1][d-2] 32766 . highest value in array d*d-1=48 . doing wrong? int main(void) { int d=7; int nr=(d*d)-1; int board[d][d]; int u=board[d-1][d-2]; bool even=false; if ((d/2)*2!=d) { even=true; } printf("%d\n", even); printf("%i\n", board[d-1][d-2]); //result here 32764? for(int i=0;i<d;i++) { for(int j=0;j<d;j++) { board[i][j]=nr; nr--; printf(" %2d", board[i][j]); } printf("\n"); } return 0; } it's because didn't initialize value, stores whatever garbage happened there in memory atm. need run on board , set initial values it.

html - TypeIt JQuery Plugin: Remove cursor when typing has completed -

i'm using typeit.jquery.js plugin, when list of paragraphs start showing 1 after other. works fine, 1 thing couldn't manage: when typing on specific row has completed, remove cursor . plugin has attribute cursor: false , takes away cursor beginning. used same attribute in function callback: function(){} , function executes after typing has completed, doesn't seem work. any appreciated! $('.typeit-box3').typeit({ strings: 'first paaragraph', typespeed: 100, autostart: true, callback: function() { $('.typeit-box4').typeit({ strings: 'second paragraph', typespeed: 100, autostart: true, callback: function(){ $('.typeit-box5').typeit({ strings: 'third paragraph', typespeed: 100, autostart: true }) } }); } }); <script src="https://cdnjs.cloudflare.c...

jhipster import-jdl not generating entities from jdl file -

i have created jdl file using jdl-studio. tied create entities jdl file using jdl-import. following snippet of cmd terminal: d:\spring-boot\examples\espressob>yo jhipster:import-jdl ./jhipster-jdl.jh jdl being imported. d:\spring-boot\examples\espressob> the problem it prints jdl file being imported, thats it. have checked if generated code entities jdl file, unfortunately did not. env details .yo-rc.json file content : { "generator-jhipster": { "jhipsterversion": "3.4.2", "basename": "espressob", "packagename": "com.iwantunlimited.espressob", "packagefolder": "com/iwantunlimited/espressob", "serverport": "8080", "authenticationtype": "jwt", "hibernatecache": "hazelcast", "clusteredhttpsession": "hazelcast", "websocket": "spring-websocket...

javascript - Why is my angular script running an infinite loop? -

what trying check 3 boxes via event click upon page load use of loop. happens runs infinite loop page hangs. here code: <!doctype html> <html > <head> <link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script> </head> <body ng-app="ngtoggle"> <div ng-controller="appctrl"> <input type="checkbox" ng-model="dean" ng-click="btnchange($event, values, 1)" id="check-1" name="one" class="here" > <input type="checkbox" ng-model="armada" ng-click="btnchange($event, values, 2)" id=...

raspberry pi - Unaesthetic busy/loading animation under LXDE / Openbox -

i set raspberry pi raspbian , lxde display manager. whenever start application this animation shown in top right corner of screen. does know, triggers animation , if can disabled? many in advance, holger usually means you're short of voltage. see forum post under-voltage warnings . the b+ has under voltage detect trigger results in power led going off when voltage drops below 4.65v. signal available on gpio line (gpio35). latest firmware update display warning symbol in top right of display when detected. disable turbo mode while warning displayed try reduce chances of crashing. i've added warning symbol existing over-temperature condition (> 85'c), disabled turbo mode. symbols are: - red square: over-temperature - rainbow square: under-voltage typically if i'm using poor quality power supply or rubbish micro usb cable.

Eclipse pydev remove whitespaces for non python files -

i enabled auto remove trailing whitespaces in pydev environment eclipse (preferences->pydev->editor->save actions) , works python files. doesn't apply other files types when save them. there way include files in automatic save action?

ios - set NSArray instance using reference in Swift -

i'm trying set values nsarray using reference in swift can't seem working. var list = self.isfiltered ? self.filteredeventslist : self.eventslist self.sorttableviewforeventname(&list) then: private func sorttableviewforeventname(inout eventarray: nsarray) { let sortedevents = eventarray.sortedarrayusingcomparator({ (firstevent, secondevent) in let firsteventname = (firstevent as! event).name let secondeventname = (secondevent as! event).name return firsteventname.compare(secondeventname) }) eventarray = sortedevents } the change in eventarray not reflect in eventslist or filteredeventslist, whichever may applicable. you need have reason using inout parameters, , in case don't think have one. can have function return sorted array: private func sorttableviewforeventname(eventarray: nsarray) -> nsarray { let sortedevents = eventarray.sortedarrayusingcomparator({ (firstevent,...

Where to alter the response of POST request in Django REST Framework -

i have view inherit createapiview model serializer set in django rest framework. when send request, returns json representation of object created. i wrap data response shown below: {'data' : { 'field1' : 'value1' , 'field2' : value2 , etc..... } , 'errors' : none , 'message': [{} , {}] , 'result' : 'ok' , } where best place modify data gets returned? i tried create custom renderer shown in question: adding root element json response (django-rest-framework) never gets called. because relevant requests rather posts? i think structure not relevant : result : why include field ok since status code of request here give information : 200 -> ok, 201 -> created, 400 -> bad request, etc... data , errors in same response doesn't make sense me. maybe, got special behavior in created method of serializer if there error, seems logic ther...

javascript - Google Places textual search not reproducing the stable results (changes from time to time) -

Image
i have used textual search on google places api search basketball courts in particular location. instance when type "san jose, ca, united states" produces varied results time time. what might issue? have spent hours trying fix issue. couldn't clue @ all... please see difference between these screenshots. listing same type "basketball courts in san jose, ca, united states " listing varies after period of time please me. in advance.

performance - Why there is a gap between http requests in google chrome network? -

Image
in application when load page, many resources loading cache. between 2 requests getting delay shown in below image: can please tell me why getting delay (~300ms) between these 2 requests. the gap time spent queuing or being stalled. can demonstrated in example below, shows 4 requests, last 2 being of main focus us: 3rd request: 4th request: as can see above, there queuing time in 4th request more stalling. here's explanation this, written paul irish: queuing: if request queued indicated that: the request postponed rendering engine because it's considered lower priority critical resources (such scripts/styles). happens images. the request put on hold wait unavailable tcp socket that's free up. the request put on hold because browser allows 6 tcp connections per origin on http 1. time spent making disk cache entries (typically quick.) stalling/blocking: time request spent waiting before sent. can waiting of reason...

Uber Ride API - Driver -

we busy looking @ uber ride api , find out following: is all_trips scope applicable if oauth authorized user uber driver? will webhook invoke events everytime when driver accepts/cancels/completes trips? will webhook invoked during real trip while app under development or work in sandbox? no. all_trips scope works riders. yes. every trip status change triggers webhook. possible statuses changes are: processing no_drivers_available accepted arriving in_progress driver_canceled rider_canceled completed . (list pulled here , according webhooks documentation here ). yes. if grant app all_trips scope, uber api send webhooks url have registered @ developer.uber.com/dashboard every trip take, i.e. sandbox , real trips alike. note there no way flag uber app "in development" or "in production".

javascript - d3js Force layout multiple arcs with arrows -

i basing question on following example: http://bl.ocks.org/mbostock/1153292 if create 2 links same source , target, say {source: "microsoft", target: "htc", type: "licensing"}, {source: "microsoft", target: "htc", type: "suit"}, then 2 links sit on top of each other , 1 visible. how can rewrite code in case 2 links form loop happens 2 links inverted sources , targets, example {source: "microsoft", target: "motorola", type: "suit"}, {source: "motorola", target: "microsoft", type: "suit"}, ok, find solution 1 myself. in function linkarc(d) { var dx = d.target.x - d.source.x, dy = d.target.y - d.source.y, dr = math.sqrt(dx * dx + dy * dy); return "m" + d.source.x + "," + d.source.y + "a" + dr + "," + dr + " 0 0,1 " + d.target.x + "," + d.target.y; } if " 0 0,1 "...

web services - Spring ws logging issue with SLF4j -

hi using spring ws + slf4j logging. while logging soap request & response using below propertiesin application.properties logging.level.org.springframework.ws.client.messagetracing.sent=debug logging.level.org.springframework.ws.server.messagetracing.sent=debug logging.level.org.springframework.ws.client.messagetracing.received=trace logging.level.org.springframework.ws.server.messagetracing.received=trace instead of logging request & response prints following object, 13:13:06.155 [main] debug o.s.ws.client.messagetracing.sent - sent request [saajsoapmessage {http://ws.sample.customer.com/}getcustomerdetails] 13:13:06.411 [main] debug o.s.w.client.messagetracing.received - received response [saajsoapmessage {http://ws.sample.customer.com/}getcustomerdetailsresponse] request [saajsoapmessage {http://ws.sample.customer.com/}getcustomerdetails] i calling webservice using following way : return (jaxbelement) getwebservicetemplate().marshalsendandreceive(uri, requ...