Posts

Showing posts from May, 2010

wso2 das 3.0.1 Error while starting binary data receiver: Address already in use -

wso2 das 3.0.1 errors out while starting binary data receiver: address in use. running default port 9443 no or 0 offset. on same box, wso2 1.10.0 running port offset -1000. what default port start wso2 das 3.0.1 binary data receiver? log did not not indicate port in use , don't know port into. suggestions? tid: [-1234] [] [2016-09-12 17:16:39,789] error {org.wso2.carbon.databridge.receiver.binary.internal.binarydatareceiverservicecomponent} - error while starting binary data receiver {org.wso2.carbon.databridge.receiver.binary.internal.binarydatareceiverservicecomponent} java.net.bindexception: address in use @ java.net.plainsocketimpl.socketbind(native method) @ java.net.abstractplainsocketimpl.bind(abstractplainsocketimpl.java:376) @ java.net.serversocket.bind(serversocket.java:376) @ java.net.serversocket.<init>(serversocket.java:237) @ java.net.serversocket.<init>(serversocket.java:181) @ javax.net.ssl.sslserversocket.<init>

c++ - How come pack expanded variables do not get passed by reference? -

please consider following program: #include <iostream> template <typename t, typename ...ts> struct foo { template <typename ...us> static void bar(t& ot0, t& ot1, const t& it0, const t& it1, us... args) { std::cout << " -> foo<...>::bar() enter [ " << ot0 << ", " << ot1 << " ]" << std::endl; foo<t>::bar(ot0, ot1, it0, it1); foo<ts...>::bar(args...); std::cout << " <- foo<...>::bar() exit [ " << ot0 << ", " << ot1 << " ]" << std::endl; } }; template <typename t> struct foo<t> { static void bar(t& ot0, t& ot1, const t& it0, const t& it1) { std::cout << " -> foo<>::bar() enter [ " << ot0 << ", " << ot1 << " ]" << std::endl;

java - How to debug transformAndConcat in Google guava? -

i'm trying understand transformations within collection written in existing app, heavily uses google guava library. to more specific, can't step transformandconcat method in intellij idea. i'm using jdk 7. lazy , terminal operations can't used. or i'm wrong? how can debug method? if mean want step guava transformandconcat method itself, can use "f7" or click "step into" button in debug window step transformandconcat method. intellij idea 2016.2 help:stepping through program

performance - how to tune out of memory exception spark -

i have 11 nodes, each 1 has 2g of memory , 16 cores, try submit spark application using this ./bin/spark-submit --class myapp.main --master spark://name:7077 --conf spark.shuffle.memoryfraction=0 --executor-memory 2g --deploy-mode client /home/mbala/fer/myjars7/etlpersist.jar /home/mfile80.csv in slaves file didn't add node's ip in wich launch command because think in client mode driver must running in node. but whenever try run it, out of memory exception (sometimes because of gc or because of heap),i tried many solutions suggested in spark website , here in stackoverflow, tried minimize code, used memoryanddiskstorage still have problem ps: use line because found solution in forum --conf spark.shuffle.memoryfraction=0 should minimize number of cores? because think if use 16 cores 2g memory won't enough shuffle can please try use small g --executor-memory , --driver-memory options in command you. when set executor memory 2gb . assigns 0.6

python - Django - request.session not being saved -

i have pretty utility function gets open web order if session key called 'orderid', , create 1 if there no session key, , parameter 'createifnotfound' equal true in function. stepping through debugger can see piece of code sets session key after order has been created hit no exceptions, when check http request object' session field, not have attribute ? utility def get_open_web_order(request, createifnotfound=false): # check orderid in session order_id = request.session.get('orderid') web_order = none if none != order_id: try: web_order = weborder.objects.get(id=order_id, status='o') logging.info('found open web order') except weborder.doesnotexist: logging.info('web order not found') if (none == web_order) , (createifnotfound == true): logging.info('creating new web order') web_order = weborder() web_order.status = '

PhantomJS is not animating gifs during load for screen capture -

i'm using phantomjs take screenshots of lot of web pages. of these web pages have short animated gifs on them. no matter how long of timeout use between loading page , using page.render, still first frame of gif. there anyway make phantomjs run gif animation?

protobuf within avro encoded message on kafka -

wanted know if there better way solve problem having. here flow: our client code understands protocol buffers (protobuf). on server side, our gateway gets protobuf , puts onto kafka. now avrò recommended encoding scheme, put specific protobuf within avro (as byte array) , put onto message bus. reason avoid having entire protobuf->avro conversion. on consumer side, reads avro message, gets protobuf out of , works on that. how reliable protobuf kafka? there lot of people using it? advantages/disadvantages of using kafka protobuf? is there better way handle our use case/scenario? thanks kafka doesn't differentiate between encoding schemes since @ end every message flows in , out of kafka binary . both proto-buff , avro binary based encoding schemes, why want wrap proto-buff inside avro schema, when can directly put proto-buff message kafka?

python - Selenium-ChromeDriver SSL error/handshake failed -

my script throwing ton of ssl errors below: [19852:2032:0912/202419:error:ssl_client_socket_impl.cc(1141)] handshake failed; returned -1, ssl error code 1, net_error -100 [19852:2032:0912/202419:error:ssl_client_socket_impl.cc(1141)] handshake failed; returned -1, ssl error code 1, net_error -100 everything works errors keep looping , block script causing come halt. i have tried suppress errors below...but no effect: path_to_chromedriver = 'c:/path/to/chromedriver' options = webdriver.chromeoptions() options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') browser = webdriver.chrome(chrome_options=options, executable_path = path_to_chromedriver) i unsure if error in code above, if there should add isn't there, or whether these errors can suppressed. if helpful, old piece of code working fine until few days ago. site in question added ad network scripts caused ssl certificate issues. any appreciated.

python - Django No module named backendssocial.apps.django_app.context_processors -

i'm adding authentication via facebook , when run localhost i'm getting error in terminal: xx-macbook-pro:bookstore xx$ python manage.py runserver /library/python/2.7/site-packages/django/db/models/fields/subclassing.py:22: removedindjango110warning: subfieldbase has been deprecated. use field.from_db_value instead. removedindjango110warning) /library/python/2.7/site-packages/django/db/models/fields/subclassing.py:22: removedindjango110warning: subfieldbase has been deprecated. use field.from_db_value instead. removedindjango110warning) performing system checks... /library/python/2.7/site-packages/social/apps/django_app/urls.py:12: removedindjango110warning: support string view arguments url() deprecated , removed in django 1.10 (got auth). pass callable instead. name='begin'), /library/python/2.7/site-packages/social/apps/django_app/urls.py:14: removedindjango110warning: support string view arguments url() deprecated , removed in django 1.10 (got comple

How to use regex to disallow non-digts but allow a dot in Python? -

i new regex , trying remove non-digts keep dot ( . ) of string: x = ['abcd, efgh ', ' 20.9&dog; ', ' ijklm />'] so far have tried following: >>> x = re.sub("\d", "", x) 209 however trying following outcome: 20.9 thanks. you want inverted character class: re.sub(r"[^\d.]", "", x) note [^0-9.] , [^\d.] not same, because \d matches many more characters 0123456789 : >>> print(textwrap.fill( ... "".join(x x in (chr(y) y in range(0x110000)) ... if re.match(r"\d", x)), ... break_long_words=true, width=10)) 0123456789 ٠١٢٣٤٥٦٧٨٩ ۰۱۲۳۴۵۶۷۸۹ ߀߁߂߃߄߅߆߇߈߉ ०१२३४५६७८९ ০১২৩৪৫৬৭৮৯ ੦੧੨੩੪੫੬੭੮੯ ૦૧૨૩૪૫૬૭૮૯ ୦୧୨୩୪୫୬୭୮୯ ௦௧௨௩௪௫௬௭௮௯ ౦౧౨౩౪౫౬౭౮౯ ೦೧೨೩೪೫೬೭೮೯ ൦൧൨൩൪൫൬൭൮൯ ෦෧෨෩෪෫෬෭෮෯ ๐๑๒๓๔๕๖๗๘๙ ໐໑໒໓໔໕໖໗໘໙ ༠༡༢༣༤༥༦༧༨༩ ၀၁၂၃၄၅၆၇၈၉ ႐႑႒႓႔႕႖႗႘႙ ០១២៣៤៥៦៧៨៩ ᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙ ᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏ ᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙ ᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉ ᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙ ᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙ ᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹ ᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉ ᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙ ꘠꘡꘢꘣꘤꘥꘦꘧꘨꘩ ꣐꣑꣒

scala splitting json into multipe objects if array valued filed is found -

i need split json object in scala multiple objects if array valued fields found. input json { "name" : "test" "age" : 22, "courses" : [math, english] } should split into [{ "name" : "test" "age" : 22, "courses" : "math" }, { "name" : "test" "age" : 22, "courses" : "english" }] are there frameworks support kind of splitting. thanks! its best if model json scala object , work it. in example using jackson library , addon module scala. use appropriate json library. here modelling json case class using convenient json case class deserialization ability provided jackson scala module import com.fasterxml.jackson.databind.objectmapper import com.fasterxml.jackson.module.scala.defaultscalamodule import com.fasterxml.jackson.module.scala.experimental.scalaobjectmapper val mapper = new objectmapper() scalaobj

android - Can't run Hello World React Native App - Missing Realm constructor -

Image
i'm trying build test react-native app using these instructions . react-native init awesomeproject cd awesomeproject react-native run-android when (on device , on emulator), get: missing realm constructor - please ensure realmreact framework included! i haven't done special (i haven't touched code yet), trying load default hello world app. this can because have react packager terminal instance running old app, , created new project , ran it. need close old react packager , react-native run-ios for new project.

Cannot change Visual Studio 2015 -

i using visual studio 2015 community edition, , need add c++ it. vs doesn't let me add it. in fact, doesn't let me change control panel, either. cannot uninstall it. every time, following: setup blocked the computer needs restarted before setup can continue could please help? visual studio not come installed c++ default. visit microsoft link below see if helps. https://msdn.microsoft.com/en-us/library/60k1461a.aspx if above linked information not solve issue, ensure have rebooted pc. not libraries functional until reboot. also, provide os. visual studio can temperamental depending on windows version. as uninstall issue, can force uninstall via elevated command prompt. enter code below , change c: appropriate drive have visual studio on. c:\vs_community.exe /uninstall /force

c - Is it possible to get the size of the item the pointer is pointing at? -

is possible find size of item_t through pointer? typedef struct item { char x; char y; char life; }item_t; void main (void) { item_t test; void *ptr = &test; printf("%d\n",sizeof(ptr)); } return: 8 not if ptr of type void* -- shouldn't be. you can't dereference void* pointer. can convert other pointer type , dereference result of conversion. can useful, more should define pointer correct type in first place. if want pointer item_t object, use item_t* pointer: item_t test; item_t *ptr = &test; printf("%zu\n", sizeof(*ptr)); this give size of single item_t object, because that's type ptr points to. if ptr uninitialized, or null pointer, you'll same result, because operand of sizeof not evaluated (with 1 exception doesn't apply here). if ptr initialized point initial element of array of item_t objects: ptr = malloc(42 * sizeof *ptr); sizeof *ptr still give size of 1 of them. the sizeof

Why am I getting an Illegal invocation error from cordova media plugin? -

this code running: var clicker = new media("sounds/click.wav", function(){ console.log("playing click"); }, console.log); clicker.play(); i copied documentation, assumed work, when try , run error: i/mediafocuscontrol( 1486): audiofocus requestaudiofocus() android.media.audiomanager@21802acforg.apache.cordova.media.audiohandler$1@3bb77c5c req=1flags=0x0 i/chromium( 3671): [info:console(312)] "error in success callbackid: media1544259360 : typeerror: illegal invocation", source: file:///android_asset/www/cordova.js (312) what causes error? i've tried variety of different success callback functions, , none of them worked, suspect maybe due misconfiguration somewhere entirely separate, have no idea how track down. it turns out there 2 problems: first, needed change file path /android_asset/www/sounds/beep.mp3 . had tried though, , dismissed because didn't work... due second problem: cordova media plugin cannot play wav files. af

gitignore - Ignore some directories in Git -

i have in git repository path : pir-enio/src/main/java/at/clientside/com/audit/client i want ignore part: src/main/java/at/clientside/ because package com.audit.client . i wondering put .gitignore file in order ignore above path if put in main .gitignore going ignore comes after *src* going ignore /com/audit/client , not want ignore part. you can negate excludes like: pir-enio/* !pir-enio/src/main/java/at/clientside/com/audit/client but if want this, why didn't started git repository in /com ?

json - How to Join 2 different variables in Pig? -

i total newbie pig , have written following pig script: define format `format_text.py $emoji $acronym` ship ('$stream_file_path/format_text.py'); define parse `parse.sh` ship ('$stream_file_path_syntaxnet/parse.sh'); define process_roots `process_roots.py` ship ('$stream_file_path_syntaxnet/process_roots.py'); input_data = load '$data_input'; result1 = stream input_data through format; result2 = stream result1 through parse; result3 = stream result2 through process_roots; result4 = foreach result1 generate concat (result1, result3); store result1 '$data_output'; store result2 '$syntaxnet_output'; store result4 '$syntaxnet_results'; so, input_data json file of tweet. format formats "text" field of json clean tweet. parse runs cleaned json through syntaxnet generate dependency relations. output result2 looks like: 2 bank _ noun nnp _ 3 nn _ _ for each

backup - Stop paying Jira account -

what if stop paying jira, lose whole backlog , other achievements of team or frozen? and there way backup data of account in jira? thank you! you can find backup instructions here: https://confluence.atlassian.com/cloud/cancelations-744721616.html i believe lose access data still exist 2 weeks, can reactivate: "once site has been deactivated (i.e. site has been taken offline), have 2 weeks pay outstanding quote or contact atlassian have site restored before data permanently deleted. note data backups permanently deleted instances can retrieved raising ticket our support team within first month after instance has been deleted." - https://confluence.atlassian.com/cloud/billing-and-user-count-744721614.html

Cron Expression - Subtraction or Date Offset -

i'm not versed in cron expressions , struggling find out whether feasible. possible create expression every 2nd wednesday of month minus 52 days? the 2nd wednesday of month our known starting point , want subtract off run on ongoing basis. maybe there smarter way write this? thanks! i don't think can directly in cron time specification. running command every sunday (52 days before wednesday sunday) , check if date 52 days future between 8 , 13, inclusive: 0 0 * * 7 date=$(date --date='now+52 days' +\%-d); [ $date -ge 8 -a $date -le 13 ] && command (note percent signs special in crontabs , need escaped.)

database - SPARQL date filter query for RDF -

i querying using sparql, works fine. when add data filter doesn't throw error doesn't filter. final part should able query between 2 dates: prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix owl: <http://www.w3.org/2002/07/owl#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/xmlschema#> prefix hotel: <http://users.jyu.fi/~mimomuki/everything/hotel#> select * { ?room hotel:hascity ?sender; hotel:hasfirstday ?firstday filter ( ?firstday >= "2016-09-01"^^xsd:date ) } if want compare dates, may want ensure proper data type of operands in filter expression. can casting both values xsd:datetime filter ( xsd:datetime(?firstday) >= xsd:datetime("2016-09-01") )

Getting data from a site, which cant be found in main HTML file in Python -

Image
i'am using python , making request: page = requests.get('http://www.finam.ru/profile/moex-akcii/aeroflot/news/?start-date=2016-01-01&end-date=2016-12-31',auth=('user', 'pass')) i expect, able find everything, can see, when view website. dont know certian , not familiar libraries, try check manually: i rightclick on random part of page , select "show page code". , actually, can not find needed info there! i rightclick on random part of page , select "research element", , can find there in wierd "tree" structure : so question is, html file recieve, when making request? , how retrive topic names "tree structure". total noob html. besides source html, there javascript code running on web site, manipulate , change dom (the tree structure describe). when request via python, javascript code not run can see initial html code. doing such stuff called scraping , can tools such selenuim

xml - SSRS query using WITH XMLNAMESPACES not returning dataset -

the sql query have written ssrs report executes in ssms fails return result when run in ssrs report. there no error on report server or on database server. ssrs report renders contains no data. tried running sql profiler , query not show @ all. have several other reports on server run correctly , query appears in sql profiler. thing different in broken report querying xml data using ;with xmlnamespaces(default 'urn:hl7-org:v3') i same result running against sql server 2005 , 2008 here query, ideas on why nothing returned when run in ssrs. have modified query remove/modified client info may cause syntax error, unmodified query runs , returns results when run in ssms declare @mindate datetime; declare @maxdate datetime; declare @foodata table (msgid varchar(100), transactionname varchar(30),sourcesystem varchar(12),msgday date) ;with xmlnamespaces(default 'urn:hl7-org:v3') insert @foodata select msglogid msgid ,transactionname =

angular - ng build --prod removes navbar -

the --prod cli flag reason removes navbar compiled output. ideas why? my app.component looks this: import { component } '@angular/core'; import { router_directives } '@angular/router'; @component({ selector: 'app-root', template: ` <nav-bar></nav-bar> <router-outlet> </router-outlet>`, directives: [router_directives] }) export class appcomponent {} and navbar component: import { component, oninit } '@angular/core'; import { globalevent } '../shared/global.event' import { http, response } '@angular/http'; @component({ selector: 'nav-bar', templateurl: 'navbar.component.html', providers: [globalevent], styleurls: ['navbar.component.css'], }) export class navbarcomponent implements oninit { ... } note: building --dev flag works expected. hope isn't cli issue. apparently known issue angular-cli. see he

PHP Arrays: Grouping, Sum -

i'm trying print out shopping cart orders, however, instead of displaying products order want group orders order id can display sum of order , link detail page. instead of this --------------------------------------- date order number total --------------------------------------- today 1234wedk 600 --------------------------------------- today 1234wedk 500 --------------------------------------- i'd display this --------------------------------------- date order number total --------------------------------------- today 1234wedk 1100 --------------------------------------- here's sample array array:2 [▼ 0 => array:9 [▼ "id" => 57 "order_id" => 51 "order_hash" => "1234wedk" "price" => 600 ] 1 => array:9 [▼ "id" => 58 "order_id" => 51 "order_hash&

java - NumberFormatException error while checking if JTextField is empty -

i getting numberformatexception error during runtime. error caused when checking if jtextfield empty using if statement. private void btnaddnumbermouseclicked(java.awt.event.mouseevent evt) { numberarray.add(integer.parseint(txtnumber.gettext())); if(!(txtnumber.gettext().equals(""))){ scoreslist.settext(""); (int = 0; < numberarray.size(); i++) { scoreslist.append(integer.tostring(numberarray.get(i)) + "\n"); } } txtnumber.settext(""); might want change this: integer.tostring() to this string.valueof() or append integer in textarea without casting string. also try use .isempty() method instead of .equals()

ms access - Remove last row in a locked subform -

i pretty new access sorry low level question. have form couple subforms on , 1 of subforms locked editing. subform used see values associated field in main form. problem is, in subform shows last row (where add info new row) filled in couple fields , blank in others. assume product of being locked. there way not show last part enter new information since i'm not going adding info there anyways? in advance help! change propery allow additions on data tab of subform no

How do I order static assets created from webpack-dev-server for temporary index.html? -

i have been following angular 2 documentation regarding webpack. attempting use webpack-dev-server test application. entry points include polyfills, vendor, , app. when attempt run dev server, files ordered polyfills, app, , app. is there way explicitly order them when rendered in index.html template? var webpack = require('webpack'); var htmlwebpackplugin = require('html-webpack-plugin'); var extracttextplugin = require('extract-text-webpack-plugin'); var helpers = require('./helpers'); module.exports = { cache: false, debug: true, entry: { 'polyfills': './src/polyfills.ts', 'vendor': './src/vendor.ts', 'vip-app': './src/main.ts' }, resolve: { extensions: ['', '.js', '.ts'], }, module: { loaders: [ { test: /\.ts$/, loaders: [

pdf - Get font height/weight from TextRenderInfo how? -

Image
when parse existing pdf using itext(sharp), create object implements irenderlistener pass pdfreadercontentparser.processcontent() , sure enough, object's rendertext() gets called repeatedly text in pdf. the problem is, textrenderinfo tells me base font (in case, helvetica) can't tell height of font nor weight (regular vs. bold). known deficiency of itext(sharp) or missing something? the textrenderinfo tells me base font (in case, helvetica) can't tell height of font nor weight (regular vs. bold) height unfortunately itextsharp not provide public font size method or member in textrenderinfo . people worked around using distance between getascentline() , getdescentline() . if ready use reflection , though, can better exposing , using private textrenderinfo member graphicsstate gs , e.g. in render listener: public class locationtextsizeextractionstrategy : locationtextextractionstrategy { //hold each coordinate public list<sizeandtextan

sql - PostgreSQL "?" argument placeholder does not work for "WITH" -

i trying use ? in following way (i use in golang generate query, seems not go dependent): with tmp(name, enabled) ( values(?, ?),(?, ?) ) update table_groups set enabled = (select enabled tmp table_groups.name=tmp.name) table_groups.name in (select name tmp) getting: syntax error @ or near "," if substitute ? in above statement concrete values, works fine. there problem using ? with , how around it? thanks. go doesn't support @ of box. you can use jmoiron/sqlx if want functional example using sqlx (from docs ): var levels = []int{4, 6, 7} query, args, err := sqlx.in("select * users level in (?);", levels) // sqlx.in returns queries `?` bindvar, can rebind our backend query = db.rebind(query) rows, err := db.query(query, args...)

python - SQLAlchemy: filtering on values stored in nested list of the JSONB field -

lets have model named item , contains jsonb field data . 1 of records has following json object stored there: { "name": "hello", "nested_object": { "nested_name": "nested" }, "nested_list": [ { "nested_key": "one" }, { "nested_key": "two" } ] } i can find record filtering on name field such: session().query(item).filter(item.data["name"] == "hello") i can find record filtering on nested object likewise such: session().query(item).filter(item.data[("nested_object","nested_name")] == "hello") however struggling find way find record filtering on value of item stored within nested list. in other words want find record above if user has provided value "one", , know in key nested_key within nested_list . is possible achieve sqlalche

Android speech recognize prompt by audio instead of just text -

currently have working speech recognition recognizerintent.extra_prompt shown text on mobile on wearable watch. is there way or other option make prompt speak (play audio)? have tried voiceinteraction api limited picking option , have start through 1 of system voice command. private static final int speech_request_code = 0; // create intent can start speech recognizer activity private void displayspeechrecognizer() { intent intent = new intent(recognizerintent.action_recognize_speech); intent.putextra(recognizerintent.extra_language_model, recognizerintent.language_model_free_form); intent.putextra(recognizerintent.extra_prompt, "how can you?"); // start activity, intent populated speech text startactivityforresult(intent, speech_request_code); } // callback invoked when speech recognizer returns. // process intent , extract speech text intent. @override protected void onactivityresult(int requ

putting variables into vectors to be used in subsequent function (R) -

i have question regarding second function not producing wanted to #example mt-cars selected_cyl_6 <- subset(mtcars, mtcars$cyl==6) selected_cyl_4 <- subset(mtcars, mtcars$cyl==4) count <- function(variable,group) { sum(group[[deparse(substitute(variable))]]== 4) } #now create matrix results here below: #example u<-count(gear,selected_cyl_6) v<-count(carb,selected_cyl_6) w<-count(gear,selected_cyl_4) x<-count(carb,selected_cyl_4) matrix(c(u,v,w,x), byrow=true, ncol=2, nrow=2) this feasible option, love convert lines above function because in dataset there lot more variables , save lot of time , code length. tried following code: variables_of_interest <- c("gear","carb") groups_of_interest <- c("selected_cyl_6","selected_cyl_4") alteration_multiple <- function(variable_vector, group_vector){ m.results <- matrix(0, nrow = length(variable_vector), ncol = length(group_vector)) rownames(m.results) &l

documentation - What is the difference between computeScalingRotation and computeRotationScaling -

in the documentation of eigen's transform class , there 2 member functions identical signatures: void computerotationscaling(rotationmatrixtype*, scalingmatrixtype*) const void computescalingrotation(scalingmatrixtype*, rotationmatrixtype*) const both functions have identical documentation (the multiplication order rotation * scaling in both functions). decomposes linear part of transformation product rotation x scaling, scaling being not positive. if either pointer zero, corresponding computation skipped. this defined in svd module. what difference between them? there difference in order. if closely, difference is: // computerotationscaling if(scaling) scaling->lazyassign(svd.matrixv() * sv.asdiagonal() * svd.matrixv().adjoint()); // computescalingrotation if(scaling) scaling->lazyassign(svd.matrixu() * sv.asdiagonal() * svd.matrixu().adjoint()); // ^ ^

c# - PropertyChanged for a custom class is always null -

i have problem inotifypropertychanged , binding, watched dozen questions here, problem still exists. my xaml code: <window x:class="daa.ist.choosepc.mainwindow" 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:daa.ist.choosepc" mc:ignorable="d" title="mainwindow" height="350" width="525"> <window.resources> <local:question x:key="expertsystem" text="question"/> </window.resources> <grid datacontext="{staticresource expertsystem}"> <label x:name="description" content="Определение опимальной конфигурации ПК" horizontalalignment="lef

ruby - Rails redirect to the post after a comment is made -

i have comment form on tickets show page. can fill out, when submitting comment, goes comments show page. need go ticket showing. i have code @ moment: comment_controller.rb def create @comment = comment.new(comment_params) respond_to |format| if @comment.save format.html { redirect_to @comment, notice: 'comment created.' } format.json { render :show, status: :created, location: @comment } else format.html { render :new } format.json { render json: @comment.errors, status: :unprocessable_entity } end end end and similar thing destroy method def destroy @comment.destroy respond_to |format| format.html { redirect_to comments_path, notice: 'comment destroyed.' } format.json { head :no_content } end end i'm not sure how remember ticket on, redirect to. i have entered associations models ticket.rb , comments.rb you can replace redirect_to comments_path with redirect_to :back # or r

How to handle the Leave/Stay browser dialog in selenium webdriver -

Image
i not able handle browser dialog in selenium c# code. switchto().alert doesn't work dialog. there way can handle such dialogs? read this or you can try keyboard event well public event keypresseventhandler keypress

java - Binary Search Tree Remove method not working -

public class bstnode <e extends comparable<e>> { private e value; private bstnode<e> left; public bstnode<e> right; .... public bstnode<e>remove(e item) { if(item.equals(this.value)){ return replacementsubtreefromchildren(this.left, this.right); } if (item.compareto(this.value)<0){ this.left = this.left.remove(item); } else{this.right = this.right.remove(item); } return this; } private bstnode<e> replacementsubtreefromchildren(bstnode<e> left, bstnode<e> right) { if(left==null && right==null){ return null; } else if(left!=null && right==null){ return this.left; } else if(left==null && right!=null){ return this.right; } else{ e getleft=this.right.getleftmostnode().getvalue(); this.value = getleft; this.right = right.remove(getleft); } return this; } /**

MySQL field to store currencies name -

i have currencies table, have column called name, currency name, example: pyg = paraguayan guaraní­ --but store in table paraguayan guaraní std = são tomé , príncipe dobra --but store in table são tomé , príncipe dobra what collation can use store these value?

eclipse - Bean marked with @Configuration fails in creation and fails startup of application -

i have spring mvc app created using spring 4.1.0.release. have class has been marked @configuration mark configuration class. the xml config in application context below <bean id="a" class="a"></bean> the application failing on startup following error. i'm using eclipse jetty 8 plugin. org.springframework.beans.factory.beancreationexception: error creating bean name 'a' defined in servletcontext resource [/web-inf/applicationcontext.xml]: initialization of bean failed; nested exception java.lang.nosuchmethoderror: a(class name)(lorg/springframework/beans/factory/beanfactory;)v @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:548) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbean

continuous integration - Gitlabs artifact of one project used in further projects -

question what best way carry artifacts (jar, class, war) among projects when using docker containers in ci phase. let me explain issue in details, please don't stop reading... =) gitlabs project1 unit tests etc... package gitlabs project2 unit test etc... build (failing) here need 1 artifact (jar) generated in project1 current scenario / comments i'm using dockers in each .gitlab-ci.yml i'll have independent containers all working fine in project1 if use "shell" instead of dockers in .gitlab-ci.yml can keep jar file project1 in disk , use when project2 kicks build today trigger on call project2 when project1 finish working nicely my artifact not rpm i'll not add repo possible solutions i can commit artifact of project1 , checkout when need build project2 i need study if cache feature gitlabs designed purpose ( gitlab 8.2.1, how use cache in .gitlab-ci.yml ) hello must take @ script named get-last-successfu

php - Dom-pdf not rendering some characters -

Image
im using vsmoraes/laravel-pdf pdf generation. working fine english characters when comes other languages chinese, greek showing ???? below image i have tried this 1 went wrong. had problem before?

C Concatenate string in while loop -

i'm trying concatenate part of struct hex values. run on every byte in loop , convert hex, want concatenate hex 1 long string. however, end 1 value @ end of loop. reason string isnt concatenating properly. idea im doing wrong? typedef struct options_str { int max; int printname; } options; void set_default_options(options *options) { options->max = -1; options->printname = 0; } void do_file(file *in, file *out, options *options) { char ch; int loop = 0; char buf[81]; buf[0] = '\0'; int sz1; int sz2; int sz3; int seeker = offsetof(struct mystruct, contents.datas); //find total length of file fseek(in, 0l, seek_end); sz1 = ftell(in); //find length beggining struct beginning , minus total length fseek(in, seeker, seek_set); sz2 = sz1 - ftell(in); //set seek location @ beginning of struct offset fseek(in, seeker, seek_set); sz3 = sz2 + 1; char buffer[sz3]; char msg[s

javascript - d3.js path d attribute -

Image
i new d3 user. want create animation path created d3.arc() . my problem is, when mouseover event on g element triggered, path assigned javascript function instead of svg m path. i think problem use of arctween() function when return arcs() in result. var outerdata = [ [{outerradius: 90, innerradius: 74, cornerradius: 5, startangle: 0, endangle: -5.34071}], [{outerradius: 90, innerradius: 74, cornerradius: 5, startangle: 0, endangle: -1.5708}], [{outerradius: 90, innerradius: 74, cornerradius: 5, startangle: 0, endangle: -3.76991}], [{outerradius: 90, innerradius: 74, cornerradius: 5, startangle: 0, endangle: 2 * math.pi}], ]; function arcs(innerradius, outerradius, cornerradius, startangle, endangle) { return d3.arc() .innerradius(innerradius) .outerradius(outerradius) .cornerradius(cornerradius) .startangle(startangle) .endangle(endangle); } var svg = d3.selectall('svg'); var path = svg.select('g')

javascript - Error connecting to TM-U220 -

i have downloaded 2 javascript sdk epson printer supports tm-u220, , both of them won't connect printer , won't print. when tried use other sdk such qz tray, worked, qz tray must turned on, want work in android, use javascript sdk epson. problem when use printer sample epson provided in javascript sdk , input ip: 192.168.1.98, port: 9100, , device id: local_printer, got error : connected epos device service interface failed. [error_timeout] . printer did small printing, letter can't read, , @ end of print : 2http/1.1 . , in console : options https://192.168.1.98/cgi-bin/epos/service.cgi?devid=local_printer&timeout=10000 net::err_connection_refused and options https://192.168.1.98/cgi-bin/eposdisp/service.cgi?devid=local_display&timeout=10000 net::err_connection_refused i've created own simple code. first code using epos-2.3.0.js : <!doctype html> <html> <head> <meta charset="utf-8" /