Posts

powerpc - What would be the C equivalent of rlwinm (PPC Instruction) -

i wondering if of know c equivelent of powerpc instruction below. rlwinm r31, r0, 0,13,13 thanks. rotate left register immediate, and mask. rotate left 0 here, can ignore this. mask bits set 13 13, bit 13 (0x2000 bitmask; command chosen on and document bit 13 selected). so in case, need build mask bit 13 , apply bitwise and source. r31 = r0 & (1 << 13); << shift left operation in c, use here create mask bit 13. & , operation in c. documentation source: http://sametwice.com/rlwinm

javascript - "this.parentNode.parentNode" is undefined in firefox but works in other browsers -

in code below, alert shows correct data-table value in google chrome undefined in mozilla firefox - there missing? <td> <a onclick="add_data_event(this.parentnode.parentnode, '<?=$result['g_id'];?>')" class="btn btn-primary" data-toggle="modal" data-target="#addremindermodel-editclick"> <i class="fa fa-edit"></i> </a> </td> <script> function add_data_event(index, ser) { alert('i in script'); alert(index.cells[1].innertext); } </script>

android - Uncheck Checkbox depend on another activity -

in main activity add icon . there checkbox list dialog appear. when click on checkbox user can check desire url link. when checkbox checked, 2 edittext saved db. 2 edittext invisible. it's list in activity. if user don't added url. can delete popup dialog call delete. problems when user delete url, want uncheck in list of checkbox on dialog. note* checkbox list manually added. thanks. if have additional question pls ask me. there 2 approaches: pass state of checkbox 1 activity through intent . based on state of checkbox received through intent in second activity, make changes in ui. boolean state = [getstateofcheckbox]; intent.putextra("key", state); startactivity(intent); //get state in receiver activity's oncreate() intent receiveintent = getintent(); boolean checkboxstate = receiverintrent.getbooleanextra("key"); save state of checkbox in sharedpreferences in first activity , retrieve value in second activity. ...

Microsoft Web Deploy v3 or higher is recommended. When Deploying a ASP.NET website to amazon ec2 -

Image
i followed this tutorial i installed web deploy 3.5,and added website in iis on ec2 instance im still getting error . im using public dns service url thanks in advance edit: im using visual studio 2012 , website in .net 4.5 install web deploy 3.5 on local machine using wpi

c++ - Enter two integer and display the largest number using predefined function -

i type function can't output. can me. must use predefined function. program running have errors please me. #include <iostream> using namespace std; float largenum (float a, float b) { float largenum; if(a>b) cout<<"a larger"; if(b>a) cout<<"b larger"; return (largenum); } int main() { float num1, num2; cout<<"enter number"; cin>>num1; cout<<"enter number"; cin>>num2; cout<<largenum<< "is larger"<<endl; return 0; } #include <iostream> using namespace std; float largenum (float a, float b) { if(a>b) return a; return b; } int main() { float num1, num2; cout<<"enter number"; cin>>num1; cout<<"enter number"; cin>>num2; cout<<largenum(num1, num2)<< "is larger"<<endl; return ...

permissions - Connecting play framework to mysql -

i have 2 databases in mysql: mysql> show databases; +--------------------+ | database | +--------------------+ | information_schema | | mysql | | performance_schema | | app | | app_dev | +--------------------+ i have 2 play framework servers running, 1 using app , 1 using app_dev. server connecting app local machine running mysql. server connecting app_dev remote. think i've setup permissions correctly: mysql> show grants 'app_dev'; +------------------------------------------------------------------+ | grants app_dev@% | +------------------------------------------------------------------+ | grant usage on *.* 'app_dev'@'%' identified password 'pwd' | | grant privileges on `app_dev`.* 'app_dev'@'%' | +------------------------------------------------------------------+ mysql> show grants 'app'@'localho...

powershell - Find XML attributes at random -

how can find 2 attributes $_.completename , $_.channel @ random? + $channel | ? {$liste} | get-random <<<< -min 0 -max $liste.list.groupe.count + categoryinfo : invalidargument: (position:psobject) [get-random ], parameterbindingexception + fullyqualifiederrorid : inputobjectnotbound,microsoft.powershell.command s.getrandomcommand sample data $xliste = [xml]@" <list> <groupe> <position type="general"> <completename>folder-1</completename> <dateyy>2014</dateyy> <datemm>jaenner</datemm> <datedd>mittwoch</datedd> <overall_mode>cbr</overall_mode> <duration>00:1:27</duration> <overall_rate>96.0kbps</overall_rate> </position> <position type="version"> <channel>channel2</channe...