Posts

Showing posts from April, 2010

javascript - BigCommerce: How to create custom filter? -

i want allow checkbox-filtering, such when particular checkbox 'checked', page show items corresponding checkbox property. example) want products 'new', check box new products. how can create kind of filter in bigcommerce? have tried url-api filter, granted didnt expect much, have @ least tried it. i hoping way 'hide' other products if dont fall under checkbox's property. you can write javascript you, main thing you'd need here somehow differentiate between product types. example: designates product 'new' vs 'old'? i happy write script react users interaction checkboxes, need html here products in order have our javascript recognize them. can update question html examples of products or items want hide/show based on user interaction checkbox selector?

matlab - Concept of validate for neural network -

i have problem concept of validation nn. suppose have 100 set of input variables (for example 8 input, x1,...,x8) , want predict 1 target(y). have 2 ways use nn: 1- use 70 set of data training nn , use trained nn predict other 30 sets of target validation , plot output vs target 30 sets validation plot. 2- use 100 sets of data training nn , divide outputs 2 part (70% , 30%). plot 70% of outputs vs corresponding targets training plot. plot other 30% outputs vs corresponding targets validation plot which 1 correct?? also, difference between checking nn new data set , validation data set?? thanks you cannot use data validation, if has been used training, because trained nn "know" validation examples. result of such validation biased. sure use first way.

install - Installing Erlang/OTP 17.5 on OSX -

the official install instructions say: if want build wx application, need wxwidgets-3.0 (wxwidgets-3.0.0.tar.bz2 http://sourceforge.net/projects/wxwindows/files/3.0.0/ ) or github bug fixes: $ git clone --branch wx_3_0_branch git@github.com:wxwidgets/wxwidgets.git who wouldn't want bug fixes: $ git clone --branch wx_3_0_branch git@github.com:wxwidgets/wxwidgets.git cloning 'wxwidgets'... fatal: remote branch wx_3_0_branch not found in upstream origin does know bug fix version located? response comment : with caps, get: $ git clone --branch wx_3_0_branch git@github.com:wxwidgets/wxwidgets.git cloning 'wxwidgets'... ssh_exchange_identification: read: connection reset peer fatal: not read remote repository. please make sure have correct access rights , repository exists. for future searchers: in order use github commands above, you need setup ssh keys computer . had done that, reason didn't work few hours later. firewall problems

C# evaluate for a value greater than 0 given 3 variables -

is more efficient use: if ( a+b+c > 0) or if ( a>0 || b>0|| c>0) or there better way either of these? these 2 expressions not equivalent: first expression false a=1, b=0, c=-1 , while second true . the first expression require 2 additions, comparison zero, , branch, while second expression require 3 comparisons 0 , 3 branches, because || operator short-circuiting. in end, difference going undetectably small. the case when second expression win when a , b , c represent expensive computations: if (expensivecomputationa() > 0 || expensivecomputationb() > 0 || expensivecomputationc() > 0) { ... } since computation above stop after first success, resultant code faster result of short-circuiting expensive branches.

javascript - Call a 'Fathers' function form a 'Children' componen in ReactJS -

i have next component 'father' contains 'children' component in react js. var father = react.createclass({ render: function () { return ( <div> <children/> </div> ); }, onupdate: function(state) { this.setstate(state); } }); i want call onupdate function on father children without calling 'children' method 'componentdidupdate' because i'm using method other thing breaks application. how can that. pass down in properties. if need update specific parts , prevent children updating, use method shouldcomponentupdate var father = react.createclass({ render: function () { return ( <div> <children onupdatecallback={this.onupdate}/> </div> ); }, onupdate: function(state) { this.setstate(state); } }); var child = react.createclass({ render: function () { ... }, shouldcompo

java - AWT-Exception NullPointer when Accessing Another Class -

i have 2 classes, drawsnakegamepanel , maze. trying call method in maze class in drawsnakegamepanel class. think have maze class initiated, each time triggers nullpointererror. don't understand null it's referring to. obvious don't it. help. public class drawsnakegamepanel extends jpanel { private snake snake; private kibble kibble; private score score; private maze maze; drawsnakegamepanel(snake s, kibble k, score sc){ this.snake = s; this.kibble = k; this.score = sc; public void paintcomponent(graphics g) { super.paintcomponent(g); switch (gamestage) { case 2 : { displaygame(g); //exception here break; } private void displaygame(graphics g) { displaygamegrid(g); displaysnake(g); displaykibble(g); maze.displaymaze(g); //breaks here } } public class maze extends jpanel { int xnumofsquares = (501 / 30); int ynumofsquares = (501/30); int squaresize = 30; public maze(int maxx, int maxy, int squa

ms access - update data with 2 keys using oledb in c# -

i made project in c# , connected database 2 tables. first table tcostumers costumer's details, works perfectly. second table treports reports of every costumer every year. keys cid , cyear. succeeded making button insert new year costumer. problem making update button update cinfo. there no error when run program doesn't save info. here code: private void button2_click(object sender, eventargs e) { oledbcommand command = new oledbcommand(@"update treports set cinfo = @cinfo cid = @cid, cyear = @cyear", connect); command.parameters.addwithvalue("@cinfo", textbox2.text); command.parameters.addwithvalue("@cid", textbox3.text); command.parameters.addwithvalue("@cyear", textbox1.text); try {

Python Pandas to_pickle cannot pickle large dataframes -

i have dataframe "df" with 500,000 rows. here data types per column: id int64 time datetime64[ns] data object each entry in "data" column array size = [5,500] when try save dataframe using df.to_pickle("my_filename.pkl") it returned me following error: 12 """ 13 open(path, 'wb') f: ---> 14 pkl.dump(obj, f, protocol=pkl.highest_protocol) oserror: [errno 22] invalid argument i try method same error: import pickle open('my_filename.pkl', 'wb') f: pickle.dump(df, f) i try save 10 rows of dataframe: df.head(10).to_pickle('test_save.pkl') and have no error @ all. therefore, can save small df not large df. i using python 3, ipython notebook 3 in mac. please me solve problem. need save df pickle file. can not find solution in internet. probably not answer hoping did...... split dataframe smaller chunks using np.array_split (althou

html - PHP Facebook request permissions publish -

when log in on facebook requires me permits. here code use log in , requires permits: <?php session_start(); // added in v4.0.0 require_once 'autoload.php'; require 'functions.php'; use facebook\facebooksession; use facebook\facebookredirectloginhelper; use facebook\facebookrequest; use facebook\facebookresponse; use facebook\facebooksdkexception; use facebook\facebookrequestexception; use facebook\facebookauthorizationexception; use facebook\graphobject; use facebook\entities\accesstoken; use facebook\httpclients\facebookcurlhttpclient; use facebook\httpclients\facebookhttpable; // init app app id , secret facebooksession::setdefaultapplication( '*************','*************************' ); $required_scope = 'public_profile, publish_actions, email, manage_pages'; //permissions required // login helper redirect_uri $helper = new facebookredirectloginhelper('http://www.bestparty.altervista.org/app/facebook/fbconfig.php' )

linux - loop through a file and print file attributes in C -

i new programming in c. need program loop through files in folder , print these attributes each file. @ point printing attributes of folder. #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <dirent.h> int main(int argc, char *argv[]) { dir *dp; struct stat file_stats; if (argc != 2) { fprintf(stderr, "usage: fstat file...\n"); return exit_failure; } if ((stat(argv[1], &file_stats)) == -1) { perror("fstat"); return exit_failure; } dp = opendir("./"); if (dp == null) { perror("couldn't open directory"); return exit_failure; } while (readdir(dp)) { printf("filename: %s\n", argv[1]); printf(" device: %lld\n", file_stats.st_dev); printf(" protection: %o\n", file_sta

ruby - undefined function error in rspec -

i having trouble running rspec file, provided part of exercise, , not sure going on. here code in silly_blocks.rb: def reverser(num = 1) result = [] if yield == integer yield + num else yield.split.each{|word| result << word.reverse} result.join(' ') end end here rspec file: require "05_silly_blocks" describe "some silly block functions" describe "reverser" "reverses string returned default block" result = reverser "hello" end result.should == "olleh" end "reverses each word in string returned default block" result = reverser "hello dolly" end result.should == "olleh yllod" end end describe "adder" "adds 1 value returned default block" adder 5 end.should == 6 end "adds 3 value returned default block" adder

graph - Can dygraphs plot chart base on a subset of fields from a csv file? -

i plot chart base on subset of fields csv file. can dygraphs that? you can use visibility option suppress display of particular columns in data. requires these columns still numeric & parse, of course. if can't guarantee that, you'll need preprocess data.

android - How do I host Github repository to Gradle -

i have repository on github, use repository in android studio using: dependencies {compile 'com.google.code.gson: gson: 2+'} gradle. know how this? i don't know if got question...i understood want compile jar files not local project , hosted in repository. if matter, guess should use custom maven repository, not github one. if problem can give more details on how create custom maven repo.

java - Having error while building Spark 1.3.0 JDK 1.6.0_45 maven 3.0.5 CentOS 6 -

when trying build spark 1.3.0 added dependencies in package error related class mismatch `[warn] /u01/spark/core/src/main/scala/org/apache/spark/executorallocationmanager.scala:23: imported `clock' permanently hidden definition of trait clock in package spark [warn] import org.apache.spark.util.{systemclock, clock} [warn] ^ [error] /u01/spark/core/src/main/scala/org/apache/spark/executorallocationmanager.scala:127: type mismatch; [error] found : org.apache.spark.util.systemclock [error] required: org.apache.spark.clock [error] private var clock: clock = new systemclock() [error] ^ [error] /u01/spark/core/src/main/scala/org/apache/spark/scheduler/dagscheduler.scala:66: reference clock ambiguous; [error] imported twice in same scope [error] import org.apache.spark.util._ [error] , import org.apache.spark._ [error] clock: clock = new systemclock()) [error] ^ [warn] /u01/spark/core/src/m

objective c - Why doesn't the Xcode compiler auto-error for pointer type safety? -

for example: void modlongeraddress(double *aptr) { *aptr = 1.11; // or number goes beyond storage capacity of single precision float } int main(int argc, const char * argv[]) { float singleprecision = 1.11; modlongeraddress(&singleprecision); return 0; } as far can tell, generates warning. wouldn't situation considered dangerous enough generate hard error, or missing something? thanks whozcraig's help, found setting causing this. appears in xcode 6.2 (6c101), there setting called "treat incompatible pointer type warnings errors" set " no " default. this setting found in build settings of project, under " apple llvm 6.0 - warnings - languages ". simply toggling " yes " did trick, , build failed expected. edit : big bonus suppose if explain why would set " no " default? appears may not true versions of xcode?

regex - Replace php extension with slash / using .htaccess -

i want rewrite php extensions .htaccess . want replace php extension slash / . example if have: http://example.com/about-us.php http://example.com/about-us/ how can make modifying piece of code: options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / # externally redirect /dir/foo.php /dir/foo rewritecond %{the_request} ^[a-z]{3,}\s([^.]+)\.php [nc] rewriterule ^ %1 [r,l,nc] ## internally redirect /dir/foo /dir/foo.php rewritecond %{request_filename}.php -f [nc] rewriterule ^ %{request_uri}.php [l] rewriterule .*[^/]$ $0/ [l,r=301] thanks all!!! you can use: options +followsymlinks -multiviews rewriteengine on rewritebase / # externally redirect /dir/foo.php /dir/foo rewritecond %{the_request} ^[a-z]{3,}\s([^.]+)\.php [nc] rewriterule ^ %1/ [r,l] ## internally redirect /dir/foo /dir/foo.php rewritecond %{request_filename}.php -f [nc] rewriterule ^(.+?)/?$ $1.php [l]

Using BigQuery for AdSense data - 403 Access Denied -

i've been using bigquery pull adsense data, queries have started failing, error: (403) access denied: table google.com:adsense-reports:reports.dailycustomchannelreport: user not have permission query table in dataset google.com:adsense-reports:reports here's sample query: select matched_ad_requests, clicks, [google.com:adsense-reports:reports.dailycustomchannelreport] date between '2015-02-10' , '2015-02-11'and custom_channel_code 'test_18' these query failures aren't associated code change application. fail in bigquery browser tool- queries ran in past. seems rule out problem query. nothing has changed regards account access adsense. able log in dashboard , see data. any ideas how can restore ability query data? thanks. i got internal confirmation: adsense experiment bigquery discontinued. team tells me notified experiment users months ago, before disabling it. sorry lack of better news!

rss - Yahoo pipes - compare item content from multiple feeds -

in yahoo pipes have 2 rss feeds. want grab item content second feed compare item content in first feed. based on guids. if matches want items first feed in output. can pls? thanks bane solved yql plugin query: select * rss url='feed1' , guid in (select guid rss url='feed2')

php - Retrieve a similar query -

in nutshell, page populates course, , @ bottom have 3 boxes similar courses, , similar course cannot current course refered id. similar in terms of course_title. below how current course populated: $get_crs_similar = "select * courses course_id='$course_id'"; i retrieve 3 similar course, thinking retrieve last similar course first 1, , second last similar course, , third similar course, 3 cannot equal current course. any appreciated. html similar courses <div class="well-none"> <div id="mycarousel" class="carousel slide"> <div class="carousel-inner"> <div class="item active"> <div class="row"> <h4> <?php echo $crs_title2; ?></h4> <div class="col-sm-3 col-xs-6"><a hr

excel - Compare sheets to copy differences -

i have working vba code compares 2 sheets , copies duplicates 'changes' sheet. need opposite. need copy differences changes sheet. sub comparesheets() dim sht1rng range dim sht2rng range set sht1rng = worksheets("rxcp order").range("a1", worksheets("rxcp order").range("a1000").end(xlup)) set sht2rng = worksheets("qs1 order").range("a1", worksheets("qs1 order").range("a1000").end(xlup)) each c in sht1rng set d = sht2rng.find(c.value, lookin:=xlvalues) if not d nothing worksheets("changes").range("a1000").end(xlup).offset(1, 0).value = c.value worksheets("changes").range("a1000").end(xlup).offset(0, 1).value = c.offset(0, 1).value set d = nothing end if next c end sub one way find changes 1 worksheet add sheet3 following formula in each cell of used range of sheet1: =if(sheet1!a1<>sheet2!a1,1,0) then

Linux command in Go server for continuous integration -

i using go server continuous integration of our code. environment-deploy-template, wish set environment variables on stage , echo in property files application. linux command give in job so? for example, thing : echo "propname=#{env variable}\n">>prop files location could please confirm this? the syntax go.cd env variable ${env_var} , full command is: echo propname=${env_var} >> props.txt more details on environment variables: using environment variables in go

I2C Sensor Arduino outputs 0s? -

i have d6t omron temperature sensor (1x8 array) , trying temperature readings it. however, after debugging , making sure there's no error, can't outputted 0's. here's code, modified example contained in softi2cmaster library github, more information here http://playground.arduino.cc/main/softwarei2clibrary // simple sketch read out bma020 using softi2c // readout bma020 chip // use low processor speed (you have change baud rate 2400!) // #define i2c_cpufreq (f_cpu/8) #define no_interrupt 1 #define i2c_timeout 1000 #define sda_port portc #define sda_pin 4 #define scl_port portc #define scl_pin 5 #include <softi2cmaster.h> #include <avr/io.h> #define bmaaddr 0x14 float ptat, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, pec; void cpuslowdown(void) { // slow down processor factor of 8 clkpr = _bv(clkpce); clkpr = _bv(clkps1) | _bv(clkps0); } boolean setcontrolbits(uint8_t cntr) { serial.println(f("soft reset&qu

c# - Thread's response time is very much(not usual) -

i want download file in c# using thread in windows form app,thread works fine @ first(for 5 seconds) leaves work , not respond 10 seconds returns second , not respond using class downloading file here code: class downloadfile { #region fields static double totalsize; double received; int partnum; long start, end; string savepath; httpwebrequest request; stream stream; #endregion #region constructors public downloadfile() { totalsize = 1; received = 0; } public downloadfile(long s, long e, string path, httpwebrequest request, int partnumber) { totalsize = 1; partnum = partnumber; received = 0; start = s; request = request; end = e; savepath = path; } #endregion #region methods public void download() { int bytesread = 0; byte[] buffer = new byte[1024]; filestream fstr = new filestream(savepath + "part_" + partnum +

git - Sourcetree Failed to push some refs to repository -

Image
i use sourcetree version control system master , develop branch, feature, hotfix , release branches. accidentally on branch master, committed , pushed origin should have committed feature branch feature/new-design. when doing git flow release process 2 errors described below , therefore bitbucket doesn´t trigger deployment on connected dploy.io. question is: how can beloved git flow process withour errors? :) details: there no commits, made following steps after have done release - show what´s going on :) 1) git flow finish feature new-design (while keeping it) works without errors summary of actions: - feature branch 'feature/new-design' merged 'develop' - feature branch 'feature/new-design' still available - on branch 'develop' completed successfully. 2) being on development , starting new release works without errors summary of actions: - new branch 'release/1.7j' created, based on 'develop' - on branch 'release/1.7j&

postgresql - Spring @Procedure and List as return -

anyone know how use @procedure spring annotation postgres procedure (function) returns setof? the code below not work: public interface calculatedeventrepository extends crudrepository<calculatedevent, calculatedeventid> { @procedure(name = 'calculatedevent.calculate') list<calculatedevent> calcular(@param("yearmonth") integer yearmonth) } entity @entity @namedstoredprocedurequery(name = 'calculatedevent.calculate', procedurename = 'fn_calcula_eventos', resultclasses = calculatedevent.class, parameters = [ @storedprocedureparameter( mode = parametermode.in, name = 'yearmonth', type = integer.class), @storedprocedureparameter(mode = parametermode.out, name = 'res', type = list.class) ] ) public class calculatedevent implements serializable { ... } however have following exception: java.lang.

Detecting when the desktop in Windows 8.x is snapped in WPF -

i have windowless, chromeless wpf application sits maximized on desktop. when desktop gets snapped, application gets cut off. likewise, when application starts in snapped desktop, steals focus of entire monitor. i need update visible elements no longer cut off windows 8.x snap. there event or api let code react change? subscribe sizechanged event of "mainwindow". event fire whenever user changes size or size changed due modern app snapping. event not fire if setting width , height static. public mainwindow() { initializecomponent(); this.sizechanged += onsizechanged; } private void onsizechanged(object sender, sizechangedeventargs sizechangedeventargs) { system.diagnostics.debug.writeline(sizechangedeventargs.newsize); }

amazon web services - creating a public postgress AWS database -

im trying create postgres rds database on aws that's accessible public without need ssh tunnelling. development only. i've created separate aws vpc , assigned gateways , 2 subnets it. when created database set public. security group rules are inbound(custom tcp rule,tcp 5432,0.0.0.0/0) outbound (all traffic,all,all,0.0.0.0/0) i can't seem connect database local pgadmin. did enable vpc attributes have dns hostnames , dns resolution enabled? these must set in order db instance publicly accessible.

how do you create buttons dynamically in c# windows phone one per file name? -

Image
i have app make folder on sdcard called "rpgapp" when ever creates character saves character html file in folder (all of works, have sdcard access in manifest , have .html added file associations) .this important information out sdcard access or file association unauthorized access exception. i want create button per file in stack panel, here code im using private async task readfiles() { z.test.clear(); storagefolder externaldevices = windows.storage.knownfolders.removabledevices; storagefolder folder = (await externaldevices.getfolderasync("rpgapp")); ireadonlylist<storagefile> filelist = await folder.getfilesasync(); foreach (storagefile file in filelist) { z.test.add(file.name); } } public async void buttontest() { await readfiles(); foreach (string name in z.test) { button button1 = new button(); button1.height = 75

c - Copying a 32 bit integer to a 64 bit integer is undefined? -

well, know << 32 undefined on 32-bit integers... know pointer casts , dereferences don't mix much. but 1 kind of none of them. test.c: #include <stdio.h> #include <stdlib.h> #define __stdc_format_macros #include <inttypes.h> int main(void) { uint64_t tmp = 1 << 31; printf("%" prix64 "\n", tmp); return 0; } then this: $ gcc test.c -o test $ ./test ffffffff80000000 why did corrupt first 4 bytes? lower shifts work fine. if printf("%x\n", 1 << 31) , yields 80000000 expected. if tmp 32 bits, works fine. u64 , __u64 have quirk. you didn't corrupt anything, didn't shift 64-bit number. in c, single 1 defaults int . if want use 1 unsigned long (or unsigned ), tell compiler suffixing number ( ul or u -- ( ull on x86 )), otherwise shifting signed number: uint64_t tmp = 1ull << 31; output 80000000

Embedding excel sheet in Java Swing using Apache POI -

i wondering if embed spreadsheet functionality in swing components jinternalframe using apache poi. possible @ all? in end read , edit cells within application. i know there commercial library jexcel can it. could't find if apache poi can that. if it`s possible, maybe directing me sample or brief explanation on how go appreciated. thanks

Hadoop/Eclipse - Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FileSystem -

Image
i'm trying run putmerge program hadoop in action chuck lam manning publishing. should pretty simple, i've had bunch of problems trying run it, , i've gotten error can't figure out. meanwhile, i'm running basic wordcount program no problem. i've spent 3 days on now. i've done research possibly can on this, , i'm lost. ya'll have ideas? program: import java.io.ioexception; import org.apache.hadoop.conf.configuration; import org.apache.hadoop.fs.fsdatainputstream; import org.apache.hadoop.fs.fsdataoutputstream; import org.apache.hadoop.fs.filestatus; import org.apache.hadoop.fs.filesystem; import org.apache.hadoop.fs.path; public class putmerge { public static void main(string[] args) throws ioexception { configuration conf = new configuration(); filesystem hdfs = filesystem.get(conf); filesystem local = filesystem.getlocal(conf); path inputdir = new path(args[0]); path hdfsfile = new path(args

download list of images from urls -

i need find (preferably) or build app lot of images. each image has distinct url. there many thousands, doing manually huge effort. list in csv file. (it list of products, each identifying info (name, brand, barcode, etc) , link product image. i'd loop through list, , download each image file. ideally i'd rename each 1 - barcode.jpg. i've looked @ number of image scrapers, haven't found 1 works quite way. appreciative of leads right tool, or ideas... are on windows or mac/linux? in windows can use powershell script this, on mac/linux shell script 1-5 lines of code. here's 1 way this: # show what's inside file cat urlsofproducts.csv http://bit.ly/noexist/obj101.jpg, screwdriver, blackndecker http://bit.ly/noexist/obj102.jpg, screwdriver, acme # one-liner generate 1 download-command per item, not execute them perl -mfile::basename -f", " -anle "say qq(wget -q \$f[0] -o '\$f[1]--\$f[2]--). basename(\$f[0]) .q(')" ur

java - The type Stack is not generic; it cannot be parameterized with arguments <Character> -

i trying write simple program use stacks.it giving me error the type stack not generic; cannot parameterized arguments import java.util.*; public class stack { public static void main(string[] args) { stack<character> stack = new stack<> (); s.push("hello"); system.out.println(s); } } your class stack shadowing java.util.stack . rename class, or use qualified class name like java.util.stack<character> stack = new java.util.stack<> ();

c# - How to control gui text using the space bar in Unity? -

(disclaimer: new unity please bear me) basically want have text element displays multiple sentences 1 letter @ time , stop @ end of sentence. also, if space bar pressed remaining text sentence should display immediately, if sentence finished next sentence should show. so far have managed text display 1 letter @ time using strings stored in array. however, having difficulty navigating index index using space bar , getting complete sentence show if space bar pressed. the code below: using unityengine; using unityengine.ui; using system.collections; public class textscript : monobehaviour { public animator bar; public float letterpause = 0.1f; string[] strarray = new string[3]; string str; int i; int count; void start () { bar.enabled = true; strarray[0] = "hello , welcome game"; strarray[1] = "the next line of code"; strarray[2] = "testing space bar"; gameobject.getcomponent<text> ().text = ""; startcor

angularjs - Angular Material - Dynamically add tab and change to that tab -

currently working on chat app here https://playwithfire.firebaseapp.com/ , whenever user adds new room want new room tab entered. can add room need click afterwards enter room , display content. i tried changing attribute md-selected="selectedindex" makes no tab active no content appears. is possible i'm asking for? i've got far: index.html <div layout="column" ng-controller="roomcontroller"> <!-- tabs container --> <md-tabs md-stretch-tabs md-selected="selectedindex"> <!-- individual tab --> <md-tab ng-repeat="room in roomlist" label="{{room.roomname}}"> <div ng-controller="chatcontroller"> <!-- display messages --> <md-list> <md-item ng-repeat="msg in messages"> <

web services - Calling SOAP API with Complex Type in C# -

i'm new .net, apologize in advance if definition of problem not accurate. i'm attempting consume soap web service , i'm having problem constructing complex type element called deliveryroutingrequestentries. i have added wsdl using service reference, here part of wsdl: <wsdl:operation name="validatedeliveryaddress"> <soap:operation soapaction="" style="document" /> <wsdl:input name="validatedeliveryaddress"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="validatedeliveryaddressresponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <xs:complextype name="deliveryroutingrequestentries"> <xs:sequence> <xs:element maxoccurs="unbounded" name="deliveryroutingrequestentry" type="tns:delroutingrequestentry" /> </xs:sequence>

mysql - How can I efficiently store a 2-way "like" system similar to Tinder? -

on tinder, when 2 members each other, "match" , able communicate. if 1 member likes another, it's not match. i'm trying store "like" system in mysql can't figure out best way that's efficient. setup right now. mysql> desc likes_likes; +--------------+----------+------+-----+---------+----------------+ | field | type | null | key | default | | +--------------+----------+------+-----+---------+----------------+ | id | int(11) | no | pri | null | auto_increment | | from_user_id | int(11) | no | mul | null | | | to_user_id | int(11) | no | mul | null | | | value | int(11) | no | | null | | | created_at | datetime | no | | null | | | updated_at | datetime | yes | | null | | +--------------+----------+------+-----+---------+----------------+ 6 rows in set (0.00 sec) to find matches,

r - dplyr join and keeping variable obs without NA -

i have for loop allocates portfolios based on tdata$me , 10% quantile. issue i'm having when run for loop, end have last observation year allocated portfolios. loop through years, idea place portfolio allocations portf , join larger dataset. my question how can join 2 data sets without placing na in other unknown obs , instead keeps obs is? also, there better way run for loop dplyr ? seems inefficient way allocate portfolios, couldn't think of way. reproducible example : tdata <- structure(list(cusip = c(47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l, 47l), fyear = c(1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1970l, 1971l, 1971l, 1971l, 1971l, 1971l, 1971l, 1971l, 1971l), me = c(157,115, 45, 19, 132, 21, 147, 191, 80, 165, 32, 100, 44, 134, 104,9, 183, 163, 109, 88), month = c(6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l, 6l,

php - SilverStripe - Get a page's form value with a function -

in silverstripe 3.1 i'm trying value of hello bar selector accessible pages site wide. i've created dropdown field select contents on homepage.php i'm having no problem referencing fields value on home page. value of dropdown inform if block run , populate hello bar with. page.php ..// public function hellobarselector() { $selector = homepage::get()->hellobarselect; return $selector; } public function showhellobar($itemid = 1) { $hellobars = hellobar::get()->byid($itemid); $hellobars = $hellobars->hellobartext; return $hellobars; } ..// includes/hellobar.ss <% if $hellobarselector %> <section class="hello"> <p class="hello__text">$showhellobar($hellobarselector)</p> </section> <% end_if %> homepage.php ..// public function getcmsfields(){ $fields = parent::getcmsfields(); $fields->addfieldtotab('root.hellobar', gridfield::create( 'he