Posts

android - Activity to listen to Intent ACTION_VIEW -

i want open custom activity in setmovementmethod below. textview tx = (textview)findviewbyid(r.id.txthelp); tx.settext(html.fromhtml(getstring(r.string.help))); tx.setmovementmethod(linkmovementmethod.getinstance()); i have html defined links when clicked/pressed, want activity open displaying image(depending on clicked link) i have looked @ thread handle textview link click in android app , tried follow answer used. here activity in manifest defined listen intent action.view. <activity android:name="com.example.metermanager.imagesactivity" android:screenorientation="portrait"> <intent-filter> <category android:name="android.intent.category.default" /> <action android:name="android.intent.action.view" /> <data android:scheme="com.example.metermanager" /> </intent-filter> here activity code. package com.example.metermanager; ...

how to iterate on array[...][i] (columns) in java -

there easy way access rows of 2d array in java for (int = 0 ; < integer2d.length ; i++) getmyarray(integer2d[i]); but, searched in web find such easy way iterate on columns of 2d-array, like for (int j = 0 ; j < integer2d[0].length ; j++) getmyarray(integer2d[][i]); or for (int j = 0 ; j < integer2d[0].length ; j++) getmyarray(integer2d[...][i]); which works in programming languages. found class realmatrix , matrixutils can convert array2d real matrix , transpose , again convert array , iterate on it. suppose there exist simpler way? edit: iterating on rows noted in first piece of code easy main question how iterate on columns second , third codes work in other programming languages. edit2: mentioned in last paragraph of main question, easiest way know transposing matrix , iterating on rows. for this, can use bigmatriximpl class of commons math library . has getcolumnasdoublearray() method return specified column array.

symfony - symfony2 verbose formatter, adding the line number and the file name to the logged message -

i need add data logger, i'd add file name , line logger called from. have create custom class or file name , line sent somewhere within predefined loggers? works now!! both custom processor , custom formatter have added.

nswindow - How can I set the title of non-main-windows in an NSDocument application? -

i working on document-based osx application, master-detail style windows. understand how open additional windows, display additional information, using -makewindowcontrollers , adding window controllers, can't set title of new windows. have tried using -settitle , -windowtitlefordocumentdisplayname in both document.m , in sub-classed window controller class, can't window title change. how change title of non-main-windows, have sub-classed window controller, in nsdocument based application? edit: know there suggestions on using iboutlet window this, surely window controller has reference window anyway, right?

delphi - Need example for for WM_MouseWheel -

my control(like tmemo) has not mousewheel code. how add correct wheel handler scrolls correct num of lines - if controlpanel has set 3 lines per rotate, need 3 lines scroll 1 rotate. my test is procedure tmymemo.wmmousewheel(var message: twmmousewheel); var delta: integer; begin delta:= message.wheeldelta div 80 * mouse.wheelscrolllines;//?????? scrollposy := scrollposy - delta; message.result := 1; end; i don't think 80 ok, it's guessed- works here (with win7). how correct num of lines scroll? i found ok way. need write protected methods: domousewheelup.....; override; domousewheeldown......; override; and in each, must scroll delta= mouse.wheelscrolllines .

linux - ssh to ubuntu server, /bin/bash: Exec format error -

when trying ssh webserver, connection opens , closes following error /bin/bash: exec format error connection ip.ip.ip.ip closed. ubuntu 12.04.4 lts (gnu/linux 3.8.0-29-generic x86_64) any ideas how fix this?

cocoa - Animating NSTabView Views -

i trying animate each view of nstabview slide in when view selected. have working in fashion, animates first time select new tab view. after not see animation when switching tab views, although can see the function fired every time.? override func tabview(tabview: nstabview, didselecttabviewitem tabviewitem: nstabviewitem) { tabviewitem.view!.setframeorigin(nspoint(x: tabviewitem.view!.frame.origin.x + 300, y: tabviewitem.view!.frame.origin.y)) tabviewitem.view!.animator().setframeorigin(nspoint(x: tabviewitem.view!.frame.origin.x - 300, y: tabviewitem.view!.frame.origin.y)) // can see fires every time switch tab views animation works fist time } i have changed little solve first time problem. define integer store previous tab index in delegate. - (void)tabview:(nstabview *)tabview didselecttabviewitem:(nstabviewitem *)tabviewitem{ cabasicanimation *controlposanim = [cabasicanimation animationwithkeypath:@"position"]; if (prevtabviewindex...