Posts

Showing posts from March, 2014

Oracle equivalent of stored procedure that returns an inline table? -

example in t-sql (sql server - taken here ): create proc proc_authors @au_lname varchar(40) select au_id, au_fname, au_lname, city, state authors au_lname = @au_lname go is possible in oracle create stored procedure returns inline table (without declaring type - above)? if not, closest alternative? i.e. declare inline type, use it. idea minimize number of db permissions granted. please include sample code part of answer. reasoning behind using stored procedure vs function - have legacy software can execute stored procedures, or raw queries. appears stored procedures in there have support parameterized execution, after. try ref cursor procedure proc_get_tada(ip_user in varchar2, op_error_code out number, op_cursor out sys_refcursor,) begin open op_cursor select * your_table yt yt.user = ip_user; exception when others op_error_code := -1; end proc_get_tada; you collection o...

android - InstanceId#getId() doesn't return stable Id -

according docs instanceid: provides unique identifier each app instance and instance id stable may become invalid, if: app deletes instance id device factory reset user uninstalls app user clears app data however testing, appears following call returns different id if app has been swiped recents. instanceid.getinstance(context).getid(); is bug in google play services or using plain wrong? 2 tymm answer: client library instance id code: boolean needrefreshtoken() { string appversion = ssharedpreferenceshelper.get("appversion"); if (appversion == null) { return true; } if (!appversion.equals(scurrentappversion)) { return true; } string lasttokenacquiringtime = ssharedpreferenceshelper.get("lasttoken"); if (lasttokenacquiringtime == null) { return true; } long l = long.parselong(lasttokenacquiringtime); i...

html - Strikethrough Element Without Going Over or Under Element -

Image
i want draw lines left , right of element edge of parent element. i'm not sure how describe otherwise, maybe screenshot trick: as can see, close perfect, , if put overflow: hidden; on heading, better, can't see nice rounded corners (red circled parts in screenshot) because it's cut-off. at moment, is, html: <div id="intropage" class="intropage"> <div class="test">heading</div> </div> where "intropage" gray part see. my css this: .intropage { position: relative; max-width: 1000px; margin: auto; padding-top: 50px; height: 100%; background: gray; } .test { position: relative; /* overflow: hidden; */ text-align: center; } .test:before, .test:after { content: ""; position: relative; background: #0099ff; height: 6px; display: inline-block; width: 50%; border-radius: 2px; } .test:before { right: 10px; margi...

Is it possible to generate a dll with android ndk for testing purposes? -

i developing app uses native library. test using non-android dependent framework robolectric. the problem is, native functionality cannot loaded using system.loadlibrary("mylib"); because on windows looks "mylib.dll", , able build libmylib.so not compatible windows. is there way build dll (it used testing purposes ofc)? if want test application on windows, need *.dll. *.so files unix "shared libraries" - same functionality windows' dll. have build c++ sources ide visual studio, code blocks, or else can build sources windows. in fact, when building "ndk-build" android, cross-compiling unix system arm architecture mostly. when running on windows, you'll on x86 / x86_64.

android - Trying to send a Hashmap array with web service -

i'm trying send array contains hashmap <string,object> using web service in android, i'm having exception says "can not serialize hashmap", hope me guys. in advance! here web service class below: public class adduser { string namespace = "the name space"; private string url = "the url"; string soap_action; soapobject request; soapserializationenvelope envelope; androidhttptransport androidhttptransport; adduser() { } //set envelope protected void setenvelope() { try { envelope = new soapserializationenvelope(soapenvelope.ver11); envelope.dotnet = true; envelope.setoutputsoapobject(request); androidhttptransport = new androidhttptransport(url); androidhttptransport.debug = true; } catch (exception e) { system.out.println("soap exception---->>>" + e.tostring()); } } public string setficheuser(string methodname,object full_tab) { try { so...

datetime - Python timestamps with time() -

i have few timestamps in database trim down 10 timestamps, latest oldest. timestamps in db made using time() in python. create timestamp: _timestamp = time.time() timestamps: 1435652632.92778 1435652633.01 1435652633.07 1435652633.13 1435652642.71371 1435652642.77 1435652675.13 1435652675.22 1435652717.74 1435652735.11 1435652735.16 1435652735.24 how can ask python remove oldest timestamp? i convert timestamp readable format using below string in script. print datetime.datetime.fromtimestamp(1434615010.27858) >>2015-06-18 08:10:10.278580 i have no code yet remove oldest timestamps, appreciate please. this epoch timestamp seconds passed since 1970-01-01t00:00:00z. in case, sort timestmaps , take 10 top elements. timestmaps = [1435652632.92778, 1435652633.01, 1435652633.07] timestmaps.sort(reverse=true) latesttimestamps = timestmaps[:10]

java - Could not parse configuration: hibernate.cfg.xml caused by org.dom4j.DocumentException: Error on line 2 of document -

i not hibernate , have following problem trying follow tutorial. using hibernate 4 so have client class named helloworldclient : public class helloworldclient { public static void main(string[] args) { session session = hibernateutil.getsessionfactory().opensession(); session.begintransaction(); message message = new message( "hello world hibernate & jpa annotations" ); session.save(message); session.gettransaction().commit(); session.close(); } } as can see class use hibernateutil retrieve hibernate session object, one: public class hibernateutil { private static final sessionfactory sessionfactory = buildsessionfactory(); private static sessionfactory buildsessionfactory() { try { // create sessionfactory hibernate.cfg.xml configuration configuration = new configuration().configure("hiber...

go - How to set nsec to zero for a time.Time typed value -

there's time.time value created current time, there quick way set "nsec" field zero? part in case not useful map second level date time field in mysql. use time.truncate time.second : truncate returns result of rounding t down multiple of d (since 0 time). if d <= 0, truncate returns t unchanged. playground: http://play.golang.org/p/go-idyu18e .

php - How to set primary domain on a VPS to 404 to remove from Google index? -

i have vps hosting package primary domain: www.exampleprimary.com with numerous addon domains. i don't have website setup exampleprimary.com after going on earlier, learnt showing "index of/" , showing list of addon domains. not want happen added index.html show blank domain instead. i learnt google had indexed primarydomain , still shows addon domains, want remove index. i made index.html file: <html> <head> <meta name="robots" content="noindex"> </head> <body></body> </html> i want set exampleprimary.com domain show 404 error ensure google bots remove domain index. can't domain return http 404 response. created .htaccess , added exampleprimary.com root: errordocument 404 "<h1>page not found</h1>" errordocument 404 http://www.exampleprimary.com/ but after running tests on 404 checkers, still returns "200 ok" response. how can make ...

mysql - subquery returns more than one row error -

Image
okay, there are.. number.. of questions on same title, couldn't think of how more specific. the reason confusing me returning more 1 row desired effect of (one of) sub queries select max(thecount) (select fk_hour, count(fk_hour) thecount (select fk_hour slottime inner join time on slottime.fk_hour = time.hour fk_hour = (select time.hour time time.day=0 ) ) c group fk_hour ) counts; i realise time reserved word mysql - have rectify soon; though doubt problem in case. the aim of query select maximum count of instances of particular hours day = 0. the problem clearly: fk_hour = (select time.hour time time.day=0 ) the simplest solution change = in : fk_hour in (select time.hour time time.day=0 ) however, might want check data determine if intend.

html - Bootstrap image even, odd position -

i developing cms costumer , have print data lint list (code included @ bottom) in , odd position. tried apply lot of ways doesn't works properly. should include parent classes? here corresponding code: @extends('layouts.master') @section('content') @foreach($exhibs $exhib) <div class="row"> <div class="[ col-xs-12 col-sm-offset-2 col-sm-8 ]"> <ul class="event-list"> <li> <img class="img-responsive" style="nth-child(even) img { float: right; }" alt="independence day" src="{{ asset('/images/events/' . $exhib->img) }}" /> <div class="info"> <h2 class="title"> @if(app::getlocale() == "hu") <a href="{{...

'java.lang.String android.content.Context.getPackageName()' on a null object reference -

my alarmmanager in mainactivity fires every 30 second myreceiver class start getllrd intentservice class. thereafter, sending request onhandleintent method server following getting response. want achieve following, every time alarmmanager fires in mainactivity want pass intent response server in getllrd class map class. i have tried twice intent's code in getllrd class part intent intent1 = new intent(this, map.class); received intent once in map activity. 1 intent intent1 = new intent(mcontext, map.class); app crashes , got error below. how can achieve purposes? error: 07-08 13:04:33.482: e/androidruntime(16838): fatal exception: intentservice[intentservice] 07-08 13:04:33.482: e/androidruntime(16838): process: com.bustracker, pid: 16838 07-08 13:04:33.482: e/androidruntime(16838): java.lang.nullpointerexception: attempt invoke virtual method 'java.lang.string android.content.context.getpackagename()' on null object reference 07-08 13:04:33.482: e/androi...

css - Not able to include external stylesheet in rails application -

i have style.css file in assets/stylesheets directory , in html i'm using <%= stylesheet_link_tag "/stylesheets/style.css" %> . tried inspect element check it, , css file not being included. your problem has hallmarks of rails asset pipeline problem do have application.css.erb this? it's created default , serves backbone css aspect of asset pipeline in rails. /* ... *= require_self *= require_tree . */ using asset pipeline means call "/stylesheets/style.css" never valid in production , should avoided in code. if you're seeing problem in production, did rake assets build fingerprinted filenames? the raked filenames mangled like: /assets/style-4dd5b109ee3439da54f5bdfd78a80473.css, can see why using filename "style.css" not work. # rake assets production $bundle exec rake assets:precompile rails_env=production debug to me step 1 making sure pipeline setup serve css assets. until works, css broken. ask f...

oop - Javascript member function declaration -

i have following object 'obj'. tried debug , seems both functions members 'render' , 'sort'. there difference between these 2 types of declaration? var obj = { render:function(){ }, sort(){ } } you're using new object literal notation introduced in es6. it's valid, won't work in older browsers , current ones. if new javascript features of interest, might consider looking es6 transpiler such traceur or babel cross-browser support.

ios - TextView settings attributed text adds inset -

i set attributed text textview , vc appears text appears did not beginning (it scrolled 100 point down). why , how can fix it? [edited] add in viewwillappear or viewdidload [textview scrollrangetovisible:nsmakerange(0, 0)];

internet explorer - Setting the path for the ie driver in Thucydides does not work -

in thucydides.properties file have following: webdriver.ie.driver = c:\\users\\scott-h\\iedriverserver.exe webdriver.chrome.driver = c:\\users\\scott-h\\chromedriver.exe chrome works fine internet explorer not. ie run have manualy set system properties in tests. system.setproperty("webdriver.ie.driver", "c:\\users\\scott-h\\iedriverserver.exe"); failed create new webdriver_driver instance does have ideas why 1 work not other? @story(application.search.searchbykeyword.class) @runwith(thucydidesrunner.class) public class createcontacttest { @managed public webdriver driver; where driver being created to make chromedriver or iedriver work, location must in system path, or set system.setproperty. if 1 work , doesn't, means not in path, , 1 of them set elsewhere, while other not. think framework configuration sets chromedriver path somewhere, doesn't same iedriver.

css - How do I slow down a keyframe animation? -

i have code: .blur { -webkit-animation: blur 5s ; -webkit-animation-fill-mode: forwards; } @-webkit-keyframes blur { 0% { -webkit-filter: blur(0px); } 0% { -webkit-filter: blur(1px); } 50% { -webkit-filter: blur(5px); } 60% { -webkit-filter: blur(5px); } 100% { opacity: 0; } } <img src="http://placehold.it/350x150" class="blur" /> basically have image , effect want fade in slowly, blur , fade out. when blurs want stay there few seconds , fade out picture. please me out? thanks thinking in terms of keyframes, want let animation know when start fading. otherwise assumes you're working towards final opacity duration of animation. to prevent this, pin opacity @ 1 prior beginning fade. try this: .blur { -webkit-animation: blur 5s ; -webkit-animation-fill-mode: forwards; } @-webkit-keyframes blur { 0% { -webkit-filter: blur(0px); } 0% { -webkit-filter: blur(1px); } 50% { -...

r - Remove duplicate rows -

already question answered here ,but not make work. i have data frame here,interested remove duplicate rows based on symbol . checking column call remove duplicates.the priority p>a>m .if p,a,m keep p , if a,m , keep a , otherwise m . symbol intensity call 1 ddr1 596.95050 p 2 rfc2 420.28708 p 3 hspa6 510.73254 p 4 ddr1 1717.99487 5 guca1a 121.53488 6 uba7 1810.49780 p 7 uba7 301.51944 m 8 guca1a 34.53987 9 ccl5 5966.24609 p 10 cyp2e1 95.15707 11 cyp2e1 164.95276 m 12 esrra 1024.88745 p 13 cyp2a6 502.48877 14 gas6 921.70923 p 15 mmp14 524.96863 16 gas6 3069.48462 p 17 fntb 266.77686 18 pld1 187.65569 19 pld1 1891.04541 p 20 pld1 258.79028 m i tried code found here library(data.table) setdt(df)[, list(call=call[which.min(factor(call, levels=c('p', 'a', 'm')))]), ...

c++ - Homebrew's php-config returns wrong extension dir -

i'm creating makefile compile own php extension , install local php installed homebrew. so... here's deal: ➜ weeaboo php /usr/local/opt/php56/bin/php ➜ weeaboo php-config /usr/local/opt/php56/bin/php-config ➜ weeaboo /usr/local/opt/php56/bin/php-config --extension-dir /usr/local/cellar/php56/5.6.10/lib/php/extensions/no-debug-non-zts-20131226 ➜ weeaboo cd $(/usr/local/opt/php56/bin/php-config --extension-dir) cd: no such file or directory: /usr/local/cellar/php56/5.6.10/lib/php/extensions/no-debug-non-zts-20131226 why missing? , why php uses directory? how correct extension directory in makefile or php-config ?

curl - GET method PHP for accessing and displaying Information from web services -

i wish know how pass variable in http header field? tried code , returns me status 500 error . echo $token; curl_setopt($ch, curlopt_httpheader, array( 'content-type: application/json', 'x-auth-token: $token')); this error receiving: {"timestamp":1436349947368,"status":500,"error":"internal server error","exception":"java.lang.runtimeexception","message":"org.springframework.security.core.userdetails.usernamenotfoundexception: user name not found","path":"/api/customers/new"} i have stored token received web service in $token, can please tell me going wrong? looking forward response, thank you the problem seems use singl...

reporting services - Simple indicator comparing last two sums of a Matrix -

i have following matrix displaying datas of last 3 days: date 05/07/2015 06/07/20145 07/07/215 number 151 42 84 the field number in each column calculated using this: =sum(fields!number.value) what want simple indicator (an arrow going or down) comparing last 2 values of matrix. ie in case: 84 > 42 , have arrow going up . if tomorrow have this: date 06/07/2015 07/07/20145 08/07/215 number 42 84 35 35 < 84 , have arrow going down . i not sure wich value should put in value property of indicator last value , compare second last value... thanks help. i'm not sure can reference specific indices column group. if can change sql , add row number gives same row numbers values want compare can following. in example built simple table, grouped colgroup (which dates) , added row number based on colgroup. note : order clause on row_number function set desc no matter how many days show, r...

c# - ZipArchiveMode.Update never completes for very large files -

i have code, zipfilename existing zip file, sourcefile file want compress, , filename archive entry name. using (ziparchive archive = zipfile.open(zipfilename, ziparchivemode.update)) { await task.run(() => archive.createentryfromfile(sourcefile, filename, compressionlevel.fastest)); } this works great small files, no larger 50kb. these, file compressed archive no problem. can add many small files want way. but large files 1.8gb in size, memory consumption shoots several gb, , file never compresses archive. how can better handle compressing large files existing destination archive? note need use existing destination zip / archive file, , must .zip.

highcharts - Separate threshold for each column -

Image
is possible draw separate "threshold" line each column in "column chart"? yes, use renderer.path render lines. to find place render them, use point.plotx , point.ploty .

javascript - twbs-pagination Start page option is incorrect -

i need help. error when page count 0 "start page option incorrect" here code $rows = $employee->countdata($param); $per_page = 5; $pages = ceil( $rows / $per_page ); the value of $pages 0 this how pages using jquery.ajax var total_pages = data; var logid = '30'; $('#pagination') .empty() .removedata("twbs-pagination") .unbind("page"); $('#pagination').twbspagination({ totalpages: total_pages, visiblepages: 7, onpageclick: function (event, page) { $('#container').load('load_data.php',{page:page,id:logid}); } }); $('#container').load('load_data.php',{id:logid}); here load_data.php $page = isset($_post['page']) ? (int) $_post['page'] : 1 ; $id = $_post['id']; $per_page = 5; if($page == 0) $start = 0; else $start = ( $page - 1 ) * $per_page; $result = $emp->getpainatedata($id,$start,$per_page); thank in advance. ...

Django Testing: Does --keepdb reset changes made during tests? -

according django docs regarding tests, --keepdb flag preserve the test database future runs. https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-option---keepdb just clear, changes made database tests (ie: object.save() ) reset automatically? or these changes need reversed within tests? if you're using django's default testcase , tests run in transaction, rolled when tests finishes. if database supports transactions, won't have clean anything. if you're using django's liveservertestcase or transactiontestcase , tables truncated after each test, , initial data, serialized before test, reloaded test database. not preserve data migrated apps, unmigrated apps. the --keepdb option not special database. prevents test database destroyed, , if database found @ start of tests, used instead of creating new one. so, data somehow left in database when tests finish seen initial data. relevant if error or user interrupt prevents tests wit...

LDAP - filter records with two attributes equal (or different) -

i want filter ldap records find entries 2 attributes equal (also different). let assume have records userid. userid=10 userid=15 each record have name , surname , want filter people identical name , surname. i can filter people particular name using following filter (&(name=mark)(surname=mark)) but filter not correct (=(name)(surname)) nor this name=surname this not possible in ldap. ldap not support relational queries on attribute level of same entry. see ldap query basics .

websocket - Connection lost whatever the long poll's settings with crossbar.io -

i'm using crossbar test websockets , long polling. each time try using long-polling default transport, whatever settings set, "connection lost" every 2 seconds in console. way, works websocket. here's settings want test: on server site: { "lp": { "type": "longpoll", "options": { "request_timeout": 0, "session_tiemout": 0, "queue_limit_bytes": 0, "queue_limit_messages": 0 } } } on client side: var connection = new autobahn.connection({ transports: [{ url: [my url], type: "longpoll", max_retries: 1, initial_retry_delay: 1, retry_delay_growth: 3, retry_delay_jitter: 3 }], ... i'm using python on server side, chrome 43 default browser (also tested on firefox). is wrong in settings ? sorry, cannot replicate this. i'm using longpoll example ( https://github.com/crossbario/crossbarexamp...

mysql - MariaDB import some table from full database dump file -

how can import table full database dump file. example have database dump file include "categories,members,articles,prices,items". want import "categories,members" dump file. possible , how can this? code not working mysql -u root -proot mydatabase categories members < /data/fulldumpfile.dmp no. cannot specify table on mysql commandline tool. does dump file have create database mydatabase ? drop database mydatabase ? use mydatabase ? depending on there, saying mydatabase on mysql may not take effect. if see use , do mysql -u root -proot someotherdb < /... then rename table someotherdb.categories desireddb.categories, someotherdb.members desireddb.members; drop database someotherdb; otherwise, edit dmp file. (i don't think mariadb vs mysql matters question.)

java - What is a NullPointerException, and how do I fix it? -

what null pointer exceptions ( java.lang.nullpointerexception ) , causes them? what methods/tools can used determine cause stop exception causing program terminate prematurely? when declare reference variable (i.e. object) creating pointer object. consider following code declare variable of primitive type int : int x; x = 10; in example variable x int , java initialize 0 you. when assign 10 in second line value 10 written memory location pointed x. but, when try declare reference type different happens. take following code: integer num; num = new integer(10); the first line declares variable named num , but, not contain primitive value. instead contains pointer (because type integer reference type). since did not yet point java sets null, meaning "i pointing @ nothing". in second line, new keyword used instantiate (or create) object of type integer , pointer variable num assigned object. can reference object using dereferencing operator . (a dot...

java - how to pass data from not-main activity to thread -

i created object bluetooth-service, thread created, monitors data in queue. main-activity 1 activity created, can set data. how can pass data activity thread sending messages, withount passing object bluetooth-service? did think using static class save message need send, maybe use observer pattern (if needed) notifying thread has new message send

hadoop - Oozie to run job only in specified time frame -

i need sqoop in 600tb of data rdbms system , have in particular time frame midnight 12am morning 7am. since entire data cannot ingested in single day, need perform in batches. possible oozie terminate job 7am , restart failed job next day. it seems there no such feature in oozie. i'd try kill , start job using oozie-cli , cron.

php - How to display the data owned by a specific user? -

i working on following project : user able add book database. thing trying achieve displaying image of book particular user has added on user profile. when user logs in able see images of of books added. i have 2 tables called book & user field, id connected. if (isset($_session['user_id'])) { $msg = "you logged in.<br/><a href='index.php'>home</a>"; $msg = "<a href ='logout.php'>logout</a>"; } else { //user not logged in //check whether form input 'username' contains value if (isset($_post['username'])) { //retrieve form data $entered_username = $_post['username']; $entered_password = $_post['password']; //connect database include ("dbfunctions.php"); //match username , password entered database record $query = "select *from role,user user_name='$entered_username' , password = sha1(...

Underlined TextView Onclick is Not Working ,When Background Service is Running in Android -

i using alarm manager sending data server every 10 minutes. in same page using forgot password textview underline. when service running in background onclick event of textview not working. onclick of textview wants go next activity. but when service stops works fine. help me solve this. forgotpasword = (textview) findviewbyid(r.id.forgotpasswordtext); forgotpasword.setpaintflags(forgotpasword.getpaintflags() | paint.underline_text_flag); forgotpasword.settext("forgot password?"); forgotpasword.setonclicklistener(this); @override public void onclick(view v) { switch (v.getid()) { case r.id.forgotpasswordtext: intent intent1 = new intent(sign_in.this, forgotpassword.class); startactivity(intent1); break; } } log message while clicking text view 07-08 11:59:19.545: i/surfacetextureclient(3620): [0x535a3b28] frames:8, duration:3.041000, fps:2.630215 07-08 11:59:21.645: d/ipcthreadstat...

android - How to get separate key and value of hashmap without iteration -

here key difference of latitude , longitude , value list of string values. want separate key , value of hashmap. possible that??? please suggest me. mainactivity.java public void getexpandablelistdata() { cursor cursor = databasehelper.getloadmoredata(count); cursor.movetofirst(); string businessname; string latitude; string longitude; string categorydescription; double difference; log.i(tag, "cursor.getcount() :" + cursor.getcount()); { categorydescription = cursor.getstring(cursor .getcolumnindex("categorydesc")); log.i("categorydescription", "" + categorydescription); int categoryid = cursor.getint(cursor.getcolumnindex("categoryid")); log.i("category id", "" + cursor.getint(cursor.getcolumnindex("categoryid"))); listdataheader.add(categorydescription); log.w("list data hea...

wordpress - How to override a not plugable parent theme function from a non function.php file? -

i want reduce number of image files parent theme produces. after little research found need override function php file ( not function.php ) of parent theme, impossible because this function not pluggable (not wrapped in if (!function_exists()) condition). now, wrapped parent function in if (!function_exists()) condition , overridden in child theme function.php file. in described situation, possible override parent function not changing parent theme? ask here because not have reaction developer. i tried remove parent theme function next code in child theme , in plugin, didn't helped: function remove_fastnews_actions() { remove_action('after_setup_theme','kopa_front_after_setup_theme'); } add_action('after_setup_theme','remove_fastnews_actions'); //add_action('wp_loaded','remove_fastnews_actions'); this function need override (it bigger, keeped here need change): add_action('after_setup_theme', 'kopa_fro...

Ruby On Rails form token kick user after code is updated -

after update our ror application , user has opened form , submits form after code updated our ror application says invalid authenticity token , logs out user submitted form. is there way how solve , update our code without logging out our users when have submitted form after code updated?

Google BigQuery unable to process larger result set getting "Response too large to return" or "Resources exceeded during query execution" -

i working large table (~105m records) in c# application. when query table 'order by' or 'order each by' clause, getting "resources exceeded during query execution" error. if remove 'order by' or 'order each by' clause, getting response large return error. here sample query 2 scenarios (i using wikipedia public table) select id,title,count(*) [publicdata:samples.wikipedia] group each id, title order id, title desc select id,title,count(*) [publicdata:samples.wikipedia] group each id, title here questions have what maximum size of big query response? how select records in query request not in 'export method'? 1. maximum size of big query response? as it's mentioned on quota-policy queries maximum response size: 128 mb compressed (unlimited when returning large query results) 2. how select records in query request not in 'export method'? if plan run query might return larger results, can ...

android - Remove notification count when swiped away in drawer -

i have galaxy s5 running 4.4.2 rooted. when swipe away notification form notification drawer there anyway can make consider notification seen / read (or give me choice of whether mark seen or not) don't have go messages or calls or whatever , 'see' again?

ruby on rails 4 - How to get only place name,place id,latitude and longitude from google API? -

i want fetch place name, place id, latitude, , longitude google api. used following apis: response =httparty.get(" https://maps.googleapis.com/maps/api/place/nearbysearch/json?location= "+params[:place][:latitude]+","+params[:place[:longitude]+"&rankby=distance&types=food&key=aizasyad6vgkz7vo-nzlzp-xenopchor7repweu&fields=results") and https://maps.googleapis.com/maps/api/place/radarsearch/json?location=18.488091,73.813820&radius=500&types=bar|night_club&key=aizasyad6vgkz7vo-nzlzp-xenopchor7repweu but both giving lot of information me. there other api gives me fields mentioned above? well suggest use geocoder , reverse geocoder instead of api.

material design - Android - Applying Code to Tabs (Layouts) in SlidingTabLayouts -

i aspiring android developer not lot of experience , quite new field. of late, have been interested in implementing material design features in first (to-be-published) app, slidingtablayout. because trying support versions of android api 15, have used android support library , link build slidingtablayout. however, not able figure out how apply sort of java code specific layout tab_1.xml , tab_2.xml can apply onclicklisteners buttons, initialize textviews, etc... exist within layouts. as far have tested, cannot done in mainactivity because setcontentview mainactivity , not tab layouts, may wrong. once again quite new android development, appreciated! ps: can add kind of specific code if clarification needed asking. if understand correctly trying access different kinds of views within layout of tabs. don't have reputation comment on question. if possible please add code above. link gave see code public class tab2 extends fragment { @override public view oncre...

c# - Showing SQL server data on map in asp.net -

Image
i have projects demands implementing map interface. example have list of numerous patient in india show various disease. patient divided state wise. on execution disease should display map of india. state has highest number of patient in india should painted different color. map should paint top 5 states different color has highest number of patient. i have come code snippet displays static map of india. need fill colors in show top 5 states contain highest number of patient. the data stored in sql server 2008 <map id="latitude-and-longitude-map-of-india" name="latitude-and-longitude-map-of-india"> <area shape="poly" alt="jammu & kashmir" coords="184,143,177,138,171,139,171,134,156,127,153,101,163,95,164,89,159,87,160,82,151,78,150,74,142,74,144,67,151,60,162,59,160,55,166,58,172,53,176,54,177,55,183,53,193,65,204,72,206,77,215,80,215,84,226,82,236,76,241,76,243,72,246,76,254,76,259,80,257,97,252,98,251,100,248,101,2...