Posts

Showing posts from May, 2011

python - Method and variable descriptions in PyCharm -

is there pycharm parallel visual studio's intellisense feature gives brief description of variable or method when trying use method or variable? if so, how view description, , how can write own descriptions? in visual studio, example, can type 3 slashes /// creates summary block pops every time try use documented method or variable. help appreciated! wiki

forms - NotBlank assert and "must be of the type string, null given" -

Image
with symfony 3.3, have entity notblank assert : class usercontributorversion { /** * @var string * * @orm\column(type="string") * @assert\notblank() */ private $name; /** * set name * * @param string $name */ public function setname(string $name) { $this->name = $name; } } but if validate form novalidate attribute, have error : argument 1 passed appbundle\entity\usercontributorversion::setname() must of type string, null given i don't understand, why force setname(string $name = null) if have notblank assert ? thanks :) validation performed on form data. if form supposed entity (option data_class set) form data entity should modified. validation performed after request values set form data (in case entity) fields. you can find form submit flow here: https://symfony.com/doc/current/form/events.html#submitting-a-form-formevents-pre-submit-formevents-submit-and-fo

c# - Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on -

i have scenario. (windows forms, c#, .net) there main form hosts user control. the user control heavy data operation, such if directly call usercontrol_load method ui become nonresponsive duration load method execution. to overcome load data on different thread (trying change existing code little can) i used background worker thread loading data , when done notify application has done work. now came real problem. ui (main form , child usercontrols) created on primary main thread. in load method of usercontrol i'm fetching data based on values of control (like textbox) on usercontrol. the pseudocode this: code 1 usercontrl1_loaddatamethod() { if (textbox1.text == "myname") // gives exception { //load data corresponding "myname". //populate globale variable list<string> binded grid @ later stage. } } the exception gave was cross-thread operation not valid: control accessed thread other thread created on

php - (Solved) Encrypt in MySQL, Decrypt in C# -

can me. got data encrypted in mysql, store blob, need decrypt in c#, dont result wanted blob in mysql this got it should pd001ky6900430 here's code in c# string connectionstring = "data source=win-3doecchgfbt;initial catalog=dwh;user id=sa;password=password123;"; using (sqlconnection connection = new sqlconnection(connectionstring)) { string query = "select * tb_investor"; sqldataadapter adapter = new sqldataadapter(); var command = new sqlcommand(query, connection); adapter.selectcommand = command; datatable dtable = new datatable(); adapter.fill(dtable); for(var x =0; x < dtable.rows.count; x++) { var dr = dtable.rows; byte[] accnobyte = (byte[])dr[x].itemarray[1]; byte[] key = mkey("satu"); var rkey = bitconverter.tostring(key).replace("-", &quo

php - Password verify bcrypt, can't seem to match database -

this question has answer here: how use bcrypt hashing passwords in php? 9 answers php & mysql: using bcrypt hash , verifying password database 2 answers i'm trying make password_verify match crypt password in database, i'm having problem, seems doesn't match. i search , i've found need use varchar maximum length of 255 , still doesn't work. here code: if( isset($_post['bg9n']) && "bg9naw4") { $email = $_post['email']; $pass= $_post['pass']; if($pass) { $crypt = password_hash($pass,password_bcrypt); $decrypt = password_verify($pass,$crypt); } if(password_verify($pass,$crypt)) { echo "sucess"; // echo sucess } if (!empty($email) && !empty($pass) &

c# - System.Diagnostics.Process WaitForExit doesnt kill the process on timeout -

i run 7-zip c# code: processstartinfo processstartinfo = new processstartinfo { windowstyle = processwindowstyle.hidden, filename = zipfileexepath, arguments = "x \"" + zippath + "\" -o\"" + extractpath + "\"" }; using (process process = process.start(processstartinfo)) { if (process.waitforexit(timeout)) { } else { s_logger.errorformat("timeout whilte extracting extracting {0}", zippath); } process.close(); } now see happening when timeout hits, still 7-zip process exists in task manager . why happening? put both close , dispose your question mentions 3 methods on process class: waitforexit close dispose none of methods process, not kill it. waitforexit observational method, wait , see if process terminates itself. overload timeout return bool telling whether method observed process terminated or not. if didn't, it's presumably still runn

node.js - I tried writing sequelize query for sql query, but I am getting error as In aggregated query without GROUP BY -

the sql query is: select mf_status, count(distinct(mp_orders.id)) mp_orders left join mp_order_status_map on mporderstatus = mp_order_status left join mf_order_status on mf_order_statusid = mf_order_status.id group mf_status; sequelize written is: return orders.findall({attributes:[[sequelize.fn('count', sequelize.fn('distinct','id')), 'orders']], : querywhere, raw: true, include:[{ model:mporderstatusmap, attributes:[], on:{"mp_order_status":{"$col":"mporderstatus"}}, include:[{ model:mforderstatus, on:{"id":{"$col":"mf_order_statusid"}}, attributes: [[sequelize.col('mf_status'), 'status']], raw: true,

PHP passing a class to another class and using a constant from it -

i'm trying use constant class i'm passing class, can't work out how call it. can point out i'm going wrong: class { const test = 1; } class b { protected $c; function func($c) { $this->c = $c; echo $this->c::test; // doesn't work } } $a = new a(); $b = new b(); $b->func($a); accessing constants on instances on properties syntactical ambiguity/incompatibility in php versions < 7. you're doing work fine in versions >= 7. works fine in versions: function func($c) { echo $c::test; } in php < 7, you'll have resort to: $c = $this->c; $c::test; wiki

How to extend the NavigationListItem control in SAPUI5? -

i want extend navigationlistitem control accept sap.ui.core.control objects in it's aggregation. have created separate file extend control , added new aggregation called 'rows' type sap.ui.core.control in metadata section. extended control getting called in view, not displaying child controls added new aggregation 'rows'. please advise, if need add more extension file. extension code: sap.ui.define(["sap/ui/core/control", "sap/tnt/navigationlistitem"], function(control, navigationlistitem) { "use strict"; return navigationlistitem.extend("ajacontrolext.control.navigationcustomlistitem", { metadata: { properties: { }, defaultaggregation: "rows", aggregations: { rows: { type: "sap.ui.core.control", multiple: true, singularname: "row"

Authentication - VS 2017 15.3; ASP.Net Core 2.0; Angular -

when selecting angular template vs 15.3 gives no other authentication choice other "no authentication". referencing angular components in views. how authentication functionality app? tia you can create asp.net core 2.0 non-spa project authentication. can add classes , other functionality related server-side authentication spa project. additionally see following documentation: https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x - , - https://docs.microsoft.com/en-us/aspnet/core/security/authentication/ wiki

angularjs - Angular Js: date field from database showing one day less -

what have in @entity person class - @jsonformat(pattern="yyyy-mm-dd") private date dob; what printing on screen- <tr ng-repeat="person in vm.persons"> <td>{{person.id}}</td> <td>{{person.name}}</td> <td>{{person.location}}</td> <td>{{person.dob}}</td> </tr> the person.dob showing date 1 day lesser exist in database. possible reason ? note: i have dob date type in database microsoft sql server. json response rest call returns timestamp being converted yyyy-mm-dd format shown above. example of issue:- in database dob(s) are:- dob 1989-05-18 1989-05-18 1970-01-01 on screen showing below- person dob 1989-05-17 1989-05-17 1969-12-31 let me know if need more info on issue. i recommend using moment js or utc date. common problem between server , ui wiki

json - jq - add new field with updating whole file -

i have json file constructed in simmilar way: [ { "_id":"1234", "org":"org1", "int": {"url":"http://url.com.uk:1234"}}, { "_id":"4321", "org":"org2", "int": {"url":"http://url.com.us:4321"}}, ... ] now im "jumping" 1 entry , checking if under url application working properly. after check want add/update field "status". can't update whole file, im getting: $ jq --arg mod "good" '.[0].int + {stat: $mod}' tmp.json { "url": "http://url.com.uk:1234", "stat": "good" } how can jq command new updated whole file, not part of it? if put data in data.json , changes want make each record separate arg.json argument file like { "1234": { "int": { "stat": "good" } }, "4321": { "int&q

sorting - Wordpress pre_get_post filter and sort by the same field -

i trying add filter , sort in pre_get_posts limit display posts having dates greater or equal today based on custom field (meal_date), , sort fields in ascending order using same custom field (meal_date). orderby works alone , filter works alone, not together. add_filter('pre_get_posts', 'pre_get_posts_hook' ); // place pre_get_posts_hook in functions.php $currentdate = date('y-m-t'); //today's date function pre_get_posts_hook($wp_query) { //start pre_get_posts_hook if(is_admin() ){ //if admin page return $query; // take no action } if (is_archive()) //if archive page, following { $wp_query->set( 'orderby', 'meta_value' ); //set query orderby $wp_query->set( 'meta_key', 'meal_date' ); // set query @ field $wp_query->set( 'order', 'asc' ); // set query order ascending $wp_query->set( 'meta_query', array( //start array a

javascript - Range Slider - get start value and end value -

i using range slider( https://github.com/schme16/chart.js-rangeslider ) in project. when slider moved, need start value , end value of current range. how can done? is there documentation describes config options , events? wiki

java - AWS lambda + spring boot = not wiring component -

i´m trying use spring-boot inside aws lambda application make calls soap web-service. looks isn´t autowiring soap component. here´s code: @springbootapplication(scanbasepackages={"com.fenix"}) @enableautoconfiguration @componentscan public class aplicacao extends springbootservletinitializer { public static void main(string[] args) { springapplication.run(aplicacao.class, args); } @override protected springapplicationbuilder configure(springapplicationbuilder springapplicationbuilder) { return springapplicationbuilder.sources(aplicacao.class); } } @configuration public class beans { @bean public jaxb2marshaller marshaller() { jaxb2marshaller marshaller = new jaxb2marshaller(); marshaller.setpackagestoscan("com.tranzaxis.schemas", "org.radixware.schemas", "org.xmlsoap.schemas", "com.compassplus.schemas"); return marshaller; } @bean public tranclient tranclient(jaxb2marshaller marshaller) { tranclient cl

c++ - Setting different compiler flags when "Running" and "Debugging" app -

i native code run -o3 optimisation whenever hit "run (shift+f10)" in android studio , -o0 when hit "debug (shift+f9)" . how achieve in cmakelists or in build.gradle app? i couldn't find looking through google. any appretiated! wiki

plsql - Is it possible to read a text file and write it in binary format in another file using PL/SQL UTL_FILE? -

for example: consider text file "a.txt" has following contents: 123,jhon 456,jason 125,deepak i want read above text file , want write binary file considering first field integer , 2nd field character/varchar2 (like in c or c++). file "a.txt" has 2 fields. each field separated comma. let first field stored in integer type. let max length of second field 10. hence, 2nd field padded space (let b represents blank space) make 10 chars , stored in type char(10) . now each records after formatting of fixed byte size , without filed separator: 123jhonbbbbbb 456jasonbbbbb 125deepakbbbb if can write each field of each line shown above ( one integer , 1 char(10) ) in binary format using utl_file or other oracle utility, can read file in c opening file in binary format , can store each record in structure , can go ahead further processing. typedef struct { int id, char name[10], }sample; hope explains want achieve. on apprecia

c++ - Qt5 cmake Windows Linker Error -

i wanted start new project uses qt in combination cmake. (hope i) followed docs, seems if linker not doing work correctly: cmakefiles\qttest.dir/objects.a(main.cpp.obj): in function `qstring::qstring(char const*)': p:/qt/5.9.1/msvc2015_64/include/qtcore/qstring.h:659: undefined reference `__imp__zn7qstring16fromascii_helperepkci' cmakefiles\qttest.dir/objects.a(main.cpp.obj): in function `qtypedarraydata<unsigned short>::deallocate(qarraydata*)': p:/qt/5.9.1/msvc2015_64/include/qtcore/qarraydata.h:237: undefined reference `__imp__zn10qarraydata10deallocateeps_yy' i'm using mingw-w64 (the x86_64 installation) clion , bundled cmake , qt 5.9.1. cmakelists.txt looks this: cmake_minimum_required(version 3.8) project(qttest) set(cmake_cxx_standard 14) set(cmake_module_path ${project_source_dir}) set(cmake_verbose_makefile on) # qt set(cmake_include_current_dir on) set(cmake_automoc on) set(qt5_no_link_qtmain on) set(cmake_prefix_path p:/qt/5.9.1/msvc2

python - Unsure of data type returned nparray operations -

i've written function similar this: def my_function(my_series): return my_series.mean() * 500 i passing in pandas series object my_series. compute , print , following: dtype: float64 234.43646 what returning here? have cast float() before can use it. worse when store many of these in series, end series of of information. this trivial i've been stuck on bit now. guys! edit: here's rest , why it's issue. don't understand why this. new_array = [] yr in year_list: new_array.append(my_function(df.loc[df.index.year == yr, ['cola']])) df['new_col'] = new_array maybe problem in assignment here new series in existing dataframe. each entry in series isn't number, it's full dtype: float 64 , number. if instead change function above return float(my_series.mean() * 500) then when print result float number, without info. edit #2 (sorry edits, last one) print(df['new_col']) yields this:

java - Search results from Main and Archive schema -

we got move old dated records history , archive schemas. , regular user search has refers 3 schemas main, history, archive. think of making history , archive data fetch service , enable multiple threads @ service layer fetch records 3 different sources , union them. application environment spring boot. please advise me what's best way. in advance ps: pls give tips create multiple threads , aync processing service layer, apart spring async annotation wiki

c - GCC - How to stop malloc being linked? -

i struggling code down minimal bare bones size! using stm32f0 32k flash , need part of flash data storage. code @ approx 20k flash size! of due use of stm32 hal functions can account , optimise later if needed. however, biggest consumer of flash implicitly included library routines. can not seem remove these functions. not called anywhere in code or hal code. functions such _malloc_r (1.3k bytes), , __vfiprintf_r (3kb) , many others using large part of flash. think these libc functions. not use these , them gone! does know how remove these? i have tried different optimisation levels , linker options no luck far. have tried -nostdlib , --specs=nosys.specs no change. if remove file definitions functions such _exit linker error suggesting library still included , needs these. linker map confirms presence of lot of unwanted functions! any suggestions? solved... of code included , called assert. moment removed assert calls code size more halved! instead us

prestashop - Wrong price on product page in another currency -

i have problem price of product. use 2 currencies, czk , euro. czk working fine, when switch euro have problem displaying correct price of product. strange is, after put product cart, price correct. you can see on screenshot 1, showing price different in html code in tag "content", correct value. on second screenshot u can see shopping cart , correct price. even in backoffice, price correct. on product page rendered wrong. i find out, doing products combinations. and products combinations, when reload page ctrl+f5, real price flash there second , after rendering of page complete, start showing wrong price. btw. "my conversion rate correct" <div> <p class="our_price_display" itemprop="offers" itemscope itemtype="https://schema.org/offer"> {strip} {if $product->quantity > 0}<link itemprop="availability&q

javascript - Bootstrap4 navbar always collapsed -

for reason, exact same code have started working differently once updated angular... here navbar code <nav *ngif="authservice.isloggedin" class="navbar navbar-toggleable-md navbar-light bg-faded"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarsupportedcontent" aria-controls="navbarsupportedcontent" aria-expanded="false" aria-label="toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" routerlink="home">mavis</a> <div class="collapse navbar-collapse" id="navbarsupportedcontent"> <ul class="navbar-nav mr-auto"> <li class="nav-item" *ngif="authservice.isadmin"> <a class="nav-link" routerlink="settings"&

swift - iOS export to csv does not work for some messengers -

i have used this tutorial implement export csv feature. my code: let menuitemsstat = orderstable.getstatsformenuitems(startdate: startdate, enddate: enddate) if menuitemsstat != nil { let itemsnames = menuitemsstat!.itemnames let itemvalues = menuitemsstat!.itemvalues generalstats.append("\(nslocalizedstring("menu item;quantity of orders", comment: ""))\n") itemname in itemsnames { generalstats.append("\(itemname);\(itemvalues[itemsnames.index(of: itemname)!])\n") } } line in generalstats { csvfile.append(line) } { try csvfile.write(to: path!, atomically: true, encoding: string.encoding.utf8) } catch { print("failed create file") print("\(error)") } let vc = uiactivityviewcontroller(activityitems: [path!], applicationactivities: []) present(vc, animated: true, completion: nil) vc.excluded

vb.net - Most efficent way to save custom settings -

my vs2013 vb app saves settings registry , has grown point bothering me. want save settings (strings) files. bonus can on network , used multiple users. there may hundreds, thousands of lines. preferred format use? old ini, csv, xml? settings files don't appear option in case far can see. i recommend creating object of class , use serialization xml .net applications. easy implement, supported , can import , export settings 1 computer another. can set application ready settings network. in addition, make future programming / upgrades easier. i listing here working example ( tested ). code in use since 2012 , working enterprise level application. note: included 1 " setting item " demo add own. first : settings or options class : imports system.xml.serialization imports system.io <serializable()> _ public class options public keys_use_lists boolean public sub new() keys_use_lists = true end sub #region "methods"

How come java longs MAX_VALUE < java floats MAX_VALUE despite being 64bit vs 32bit -

like title says, don't understand how java's primitive data type long maximum , minimum values smaller float 's maximum , minimum. despite long being 64bit , float being 32bit. what going on? the reason because float using floating point precision. long can store high number of precise digits, while float can store high value without same precision in lower bits. in sense, float stores values in scientific/exponential notation. large value can stored in small number of bits. think 2 x10^200, huge number can stored in small number of bits. wiki

How to create a directory in Java? -

how create directory/folder? once have tested system.getproperty("user.home"); i have create directory (directory name "new folder" ) if , if new folder not exist. file thedir = new file("new folder"); // if directory not exist, create if (!thedir.exists()) { system.out.println("creating directory: " + thedir.getname()); boolean result = false; try{ thedir.mkdir(); result = true; } catch(securityexception se){ //handle } if(result) { system.out.println("dir created"); } } wiki

node.js - Firebase cloud functions inconsistent with bulk updates -

i have firebase cloud function in calling external api end point this. const functions = require('firebase-functions'); var admin = require("firebase-admin"); admin.initializeapp(functions.config().firebase); var request = require('request'); var moment = require('moment'); var rp = require('request-promise'); var db = admin.database(); exports.oncheckin = functions.database.ref('/news/{newsid}/{entryid}') .oncreate(event => { console.log("event triggered"); var eventsnapshot = event.data.val(); request.post({ url: 'http://mycustomurl/endpoint/', form: { data: eventsnapshot.data } }, function(error, response, body){ console.log(response); }); }) i using blaze plan , working fine. problem when creating bulk data (around 50 100 entries) http request @ custom url not workin

php - Basic reverse-proxy in Docker: Forbidden (no permission) -

i start jwilder nginx proxy on 8080 docker run -d -p 8080:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy i'm running standard php:apache container without mapping port (so 80 exposed on container network). use env var connect proxy: docker run -d -e virtual_host=test.example.com php:apache on localhost i've added in /etc/hosts: ip test.example.com now visit text.example.com:8080 on computer try connect reverse proxy (8080) route me php-apache on container port 80. but error: error: forbidden don't have permission access / on server. apache/2.4.10 (debian) server @ test.example.com port 8080 what missing? have change apache configuration somewhere? (it's default). seems go throught nginx because i'm seeing apache error think need tell apache inside (php apache): allow 'route')? your title appears misleading. description, you've setup functioning reverse proxy , target connecting reverse proxy broken.

How can I download the .zip of my private github repository using cURL on php? -

i want download latest zip version of private github repository i'm working on, , want using php script. however, current php script returning "not found" - i'm guessing have issue curl user/pass setup, can't figure out. current code follows: $username='xxx'; $password='xxx'; $url='https://github.com/[user]/[reponame]/archive/master.zip'; $ch = curl_init(); curl_setopt($ch, curlopt_url,$url); curl_setopt($ch, curlopt_returntransfer,1); curl_setopt($ch, curlopt_httpauth, curlauth_any); curl_setopt($ch, curlopt_userpwd, "$username:$password"); $result=curl_exec ($ch); file_put_contents('master.zip', $result); curl_close ($ch); i able work separating login page , file download page 2 requests. following code worked me: $username='xxx'; $password='xxx'; $url='https://github.com/[user]/[reponame]/archive/master.zip'; $ch = curl_init(); curl_setopt($ch, curlopt_url,'https://github.

go - Why do I get a "cannot assign" error when setting value to a struct as a value in a map? -

this question has answer here: access struct in map (without copying) 1 answer new go. encountered error , have had no luck finding cause or rationale it: if create struct, can assign , re-assign values no problem: type person struct { name string age int } func main() { x := person{"andy capp", 98} x.age = 99 fmt.printf("age: %d\n", x.age) } but if struct 1 value in map: type person struct { name string age int } type people map[string]person func main() { p := make(people) p["hm"] = person{"hank mcnamara", 39} p["hm"].age = p["hm"].age + 1 fmt.printf("age: %d\n", p["hm"].age) } i cannot assign p["hm"].age . that's it, no other info. http://play.golang.org/p/vrlsitd4ep i found way around - creating incrementage func on person, can

android - Universal version of google play services -

i want use react-native-maps package in react-native app , package needs latest version of google play services work properly. want host apk of google play services in somewhere , refer users download if version of google play services out of date.i want know there universal version of google play services compatible android devices? i think (030) version of google play services work on every version. wiki

javascript - Load same record using paginate in ajax using ajax call and simple page load laravel 4.2 -

i want use same controller function simple page load , load more case using ajax call receive same record time via ajax call here controller method public function viewusersbasedonrecentposts() { $page = input::get('page', ''); $users = user::get_most_recent_post_users($page); if(request::ajax()){ sleep(2); $html = view :: make("users.recent_users_view", compact('users'))->render(); $response = array('success'=>true,'html'=>$html); echo json_encode($response,true);die; } return view :: make("users.view_user_basedon_recent_posts", compact('recomendation','users')); } now here jquery ajax call $(document).ready(function(){ $(document).on('click', '#loadmorerecentusers', function(){ var page = $(this).attr('page_id'); $.ajax({ type: 'get', url: '<?=route('trendingpo

css - How to set the font weight in the font-family property? -

i have below css code .mybutton{ font-family : segoe ui semibold; } semi bold applies in above case i need change below .mybutton{ font-family: segoe ui, helvetica neue, arial semibold } but semi bold not applied, how achieve out using font-weight property here shorthand font body { font: font-style font-variant font-weight font-size/line-height font- family; } wiki

powershell - Unable to run experiment on Azure ML Studio after copying from different workspace -

my simple experiment reads azure storage table, selects few columns , writes azure storage table. experiment runs fine on workspace (let's call workspace1). now need move experiment workspace(call workspace2) using powershell , need able run experiment. using library - https://github.com/hning86/azuremlps problem : when copy experiment using 'copy-amlexperiment' workspace 1 workspace 2, experiment , it's properties copied except azure table account key. now, experiment runs fine if manually enter account key import/export modules on studio.azureml.net but unable perform via powershell. if export(export-amlexperimentgraph) copied experiment workspace2 json , insert accountkey json file , import(import-amlexperiment) workspace 2. experiment fails run. on powershell "internal server error : 500". while running on studio.azureml.net, notification "your experiment cannot run because has been updated in session. please re-open experiment see

postgresql - Connection of Postgres with Python on Shell -

#!/usr/bin/python import psycopg2 import sys import psycopg2.extras def main(): #from config import config conn=psycopg2.connect(host="localhost",user="postgres",database="firstdb"); cur=conn.cursor('cursor_unique_name', cursor_factory=psycopg2.extras.dictcursor) cur.execute("select * data") row_count = 0 row in cur: row_count += 1 #print "abc" print "row: %s %s\n" % (row_count, row) print "hello"; print "hello there working man!!!..."; if __name__ == "__main__": main() can me rectifying error in script since not able print rows through script? only last print executes once python firstname.py . i have made changes in pg_hba.conf suggested other answers still no success! the behavior seeing suggests have empty database. unab

php - Firebase Messaging service not working sometimes -

i'm developing taxi booking application using android & im new firebase. developed 2 android application using firebase message service. create 2 firebase apps in same firebase project @ firebase concole & use 2 keys 2 android modules(passenger module & driver module). passenger app/module. (device a) driver app/module. (device b) php application on server handle requests. i need send firebase message device device b. application work fine. sometimes, didn't receive firebase message to, onmessagereceived(remotemessage remotemessage) method on device b. success json array server device a, {"multicast_id":4784526898355206621,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1503395492396343%2f40e632f9fd7ecd"}]} what doing wrong? please me resolve issue. these related files used in 2 apps. androidmenifest.xml - passenger application (device a) <manifest xml

sql server 2012 - Recursive SQL Query for 6 individual months of following query -

Image
i'm wondering if there way perform following query recursively so 6 times recent 6 months. select datename(month,getdate()) 'month', sum(case when overallriskrating = 1 1 end) 'low', sum(case when overallriskrating = 2 1 end) 'med', sum(case when overallriskrating = 3 1 end) 'high' dbo.changeevaluationform month(datesubmitted) = month(getdate()) the results query follows i'd return 5 more rows data each of months prior current month. that's possible? i'd avoid performing 5 more individual queries if can. thank in advance. you can group by , using dateadd() move 6 months current month: select datename(month, datesubmitted) 'month', sum(case when overallriskrating = 1 1 end) 'low', sum(case when overallriskrating = 2 1 end) 'med', sum(case when overallriskrating = 3 1 end) 'high' dbo.changeevaluationform datesubmitted >

sql - How to check on which column to create Index to optimize performance -

Image
i have below query costing time , have optimize query performance. there no index on of table. but query performance optimization thinking create index. not sure on particulary filtered column have create index. thinking group , count number of distinct records filtered column condition , decide on column should create index not sure this. select * order_mart fol fol.parent_prod_srcid in ( select e.parent_prod_srcid src_grp join mar_grp b on a.h_lpgrp_id = b.h_lpgrp_id join data_grp e on e.parent_prod_srcid = b.h_locpr_id a.child_locpr_id != 0 , dt_id between 20170101 , 20170731 , valid_order = 1 , a.prod_tp_code 'c%' ) , fol.prod_srcid = 0 , is_caps = 1; below query execution plan: select * order_mart fol inner join ( select distinct e.parent_prod_srcid src_grp join mar_grp b on a.h_lpgrp_id = b.h_lpgrp_id join data_grp e on e.parent_prod_srcid = b.h_locpr_id a.child_locpr

ibm - Enable to get the nextInvoiceTotalAmount from SoftLayer_account object -

i cannot nextinvoicetotalamount softlayer_account object using softlayer rest api https://api.softlayer.com/rest/v3.1/softlayer_account/getobject.json?objectmask=mask[id,nextinvoicetotalamount,openticketcount,openticketswaitingoncustomercount] could let me know how can attribute of current balance, please? this due attribute requires use of legacy object mask in request, current balance request should add " balance " property in mask, try improved request: updated retrieve current balance , next invoice amount. https://[username]:[apikey]@api.softlayer.com/rest/v3.1/softlayer_account/getobject?objectmask=id;nextinvoicetotalamount;openticketcount;openticketswaitingoncustomercount;balance don't forget replace [username] , , [apikey] valid credentials. currently portal using softlayer_account::getnextinvoicetotalamount method retrieve specific attribute, try this: https://[username]:[apikey]@api.softlayer.com/rest/v3.1/softlayer_account/getnextin

python - How to add properties to edges when using add_edge_list in graph_tool? -

i trying use add_edge_list instead of inserting edges 1 one using add_edge in order make graph creation faster. but can't find how can create these edges @ once , associate weight property them without looping on edges once created. from documentation at: https://graph-tool.skewed.de/static/doc/graph_tool.html#graph_tool.graph.add_edge_list if given, eprops specifies edge property maps filled remaining values @ each row, if there more two. wiki

javascript - Detecting if element is hovering on section -

Image
have side dot navigation on website - standard position: fixed dot nav. have 2 types of sections 2 types of background on same website - lets assume 1 white , black. problem when dots not visible when navigation hovering black section. tried write script detects if section have class , if dot on section - if yes color of dot changed. had success after finish realise script works in 1 way ( scrolling top bottom ) , if detect bottom top scrolling not work when change direction in middle of website. arleady spend on quite while , im clueless - here code have far - working when scroll top bottom. do have other suggestion or perhaps library solve issue ? edit: layout quite artistic - there boxes floats left or right dynamicly , dots have change when box there, why splice array , push #myname it. edit2: can see how works under link ( not optimized, slow load time http://lektor.ionstudio.pl/ ) var sections = []; $("section[id]").each(function() { sections.push(&

tfs2017 - Remaining work for bugs not included in work details in TFS 2017.2 -

Image
i have bugs have values in remaining work field want show when column visible , count towards assigned work user in work details section in tfs when looking @ sprint. i have working bugs setting set bugs managed requirements want bugs appear in backlog along product backlog items , don't want have create task each bug manage remaining time. i can working if change working bugs setting bugs managed tasks bugs grouped , show unparented , can't order them product backlog items. doesn't work i'm trying achieve. i want have mix of bugs , product backlog items in sprint assigned multiple users , see how many hours each user has assigned them week can planed out. is there setting can put against bug work item type make sure remaining work show in work details section , burndown chart? a bit our setup: we using tfs 2017 update 2 on premise using scrum process template working bugs setting set "bugs managed requirements" in tfs sprin

groovy.lang.MissingMethodException:No signature of method --groovy script in soap -

i have defined array def sample1 = ["a","b","c","d"] string[] .. .. def sample9 = ["555","454","678","456"] string[] def p = ["1","2","3","4"] string[] (k=0; k <= 4; k++) { setvalues(sample1[k].concat(p[k]), sample9[k]) } ` i'm trying values like: a1 = 555 b2 = 454 but on execution error: groovy.lang.missingmethodexception: no signature of method: script7.setvalues() applicable argument types: (java.lang.string, java.lang.string) values: [a1, [555]] possible solutions: getclass() error @ line: xx could around? can set values 1 array another? if please me out on you can combine lists, transpose them , create map collectentries . e.g. def sample1 = ["a","b","c","d"] def sample9 = ["555","454","678","456"] def p = ["1","2","

python to merge certain XML tags from file1 to file 2 -

i have 2 xmls. xml1 , xml2. update xml1 content of xml2. xml1 <vdu xmlns="test:file"> <lsm> <m-id>v1</m-id> <name>v1</name> <communication>bi</communication> <states> <s-name>stage1</s-name> <state> <s-type>defaultstate</s-type> <s-func> <p-name>pkgname</p-name> <f-list> <f-name>funcname</f-name> <f-arg>{&amp;}</f-arg> </f-list> </s-func> </state> <lib-path>libpath</lib-path> <e-list> <e-name>noevent</e-name> <event> <nss>inc</nss> <nfs>inc</nfs> <actions> <p-name>pkgname</p-n

raspberry pi - Android Things - Slow Installation -

i trying develop simple application android things , raspberry pi 3, problem installation of app very slow (the size of apk file 4 or 5mb). network fine. i'm using versiĆ³n 0.5 of android things. any ideas? finally, in case problem not network, wrong sd card. change , it's ok. wiki

MySQL select instr -

i have column path & name & extension of file. select name & extension. example : /xmlweb/processdescriptor/descriptor/local/currencies/tl_rn_tth.xml how select "tl_rn_tth.xml" ? use substring_index negative parameter: select substring_index(path_column, '/', -1) your_table wiki

php - Microsoft Graph Delta Query -

i have problem synchronizing events outlook.live.com calendar using php library microsoft graph . when delta query new events added outlook calendar, instead of returning new events, receive deleted events. my query: /beta/users/{userid}/calendars/{calendarid}=/calendarview/delta?$deltatoken={deltatoken} response got: array(3) { ["@odata.context"]=> string(60) "https://graph.microsoft.com/beta/$metadata#collection(event)" ["@odata.deltalink"]=> string(523) "https://graph.microsoft.com/beta/users/{userid}/calendars/{calendarid}/calendarview/delta?$deltatoken=vlobdbmaw0qt42orhn1p_k-qpjgwepylqd3oqnzd4oq1x-2qdilwt6qcenoj4pg1sircy2xwwoewx909sipaxkdt1f5_hvmieov401e2_sruq37btknelpw5ocmqh0ye1xvjpnl78lpmnlg17djaxyyy-shwwf9-e0r1dkdtqm27oc3cpef7wrstqcicfyjrzrmvgaefdo4fnrsixeqyij5ui88_-iza5wtinffpwme.s-fenjlawgt-dds6bzo3mahc9v1na9bn8l3y7ysc9xk" ["value"]=> array(1) { [0]=> array(3) { ["@odata.type"]=> string(2