Posts

Showing posts from January, 2013

html - How do I put a Bootstrap Glyphicon inside an asp:Button in ASP.Net? -

html - How do I put a Bootstrap Glyphicon inside an asp:Button in ASP.Net? - i'm using bootstrap 3 in project, , want utilize bootstrap glyphicons in asp.net buttons. here code used, though didn't work out (i got sample uses twitter bootstrap <span> tags instead of <i> tags): <asp:button id="btnrandom" runat="server" text="<span aria-hidden='true' class='glyphicon glyphicon-refresh'> </span>" onclick="btnrandom_click" /> maybe should done. how can work? in advance replies. you have utilize asp:linkbutton instead of asp:button, here how works me using bootstrap 3 in asp.net web-application: from code can create next work: <asp:linkbutton id="btnrandom" runat="server" cssclass="btn btn-primary" onclick="btnrandom_click"> <span aria-hidden=&qu

Refresh webpage when "#" is there in URL -

Refresh webpage when "#" is there in URL - i have 1 durandal application , in every view gets rendered "#{viewname}"in url. issue is, @ time if user keeps cursor in address bar , hits "enter" button page not reloaded. how accomplish that? reason why not loaded known tries find element #id in page. question how reload hitting come in in address bar? try below script whenever want reload page through code. window.location.reload(true); url refresh webpage durandal

Output values from selenium webdriver to excel sheet -

Output values from selenium webdriver to excel sheet - i using selenium webdriver output first 3 records using advanced search of linkedin in excel sheet not getting values of 'name' , 'description' fields except one. please this public void testexport() throws exception { driver.get(baseurl + "/"); driver.findelement(by.id("session_key-login")).clear(); driver.findelement(by.id("session_key-login")).sendkeys("#####"); driver.findelement(by.id("session_password-login")).clear(); driver.findelement(by.id("session_password-login")).sendkeys("#####"); thread.sleep(1000); driver.findelement(by.xpath("//input[@value='sign in']")).click(); driver.manage().timeouts().implicitlywait(30, timeunit.seconds); driver.findelement(by.id("advanced-search")).click(); driver.findelement(by.id("adv-o-n-ffs")).click(); new select(d

node.js - JSFtp throwing unhandled error -

node.js - JSFtp throwing unhandled error - i have jsftp implementation used ftp putting files server. problem whenever given host info jsftp() wrong gives unhandled error jsftp({host:...}); which causes process exit prematurely. can tell me method overcome try...catch doesn't work this? node.js ftp

c++ - what does ++operator do in this void uart_puts(unsigned char * t) { while(*t) uart_putch(*t++); -

c++ - what does ++operator do in this void uart_puts(unsigned char * t) { while(*t) uart_putch(*t++); - what ++ operator in c program? void uart_puts(unsigned char *t) { while (*t) uart_putch(*t++); //i cant understand operation here } pointer arithmetic: the sentence uart_putch(*t++) can discomposed in: uart_putch(*t); // actual t unsigned char value t++; // increments t pointer next unsigned char c++ c

routes - Don't change URL in AngularJS -

routes - Don't change URL in AngularJS - i having 2 in html lets x , y. x contains list of objects , y shows "different views" filled relevant info related item clicked in x. suppose if (lemon,orange etc) clicked showed properties "sourness" "weight" suppose if (wine,beer) clicked showed it's properties "alcohol%" etc. since properties different created different views , passed parameters accordingly show apt data. if not wrong utilize $routeprovider , have .config defined , pass parameters etc. "changes url" , , don't want that. is possible wishing in angularjs? p.s check link out , maintain eye on url select different names :) what looking in config file. you need ng-view, , templates. conditionally loading possible in angularjs via ? variable in url. can map $location.search() finding hash. in essence, if loads lemon want them clicking on lemon add together conditional url website.com/frui

Embedded Resource Dll in TFS Build -

Embedded Resource Dll in TFS Build - i have project build action utilize embedded resource dll in bin folder , xaml file build action=page in other folder. notice : have build .csproj not .sln in tfs build 2012 (workflow msbuild ) build other project correctly 1 allway see error : c:\windows\microsoft.net\framework64\v4.0.30319\microsoft.common.targets(1605,5): warning msb3245: not resolve reference. not locate assembly "...cmn". check create sure assembly exists on disk. if reference required code, may compilation errors. [e:\builds\17..me.net\mybuilddeffinition\sources..me..me.csproj] tfs

Safari fixed position issue with Google Maps info window -

Safari fixed position issue with Google Maps info window - so have google map beingness produced through api. have made custom info windows, bit hacky couldn't manage style actual windows in way wanted. on chrome & firefox this, should: the window see created using css: .window{ background-color: #fff7ef; position: fixed; margin-left: -95px; margin-top: -65px; width: 201px; height: 85px; border-radius: 3px; color: #736357; padding: 10px; text-transform: uppercase; } yet on safari, dont seem display in right position, turn out this: but when seek , inspect window, appears though should in right place, image below when hovering on window info in it: furthermore offset doesn't seem consistent distance, can't custom position safari only. not sure start this, unsure if issue safari not displaying fixed elements correctly, or if problem more lying within utilize of api. google-maps safari position fixed infowindow

Django what changes require a server restart -

Django what changes require a server restart - i know django have ability take changes without restarting server, there situations alter requires reboot. is there definitive rules changes require reboot (or changes don't). i know changes settings.py require webserver restart take effect. django restart reboot

sql - How to pass multiple command in one query? -

sql - How to pass multiple command in one query? - hi how can write code below more simply? ... 2 sql(oledb) command in 1 query. con.open(); cmd.commandtext = "delete * customers id_c = 1"; cmd.executenonquery(); cmd.clone(); cmd.commandtext = "delete * books id_b = 1"; cmd.executenonquery(); cmd.clone(); con.close(); provided don't need number of rows affected (returned executenonquery ) can set both commands in same sql separated ";" con.open(); cmd.commandtext = "delete * customers id_c = 1; delete * books id_b = 1"; cmd.executenonquery(); con.close(); sql wpf

c# - Capture Exception and Set a value for JSONProperty -

c# - Capture Exception and Set a value for JSONProperty - i wanted capture exceptions in createproperty method of json.net , replace type , message of property exception occured in property. this have acheived far. class customresolver : defaultcontractresolver { protected override jsonproperty createproperty(memberinfo member, memberserialization memberserialization) { jsonproperty property = base.createproperty(member, memberserialization); property.shouldserialize = instance => { var prop = (propertyinfo)member; seek { if (prop.canread) { prop.getvalue(instance, null); } } catch(exception exception) { property.propertytype = typeof(string); property.defaultvalue = exception.message; homecoming true; } homecoming true;

Rails :has_many make sure one is selected -

Rails :has_many make sure one is selected - i have installations , versions model , installation many versions. installation can create many versions , user needs select version marked default in versions database boolean datatype. how can create sure user has selected version list of many different versions within installation screen. 1 can selected , default field of versions model changed 'yes' , other versions belong installation set 'no' i suggest add together foreign_key :default_version_id installation model track default version instead of using entire column in version class purpose. create validation easier too. anyway, current implementation validation rule this: class installation < activerecord::base has_many :versions validate :default_version_must_be_selected private def default_version_must_be_selected if versions.collect{|v| v if(v.default == true)}.compact.length != 1 errors.add(:base, 'one default vers

php - mySQL group records with latest entry from child table -

php - mySQL group records with latest entry from child table - i have 3 tables office, computer , maintain. office list of offices, computers belongs office has many maintains. i want left bring together tables latest entry maintain table. the code below works grouping oldest entry in maintain. select `computer`.`id`, `computer`.`control`, `computer`.`operator`, `computer`.`datepurchased`, `computer`.`type`, `computer`.`property`, `computer`.`printer`, `computer`.`scanner`, `computer`.`osx`, `computer`.`applications`, `computer`.`licence`, `computer`.`isstandalone`, `computer`.`isinternet`, `computer`.`isnetwork`, `computer`.`generalstatus`, `computer`.`ip_address`, `computer`.`mac_address`, `computer`.`user_id`, `computer`.`office_id`, `computer`.`created`, `computer`.`modified`, `computer`.`deleted`, `office`.`id`, `office`.`description`, `office`.`main_office`, `maintain`.`id`, `maintain`.`dateencoded`, `maintain`.`findings`, `maintain`.`checkedby`, `maintain`.`remarks`,

Redhat Yum install issue zlib_1.2.2 -

Redhat Yum install issue zlib_1.2.2 - i have libz 1.2.3 installed bundle seems want 1.2.2 can't find repro hs it. able point me in right direction? error: package: erlang-erts-r14b-04.3.el6.x86_64 (epel) requires: libz.so.1(zlib_1.2.2)(64bit) seek using --skip-broken work around problem seek running: rpm -va --nofiles --nodigest you seek yum --allow-downgrade install zlib-1.2.2 redhat yum rhel

c# - Geolocator hanging on WP8, working on 8.1? -

c# - Geolocator hanging on WP8, working on 8.1? - geolocator seems not work on wp8 when should. (but unusual reason works fine on 8.1)... i'm in optimal conditions - lte, fios wifi... no obstructions. no reason why shouldn't work. however, seems hang , never homecoming current location or exeption. i have tried disable reverse geocode , not work. i've narrowed downwards beingness actual service gets location (geolocator or geoposition) id_cap_location enabled. phone location services enabled. i'm targeting wp8. code: private async void getlocation() { seek { geolocator gl = new geolocator(); gl.desiredaccuracyinmeters = 50; geoposition geoposition = await gl.getgeopositionasync(maximumage: timespan.fromminutes(5), timeout: timespan.fromseconds(60)); latitude = geoposition.coordinate.latitude.tostring(); longitude = geoposition.coordinate.longitude.tostring();

javascript - How can we get visitor location using google API -

javascript - How can we get visitor location using google API - <script type="text/javascript" src="http://www.google.com/jsapi?key=api key"></script> if(google.loader.clientlocation) { visitor_lat = google.loader.clientlocation.latitude; visitor_lon = google.loader.clientlocation.longitude; visitor_city = google.loader.clientlocation.address.city; visitor_region = google.loader.clientlocation.address.region; visitor_country = google.loader.clientlocation.address.country; visitor_countrycode = google.loader.clientlocation.address.country_code; document.getelementbyid('yourinfo').innerhtml = visitor_lat; } else { // implemented maxmind method (see source code) or may want leave message: document.getelementbyid('yourinfo').innerhtml = '<p>whoops couldnt find you!</p>'; } i used code finding current location of each visitor .but google.loader.cli

json - Converting cURL into apache httpclient JAVA code -

json - Converting cURL into apache httpclient JAVA code - i have below curl command want convert using apache httpclient, can help me code curl -u "uname:pass" -h "content-type: application/json" -h "accept: application/json" -d '{"browsers": [{"os": "windows", "os_version": "7", "browser_version": "8.0", "browser": "ie"}], "url": "http://google.com"}' http://www.testingbrowse/test thanks -h 'content-type: application/json' try below: mpentity.setcontenttype("application/json"); and "curl -d": -d '{"metric":"proc.loadavg.15m"}' you can utilize it: jsonobject obj = new jsonobject(); obj.put("metric", "proc.loadavg.15m"); but think need array,you can alter jsonarray there question:how convert “curl --data-urlencode" ht

How to convert a BsonDocument into a strongly typed object with the official MongoDB C# driver? -

How to convert a BsonDocument into a strongly typed object with the official MongoDB C# driver? - for unit testing purposes, i'd test class mappings without reading , writing documents mongodb database. handle special cases such circular parent / kid references , read properties, i've used bsoncclassmap.registerclassmap< mytype>(...) custom mappings overriding default automap(); generated mappings. does know how convert bson document desired typed object without making round trip database? driver doing when going , info store. goal utilize same logic mongodb c# driver using internally test serialization / c# domain object bson document. i'm able utilize bson extension method tobsondocument() convert c# object bsondocument. piece i'm lacking reverse of process - bsondocument.toobject< mytype>(); is possible latest version of official mongodb c# driver? seems should - i'm wondering if i'm blind , missing obvious. the mongodb

c# - Odata URL conversion error on "orderby" -

c# - Odata URL conversion error on "orderby" - i need show info in orderby i have url , need show info based on datewise i tried this http://localhost:33396/values.svc/names?$format=json&$expand=address&$select=address/phonenumber,address/pincode&$filter=address/any(value:value/pincode+eq+guid%27600045%27)+and+address/any(value:value/country+eq+guid%27india%27)%20&$orderby=address/date+desc but getting error this {"odata.error":{"code":"","message":{"lang":"en-us","value":"the parent value property access of property 'date' not single value. property access can applied single value."}}} how can solve this the address navigation property on names right? , error shows, think address collection. property access can used on single value, or confused using of items specified property "date" in "address" collection. c# and

python - Remote Debugging of Openstack -

python - Remote Debugging of Openstack - i'm working on openstack, connecting client hosts through vpn. how debug openstack running in local, i tried links not successful. in way go...? there article explaining exact problem have right can check here: debug openstack code local / remote eclipse , pydev python django web2py pylons openstack

python - AttributeError: 'NoneType' object has no attribute 'find' -

python - AttributeError: 'NoneType' object has no attribute 'find' - i have set of urls,i have urls in list called list(eg http://www.amazon.com/b/ref=s9_al_bw_brwse_a_v?_encoding=utf8&node=9097393011&pf_rd_m=atvpdkikx0der&pf_rd_s=center-4&pf_rd_r=10rxcp9tzpw3bp73ekha&pf_rd_t=101&pf_rd_p=1818119462&pf_rd_i=2858778011 ). @ bottom of urls page there number of pages each category. there span element trying homecoming url.but returning nonetype error the code have tried far for links in full_links: mech=browser() mech.set_handle_robots(false) mech.addheaders = [('user-agent', 'mozilla/5.0 (x11; u; linux i686; en-us; rv:1.9.0.1) gecko/2008071615 fedora/3.0.1-1.fc9 firefox/3.0.1')] url=links page=mech.open(url) html=page.read() soup=beautifulsoup(html) no_pages = soup.find('div',id="pagn") a=no_pages.find('span',{'class':'pagnlink'}) aes

javascript - AngularJS: What is this directive doing? -

javascript - AngularJS: What is this directive doing? - i have experience angularjs , have come across directive on web, not have seen before , unable comprehend doing? can help? specific questions: little understanding, signature of directive must doing dependency injection. struggling is: if $injector passed in array, why sent parameter in function i.e. function($injector); in other words why there 2 $injectors? not work if dont send $injector in array? also how directive has got controller embedded? when define such controllers? also see scope $ prefix in the code below how working without $? any links read more or explaining here useful. .directive('mycomp', [ '$injector', function($injector) { var $builder, $compile, $drag; $builder = $injector.get('$builder'); $drag = $injector.get('$drag'); $compile = $injector.get('$compile'); homecoming { restrict: 'a', scope: {

Get the context of Intent.RINGTONE_PICKER in Android -

Get the context of Intent.RINGTONE_PICKER in Android - i'm developing custom ringtone picker app handles ringonepicker intent android. when execute "set ringtone" android main ringtone settings info this: android.intent.extra.ringtone.type:1 android.intent.extra.ringtone.show_default:false android.intent.extra.ringtone.existing_uri:... android.intent.extra.ringtone.show_silent:true android.intent.extra.ringtone.title:phone ringtone and when click "set ringtone" contact menu get android.intent.extra.ringtone.show_default:true android.intent.extra.ringtone.existing_uri:... android.intent.extra.ringtone.type:1 android.intent.extra.ringtone.show_silent:false my question how can know in context im running?, , if i'm setting contact ringtone, contact it? there seems no back upwards , need store contact number , ringtone selected. by calling getcallingpackage() i'm able see if called "android ringtone" or "contact ringtone

monodroid - convert date to format of the locale format type in android with xamarin with visual studio -

monodroid - convert date to format of the locale format type in android with xamarin with visual studio - how current format of locale can format datetime format get. means if got format can format that. datetime.now.tostring(format); this doing in visual studio xamarin creating android application c#.net. please help me getting me format. thanks & regards parvez you can utilize civilization info formatter. var d = datetime.now; system.diagnostics.debug.writeline( d.tostring(system.globalization.cultureinfo.currentculture)); system.diagnostics.debug.writeline( d.tostring(system.globalization.cultureinfo.currentuiculture)); xamarin monodroid

javascript - Append jQuery working but onclick is not working -

javascript - Append jQuery working but onclick is not working - this question has reply here: event binding on dynamically created elements? 13 answers i have filter producttypes getting created per enteries in database via ajax: html part: <ul id="foodtype"></ul> ajax code show filter: function showtypes(){ $.ajax({ type: "post", url: "ajax/incl/showtype", data:'', datatype : 'json', cache: false, success: function(records1){ $('#foodtype').html(makefoodtype(records1)); } }); } function makefoodtype(data1){ var tbl_body = ""; $.each(data1, function() { var tbl_row = "", currrecord = this;

xml - Extracting & Converting Attributes into Elements using XSLT -

xml - Extracting & Converting Attributes into Elements using XSLT - i have next xml: <?xml version="1.0" encoding="utf-8"?> <rdate date="2014-03-14"> <student id="a-001" sex="m" group_a="yellow" group_b="green"> <name id="a-001-1" student_id="a-001" group="yellow"> <l_name>yuvraj</l_name> <m_name/> <f_name>bhatia</f_name> <o_name/> <age>15</age> <ethnicity>asian</ethnicity> </name> <origin id="a-001-a-o" region="asia"> <birth>1999-01-01</birth> <place>mumbai</place> </origin> <ident id="a-001-a-o-i" type="paper/photo"> <passport/> <coun

Navigate to Python module by name in Intellij keyboard shortcut -

Navigate to Python module by name in Intellij keyboard shortcut - using control+n while coding java in intellij helps me navigate classes. there similar functionality in intellij navigating python modules. thanks install python plugin settings | plugins | browse repositories | "python". add python sdk project select project settings select platform setting | sdks | add together new sdk | python sdk select python interpreter wait configuration complete control+n should work expected in project python intellij-idea keyboard-shortcuts python-module

Python sci-kit learn (metrics): difference between r2_score and explained_variance_score? -

Python sci-kit learn (metrics): difference between r2_score and explained_variance_score? - i noticed that 'r2_score' , 'explained_variance_score' both build-in sklearn.metrics methods regression problems. i under impression r2_score percent variance explained model. how different 'explained_variance_score'? when take 1 on other? thanks! ok, @ example: in [123]: #data y_true = [3, -0.5, 2, 7] y_pred = [2.5, 0.0, 2, 8] print metrics.explained_variance_score(y_true, y_pred) print metrics.r2_score(y_true, y_pred) 0.957173447537 0.948608137045 in [124]: #what explained_variance_score 1-np.cov(np.array(y_true)-np.array(y_pred))/np.cov(y_true) out[124]: 0.95717344753747324 in [125]: #what r^2 1-((np.array(y_true)-np.array(y_pred))**2).sum()/(4*np.array(y_true).std()**2) out[125]: 0.94860813704496794 in [126]: #notice mean residue not 0 (np.array(y_true)-np.array(y_pred)).mean() out[126]: -0.25 in [127]: #if predicted values different, such mean

jquery - Finding the closest difference between 2 degrees of a compass - Javascript -

jquery - Finding the closest difference between 2 degrees of a compass - Javascript - i'm trying find how many degrees apart 2 points of compass are. illustration if person facing 270 , compass 280 there 10 degrees between 2 points. i'd negative number if it's left , positive right, relative 1st heading. the problem comes when headings 350 , 020 example. these 2 points 30 degrees apart give result of -330. below illustration of code: function converttoradians(_var) { homecoming _var * (math.pi/180); } function converttodegrees(_var) { homecoming _var * (180/math.pi); } function getheadingdiff(_heading1, _heading2) { homecoming converttodegrees((converttoradians(_heading2) - converttoradians(_heading1))); } $(document).ready(function (){ $('#process').click(function (e){ e.preventdefault(); var hdg1 = parsefloat($('#heading1').val()); var hdg2 = parsefloat($('#heading2').val()); $

javascript - retain masonry effect with Angular JS sorting and filtering -

javascript - retain masonry effect with Angular JS sorting and filtering - please take @ fiddle has angular js jquery masonry layout. want utilize angular sorting , searching well. transitions not smooth , masonry layout not seem functional. is there suggestion on how can accomplish masonry type impact , include angular sorting/filtering etc. http://jsfiddle.net/rdikshit/ambf5/embedded/result/ <div ng:app="test"> <div ng-controller="mainctrl"> <input type="text" ng-model="namefilter" /> <a href="#" ng-click="order = 'id'; reverse=!reverse">order id</a> <a href="#" ng-click="order = 'name';reverse=!reverse">order name</a> <a href="#" ng-click="order = 'age';reverse=!reverse">order age</a> <div id="container" masonry> <div ng-repeat="item in items | filter: {

sql - Casting Errors Invalid Syntax -

sql - Casting Errors Invalid Syntax - okay, think adding cast statement easy. however, after researching not sure why code below doesn't work. error message: info loss might occur when casting nvarchar(100) varchar(100). the code working with: exec dbo.update @customerid, @vehicleid, @rownumber output; what have tried: exec dbo.update @customerid, cast(@vehicleid varchar(100)), @rownumber output; also tried: exec dbo.update @customerid, cast((@vehicleid) varchar(100)), @rownumber output; i did little more research , found solution: declare @tempvehicleid varchar(100); select @tempvehicleid = cast(@vehicleid varchar(100)) exec dbo.update @customerid, @tempvehicleid, @rownumber output; sql sql-server

css - Bootstrap isn't responding -

css - Bootstrap isn't responding - i created wp theme template has bootstrap "installed" , ready go. utilize of projects , have never had problem. for reason, particular website isn't responding when resize browser screen. view here: http://staging.ceobusinessalliance.com/about/ i'm trying troubleshoot issue can't find wrong. here basics of code: <div class="row"> <div class="col-xs-1"></div> <div class="col-xs-5"></div> <div class="col-xs-5"></div> <div class="col-xs-1"></div> </div> <div class="container"> <div class="row"> <div class="col-sm-1"></div> <div class="col-sm-5"></div> <div class="col-sm-5"></div> <div class="col-sm-1"></div> </div> <div

oracle11g - Casting a String to a Symbol in PLSQL -

oracle11g - Casting a String to a Symbol in PLSQL - i've created anonymous plsql block test , i'm running issue formatting. set serveroutput on begin in (select distinct do.subobject_name dba_objects do.object_name='my_table' , do.object_type='table partition') loop dbms_output.put_line(i.subobject_name); select t.field some_var my_table partition(i.subobject_name) t; end loop; end; however several compilation errors, believe related fact i.subobject_name string. believe partition function wants actual partition symbol(proper term this?), can't give in loop. is there kind of casting function can perform i'm looking for? partition is not function. partition keyword in context whole statement static , cannot pass partition name it; partition name must specified @ compile time. you can re-create statement dynamically , pass partition name in loop - a-la doing it. create sure concatenate str

build - Rebuild Windows Mobile PDA .CAB file -

build - Rebuild Windows Mobile PDA .CAB file - using smart device cab project , .cab installer files can created. after every modification of source code, have create .cab installer files separately each build or can built .cab installer files rebuilt? build cab windows-mobile-6 rebuild windows-mobile-5.0

c++ - Errors in iosfwd -

c++ - Errors in iosfwd - i´m not sure if plenty information, maintain getting error in iosfwd file, standard library. i post code included it, don´t think did. it keeps saying error 65 expected ; on multiple lines. lines similar to: typedef basic_fstream<char> fstream; . i @ finish loss because sure file in standard library not have error , have semi-colon why expects one? i using keil v5. c++ c++-standard-library keil

c++ - function returns all the same random number -

c++ - function returns all the same random number - this question has reply here: how generate different random numbers in loop in c++? 12 answers i have function in c++, returns random float number between 2 numbers. here code: float randfloatnumbetween(float lower, float upper) { srand((unsigned)time(null)); homecoming lower + ((float) rand() / rand_max) * (upper - lower); } when phone call function parameters lower 0.0 , upper 10.0, returns numbers like: 1.00503555 1.01846383 1.03463534 1.05263234 1.06461514 how can create function returns different numbers before , after comma? numbers like: 5.00503555 3.01846383 1.03463534 4.05263234 8.06461514 obviously need alter seed value each time phone call srand . based on comments you've left doesn't appear problem, needs pointed out. some random number generators (i know micro

php - SQL to select common as well as remaining data using JOIN in MySQL -

php - SQL to select common as well as remaining data using JOIN in MySQL - i have 3 tables: wi_district, wi_group, , wi_training. need count groups , trainings based on districts. purpose have used next sql; sql1 select wi_district.dst_name, count(grp_id) group_count, max(grp_created_date) grp_created_date wi_group inner bring together wi_district on wi_district.dst_id=wi_group.grp_dst_id , wi_group.grp_deleted=0 , wi_group.grp_type in (3) grouping wi_district.dst_name the query counts grouping each district. likewise, sql2 select wi_district.dst_name, count(trn_id) training_count, max(trn_created_date) trn_created_date wi_training inner bring together wi_district on wi_district.dst_id=wi_training.dst_id , wi_training.trn_deleted=0 , wi_training.trn_beneficiary_type in (-1,2,8,9,10) grouping wi_district.dst_name the query counts training each district. need combine results obtained sql1 , sql2 , result in form of dst_name || group_count || grp_created_

api - HMAC signing of response -

api - HMAC signing of response - i'm implementing hmac hashing of incoming messages rest api. hmac hash set in authorization header of request in form: authorization: [scheme] [hash] i want sign response. header suitable place response hash in? api http hmac

java - Context initialization failed, Bean creation exception -

java - Context initialization failed, Bean creation exception - i have problem above exception please give guide line, here code: //calling class bundle com.company.product.wsai.qb.ws.endpoint; //imports @endpoint public class sendrequestxmlendpoint implements sendrequestxmlmanagementservice { string strerrormsg = ""; // xml logging private static final string send_request_xml = "sendrequestxml"; private static final string send_request_xml_response = "sendrequestxmlresponse"; @autowired com.intuit.developer.objectfactory wsobjectfactory; @autowired com.intuit.quickbooks.objectfactory qbobjectfactory; @autowired testservice testservice; @autowired historyserviceimpl historyservice; public static list<tacategorysyncentitydto> travelagentcategorylist ; //match customertype in qb public static list<travelagentsyncentitydto> travelagentlist; //match client in qb

python - Bulk uploading "search api" documents to appengine? -

python - Bulk uploading "search api" documents to appengine? - we upload 30k entities datastore in 1 go, while creating documents strings associated these entities. this allow partial search on strings datastore not suited for. however, haven't been able find resources or documentation on how mass upload documents using search api functionality. how go this? we tried using bulkloader, keeps giving next error google.appengine.ext.db.kinderror: no implementation kind 'prototype' this because trying upload ndb models, error suggest defaulting db we tried hack our way around , define class db model , upload it. works, , info uploaded datastore, post_put_hook doesn't work here's code: #models.py import datetime google.appengine.ext import db google.appengine.tools import bulkloader class prototypee(db.model): #creating db model of info p_id=db.stringproperty(indexed=true,required=true) p_name=db.stringproperty(requ

sql - postgresql partitioning master table duplicate entries -

sql - postgresql partitioning master table duplicate entries - i ve created simple partitioning construction given below: master table create table parent_table ( id_n numeric(19,0) not null, name_v character varying(255), location_n numeric(19,0), constraint parent_table_pkey primary key (id_n ) ) child tables create table child_table_location_1 ( -- inherited table parent_table: id_n numeric(19,0) not null, -- inherited table parent_table: name_v character varying(255), -- inherited table parent_table: location_n numeric(19,0), constraint child_table_location_1_pkey primary key (id_n ), constraint child_table_location_1_location_n_check check (location_n = 1::numeric) )inherits (parent_table) create table child_table_location_2 ( -- inherited table parent_table: id_n numeric(19,0) not null, -- inherited table parent_table: name_v character varying(255), -- inherited table parent_table: location_n numeric(19,0), constraint child_table_location_2_p

clojure - Validating multiple polymorphic values using Prismatic Schema -

clojure - Validating multiple polymorphic values using Prismatic Schema - a little while ago asked simple polymorphic schemas, , reply there worked time. now map wish validate has additional value dependent upon key's value. a contrived illustration of object: {:type :foo {:type :bert {:type :foo :foo-param :bar :bert-size :medium :foo-param :bar :method :baz :method :baz :method :bang :baz-rate :max} :baz-rate :max} :bangness :considerable} the discriminators here :type , :method , each of has own set of valid sibling keys , values. previously :type existed, , next worked: (def ^:private test-base-schema {:type (s/enum :foo :abc :banana)}) (def test-schema (s/conditional #(= (:type %) :foo) (merge test-base-schema {:foo-param s/keyword}) ; other conditions here )) however there more 1 discriminator, number o

android - Facebook, Twitter & Google integration using socialauth -

android - Facebook, Twitter & Google integration using socialauth - i building android app connects facebook, twitter , google user logins. getting next error - org.brickred.socialauth.exception.socialauthexception: unable retrieve access token. status: 400. not connect using socialauth the code follows - package com.opaxlabs.boatbrat; import org.brickred.socialauth.profile; import org.brickred.socialauth.android.dialoglistener; import org.brickred.socialauth.android.socialauthadapter; import org.brickred.socialauth.android.socialautherror; import org.brickred.socialauth.android.socialauthlistener; import org.brickred.socialauth.android.socialauthadapter.provider; import android.app.activity; import android.content.intent; import android.os.bundle; import android.util.log; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; import android.widget.imageview; import com.facebook.session; import com.facebook.sessionstate;

javascript - Call to two buttons from the same page is not working -

javascript - Call to two buttons from the same page is not working - i have mvc5 application table , when click on create navigates new page form set info , save. working fine, problem need add together additional button calls new action not navigate other page, phone call , response. when set next 2 buttons in different pages both of them work fine, when add together them same page sec button calls create action of first. how avoid ? this save button phone call create action <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <input type="submit" id="actbtn" value="create" /> </div> </div> this sec button works fine in different page , when re-create create page calls create action. know because of submit how should avoid it? @using (html.beginform("check", "user", new { name = model.name })) { <input type

excel - How to extrapolate bucketed values into pivot table? -

excel - How to extrapolate bucketed values into pivot table? - i need extrapolate inventory @ item level 4-week buckets between 0 , 52 weeks. have 4500 unique lines follows: item unit weekly code description cases cost mvmnt woh bucket 595384 premium frying oil 500 $17.92 50 10 8-12 wks 546760 dark brownish sugar 650 $11.81 10 65 >1 year 598456 steam corn 330 $15.42 15 22 20-24 wks 532943 chc semi sweetness 240 $34.13 80 3 <4 wks the first item moves 50 cases week, 500 cases in inventory represents 10 weeks on hand (woh) , falls 8-12 wks bucket. want show inventory falls, inaccurate 500 cases of premium frying oil fall 8-12 wks bucket. in reality 200 cases fall <4 wks, 200 cases fall 4-8 wks, , remaining 100 cases fall 8-12 wks bucket. want convert first line following: item unit weekly

mysql - SELECT COUNT messes with ORDER BY -

mysql - SELECT COUNT messes with ORDER BY - i have problem don't understand. query select f.*, ftv.content, ftv.updated, count(ftv.file_number) versions files f inner bring together files_text_versions ftv on ftv.file_number = f.file_number f.file_number = '%s' order ftv.updated desc limit 1 totally ignores order statement, if remove the count(ftv.file_number) versions the query runs fine , orders should. why that, , how prepare it? sql fiddle same problem 1 table: http://sqlfiddle.com/#!2/c8f124/2 your count(*) turns query aggregation query. without group by , returns 1 row. although in other databases error, mysql allows syntax. you can prepare adding group by . however, have problem other 2 columns ftv . can values want clever aggregation: select f.*, substring_index(group_concat(ftv.content order ftv.updated desc), ',', 1) content, max(ftv.updated) updated, c

How to debug a white screen of death (WSOD) in Drupal? -

How to debug a white screen of death (WSOD) in Drupal? - i created website using drupal months ago , handed downwards , told me website has been disappeared. happens drupal's white screen of death. followed instructions dealing white screen of death in drupal. unfortunately, site still won't load. here "log" after followed first reply (i increased size well). starting loading scheme finished loading scheme starting loading scheme finished loading scheme starting loading views_ui finished loading views_ui starting loading ctools finished loading ctools starting loading dblog finished loading dblog starting loading locale finished loading locale starting loading scheme starting loading block finished loading block starting loading node finished loading node starting loading shortcut finished loading shortcut starting loading scheme finished loading scheme starting loading taxonomy finished loading taxonomy starting loading translation finished loading

How to execute a matlab file on the background through Java? -

How to execute a matlab file on the background through Java? - i have java programme makes changes matlab file reads , executes function. there way invoke , run read.m file through java programme without having open matlab? tried searching matlabcontrol documentation didnt find relevant. appreciate if guide me through. thank in advance. public static void tomatlab() throws matlabconnectionexception, matlabinvocationexception { matlabproxyfactoryoptions options = new matlabproxyfactoryoptions.builder() .setusepreviouslycontrolledsession(true) .build(); matlabproxyfactory mill = new matlabproxyfactory(options); matlabproxy proxy = factory.getproxy(); proxy.eval("addpath('c:\\path_to_m_file)"); proxy.feval("read"); proxy.eval("rmpath('c:\\path_to_m_file')"); // close connection proxy.disconnect(); } you need ru

html - Bootstrap : Setting content position of one div as per other div -

html - Bootstrap : Setting content position of one div as per other div - i have display someting now navigation ends bottom div should end there using breadcrumb navigation <div class="row"> <div class="span9" > <ol class="breadcrumb"> <li><a href="#">news & events</a><span class="divider"> |</span></li> <li><a href="#">jobs</a><span class="divider"> |</span></li> <li><a href="#">storage</a><span class="divider"> |</span></li> <li><a href="#">transportation</a><span class="divider"> |</span></li> <li><a href="#">site map</a><span class="div

dd wrt - activate and use pound proxy for domain names on dd/wrt v24 sp2 -

dd wrt - activate and use pound proxy for domain names on dd/wrt v24 sp2 - i activate , utilize pound on dd-wrt v24-sp2 (07/24/13) mega didn't find alternative in router administration. please how can activate , utilize it? pound doesn't come on standard builds of dd-wrt, may have been custom build referred to. need via optware, needs set up, 1 time configuration appears simple plenty (you need edit hand since there no gui it). dd-wrt pound

maven - JSF can't find h:inputFile tag -

maven - JSF can't find h:inputFile tag - i seek reproduce tutorial http://www.javatutorials.co.in/jsf-2-2-file-upload-example-using-hinputfile/ , have big problem: inputfile tag not available me. <h:form id="inputform" enctype="multipart/form-data"> upload file <h:inputfile id="file" label="file" value="#{inputbean.part}" required="true" requiredmessage="file not selected !!"> </h:inputfile> <h:message style="color: red" for="file" /><br /> <h:commandbutton id="submit" action="#{inputbean.uploadfile}" value="upload file" /><br /> <h:outputtext value="#{inputbean.statusmessage}" rendered="#{not empty inputbean.statusmessage}" /> </h:for

web services - SoapUI (Groovy) - passing a node value from a response to another request if a condition is true -

web services - SoapUI (Groovy) - passing a node value from a response to another request if a condition is true - i appreciate help following: xml response: <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-env:header/> <soap-env:body> <ns3:getseatplanavailabilityresponse xmlns:ns2="http://stagecoach.com/schemas/engine/common" xmlns:ns3="http://stagecoach.com/schemas/engine/seat"> <ns3:header> <ns2:version>1.0</ns2:version> </ns3:header> <ns3:journeydetails> <ns2:journeyid>4769046</ns2:journeyid> <ns2:origin> <ns2:cityid>120</ns2:cityid> <ns2:description>memphis, tn</ns2:description> <ns2:stop>mem</ns2:stop> </ns2:origin> <ns2:destination>