Posts

Showing posts from March, 2015

javascript - Remove a Class Element from Third Party Widget -

Image
i have third party widget loads on site via javascript, take example disqus. there class element shown in attached picture below, inside disqus. if delete inspect element, user image / class element gets deleted. i want achieve in real time on page load. page load, site javascript or css should delete or hide these class elements. please let me know if that's possible. thanks, shubham use jquery removeclass method: https://api.jquery.com/removeclass/ $('#foo').removeclass('classtoremove');

c# - Confusing creating HTML List base on array -

i has problem creating html-list base on array in c#. tried using split.string, foreach, , etc,. still can't figured out logic... :(.. can me solve problem ? here array list<string> listmenu = new list<string>(); listmenu.add("dashboard~view1"); listmenu.add("dashboard~view2"); listmenu.add("customer"); listmenu.add("part"); listmenu.add("part~part1~part11"); listmenu.add("part~part1~part12"); listmenu.add("part~part2~part21"); listmenu.add("part~part2~part22"); listmenu.add("part~part3~part31~part311"); listmenu.add("part~part3~part31~part312"); listmenu.add("branch"); and want create html list : <div id=menu> <ul> <li>dahboard <ul> <li> view1 </li> <li> view2 <

Setting environment variables in cloudformation using command module within cfn-init -

i'm trying set environment variables through commands module within cfn-init. "commands": { "set-env": { "env": { "hostname": "fb-iaas.elevatebilling.com" }, "cwd": "~", "command": "echo \"$hostname\" > test.txt" } }, and output see in cfn-init.log 2016-09-22 10:26:53,638 debug running command set-env 2016-09-22 10:26:53,639 debug no test command set-env 2016-09-22 10:26:53,655 info command set-env succeeded 2016-09-22 10:26:53,655 debug command set-env output: but environment variable hostname doesn't updated. can please explain doing wrong? thanks when variable doesn't updated, how have found out? did open "test.txt" , read piped or did ssh instance , run "echo $hostname"? reason why ask because aws docs o

javascript - How to get table row data using check box in Angular.js -

i need 1 help.i need checked data table row using angular.js. explaining code below. <tr ng-repeat="gl in gallerydatas"> <td><input type="checkbox" name=""> {{$index+1}}</td> <td><img ng-src="upload/{{gl.image}}" border="0" name="image" style="width:100px; height:100px;" /></td> <td>{{gl.description}}</td> </tr> here need while user clicked check box respective row data retrieving array.please me. use ng-change on checkbox <td><input type="checkbox" ng-change="clickedrow(gl.checked)" name="" ng-model="gl.checked"></td> in controller, $scope.clickedrow = function(checked) { if (checked) { //add list } else { // remove list } }

bash - Cannot write into ~/.m2 in docker maven container -

why aren't files written in /root/.m2 in maven3 docker image persistent during build? a simple dockerfile: from maven:3-jdk-8 run touch /root/.m2/testfilehere && ls -a /root/.m2 run ls -a /root/.m2 cmd ["bash"] produces following output. $ docker build -t test --no-cache . sending build context docker daemon 2.048 kb step 1 : maven:3-jdk-8 ---> 42e3884987fb step 2 : run touch /root/.m2/testfilehere && ls -a /root/.m2 ---> running in 1c1dc5e9f082 . .. testfilehere ---> 3da352119c4d removing intermediate container 1c1dc5e9f082 step 3 : run ls -a /root/.m2 ---> running in df506db8c1dd . .. ---> d07cc155b20e removing intermediate container df506db8c1dd step 4 : run stat /root/.m2/testfilehere ---> running in af44f30aafe5 stat: cannot stat ‘/root/.m2/testfilehere’: no such file or directory command '/bin/sh -c stat /root/.m2/testfilehere' returned non-zero code: 1 the file created @ first command gone when interm

javascript - How to create factory in angular of an existing service -

i learning angularjs , reading articles on service , factory. 1 example provided on article service fiddle . while reading trying convert service factory, link my factory fiddle . still it's not working expected not sure doing wrong. html <div ng-app="app"> <div ng-controller="calculatorcontroller"> enter number: <input type="number" ng-model="number" /> <button ng-click="dosquare()">x<sup>2</sup></button> <button ng-click="docube()">x<sup>3</sup></button> <div>answer: {{answer}}</div> </div> </div> js var app = angular.module('app', []); app.factory('mathservice', function() { var myfactory = {}; myfactory.add = function(a, b) { return + b }; myfactory.subtract = function(a, b) { return - b }; myfa

c# - Make different editions of an application with single code base -

i have developed application windows desktop (in wpf). let's assume application has 50 features , let's call ultimate application. i have client demands application 30 features. let's call professional application 20 features, let's call basic now, want maintain single source code editions. my intention users basic edition can't use/see features available in professional edition, , on. how can achieve this? need use conditional compilation or else? generally handled based on product key. algorithms generating , reading version depends developer developer. lets take simple example product keys start prefixing it's version e.g. - ultimate version starts "u" , - uxxxxxxxxxxxx professional version starts "p" , - pxxxxxxxxxxxx , on. now when application loaded, need enable/disable or show/hide menus based on product key version. this helpful, when customer wan't upgrade version, need release new product key upd

reporting services - Getting multiple integer values in an SSRS parameter -

Image
how multiple integers value field of ssrs parameter can use in statement in clause? bear me. think end simple syntax question explanation overlong. i have report want split between 2 types of staff dedicated , bureau. way determine which hour activation occurs, dedicated staff working hours except 12 , 13 (midday 2pm). i've created parameter called @agenttype , added clause in sql query where [hour] in (@agenttype) i set data type of parameter integer , set available values in picture. this works test if try model working hours accurately ssrs removes commas , turns interger 1234567... tried using expresion =1,2,3... caused errors when report ran. so question how multiple integers value field of ssrs parameter can use in statement in clause? this solution work you. can create 2 parameters, agenttype , agenttypehidden . for agenttype set 2 available values follows: agenttypehidden must hidden , set allow multiple values: don't set a

ios - Set minimum height of table view cell? -

Image
i have uitableview ,in table have created custom cell image & label.i have given label leading,trailing,top,bottom.i want set size of label increase according text happening.i have used uitableautomaticdimension & estimatedrowheight .now want set minimum height of cell equal height of image.now if text less in label height of image decreased.now want keep height cell minimum image height & increase when there more text.please how can it? looking @ view shared suggest following constraints. top of uiimageview top of cell. left of uiimageview top left of cell. width , height constraints of uiimageview. bottom of uiimageview bottom of cell greater or equal to. right of uiimageview left of uilabel. top of uilabel top of cell. right of uilabel right of cell. bottom of uilabel bottom of cell. adding these constraints should solve problems.

Python error : AttributeError: 'module' object has no attribute 'heappush' -

i trying simple programs involve multiprocessing features in python. the code given below: from multiprocessing import process, queue def print_square(i): print i*i if __name__ == '__main__': output = queue() processes = [process(target=print_square,args=(i,)) in range(5)] p in processes: p.start() p in processes: p.join() however, gives error message attributeerror: 'module' object has no attribute 'heappush'. complete output upon executing script given below: traceback (most recent call last): file "parallel_3.py", line 15, in output = queue() file "c:\users\abc\appdata\local\continuum\anaconda2\lib\multi processing\__init__.py", line 217, in queue multiprocessing.queues import queue file "c:\users\abc\appdata\local\continuum\anaconda2\lib\multi processing\queues.py", line 45, in queue import empty, full file "c:\users\abc\appdata\local\continuum\anaconda2\lib\queue

Add and remove event handler via reflection c# -

good day! purpose implement class allow subscribe , unsubscribe objects to(from) events. here code of class. public static class eventsubscriber { public static void addeventhandler(eventinfo eventinfo, object item, action action) { var parameters = getparameters(eventinfo); var handler = gethandler(eventinfo, action, parameters); eventinfo.addeventhandler(item, handler); } public static void removeeventhandler(eventinfo eventinfo, object item, action action) { var parameters = getparameters(eventinfo); var handler = gethandler(eventinfo, action, parameters); eventinfo.removeeventhandler(item, handler); } private static parameterexpression[] getparameters(eventinfo eventinfo) { return eventinfo.eventhandlertype .getmethod("invoke") .getparameters() .select(parameter => expression.parameter(parameter.parametertype))

Deprecated method to read content message on swift3 -

what can use replace method in swift 3 - mailcore2 read content of messege? have warning deprecated. let fetchcontentoperation: mcoimapfetchcontentoperation = imapsession.fetchmessagebyuidoperation(withfolder: folder, uid: number_message) i use woud use not deprecated method. exist method read mail content if use mailcore2-ios

oracle11gr2 - Error while creating OIM user with custom Role added in Lookup `Lookup.Users.Role` -

i have added few values in oim lookup lookup.users.role custom values giving following error while creating or modifying users in oim gui. iam-3050056 : specified value abc attribute role not 1 of predefined values is there else needs done in order make custom role values work? custom udf lookup field type doesn’t work after adding or updating new values untill run purgecache.sh

XSLT Export Filter produces unnecessary empty XML tags -

i'm using xslt export filter export part of openoffice calc spreadsheet xml file. one part of filter uses xls:for-each iteration because there can different amount of entries every time script run. iteration produces empty xml tags after ones content. the calc sheet looks this: http://imgur.com/a/alpx2 (rows , b can contain flexible amount of data) the xslt export filter looks this: http://pastebin.com/ugw9cusw and result looks this: http://pastebin.com/hiyxfray i had idea add kind of xsl:if, wasn't able combine notion on select="table:table-row[n]/table:table-cell[m]" . so maybe has idea causes empty xml tags or how rid of them? i think need start xpath tutorial learn how write predicates, instance changing <xsl:for-each select="table:table-row[position() &gt; 1]"> <xsl:for-each select="table:table-row[position() &gt; 1][table:table-cell]"> process table-row elements having table-cell child element

Trying to add up numbers in PHP for loop -

i'm trying add numbers output in code, how can this? $tall1 = 0; ($tall1=0; $tall1 <= 100; $tall1++) { if ($tall1 % 3 == 0) { echo $tall1 . " "; $tall++; } } $total = 0; //initialize variable ($tall1=0; $tall1 <= 100; $tall1++) { if ($tall1 % 3 == 0) { echo $tall1 . " "; $total += $tall1; //add printed number initialized variable. same writing $total = $total + $tall1; } } echo "total: ".$total; //do variable, in case, print some notes initial code: $tall1 = 0; //you don't need this, done loop ( $tall1=0; //this $tall1 initialized $tall1 <= 100; $tall1++ //this $tall1 incremented every time ) { if ($tall1 % 3 == 0) { echo $tall1 . " "; $tall++; //this variable not used anywhere. if meant $tall1, don't need this, done loop. if did not mean $tall1, wanted count how many times if statement runs, need initialize var

Update Podio profile picture using API -

Image
we planning make podio out of office extension people can add start , end date , profile picture automatically changed out of office version in period. we cannot see method in podio api documentation , tried solution per official comment here . but method not working now. here error receiving any on how this? please try using https instead of http, , put instead of post. curl -h "content-type: application/json" -h "authorization: oauth2 <my_auth_token>" -x put -d '{"avatar":<avatar_id>}' "https://api.podio.com/contact/<profile_id>" whole solution: get users current profile get /contact/user/{user_id} (let's call result p ) get users avatar p.image.link (should url) download , alter image as user: upload image - file id, let's call image_id as user: put /contact/{p.profile_id} value {"avatar" : <image_id>}

jquery - Anchor a button in a certain position -

i have img inside div , idea div functions button in fixed location needs remain in same area onresize event, have following on jquery: $(window).resize(function () { $("#btnbanner").css("top", $(window).height() / 2 - ($("#btnbanner").height() / 2) + 350); $("#btnbanner").css("left", $(window).width() / 2 - ($("#btnbanner").width() / 2)); }); the code in put button in middle of page, half of button aligned middle of window. now 350 test did position button below part of image. this html: <div id="contentbanner" class="bannerpresentation"> <img id="btnbanner" class="btnbannerinitial" src="~/content/assests/img/btnbannerinitial.png"/> </div> this css: .bannerpresentation { position: absolute; z-index:10000; background-color:white; width:100%; height:100%; border-style: solid; border-width: 1px

Angular 2 - protractor(e2e) runtime error -

when run protractor error [15:47:46] e/launcher - error: tserror: ? unable compile typescript conflicting library definitions 'selenium-webdriver' found @ 'g:/webservers/home/smsc/smsc2/modules/admin/node_modules/@types/selenium-webdriver/index.d.ts' , 'g:/webservers/home/smsc/smsc2/modules/admin /node_modules/protractor/node_modules/@types/selenium-webdriver/index.d.ts'. copy correct file 'typings' folder resolve conflict. (4090) i rebuild , reinstall protractor, nothing. use command run protractor npm run protractor i read tutorial protractor , write test here enter link description here . describe('angularjs homepage todo list', function() { it('should add todo', function() { browser.get('http://some-link/'); console.log('hi!'); }); }) protractor work fine example, not typescript. do? the error message describes problem: conflicting library definitions 'sele

c# - How to find directory of a uploading file in ASP.NET MVC? -

.net mvc. want load xml file directory , directory path can random. can load xml file need know file directory path. can give me idea how can full directory path of xml file. suppose file in c:\abc\test.xml or d:\cde\test2.xml . if load 1st 1 need directory path c:\abc\test.xml in application. sorry late answer. problem did not full directory path read file. created cache memory save file , read it. like, var filesavepath = path.combine(server.mappath("~/xmlfiles"), filename);

xslt - XSL - how to set max length of whole output text file -

<xsl:output method="text" xmlns:saxon="http://saxon.sf.net/" saxon:line-length="1000"/> i have tried not working example :) let have xml <?xml version="1.0" encoding="utf-8"?> <level plan="1" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xs="http://www.w3.org/2001/xmlschema"> <space2000> <values> <value jak="77" rak="12"</value> <value jak="66" rak="345"></value> <value jak="-50" rak="67"></value> <value jak="but must explain how mistaken idea of denouncing pleasure , praising pain born , give complete account of system, , expound actual teachings of great explorer of truth, master-builder of human happiness. no 1 rejects, dislikes, or avoids pleasure itself, because pleasure, because not know how pursue pleasure rationally encounter consequences extrem

r - Action Button does not update sliderinput values -

i want update values of table in mainpanel basis value of sliders. below code- library(shiny) ui <- shinyui(fluidpage( sidebarpanel( selectinput(inputid="zone", label="choose forecasting zone:",choices = list("north", "south")), wellpanel( conditionalpanel( condition = "input.zone == 'north'", sliderinput("num1", "no of sellers:",0,3500,value = c(2877,3277),step=1), sliderinput("num3", "activation percentage:",0,1,value = c(0.25,0.32),step=0.01), sliderinput("num5", "case size:",0,200000,value = c(60000,75000),step=1), sliderinput("num7", "case rate:",0,4,value = c(1.34,1.45),step=0.01) ), conditionalpanel( condition = "input.zone == 'south'", sliderinput("num1", "no of sellers:",0,3500,value = c(1008,1148),step=1), sliderinput(&

ios - adding uiimageview inside scrollview using auto layout is adding space at top and bottom -

i trying design ios screen.i want design screen showing imageview @ top of screen , scrollview having image view @ bottom of screen. want design screens ios 6 , 6 plus i have added imageview @ top 400 width , 239 height (image size 750w , 448h).this scroll view should scroll in app show full image on screen. i have added scrollview , imageview inside scrollview.my image size inside scrollview 750 width , 1134 height. i can see width , height of total screen 400w , 800h. i want know what should size of image inside imageview have proper aspect ratio. i have created imageview of 400w,605h size. scrollview adding space @ top , bottom of screen. 3.what should constraint fitting larger image inside scrollview. extra space @ top , bottom of scrollview big problem me add contentmode imageview example: imageview.contentmode = .scaleaspectfill

routing - How to Allow a "?" Character in a Route Parameter in symfony3 -

i user symfony3 in project , use routing in project similar bellow user_anoref: path: /noref/{url} defaults: { _controller: userbundle:default:noref } requirements: url: ".+" methods: [get] but when use in url ? character routing error . i used url in routing http://qnf.ir/noref/?http://eshoptech.ir please me change regex match http url strings, untested! user_anoref: path: /noref/{url} defaults: { _controller: userbundle:default:noref } requirements: url: "(http[s]?:\/\/)?([^\/\s]+\/)(.*)" methods: [get]

java - Missing requirement: ApacheBatikBridge/GVT/Scripting1.6(org.apache.batik.bridge 1.6.0) requires 'bundle org.apache.batik.css [1.6.0,1.7.0) -

i using eclipse mars.2(4.5.2) , working birt framework. when trying export product getting below error cannot complete install because 1 or more required items not found. software being installed: x 1.0.0 (x 1.0.0) missing requirement: apache batik bridge/gvt/scripting 1.6.0.v201011041432 (org.apache.batik.bridge 1.6.0.v201011041432) requires 'bundle org.apache.batik.css [1.6.0,1.7.0)' not found cannot satisfy dependency: cannot satisfy dependency: i tried feature project include different versions of same plugin in build path while exporting product. still didn't work.

python - Django Admin: Numeric field filter -

how create filter numeric data in django admin range inputs? p.s. found similar question, here suggest how group concrete ranges , last question activity 2 years ago. django admin: how filter on integer field specific range of values warning! parts of api django, mentioned in answer, considered internal , may changed in future releases of django without notification. taking note mind, pretty easy create own filter. need is: subclass simplelistfilter , create method inside generate default range values , selected range values (for rendering template filter) set queryset method take parameters submitted filter , filter list queryset create template filter (based on admin/filter.html ) set template property in simplelistfilter subclass, pointing filter template. django pass template 3 parameters: title - filter title (taken title property in class) choices - list of dicts generated choices method of class (by default modifies list of tuples returned

html - css pseudo element is hidden by subsequent container with float property -

Image
i have 2 columns tab navigation tab form the tab navigation column has couple of links upon click open form in 2nd column i'm setting tool-tip each link in tab navigation column below ( .scss ) ul{ .tooltip{ // display: inline; position: relative; transition: 0.5s ease-in; &:hover:after{ background: #333; background: rgba(0,0,0,.8); border-radius: 5px; bottom: -5px; color: #fff; content: attr(title); // left: 140%; padding: 5px 15px; position: absolute; z-index: 1; width: auto; } &:hover:before{ border: solid; border-color: #333 transparent; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 6px solid #727272; bottom: 5px; content: ""; left: 125%; position: absolute; z-index: 99; } } } however , tooltips seem appear hidden form container despite giving them

Django Form Name as Attribute in HTML Template -

i have attribute of objects can rendered in html template : {{ mymodels.something }} in case, have forms containing input field has name similar "something", want run in template: {% form in my_form %} {{ mymodels.form.name }} <!-- same mymodels.something --> {% endfor %} but can't rendered.. how can that? forms gather data on client side - send on server side validates them , them (e.g. writing models, or maybe passing context of next rendering). when template rendered, renders form (building markup, providing initial values) - when template engine finished it's job, html code sent browser. if want access form data on rendering time, there same value: initial value. not make sense. might pass same data rendering context , use there. read docs further information on forms, part rendering fields manually might interest - if question aims direction.

C# to Cassandra service with username and password -

cassandra running service on remote machine in same network. created .net program communicates cassandra environment. i able communicate cassandra when not running service following connection string: private void connect() { cluster = cluster.builder().withcredentials(username, password).addcontactpoint("192.168.30.104").build(); session = cluster.connect("core_meter"); } but when try connect cassandra when running service following error: an unhandled exception of type 'cassandra.nohostavailableexception' occurred in cassandra.dll additional information: none of hosts tried query available (tried: 192.168.30.104:9042) i not sure if have change in .yaml file before can approach service username , password. here yaml file: https://www.dropbox.com/s/wbrexlarkjrvlrm/cassandra.yaml?dl=0 edit: when communicate service without username , password can communicate service (i can communicate execution through comman

objective c - Beacon Crash in IOS 10 -

anyone please fix "beacon crashing in ios10". didrangebeacons delegate method returns beacons array nil , code follows -(void)locationmanager:(cllocationmanager *)manager didrangebeacons:(nsarray *)beacons inregion:(clbeaconregion *)region { @try { clbeacon *beacon = [[clbeacon alloc] init]; nslog(@"beacons count %lu", (unsigned long)beacons.count); if(beacons != nil && beacons != nil && beacons != null && beacons.count > 0) { beacon = [beacons firstobject]; self.currentmajor = beacon.major; self.currentminor = beacon.minor; nsarray *majorminorids = [[nsarray alloc]initwithobjects:self.currentmajor,self.currentminor, nil]; self.comaseparatedids = [majorminorids componentsjoinedbystring:@","]; /* log */ [self printlog:[nsstring stringwithformat:@"current major id: %@, previous major id: %@, current minor id: %@, previous minor id %@", self.current

ios - Get publish_actions permission with facebook -

i using below code using share post facebook. if ([[fbsdkaccesstoken currentaccesstoken] hasgranted:@"publish_actions"]) { [[[fbsdkgraphrequest alloc] initwithgraphpath:@"me/feed" parameters: @{ @"message" : @"hello world"} httpmethod:@"post"] startwithcompletionhandler:^(fbsdkgraphrequestconnection *connection, id result, nserror *error) { if (!error) { nslog(@"post id:%@", result[@"id"]); } }]; } if want post status update, requires publish_actions permissions. did't permission how can , adding permission. please me.... the access token holds "scope" information indicates permissions allowed specific user. in order publish_actions app, need apply review facebook submitting additional permissions need. once approved able appropriate access tokens. you can access token sending request facebook this: https://www.facebook.com/dialog/oauth/access_token

database - How to link Connection to Refresh Table in VBA -

i need refresh number of connections in excel, without storing password in connection details. using vba script attempt this. code is: sub test() dim con adodb.connection dim rs adodb.recordset set con = new adodb.connection set rs = new adodb.recordset ' connection string information db variable (strcon) strcon = "driver={dummy}; " & _ "connectstring=(description=" & _ "(address=(protocol=dummy)" & _ "(host=dummy)(port=dummy))" & _ "(connect_data=(service_name = dummy))); uid=dummy; pwd=dummy;" ' opens above connection string. con.open (strcon) activeworkbook.refreshall activeworkbook.save end sub my code seems open connection, , refreshes tables. however, still asking me input password. how use open connection refresh tables? i had delete connections in database , use vba code replicate connections in series of sql queries. basis of code using is: 'declare variables' set

WebRequest will not pass headers from ASP.NET MVC controller to Rest Wcf -

i have asp.net mvc 4 project when make http call using web request, headers not pass. here code: httpwebrequest client = (httpwebrequest)webrequest.create(url); string svccredentials = convert.tobase64string(asciiencoding.ascii.getbytes("user1" + ":" + "test")); client.headers.add("authorization", "basic " + svccredentials); //just example code parse json response using javascriptserializer using (webresponse svcresponse = (httpwebresponse)client.getresponse()) { using (streamreader sr = new streamreader(svcresponse.getresponsestream())) { javascriptserializer js = new javascriptserializer(); string jsontxt = sr.readtoend(); } } try this: string enccred = convert.tobase64string(encoding.ascii.getbytes("user1" + ":" + "test")); string credential = string.format("{0} {1}&

https - AWS Lambda cannot connect to Kinesis Firehose "Max retries exceeded with url" -

Image
i've followed several tutorials , added different iam configurations , security groups keep things open , obvious possible , nothing has worked. here debug log, , main error pasted below. let me know if there's other data should add make clear. [debug] 2016-09-22t13:57:40.965z 5b770867-80cc-11e6-b5b8-018d2de39616 connectionerror received when sending http request. traceback (most recent call last): file "/var/runtime/botocore/endpoint.py", line 174, in _get_response proxies=self.proxies, timeout=self.timeout) file "/var/runtime/botocore/vendored/requests/sessions.py", line 573, in send r = adapter.send(request, **kwargs) file "/var/runtime/botocore/vendored/requests/adapters.py", line 419, in send raise connecttimeout(e, request=request) connecttimeout: httpsconnectionpool(host='firehose.us-east-1.amazonaws.com', port=443): max retries exceeded url: / (caused connecttimeouterror(<botocore.awsrequest.awshttpsconnection object

php - Input form with hidden field how to secure it -

Image
after knew how secure upload image bypassing forms input fields upload unwanted files give example of 2 filed, 1 of them hidden. sql table (id,name,jod,number) create table `users` ( `id` bigint(20) unsigned not null auto_increment, `name` varchar(255) default '0', `job` varchar(255) default null, `number` varchar(255) default null ) engine=myisam default charset=utf8; form code (support member edit own informations) <form action="send.php" method="post" name="send" id="send"> <input type="text" name="name" id="name" value="john"/> <input type="text" name="job" id="job" value="plumber"/> <input type=hidden name="number" id="number" value="1234"/> <input type="submit" name="submit" value="submit"/> </form> later there firefox extension ca

android - Static view in scrolling Viewpager in CoordinatorLayout -

i'm working on app view hierarchy of coordinatorlayout -> viewpager -> framelayout (contained in fragment). coordinatorlayout ensures actionbar scrolls away when scrolling in fragment. the problem i'm facing is, have view in bottom of fragment not scroll, instead stays @ bottom of fragment. view should exist in 1 of fragments, meaning placing outside viewpager not work. is possible create static view in fragment (framelayout)? im not 100% sure if looking if isnt explain (with code) looking for. luck project <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightsum="1" android:id="@+id/coordinatorlayout" android:fitssystemwindows="true"> //part static <scrollview android

Eclipse to Android Studio Import -

i moving source codes as suggested android official website. however, experience not good. sluggish described here . not ultimate problem now. i have resolved many problems such updating compilesdkversion 23 99 errors of kind: error:(13) error retrieving parent item: no resource found matches given name 'android:textappearance.material.inverse'. could rectified. problems keep on shooting go. have 64k dex issue. error:the number of method references in .dex file cannot exceed 64k. learn how resolve issue @ https://developer.android.com/tools/building/multidex.html i never had dex issue while using eclipse. source code have in same when in eclipse . differences gradle changes needed work on as. idea why sudden dex issue? if set multidexenabled true , implications? i suspect dex error result of growth of library, without more info, hard debug. newest version of android studio (2.2) provides apk analyzer tool makes dex limit more transparent.

php - Laravel 5.2: session and token guard on the same routes -

we had session guard , enough. now need add authorization via token (in headers or params) , via session on same routes . authorization via token must stateless. upd: first, think create dubplicate routes. 1 session , 1 token // api token auth // url: /api/test route::group(['middleware' => ['web', 'auth:api'], 'prefix' => 'api', 'as' => 'api.'], function () { route::resource('test', 'testcontroller'); // 50+ routes }); // session auth // url: /test route::group(['middleware' => ['web', 'auth']], function () { route::resource('test', 'testcontroller'); // 50+ routes }); but it's not want, because urls different. maybe knows how solve issue? create new middleware authenticatewithtoken: class authenticatewithtoken { /** * handle incoming request. * * @param \illuminate\http\request $request *

React-Native Meteor: Fetching data from database -

im building first react-native app meteor. i'm trying fetch data database can't work. have handle ready , stop properties doesn't contain object data. explain how can actual data database? container in component: export default createcontainer(() => { const handle = meteor.subscribe('details-list'); return { detailsready: handle.ready(), }; }, detailscontainer); export in meteor app export default () => { meteor.publish('details-list', () => { return details.find(); }); } you need add data want in container, this: export default createcontainer(() => { const handle = meteor.subscribe('details-list'); return { details: details.find(), detailsready: handle.ready(), }; }, detailscontainer);

unicode - python u'\u00b0' returns u'\xb0'. Why? -

i use python 2.7.10. on dealing character encoding, , after reading lot of stack-overflow etc. etc. on subject, encountered behaviour looks strange me. python interpreter input >>>u'\u00b0' results in following output: u'\xb0' i repeat behaviour using dos window, idle console, , wing-ide python shell. my assumptions (correct me if wrong): "degree symbol" has unicode 0x00b0, utf-8 code 0xc2b0, latin-1 code 0xb0. python doc say, string literal u-prefix encoded using unicode. question: why result converted unicode-string-literal byte-escape-sequence matches latin-1 encoding, instead of persisting unicode escape sequence ? thanks in advance help. python uses rules determining output repr each character. rule unicode character codepoints in 0x0080 0x00ff range use sequence \xdd dd hex code, @ least in python 2. there's no way change it. in python 3, printable characters displayed without converting hex code. as why loo

ruby - How to create a custom while block -

i know in ruby can use while loop, want know if can create custom 1 can make this: custom_while < 5 puts += 1 end i have code: def custom_while(condition) loop break if not condition yield end end = 0 custom_while < 5 puts += 1 end however, when condition evaluated, true (because considers first evaluation of i < 5 = true only. any appreciated! note: educational purposes only. you had it. so, problem condition evaluated once? well, construct know can evaluate want? that's right: functions! so, let's make condition function (or proc in ruby lingo): def custom_while(condition) loop break unless condition.() yield end end = 0 custom_while -> { < 5 } puts += 1 end # 0 # 1 # 2 # 3 # 4 this unfortunately not nice looking in other languages. ruby's syntax , semantics aggressively optimized methods take 1 "function" argument. ruby has special syntactically , semantic

ios - Attempt to present whose view is not in the window hierarchy when a cell is tapped -

i'm working on app uitableviewcontroller. idea when cell tapped on, info page pop showing information it. when tapped on, attempt present viewcontroller in class. however, warning shows , i'm not sure why. i've tried looking @ questions similar mine on stackoverflow , other websites, don't make sense me. can explain problem behind warning , how fix it? some of code: override func tableview(_ tableview: uitableview, didselectrowat indexpath: indexpath) { print("showing item info") let cell = tableview.cellforrow(at: indexpath) currentinfo = (cell?.textlabel?.text)! currentdes = descriptions[indexpath.row] currentbool = itembools[indexpath.row] currentindexpath = indexpath showinfo() } func showinfo() { let storyboard = uistoryboard(name: "main", bundle: nil) let vc = storyboard.instantiateviewcontroller(withidentifier: "showinfoviewcontroller") as! showinfoviewcontrol

python - Is it possible to group tensorflow FLAGS by type and generate a string from them? -

is possible group tensorflow flags type? e.g. flags system related (e.g. # of threads) while others model hyperparams. then, possible use model hyperparams flags, in order generate string? (the string used identify model filename) thanks i'm guessing you're wanting automatically store hyper-parameters part of file name in order organize experiments better? unfortunately there isn't way tensorflow, can @ of high-level frameworks built on top of see if offer similar.

MacOS Sierra broke my git, oh noes - Applicable to Sierra and High Sierra -

i upgraded macos sierra today , went repo normal none of git commands work, in fact machine doesn't recognize have git installed. help? i found this article seems little elaborate. all little elaborate, many cases need reinstall xcode developer tools. run this: xcode-select --install

java - Issues with supercomputer submission scripts to run NetLogo -

i'm having difficulty getting supercomputer run netlogo model. i'm attempting follow advice given here , here . no luck. think it's not finding of needed jars? entirety of v5.3.1 folder located at: /users/pas1038/xxmyusernamexx/netlogo/netlogo-5.3.1/ , i've added rnd extension in app/ folder. this submission script: #pbs -n testjob #pbs -l walltime=00:30:00 #pbs -l nodes=1:ppn=1 #pbs -j oe cd /users/pas1038/xxmyusernamexx/netlogo/netlogo-5.3.1/ java -xmx1024m -dfile.encoding=utf-8 -cp /users/pas1038/xxmyusernamexx/netlogo/netlogo-5.3.1/app/netlogo.jar \ org.nlogo.headless.main \ --model /users/pas1038/xxmyusername/netlogo/netlogo-5.3.1/mymodel.nlogo \ --experiment test \ --table testoutput.csv \ --threads 8 but giving me following error: java.lang.illegalstateexception: can't find extension: profiler/profiler.jar @ org.nlogo.workspace.extensionmanager.resolvepathasurl(extensionmanager.java:315) @ org.nlogo.workspace.extensionmanager.impo

Django.In admin get values from inline -

i have model "test1" , other model "test2" fk on first one. , register them in admin "test1admin" , tabular inline "test2inline". wanna access in test1admin values of fields inlines. can't values in "test1" model because instances of "test2" wasn't created yet. can't figure out how can this?

cancellation - How to cancel a step from Spring batch besides returning null from reader -

is there way cancel step not job spring batch? thought when used "org.springframework.batch.core.step.item.skiplimitstepfactorybean" , property "fatalexceptionclasses", when fatal exception happened, step cancelled not entire job. dont understand why if property inside step cancels entire job. i know can return null reader. other way? thanks

PHP Amazon API Signature does not Match -

i trying signature amazon api. have tryied many ways, not working. this output when load site: signaturedoesnotmatchthe request signature calculated not match signature provided. check aws secret access key , signing method. consult service documentation details.a0276c00-dab6-4993-bfba-f1c9e431be72 the link: http://webservices.amazon.de/onca/xml?awsaccesskeyid=akiaiapozfmtww53xw3a&associatetag=myassociatetag&itemid=b017m5otu2&operation=itemlookup&responsegroup=images&service=awsecommerceservice&timestamp=2016-09-22t15%3a37%3a01z&version=2011-08-01&idtype=asin&signature=t4n0bqqbssbu8pvljawhsvno4bmdltwmlv%2fmaekapbw%3dh the code: function aws_signed_request($region, $params, $public_key, $private_key, $associate_tag=null, $version='2011-08-01') { /* copyright (c) 2009-2012 ulrich mierendorff permission hereby granted, free of charge, person obtaining copy of software , associated documentation files (the "s