Posts

Showing posts from July, 2014

OpenCL - Are work-group axes exchangeable? -

i trying find best work-group size problem , figured out couldn't justify myself. these results : globalworksize {6400 6400 1}, workgroupsize {64 4 1}, time(milliseconds) = 44.18 globalworksize {6400 6400 1}, workgroupsize {4 64 1}, time(milliseconds) = 24.39 swapping axes caused twice faster execution. why !? by way, using amd gpu. thanks :-) edit : kernel (a simple matrix transposition): __kernel void transpose(__global float *input, __global float *output, const int size){ int = get_global_id(0); int j = get_global_id(1); output[i*size + j] = input[j*size + i]; } i agree @thomas, depends on kernel. probably, in second case access memory in coalescent way and/or make full use of memory transaction. coalescence : when threads need access elements in memory hardware tries access these elements in less possible transactions i.e. if thread 0 , thread 1 have access contiguous elements there 1 transaction. full use of memory transaction : ...

java - Android - Confuse on put source code -

i'm newbie on android. know method oncreate methods in android. i'm freshly learn android in day. search word 'part z' !! , search word 'end of part z'. public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { //part z string consumerkey = "yii"; string consumersecret = "yii"; string accesstoken = "yii"; string accesstokensecret = "yii"; //instantiate re-usable , thread-safe factory twitterfactory twitterfactory = new twitterfactory(); //instantiate new twitter instance twitter twitter = twitterfactory.getinstance(); //setup oauth consumer credentials twitter.setoauthconsumer(consumerkey, consumersecret); //setup oauth access token twitter.setoauthaccesstoken(new accesstoken(accesstoken, accesstokensecret)); try { user user = twitter.verifycredentials(); list<status> statuses ...

php - Trouble Accessing Facebook Friends without Login -

i'm trying understand how airbnb able access facebook friend lists without active facebook logged in session. see in action follow link: https://www.airbnb.com/s/austin?neighborhoods[]=barton+hills once there, select listing , midway down page find "friends" tab. assuming property owner has facebook friends, should see friend photos , when hover on them, message "xxxxxxxx facebook friend of xxxxxxx". "xxxxxxx" replaced friend's name , property owner's name. i've googled , yahood answer , found on stackoverflow: accessing friend list in facebook and this: facebook php sdk: people in network , friends of friends neither of solution see on airbnb website. thoughts airbnb has kind of special permission facebook data or when property owners login using personal facebook info, airbnb grabs friend data , stores locally on systems. might update every often. so, long story short, how 1 friend information on public website faceboo...

html - Using .ogg file while with <video> on html5 -

i trying learn web development w3schools.com studying html5 , had question on code not understand. if great! :) in below code, function of code code seem run in same way if delete code. here link found code: <!doctype html> <html> <body> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> browser not support video tag. </video> </body> </html> thanks in advance! :) try using 3rd party html5 video player library, e.g. videojs better support of different formats, browsers, providing flash player fallback.

android - Click images of carousel view -

i created app. displaying images in carousel view. want click images of carousel view & go web site. how it. load images following way carousel view.] public class lazyadapter extends baseadapter { private activity activity; private string[] data; private static layoutinflater inflater=null; string dirurl[]; public imageloader imageloader; public viewgroup carousel; horizontalcarousellayout carousel_layout_event; int widthscreen,heightscreen; public lazyadapter(activity a, string[] d) { activity = a; data=d; inflater = (layoutinflater)activity.getsystemservice(context.layout_inflater_service); imageloader=new imageloader(activity.getapplicationcontext()); } public int getcount() { return data.length; } public object getitem(int position) { return position; } public long getitemid(int position) { return position; } public void getdimensionscreen(...

notepad++ - Regex pattern repetition and capturing -

i had translate propkeys.h (in c[++]?) in c#. my goal come from: define_propertykey(pkey_audio_channelcount, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 7); to: public static propertykey audio_channelcount = new propertykey(new guid("{64440490-4c8b-11d1-8b70-080036b11a03}")); i using notepad++ regex, i'm open other scriptable solution (perl, sed...). please no compiled language (as c#, java...). i ended (working): // turns guid string // find (line breaks inserted convenience): 0x([[:xdigit:]]{8}),\s*0x([[:xdigit:]]{4}),\s*0x([[:xdigit:]] {4}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]] {2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]] {2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]]{2}) // replace with: new guid\("{$1-$2-$3-$4$5-$6$7$8$9$10$11}"\) // final pass // find what: ^define_propertykey\(pkey_(\w+),\s*(new guid\("\{[[:xdigit:]|\-]+"\)),\s*\d+\);$ // repl...

http post - HttpPOST in android -

hi can enlighten me one. i'm stock in it. trying post reportcode web api, didn't receive error when check site see if there reportcode post, haven't seen it. don't know if doing right thing in httppost. here code: public class dopost extends asynctask<string, void, boolean> { exception exception = null; private progressdialog progressdialog; context mcontext = null; bufferedreader in; private string _code; public dopost(context context, string code) { // todo auto-generated constructor stub mcontext = context; this._code = code; } protected void onpreexecute() { progressdialog = new progressdialog(mcontext); progressdialog.setmessage("uploading...."); progressdialog.show(); progressdialog.setcancelable(false); } @override protected boolean doinbackground(string... arg0) { try{ httpparams httpparameters = new basichttpparams(); httpconnectionparams.setco...

java - javax authenticator refer to same email address -

here code use create session send email: props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable","true"); props.put("mail.smtp.enablessl.enable","true"); logger.trace("1. emailfromaddress: " + emailfromaddress); session = session.getdefaultinstance(props,new javax.mail.authenticator() { protected passwordauthentication getpasswordauthentication() { logger.trace("2. emailfromaddress + " pass: " + password); return new passwordauthentication(emailfromaddress, password); } }); then try input emailfromaddress = "abc@yahoo.com" , password. can authenticate address , send email successfully, , 1. emailfromaddress: abc@yahoo.com 2. emailfromaddress: abc@yahoo.com pass: ***** i try send different emailfromaddress = "xyz@gmail.com" --> time failed send , log printout as: 1. emailfromaddress: xyz@gmail.com --> correct 2. emailfromaddre...

Android activity class not found exception -

i know trun out stupid question, please don't throw me off looking @ title. weirdest thing happening me once try start mapactivity extended class android application. i know there lots of questoins on this, did research of them focused on checking names correspond, none of them have worked me. even though updated manifest class there classnotfound exception... let me know doing wrong please. android manifest: <activity android:name="ro.gebs.captoom.activities.locationactivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> locationactivity class: package ro.gebs.captoom.activities; import android.os.bundle; import com.example.captoom.r; import com.google.android.maps.mapactivity; imp...

Get last 10 photos from iPhone using AssetLibrary, Corelocation deprecation issue on ios 6.1.3 -

app tries access photos phone library. works on ipod (5.1.something) iphone5 (6.1.4), simulators, crashes on iphone 4s(6.1.3). all checks (location services, photo library access) there w.r.t ios version. console log: : libmobilegestalt copysystemversiondictionaryvalue: not lookup releasetype system version dictionary jul 31 12:03:00 abc's-iphone awdd[296] : corelocation: clclient deprecated. obsolete soon. btw below code fetches last 10 photos photo library. if exist. before calling method check location made using [cllocationmanager authorizationstatus]. - (void) getrecentphotos { if(! onetimefetch) // prevent location delegate calling method. { onetimefetch = true; nslog(@"getrecentphotos"); recenpicscroll.userinteractionenabled = false; [self.recentpicsarr removeallobjects]; if ([[[uidevice currentdevice] systemversion] doublevalue] >= 6.0) { nslog(@"ios version 6.0 , above, ...

properties - Is property a container and accessor in C#? -

i have property in class: public string { set { = value; } } it gives me error whenever try assign value a. actually, iis express stops , gives no clue. i have feeling creates endless assignment of value a, it's recursion. questions: what happening in code? is property accessor (getter/setter) , not container when specify implementation? when using auto-implemented property, property both container , accessor? you'll have stackoverflow exception, since you're assigning property in setter, results in endless assignment.

Can we write unit test for AngularJS routeProvider? -

hi building app using angularjs , stuck @ unit test section. know how write unit testing controllers , don't know how routeprovider. using jasmine writing unit test. my route provider this; var app = angular.module('myapp', ['ngresource']) app.config(function ($routeprovider) { $routeprovider .when('/', { templateurl: 'app/views/main.html', controller: 'mainctrl' }) .when('/home/:partyid', { templateurl: 'app/views/home.html', controller: 'homectrl' }) .when('/edit/:partyid', { templateurl: 'app/views/update_profile.html', controller: 'editctrl' }) .when('/route', { templateurl: 'app/views/route.html', controller: 'routectrl' }) .when('/signup', { ...

Plotting Lines in Excel -

i have data in following format: variable - value 1 b 2 3 b 4 and on. notice how variable recurring different values. want draw line each variable shows different values assuming x-axis time. please help. i start off creating pivot table based on data have , create line graph there.

asp.net mvc - VAB of Enterprise Library 6.0 Client Side validation(Jquery/Javascript) -

can perform client side validation(jquery/javascript) using vab of enterprise library 6.0 mvc 4.0 note dont want use dataanotation . we have gone thorugh many links links showed dataannotations client validation. it possible, says this link, have been unable past problems multiple validators being adding page same name.

Overriding navbar styles in less file of bootstrap -

i customize bootstrap styles using less files. here want override navbar styles. doing... (in custom-bootstrap.less file) @import "../bootstrap/less/bootstrap.less"; @import "../bootstrap/less/responsive.less"; @import "custom-variables.less"; .navbar{ .navbar-inner{ background:none; background-color: @navbgcolor; border-bottom: darken(@navbgcolor, 15%); } } i have tried different styles in .navbar-inner nothing happening there. what's wrong code?

javascript - Uncaught TypeError: Illegal invocation (chrome) -

Image
i'm trying call function in javascript when user clicks button ( onclick="website.submit()" ), code doesn't work. i getting error in chrome: uncaught typeerror: illegal invocation in chrome, line highligted in jquery.js source of error: // if value function, invoke , return value value = jquery.isfunction( value ) ? value() : ( value == null ? "" : value ); more detailed error on developer panel's console tab (f12): here code: var website = { submit: function () { var stap1 = $('#stap1').val(); var stap2 = $('#stap2').val(); var stap3 = $('#stap3').val(); var letop = $('#letop').val(); if (stap1.length == 0) { $('#error2').show(); $('#the_error2').html('je moet alle velden invullen om door te gaan.'); $('#stap1').css({ 'border-width': '1px', 'border-color': 'red' }); ...

scala - Creating Lift nested Submenus in different div -

i'm trying build nested menu structure, submenus should appear in different element on page. grouping , hiding submenus make them appear always, not after activating parent menu. menu.i("startseite") / "index" >> hidden >> locgroup("servicenav"), menu.i("impressum") / "about"/"index" >> hidden >> locgroup("servicenav"), menu.i("menu_1") / "100_menu1" submenus( menu.i("menu_1a") / "100_menu1a" >> hidden >> locgroup("sidenavbar"), menu.i("menu_1b") / "200_menu1b" >> hidden >> locgroup("sidenavbar"), menu.i("menu_1c") / "300_menu1c" >> hidden >> locgroup("sidenavbar") ), menu.i("menu_2") / "400_menu2" submenus( menu.i("menu_2a") / "400_menu2a" >> ...

javascript - making a data application that will store data on each day on the calendar -

i having bit of problem, sure question has been asked cant figure way google or find here. i building web app angular , node. my task every day (date) have own data , users able change data in next 3 days. admin offcurse able whatever wants. my real question is: how going save calander in db. web app used years how going insert dates db. how can handle situation in client side. want admin able choose let date 4 months today , able change things. should here, , how going insert dates inside db. thanks. what type of database should first question: sql, nosql, custom, other? next, decide how client , server communicate: ajax, websocket, rest ect.. then establish authentication. then work out way client alter database, establish rules, or design in limited way. then worry calculating dates , such... you can go low storage cost method generating record when date altered away default. way need seek database until find record(by matching date field). can made ...

jquery - closest() function is not working, why? -

html: <div class="slider"> <div class="button-wrap"> <div class="content-wrap" id="button-1">one contents</div> <div class="controller"> <div><a mce_href="#buttton-1" href="#buttton-1">button 1 </a> </div> </div> </div> </div> jquery: $('#button-1').closest('.slider').css({'left':'-1200px'}); this not working. i have script far <script> jquery(function($){ $('#button-1').closest('.slider').css({'background':'#f00 !important'}); $('#button-2').closest('.slider').css({'left':'-1200px !important'}); } </script> the .slider element needs have position absolute or relative positioned using left property. add following css: .slider{ positi...

computer vision - When is the gradient direction of an image more useful than the magnitude? -

are there real-world problems or situations directional gradients of image gx , gy more useful magnitude sqrt(gx^2 + gy^2)? intuition, if required, please see matlab image gradient the gradient information guaranteed perpendicular image (and more grey levels) contours. thus, related geometry of objects in image, not "color". such, information independent actual luminance value of pixel, depends on relative distribution. coined contrast-change-invariant measure . contrast changes occur in real world applications. take example video surveillance system: during day, sun move on horizon, clouds can fly by, causing light intensity change. system detects gradient orientation changes instead of pixel value of gradient magnitude changes more robust these illumination changes. more generally, gradient direction, unlike magnitude, closely related vast field of image morphology useful in shape recognition context.

java.lang.RuntimeException: Unable to create application and at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4254) -

i new android , java. tried check code against example somehow application keeps forced close while example works well. need please! in advance! changed name string instead of int. don't know if did correct historyactivity arrayadapter logcat: 07-31 17:26:56.485: e/arrayadapter(20248): must supply resource id textview 07-31 17:26:56.490: d/androidruntime(20248): shutting down vm 07-31 17:26:56.490: w/dalvikvm(20248): threadid=1: thread exiting uncaught exception (group=0x40fdb2a0) 07-31 17:26:56.505: e/androidruntime(20248): fatal exception: main 07-31 17:26:56.505: e/androidruntime(20248): java.lang.illegalstateexception: arrayadapter requires resource id textview 07-31 17:26:56.505: e/androidruntime(20248): @ android.widget.arrayadapter.createviewfromresource(arrayadapter.java:386) 07-31 17:26:56.505: e/androidruntime(20248): @ android.widget.arrayadapter.getview(arrayadapter.java:362) 07-31 17:26:56.505: e/androidruntime(20248): @ android.widget.abslistview.obta...

mysql - Using reserved words in queries that can run on different database servers -

i have used backticks (`) in select queries escape fields such 'first-name'. work on mysql. these queries run through dbo class in php application , application able use other database servers, such mssql , posgres. what best approach allowing problematic field names used across of these database servers? thinking of taking fields array , quoting them escaping character appropriate each. [edit] clarify: building tool used map configurations stored within php application fields of external database. wanted escape these precaution because have no idea field names mapped , used within queries. the cross-dbms mechanism (as defined in sql-92 , other standards) using double-quoted delimited identifiers. according this reference it's supported. it's worth nothing mysql allows enable/disable syntax still need ensure session settings correct before issuing query.

security - Is the anti-forgery token for logout necessary? -

for site pages, after being logged in few minutes, following error when attempt log out: the anti-forgery cookie token , form field token not match. i read in this link ways track exception down, since exception appears on logout, wonder if might easier exclude anti-forgery-token logout form altogether. idea? i using template login page auto-generated new mvc projects. thanks! it advisable add token logout form, otherwise can create page posts logout page, logging out users, annoying.

html - Table header is unexpextedly shifted in firefox on monitors with big resolution -

Image
i have encountered problem table headers in firefox, appeard me when viewing on monitors big resolution (i.e. 1920x1080); table header shifted 1 pixel. i trying achieve following: internal borders - 1 pixel, external - 2px, header should have different color. i've removed redundant code, left 2 div blocks due necessity. problem disappeared in other browsers, in other resolutions, when resize browser window. reproduces on anther computer (mac). <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> html, body { height: 100%; } table.border { border-collapse: collapse; } table.border td { background-color: #ffffff; border: 1px #cccccc solid; } table.border...

asp.net - what are the alternatives of SESSION VARIABLES? -

this question has answer here: asp.net masters: advantages / disadvantages of using session variables? 8 answers what limitations of session variable in developing large web application. best alternatives of session variables . please provide me alternatives of session variables to understand advantages of not using sessions, have understand how sessions work. in default setup, sessions identified cookie set in user's browser , the session data stored in-memory on webserver when user sends request server, session cookie sent along. contains identifier server uses locate particular user's session data. you can configure asp.net to use query parameters instead of cookies store session identifier store session data in database (having central data store session data particularly important if have multiple servers serving site) now ...

java - Encrypting @Lob byte[] column type with jasypt -

i'm trying encrypt byte[] field jasypt. my code before encryption @entity public class contentfile { ... @column(name = "filecontent") @lob private byte[] filecontent; ... } normally gets mapped in db blob in oracle , h2 use. after adding encryption have this @typedef(name = typedefname.encrypted_byte_array, typeclass = encryptedbinarytype.class, parameters = { @parameter(name = typedefparamname.encryptor_registered_name, value = encryptorregisteredname.hibernate_binary_encryptor) }) @entity public class contentfile { ... @type(type = typedefname.encrypted_byte_array) @column(name = "filecontent") @lob private byte[] filecontent; ... } but generated schema different - raw(255) in oracle , binary(255) in h2, , of course produces errors since byte array bigger. looks @lob ignored when @type put, there way tell jasypt/hibernate byte[] should in fact blob?

php - Issue using CJuiDatePicker with different formats -

i using cjuidatepicker in form , need use 2 different formats: mm/dd/yy shown , dd/mm/yy sent in $_post . $questionario->widget('zii.widgets.jui.cjuidatepicker', array( 'model' => $modelodoquestionario, 'attribute' => 'data_preenchimento', 'language' => 'en', 'options' => array( 'showanim' => 'fold', 'showbuttonpanel' => true, 'showon' => 'both', 'dateformat' => 'dd/mm/yy', 'altfield' => '#questionarios_data_preenchimento', 'altformat' => 'mm/dd/yy', ), 'htmloptions' => array( 'style' => 'height:14px;' ), )); this field in html: <input style="height:14px;" id="questionarios_data_preenchimento" name="questionarios[data_preenchimento]" type="text...

node.js subscriber client for rabbitmq (implements topics (ExcahangeName)) -

i trying write node.js client(subscriber module) consume messages rabbitmq(amqp). trying implement topics (exchangename) in rabbitmq. i trying use either (easy-amqp) or postwait task. i have written publisher method in java , want write subscriber method in javascript( node.js). my java program works fine able send out messages rabbitmq. i think have messed subscriber method. when run subscriber method doesn't give me error , doesn't print messages console. my java method like //publisher (written in java) connection connection = null; channel channel = null; string routingkey =null; connectionfactory factory = new connectionfactory(); factory.sethost("localhost"); connection = factory.newconnection(); channel = connection.createchannel(); //publishing exchange_name topic channel.exchangedeclare(exchange_name, "topic"); //set routing key routingkey = "anonymous.info" ; channel.basicpublish(exchange_name, routingkey, null...

ios - Autolayout with overlapping views -

i've 2 views (text/image) 1 covers total width of screen, other 1 image sits in lower right corner of text view. not able write layout constraints have both view right , bottom aligned each other. here tried accomplish statusa1 incorrect. nsarray *horizontala = [nslayoutconstraint constraintswithvisualformat:@"h:|[answera]|" options:0 metrics:nil views:viewsdict]; nsarray *statusa1 = [nslayoutconstraint constraintswithvisualformat:@"[answera][statusa]" options:nslayoutformatalignallbottom | nslayoutformatalignallright metrics:0 views:viewsdict]; set vertical spacing between 2 , remove bottom contraints on both subviews.

javascript - jQuery appendTo list style -

i'm kinda new jquery/html5 stuff, i'm running problems. hope can help. i'm loading local json file , want add items of list. works fine. but, list not using jquery styling? i tried without loading json file , instead put data directly in code , worked. might problem? here code not style correct: <!doctype html> <html> <head> <meta charset="utf-8"> <title>tubs energie app</title> <link href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.css" rel="stylesheet"/> <link href="http://code.jquery.com/mobile/1.3.0/jquery.mobile.structure-1.3.0.min.css" rel="stylesheet"/> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script> </head> <body> <div id="taskspage" data-rol...

Magento URL translation "bug"? -

we have sitemap.xml urls , google analytics started throw errors this not available, not found, etc... we have english , croatian store. when try open (while on croatian store) example url 404 page. switch english store: works fine. anyone having idea do? ps. client don't want store code in url after long talk client: urls must stay way are. no suffixes no prefixes, no subdomains, etc. checked other magento projects none of them have same behavior. :s of plugins causing this. i came simple solution didn't work. basicly idea check request via $_server, check url , determinate store load inside of index.php mage::run($storeid); but nothing happend... same problem again. here piece of code don't (it works stupid).: $link=mysql_connect("localhost","username","password"); mysql_select_db("database",$link); $path= substr($_server['request_uri'],1) ;// remove starting slash $sql = "select sto...

java - why my format always alerts error,when I use simpledateFormate -

the date string is: "wed jul 31 14:15:52 +0800 2013" ,my format string is: "e lll d hh:mm:ss zzz yyyy" ,but alert errors @ background. java.text.parseexception: unparseable date: "wed jul 31 18:14:47 +0800 2013" (at offset 0) can tell me fault in format string? the correct format "e mmm dd hh:mm:ss zzz yyyy" . there illegal character in format l edit: as per @reimeus's comment, android supports l in format uses version of simpledateformat . l should have been lll ?

c# - Changing the scheme of System.Uri -

i'm looking canonical way of changing scheme of given system.uri instance system.uribuilder without crappy string manipulations , magic constants. have var uri = new uri("http://localhost/hello") and need change ' https '. issue in limited uribuilder ctors , uri.port defaulting 80 (should change 443? hardcoding?). code must respect uri properties such possible basic auth credentials, query string, etc. ended one: var uribuilder = new uribuilder(requesturl) { scheme = uri.urischemehttps, port = -1 // default port scheme };

javascript - How to populate two text fields from one select drop-down -

i have following html produced cakephp's form helper. in interface, user selecting 2 dates used in resulting php pull data mysql. have provided user "financial months", defined in mysql shortcut pre-populate 2 date fields. however, have absolutely no idea how achieve jquery/javascript knowledge limited. what want do: when user selects select box, value of option before _ pulled in date1, , value of option after _ pulled in date 2. is possible? edit: here code in cakephp produces form: <script type="text/javascript" src="/js/revenuelines.js"></script> <h1>lock revenue</h1> <div class="inner"> <p>select 2 dates lock revenue specified period.</p> <?php echo $this->form->create('lock'); ?> <span>between</span> <?php echo $this->form->input('revenueline.date1', array('div' => false, 'class' =...

sql - How to store multiple values from select subquery -

hi having problem in following query: update tbl set somecol = somecol key = (select key tbl group key having count(*) > 1) , time = (select max(time) tbl) above query works fine when there 1 key. if there more 1 keys query doesn't work. how store multiple values select subquery? time column can multiple. new sql. please guide. in advance. use in predicate: update tbl set somecol = somecol key in (select key tbl group key having count(*) > 1) , time = (select max(time) tbl)

Android "wrong password or username " message box display error -

i working on activity has username , password. used alertdialog.builder in else part show message of "wrong password or username". not connecting database test purpose using strings password , username compare values of edittext fields with, in if condition , if match takes user new screen name "newmenu" . problem when login activity starts (the app runs), shows first of message, else part, want show message after submit button has been clicked , the password or username wrong. here code public class login extends activity{ private string pass=new string(); private string nam=new string(); private button log; private view textreg; private edittext text1; private edittext text2; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.login); textreg=(textview) findviewbyid(r.id.textregister); log=(button) findviewbyid(r.id.btn...

Having issues autowiring a sessionfactory bean with spring mvc and hibernate -

i trying implement auto-wiring project, seems application isn't seeing sessionfactory definition in application-context.xml when running it. i'm missing obvious, though i've tried several solutions posts having similar issues no success. i using spring mvc , hibernate. here application-context.xml. <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop ...