Posts

Showing posts from March, 2014

How to find the HTML URL of a Joomla Article? -

i created new article in joomla in existing website, not know how find url. search online told me can find article command http://domainname.com/index.php?option=com_content&view=article&id= ?? using specific id of article. while worked, want html url of article use landing page ad campaigns. how find url? simply, in administrator panel > menus > create new menu > add menu item , configure show single article , type alias (e.g. offers) in way single article reached adding hope helps

javascript - Different responsive layout handling -

i have problem responsive layout of site working on. senario: site has 3 different layouts desktop, tablet , mobile. have pretty same components (with css adjustments) can handled media query. requirement of client site has responsive , should adjust on resize of browser. problem: problem divs shift places in different layouts. let's div1 has subdiv1, subdiv2 nad subdiv3. in cases other div div2 have subdivs , subdiv2 of div1 has show between subdivs of div2. layouts' component positions differ on parent levels , that's causing lot of problem reguarding how handle it. solutions considering : create different themes based on user events: solution not viable because themes not responsive or if responsive not take layout approved clients. use jquery shifts components different parents on load , resize: might slow down our site , might have other problems. hide show different instances of same component css: solution pretty sounds bad. is there other soluti...

sublimetext2 - Sublime Text 2: How to disable auto indentation on new lines after brackets? -

i try work sublime text 2. in javascript, whenever type bracket , press enter, indentation added ("|" symbolizes cursor): if () { | if set "auto_indent" false in sublime text 2 settings, whenever type bracket , press enter, cursor moves beginning of line, : if () { | i want cursor moves @ same horizontal point bracket, this: if () { | do have idea me please? i'm not quite last example gave use above, i'll gave information know, hopefully, there useful you. according official indentation documentation , there "indent_to_bracket" option, may give shot. and know sublime text plugin called sublimebracketeer seems heavy lifting you. maybe can give shot.

SQL Select UserIds with a login on two different days -

it's kind of embarrassing, sounds pretty easy want, dont solution (and didnt find meaningful title, sorry if doesnt fit problem) imagine 2 tables in store user-infos , sessions user had system: table.users (uid, registeredat, gender, locale, ...) table.sessions (sid, userid, logindate, ...) what want list of unique user id's had @ least 1 session yesterday , today (eg 2013-08-26 , 2013-08-27). thing is, user can have more 1 session per day , dont want multiple userid's in results. tried lots of things think i'm not expert enough done. my problem understand how can select userid after comparing 2 rows according userid , date_yesterday , date_today. i'm curious solution experts have that. i hope description clear enough. thank in advance you use exists follows (each subquery ensures there login 1 day): select * users u exists ( select 1 sessions s s.userid = u.uid , s.logindate ...

c# - Receiving List in mvc controller -

when try receive list in controller, error: "error 1 non-generic type 'uppgift_1.models.iproduct' cannot used type arguments" how fix this, thought sending generic list.. ?? also , im not sure if correct or not: public ienumerable<myproduct> plist = new ienumerable<myproduct>(); sometimes compiler throw error, saying cant make plist = new ienumerable, ok. im not sure it.. ?? you snatch code here: https://github.com/xoxotw/mvc4_no1 and post here too: using system; using system.collections.generic; using system.linq; using system.text; namespace uppgift_1.models { public interface iproduct { iqueryable<myproduct> getproducts(); } } using system; using system.collections.generic; using system.linq; using system.web; namespace uppgift_1.models { public class myproduct { public int productid { get; set; } public string productname { get; set; } public double pricebuy { ...

android - Why on landscape/potrait orientation change fragments get attached before onCreate called on main activity? -

i have main activity embeds fragment: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); vd = virtualdatabasetableprovider.getinstance(getapplicationcontext()); fm = getsupportfragmentmanager(); fm.popbackstack(null, fragmentmanager.pop_back_stack_inclusive); //create layout , add fragments setcontentview(r.layout.main_window); listfragment listfragment= new listfragment(); android.support.v4.app.fragmenttransaction ft = fm.begintransaction(); ft.replace(r.id.fragment_pane, listfragment, "list"); //ft.replace(r.id.fragment_pane, listfragment); ft.addtobackstack(null); ft.commit(); //initialising buttons imgbtnfontinc = (imagebutton) findviewbyid(r.id.imgbtnupfont); imgbtnfontinc.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { ...

android - ListView not inflating -

good day all. i working on customized listview not inflating (is not becoming visible) inside activity. below xml , listview adapter classes. main.xml <linearlayout android:id="@+id/lllistview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingleft="5dp" android:paddingright="5dp" android:paddingtop="2dp" android:paddingbottom="2dp" android:layout_below="@+id/rlfirstrow"> <listview android:id="@+id/lverrorsreport" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/border"/> </linearlayout> listview_row.xml <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_widt...

sql - PostgreSQL timestamp index not used when cast to date -

this query: select i::date day, (select count(*) genericevent event = 'chat_message' , eventdate::date = i::date , extra1 = 'public') message_public_total, (select count(*) genericevent event = 'chat_message' , eventdate::date = i::date , extra1 = 'public' , extra2 = 'clean') message_public_clean generate_series('2013-08-01', '2013-08-27', interval '1 day') i have index human consider usable query (in fact should result in index-only scan): create index idx__genericevent__event__extra1__date on genericevent using btree (event collate pg_catalog."default", extra1 collate pg_catalog."default", eventdate); however, explain ed, postgresql doesn't deem so. uses event , extra1 index, not eventdate (see index cond lines): "function scan on generate_series (cost=0.00..145219698.17 rows=1000 width=8)" " subplan 1" " -> aggregate (cost=722...

Migrating Excel financial model to and Corkscrew calculation in Python Pandas -

i'm working on replacing excel financial model python pandas. financial model mean forecasting cash flow, profit & loss statement , balance sheet on time business venture opposed pricing swaps / options or working stock price data referred financial models. it's quite possible same concepts , issues apply latter types don't know them can't comment. so far lot of see. models work in excel have common time series across top of page, defining time period we're interested in forecasting. calculations run down page series of rows. each row therefore timeseries object, or collection of rows becomes dataframe . need transpose read between these 2 constructs trivial transformation. better yet each excel row should have common, single formula , based on rows above on page. lends vector operations computationally fast , simple write using pandas. the issue when try model corkscrew-type calculation. these used model accounting balances, opening balance 1 period ...

sql server - SQL Query to produce email list based on specific requirements -

i can't seem figure out best way this. logic: think of facebook example. if comment on post, following post should email, not me initial comment. should receive notification when others comment on post i'm following. posta: i'm following postb: i'm following posta: posted comment postb: else posted comment i should email postb not posta. next... postb: posted comment. i should not notification other person should. i'm using personalized email scheduler , here work-flow: i set run condition. i set recipients list using sql query. i create personalized inserts email (i.e. new comments on post you're following). i have 3 tables example: postfollowers (userid, email, postid) post (postid, message, notification_sent <- bit) postcomments (commentid, userid, comment, notification_sent <- bit) step1 : set run condition select * postcomments notification_sent = 0 if values returned application execute campaign. ste...

database - 3rd Normalization Form -- -

Image
there 2 tables in database 1 named folder , second user. user has few rights these folders folder visible user , not visible him. using 3rd normalization form normalize table. question want suggestion have normalized table correctly or not, secondly can normalize more or not? attached image below know normalization did. thank you! yes! achieved 3nf, since every non-key attribute (in case folder right ) depends on whole key (user_id, folder_id) , there no transitive dependencies. actually, table in 6nf too, since cannot decompose table further projections without losing information. :) since not aware of normal form beyond 6nf, i'd cannot normalize further.

Groovy script to Grails app -

well new groovy/grails. have written groovy script uses restclient make http post request jira server. post request sends jql query , receives result in json format. here's full code: import groovyx.net.http.restclient; import groovyx.net.http.httpresponsedecorator; import org.apache.http.httprequest; import org.apache.http.protocol.httpcontext; import org.apache.http.httprequestinterceptor; import groovy.json.jsonslurper; import static groovyx.net.http.method.* import static groovyx.net.http.contenttype.* @grab(value = 'org.codehaus.groovy:groovy-all:2.1.6', initclass = false) @grapes([ @grab(group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', version = '0.5.2'), @grabexclude('org.codehaus.groovy:groovy') ]) // connect jira def jiraapiurl = 'http://my-jira.com/rest/api/2/' def jiraclient = new restclient(jiraapiurl); // authentication def basic = 'basic ' + 'username:passwor...

qt4 - how to create a tray in QT like system tray -

i created qt application. in there several links connect other applications ms word, excel,ie etc. when corresponding button clicked, link application. want that, whenever particular application minimized, should go system tray of qt application ,not in system tray. have create system tray of qt. suggestions appreciated.thanks in advance. to create system tray icon qt application convenient way use qsystemtrayicon ( http://qt-project.org/doc/qt-4.8/qsystemtrayicon.html ), not sure how can force excel or word not minimize default tray instead go applications system tray icon's context menu.

windows - Passing arguments while launching program from browser -

i trying launch application (.exe) browser. the specific app needs 4 arguments/parameters when launching, are: firstname, lastname, id, info is there way add these arguments on internet explorer address bar when launch program? i mean this: "myapp:// -firstname -lastname -id -info" (i managed add arguments straight windows registry, worked way. thats no help... need them inputted when launching app ) i have added windows registry: [hkey_classes_root\myapp] @="url:myprogram protocol" "url protocol"="" [hkey_classes_root\myapp\defaulticon] @="\"c:\\myapp.exe\"" [hkey_classes_root\myapp\shell] [hkey_classes_root\myapp\shell\open] [hkey_classes_root\vsa\shell\open\command] @="\"c:\\myapp\" "%1" thanks already! hope knows how fix this... :) ps. im using windows 7 64 bit , internet explorer 10. you cannot pass multiple command line arguments application (unless they're...

html - BootStrap and Firebug/ -

i having issue firebug , chrome dev tools can not inspect single element of page when contains div bootstrap classes="navbar navbar-fixed-top". full page or individual elements of navbar can inspected. i assume common problem can not seem find documentation it. there work around issue?

iphone - Infinite scrolling on a sprite(Parallax) -

i newbie world of cocos2d developing first tutorial , facing 1 problem problem have image (1024 x 320) , orientation landscape need move image continuously right left purpose have used space shooter tutorial ray(thanks him) image doesn't seem appearing again , again. code is.. -(id) init { if( (self=[super init])) { cgsize screensize = [ccdirector shareddirector].winsize; // 1) create ccparallaxnode backgroundnode = [ccparallaxnode node]; [self addchild:backgroundnode z:-1]; // 2) create sprites we'll add ccparallaxnode = [ccsprite spritewithfile:@"bg_front_spacedust.png"]; //back.position=ccp(screensize.width/2, screensize.height/2); back.rotation = -90; back1 = [ccsprite spritewithfile:@"bg_front_spacedust.png"]; back1.rotation = -90; // 3) determine relative movement speeds space dust , background cgpoint dustspeed = ccp(0.1, 0.1); // 4) a...

java - How to create a Cypher Query engine within my interface? -

i trying implement easy interface make queries need within db couldn't figure out how it. interface has button , each time click wish have query executed on db , result jtextarea below working code import java.awt.eventqueue; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.io.file; import java.io.ioexception; import java.util.iterator; import java.util.list; import java.util.map; import java.util.map.entry; import javax.swing.jbutton; import javax.swing.jframe; import javax.swing.jlabel; import javax.swing.jpanel; import javax.swing.jtextarea; import javax.swing.border.emptyborder; import org.neo4j.cypher.javacompat.executionengine; import org.neo4j.cypher.javacompat.executionresult; import org.neo4j.graphdb.graphdatabaseservice; import org.neo4j.graphdb.node; import org.neo4j.graphdb.transaction; import org.neo4j.graphdb.factory.graphdatabasefactory; import org.neo4j.helpers.collection.iteratorutil; import static org.neo4j.kernel.im...

windows - WinExec with start command gives ERROR_FILE_NOT_FOUND -

in application, users can store command run @ point. right now, added "c:\program files\internet explorer\iexplore.exe http://www.google.com ". invoked using winexec function. now, when command changed "start http://www.google.com ", function returns error_file_not_found, while seems should work examples find online. winexec starting processes. trying best done asking shell work out program associated http:// , display url that. need call shellexecute or shellexecuteex . for example: shellexecute(0, null, "http://www.google.com", null, null, sw_showdefault); the reason start not work winexec start not executable. it's built in command handled interpreter, cmd.exe . use winexec if passed cmd.exe (or value of comspec environment variable) , got cmd.exe call start . that's wrong way it.

Flask-login+SQLAlchemy use token for login system couldn't read token -

i want use flask-login(use token)+sqlalchemy build login system. read flask-login offical document , similar article( http://blog.thecircuitnerd.com/flask-login-tokens/ ) , build login system. when run run.py, login use user in database, can read user.id via page. when add code program, found token not work! because never see text "<<<<<<<<<<<<<<<----------get token-------------<<<<<<<<<<<<<<<<<<<<<" , "<<<<<<<<<<<<<<<----------load token-------------<<<<<<<<<<<<<<<<<<<<<", add procedure get_token , load_token. is there wrong in code? ##################################models.py###################### class user(base,usermixin): __tablename__ = 'users' id = column(integer, sequence('seq_user_id'), primary_key=true) nam...

mPDF - Execute PHP code and save it as pdf -

i found many questions topic, there no real answers. know how execute php script , save result in pdf using mpdf or other library? there no problem when have static html, can't when need server side processing , save result pdf. basically, need display .svg images in specific order. i used wkhtmltopdf such things. application not library. http://code.google.com/p/wkhtmltopdf/ but dont see makes difference between php , standard html . can allways file_get_contents(' http://server.com/script.php '); can save data html , please it.

racket - PLT Web Server with multiple virtual hosts -

friends, tell me please how make multiple virtual hosts in plt web server comes racket programming language? read docs didn't find detailed information on topic examples. thank you! doesn't plt web server request structure include hostname used contact host? should possible dispatch on this. this not example code, sorry....

pointers - How to pass device function as an input argument to host-side function? -

i want pass device function argument of host function, of cause, host function can launch kernels device side function. i tried usual c++ way (pass pointer/reference) , cuda debugger told me kernel cannot launch. update: what want is: __host__ void hostfunction(int a, int (*devicefunction)(int)) { /...do something.../ somekernel<<<blocks, threads>>>(int * in, devicefunction); } and launch host with: hostfunction(x, &somedevicefunctiontemplate<int>); it'd helpful if post example of trying do, 1 thing check compiling , running on fermi (sm_20) or later since older gpus did not support non-inlined function calls. check compute capability of device (needs 2.0 or later) , check nvcc command line (needs -arch=sm_20 or later, or -gencode equivalent).

php - WooCommerce - Percentage Discount in products categories widget -

need custom output of woocommerce products categories widget showing percentage discount category (discount_price*100/standard_price). can create function takes first product of category: discount price standard price and calculate percentage discount, don't know how show in output of widget this: first category (50% discount) second category (30% discount) can me? thanks looks entry point filter woocommerce_product_categories_widget_args . output done via wp_list_categories , guess you'll have custom walker achieve want. or duplicate widget code , make custom one.

google app engine - GAE - Java - Best way to do a query filter "LIKE" -

in gae datastore have "person" entity name, surname , country i need query "select * country name '%spa%'" this answer offers solution this: query query = new query("person"); query.addfilter("name", filteroperator.greater_than_or_equal, "pe"); query.addfilter("name", filteroperator.less_than, "pe"+ "\ufffd"); but don't have success, return 0 results... i'm missing something? it seems alternative useing " search api ", but... how migrate data of "persons" in datastore new document search? any solutions? thanks that answer not same question. query provide prefix query: ie names start with "pe". seem want query names contain "pe" anywhere, not possible reasons explained in accepted answer question. the search api indeed answer doing this, , details of how create documents represent datastore objects contained in link p...

I need get string from string in JavaScript -

i need string string, js code. example have string "bla bla bla, minuon [script]document.getelementbyid; var = "a";[script]"; i need function return "document.getelementbyid; var = "a";" . thanks. assuming have 1 instance of [script] tags, can this: var string = "bla bla bla, minuon [script]document.getelementbyid; var = \"a\";[script] more"; var result = string.split("[script]")[1]; [0] before first script tag, , [2] after second.

spring - how to add @onetoone mapping for self entity in hibernate -

how add one-to-one mapping self entity. in example. want have parent-child relationship person itself. @entity @table(name="person") public class person { @id @column(name="personid") private int id; @onetoone @joincolumn() private person parentperson; } here example of bidirectional self mapping @onetoone (i change column names sql notation): @entity @table(name="person") public class person { @id @column(name="person_id") private int id; @onetoone @joincolumn(name = "parent_person_id") private person parentperson; @onetoone(mappedby = "parentperson") private person childperson; } but, don't understand why want use @onetoone in case.

java - Android, Continuous Voice Recogntion and error IO Exception -

i have trouble vr continuous. in code there fragment implement vr. it works sometime saw without apparent reason stops. no error, no crash, i'm able restart taping on button 2 time. log doesn't help, got byt logcat 08-27 23:46:00.708 i/audioservice(433): audiofocus requestaudiofocus() android.media.audiomanager@422819d8com.google.android.voicesearch.audio.audiorouterimpl$1@4229e1a8 08-27 23:46:00.755 i/vs.g3enginemanager(15890): create_rm: m=endpointer_dictation,l=en-us 08-27 23:46:00.770 i/vs.g3enginemanager(15890): brought new g3 instance :/system/usr/srec/en-us/endpointer_dictation.config for: en-usin: 13 ms 08-27 23:46:00.848 w/sidekick_locationoracleimpl(15890): best location null 08-27 23:46:00.856 w/sidekick_locationoracleimpl(15890): best location null 08-27 23:46:01.505 i/activitymanager(433): start proc com.devexpert.weather broadcast com.devexpert.weather/.view.widgetweather2x1: pid=16138 uid=10071 gids={50071, 3003, 1015, 1028} 08-27 23:46:01.911 w/recog...

node.js - Client Side JavaScript and database interaction -

i have been working on large project 4 months. have "lead" question. the rules of project (from customer has no background in it) are only javascript used (kendo ui package crud). it "secured" sso - adfsv2/acs it must have use odata interact database. please correct me if wrong, not mean a. insecure. (after initial login) b. how can kendo handle database interaction (correctly) if must update multiple tables? there programmer working on similar project , using node.js web app interacts database. doesn't suffer similar issue? how client side crud work security , accurately? correct me if wrong, seem me think javascript directly access database. for see, javascript used manage ui, , contact (with ajax ?) server update/create/delete entities. it isn't insecure, developers must ensure requested user's action permitted (on server side). example : delete requested url https://myserver/myapp/person/1 , user can modify url htt...

php - jQuery callback function not working -

when type in text box, nothing happens. this html file: <!doctype html> <html> <head> <meta charset="utf-8"> <title>post/get data (http request)</title> <script type="text/javascript" src="js/jquery-2.0.3.min.js"></script> </head> <body> <input type="text" id="name" /> <div id="name_feedback"></div> <script type="text/javascript" src="js/functions.js"></script> </body> </html> this jquery: $(document).ready(function(){ $('#name').keyup(function() { var name = $('#name').val(); $.post('php/process_name.php', { "name": name }, function(data) { $('#name_feedback').html(data); }); }); }); this php: <?php if(isset($_post['na...

ruby on rails - Override PasswordsController in Devise to change password when the user is already signed in -

i want add feature app in when user signed in can change password clicking on change password link.but when click on link redirects current page. <%= link_to 'change password', edit_user_password_path %> can tell me solve problem? because can't write comment (my reputation low) i'll write answer instead. take here: rails devise edit_user_password_path this should solve problem. in short: devise passwordscontroller can used if user signed_out.

php - Flushing output to browser, carriage return and overwrite? -

i'm experimenting here output buffering , stuck on carriage returns, overwrites. basically, if run snippet in cli: <?php $times = 5000; ($i = 1; $i <= $times; $i++) { echo chr(13) . sprintf('running step %d/%d...', $i, $times); } it stay on line 1 , overwrite contents actual step information. like, on first step console output be: > php micro.php running step 1/5000... on step 3333: > php micro.php running step 3333/5000... after completition: > php micro.php running step 5000/5000... > as can see, in total, program have consumed 1 line it's output. now, if tweak script browser , request browser: <?php header('content-type: text/plain; charset=iso-8859-1'); $times = 50000; ($i = 1; $i <= $times; $i++) { echo chr(13) . sprintf('running step %d/%d...', $i, $times); flush(); ob_flush(); } i output while script being processed, but, not overwritten. like, on ...

bash - How to check the first character in a string in unix -

i'm writing script in unix have check whether first character in string "/" , if is, branch. for example have string /some/directory/file i want return 1 and server@10.200.200.20:/some/directory/file this return 0 how can proceed this? many ways this. use wildcards in double brackets: str="/some/directory/file" if [[ $str == /* ]]; echo 1; else echo 0; fi you can use substring expansion: if [[ ${str:0:1} == "/" ]] ; echo 1; else echo 0; fi or regex: if [[ $str =~ ^/ ]]; echo 1; else echo 0; fi

How to check my permissions in JIRA? -

in order edit version numbers project in jira, need 'project admin' permission. how can check if have permission? can list of project permissions? (i can see list of groups belong on user profile, not permissions associated group) edit: according documentation permission "administer projects" needed edit project versions. there several ways check if has permissions. easiest 1 use jira admin helper functionality available within jira of version 6 (see troubleshooting permissions jira admin helper ), , freely available add-on atlassian labs jira 5.0 - 5.2.11. within jira 6 (or jira 5 after installing add-on), go jira administration, , find admin helper. it's pretty self explanatory. lets check whether can operations on project, , tells why, or why not.

css - Custom list item background wrapped around floated element -

i have issue when using custom list image/ icon getting hidden behind floated element list wraps around. http://jsfiddle.net/v8evm/ html <div> </div> <ul> <li>this list item no 1</li> <li>this list item no 2. list item no. list item no. list item no. list item no. list item no. list item no.</li> <li>this list item no 3</li> </ul> css div { background: rgba(0,0,0,0.8); float: left; width: 100px; height: 40px; margin: 0 20px 10px 0 } li { padding-left: 1.3em ; } li:before { content: "i"; display: inline-block; margin-left: -1.3em; width: 1.3em; } note: not want add mark, css only. i have tried without negative margin ( http://jsfiddle.net/9qwge/ ) causes long list appear under icon ul { display: table; /* or table-cell */ } table : behaves <table> html element. defines block-level box. source http://jsfiddle.net/pwqzs/1/

iphone - App launched from the first screen from the foreground ios -

when pressing "home" button, app calling - (void)applicationwillresignactive:(uiapplication *)application , ok good, when wait time (10-15 mins), app starting first loading screen, why? have added: [uiapplication sharedapplication].idletimerdisabled = yes; but not success. think goes suspended mode, how prevent this? thanks. it means app has been killed system. can't prevent completely, system kills background apps when needs more memory, can this: free memory can when app goes in background: doing this, when system needs memory, app won't 1 of first killed because footprint low. since can't sure app won't killed, use state preservation / restoration: link edit: since app needs reproduce audio in background (as written in comments) give advices. remember register app background mode (from link: multitasking guide ) --> "by including uibackgroundmodes key (with value audio) in info.plist file" the app continues work in...

how can I make two encodings be the same? -

Image
i have 2 text files in 2 different encodings. sample image of content of each file (when doing "cat file" on mac) given below. i know these 2 files contain information in chinese. trying 2 files agree on encoding. when use "file -i filename", iso-8859-1 second image , utf-8 first one. then, try using iconv -f iso_8859-1 -t utf-8 (this 1 not change file) or iconv -f utf-8 -t iso_8859-1 (this 1 gives "cannot convert" error while scanning file, first time hits chinese character in first image). neither of these commands work. any ideas how normalize these 2 text files have same encoding?

linux - Counting lines starting with a certain word -

how count number of lines in text file starting word? i not want use sed , wc -l . better solution? try this:- awk '/^yourwordtofind/{a++}end{print a}' file

html - Can't get jQuery .each() to work -

i have html code in 3 sections of page: <div class="pjesmarrje"> <a href="#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeuricomponent(location.href),'facebook-share-dialog','width=626,height=436'); return false;"> <div></div> <span>kliko këtu për pjesëmarrje</span> </a> </div> and, trying change background image of div inside when clicked. got jquery code: $(document).ready(function() { $(".pjesmarrje").click(function() { $(".pjesmarrje div").css("background-image", "url(images/mumanin_s2.png)"); }); }); when click 1 of elements, others background images changed too. don't want happen, want bg image changed when particular element clicked. tried use .each() function, didn't work. any appreciated. thanks. you're losing referred scope . if want...

api - list all google+ pages owned by "me" -

Image
is possible list google+ pages owned "me" after being authenticated? i've searched on official documentation, here: https://developers.google.com/+/api/ doesn't seem possible. i reckon function must implemented somewhere it's displayed in google's switch account panel, it's not exposed public?

excel - What is the meaning of t="array" for a formula element -

currently analyzing sheet1.xml file extracted excel 2007 .xlsx file. find following entry: <c r="d2" s="3"><f t="array" ref="d2">a2:a3+b2:c3</f><v>0.30000000000000004</v></c> what meaning of t="array" ref="d2" property in <f> element? thanks alan ecma-376 part 1 section 18.3.1.40 on <f> (formula) says: array (array formula) array formula. array formula single formula, applied across range of 1 or more cells. array formula can return multiple results 1 single calculation, results spanning cells in contained the ref range array formula applies. in case 1 cell.

in app purchase - Does iOS keychain storage persist when restoring an app to a new device? -

Image
my question directly related 1 different: ios: keychain on new devices or on restores . the poster curious if store information in keychain storage, backed itunes , icloud when restore device data persisted. partial answer op's own question was: but read keychain restored if backup encrypted in itunes (don't know icloud backups). the accepted answer was: you can transfer data using icloud, not secure! save data encrypted on server , let app read data solution. btw. shouldn't save sensible data unencrypted in keychain. keychain can read easy after jailbreak. is whether backup encrypted or not determined developer's access encrypt data in code or how itunes or icloud user handles backups? answer important me because trying set initial launch date of app determines how long before have resubscribe in-app subscriptions. piece of information must shared between old , new devices , remain on single device if app removed time period. the follo...

iphone - How to disable the row selection after specific no of counts in UItableview -

i wanted disable uitableview cell selection after selecting 10 rows in multiselect uitableview, after deselecting rows again user able select uitableview cell. can please suggest me, how can this? thanks in advance. implement willselectrowatindexpath:indexpath: - (nsindexpath *)tableview:(uitableview *)tableview willselectrowatindexpath:(nsindexpath *)indexpath { if (tableview.indexpathsforselectedrows.count < yourmaxrowselectedcount) { return indexpath; } else { return nil; } }

html - How to align `button-group` horizontal in the centre of the column div? -

<div class="row"> <div class="large-12 columns"> <ul class="button-group "> <li><a class="tiny secondary button" href="#">3 months</a></li> <li><a class="tiny secondary button" href="#">6 months</a></li> <li><a class="tiny secondary button" href="#">9 months</a></li> <li><a class="tiny secondary button" href="#">1 year</a></li> <li><a class="tiny secondary button" href="#">2 years</a></li> </ul> </div> </div> i tried add text-center ul , large-centered column without success. i believe there class in foundation centre group of buttons, not find it. http://jsfiddle.net/vzdby/1/ make ul fit li 's using display: inline-block , give text-a...

php - Upload XML file and pass into array stored in cookie -

i've seen snippets of code on how create associative array xml file, i'm unsure on how have system user can upload own xml file, , creates associative array uploaded file , stores array inside of cookie. any appreciated. does have associative array? otherwise check out simplexml_load_file($filename)

asp.net mvc - Validating a pure HTML form in mvc -

is there way validate pure html form in view no model in mvc? my view looks @using (html.beginform("upload", "picture", formmethod.post, new { enctype = "multipart/form-data" })) { @html.antiforgerytoken() <a class="uploadlink" style="cursor:pointer" onclick="document.getelementbyid('file').click();">open</a> <input type="file" name="file" id="file" style="opacity:0" onchange="document.getelementbyid('title').value = this.value.substring(this.value.lastindexof('\\') +1 );"/> <br /> <input type="text" name="title" id="title" /> <br/> <textarea name="desc" id="desc"></textarea> <br/> <input type="submit" value="save" /> } my controller loo...

android - What is the best option in my case? -

so want display dialog on screen when sms received , remove screen after 5 seconds have ability click on , cancel timer keep on screen. learned have few options here. use handler, timer or alarmmanager (any others?) best in case? can give example on how use whichever best option is? since need bubble view in facebook chat here simple example how it, need customize solution: start createing layout view like: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@android:color/black"> <textview android:id="@+id/textview1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:lines="4" android:textcolor="@android:color/white" /> <linearlayout android:layout_width=...

linux - How to change the fd associated with the stdin file descriptor? -

i want associate pipe's write fd stdout. int pfds[2]; char buf[30]; if (pipe(pfds) == -1) { perror("pipe"); exit(1); } want associate pfd[1] stdout of process. i understand, can use freopen redirect stdout file. hoping similar this. dup2(2) easiest way: dup2(pfds[1], stdout_fileno);