Posts

Showing posts from September, 2014

ios - Query a GeoPoint from Parse and add it to MapKit as MKAnnotation? -

i trying query array of pfgeopoints stored on parse backend. have pfobject in parse called "post", data assigned such "location", "title", "message", etc. everything being sent parse upon posting app , stored in backend. having issues retrieving properties of "post" pfobject parse , storing them mkannotation on map. here mapviewviewcontroller: import uikit import parse import corelocation import mapkit class mapviewviewcontroller: uiviewcontroller, mkmapviewdelegate, cllocationmanagerdelegate { @iboutlet var mapview: mkmapview! var mapviewlocationmanager:cllocationmanager! = cllocationmanager() var currentloc: pfgeopoint! = pfgeopoint() var posttitle: string! var postbody: string! override func viewdidload() { super.viewdidload() mapview.showsuserlocation = true mapview.delegate = self mapviewlocationmanager.delegate = self mapviewlocationmanager.startupdatinglocation() mapview.setusertrackingmode

passing parameters through link_to method in ruby on rails 4 -

i have index view shows available classes want link "sign class" redirects me "sign up" form , fill other values , when sign created saves values filled plus foreign key of class passed via link method classes index: <h1>listof classes</h1> <table> <thead> <tr> <th>id</th> <th>name</th> <th>description</th> <th>actions</th> </tr> </thead> <tbody> <% @classes.each |class| %> <tr> <td><%= class.id %></td> <td><%= class.name %></td> <td><%= class.description %></td> <td><%= link_to 'sign up!', new_sign_up_path(:class_id => class.id), method: :post %></td> </tr> <% end %> </tbody> </table> sign_up controller: class signupscontroller < applicationc

git - Abort merge using JGit -

this pretty straightforward: how simulate command git merge --abort in jgit? need "preview" conflicts prior real merge there no direct equivalent git merge --abort in jgit. code snippet may serve starting point: // clear merge state repository.writemergecommitmsg( null ); repository.writemergeheads( null ); // reset index , work directory head git.wrap( repository ).reset().setmode( resettype.hard ).call(); it empties merge state files , resets index , work directory contents of current head commit. in order test if 2 commits can merged, use in-core merger . avoid checking out conflicting commit work directory reset them later on. revcommit parentcommit = mergecommit.getparent( 0 ); revwalk.parseheaders( parentcommit ); resolvemerger merger = ( resolvemerger )mergestrategy.resolve.newmerger( repository, true ); merger.setworkingtreeiterator( new filetreeiterator( repository ) ); merger.setbase( parentcommit.gettree() ); if( !merger.merge( headcommit,

iphone - Promotion code for iOS in-app purchases -

i'd offer 100% discounts via 1 time use coupons on iaps. can done? , more 100 of them, think number of coupons apple allows. goal generate future iaps introducing players don't use them try them. from i've been able tell, seems apple doesn't officially allow iap promotion codes. from: https://developer.apple.com/app-store/review/guidelines/#purchasing-currencies 1.1 apps unlock or enable additional features or functionality mechanisms other app store rejected 11.2 apps utilizing system other in-app purchase api (iap) purchase content, functionality, or services in app rejected see also 1) https://forums.coronalabs.com/topic/37264-rejected-by-apple-cause-of-promo-code-custom-solution/ 2) how create promotion code ios in-app purchases if still want power ahead , this, 1 way url scheme. briefly, enable app respond like: myappname://... when url present in email being read using apple mail app, or when url typed safari. then, app examin

getting audio element to play after a pause not working in jquery -

i trying audio element able played , paused many times user hits button. far can audio play after first push turns icon pause. if user clicks again pause audio , turn icon play button. after cannot work anymore. html <a href="'.$row['audio'].'" target="_blank"><i class="fa fa-cloud-download"></i></a> <a href="#" class="fa fa-play button-play"><audio src="'.$row['audio'].'" id="mytune1" class="mytune1" preload="none"></audio></a> jquery $(document).on("click", ".button-play", function() { var audioelement = $(this).find('.mytune1')[0]; $(this).blur(); $(this).addclass("active"); $(this).removeclass("active"); $(this).replacewith('<a href="#" class="fa fa-pause button-pause"><audio src="'+audioelemen

haskell - Yesod on Windows -

i trying run command yesod init. yesod library in haskell. tried install library using cabal install alex happy yesod-bin, library works when running in ghc, id use command line program yesod. i looked here yesod init command not work on windows but couldn't find of files in question. found folder cabal executable (c:\program files\haskell platform\2014.2.0.0\lib\extralibs\bin) contains alex , happy not yesod. the interesting thing can keep reinstalling yesod-bin (which can't yesod). figured means should read cabal configuration file couldn't find , not sure do. when install programs using default haskell platform, default install location on windows is c:\users\superawesomeuser\appdata\roaming\cabal\bin opening command prompt , typing cabal install alex happy yesod-bin installed yesod in location me.

ubuntu - How to disable Kernel Module Signing in linux -

i'm working real time scheduler developed @ university , when run "module verification failed: signature and/or required key missing - tainting kernel". i've learned might because of kernel module signing. possible dissable on ubuntu? i'm using ubuntu vmplayer. module signing enabled within kernel configuration file starting kernel version 3.7, can disable running make menuconfig within kernel source directory , deselecting module signature verification option within enable loadable kernel module menu option. after have recompile kernel.

.htaccess - htaccess rewrite get url section not working -

i trying rewrite url example.com/parts/toolbucket/part.php?id=1 example/toolbucket/part/1 i have of .htaccess working last part of rewrite doesn't work. this .htaccess options -indexes rewriteengine on rewritebase / rewritecond %{http_host} ^www.example.com$ [nc] rewriterule ^(.*)$ https://example.com/$1 [r=301,l] rewritecond %{the_request} \s/parts/([^\s]+)\s [nc] rewriterule ^ %1 [r=301,l] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.+)$ /parts/$1 [l,qsa] rewritecond %{the_request} ^[a-z]{3,}\s([^.]+)\.php [nc] rewriterule ^ %1 [r,l] rewritecond %{request_filename} !-d rewritecond %{request_filename}.php -f rewriterule ^(.*?)/?$ $1.php [l] rewriterule ^toolbucket/([0-9]*)$ ./part.php?id=$1 any ideas? because missing directory part in rule. if want url example.com/toolbucket/part/1 replace rewriterule ^toolbucket/([0-9]*)$ ./part.php?id=$1 with this. rewritecond %{request_filename} !-d rewritecond %{re

css - How to do an inline comparison condition to apply a class in emblem? -

i want this: li class={aproperty=="alpha":active} plain text where using property, , seeing if matches value, opposed simple boolean. what valid emblem syntax this? syntax docs show boolean property conditions, , doing example results in browser errors , compile errors. unfortunately handlebars , emblem both work on booleans. disagree design decision, have jump through hoops add helpers handle them, , syntax isn't clean. afaik, way via bool property. in controller: apropertyalpha: function() { return this.get('aproperty')==='alpha'; }.property('aproperty') in template: li class={apropertyalpha:active}

java - Changing color of shape Java3D -

i trying change colour of cylinder create java3d yellow instead of standard grey/black. code seems correct shape remains black whole time, here is: protected branchgroup createsphere(/*color color*/) { branchgroup bg = new branchgroup(); bg.setcapability(branchgroup.allow_detach); appearance app = new appearance(); color3f color = new color3f(color.yellow); color3f black = new color3f(0.0f, 0.0f, 0.0f); color3f white = new color3f(1.0f, 1.0f, 1.0f); app.setmaterial(new material(color, black, color, white, 70f)); bg.addchild(new com.sun.j3d.utils.geometry.cylinder()); bg.setuserdata("sphere"); return bg; } you never apply appearance cylinder cylinder mycylinder = new com.sun.j3d.utils.geometry.cylinder(); mycylinder.setappearance(app); bg.addchild(mycylinder);

android - Get Current Visible Fragment From Activity -

in (now deprecated) actionbaractivity , want find out fragment visible can call method inside correct one. i doing says cannot cast fragment of 3 custom fragments created: if (requestcode == 99) { fragment f = getfragmentmanager().findfragmentbyid(r.id.main_frag); if (f instanceof gasfragment) { // call method } else if (f instanceof oilfragment) { // call method } else if (f instanceof vehiclefragment) { // call method } } i have added tag name each fragment researching "find fragment tag " , have not found on front either. basically code above inside onactivityresult . catch result , above block of code. note : above code second method accomplishing same thing have gotten neither option work. originally, opened settingsactivity inside nav drawer , used startactivityfromresult() . wanted result caught inside open fragment call relevant method. however, unable catch result fragment 's onactivityresult

Is there any simple C++ example on how to use Intel MKL FFT? -

i need perform fft , inverse-fft transformations. input vector , matrices of double. ideally, output should array of std::complex can live double _complex. i haven't found simple example, intel examples doing lot of things @ once without enough comments. i want simple example in c++ taking vector (or matrix) of double input , outputting fft-transformed result (ideally std::complex). i ended testing several things , ended 3 functions want , considered simple examples. i tested against inputs , had results. haven't done extensive testing though. //note after each operation status should 0 on success std::vector<std::complex<float>> fft_complex(std::vector<std::complex<float>>& in){ std::vector<std::complex<float>> out(in.size()); dfti_descriptor_handle descriptor; mkl_long status; status = dfticreatedescriptor(&descriptor, dfti_single, dfti_complex, 1, in.size()); //specify size , precision

Removing the white space in a CSS used on a mobile menu in a web site -

i'm styling mobile version of website using css, , @ top menu has white space. want white space blank, or blue. i have tried change it, has changed entire menu transparent or blue. is there way change this, or there way add blue block appears @ top, behind logo , behind menu toggle, in front of white blank space? the site www.sassco.co.uk , can see issue when collapse mobile. .navbar-inner { background-image:none; border:none; } took me awhile figure out bar was. needed change? edit: after changing top bar background color new css effected dropdown links background color. fix , change dropdown list background color use css below. style anchor tags: #fav-navbar-collapse li { background: rgb(230,230,230); }

osx - Neovim builds failing on OS X 10.10.2 -

i should mention posted issue on neovim's tracker, hasn't been getting ton of traction there lately , i'm beginning suspect it's more issue setup rather neovim itself. essentially, had stopped building neovim nightlies few months. having heard it's getting integrated terminal support decided rebuild using latest source, persistent, odd error. no matter build settings are, boils down make hitting error when has compile file called loop.so . hadn't noticed issue other software try build, suspect issue environment. does here know file's role is, , why compilation failing @ point? you might need install full xcode app , not command line. fixed issue me.

apache - htaccess to redirect to dead links to 404 -

we migrated 1 domain another. redirected valid urls counterpart on new site. however, there quite few links valid on old domain don't exist on new domain. (e.g. pages/links outdated didn't migrate them) for example, had blog component on old domain generated lot of dynamic links /blog/category/abc , /blog/tag/xyz. no longer have blog component on new domain. using htaccess, best way make sure google , other se's correctly aware these pages/links no longer exist? the correct http status code send 410 gone code. quote rfc2616 (emphasis mine): the requested resource no longer available @ server , no forwarding address known. condition expected considered permanent . clients link editing capabilities should delete references request-uri after user approval. if server not know, or has no facility determine, whether or not condition permanent, status code 404 (not found) should used instead. response cacheable unless indicated otherwise.

wpf - Closing Settings dialog causes application to quit -

so here's setup. have standalone wpf application i've built vb. contained in application 2 windows, mainwindow , settingswindow , opens dialog , called subprocedure in mainwindow.xaml.vb on event of clicked "settings" button (i working code-behind better xaml if can it). in settingswindow.xaml.vb , have subprocedure handling event of clicking close button in window. executes me.close() . intent close settingswindow , return focus mainwindow , instead, entire application terminates. additionally, clicking close button in mainwindow closes mainwindow , doesn't terminate application in visual studio's debug mode, while closing settingswindow does. when building application , running outside of visual studio (running .exe in windows), closing settingswindow returns mainwindow intended, attempting re-open settingswindow causes entire application crash. i'm relatively new visual studio, , can post code needed. ahead of time help. first, her

c++ - Missing constructor for initialization for map -

i had on previous topic, had change map use int in combination strings. when have done gives me different issue. issue: src/main.cpp:11:29: error: no matching constructor initialization of 'std::map<int, std::string>' ...tagmap {{"1", "data"}, {"2", "entry"}, {"3", "id"}, {"4", "content"}}; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ it seems issue (which looked on topic) seems allude fact issue making constructor take const references? don't understand how implement this. #include "pugi/pugixml.hpp" #include <iostream> #include <string> #include <map> int main() { pugi::xml_document doca, docb; std::map<std::string, pugi::xml_node> mapa, mapb; std::map<int, std::string> tagmap {{"1", "data"}, {"2", "entry"}, {"3", "id"}, {"

C#: Why can't I pass 'this' as a constructor argument to a base class? -

you can't pass this argument base constructor - see e.g., c# language specification section 10.10.1 constructor initializers (last line on page). i don't understand limitation , to. in c#, opposed c++, instance being constructed @ actual type , "everything works" (though of course not initialized; mean virtual functions called in derived class' constructor execute derived class' methods). base classes allowed call virtual methods on though derived class' override executed , derived class might not ready it; that's not ruled out. reason restriction? (in c++ allowed 3 reasons. first, user or derived class supposed know doing. second, user of c++ supposed know doing. , third, if user doesn't know doing c++ philosophy give him rope requires hang himself, , facilitate him when ties knot. like philosophy!) what i'm trying do, way, construct initialized list members in circularly-linked list. there's base class element field

visual studio 2012 - How to create .exe file of my vb.net application -

i have developed application on visual studio express 2012 (trial version) working expected on system unable decipher how share application colleagues. got know have create .exe file run on other systems. please suggest me something. the output typically in 1 of these directories based on build configuration unless manually changed build directory: [project root directory]/bin/debug/x86 [project root directory]/bin/debug [project root directory]/bin/release/x86 [project root directory]/bin/release when send program colleagues may need include of other files in directory, particularly .dll files if used external libraries.

java - Mapreduce tasks not running in parallel in pseudodistributed hadoop -

i using hadoop on single node cluster in pseudodistributed mode. system has 16 cores, hadoop runs 1 map or reduce task @ time, not utilizing cores. changed conf/mapred-site.xml following still doesn't work. can tell me can problem , solution. <configuration> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> </property> <property> <name>mapred.tasktracker.map.tasks.maximum</name> <value>4</value> </property> <property> <name>mapred.tasktracker.reduce.tasks.maximum</name> <value>4</value> </property> <property> <name>mapred.map.tasks</name> <value>4</value> </property> <property> <name>mapred.reduce.tasks</name> <value>4</value> </property> </con

ios - Xcode - Adding constraints to UITableView so that it fits all screen sizes -

i've read quite few tutorials , watched numerous videos on using constraints in xcode. reason, i'm still missing aspects necessary make user interface way it's supposed screen sizes. currently, have uitableview laying on view controller. view controller set "inferred" size , have of different sized devices open in assistant editor preview right can view changes. i've encountered multiple problems attempting constraints correct different screen sizes. problem 1: uitableview has width set 600. causes dead space right of table view on ipad preview , causes uitableview extend far on smaller devices. if make width of table view smaller fits within preview of screen sizes , pin left , right edges of table view edge of superview specifying 0 , unchecking constrain margins, result i'm seeing in preview entire table view disappears each device size. surprised because thought pinning table view margins, make table view fit within each of screens. problem 2

linux - Compile existing C++ code to run in DOS -

i have app in c++ copies files user's hdd. use hiren's bootcd on flash drive launch minixp , run app under that, load times kind of slow, thought of adding app in dos image came disk. problem app not run because "this app cannot run in dos mode". how can run application under dos or possibly other operating system boot quick enough usb drive? my app console application, , it's code is: #include <iostream> #include <fstream> #include <windows.h> #include <string.h> #include <sys/stat.h> #include <stdio.h> #include <io.h> #define max 256 using namespace std; string systemdrive; string users[max];int userscontor=0; bool choosew7orxp; void menu(); bool exists(const std::string& dirname_in) { dword ftyp = getfileattributesa(dirname_in.c_str()); if (ftyp == invalid_file_attributes) return false; //something wrong path! if (ftyp & file_attribute_directory) return true; // directory! return f

python - How to convert a tuple (in place) to first item in list? -

i have boiler plate code performs sql queries , returns results (this based off of working code written years ago else). generally, code return list of tuples, totally fine need. however, if there's 1 result, code returns single tuple instead, , breaks code expects loop through list of tuples. i need easy way convert tuple first item of list, can use in code expecting loop through lists. what's straightforward way in single line of code? i figured there must straightforward way this, , there is. if result set called rows : if not isinstance(rows,list): rows = [rows] i don't know if pythonic construction, or if there's way of combining isintance , rows = [rows] lines single statement.

xml - XSLT Input file with settings - change multiple output files -

i'm using xslt edit multiple files. have input file settings file, looks this: <root> <file> <folderin>/var/in/</folderin> <in>10</in> <folderout>/var/out</folderout> <out>20</out> <name>first file</name> </file> </root> example file: <root> <element1 id1="10"> ... </element1> <element2 id2="10" attribute="xyz"> ... </element2> </root> and xslt file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="2.0"> <xsl:output method="xml" indent="yes" encoding="utf-8"/> <xsl:template name="copyxml" match="/*"> <xsl:for-each select="file"> <xsl:variable name="

php - I can't define my error -

parse error: syntax error, unexpected end of file in c:\program files (x86)\easyphp-devserver-14.1vc11\data\localweb\ass1re\create database.php on line 166. can't define problem. checked 1 one can't find. sorry asking <html> <head> </head> <body> <form action="first.php" method="post"> first name: <input type="text" name="fname"> second name: <input type="text" name="sname"> address : <input type="text" name="add"> country/region : <input type="text" name="country"> gender : <input type="radio" name="gender" value="male" checked>male <input type="radio" name="gender" value="female" checked>female ic/no : <input type="text" name="ic"> email : <input type="text" name="email"><br/> period

javascript - Smart Modal disabling window? -

Image
the contractor did our site used version of smart modal jquery plugin, not 1 ben marshall one: https://code.google.com/p/esp1179/source/browse/trunk/smart-modal/jquery.smartmodal.js?r=22 , on our login dialogs. when invalid login happens, form seems disabled , can't figure out why not explicitly disable form or of it's controls, exception of hiding login button , showing spinner. https://www.scic.com/schedule click of register links have price showing course , enter jibberish in username , password inputs. the file calling dialog loadpopups.js. can check out , me figure out why happening? i'm pull out hair have remaining. the div element containing error message, called "error_msg" large , z-index'd on entire surface of form. here's screenshot firebug: you can fix adding .error_msg{} style declaration (around line 2484 way firefox sees output of /css/c/style/): height: 30px

vb.net - Links between two forms -

hi i'm working on project want able take information form1 in case address details google maps have google maps appear in separate form previous. main reason want keep them separate because have database linked first one. i have included copy of code in i'm 90% finished need show me simple line of code link web browser on form 2 form 1 private sub btnmap_click(sender object, e eventargs) handles btnmap.click form2.show() dim postcode string = postcodetextbox.text dim address string = addresstextbox.text try dim queryaddress new stringbuilder queryaddress.append("http://maps.google.com/maps?q=") if postcodetextbox.text <> string.empty queryaddress.append(postcode + "," & "+") end if if addresstextbox.text <> string.empty queryaddress.append(address + "," & "+") end if internet.navigate(queryaddre

Implications of using waitfor delay task in ssis package on scheduled server -

i have question regarding implications of using waitfor delay in execute sql task on ssis package. here's what's going on: have source data tables due amount of data , linked server connection yada yada dropped , created every night. before package utilizes data runs have loop container. in container have execute sql task checks see source tables exist , if not, sends me , email via email task, goes execute sql task has waitfor delay of 30 mins (before looping , checking source tables again). thought pretty slick design others on team concerned because not know enough waitfor task. concerned package possibly interfere theirs, or slow down server, use resources etc.... from google searches didn't see seemed cause issues. can here speak implications of using task? sql waitfor ideal requirement imo - i've been using in production ssis packages years no issues. can monitor via ssms activity monitor , see doesnt consume resources.

Ruby convert string to keyword argument -

i have function in ruby takes keyword arguments in following form: def get_customer_information(name: nil, dob: nil, age: nil, state: nil) ... query db based on supplied parameters end the user can specify 1 of keyword arguments. there command line interface user can leverage function calling command line call , passing in key/value of information of following form: >getcustomerinformation name=myname, dob=mydob the parameters parsed , separated keys , values. however, need know keyword argument associated supplied input command line. there way convert string keyword argument (for example, convert name name:) need not perform string comparison on each parameter determine keyword argument associated with, resulting in call of form: get_customer_information(name.to_keyword myname, dob.to_keyword mydob) or not possible in ruby? you can use .to_sym method. ruby function method convert string symbol. or using rails own, "symbol name".parameterize.

Kentico search by classnames -

i have problem with filtering search results classnames. below can find code snippet use, hope has idea , can me. searchparameters parameters = new searchparameters() { searchfor = "support", searchsort = "##score##", path = "/%", classnames = "cms.faq", currentculture = "en-us", defaultculture = cms.helpers.culturehelper.englishculture.ietflanguagetag, combinewithdefaultculture = false, checkpermissions = false, searchinattachments = false, user = (cms.membership.userinfo)cms.membership.membershipcontext.authenticateduser, searchindexes = index.indexname, startingposition = 0, displayresults = 10, numberofprocessedresults = 10, numberofresults = 0, attachmentwhere = string.empty, attachmentorderby = string

iOS iPhone - Record compressed audio file that plays on Android with no server side transcoding -

i have read many posts regarding question none have produced solution problem. i record audio file on ios can sent , played android device without file having transcoded on server. i aware ios supports recording types , android can play types indicated here: android supported media types avaudiorecorder supported formats however, according if output .m4a file below settings should work: audiochannellayout channellayout; memset(&channellayout, 0, sizeof(audiochannellayout)); channellayout.mchannellayouttag = kaudiochannellayouttag_stereo; recordsettings = [nsdictionary dictionarywithobjectsandkeys: [nsnumber numberwithint: kaudioformatmpeg4aac], avformatidkey, [nsnumber numberwithfloat:16000.0], avsampleratekey, [nsnumber numberwithint:1], avnumberofchannelskey, [nsnumber numberwithint:32000], avencoderbitratekey, [nsdata datawithbytes:&channellayout length:sizeof(audiochannellayout)], avchan

advertising - Real world examples of DAAST (IAB Standard-Digital Audio Ad Serving Template) -

i looking real world examples of daast tags being trafficked. know of audio players have adopted new standard yet? i'm looking @ pandora, iheartradio , i'm still seeing vast tags advertisements (4-22-2015). http://www.iab.net/daast i know it's not great question, please if information let me know it's appreciated. edit: doesn't using daast yet keep updated. tried: pandora, tunein, iheartradio, triton, spotify, radio.com, rdio. triton on website says daast compliant, no daast observed there. i think extremely new format. date of publication of official article 22.01.2015 i can't found implementation in real web-players in time :(

apache poi - SFTP: IOException while reading a file with java -

i using com.jcraft.jsch library read .xls files sftp server. following code connect server. session = jsch.getsession(username, host); session.setconfig("stricthostkeychecking", "no"); session.setpassword(password); session.connect(); sftpchannel = (channelsftp) session.openchannel("sftp"); sftpchannel.connect(); i using sftpchannel.get(file) retrieve inputstream file. inputstream used instantiate xssfworkbook shown below: xssfworkbook workbook = new xssfworkbook(in); problem 1 : when run app, seems stuck on above line time (say 5 minutes) , throws java.io.ioexception: pipe closed error. xls file trying read 800kb , works fine when run local machine. problem 2 : the app designed process files sequentially. so, if first file fails ioe, rest of files fail connection timed out. prevent this, put below code check , re-connect: if(null == session || !session.isconnected()){ log.debug("session not conne

scala - How to convert Iterable[Try[U]] filter successed to Iterable[U]? -

i tried val tryvalues : iterable[try[int]] = ... val successvalues = tryvalues.filter(_.issuccess).map(_.get) but compiler give warning map may throw exception. there way free of warning? another option here, if don't care log fails flatmap using tooption on try . so: val successvalues = tryvalues.flatmap(_.tooption)

javascript - jQuery upload, boostraper keeps overiding my css -

i wanted use php jquery upload colored buttons, file gallery , cool stuff. means have use bootstrapper css overrides page settings (divs change settings margins , such). is there way have bootstrapper css jquery upload elements? i tried putting bootstrapper css links above stuff , added !important css settings, cant working properly. place site css file after other css files, if site shares id's or classes bootstrap , placed before bootstrap bootstrap last seen , re-declares id's , classes why it's overriding site's css place link below bootstrap.css :-)

Clicking links in Selenium WebDriver and Python: nothing happens -

trying click link says in source code <a id="leaderboard1_cmdcsv" href="javascript:__dopostback(&#39;leaderboard1$cmdcsv&#39;,&#39;&#39;)">export data</a></div> i have tried locating id , link text , nothing. awesome. from selenium import webdriver profile = webdriver.firefoxprofile() profile.set_preference('browser.download.folderlist', 2) profile.set_preference('browser.download.manager.showwhenstarting', false) profile.set_preference('browser.download.dir', '/tmp') profile.set_preference('browser.helperapps.neverask.savetodisk', 'text/csv') browser = webdriver.firefox(profile) browser.get("http://www.fangraphs.com/leaders.aspx? pos=all&stats=bat&lg=all&qual=y&type=c,4,5,6,7,8,9,10,11,12,13,14,16,17,21,22,23,39,41,50&season=2015&month=1&season1=2002&ind=0&team=0&rost=1&age=0&filter=&players=0") webdriverw

objective c - Xcode 6, iOS 8 could not load custom fonts -

Image
i'm struggling custom fonts. i'm using xcode 6.3 , ios 8.3. in other application steps: import merriweathersans-regular.ttf (added target) added merriweathersans-regular.ttf in info.plist key fonts provided application but if try print fonts available merriweather never comes out for (nsstring* family in [uifont familynames]) { nslog(@"%@", family); (nsstring* name in [uifont fontnamesforfamilyname: family]) { nslog(@" %@", name); } } the strange xcode 6.1 works fine. i don't know why xcode 6.3 has strange behavior font appear in list when use somewhere in xib.

multithreading - C++ class with thread - destructor, constructor, move constructor? -

i going through book concurrency in action c++. there example there of class called scoped_thread (pg 27), ensures raii idiom , thread has joined before respective end of scope. this current example not allow used functions best requires move operator ,such emplace_back member function vector (?). way can call class constructor , possibly allow better optimization push_back . such, wanted add move constructor in class scoped_thread . before present material, 2 questions follows what's reason non-parallel constructor , move constructor calls? how reduce them? is move constructor correct? i calling joinable() 2 times. in constructor. since created move constructor, i've had check joinable() in destructor well. may tie in question 2 if move constructor not good see edit @ bottom of page before continuing without further ado, here class code (link provided below full code in online compiler) class scoped_thread #define print(x) std::cout << x <

php - How to create database table from entity in symfony 2.6 -

what i've done far -> have created bundle , entity class in , created database table named "news" entity class using following command php app/console doctrine:schema:update --force everything went well. now created new bundle , other entity class in want create other table in database named "user" gives error "the table name 'symfony.news' exists' ". class user { private $id; private $useremail; public function getid() { return $this->id; } public function setuseremail($useremail) { $this->useremail = $useremail; return $this; } } your entity doesn't contain annotations, , doctrine have no idea entity. if add entity like: <?php namespace appbundle\entity; use doctrine\orm\mapping orm; /** * @orm\entity * @orm\table(name="user") */ class user { /** * @orm\column(type="integer") * @orm\id * @orm\generatedvalu

objective c - how to create a json object in ios -

i want post value in json format server stuck json format. have searched alot on google still didnt exact format. { "accountid": "14", "order_items": [ { "item_id": "5", "quantity": "4 kg", "price": " 69.99" }, { "item_id": "6", "quantity": "6 kg", "price": " 79.99" } ] } i tried following code: nsdictionary *dict=@{@"item_id" : itemide, @"quantity" : @"10", @"price" : @"100"}; nsdictionary *dictionary = @{@"accountid" : @"14", @"order_items" : dict}; nserror *error; nsdata *postdata = [nsjsonserialization datawithjsonobject:dictionary

php - How to arrange session array data in the format of category,item(s) and rate? -

my data stored in json in format stated below separate array category, item , rate. want store per category chosen..if category 1 chosen must show how many items under category , rate each item. currently json order below: {"level":{"primary":"1","upper secondary":"2"},"sub":{"2":"bm","1":"maths"},"rate2":{"bm":"10","bi":"20","maths":"30"},"submit":"submit"} $_session['info'][$level]=array('level'=>$level,array('subject'=>$subject,'rate'=>$rate)); how arrange correctly in session array below order: primary [bm=10 ,bi=20] upper secondary [maths=30] and how retrieve later after decoding below in php file stored inside database please? $return = $_post; $return["json"] = json_encode($return); form input: <ul class=&quo