Posts

Showing posts from April, 2014

sql self join on previous record for audit change -

i trying sql query return rows status of previous time there audit log same account like create table aud ( id int identity(1,1), date_time datetime, [user] varchar(20), account varchar(20), [status] char(2) ) insert aud values(getdate(),'guy','123456','00') insert aud values(getdate(),'guy','123456','01') insert aud values(getdate(),'guy','123456','02') insert aud values(getdate(),'guy','123456','00') insert aud values(getdate(),'guy','123456','04') insert aud values(getdate(),'guy','123456','01') what looking result lists previous account status date_time, user, account, status, previous_status i tried select a.*, b.* aud join aud b on a.account = ( select top 1 account aud a.account = b.account , a.id > b.id order date_time asc ) but joins more previous one if using sql server 2012+, can use lag() single colu

java - SpringBoot helloworld MVC application won't load -

i'm familiar old way of using spring servlet mapping, thought i'd try springboot new application going quicker , use defaults wherever possible. i can't seem basic helloworld controller work. it seems springboot not bootstrapping @ all. put breakpoint in application main method , doesn't break. using gradle build project, , deploy in tomcat through intellij. i'm missing simple i'm sure. it? here gradle file: buildscript { ext { springbootversion = '1.2.3.release' } repositories { mavencentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springbootversion}") } } apply plugin: 'java' apply plugin: 'idea' apply plugin: 'spring-boot' apply plugin: 'war' war { basename = 'test' version = '0.0.1-snapshot' } sourcecompatibility = 1.8 targetcompatibility = 1.8 repositories { mavencentral

sql server - How to write a sql query for different conditions in where clause on demand? -

i have pass different parameters columns code behind, written 15 gridview binding methods 15 columns, avoid set in query.for example if column 1 pick clause , if column 2 pick clause.so how write this? here example of how create , run dynamic queries create procedure sp_search @param1 int = null, @param2 int = null begin declare @query_string nvarchar(4000); set @query_string = 'select * table_name 1 = 1 '; if(@param1 not null) begin set @query_string = @query_string + ' , columnname1 = ' + cast(@param1 varchar); end if(@param2 not null) begin set @query_string = @query_string + ' , columnname2 = ' + cast(@param2 varchar); end exec sys.sp_executesql @query_string; end

ios - Facebook Integration v4.0 Not Working for iPhone App -

Image
i'm starter in iphone application development. i'd implement 'login facebook' using own customized ui. i've tried steps provided in getting started fb integration i've tried implement login using fbsdkloginmanager forwhich suits custom ui. i've added things needed fb integration. added necessary things in .plist file. my app running , goes browser , asks login. when provide credentials, asks profile access permission. upto this, won't error. when grant access request, got response "safari cannot open page. because address invalid" in ios simulator , empty blank space in fb app in ipad. i won't control transfer application. i've searched issue , won't proper response. can assist me out of issue? i'm using latest facebooksdk v4. i'll provide .plist file , snapshots. in appdelegate.m - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { retu

java - contains() method in List not working as expected -

the api of contains() method says "returns true if list contains specified element. more formally, returns true if , if list contains @ least 1 element e such (o==null ? e==null : o.equals(e)). " i overrode equals() method in class contains() still returns me false when check my code class animal implements comparable<animal>{ int legs; animal(int legs){this.legs=legs;} public int compareto(animal otheranimal){ return this.legs-otheranimal.legs; } public string tostring(){return this.getclass().getname();} public boolean equals(animal otheranimal){ return (this.legs==otheranimal.legs) && (this.getclass().getname().equals(otheranimal.getclass().getname())); } public int hashcode(){ byte[] byteval = this.getclass().getname().getbytes(); int sum=0; for(int i=0, n=byteval.length; i<n ; i++) sum+=byteval[i]; sum+=this.legs; return s

javascript - is(':visible') not working -

hey guys new jquery , going throught modal.js code , found below code: $target.one('show.bs.modal', function (showevent) { if (showevent.isdefaultprevented()) return // register focus restorer if modal shown $target.one('hidden.bs.modal', function () { $this.is(':visible') && $this.trigger('focus') }) }) i tried understand above code , made fiddle . now if see if conditional in code : if ($this.is(':visible')) { $('input').trigger('focus'); console.log($this + ' ' + 'is visible'); } else { console.log($this + ' ' + 'invisible'); } now if have following display rule i.e. input { display:none; } the if condition still passes , thats 1st difficulty . why if condition pass ?? my secound difficulty line inside if condition i.e. $this.trigger('focus'); now though if condition passes input does't focus . why ?? th

c++ - strftime adds unwanted characters to what I'm trying to display -

hey guys i'm wondering if can point out me. i'm trying display date & time in right hand corner of cmd prompt i'm getting additional characters i'm asking for. have far time_t rawtime; struct tm * timeinfo; char buffer[80]; time(&rawtime); timeinfo = localtime(&rawtime); // displays "23 date:etcetcetc" cout << "\n\n\n\n\n\n\n\n\n\n\n\n"; cout << strftime(buffer, 80, "\t\t\t\t\t\t\tdate: %d/%m/%y", timeinfo); puts(buffer); // , displays "16time:etcetcetc" cout << "\t\t\t\t\t\t\t"; cout << strftime(buffer, 80,"time: %i:%m:%s \n", timeinfo);; puts(buffer); if can see comments gives me want adds 23 first line , 16 other, doing wrong? kind regards! jb try replace this: cout << strftime(buffer, 80, "\t\t\t\t\t\t\tdate: %d/%m/%y", timeinfo); with this: strftime(buffer, 80, "\t\t\t\t\t\t\tdate: %d/%m/%y", timei

c# - Suppressing right-click context menu on canvas -

i have canvas , when user right clicks on it, context menu appears. have checkbox, , when box checked, don't want context menu appear. reason that, when checkbox checked, first 2 right clicks user drop ellipses @ 2 points of right clicks. right though, context menu popup on 2 right clicks. here's relative code: <window x:class="testproj.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:testproj" xmlns:localconverters="clr-namespace:testproj" x:name="this" height="650" width="1091" loaded="this_loaded" closing="this_closing"> <window.resources> <local:booltovisibilityconverter x:key="converter"/> </window.resources> <grid height="auto"> <grid.resources>

php - PHPStorm CodeStyle Put Space Before and After -> -

i using phpstrom 8.0.3 , can't find how make possible. when using aptana editor time ago, liked way formatted code. , trying configure phpstorm code style. i configure phpstorm change $this->some(); to $this -> some(); i've checked settings- > code style -> php couldn't find anywhere. may missing something. know how put space before , after -> contacted jetbrains , here reply unfortunately, there no such option in phpstorm @ moment. however, have related feature request submitted here: https://youtrack.jetbrains.com/issue/wi-12067 .

sql - Insert new row if value present in column -

i need check if column value exists record, , if insert duplicate of record, 1 of fields updated. the fields inccodes table are chars: incomecode, description, location, costcentre, newincomecode i have sql command updates of incomecodes newincomecode , clears newincomecode column present: update inccodes set incomecode = newincomecode ,newincomecode = '' newincomecode <> '' , location = location1 however need command same thing except instead of updating incomecode field, creates duplicate record incomecode updated newincomecode field. pseudo sql: insert inccodes values (select newincomecode ,description ,location ,costcentre ,null inccodes newincomecode <> '') any advice appreciated. can see similar questions insert based on criteria nothing need. thanks in advance. insert ignore inccodes (incomecode, description, location, costcentre, new

java - Does OpenXava framework support Web Services? -

i have openxava application , expose rest api allowing external users , other applications http post requests openxava entities, creating new resources in database. does know if openxava can generate web services entities? using openxava 5.2.1. i read documentation found nothing this. openxava not generates web services each entity automatically. however, openxava application regular java web application, can write web services application in usual way.

javascript - Is jquery.load() always considered cross site, even if the resource is local? -

i working on project based on ucdavis wayfinding library . have noticed unable load index.html page in browser if open file. whenever open file url like: file:///c:/some/folders/here/index.html i see error in js console: xmlhttprequest cannot load file:///c:/some/folders/here/demo_map_2.svg. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. i understand error telling me. , sure enough if throw project dropbox , access via public http link works fine. the part don't though why considered cross origin request when svg file stored locally, right alongside html file? is there way other hosting file under sort of webserver (or similar service dropbox) .load() function resolve on resource local same directory html file?

python - Do groups in h5py preserve the order in which its members were added? -

the h5py docs that group.keys() returns group's members list in python 2, , set-like view in python3. in either case, can assume when iterating through group.keys() , i'll iterate through them in order in members added group? my advice is: unless documentation explicitely states returned collection ordered, don't rely on it. fact set returned in python3 indicates keys not ordered — or order accidental.

objective c - JSON Mapping any inner objects using Mantle -

if getting response this { "objects" : [ { "a" : val1, "b" : val2, }, { "a" : val1, "b" : val2, } ] } then how objects array in response? the solutions have found follows: 1) can create model class objectsresponse representing above json , have nsarray property called objects. , can use mtl_jsonarraytransformerwithmodelclass to map json response objects property , access error using objectsresponse's object. 2) directly use method [mtljsonadapter modelsofclass: [object fromjsonarray:[response objectforkey:@"objects"]]] error:&error] is there direct way using mantle object mapping other these? thanks

javascript - Optimalisation of displaying data in real time in ASP.NET MVC -

long story short, trying display real time data, using asp.net mvc , eventhubs. i have async method in controller receiving messages hub , placing them in class-variable. views on other hand using js retrieve value , value div tag js based chart can retrieve value read innerhtml value of div. i feel not way work, , feels system unstable @ times, please take @ code better understanding: methods of interest found in controller: public async static void updatelist() { { try { var message = await consumer.receiveasync(); if (message != null) { //alot of code receive needed double } } catch (exception exception) { console.writeline("exception on receive {0}", exception.message); } } while (true); } public async task<actionresult> refreshlatest() {

3D Model of Earth in Android -

i'm relatively new android, , wondering how go creating 3d model of earth. idea have 3d earth can rotated user on screen. i'm not pro in graphic design, i'm not sure how go solving this. if shed light in regards programs , methods use, wonderful.

objective c - TypeError (can't cast ActionController::Parameters to integer) -

i'm trying update longitude , latitude in database based on alert id, when send id database typeerror (can't cast actioncontroller::parameters integer). noticed when submitted submitting string, yet when log parameters in xcode integer. -(void)updatecordinates{ nsstring *alertid = [defaults objectforkey:@"alertid"]; nsinteger alert_id = [alertid integervalue]; nsdictionary *userloc = [[nsuserdefaults standarduserdefaults] objectforkey:@"userlocation"]; nsstring *latitude = [userloc objectforkey:@"lat"]; nsstring *longitude = [userloc objectforkey:@"long"]; // create request. request = [nsmutableurlrequest requestwithurl:[nsurl urlwithstring:[nsstring stringwithformat:@"http://localhost:3000/api/v1/alerts/%ld/",(long)alert_id]]]; nslog(@"%@", request); // specify put request request.httpmethod = @"put"; // how set header fields

ios - Using Static UITableViewCells in a UIViewController -

i have functional tab-bar based application 3 tabs , each tab containing uitableview . the first , second tabs set use dynamic cells . due wanting bring iads app, have converted uitableviewcontrollers of first , second tab uiviewcontroller embedded uitableview , works well. however, third tab, uses static cells (like in-app-settings , when same approach, error saying static cells need used uitableviewcontroller . i've been searching online , came across question same approach: static tableviews outside uitableviewcontroller the accepted answer makes sense , i've tried well, i'm not getting anywhere this. is there way achieve static cells, in same dynamic cells? any guidance on appreciated!

objective c - Difference between NSDate and NSDateComponent value for the same date -

i created simple function first , last day of week day in it. looking @ nslog output found different values returned nsdate descriptor , component day same date, why ? here nslog outputs: nsdate: 2011-04-03 22:00:00 +0000, day component: 4 nsdate: 2011-04-09 22:00:00 +0000, day component: 10 as can see, nsdate 3 of april , day component 4 first row, , respectively 9 , 10 second one. here code: nsdate *date = [nsdate date]; //today april 5th 2011 nscalendar *cal =[[nscalendar alloc]initwithcalendaridentifier:nsgregoriancalendar]; [cal setfirstweekday:2]; //my week starts monday //define beginning of week nsdate *beginningofweek = nil; [cal rangeofunit:nsweekcalendarunit startdate:&beginningofweek interval:nil fordate:date]; nsdatecomponents *begincomponents = [cal components:(nsyearcalendarunit | nsmonthcalendarunit | nsdaycalendarunit | nsweekcalendarunit | nsweekdaycalendarunit) fromdate:beginningofweek]; //define end of week, 6 days offset beginning nsdatecom

How to play videos in android from raw folder and htm file -

how can play videos raw folder in .htm file on android? neither of these code snippets work me: <video id="video" controls> <source src="android.resource://tutorials.bodybuilding/raw/smit.mp4" type="video/mp4"> </video> or <video id="video" controls> <source src="url('android.resource://tutorials.bodybuilding/raw/smit.mp4')" type="video/mp4"> </video> according reading file in assets or raw folder in android guess addresses wrong. should consider uri.parse("android.resource://tutorials.bodybuilding/" + r.raw.csgsmit); returns every of videos , place html or @ runtime load html string , replace every address using such method , load modified html using webview.loaddata() or webview.loaddatawithbaseurl() passing modified html (a resluting string ).

php subtracting a variable from a variable to get the value -

im learning php , cant piece of code work, beginning php , cant figure out. online validator reports no issues found sets of infinite loop me. can 1 tell me why $eggusage not being subtracted $eggs. thank :-) <?php $eggs = 12; $eggusage = 0; while($eggs - $eggusage > 0) { $eggusage = rand(0, 1, 2, 3, 4); $eggs = $eggs - $eggusage; echo "you have {$eggs} left"; } if ($eggs < 4) { $eggusage = rand(0, 1, 2, 3, 4); $eggs == $eggs - $eggusage; echo "you out. buy eggs!"; } echo "<p>congratulations, out of eggs.</p>" ?> rand() expects 2 parameters, have given 4 in code. try rand( 0, 4 ) . also, don't forget ; in last echo, , had little mistake in line $eggs == $eggs - $eggsusage , should 1 = . this code snippet works fine me: $eggs = 12; $eggusage = 0; while($eggs - $eggusage > 0) { $eggusage = rand(0,4); $eggs = $eggs - $

css - How to override chrome input box border when clicked? -

how can avoid border chrome puts on input box, different color when user clicks on it? you can use css outline property remove that: input { outline:none; }

how to get byte array from camera preview in java android? -

i'm complete noob . i've managed write , understand code after reading http://developer.android.com/guide/topics/media/camera.html . want byte array preview , convert bitmap . want in real time without forced save picture file in storage . please , help! here program code. public class camerapreview extends surfaceview implements surfaceholder.callback { private surfaceholder mholder; private camera mcamera; public camerapreview(context context, camera camera) { super(context); mcamera = camera; // install surfaceholder.callback notified when // underlying surface created , destroyed. mholder = getholder(); mholder.addcallback(this); // deprecated setting, required on android versions prior 3.0 mholder.settype(surfaceholder.surface_type_push_buffers); } public void surfacecreated(surfaceholder holder) { // surface has been created, tell camera draw preview. try { mcamera.setpreviewdisplay(holder); mcamera.startp

c++ - Sending more than one character from Qt to Arduino -

first of all: sorry i'm not english. i'm making serial communication between qt (c++) , arduino. first tried send 1 character ('1') arduino turn led on , worked. want send more 1 character. how can send more characters each character variable in arduino code? this qt code 1 character: void mainwindow::on_pushbutton_clicked() { serial.setportname("com17"); serial.setbaudrate(qserialport::baud9600); serial.setdatabits(qserialport::data8); serial.setparity(qserialport::noparity); serial.setstopbits(qserialport::onestop); serial.setflowcontrol(qserialport::noflowcontrol); serial.open(qiodevice::readwrite); serial.write("'0'"); } i suppose using qserialport class qt. as can see documentation ( http://doc.qt.io/qt-5/qserialport-members.html ), have 3 functions overloading write(...), super class write(const char *, qint64) : qint64 write(const char *) : qint64 write(const qbytearray &) :

c++ - Porting Unix Sockets to Windows -

i have simple c++ library implements unix sockets , works fine on linux systems, i'm facing problem of porting part of code windows platform, not support unix sockets. alternative, far understand, implement tcp sockets, whoose principle similar (writing/reading tcp port instead of specific file). contextually , logistically, conversion of code simple enough implement on top of existing code or should rewrite code scratch? the berkeley api exist on windows , largely compatible other berkeley sockets implementation. see msdn article " porting socket applications winsock " information porting sockets code windows.

regex - Using grep, how can I extract every number from a blob of text? -

unlike previous question , want on commandline (just grep). how can grep every number text file , display results? sample text: this sentence 1 number, while number 2 appears here, too. i expect able extract "1" , "2" text (my actual text substantially longer, of course). i think want this, $ echo 'this sentence 1 number, while number 2 appears here, too.' | grep -o '[0-9]\+' 1 2 since basic sed uses bre ( basic regular expression ), need escape + symbol repeat previous character 1 or more times.

using a function in custom javascript file in drupal -

i made module creates block , using #attached added custom .js file block content, without drupal.behaviors , function($) things code works clock in page (outside of drupal) in drupal, have no idea how add function in .js file here codes: (function($){ drupal.behaviors.mymodule = { attach:function(context, settings) { function show_more(count){ var counter = count; var id = document.getelementbyid("id").value; var xmlhttp; if (window.xmlhttprequest) { xmlhttp=new xmlhttprequest; } xmlhttp.onreadystatechange = function() { if(xmlhttp.readystate == 4 && xmlhttp.status == 200) { document.getelementbyid("div_id").innerhtml =xmlhttp.responsetext; } } xmlhttp.open("post","some_page.php",true);

c# - Getting all methods of a target class at runtime -

this question has answer here: how list of properties of class? 9 answers is there way me returned list of methods of target class in form of array of strings @ runtime in c# other parsing documentation class? want emulate ide's suggesting methods types code segment. so method work (ideally) so: getmethods(foo.gettype()) and returned list of foo's methods. using system; using system.linq; namespace consoleapplication1 { class someclass { public void a() { } public void b() { } public void c() { } public void d() { } public void e() { } public void f() { } } class program { static void main() { var methods = getmethods(typeof (someclass)); foreach (var methodname in methods) { console.writeline(methodname);

html - Two Columns layout in CSS - text and image changing order in each row -

can me , tell me what's wrong in css code? looks this: body { font-family: open sans, sans-serif; padding: 5rem 1.25rem; /* 80 20 */ } .container { width: 100%; max-width: 60rem; /* 960 */ margin: 0 auto; } .item { width: 100%; overflow: hidden; margin-bottom: 5rem; /* 80 */ } } .item { color: #666; } .item__info, .item__img { width: 50%; float: left; } .item:nth-child( ) .item__info { float: right; padding-left: 1.25rem; /* 20 */ } .item:nth-child( ) .item__img { padding-right: 1.25rem; /* 2

How to assign an object property value to a variable in Java? -

the following code i'm having issues understanding: public class rectangle { public rectangle() { double width = 1; double height = 1; } public rectangle(double w, double h) { double width = w; double height = h; } public double getarea(double w, double h) { return (w*h); } public double getperimeter(double w, double h) { return ((2*w)+(2*h)); } public static void main(string[] args) { rectangle oldrectangle = new rectangle(4, 40); rectangle newrectangle = new rectangle(3.5, 35.9); double height1 = oldrectangle.height; double height2 = newrectangle.height; double width1 = oldrectangle.width; double width2 = newrectangle.width; system.out.println("width of rectangle 1 is: " + 4); system.out.println("height of rectangle 1 is: " + 40); system.out.println("area of rectangle 1 is: " + oldrect

java - Creating a class to record student grades -

i know there quite few errors in code, can't find them/don't understand them. doing wrong? update: thank help. have managed clear out errors except one. still errors on getgradescore. error: cannot find symbol error: illegal start of type public class studentrecord { /***declarations**/ private int quizscore1; private int quizscore2; private int quizscore3; private int midtermscore; private int finalscore; /***accessor methods**/ public int getquizscore1() { return quizscore1; } public int getquizscore2() { return quizscore2; } public int getquizscore3() { return quizscore3; } public int getmidtermscore() { return midtermscore; } public int getfinalscore() { return finalscore; } /***mutator methods**/ public void setquizscore(int quizscore1, int quizscore2, int quizscore3) { if (quizscore1 < 0 |

parsing - How to parse this information from a string? -

country residents area capital andorra 71201 468 andorra la vella italien 58133509 301230 rom san marino 29251 61 san marino i need store information (capital, residents, area, capital) in different variables. how go parsing this? notice there spaces in names. i have tried reading each token ( scanner.next() ) fails when there spaces in capital or country name. i have tried reading each line , parsing can't figure out way parse correctly since there sometime spaces in names. (i used indexof() , substring() ) this part of bigger file there no spaces in residents or area field in entire field. my try: while(scanner.hasnext()){ string info = scanner.nextline(); //parse string int nameindex = info.indexof(" "); system.out.println(info.substring(0,nameindex)); int resindex = info.indexof(" ", nameindex); } i hope have multiline string per question title. why don't use rege

jquery - Using cropper.js before Dropzone.js send image to server -

what want here before dropzone.js send dropped image server, modal appears cropper.js (fengyuanchen script) user can crop image, , when image cropped, send dropzone.js server. so when change image src of #cropbox function filetobase64 , replace image of cropper function cropper('replace'), keeps showing default.jpg image, instead of new 1 uploaded user html <div class="wrapper-crop-box"> <div class="crop-box"> <img src="default.jpg" alt="cropbox" id="cropbox"> </div> </div> js: function filetobase64(file) { var preview = document.queryselector('.crop-box img'); var reader = new filereader(); reader.onloadend = function () { preview.src = reader.result; } if (file) { reader.readasdataurl(file); } else { preview.src = ""; } } $(function() { dropzone.options.avtdropzone = { acceptedfiles: 'image/*',

segmentation fault - core dump in python C-extension -

i writing c-extension python. can see below, aim of code calculate euclidean-dist of 2 vectors. first param n dimension of vectors, second , third param 2 list of float. i call function in python this: import cutil cutil.c_euclidean_dist(2,[1.0,1,0],[0,0]) and worked well, return right result. if more 100 times(the dimension 1*1000), cause segmentation fault - core dump: #!/usr/bin/env python #coding:utf-8 import cutil import science import time = [] b = [] d = 0.0 x in range(2500): a.append([float(i+x) in range(1000)]) b.append([float(i-x) in range(1000)]) t1 = time.time() x in range(500): d += cutil.c_euclidean_dist(1000,a[x],b[x]) print time.time() - t1 print d the c code here: #include <python2.7/python.h> #include <math.h> static pyobject* cutil_euclidean_dist(pyobject* self, pyobject* args) { pyobject *seq_a, *seq_b; int n; float * array_a,* array_b; pyobject *item; pyarg_parsetuple(args,"ioo", &n , &am

HTML Form Button CSS -

i have following code (there other stuff in form not relevant): <fieldset> <form> <div><input type="submit" value="sign register"></input></div> </form> <form method="link" action="viewcurrent.php"> <input type="submit" value="view register"></input></br> </fieldset> </div> both buttons work fine. on web page appear underneath each other. correct way have these buttons next each other instead of underneath eachother? the proper way use display: inline-block .

Fiddler Proxy Not Working with Android Lollipop Emulator -

i'm attempting view network traffic lollipop emulator. i've followed directions here , able navigate computer's ip fiddler port , install root certificate (i.e. :8888/fiddlerroot.cer) i'm not seeing traffic in fiddler browser app. i installed kitkat emulator , followed same instructions success. why doesn't lollipop emulator work? what's changed in android 5.0.1? enable air-plane mode , disable! worked me!

Need this basic ansible variables explaination -

i know really basic question, want explanation of this: repos: - name: 'epel' url: 'http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm' key: 'http://ftp.riken.jp/linux/fedora/epel/rpm-gpg-key-epel-6' - name: 'rpmforge' url: 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' key: 'http://apt.sw.be/rpm-gpg-key.dag.txt' - name: 'remi' url: 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm' key: 'http://rpms.famillecollet.com/rpm-gpg-key-remi' - name: 'webtatic' url: 'http://mirror.webtatic.com/yum/el6/latest.rpm' key: 'http://mirror.webtatic.com/yum/rpm-gpg-key-webtatic-andy' like "repo", think it's list? "name", "url" , "key"? , why "name" has "-" infront of it? thanks in advance perhaps helps if

html - Aligning complex bootstrap button layout -

Image
i got (not soooo) complex bootstrap button layout align right.here's looks now: i second line (scheduled time) align right. have tried far combinations of pull-right , text-right classes on span tags no avail... anyone has solution this? thanks! the button code: <button type="button" class="btn btn-sm btn-default"> <span class="fa fa-pencil fw"></span> &nbsp; <asp:literal runat="server" text="&nbsp;<%$ resources:main, estimatedtimecaption %>" /> <span data-bind="text: moment(waitingqueueclient.estimatedconsultationtime).format($('#timeformat').html().trim())"></span> <br /> <asp:literal runat="server" text="&nbsp;<%$ resources:main, scheduledtimecaption %>" /> <span data-bind="text: moment(waitingqueueclient.fixedconsultationdatetime).format($('#timeformat').html().trim()

java - loading image from fragment in an activity FileNotFoundException error -

i want load image json file after clicking on item of list loaded file activity. show image , it's description. it loads activity , shows image not it's description. there nthing in logcat. east.java @suppresslint("newapi") public class east extends fragment { listview list; textview id; textview name; button btngetdata; east adaptor; arraylist<hashmap<string, string>> oslist = new arraylist<hashmap<string, string>>(); //url json array private static string url = "http://ra.com/s/east.php"; //json node names private static final string tag_array = "coffee"; private static final string tag_id = "id"; private static final string tag_name = "name"; private static final string tag_adress = "adress"; private static final string tag_image = "image"; jsonarray coffee = null; @override public view oncreatev

objective c - How to go to SecondViewController from RootViewController -

i have search hours no answers , seems lot of people have issue... using theos on iphone , have rootviewcontroller code: - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{ [self performseguewithidentifier:@"secondviewcontroller.m" sender:nil]; } there table , cell on table name directions when clicked want display secondviewcontroller.m, have no idea or how this. performseguewithidentifier takes name of segue. not take name of view controller, , not name of file containing view controller. intended use storyboards. take @ uiviewcontroller's presentviewcontroller, or navigationcontroller's pushviewcontroller if have navigation stack in rvc.

android - Can I start NotificationListenerService in code explicitly rather than it be started for me by the OS? -

i have class derived notificationlistenerservice , getting created , started me automatically when app starts. lazily start service later activity , not have start automatically when app starts. possible this? manifest is: <service android:name=".mynotificationlistener" android:label="@string/app_name" android:permission="android.permission.bind_notification_listener_service"> <intent-filter> <action android:name="android.service.notification.notificationlistenerservice" /> </intent-filter> </service> note before notificationlistenerservice can used user has grant app notification access via setting. if intent filter removed manifest app not appear in settings , user unable grant permission, without permission service can't started. seems os needs intent filter there before display app in settings. update: documentation bind_notification_listener_servi

Hbase installation in three node hadoop cluster -

i have installed hadoop 3 node cluster(master,slave1 , slave2). install hbase distrubuted mode. think install hbase master , zookeepr in hadoop cluster master machine(i.e namenode), , region servers in slave1 , slave2(i.e datanodes) machines. correct approach ? sorry, may simple question new nosql systems , want installations. i appreciate if able share reference document ths installation. thanks in advance. in order configure hbase , zookeeper on 3 nodes, i.e., 1 master , 2 slave nodes, need edit hbase-site.xml, regionservers, hbase-env.sh (found in $hbase_home/conf ) , zoo.cfg (found in $zookeeper_home/conf ). let name master node master , slave nodes slave1 , slave2 . let consider hadoop, hbase , zoopeeper folders in /usr/local/cluster/ folder. change following files: 1. hbase-site.xml: <configuration> <property> <name>hbase.master</name> <value>master:60000</value> </property> <property> <name&