Posts

Google+ Login Not working properly on Android fragment -

i working google+ login application , when done using activity work charm , after move code fragment , after when try login google+ not working have open fragment activity 2 times login google+ can tell me happen code fragment added below public class googleplusefragment extends fragment implements connectioncallbacks, onconnectionfailedlistener { private static final int rc_sign_in = 0; private static final string tag = "mainactivity"; private static final int profile_pic_size = 800; private googleapiclient mgoogleapiclient; private boolean mintentinprogress; private boolean msigninclicked; private connectionresult mconnectionresult; private signinbutton btnsignin; private button btnsignout; private context mcontext; private activity mactivity; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); mactivity = getactivity(); mcontext = getactivity().getapplicationcontext(); } @override public vie...

Use C# managed app class in C++ unmanaged app -

i have project class written in c# use serialize data. [xmltype("cpersoane")] public class cpersoana { public cpersoana() { } [xmlelement("name")] public string name { get; set; } [xmlelement("profession")] public string profession{ get; set; } [xmlattribute("age")] public int age{ get; set; } //... } i have project in same solution written c++ mfc (no clr support) dialog box 3 text boxes. how can access "cpersoana" class c++ can use "name", "profession" , "age" text boxes? any appreciated! firstly, c# project needs dll (output type = class library). secondly, cannot access c# code in unmanaged c++, c++ project needs @ least 1 source file compiled /clr can access c# class. in source file, can write code like #using "mycsharpproject.dll" using namespace mycsharpnamespace; ... gcroot<cpersoana^> ...

mysql query add single quote in query -

need suggestions how convert below query result in to: use philips,led,and tv in single quote. insert company_rawdata_split select 2,splits (select null splits union select 'philips' union select 'led' union select 'tv') splits not null; query: select concat ('insert company_rawdata_split select ',id,',splits (select null splits union select ', replace(complaint_against ,' ', ' union select '),') splits not null;' ) prodcatqueries company_rawdata_new result insert company_rawdata_split select 2,splits (select null splits union select philips union select led union select tv) splits not null; the following should accomplish you're attempting. it's matter of getting clever placement of escaped single quotes \' select concat ('insert company_rawdata_split select ',id,',splits (select null splits union select \'', replace(complaint_against ,' ', ...

asp.net mvc - Convert object list to another object list even they are not same type -

i want separate between viewmodel , mode(data access object or data members). please see below. major dao public class major public majorid integer public majorname string end class major vm public class majorvm public major major end class but major view model take reference major. in case, convert major object majorvm object list. please see below. dim majorlist list(of major) = getallmajorlist() dim majorvmlist list(of majorvm) majorvmlist = majorlist how can solve this? thanks. try this. dim majorvmlist new list(of majorvm) each item major in majorlist dim m new major major.majorid = item.majorid major.majorname = item.majorname majorvmlist.add(major) next

excel - Expected array when calling function -

i'm trying learn little vba i'm in process of saving ranges csv files. however, i'm having trouble line of code call saverangeascsv(selectdown("b5:d5"), "c:\test\test.csv", true) and here snippet of selectdown function. private function selectdown(range string) range selectdown = range(range, activecell.end(xldown)).select end function i error: expected array. cannot seem understand problem is. appreciated :-) it sounds function saverangeascsv expecting array, passing in range. function not built-in excel function, can't check it. maybe check arguments expecting?

binary - Floating point division in ARM7, quick calculation of inverses -

i'm using arm7 device without neon floating point arithmetic hardware capabilities, project i'm having write in assembly, have multiplier working, there why calculate inverses quickly? will gcc software floating-point library you? you'll find assembler routines floating-point division under libgcc/config/arm .

matlab - Gilbert-Peierls algorithm for LU Decomposition -

i searched gilbert-peierls algorithm, haven't found useful (well, found this , it's not working should). think problem second part, , lines: u(1:k, k) = x(1:k); l(k:n, k) = x(k:n)/u(k, k); should (according this example): u(1:n, k) = x(1:n); l(k:n, k) = x(k:n)/u(k, k); also, in example, l identity matrix, find bit strange. describe algorithm, please? (with or without code) first, gilbert-peierls’ algorithm left-look decomposition , loops 1 column in every iteration. thus, "k" means loop column. note u upper triangular matrixm, entries below k in each column zero. that's reason of it. second, gilbert-peierls’ algorithm starts identity l matrix way calculate diagonal entries. helps users calculate diagonal entries of u @ first , deal rest entries of u. gilbert-peierls algorithm does.