Posts

Showing posts from September, 2014

asp.net - How To Understand dynamic HTML in Visual Studio 2008? -

Image
i'm trying update vb.net web project done else 5 years ago using visual studio 2008. the webform stumped on has 2 (2) asp gridview controls, , can't seem tell how imagebutton evaluating (or failing). i need fix failing part! below gridview control imagebutton ibcomplete failing: <asp:gridview id="gridview1" font-size="small" allowpaging="true" pagesize="25" onrowcommand="gridview1_rowcommand" onselectedindexchanged="gridview1_selectedindexchanged" onrowdatabound="gridview1_rowdatabound" runat="server" visible="false" autogeneratecolumns="false" datasourceid="sqldatasource1" width="950px" backcolor="white" datakeynames="partid,primary_vendor,part_description,pri_vendor_name,min_reord_qty,puom,revised_date"> <columns> <asp:templatefield headertext=""> <itemstyle width="30px"

SBT Native Packager Plugin Docker Error -

i have used sbt docker plugin 1 of project , following error when ran: sbt docker:publishlocal joes-macbook-pro:my-projects joe$ sbt docker:publishlocal java hotspot(tm) 64-bit server vm warning: ignoring option maxpermsize=724m; support removed in 8.0 [info] loading project definition /users/joe/projects/my-projects/proj1/project [info] set current project sally (in build file:/users/joe/projects/my-projects/proj1/) [info] wrote /users/joe/projects/my-projects/proj1/target/scala-2.11/sally_2.11-2.1.pom java.io.ioexception: cannot run program "docker" (in directory "/users/joe/projects/my-projects/proj1/target/docker/docker/stage"): error=2, no such file or directory @ java.lang.processbuilder.start(processbuilder.java:1048) @ sbt.simpleprocessbuilder.run(processimpl.scala:349) @ sbt.abstractprocessbuilder.run(processimpl.scala:128) @ sbt.abstractprocessbuilder$$anonfun$runbuffered$1.apply(processimpl.scala:159) @ sbt.abstractprocessbuilde

sql server - SQL Count/sum multiple columns -

i want use count/ sum multiple fields in single query sample data , desired result listed below: memid claimnum itemid paidamt 123 1234 4 5 123 2309 4 5 123 1209 4 5 123 1209 8 2.2 123 1210 8 2.2 desired result memid count(claimnum) count(itemid) sum(paidamt) 123 3 3 15 123 2 2 4.4 it looks want group both memid , itemid: select memid, count(claimnum), count(itemid), sum(paidamt) the_table group memid, itemid

Spring Security Remember-me with Ajax login -

i have implemented spring security ajax login. . i defined own customauthenticationentrypoint , authenticationfilter , securityloginsuccesshandler . can authenticate user. however, when add remember me part. not work. there no sql run in database insert token persistent_logins. not know if there wrong configuration? please help. <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd http://www.springframework.org/schema/util http://www.spri

multidimensional array JAVASCRIPT something wrong -

hey guys need soe please :p what's wrong code? var arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; var narr = []; // want [[1, 4, 7], [2, 5, 8], [3, 6, 9]] function arange(mass) { (var = 0; < mass.length; i++) { (var j = 0; j < mass[i].length; j++) { narr[mass[i]].push(mass[j][i]); } } } if call function there problem : "typeerror: cannot read property 'push' of undefined." thank you. link here or use es6 1 liner var arr = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; var res = arr.map((e, i) => e.map((_, j) => arr[j][i])); document.write(json.stringify(res));

ios - Create dictionary with dictionaries of arrays (sorted by a specific custom object property)? -

the title may confusing, apologies. maybe can advise me on more appropriate title. i have .json file structured below. "sections": [{ "title": "locations", "key": "location" }], "contacts": [{ "title": "social worker", "name": "mrs x", "office": "xxxxxxxx", "location": "lisburn", "department": "xxxxxxxx", "telephone": "xxx xxxxxxxx" },... when parsing this, create array called contactsarray . can create aecontact objects array so: (nsdictionary *contactdic in [contactsarray valueforkey:@"contacts"]) { // create aecontact objects _contact = [[aecontact alloc] initwithdictionary:contactdic]; [contacts addobject:_contact]; } self.contacts = [c

Laravel -weird output at top of every page and command -

i tried answer laracast community ended not getting response. following text output @ top of every page or cli command: skip content personal open source business explore pricing blog support repository 3,019 22,483 7,384 laravel/laravel code pull requests 0 pulse graphs laravel/config/database.php eb7743f 11 days ago @dakira dakira allow setting sqlite database via env @taylorotwell @tgm @vlakoff @dakira @marcanuy @pedes42 @jimmypuckett @grahamcampbell @david-ridgeonnet @syntaxc4 @overtrue 121 lines (101 sloc) 3.84 kb of files may suspect available in laracast discussion posted. c4 @overtrue 121 lines (101 sloc) 3.84 kb btw used composer install laravel. edit routes.php file <?php /* |-------------------------------------------------------------------------- | application routes |-------------------------------------------------------------------------- | | here can register of routes application. | it's breeze. tell lara

regex - Using awk or sed to merge / print lines matching a pattern (oneliner?) -

i have file contains following text: subject:asdfghj subject:qwertym subject:bigger1 subject:sage911 subject:mothers object:cfvvmkme object:rjo4j2f2 object:e4r234dd object:uft5ed8f object:rf33dfd1 i hoping achieve following result using awk or sed (as oneliner bonus! [perl oneliner acceptable well]): subject:asdfghj,object:cfvvmkme subject:qwertym,object:rjo4j2f2 subject:bigger1,object:e4r234dd subject:sage911,object:uft5ed8f subject:mothers,object:rf33dfd1 i'd have each line matches 'subject' , 'object' combined in order each 1 listed, separated comma. may see example of done awk, sed, or perl? (preferably oneliner if possible?) i have tried uses of awk perform this, still learning should add: awk '{if ($0 ~ /subject/) pat1=$1; if ($0 ~ /object/) pat2=$2} {print $0,pat2}' but not thought would! know have syntax wrong. if see example can learn. not perl or awk easier. $ pr -2ts, file subject:asdfghj,object:cfvvmkme subject:qwerty

javascript - New window redirecting to my homepage -

hey have problem code redirecting homepage. have registration page when click submit, opens new window welcoming page. on new window has link go homepage, works. i'm wondering can somehow create link on closes window , makes registration page on redirect homepage? hope question makes sense! a bit confused why you'd want handle way. send them homepage after click submit link on registration page? if so, can javascript using document.location = "/";

c++ - non-generated special member functions vs deleted special member functions -

this question has answer here: why object not being copied when move constructor deleted? 1 answer this compiles , calls copy constructor: struct foo { foo() = default; foo(const foo&) { cout << "copy ctor!" << endl; } //foo(const foo&&) = delete; }; int main() { foo a; foo b(move(a)); this not compile: struct foo { foo() = default; foo(const foo&) { cout << "copy ctor!" << endl; } foo(const foo&&) = delete; }; int main() { foo a; foo b(move(a)); i know in first case why copy called - move ctor not generated. why doesn't second snipper compile? thought call copy ctor again. here link online compiler the difference boils down absence of move constructor versus deleted move constructor. 2 not equivalent. in first case, presence of

wordpress - Pass PHP variable into another PHP file that is embedded in IFRAME -

i have page set in wordpress generates content based on various variables. creates string url google calendar. then, google calendar embedded via iframe although google calendar hosted on our domain. can't figure out how string transferred iframe. here code: <?php if ( is_page('baseball') ) { $current_sport = 'baseball'; $athletic_calendar = get_field('calendar_baseball', 'option'); $athletic_calendar_boys_varsity = get_field('boys_varsity_calendar_basketball', 'option'); $athletic_calendar_girls_varsity = get_field('girls_varsity_calendar_basketball', 'option'); $athletic_calendar_boys_jv = get_field('boys_jv_calendar_basketball', 'option'); $athletic_calendar_girls_jv = get_field('girls_jv_calendar_basketball', 'option'); $athletic_calendar_boys_freshmen = get_field('boys_freshmen_calendar_basketball', 'option'); $athletic_calendar_gir

javascript - Functions return undefined -

i have getglobaloptionsettextbyvalue function defined in file 1. function returns value. calling function file 2 return value seems set undefined time. below code file 2: var x= x|| { __namespace: true }; x.travelhistory = ( function () { //this function calculate duration , sent error message if duration greater 6 months. function travelduration( fromdate, todate ) { var crtldate = xrm.page.getcontrol( todate ); var todate = xrm.page.getattribute( todate ).getvalue(); var fromdate = xrm.page.getattribute( fromdate ).getvalue(); var optionset = xrm.page.getattribute( "dads_javascriptoptionset" ); var notification; if ( todate != null && fromdate != null ) { var temp1 = new array(); temp1 = todate.split( '/' ); // split date '/' var toyear = temp1[0]; var tomonth = temp1[1]; var temp2 = new array(); temp2 = fromdate.s

spring boot - FeignClient Invalid HTTP error with WAR-deployed SpringBoot application -

i observing rather strange failure netflix feignclient communicating springboot eureka client application war-deployed under tomcat. my setup: eureka server running spring boot app . springboot app demo1 @enablediscoveryclient deployed under tomcat war file , running on http://localhost:8080/demoapp1-1.0.0/greeting springboot app demo2 ( eureka client ), running spring boot app gradle bootrun @ http://localhost:9002 both apps registered on eureka server , accessible demo2 has feignclient pointing rest end point on demo1. though can access demo1 rest endpoint @ http://localhost:8080/demoapp1-1.0.0/greeting , feignclient demo2 app fails following exception : java.io.ioexception: invalid http executing http://localhost:8080/demoapp1-1.0.0/greeting @ feign.client$default.convertresponse(client.java:157) ~[feign-core-8.16.0.jar:8.16.0] @ feign.client$default.execute(client.java:74) ~[feign-core-8.16.0.jar:8.16.0] @ org.springframework.cloud.netflix.f

git - How to push without the default --mirror option in a mirror repo -

Image
for reason, must create mirror repo central repo. central repo <-----> mirror repo <-----> dev repo the risk pushing in mirror repo may overwrite histroy of central repo. if (mr j) pushs new commit(commit_x) central repo , @ same time mirror going push without fetch, push overwrite histroy of central repo. result, commit_x deleted. mr j need pull, merge , push commit_x again. the rootcause if repo created clone --mirror , push implicitly use --mirror default not added after push . i know possible install hook script disable push --mirror in centrol repo side. but there way disable in mirror repo side? [edit1] added illustration understanding question. just edit .git/config , unset remote.<remote>.mirror , explained in git push : --mirror instead of naming each ref push, specifies refs under refs/ (which includes not limited refs/heads/, refs/remotes/, , refs/tags/) mirrored remote repository. newly created local refs pushed

cocoa - Swift NStask function -

i'm complete swift noob. using code in xcode result need. created command line binary "menubar" takes several arguments. run in terminal "/bin/menubar getip", "/bin/menubar/getuser". want create function based on following working code. import cocoa import foundation var task:nstask = nstask() var pipe:nspipe = nspipe() task.launchpath = "/bin/menubar" task.arguments = ["getip"] task.standardoutput = pipe task.launch() var handle = pipe.filehandleforreading var data = handle.readdatatoendoffile() var result_s = nsstring(data: data, encoding: nsutf8stringencoding) print(result_s) i want convert function. func commmand (argument: string) -> string { let task:nstask = nstask() let pipe:nspipe = nspipe() task.launchpath = "/bin/menubar" task.arguments = ["argument"] task.standardoutput = pipe task.launch() let handle = pipe.filehandleforreading let data = handle.readdatatoendoffile() let result_s =

javascript - How to prevent jQuery event from bubbling when removing element? -

according jquery documentation, event.stoppropagation(); should stop event bubbling. in following script, when remove event.stoppropagation(); function removes ul element code block including it's children. added event.stoppropagation(); stop bubbling returns following error: typeerror: undefined not object (evaluating 'event.stoppropagation') the following html , jquery code: $('span.remove').on('click', function() { $(this).parent().hide(500, function(event) { event.stoppropagation(); $(this).parent().remove(); }); }); .todo-list { list-style: none; padding: 0px; } .todo-item { border: 2px solid #444; margin-top: -2px; padding: 10px; cursor: pointer; display: block; background-color: #ffffff; } .remove { float: right; font-family: helvetica, arial, sans-serif; font-size: 0.8em; color: #dd0000; } .remove:before { content: 'x'; } .remove:hover { color: #f

javascript - Can I build sass/less/css in webpack without requiring them in my JS? -

i have react components & sass being built webpack successfully. have main sass file builds css gulp task. i'd have use 1 of these technologies, possible compile sass css without associated require sass in entry file? here's example trying use webpackextracttextplugin webpack.config.js entry_object[build_css + "style.css"] = static_scss + "style.scss"; module.exports = { entry: entry_object, output: { path: './', filename: '[name]' }, { test: /\.scss$/, include: /.scss$/, loader: extracttextplugin.extract("style-loader", "css!sass") } plugins: [ new extracttextplugin("[name]") ] after running webpack, style.css asset looks this: /******/ (function(modules) { // webpackbootstrap /******/ // module cache /******/ var installedmodules = {}; /******/ /******/ // require function /******/ function __webpack_require__(moduleid) { ... i solved of @beb

logging - How do you tell Spring Boot to send the embedded Tomcat's access logs to stdout? -

in standalone spring boot web application (executable jar), how tell spring boot want embedded tomcat instance's http access logs sent stdout? if use logback, can use logback-access this. add dependency ch.qos.logback:logback-access optional javaconfig add teefilter (request & response logging): @bean(name = "teefilter") public filter teefilter() { return new ch.qos.logback.access.servlet.teefilter(); } javaconfig embedded tomcat: @bean public embeddedservletcontainerfactory servletcontainer() { tomcatembeddedservletcontainerfactory tomcat = new tomcatembeddedservletcontainerfactory(); logbackvalve logbackvalve = new logbackvalve(); // point logback-access.xml logbackvalve.setfilename("src/main/resources/logback-access.xml"); tomcat.addcontextvalves(logbackvalve); return tomcat; } contents logback-access.xml <configuration> <appender name="stdout" class="ch.qos.logback.core

How to display a UIView when it overlaps another iOS? -

Image
i trying re-implement similar apple watch friend picker. have 2 uiviews, both corner radius of half height appear circles. how calculate overlap , show part. ui in first picture , second 1 contains desired behavior. in advance help? for each of circles initials, can have top view--the unselected state--and bottom view--the selected state. have movable view in shape of circle tracks tip of point. when view intersects of outer circle create mask equal rounded bounds of invisible view. for example: if cgrectintersectsrect(self.movableview.frame, self.topview.frame) { self.topview.layer.mask = nil let shapelayer = cashapelayer() let rect = self.topview.convertrect(self.movableview.bounds, fromview: self.movableview) let path = uibezierpath(ovalinrect: rect) let maskpath = cgpathcreatemutable() cgpathaddrect(maskpath, nil, self.view.frame) cgpathaddpath(maskpath, nil, path.cgpath)

webpack error in Cannot find module 'less' -

i'm trying use less loader in webpack , issues - i've installed less loader locally, when try compile using webpack command in bask, prints out: "error in cannot find module 'less'". in entry point require less file require("./less_components/style.less"); here webpack.config file module.exports = { entry: "./entry.js", output: { path: "./build", filename: "./bundle.js" }, module: { loaders: [ {test: /\.js$/, exlude: /node_modules/, loader: "babel-loader"}, {test: /\.less$/, loader: "style!css!less"} ] } } what's matter , how should fix it? it sounds haven't installed less-loader node_modules. installing fix this. npm install less-loader --save-dev edit: error when haven't installed css-loader , style-loader chaining less-loader to. anyone comes across can plus on issue submitted bad message. https://github.com/webpac

forms - Use get_or_create Django -

this continuation of this question . the problem code not allow creating new objects because of thing = get_object_or_404(thing, pk=id) class createwizard(sessionwizardview): file_storage = filesystemstorage(location=os.path.join(settings.media_root)) def done(self, form_list, **kwargs): id = form_list[0].cleaned_data['id'] thing = get_object_or_404(thing, pk=id) if thing.user != self.request.user: raise httpresponseforbidden() else: instance = thing() form in form_list: field, value in form.cleaned_data.iteritems(): setattr(instance, field, value) instance.user = self.request.user instance.save() return render_to_response('wizard-done.html', { 'form_data': [form.cleaned_data form in form_list],}) how can use get_or_create function? or there another, better way create new objects within function? ideas!

Counting array elements in Ruby (unexpected results by the count( ) function) -

in understanding following ruby expressions should produce same result. apparently missing something, way serious bug go unnoticed... # returns number of elements in array count = @quotation.quotation_items.count { |x| x.placement == current_placement} # expect count = (@quotation.quotation_items.find_all { |x| x.placement == current_placement }).length quotation_items above activerecord has_many association #count not take block that. if want use conditions on count, do: @quotation.quotation_items.count(:conditions => "placement = #{current_placement}") http://apidock.com/rails/activerecord/calculations/classmethods/count

java - Unreachable code? user image upload -

eclipse keeps showing me syntax error insert '}' complete classbody @ dne of code, when so, shows different error last part of code unreachable? doing wrong? my code: public class getimage extends activity { private static final int myimage =1; imageview iv; @override protected void oncreate(bundle savedinsatncestate){ super.oncreate(savedinsatncestate); setcontentview(r.layout.diary_edit); iv=(imageview)findviewbyid(r.id.imageview1); } public void btnclick(view v){ intent int3 = new intent(intent.action_pick,android.provider.mediastore.images.media.external_content_uri); startactivityforresult(int3,myimage); } @override protected void onactivityresult (int requestcode , int resultcode , intent data){ super.onactivityresult(requestcode , resultcode , data); switch (requestcode){ case myimage : if(resultcode == result_ok){ uri uri=data.getdata(); string[]projection ={mediastore.images.media.d

c++ - glBufferData and glBufferSubData Offset -

i'm attempting render suzanne (from blender) in opengl 3.3, buffer data doesn't seem correct. this: https://gyazo.com/ab82f9acb6854a49fccc527ed96cc4e8 i tried render sphere simple texture: https://gyazo.com/85c1e87fcc4eab128ca37b1a0cb1deaa my importer inserts vertex data std::vector single floats: if(line.substr(0,2) == "v ") { /** vertex position */ std::istringstream s(line.substr(2)); float v[3]; s >> v[0]; s >> v[1]; s >> v[2]; this->vertices.push_back(v[0]); this->vertices.push_back(v[1]); this->vertices.push_back(v[2]); } i setup array buffer follows: glgenbuffers(1, &this->vbo); glbindbuffer(gl_array_buffer, this->vbo); glbufferdata(gl_array_buffer, sizeof(float)*(this->vertices.size()+this->textures.size()+this->normals.size()), null, gl_static_draw); and insert actual data using glbuffersubdata glbuffersubdata(gl_array_buffer, 0, sizeof(float)*this->ve

java - Automatic button creation when activity gets passed a string and icon -

i wondering how automatically create button when activity gets passed string , icon. have activity listening on port receive string , image computer. once image , string passed app, want app automatically create button using image background , string label under image. i wondering if point me how start since not sure how start , having issues finding solutions online. i wondering how position new button @ specific location on gui. want new button appear under button have in gui public void createbutton (bitmap bitmap, string applicationname, layoutinflater inflater, viewgroup container){ view rootview = inflater.inflate(r.layout.home_fragment, container, false); relativelayout rlayout = (relativelayout) rootview.findviewbyid(r.id.home_fragment); button btn = new button(getactivity()); btn.settext(applicationname); relativelayout.layoutparams params = new relativelayout.layoutparams( relativelayout.layoutparams.wrap_content, rel

enums - type of enumeration constants inside enumerator list in C -

edited i'm working on multi-platform enumeration parser , found weird behaviour while trying answer question above. question a) does c standard determine type of enumeration constants before enumeration declaration completed? for keil armcc, example: enum e { val0 = (signed char)126, val1, val2, size0 = sizeof(val0), size1 = sizeof(val1), size2 = sizeof(val2) }; i size0 = 1, size1 = 1, size2 = 8. (if evaluate size of enum constants outside definition, have size of int). shouldn't equal sizeof( int )? (remembering int, in case, has size of 4 bytes.) question b) for keil c251, have following: signed int value0 = (signed char)-1; enum{ value1 = (signed char)-1 }; enum{ value2 = -1 }; printf( "is value0 equal value1? ---> %s", value0 == value1 ? "yes!" : "no!" ); printf( "is value0 equal value2? ---> %s", value0 == value2 ? "yes!" : "no!" ); which prints: is val

Post Branded Content to Facebook Page Feed Using the Marketing API -

ever since facebook's branded content announcement, i've been trying figure out how post branded content verified facebook page's feed via api. requirement company, post qualifies branded content directly facebook page's feed via post /{page_id}/feed endpoint. the user flow we're trying automate accomplished example, by pasting link in page composer text field clicking "handshake" icon searching third-party sponsor, selecting sponsor publishing post on branded content page mention can accomplished through marketing api, read marketing api documentation learn using branded content tool through api. but i've seen in documentation seems indicate need create ad campaign, ad set, specify targetting, create ad creative, ad itself. saw 1 example on ad creative reference section seems i'm looking for , curl \ -f 'name=sample creative' \ -f 'object_story_spec={ "page_id": "<page_id>"

c# - ASP.NET Vnext GZiped Body Post -

so i'm struggling little bit, can't quite wrap head around it. i've got asp.net vnext application that's hosting mvc , webapi-style controllers. controller in question looks this: [httppost] public void post([fromquery] string json, [frombody]string item) { var requestbody = httpcontext.request.body; var posteddata = json.jsontodictionary(); var deviceserialnumber = posteddata["deviceserialnumber"].tostring(); datetime? endedat = posteddata["endedat"] == null ? (datetime?)null : datetime.parse(posteddata["endedat"].tostring()); //var controlreference = // _context.controls.firstordefault( // ctrl => ctrl.serialnumber == posteddata["deviceserialnumber"].tostring()) ?? new control() // { // }; } my post data query string appropriate parameters seen in [fromquery] section. asp.net bindi

javascript - jQuery - compatibility issue with Firefox -

at moment, learning how write in javascript , jquery. however, wrote simple jquery code if resize window page automatically refreshed. working on chrome, ie, edge, opera not in mozilla firefox. can check code , tell me wrong , why doesn't work firefox. grateful , thank in advance. $(document).ready(function() { $(window).resize(function(){location.reload(true);}); }); best regards, george s. try calling function outside of $(document).ready if doesn't work try window.location.href=window.location.href; instead of location.reload(true); $(document).ready( function () { // nothing in here }); $(window).resize(yourfunction); function yourfunction(){ location.reload(true); } or $(window).resize( function () { location.reload(true); });

java - Jsoup href request and to output on file -

i made sample request 1 url query through java application. request connection , query right. but, i'm missing how able href elements query , write on 1 output file? has guidelines? thanks in advance document enginesearch=jsoup.connect("http://ask.com/web?q="+urlencoder.encode(query)) .useragent("mozilla/5.0 (x11; u; linux x86_64; en-gb; rv:1.8.1.6) gecko/20070723 iceweasel/2.0.0.6 (debian-2.0.0.6-0etch1)") .get(); string title = enginesearch.title(); elements links = enginesearch.select("a[href]").first().getallelements(); string queryencoding=enginesearch.outputsettings().charset().name(); file = new file(folder.getpath()+"\\"+date+" "+tag+".html"); outputstreamwriter writer = new outputstreamwriter(new fileoutputstream(file),queryencoding); writer.write(enginesearch.html(

php - Showing different HTML content depending on URL -

a visitor comes page throught custom url, e.g: http://domain.com/dmtydmrz%40dispostable.org the part after domain name represents users email address. somehow need extract part , check if email address exists in database. if exists,the user presented web form submit data on index.php site, if not, notified not eligible view form, on index.php site. i asking guidelines on how approach problem, since i'm fresh in php , url's added email parameter 404. somehow need redirect index.php or what? i'm totally lost. appreciated. so first, not recommend pass email way through url. if decided want pass email through url, it's better use query string, example: http://www.foo.com/index.php?email=useremailhere the query string whole part after '?': email=useremailhere in order retrieve poriton of url, in php code is: index.php: <?php $email = $_get['email']; echo "users email = ".$email."<br>"; ?> to c

graph - Visio - Add and check connector properties -

i'm looking starting point graph project. need create weighted, directed graph, preferably in visio. graph composed of shapes , connectors. i'd add 'weight' attribute each connector , add function check if weights out of particular node add 100. input appreciated! :) -chris

java - Using generics that extend a class -

i have class this: public abstract class someclass<e extends anotherclass> { private e somevariable; public e formatvariable(){ e formatted = somevariable.format(); //format method in anotherclass, returns anotherclass return formatted; } } eclipse gives me error, "cannot convert anotherclass e" i confused because in class decleration made e anotherclass or subclass of it, or @ least understanding of it. what's going on here, , how can fix error? format() returns anotherclass , don't want any anotherclass — want e specifically. if had this? public class anotherclassred extends anotherclass { @override public anotherclass format() { return new anotherclassblack(); } } public class anotherclassblack extends anotherclass { // note: *not* subclass of anotherclassred ... with scenario, if things compiled formatvariable() return formatted instance anotherclassred, instance anotherc

multithreading - Running Stanford CoreNLP server multithreadedly -

i running stanford corenlp server: java -mx4g -cp "*" edu.stanford.nlp.pipeline.stanfordcorenlpserver -port 9001 -timeout 50000 it seems uses 1 core when processing texts. possible run stanford corenlp server multithreadedly, utilizes more 1 core? this correct; every request server uses 1 core. can parallelism making multiple server requests @ once. run in parallel number of cores on server (or, value of -threads passed server executable), , after it'll queue jobs in thread pool.

angular - Angular2 http get restfull api request not working -

i got angular2 , ran problem don't see how fix. trying data restfull api , worked fine. problem when tried restfull api, test, not me data. so call api worked: http://jsonplaceholder.typicode.com/posts works() { return new promise(resolve => { this.http.get('http://jsonplaceholder.typicode.com/posts') .map(res => res.json()) .subscribe(data => { this.data = data; console.log(data); resolve(this.data); }, error => console.error(error)); }); } but call api did not: http://gokhankaradas.com/wp-json/posts goes error condition. (object {_body=event error, status=200, statustext="ok", ...}) doesnotwork() { return new promise(resolve => { this.http.get('http://gokhankaradas.com/wp-json/posts') .map(res => res.json()) .subscribe(data => { this.data = data; console.log(data); resolve(th

Android: "Element intent-filter is not allowed here" inside <provider>? -

at http://developer.android.com/guide/topics/providers/document-provider.html#manifest shown how register custom document provider in manifest: <manifest... > ... <uses-sdk android:minsdkversion="19" android:targetsdkversion="19" /> .... <provider android:name="com.example.android.storageprovider.mycloudprovider" android:authorities="com.example.android.storageprovider.documents" android:granturipermissions="true" android:exported="true" android:permission="android.permission.manage_documents" android:enabled="@bool/atleastkitkat"> <intent-filter> <action android:name="android.content.action.documents_provider" /> </intent-filter> </provider> </application> </manifest> this

exit - .EXE getting stuck after closing program with red X button built in to WPF program -

i'm sure being caused 1 of loops not shutting down right wrong. know x should close way gets stuck open. have tried make exit out using default x built in not work, use normal exit function hangs open on pc. having reboot close. not closing process tree close out. using system; using system.collections.generic; using system.linq; using system.text; using system.windows; using system.windows.controls; using system.windows.data; using system.windows.documents; using system.windows.input; using system.windows.media; using system.windows.media.imaging; using system.windows.navigation; using system.windows.shapes; using system.componentmodel; using system.data; using system.text.regularexpressions; using system.io; using system.timers; using system.threading; namespace verifone_note_secure { /// <summary>