Posts

Showing posts from January, 2013

html - What priority are CSS styles applied? Example provided that is confusing me -

i know should stupidly easy topic, i'm confused , spent way longer should trying understand example professor gave us. from understand, rules supposed go first inline css, document css, external css, , priority. priority thought 100*ids+10*class+1*element reference. here code that's confusing me below: <div id="id1"> <ul> <li class="c1" id="id2">item 1</li> <li class="c2 c3">item 2</li> <li class="c3">sublist: <ul> <li class="c1">subitem 1</li> <li class="c2">subitem 2</li> <li class="c2" id=”id3”>subitem 3</li> </ul></li> <li>item 4</li> </ul> <div id="id4"> <ul> <li id="id5">one thing</li> <li id="id6" class="c2"&

How to retrieve specific analysisTypes from Druid Segment Metadata Queries -

how retrieve specific identifiers of columns druid segmentmetadata metdata queries.i expecting result contain cardinality , size ,but analyses returned. { "querytype":"segmentmetadata", "datasource":"wikiticker", "intervals":["2015-09-1/2015-09-13"], "analysistypes":["cardinality","size"] } but still analyses of columns returned in result. actual result: "user_unique" : { "type" : "hyperunique", "hasmultiplevalues" : false, "size" : 0, "cardinality" : null, "minvalue" : null, "maxvalue" : null, "errormessage" : null } expected result: "user_unique" : { "size" : 0, "cardinality" : null } analysistypes introduced speedup query omitting computation of excluded properties. having re

Extract Substrings using regex Java -

i have string has several np( ), in between "np(' , ')' data want. want np data inside not first np outside how can write regex extract "(dt a) (nn sign)" , "(dt the) (nn facade)" following text? wnt each text contain np extract inside np data..i hope explained problem (root (np (np (dt a) (nn sign)) (pp (in on) (np (np (dt the) (nn facade)) (pp (in of) (np (dt the) (nn building))))))) this regex match data asking: \(dt\s\w+.{3}nn\s\w+\) where \(dt\s\w+ match determiner, thr white space , string, .{3} match ) ( , nn\s\w+\) match noun, singular or mass . using regexpal match data if want use in java code need escape charactes this: pattern p = pattern.compile("\\(dt\\s\\w+.{3}nn\\s\\w+\\)");

Adding up for each occurence in excel -

Image
i trying add quantity of ingredient each occurance of ingredient. example, if have these: eggs 4 bread 1 tomato 1 eggs 3 grapefruit 2 milk 1 eggs 2 banana 1 in 2 columns in excel, formula can use count how many eggs have? have output this: eggs 9 bread 1 tomato 1 ... obviously list extremely long otherwise i'd add myself. vlookup returns quantity of first occurence of "eggs" , rest ignored. you appreciated. probably easiest/fastest way create simple pivot table using ingredient rows , qty values (sum), please see screenshot if not familiar pivot table, here detailed tutorial beginners how use pivot tables in excel

android - Retrofit 2 Unable to Use Delete tag with Body -

i have call implemented @http(method = "delete", hasbody = true) @delete("groups/{groupid}/members/remove") call<groupremoveusermodel> putremoveuser(@path("groupid") int groupid, @body groupremoveusermodel groupremoveusermodel); where model code follows : public final class groupremoveusermodel { public groupremoveusermodel(int userid){ this.userid = userid; } } however when call method appropriate parameters doesn't work cannot stack trace using okhttp logger debugging try using this: @http(method = "delete", path = "groups/{groupid}/members/remove", hasbody = true) call<groupremoveusermodel> putremoveuser(@path("groupid") int groupid, @body groupremoveusermodel groupremoveusermodel);

html - Align text to the middle with Chinese text -

i having problem align text in same div when text in chinese. pushes right span top reason. there way fix issue? .left{ float:left } .right{ float:right; } div{ clear:both; width:400px; } <div> <span class="left">【夏向け】怖い、こっくりさん【ホラー】</span> <span class="right">android</span> </div> <div> <span class="left">hello world</span> <span class="right">facbook</span> </div> <div> <span class="left">【夏向け</span> <span class="right">android</span> </div> <div> <span class="left">this example text</span> <span class="right">android</span> </div> you have use line-height , font-size property accordingly .left{ float:left } .right{ float:right; } div{ clear:both; width:

networking - How to connect to hidden wireless network (no SSID) with windows NETSH command? -

i want connect hidden wireless network (no ssid) netsh command. my access point has ssid invisible security reasons. is there way connect simple commands , no user interface??? best regards. after days founded solution work well. 1: create .xml file example "c:\nossid.xml" , save below code it: <?xml version="1.0" encoding="us-ascii"?> <wlanprofile xmlns="http://www.microsoft.com/networking/wlan/profile/v1"> <name>samplewpa2psk</name> <ssidconfig> <ssid> <name>d.mainoffice.access</name> </ssid> </ssidconfig> <connectiontype>ess</connectiontype> <connectionmode>auto</connectionmode> <autoswitch>true</autoswitch> <msm> <security> <authencryption> <authentication>wpa2psk</authentication>

qt - How do I get straight corners in QLineEdit? -

by default on operating system use, qlineedits rounded corners, need write in style sheets make them straight? qlineedit { border-radius: 0px; } didn't work; you can select diferent style qt gui whole plastique: http://doc.qt.io/qt-4.8/gallery-plastique.html here gallery 4.8. http://doc.qt.io/qt-4.8/gallery.html if border-radius: 0; doesn't work , style not customizable.

javascript - Testing React Components renderedComponenent.length.toEqual(1) -

i wondering why following code considered valid test on reactjs: const children = (<h1>test</h1>); const rendercomponent = (props = {}) => shallow( <button {...props}> {children} </button> ); describe("<button>", () => { it("should render <button> without theme", () => { const renderedcomponent = rendercomponent({ nature: "primary" }); expect(renderedcomponent.length).toequal(1); }); }); why expect rendered component.length equal 1?

django rest framework - Should every DRF API point be in a single view? -

i have project has large number of drf api points. there usual authentication ones, , there's api getting widgets, api getting dongles, 1 getting cake, etc. there number of api points posting data server. the question: should these api points in single view? note don't have widget app, nor have dongle app, etc. understand if there separate apps everything, organise things, right there's 1 app large number of api points. i'm thinking if put them in single view, view huge. is there best practice this? thank you.

ios - Dynamically change cell spacing UICollectionView -

was having issues uicollectionview , spacing of cells. figured out how change spacing , works portrait view not landscape view. tried differentiate: //set minimum spacing if(uideviceorientationislandscape([uidevice currentdevice].orientation)){ layout.minimumlinespacing = 100.0f; } else{ layout.minimumlinespacing = 40.0f; } but unfortunately doesn't change when switch portrait landscape. can tell me how can achieve this? try - (void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation { [yourcollectionview performbatchupdates:nil completion:nil]; }

c# - How to achieve a "infinite-sized" canvas effect in WPF? -

my goal create canvas can translate child elements want moving around whole canvas (like example in grasshopper plugin rhino). tried "translatetransform" problem arises height or width of canvas isn't big enough include whole window again. tried solve problem adding width , height canvas whenever gets dragged around, size of canvas doesn't seem change. here window.xaml: <window x:name="window" x:class="oolong.windows.project.projectplan" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:oolong.windows.project" mc:ignorable="d" title="projektplan" height="{dynamicresource {x:static sy

javascript - cordova-plugin-facebook on phonegap doesn't open pop -

i using cordova-plugin-facebook4 plugin on phonegapp cordova project , although pop opens when test app on browser nothing when compile , run on mobile phone. missing ?? code being used: loginwithfacebook = function() { fb.login(function(response) { if (response.authresponse) { fb.api('/me', function(response) { var result_holder = document.getelementbyid('result_friends'); result_holder.innerhtml = response.name; }); } else { alert('user cancelled login or did not authorize.'); } }); return false; }; thanks in advance

stata - Identify unique levels of categorical variable -

i have list of person ids, , types of medicines got on specific dates. i create variable count whereby can give indicator 1 first drug occurs, 2 second unique drug , 3 third unique drug. when first drug occurs after second , third, want still have indicator 1. likewise unique drug 2, should maintain value 2 throughout person's whole medication history, , same drug 3. +-------------------------------------+ | p_id date agent_~e count | |-------------------------------------| 38. | 1001 13dec2001 thiazide 1| 39. | 1001 12apr2002 thiazide 1| 40. | 1001 15jul2002 thiazide 1| 41. | 1001 28aug2002 arb 2| 42. | 1001 26sep2002 ccb 3| |-------------------------------------| 43. | 1001 26sep2002 arb 2| 44. | 1001 10oct2002 ccb 3| 45. | 1001 10oct2002 thiazide 1| 46. | 1001 10oct2002 arb 2| 47. | 1001 10dec2002

Ansible - managing multiple SSH keys for multiple users & roles -

the problem i managing number of different servers ansible. each server has multiple linux users, such readonly , admin , etc. i have number of files inside ansible project contain ssh keys particular group of people - eg. appdeveloperspublickeys , dbapublickeys , etc. different groups of people have different access levels on different servers. eg. on webserver, appdevelopers have admin access, , dbas might have read access. on database servers, vice versa. to achieve above, have different ansible roles different types of server (eg. webappserver , databaseserver , etc). these roles have variables readonly_key_files , admin_key_files set against them, listing appropriate key files roles should have readonly , admin access. the ideal solution would: ensure public keys exlusive - eg. if public key deleted appdeveloperpublickeys file in ansible, servers have key deleted too only upload / change file on servers when has changed show accurate diff of files when using

ios - React Native Web Bridge Redirect on notification -

hei, im developing app , i´m using webviewbridge send data between app , server. have problem when notification , app closed, want make redirect url based on data notification. code: pushnotificationios.getinitialnotification().then(function (notification) { if (notification != null) { alert(json.stringify(notification)); this._onpresssendnotification(notification); } }); and _onpresssendnotification(notification){ const { webviewbridge } = this.refs; webviewbridge.sendtobridge(json.stringify(notification)) }, when send bridge notification, works fine. getinitialnotification not execute _onpresssendnotification. error on app is: " undefined not object (evaluating 'this_onpresssendnotification." thanks

angularjs - Angular 2 Electron - Consuming REST-API -

i have electron app, uses angular 2 - in order work needed modify <base href="/"> <base href="./"> , relative path in file system. api doesn't work anymore (webclient on localhost works fine, not electron client). i access api via proxy.conf.json { "/api": { "target": "http://127.0.0.1:4747/ticketsale", "secure": false } } and error message in javascript console of chromium / electron is: file:///users/myusername/folder/apps/officeclient_electron/office-client-darwin-x64/office-client.app/contents/resources/app/api/1/initialdata failed load resource: net::err_file_not_found how can tell electron access local resources via relative path , consume api via http? we enabled cors on webserver , setting allowed consume rest-api different url. see https://en.wikipedia.org/wiki/cross-origin_resource_sharing details.

sql server - Inconsistency between two apparently identical SQL commands running through ASP -

i have large database system in sql server 2012 , front end interface written in asp. users can query database , have dictionary pick typos , alternate spellings. historically users have single word search, or multi word , or or search. have finished writing exact multi-word search, , search includes multiple variations dictionary. in examples below searching therefore "stroke unit" or "storke unit" in various fields. note working version text cut , pasted output non-working version, , not present. apologies length of statements, have lot of fields search. , and or searches have longer statements have never had problem them. i have absolutely no idea why 1 version works , other doesn't, grateful tips. (i don't have error checking every line of connection statement, hoping might appear) my code currently err.clear lineout("version 1: not working") session("version1")="insert dbo.temp_rct_existing_results

spring - docker exec java app background attach logs -

for java app running inside docker container should output logs docker logs -f can read log output of java application after been running while? i execute java app inside active docker container following docker exec -d container-name java -jar /path-to-jar/java-app-1.0-snapshot.jar so far runs spring boot java app. would either of following approaches work? docker exec -d container-name java -jar /path-to-jar/java-app-1.0-snapshot.jar > /var/log/docker-id.log or setting java log path settings particular destination? <?xml version="1.0" encoding="utf-8"?> <configuration> <include resource="org/springframework/boot/logging/logback/defaults.xml" /> <property name="log_file" value="${log_file:-${log_path:-${log_temp:-${java.io.tmpdir:-/tmp}}/}spring.log}"/> <include resource="org/springframework/boot/logging/logback/file-appender.xml" /> <root level="info

css - Remove render blocking -

i working on wordpress site, have check render-blocking google page speed. optimize css delivery of following: /wp-content/plugins/sitepress-multilingual-cms/css/language-selector.css?v=3.4.1 /wp-content/themes/premium-theme/style.css /wp-content/themes/premium-theme-child/style.css http://fonts.googleapis.com/…300%2c400%2c600%2c700%2c900&subset=latin i use "bwp minify" combine others css, here remains, might because plugin couldn't detect those. i have combine css in 1 file or least possible.but don't understand, css files located in different plugins, themes folders. how can combine it? found lot of tutorial inline , copy them in 1 file can not in wordpress. i try defer css solve no success git hub ! i use last code in child- functions.php if has experience, please me.

sql - How to get only year from age() function in postgresql select query -

select age(cast(dob date)) mas_patient_details when run above query returns age ---------- 39 years 5 mons 19 days 13 years 2 days 69 years 2 days 41 years 11 mons 25 days select age(cast(dob date)) mas_patient_details age <= 59 it returns 39 years 5 mons 19 days 13 years 2 days 69 years 2 days 41 years 11 mons 25 days how correct query? if column fu of data type date, use select extract(year fu) mydate; and if varchar, convert date using to_date() select extract(year to_date(fu, <your pattern>)) mydate; in case: select extract(year age(cast(dob date))) mas_patient_details age <= 59;

How to convert JSON string data into array using PHP? -

i need convert json result array in php. here using authorize.net payment gateway sandbox. can response( $result ) in json string. not convert php array using json_decode $output = json_decode($result,true); print_r($output); sample code <?php $data=array("createtransactionrequest" => array( "merchantauthentication" => array( "name" => "2bu77dwm", "transactionkey" => "92x86d7m7f6nhk98" ), "refid" => "9898989898", "transactionrequest" => array( "transactiontype" => "authcapturetransaction", "amount" => "25", "payment" => array( "creditcard" => array(

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -

i'm not able find config schema file (configschema.xsd) of oracle.manageddataaccess itellisense in application configuration file. it supposed in odp.net managed driver files cannot find it... configschema.xsd xml schema file defines configuration section odp.net, managed driver. https://docs.oracle.com/cd/e48297_01/doc/win.121/e41125/installodpmd.htm after having installed oracle developer tools visual studio 2015, seems 2 schema files have been linked app.config file : oracle.dataaccess.common.configuration.section.xsd oracle.manageddataaccess.client.configuration.section.xsd both stored in : c:\program files (x86)\microsoft visual studio 14.0\xml\schemas

javascript - Jsscrollpane is not working while using ajax to append data in popup box or dialog box -

i using jsscrollpane stylish scrollbar in popup box. on scrolling data, need use ajax append data.but ajax , jsscrollpane not working together.how can use together? code below: $('.notification_content').scroll(function(e) { if($(this).scrolltop() + $(this).innerheight() >= $(this)[0].scrollheight) { /*alert('hii');*/ var limitstart = $(".notificationsection").length; loadresults(limitstart); $('.js_scrollable').jscrollpane(); }}); function loadresults(offset) { $("#loading").show(); var file = '<?php echo site_url;?>/view/notification.php'; var data = 'offset='+offset+'&type=notification'; $.ajax({ type: 'post', url: file, data: data, datatype : "html", complete: function () { }, success: function(data){ var $obj = $(data); var content_records = $obj.find('div.saperate_notification').html(); $(".notifi

web services - Redirect from Webmethod in Asp.Net -

am new asp.net programming, have started web project. calling webmethod aspx page using json below: <script type="text/javascript"> function getlogin() { var username = document.getelementbyid('textbox1').value; $.ajax({ type: "post", url: "services/logservice.asmx/authenticatelogin", data: "{'username':'" +username.tostring()+ "'}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (response) { alert(response.d) }, error: function (xhr, status, error) { // alert(textstatus); displayerror(xhr); } }); } function displayerror(xhr) { var msg = json.parse(xhr.responsetext); alert(msg.message); } </script> and webmethod : [webmethod] public string aut

how to make offline android app that saves data on sqlite and send data to mysql when there is internet automatically -

i working on android application register members, save 50 records local database transfer records mysql database on server , delete records on local database batch of registration. specific problems. (1)how camera image imageview save sqlite? (2)how make edittext date picker date of birth , save sqlite? (3)how sense internet connection , transfer sqlite data mysql when records reach 50? (4)how delete sqlite data when transferred mysql? below activity registration package com.example.administrator.user_enrollment; private static final int camera_request = 1888; private edittext edittext1; private edittext edittext2; private edittext edittext3; private edittext edittext4; private edittext edittext5; private edittext edittext6; private edittext edittext7; private edittext edittext8; private edittext edittext9; private edittext edittext10; private edittext edittext11; private button button1; private button button2; private button button3; private radiogroup radiodisabili

angularjs - Ionic- display picture taken with camera on same page -

i'm trying display image captured through camera on same page without visiting phone's memory. watsapp, way click , upload right away there only. so, capture , display automatically on same page, have capture button. .controller('cameractrl', function($scope, $cordovacamera) { document.addeventlistener("deviceready", function () { var options = { quality: 50, destinationtype: camera.destinationtype.data_url, sourcetype: camera.picturesourcetype.camera, allowedit: true, encodingtype: camera.encodingtype.jpeg, targetwidth: 100, targetheight: 100, popoveroptions: camerapopoveroptions, savetophotoalbum: false, correctorientation:true }; $cordovacamera.getpicture(options).then(function(imagedata) { var image = document.getelementbyid('myimage'); image.src = "data:image/jpeg;base64," + imagedata; }, function(err) { // error }); }

sonos - Getting metadata (track info, artist name etc.) for radio stream -

i have checked following links weren't helpful (in parenthesis i've explained why didn't work in case suggested in answers) streams - hasoutofbandmetadata , getstreamingmetadata (our content hls) sonos player not calling getstreamingmetadata (getmetdata not called, getmediametada called since radio stream has unique id , not collection) in sonos api documentation mentioned "hasoutofbandmetadata" deprecated , recommended metadata embedded inline content. due limitations can't achieved in our service have go old way (whatsoever is). i suppose, ideally "getstreamingmetadata" should called after setting "hasoutofbandmetadata" true it's not happening. secondly, testing purposes set "secondsremaining" , "secondstonextshow" different values find out "description" being displayed different time intervals (if set secondsremaining/secondstonextshow 20 description displayed 20 seconds, if set 200 200 sec

ios - Chaining dependent observables -

i need create dependent api calls second 1 needs value returned first one. first thing comes mind using flatmap apimanager.shared .createreport(report: report) .flatmap { (report) -> observable<report> in return apimanager.shared.createreportstep(reportid: report.id) } createreport returns observable<report> after successfull call returns updated report model(with id), after need call api create report step, report.id needed. everything looks , works fine code, problem comes when need after each of these steps( createreport , createreportstep ). placed code in onnext block, called once, after both of steps completed. is there way receive onnext signal after both steps? use this: apimanager.shared .createreport(report: report) .concat(apimanager.shared.createreportstep(reportid: report.id)) which emmit 2 signals want, again updated report.id pass createreportstep ? if don't mind time component , need have

javascript - Angular 2.1.1 Page Reload Not Working -

i have updated npm 3.10.8 , installed latest cli. when create new angular 2 project using new cli (ng serve) edit text (app works!) in app.component.ts no changes reflected on browser i.e browsers(safari,chrome,mozilla, canary, tor). for changes reflected have stop serving ng serve simple text edit. stressful.

weblogic12c - Java util logging doesn't logs INFO messages even if the level is set to INFO -

java util logging doesn't logs info messages if level set info. given below properties file: # properties file configures operation of jdk # logging facility. handlers=java.util.logging.filehandler, java.util.logging.consolehandler .level=info # --- filehandler --- # override of global logging level java.util.logging.filehandler.level=info # style of output (simple or xml): java.util.logging.filehandler.formatter=java.util.logging.simpleformatter java.util.logging.filehandler.append=true ... deployed application in weblogic server.the application not logging info messages, making severe & warning messages. using code in loop handlers: logger.getglobal().getparent().gethandlers()[i].tostring()+ " : "+ logger.getglobal().getparent().gethandlers()[i].getlevel() these handlers used levels: oracle.core.ojdl.logging.odlhandler : oracle.core.ojdl.weblogic.domainloghandler : warning oracle.core.ojdl.logging.consolehandler: 807 java.util.logging.

html - Responsive vertical center elements inside div -

Image
i need verticaly align elements inside div container. elements looks on image below. code, able nicely overwrap big picture on left, text , small picture still doing wants. need avoid flexbox, since need support ie8, or atleast ie9. i've been trought several solutions, tables or absolute positions, propably i've did wrong... thank helping me of :) html <section class="contact"> <div class="adress"> <h4>abc</h4> <span>acbd<br> efgh</span> <span>tyre<br> asdsad<br> cxzcasd</span> <img src="img/ccc-map.png" alt="map-ccc"> </div> <div class="map"> <img src="img/ccc-g-map.png" alt="google-map"> </div> </section> scss .contact { border: 1.5px solid $grey;

Does Firebird support filtered indexes? -

i trying create filtered indexes in firebird cannot find it. possible? i mean indexes use portion of rows in table. exists in ms sql server. no, firebird not have filtered (or partial) indexes. there improvement ticket in firebird tracker: http://tracker.firebirdsql.org/browse/core-3384 , hasn't been planned version yet.

javascript - tether element position incorrect until viewport change -

Image
i have been playing around awesome plugin: tether i had problems bootstrap (v3) popovers when manually loading them, popovers outside of viewport display @ bottom of viewport in incorrect position. decided experiment plugin alternative. i have been trying use basic tether option validate 1 of inputs in form, form has been made using laravel form builder. ( form-group of inputs target elements). problem: but reason seems load left of target element (in incorrect position). when viewport changes (page resize or scroll etc) updates right of target element(in correct position). im not sure why this, ideas on how can load in correct position? example: page load (incorrect position): viewport change (correct position): html: {!! form::model( $article = new \app\article, ['id' => 'form-article', 'route' =>'articles.store', 'class' => 'row']) !!} <div class="row"> <div class="form-gro

java - Send log4j2 stack traces over syslog -

i trying log stack traces logstash. the logging stack elk (elasticsearch, logstash, kibana). the application producing logs java application, using slf4j logging interface, , log4j2 logging implementation. the log4j2.xml declares syslog appender, rfc5424 format: <appenders> <syslog name="rfc5424" format="rfc5424" host="localhost" port="8514" protocol="tcp" appname="myapp" includemdc="true" mdcid="mdc" facility="local0" enterprisenumber="18060" newline="true" messageid="audit" id="app"> <loggerfields> <keyvaluepair key="thread" value="%t"/> <keyvaluepair key="priority" value="%p"/> <keyvaluepair key="category" value="%c"/> <keyvaluepair key="exception" value="%ex{full}&qu

siri - Sirikit 'send a messages using My App' working just few times -

i'm developing app allows siri send messages. few days ago working fine , everytime saying 'send message using "myapp name"' showing siriui , handling command correctly. but since couple of days different behaviour! siri opens app, says: "here's found on web 'send message using 'myapp name':", "i don't understand 'send message using 'myapp' , right behaviour used time. of course app enabled in settings>siri>app support this strange behaviour. can't more helpful, i'm sorry. can problem verifies 2 different phone i'm using debug , have tried download sample project online (on github) , have same problem. i'm using provioning profile, in particular 'xcode automatically manage signing' enabled does know how solve problem? thanks! could tell me app name or if app name space? i have same problem before on app. problem has been solved since changed app name no space .

jquery - Owl Slider Auto Width with Links (Horizontal Items Swipe) -

i have bunch of links items using owl slider. want owl items have auto width instead of calculating width per items. it seems "autowidth: true" option not calculating width if links have "width: auto" , "white-space: nowrap" css. my code: $(".mylinksmenu").owlcarousel({ items: 4, navigation: false, pagination: false, slidespeed: 300, addclassactive: true, margin: 20, autowidth: true, responsiverefreshrate: 500 }); any workaround on bug? thanks!

mysql - Converting string to date returning null -

i trying convert string in sql database date can order date. '16 jul 2016' example of date format , using following code convert output null. str_to_date( `date` , '%dd %mon %yyyy' ) thedatething use correct format string: str_to_date(date, '%d %b %y') you seem have strange mix of oracle , mysql formats in string. mysql documentation quite clear.

.net - Generate async-only interface from wsdl? -

is there way generate only task based async methods svcutil? the reason have given wsdls need implement service. easiest way seems to add them service reference , implement generated interface service. works great long stay synchronous async generates 2 methods same operationcontract , invalid. other ways of fixing dilemma appreciated of course. constraint have stick given wsdl files, can't generate wsdl interface (yay -.-) regarding duplicate claim: nope. not @ all. played around concurrencymode , task-based services , there huge difference in performance between two. example: shooting 100 threads against either of these implementations, public async task<someobj> getsomeobj(somereq request) { await task.delay(1000); return someobj(); } performs better than public someobj getsomeobj(somereq request) { thread.sleep(1000); return new someobj(); } no matter concurrencymode selected in servicebehavior (which, funny enough, had little influence

tomcat7 - How to install multiple instances of tomcat in ubuntu 14.04? -

i install multiple instances of tomcat-7 in ubuntu 14.04 machine. is possible without port conflicts? if yes can suggest me best approach. thanks & regards. you can run multiple instances of tomcat on same host provided listening on different ports. please change ports in tomcat_home/conf/server.xml of tomcat servers. the default ports configured in file 8080, 8005, 8009 , 8443. change ports different values per installation. prefer strategy offset ports 10 second installation have. can choose strategy find fits requirements. note: make sure no other service listening on port set in file.

java - Comparing classes up to CGLib enhancement -

i want test if 2 values have same class: x.getclass.equals(y.getclass) however, comparison should succeed if 1 (or both) values belongs class constructed cglib enhancer . the obvious solution search $$enhancerbycglib$$... in class name, remove it, , compare remaining parts of class names (and classloaders). there better alternative? cglib allows user set namingstrategy makes replacing enhancerbycglib tag unreliable class can named arbitrarily. the reliable way of identifying cglib class check existance of field cglib$bound hard-coded library such name cannot change. if such field exists in class, need check if: there interfaces implemented. if @ least 1 interface exists, enhanced class might interface. (you might find cglib's factory interface must ignore.) there super class not java.lang.object . if interface enhanced, there super class defined. as approximation detection algorithm, therefore use: static class<?> original(class<?> typ

html - toggle child of clicked class pure Javascript - no JQuery -

i have 2 toggles class .submenu-toggle , contain ul child class .submenu. happen when user clicks on .submenu-toggle ul child(.submenu) of class(submenu-toggle) shown , when clicked again hidden. i need achieve using pure javascript without jquery. if you're able let me know how hide .submenu if user clicks outside element... awesome! thanks time , help. here current javascript: // drop down menus var subtoggle = document.getelementsbyclassname("submenu-toggle"); var menu = subtoggle.children; (var = 0; < subtoggle.length; i++) { subtoggle.item(i).onclick = function () { menu[1].style.display = "block"; } } here current html: <ul> <li class="submenu-toggle"><a href="#">menu 1</a> <ul class="submenu"> <li></li> <li></li> <li></li>

linux - How to run a python script with Raspberry Pi until we stop it manually -

currently working both raspberry pi , arduino @ moment. arduino in cases, if start running script, run until stop them manually. i wondering if there way same raspberry pi when using python. raspberry pi, when use, sudo python myprogramme.py it runs code once , stopped. there way can run same code command line several times until stop them manually (for example, in matlab, have use crtl+z stop running script)? (it may possible using loop wondering if can without using loop.) hope query makes sense. point of doing send continuous information sensor system. according comments ... when hit ctrl+c script gets keyboard interrupt , can gracefully shut down. your code: import smbus import time while true: try: # i2c bus bus = smbus.smbus(1) # bmp280 address, 0x76(118) # read data 0x88(136), 24 bytes b1 = bus.read_i2c_block_data(0x76, 0x88, 24) # ... , rest of code. # add short sleep here @ end...

xamarin - Android Keycodes for the symbols -

i developing application manual keyboard in xamarin androd. manual keyboard consists of keys 0-9 , special characters -, $, #, @ .. searching forms keycodes numerics .my code mentioned below.. <keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keywidth="10%p" android:horizontalgap="0px" android:verticalgap="0px" android:keyheight="60dip"> <row> <key android:codes="8" android:keylabel="1" android:keyedgeflags="left" /> <key android:codes="9" android:keylabel="2"/> <key android:codes="10" android:keylabel="3"/> <key android:codes="11" android:keylabel="4"/> <key android:codes="12" android:keylabel="5"/> <key android:codes="13" android:keylabel="6"/> <key android:codes="14" android:keylabel="7"/> <key an

excel - Count Column if header is X (formula) -

Image
in sheet 1 have: (col a) | (col b) 25/aug/2016 | 30/aug/2016 x | | x x | x | x | x | x | x in sheet 2, want count how many "x" sheet1 column have, based on vlookup date. i mean, in sheet 2, "if vlookup 30 aug 2016, count how many "x" in corresponding column on sheet 1". doing bit tricky. sed formula solve problem: assume table that: put formula cell n1 , fill down: =countif(indirect(address(row($a$2),match(a17,$a$1:$j$1,0),4)&":"&address(row($a$13),match(a17,$a$1:$j$1,0),4)),"=x") and can check my example file well.