Posts

Showing posts from June, 2015

php - Managing 1000+ user and each user's having 20,000+ rows for storing data in mysql -

i using php , mysql create website. accepting @ least 1000 users. each user have 10000+ objects(different user may have different objects) , each object have @ least 5 properties.so if create table object_id | object_name | object_user_id | property_1|property_2|...|property_5 then have 10 million rows. solution not acceptable. shall create table each user? thanks in advance... according given description in question may need 3 tables. 1. user --> userid , username , etc... 2. object --> objectid , objectname , etc... , userid (reference of user ) 3. property --> propertyid , propertyname , etc... , objectid (reference of object )

Keeping Application in sync with Domino calendar -

we have application provides advanced calendaring features , talks calendaring system microsoft exchange or google calendar. in process of supporting ibm domino our application. able create , update , delete meetings through rest services provided domino. want in sync calendar items created through other systems lotus notes. how acheive that? how can know meeting has been created user or conference room through other calendaring client. microsoft exchange provides subscription , notification. can subscribe user or room calendar. changes in calendar, subscriber notified. there equivalent in domino similar purpose. i'm not aware of service built domino provides equivalent of exchange subscription service refer to. build using notes c api's extension manager, require installation of software on domino server - can significant obstacle getting application adopted.

entity framework - How to convert byte[] to string in c# -

to prevent concurrency have included field version timestamps type. don't no how convert version value string. please me solve problem. using (mmp2012entities context = new mmp2012entities()) { var res = (from in context.lin_laundry_issues join sub in context.lin_laundry_iss_sub on i.issue_number equals sub.issue_number join in context.mmp_items on sub.item_id equals it.id i.issue_number==id && i.hospital_id==hospid && sub.status_ind==1 select new laundry_issuerecieptlist { issue_date = i.issue_date, collected_by = i.collected_by, authorised_by = i.authorised_by, laundry_id = i.laundry_id, item_id = sub.item_id, item_name = it.name, qty_issued = sub.qty_issued, rate = sub.rate, issue_number=i.issue_number, subissueid=sub.laundry_trans_sub_id, status_ind=sub.status_ind, version=sub.version }).tolist(); return res; } you can u

uipickerviewcontroller - having trouble to assign multiple picker views to a single view controller -

(void)viewdidload { [super viewdidload]; picker1data=@[@1,@2,@3,@4,@5]; picker2data=@[@"a",@"b",@"c",@"d",@"e",@"f"]; self.picker1.datasource=self; self.picker1.delegate=self; self.picker2.datasource=self; self.picker2.delegate=self; am doing wrong assigning single view controller datasource , delegate of multiple pickers? no can assign multiple uipicker view in signgle viewcontoller

IntelliJ 14 Java and Scala ClassNotFoundException -

i upgraded intellij 14 , added scala support. my main files stopped running. example gui file, has no errors , totally self contained hello world style testing error: exception in thread "main" java.lang.classnotfoundexception: gui it makes no sense , i'm pretty frustrated intellij devs slacking in not auto-detecting solution this. have tried fix it. settings, compilers, making project scratch. i had bit of luck when making scratch, started add other files (files not being used!) starts error. it seems files outside of original project module (when creating new project test fix) not run giving classnotfoundexception. this may related other question: https://stackoverflow.com/questions/27516673/cannot-run-file-located-out-of-main-module-intellij-14-java-scala sample view of problem i had same problem , able fix right clicking directory class in, , clicking mark sources root. should make class discoverable , able run. solution image

html - span css is not working properly -

Image
i want display span tag after input tag. but displays before input tag. here attached css , html code. http://jsfiddle.net/sarurakz/8j3r13ec/ css: span{ float:right; margin-right:1%; } input { display: inline-block; float: right; margin-right:20%; } html : <p>password<input type="password" name="pass" id="pass" size=18 maxlength=50 required></p> <p>confirm password<input type="password" name="cpass" id="cpass" size=18 maxlength=50 required><span id='message'></span></p> validation: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script> <script> $('#pass, #cpass').on('keyup', function () { if ($('#pass').val() == $('#cpass').val()) { $('#message').html('<img src="image/tick.png" width=15px height=15/>

wordpress - Contact form 7 set minimum field value -

i want set minimum value in "amount" field. error message should lower minimum value. <p>amount:<br /> [text* amount]</p> <p>name :<br /> [text* your-name] </p> <p>email :<br /> [email* your-email] </p> <p>message :<br /> [textarea your-message] </p> <p>[submit "send"]</p> contact form 7 has number field . so, in case, like: [number* amount min:10 max:99 step:1 "40"]

apache - Call a java web service method from java client (HTTPPost) -

i want execute method define in java web service java client. using apache tomcat7 host web service locally. using httppost method think using wrong url. following code web service: public class service{ @post @path("/getstring") public string getstring(){ string str = "hello"; return str; } } following client code calling method: public class client{ public static void main(string[] args) throws exception{ defaulthttpclient httpclient = new defaulthttpclient(); httppost post = new httppost("http://localhost:8080/webservice/getstring"); post.setheadder("content-type", "application/xml"); httpresponse httpres = client.execute(post); httpentity entity = httpres.getentity(); system.out.println("http response:" + entityutils.tostring(entity)); } } the response of client 404 requested resource "webservice/getstring" not fou

select - SQL SUM restricted -

i have view pulling data number of tables. let's consider this: transpk amount currency_id ------------------------------- 1 2000 0 1 -2000 0 2 3600 1 2 -7200 2 . . . i want calculate sum(amount), per distinct transpk, currency_ids given transpk same. i.e. in data above there 1 result returned, since transpk=2 there 2 values currency_id. i have no idea search on this! i've tried "sql sum restricted", hits weren't useful. i'm not first person want this. able point me in right direction? try this: select transpk, sum(amount) tablea group transpk having count(distinct currency_id) = 1; check sql fiddle demo output | transpk | amount | |---------|--------| | 1 | 0 | | 3 | 3000 |

javascript - Multiple ajax request in sequence using recursive function and execute callback function after all requests completed -

i have list of names separated comma. want want call server request names in sequence , store result inside array. tried , it's working when have number of names there in string. see here - working when know number of names now want want make code generic. if add 1 name in string, should handle automatically without adding code ajax request. see here - i've tried. it's not working expected. shoppinglist = shoppinglist.split(","); var result = []; function fetchdata(shoppingitem) { var s1 = $.ajax('/items/'+shoppingitem); s1.then(function(res) { result.push(new item(res.label,res.price)); console.log("works fine"); }); if(shoppinglist.length == 0) { completecallback(result); } else { fetchdata(shoppinglist.splice(0,1)[0]); } } fetchdata(shoppinglist.splice(0,1)[0]); problem i not getting how detect promise object have been resolved can call callback function.

python 3.x - display text for a value in a list python3 -

well i've got 2 lists: deck=[2,2,2,2,3,3,3,3,4,4,4,4,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11] symbols=['\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663','\u2660', '\u2661', '\u2662', '\u2663'] and function def dealcard(deck,participant):#deal cards , chooses between player , house string z participant.append(deck.pop()) if z==1: print('\nyou got %s ' %("{} {}".format(player[len(player)-1],symbols.pop()))) else: print('\nhouse got %s ' %(&q

c# - How to get Exchange 2010 database size -

i'm trying smallest exchange database in exchange 2010 server using remote session. i connect exchange server , database properties. of them value, properties databasesize null value. did body able database size value? part of code below: static void main(string[] args) { string exchangepowershellrpsuri = "http://my.domain/powershell?serializationlevel=full"; pscredential credentials = (pscredential)null; //provides connection information needed connect remote runspace // prepare connection wsmanconnectioninfo conninfo = new wsmanconnectioninfo((new uri(exchangepowershellrpsuri)), "http://schemas.microsoft.com/powershell/microsoft.exchange", credentials); conninfo.authenticationmechanism = authenticationmechanism.kerberos; conninfo.skipcacheck = true; conninfo.skipcncheck = true; conninfo.skiprevocationcheck = true; // create runspace comma

jsf - ViewState lost after AJAX request -

i have strange error following code: <h:form id="myform"> <h:panelgroup id="mypanelgroup"> ... <h:commandbutton value="randomtext" action="#{mybean.action}" tabindex="301" <f:ajax execute=":mypanelgroup" render=":messages @form"/> </h:commandbutton> </h:panelgroup> ... </h:form> so problem after click on button form (myform) looses viewstate after render. strange in dev env working, on other server not. have made common mistake kind of execute/render pair settings or else cause such problem? wondering 2 servers have different mojarra version or that. the messages in render attribute id of panelgroup in other form. the container weblogic server jsf 2.1. any ideas? thanks! so found out common jsf issue can solved following library: http://showcase.omnifaces.org/scripts/fixview

regex - php regular expression string replace -

i have string json response script: "lorem ipsum dolor sit amet, consectetur adipiscing elit, http://unknown/string/in/unknown/place/ , sed eiusmod tempor incididunt ut labore et dolore magna aliqua" is there way replace empty string using regular expression , php preg_replace? i'm not familiar regular expression, provide example? need remove substring starting 'http' , finishing space, if possible. thanks something like preg_replace("/http\s+\s,/", "","lorem ipsum dolor sit amet, consectetur adipiscing elit, http://unknown/string/in/unknown/place/ , sed eiusmod tempor incididunt ut labore et dolore magna aliqua" ); will give output as lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua regex /http\s+\s,/ \s matches other space \s matches space regex demo edit a better solution like /http\s+(\s,|$)/ so link can apear anyw

mouse - Heuristic to filter out extra clicks sent by defective mice -

it's common issue mice develop defect of single clicks register 2 or more clicks ( reference1 , reference2 , reference 3 ). where work happens rarely, , if happen such mice destroyed extreme prejudice - don't have working sample @ hand. since work on trading application difference between 1 click (buy 1000 contracts) , 2 clicks (buy 2000 contracts) relatively important, wondering if has experience working heuristics reject false clicks log suspicious clicks , make user aware of possible issue i think question independent of os, i'm using windows 7 environment. we did find defective mouse (from renowned swiss brand). speed @ 2 click events logged 14 ms. we've found out human can make 2 clicks in 150ms. the heuristic use reject second click when faster 32 ms (32 ms = > 2 clock ticks), , alert user when faster 90 ms. we tested clicking many times fast can double clicking, , looked @ times between individual clicks. except 2 clicks more 100ms ap

SQL Server history tracking of a table with multiple same referencing column -

in database design, i'm tracking history triggers. first of all, have base table goods following columns: tablename: goods column1pk: goodid column2: articlecode column3: amount i want track operations made on goods, insert, delete or replace (not changed values of columns) . there can insert, update, delete or replacement of good. example, goodid 1 has reached it's lifetime , getting replaced goodid 2 . able capture information, can't see other option having second column in history table referencing same goodid table goods my history table be: tablename: goodshistory column1pk: goodhistoryid column2: changedby column3: datechanged column4: actiontype (like inserted, updated, replaced or deleted) column5fk: goodid (capture insert/update/'fake'-delete operation) column6fk: replacedbygoodid (capture `goodid` replaced `goodid`) see record-set example of history data: column1pk: | 1 | 2 | 3 | 4 column2: | user1

android - ClassCastException occur when screen orientation change (AbsSpinner) -

my custom activity has 2 spinners. wait view create done , try rotate device app crashed. have tried methods searched here, cannot fix problem. logcat 12-16 16:15:47.200: d/androidruntime(5332): shutting down vm 12-16 16:15:47.200: w/dalvikvm(5332): threadid=1: thread exiting uncaught exception (group=0x40154760) 12-16 16:15:47.260: e/androidruntime(5332): fatal exception: main 12-16 16:15:47.260: e/androidruntime(5332): java.lang.runtimeexception: unable start activity componentinfo{qt.r07/qt.r07.listview.fileselectactivity2}: java.lang.classcastexception: android.view.abssavedstate$1 cannot cast android.widget.absspinner$savedstate 12-16 16:15:47.260: e/androidruntime(5332): @ android.app.activitythread.performlaunchactivity(activitythread.java:1815) 12-16 16:15:47.260: e/androidruntime(5332): @ android.app.activitythread.handlelaunchactivity(activitythread.java:1831) 12-16 16:15:47.260: e/androidruntime(5332): @ android.app.activitythread.handlerelaunchactivity(a

ruby on rails - search columns in ajax_datatable_rails? -

class song < activerecord::base belongs_to :artist belongs_to :album end class album < activerecord::base has_many :songs end class artist < activerecord::base has_many :songs end and query in datatable class songs_datatable.rb class songdatatable < ajaxdatatablesrails::base def get_raw_records song.joins(:artist, :album).select("songs.id, songs.artist_id, songs.album_id, songs.name song_name, songs.location song_location, artists.name artist_name, albums.name album_name") end end what should name of searchable columns songs.name, artists.name, songs.location, albums.name. def searchable_columns @searchable_columns ||= [ 'songs.name', 'artists.name', 'songs.location', 'albums.name' ] end note: 1 can use database columns sort or search fields, aliases artist_name not work.

Google Tasks service object for a User who is already authenticated with oAuth2 (Grails/Java) -

i trying google tasks service object has authorised credentials in order can pull tasks user has registered , logged-in (oauth2) our web application via google apps marketplace. unfortunately receiving 401 - authorization - login required. can tell me going wrong? here code gettasksservice() method: def httptransport = new nethttptransport() def jsonfactory = new jacksonfactory(); def clientid = google_client_id def clientsecret = google_secret def applicationname = application_name def tokenresponse = (tokenresponse) googleappsnewoauthservice.getgoogleresponse() def credential = new googlecredential.builder() .setjsonfactory(jsonfactory) .settransport(httptransport) .setclientsecrets(clientid, clientsecret) .build() .setfromtokenresponse(tokenresponse) def service = new com.google.api.servi

ide - delphi - Creating custom frame with new event -

Image
i'm working on delphi xe2. what need: need myframe class frame without visible components, new event visible in object inspector. event inform form (on placed myframe object), f.e. datas on frame fullfilled. what have: based on this post , tondrej's answer, , that hint , ba shows, xe2 need replace delphivclide := getmodulehandle('delphivclide160.bpl'); with this: delphivclide := getmodulehandle('vcldesigner160.bpl'); i have code new frame: unit myframe; interface uses system.classes, vcl.forms; type tmyframe = class(tframe) private protected fonfilleddata : tnotifyevent; public published property onfilleddata : tnotifyevent read fonfilleddata write fonfilleddata; end; implementation end. and code registration unit: unit myframereg; interface procedure register; implementation uses windows, designintf, dialogs, wframe; procedure register; var delphivclide: thandle; tframemodule: tcustommoduleclass; begin delph

JQuery load content and the slide at the same time -

below js $('#maindiv').load('revolutionarycommunity.html', function() { alert('load performed.'); $('#maindiv').slidedown('slow'); }); here trying load html page , sliding it. maindiv have content when call function maindiv load revolutionarycommunity.html. but here whole maindiv sliding down loaded html content. need loading , sliding @ same time, how can this? if question right, following: $("#maindiv").slidedown("slow", function () { $(this).load('revolutionarycommunity.html', function() { alert('load performed.'); }); });

mysql - Separate Users Across 2 Tables? -

i'm building ruby on rails application, i'm separating 2 sets of users: buyers sellers currently built database both under users table with: t.string "user_type", default: "buyer", null: false there additional data need hold sellers , there few features/pages want sellers have access to, not buyers . for example want hold bank details can pay sellers paid buyers (we hold payments few days ensure safe transaction). additional data may be: account number sort code we not need store data buyers since use stripe payment. do include data on current users table? or create new sellers table linked users table? you can use 1 table , have differences in models. users, share many common features, e.g. authentication during sign_in, change password, etc. class user < activerecord::base ... end class buyer < user def buyer_specific_method_one ... end end class seller < user def seller_specific_method_o

java - Design Pattern - Single Object can only exist in single Event -

i'm looking suitable design pattern small game. a player can exist in single event but player can added(exist) in new event long old event terminated == true what design pattern suit scenario? current setup make sense? public class player { public int id; public player(int id) { this.id = id; } } public class event { public list<player> allplayer = new arraylist<player>(); public boolean terminated = false; public event(){} public void addplayer(player player){ allplayer.add(player); } } public class battle extends event { public battle(){} } public class training extends event { public training(){} } you can delegate event player , when event terminates , can use terminated flag determine if able associate player event. public class player { private event event; private int id; ... public void setevent(event event) throws exception {

cmd - Batch not Working (If) -

master.bat @echo off if !%~1! == !--instance! ( if !%~2! == !old! ( echo old instance set /p instanceid= enter instanceid: echo %instanceid% ) if !%~2! == !new! ( echo new instance ) ) else ( if !%~1! neq !--instance! ( echo bad command: unknown flag/switch %1 ) else ( if !%~2! neq !new! **( echo bad command: incorrect flag value %2 ) ) ) q1 : above piece of code works fine conditions except last 1 marked (**) readbility. not able comprehend why ? running following command master.bat --instance abc q2: wish change same (**) line check value 'old' (quotes clarity). how ? work if !%~2! neq !new! or !%~2! neq !old! ( echo bad command: incorrect flag value %2 ) answer q1 : recognized going wrong, control never reaching block (**). answer q2 : , making slight changes in c

android - callback method for soft keyboard changes? -

is there callback methods soft keyboard , down. want action when soft keyboard , down. know check whether keyboard or down. should call method somewhere. here don't want call it. should triggered automatically when there change in soft keyboard state. try code worked in project r.id.activityroot parentlayout id final view activityrootview = findviewbyid(r.id.activityroot); activityrootview.getviewtreeobserver().addongloballayoutlistener( new ongloballayoutlistener() { @override public void ongloballayout() { try { int heightdiff = activityrootview.getrootview() .getheight() - activityrootview.getheight(); if (heightdiff > 100) { // if more 100 pixels, //

json - Encoding an array for url in PHP -

i have been working on qr codes, need pass array qr data needs encoding. data json_array used generate pdf. if use base64 encoding qr code stupidly large, , when using ascii85 breaks qr. can let me know of encoding praticies work in url, shorted coding betetr. qr_generator.php?data={encoded_json_array} you can try this: urlencode($string); it encodes string appended url parameter. if have array, try: urlencode(json_encode($array);

gruntjs - grunt and javascript partial file -

in project have directory partials of javascript files. in directory have files like: _register.js, _user.js, _cart.js, _common.js , wanna make full files user.js must have _user.js, _common.js, _register.js product.js must have _user.js, _common.js, _cart.js and should compiled 2 directories dev/ , prod/ in dev must have normal javascript , in prod must have minified versions, how grunt?

django - Sending POST parameters from apiary -

i have created rest api using django. i'm making post request parameters user_id="5453ab249b0dbb3b76000009" user_type="instrcutor" in apiary blueprint , i'm sending these part of request body like: + request (application/json) + body { "user_id": "5453ab249b0dbb3b76000009", "user_type": "instructor" } but in django view , request.post coming like: {u'{\n "user_id": "5453ab249b0dbb3b76000009",\n "user_type": "instructor"\n}': [u'']} instead of {u'user_id': [u'5453ab249b0dbb3b76000009'], u'user_type': [u'instructor']} how can send post data correctly ? edit here solution: + request (application/x-www-form-urlencoded) user_id=5453ab249b0dbb3b76000009&user_type=instructor if apiary sending json (you wrote in b

html - Animate table cell with with text overflow -

i have table x number of cells , want them fit table width 100%, using overflow: hidden; on anchor? i not care if text gets cut of in default state. twist here on hover of cell, want expand show text, , in meanwhile of course compress other cells fits. see structure of today here http://jsfiddle.net/bjolja/1haurmyw/ i want fit window. ideas? update: i wrote cells, is, li-elements display: table-cell mimic functionality of table. have media queries requiring li when using smaller devices. behaviour of elements table cells.

computing the average of variables with missing values in Stata -

i know how calculate avarage of variables without missing value, not sure calculating missing values. example have 6 area halls follows: area_hall_1 area_hall_2 area_hall_3 area_hall_4 area_hall_5 area_hall_6 580 580 650 . . . 1000 1000 . . . 825 825 . . . . 912 912 . . . . 670 . . . . . 790 . . . . . 750 900 1000 1000 900 750 the reported (or rather implied) problem makes no sense whatsoever. consider data posted (an missing value needed in second observation). . clear . input area_hall_1 area_hall_2 area_hall_3 area_hall_4 area_hall_5 area_hall_6 area_ha~1 area_ha~2 area_ha~3 area_ha~4 area_ha~5 area_ha~6 1. 580 580 650 .

awk - Get IP From Mac Address With Nmap Command on Linux? -

given following nmap output, how can extract ip address matches particular mac address? nmap scan report 10.0.0.2 host (0.0011s latency). mac address: 00:02:cf:e2:52:4e (zygate communications) nmap scan report 10.0.0.9 host (0.015s latency). mac address: 1c:18:4a:08:88:48 (unknown) nmap scan report 10.0.0.35 host (0.019s latency). mac address: b8:b4:2e:f9:2b:b1 (unknown) nmap scan report 10.0.0.40 host (0.00036s latency). mac address: 00:25:11:2c:f6:9c (elitegroup computer system ) i pipeline this, doesn't work: nmap -sp 10.0.0.0-255 | grep 00:25:11 | awk '{print ip address}' this may help; nmap -sp....|awk -v mac="00:25:11" '/report for/{ip=$5}$0~mac{print ip}' you change mac="00:25:11" part different mac filtering. if test line on example, output: 10.0.0.40

java - struts2 2.3.20 ognl allowStaticMethodAccess -

i updated project struts2 version 2.3.20 . cases in jsps uses static method access not work. ie. <s:set var="linkescaped" value="@org.apache.commons.lang.stringescapeutils@escapehtml(#attr.myobject.link)" /> i have set in struts.properties -> struts.ognl.allowstaticmethodaccess=true and tried in struts.xml -> <constant name="struts.ognl.allowstaticmethodaccess" value="true"/> with no success. know has changed , need enable them again? update lukasz lenart commented: to clear, in context of 2.3.20 it's bug , temporally fixed, see issues.apache.org/jira/browse/ww-4429 2.5 access static methods dropped. --- allowing static method access never preferred way of doing things , in 2.3.20 won't work if struts.ognl.allowstaticmethodaccess set true . from wiki : accessing static methods in case still use static methods in expressions (setting struts.ognl.allowstaticmethodacc

Waiting for deleting cookies with webdriver? -

i have question deleting cookies using webdriver. should create additional code wait when deleting cookies finished or function me? driver.manage().cookies.deleteallcookies(); i meam test not go next steps until cookies deleted? in tests, driver.manage().deleteallcookies() non blocking. got issues cookies deleted in middle of test. so maybe want deleteallcookies() in teardown method, or need wait after call: driver.manage().deleteallcookies(); try { thread.sleep(5000); } catch (interruptedexception e) { e.printstacktrace(); }

java - Is Default Package included in the Package Level Access? -

i know how default package defined in java.i know how public , private access defined don't know whether there default package access defined in package level access in java. the code tried execute is: class { public static void value() { int a; a=5; } public static void main() { value(); } } class b { public void greet() { system.out.println("value of is"+a); } } the error got is: d:\downloads\pro>javac a.java a.java:17: error: cannot find symbol system.out.println("value of is"+a); ^ symbol: variable location: class b 1 error since both classes belong same default package shouldn't class b access class a's members(a)? i'm asking question because when compile java file containing 2 classes since no modifier given classes,java compiler give package level access default access modifier classes.since no package defined,java compil

spring - Error creating bean.Injection of autowired dependencies failed. Could not autowire -

hello i´m newbie in spring mvc, i´m using @autowired don´t know solution. thx you. sorry english, i´m learning it. have 2 class empresa.java , ldiario.java. empresa.java works. update updated following code have same error. app-config.xml <!-- hibernate session factory --> <bean id="mysessionfactory" class="org.springframework.orm.hibernate4.localsessionfactorybean"> <property name="datasource" ref="mydatasource"/> <property name="packagestoscan" value="com.atorresbr.springapp.**"/> and added bean. <bean id="diariobean" class="com.atorresbr.springapp.bean.diariobean"/> error org.springframework.beans.factory.beancreationexception: error creating bean name 'diariobean': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private com.atorresbr.springapp.model.

javascript - How do I add a pause function to this pageChange timer? -

below in code array of pages shuffled , each of them displayed in iframe amount of time. want able start/stop pagechange function using button or mouse click. can me this? below working code, or check fiddle: http://jsfiddle.net/xaa1qccm/ (thanks nobe4) var pages=[]; pages[0]="http://example.com/"; pages[1]="http://www.iana.org/domains/reserved"; pages[2]="http://en.wikipedia.org/wiki/main_page"; pages[3]="http://en.wikipedia.org/wiki/randomness"; var shuffle = function(array){ var shuffledpages = []; while(array.length){ shuffledpages.push(array.splice(math.floor(array.length*math.random()),1)); } return shuffledpages; } var time = 3300; var currentindex = 0; function pagechange() { if(currentindex == 0){ pages = shuffle(pages); console.log(pages); currentindex = pages.length; } currentindex--; document.getelementbyid("frame").src=pages[currentinde

How to read column a1 from an Excel sheet and perform string matching to define variables in a Java program -

i need read 1 fixed column of excel sheet , column need find out variables , load them java program. for example need read column a1 contains following data: "what /@v1@/% of /@v2@/?" /@v1@/ , /@v2@/ variables. java program needs detect these variables , insert random values them. have done following: import java.io.fileinputstream; import java.util.arraylist; import java.util.list; import org.apache.poi.hssf.usermodel.hssfsheet; import org.apache.poi.hssf.usermodel.hssfworkbook; import org.apache.poi.poifs.filesystem.poifsfilesystem; import org.apache.poi.ss.usermodel.cell; import org.apache.poi.ss.usermodel.row; public class acgs { public static void main(string[] args) throws exception { //test file located in project path fileinputstream filein = new fileinputstream("c://users/admin/desktop/content.xls"); //read file poifsfilesystem fs = new poifsfilesystem(filein); hssfworkbook filename = new hssfworkbook(fs); //open sheet 0 first she

java - Get current user location -

i'm trying current user location on devices works, on im stuck waiting location. here code: private final locationlistener mlocationlistener = new locationlistener() { @override public void onlocationchanged(final location location) { // todo log.v("--", "get address 121"); main.this.location = location; getaddress(); locationmanager.removeupdates(mlocationlistener); } @override public void onstatuschanged(string provider, int status, bundle extras) { // todo auto-generated method stub } @override public void onproviderenabled(string provider) { // todo auto-generated method stub log.v("--", "provider enabled"); } @override public void onproviderdisabled(string provider) { // todo auto-generated method stub log.v("--"

using loop to create a new list from previous list in r -

i executing function (computemodules{bipartite}) yields different results every time run. want iterate execution 100 times. function's output consists of list several slots. have extract matrix 1 of these slots (@modules) , subset obtain rows i'm interested in. later using these rows select positions of vector. in end, want obtain 100 lists many sublists rows subsetted in each iteration. simulated @modules: n1 <- structure(c(1, 1, 1, 2, 2, 2, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, 5, 0, 6, 0, 0, 0, 0, 6, 0, 7, 0, 0, 0, 0, 7, 0, 8, 0, 0, 0, 0, 8, 0, 9, 0, 0, 9, 0, 0, 0, 10, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 12, 0, 0, 12, 0, 0, 0, 0, 13, 0, 0, 0, 0, 13, 14, 0, 0, 14, 0, 0, 0, 0, 15, 0, 0, 0, 0, 15, 16, 0, 0, 16, 0, 0, 0, 17, 0, 0, 17, 0, 0, 0, 0, 18, 0, 0, 0, 0, 18, 0, 19, 0, 0, 0, 0, 19, 20, 0, 0, 20, 0, 0, 0, 0, 21, 0, 0, 21, 0, 0, 0, 22, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0,