Posts

Showing posts from January, 2010

Why does my app force close on moving from one fragment to another on a ImageView click in Android? -

i trying move mycontacts extends fragment tasks extends fragment on clicking imageview . imageview in listview generated using simpleadapter .the ids of layouts follows: r.id.tasky tasks fragment, r.id.mycontacts mycontacts fragment. codes , error logs follows. new fragments kindly explain me step step. mycontacts extends fragment purple.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub android.app.fragmenttransaction t = getactivity().getfragmentmanager().begintransaction(); fragment fragment = new tasks(); fragmentmanager fragmentmanager = getactivity().getsupportfragmentmanager(); fragmenttransaction fragmenttransaction = fragmentmanager.begintransaction(); fragmenttransaction.replace(r.id.tasky, fragment); fragmenttransaction.addtobackstack(null); fragmenttransaction.commit(); } }); error logs: 04-22 04:41:52.486: e/fragmentmanager(3250):

Creating two separate websocket connections for send and receive on localhost -

i new websockets. it expected send data(any data) on send websocket connection using port(ex:8000) , localhost should echo same data browser using different websocket connection through different port(ex:9000). i understand websocket supports full duplex communication on single connection,but above design implement. question 1) above design possible? question 2) if yes,how create 2 websocket connections(one send , 1 receive) single localhost websocket server? 1) yes. 2) creating 2 separated websockets. different objects though. you blend both objects in composite object this: var compositewebsocket = function(urlsend, urlreceive){ var me = {}; var wssend = new websocket(urlsend); var wsreceive = new websocket(urlreceive); var open = 0; wssend.onopen = opening; wsreceive.onopen = opening; var opening = function(){ if(open == 2){ if(me.onopen) me.onopen(); } else open++;

Qt License in next versions -

can lgpl license in newest version of qt changed? ofcourse new versions can have diffrent license, , can released without lgpl license. how released qt? can license changed? i'm not talking qt, generally. of course license can changed @ time, doesn't affect code have, unless license had under explicitly time-limited allow such changes. suppose i'm author of bobulator project. i've released version 1.0 under bsd license. you've downloaded , using in own project. sometime later decide not offer project under open source license. take source down website , that's last hears it. except have downloaded , have it, , can use subject terms of license code released under. include, example, internet archive :) case in point: vivacore library now , then . it's based on prof. chiba's opencxx . oops. internet remembers :) of course library's provenance wasn't meant secret . i'm not lawyer.

c# - How to convert linq expression to dictionary<string,string> -

can me, how convert linq expression dictionary? following code throwing me argumentexception: item same key has been added. idictionary<string, string> listallcourseswithareaasdictionary = new dictionary<string, string>(); var dictionary = (from b in booklistrecord select new { b.coursecode, b.area }).distinct(); listallcourseswithareaasdictionary = dictionary.asenumerable().todictionary(x => x.coursecode, x => x.area); return listallcourseswithareaasdictionary; when try this: listallcourseswithareaasdictionary = dictionary.asenumerable().todictionary(x => x.coursecode); i error: cannot implicitly convert type 'system.collections.generic.dictionary' 'system.collections.generic.idictionary'. explicit conversion exists (are missing cast?) agreed aharon, you're looking grouping operator: var dictionary = booklistrecord .groupby(g => g.coursecode)

Laravel 4 pagination - Can't get past page 1 -

i have created of search feature, user can choose type, pool, date , time. can't seem make paginator work, when click on page 2 results disappear. i have tried append $query->links() function, none of tries have yet succeeded. the url looks this: http://localhost:8080/nih/public/bassengweb/data?time_maling=1&pool_id=1&fradato=14%2f04%2f2014&tildato=22%2f04%2f2014&fratid=00%3a01&tiltid=23%3a59 the code view file: @extends('default') @section('content') <h1>admin sØk</h1> {{ form::open(array('url' => 'bassengweb/data', 'method' => 'get')) }} <table> <tr> <td>{{ form::label('time_maling', 'timemåling') }}</td> <td>{{ form::checkbox('time_maling', 1) }}</td> <td>{{ form::label('3_time_maling', '3. timemåling') }}</td> <td>{{

jquery - Load Partial view in ajax call -

i new mvc . started creating 1 project , faced 1 big problem. pls me this. explanation: have view 1 actionlink , loading 1 partial view @model list<muthutag.models.loadpostmodel> @{ viewbag.title = "loadpost"; } @html.actionlink("add new post","post","home") <h2>loadpost</h2> <div> <table> @foreach (var item in model) { <tr> <td> @item.tagid </td> <td> @item.tagtitle </td> <td>@item.tagcontent</td> </tr> } </table> </div> in u can click add new post action link ill load view controller code public actionresult post() { return view(); } it ill load view @model muthutag.models.loadpostmodel @{ viewbag.title = "add new post"; } <script src="~/content/jqu

PHP Protected access to pages within set sessions -

<?php ob_start(); session_start(); include 'connection.php'; $username = $_session['user']; ?> <!doctype html> <html lang="en"> <head> <title>home page</title> <meta charset="utf-8" /> <link href="../css/my_design.css" media="screen" rel="stylesheet" type="text/css" /> <link href="../css/homepage.css" media="screen" rel="stylesheet" type="text/css"/> <link href="../css/bootstrap.css" media="screen" rel="stylesheet" type="text/css"/> </head> <div id="wrapper"> <body> <!-- header row --> <div class="grid10 first"> <?php include 'header.php'; ?> </div> <!-- 2 column row - content , navigation columns -->

FIPY axisymmetric 2D with GMSH -

i'll have approach problem involving plasma chemistry in reactor. useful describe problem in 2d axi-symmetric configuration. i'd use fipy, since solve electromagnetic fields getdp (which uses gmsh mesher), i'd know if fipy can handle 2dgmsh meshes , set 2d axi-symmetric domain, before it. i'm not able find information in user manual. thanks fipy's default no-flux boundary conditions represent mirror symmetry @ boundaries. if want rotational symmetry, require adaptation along lines of cylindricalgrid2d classes. wouldn't hard, need additional code adjust face areas , cell volumes. see http://matforge.org/fipy/browser/fipy/fipy/meshes/cylindricaluniformgrid2d.py , related modules.

ruby on rails 4 - RailsObservers - NameError - undefined local variable or method comment for CommentObserver -

rails 4.0.2 i using rails observer send mail when creates comment. observer- class commentobserver < activerecord::observer include users::adminshelper def after_create(comment) commenter = get_user(comment.user_id) receiver = get_receiver(commenter) notificationmailer.new_comment_email(receiver,commenter).deliver end def get_receiver(user) #user = get_user(comment.user_id) unless user.mentors.empty? user.mentors.first else user = get_user_by_update_id(comment.update_id) end end end now have 2 types of users mentors , mentee. when mentee creates comment, works fine when mentor creates comment error. this partial render both users- <div class="mentee-updates"> <h1>updates</h1> <% @previous_updates.each |update| %> <div class="post"> <div class="heading"> <div class="user"> <%= get_user(update.user_id).name %&g

Java 7 update 55 JacORB error when running via WebStart -

since updating java 7 update 55, i'm not able run webstart java application. this application worked fine under java 7 update 51 when launched via webstart. it works update 55 when launched outside of webstart. any suggestions further investigation points? org.omg.corba.initialize: can't instantiate default orb implementation org.jacorb.orb.orbsingleton vmcid: 0x0 minor code: 0 completed: no @ org.omg.corba.orb.create_impl_with_systemclassloader(unknown source) @ org.omg.corba.orb.init(unknown source) @ org.jacorb.orb.cdrinputstream.<init>(cdrinputstream.java:186) @ org.jacorb.orb.etf.profilebase.initfromprofiledata(profilebase.java:252) @ org.jacorb.orb.etf.profilebase.demarshal(profilebase.java:172) @ org.jacorb.orb.etf.factoriesbase.demarshal_profile(factoriesbase.java:124) @ org.jacorb.orb.parsedior.decode(parsedior.java:235) @ org.jacorb.orb.parsedior.parse_stringified_ior(parsedior.java:460) @ org.jacorb.orb.parsedi

r - for the length of each row in column Y duplicate row in column X -

(please feel free adjust title more fitting) i have data.frame 2 columns, x , y of class list below x <- list("a","b","c","d") y <- list("a",c("a", "b"),"c",c("a", "c", "d")) df <- as.data.frame(cbind(x,y)) when column y has 2 or more entries or here characters, length of each row in y (number of characters) correspond number of identical rows in column x . easier put, each character in y must individual row in x . # desired output x y a b b b c c d d c d d im not sure how go this, pointers appreciated, thanks! try do.call(rbind, map(expand.grid, x, y)) ## var1 var2 ## 1 ## 2 b ## 3 b b ## 4 c c ## 5 d ## 6 d c ## 7 d d

asp.net - MVC Bundling and Minification - Control the token/version? -

i know when using asp.net mvc 4 creates "bundled" collection of requested files. understand adds on version end of collection url. i wondering if possible change or control generated token? <script src="/scripts/test?v=8hzab6c8znripynfzmqkt0ar4ausuybjxppkbgsrizo1" type="text/javascript"></script> to become... <script src="/scripts/test?v=1.2" type="text/javascript"></script> thanks in advance. it's not possible have been looking at.

java - Eclipse - Shortcut that toggles between Caller and Callee Hierarchy -

eclipse provides shortcut "ctrl + alt + h" opens call hierarchy. find helpful, however, find myself needing toggle between caller hierarchy, , callee hierarchy. there way without mouse-clicking on respective icons? from caller callee: i "ctrl + click" trace down. or "ctrl + t" check implementations of interface. from callee caller: i put cursor inside callee's method name: "ctrl + shift + g" search callers.

jquery - Text change when background colour changes using Javascript -

below javascript changing background colour of website, there way change text in body of page when change in colour occurs? function changecolor(element, curnumber){ curnumber++; if(curnumber > 4){ curnumber = 1; } console.log(curnumber); element.addclass('color' + curnumber, 500); // previous classes removed. element.attr('class', 'color' + curnumber); settimeout(function(){changecolor(element, curnumber)}, 1000); } changecolor($('#testelement'), 0); simply have text in array, ( elements using jquery - want it) iterate through , change content inside div using html() function when changing color. simple modification of code like function changecolorandtext(element, curnumber){ curnumber++; if(curnumber > 4){ curnumber = 1; } element.addclass('color' + curnumber, 500); element.html(arr[curnumber]); element.attr('class', 'color' + curnumber); settimeout(function(){changecolorandtext(eleme

Java input == null why? -

i'm using simple way resources project. i'm using eclipse, , have 'res' folder hold needed files. how load stuff, example 'puppy.png' in res folder (no subfolders): string path = "/puppy.png"; try { bufferedimage image = imageio.read(getclass().getresourceasstream(path)); } catch(exception ex) { ex.printstacktrace(); } and input==null error, , sometiomes not! not time puppy.png loaded next time won't. classes loads correctly, , other classes error. can explain why can happen, , how can fix it, still use getresourceasstream() method? please have @ how retrieve image project folder? . i have mentioned no of ways read image different paths. you can try one // read same package imageio.read(getclass().getresourceasstream("c.png")); // read absolute path imageio.read(new file("e:\\software\\trainpis\\res\\drawable\\c.png")); // read images folder parallel src in project imageio.read(new file("images

ssh - Run Python script in Vagrant -

this dumb question please me. q. how run python script saved in local machine? after vagrant up , vagrant ssh , not see python file in vm. if want run python scripts saved in mac? not want copy , paste them manually using vim. how run python script in vagrant ssh? on guest os there folder under / called /vagrant/ files , directories under directory on host machine contains .vagrantfile if put script in folder shared vm. additionally if using chef provisioner can use script resource run external scripts during provisioning step.

Add dimensions to image php -

i need set smaller dimensions images different sizes , need 1 small size page not stretch, whenever add width , height dimensions keep getting php errors. just need width , height img. while ($res = mysql_fetch_array($action)) { $output = "<img src=\"../admin/inventory_images/{$res['id']}.jpg\"></img><a href=\"product.php?id={$res['id']}\">{$res['product_name']}</a><br />"; echo $output; } just put them in <img> tag normal: $output = "<img src=\"../admin/inventory_images/{$res['id']}.jpg\" height=\"100\" width=\"100\"><a href=\"product.php?id={$res['id']}\">{$res['product_name']}</a><br />";

sql - The replace statement in a trigger on sqlite3 -

first created 2 tables: create table min_data( id integer primary key, ic char(5) not null, dt datetime not null, cou float, max float not null, avg float not null, min float not null); create table min_data( id integer primary key, ic char(5) not null, dt datetime not null, cou float, max float not null, avg float not null, min float not null); create unique index in_ic_dt on hour_data(ic, dt); then created trigger follows. create trigger ins after insert on min_data begin replace hour_data(ic, dt, cou, max, avg, min) select ic, strftime('%y-%m-%d %h:00:00', dt), avg(cou) * 6, max(max), avg(avg), min(min) min_data strftime('%y-%m-%d %h:00:00', new.dt) <= dt , dt < strftime('%y-%m-%d %h:00:00', new.dt, '+1 hour') , ic = new.ic; end; here problem. after inserted records min_data, trigger insert records hour_data, id of records in hour_data doesn't begin 1 , discrete. how can fix problem? replace not update existing

node.js - Starting node-huxley with example tests -

i'm struggling node-huxley run. having installed globally, installed node-selenium driver, cloned repo , tried run huxley on examples. i'm seeing error. it seems suggest server isn't running, i've verified running on localhost:8000 correctly. ideas how debug this? firefox opening. @ 1 type , toggle.hux /usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/promise.js:1549 throw error; ^ error: econnrefused connect econnrefused @ clientrequest.<anonymous> (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/http/index.js:127:16) @ clientrequest.eventemitter.emit (events.js:95:17) @ socket.socketerrorlistener (http.js:1547:9) @ socket.eventemitter.emit (events.js:95:17) @ net.js:440:14 @ process._tickcallback (node.js:415:13) ==== async task ==== webdriver.createsession() @ function.webdriver.webdriver.acquiresession_ (/usr/local/lib/node_modules/huxley/node_modules/sele

regex - create URL slugs for chinese characters. Using PHP -

my users use chinese characters title of input. my slugs in format of /stories/:id-:name example /stories/1-i-love-php . how allow chinese characters? i have googled , found japanese version of answer on here . don't quite understand japanese, asking chinese version. thank you. i have tested in bengali characters it may work. try this: @ first coded page (write code in page) have convert encoding type in utf-8, write code. code here: function to_slug($string, $separator = '-') { $re = "/(\\s|\\".$separator.")+/mu"; $str = @trim($string); $subst = $separator; $result = preg_replace($re, $subst, $str); return $result; } $id=34; $string_text="আড়াইহাজারে দেড় বছরের --- শিশুর -গলায় ছুরি"; $base_url="http://example.com/"; echo $target_url=$base_url.$id."-". @to_slug($string_text); var_dump($target_url); output: http://example.com/34-আড়াইহাজারে-দেড়-বছরের-শিশুর-গলায়-ছুরি st

php - Yii. Dynamically add row on AJAX action -

i have link in _form: <?php echo chtml::link('add child', '#', array('id' => 'loadchildbyajax')); ?> some code renderpartial child _form: <div id="children"> <?php $index = 0; foreach ($model->goodsservices $id => $child): $this->renderpartial('goods/_form', array( 'model' => $child, 'index' => $id, 'display' => 'block' )); $index++; endforeach; ?> </div> and script ajax: <?php yii::app()->clientscript->registerscript('loadchild', ' var _index = ' . $index . '; $("#loadchildbyajax").click(function(e){ e.preventdefault(); var _url = "' . yii::app()->controller->createurl("loadchildbyajax", array("load_for" => $this->action->id)) . '&index="+_index; $.ajax({ url: _url,

Plotting two different equations on the same graph/matlab -

while able plot fft( fast fourier transform) plot(x,y), unable plot fit line f(x) along fft. equations gathered curve fitting tool, took ten best fit , averaged come equation f(x). what must f(x) plotted log(freq) , log(pow) code: row=69; col=69; colormap gray whitebg('black') iterations=10^3; next=zeros(row,col); laplacian=zeros(row,col); critical=zeros(row,col); b= zeros(row,col); lums=zeros(1000); flw=0.5; u=0.1; crit=5; %bns=200; bns=1000; k=1:iterations b=b+(rand(row,col)-0.5); next=b; rns=5.; i=1:row j=1:col rfromns=(col+rns-j); critical(i,j)=0; if i<=2 left=row; else left=(i-1);end if i==row right=1; else right=(i+1);end if (j<=2) top=1; else top=(j-1);end if (j==col) bottom=j; else bottom=(j+1);end l=b(i,top)+b(left,j)+b(right,j)+b(i,bottom)+0.5*(b(left,top)+b(right,top)+b(left,bottom)+b(right,bottom)); l=l-6.*b(i,j); laplacian(i,j)=l; bfromns=bns/rfromns^3;

php - Select rows with same value on other field -

so, have entity (i'm using symfony) participant . in entity have : id account_id conversation_id account_id user object, , conversation_id conversation object, both foreign keys. i need know if, start, user1 , user2 in same conversation. , after need know if user1, user2.... usern in same conversation. i don't know how query ? ! select n.* participant n join ( select t.conversation_id participant t t.user_id = 'user1' , t.conversation_id = (select conversation_id participant user_id = 'user2' , conversation_id = t.conversation_id) ) m on m.conversation_id = n.conversation_id

javascript - async.map doesn't call cb with a nested waterfall -

i have trouble async . this code: main.prototype._onlygeolinks = function() { var redis = redisclient.client , getkeys = function(key, cb) { redis.keys(key, cb); } , count = 0 // cb = null; async.waterfall([ function(cb) { async.concat([ 'events:*' , 'news:*:*:*:*' , 'deals:*' ], getkeys, cb); }, function(keys, cb) { // iterate keys async.map(keys, function(key, cb) { async.waterfall([ function(cb) { redis.get(key, cb); }, function(item, cb) { log.verbose(log_ctx, 'parsing item.. %d', ++count); geohelper.parse(item, cb); // calling cb(new error('bla')) } ], cb) // @ point, can read err }, cb) // never called } ], function(err, items) { if (err) { log.error(log_ctx, err); } else { log.verbose(log_ctx, items); log.verbose(log_ctx, items.l

c# - Unity; animation on prefab -

tried find kind of problem around net failed so... here's thing - have prefab gameobject represent unit, portrait more specifically. has several scripts attached , animation component 2 animations: static , selected. prefab instantiated, moved freely and, after placing, can clicked select it, should, aside executing bit of code, start selected animation. using code: void onmousedown(){ // //some inside stuff // if (this.getcomponent<unithandling> ().thisunit.selected) this.animation.play("selected"); if(this.animation.isplaying ("selected")) debug.log("animation of selection playing"); } i checked animation seems playing (at least debug message showing) see no animation... doing wrong? try making animation state using mechanim, , play using this: getcomponent<animator>().crossfade("selected", 0); https://docs.unity3d.com/documentation/scriptreference/animator.crossfade.html ht

paypal - How to connect to the remote server for express checkout -

everything working absolutely fine in development here on local machine. when migrate code production server @ our hosting site , remain in sandbox mode error. exception in httpconnection execute: invalid http response unable connect remote server i've debugged traces spot in code: dim setecresponse setexpresscheckoutresponsetype = service.setexpresscheckout(wrapper) our web.config has following entries: <add key="paypal_redirect_url" value="https://www.sandbox.paypal.com/webscr&amp;cmd="/> <add key="e_hosting_endpoint" value="http://localhost"/> <add key="paypal_api_mode" value="sandbox" /> <add key="paypal_api_username" value="babrams-facilitator_api1.commuter.net" /> <add key="paypal_api_password" value="1395365656" /> <add key="paypal_api_signature" value="a78scs0nuckkjvsrxfqeygq8fap4acirrk.ij6zw7

java - Use arraylist to store the log events in memory - with rolling appender -

i'm going extends rollingfileappender. have defined size , amount of dile in log4j.properties: log4j.appender.myapp.maxfilesize=20mb log4j.appender.myapp.maxbackupindex=5 my extenstion should save log event in memory , when there error, write them log. i use arraylist<loggingevent> loggingevents = new arraylist<>(); but, don't know size give arraylist still work sizes defined above expected. suggestion? thanks

angularjs - UI-Router – Upgraded to 0.2.10, Nested & Named View No Longer Rendering, Why? -

i upgraded angular ui-router , nested & named view no longer renders. did change, happened here? ui-view="issues" template no longer renders , div shows empty... my router state: // town .state('town', { url: "/:townshortid/:townname/:page", views: { "header": { templateurl: "views/header/town.html" }, "content": { templateurl: "views/content/town.html" }, // issues = nested , named view "issues": { templateurl: "views/issues/town.html" }, "footer": { templateurl: "views/footer/town.html" } } }) my container jade file: block content section.content section.container div(ui-view="header") div(ui-view="content") div(ui-view="footer") the html being rendered in ui-view="content" <div id=&qu

Best way to control library versions and sys.path for a Python command-line application -

i want build distributable, self-contained python command line application locked-down library versions. in ruby can control libraries of command line application by: including gemfile having user run bundle install after cloning application repository inserting few lines of bundler boilerplate @ top of command-line entry point script, configures ruby's $load_path include gems specified in gemfile what equivalent process python? aware of virtualenv , need have user create virtual environment , remember activate it? seems overly difficult. this largely depends upon audience. for developers, idea indeed - include requirements.txt - pip install -r requirements.txt for end users, i'd recommend 1 of follow: py2exe py2app cx_freeze from other stackoverflow answer , pbundler may helpful.

ruby on rails - Example app for AngularJS IE9 URL rewriting -

is aware of example app uses url rewriting on server side (preferably rails), in order accommodate angularjs on ie9? in other words, i'm serving app @ /v2/challenges/new , gets changed #/v2/challenges/new in ie9's location bar, in turn redirects "/" . supposed on server side accommodate this?

joomla - finding file being called in php -

okay have joomla site uses compponet used create events or booking times. problem can't find form file trying access within joomla administrator componets directory com of plugin. here url of form makeanappointment/create?dtstart=201404250930&cal_id=5 so question is there script can run in php find out files being called in , location? david theres php function called get_included_files() returns list of files loaded via include , include_once , require , require_once . it may bit primitive looking (it doesn't have caller line numbers etc), @ least show files used during particular execution. add call function near end of main script. since returns array you'll need dump contents (i.e. print_r(get_included_files()) . see get_included_files() manual page on php.net more usage details.

php - Laravel 4, I defined a route but error message still says [route] not defined -

i defined route in laravel as: /*create commission (post)*/ route::post('/commissions/create', array( 'as' => 'commission-create-post', 'uses' => 'commissioncontroller@postcreate', )); but getting error message: route [commission-create-post] not defined. when routes using php artisan routes in command prompt not showing up. i have used similar code other routes not understand why not working. , understanding went wrong or how fix problem appreciated! thank much! edit here link in nav: <li><a href="{{ url::route('commission-create') }}">a commission</a></li> here function in commissioncontroller public function getcreate(){ return view::make('commissions.create'); } it leads form creating commission. form display if remove commission-create-post part of {{ form::open(array('route'=>'commission-create-post', 'name'

android - Styling of AlertDialog buttons -

in application use holoeverywhere. change appearance of alertdialog , got stuck on buttons below alert dialog. took how things done in holoeverywhere , tried modify that. here backtracking of reasoning: in theme there atributes define alertdialogtheme , other stuff. come later selectableitembackground also. <style name="holo.base.theme" parent="theme.appcompat"> ... <item name="alertdialogtheme">@style/holo.theme.dialog.alert</item> ... <item name="buttonbarbuttonstyle">?borderlessbuttonstyle</item> ... <item name="selectableitembackground">@drawable/item_background_holo_dark</item> * ... </sytle> so figure alertdialogstyle target further defined in styles: <style name="holo.base.theme.dialog" parent="holo.theme"> <item name="android:colorbackgroundcachehint">@null</item> <item name="

javascript - jQuery.animate scroll issues -

i have problem animating font when scrolls past viewport height. can animate once not again... this works, changes font size , forth: if ($(this).scrolltop() > $( window ).height()) { $('.nav li a').css({"font-size":"2vw"}); } else { $('.nav li a').css({"font-size":"1.2vw"}); } but not, animates once starts lag , jump when should animate back: if ($(this).scrolltop() > $( window ).height()) { $('.nav li a').animate({"font-size":"2vw"}); } else { $('.nav li a').animate({"font-size":"1.2vw"}); } does know why? thanks! does need animated in jquery? can effect css3 transitions (unless you're trying support older browsers): transition: 0.3s ease; -webkit-transition: 0.3s ease; -moz-transition: 0.3s ease; -o-transition: 0.3s ease

objective c - iOS UICollectionView memory leak -

i've created uicollectionview through storyboard. cell custom cell class have 3 buttons images. images available part of class galleryiteminfo. have array of objects [gallerydataprovider sharedinstance].iteminfo there code cellforitematindexpath (in 1 cell there 3 buttons 3 items in array): - (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath { collectionviewcellpreviewtriple *cell; if (indexpath.row % 2 == 0 && !is_iphone) { cell = [collectionview dequeuereusablecellwithreuseidentifier:@"cellorangered" forindexpath:indexpath]; if (is_fingerprint_version) { cell.imageviewrope.image = [uiimage imagenamed:@"image-rope-1.png"]; } } else { cell = [collectionview dequeuereusablecellwithreuseidentifier:@"cellgreenblue" forindexpath:indexpath]; if (is_fingerprint_version) { cell.imageviewrope.ima

mysql - SQL error while updating a row -

Image
details of table under consideration : code used updating rows : public void updateemployeedetails(employee employee) { connection conn = jdbcutility.getconnection(); try { string updatesql = "update employee_info set emp_name=?, location=?, email=?, dob=? emp_id=?"; preparedstatement ps = (preparedstatement)conn.preparestatement(updatesql); ps.setstring(1, employee.getemp_name()); /*all attributes of employee object of type string */ ps.setstring(2, employee.getlocation()); ps.setstring(3, employee.getemail()); ps.setstring(4, employee.getdob()); ps.setstring(5, employee.getemp_id()); ps.executeupdate(updatesql); } catch (sqlexception e) { system.out.println(e.geterrorcode()); e.printstacktrace(); } } error received : com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: have error in sql syntax; check manual corresponds mysql server version right syntax us

Maven exec plugin for clean phase -

i'm using exec-maven-plugin execute custom clean script during pre-clean phase of pom life cycle. purpose of script clean bunch of log files , test artifacts created during compile , test phases. script needs know paths these files, being filtered maven-resources-plugin during initialize phase. i've found bad design choice: can mvn clean after i've done mvn initialize . not issue, since need clean after having done something... however, i've started use maven-release-plugin, tries mvn clean deploy , fails due clean script not being available. i've thought of following possible solutions: use maven-clean-plugin attach script different phase modify script doesn't need filtering i don't either of those, because: i want use script cleaning up, since allows me keep pom file clean (there lot of files need remove, , don't want have specify of them manually maven-clean-plugin). not possible: test results need picked jenkins after testing, ca

c# - SQL Server 2014 in memory table and transactions -

i'm using entity framework 6.1.0 sql server 2014. i'm attempting perform several operations under transaction i've created this: (var transaction = context.database.begintransaction()) { } but i'm getting error accessing memory optimized tables using read committed isolation level supported autocommit transactions. not supported explicit or implicit transactions. provide supported isolation level memory optimized table using table hint, such (snapshot). i have tried possible isolation levels (those allowed in memory tables) no avail. how can perform atomic transactions code in memory tables? the solution enable memory_optimized_elevate_to_snapshot resource: http://msdn.microsoft.com/en-us/library/dn133175(v=sql.120).aspx

machine learning - Representing graph as a vector -

i working on applying machine learning algorithms software fault prediction. in research, software/ software components (like classes, packages etc.) represented in form of graphs (eg. control flow graphs, data flow graphs etc.). have specific requirement convert these graphs vectors in order facilitate application of machine learning algorithms (eg. classification, clustering). understand there many graph mining algorithms need not require representing graphs vectors. but, our problem better solved if graphs represented vectors. hence, please suggest existing works/ papers this. thanks. there no valid answer such question. graphs cannot represented finite length vectors. can extract graph features , encode them particular dimensions, features, , how represented - depends compeltely on particular task , later used method of classification/clustering. listing works doing such transformation pointless, there has been hundreads of such approaches, none of considered standard

jquery - how to return object from controller to ajax in spring mvc -

i have return list of employee controller jquery ajax. how should it? //controller part @requestmapping("phcheck") public modelandview pay(@requestparam("empid") int empid, string fdate, string tdate) { modelandview mav = new modelandview("phcheck"); list<employee> emp=entitymanager.createquery("select e employee e e.empid="+empid, employee.class).getresultlist(); mav.addobject("emp", emp); <----i need list of employee in ajax return mav; } ajax in view //ajax part $(document).ready(function () { $("#empid").change(function () { if ($("#fdate").val() != "" && $("#tdate").val() != "" && $("#empid").val() != "") { jquery.ajax({ url: "phcheck.htm?empid=" + $("#empid").val() + "&&fdate=" + $("#fdate").val() + "&&tdate=" + $("#tdat

javascript - Ember-data nested-url adapter doesnt show request payload in request headers -

ember-data doesn't support nested api urls in models. need write our own custom adapter. have added nested_url_adapter . issues having right now:: when doing post request api " http://api.server/resource/resourceid/childresource ", request payload on request headers not present. 2̶.̶ ̶i̶ ̶a̶m̶ ̶u̶s̶i̶n̶g̶ ̶e̶m̶b̶e̶r̶-̶s̶i̶m̶p̶l̶e̶-̶a̶u̶t̶h̶ ̶l̶i̶b̶ ̶f̶o̶r̶ ̶t̶h̶e̶ ̶a̶u̶t̶h̶e̶n̶t̶i̶c̶a̶t̶i̶o̶n̶ ̶a̶n̶d̶ ̶a̶u̶t̶h̶o̶r̶i̶z̶a̶t̶i̶o̶n̶,̶ ̶w̶h̶i̶l̶e̶ ̶d̶o̶i̶n̶g̶ ̶t̶h̶e̶ ̶p̶o̶s̶t̶ ̶r̶e̶q̶u̶e̶s̶t̶,̶ ̶i̶n̶ ̶t̶h̶e̶ ̶r̶e̶q̶u̶e̶s̶t̶ ̶h̶e̶a̶d̶e̶r̶ ̶t̶h̶e̶r̶e̶ ̶i̶s̶ ̶n̶o̶ ̶a̶u̶t̶h̶o̶r̶i̶z̶a̶t̶i̶o̶n̶ ̶h̶e̶a̶d̶e̶r̶.̶ i have implemented same nested_url adapter little modification type.typekey per api server. here gist of files have in application: gist xhr request tabs:: remote address: 127.0.1.1: 80 request url: http: //api.server/events/9/tickets request method: options status code: 200 ok request headersview parsed options / events / 9 / tickets http / 1.1 host: api

javascript - mydiv keep coming after refreshing the page -

i have mydiv on site fades out after 10 seconds when refresh page 'll comes again. need know if can add code in .js vanished visitor if refresh site again. have tried cookie far no success need know if can add code in js file let work? here have in .js make div disappears after 10 seconds. settimeout(function() { $('#mydiv').fadeout('fast'); }, 10000); you can use 'document.referrer' property of page see if last page page or not. if was, don't display div . that's best can think of. 'document.referrer' gives url of page linked page.

asp.net - DropDownExtender with CheckBoxList Inside GridViewRow -

the problem having using dropdownextender checkboxlist in gridview row panel displays within row affecting row height. possible panel show ontop of other rows in gridview without affecting row height? <asp:templatefield itemstyle-cssclass="width-25 z-index-neg1" headerstyle-cssclass="nowrap width-25" headertext="<div class='padding-top-sm border-left-white border-bottom-orange height-16'><span class='margin-left-2'>reaction</span></div>"> <itemtemplate> <asp:panel id="pnlreactions" runat="server" cssclass="pnldesign display-none"> <asp:checkboxlist id="chklistreactions" runat="server" width="170px" cssclass="z-index-800 chklistreactions"></asp:checkboxlist> </asp:panel

javascript - CSS Transition Does Not Fire onbeforeunload -

i have nutty client who'd large css transition on every page unload on site. this fiddle works intended delay, easing, , duration: http://jsfiddle.net/klw4c/ however when try implement exact same (i think) code here: http://nolaflash.com/transition.html transition not occur. page code follows. why work in fiddle , not in page? <!doctype html> <html> <head> <meta charset="utf-8"> <script type="text/javascript">//<![cdata[ window.onload=function(){ window.onbeforeunload = function (e) { document.getelementbyid('mylink').classname = 'out'; } }//]]> </script> <style type="text/css"> #mylink { display:block; padding:20px; background:#ccc; transition-property: background color; transition-duration: 12.5s; transition-timing-function: ease; transition-delay: 6.5s; } #mylink.out { background:#cc0000; } </style&