Posts

Showing posts from May, 2015

python - Kivy remote shell. Getting APK 'parse error' on Android device -

i followed instructions here building kivy-remote-shell apk , builds without errors. however, when try install apk on device, error message, parse error: there problem parsing package i don't know that, suggestion? make sure that: the apk signed, @ least own certificate. you apply "zipalign" package. "zipalign" tool part of sdk. command line like: zipalign 4 infile.apk outfile.apk , see http://developer.android.com/tools/help/zipalign.html

Sharepoint Reminder Email -

i have sharepoint list , want send out reminder same people once month them update it. automated out of sharepoint. there simple way this? list of folks receiving email static. mike you can create designer workflow pause 1 month before sending email , again pause 1 month before sending again. can add pause in loop never ends.

regex - Use sed to match end of line NOT preceded immediately by a certain character -

i have set of lines followed '\' want print line not containing '\' character @ end of line. note xx# yy# change per file , re-usable, want script print lines match1 '\' end of line. match1 xx1 xx1 xx1 xx1 \ yy1 yy1 yy1 yy1 \ zz\<1\> zz1 zz1 zz1 xx2 xx2 xx2 xx2 \ ... output should be: match1 xx1 xx1 xx1 xx1 \ yy1 yy1 yy1 yy1 \ zz\<1\> zz1 zz1 zz1 my best effort came with: sed -n '/match1/,/\\/p' file but not work. or suggestions appreciated. the following command want: sed -n '/match1/,/[^\\]$/p' file using ^ @ start of character class negates match. following glenn jackman's great comment above solution has little problem. since [^\\] requires @ least 1 character not work if first line not ends \ empty line. let me add solution should preferred one: sed -n '/match1/,/\(^\|[^\\]\)$/p' file

php - Laravel 5.1 Wildcard Route -

i'm creating cms allows user define categories. categories can either have additional categories under or pages. how can create route in laravel support potentially unlimited number of uri segments? i've tried following.... route::get('/resources/{section}', ['as' => 'show', 'uses' => 'mastercontroller@show']); i tried making route optional... route::get('/resources/{section?}', ['as' => 'show', 'uses' => 'mastercontroller@show']); keep in mind, section multiple sections or page. first, need provide regular expression used match parameter values. laravel router treats / parameter separator , must change behaviour. can that: route::get('/resources/{section}', [ 'as' => 'show', 'uses' => 'mastercontroller@show' ]) ->where(['section' => '.*']); this way, whatever comes after /reso...

javascript - How to allow user to try a different email after failure in NodeJS PassportJS? -

currently checking whether or not user has domain name email address using following code. initially, when google authentication window shows, there no option user change email address if logged chrome. when log similar sites google authentication, seemingly recalled being allowed add email address, or of nature. so, user attempts log on non-lsmsa.edu email address , fails. displays nasty error. how make such user allowed attempt re-login different email address. if ( profile.emails[0].value.indexof("lsmsa.edu") > -1 ) { var newuser = new user() newuser.google.id = profile.id newuser.google.token = token newuser.google.name = profile.displayname newuser.google.email = profile.emails[0].value newuser.save(function(err) { if (err) throw err return done(null, newuser) }) } else { done(new error("invalid domain. must use lsmsa email address.")) } check out hd parameter . makes sure user can sign...

xaml - Bound Item To DependencyProperty Not Propagating Value -

this property defined inside custombutton: public bool ison { { return (bool)getvalue(isonproperty); } set { setvalue(isonproperty, value); if (ison) visualstatemanager.gotostate(this, "on", true); else visualstatemanager.gotostate(this, "off", true); } } public static readonly dependencyproperty isonproperty = dependencyproperty.register("ison", typeof(bool), typeof(imagebutton), new propertymetadata(false)); in xaml bound boolean list below: ison="{binding sender.ispinned, mode=oneway}" and sender.ispinned raises propertychange public bool ispinned { { return _model.ispinned; } set { _model.ispinned = value; raisepropert...

How to Compare Information in csv file with Python? -

i'm working on csv file. have different columns, each corresponding information of dataset. suppose file contain each line: name information1 information2 information3 -for lines having same name , information1 , 2 have compute mean inf3 this piece of code stopped: col_a=[row[1] row in file] in col_a: currentrow=col_a[1] nextrow=col_a[2] in range(0,len(col_a)): if (currentrow)==set(nextrow):??? i started months ago programme, please understand difficulties. i still struggling understand needed, here goes. following script first blocks groups of rows first column matches, e.g. 3 "aaa" rows. for each block locates rows have matching columns of interest. if 2 or more found, average calculated on them. import collections file = [ ["aaa", "3", "x", "g", "b", 4], ["aaa", "4", "e", "r", "t", 3], ["aaa", "3",...

CSS border-image gradient on one side? -

the following css produces gradient border on left & right side of element: div { width: 100px; height: 100px; border-left: 10px solid; border-image: linear-gradient(#00f,#000) 0 100%; } <div></div> http://jsfiddle.net/5p8cv5t9/ how can apply gradient left side? you can define no border width on other sides easily. issue stems fact default border-width (mdn) value medium , not 0 . div { width: 100px; height: 100px; border-width: 0; border-left: 10px solid; border-image: linear-gradient(#00f, #000) 0 100%; } <div></div>

web services - JAX-RS: Non-programmatical registration of a ClientRequestFilter -

i want use clientrequestfilter modify outgoing rest requests of application without changing source code. so far, have found ways register filter programmatically: client client = clientbuilder.newclient(); client.register(new myclientrequestfilterimpl()); webtarget = client.target(uribuilder); is possible use web.xml or similar? as far know there no such way can read configuration file on own. assuming following file: com.foo.bar.filter1 com.foo.bar.filter2 you can register filters this: list<string> filters = files.readalllines(paths.get(new uri("/your/config/file")), charset.forname("utf-8")); client client = clientbuilder.newclient(); (string filter : filters) { client.register(class.forname(filter)); }

php - Prepared Statement with inner join, on multiple databases at the same time -

i sure has been answered, if know where. databases have 2 databases "conn" , "conn2" conn host table called account. account has 2 columns: user_key,username conn2 has table called miles miles has 3 columns: miles_key,miles_user_key, miles_amount what create leader board. i pull miles_amount conn2 , use sum function total value. while using inner join on miles_user_key = user_key username conn. i can fine , dandy single database, have no clue on how dual databases. $lb_user_query = " select miles_user_key, username, sum(miles_amount) 'miles' miles inner join account on account_stats.account_stats_account_key = miles.miles_user group miles.miles_user order miles desc"; $lb_user_stmt = $conn->prepare($lb_user_query); $lb_user_stmt->execute(); $lb_user_stmt->bind_result($miles_user_ke...

java - Regex is returning undesired results -

i trying capture group regex follow pattern: ex1 - anyanyany group 1 have anyanyany ex2 - anyanyany.abcany group 1 have anyanyany ex3 - anyany.abcde.fghi group 1 have anyany.abcde when try (.+)(?:\.) , returns ex2 , ex3. if change (.+)(?:\.)* returns same string of input. i don't know have solve it. me? knowledgement missing? https://regex101.com/r/jg6wy8/2 try non-greedy regex. (.+?)(?:\.[^.]*)?$ in java need escape backslash 1 more time, like, pattern p = pattern.compile("(.+?)(?:\\.[^.]*)?$"); demo

c# - Datagrid loses keyboard focus when deleting an item -

i have found similar questions, none have solved problem, have put small example. i want able press d key, , delete item observablecollection. works expected. i want able continue maipulating datagrid using arrow keys , d key row after 1 deleted (i.e. index of updated datagrid equal index deleted item had). the useful answer have found 1 - focus on datagridcell selecteditem when datagrid receives keyboard focus - i'm not sure when should calling want call after view has been updated, i'm using selectionchanged event being called far use. any advice appreciated, hope have provided enough code below enable recreate project , replicate problem. many thanks, mike my xaml code: <window x:class="datagridproblem.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525...

javascript - Meteor: Rerun code when template variable changes -

i created template, audioplayer-element. id of audio-file passed element via template-variable. this: {{>audioplayer audio=audio}} the containing template used subsequent pages audioplayer doesn't rerendered, content of pages change (like having page/1, page/2, page/3 on every page element on same place). want load correct file, matching id of variable passed. howler, , need subscription url of file related id. template.audioplayer.created = function () { var audioid = this.data.audio; var subscription = this.subscribe('audio', audioid); //this variable if (subscription.ready()) { var audiourl = audio.findone(audioid).url; var audio = new howl({ urls: [audiourl] }) } } because created-function run once, want have run every time go new page, make sure have correct audio file matching right page. i've tried wrapping piece in tracker.autorun doesn't seem solve problem. doesn't react on change of...

android - How to tell how an External Library was added? -

Image
my issue stems message: attribute "textallcaps" has been defined showing in messages view when trying run app. i'm getting few of these "has been defined errors". think it's because have 2 versions of support library under "external libraries" in project view of android studio. have appcompat-v7 , support-v4. now, saw 1 of local library projects had build.gradle file declared support-v4 dependency, removed , still error. did search support-v4 , it's not located anywhere. i think if i'm able find out causing listed under "external libraries" should able figure out why support-v4 being added. you can information on command line dependencies command: user@machine$ ./gradlew app:dependencies --configuration compile :app:dependencies ------------------------------------------------------------ project :app ------------------------------------------------------------ compile - classpath compiling main sour...

Dexguard with Maven and Android Studio doesn't work -

i taking on project, android app, developed on eclipse adt plugin. uses maven3, , dexguard obfuscate code. as work android studio (as) imported old project in as. works fine except dexguard. whenever want run project error saying : no implementation org.eclipse.aether.impl.versionresolver bound. here full error message: [error] failed execute goal com.saikoa.dexguard.maven:dexguard-maven-plugin:5.5.32:generate-sources (default-generate-sources) on project app-android-genmsecure: execution default-generate-sources of goal com.saikoa.dexguard.maven:dexguard-maven-plugin:5.5.32:generate-sources failed: unable load mojo 'generate-sources' (or 1 of required components) plugin 'com.saikoa.dexguard.maven:dexguard-maven-plugin:5.5.32': com.google.inject.provisionexception: guice provision errors: [error] [error] 1) no implementation org.eclipse.aether.impl.versionresolver bound. [error] while locating org.eclipse.aether.internal.impl.defaultrepositorysystem [error]...

groovy - Object isn't recognized as part of collection -

i'm trying create script gathers puts elements xml in list , verifies specific object part of list. please find script below: class baggageentitlement{ string allowancepieces string ruletype string ruleid string passengernameref string segmentnumber boolean equals(baggageentitlement that) { return ( this.allowancepieces.equals(that.allowancepieces) && this.ruletype.equals(that.ruletype) && this.ruleid.equals(that.ruleid) && this.passengernameref.equals(that.passengernameref) && this.segmentnumber.equals(that.segmentnumber) ) } } arraylist<baggageentitlement> expectedentitlements = new arraylist<baggageentitlement>() arraylist<baggageentitlement> actualentitlements = new arraylist<baggageentitlement>() baggageentitlement segment1entitlement = new baggageentitlement(allowancepieces : '2...

android - sqlLiteDatabase.query() for INNER JOIN -

i want query follows android sqlite db: select place.permit_name, local.local_distance tbllocal local inner join tblplaces place on place._id = local._id order local.local_distance asc i'm trying use query() , instead of rawquery() . don't know how specify inner join/on. how do this? final string table = placesdatacontract.placesdataentry.table_name; final string[] columns = { placesdatacontract.placesdataentry.column_name_permit_name. , localdatacontract.localdataentry.column_name_local_distance}; final string orderby = localdatacontract.localdataentry.column_name_local_distance + " asc"; cursor cursor = sqlitedatabase.query(table, // table columns, // columns null, // selection null, // selectionargs null, // groupby null, // having orderby, // orderby null); // limit you can put join in table variable. string table = "tbllocal local " + "inner join tblplaces place ...

Creating an "Other;_____" field in Access -

i creating field (or column) in table in access database using "lookup wizard". intent use lookup wizard type in choices user can select from, have been able successfully. my question, if there way add "other" choice in table selection if chosen user can manually enter text. i'd able in look-up wizard, not have create new field "other" in table. want listbox have following format; choice 1 choice 2 choice 3 other; _____________ is there way can done in ms access 2013?

c++ variable does not name a type in macro -

have code: #include <iostream> int a=0; #define f(f) \ int t##f(int, int);\ ++;\ int t##f(int i, int j) f(nn) { return i*j; } int main() { int b = tnn(3, 8); std::cout << << b; } got error when compiling: 7:3: error: 'a' not name type 10:1: note: in expansion of macro 'f' why isn't a visible in macro @ position expands? your macro ( in nn case) expands to: int a=0; int tnn(int, int); ++; int tnn(int i, int j) { return i*j; } int main() { int b = tnn(3, 8); std::cout << << b; } there no global scope in c++. in scripting languages. execution order initialization library-- crt0.s constructs run time envioronment. initialize global variables ( part can complicated ) run main. you statement fails because cannot put arbitrariy executable code macro expanded. ps: bjarne says don't use macros. in fact create const, inline , degree templates can avoid macros. macros evil!!!!

python - Many small matrices speed-up for loops -

i have large coordinate grid (vectors , b), generate , solve matrix (10x10) equation. there way scipy.linalg.solve accept vector input? far solution run for cycles on coordinate arrays. import time import numpy np import scipy.linalg n = 10 = np.linspace(0, 1, 10**3) b = np.linspace(0, 1, 2*10**3) = np.random.random((n, n)) # input matrix, not static def f(a,b,n): # array-filling function return a*b*n def sol(x,y): # matrix solver d = np.arange(0,n) b = f(x,y,d)**2 + f(x-1, y+1, d) # source vector x = scipy.linalg.solve(a,b) return x # output n-size vector start = time.time() answer = np.zeros(shape=(a.size, b.size)) # predefine output array egg in range(a.size): # ugly double-for cycle ham in range(b.size): aa = a[egg] bb = b[ham] answer[egg,ham] = sol(aa,bb)[0] print time.time() - start @yevgeniy right, efficiently solving multiple independent linear systems a x = b scipy bit tricky (assumi...

How to share a variable globally in python program? -

i'm working on program has config. need use different config tests , normal running of program. i manage software , tests using manage.py script , tests under python manage.py test ... (eg: python manage.py test all , python manage.py test db , ...) to choose config did in __init__.py of config: is_testing = sys.argv[1] == 'test' if is_testing: app.config.own import testconfig config else: app.config.own import config and after import config file. but sometime test runner takes first place in argv test in argv[2] or run tests launching script directly , not manage.py . my question ways can share variable across full codebase? thanks. you extract determining config config class , have script accept cli arg of config path execute. allow config used. python manage.py test --config=import.path.to.settings then have map config loadding actual module. django exact thing settings file, consult implementation details also i'd def...

java - setConnectTimeout vs. setConnectionTimeToLive vs. setSocketTimeout() -

can please explain difference between these two: client = httpclientbuilder.create() .setconnectiontimetolive(1, timeunit.minutes) .build(); and requestconfig requestconfig = requestconfig.custom().setconnecttimeout(30 * 1000).build(); client = httpclientbuilder .create() .setdefaultrequestconfig(requestconfig) .build(); is better use setsockettimeout ?

java - Deleting specified file -

i'm trying delete files isn't working or i'm missing something. here little test i'm doing: private void deletefromdir(string filename) { string path = "./test/pacientes/" + filename + ".tds"; file f = new file(path); system.out.println("abs path " + f.getabsolutepath()); system.out.println("exist " + f.exists()); system.out.println("filename " + f.getname()); system.out.println("delete " + f.delete()); } and system prints: abs path c:\users\xxxx\documents\pai\tsoft.\test\pacientes\john smith.tds exist true filename john smith.tds delete false and of course isn't deleting file, why? how can make work? perhaps, not have permission delete file. can use files.delete() method, throws ioexception, in case goes wrong, see real problem is.

go - Check if a package will build -

how can determine if package build, without installing it, running tests, or generating binary? there's mention using go build more 1 package tests if build. how can single package? go build for package main, binary generated go build. can dump in tmp directory os clean later. go build -o /tmp/oswilldeleteme unfortunately, can not pipe output of go build null device. see issue: https://github.com/golang/go/issues/4851

java - How to get reference to TextView not in setContentView() layout? -

so managed reference textview not in setcontentview() layout i'm still not able set custom font (i'm not getting nullpointerexception anymore, @ least that's good)> code used: layoutinflater minflater = (layoutinflater) getsystemservice(activity.layout_inflater_service); view textview= (view) minflater.inflate(r.layout.item, null); textview mytextview = (textview) textview.findviewbyid(r.id.hellotext); typeface tf = typeface.createfromasset(getassets(),"fonts/custom_font.ttf"); mytextview.settypeface(tf); here's layout i'm getting layoutinflater above: <?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_gravity="center" android:layout_width="300dp" android:layout_height="230dp"> <textview...

css - How can I reset the <div> class name? -

i have velocity template code generating class name on basis of loop. possible reset div name when 1 of loop iteration not match criteria. code have written: #set ($size = $confs.size()) #set ( $prev = "mycontent" ) #foreach($i in [0..$size]) #if($i < $size) </br> <table> <tbody> <tr class="impact-soy" data-key="$confs.get($i).impact"> <div class=impact-$i> <span>$confs.get($i).impact</span> </div> #if($prev != $confs.get($i).actor) <div class=actors-$i style="margin-left: auto; margin-right: auto;"> <span>$confs.get($i).actor</span> #set ($prev = $confs.get($i).actor) </div> #else #end <script> $(docu...

c++ - Move assingment operator for a QWidget derivate? -

this question has answer here: how copy object in qt? 2 answers i have qwidget derivate, let assume standard qwidget example class mainwindow : public qmainwindow { //.. } does make sense class mainwindow fullfill rule of five , mean move constructor , move assignment ? (since mainwindow should created once) nope. qobject derived classes should never copied , using q_disable_copy macro qobject , derived classes explicitly disable/hide copy constructor , assignment operator declaring them private. possibly has changed recent releases , c++ 11 compatible compilers might declared deleted. see here so rule of 5 out. , looking @ qt source can't find support moving qobject derived classes ... one final read qt objects: identity vs value

How to display actual images of facebook photos using only id (graph API) -

i using facebook graph api photos. fb.api( "/me/photos", function (response) { if (response && !response.error) { console.log(response); } else { console.log(response.error); alert(response.error); } } ); the information im getting each photo in data object created_time , id , , name im not sure how buid displayable images out of data. i have tried this answer try use id actual photo url giving same information there. does permissions have affect on data receive back? still in submission process this. assumed work anyway give permissions warning @ top of pop up. you have explicitly specify fields want receive starting v2.4. example /me/photos?fields=id,link,images see https://developers.facebook.com/docs/apps/changelog/#v2_4 https://developers....

amazon web services - AWS EC2 with PHP SDK - wait until instance has Public DNS Name -

i want create ec2 instance, , use "waiter" functionality wait until instance has public dns name - possible? here code: $ec2 = new aws\ec2\ec2client([credentials]); $result = $ec2->runinstances(array( 'dryrun' => false, // imageid required 'imageid' => '[removed]', // mincount required 'mincount' => 1, // maxcount required 'maxcount' => 1, 'keyname' => '[removed]', 'securitygroupids' => array('[removed]'), 'instancetype' => 'r3.4xlarge', 'placement' => array( 'availabilityzone' => 'us-east-1a', ), 'ebsoptimized' => false, 'monitoring' => array( ...

android - Clicking on pie chart slice changes the next slice to white -

Image
the problem when click on pie chart slice, next slice changes color white. the following link shows example mchart = (piechart) layout.findviewbyid(r.id.piechart); mchart.setdrawholeenabled(true); mchart.setholecolortransparent(true); mchart.settransparentcirclecolor(color.white); mchart.setholeradius(58f); mchart.settransparentcircleradius(61f); mchart.setdrawcentertext(true); mchart.setrotationangle(0); mchart.setrotationenabled(true); what's problem?

javascript - Isolate alpha value from background colour, convert from string to number, then validate -

i'm looking check value of background colour on element, , if value rgba value want grab alpha channel , see if lower 1. return/exit if background colour isn't rgba value, i.e. if it's hex value, or rgb value. i have feeling regex best approach this, after bit of head scratching i'm @ loss, , regex isn't strongest skill! here's have already, , todo's things need little assistance with var hasopacity = false; var backgroundcolor = $('.elemment-class').css('background-color'); // backgroundcolor return: // (string / bool) // - null - ignore // - transparent - ignore // - #000 - ignore // - #ffffff - ignore // - rgb(0,0,0) - ignore // - rgba(0, 0, 0, 0.4) // ^ need value if it's floating // - rgba(0, 0, 0, 1) // ^ or value if it's integer function checkifbackgroundhasalpha(backgroundcolor) { // @todo if background va...

python - Exception trying to collect records from parquet file in pyspark -

i don't understand why, can't read data parquet file. made parquet file json file , read data frame: df.printschema() |-- param: struct (nullable = true) | |-- form: string (nullable = true) | |-- url: string (nullable = true) when try read record error: df.select("param").first() 15/07/22 13:06:15 error executor: exception in task 0.0 in stage 8.0 (tid 4) java.lang.illegalargumentexception: problem reading type: type = group, name = param, original type = null @ parquet.schema.messagetypeparser.addgrouptype(messagetypeparser.java:132) @ parquet.schema.messagetypeparser.addtype(messagetypeparser.java:106) @ parquet.schema.messagetypeparser.addgrouptypefields(messagetypeparser.java:96) @ parquet.schema.messagetypeparser.parse(messagetypeparser.java:89) @ parquet.schema.messagetypeparser.parsemessagetype(messagetypeparser.java:79) @ parquet.hadoop.parquetrecordreader.initializeinternalreader(parquetreco...

c# - Reactive Extensions - AsyncLock.Wait throws ArgumentNullException -

when using observable.interval got few times following exception causes application crash (the exception can found in event viewer - error source: .net runtime) application: rxplayground.exe framework version: v4.0.30319 description: process terminated due unhandled exception. exception info: system.argumentnullexception stack: @ system.reactive.concurrency.asynclock.wait(system.action) @ system.reactive.concurrency.defaultscheduler+<>c__displayclass9`1[[system.int64, mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089]].<scheduleperiodic>b__6() @ system.reactive.concurrency.concurrencyabstractionlayerimpl+periodictimer.tick(system.object) @ system.threading.timerqueuetimer.callcallbackincontext(system.object) @ system.threading.executioncontext.runinternal(system.threading.executioncontext, system.threading.contextcallback, system.object, boolean) @ system.threading.executioncontext.run(system.threading.executioncontext, sys...

neo4j - How to create an index on a property of a relation -

i need query fetch properties of relation not empty, e.g. match ()-[r:type]-() r.attr <> "" return r.attr i guess create index on :type(attr) creates index on node label type , not on relation property? or not necessary create index on relation property? i using neo4j 2.2.3. indexes on relationships possible using manual indexes . bevor creating recommend rethinking graph model. being entity or complex value type should modeled nodes. interaction between things in world modeled relationships. typically relationships use weight parameters or metadata properties real attributes. since queries typically start @ "something" (aka thing aka node) don't need relationship indexes. indexes should used identifying start points traversals.

Use python to split a list of values into two lists when negative value occurs when looping -

let's have list of floats. wondering how loop through list , whenever negative value occurs, split list 2 separate lists. the initial set of values: [0.1, 0.5, 3.2, 8.2, 0.0, 19.7, 0.0, -0.8, -12.0, -8.2, -2.5, -6.9, -1.3, 0.0] example result looking for: lista = [0.1, 0.5, 3.2, 8.2, 0.0, 19.7, 0.0] listb = [-0.8, -12.0, -8.2, -2.5, -6.9, -1.3, 0.0] the key here length of list vary, , position @ first negative value occurs never same. so in short: wherever first negative value occurs, split 2 separate lists. any ideas? appreciated. -cheers first, may use generator expression find index of first negative value: neg = next((i i, v in enumerate(values) if v < 0), -1) then, slice list (assuming neg != -1 ): lista, listb = values[:neg], values[neg:]

javascript - How to fix script after upgrading jQuery to 2.1.4? -

i using jquery 1.8.3 , had piece of script : $("[src*=plus]").live("click", function () { $(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>") $(this).attr("src", "../images/minus.gif"); }); $("[src*=minus]").live("click", function () { $(this).attr("src", "../images/plus-sign.png"); $(this).closest("tr").next().remove(); }); after upgrading jquery 2.1.4, no longer works. i functions live not supported anymore unable convert piece make work. when upgrading jquery should use jquery migrate . this offically recommended way in finding out has been deprecated in jquery. if you’re upgrading version before 1.9, recommend use jquery migrate plugin , read jquery 1.9 upgrade guide, since there have been ...

html - Pretty-Print not retained during Chrome browser Javascript debugging -

while debugging javascript code in chrome browser, enabled pretty-print pressing { } button @ bottom left corner of source window. however after enabling breakpoint , stepping through code, print goes normal. pressed pretty-print button again , after next step-through, goes normal. continues , hinders debugging. any way retain pretty-print while debugging ?

android - How to redirect from own application another application? -

i creating own app , @ 1 point want user can go other application.so best code that? you can in many ways, 1 of common method intents. can create implicit intents purpose. here sample code : //from mainactivity.oncreate() intent intent = new intent(intent.action_view,uri.parse("http://google.com")); startactivity(intent);` you can find further details intents here .

user profile - has chrome eliminated the classic avatar menu? -

like many web developers, maintain numerous profiles in google chrome test web applications. when doing these tests, essential rapidly determine profile in when interacting chrome. depended on classic chrome avatar menu signal current profile. months now, chrome has defaulted newer profile menu showed current user's name in text (no avatar image). until today, possible go using classic avatar menu navigating chrome://flags , disabling enable new profile management system. now, doing has no effect. wondering if perhaps there other way enable classic avatar menu web development tests can proceed before. this unfortunately design decision google, , looks they're sticking it. when happened, (like you) set flag & able use legacy icons, of morning flag has been disabled. further reading (follow links related issues): https://code.google.com/p/chromium/issues/detail?id=512699 i have no idea how do, starring issue , leaving polite, detailed comment on issue #...

C++ pointer syntax problems -

i professional software developer i'm largely unfamiliar c++ syntax. trying compare value @ end of pointer double in inherited c++ project. the following bit of code grabs valueaddress text file , prints, example |"primary key value"|123.456| where 123.456 value of double @ address in text file. ... char debugstring[64]; int valueaddress; fscanf(inputfile, "%s %d", key, &valueaddress);//inputfile declared elsewhere printf("|"); printf(database->primarykey);// defined elsewhere , not focus of question printf("|"); sprintf_s(debugstring,64,"%g",* ((double *)valueaddress)); printf(debugstring); printf("|"); ... why then, can't access value using: if ((double *)valueaddress < -0.5) {...} as error "error c2440: '>' : cannot convert 'double' 'double *'" i can't do: if ((double) *valueaddress < -0.5) {...} as error "error c2100: illegal...

git - How can I rebase from specific develop branch commit to specific master branch commit -

i have master branch this: a->b->c->d->e the develop branch this: a->b->c->d->e->f->g->h->i ^ |- should used i want apply g on top of d . how can this? i tried this: git checkout develop git rebase 82c7b6a but giving me merge conflicts. my main goal keep master branch , delete develop branch. main: a->b->c->d->g->h->i i cherry-pick 1 commit. git checkout master git cherry-pick g git cherry-pick h (edit 3) git cherry-pick (edit 3) git branch -d develop edit i didn't see don't want e. be: git checkout master git reset --hard head^1 git cherry-pick g git cherry-pick h (edit 3) git cherry-pick (edit 3) git branch -d develop edit 2 more failsafe solution pointed out @ckruczek use rebase interactive. git checkout master git reset --hard develop git rebase -i d git branch -d develop and remove lines commits don't want have. edit 4 as hi...