Posts

Showing posts from July, 2012

python - Reverse for 'shop_cart' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] -

i trying out django mezzanine. have installed pip. after successful installation added cartridge package via pip install -u cartridge. have included in installed_apps. able see package , able tweak in admin panel. when try go onto home page giving me following error:- reverse 'shop_cart' arguments '()' , keyword arguments '{}' not found. 0 pattern(s) tried: [] inside debugger shown following error @ line 4 highlighed:- 1 {% extends "base.html" %} 2 {% load i18n %} 3 4 {% block meta_title %}{% trans "home" %}{% endblock %} 5 {% block title %}{% trans "home" %}{% endblock %} 6 7 {% block breadcrumb_menu %} 8 <li class="active">{% trans "home" %}</li> 9 {% endblock %} 10 11 {% block main %} 12 {% blocktrans %} 13 <h2>congratulations!</h2> 14 <p> also mention have not edited urls or files. you need read manual tells after install cartid

.net - C# - Retrieve list of all ReadOnly files under a directory in Windows -

i need list of readonly files under directory including files under sub-folders. there in .net framework make easier looping through files? var path = @"c:\";//some path var readonlyfiles = new directoryinfo(path) .enumeratefiles("*", searchoption.alldirectories) .where(file => file.attributes.hasflag(fileattributes.readonly));

Tracking Chnages in Enterprise Architect -

i encounter real difficulty in tracking changes , updates in company models. i research tool abilities lot, still didn't find golden way match requirements of: provide indication where change what change keep original model state, aside up-to-date state ea offers following ways: baselines version control clone change elements none of them provides indication on change , where. what easiest way manage changes effectively? you forgot last resort: audit. turn on auditing , can lot more information. of course has drawbacks it uses lot of space there still changes not tracked in detail might need it. turn on @ project/auditing . more information here . additionally think of writing triggers, not recommend since makes repository unmaintainable. auditing of course no silver bullet. tracking changes tedious. , not spend effort in "accusation mode". better spend energy in driving model towards company goals. nobody needs yest

In Excel, remove duplicates from one column based on the values in another column, either through VBA or a combination of formulas/functions -

Image
i'm having trouble trying achieve in accurate , automated way. i've tried approaches discussed here , here , here , none work in scenario. i have spreadsheet thousands of rows of data. data organised follows: column contains ip addresses in general format column b contains date/time in following custom format ( d/mm/yyyy h:mm ) column c contains duration in following custom format ( h:mm:ss ) this data contains number of duplicates need remove, based on ip address in column a. however, criteria need remove whichever duplicates not longest duration. better explain scenario, see sample image below: i need way remove duplicates of particular ip address not contain longest duration ip address. so, using above example, row 3 deleted because duration of 1 minute shorter 36 minutes in row 4 contains same ip address. another example rows 5, 6 , 7 removed durations shorter row 8 has same ip address longer duration. of course, rows containing unique ip addresses lef

How is the Calligraphy library(Custom fonts in Android ) work internally? -

i want know internal architecture of calligraphy library mean how internally wrapping textview , applying costume ttf font style. have gone through link - https://github.com/chrisjenx/calligraphy . have added code application class calligraphyconfig.initdefault(new calligraphyconfig.builder() .setdefaultfontpath("fonts/lato-regular.ttf") .setfontattrid(r.attr.fontpath) .build() ); i have added code in activity @override protected void attachbasecontext(context newbase) { super.attachbasecontext(calligraphycontextwrapper.wrap(newbase)); } so how attachbasecontext(context context) wrapping activity textview font style.

laravel - PHP: as API+Views or just API -

note: opinionated question. m asking unable find proper articles covering concern. php (alone or framework laravel) can used both backend , frontend (with templating engines blade,smarty,etc) development. my concern is: is use templating engine , create views in php? use php backend tech , create apis, let frontend built in other language (like angular,react,etc) chosen front end developer. if use templating-engine, application getting tightly coupled between frontend tech choices , backend tech choices? ps: hope concern clear, if not explain in elaborated way. my opinion: if building small-medium size web project, don't bother use frontend frameworks, because don't horses in such small environment. when comes larger project scaling - recommended use kind of frontend framework, because kind of project (or should be) maintained team, backenders can focus on backend - frontenders on frontend. a lot of folks says web developer web developer, there no bac

Table already exists in magento -

a:5:{i:0;s:1615:"error in file: "f:\xampp\htdocs\magento\app\code\core\mage\catalog\sql\catalog_setup\install-1.6.0.0.php" - sqlstate[42s01]: base table or view exists: 1050 table 'magentocatalog_product_entity' exists, query was: create table `magentocatalog_product_entity` ( `entity_id` int unsigned not null auto_increment comment 'entity id' , `entity_type_id` smallint unsigned not null default '0' comment 'entity type id' , `attribute_set_id` smallint unsigned not null default '0' comment 'attribute set id' , `type_id` varchar(32) not null default 'simple' comment 'type id' , `sku` varchar(64) null comment 'sku' , `has_options` smallint not null default '0' comment 'has options' , `required_options` smallint unsigned not null default '0' comment 'required options' , `created_at` timestamp null default null comment 'creation time' , `

Conversion of my alfresco javascript file into java class -

this question exact duplicate of: auto-generation of email username , random password on creation of new user 1 answer i need convert javascript file java code.please help if (document.iscontainer && document.displaypath == "/company home/user homes") { var owner = document.properties["cm:owner"]; var pnode = people.getperson(owner); if (pnode!=null && pnode.exists()){ var username = pnode.properties.username; var email = pnode.properties.email; var randpassword = math.random().tostring(36).substr(2, 30)+"-"+(date.now()); people.setpassword(username, randpassword); logger.debug("invitation mail: user "+username+" password has been changed."); var mail = actions.create("mail"); //mail.parameters.from = "noreply@custo

wso2cep - WS02CEP GEO DASHBOARD Event dropped at Output Adapter While passing the org.wso2.geo.LocationStream:1.0.0 -

ws02cep event dropped @ output adapter while passing org.wso2.geo.locationstream:1.0.0. have attached exact error below. can me resolve ? error {org.wso2.carbon.event.output.adapter.websocket.local.websocketlocaleventadapter} - event dropped @ output adapter 'geo-publisher-websocketlocal-fusedspacialevent' tenant id '-1234', no clients registered

html - How to get rid of sub-menu underline -

Image
i have problem isn't big or something,but annoys me hell.the problem underlining of child elements of sub-menu,and mean http://imgur.com/a/bqeza .yep,that right there drives me crazy.it shows instantly when hover on parent element,in menu.i started coding 2 weeks ago,so question might stupid,but please if know how remove , fix padding on parent element,to write here. here code. .mobile-menu{ position:fixed; width:70%; height:100%; background:white; z-index:1000; } .mobile-menu ul{ top:10.2%; position:relative; color:black; text-align:left; font-weight:bold; } .mobile-menu li{ position:relative; border-bottom:1px solid black; padding-top:4%; padding-bottom:4%; } .mobile-menu li:hover{ background:#000; color:#fff; } .mobile-menu ul li ul{ display:none; background:#fff; padding:0; border:none; } .mobile-menu ul li:hover ul{ display:block; } <div class="mobile-menu"> <ul class="mobile-menu-ul">

excel vba - Concatenate two selected cells and delete -

i have data in column 1000 rows of data. need concatenate 2 selected cells. example, data in user selected cells a10 & a11 gets concatenated in cell a10. after need clear content of cell a11. the code below job of concatenation, , puts data in a10. not clear contents of a11 cell data. need clear a11 cell contents. any appreciated. option explicit sub mergestems() dim colfirst long dim collast long dim joinedvalue string dim rowcrnt long dim rowfirst long dim rowlast long rowfirst = selection.row rowlast = rowfirst + selection.rows.count - 1 colfirst = selection.column collast = colfirst + selection.columns.count - 1 if colfirst <> 1 or collast <> 1 call msgbox("please select range within column ""a""", vbokonly) exit sub end if worksheets("sheet1") ' worksheet of choice. joinedvalue = .cells(rowfirst, "a").value rowcrnt = rowfirst +

objective c - Facebook Like Button not working in iOS -

i'm integrating facebook button in ios application. fbsdklikecontrol *likebutton = [[fbsdklikecontrol alloc] initwithframe:cgrectmake(10, 5, 60, 20)]; likebutton.objectid = @"http://www.facebook.com/pages/....."; [view addsubview:likebutton]; & after tap like button crash app throw... error :- +[fbsdkbridgeapirequest checkprotocolfortype:scheme:]: unrecognized selector sent class 0x10da385e8 i've checked facebook doc , i've not found solution. can me?

java - what is the difference between the tag with prefix "javaee:" and not with "javaee:" in web.xml? -

Image
as title, difference between tag prefix "javaee:" , not "javaee:". i find need set configuration using tag without "javaee:", , tag prefix "javaee:" not work for example: <welcome-file-list> <welcome-file>default.jsp</welcome-file> <welcome-file>default.html</welcome-file> </welcome-file-list> works but <javaee:welcome-file-list> <javaee:welcome-file>default.jsp</javaee:welcome-file> <javaee:welcome-file>default.html</javaee:welcome-file> </javaee:welcome-file-list> does not work. i using tomcat 8.5.6 server. below web.xml: <web-app id="webapp_id" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xml="http://www.w3.org/xml/1998/namespace" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.su

How to align these TextViews in my android application -

Image
i have following layout: as can see from date , to date not aligned because of number of characters in , label? how align them? here xaml layout: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:layout_height="wrap_content" android:layout_width="match_parent" android:orientation="horizontal" android:layout_margintop="5dip" android:animatelayoutchanges="false"> <textview android:layout_width="wrap_content" android:layout_height="match_parent" android:text="from" android:paddingtop="10dp" android:paddingle

java - Maven install-file not effective in GitLab/Docker: "could not resolve dependencies for project" -

i'm trying build java project on gitlab server using maven in docker. because use 3rd party jars, install them locally using install-file plugin. is/seems succesfull both on local machine, on docker: $ mvn install:install-file -dfile=lib/customartifact-1.0.jar -dgroupid=customartifact -dartifactid=customartifact -dversion=1.0 -dpackaging=jar [info] scanning projects... [info] [info] ------------------------------------------------------------------------ [info] building myproject 1.0-snapshot [info] ------------------------------------------------------------------------ [info] [info] --- maven-install-plugin:2.4:install-file (default-cli) @ myproject --- [info] installing /builds/gitlab/myproject-groep/myproject/lib/customartifact-1.0.jar /root/.m2/repository/customartifact/customartifact/1.0/customartifact-1.0.jar [info] installing /tmp/mvninstall2011198835315637645.pom /root/.m2/repository/customartifact/customartifact/1.0/customartifact-1.0.pom [info] --------------------

java - ActionBar three dots not displayed -

i want add menu items in action bar. added successfully. display when click on menu button of mobile, want display on action bar. in action bar there not dots shown @ right side. i attached code below. template file also. please suggest me solution - tried change attribute android:showasaction="never" /if room/always no use. menu template <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_pin_client" android:icon="@drawable/pin" android:title="@string/pin" android:showasaction="never" android:orderincategory="100"/> </menu> java code: //****************************************** @override public boolean oncreateoptionsmenu(menu menu) { // to

apache kafka - DStream.foreachRDD do not work ,after transformation -

guys! val kafkastream = kafkautils.createdirectstream[string, string, stringdecoder, stringdecoder](ssc, kafkaparams, topicset) kafkastream.map(_._2).foreachrdd(rdd => rdd.foreach(println)) it worked ,it print kafka message.but when run this: val dstreamsfilterbytablename = kafkastream.transform(rdd => rdd.map(_._2).map(line => json.parse(line).asinstanceof[jsonobject]) .filter(json => otterkafkaparser.filterjsonwithtableanddb(json, tablename, dbname))) dstreamsfilterbytablename.foreachrdd(rdd => rdd.foreach(println)) it did not work.when debugged in,there data in dstreamsfilterbytablename,but did not print. why did happen? thanks advice.

Add days in date in yyyymmdd format SQL server -

i have hard-coded date in variable in yyyymmdd format declare @startdate = 20160101; now want add 365 days in date. when 20160101 + 365, gives incorrect output 20160466, should give me answer after adding 365 days think 20160102 please tell me how in sql server in declare variable ? want output in yyyymmdd format thanks, aiden declare @startdate int = '20161117'; select convert(varchar,convert(datetime,convert(char(8),@startdate))+365,112)

asp.net - Sending email in web application -

Image
i trying send email after click of button. exception is wrong code ? have tried go gmail settings , turned on "access less secure apps" , still problem persists. imports system.net.mail imports system.net partial class _default inherits system.web.ui.page` protected sub button1_click(sender object, e system.eventargs) handles button1.click try dim mailmessage new mailmessage("group2@gmail.com", "ndumisosizwe@gmail.com") mailmessage.subject = "mail body" mailmessage.body = "this test email" dim smtpclient new smtpclient("smtp.gmail.com", 587) dim credentials new networkcredential("group2@gmail.com", "mypasswordhere") smtpclient.credentials = credentials smtpclient.enablessl = true smtpclient.send(mailmessage) msgbox("email sent successfully") catch ex exception msgbox("email failed ! "

java - What does the default constructor really do? -

there don't understand real role of default constructor in java. in official tutorial object creation : creating objects all classes have @ least 1 constructor. if class not explicitly declare any, java compiler automatically provides no-argument constructor, called default constructor . default constructor calls class parent's no-argument constructor , or object constructor if class has no other parent. if parent has no constructor ( object have one ), compiler reject program. and in docs default constructor ( §8.8.9 ) 8.8.9. default constructor if class being declared the primordial class object , default constructor has empty body . otherwise, default constructor invokes superclass constructor no arguments. so default constructor of class object has empty body. , know default constructor not initialize fields default values, because it's compiler : default values it's not necessary assign value when field declared. fields

How to reset record with counter column after delete it in Cassandra? -

i create table counter column in using com.datastax.driver.core packages, , function in class: public void dostartingjob(){ session.execute("create keyspace myks replication " + "= {'class':'simplestrategy', 'replication_factor':1};"); session.execute("create table myks.clients_count(ip_address text primary key," + "request_count counter);"); } after deleted table entry cqlsh like: jay@jayesh-380:~$ cqlsh connected test cluster @ 127.0.0.1:9042. [cqlsh 5.0.1 | cassandra 3.9 | cql spec 3.4.2 | native protocol v4] use help. cqlsh:myks> delete clients_count ip_address='127.0.0.1'; then to insert row same primary-key used following statement(via cqlsh): update myks.clients_count set request_count = 1 ip_address ='127.0.0.1'; and is not allowed as: invalidrequest: error server: code=2200 [invalid query] message="cannot set v

vb.net - VB skipping Cases in Select Case statement -

vb running through part of select case , leaving: enter code hereselect case currentkey case frmsettings.keyused(1) 'attack case frmsettings.keyused(2) 'hud case frmsettings.keyused(3) 'ability case frmsettings.keyused(4) 'interact case frmsettings.keyused(5) 'n case frmsettings.keyused(6) gets point 'w case frmsettings.keyused(7) 's case frmsettings.keyused(8) 'e msgbox("e") end select it consistently gets case 6, @ point skips straight end. have idea how/why? edit: it's fixed itself, won't keep coming "problems" have been known do

java - Binding headers with hyphens to Play framework forms -

we authenticate users of our web application via shibboleth. application built using play framework. want bind headers come shibboleth play form. according the documentation , data binding performed using spring. usually, binding works. if have form model class like public user { public string name; } then binding form name field match 2 fields automatically. one header comes shibboleth of form shib-identity-provider . i'd bind field of form model, hyphens not legal characters field names in java. there way can map header name legal java field name? applies more too, can configure data binding don't need use identical form field names , java class field names binding work? you can create class different field names data binding. for example can create case class shib follow: case class shib (provider: string) and define data binding function play mapping val formmapping = mapping( "shib-identity-provider" -> text )(shib.apply)(

visual studio - SQL71508: The model already has an element that has the same name -

i unable build sql view openrowset function in visual studio 2015. view definition has openrowset , uses nested query. though valid , works in sql server, when try build view in visual studio throws 2 errors each column in outer select statement. sql71508: model has element has same name sql71005: reference column below sample view reference use databasea go create view viewsample select columna , columnb , columnc , columnd ( select distinct column1 columna , row_number() over(partition column1 order columnd desc) rownumber , column2 columnb , column3 columnc , cast(getdate() date) columnd openrowset('microsoft.ace.oledb.12.0', 'excel 12.0 xml;hdr=yes;database=\\reportingserver\foldera\sample.xlsx', 'select * [sheet1$]') ) a.rownumber = 1 please let me know how handle scenario.

Aurelia - Overriding css binding inside custom element -

what want achieve have custom element , bind css directly element parent within custom element. parent: <div> <custom-element css="height: ${heightproperty}"></custom-element> </div> custom element: <template css="width: ${widthproperty}"> </template> but width , height properties not binded @ same time. 1 binded (changed) last take effect. merging seems work when setting class property. bug or intended? not sure if way go/ proper way of doing this, happens when add bindable css property custom element? like this: import { bindable } 'aurelia-framework'; export class customelement { @bindable() css = ''; } and in html <template css="width: ${widthproperty} ${css}"> </template>

javascript - Checking for NaN condition not working -

on page_load using 1 js function. default showing me nan have added condition checking nan below var totalpaid = document.getelementbyid('txttotalpaid').value; var totlandval = 0; totlandval = parseint(expense) + parseint(totalpaid) if (totlandval == 0 || totlandval == nan) { document.getelementbyid('txttotallandval').value = 0; } else { document.getelementbyid('txttotallandval').value = totlandval; } but value still coming nan in textbox use isnan() instead, because surprise: nan == nan // false

html - Dynamic table creation with ng-repeat in angularjs -

Image
i want generate dynamic table dynamic table header , row/columns according json object comes webapi. here examples of json object comes every time different. [ {"country":"australia","toner quantity":8}, {"country":"china","toner quantity":6}, {"country":"india","toner quantity":11}, {"country":"south korea","toner quantity":1} ] and time comes like [ {"customername":"ford","australia":0,"china":2,"india":0,"south korea":0}, {"customername":"icici prudential","australia":0,"china":0,"india":5,"south korea":0}, {"customername":"kimberly clark","australia":0,"china":0,"india":0,"south korea":1}, {"customername":"mcdonalds","australia"

Magento Products are not listed on fronend -

i downloaded old magento site , installed on local server. admin panel working perfect products not listed in frontend. links on front end page not working. when 'downloaded old magento site', mean copied down folder structure? if so, won't have copied product database, entirely separate entity php/js/html/css comprises file structure.

How to use AdView inside the remoteview notification android? -

i want create custom notification view google ads. this code want implement remoteviews. remoteviews views = new remoteviews(context.getpackagename(), r.layout.notification_view); publisheradview mpublisheradview = (publisheradview) findviewbyid(r.id.publisheradview); views.setviewvisibility(r.id.publisheradview, view.visible); publisheradrequest adrequest = new publisheradrequest.builder().build(); mpublisheradview.loadad(adrequest); intent notificationintent = new intent(this, mainactivity.class); notificationintent.setaction(syncstatecontract.constants.action.main_action); notificationintent.setflags(intent.flag_activity_new_task | intent.flag_activity_clear_task); pendingintent pendingintent = pendingintent.getactivity(this, 0, notificationintent, 0); with below code - remoteviews views = new remoteviews(context.getpackagename(), r.layout.notification_view); i can custom layout notification

c# - What's the difference of EventStream and EventBus -

i wondering if there difference between eventbus , eventstream or 2 synonyms? or eventstream layer above eventbus allows filter, transform, etc. events? my quick differentiation 1 centralized , other topic/endpoint. i.e. if system used event bus (enterprise service bus?) each component subscribe centralized bus messages. if use eventstream, expect subscribe decentralized endpoint specific events subscribing to.

hazelcast - Declaring a Member dead when it stops responding to actual requests -

i experienced multiple outages our hazelcast setup (hazelcast embedded within payara) in situation, non-hazelcast workload of process caused gc overhead errors. during time hazelcast responded heartbeats, however, did not respond actual requests fetched data. caused system stall, if backup of data available. therefore want ask if there way kick off member out of cluster if stops responding other kinds of requests heartbeat. you might want consider using hazelcast in "lite" mode on payara server instances. if turn on "lite" mode on instances might face ecessive gc, these instances should not affect hazelcast performance, nodes not store data hazelcast cluster. however, necessary complement solution additional full instances, keep data. these additional instances should not run application of yours , function separate hazelcast node. section focused on throughput , performance in blog post describes scenarios how use "lite" payara cluster

reporting services - Vb.net Reportviewer not showing external image -

i have rdlc report in vb.net should parameter form load external image on drive. i've created paramater called reportparameterplaaskaart purpose. have set image on report external [@reportparameterplaaskaart] in 'use image" box. when run application runs without error, no image created on report. missing ? my code follows : private sub parskaartjies_load(sender object, e eventargs) handles mybase.load 'todo: line of code loads data 'skeduleringdatabasisdataset.oesskattings' table. can move, or remove it, needed. me.oesskattingstableadapter.fill(me.skeduleringdatabasisdataset.oesskattings) txtaliasnaam.text = parskaartjiekiesfrm.cmbaliasnaam.selectedvalue txtplaasnaam.text = parskaartjiekiesfrm.cmbplaasnaam.text txtplaasno.text = parskaartjiekiesfrm.txtplaasno.text txtdruk.text = parskaartjiekiesfrm.txtbladsyedruk.text dim kaartplek string = "file:///c:\users\administrator\desktop\skedulering\grafieka\plaaskaarte\&quo

php - convert multiple MySQL queries into a single query -

query 1... $result = $wpdb->get_results("select wp_users.id,wp_users.user_login,wp_users.user_registered,wp_users.user_email,t.total,t.acc_nums wp_users left join wp_usermeta on ( wp_users.id = wp_usermeta.user_id ) left join (select count(*) total,user_id,group_concat(account_number) acc_nums `user_per_bank` group user_id) t on t.user_id=wp_users.id 1=1 , ( ( ( wp_usermeta.meta_key = 'wp_capabilities' , wp_usermeta.meta_value '%\"editor\"%' ) ) ) order user_registered desc", array_a); to combined query... $out = $wpdb->get_results('select `user_id`, sum(`amount`) outstanding `assist_trans` left join `wp_users` on wp_users.id = assist_trans.user_id `status` in (0,2,4) group assist_trans.user_id order desc'); so "$out" variable can dropped , can use "$result" instead... if i've understood question correctly, need make join first query second, , have outstanding column in result set. sh

javascript - Touchstart Event delegation -

update: problem occurs on elements dinamically created have page load products in ajax grid. each product div want clickable add information cart. all works fine using jquery click event page must used on mobile want use touchstart event how wrote doesn't work! it seems event delegation doesn't work touchstart or else. this code, in chrome or firefox in desktop page click works, if emulate mobile device touch doesn't work, ideas? <div class="col-xs-12 col-md-offset-3 col-md-6 col-md-3 col-lg-offset-3 col-lg-6 col-lg-3 "> <div class="tiles" id="products"></div> </div> $("#products").on("click touchstart", ".product-tile", function (e) { console.log("ok"); }); function getproducts() { $.ajax({ type: "post", contenttype: "application/json; charset=utf-8", url: "/aj/productws.asmx/getlistjson", dat

swift - how to adjust y-axis of back button in iOS -

Image
i have created custom navigation controller subclassing uinavigationcontroller . when increase size of navigation bar button slides down. then how adjust y-axis of button. self.navigationbar.frame = cgrect(x:0, y: 20, width: self.view.frame.size.width, height: 64.0) i able adjust y axis of title below code self.navigationbar.settitleverticalpositionadjustment(-30, for: .default) try - (void)setbackbuttontitlepositionadjustment:(uioffset)adjustment forbarmetrics:(uibarmetrics)barmetrics; - (void)setbackbuttonbackgroundverticalpositionadjustment:(cgfloat)adjustment forbarmetrics:(uibarmetrics)barmetrics;

asp.net - show error msg for bootstrap login modal -

Image
i using bootstrap modal create modal, appears automatically when user visit home page: at top of default.aspx have javascript code show modal every time user visit home page: $(document).ready(function () { $(".modal").modal('show').css({ top: "30%" }); }); then created bootstrap modal inside update panel, created scriptmanager @ top update panel, below modal code: <asp:scriptmanager id="scriptmanager1" runat="server"></asp:scriptmanager> <asp:updatepanel id="loginupdatepanel" runat="server" updatemode="conditional" enableviewstate="true"> <contenttemplate> <asp:panel id="mymodal" runat="server" class="modal fade animated zoomin"> <div class="modal-dialog"> <div class="modal-content"> <div

Regex - trying to extract digit group from nth position in string -

first of disclaimer : i'm complete newbie @ regex , have done research try , solve specific issue, getting confused. i'm working on learning basics, don't have luxury of time on side - learn better when trying solve real world problem! second, context : i'm using regex part of automation program winautomation pull information received emails. has regex ability parse text no actual coding front or end can't use other scripting languages solve problem. finally, on question. i looping through emails have been received , need save specific number string email subject. the raw string looks this: site: energy use exception - 05/10/2016 - sto : stoke-on-trent office (stoke-on-trent), electricity, 1529102000003 i can number this: (?:[^, ]*$){1} however there occasions there data after number: site: energy use exception - 05/10/2016 - sto : stoke-on-trent office (stoke-on-trent), electricity, 1529102000003, main office given in case digit betw

rails search method for full string match and not substring when tagging used in blog -

i want full text search multiple words matches tags in blog in text field , not use "like" keyword in blog.rb matches substring(matching of substrings should not there). text entered should match tag. example: 'foo bar' tag should match search 'foo bar' , not 'foo' or 'bar'. changes need done following code in blog.rb? class blog < activerecord::base extend friendlyid friendly_id :slugurl, use: :slugged, slug_column: :slugurl def self.search(search) words = search.to_s.downcase.strip.split.uniq words.map! { |word| "tag '%#{search}%'" } psql = words.join(" , ") self.where(psql) end end can me exact search method multiple tags?

hadoop - Spark on Yarn client run with errors -

i use hadoop 2.7.1 , spark 2.0.0. when launch: ./bin/spark-shell --master yarn --deploy-mode client i have following error: 6/11/10 12:03:06 warn client: neither spark.yarn.jars nor spark.yarn.archive set, falling uploading libraries under spark_home. 16/11/10 12:03:13 error sparkcontext: error initializing sparkcontext. org.apache.spark.sparkexception: yarn application has ended! might have been killed or unable launch application master. @ org.apache.spark.scheduler.cluster.yarnclientschedulerbackend.waitforapplication(yarnclientschedulerbackend.scala:85) @ org.apache.spark.scheduler.cluster.yarnclientschedulerbackend.start(yarnclientschedulerbackend.scala:62) @ org.apache.spark.scheduler.taskschedulerimpl.start(taskschedulerimpl.scala:149) @ org.apache.spark.sparkcontext.<init>(sparkcontext.scala:500) @ org.apache.spark.sparkcontext$.getorcreate(sparkcontext.scala:2256) @ org.apache.spark.sql.sparksession$builder$$anonfun$8.apply(sparksession.scala:831) @ org.apach

jquery - ajax keyword search from the database in drupal -

this code ajax search have : function mymodule_menu() { $items = array(); $items['ajaxsearch'] = array( 'title' => 'search through ajax', //page title 'description' => 'a form mess around with.', 'page callback' => 'drupal_get_form', 'page arguments' => array('ajaxsearch_form'), 'access arguments' => array(''), 'access callback' => true, 'type' => menu_callback ); return $items; } function ajaxsearch_form($form, &$form_state) { $form = array(); $form['search'] = array( '#title' => t('search name'), '#type' => 'textfield', ); $form['submit'] = array( '#type' => 'submit', '#value' => 'submit',

arrays - Change of syntax -

i used return array of 'mappoints' (from db) using following extension sequence iterator.element == mappoints { func makejson() -> json { return .array(self.map { $0.makejson() }) } func makeresponse(request: request) throws -> response { return try makejson().makeresponse() } } this gives error "instance member 'array' cannot used on type 'json'" can tell me how should done ? through initialiser json(array: [t]) . extension sequence iterator.element == post { func makejson() throws -> json { return try json(map { try $0.makejson() }) } func makeresponse(request: request) throws -> response { return try makejson().makeresponse() } }

selenium - Unable to launch safari in simulator using appium xcuitest -

i'm automating wb application in ios simulator v10.0 using appium xcuitest v1.6 i'm unable launch safari url mentioned in code. getting following exception.please help. exception in thread "main" org.openqa.selenium.remote.unreachablebrowserexception: not start new session. possible causes invalid address of remote server or browser start-up failure. build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' system info: host: 'tvmatp310436m', ip: '192.168.1.116', os.name: 'mac os x', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_111' driver info: driver.version: iosdriver @ org.openqa.selenium.remote.remotewebdriver.execute(remotewebdriver.java:593) @ io.appium.java_client.defaultgenericmobiledriver.execute(defaultgenericmobiledriver.java:51) @ io.appium.java_client.appiumdriver.execute(appiumdriver.java:1) @ io.appium.java_client.ios.io

java - Firebase retrieving data to customlistview [Android] -

my error: e/uncaughtexception: com.google.firebase.database.databaseexception: can't convert object of type java.lang.string type com.stitch.fractions.profile.userinfo.userinformation @ com.google.android.gms.internal.zzamy.zze(unknown source) @ com.google.android.gms.internal.zzamy.zzb(unknown source) @ com.google.android.gms.internal.zzamy.zza(unknown source) @ com.google.firebase.database.datasnapshot.getvalue(unknown source) @ com.stitch.fractions.scoreboard.activity.activity.scoreboardactivity$1.ondatachange(scoreboardactivity.java:49) @ com.google.firebase.database.query$1.ondatachange(unknown source) @ com.google.android.gms.internal.zzajp.zza(unknown source) @ com.google.android.gms.internal.zzakp.zzcxi(unknown source) @ com.google.android.gms.internal.zzaks$1.run(unknown source)